WO2011021911A2 - Method and apparatus for encoding/decoding images using adaptive motion vector resolution - Google Patents

Method and apparatus for encoding/decoding images using adaptive motion vector resolution Download PDF

Info

Publication number
WO2011021911A2
WO2011021911A2 PCT/KR2010/005568 KR2010005568W WO2011021911A2 WO 2011021911 A2 WO2011021911 A2 WO 2011021911A2 KR 2010005568 W KR2010005568 W KR 2010005568W WO 2011021911 A2 WO2011021911 A2 WO 2011021911A2
Authority
WO
WIPO (PCT)
Prior art keywords
resolution
motion vector
region
encoding
flag
Prior art date
Application number
PCT/KR2010/005568
Other languages
French (fr)
Korean (ko)
Other versions
WO2011021911A3 (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
Priority claimed from KR1020100081096A external-priority patent/KR101441874B1/en
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Priority to US13/391,509 priority Critical patent/US11622124B2/en
Publication of WO2011021911A2 publication Critical patent/WO2011021911A2/en
Publication of WO2011021911A3 publication Critical patent/WO2011021911A3/en
Priority to US16/668,502 priority patent/US20200068215A1/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/523Motion estimation or motion compensation with sub-pixel accuracy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • the present invention relates to a method and apparatus for image encoding / decoding using adaptive motion vector resolution. More specifically, the present invention relates to a method and apparatus for improving coding efficiency by adaptively changing the resolution of a motion vector in inter-prediction encoding and inter-prediction decoding of an image.
  • the encoding of data for a video is made up of intra prediction encoding and inter prediction encoding.
  • Such intra prediction encoding or inter prediction encoding is widely used for compressing various data in an effective way to reduce correlation between data.
  • the motion vector of the current block determined by estimating the motion of the current block to be currently encoded by inter prediction encoding is closely correlated with the motion vector of the neighboring block, the motion vector of the neighboring block is determined from the motion vector of the current block.
  • PMV Predicted Motion Vector
  • DMV Differential Motion Vector
  • the encoder encodes and transmits only a difference vector, which is a difference between the predicted motion vector and the current motion vector determined by estimating the motion of the current block in a previously encoded, decoded and reconstructed reference frame. .
  • the decoder also predicts the motion vector of the current block by using the motion vector of the neighboring block previously decoded, and reconstructs the current motion vector by adding the transmitted difference vector and the predicted motion vector.
  • the resolution when performing inter prediction encoding, the resolution may be collectively increased by interpolating a reference frame, and then encoded by a difference vector, which is a difference between the prediction motion vector determined by estimating the motion of the current block and the current motion vector, and then transmitted. have.
  • a difference vector which is a difference between the prediction motion vector determined by estimating the motion of the current block and the current motion vector, and then transmitted.
  • the resolution of the reference frame image that is, the reference image
  • more accurate inter prediction is possible, thereby reducing the amount of bits generated by encoding the residual signal between the original image and the predicted image, but increasing the resolution vector of the motion vector.
  • the amount of bits generated by encoding also increases.
  • the resolution of the reference picture becomes smaller, the bit amount generated by encoding the residual signal becomes larger, but since the resolution of the motion vector becomes smaller, the bit amount generated by encoding the difference vector also becomes smaller.
  • the present invention has an object of improving the coding efficiency by adaptively changing the resolution of a motion vector in inter prediction encoding and inter prediction decoding of an image.
  • the present invention provides a video encoding / decoding apparatus for determining a motion vector resolution for each region or motion vector and inter-prediction encoding using a motion vector according to the motion vector resolution determined for each region or motion vector.
  • Image encoder and an image decoder for extracting resolution information from the bitstream, restoring the resolution, and performing inter-prediction decoding using a motion vector according to the motion vector resolution of each reconstructed region or motion vector. to provide.
  • an apparatus for encoding an image comprising: a resolution determiner for determining a motion vector resolution for each region or motion vector; And an inter prediction encoder configured to perform inter prediction encoding using a motion vector according to a motion vector resolution determined for each region or motion vector.
  • an apparatus for decoding an image comprising: a resolution change flag extractor for extracting a resolution change flag from a bitstream; A resolution decoder configured to extract and decode a coded resolution identification flag from the bitstream according to the extracted resolution change flag to restore a motion vector resolution for each region or motion vector; And an inter prediction decoder configured to inter-prediction-decode using a motion vector according to the motion vector resolution of each reconstructed region or motion vector.
  • an apparatus for decoding an image comprising: a resolution decoder for reconstructing the resolution of each region or motion vector by using information received from a bitstream; And an inter prediction decoder configured to perform inter prediction decoding using a motion vector according to the resolution of each of the reconstructed regions.
  • the motion vector resolution is determined for each region or motion vector, and the inter prediction is performed by using the motion vector according to the motion vector resolution determined for each region or motion vector.
  • a method of encoding an image comprising: determining a motion vector resolution for each region or motion vector; And inter-prediction encoding using a motion vector according to a motion vector resolution determined for each region or motion vector.
  • a method of decoding an image comprising: extracting a resolution change flag from a bitstream; Extracting and decoding the encoded resolution identification flag from the bitstream according to the extracted resolution change flag to restore motion vector resolution for each region or motion vector; And inter-prediction decoding using a motion vector according to the motion vector resolution of each reconstructed region or motion vector.
  • a method of decoding an image comprising: a resolution decoding step of reconstructing a resolution of each region or motion vector by using information received from a bitstream; And an inter prediction decoding step of performing inter prediction decoding by using a motion vector according to the resolution of each of the reconstructed regions.
  • the image can be efficiently encoded by inter-prediction coding by adaptively changing the motion vector resolution in predetermined area units.
  • FIG. 1 is a block diagram schematically illustrating a video encoding apparatus
  • FIG. 2 is an exemplary diagram for explaining a process of interpolating a reference picture
  • 3 is an exemplary diagram for explaining a process of determining a predicted motion vector
  • FIG. 4 is an exemplary diagram showing a cutting type unary code having a maximum value T of 10
  • FIG. 5 is an exemplary diagram illustrating an exponential golem code of 0, 1, and 2;
  • 5 is an exemplary diagram showing exponential Gollum codes of 0, 1, and 2
  • FIG. 6 is an exemplary view showing a cut-unary / K-order index gollum combined code when the maximum value T is 9 and K is 3;
  • FIG. 7 is an exemplary diagram illustrating a zigzag scan order
  • FIG. 8 is a block diagram schematically illustrating a video decoding apparatus
  • FIG. 9 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention.
  • FIG. 10 is an exemplary diagram hierarchically expressing a motion vector resolution in a quad tree structure according to an embodiment of the present invention
  • FIG. 11 is an exemplary diagram for describing a process of encoding a motion vector resolution hierarchically represented in a quad tree structure according to an embodiment of the present invention
  • FIG. 12 is an exemplary diagram illustrating a motion vector resolution of a region determined according to an embodiment of the present invention.
  • FIG. 13 is an exemplary diagram hierarchically expressing a motion vector resolution in a tag tree structure according to an embodiment of the present invention
  • FIG. 14 is an exemplary diagram illustrating a result of encoding a motion vector resolution expressed hierarchically expressed in a tag tree structure according to an embodiment of the present invention
  • 15 is an exemplary diagram for describing a process of determining a motion vector resolution using pixels around a region according to an embodiment of the present invention
  • 16 is an exemplary diagram for explaining a process of predicting a predicted motion vector according to an embodiment of the present invention.
  • 17 is a flowchart illustrating a video encoding method using an adaptive motion vector resolution according to an embodiment of the present invention.
  • FIG. 18 is a block diagram schematically illustrating an apparatus for decoding an image using adaptive motion vector resolution according to an embodiment of the present invention
  • 19 is a flowchart illustrating an image decoding method using adaptive motion vector resolution according to an embodiment of the present invention.
  • FIG. 20 is an exemplary diagram illustrating another method of dividing a node into lower layers according to an embodiment of the present invention.
  • 21 is an exemplary diagram illustrating a binarization bit string allocated to each symbol according to a motion vector resolution according to an embodiment of the present invention
  • 22 is a diagram illustrating an optimal motion vector of a neighboring block and a current block to explain a process of determining a resolution of a motion vector
  • FIG. 23 is a diagram illustrating a conversion equation according to a motion vector resolution
  • 24 is a diagram illustrating a table obtained by converting a resolution of a motion vector of a neighboring block into a resolution of a block to be currently encoded;
  • 25 is a diagram of a code number table of differential motion vectors according to motion vector resolution
  • FIG. 26 is a diagram illustrating an optimal motion vector of a neighboring block and a current block to explain a process of determining a resolution of a differential motion vector
  • 27 is a diagram illustrating a differential motion vector code number table according to differential motion vector resolution
  • FIG. 28 is a diagram illustrating a motion vector of a current block and a reference motion vector of a neighboring block
  • 29 is a diagram illustrating a code number table of a differential reference motion vector according to a differential reference motion vector resolution
  • FIG. 30 is a diagram illustrating an example of indexing and encoding a reference picture based on a distance between a current picture and a reference picture;
  • FIG. 31 is a diagram illustrating a reference picture index according to a reference picture number and a resolution
  • FIG. 32 is a diagram schematically illustrating an image encoding apparatus using an adaptive motion vector according to another embodiment of the present invention.
  • 33 is a diagram illustrating a resolution identification flag when the specified resolutions are 1/2 and 1/4;
  • 34 is a diagram illustrating a neighboring block of a current block
  • 35 is a diagram illustrating a probability model according to a condition
  • 36 is a diagram illustrating a resolution identification flag when the specified resolution is 1/2, 1/4, 1/8;
  • FIG. 37 is a view showing another example of a probability model different from a condition
  • 38 and 39 are diagrams illustrating the degree of adaptability according to the distance between a current picture and a reference picture
  • 40 is a diagram showing an example of storing a different reference picture index number for each predetermined resolution set
  • 41 is a diagram illustrating a structure in which reference pictures are encoded
  • 43 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block
  • 44 is a diagram illustrating another example of a resolution of a current block and a resolution of a neighboring block
  • 46 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block
  • 47 is a view showing a video encoding method using an adaptive motion vector resolution according to another embodiment of the present invention.
  • 49 is a diagram illustrating a peripheral motion vector of the current block
  • 50 is a diagram illustrating a converted value of a peripheral motion vector according to a current resolution
  • 51 is a flowchart illustrating a method of decoding an image using adaptive motion vector resolution according to another embodiment of the present invention.
  • a video encoding apparatus (Video Encoding Apparatus), a video decoding apparatus (Video Decoding Apparatus) to be described below is a personal computer (PC), notebook computer, personal digital assistant (PDA), portable multimedia player (PMP) : Portable Multimedia Player (PSP), PlayStation Portable (PSP: PlayStation Portable), Wireless Communication Terminal (Wireless Communication Terminal), TV (Television), etc., Communication device for communication with various devices or wired or wireless communication network, etc.
  • the present invention refers to various devices including various programs for encoding or decoding an image, a memory for storing data, and a microprocessor for executing and operating a program.
  • the image encoded in the bitstream by the video encoding apparatus is real-time or non-real-time through the wired or wireless communication network, such as the Internet, local area wireless communication network, wireless LAN network, WiBro network, mobile communication network, or the like, or a cable, universal serial bus (USB: Universal)
  • the image decoding apparatus may be transmitted to a video decoding apparatus through a communication interface such as a serial bus, decoded by the video decoding apparatus, reconstructed, and played back.
  • image encoding apparatus and the image decoding apparatus may be provided with functions for performing intra prediction as well as inter prediction, detailed descriptions will be omitted in order to prevent confusion because they are not directly related to the embodiment of the present invention.
  • a moving picture is composed of a series of pictures, and each picture is divided into a predetermined area such as a block.
  • the divided blocks are largely classified into intra blocks and inter blocks according to encoding methods.
  • An intra block refers to a block that is encoded by using an intra prediction coding method.
  • An intra prediction coding is performed by using pixels of blocks that are previously encoded, decoded, and reconstructed in a current picture that performs current encoding.
  • a prediction block is generated by predicting pixels of a block, and a difference value with pixels of the current block is encoded.
  • An inter block refers to a block that is encoded using inter prediction coding.
  • Inter prediction coding generates a prediction block by predicting a current block within a current picture by referring to one or more past or future pictures, and then generates a current block. This is a method of encoding a difference value with.
  • a picture referred to for encoding or decoding the current picture is referred to as a reference picture.
  • the block may be a macroblock of MxN size or a subblock or subblock of OxP size.
  • encoding and decoding in units of blocks is an example, and an image is encoded into a standardized area or an unstructured area such as a block. You may be able to decrypt it.
  • FIG. 1 is a block diagram schematically illustrating a video encoding apparatus.
  • the image encoding apparatus 100 may include a predictor 110, a subtractor 120, a transformer 130, a quantizer 140, an encoder 150, an inverse quantizer, and an inverse quantizer. 160, an inverse transformer 170, an adder 180, and a memory 190.
  • the predictor 110 inter-predictions the current block to generate a predicted block. That is, the predictor 110 determines the original pixel values of the pixels of the current block through motion estimation when the block to be currently encoded, that is, the current block, is input from the input picture. A prediction block having predicted pixel values is generated and output by predicting using a motion vector of the current block.
  • the subtractor 120 subtracts the current block and the prediction block to generate a residual block of the current block.
  • the output residual block includes a residual signal, which has a value obtained by subtracting the prediction pixel value of the prediction block from the original pixel value of the current block.
  • the transformer 130 transforms the residual block to generate a transformed block. That is, the transformer 130 converts the residual signal of the residual block output from the subtractor 120 into a frequency domain to generate and output a transform block having a transform coefficient.
  • a method of transforming the residual signal into the frequency domain a Discrete Cosine Transform (DCT) -based transform or a Hadamard Transform (DCT) may be used, but the present invention is not limited thereto.
  • Various transformation techniques such as the technique may be used, and the residual signal is transformed into a frequency domain and transformed into transformation coefficients.
  • the quantizer 140 quantizes the transform block to generate a quantized transform block. That is, the quantizer 140 quantizes the transform coefficients of the transform block output from the transformer 130 to generate and output a quantized transform block having quantized transform coefficients.
  • DZUTQ dead zone uniform threshold quantization
  • DZUTQ quantization weighted matrix
  • various quantization methods such as quantization improved therefrom may be used.
  • the encoder 150 may output a bitstream by encoding the quantized transform block. That is, the encoder 150 uses various encoding techniques, such as entropy encoding, on a frequency coefficient string scanned by various scan methods such as zigzag scan of the quantized transform coefficients output from the quantizer 140. To generate and output a bitstream including additional information necessary for encoding and decoding the corresponding block (for example, information on a prediction mode, a quantization coefficient, a motion vector, etc.). can do.
  • Inverse quantizer 160 inverse quantizes the quantized transform block. That is, the inverse quantizer 160 inversely quantizes and outputs quantized transform coefficients of the quantized transform block output from the quantizer 140.
  • Inverse transformer 170 inversely transforms an inverse quantized transform block. That is, the inverse transformer 170 inversely transforms the transform coefficients inversely quantized by the inverse quantizer 160 to restore a residual block having the reconstructed residual coefficients.
  • the adder 180 reconstructs the current block by adding the prediction block predicted by the predictor 110 and the residual block inversely transformed and reconstructed by the inverse transformer 170.
  • the reconstructed current block is stored in the memory 190, and the reconstructed current block stored in the memory 190 is accumulated in units of blocks or in units of pictures and transferred to the predictor 110 in units of pictures, and then other blocks such as the next block or the next picture are stored. Can be used to predict blocks.
  • the predictor 110 determines the motion vector of the current block by estimating the motion of the current block by using the reference picture stored in the memory 190.
  • the resolution of the reference picture is interpolated by interpolating the reference picture stored in the memory 190. Can be used to perform motion estimation.
  • FIG. 2 is an exemplary diagram for describing a process of interpolating a reference picture.
  • FIG. 2 illustrates pixels of a reference picture stored in the memory 190 and pixels interpolated with subpixels. Filtering the previously reconstructed pixels A to U of the reference picture with an interpolation filter can generate subpixels a to s, and the subpixels a to s are interpolated between the already reconstructed pixels as shown.
  • the resolution of the reference picture may be four times higher.
  • Motion Estimation is a process of finding a part most similar to the current block in the interpolated reference picture and outputting a block of the corresponding part and a motion vector indicating the corresponding block.
  • the prediction block found in this process is subtracted from the current block in the subtractor 120, through which a residual block having a residual signal is generated.
  • the motion vector is encoded by the encoder 160.
  • the encoder 160 may predict the motion vector of the current block by using the motion vectors of blocks adjacent to the current block and encode the motion vector by using the predicted motion vector, that is, the predicted motion vector. .
  • 3 is an exemplary diagram for describing a process of determining a predicted motion vector.
  • the current block is X
  • the motion vector of the adjacent block A on the left of the current block is MV_A (x component: MVx_A, y component: MVy_A), and the motion of the adjacent block B above the current block.
  • Each component of the predicted motion vector MV_pred_X may be determined as a median value for each component of the motion vector of the neighboring block of the current block, as shown in Equation 1.
  • the motion vector prediction method in the present invention is not limited to the method introduced herein.
  • the encoder 160 may encode a difference vector having a difference between the predicted motion vector and the motion vector.
  • a difference vector for example, Universal Variable Length Coding (UVLC) Entropy Coding (UVLC ') and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.
  • UVLC Universal Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the encoding method in the encoder 160 is not limited to the method introduced here.
  • the difference vector When the difference vector is encoded using UVLC, the difference vector may be encoded using a K-th Order Exp-Golomb Code. At this time, the value of K may be '0' or any other value.
  • the prefix of the Kth order Gollum code It has a truncated unary code corresponding to, and the suffix can be represented as a binary bit string of x + 2 k (1-2 l (x) ) values having a length of k + l (x). have.
  • FIG. 4 is an exemplary diagram showing a cutting type unary code having a maximum value T of 10
  • FIG. 5 is an exemplary diagram illustrating an exponential Golem code of 0, 1, and 2.
  • the difference vector when the difference vector is encoded using CABAC, the difference vector is to be encoded using the sign bit of the concatenated Truncated Unary / K-th Order Exp-Golomb Code. Can be.
  • FIG. 6 is an exemplary view showing a cut-unary / K-order index gollum combined code when the maximum value T is 9 and K is 3.
  • FIG. 7 is an exemplary diagram illustrating a zigzag scan sequence.
  • the quantized frequency coefficients quantized by the quantizer 140 may be scanned by the encoder 160 and encoded in the form of quantized frequency coefficient sequences.
  • the quantized frequency coefficients in the block form may be scanned in a zigzag order as shown in FIG. 7. However, it may be scanned in various other scanning orders.
  • FIG. 8 is a block diagram schematically illustrating a video decoding apparatus.
  • the image decoding apparatus 800 may include a decoder 810, an inverse quantizer 820, an inverse transformer 830, a predictor 840, an adder 850, and a memory 860.
  • the decoder 810 extracts a quantized transform block by decoding the bitstream. That is, the decoder 810 decodes and inversely scans the bit string extracted from the input bitstream to restore the quantized transform block having the quantized transform coefficients. In this case, the decoder 810 may decode using an encoding technique such as entropy encoding used by the encoder 160 of the image encoding apparatus 100.
  • the decoder 810 extracts and decodes the encoded difference vector from the bitstream, reconstructs the difference vector, predicts the motion vector of the current block, adds the predicted motion vector and the reconstructed difference vector, and adds the motion vector of the current block. Can be restored.
  • Inverse quantizer 820 inverse quantizes the quantized transform block. That is, the inverse quantizer 820 inverse quantizes the quantized transform coefficients of the quantized transform block output from the decoder 810. In this case, the inverse quantizer 820 performs inverse quantization by inversely performing the quantization technique used by the quantizer 140 of the image encoding apparatus 100.
  • the inverse transformer 830 inversely transforms the inverse quantized transform block output from the inverse quantizer 820 to restore the residual block. That is, the inverse transformer 830 restores the residual block having the reconstructed residual signal by inversely transforming the inverse quantized transform coefficients of the inverse quantized transform block output from the inverse quantizer 820. Inverse conversion is performed by performing the conversion technique used in the converter 130 of the inverse.
  • the predictor 840 generates a prediction block by predicting the current block by using the motion vector of the current block extracted from the bitstream and decoded.
  • the adder 850 reconstructs the current block by adding the prediction block and the reconstructed residual block. That is, the adder 850 adds the predicted pixel value of the predicted block output from the predictor 840 and the reconstructed residual signal of the restored residual block output from the inverse transformer 830 to add the reconstructed pixel value of the current block. Restore the current block.
  • the current block reconstructed by the adder 850 is stored in the memory 860 and stored in block units or as reference pictures in picture units, so that the predictor 840 can be used to predict the next block.
  • the image encoding apparatus 100 and the image decoding apparatus 800 described above with reference to FIGS. 1 through 8 interpolate the reference picture in subpixel units to increase the resolution of the reference picture and the motion vector, thereby inter prediction encoding and inter prediction decoding.
  • the reference picture may be interpolated at the same resolution in units of pictures or in groups of pictures (GOPs) and the resolution of the motion vector may be increased.
  • the prediction is more accurate by increasing the resolution of the reference picture and the bit amount generated by encoding the residual signal can be reduced accordingly.
  • the resolution of the motion vector is also increased to encode the motion vector. Since the amount of bits to be collectively increased, as a result, even in the case of performing inter prediction encoding by increasing the resolution of the reference picture, the encoding efficiency may not be greatly increased or the encoding efficiency may be lowered depending on the image.
  • inter prediction encoding is performed by adaptively increasing the resolution of a reference picture in an area unit having an arbitrary size, such as a picture unit, a slice unit, a block unit, etc. according to characteristics of an image, thereby increasing the resolution or complexity of an image.
  • a method and apparatus for inter prediction encoding and decoding by increasing the resolution in a small region and lowering the resolution in a region where the image is not complicated or large in motion are described.
  • FIG. 9 is a block diagram schematically illustrating a video encoding apparatus according to a first embodiment of the present invention.
  • the image encoding apparatus 900 using the adaptive motion vector according to the first embodiment of the present invention includes an inter prediction encoder (910), a resolution change flag encoder (920), and a resolution determiner ( Resolution Determiner (930), a resolution encoder (Resolution Encoder, 940) and a differential vector encoder (Differential Vector Encoder, 950).
  • the resolution change flag generator 920, the resolution encoder 940, and the difference vector encoder 950 are not necessarily all included in the image encoding apparatus 900, but may be selectively included according to an implementation method.
  • the inter prediction encoder 910 inter-prediction encodes an image in units of regions using a motion vector according to a motion vector resolution determined for each region or motion vector of the image.
  • the inter prediction encoder 910 may be implemented by the image encoding apparatus 100 described above with reference to FIG. 1.
  • the functions of the additional components and the encoder 150 in the inter prediction encoder 910 are included.
  • the overlapping function may be omitted in the encoder 150.
  • the overlapping function may be omitted in the predictor 110.
  • one or more components added among the resolution encoder 940 and the differential vector encoder 950 may be configured separately from the inter prediction encoder 910 as shown in FIG. 9, but may be configured as an encoder in the inter prediction encoder 910. It may be configured integrally with 150.
  • the flag information generated by the resolution change flag generator 920 may be converted into a bitstream by the resolution change flag generator 920, the function of converting the bitstream into a bitstream is performed by the encoder 150 of the inter prediction encoder 910. It may be.
  • the image encoding apparatus 100 described above with reference to FIG. 1 has been described as encoding an image in units of blocks.
  • the inter prediction encoder 910 uses a variety of blocks such as macroblocks or subblocks, slices, pictures, and the like. It may be divided into regions of shape and size and encoded in an area unit having an arbitrary size.
  • the predetermined area may be a macroblock of 16 ⁇ 16 size, but may be a block of various sizes and shapes such as a 64 ⁇ 64 size block and a 32 ⁇ 16 size block.
  • the inter prediction encoder 910 is a motion vector resolution determined differently for each region.
  • Each region may be inter prediction encoded by using a motion vector having.
  • an image region in which the motion vector resolution may be determined may be a picture (frame or field), a slice, or an image block having a predetermined size.
  • the inter prediction encoder 910 increases the resolution by interpolating a reference picture that is already encoded, decoded, and reconstructed, and then performs motion estimation.
  • an interpolation filter for interpolating a reference picture various filters such as a Winner filter, a bilinear filter, a Kalman filter, and the like can be used.
  • the resolution for interpolation is 2/1 pixel.
  • the resolution of various fractional and integer pixel units such as 1/1 pixel, 1/2 pixel, 1/4 pixel, 1/8 pixel unit, etc. may be applied.
  • different filter coefficients may be used or the number of filter coefficients may be changed according to the various resolutions.
  • interpolation when the resolution is 1/2 pixel unit, interpolation may be performed using a Wiener filter, and when the resolution is 1/4 pixel unit, interpolation may be performed using a Kalman filter.
  • the number of filter taps may be changed when interpolating each resolution. For example, when the resolution is 1/2 pixel unit, the interpolation may be performed using an 8 tap winner filter, and when the resolution is 1/4 pixel unit, the interpolation may be performed using a 6 tap winner filter.
  • the inter prediction encoder 910 may encode the filter coefficients by determining the optimum filter coefficient for each motion vector resolution that minimizes the error between the current picture to be encoded and the reference picture.
  • the filter may use any filter such as a Wiener filter or a Kalman filter, and the number of filter taps may be several, and the number of filters and filter taps may be different for each resolution.
  • the inter prediction encoder 910 may inter predict using a reference picture interpolated using a different filter according to the resolution of a region or a motion vector. For example, in order to calculate an optimal filter that minimizes a sum of squared difference (SSD) between a current picture to be encoded and a reference picture, as shown in Equation 2, an optimal filter tap is selected for each resolution using the Wiener filter. Can be calculated
  • Equation 2 S denotes a pixel of the current picture, h sp denotes a filter coefficient of the pixel domain, P denotes a pixel of the reference picture, e SP denotes an error, and x and y denote a position of the current pixel. Indicates.
  • the inter prediction encoder 910 calculates filter coefficients for each resolution by using a Wiener hop equation as shown in Equation 2, encodes the optimal filter coefficients for each resolution, and includes them in the bitstream, and performs interpolation filtering on the reference picture.
  • reference pictures for each resolution may be generated and encoded.
  • the filter coefficient of the 6-tap Winner filter at 1/2 resolution, the 8-tap Kalman filter at 1/4 resolution, the filter coefficient of the linear filter at 1/8 resolution are calculated, and the filter coefficients are encoded and included in the bitstream.
  • the reference picture for each resolution can be interpolated and encoded.
  • the inter prediction encoder 910 encodes using a reference picture interpolated by a 6-tap winner filter when the resolution of the current region or motion vector is 1/2 resolution, and interpolates by an 8-tap Kalman filter when 1/4 resolution.
  • the encoded reference picture may be used.
  • the resolution change flag generator 920 may generate and include a resolution change flag indicating whether the motion vector resolution and / or the resolution of the differential motion vector is determined for each region or motion vector of the image.
  • the area for changing the motion vector resolution and / or the resolution of the differential motion vector by the resolution change flag may be a block, a macroblock, a group grouping blocks, a group grouping macroblocks, or an area having an arbitrary size such as MxN. have. That is, the resolution change flag generator 920 inter-predictively encodes a motion vector having a fixed motion vector resolution for all regions or sub-regions of an image or motion vector resolution for each region (or motion vector).
  • the inter prediction encoding may be performed using a motion vector having a determined motion vector resolution, and a resolution change flag indicating whether to generate a differential motion vector having a fixed resolution may be generated and included in the bitstream.
  • the resolution change flag may be determined and generated according to setting information input by a user, or may be determined and generated according to a predetermined criterion by analyzing an image to be encoded. Such a resolution change flag may be included in a header of the bitstream.
  • the header may be a picture parameter set, a sequence parameter set, a slice header, or the like.
  • the inter prediction encoder 910 is fixed for the subregion defined in the header. Inter-prediction encoding of each region is performed by using the motion vector of each region having a set motion vector resolution. For example, if the resolution change flag included in a slice header of a slice indicates that the motion vector resolution is fixed, the motion vector resolution having the least rate-distortion cost is determined for the image of the slice and all regions of the slice are determined. For, the inter prediction encoding may be performed using a motion vector of each region having a corresponding motion vector resolution.
  • the inter prediction encoder 910 may determine each region determined by the resolution determiner 930. Each region is inter prediction encoded by using the motion vector of each region having a motion vector resolution of. For example, if the resolution change flag included in the slice header of a slice indicates that the motion vector resolution and / or the resolution of the differential motion vector is adaptively changed for each region or motion vector, the slice is determined by the resolution determiner 910. An area of each slice may be inter prediction encoded by using a motion vector of each area having a motion vector resolution determined for each area within.
  • the slice is determined by the resolution determiner 930.
  • Inter prediction encoding may be performed using a motion vector resolution determined for each motion vector in the frame.
  • the resolution determiner 930 When the resolution determiner 930 generates a flag indicating that the resolution of the motion vector resolution and / or the differential motion vector is adaptively changed for each area or motion vector by the resolution change flag generator 920, the resolution determiner 930 generates a unit of motion or unit of motion vector.
  • Optimum motion vector resolution and / or differential motion vector resolution using some cost function, such as RD Cost (Rate-Distortion Cost) while changing the resolution of the motion vector resolution and / or differential motion vector. Determine.
  • the optimal motion vector resolution and / or the resolution of the differential motion vector only represent the motion vector resolution and / or the resolution of the differential motion vector determined using a predetermined cost function, and the motion vector resolution and / or are determined in this way.
  • the motion vector resolution and / or the resolution of the differential motion vector may be the optimal motion vector resolution and / or the resolution of the differential motion vector.
  • the resolution encoder 940 may encode a motion vector resolution and / or a resolution of a differential motion vector determined for each region or motion vector. That is, the resolution encoder 940 encodes a motion vector resolution identification flag indicating the motion vector resolution of each region determined by the resolution determiner 930 and / or a resolution identification flag of the differential motion vector indicating the resolution of the differential motion vector. It can be included in the bitstream.
  • the implementation of the motion vector resolution identification flag and / or the resolution identification flag of the differential motion vector is possible in a variety of ways.
  • the resolution indicated by the resolution identification flag may be the resolution of the motion vector resolution or the differential motion vector, or may be used simultaneously for the motion vector resolution and the resolution of the differential motion vector.
  • the differential vector encoder 950 may encode a differential motion vector that is a difference between a motion vector and a predicted motion vector according to a motion vector resolution determined for each region or motion vector.
  • the differential motion vector may be encoded according to the resolution of the differential motion vector.
  • the resolution identification flag indicating the motion vector resolution may indicate both the x component and the y component of the motion vector or may indicate respective resolutions. That is, when the camera photographing the image moves or an object in the image moves, the resolution determiner 930 may determine different resolutions of the x component and the y component of the motion vector for motion estimation. For example, the resolution determiner may determine resolution of 1/8 pixel unit for the x component of a motion vector of a certain area and resolution of 1/2 pixel unit for the y component.
  • the 910 may inter-prediction the corresponding region by determining a motion vector with different resolutions for each of the x component and the y component for the motion vector of the corresponding region, and using the determined motion vector to perform motion estimation and motion compensation.
  • FIG. 22 is a diagram illustrating an optimal motion vector of a neighboring block and a current block in order to explain a process of determining the resolution of a motion vector in the resolution determiner 930.
  • the resolution changing flag generator 920 adaptively for each region or motion vector (in the second embodiment, the resolution designation flag generator 3220) Can be set whether or not the motion vector resolution and / or the resolution of the differential motion vector are changed or fixed by the resolution designation flag generated by the controller), and the types of resolutions of the current block and neighboring blocks are 1/2, 1/4, Assume that 1/8 and the optimal resolution is determined as shown in FIG.
  • the resolution of block A is 1/2 and the motion vector is (4/2, -8/2)
  • the resolution of block B is 1/4 and the motion vector is (36/4, -28/4)
  • the resolution of block C is 1/8 and the motion vector is (136/8, -104/8)
  • the current block X is 1/4 and the motion vector is (16/4, 20/4).
  • the predicted motion vector may depend on the resolution of the current motion vector.
  • a resolution conversion process may be performed such that the resolution of the neighboring motion vector is the same as the resolution of the current motion vector to calculate the predicted motion vector.
  • FIG. 23 is a diagram illustrating a conversion equation according to a motion vector resolution
  • FIG. 24 is a diagram illustrating a table obtained by converting a resolution of a motion vector of a neighboring block to a resolution of a block X to be currently encoded.
  • the predicted motion vector can be obtained using the neighboring motion vectors. If the neighboring motion vectors are stored according to their resolutions, they can be converted using multiplication and division when the neighboring motion vectors are different from the current motion vectors. . In this case, the resolution conversion process may be performed when a prediction motion vector is obtained. Alternatively, if the neighboring motion vector is stored based on the highest resolution, the current motion vector may be converted using division if the current motion vector is not the highest resolution. In this case, the resolution conversion process may perform a resolution conversion process of converting the encoded motion vector to the highest resolution if it is not the highest resolution.
  • the current motion vector may be converted using multiplication and division when the current motion vector is different from the reference resolution in which the peripheral motion vectors are stored.
  • the resolution conversion process may perform a resolution conversion process of converting the motion vector to the reference resolution when the motion vector resolution is not the reference resolution when the motion vector is stored.
  • division rounding, rounding, and rounding can be performed. As shown in Figs. 23 and 24, rounding is used in the example.
  • the example uses a peripheral motion vector stored according to each resolution.
  • a predicted motion vector can be obtained with reference to the table of FIG. 23.
  • the predicted motion vector can be obtained using median, and median can be obtained for each component.
  • the predicted motion vector is (32/4, -28/7).
  • the differential motion vector is obtained using the predicted motion vector thus obtained.
  • the differential motion vector can be obtained by the difference between the motion vector and the predicted motion vector as shown in Equation (3).
  • 25 is a diagram illustrating a code number table of differential motion vectors according to motion vector resolution.
  • the differential motion vector may be encoded for each motion vector value by using the code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
  • the prediction motion vector may be obtained as follows using the example of FIG. 22.
  • the median for each component can be obtained without converting the surrounding motion vector according to the current resolution.
  • the predicted motion vector is (36/4, -104/8).
  • the differential motion vector is obtained using the predicted motion vector thus obtained.
  • the differential motion vector may be obtained as a difference between the motion vector and the predicted motion vector as shown in Equation 4.
  • the differential motion vector may be encoded with respect to the motion vector value for each resolution by using a code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
  • the prediction motion vector may be obtained as follows using the example of FIG. 22.
  • the median instead of converting the surrounding motion vector according to the current resolution, the median may be obtained for each component and then converted according to the current resolution.
  • the predicted motion vector becomes (36/4, -52/4) with reference to FIG.
  • the differential motion vector is obtained using the predicted motion vector thus obtained.
  • the differential motion vector may be obtained as a difference between the motion vector and the predicted motion vector as shown in Equation 5.
  • the differential motion vector may be encoded with respect to the motion vector value for each resolution by using a code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
  • the prediction motion vector may be obtained as follows using the example of FIG. 22.
  • the median may also be obtained by using only motion vectors around the same resolution as the current motion vector.
  • the predicted motion vector becomes (36/4, -28/4).
  • the differential motion vector is obtained using the predicted motion vector thus obtained.
  • the differential motion vector may be obtained as a difference between the motion vector and the predicted motion vector as shown in Equation 6.
  • the differential motion vector may be encoded with respect to the motion vector value for each resolution by using a code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
  • the resolution encoder 940 may encode the resolution change flag and the type of resolution in the header (meaning the resolution designation flag in the second embodiment), and at this time, the optimally determined resolution identification flag is encoded by 1/4.
  • the differential vector encoder 950 may encode the differential motion vector obtained by using the predicted motion vector calculated using the peripheral motion vector converted according to the resolution determined by the resolution determiner 930.
  • FIG. 26 is a diagram illustrating an optimal motion vector of a neighboring block and a current block in order to explain a process of determining a resolution of a differential motion vector in the resolution determiner 930.
  • the predicted motion vector may be calculated as shown in Equation 7 below.
  • the MVDx can be encoded with 1/8 and the MVDy can be encoded with 1/4.
  • FIG. 27 is a diagram illustrating a differential motion vector code number table according to differential motion vector resolution.
  • the resolution encoder 940 encodes the differential motion vector resolution identification flag by (1/8, 1/4) for each of the x and y components, encodes the code number of the differential motion vector as (1, 1), and performs the differential motion. Signs can be separately encoded for x and y components of the vector.
  • the differential vector encoder 950 encodes a differential motion vector
  • a reference resolution is determined, and a motion vector having a resolution other than the reference resolution is converted into a motion vector having a reference resolution and obtained from a reference motion vector of a neighboring block.
  • the differential motion vector is calculated using the predictive motion vector. If the motion vector has a resolution other than the reference resolution, a method of additionally encoding the reference resolution flag may be used.
  • the reference resolution flag may include data indicating whether the resolution is the same as the same reference resolution and data indicating the position of the actual motion vector.
  • the reference resolution may be defined in a header, and may be a picture parameter set, a sequence parameter set, a slice header, or the like.
  • FIG. 28 is a diagram illustrating a motion vector of a current block X and a reference motion vector of a neighboring block.
  • the resolution change flag meaning the resolution designation flag in the second embodiment
  • the resolution type is 1/2, 1/4, 1/8
  • the reference resolution is 1/4, as shown in FIG.
  • the resolution of the motion vector of the current block is different from the resolution of the reference motion vector, it may be converted using multiplication and division.
  • division rounding, rounding, rounding, etc. can be used, and rounding is used in this embodiment.
  • the reference motion vector becomes (2/4, 3/4), and the position of the actual motion vector having a resolution other than the reference resolution may be represented by the reference resolution flag.
  • the difference between the motion vector of the current block and the reference motion vector is (0, 1/8), and the value of the reference resolution flag may include location information such as (0, 1), for example.
  • 0 indicates that the reference motion vector is the same as the motion vector
  • 1 indicates the motion vector as small as -1/8 in the reference motion vector.
  • the difference vector of the reference motion vector is calculated using the prediction reference motion vector, which is a median value of the reference motion vector of the neighboring block.
  • the prediction reference motion vector can be obtained by using Equation 10.
  • the encoder encodes Ref_MVD (-2/4, 7/4) and encodes a reference resolution flag (0, 1) indicating the position of the motion vector.
  • FIG. 29 is a diagram illustrating a code number table of a differential reference motion vector according to differential reference motion vector resolution.
  • the reference resolution is 1/4
  • the value of the differential reference motion vector is 2/4
  • the code number is 2
  • the value of the differential reference motion vector is 3/4 as in the present embodiment.
  • the code number is 3, and the code number for each component of the differential reference motion vector is included in the reference resolution flag.
  • the resolution encoder 940 may variously encode a motion vector resolution and / or a resolution of a differential motion vector determined for each region or motion vector.
  • various examples of encoding the motion vector resolution or the resolution of the differential motion vector will be described with reference to FIGS. 10 to 14. In the following description, only an example of encoding a motion vector resolution will be described. However, since the resolution of the differential motion vector may be encoded in the same manner as the motion vector resolution, an example of encoding the resolution of the differential motion vector is omitted.
  • the resolution encoder 940 may integrate the motion vector resolution determined for each region or motion vector between adjacent regions having the same motion vector resolution and generate a resolution identification flag in units of the integrated region.
  • the resolution identification flag may be generated hierarchically in a quadtree structure.
  • the resolution encoder 940 may encode an identifier indicating the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer in the header for the corresponding area of the bitstream.
  • FIG. 10 is an exemplary diagram hierarchically expressing a motion vector resolution in a quad tree structure according to an embodiment of the present invention.
  • 10A shows regions having various motion vector resolutions in one picture.
  • Each region in 10A may be macroblocks of size 16 ⁇ 16, and the number indicated in each region represents the motion vector resolution of each region.
  • 10B is a group showing regions having the same motion vector resolution among the regions shown in 10A.
  • 10C is a hierarchical representation of the motion vector resolution of regions bounded by 10B in a quad tree structure. In 10C, since the size of the region indicated by the lowest node is a 16 ⁇ 16 macroblock and the maximum number of hierarchies in the quad tree is 4, such information is encoded and included in the header for the region.
  • FIG. 11 is an exemplary diagram illustrating a result of encoding a motion vector resolution expressed hierarchically in a quad tree structure according to an embodiment of the present invention.
  • the final bit as shown in Fig. 11 can be obtained. Encodes whether a node is divided into one bit. For example, if the bit value is '1', the node is divided into lower layers. If the bit value is '0', the node is not split into lower layers. It is not shown.
  • the node at level 0 is divided into lower layers, so that it is encoded with bit value '1'. Since the first node of the divided level 1 is no longer divided into 1/2 resolutions, the first node is encoded with a bit value '0' and the motion vector resolution 1/2 is encoded. Since the second node of level 1 is divided into lower layers, it is encoded with bit value '1'. Since the third node of level 1 is not divided into lower layers, the third node is encoded with bit value '0' and the motion vector resolution 1/4 is encoded. Since the last fourth node of level 1 has been divided into lower layers, it is encoded with bit value '1'. In the same way, each node of level 2 is encoded.
  • the final bit hierarchically encoded with the quadtree structure of the motion vector resolution for the region shown in 10A may be generated as shown in FIG. 11.
  • Motion vector resolutions such as 1/2, 1/4, and 1/8 shown in the last bit mean that they are encoded with bits representing them, but are not represented as bit values for convenience of description.
  • the motion vector resolution may be expressed as a bit value in various ways depending on the implementation manner. For example, if the available motion vector resolution is two, it may be indicated by a 1-bit flag. If the available motion vector resolution is four or less, it may be indicated by a 2-bit flag.
  • the resolution identification flag generated as described above may be included in the field of the slice data.
  • the image decoding apparatus to be described later may extract and decode the resolution identification flag from the bitstream to restore the motion vector resolution of each region.
  • nodes can be subdivided into lower layers in various ways, such as not divided into two regions, divided into two horizontally long regions, divided into two vertically long regions, and divided into four regions.
  • the resolution encoder 940 may generate a resolution identification flag by encoding the motion vector resolution determined for each region or motion vector using the motion vector resolution predicted using the motion vector resolution of the peripheral region of each region. For example, assuming that an area is a block of size 64 ⁇ 64, the motion vector resolution of the corresponding area may be estimated using the motion vector resolutions of the left area and the upper area of the area. In this case, when the predicted motion vector resolution is the same as the motion vector resolution of the corresponding region, the resolution encoder 940 encodes the resolution identification flag for the corresponding region as a bit value '1'.
  • the resolution identification flag for the corresponding area may be encoded into a bit value '0' and a bit value representing the motion vector resolution of the corresponding area. For example, if the resolution of the upper region and the left region of the region is 1/2 resolution and the resolution of the region is also 1/2 resolution, the resolution identification flag for the region is encoded with the bit value '1' and the region If the resolution of the motion vector is not encoded and the resolution of the upper and left regions of the region is 1/2 resolution and the resolution of the region is 1/4 resolution, the resolution identification flag for the region is set to the bit value '0'. Can be encoded and additionally encoded the motion vector resolution of the region.
  • the resolution encoder 940 may generate a resolution identification flag by encoding the motion vector resolution determined for each region or motion vector by using the run and length of the motion vector resolution of each region or motion vector. have.
  • FIG. 12 is an exemplary diagram illustrating a motion vector resolution of a region determined according to an embodiment of the present invention.
  • regions in one picture are represented by macroblocks having a size of 16 ⁇ 16, and motion vector resolutions of the regions are illustrated in each region.
  • the motion vector resolution of the regions shown in FIG. 12 is encoded using a run and a length.
  • a motion vector resolution of 1/2 is obtained. 4 times in succession, 1/4 motion vector resolution comes out 1 time, 1/8 motion vector resolution comes out 2 times in succession, 1/2 motion vector resolution comes out 4 times in succession (after motion Vector resolution is omitted), when the motion vector resolution of each region is expressed by the run and length, (1 ⁇ 2, 4), (1 ⁇ 4, 1), (1 ⁇ 8, 2), (1 ⁇ 2, 4),... It can be expressed as Accordingly, the resolution encoder 940 may generate a resolution identification flag by encoding the motion vector resolution of each region represented by the run and the length by representing the bit value.
  • the resolution encoder 940 may generate a resolution identification flag by hierarchically encoding a motion vector resolution determined for each region or motion vector using a tag tree.
  • the resolution encoder 940 may include an identifier indicating the maximum number of hierarchies of the tag tree and the size of the region indicated by the lowest node in the header.
  • FIG. 13 is an exemplary diagram hierarchically expressing a motion vector resolution in a tag tree structure according to an embodiment of the present invention.
  • FIG. 13 hierarchically shows a motion vector resolution determined for each region within a portion of an image in a tag tree structure.
  • each region is a macroblock of size 16 ⁇ 16.
  • FIG. 14 is an exemplary diagram illustrating a result of encoding a motion vector resolution expressed hierarchically expressed in a tag tree structure according to an embodiment of the present invention.
  • the difference between the number of motion vector resolutions of the upper layer and the current layer is expressed as a sequence of '0', and the bit value of the last bit is expressed as '1'.
  • the motion vector resolution number of the upper layer is '0'
  • the motion vector resolution number of 1/2 is '1'
  • the motion vector resolution number of 1/4 is '2', 1 /
  • the number of motion vector resolutions of 8 is '3'
  • a resolution identification flag may be generated as shown in FIG. 14.
  • the number assigned to each motion vector resolution may be changed.
  • the motion vector resolution number of the upper layer at level 0 is '0' and the motion vector resolution number at 1/2 is number '1'. Therefore, the difference between the number of level 1 and level 0 is '1', and when '1' is converted into coded bits, it is '01'. In addition, since the difference value of the number of motion vector resolutions from the level 1 to the higher layer (level 0) becomes '0', the encoding bit becomes '1'. In addition, since the difference value of the number of the motion vector resolution with respect to the upper layer (level 1) at level 2 becomes '0', the encoding bit becomes '1'.
  • the difference value of the number of the motion vector resolution with the higher layer (level 2) becomes '0', so the encoding bit becomes '1', and finally the motion vector resolution of the region identified by (0,0).
  • the coded bit of becomes '0111'.
  • level 0, level 1, and level 2 are already reflected in the resolution identification flag of the area identified by (0,0), so they are higher in level 3.
  • '1' which is a difference value of the number of motion vector resolutions with respect to the layer (level 2), may be encoded, and the corresponding encoding bit becomes '01'. Therefore, in the region identified by (0, 1), only '01' is generated as the resolution identification flag of the region.
  • level 0 is already reflected in the resolution identification flag of the region identified by (0,0), so that the level 1, By encoding only level 2 and level 3, the coded bit becomes '0111'.
  • the resolution encoder 940 may generate a resolution identification flag by changing and encoding the number of bits allocated to the motion vector resolution according to the frequency of the motion vector resolution determined for each region or motion vector. To this end, the resolution encoder 940 may change and encode the number of bits allocated to the motion vector resolution of the corresponding area according to the frequency of occurrence of the motion vector resolution up to the immediately preceding area in units of areas, or include a plurality of areas. The number of bits allocated to the motion vector resolution of the partial region may be encoded according to the frequency of occurrence of the motion vector resolution of the immediately preceding partial region or the frequency of occurrence of the motion vector resolution to the immediately preceding partial region on an area basis.
  • the resolution encoder 940 calculates the frequency of the motion vector resolution in units of regions or partial regions, assigns small numbers in order of increasing frequency of the calculated motion vector resolution, and assigns the small numbers of motion vector resolutions.
  • a small number of bits can be allocated to encode the motion vector resolution of each region.
  • the motion vector resolution of 1/2 is 10 times in all the regions up to the previous region. Is generated, 1/4 motion vector resolution is generated 15 times, and 1/8 motion vector resolution is generated 8 times, the smallest number (e.g., 1) is assigned to 1/4 motion vector resolution. Assign the next smaller number (e.g., 2) to 1/2 motion vector resolution, give the largest number (e.g. 3) to 1/8 motion vector resolution, After allocating small bits in numerical order, if the motion vector resolution of the region to be encoded with motion vector resolution is 1/4 pixel unit, the smallest bit is allocated to encode 1/4 motion vector resolution for the region. Can be.
  • the resolution encoder 940 when the resolution encoder 940 changes the number of bits according to the frequency of occurrence of the motion vector resolution of the previous region group for each region group unit, the resolution encoder 940 generates the motion vector resolution of each region of the previous region group.
  • the frequency vector may be updated to allocate small numbers in order of occurrence frequency and to allocate small bits in order of number order to encode motion vector resolution of each region of the region group to be encoded.
  • An area group may be a quad tree, a quad tree bundle, a tag tree, a tag tree bundle, a macroblock, a macroblock bundle, and an area of any size.
  • the frequency of occurrence of the motion vector resolution is updated by every two macroblocks, and the number of bits of the motion vector resolution is assigned, or if four region groups are designated as quadtrees.
  • the frequency of occurrence of the motion vector resolution is updated every four to allocate the number of bits of the motion vector resolution.
  • the resolution encoder 940 may change the encoding method of the resolution identification flag according to the distribution of the motion vector resolutions of the surrounding areas of each region based on the motion vector resolution determined for each region or motion vector. That is, the shortest number of bits is allocated to the resolution having the highest probability of being the resolution of the corresponding area according to the distribution of the motion vector resolution of the surrounding area or the area group. For example, if the motion vector resolution of the left region of the region is 1/2 and the motion vector resolution of the upper region is 1/2, the motion vector resolution of the region is likely to be 1/2, so 1 / The shortest number of bits is allocated to two motion vector resolutions and encoded.
  • the motion vector resolution of the left region of the region is 1/4
  • the motion vector resolution of the upper region is 1/2
  • the motion vector resolution of the upper region is 1/2
  • the motion vector resolution of the upper right region is 1
  • the number of short bits is allocated and encoded in the order of the highest probability, such as the order of 1/2, 1/4, 1/8, etc., of the motion vector resolution of the corresponding region.
  • the resolution encoder 940 when entropy encoding by arithmetic coding, the resolution encoder 940 generates a binary coded bit string of the resolution identification flag based on the distribution of the motion vector resolution determined for each region or motion vector according to the distribution of the motion vector resolution of the surrounding region of each region.
  • the arithmetic coding and the probability update are performed by applying the probability model differently according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution which has occurred up to now.
  • arithmetic coding and probability updating are performed using different probability models according to bit positions.
  • the probability model when encoding the first binarization bit, may be divided into four probability models and encoded.
  • the four probabilistic models are, firstly, a probability model in which both the left and top regions have the same resolution and are the same as the highest probability resolution so far; second, the left and the top regions all have the same resolution and the most Probability model when the resolution of the high probability differs from the third. Third, the probability model when the resolution of the left and upper regions are all different, and the resolution of the highest probability so far and the resolution of the left or upper region is the fourth. In this case, the resolution of the left region and the upper region and the highest probability resolution so far can be divided into probability models.
  • the probability model When the second binarization bit is encoded, the probability model may be divided into two probability models and encoded.
  • the two probabilistic models are the first when the motion vector resolutions of both the left and top regions of the corresponding region are different and have the highest probability motion vector resolution so far and the motion vector resolution such as the motion vector resolution of the left or upper region.
  • Probability model can be classified into a probability model in which the motion vector resolution of the left region and the upper region of the corresponding region and the resolution of the highest probability so far are different.
  • the CABAC is used for encoding
  • the motion vector resolution used for encoding uses only three motion vector resolutions, such as 1/2, 1/4, and 1/8, and has the highest probability of occurrence. If the motion vector resolution is 1/4, assign the shortest binarization bit string '1' to 1/4 motion vector resolution, and set '00' to the remaining 1/2 motion vector resolution and 1/8 motion vector resolution, respectively. Assign '01'.
  • a probability model may be divided into three probability models and encoded.
  • the three probabilistic models are: first, a probability model where the motion vector resolution of the left region and the upper region of the region is the same as the highest resolution that has occurred so far; and second, only one of the resolutions of the left region and the upper region of the region. Probability model in which the probability that occurred so far is the same as the highest resolution, and third, the probability model when the motion vector resolution of the left and upper regions of the corresponding region differs from the motion vector resolution of the highest probability so far. Can be.
  • the probability model may be divided into six probability models and encoded.
  • the six probabilistic models are, firstly, probabilistic models when the resolution of the left and top regions of the region is 1/8 motion vector resolution, and second, the motion vector resolution of the left and upper regions of the region is 1/1. Probabilistic model with 2 motion vector resolutions, Third, Probabilistic model with motion vector resolutions of the left and upper regions of the corresponding region being 1/4 motion vector resolution, and Fourth, resolution of the left and upper regions of the region Probability model when one is 1/8 motion vector resolution and the other is 1/4 motion vector resolution.Fifth, one of the motion vector resolutions of the left and upper regions of the region is 1/2 motion vector resolution and the other Probabilistic model for one motion of 1/4 motion vector resolution, and sixth for motion vector resolutions of the left and upper areas of the area. Im a vector resolution and the other may be separated by one-half if the probability model of the motion vector resolution. The resolution with the highest probability so far may be the probability of the resolution encoded up to the previous region, the probability of any region, or the predetermined fixed resolution.
  • the resolution encoder 940 determines whether the motion vector resolution determined for each region or motion vector can be estimated according to a pre-determined estimation method in the image decoding apparatus, and thus, for the region where the motion vector resolution can be estimated.
  • a resolution identification flag may be generated by encoding an identifier indicating that it is possible to estimate, and a resolution identification flag may be generated by encoding an identifier indicating that the motion vector resolution cannot be estimated and a motion vector resolution of the corresponding area. .
  • the motion encoder 940 when the encoder 940 wants to encode a motion vector resolution for each region or motion vector, the motion encoder calculates a motion vector and a predicted motion vector of the corresponding region by applying a plurality of motion vector resolutions, and encodes the difference vector. After decoding the difference vector, the reconstructed difference vector is assumed to be the optimum resolution, and the motion vector is decoded for each resolution. Assuming that each resolution is an optimal resolution, when the motion of the pixels around the region is compensated for by using the reconstructed motion vector, the motion vector resolution that minimizes the cost according to a predetermined cost function is determined.
  • the resolution encoder 940 determines that the motion vector resolution thus determined is the motion vector resolution of the region to be originally encoded (the motion vector resolution determined as the optimal motion vector resolution of the region, except that the optimal motion vector resolution always provides the best performance.
  • the identifier indicating that the motion vector resolution of the corresponding area can be estimated by the image decoding apparatus (eg, '1' ') May be generated as a resolution identification flag of the corresponding area, in which case the motion vector resolution of the corresponding area is not encoded.
  • the identifier (eg, '0') indicating that the motion vector resolution of the region cannot be estimated by the image decoding apparatus and the corresponding
  • the original motion vector resolution of the region may be encoded and generated as a resolution identification flag of the region.
  • various distortion functions such as Mean Squre Error (MSE) or Sum of Absolute Transformed Differences (SATD) may be used.
  • the resolution encoder 940 may not encode the resolution of the region or the motion vector.
  • the motion vector resolution does not need to be encoded because the predictive motion vector is encoded as a motion vector.
  • FIG. 15 is an exemplary diagram for describing a process of determining a motion vector resolution using pixels around a region according to an embodiment of the present invention.
  • an optimal motion vector resolution determined by the motion encoder 940 performing motion estimation on a region to which motion vector resolution is to be encoded is a motion vector resolution of 1/2, and a motion vector is (4,10). If the predicted motion vector is (2,7), the difference vector is (2,3). At this time, the resolution encoder 940 assumes that the image decoding apparatus can decode and reconstruct only the difference vector, and changes the motion vector resolution to several to predict the predicted motion vector according to each motion vector resolution, thereby resolving each motion vector resolution. After reconstructing the motion vector according to the motion vector resolution, the motion vector resolution at which the distortion between the surrounding pixels of the current area and the surrounding pixels of the area indicated by the motion vector according to the reconstructed motion vector resolution is minimized is determined.
  • the motion vector resolution is 1/4 pixel unit
  • the difference vector reconstructed by the image decoding apparatus is (2,3), and thus the motion vector of the corresponding region to be reconstructed is (5,17).
  • the motion vector resolution is 1/2 pixel unit and the predicted motion vector is (2,7)
  • the motion vector of the corresponding region to be reconstructed is (4, 10). In this manner, the motion vector of the corresponding region restored by the image decoding apparatus when the motion vector resolution is 1/8 pixel units is also calculated.
  • the resolution encoder 940 encodes only an identifier indicating that the motion vector resolution can be estimated by the image decoding apparatus, and generates the resolution vector as a resolution identification flag of the corresponding region. The resolution is not encoded.
  • the resolution determiner 930 determines a motion vector resolution determined for each region or motion vector when the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region or motion vector is larger than a threshold. Can be determined. For example, when the magnitude of the prediction motion vector or the difference vector of a certain region is larger than the threshold, the motion vector resolution of the region or motion vector is determined as a predetermined value or a random value. May not be encoded. In addition, when the size of the motion vector of the region or the surrounding vector of the motion vector is large or the size of the motion vector of the region or the motion vector is larger than the threshold, the motion vector resolution of the region is set to a predetermined value or a random value.
  • the motion vector resolution of the corresponding region may not be encoded.
  • the motion vector resolution of the region or motion vector may be changed to any resolution without any flag.
  • the threshold may be a predetermined value or any value input and may be calculated from the motion vectors of the surrounding blocks.
  • the resolution determiner 930 may encode information about the resolution by encoding the reference picture index without generating a resolution identification flag when the resolution of the current block is known using the reference picture index.
  • the reference picture may be indexed and encoded based on the distance between the current picture and the reference picture as shown in FIG. 30. For example, if four reference pictures are written, candidates of indexable reference pictures can be indexed as shown in FIG. 31 when the current picture is five times.
  • FIG. 31 is a diagram illustrating a reference picture index according to a reference picture number and a resolution.
  • the reference picture index can be encoded with 3, and the decoding apparatus In FIG. 3, reference picture number 3 is extracted from a bitstream, and reference picture is 3 and resolution is 1/8 using the same table as the encoder.
  • the difference vector encoder 950 may encode the difference vector differently according to the motion vector resolution. In other words, as the motion vector resolution increases, the size of the motion vector increases, so that the amount of bits required for encoding the difference vector also increases. Accordingly, the amount of bits can be reduced by encoding the difference vector in different ways according to the size of the motion vector resolution.
  • the difference vector encoder 950 may encode using the K-th order exponential golem code, and according to the motion vector resolution determined for each region, The order K can be changed. For example, when encoding a difference vector using UVLC, if the motion vector resolution is 1/4 pixel unit, the order K of the code may be set to '0', and if the motion vector resolution is 1/8 pixel unit, The order K of may be set to '1'.
  • the difference vector encoder 950 may encode using the unary / K-order exponential golem combined code, wherein the unary / The order (K) and the maximum value (T) of the K-order exponential golem combined code may be changed and encoded.
  • the order K of the code may be set to '3' and the maximum value T may be set to '6' and the motion
  • the order K of the code may be set to '5' and the maximum value T may be set to '12'.
  • the cumulative probability may be differently calculated and encoded according to the motion vector resolution determined for each region. For example, each time the difference vector of the regions is encoded, the probability model is updated according to the motion vector resolution determined for each region, and when the difference vector of the other regions is encoded, the probability model according to the updated motion vector resolution is updated. It is available.
  • the difference vector is encoded using a probability model of 1/2 pixel unit, the probability model of 1/2 pixel unit is updated, and the motion vector of a region
  • the differential vector may be encoded using a 1/8 pixel unit probability model and the probability model may be updated in 1/8 pixel unit.
  • the difference vector encoder 950 may predict the predicted motion vector for the motion vector of each region by using the motion vector of the surrounding region of each region, in order to calculate the difference vector of each region.
  • the motion vector resolution of the surrounding region may be converted into the motion vector resolution of each region to be predicted.
  • rounding, rounding, or rounding may be used.
  • the surrounding area should be understood as a concept including an adjacent area.
  • 16 is an exemplary diagram for describing a process of predicting a predicted motion vector according to an embodiment of the present invention.
  • the motion vectors of the surrounding area of the region to be predicted are (4,5), (10,7), (5,10) and rounding is used when converting the predicted motion vector
  • the predicted motion vector may be (5,5). If the motion vector resolution of the desired region is 1/8, the predictive motion vector may be (10, 10).
  • the difference vector encoder 950 is an area to predict the motion vector at the highest resolution among the motion vector resolutions of the surrounding regions of the region.
  • the motion vector resolution of can be converted and predicted. Referring to the example illustrated in FIG. 16, when the region to be predicted is the skip mode, since the highest resolution among the resolutions of the motion vectors of the surrounding region is 1/8, it is assumed that the resolution of the region to be predicted is 1/8. Predicting the predicted motion vector may be (10, 10).
  • the differential vector encoder 950 may convert and predict the motion vector of the surrounding region at an arbitrary resolution.
  • the final predicted motion vector may be obtained by converting the predicted motion vector to the motion vector resolution of the region to be predicted. Referring to the example shown in FIG.
  • the predicted motion vector is converted to (3,3), and if the motion vector resolution of the region to be predicted is 1/8 pixel unit Since it is not the same as any motion vector resolution, the predicted motion vector (3,3) may be converted in units of 1/8 pixels so that the final predicted motion vector may be (12,12). In the same way, if the motion vector resolution of the region to be predicted is 1/4 pixel unit, the final predicted motion vector may be (6,6).
  • 17 is a flowchart illustrating a video encoding method using adaptive motion vector resolution according to the first embodiment of the present invention.
  • the motion vector resolution is determined for each region or motion vector, and the image is encoded using the motion vector according to the motion vector resolution determined for each region or motion vector.
  • Inter prediction coding is performed on an area basis.
  • the image encoding apparatus 900 using the adaptive motion vector resolution according to the first embodiment of the present invention determines whether to change the motion vector resolution for each region or motion vector of the image (S1710), and moves for each region.
  • the motion vector resolution is determined for each region or motion vector (S1720), and the image is inter prediction encoded by region using a motion vector according to the motion vector resolution determined for each region or motion vector (S1730).
  • the inter prediction encoding is performed on a region-by-region basis by using a motion vector according to a fixed motion vector resolution for all regions or subregions of a portion of the image (S1740).
  • the motion vector resolution determined for each region may be different for each x component and y component of the motion vector.
  • the image encoding apparatus 900 may generate a resolution change flag indicating whether the motion vector resolution is determined for each region or motion vector. For example, when it is determined in step S1710 that the motion vector resolution is changed, the image encoding apparatus 900 generates a resolution change flag (eg, '1') indicating that the motion vector resolution is changed for each region. When it is determined in S1710 that the motion vector resolution is fixed without being changed, a resolution change flag (eg, '0') indicating that the motion vector resolution is fixed for each region may be generated.
  • a resolution change flag eg, '0'
  • the image encoding apparatus 900 generates a resolution change flag according to the setting information input from the user or the outside, and determines whether to determine the motion vector resolution for each region in step S1710 based on the bit value of the generated resolution change flag. You can also judge.
  • the image encoding apparatus 900 may encode a motion vector resolution determined for each region or motion vector.
  • the image encoding apparatus 900 hierarchically encodes a motion vector resolution determined for each region or motion vector in a quad tree structure by tying regions having the same motion vector resolution, or a motion vector determined for each region or motion vector.
  • the resolution is encoded using a motion vector resolution predicted using the motion vector resolution of the surrounding area of each region, or the motion vector resolution determined for each region or motion vector is encoded using run and length, or the motion vector determined for each region.
  • Resolution is encoded hierarchically using tag tree, or it is encoded by changing the number of bits allocated to motion vector resolution according to the frequency of motion vector resolution determined for each region or motion vector, or motion vector determined for each region or motion vector.
  • an identifier indicating that the motion vector resolution can be estimated is encoded, and the motion vector resolution cannot be estimated.
  • An identifier indicating that the region cannot be estimated and a motion vector resolution may be encoded together.
  • the image encoding apparatus 900 hierarchically encodes the quad tree structure or hierarchically encodes using the tag tree, the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer respectively.
  • an identifier indicating the maximum number of tag tree hierarchies and the area size indicated by the lowest node of the tag tree hierarchies may be encoded and included in the header.
  • the image encoding apparatus 900 may determine a motion vector resolution determined for each region if the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region is larger than a threshold. Can be determined by value. In addition, when each component of the difference vector is '0', the resolution of the region or the motion vector may not be encoded.
  • the image encoding apparatus 900 may encode a difference vector that is a difference between a motion vector and a predicted motion vector according to a motion vector resolution determined for each region or motion vector.
  • the image encoding apparatus 900 may encode the difference vector differently according to the motion vector resolution.
  • the image encoding apparatus 900 may encode using the K-th order exponential golem code, and in this case, the image of the exponential golem code according to the motion vector resolution determined for each region.
  • the order K can be changed.
  • the image encoding apparatus 900 may encode using the unary / K-order exponential golem combined code, in which case the unary / K according to the motion vector resolution determined for each region.
  • the order K and the maximum value T of the difference exponential golem combined code may be changed and encoded.
  • the cumulative probability may be calculated and encoded differently according to a motion vector resolution determined for each region.
  • the image encoding apparatus 900 may predict the predicted motion vector of the motion vector of each region by using the motion vector of the surrounding region of each region.
  • the motion vector resolution of the surrounding region and the motion vector resolution of each region may be predicted. If is not the same, the motion vector resolution of the surrounding area may be converted to the motion vector resolution of each area to be predicted.
  • the image encoding apparatus 900 may change the method of encoding the resolution identification flag according to the distribution of the motion vector resolutions of the surrounding areas of each region based on the motion vector resolution determined for each region or motion vector.
  • a method of generating a binarization bit string of a resolution identification flag based on a distribution of a motion vector resolution determined for each region or motion vector according to a distribution of motion vector resolutions of surrounding regions of each region are applied differently according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution that has occurred so far to perform arithmetic coding and probability update.
  • arithmetic coding and probability updating are performed using different probability models according to bit positions.
  • the image encoding apparatus 900 may convert and predict the motion vector resolution of the region to be predicted to the highest resolution among the motion vector resolutions of the surrounding region. .
  • FIG. 32 is a diagram illustrating an image encoding apparatus 3200 using an adaptive motion vector, according to a second embodiment of the present invention.
  • the image encoding apparatus 3200 using the adaptive motion vector according to the second embodiment of the present invention includes an inter prediction encoder 3210, a resolution change flag encoder 3220, and a resolution determiner ( Resolution Determiner 3230, Resolution Encoder 3240, Differential Vector Encoder 3250, and Resolution Conversion Flag Generator 3260.
  • the resolution designation flag generator 3220, the resolution encoder 3240, the differential vector encoder 3250, and the resolution conversion flag generator 3260 are not necessarily all included in the image encoding apparatus 3200. May optionally be included.
  • the inter prediction encoder 3210 inter-prediction encodes an image in units of regions by using a motion vector according to a motion vector resolution determined for each region or motion vector of the image.
  • the inter prediction encoder 3210 may be implemented with the image encoding apparatus 100 described above with reference to FIG. 1.
  • the functions of the components included in the inter prediction encoder 3210 and the functions of the encoder 150 in the inter prediction encoder 3210 may be included.
  • the overlapping function may be omitted in the encoder 150.
  • the overlapping function may be omitted in the predictor 110.
  • the encoder in the inter prediction encoder 3210 may be used. It may be configured integrally with 150.
  • the flag information generated by the resolution specifying flag generator 3220 and the resolution switching flag generator 3260 may be converted into a bitstream by the resolution specifying flag generator 3220 and the resolution switching flag generator 3260, respectively. The function may be performed by the encoder 150 in the inter prediction encoder 3210.
  • inter prediction encoder 3210 The functions of the inter prediction encoder 3210, the resolution encoder 3240, and the difference vector encoder 3250 are the same as the functions of the inter prediction encoder 910, the resolution encoder 940, and the differential vector encoder 950 in FIG. 9. Since each may be the same or similar, detailed descriptions of the inter prediction encoder 3210, the resolution encoder 3240, and the differential vector encoder 3250 are omitted.
  • the resolution designation flag generator 3220 may designate an adaptive degree of resolution differently for each region or motion vector of the image.
  • the resolution designation flag generator 3220 may generate and include a resolution designation flag for designating a set of the motion vector resolution and / or the resolution of the differential motion vector for each region or motion vector of the image.
  • the area for specifying the motion vector resolution and / or the differential motion vector resolution by the resolution specification flag may be a block, a macroblock, a group grouping blocks, a group grouping macroblocks, or an area having an arbitrary size such as MxN. have. That is, the resolution designation flag generator 3220 may generate and include a resolution designation flag indicating a resolution available for all regions or sub-regions in a partial region of the image in the bitstream.
  • the resolution designation flag may be determined and generated according to setting information input by a user, or may be determined and generated according to a predetermined criterion by analyzing an image to be encoded. Such a resolution designation flag may be included in a header of the bitstream.
  • the header may be a picture parameter set, a sequence parameter set, a slice header, or the like.
  • the resolution designation flag specifies the resolution type as 1/2 or 1/4
  • the optimal resolution determined by the resolution determiner 3230 and the resolution identification flag encoded by the resolution encoder 3240 are 1/2 and 1/4.
  • the resolution identification flag can be encoded in any manner. 33 is a diagram illustrating a resolution identification flag when the designated resolutions are 1/2 and 1/4.
  • the resolution identification flag may be encoded using Unary, CABAC, quad tree encoding, or the like.
  • CABAC a binary bit string may be generated with reference to the table of FIG. 33, and then arithmetic and probability encoding may be performed.
  • the probabilistic model can be divided into three cases by using the resolution of the surrounding motion vector or block.
  • 34 illustrates A, B, and C, which are neighboring blocks of the current block X
  • FIG. 35 is a diagram illustrating a probability model according to a condition.
  • the resolution identification flag to be encoded is selected from resolutions of 1/2, 1/4, and 1/8, and the resolution identification flag is It can be encoded in any way.
  • 36 is a diagram illustrating a resolution identification flag when the designated resolutions are 1/2, 1/4, and 1/8. Referring to FIG. 36, the resolution identification flag may be 0, 10, or 11.
  • the resolution identification flag may be encoded using Unary, CABAC, quad tree encoding, or the like.
  • CABAC when CABAC is encoded, a binary bit string may be generated with reference to the table of FIG. 36 and then arithmetic and probability encoded.
  • the probabilistic model can be divided into six cases using a binary bit string index (binidx) and the surrounding motion vector or block resolution.
  • FIG. 34 when A, B, and C, which are neighboring blocks of the current block X, are shown, FIG. 37 is a diagram illustrating a probability model according to a condition.
  • the resolution specifying flag generated by the resolution specifying flag generator 3220 may indicate a single resolution.
  • the resolution designation flag may be encoded to indicate that the resolution of the corresponding area is fixed at 1/2 resolution.
  • the adaptive degree of the resolution (that is, the resolution set) can be changed for each reference picture according to an arbitrary criterion without encoding the resolution designation flag.
  • the degree of adaptability of the resolution may vary according to the distance between the reference picture and the current picture.
  • 38 and 39 are diagrams illustrating the degree of adaptability (ie, a resolution set) according to a distance between a current picture and a reference picture.
  • the resolution selects an optimal resolution from a set of resolutions of 1/1, 1/2, 1/4, and 1/8. And encoding a resolution identification flag, and if the distance between the current picture and the reference picture is the furthest of the plurality of reference pictures, the resolution selects an optimal resolution from a resolution set of 1/2, 1/4, and encodes the resolution identification flag.
  • the resolution can be set to select and encode the optimal resolution among the 1/2, 1/4, and 1/8 resolution sets. Can be. Referring to FIG. 39, it can be seen that a single resolution may be used.
  • the degree of adaptability of the resolution may be changed by using error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture.
  • error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture.
  • SSD sum of squared difference
  • the resolution 1/2 may not be used, and if the error value exceeds the threshold, the resolution 1/2 may be set to be used.
  • the resolution of 1/2 is set not to be used, 1/4 is used when the error value obtained by using an error measuring means such as SSD for the resolution of 1/1 and 1/4 does not exceed an arbitrary threshold value.
  • the error value exceeds a certain threshold, set both 1/1 and 1/4 resolutions.
  • the resolution of 1/4 is set, do not use 1/8 when the error value obtained by using an error measuring means such as SSD for the resolution of 1/4 and 1/8 does not exceed an arbitrary threshold value.
  • the error value exceeds a certain threshold, all resolutions of 1/1, 1/4, and 1/8 are used.
  • the threshold may be different or the same by resolution or by quantization parameter.
  • a reference picture index number (the resolution set index in FIG. 9, which may be a reference picture number) for each predetermined resolution set is stored in a header to the decoding apparatus.
  • 41 is a diagram illustrating a structure in which reference pictures are encoded.
  • the resolution designation flag generator 3220 may set the resolution set differently in case of a picture to be used as a reference picture and when it is not used as a reference picture. For example, it is assumed that reference pictures are encoded in the structure as shown in FIG. 41 and according to a time layer, TL0, TL1, and TL2 are pictures used as reference pictures, and pictures of TL3 are pictures not used as reference pictures. . In this case, when the resolution set is set to 1/2 and 1/4 by the resolution designation flag generator 3220, the resolution set for each reference picture may be set as shown in FIG. 42.
  • the resolution sets at the time of encoding picture 6 are 1/2 and 1/4, and the resolution identification flag or the resolution designation flag is encoded in an arbitrary region or motion vector unit with respect to the resolution set thus determined. Can be.
  • the resolution identification flag or the resolution designation flag may not be encoded.
  • the resolution designation flag generator 3220 may include all the functions of the resolution change flag generator 920 mentioned in the description of FIG. 9.
  • the resolution switch flag generator 3260 generates a resolution switch flag indicating a change from the surrounding or previous value of the area to encode the current resolution.
  • 43 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block.
  • the resolution set is 1/2, 1/4, 1/8, and the resolution of the neighboring block and the current optimal resolution are as shown in FIG. 43, the resolution of the neighboring block is (1/8, 1/4, 1 / 4, 1/4), so the highest resolution is 1/4.
  • the resolution conversion flag is encoded as 0.
  • the decoder extracts the resolution switch flag from the bitstream, and when the resolution switch flag is 0, it can be seen that 1/4, the resolution having the highest frequency among the resolutions of the neighboring blocks, is the resolution of the current block X.
  • FIG. 44 is a diagram illustrating another example of the resolution of the current block and the resolution of the neighboring block
  • FIG. 45 is a diagram illustrating a resolution identification flag according to the resolution.
  • the resolution conversion flag is coded as 1 to indicate that the resolution is different from the neighboring value.
  • the resolution identification flag is encoded as 1 using the table. If the current resolution is 1/4, it is unlikely that 1/4 will be selected as the resolution to be switched. Therefore, resolution 1/4 is not given a resolution identification flag.
  • 46 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block.
  • the resolution switch flag may indicate whether the resolution of the block A and the current block X are the same. Therefore, in the above case, since the resolutions of the block A and the current block X are not the same, the resolution switching flag may be 1. In addition, since the resolution sets are 1/2 and 1/4, it is understood that the resolution of the current block is 1/4 using only the resolution conversion flag without encoding the resolution identification flag.
  • FIG. 47 is a diagram illustrating a video encoding method using adaptive motion vector resolution, according to a second embodiment of the present invention.
  • a resolution designation flag generation step (S4702) a resolution determination step (S4704), and an inter prediction encoding step (S4706) , Differential vector encoding step S4708, resolution encoding step S4710, and resolution conversion flag generation step S4712.
  • the resolution designation flag generation step S4702 is performed by the operation of the resolution designation flag generator 3220, the resolution determination step S4704 is performed by the resolution determiner 3230, and the inter prediction encoding step S4706 is the inter prediction encoder 3210.
  • the difference vector encoding operation S4708 operates in the operation of the difference vector encoder 3250
  • the resolution encoding operation S4710 operates in the operation of the resolution encoder 3240
  • the resolution conversion flag generating operation S4712 includes the resolution switching flag. Since the operation corresponds to the operation of the generator 3260, detailed description thereof will be omitted.
  • FIG. 18 is a block diagram schematically illustrating an apparatus for decoding an image using adaptive motion vector resolution according to a first embodiment of the present invention.
  • the image decoding apparatus 1800 using the adaptive motion vector resolution according to the first embodiment of the present invention includes a resolution change flag extractor 1810, a resolution decoder 1820, a differential vector decoder 1830, and inter prediction decoding. It can be configured to include a group (1840).
  • the resolution change flag extractor 1810 extracts a resolution change flag from the bitstream. That is, the resolution change flag extractor 1810 extracts a resolution change flag indicating whether the motion vector resolution is fixed or changed for each region in the header of the bitstream. When the resolution change flag extractor 1810 indicates that the motion change resolution is fixed, the resolution change flag extractor 1810 extracts and decodes the encoded motion vector resolution from the bitstream to inter-predict the fixed motion vector resolution or the preset motion vector resolution.
  • the decoder 1840 controls inter prediction decoding on all sub-regions defined in the header, and controls the difference vector decoder 1830 to reconstruct the motion vector of each region at a fixed motion vector resolution.
  • the resolution decoder flag 1820 causes the motion decoder 1820 to move the motion vector of each region or motion vector of the lower region defined in the header. Control to reconstruct the resolution, and control the inter prediction decoder 1840 to inter predict and decode the reconstructed motion vector resolution for the lower angular region or motion vector defined in the header, and cause the differential vector decoder 1830 to Control to restore the motion vector of each region to the reconstructed motion vector resolution.
  • the resolution change flag extractor 1810 may determine the motion vector resolution determined for each region or motion vector when the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region or motion vector is larger than the threshold. May be determined as a predetermined value. For example, when the magnitude of the prediction motion vector or the difference vector of a certain region is larger than the threshold, the motion vector resolution of the region or motion vector is determined as a predetermined value or a random value. It may not be decoded. In addition, when the size of the motion vector of the region or the surrounding vector of the motion vector is large or the size of the motion vector of the region is larger than the threshold value, the motion vector resolution of the region or the motion vector is set to a predetermined value or any value.
  • the motion vector resolution may not be decoded.
  • the motion vector resolution of the region or motion vector may be changed to any resolution without any flag.
  • the threshold may be a predetermined value or any value input and may be calculated from motion vectors of surrounding blocks.
  • the resolution decoder 1820 extracts and decodes the resolution identification flag encoded from the bitstream according to the resolution change flag extracted by the resolution change flag extractor 1810 to restore the motion vector resolution for each region.
  • the resolution decoder 1820 decodes the motion vector resolution, this is for convenience of description, and in reality, the resolution of the motion vector resolution or the differential motion vector or both resolutions are decoded. You may. Accordingly, the resolution indicated by the resolution identification flag may be the resolution of the motion vector resolution or the differential motion vector, or may be used simultaneously for the motion vector resolution and the resolution of the differential motion vector.
  • the resolution decoder 1810 may reconstruct the motion vector resolution for each region or motion vector by decoding resolution identification flags hierarchically encoded in a quad tree structure by tying regions having the same motion vector resolution.
  • the resolution decoder 1820 reconstructs a motion vector resolution by decoding a resolution identification flag by dividing a quad tree form as shown in FIG. 10 into respective regions as shown in FIG. 12. For example, when decoding the resolution identification flag generated by encoding as shown in FIG. 11, the first bit is '1' and thus the layer is divided. The second bit is '0', so the first node of level 1 Since it is known that is not divided, the next bits are decoded to restore the motion vector resolution of 1/2. In this manner, the same as the encoding method described above with reference to FIGS. 10 and 11, but in reverse order, the resolution identification flags for level 1 and level 2 are decoded to restore motion vector resolution of the corresponding regions or motion vectors.
  • the resolution decoder 1810 decodes an identifier indicating the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer, which is included in the header of the bitstream.
  • nodes are divided into lower layers (that is, divided into four zones) or not divided are shown.
  • the nodes are not divided into lower layers.
  • a node can be divided into lower layers in various ways: divided into two horizontally long regions, divided into two vertically long regions, and divided into four regions.
  • the resolution decoder 1820 decodes the resolution identification flag encoded by using the motion vector resolution predicted by using the motion vector resolution of each area or the surrounding area of the motion vector to determine the motion vector resolution for each area or motion vector. Can be restored For example, the resolution decoder 1820 indicates that the resolution identification flag extracted for each region or motion vector from the bitstream is the same as the motion vector resolution predicted using the motion vector resolution of the surrounding region (e.g., For example, when the bit value of the resolution identification flag is '1'), the motion vector resolution predicted using the motion vector resolution of the surrounding area of the corresponding region may be restored without reading the next resolution identification flag from the bitstream.
  • the resolution identification flag indicates that it is not the same as the motion vector resolution predicted using the motion vector resolution of the surrounding area (for example, when the bit value of the resolution identification flag is '0'), the corresponding resolution is identified from the bitstream. Solution of motion vector restored by reading and decoding the next bit value of the flag You can restore the top view.
  • the resolution decoder 1820 may restore the motion vector resolution for each region or motion vector by decoding the resolution identification flag in which the run and the length of the motion vector resolution for each region or the motion vector are encoded.
  • the resolution decoder 1820 decodes the resolution identification flag encoded together with the motion vector resolution and / or the differential motion vector resolution for some regions including several regions to restore the run and length of the motion vector resolution.
  • the motion vector resolution of the regions shown in FIG. 12 may be restored using the reconstructed run and length of the motion vector resolution.
  • the resolution decoder 1820 may reconstruct the motion vector resolution for each region by decoding the resolution identification flag hierarchically coded using the tag tree for the motion vector resolution for each region or motion vector. For example, with reference to FIGS. 13 and 14, the resolution decoder 1820 may know that the bit corresponding to the level 0 is '01' because the bit of the first region illustrated in FIG. 14 is '0111'. Since the number of motion vector resolutions of the upper layer from 0 is assumed to be '0', it is possible to restore the motion vector resolution of 1/2 in which the difference value of the number is increased to '1'.
  • next bit is '1'
  • the difference between the number and the upper layer is '0', so that the level 1 is also restored to the motion vector resolution of 1/2.
  • level 2 and level 3 may be restored to a motion vector resolution of 1/2 as well.
  • the bit of the second region shown in FIG. 14 is '01', and since it has already been decoded for level 0, level 1, and level 2 in the first region, only level 3 needs to be decoded. Since the difference is '1', the motion vector resolution of 1/4 can be restored. In this way, the motion vector resolution of the remaining areas can also be restored.
  • the resolution decoder 1820 may change and decode the number of bits allocated to the resolution identification flag according to the frequency of the motion vector resolution for each region or motion vector. For example, the resolution decoder 1820 may calculate the frequency of the motion vector resolution reconstructed up to the last region, number the motion vector resolution according to the calculated frequency, and allocate and decode the number of bits according to the number.
  • An area group may be a quad tree, a quad tree bundle, a tag tree, a tag tree bundle, a macroblock, a macroblock bundle, and an area of any size.
  • the area group is designated as two macroblocks
  • the frequency of occurrence of the motion vector resolution is updated by every two macroblocks, and the number of bits of the motion vector resolution is allocated and decoded
  • the area group is designated as four quad trees.
  • the frequency of occurrence of the motion vector resolution is updated every four quad trees, and the number of bits of the motion vector resolution is allocated and decoded.
  • the resolution decoder 1820 may vary the decoding method of the resolution identification flag based on the distribution of the motion vector resolution of the surrounding area of each region with the motion vector resolution determined for each region or motion vector. According to the distribution of the motion vector resolution of the surrounding area or region group, the shortest number of bits is allocated and decoded to the motion vector resolution having the highest probability of being the resolution of the corresponding area. For example, if the motion vector resolution of the left region of the region is 1/2 and the motion vector resolution of the upper region is 1/2, the motion vector resolution of the region is most likely to be 1/2, so 1 / The shortest number of bits is allocated to two motion vector resolutions and decoded.
  • the motion vector resolution of the left region of the region is 1/4
  • the motion vector resolution of the upper region is 1/2
  • the motion vector resolution of the upper region is 1/2
  • the motion vector resolution of the upper right region is 1
  • the probability of motion vector resolution of the corresponding region is decoded by allocating short bits in order of high probability such as 1/2, 1/4, 1/8, and so on.
  • the resolution decoder 1820 entropy decodes by arithmetic decoding, a method of generating a binarization bit string of the resolution identification flag based on a distribution of motion vector resolutions of the surrounding regions of each region according to a motion vector resolution determined for each region or motion vector.
  • the arithmetic decoding and the probability update may be performed by differently applying the probabilistic model according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution generated up to now.
  • arithmetic decoding and probability updating may be performed using different probability models according to bit positions.
  • the bit string having '00' is allocated to the 1/8 motion vector resolution as shown in FIG. 21, and the bit having '01'. Assign columns to 1/2 motion vector resolution.
  • the probability model may be divided into four probability models to be decoded.
  • the four probabilistic models are, firstly, probabilistic models where both the left and top regions have the same resolution and are the same as the highest probabilities resolution so far. Second, the left and the top regions have the same resolution and the highest Probabilistic model when the resolution of the probability is different from the third.
  • the probability model when the resolution of the left region and the upper region are all different and the resolution of the highest probability up to now and the resolution of the left region or the upper region is the fourth.
  • the probability model may be divided into two probability models to be decoded.
  • the two probabilistic models are the first when the motion vector resolutions of both the left and top regions of the corresponding region are different and have the highest probability motion vector resolution so far and the motion vector resolution such as the motion vector resolution of the left or upper region.
  • Probability model can be classified into a probability model in which the motion vector resolution of the left region and the upper region of the corresponding region and the resolution of the highest probability so far are different.
  • the probability model when encoding the first binarization bit, may be divided into three probability models and decoded.
  • the three probabilistic models are: first, a probability model where the motion vector resolution of the left region and the upper region of the region is the same as the highest resolution that has occurred so far; and second, only one of the resolutions of the left region and the upper region of the region. Probability model in which the probability that occurred so far is the same as the highest resolution, and third, the probability model when the motion vector resolution of the left and upper regions of the corresponding region differs from the motion vector resolution of the highest probability so far. Can be.
  • the probability model When decoding the second binarization bit, the probability model may be divided into six probability models to be decoded.
  • the six probabilistic models are, firstly, probabilistic models when the resolution of the left and top regions of the region is 1/8 motion vector resolution, and second, the motion vector resolution of the left and upper regions of the region is 1/1. Probabilistic model with 2 motion vector resolutions, Third, Probabilistic model with motion vector resolutions of the left and upper regions of the corresponding region being 1/4 motion vector resolution, and Fourth, resolution of the left and upper regions of the region Probability model when one is 1/8 motion vector resolution and the other is 1/4 motion vector resolution.Fifth, one of the motion vector resolutions of the left and upper regions of the region is 1/2 motion vector resolution and the other Probabilistic model for one motion of 1/4 motion vector resolution, and sixth for motion vector resolutions of the left and upper areas of the area. Im a vector resolution and the other may be separated by one-half if the probability model of the motion vector resolution. The resolution with the highest probability so far may be the probability of the resolution encoded up to the previous region, the probability of any region, or the predetermined fixed resolution.
  • the resolution decoder 1820 when the resolution decoder 1820 is a flag indicating that a resolution identification flag decoded for each region or motion vector can be estimated, the resolution decoder 1820 estimates the motion vector resolution according to a pre-determined estimation method and uses the estimated motion vector resolution as the region or the motion vector resolution. In the case of a flag indicating that the resolution identification flag decoded for each region or motion vector cannot be estimated, the motion vector resolution indicated by the decoded resolution identification flag can be restored as a motion vector of the corresponding region. have.
  • the resolution decoder 1820 may perform each motion vector resolution decoded by the same or similar method as that of the image encoding apparatus 900.
  • the predicted motion vector is predicted by using a change, and the motion vector is reconstructed using the predicted predictive motion vector and the difference vector reconstructed by the difference vector decoder 1830.
  • the motion vector resolution of a region is 1/4 pixel unit, when the prediction motion vector is (3, 14), the difference vector is (2, 3), and thus the reconstructed motion vector of the region is (5, 17).
  • the motion vector resolution of the region is 1/2 pixel
  • the predicted motion vector is (2, 7)
  • the reconstructed difference vector is (2, 3)
  • the reconstructed motion vector of the region is (4, 10).
  • the resolution decoder 1820 may additionally decode and reconstruct the motion vector resolution of the corresponding region or motion vector in the resolution identification flag. Can be.
  • the resolution decoder 1820 may restore the motion vector resolution for each region or motion vector only when each component of the difference vector is not '0'. That is, when the component of the difference vector of the specific region is '0', since the prediction motion vector is decoded into the motion vector, the motion vector resolution of the corresponding region may not be restored.
  • the difference vector decoder 1830 extracts and decodes the encoded difference vector from the bitstream.
  • the difference vector decoder 1830 reconstructs the difference vector for each region or motion vector by decoding according to the motion vector resolution for each reconstructed region or motion vector.
  • a motion vector for each area may be reconstructed by predicting the prediction motion vector for each area and using the reconstructed difference vector and the predictive motion vector.
  • the difference vector decoder 1830 can decode the difference vector using UVLC, and in this case, decode using the K-order exponential golem code, but in accordance with the motion vector resolution for each reconstructed region. You can change the order (K) of the code.
  • the difference vector decoder 1830 can decode the difference vector using CABAC. In this case, the vector is decoded using the unary / K-order exponential golem combined code, but the motion vector resolution for each reconstructed region or motion vector. The decoding can be performed by changing the order (K) and the maximum value (T) of the unary / K-order exponential golem combined code.
  • the difference vector decoder 1830 may calculate and decode the cumulative probability differently according to the motion vector resolution for each reconstructed region or motion vector.
  • the difference vector decoder 1830 may predict the predicted motion vector for each region or the motion vector by using the motion vector of the region or the surrounding region of the motion vector.
  • the motion vector resolutions of ⁇ are not the same, the motion vector resolution of the surrounding area may be converted into the motion vector resolution of each area to be predicted.
  • the predictive motion vector may be obtained in the same manner in the image encoding apparatus and the image decoding apparatus. Accordingly, various embodiments of deriving a predictive motion vector by the image encoding apparatus and embodiments of motion vector resolution conversion with reference to FIGS. 22 to 26 may be similarly implemented in the embodiment of the image decoding apparatus according to the present invention. have.
  • the differential vector decoder 1830 converts the motion vector resolution of the surrounding region to the highest resolution among the motion vector resolutions of the surrounding region. It can be predicted.
  • the resolution identification flag indicating the motion vector resolution decoded by the resolution decoder 1820 may represent both the x component and the y component of the motion vector, or may indicate respective resolutions. That is, when the camera photographing the image moves or an object in the image moves, the resolution decoder 1820 may decode the resolutions of the x component and the y component of the motion vector for motion estimation differently. For example, the x component of a motion vector of a certain region may be decoded at a motion vector resolution of 1/8 pixel unit, and the y component may be decoded at a motion vector resolution of 1/2 pixel unit, thereby inter prediction.
  • the decoder 1840 may inter-prediction-decode a corresponding region by motion estimation and motion compensation with a motion vector having different motion vector resolutions for each x component and y component.
  • the inter prediction decoder 1840 inter-predicts and decodes each region by using motion vectors for each region according to the motion vector resolution of each reconstructed region or motion vector.
  • the inter prediction decoder 1840 may be implemented by the image decoding apparatus 800 described above with reference to FIG. 8.
  • the decoder. In 810 the overlapping function may be omitted.
  • the overlapping operation may be omitted in the predictor 850.
  • the resolution change flag extractor 1810, the resolution decoder 1820, and the differential vector decoder 1830 may be configured as separate components from the inter prediction decoder 1840 as shown in FIG. 18, the inter prediction decoder It may be integrated with the decoder 810 in 1800.
  • the inter prediction decoder 1840 uses various regions such as macroblocks, blocks, subblocks, slices, pictures, and the like. It can be divided into areas of shape and size and decoded by area having an arbitrary size.
  • the predetermined area may be a macroblock of 16 ⁇ 16 size, but may be a block of various sizes and shapes such as a 64 ⁇ 64 size block and a 32 ⁇ 16 size block.
  • the image decoding apparatus 800 described above with reference to FIG. 8 performs inter prediction decoding on motion blocks and / or differential motion vectors having the same motion vector resolution and / or differential motion vector resolution for all blocks of the image, inter prediction is performed.
  • the decoder 1840 may inter-prediction and decode each region with a motion vector and / or a differential motion vector having a motion vector resolution and / or a differential motion vector resolution determined differently for each region or motion vector. That is, when the inter prediction decoder 1840 inter predicts and decodes a predetermined region, the inter prediction decoder 1840 is already encoded according to the motion vector resolution and / or differential motion vector resolution of each region or motion vector reconstructed by the resolution decoder 1820.
  • the interpolated, decoded and reconstructed reference picture to increase the resolution, and then the motion vector and / or differential according to the motion vector resolution and / or differential motion vector resolution of the corresponding region or motion vector reconstructed by the differential vector decoder 1830.
  • Motion estimation is performed using the motion vector.
  • an interpolation filter for interpolating a reference picture various filters such as a Wiener filter, a bilinear filter, a Kalman filter, and the like can be used.
  • the resolution for interpolation is 2 pixel unit, 1 pixel unit, 1/2 pixel unit, 1 / Resolution of various fractional pixel units and integer pixel units such as 4 pixel units, 1/8 pixel units, and the like may be applied.
  • filter coefficients may be used or the number of filter coefficients may be changed according to the various resolutions. For example, when the resolution is 1/2 pixel unit, interpolation is performed using a Wiener filter, and when the resolution is 1/4 pixel unit, interpolation is performed using a Kalman filter.
  • the number of filter taps may be changed when interpolating each resolution. For example, when the resolution is 1/2 pixel unit, interpolation may be performed using an 8 tap winner filter, and when the resolution is 1/4 pixel unit, an interpolation may be performed using a 6 tap winner filter.
  • the inter prediction decoder 1840 may decode filter coefficients for each motion vector resolution in the bitstream and interpolate the reference picture with optimal coefficients for each motion vector resolution.
  • the filter may use any filter such as a Wiener ⁇ Kalman filter, and the number of filter taps may be several.
  • the number of filters and filter taps may be changed for each motion vector resolution.
  • inter prediction decoding may be performed using a reference picture interpolated using a different filter according to the motion vector resolution of the region or the motion vector.
  • a filter with a 6-tap Winner filter for 1/2 motion vector resolution, an 8-tap Kalman filter for 1/4 motion vector resolution, and a filter coefficient of a linear filter for 1/8 motion vector resolution are decoded.
  • the reference picture may be interpolated and decoded for each motion vector resolution.
  • the motion vector resolution of the current region or the motion vector is 1/2 motion vector resolution
  • it is decoded using the reference picture interpolated by the 6-tap winner filter, and when the 1/4 motion vector resolution is interpolated by the 8-tap Kalman filter.
  • the reference picture can be used to decode.
  • FIG. 48 is a block diagram schematically illustrating an apparatus for decoding an image using adaptive motion vector resolution according to a second embodiment of the present invention.
  • the video decoding apparatus 4800 using the adaptive motion vector resolution according to the second embodiment of the present invention includes a resolution designation flag extractor 4810, a resolution decoder 4820, a differential vector decoder 4830, and inter prediction decoding. 4840 and resolution switch flag extractor 4850.
  • the resolution designation flag extractor 4810, the resolution decoder 4820, the differential vector decoder 4830, and the resolution change flag extractor 4850 are not necessarily included in the image decoding apparatus 4800. It may be selectively included according to the encoding method of the video encoding apparatus for generating the bitstream.
  • the inter prediction decoder 4840 inter-predicts and decodes each region by using motion vectors for each region according to the motion vector resolution of each reconstructed region or motion vector.
  • the inter prediction decoder 4840 may be implemented by the image decoding apparatus 800 described above with reference to FIG. 8.
  • the overlapping function may be omitted in the decoder 810.
  • the operation of the resolution decoder 4820 and the operation of the predictor 850 in the inter prediction decoder 4840 overlap, the overlapping operation may be omitted in the predictor 850.
  • the resolution designation flag extractor 4810, the resolution decoder 4820, the differential vector decoder 4830, and the resolution conversion flag extractor 4850 are separate components from the inter prediction decoder 4840 as shown in FIG. 48. It may be configured, but may be integrated with the decoder 810 in the inter prediction decoder 4800.
  • the resolution specifying flag extractor 4810 extracts the resolution specifying flag from the input bitstream.
  • the resolution designation flag is a flag indicating that it is fixed at a single resolution or a resolution set having one or more resolutions.
  • the resolution specification flag extractor 4810 extracts the resolution specification flag from the bitstream. That is, the resolution designation flag extractor 4810 extracts a resolution change flag indicating whether the motion vector resolution is fixed to an arbitrary value or there is a resolution set changed for each region in the header of the bitstream. If the resolution designation flag extractor 4810 indicates that the resolution designation flag indicates that the motion vector resolution and / or the differential motion vector resolution is fixed to an arbitrary resolution, the resolution specification flag extractor 4840 and the differential vector encoder In operation 4830, the difference vector encoder 4830 encodes the difference vector at the received resolution and transmits the difference vector to the inter prediction decoder 4840. In this case, the inter-prediction decoder 4840 performs inter-prediction decoding using the received difference vector and the resolution received from the resolution designation flag extractor 4810 and the received bitstream.
  • the resolution designation flag extractor 4810 causes the resolution decoder 4820 to perform motion vector resolution and / or differential motion vector of each region or motion vector of the lower region defined in the header when the extracted resolution designation flag is a predetermined resolution set. Control to reconstruct the resolution, and control the inter prediction decoder 4840 to inter predict and decode the reconstructed motion vector resolution for the lower angular region or motion vector defined in the header, and cause the differential vector decoder 4830 to Control to restore the motion vector of each region with the reconstructed differential motion vector resolution.
  • an adaptive degree of resolution (that is, a resolution set) may be calculated for each reference picture according to an arbitrary reference.
  • the degree of adaptability of the resolution may vary according to the distance between the reference picture and the current picture. Since the description thereof has been mentioned in the descriptions of FIGS. 38 and 39, a detailed description thereof will be omitted.
  • the resolution set may be calculated by using an error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture.
  • SSD sum of squared difference
  • the resolution set may be calculated by using an error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture.
  • an error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture.
  • SSD sum of squared difference
  • the error value exceeds a certain threshold, set both 1/1 and 1/4 resolutions.
  • the resolution of 1/4 is set, do not use 1/8 when the error value obtained by using an error measuring means such as SSD for the resolution of 1/4 and 1/8 does not exceed an arbitrary threshold value.
  • the error value exceeds a certain threshold, all resolutions of 1/1, 1/4, and 1/8 are used.
  • the threshold may be different or the same by resolution or by quantization parameter.
  • the resolution designation flag extractor 4810 extracts the reference picture index number from the bitstream instead of the resolution designation flag, and for each predetermined resolution set as shown in FIG. A resolution set can be extracted by storing and referring to a corresponding reference picture index number.
  • the resolution set that is actually used may be set differently according to whether the reference picture is used by setting the resolution set differently in case of a picture to be used as a reference picture and when it is not used as a reference picture.
  • the table shown in FIG. 42 is also stored in the image decoding apparatus 4800 and may be used by the resolution decoder 4820 to decode the resolution. Since the description thereof has been mentioned in the descriptions of FIGS. 41 and 42, a detailed description thereof will be omitted.
  • the resolution designation flag extractor 4810 may determine the area or the motion vector when the predicted motion vector or the differential motion vector of the motion vector according to the motion vector resolution and / or the differential motion vector resolution determined for each area or motion vector is larger than the threshold.
  • the motion vector resolution and / or differential motion vector resolution determined for each motion vector may be determined as a predetermined value. Details of this have been mentioned in the description of the resolution change flag extractor 1810 of the image decoding apparatus 1800 according to the first embodiment, and thus detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 extracts and decodes the resolution identification flag encoded from the bitstream according to the resolution designation flag extracted by the resolution designation flag extractor 4810 to restore the motion vector resolution for each region.
  • the resolution decoder 4810 may reconstruct the motion vector resolution for each region or motion vector by decoding regions of the same region having the same motion vector resolution and decoding the resolution identification flag hierarchically encoded in a quad tree structure. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 decodes the resolution identification flag encoded by using the motion vector resolution predicted by using the motion vector resolution of each region or the surrounding region of the motion vector, thereby obtaining the motion vector resolution for each region or motion vector. Can be restored Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 may restore the motion vector resolution for each region or motion vector by decoding the resolution identification flag in which the run and the length of the motion vector resolution for each region or the motion vector are encoded. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 may restore the motion vector resolution for each region by decoding the resolution identification flag hierarchically encoded using the tag tree. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 may change the number of bits allocated to the resolution identification flag according to the frequency of the motion vector resolution for each region or the motion vector, and decode. For example, the resolution decoder 4820 may calculate the frequency of the motion vector resolution reconstructed up to the last region, number the motion vector resolution according to the calculated frequency, and allocate and decode the number of bits according to the number. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 may vary the decoding method of the resolution identification flag according to the distribution of the motion vector resolutions of the surrounding areas of each area. According to the distribution of the motion vector resolution of the surrounding area or region group, the shortest number of bits is allocated and decoded to the motion vector resolution having the highest probability of being the resolution of the corresponding area. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 performs entropy decoding by arithmetic decoding
  • a method of generating a binary coded bit stream of the resolution identification flag based on the distribution of the motion vector resolution of each region or the motion vector resolution determined for each region or motion vector is determined.
  • the arithmetic decoding and the probability update may be performed by differently applying the probabilistic model according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution generated up to now.
  • arithmetic decoding and probability updating may be performed using different probability models according to bit positions. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 when the resolution decoder 4820 is a flag indicating that a resolution identification flag decoded for each region or motion vector can be estimated, the resolution decoder 4820 estimates the motion vector resolution according to a pre-determined estimation method and uses the estimated motion vector resolution as the region or the motion vector resolution. In the case of a flag indicating that the resolution identification flag decoded for each region or motion vector cannot be estimated, the motion vector resolution indicated by the decoded resolution identification flag can be restored as a motion vector of the corresponding region. have. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 may additionally decode and reconstruct the motion vector resolution of the corresponding region or motion vector in the resolution identification flag. Can be.
  • the resolution decoder 4820 may restore the motion vector resolution for each region or motion vector only when each component of the difference vector is not '0'. That is, when the component of the difference vector of the specific region is '0', since the prediction motion vector is decoded into the motion vector, the motion vector resolution of the corresponding region may not be restored. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
  • the resolution decoder 4820 extracts a resolution identification flag according to the resolution type of the resolution change flag extracted and decoded from the header, and by using the difference vector decoder 4830 to the motion vector resolution as shown in FIG.
  • the value of the differential motion vector corresponding to the resolution is extracted by referring to the extracted code number by storing the differential motion vector code number table according to the same content as the video encoding apparatus.
  • the decoded resolution identification flag is 1/4, when the motion vector is decoded, it may be decoded using the prediction motion vector obtained by converting the motion vector extracted from the bitstream and the resolution 1/4 of the neighboring motion vector.
  • the predicted motion vector can be obtained by taking a median using a neighboring motion vector transformed using multiplication and division similarly to the encoder, but the present invention is not limited thereto.
  • FIG. 49 is a diagram illustrating a peripheral motion vector of the current block X
  • FIG. 50 is a diagram illustrating a converted value of the peripheral motion vector according to the current resolution.
  • the resolution decoder 4820 may calculate the resolution using the reference picture index without extracting the resolution identification flag. Since this is described in the description of FIGS. 30 to 31 in the image encoding apparatus 3200, detailed descriptions thereof will be omitted.
  • the inter prediction decoder 4840 may obtain a motion vector and perform decoding using the prediction motion vector obtained using the table shown in FIG. 50 and the difference vector calculated from the difference vector decoder 4830.
  • the resolution decoder 4820 extracts and decodes the resolution identification flag of the differential motion vector in the bitstream.
  • the code number of the differential motion vector and the sign of the differential motion vector are decoded. If the code number table of the differential motion vector according to the differential motion vector resolution as shown in FIG. 27 is stored and the code number extracted from the bitstream is (1, 1), the differential motion vector code number table according to the differential motion vector resolution of FIG. By reference, the differential motion vectors (-1/8, -1/4) can be obtained.
  • the inter prediction decoder 4840 may calculate the predictive motion vector in the same manner as the image encoding apparatus as follows.
  • MV (1/8, -4/8) MVD (-1/8, -1/4)-PMV (1/4, -1/4)
  • the differential vector decoder 1830 when the differential vector decoder 1830 receives the reference resolution flag, the differential vector decoder 1830 reconstructs the differential motion vector and decodes it at the reference resolution.
  • the code number included in the reference resolution flag is extracted
  • the differential reference motion vector is decoded by referring to the code number table according to the differential reference motion vector resolution as shown in FIG. 29, and the difference is obtained by using the position information included in the reference resolution flag.
  • Restore the motion vector that is, when the differential vector decoder 1830 decodes the differential motion vector, the differential vector decoder 1830 extracts a reference resolution from the bitstream and calculates a differential reference motion vector using a code number table according to the differential reference motion vector resolution as shown in FIG. 29. do.
  • the reference resolution flag representing the reference resolution and the position coordinate of the motion vector is extracted from the bitstream, and the differential motion vector is decoded using the reference resolution flag from the differential reference motion vector.
  • the reference resolution flag may include data indicating whether the resolution is the same as the same reference resolution and data indicating the position of the actual motion vector.
  • another function of the difference vector decoder 1830 may include a function of the difference vector decoder 1830 described in the image decoding apparatus 1800 according to the first embodiment. Since the detailed description has described the function of the differential vector decoder 1830 in the first embodiment, the detailed description thereof will be omitted.
  • the resolution identification flag is extracted and decoded from the bitstream using a resolution identification flag table excluding the resolution having the highest frequency among the same peripheral resolutions of the encoder.
  • the resolution switching flag extractor 4850 extracts the resolution switching flag from the bitstream and excludes the resolution having the highest frequency among the peripheral resolutions according to the value of the resolution switching flag (for example, 1). Table), the resolution identification flag can be extracted and decoded in the bitstream.
  • the resolution conversion flag is encoded as 0 when the resolution of the current block is the same as the resolution among the A and B resolutions as well as the highest frequency resolution, and the resolution conversion flag is set to 1 when the resolution is different. It can also be encoded.
  • the resolution switch flag is encoded as 1, the flag may be excluded from the resolution identification flag table.
  • the resolution switch flag extractor 4850 calculates the resolution of the current block by extracting a resolution switch flag value (for example, 1) from the bitstream so that the resolution is different from the previous block A.
  • a resolution switch flag value for example, 1
  • the resolution set is 1/2, 1/4
  • the resolution to be converted is 1/4 if the resolution of the previous block is 1/2.
  • the image encoding / decoding apparatus may be implemented by connecting the bitstream output terminal of the image encoding apparatus of FIG. 9 or 32 and the bitstream input terminal of the image decoding apparatus of FIG. 18 or 48.
  • An image encoding / decoding apparatus determines a motion vector resolution for each region or motion vector and inter-predictively encodes an image in units of regions using a motion vector according to the motion vector resolution determined for each region or motion vector.
  • Image encoder And an image decoder extracting the resolution information from the bitstream to restore the resolution and inter-prediction-decoding each region by using the motion vector according to the reconstructed motion vector resolution of each region or motion vector.
  • 19 is a flowchart illustrating an image decoding method using adaptive motion vector resolution according to the first embodiment of the present invention.
  • a resolution change flag is extracted from a bitstream, and a resolution identification flag encoded from the bitstream is extracted and decoded according to the extracted resolution change flag.
  • the motion vector resolution for each region or motion vector is reconstructed, and each region is inter predicted and decoded using the motion vector for each region according to the reconstructed each region or motion vector resolution.
  • the image decoding apparatus 1800 extracts a resolution change flag from the bitstream (S1910), and determines whether the extracted resolution change flag changes the motion vector resolution for each region (S1920). If the vector resolution is changed for each region or motion vector, the resolution identification flag is extracted and decoded from the bitstream to restore the motion vector resolution of each region or motion vector (S1930), and the motion vector of each restored region or motion vector. Inter-prediction decoding is performed by reconstructing the motion vector of each region or the motion vector at the resolution (S1940). In addition, when the resolution change flag indicates that the motion vector resolution is fixed without changing for each region or motion vector, the image decoding apparatus 1800 extracts, decodes, and restores the motion vector resolution flag from the bitstream (S1950).
  • Inter-prediction decoding is performed on each region by reconstructing the motion vector according to the fixed motion vector resolution for the lower region defined in the header according to the motion vector resolution (S1960).
  • the motion vector resolution decoded for each region or motion vector may be different for each x component and y component of the motion vector.
  • the image decoding apparatus 1800 decodes the resolution identification flag hierarchically coded in a quad tree structure by tying regions or motion vectors having the same motion vector resolution to restore motion vector resolution for each region or motion vector, or Decode the resolution identification flag encoded using the motion vector resolution predicted using the motion vector resolution of the surrounding area of the area to restore the motion vector resolution for each area, or the run and length of the motion vector resolution for each area or motion vector.
  • the motion vector resolution is estimated according to a pre-determined estimation method, and the estimated motion vector resolution is restored as the motion vector resolution of the corresponding region or motion vector, and the resolution identification flag decoded for each region or motion vector
  • the motion vector resolution indicated by the decoded resolution identification flag may be restored.
  • the image decoding apparatus 1800 may identify an identifier indicating the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer from the header of the bitstream, the maximum number of tag tree layers, and the lowest node of the tag tree hierarchy. The identifier indicating the area size can be decrypted and restored.
  • the image decoding apparatus 1800 extracts and decodes the encoded difference vector from the bitstream, and decodes the difference vector for each region or motion vector by decoding according to the reconstructed region or the motion vector resolution for each motion vector.
  • the prediction motion vector for each region or motion vector may be predicted, and the motion vector for each region may be reconstructed using the reconstructed difference vector and the prediction motion vector.
  • the image decoding apparatus 1800 may decode the difference vector using UVLC.
  • the image decoding apparatus 1800 may decode using the K-th order exponential golem code, but according to the reconstructed region or the motion vector resolution for each motion vector.
  • the order K of the exponential Gollum code can be changed.
  • the image decoding apparatus 1800 may decode the difference vector by using context-based binary arithmetic coding.
  • the image decoding apparatus 1800 may decode using the unary / K-order exponential golem combined code, but the motion vector for each reconstructed region or motion vector.
  • the order (K) and the maximum value (T) of the unary / K-order exponential golem combined code can be changed and decoded according to the resolution.
  • the image decoding apparatus 1800 may calculate and decode a cumulative probability differently according to the motion vector resolution for each reconstructed region or motion vector.
  • the image decoding apparatus 1800 predicts a predicted motion vector with respect to the motion vector of each region or the motion vector by using the motion vector of the surrounding region of each region, but the motion vector resolution of the surrounding region and the motion vector resolution of each region If is not equal, the motion vector resolution of the surrounding area may be predicted by converting the motion vector resolution of each area or the motion vector.
  • the predicted motion vector may be obtained in the same manner in the image encoding apparatus and the decoding apparatus. Accordingly, various embodiments of deriving a predictive motion vector by the image encoding apparatus and embodiments of motion vector resolution conversion with reference to FIGS. 22 to 26 may be similarly implemented in the image decoding apparatus according to the present invention.
  • the image decoding apparatus 1800 may change the resolution identification flag decoding method according to the distribution of the motion vector resolution of each region or the motion vector resolution determined for each region or motion vector.
  • a method of generating a binarization bit string of a resolution identification flag based on a distribution of a motion vector resolution determined for each region or motion vector according to the distribution of the motion vector resolution of the peripheral region of each region may be performed by differently applying the probability model according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution that has occurred up to now.
  • arithmetic decoding and probability updating may be performed using different probability models according to bit positions.
  • the image decoding apparatus 1800 may convert and predict the motion vector resolution of the surrounding region to the highest resolution among the motion vector resolutions of the surrounding region.
  • 51 is a flowchart illustrating a method of decoding an image using adaptive motion vector resolution according to a second embodiment of the present invention.
  • the video decoding method using the adaptive motion vector resolution according to the second embodiment of the present invention includes a resolution designation flag extraction step (S5102), a resolution decoding step (S5104), a differential vector decoding step (S5106), and an inter prediction decoding step ( S5108) and the resolution switching flag extraction step (S5110).
  • the resolution designation flag extraction step S5102 is performed by the operation of the resolution designation flag extractor 4810
  • the resolution decoding step S5104 is performed by the resolution decoder 4820
  • the differential vector decoding step S5106 is differential vector decoding.
  • the inter prediction decoding operation S5108 may correspond to the operation of the inter prediction decoder 4840
  • the resolution switching flag extraction operation S5110 may correspond to an operation of the resolution conversion flag extractor 4850, respectively. Therefore, detailed description is omitted.
  • the image encoding / decoding method according to an embodiment of the present invention may be implemented by combining the image encoding method according to the first or second embodiment of the present invention and the image decoding method according to the first or second embodiment. have.
  • An image encoding / decoding method determines a motion vector resolution for each region or motion vector, and inter-predictively encodes an image in units of regions using a motion vector according to the motion vector resolution determined for each region or motion vector.
  • Image encoding step And an image decoding step of extracting the resolution information from the bitstream, restoring the resolution, and inter-prediction-decoding each region by using a motion vector according to the reconstructed motion vector resolution of each region or motion vector.
  • the motion vector resolution may be adjusted in units of an area or a motion vector of any size according to the characteristics of the image (for example, the complexity of the image or the degree of motion of the image). Since inter prediction encoding may be performed using a motion vector having a determined and adaptive motion vector resolution, the bit rate due to encoding may be reduced while improving the quality of an image, thereby improving compression efficiency. For example, in some pictures of an image, if some areas have a high degree of complexity but a small amount of motion, and other areas have a low degree of complexity but a large degree of motion, for some areas, the motion vector resolution may be increased for some areas.
  • Predictive coding improves the accuracy of inter prediction, which reduces the residual signal and the amount of encoded bits.
  • the amount of bits encoding the motion vector is not significantly increased, thereby improving image quality.
  • the amount of encoded bits can be reduced.
  • the motion vector resolution is lowered so that even if the inter prediction encoding is performed, the motion vector resolution is small without significantly reducing the image quality, thereby reducing the amount of bits encoding the motion vector, thereby reducing the overall image quality without significantly reducing the image quality.
  • the amount of coding bits can be reduced, so that the compression efficiency can be improved.
  • the present invention is applied to an image processing field for compressing a video, and the image can be efficiently encoded by inter-prediction coding by adaptively changing a motion vector resolution in a predetermined area unit. It is a very useful invention that occurs.

Abstract

The present invention relates to a method and an apparatus for encoding/decoding images using adaptive motion vector resolution. The method for encoding the images of the present invention comprises the steps of: determining motion vector resolution in each region or each motion vector; and performing inter-prediction encoding using the motion vector according to the motion vector resolution determined in each region or each motion vector. The present invention enables efficient encoding of images by adaptively changing the motion vector resolution in predetermined region units of the images and performing the inter-prediction encoding for the images.

Description

적응적 움직임 벡터 해상도를 이용한 영상 부호화/복호화 방법 및 장치Method and apparatus for image coding / decoding using adaptive motion vector resolution
본 발명은 적응적 움직임 벡터 해상도를 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다. 더욱 상세하게는, 영상을 인터 예측 부호화 및 인터 예측 복호화하는 데 있어서, 움직임 벡터의 해상도를 적응적으로 변경하여 부호화 효율을 향상시키기 위한 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for image encoding / decoding using adaptive motion vector resolution. More specifically, the present invention relates to a method and apparatus for improving coding efficiency by adaptively changing the resolution of a motion vector in inter-prediction encoding and inter-prediction decoding of an image.
이 부분에 기술된 내용은 단순히 본 발명의 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The contents described in this section merely provide background information on the embodiments of the present invention and do not constitute a prior art.
동영상에 대한 데이터의 부호화는 인트라 예측 부호화와 인터 예측 부호화로 성립되어 있다. 이러한 인트라 예측 부호화 또는 인터 예측 부호화는 데이터 간에 존재하는 상관도(Correlation)를 줄일 수 있는 효과적인 방법으로 다양한 데이터의 압축에 널리 사용된다. 특히, 인터 예측 부호화에서 현재 부호화하고자 하는 현재 블록의 움직임을 추정하여 결정되는 현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터와 밀접한 상관 관계가 있기 때문에, 주변 블록의 움직임 벡터로부터 현재 블록의 움직임 벡터에 대한 예측값(PMV: Predicted Motion Vector, 이하 '예측 움직임 벡터'라 칭함)을 계산한 후 현재 블록의 움직임 벡터의 값 자체를 부호화하지 않고 예측값에 대한 차분값(DMV: Differential Motion Vector, 이하 '차분 벡터'라 칭함)만을 부호화함으로써 부호화해야 할 비트량을 상당히 줄일 수 있으며 그에 따라 부호화 효율을 높일 수 있다.The encoding of data for a video is made up of intra prediction encoding and inter prediction encoding. Such intra prediction encoding or inter prediction encoding is widely used for compressing various data in an effective way to reduce correlation between data. In particular, since the motion vector of the current block determined by estimating the motion of the current block to be currently encoded by inter prediction encoding is closely correlated with the motion vector of the neighboring block, the motion vector of the neighboring block is determined from the motion vector of the current block. After calculating the predicted motion vector (PMV: Predicted Motion Vector), the differential value of the predicted value (DMV: Differential Motion Vector) is calculated without encoding the value of the motion vector of the current block itself. By coding only '), the amount of bits to be encoded can be significantly reduced, thereby improving the coding efficiency.
즉, 인터 예측 부호화를 수행하는 경우, 부호화기는 이전에 부호화되고 복호화되어 복원된 참조 프레임에서 현재 블록의 움직임을 추정하여 결정한 예측 움직임 벡터와 현재 움직임 벡터와의 차분값인 차분 벡터만을 부호화하여 전송한다. 복호화기도 미리 복호화된 주위의 블록의 움직임 벡터를 이용하여 현재 블록의 움직임 벡터를 예측하여 전송된 차분 벡터와 예측 움직임 벡터를 더하여 현재 움직임 벡터를 복원한다.That is, in the case of performing inter prediction encoding, the encoder encodes and transmits only a difference vector, which is a difference between the predicted motion vector and the current motion vector determined by estimating the motion of the current block in a previously encoded, decoded and reconstructed reference frame. . The decoder also predicts the motion vector of the current block by using the motion vector of the neighboring block previously decoded, and reconstructs the current motion vector by adding the transmitted difference vector and the predicted motion vector.
또한, 인터 예측 부호화를 수행할 때, 참조 프레임을 보간하여 해상도를 일괄적으로 높인 후, 현재 블록의 움직임을 추정하여 결정한 예측 움직임 벡터와 현재 움직임 벡터와의 차분값인 차분 벡터를 부호화하여 전송할 수 있다. 이때, 참조 프레임의 영상 즉, 참조 영상의 해상도를 커지면 더욱 정확한 인터 예측이 가능하여 원 영상과 예측 영상 간의 잔차 신호를 부호화하여 발생하는 비트량은 줄어 들지만, 움직임 벡터의 해상도도 커지므로 차분 벡터를 부호화하여 발생하는 비트량도 커진다. 반대로, 참조 영상의 해상도가 작아지면 잔차 신호를 부호화하여 발생하는 비트량은 커지지만, 움직임 벡터의 해상도도 작아지므로 차분 벡터를 부호화하여 발생하는 비트량도 작아진다.In addition, when performing inter prediction encoding, the resolution may be collectively increased by interpolating a reference frame, and then encoded by a difference vector, which is a difference between the prediction motion vector determined by estimating the motion of the current block and the current motion vector, and then transmitted. have. In this case, when the resolution of the reference frame image, that is, the reference image, is increased, more accurate inter prediction is possible, thereby reducing the amount of bits generated by encoding the residual signal between the original image and the predicted image, but increasing the resolution vector of the motion vector. The amount of bits generated by encoding also increases. On the contrary, when the resolution of the reference picture becomes smaller, the bit amount generated by encoding the residual signal becomes larger, but since the resolution of the motion vector becomes smaller, the bit amount generated by encoding the difference vector also becomes smaller.
전술한 바와 같이, 통상적인 인터 예측 부호화에서는 영상의 모든 블록, 슬라이스, 픽처 등과 같은 부호화 단위의 영상에 대해 동일한 해상도로 보간하고 동일한 해상도의 움직임 벡터를 이용하여 인터 예측하기 때문에, 효율적인 부호화가 어려워 압축 효율이 저하되는 문제점이 있다.As described above, in the conventional inter prediction encoding, since the interpolation is performed with the same resolution and the motion vector having the same resolution is interpolated with the same resolution for all blocks, slices, pictures, and the like of the image, efficient encoding is difficult. There is a problem that the efficiency is lowered.
전술한 문제점을 해결하기 위해 본 발명은, 영상을 인터 예측 부호화 및 인터 예측 복호화하는 데 있어서, 움직임 벡터의 해상도를 적응적으로 변경하여 부호화 효율을 향상시키는 데 주된 목적이 있다.In order to solve the above-described problem, the present invention has an object of improving the coding efficiency by adaptively changing the resolution of a motion vector in inter prediction encoding and inter prediction decoding of an image.
전술한 목적을 달성하기 위해 본 발명은, 영상 부호화/복호화 장치에 있어서, 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 영상 부호화기; 및 비트스트림으로부터 해상도 정보를 추출하여 해상도를 복원하고 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 영상 복호화기를 포함하는 것을 특징으로 하는 영상 부호화/복호화 장치를 제공한다.In order to achieve the above object, the present invention provides a video encoding / decoding apparatus for determining a motion vector resolution for each region or motion vector and inter-prediction encoding using a motion vector according to the motion vector resolution determined for each region or motion vector. Image encoder; And an image decoder for extracting resolution information from the bitstream, restoring the resolution, and performing inter-prediction decoding using a motion vector according to the motion vector resolution of each reconstructed region or motion vector. to provide.
또한, 본 발명의 다른 목적에 의하면, 영상을 부호화하는 장치에 있어서, 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는 해상도 결정기; 및 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 인터 예측 부호화기를 포함하는 것을 특징으로 하는 영상 부호화 장치를 제공한다.According to another object of the present invention, there is provided an apparatus for encoding an image, comprising: a resolution determiner for determining a motion vector resolution for each region or motion vector; And an inter prediction encoder configured to perform inter prediction encoding using a motion vector according to a motion vector resolution determined for each region or motion vector.
또한, 본 발명의 또 다른 목적에 의하면, 영상을 복호화하는 장치에 있어서, 비트스트림으로부터 해상도 변경 플래그를 추출하는 해상도 변경 플래그 추출기; 추출된 해상도 변경 플래그에 따라 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 해상도 복호화기; 및 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 인터 예측 복호화기를 포함하는 것을 특징으로 하는 영상 복호화 장치를 제공한다.According to still another object of the present invention, there is provided an apparatus for decoding an image, comprising: a resolution change flag extractor for extracting a resolution change flag from a bitstream; A resolution decoder configured to extract and decode a coded resolution identification flag from the bitstream according to the extracted resolution change flag to restore a motion vector resolution for each region or motion vector; And an inter prediction decoder configured to inter-prediction-decode using a motion vector according to the motion vector resolution of each reconstructed region or motion vector.
또한, 본 발명의 다른 목적에 의하면, 영상을 복호화하는 장치에 있어서, 비트스트림으로부터 수신한 정보를 이용하여 상기 영역 또는 움직임 벡터마다의 해상도를 복원하는 해상도 복호화기; 및 상기 복원된 각 영역의 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 인터 예측 복호화기를 포함하는 것을 특징으로 하는 영상 복호화 장치를 제공한다.According to another object of the present invention, there is provided an apparatus for decoding an image, comprising: a resolution decoder for reconstructing the resolution of each region or motion vector by using information received from a bitstream; And an inter prediction decoder configured to perform inter prediction decoding using a motion vector according to the resolution of each of the reconstructed regions.
또한, 본 발명의 또 다른 목적에 의하면, 영상을 부호화/복호화하는 방법에 있어서, 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 영상 부호화단계; 및 비트스트림으로부터 해상도 정보를 추출하여 해상도를 복원하고 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 영상 복호화단계를 포함하는 것을 특징으로 하는 영상 부호화/복호화 방법을 제공한다.According to still another object of the present invention, in a method of encoding / decoding an image, the motion vector resolution is determined for each region or motion vector, and the inter prediction is performed by using the motion vector according to the motion vector resolution determined for each region or motion vector. An image encoding step of encoding; And an image decoding step of extracting resolution information from the bitstream, restoring the resolution, and inter-prediction decoding using a motion vector according to the motion vector resolution of each reconstructed region or motion vector. To provide.
또한, 본 발명의 또 다른 목적에 의하면, 영상을 부호화하는 방법에 있어서, 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는 단계; 및 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법을 제공한다.According to still another object of the present invention, there is provided a method of encoding an image, the method comprising: determining a motion vector resolution for each region or motion vector; And inter-prediction encoding using a motion vector according to a motion vector resolution determined for each region or motion vector.
또한, 본 발명의 또 다른 목적에 의하면, 영상을 복호화하는 방법에 있어서, 비트스트림으로부터 해상도 변경 플래그를 추출하는 단계; 추출된 해상도 변경 플래그에 따라 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 단계; 및 복원된 각 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 단계를 포함하는 것을 특징으로 하는 영상 복호화 방법을 제공한다.According to still another object of the present invention, there is provided a method of decoding an image, comprising: extracting a resolution change flag from a bitstream; Extracting and decoding the encoded resolution identification flag from the bitstream according to the extracted resolution change flag to restore motion vector resolution for each region or motion vector; And inter-prediction decoding using a motion vector according to the motion vector resolution of each reconstructed region or motion vector.
또한, 본 발명의 또 다른 목적에 의하면, 영상을 복호화하는 방법에 있어서, 비트스트림으로부터 수신한 정보를 이용하여 상기 영역 또는 움직임 벡터마다의 해상도를 복원하는 해상도 복호화단계; 및 상기 복원된 각 영역의 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 인터 예측 복호화단계를 포함하는 것을 특징으로 하는 영상 복호화 방법을 제공한다.According to still another object of the present invention, there is provided a method of decoding an image, comprising: a resolution decoding step of reconstructing a resolution of each region or motion vector by using information received from a bitstream; And an inter prediction decoding step of performing inter prediction decoding by using a motion vector according to the resolution of each of the reconstructed regions.
이상에서 설명한 바와 같이 본 발명에 의하면, 영상을 소정의 영역 단위로 움직임 벡터 해상도를 적응적으로 변경하여 인터 예측 부호화함으로써, 영상을 효율적으로 부호화할 수 있다.As described above, according to the present invention, the image can be efficiently encoded by inter-prediction coding by adaptively changing the motion vector resolution in predetermined area units.
도 1은 영상 부호화 장치를 간략하게 나타낸 블록 구성도,1 is a block diagram schematically illustrating a video encoding apparatus;
도 2는 참조 픽처를 보간하는 과정을 설명하기 위한 예시도,2 is an exemplary diagram for explaining a process of interpolating a reference picture;
도 3은 예측 움직임 벡터를 결정하는 과정을 설명하기 위한 예시도,3 is an exemplary diagram for explaining a process of determining a predicted motion vector;
도 4는 최대값 T가 10인 절삭형 단항 코드를 나타낸 예시도이고, 도 5는 0차, 1차 및 2차의 지수 골룸 코드를 나타낸 예시도,4 is an exemplary diagram showing a cutting type unary code having a maximum value T of 10, and FIG. 5 is an exemplary diagram illustrating an exponential golem code of 0, 1, and 2;
도 5는 0차, 1차 및 2차의 지수 골룸 코드를 나타낸 예시도,5 is an exemplary diagram showing exponential Gollum codes of 0, 1, and 2,
도 6은 최대값 T는 9이며 K는 3인 경우의 절삭형 단항/K차 지수 골룸 결합형 코드를 나타낸 예시도,6 is an exemplary view showing a cut-unary / K-order index gollum combined code when the maximum value T is 9 and K is 3;
도 7은 지그재그 스캔 순서를 나타낸 예시도,7 is an exemplary diagram illustrating a zigzag scan order;
도 8은 영상 복호화 장치를 간략하게 나타낸 블록 구성도,8 is a block diagram schematically illustrating a video decoding apparatus;
도 9는 본 발명의 일 실시예에 따른 영상 부호화 장치를 간략하게 나타낸 블록 구성도,9 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention;
도 10은 본 발명의 일 실시예에 따라 움직임 벡터 해상도를 쿼드 트리 구조로 계층적으로 표현한 예시도,10 is an exemplary diagram hierarchically expressing a motion vector resolution in a quad tree structure according to an embodiment of the present invention;
도 11은 본 발명의 일 실시예에 따라 쿼드 트리 구조로 계층적으로 표현된 움직임 벡터 해상도를 부호화하는 과정을 설명하기 위한 예시도,FIG. 11 is an exemplary diagram for describing a process of encoding a motion vector resolution hierarchically represented in a quad tree structure according to an embodiment of the present invention; FIG.
도 12는 본 발명의 일 실시예에 따라 결정된 영역의 움직임 벡터 해상도를 나타낸 예시도,12 is an exemplary diagram illustrating a motion vector resolution of a region determined according to an embodiment of the present invention.
도 13은 본 발명의 일 실시예에 따라 움직임 벡터 해상도를 테그 트리 구조로 계층적으로 표현한 예시도,13 is an exemplary diagram hierarchically expressing a motion vector resolution in a tag tree structure according to an embodiment of the present invention;
도 14는 본 발명의 일 실시예에 따라 테그 트리 구조로 계층적으로 표현된 움직임 벡터 해상도를 부호화한 결과를 나타낸 예시도,14 is an exemplary diagram illustrating a result of encoding a motion vector resolution expressed hierarchically expressed in a tag tree structure according to an embodiment of the present invention;
도 15는 본 발명의 일 실시예에 따라 영역의 주위 화소들을 이용하여 움직임 벡터 해상도를 결정하는 과정을 설명하기 위한 예시도,15 is an exemplary diagram for describing a process of determining a motion vector resolution using pixels around a region according to an embodiment of the present invention;
도 16은 본 발명의 일 실시예에 따라 예측 움직임 벡터를 예측하는 과정을 설명하기 위한 예시도,16 is an exemplary diagram for explaining a process of predicting a predicted motion vector according to an embodiment of the present invention;
도 17은 본 발명의 일 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법을 설명하기 위한 순서도,17 is a flowchart illustrating a video encoding method using an adaptive motion vector resolution according to an embodiment of the present invention.
도 18은 본 발명의 일 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 장치를 간략하게 나타낸 블록 구성도,18 is a block diagram schematically illustrating an apparatus for decoding an image using adaptive motion vector resolution according to an embodiment of the present invention;
도 19는 본 발명의 일 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 방법을 설명하기 위한 순서도이다.19 is a flowchart illustrating an image decoding method using adaptive motion vector resolution according to an embodiment of the present invention.
도 20은 본 발명의 일 실시예에 따라 노드를 하위 계층으로 분할하는 다른 방식을 나타낸 예시도,20 is an exemplary diagram illustrating another method of dividing a node into lower layers according to an embodiment of the present invention;
도 21은 본 발명의 일 실시예에 따라 움직임 벡터 해상도에 따른 심볼별로 할당되는 이진화 비트열을 나타낸 예시도,21 is an exemplary diagram illustrating a binarization bit string allocated to each symbol according to a motion vector resolution according to an embodiment of the present invention;
도 22는 움직임 벡터의 해상도를 결정하는 과정을 설명하기 위하여 주변 블록 및 현재블록의 최적 움직임 벡터를 예시한 도면,22 is a diagram illustrating an optimal motion vector of a neighboring block and a current block to explain a process of determining a resolution of a motion vector;
도 23은 움직임 벡터 해상도에 따른 변환식을 예시한 도면,23 is a diagram illustrating a conversion equation according to a motion vector resolution;
도 24는 주변 블록의 움직임 벡터의 해상도를 현재 부호화할 블록의 해상도로 변환한 표를 예시한 도면,24 is a diagram illustrating a table obtained by converting a resolution of a motion vector of a neighboring block into a resolution of a block to be currently encoded;
도 25는 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 도시한 도면,25 is a diagram of a code number table of differential motion vectors according to motion vector resolution;
도 26은 차분 움직임 벡터의 해상도를 결정하는 과정을 설명하기 위하여 주변 블록 및 현재블록의 최적 움직임 벡터를 예시한 도면,FIG. 26 is a diagram illustrating an optimal motion vector of a neighboring block and a current block to explain a process of determining a resolution of a differential motion vector; FIG.
도 27은 차분 움직임벡터 해상도에 따른 차분 움직임 벡터 부호 번호 테이블을 예시한 도면, 27 is a diagram illustrating a differential motion vector code number table according to differential motion vector resolution;
도 28은 현재 블록의 움직임 벡터와 주변 블록의 기준 움직임 벡터를 예시한 도면,28 is a diagram illustrating a motion vector of a current block and a reference motion vector of a neighboring block;
도 29는 차분 기준 움직임 벡터 해상도에 따른 차분 기준 움직임 벡터의 부호 번호 테이블을 예시한 도면,29 is a diagram illustrating a code number table of a differential reference motion vector according to a differential reference motion vector resolution;
도 30은 현재 픽처와 참조 픽처 간의 거리를 기준으로 참조 픽처를 인덱싱하고 부호화하는 예를 나타낸 도면,30 is a diagram illustrating an example of indexing and encoding a reference picture based on a distance between a current picture and a reference picture;
도 31은 참조픽처 번호 및 해상도에 따른 참조픽처 인덱스를 예시한 도면,31 is a diagram illustrating a reference picture index according to a reference picture number and a resolution;
도 32는 본 발명의 다른 실시예에 따른 적응적 움직임 벡터를 이용한 영상 부호화 장치를 개략적으로 도시한 도면,32 is a diagram schematically illustrating an image encoding apparatus using an adaptive motion vector according to another embodiment of the present invention;
도 33은 지정된 해상도가 1/2, 1/4인 경우에 해상도 식별 플래그를 예시한 도면,33 is a diagram illustrating a resolution identification flag when the specified resolutions are 1/2 and 1/4;
도 34는 현재 블록의 주변 블록을 예시한 도면,34 is a diagram illustrating a neighboring block of a current block;
도 35는 조건에 따른 확률 모델을 예시한 도면,35 is a diagram illustrating a probability model according to a condition;
도 36은 지정된 해상도가 1/2, 1/4, 1/8인 경우에 해상도 식별 플래그를 예시한 도면,36 is a diagram illustrating a resolution identification flag when the specified resolution is 1/2, 1/4, 1/8;
도 37은 조건에 다른 확률 모델의 다른 예를 나타낸 도면,37 is a view showing another example of a probability model different from a condition;
도 38 및 도 39는 현재 픽처와 참조 픽처 간의 거리에 따른 적응성 정도를 예시한 도면,38 and 39 are diagrams illustrating the degree of adaptability according to the distance between a current picture and a reference picture;
도 40은 소정의 해상도 세트마다 다른 참조픽처 인덱스 번호를 저장하는 경우의 예를 나타낸 도면,40 is a diagram showing an example of storing a different reference picture index number for each predetermined resolution set;
도 41은 참조픽처들이 부호화되는 구조를 예시한 도면,41 is a diagram illustrating a structure in which reference pictures are encoded;
도 42는 해상도 세트가 1/2, 1/4로 지정된 경우 참조 픽처별 해상도 세트를 예시한 도면,42 is a diagram illustrating a resolution set for each reference picture when the resolution set is specified as 1/2 and 1/4;
도 43은 현재 블록의 해상도와 주변 블록의 해상도를 예시한 도면,43 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block;
도 44는 현재 블록의 해상도와 주변 블록의 해상도의 다른 예를 나타낸 도면,44 is a diagram illustrating another example of a resolution of a current block and a resolution of a neighboring block;
도 45는 해상도에 따른 해상도 식별 플래그를 예시한 도면,45 is a diagram illustrating a resolution identification flag according to a resolution;
도 46은 현재 블록의 해상도와 주변 블록의 해상도를 예시한 도면,46 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block;
도 47은 본 발명의 다른 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법을 나타낸 도면,47 is a view showing a video encoding method using an adaptive motion vector resolution according to another embodiment of the present invention;
도 48은 본 발명의 일 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 장치를 개략적으로 도시한 도면,48 schematically illustrates an image decoding apparatus using adaptive motion vector resolution according to an embodiment of the present invention;
도 49는 현재 블록의 주변 움직임 벡터를 예시한 도면,49 is a diagram illustrating a peripheral motion vector of the current block;
도 50은 현재 해상도에 따른 주변 움직임 벡터의 변환된 값을 예시한 도면,50 is a diagram illustrating a converted value of a peripheral motion vector according to a current resolution;
도 51은 본 발명의 다른 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 방법을 나타낸 순서도이다.51 is a flowchart illustrating a method of decoding an image using adaptive motion vector resolution according to another embodiment of the present invention.
이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through exemplary drawings. In adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are assigned to the same components as much as possible even though they are shown in different drawings. In addition, in describing the present invention, when it is determined that the detailed description of the related well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.
또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. If a component is described as being "connected", "coupled" or "connected" to another component, that component may be directly connected or connected to that other component, but between components It will be understood that may be "connected", "coupled" or "connected".
이하에서 후술할 영상 부호화 장치(Video Encoding Apparatus), 영상 복호화 장치(Video Decoding Apparatus)는 개인용 컴퓨터(PC: Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 무선 통신 단말기(Wireless Communication Terminal), TV(Television) 등일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하거나 복호화하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미한다.A video encoding apparatus (Video Encoding Apparatus), a video decoding apparatus (Video Decoding Apparatus) to be described below is a personal computer (PC), notebook computer, personal digital assistant (PDA), portable multimedia player (PMP) : Portable Multimedia Player (PSP), PlayStation Portable (PSP: PlayStation Portable), Wireless Communication Terminal (Wireless Communication Terminal), TV (Television), etc., Communication device for communication with various devices or wired or wireless communication network, etc. The present invention refers to various devices including various programs for encoding or decoding an image, a memory for storing data, and a microprocessor for executing and operating a program.
또한, 영상 부호화 장치에 의해 비트스트림으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등의 유무선 통신망 등을 통하거나 케이블, 범용 직렬 버스(USB: Universal Serial Bus) 등의 통신 인터페이스를 통해 영상 복호화 장치로 전송되어 영상 복호화 장치에서 복호화되어 영상으로 복원되고 재생될 수 있다.In addition, the image encoded in the bitstream by the video encoding apparatus is real-time or non-real-time through the wired or wireless communication network, such as the Internet, local area wireless communication network, wireless LAN network, WiBro network, mobile communication network, or the like, or a cable, universal serial bus (USB: Universal) The image decoding apparatus may be transmitted to a video decoding apparatus through a communication interface such as a serial bus, decoded by the video decoding apparatus, reconstructed, and played back.
또한, 영상 부호화 장치와 영상 복호화 장치에는 인터 예측뿐만 아니라 인트라 예측을 수행하기 위한 기능이 구비될 수 있지만, 본 발명의 실시예와 직접적인 관계가 없기 때문에, 혼란을 방지하기 위해 상세한 설명을 생략한다.In addition, although the image encoding apparatus and the image decoding apparatus may be provided with functions for performing intra prediction as well as inter prediction, detailed descriptions will be omitted in order to prevent confusion because they are not directly related to the embodiment of the present invention.
통상적으로 동영상은 일련의 픽처(Picture)로 구성되어 있으며, 각 픽처들은 블록(Block)과 같은 소정의 영역으로 분할된다. 영상의 영역이 블록으로 분할되는 경우에는 분할된 블록은 부호화 방법에 따라 크게 인트라 블록(Intra Block), 인터 블록(Inter Block)으로 분류된다. 인트라 블록은 인트라 예측 부호화(Intra Prediction Coding) 방식을 사용하여 부호화되는 블록을 뜻하는데, 인트라 예측 부호화란 현재 부호화를 수행하는 현재 픽처 내에서 이전에 부호화되고 복호화되어 복원된 블록들의 화소를 이용하여 현재 블록의 화소를 예측함으로써 예측 블록을 생성하고 현재 블록의 화소와의 차분값을 부호화하는 방식이다. 인터 블록은 인터 예측 부호화(Inter Prediction Coding)를 사용하여 부호화되는 블록을 뜻하는데, 인터 예측 부호화란 하나 이상의 과거 픽처 또는 미래 픽처를 참조하여 현재 픽처 내의 현재 블록을 예측함으로써 예측 블록을 생성하고 현재 블록과의 차분값을 부호화하는 방식이다. 여기서, 현재 픽처를 부호화하거나 복호화하는데 참조되는 픽처를 참조 픽처(Reference Picture)라고 한다.In general, a moving picture is composed of a series of pictures, and each picture is divided into a predetermined area such as a block. When a region of an image is divided into blocks, the divided blocks are largely classified into intra blocks and inter blocks according to encoding methods. An intra block refers to a block that is encoded by using an intra prediction coding method. An intra prediction coding is performed by using pixels of blocks that are previously encoded, decoded, and reconstructed in a current picture that performs current encoding. A prediction block is generated by predicting pixels of a block, and a difference value with pixels of the current block is encoded. An inter block refers to a block that is encoded using inter prediction coding. Inter prediction coding generates a prediction block by predicting a current block within a current picture by referring to one or more past or future pictures, and then generates a current block. This is a method of encoding a difference value with. Here, a picture referred to for encoding or decoding the current picture is referred to as a reference picture.
이하에서는 영상을 블록 단위로 부호화하고 복호화하는 장치에 대해 도 1 내지 도 8을 통해 예를 들어 설명한다. 여기서, 블록은 MxN 크기의 매크로블록이나 OxP 크기의 서브블록 또는 하위 블록일 수 있는데, 블록 단위로 부호화하고 복호화하는 것은 예시적인 것이며, 영상을 블록과 같이 정형화된 영역 또는 비정형화된 영역으로 부호화하고 복호화할 수도 있을 것이다.Hereinafter, an apparatus for encoding and decoding an image in units of blocks will be described with reference to FIGS. 1 through 8. Here, the block may be a macroblock of MxN size or a subblock or subblock of OxP size. For example, encoding and decoding in units of blocks is an example, and an image is encoded into a standardized area or an unstructured area such as a block. You may be able to decrypt it.
도 1은 영상 부호화 장치를 간략하게 나타낸 블록 구성도이다.1 is a block diagram schematically illustrating a video encoding apparatus.
영상 부호화 장치(100)는 예측기(Predictor, 110), 감산기(Subtracter, 120), 변환기(Transformer, 130), 양자화기(Quantizer, 140), 부호화기(Encoder, 150), 역 양자화기(Inverse Quantizer, 160), 역 변환기(Inverse Transformer, 170), 가산기(Adder, 180) 및 메모리(190)를 포함할 수 있다.The image encoding apparatus 100 may include a predictor 110, a subtractor 120, a transformer 130, a quantizer 140, an encoder 150, an inverse quantizer, and an inverse quantizer. 160, an inverse transformer 170, an adder 180, and a memory 190.
예측기(110)는 현재 블록(Current Block)을 인터 예측(Inter Prediction)하여 예측 블록(Predicted Block)을 생성한다. 즉, 예측기(110)는 입력 영상(Input Picture)에서 현재 부호화하고자 하는 블록 즉, 현재 블록이 입력되면, 현재 블록의 화소(Pixels)의 원 화소값(Original Pixel Values)을 움직임 추정을 통해 결정되는 현재 블록의 움직임 벡터를 이용하여 예측하여 예측 화소값(Predicted Pixel Values)을 가지는 예측 블록을 생성하여 출력한다.The predictor 110 inter-predictions the current block to generate a predicted block. That is, the predictor 110 determines the original pixel values of the pixels of the current block through motion estimation when the block to be currently encoded, that is, the current block, is input from the input picture. A prediction block having predicted pixel values is generated and output by predicting using a motion vector of the current block.
감산기(120)는 현재 블록과 예측 블록을 감산하여 현재 블록의 잔차 블록(Residual Block)을 생성한다. 여기서, 출력되는 잔차 블록은 잔차 신호(Residual Signal)를 포함하는데, 잔차 신호는 현재 블록의 원 화소값에서 예측 블록의 예측 화소값을 뺀 값을 가진다.The subtractor 120 subtracts the current block and the prediction block to generate a residual block of the current block. Here, the output residual block includes a residual signal, which has a value obtained by subtracting the prediction pixel value of the prediction block from the original pixel value of the current block.
변환기(130)는 잔차 블록을 변환하여 변환 블록(Transformed Block)을 생성한다. 즉, 변환기(130)는 감산기(120)로부터 출력되는 잔차 블록의 잔차 신호를 주파수 영역(Frequency Domain)으로 변환하여 변환 계수(Transform Coefficient)를 가지는 변환 블록을 생성하여 출력한다. 여기서, 잔차 신호를 주파수 영역으로 변환 방법으로서는 이산 코사인 변환(DCT: Discrete Cosine Transform) 기반 변환 또는 하다마드 변환(Hadamard Transform) 등이 이용될 수도 있지만, 반드시 이에 한정되지 않고 DCT 변환을 개량 및 변형한 기법과 같은 다양한 변환 기법을 이용될 수 있으며, 이를 이용하여 잔차 신호가 주파수 영역으로 변환되어 변환 계수로 변환된다.The transformer 130 transforms the residual block to generate a transformed block. That is, the transformer 130 converts the residual signal of the residual block output from the subtractor 120 into a frequency domain to generate and output a transform block having a transform coefficient. Here, as a method of transforming the residual signal into the frequency domain, a Discrete Cosine Transform (DCT) -based transform or a Hadamard Transform (DCT) may be used, but the present invention is not limited thereto. Various transformation techniques such as the technique may be used, and the residual signal is transformed into a frequency domain and transformed into transformation coefficients.
양자화기(140)는 변환 블록을 양자화하여 양자화된 변환 블록을 생성한다. 즉, 양자화기(140)는 변환기(130)로부터 출력되는 변환 블록의 변환 계수들을 양자화하여 양자화된 변환 계수를 가지는 양자화된 변환 블록(Quantized Transform Coefficient Block)을 생성하여 출력한다. 여기서, 양자화 방법으로서는 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization) 또는 양자화 가중치 매트릭스(Quantization Weighted Matrix) 등이 이용될 수 있지만 이를 개량한 양자화 등 다양한 양자화 방법이 이용될 수 있다.The quantizer 140 quantizes the transform block to generate a quantized transform block. That is, the quantizer 140 quantizes the transform coefficients of the transform block output from the transformer 130 to generate and output a quantized transform block having quantized transform coefficients. Here, dead zone uniform threshold quantization (DZUTQ) or quantization weighted matrix (DZUTQ) may be used as the quantization method, but various quantization methods such as quantization improved therefrom may be used.
부호화기(150)는 양자화된 변환 블록을 부호화하여 비트스트림을 출력할 수 있다. 즉, 부호화기(150)는 양자화기(140)로부터 출력되는 양자화된 변환 블록의 양자화된 변환 계수를 지그재그 스캔 등 다양한 스캔 방식으로 스캔한 주파수 계수열을 엔트로피 부호화(Entropy Encoding) 등 다양한 부호화 기법을 이용하여 부호화하고 해당 블록을 복호화하는 데 필요한 부가적인 정보들(예를 들면, 예측 모드에 대한 정보, 양자화 계수(Quantization Parameter), 움직임 벡터(Motion Vector) 등)을 함께 포함하는 비트스트림을 생성하고 출력할 수 있다.The encoder 150 may output a bitstream by encoding the quantized transform block. That is, the encoder 150 uses various encoding techniques, such as entropy encoding, on a frequency coefficient string scanned by various scan methods such as zigzag scan of the quantized transform coefficients output from the quantizer 140. To generate and output a bitstream including additional information necessary for encoding and decoding the corresponding block (for example, information on a prediction mode, a quantization coefficient, a motion vector, etc.). can do.
역 양자화기(160)는 양자화된 변환 블록을 역 양자화한다. 즉, 역 양자화기(160)는 양자화기(140)로부터 출력되는 양자화된 변환 블록의 양자화 변환 계수들을 역 양자화하여 출력한다. Inverse quantizer 160 inverse quantizes the quantized transform block. That is, the inverse quantizer 160 inversely quantizes and outputs quantized transform coefficients of the quantized transform block output from the quantizer 140.
역 변환기(170)는 역 양자화된 변환 블록을 역 변환한다. 즉, 역 변환기(170)는 역 양자화기(160)에 의해 역 양자화된 변환 계수를 역 변환하여 복원된 잔차 계수를 가지는 잔차 블록을 복원한다. Inverse transformer 170 inversely transforms an inverse quantized transform block. That is, the inverse transformer 170 inversely transforms the transform coefficients inversely quantized by the inverse quantizer 160 to restore a residual block having the reconstructed residual coefficients.
가산기(180)는 예측기(110)에 의해 예측된 예측 블록과 역 변환기(170)에 의해 역 변환되어 복원된 잔차 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록은 메모리(190)에 저장되고, 메모리(190)에 저장된 복원된 현재 블록은 블록 단위로 또는 픽처 단위로 누적되어 픽처 단위로 예측기(110)로 전달되어 다음 블록 또는 다음 픽처 등 다른 블록을 예측하는 데 활용될 수 있다.The adder 180 reconstructs the current block by adding the prediction block predicted by the predictor 110 and the residual block inversely transformed and reconstructed by the inverse transformer 170. The reconstructed current block is stored in the memory 190, and the reconstructed current block stored in the memory 190 is accumulated in units of blocks or in units of pictures and transferred to the predictor 110 in units of pictures, and then other blocks such as the next block or the next picture are stored. Can be used to predict blocks.
한편, 예측기(110)는 메모리(190)에 저장된 참조 픽처를 이용하여 현재 블록의 움직임을 추정함으로써 현재 블록의 움직임 벡터를 결정하는데, 메모리(190)에 저장된 참조 픽처를 보간하여 참조 픽처의 해상도를 높여 움직임 추정을 수행할 수 있다.Meanwhile, the predictor 110 determines the motion vector of the current block by estimating the motion of the current block by using the reference picture stored in the memory 190. The resolution of the reference picture is interpolated by interpolating the reference picture stored in the memory 190. Can be used to perform motion estimation.
도 2는 참조 픽처를 보간하는 과정을 설명하기 위한 예시도이다.2 is an exemplary diagram for describing a process of interpolating a reference picture.
도 2에는 메모리(190)에 저장된 참조 픽처의 화소들과 부화소로 보간된 화소들을 나타내었다. 참조 픽처의 이미 복원된 화소 A~U를 보간 필터(Interpolation Filter)로 필터링하면 부화소 a~s를 생성될 수 있으며, 부화소 a~s를 도시된 바와 같이 이미 복원된 화소들 사이에 보간되어 참조 픽처의 해상도가 4배 이상 높아 질 수 있다.2 illustrates pixels of a reference picture stored in the memory 190 and pixels interpolated with subpixels. Filtering the previously reconstructed pixels A to U of the reference picture with an interpolation filter can generate subpixels a to s, and the subpixels a to s are interpolated between the already reconstructed pixels as shown. The resolution of the reference picture may be four times higher.
움직임 추정(Motion Estimation)은 보간된 참조 픽처에서 현재 블록과 가장 유사한 부분을 찾아서 해당 부분의 블록과 해당 블록을 가리키는 움직임 벡터를 출력하는 과정이다. 이 과정에서 찾은 예측 블록은 감산기(120)에서 현재 블록과 감산되며, 그를 통해 잔차 신호를 가지는 잔차 블록이 생성된다. 또한, 움직임 벡터는 부호화기(160)에서 부호화된다.Motion Estimation is a process of finding a part most similar to the current block in the interpolated reference picture and outputting a block of the corresponding part and a motion vector indicating the corresponding block. The prediction block found in this process is subtracted from the current block in the subtractor 120, through which a residual block having a residual signal is generated. In addition, the motion vector is encoded by the encoder 160.
부호화기(160)는 움직임 벡터를 부호화할 때, 현재 블록과 인접한 블록들의 움직임 벡터를 이용하여 현재 블록의 움직임 벡터를 예측하고 예측된 움직임 벡터 즉, 예측 움직임 벡터를 이용하여 움직임 벡터를 부호화할 수 있다.When encoding the motion vector, the encoder 160 may predict the motion vector of the current block by using the motion vectors of blocks adjacent to the current block and encode the motion vector by using the predicted motion vector, that is, the predicted motion vector. .
도 3은 예측 움직임 벡터를 결정하는 과정을 설명하기 위한 예시도이다.3 is an exemplary diagram for describing a process of determining a predicted motion vector.
도 3을 참조하면, 현재 블록이 X이고, 현재 블록의 왼쪽에 있는 인접 블록 A의 움직임 벡터가 MV_A(x성분: MVx_A, y성분: MVy_A)이며, 현재 블록의 위쪽에 있는 인접 블록 B의 움직임 벡터가 MV_B(x성분: MVx_B, y성분: MVy_B)이며, 현재 블록의 위쪽 오른쪽에 있는 인접 블록 C의 움직임 벡터가 MV_C(x성분: MVx_C, y성분: MVy_C)라고 가정하면, 현재 블록 X의 예측 움직임 벡터 MV_pred_X(x성분: MVx_pred_X, y성분: MVy_pred_X)의 각 성분은 수학식 1과 같이 현재 블록의 인접 블록의 움직임 벡터의 각 성분마다의 중간값(Median Value)으로 결정될 수 있다. 한편, 본 발명에서 움직임 벡터 예측 방법이 여기서 소개되는 방법에 한정되지는 않는다.Referring to FIG. 3, the current block is X, the motion vector of the adjacent block A on the left of the current block is MV_A (x component: MVx_A, y component: MVy_A), and the motion of the adjacent block B above the current block. Assuming that the vector is MV_B (x component: MVx_B, y component: MVy_B) and that the motion vector of the adjacent block C on the upper right side of the current block is MV_C (x component: MVx_C, y component: MVy_C), Each component of the predicted motion vector MV_pred_X (x component: MVx_pred_X, y component: MVy_pred_X) may be determined as a median value for each component of the motion vector of the neighboring block of the current block, as shown in Equation 1. Meanwhile, the motion vector prediction method in the present invention is not limited to the method introduced herein.
수학식 1
Figure PCTKR2010005568-appb-M000001
Equation 1
Figure PCTKR2010005568-appb-M000001
부호화기(160)는 예측 움직임 벡터와 움직임 벡터의 차이값을 가지는 차분 벡터를 부호화할 수 있는데, 차분 벡터를 부호화하는 부호화 방식으로서는 예를 들어, 범용 가변 길이 부호화(UVLC: Universal Variable Length Coding, 이하 'UVLC'라 칭함)와 문맥 기반 이진 산술 부호화(CABAC: Context-Adaptive Binary Arithmetic Coding, 이하 'CABAC'라 칭함) 등과 같은 엔트로피 부호화(Entropy Coding) 방식이 이용될 수 있다. 한편, 본 발명에서 부호화기(160)에서의 부호화 방법이 여기서 소개되는 방법에 한정되지는 않는다.The encoder 160 may encode a difference vector having a difference between the predicted motion vector and the motion vector. As an encoding method for encoding the difference vector, for example, Universal Variable Length Coding (UVLC) Entropy Coding (UVLC ') and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used. In the present invention, the encoding method in the encoder 160 is not limited to the method introduced here.
UVLC를 이용하여 차분 벡터가 부호화되는 경우에는, 차분 벡터는 K차 지수 골룸 코드(K-th Order Exp-Golomb Code)를 이용하여 부호화될 수 있다. 이때, K의 값은 '0' 또는 다른 어떠한 값이 될 수 있다. K차 지수 골룸 코드의 접두어는
Figure PCTKR2010005568-appb-I000001
에 해당하는 절삭형 단항 코드(Truncated Unary Code)를 가지며, 접미어는 k+l(x)의 길이를 가지는 x+2k(1-2l(x))값의 이진화된 비트열로 표현될 수 있다.
When the difference vector is encoded using UVLC, the difference vector may be encoded using a K-th Order Exp-Golomb Code. At this time, the value of K may be '0' or any other value. The prefix of the Kth order Gollum code
Figure PCTKR2010005568-appb-I000001
It has a truncated unary code corresponding to, and the suffix can be represented as a binary bit string of x + 2 k (1-2 l (x) ) values having a length of k + l (x). have.
도 4는 최대값 T가 10인 절삭형 단항 코드를 나타낸 예시도이고, 도 5는 0차, 1차 및 2차의 지수 골룸 코드를 나타낸 예시도이다.4 is an exemplary diagram showing a cutting type unary code having a maximum value T of 10, and FIG. 5 is an exemplary diagram illustrating an exponential Golem code of 0, 1, and 2.
또한, CABAC를 이용하여 차분 벡터가 부호화되는 경우에는, 차분 벡터는 절삭형 단항/K차 지수 골룸 결합형 코드(Concatenated Truncated Unary/K-th Order Exp-Golomb Code)의 부호 비트를 이용하여 부호화될 수 있다.In addition, when the difference vector is encoded using CABAC, the difference vector is to be encoded using the sign bit of the concatenated Truncated Unary / K-th Order Exp-Golomb Code. Can be.
절삭형 단항/K차 지수 골룸 결합형 코드에서 최대값 T는 9이며 K는 3이 될 수 있다. 도 6은 최대값 T는 9이며 K는 3인 경우의 절삭형 단항/K차 지수 골룸 결합형 코드를 나타낸 예시도이다.In a cut unary / K-order index golem combined code, the maximum value T is 9 and K can be 3. 6 is an exemplary view showing a cut-unary / K-order index gollum combined code when the maximum value T is 9 and K is 3. FIG.
도 7은 지그재그 스캔 순서를 나타낸 예시도이다.7 is an exemplary diagram illustrating a zigzag scan sequence.
양자화기(140)에서 양자화된 양자화 주파수 계수는 부호화기(160)에서 스캔되어 양자화 주파수 계수열의 형태로 부호화될 수 있는데, 블록 형태의 양자화 주파수 계수는 도 7에 도시한 바와 같이 지그재그 순서로 스캔될 수도 있지만, 이외의 다양한 스캔 순서로 스캔될 수도 있다.The quantized frequency coefficients quantized by the quantizer 140 may be scanned by the encoder 160 and encoded in the form of quantized frequency coefficient sequences. The quantized frequency coefficients in the block form may be scanned in a zigzag order as shown in FIG. 7. However, it may be scanned in various other scanning orders.
도 8은 영상 복호화 장치를 간략하게 나타낸 블록 구성도이다.8 is a block diagram schematically illustrating a video decoding apparatus.
영상 복호화 장치(800)는 복호화기(Decoder, 810), 역 양자화기(820), 역 변환기(830), 예측기(840), 가산기(850) 및 메모리(860)를 포함할 수 있다.The image decoding apparatus 800 may include a decoder 810, an inverse quantizer 820, an inverse transformer 830, a predictor 840, an adder 850, and a memory 860.
복호화기(810)는 비트스트림을 복호화하여 양자화된 변환 블록을 추출한다. 즉, 복호화기(810)는 입력되는 비트스트림으로부터 추출된 비트열을 복호화하고 역 스캐닝하여 양자화된 변환 계수를 가지는 양자화된 변환 블록을 복원한다. 이때, 복호화기(810)는 영상 부호화 장치(100)의 부호화기(160)에서 이용한 엔트로피 부호화와 같은 부호화 기법을 이용하여 복호화할 수 있다.The decoder 810 extracts a quantized transform block by decoding the bitstream. That is, the decoder 810 decodes and inversely scans the bit string extracted from the input bitstream to restore the quantized transform block having the quantized transform coefficients. In this case, the decoder 810 may decode using an encoding technique such as entropy encoding used by the encoder 160 of the image encoding apparatus 100.
또한, 복호화기(810)에서는 비트스트림으로부터 부호화된 차분 벡터를 추출하여 복호화하여 차분 벡터를 복원하고, 현재 블록의 움직임 벡터를 예측하여 예측 움직임 벡터와 복원된 차분 벡터를 가산하여 현재 블록의 움직임 벡터를 복원할 수 있다.In addition, the decoder 810 extracts and decodes the encoded difference vector from the bitstream, reconstructs the difference vector, predicts the motion vector of the current block, adds the predicted motion vector and the reconstructed difference vector, and adds the motion vector of the current block. Can be restored.
역 양자화기(820)는 양자화된 변환 블록을 역 양자화한다. 즉, 역 양자화기(820)는 복호화기(810)로부터 출력되는 양자화된 변환 블록의 양자화된 변환 계수를 역 양자화한다. 이때, 역 양자화기(820)는 영상 부호화 장치(100)의 양자화기(140)에서 이용한 양자화 기법을 역으로 수행하여 역 양자화한다. Inverse quantizer 820 inverse quantizes the quantized transform block. That is, the inverse quantizer 820 inverse quantizes the quantized transform coefficients of the quantized transform block output from the decoder 810. In this case, the inverse quantizer 820 performs inverse quantization by inversely performing the quantization technique used by the quantizer 140 of the image encoding apparatus 100.
역 변환기(830)는 역 양자화기(820)로부터 출력되는 역 양자화된 변환 블록을 역 변환하여 잔자 블록을 복원한다. 즉, 역 변환기(830)는 역 양자화기(820)로부터 출력되는 역 양자화된 변환 블록의 역 양자화된 변환 계수를 역 변환함으로써 복원된 잔차 신호를 가지는 잔차 블록을 복원하는데, 영상 부호화 장치(100)의 변환기(130)에서 이용한 변환 기법을 역으로 수행하여 역 변환한다.The inverse transformer 830 inversely transforms the inverse quantized transform block output from the inverse quantizer 820 to restore the residual block. That is, the inverse transformer 830 restores the residual block having the reconstructed residual signal by inversely transforming the inverse quantized transform coefficients of the inverse quantized transform block output from the inverse quantizer 820. Inverse conversion is performed by performing the conversion technique used in the converter 130 of the inverse.
예측기(840)는 비트스트림으로부터 추출되고 복호화되어 복원된 현재 블록의 움직임 벡터를 이용하여 현재 블록을 예측하여 예측 블록을 생성한다.The predictor 840 generates a prediction block by predicting the current block by using the motion vector of the current block extracted from the bitstream and decoded.
가산기(850)는 예측 블록과 복원된 잔차 블록을 가산하여 현재 블록을 복원한다. 즉, 가산기(850)는 예측기(840)로부터 출력되는 예측 블록의 예측 화소값과 역 변환기(830)로부터 출력되는 복원된 잔차 블록의 복원된 잔차 신호를 가산하여 현재 블록의 복원 화소값을 가산함으로써, 현재 블록을 복원한다.The adder 850 reconstructs the current block by adding the prediction block and the reconstructed residual block. That is, the adder 850 adds the predicted pixel value of the predicted block output from the predictor 840 and the reconstructed residual signal of the restored residual block output from the inverse transformer 830 to add the reconstructed pixel value of the current block. Restore the current block.
가산기(850)에 의해 복원된 현재 블록은 메모리(860)에 저장되고 블록 단위로 저장되거나 픽처 단위로 참조 픽처로서 저장되어, 예측기(840)가 다음 블록을 예측하는데 사용될 수 있다.The current block reconstructed by the adder 850 is stored in the memory 860 and stored in block units or as reference pictures in picture units, so that the predictor 840 can be used to predict the next block.
이와 같이 도 1 내지 도 8을 통해 전술한 영상 부호화 장치(100)와 영상 복호화 장치(800)는 참조 픽처를 부화소 단위로 보간하여 참조 픽처와 움직임 벡터의 해상도를 높여 인터 예측 부호화 및 인터 예측 복호화를 수행할 수 있는데, 픽처 단위 또는 픽처 그룹(GOP: Group of Picture) 단위로 동일한 해상도로 참조 픽처를 보간하고 움직임 벡터의 해상도를 높일 수 있었다.As described above, the image encoding apparatus 100 and the image decoding apparatus 800 described above with reference to FIGS. 1 through 8 interpolate the reference picture in subpixel units to increase the resolution of the reference picture and the motion vector, thereby inter prediction encoding and inter prediction decoding. The reference picture may be interpolated at the same resolution in units of pictures or in groups of pictures (GOPs) and the resolution of the motion vector may be increased.
하지만, 이 경우 참조 픽처의 해상도를 높여 인터 예측을 수행함으로써 예측이 더욱 정확해지고 그에 따라 잔차 신호를 부호화하여 발생하는 비트량을 감소시킬 수 있지만, 움직임 벡터의 해상도도 함께 높아져서 움직임 벡터를 부호화하여 발생하는 비트량이 일괄적으로 증가하게 되므로, 결과적으로 참조 픽처의 해상도를 높여 인터 예측 부호화를 하는 경우에도 부호화 효율이 크게 증가하지 못하거나 영상에 따라 오히려 부호화 효율이 저하될 수 있다.However, in this case, the prediction is more accurate by increasing the resolution of the reference picture and the bit amount generated by encoding the residual signal can be reduced accordingly. However, the resolution of the motion vector is also increased to encode the motion vector. Since the amount of bits to be collectively increased, as a result, even in the case of performing inter prediction encoding by increasing the resolution of the reference picture, the encoding efficiency may not be greatly increased or the encoding efficiency may be lowered depending on the image.
이하에서는 영상의 특성에 따라 픽처 단위, 슬라이스 단위, 블록 단위 등 영상의 정형 또는 비정형의 임의의 크기를 가지는 영역 단위로 적응적으로 참조 픽처의 해상도를 높여서 인터 예측 부호화함으로써, 영상이 복잡하거나 움직임이 작은 영역에서는 해상도를 높여 인터 예측 부호화하고 복호화하며, 영상이 복잡하지 않거나 움직임이 큰 영역에서는 해상도를 낮추어 인터 예측 부호화하고 복호화하는 방법 및 장치에 대해 설명한다.Hereinafter, inter prediction encoding is performed by adaptively increasing the resolution of a reference picture in an area unit having an arbitrary size, such as a picture unit, a slice unit, a block unit, etc. according to characteristics of an image, thereby increasing the resolution or complexity of an image. A method and apparatus for inter prediction encoding and decoding by increasing the resolution in a small region and lowering the resolution in a region where the image is not complicated or large in motion are described.
도 9는 본 발명의 제1 실시예에 따른 영상 부호화 장치를 간략하게 나타낸 블록 구성도이다.9 is a block diagram schematically illustrating a video encoding apparatus according to a first embodiment of the present invention.
본 발명의 제1 실시예에 따른 적응적 움직임 벡터를 이용한 영상 부호화 장치(900)는, 인터 예측 부호화기(Inter Prediction Encoder, 910), 해상도 변경 플래그 생성기(Resolution Change Flag Encoder, 920), 해상도 결정기(Resolution Determiner, 930), 해상도 부호화기(Resolution Encoder, 940) 및 차분 벡터 부호화기(Differential Vector Encoder, 950)를 포함하여 구성될 수 있다. 한편, 해상도 변경 플래그 생성기(920) 및 해상도 부호화기(940), 차분 벡터 부호화기(950)는 반드시 모두가 영상 부호화 장치(900)에 포함되어야 하는 것은 아니며, 구현 방식에 따라 선택적으로 포함될 수 있다. The image encoding apparatus 900 using the adaptive motion vector according to the first embodiment of the present invention includes an inter prediction encoder (910), a resolution change flag encoder (920), and a resolution determiner ( Resolution Determiner (930), a resolution encoder (Resolution Encoder, 940) and a differential vector encoder (Differential Vector Encoder, 950). The resolution change flag generator 920, the resolution encoder 940, and the difference vector encoder 950 are not necessarily all included in the image encoding apparatus 900, but may be selectively included according to an implementation method.
인터 예측 부호화기(910)는 영상의 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도(Motion Vector Resolution)에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화(Inter Prediction Encoding)한다. 이러한 인터 예측 부호화기(910)는 도 1을 통해 전술한 영상 부호화 장치(100)로 구현될 수 있다. 여기서, 도 9의 해상도 부호화기(940) 및 차분 벡터 부호화기(950) 중에서 하나 이상의 구성요소가 추가로 포함되는 경우 추가로 포함되는 구성요소의 기능과 인터 예측 부호화기(910) 내의 부호화기(150)의 기능이 중복되는 경우 부호화기(150)에서는 그 중복되는 기능이 생략될 수 있다. 또한 인터 예측 부호화기(910) 내의 예측기(110)의 기능과 해상도 결정기(930)의 기능이 중복되는 부분이 있는 경우 그 중복되는 기능은 예측기(110) 내에서는 생략될 수도 있다.The inter prediction encoder 910 inter-prediction encodes an image in units of regions using a motion vector according to a motion vector resolution determined for each region or motion vector of the image. The inter prediction encoder 910 may be implemented by the image encoding apparatus 100 described above with reference to FIG. 1. Here, when one or more components of the resolution encoder 940 and the differential vector encoder 950 of FIG. 9 are additionally included, the functions of the additional components and the encoder 150 in the inter prediction encoder 910 are included. In case of overlapping, the overlapping function may be omitted in the encoder 150. In addition, when there is a part where the function of the predictor 110 and the function of the resolution determiner 930 overlap in the inter prediction encoder 910, the overlapping function may be omitted in the predictor 110.
또한, 해상도 부호화기(940) 및 차분 벡터 부호화기(950) 중에서 추가되는 하나 이상의 구성요소는 도 9와 같이 인터 예측 부호화기(910)와 별개의 구성요소로 구성될 수도 있지만 인터 예측 부호화기(910) 내의 부호화기(150)와 일체로 구성될 수도 있다. 또한, 해상도 변경 플래그 생성기(920)에서 발생한 플래그 정보는 해상도 변경 플래그 생성기(920)에서 비트스트림으로 변환할 수도 있지만 비트스트림으로 변환하는 기능은 인터 예측 부호화기(910) 내의 부호화기(150)가 담당할 수도 있다.In addition, one or more components added among the resolution encoder 940 and the differential vector encoder 950 may be configured separately from the inter prediction encoder 910 as shown in FIG. 9, but may be configured as an encoder in the inter prediction encoder 910. It may be configured integrally with 150. In addition, although the flag information generated by the resolution change flag generator 920 may be converted into a bitstream by the resolution change flag generator 920, the function of converting the bitstream into a bitstream is performed by the encoder 150 of the inter prediction encoder 910. It may be.
다만, 도 1을 통해 전술한 영상 부호화 장치(100)는 영상을 블록 단위로 부호화하는 것으로 설명했지만, 인터 예측 부호화기(910)는 영역을 매크로블록 또는 서브블록과 같은 블록이나 슬라이스, 픽처 등과 같은 다양한 형태와 크기의 영역으로 분할하여 임의의 크기를 가지는 영역 단위로 부호화할 수 있다. 이러한 소정의 영역은 16X16 크기의 매크로블록이 될 수도 있지만, 이에 한정하지 않고 64X64 크기의 블록, 32X16 크기의 블록 등과 같은 다양한 크기와 형태의 블록이 될 수도 있다.However, the image encoding apparatus 100 described above with reference to FIG. 1 has been described as encoding an image in units of blocks. However, the inter prediction encoder 910 uses a variety of blocks such as macroblocks or subblocks, slices, pictures, and the like. It may be divided into regions of shape and size and encoded in an area unit having an arbitrary size. The predetermined area may be a macroblock of 16 × 16 size, but may be a block of various sizes and shapes such as a 64 × 64 size block and a 32 × 16 size block.
또한, 도 1을 통해 전술한 영상 부호화 장치(100)는 영상의 모든 블록에 대해 동일한 움직임 벡터 해상도를 가지는 움직임 벡터로 인터 예측 부호화하지만, 인터 예측 부호화기(910)는 영역마다 다르게 결정되는 움직임 벡터 해상도를 가지는 움직임 벡터로 각 영역을 인터 예측 부호화할 수 있다. 여기서 움직임 벡터 해상도가 달리 결정될 수 있는 영상 영역은 픽처(프레임 또는 필드), 슬라이스 또는 소정 크기의 이미지 블록이 될 수 있다.In addition, while the image encoding apparatus 100 described above with reference to FIG. 1 inter-predictively encodes motion blocks having the same motion vector resolution for all blocks of an image, the inter prediction encoder 910 is a motion vector resolution determined differently for each region. Each region may be inter prediction encoded by using a motion vector having. In this case, an image region in which the motion vector resolution may be determined may be a picture (frame or field), a slice, or an image block having a predetermined size.
즉, 인터 예측 부호화기(910)는 소정의 영역을 인터 예측 부호화할 때, 이미 부호화되고 복호화되어 복원된 참조 픽처를 보간하여 해상도를 높인 후, 움직임 추정을 수행한다. 참조 픽처를 보간하기 위한 보간 필터로는 위너 필터(Winner Filter), 양선형 필터(Bilinear Filter), 칼만 필터(Kalman Filter) 등과 같은 다양한 필터가 사용될 수 있으며, 보간을 위한 해상도로는 2/1 화소, 1/1 화소, 1/2 화소, 1/4 화소, 1/8 화소 단위 등과 같은 다양한 분수 화소 및 정수 화소 단위의 해상도가 적용될 수 있다. 또한, 이러한 다양한 해상도에 따라 서로 다른 필터 계수를 사용하거나 필터 계수의 개수를 다르게 할 수도 있다. 예를 들면, 해상도가 1/2 화소 단위인 경우 위너 필터를 사용하여 보간하고, 1/4 화소 단위인 경우 칼만 필터를 사용하여 보간할 수 있다. 또한, 각 해상도를 보간할 때 필터 탭의 개수를 달리 할 수도 있다. 예를 들면, 해상도가 1/2 화소 단위인 경우 8탭 위너 필터를 사용하여 보간하고, 1/4 화소 단위인 경우 6탭 위너 필터를 사용하여 보간 할 수 있다.That is, when inter prediction encoding a predetermined region, the inter prediction encoder 910 increases the resolution by interpolating a reference picture that is already encoded, decoded, and reconstructed, and then performs motion estimation. As an interpolation filter for interpolating a reference picture, various filters such as a Winner filter, a bilinear filter, a Kalman filter, and the like can be used. The resolution for interpolation is 2/1 pixel. The resolution of various fractional and integer pixel units such as 1/1 pixel, 1/2 pixel, 1/4 pixel, 1/8 pixel unit, etc. may be applied. In addition, different filter coefficients may be used or the number of filter coefficients may be changed according to the various resolutions. For example, when the resolution is 1/2 pixel unit, interpolation may be performed using a Wiener filter, and when the resolution is 1/4 pixel unit, interpolation may be performed using a Kalman filter. In addition, the number of filter taps may be changed when interpolating each resolution. For example, when the resolution is 1/2 pixel unit, the interpolation may be performed using an 8 tap winner filter, and when the resolution is 1/4 pixel unit, the interpolation may be performed using a 6 tap winner filter.
또한, 인터 예측 부호화기(910)는 현재 부호화할 픽처와 참조픽처간의 에러가 최소가 되는 최적의 필터 계수를 각 움직임 벡터 해상도마다 결정하여 필터 계수를 부호화할 수 있다. 이때, 필터는 위너 필터, 칼만 필터 등 어떠한 필터를 사용할 수 있고, 각 필터 탭의 개수도 여러 개가 될 수 있으며, 각 해상도마다 필터와 필터 탭의 개수가 다를 수도 있다.In addition, the inter prediction encoder 910 may encode the filter coefficients by determining the optimum filter coefficient for each motion vector resolution that minimizes the error between the current picture to be encoded and the reference picture. In this case, the filter may use any filter such as a Wiener filter or a Kalman filter, and the number of filter taps may be several, and the number of filters and filter taps may be different for each resolution.
또한, 인터 예측 부호화기(910)는 영역 또는 움직임 벡터의 해상도에 따라 다른 필터를 이용하여 보간한 참조 픽처를 이용하여 인터 예측할 수 있다. 예를 들면, 수학식 2와 같이, 현재 부호화 할 픽처와 참조 픽처간의 SSD(Sum of Squared Difference)가 최소가 되는 최적의 필터를 계산하기 위해, 위너 필터를 이용하여 각 해상도마다 최적의 필터 탭을 계산할 수 있다.In addition, the inter prediction encoder 910 may inter predict using a reference picture interpolated using a different filter according to the resolution of a region or a motion vector. For example, in order to calculate an optimal filter that minimizes a sum of squared difference (SSD) between a current picture to be encoded and a reference picture, as shown in Equation 2, an optimal filter tap is selected for each resolution using the Wiener filter. Can be calculated
수학식 2
Figure PCTKR2010005568-appb-M000002
Equation 2
Figure PCTKR2010005568-appb-M000002
수학식 2에서, S는 현재 픽처의 화소를 나타내고, hsp는 화소 도메인의 필터 계수를 나타내며, P는 참조 픽처의 화소를 나타내며, eSP는 에러를 나타내고, x, y는 현재 화소의 위치를 나타낸다.In Equation 2, S denotes a pixel of the current picture, h sp denotes a filter coefficient of the pixel domain, P denotes a pixel of the reference picture, e SP denotes an error, and x and y denote a position of the current pixel. Indicates.
즉, 인터 예측 부호화기(910)는 수학식 2와 같은 위너 호프 방정식을 이용하여 필터 계수를 각 해상도마다 계산하여 각 해상도마다 최적의 필터 계수를 부호화하여 비트스트림에 포함시키고, 참조 픽처에 대해 보간 필터링을 수행 후 각 해상도마다의 참조 픽처를 만들어 부호화할 수 있다. 이때, 1/2 해상도에는 6탭 위너 필터의 필터를, 1/4해상도에는 8탭 칼만 필터를, 1/8 해상도에는 선형 필터의 필터 계수를 계산하여 필터 계수를 부호화하여 비트스트림에 포함시키고, 각 해상도 마다의 참조 픽처를 보간하여 부호화할 수 있다. 이때, 인터 예측 부호화기(910)는 현재 영역 또는 움직임 벡터의 해상도가 1/2 해상도인 경우 6탭 위너 필터로 보간된 참조 픽처를 이용하여 부호화하고, 1/4 해상도인 경우 8탭 칼만 필터로 보간된 참조 픽처를 이용하여 부호화할 수 있다.That is, the inter prediction encoder 910 calculates filter coefficients for each resolution by using a Wiener hop equation as shown in Equation 2, encodes the optimal filter coefficients for each resolution, and includes them in the bitstream, and performs interpolation filtering on the reference picture. After the operation, reference pictures for each resolution may be generated and encoded. At this time, the filter coefficient of the 6-tap Winner filter at 1/2 resolution, the 8-tap Kalman filter at 1/4 resolution, the filter coefficient of the linear filter at 1/8 resolution are calculated, and the filter coefficients are encoded and included in the bitstream. The reference picture for each resolution can be interpolated and encoded. In this case, the inter prediction encoder 910 encodes using a reference picture interpolated by a 6-tap winner filter when the resolution of the current region or motion vector is 1/2 resolution, and interpolates by an 8-tap Kalman filter when 1/4 resolution. The encoded reference picture may be used.
해상도 변경 플래그 생성기(920)는 영상의 영역 또는 움직임 벡터마다 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 결정하는지 여부를 나타내는 해상도 변경 플래그를 생성하여 비트스트림에 포함시킬 수 있다. 해상도 변경 플래그에 의해서 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 변경하는 영역은 블록, 매크로블록, 블록을 묶은 그룹, 매크로블록을 묶은 그룹, MxN과 같이 임의의 크기를 가지는 영역 등이 될 수 있다. 즉, 해상도 변경 플래그 생성기(920)는 영상의 모든 영역 또는 일부 영역 내의 하위 영역들에 대해 고정된 움직임 벡터 해상도를 가지는 움직임 벡터를 이용하여 인터 예측 부호화할지 또는 영역(또는 움직임 벡터)마다 움직임 벡터 해상도를 결정하여 결정된 움직임 벡터 해상도를 가지는 움직임 벡터를 이용하여 인터 예측 부호화하고 고정된 해상도를 가지는 차분 움직임 벡터를 생성할지 여부를 나타내는 해상도 변경 플래그를 생성하여 비트스트림에 포함시킬 수 있다. 이러한 해상도 변경 플래그는 사용자에 의해 입력되는 설정 정보에 따라 결정되어 생성되거나 부호화할 영상을 분석하여 소정의 판단 기준에 따라 결정되어 생성될 수 있다. 이러한 해상도 변경 플래그는 비트스트림의 헤더에 포함될 수 있는데, 헤더는 픽처 파라미터 셋(Picture Parameter Set), 시퀀스 파라미터 셋(Sequence Parameter Set), 슬라이스 헤더(Slice Header) 등이 될 수 있다.The resolution change flag generator 920 may generate and include a resolution change flag indicating whether the motion vector resolution and / or the resolution of the differential motion vector is determined for each region or motion vector of the image. The area for changing the motion vector resolution and / or the resolution of the differential motion vector by the resolution change flag may be a block, a macroblock, a group grouping blocks, a group grouping macroblocks, or an area having an arbitrary size such as MxN. have. That is, the resolution change flag generator 920 inter-predictively encodes a motion vector having a fixed motion vector resolution for all regions or sub-regions of an image or motion vector resolution for each region (or motion vector). The inter prediction encoding may be performed using a motion vector having a determined motion vector resolution, and a resolution change flag indicating whether to generate a differential motion vector having a fixed resolution may be generated and included in the bitstream. The resolution change flag may be determined and generated according to setting information input by a user, or may be determined and generated according to a predetermined criterion by analyzing an image to be encoded. Such a resolution change flag may be included in a header of the bitstream. The header may be a picture parameter set, a sequence parameter set, a slice header, or the like.
해상도 변경 플래그 생성기(920)에 의해 생성되는 해상도 변경 플래그가 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 고정되는 것으로 나타내는 경우, 인터 예측 부호화기(910)는 헤더에서 정의된 하위 영역에 대해 고정되어 설정된 움직임 벡터 해상도를 가지는 각 영역의 움직임 벡터를 이용하여 각 영역을 인터 예측 부호화한다. 예를 들어, 어느 슬라이스의 슬라이스 헤더에 포함된 해상도 변경 플래그가 움직임 벡터 해상도가 고정되는 것을 나타내는 경우, 해당 슬라이스의 영상에 대해 율-왜곡 비용이 최소인 움직임 벡터 해상도를 결정하고 해당 슬라이스의 모든 영역에 대해서는 해당 움직임 벡터 해상도를 가지는 각 영역의 움직임 벡터를 이용하여 인터 예측 부호화할 수 있다.If the resolution change flag generated by the resolution change flag generator 920 indicates that the motion vector resolution and / or the resolution of the differential motion vector is fixed, the inter prediction encoder 910 is fixed for the subregion defined in the header. Inter-prediction encoding of each region is performed by using the motion vector of each region having a set motion vector resolution. For example, if the resolution change flag included in a slice header of a slice indicates that the motion vector resolution is fixed, the motion vector resolution having the least rate-distortion cost is determined for the image of the slice and all regions of the slice are determined. For, the inter prediction encoding may be performed using a motion vector of each region having a corresponding motion vector resolution.
또한, 해상도 변경 플래그가 영역 또는 움직임 벡터마다 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 적응적으로 변경되는 것으로 나타내는 경우, 인터 예측 부호화기(910)는 해상도 결정기(930)에 의해 결정되는 각 영역의 움직임 벡터 해상도를 가지는 각 영역의 움직임 벡터를 이용하여 각 영역을 인터 예측 부호화한다. 예를 들어, 어느 슬라이스의 슬라이스 헤더에 포함된 해상도 변경 플래그가 영역 또는 움직임 벡터마다 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 적응적으로 변경되는 것을 나타내는 경우, 해상도 결정기(910)에 의해 슬라이스 내의 각 영역에 대해 결정되는 움직임 벡터 해상도를 가지는 각 영역의 움직임 벡터를 이용하여 각 슬라이스 내의 영역을 인터 예측 부호화할 수 있다. 또 다른 예를 들면, 어느 슬라이스의 슬라이스 헤더에 포함된 해상도 변경 플래그가 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 움직임 벡터마다 적응적으로 변경되는 것을 나타내는 경우, 해상도 결정기(930)에 의해 슬라이스 내의 움직임 벡터마다 결정되는 움직임 벡터 해상도를 이용하여 인터 예측 부호화할 수 있다.In addition, when the resolution change flag indicates that the motion vector resolution and / or the resolution of the differential motion vector is adaptively changed for each region or motion vector, the inter prediction encoder 910 may determine each region determined by the resolution determiner 930. Each region is inter prediction encoded by using the motion vector of each region having a motion vector resolution of. For example, if the resolution change flag included in the slice header of a slice indicates that the motion vector resolution and / or the resolution of the differential motion vector is adaptively changed for each region or motion vector, the slice is determined by the resolution determiner 910. An area of each slice may be inter prediction encoded by using a motion vector of each area having a motion vector resolution determined for each area within. As another example, when the resolution change flag included in the slice header of a slice indicates that the motion vector resolution and / or the resolution of the differential motion vector are adaptively changed for each motion vector, the slice is determined by the resolution determiner 930. Inter prediction encoding may be performed using a motion vector resolution determined for each motion vector in the frame.
해상도 결정기(930)는 해상도 변경 플래그 생성기(920)에 의해 영역 또는 움직임 벡터마다 적응적으로 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 변경됨을 나타내는 플래그가 생성되는 경우, 영역 단위 또는 움직임 벡터 단위로 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 변경하면서 율-왜곡 비용(RD Cost: Rate-Distortion Cost) 등과 같은 소정의 비용 함수를 이용하여 최적의 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 결정한다. 여기서, 최적의 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도란 소정의 비용 함수를 이용하여 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 나타내는 것일 뿐, 이와 같이 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 항상 최적의 성능을 가진다는 것을 의미하는 것은 아니다. 소정의 비용 함수가 율-왜곡 비용인 경우에는 율-왜곡 비용이 최소가 되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 최적의 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 될 수 있다.When the resolution determiner 930 generates a flag indicating that the resolution of the motion vector resolution and / or the differential motion vector is adaptively changed for each area or motion vector by the resolution change flag generator 920, the resolution determiner 930 generates a unit of motion or unit of motion vector. Optimum motion vector resolution and / or differential motion vector resolution using some cost function, such as RD Cost (Rate-Distortion Cost) while changing the resolution of the motion vector resolution and / or differential motion vector. Determine. Here, the optimal motion vector resolution and / or the resolution of the differential motion vector only represent the motion vector resolution and / or the resolution of the differential motion vector determined using a predetermined cost function, and the motion vector resolution and / or are determined in this way. Or does not mean that the resolution of the differential motion vector always has optimal performance. When the predetermined cost function is the rate-distortion cost, the motion vector resolution and / or the resolution of the differential motion vector, where the rate-distortion cost is minimal, may be the optimal motion vector resolution and / or the resolution of the differential motion vector.
해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 부호화할 수 있다. 즉, 해상도 부호화기(940)는 해상도 결정기(930)에 의해 결정되는 각 영역의 움직임 벡터 해상도를 나타내는 움직임 벡터 해상도 식별 플래그 및/또는 차분 움직임 벡터의 해상도를 나타내는 차분 움직임 벡터의 해상도 식별 플래그를 부호화하여 비트스트림에 포함시킬 수 있다. 움직임 벡터 해상도 식별 플래그 및/또는 차분 움직임 벡터의 해상도 식별 플래그의 구현은 다양한 방식으로 가능하다. 여기서, 해상도 식별 플래그가 나타내는 해상도는 움직임 벡터 해상도 또는 차분 움직임 벡터의 해상도이거나 움직임 벡터 해상도와 차분 움직임 벡터의 해상도에 동시에 사용될 수도 있다.The resolution encoder 940 may encode a motion vector resolution and / or a resolution of a differential motion vector determined for each region or motion vector. That is, the resolution encoder 940 encodes a motion vector resolution identification flag indicating the motion vector resolution of each region determined by the resolution determiner 930 and / or a resolution identification flag of the differential motion vector indicating the resolution of the differential motion vector. It can be included in the bitstream. The implementation of the motion vector resolution identification flag and / or the resolution identification flag of the differential motion vector is possible in a variety of ways. Here, the resolution indicated by the resolution identification flag may be the resolution of the motion vector resolution or the differential motion vector, or may be used simultaneously for the motion vector resolution and the resolution of the differential motion vector.
차분 벡터 부호화기(950)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터와 예측 움직임 벡터(Predicted Motion Vector) 간의 차이인 차분 움직임 벡터를 부호화할 수 있다. 여기서 차분 움직임 벡터는 차분 움직임 벡터의 해상도에 따라 부호화될 수 있다.The differential vector encoder 950 may encode a differential motion vector that is a difference between a motion vector and a predicted motion vector according to a motion vector resolution determined for each region or motion vector. Here, the differential motion vector may be encoded according to the resolution of the differential motion vector.
움직임 벡터 해상도를 나타내는 해상도 식별 플래그는 움직임 벡터의 x 컴포넌트(Component)와 y 컴포넌트를 모두 나타내거나 각각의 해상도를 나타낼 수도 있다. 즉, 영상을 촬영하는 카메라가 이동하거나 영상 내의 물체가 이동하는 경우 등과 같은 때에는, 해상도 결정기(930)는 움직임 추정을 위한 움직임 벡터의 x 컴포넌트와 y 컴포넌트의 해상도를 서로 다르게 결정할 수 있다. 예를 들어, 해상도 결정기는 어느 영역의 움직임 벡터의 x 컴포넌트에 대해서는 1/8 화소 단위의 해상도로 결정하고, y 컴포넌트에 대해서는 1/2 화소 단위의 해상도로 결정할 수 있으며, 이에 따라 인터 예측 부호화기(910)는 해당 영역의 움직임 벡터에 대해서는 x 컴포넌트와 y 컴포넌트별로 다른 해상도로 움직임 벡터를 결정하고 결정된 움직임 벡터를 이용하여 움직임 추정 및 움직임 보상함으로써 해당 영역을 인터 예측 부호화할 수 있다.The resolution identification flag indicating the motion vector resolution may indicate both the x component and the y component of the motion vector or may indicate respective resolutions. That is, when the camera photographing the image moves or an object in the image moves, the resolution determiner 930 may determine different resolutions of the x component and the y component of the motion vector for motion estimation. For example, the resolution determiner may determine resolution of 1/8 pixel unit for the x component of a motion vector of a certain area and resolution of 1/2 pixel unit for the y component. The 910 may inter-prediction the corresponding region by determining a motion vector with different resolutions for each of the x component and the y component for the motion vector of the corresponding region, and using the determined motion vector to perform motion estimation and motion compensation.
도 22는 해상도 결정기(930)에서 움직임 벡터의 해상도를 결정하는 과정을 설명하기 위하여 주변 블록 및 현재블록의 최적 움직임 벡터를 예시한 도면이다.FIG. 22 is a diagram illustrating an optimal motion vector of a neighboring block and a current block in order to explain a process of determining the resolution of a motion vector in the resolution determiner 930.
해상도 변경 플래그 생성기(920)에 의해 영역 또는 움직임 벡터마다 적응적으로 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 변경됨을 나타내는 플래그가 생성되는 경우(제2 실시예에서는 해상도 지정 플래그 생성기(3220)가 생성하는 해상도 지정 플래그에 의해서 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도가 변경되는지 고정되는지 여부가 설정될 수 있음), 현재 블록 및 주변 블록의 해상도의 종류가 1/2, 1/4, 1/8이고 도 22와 같이 최적의 해상도가 결정된 경우를 가정한다. 이때, 블록 A의 해상도는 1/2이고 움직임 벡터는(4/2, -8/2)이고, 블록 B의 해상도는 1/4이고 움직임 벡터는 (36/4, -28/4)이고, 블록 C의 해상도는 1/8이고 움직임 벡터는 (136/8, -104/8)이고, 현재 블록 X의 해상도는 1/4이고 움직임 벡터는 (16/4, 20/4)이다. 이러한 경우 예측 움직임 벡터는 현재 움직임 벡터의 해상도에 따를 수 있다. 이러한 경우 예측 움직임 벡터를 계산하기 위해 주변 움직임 벡터의 해상도가 현재 움직임 벡터의 해상도와 동일해 지도록 해상도 변환 과정이 수행될 수 있다.When a flag indicating that the resolution of the motion vector resolution and / or the differential motion vector is changed by the resolution changing flag generator 920 adaptively for each region or motion vector (in the second embodiment, the resolution designation flag generator 3220) Can be set whether or not the motion vector resolution and / or the resolution of the differential motion vector are changed or fixed by the resolution designation flag generated by the controller), and the types of resolutions of the current block and neighboring blocks are 1/2, 1/4, Assume that 1/8 and the optimal resolution is determined as shown in FIG. In this case, the resolution of block A is 1/2 and the motion vector is (4/2, -8/2), the resolution of block B is 1/4 and the motion vector is (36/4, -28/4), The resolution of block C is 1/8 and the motion vector is (136/8, -104/8), the current block X is 1/4 and the motion vector is (16/4, 20/4). In this case, the predicted motion vector may depend on the resolution of the current motion vector. In this case, a resolution conversion process may be performed such that the resolution of the neighboring motion vector is the same as the resolution of the current motion vector to calculate the predicted motion vector.
도 23은 움직임 벡터 해상도에 따른 변환식을 도시한 도면이고, 도 24는 주변 블록의 움직임 벡터의 해상도를 현재 부호화 할 블록 X의 해상도로 변환한 표를 예시한 도면이다.FIG. 23 is a diagram illustrating a conversion equation according to a motion vector resolution, and FIG. 24 is a diagram illustrating a table obtained by converting a resolution of a motion vector of a neighboring block to a resolution of a block X to be currently encoded.
예측 움직임 벡터는 주변의 움직임 벡터를 이용해서 구할 수 있으며, 주변의 움직임 벡터가 각각의 해상도에 따라 저장되어 있다면 주변 움직임 벡터가 현재 움직임 벡터와 해상도가 다른 경우 곱셈, 나눗셈을 이용하여 변환할 수 있다. 또한 이러한 경우 해상도 변환 과정은 예측 움직임 벡터를 구할 때 수행할 수 있다. 또는 주변 움직임 벡터가 최고 해상도를 기준으로 저장되어 있다면 현재 움직임 벡터가 최고 해상도가 아닌 경우 나눗셈을 이용하여 변환할 수 있다. 또한 이러한 경우 해상도 변환 과정은 부호화된 움직임 벡터를 저장하는 경우 최고 해상도가 아닌 경우 최고 해상도로 변환하는 해상도 변환 과정을 수행할 수 있다. 또는 주변 움직임 벡터가 임의의 해상도를 기준으로 저장되어 있다면 현재 움직임 벡터가 주변 움직임 벡터들이 저장되어 있는 기준 해상도와 다른 경우 곱셈, 나눗셈을 이용하여 변환할 수 있다. 또한 이러한 경우 해상도 변환 과정은 부호화된 움직임 벡터를 저장하는 경우 움직임 벡터를 저장할 때 움직임 벡터의 해상도가 기준 해상도가 아닌 경우 기준 해상도로 변환하는 해상도 변환 과정을 수행할 수 있다. 나눗셈을 하는 경우, 반올림, 올림, 내림 등을 할 수 있으며, 도 23 및 도 24에 도시하듯이, 예시에서는 반올림을 사용한다. 또한 예시에서는 각각의 해상도에 따라 저장된 주변 움직임 벡터를 사용한다.The predicted motion vector can be obtained using the neighboring motion vectors. If the neighboring motion vectors are stored according to their resolutions, they can be converted using multiplication and division when the neighboring motion vectors are different from the current motion vectors. . In this case, the resolution conversion process may be performed when a prediction motion vector is obtained. Alternatively, if the neighboring motion vector is stored based on the highest resolution, the current motion vector may be converted using division if the current motion vector is not the highest resolution. In this case, the resolution conversion process may perform a resolution conversion process of converting the encoded motion vector to the highest resolution if it is not the highest resolution. Alternatively, if the peripheral motion vector is stored based on an arbitrary resolution, the current motion vector may be converted using multiplication and division when the current motion vector is different from the reference resolution in which the peripheral motion vectors are stored. In this case, the resolution conversion process may perform a resolution conversion process of converting the motion vector to the reference resolution when the motion vector resolution is not the reference resolution when the motion vector is stored. In the case of division, rounding, rounding, and rounding can be performed. As shown in Figs. 23 and 24, rounding is used in the example. In addition, the example uses a peripheral motion vector stored according to each resolution.
도 23의 표를 참조해서 예측 움직임 벡터를 구할 수 있다. 여기서 예측 움직임 벡터는 메디안(Median)을 이용하여 구할 수 있으며, 각각의 컴포넌트 별로 메디안을 구할 수 있다.A predicted motion vector can be obtained with reference to the table of FIG. 23. Here, the predicted motion vector can be obtained using median, and median can be obtained for each component.
MVPx = median(16/4, 36/4, 32/4) = 32/4MVPx = median (16/4, 36/4, 32/4) = 32/4
MVPy = median(-32/4, -28/4, -28/4) = -28/4MVPy = median (-32/4, -28/4, -28/4) = -28/4
따라서 예측 움직임 벡터는 (32/4, -28/7)이 된다. 이렇게 구한 예측 움직임 벡터를 이용해서 차분 움직임 벡터를 구한다. 차분 움직임 벡터는 수학식 3과 같이 움직임 벡터와 예측 움직임 벡터의 차이로 구할 수 있다.Thus, the predicted motion vector is (32/4, -28/7). The differential motion vector is obtained using the predicted motion vector thus obtained. The differential motion vector can be obtained by the difference between the motion vector and the predicted motion vector as shown in Equation (3).
수학식 3
Figure PCTKR2010005568-appb-M000003
Equation 3
Figure PCTKR2010005568-appb-M000003
따라서 차분 움직임 벡터는 (-16/4, 48/4) = (-4, 12)가 된다. Therefore, the differential motion vector is (-16/4, 48/4) = (-4, 12).
도 25는 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 도시한 도면이다.25 is a diagram illustrating a code number table of differential motion vectors according to motion vector resolution.
차분 벡터 부호화기(950)가 차분 움직임 벡터를 부호화 할 때는 도 25와 같은 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 이용하여 각 해상도별로 움직임 벡터값에 대하여 차분 움직임 벡터를 부호화 할 수 있다.When the differential vector encoder 950 encodes the differential motion vector, the differential motion vector may be encoded for each motion vector value by using the code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
또한 예측 움직임 벡터는 도 22의 예시를 이용하여 다음과 같이 구할 수도 있다. 여기서 주변의 움직임 벡터를 현재 해상도에 따라 변환하지 않고 각각의 컴포넌트 별로 메디안을 구할 수 있다.In addition, the prediction motion vector may be obtained as follows using the example of FIG. 22. Here, the median for each component can be obtained without converting the surrounding motion vector according to the current resolution.
MVPx = median(4/2, 36/4, 136/8) = 36/4MVPx = median (4/2, 36/4, 136/8) = 36/4
MVPy = median(-8/2, -28/4, -104/8) = -104/8MVPy = median (-8/2, -28/4, -104/8) = -104/8
따라서 예측 움직임 벡터는 (36/4, -104/8)이 된다. 이렇게 구한 예측 움직임 벡터를 이용해서 차분 움직임 벡터를 구한다. 차분 움직임 벡터는 수학식 4와 같이 움직임 벡터와 예측 움직임 벡터의 차이로 구할 수 있다.Thus, the predicted motion vector is (36/4, -104/8). The differential motion vector is obtained using the predicted motion vector thus obtained. The differential motion vector may be obtained as a difference between the motion vector and the predicted motion vector as shown in Equation 4.
수학식 4
Figure PCTKR2010005568-appb-M000004
Equation 4
Figure PCTKR2010005568-appb-M000004
따라서 차분 움직임 벡터는 (-20/4, 72/4) = (-5, 18)가 된다.Thus, the differential motion vector is (-20/4, 72/4) = (-5, 18).
차분 벡터 부호화기 (950)가 차분 움직임 벡터를 부호화 할 때는 도 25와 같은 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 이용하여 각 해상도 별로 움직임 벡터 값에 대하여 차분 움직임 벡터를 부호화 할 수 있다.When the differential vector encoder 950 encodes the differential motion vector, the differential motion vector may be encoded with respect to the motion vector value for each resolution by using a code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
또한 예측 움직임 벡터는 도 22의 예시를 이용하여 다음과 같이 구할 수도 있다. 여기서 주변의 움직임 벡터를 현재 해상도에 따라 변환하지 않고 각각의 컴포넌트 별로 메디안을 구한 뒤에 현재 해상도에 따라 변환할 수 있다.In addition, the prediction motion vector may be obtained as follows using the example of FIG. 22. Here, instead of converting the surrounding motion vector according to the current resolution, the median may be obtained for each component and then converted according to the current resolution.
MVPx = median(4/2, 36/4, 136/8) = 36/4MVPx = median (4/2, 36/4, 136/8) = 36/4
MVPy = median(-8/2, -28/4, -104/8) = -104/8MVPy = median (-8/2, -28/4, -104/8) = -104/8
따라서 예측 움직임 벡터는 도 23을 참조하여 (36/4, -52/4)이 된다. 이렇게 구한 예측 움직임 벡터를 이용해서 차분 움직임 벡터를 구한다. 차분 움직임 벡터는 수학식 5와 같이 움직임 벡터와 예측 움직임 벡터의 차이로 구할 수 있다.Therefore, the predicted motion vector becomes (36/4, -52/4) with reference to FIG. The differential motion vector is obtained using the predicted motion vector thus obtained. The differential motion vector may be obtained as a difference between the motion vector and the predicted motion vector as shown in Equation 5.
수학식 5
Figure PCTKR2010005568-appb-M000005
Equation 5
Figure PCTKR2010005568-appb-M000005
따라서 차분 움직임 벡터는 (-20/4, 72/4) = (-5, 18)가 된다.Thus, the differential motion vector is (-20/4, 72/4) = (-5, 18).
차분 벡터 부호화기 (950)가 차분 움직임 벡터를 부호화 할 때는 도 25와 같은 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 이용하여 각 해상도 별로 움직임 벡터 값에 대하여 차분 움직임 벡터를 부호화 할 수 있다.When the differential vector encoder 950 encodes the differential motion vector, the differential motion vector may be encoded with respect to the motion vector value for each resolution by using a code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
또한 예측 움직임 벡터는 도 22의 예시를 이용하여 다음과 같이 구할 수도 있다. 현재 움직임 벡터의 해상도와 동일한 주변의 움직임 벡터만으로 메디안을 구할 수도 있다. 도 22에서는 현재 움직임 벡터의 해상도와 동일한 주변 움직임 벡터는 블록 B 뿐이므로 예측 움직임 벡터는 (36/4, -28/4)이 된다. 이렇게 구한 예측 움직임 벡터를 이용해서 차분 움직임 벡터를 구한다. 차분 움직임 벡터는 수학식 6와 같이 움직임 벡터와 예측 움직임 벡터의 차이로 구할 수 있다.In addition, the prediction motion vector may be obtained as follows using the example of FIG. 22. The median may also be obtained by using only motion vectors around the same resolution as the current motion vector. In FIG. 22, since only the neighboring motion vector having the same resolution as the current motion vector is block B, the predicted motion vector becomes (36/4, -28/4). The differential motion vector is obtained using the predicted motion vector thus obtained. The differential motion vector may be obtained as a difference between the motion vector and the predicted motion vector as shown in Equation 6.
수학식 6
Figure PCTKR2010005568-appb-M000006
Equation 6
Figure PCTKR2010005568-appb-M000006
따라서 차분 움직임 벡터는 (-20/4, 48/4) = (-5, 12)가 된다.Thus, the differential motion vector is (-20/4, 48/4) = (-5, 12).
차분 벡터 부호화기 (950)가 차분 움직임 벡터를 부호화 할 때는 도 25와 같은 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 이용하여 각 해상도 별로 움직임 벡터 값에 대하여 차분 움직임 벡터를 부호화 할 수 있다.When the differential vector encoder 950 encodes the differential motion vector, the differential motion vector may be encoded with respect to the motion vector value for each resolution by using a code number table of the differential motion vector according to the motion vector resolution as shown in FIG. 25.
또한 주변 움직임 벡터가 1/8의 해상도를 기준으로 저장되어 있는 경우 예측 움직임 벡터는 도 22의 예시를 이용하여 다음과 같이 구할 수 있다. 도 23 및 도 24를 참조하면 예측 움직임 벡터는 (32/4, -28/4) 이 된다. 이렇게 구한 예측 움직임 벡터를 이용해서 차분 움직임 벡터를 구한다. 차분 움직임 벡터는 수학식 3과 같이 움직임 벡터와 예측 움직임 벡터의 차이로 구할 수 있다. 따라서 차분 움직임 벡터는 (-16/4, 48/4) = (-4, 12)가 된다.In addition, when the neighboring motion vector is stored based on the resolution of 1/8, the predicted motion vector may be obtained as follows using the example of FIG. 22. Referring to FIGS. 23 and 24, the predicted motion vectors are (32/4, -28/4). The differential motion vector is obtained using the predicted motion vector thus obtained. The differential motion vector can be obtained by the difference between the motion vector and the predicted motion vector as shown in Equation (3). Therefore, the differential motion vector is (-16/4, 48/4) = (-4, 12).
한편, 해상도 부호화기(940)는 헤더에 해상도 변경 플래그와 해상도의 종류를 부호화할 수 있으며(제2 실시예에서는 해상도 지정 플래그를 의미), 이때, 최적으로 결정된 해상도 식별 플래그를 1/4로 부호화하고, 차분 벡터 부호화기(950)는 해상도 결정기(930)에 의해 결정된 해상도에 따라 변환된 주변 움직임 벡터를 이용하여 계산된 예측 움직임 벡터를 이용하여 구한 차분 움직임 벡터를 부호화할 수 있다.Meanwhile, the resolution encoder 940 may encode the resolution change flag and the type of resolution in the header (meaning the resolution designation flag in the second embodiment), and at this time, the optimally determined resolution identification flag is encoded by 1/4. The differential vector encoder 950 may encode the differential motion vector obtained by using the predicted motion vector calculated using the peripheral motion vector converted according to the resolution determined by the resolution determiner 930.
도 26은 해상도 결정기(930)에서 차분 움직임 벡터의 해상도를 결정하는 과정을 설명하기 위하여 주변 블록 및 현재블록의 최적 움직임 벡터를 예시한 도면이다.FIG. 26 is a diagram illustrating an optimal motion vector of a neighboring block and a current block in order to explain a process of determining a resolution of a differential motion vector in the resolution determiner 930.
도 26에 도시한 바와 같이 주변 블록 및 현재 블록의 움직임벡터 해상도가 1/8인 경우 예측 움직임 벡터는 수학식 7과 같이 계산될 수 있다.As shown in FIG. 26, when the motion vector resolutions of the neighboring block and the current block are 1/8, the predicted motion vector may be calculated as shown in Equation 7 below.
수학식 7
Figure PCTKR2010005568-appb-M000007
Equation 7
Figure PCTKR2010005568-appb-M000007
따라서 PMV = (2/8, -2/8) = (1/4, -1/4)이 된다. 차분 움직임 벡터는 수학식 8과 같이 구할 수 있다.Thus PMV = (2/8, -2/8) = (1/4, -1/4). The differential motion vector can be obtained as shown in Equation (8).
수학식 8
Figure PCTKR2010005568-appb-M000008
Equation 8
Figure PCTKR2010005568-appb-M000008
따라서 차분 움직임 벡터 식별 플래그를 MVDx는 1/8로 부호화 하고, MVDy는 1/4로 부호화 할 수 있다.Therefore, the MVDx can be encoded with 1/8 and the MVDy can be encoded with 1/4.
도 27은 차분 움직임 벡터 해상도에 따른 차분 움직임 벡터 부호 번호 테이블을 예시한 도면이다.FIG. 27 is a diagram illustrating a differential motion vector code number table according to differential motion vector resolution.
도 27에 도시하듯이, 차분 움직임 벡터의 부호 번호 테이블에 따라 차분 움직임 벡터의 부호 번호는 (1, 1)이 된다. 따라서 해상도 부호화기(940)는 차분 움직임 벡터 해상도 식별 플래그를 (1/8, 1/4)로 x, y 컴포넌트 별로 부호화하고, 차분 움직임 벡터의 부호 번호는 (1, 1)으로 부호화 하고, 차분 움직임 벡터의 x, y 컴포넌트 별로 기호(sign)는 따로 부호화 할 수 있다.As shown in Fig. 27, the code numbers of the differential motion vectors become (1, 1) according to the code number table of the differential motion vectors. Therefore, the resolution encoder 940 encodes the differential motion vector resolution identification flag by (1/8, 1/4) for each of the x and y components, encodes the code number of the differential motion vector as (1, 1), and performs the differential motion. Signs can be separately encoded for x and y components of the vector.
한편, 차분 벡터 부호화기(950)가 차분 움직임 벡터를 부호화 하는 경우, 기준 해상도를 정하고, 기준 해상도가 아닌 해상도를 갖는 움직임 벡터는 기준 해상도를 갖는 움직임 벡터로 변환하고 주변 블록의 기준 움직임 벡터로부터 구한 기준 예측 움직임 벡터를 이용하여 차분 움직임 벡터를 산출한다. 만일, 움직임 벡터가 기준 해상도 이외의 해상도인 경우에는 기준 해상도 플래그를 추가로 부호화 하는 방법을 사용할 수 있다. 여기서 기준 해상도 플래그는 같은 기준 해상도와 같은 해상도인 여부를 나타내는 데이터와 실제 움직임 벡터의 위치를 나타내는 데이터를 포함할 수 있다.On the other hand, when the differential vector encoder 950 encodes a differential motion vector, a reference resolution is determined, and a motion vector having a resolution other than the reference resolution is converted into a motion vector having a reference resolution and obtained from a reference motion vector of a neighboring block. The differential motion vector is calculated using the predictive motion vector. If the motion vector has a resolution other than the reference resolution, a method of additionally encoding the reference resolution flag may be used. The reference resolution flag may include data indicating whether the resolution is the same as the same reference resolution and data indicating the position of the actual motion vector.
한편, 기준 해상도는 헤더에 정의할 수 있으며, 픽처 파라미터 셋(Picture Parameter Set), 시퀀스 파라미터 셋(Sequence Parameter Set), 슬라이스 헤더(Slice Header) 등이 될 수 있다.The reference resolution may be defined in a header, and may be a picture parameter set, a sequence parameter set, a slice header, or the like.
도 28은 현재 블록 X의 움직임 벡터와 주변 블록의 기준 움직임 벡터를 예시한 도면이다.28 is a diagram illustrating a motion vector of a current block X and a reference motion vector of a neighboring block.
해상도 변경 플래그(제2 실시예에서는 해상도 지정 플래그를 의미)가 단일 해상도가 아님을 나타내고, 해상도의 종류가 1/2, 1/4, 1/8이고 기준 해상도는 1/4이고 도 28과 같이 최적의 해상도가 결정된 경우에, 현재 블록의 움직임 벡터(4/8, 5/8)를 기준 해상도 1/4를 이용하여 기준 움직임 벡터(Ref_MV)로 수학식 9로 변환한다. Indicates that the resolution change flag (meaning the resolution designation flag in the second embodiment) is not a single resolution, the resolution type is 1/2, 1/4, 1/8, and the reference resolution is 1/4, as shown in FIG. When the optimal resolution is determined, the motion vectors 4/8 and 5/8 of the current block are converted into Equation 9 by the reference motion vector Ref_MV using the reference resolution 1/4.
수학식 9
Figure PCTKR2010005568-appb-M000009
Equation 9
Figure PCTKR2010005568-appb-M000009
현재 블록의 움직임 벡터의 해상도가 기준 움직임 벡터의 해상도와 다른 경우 곱셈, 나눗셈을 이용하여 변환할 수 있다. 나눗셈을 하는 경우, 반올림, 올림, 내림 등을 사용할 수 있으며, 본 실시예에서는 반올림을 사용한다. 따라서 기준 움직임 벡터는 (2/4, 3/4)이 되고, 기준 해상도 이외의 해상도를 갖는 실제 움직임 벡터의 위치는 기준 해상도 플래그로 나타낼 수 있다. 여기서, 현재 블록의 움직임 벡터와 기준 움직임 벡터와의 차이는 (0, 1/8)이며, 기준 해상도 플래그의 값은 예를 들어 (0, 1)과 같은 위치정보를 포함할 수 있다. 예시한 위치정보 (0, 1)에서 0은 기준 움직임 벡터와 움직임 벡터가 같음을 나타내고, 1은 기준 움직임 벡터에서 -1/8만큼 작은 움직임 벡터를 나타낸다.If the resolution of the motion vector of the current block is different from the resolution of the reference motion vector, it may be converted using multiplication and division. In the case of division, rounding, rounding, rounding, etc. can be used, and rounding is used in this embodiment. Accordingly, the reference motion vector becomes (2/4, 3/4), and the position of the actual motion vector having a resolution other than the reference resolution may be represented by the reference resolution flag. Here, the difference between the motion vector of the current block and the reference motion vector is (0, 1/8), and the value of the reference resolution flag may include location information such as (0, 1), for example. In the illustrated position information (0, 1), 0 indicates that the reference motion vector is the same as the motion vector, and 1 indicates the motion vector as small as -1/8 in the reference motion vector.
한편, 기준 움직임 벡터의 차분 벡터는 주변 블록의 기준 움직임 벡터의 중간(Median) 값인 예측 기준 움직임 벡터를 이용하여 계산한다. 예측 기준 움직임 벡터는 수학식 10으로 구할 수 있다.Meanwhile, the difference vector of the reference motion vector is calculated using the prediction reference motion vector, which is a median value of the reference motion vector of the neighboring block. The prediction reference motion vector can be obtained by using Equation 10.
수학식 10
Figure PCTKR2010005568-appb-M000010
Equation 10
Figure PCTKR2010005568-appb-M000010
따라서, 예측 기준 움직임 벡터(Ref_PMV)는(1, -1)이고 차분 기준 움직임 벡터(Ref_MVD)는 (Ref_MV(2/4, 3/4) - Ref_PMV(1, -1))을 적용하면 (-2/4, 7/4)가 된다. 따라서, 부호화기는 Ref_MVD(-2/4, 7/4)를 부호화 하고, 움직임 벡터의 위치를 나타내는 기준해상도 플래그 (0, 1)을 부호화 한다.Therefore, when the prediction reference motion vector (Ref_PMV) is (1, -1) and the differential reference motion vector (Ref_MVD) is (Ref_MV (2/4, 3/4)-Ref_PMV (1, -1)), 2/4, 7/4). Therefore, the encoder encodes Ref_MVD (-2/4, 7/4) and encodes a reference resolution flag (0, 1) indicating the position of the motion vector.
도 29는 차분 기준 움직임 벡터 해상도에 따른 차분 기준 움직임 벡터의 부호 번호 테이블을 예시한 도면이다.FIG. 29 is a diagram illustrating a code number table of a differential reference motion vector according to differential reference motion vector resolution.
따라서, 도 29를 참조하면 본 실시예에서처럼 기준 해상도가 1/4이고, 차분 기준 움직임 벡터의 값이 2/4인 경우에 부호 번호는 2가 되고 차분 기준 움직임 벡터의 값이 3/4인 경우에 부호 번호는 3이 되며, 차분 기준 움직임 벡터의 각 성분별 부호번호를 기준 해상도 플래그에 포함시킨다.Therefore, referring to FIG. 29, when the reference resolution is 1/4, the value of the differential reference motion vector is 2/4, and the code number is 2, and the value of the differential reference motion vector is 3/4 as in the present embodiment. The code number is 3, and the code number for each component of the differential reference motion vector is included in the reference resolution flag.
해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 다양하게 부호화할 수 있다. 이하에서는 도 10 내지 도 14를 통해 움직임 벡터 해상도 또는 차분 움직임 벡터의 해상도를 부호화하는 다양한 예에 대해 설명한다. 이하의 설명에서 움직임 벡터 해상도를 부호화하는 예만 설명하나 차분 움직임 벡터의 해상도도 움직임 벡터 해상도와 동일한 방법으로 부호화될 수 있으므로 차분 움직임 벡터의 해상도를 부호화 하는 예는 생략한다.The resolution encoder 940 may variously encode a motion vector resolution and / or a resolution of a differential motion vector determined for each region or motion vector. Hereinafter, various examples of encoding the motion vector resolution or the resolution of the differential motion vector will be described with reference to FIGS. 10 to 14. In the following description, only an example of encoding a motion vector resolution will be described. However, since the resolution of the differential motion vector may be encoded in the same manner as the motion vector resolution, an example of encoding the resolution of the differential motion vector is omitted.
해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 동일한 움직임 벡터 해상도를 가지는 인접 영역끼리 통합하여 상기 통합된 영역 단위로 해상도 식별 플래그를 생성할 수 있다. 예컨대, 쿼드 트리(Quadtree) 구조로 계층적으로 해상도 식별 플래그를 생성할 수 있다. 이때, 해상도 부호화기(940)는 쿼드 트리 계층의 최대 개수 및 쿼드 트리 계층의 최하위 노드가 가리키기는 영역 크기를 나타내는 식별자를 부호화여 비트스트림의 해당 영역에 대한 헤더에 포함시킬 수 있다.The resolution encoder 940 may integrate the motion vector resolution determined for each region or motion vector between adjacent regions having the same motion vector resolution and generate a resolution identification flag in units of the integrated region. For example, the resolution identification flag may be generated hierarchically in a quadtree structure. In this case, the resolution encoder 940 may encode an identifier indicating the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer in the header for the corresponding area of the bitstream.
도 10은 본 발명의 실시예에 따라 움직임 벡터 해상도를 쿼드 트리 구조로 계층적으로 표현한 예시도이다.10 is an exemplary diagram hierarchically expressing a motion vector resolution in a quad tree structure according to an embodiment of the present invention.
10A는 하나의 픽처 내에서 여러 움직임 벡터 해상도를 가지는 영역들을 나타낸 것이다. 10A에서 각 영역들은 16X16 크기의 매크로블록들일 수 있으며, 각 영역 내에 표시된 숫자는 각 영역의 움직임 벡터 해상도를 나타낸다. 10B는 10A에 나타낸 각 영역 중 동일한 움직임 벡터 해상도를 가지는 영역끼리 묶어 나타낸 것이다. 10C는 10B와 같이 묶여진 영역들의 움직임 벡터 해상도를 쿼드 트리 구조로 계층적으로 나타낸 것이다. 10C에서, 최하위 노드가 가리키는 영역의 크기는 16X16 크기의 매크로블록이고 쿼드 트리의 계층의 최대 개수는 4이므로, 이와 같은 정보는 부호화되어 해당 영역에 대한 헤더에 포함된다.10A shows regions having various motion vector resolutions in one picture. Each region in 10A may be macroblocks of size 16 × 16, and the number indicated in each region represents the motion vector resolution of each region. 10B is a group showing regions having the same motion vector resolution among the regions shown in 10A. 10C is a hierarchical representation of the motion vector resolution of regions bounded by 10B in a quad tree structure. In 10C, since the size of the region indicated by the lowest node is a 16 × 16 macroblock and the maximum number of hierarchies in the quad tree is 4, such information is encoded and included in the header for the region.
도 11은 본 발명의 실시예에 따라 쿼드 트리 구조로 계층적으로 표현된 움직임 벡터 해상도가 부호화된 결과를 나타낸 예시도이다.FIG. 11 is an exemplary diagram illustrating a result of encoding a motion vector resolution expressed hierarchically in a quad tree structure according to an embodiment of the present invention. FIG.
10C에 나타낸 쿼드 드리 구조의 움직임 벡터 해상도를 부호화하면 도 11에 도시한 바와 같은 최종 비트를 얻을 수 있다. 노드가 분할되었는지 여부를 하나의 비트로 부호화하는데, 예를 들어 비트값이 '1'인 경우에는 해당 노드가 하위 계층으로 분할되었음을 나타내고 비트값이 '0'인 경우에는 해당 노드가 하위 계층으로 분할되지 않았음을 나타낸다.By encoding the motion vector resolution of the quadree structure shown in 10C, the final bit as shown in Fig. 11 can be obtained. Encodes whether a node is divided into one bit. For example, if the bit value is '1', the node is divided into lower layers. If the bit value is '0', the node is not split into lower layers. It is not shown.
10C에서, 레벨 0의 노드에 대해서는 하위 계층으로 분할되었으므로 비트값 '1'로 부호화한다. 분할된 레벨 1의 첫 번째 노드는 1/2 해상도로 더 이상 분할되지 않았으므로 비트값 '0'으로 부호화하고 움직임 벡터 해상도 1/2을 부호화한다. 레벨 1의 두 번째 노드는 하위 계층으로 분할되었으므로 비트값 '1'로 부호화한다. 레벨 1의 세 번재 노드는 하위 계층으로 분할되지 않았으므로 비트값 '0'으로 부호화하고 움직임 벡터 해상도 1/4을 부호화한다. 레벨 1의 마지막 네 번째 노드는 하위 계층으로 분할되었으므로 비트값 '1'로 부호화한다. 같은 방식으로 레벨 2의 각 노드들을 부호화하고, 레벨 3에서는 헤더에서 최대 계층의 개수가 3 개로 지정되었으므로 더 이상의 하위 계층은 없음을 알 수 있으므로 각 움직임 벡터 해상도만을 부호화한다. 이와 같이 10A에 나타낸 영역에 대한 움직임 벡터 해상도가 쿼드 트리 구조로 계층적으로 부호화된 최종 비트는 도 11에 나타낸 바와 같이 생성될 수 있다.At 10C, the node at level 0 is divided into lower layers, so that it is encoded with bit value '1'. Since the first node of the divided level 1 is no longer divided into 1/2 resolutions, the first node is encoded with a bit value '0' and the motion vector resolution 1/2 is encoded. Since the second node of level 1 is divided into lower layers, it is encoded with bit value '1'. Since the third node of level 1 is not divided into lower layers, the third node is encoded with bit value '0' and the motion vector resolution 1/4 is encoded. Since the last fourth node of level 1 has been divided into lower layers, it is encoded with bit value '1'. In the same way, each node of level 2 is encoded. Since the maximum number of layers is designated as 3 in the header at level 3, since there are no lower layers, only motion vector resolution is encoded. Thus, the final bit hierarchically encoded with the quadtree structure of the motion vector resolution for the region shown in 10A may be generated as shown in FIG. 11.
최종 비트에 나타낸 1/2, 1/4, 1/8과 같은 움직임 벡터 해상도는 그를 나타내는 비트로 부호화된 것을 의미하지만, 설명의 편의를 위해 비트값으로 나타내지는 않았다. 움직임 벡터 해상도는 구현 방식에 따라 다양한 방법으로 비트값으로 표현될 수 있다. 예컨데, 사용가능한 움직임 벡터 해상도가 2가지이면 1비트 플래그로 지시될 수 있고, 사용가능한 움직임 벡터 해상도가 4가지 이하이면 2비트 플래그로 나타낼 수 있다.Motion vector resolutions such as 1/2, 1/4, and 1/8 shown in the last bit mean that they are encoded with bits representing them, but are not represented as bit values for convenience of description. The motion vector resolution may be expressed as a bit value in various ways depending on the implementation manner. For example, if the available motion vector resolution is two, it may be indicated by a 1-bit flag. If the available motion vector resolution is four or less, it may be indicated by a 2-bit flag.
만약 슬라이스 헤더에 최대 계층의 개수와 최하위 노드가 가리키는 영역의 크기가 지정되었다면, 이와 같이 생성된 해상도 식별 플래그는 슬라이스 데이터의 필드에 포함될 수 있다. 후술할 영상 복호화 장치에서는 비트스트림에서 해상도 식별 플래그를 추출하고 복호화하여 각 영역의 움직임 벡터 해상도를 복원할 수 있다.If the number of maximum layers and the size of the region indicated by the lowest node are specified in the slice header, the resolution identification flag generated as described above may be included in the field of the slice data. The image decoding apparatus to be described later may extract and decode the resolution identification flag from the bitstream to restore the motion vector resolution of each region.
또한, 도 10을 통해 나타낸 예시에서는, 노드가 하위 계층으로 분할되었음(즉, 4개의 구역으로 분할됨) 또는 분할되지 않았음의 두 가지만 예를 들었으나, 도 20에 도시한 바와 같이, 하위 계층으로 분할되지 않았음, 가로로 긴 두 개의 영역으로 나누어짐, 세로로 긴 두 개의 영역으로 나누어짐, 4 개의 구역으로 나누어짐과 같이 다양한 방식으로 노드를 하위 계층으로 분할할 수 있다.In addition, in the example illustrated in FIG. 10, only two examples of the node being divided into lower layers (that is, divided into four zones) or not divided are illustrated. However, as shown in FIG. 20, the lower layer is illustrated. Nodes can be subdivided into lower layers in various ways, such as not divided into two regions, divided into two horizontally long regions, divided into two vertically long regions, and divided into four regions.
또한, 해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 부호화하여 해상도 식별 플래그를 생성할 수 있다. 예를 들어, 영역이 64X64 크기의 블록이라고 가정하면, 해당 영역의 움직임 벡터 해상도는 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도를 이용하여 예측될 수 있다. 이와 같이 예측된 해당 영역의 움직임 벡터 해상도, 즉, 해상도 부호화기(940)는 예측 움직임 벡터 해상도가 해당 영역의 움직임 벡터 해상도와 동일한 경우에는 해당 영역에 대한 해상도 식별 플래그를 비트값 '1'로 부호화하고, 해당 영역의 예측 움직임 벡터 해상도와 움직임 벡터 해상도가 동일하지 않은 경우에는 해당 영역에 대한 해상도 식별 플래그를 비트값 '0'과 해당 영역의 움직임 벡터 해상도를 나타내는 비트값으로 부호화할 수 있다. 예를 들어, 해당 영역의 위쪽 영역과 왼쪽 영역의 해상도가 각각 1/2 해상도이고 해당 영역의 해상도도 1/2 해상도인 경우 해당 영역에 대한 해상도 식별 플래그를 비트값 '1'로 부호화하고 해당 영역의 움직임 벡터 해상도는 부호화하지 않고, 해당 영역의 위쪽 영역과 왼쪽 영역의 해상도가 각각 1/2 해상도이고 해당 영역의 해상도가 1/4 해상도인 경우 해당 영역에 대한 해상도 식별 플래그를 비트값 '0'로 부호화하고 해당 영역의 움직임 벡터 해상도를 추가적으로 부호화할 수 있다.In addition, the resolution encoder 940 may generate a resolution identification flag by encoding the motion vector resolution determined for each region or motion vector using the motion vector resolution predicted using the motion vector resolution of the peripheral region of each region. For example, assuming that an area is a block of size 64 × 64, the motion vector resolution of the corresponding area may be estimated using the motion vector resolutions of the left area and the upper area of the area. In this case, when the predicted motion vector resolution is the same as the motion vector resolution of the corresponding region, the resolution encoder 940 encodes the resolution identification flag for the corresponding region as a bit value '1'. When the predicted motion vector resolution and the motion vector resolution of the corresponding area are not the same, the resolution identification flag for the corresponding area may be encoded into a bit value '0' and a bit value representing the motion vector resolution of the corresponding area. For example, if the resolution of the upper region and the left region of the region is 1/2 resolution and the resolution of the region is also 1/2 resolution, the resolution identification flag for the region is encoded with the bit value '1' and the region If the resolution of the motion vector is not encoded and the resolution of the upper and left regions of the region is 1/2 resolution and the resolution of the region is 1/4 resolution, the resolution identification flag for the region is set to the bit value '0'. Can be encoded and additionally encoded the motion vector resolution of the region.
또한, 해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역 또는 움직임 벡터의 움직임 벡터 해상도의 런(Run)과 길이(Length)를 이용하여 부호화하여 해상도 식별 플래그를 생성할 수 있다.In addition, the resolution encoder 940 may generate a resolution identification flag by encoding the motion vector resolution determined for each region or motion vector by using the run and length of the motion vector resolution of each region or motion vector. have.
도 12는 본 발명의 실시예에 따라 결정된 영역의 움직임 벡터 해상도를 나타낸 예시도이다.12 is an exemplary diagram illustrating a motion vector resolution of a region determined according to an embodiment of the present invention.
도 12에서는 하나의 픽처 내에 영역들을 16X16 크기의 매크로블록으로 나타내고, 각 영역들의 움직임 벡터 해상도를 각 영역 내에 나타내었다. 도 12에 도시한 영역들의 움직임 벡터 해상도를 런과 길이를 이용하여 부호화하는 것을 예를 들면, 도 12에 도시한 영역들의 움직임 벡터 해상도를 래스터 스캔 방향으로 나열하면, 1/2의 움직임 벡터 해상도가 4번 연속으로 나오고, 1/4의 움직임 벡터 해상도가 1번 나오며, 1/8의 움직임 벡터 해상도가 2 번 연속으로 나오며, 1/2의 움직임 벡터 해상도가 4번 연속으로 나오므로(이후의 움직임 벡터 해상도는 생략함), 각 영역의 움직임 벡터 해상도를 런과 길이로 표현하면, (½, 4), (¼, 1), (⅛, 2), (½, 4), … 와 같이 표현될 수 있다. 따라서, 해상도 부호화기(940)는 런과 길이로 표현된 각 영역의 움직임 벡터 해상도를 부호화하여 비트값으로 표현함으로써 해상도 식별 플래그를 생성할 수 있다.In FIG. 12, regions in one picture are represented by macroblocks having a size of 16 × 16, and motion vector resolutions of the regions are illustrated in each region. For example, the motion vector resolution of the regions shown in FIG. 12 is encoded using a run and a length. For example, when the motion vector resolutions of the regions shown in FIG. 12 are arranged in the raster scan direction, a motion vector resolution of 1/2 is obtained. 4 times in succession, 1/4 motion vector resolution comes out 1 time, 1/8 motion vector resolution comes out 2 times in succession, 1/2 motion vector resolution comes out 4 times in succession (after motion Vector resolution is omitted), when the motion vector resolution of each region is expressed by the run and length, (½, 4), (¼, 1), (⅛, 2), (½, 4),... It can be expressed as Accordingly, the resolution encoder 940 may generate a resolution identification flag by encoding the motion vector resolution of each region represented by the run and the length by representing the bit value.
또한, 해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 태그 트리를 이용하여 계층적으로 부호화하여 해상도 식별 플래그를 생성할 수 있다. 이때, 해상도 부호화기(940)는 태그 트리의 계층의 최대 개수 및 최하위 노드가 가리키는 영역의 크기를 나타내는 식별자를 헤더에 포함시킬 수 있다.In addition, the resolution encoder 940 may generate a resolution identification flag by hierarchically encoding a motion vector resolution determined for each region or motion vector using a tag tree. In this case, the resolution encoder 940 may include an identifier indicating the maximum number of hierarchies of the tag tree and the size of the region indicated by the lowest node in the header.
도 13은 본 발명의 실시예에 따라 움직임 벡터 해상도를 태그 트리 구조로 계층적으로 표현한 예시도이다.13 is an exemplary diagram hierarchically expressing a motion vector resolution in a tag tree structure according to an embodiment of the present invention.
도 13은 영상의 일부 영역 내의 각 영역마다 결정된 움직임 벡터 해상도를 태그 트리 구조로 계층적으로 나타낸 것이다. 여기서, 각 영역은 16X16 크기의 매크로블록이라고 가정한다.FIG. 13 hierarchically shows a motion vector resolution determined for each region within a portion of an image in a tag tree structure. Here, it is assumed that each region is a macroblock of size 16 × 16.
도 13에서, 레벨 3의 첫 번째 4 개의 영역의 움직임 벡터 해상도 중 최소값은 1/2이므로 레벨 2의 첫 번째 영역의 움직임 벡터 해상도는 1/2이 된다. 이러한 방법으로 영역들을 계층의 개수만큼 계층적으로 묶은 다음, 각 상위의 계층에서 하위 계층으로 부호 비트를 생성하여 부호화한다.In FIG. 13, since the minimum value of the motion vector resolutions of the first four regions of level 3 is 1/2, the motion vector resolution of the first region of level 2 is 1/2. In this way, regions are hierarchically grouped by the number of layers, and then code bits are generated and encoded from the upper layer to the lower layer.
도 14는 본 발명의 실시예에 따라 태그 트리 구조로 계층적으로 표현된 움직임 벡터 해상도를 부호화한 결과를 나타낸 예시도이다.14 is an exemplary diagram illustrating a result of encoding a motion vector resolution expressed hierarchically expressed in a tag tree structure according to an embodiment of the present invention.
부호 비트를 생성하는 방법은 상위 계층과 현재 계층의 움직임 벡터 해상도의 번호의 차이를 '0'의 연속으로 표현한 후 마지막 비트의 비트값을 '1'로 표현한다. 여기서, 최상위 계층의 경우에는 상위 계층의 움직임 벡터 해상도의 번호를 '0', 1/2의 움직임 벡터 해상도의 번호를 '1', 1/4의 움직임 벡터 해상도의 번호를 '2', 1/8의 움직임 벡터 해상도의 번호를 '3'으로 각각 가정하고, 도 13과 같은 영역들의 움직임 벡터 해상도를 태그 트리 구조로 계층적으로 부호화하면 도 14와 같이 해상도 식별 플래그가 생성될 수 있다. 여기서, 각 움직임 벡터 해상도에 부여된 번호는 변경될 수 있다. In the method for generating the sign bit, the difference between the number of motion vector resolutions of the upper layer and the current layer is expressed as a sequence of '0', and the bit value of the last bit is expressed as '1'. In the case of the uppermost layer, the motion vector resolution number of the upper layer is '0', the motion vector resolution number of 1/2 is '1', and the motion vector resolution number of 1/4 is '2', 1 / Assume that the number of motion vector resolutions of 8 is '3', and if the motion vector resolutions of the regions shown in FIG. 13 are hierarchically encoded in a tag tree structure, a resolution identification flag may be generated as shown in FIG. 14. Here, the number assigned to each motion vector resolution may be changed.
도 14에서, 각 영역에 표현된 (0,0), (0,1) 등은 각 영역을 식별하기 위한 참조 부호이고, '0111', '01' 등은 각 영역의 움직임 벡터 해상도가 부호화된 해상도 식별 플래그의 비트값을 나타낸다.In FIG. 14, (0,0), (0,1), etc., expressed in each region are reference marks for identifying each region, and '0111', '01', etc., are encoded with motion vector resolution of each region. Indicates the bit value of the resolution identification flag.
(0,0)으로 식별되는 영역의 해상도 식별 플래그의 경우를 살펴보면, 레벨 0에서 상위 계층의 움직임 벡터 해상도의 번호는 '0'이고 레벨 1에서 1/2의 움직임 벡터 해상도의 번호는 '1'이므로, 레벨 1과 레벨 0의 번호의 차이값은 '1'이 되고 '1'을 부호화 비트로 변환하면 '01'이 된다. 다시 레벨 1에서 상위 계층(레벨 0)과의 움직임 벡터 해상도의 번호의 차이값은 '0'이 되므로 부호화 비트는 '1'이 된다. 다시 레벨 2에서 상위 계층(레벨 1)과의 움직임 벡터 해상도의 번호의 차이값은 '0'이 되므로 부호화 비트는 '1'이 된다. 다시 레벨 3에서 상위 계층(레벨 2)과의 움직임 벡터 해상도의 번호의 차이값은 '0'이 되므로 부호화 비트는 '1'이 되어, 최종적으로 (0,0)으로 식별되는 영역의 움직임 벡터 해상도의 부호화 비트는 '0111'이 된다.In the case of the resolution identification flag of the region identified by (0,0), the motion vector resolution number of the upper layer at level 0 is '0' and the motion vector resolution number at 1/2 is number '1'. Therefore, the difference between the number of level 1 and level 0 is '1', and when '1' is converted into coded bits, it is '01'. In addition, since the difference value of the number of motion vector resolutions from the level 1 to the higher layer (level 0) becomes '0', the encoding bit becomes '1'. In addition, since the difference value of the number of the motion vector resolution with respect to the upper layer (level 1) at level 2 becomes '0', the encoding bit becomes '1'. Again, at level 3, the difference value of the number of the motion vector resolution with the higher layer (level 2) becomes '0', so the encoding bit becomes '1', and finally the motion vector resolution of the region identified by (0,0). The coded bit of becomes '0111'.
(0,1)로 식별되는 영역의 해상도 식별 플래그의 경우를 살펴보면, 레벨 0, 레벨 1과 레벨 2는 (0,0)으로 식별되는 영역의 해상도 식별 플래그에 이미 반영되어 있으므로, 레벨 3에서 상위 계층(레벨 2)과의 움직임 벡터 해상도의 번호의 차이값인 '1'을 부호화하면 되고 그에 따른 부호화 비트는 '01'이 된다. 따라서, (0,1)로 식별되는 영역에서는 '01'만이 해당 영역의 해상도 식별 플래그로서 생성된다.Looking at the case of the resolution identification flag of the area identified by (0,1), level 0, level 1, and level 2 are already reflected in the resolution identification flag of the area identified by (0,0), so they are higher in level 3. '1', which is a difference value of the number of motion vector resolutions with respect to the layer (level 2), may be encoded, and the corresponding encoding bit becomes '01'. Therefore, in the region identified by (0, 1), only '01' is generated as the resolution identification flag of the region.
(0,4)로 식별되는 영역의 해상도 식별 플래그의 경우를 살펴보면, 레벨 0은 (0,0)으로 식별되는 영역의 해상도 식별 플래그에 이미 반영되어 있으므로, 전술한 방법과 같은 방법으로 레벨 1, 레벨 2와 레벨 3만을 부호화하여 부호화 비트는 '0111'이 된다.Looking at the case of the resolution identification flag of the region identified by (0,4), level 0 is already reflected in the resolution identification flag of the region identified by (0,0), so that the level 1, By encoding only level 2 and level 3, the coded bit becomes '0111'.
또한, 해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도의 빈도수에 따라 움직임 벡터 해상도에 할당되는 비트수를 변경하여 부호화하여 해상도 식별 플래그를 생성할 수 있다. 이를 위해, 해상도 부호화기(940)는 영역 단위로 직전 영역까지의 움직임 벡터 해상도의 발생 빈도수에 따라 해당 영역의 움직임 벡터 해상도에 할당하는 비트수를 변경하여 부호화할 수도 있고, 복수 개의 영역들을 포함하는 부분 영역 단위로 직전 부분 영역의 움직임 벡터 해상도의 발생 빈도수 또는 직전 부분 영역까지의 움직임 벡터 해상도의 발생 빈도수에 따라 해당 부분 영역의 움직임 벡터 해상도에 할당하는 비트수를 변경하여 부호화할 수도 있다. 이를 위해, 해상도 부호화기(940)는 영역 단위 또는 부분 영역 단위로 움직임 벡터 해상도의 빈도수를 계산하고, 계산된 움직임 벡터 해상도의 빈도수가 큰 순서대로 작은 번호를 할당하며, 할당된 작은 번호의 움직임 벡터 해상도에 작은 비트수를 할당하여 각 영역의 움직임 벡터 해상도를 부호화할 수 있다.In addition, the resolution encoder 940 may generate a resolution identification flag by changing and encoding the number of bits allocated to the motion vector resolution according to the frequency of the motion vector resolution determined for each region or motion vector. To this end, the resolution encoder 940 may change and encode the number of bits allocated to the motion vector resolution of the corresponding area according to the frequency of occurrence of the motion vector resolution up to the immediately preceding area in units of areas, or include a plurality of areas. The number of bits allocated to the motion vector resolution of the partial region may be encoded according to the frequency of occurrence of the motion vector resolution of the immediately preceding partial region or the frequency of occurrence of the motion vector resolution to the immediately preceding partial region on an area basis. To this end, the resolution encoder 940 calculates the frequency of the motion vector resolution in units of regions or partial regions, assigns small numbers in order of increasing frequency of the calculated motion vector resolution, and assigns the small numbers of motion vector resolutions. A small number of bits can be allocated to encode the motion vector resolution of each region.
예를 들어, 해상도 부호화기(940)는 영역 단위로 직전 영역까지의 움직임 벡터 해상도의 발생 빈도수에 따라 비트수를 변경하는 경우에는, 직전 영역까지의 모든 영역에서 1/2의 움직임 벡터 해상도가 10번 발생되었고, 1/4의 움직임 벡터 해상도가 15번 발생되었고, 1/8의 움직임 벡터 해상도가 8번 발생되었다면, 1/4의 움직임 벡터 해상도에 가장 작은 번호(예를 들어, 1번)를 부여하고, 1/2의 움직임 벡터 해상도에 그 다음 작은 번호(예를 들어, 2번)를 부여하고, 1/8의 움직임 벡터 해상도에 제일 큰 번호(예를 들어, 3번)을 부여한 후, 작은 번호 순서대로 작은 비트를 할당한 후, 움직임 벡터 해상도를 부호화하고자 하는 영역의 움직임 벡터 해상도가 1/4 화소 단위라면, 가장 작은 비트를 할당하여 해당 영역에 대해 1/4의 움직임 벡터 해상도를 부호화할 수 있다.For example, when the resolution encoder 940 changes the number of bits according to the frequency of occurrence of the motion vector resolution up to the previous region in the area unit, the motion vector resolution of 1/2 is 10 times in all the regions up to the previous region. Is generated, 1/4 motion vector resolution is generated 15 times, and 1/8 motion vector resolution is generated 8 times, the smallest number (e.g., 1) is assigned to 1/4 motion vector resolution. Assign the next smaller number (e.g., 2) to 1/2 motion vector resolution, give the largest number (e.g. 3) to 1/8 motion vector resolution, After allocating small bits in numerical order, if the motion vector resolution of the region to be encoded with motion vector resolution is 1/4 pixel unit, the smallest bit is allocated to encode 1/4 motion vector resolution for the region. Can be.
또한, 해상도 부호화기(940)는 영역 그룹 단위마다 이전까지의 영역 그룹의 움직임 벡터 해상도의 발생 빈도수에 따라 비트수를 변경하여 부호화하는 경우에는, 이전까지의 영역 그룹의 각 영역들의 움직임 벡터 해상도의 발생 빈도수를 업데이트하여 발생 빈도수가 큰 순서대로 작은 번호를 할당하고 작은 번호 순서대로 작은 비트수를 할당하여 움직임 벡터 해상도를 부호화하고자 하는 영역 그룹의 각 영역의 움직임 벡터 해상도를 부호화할 수 있다. 영역 그룹은 쿼드 트리, 쿼드 트리 묶음, 태그 트리, 태그 트리 묶음, 매크로블록, 매크로블록 묶음, 임의의 크기의 영역이 될 수 있다. 예를 들면, 영역 그룹을 매크로블록 2 개로 지정한 경우, 매크로블록 2 개마다 움직임 벡터 해상도의 발생 빈도수를 업데이트하여 움직임 벡터 해상도의 비트수를 할당하거나, 영역 그룹을 쿼드 트리 4 개로 지정한 경우, 쿼드 트리 4 개마다 움직임 벡터 해상도의 발생 빈도수를 업데이트하여 움직임 벡터 해상도의 비트수를 할당한다.In addition, when the resolution encoder 940 changes the number of bits according to the frequency of occurrence of the motion vector resolution of the previous region group for each region group unit, the resolution encoder 940 generates the motion vector resolution of each region of the previous region group. The frequency vector may be updated to allocate small numbers in order of occurrence frequency and to allocate small bits in order of number order to encode motion vector resolution of each region of the region group to be encoded. An area group may be a quad tree, a quad tree bundle, a tag tree, a tag tree bundle, a macroblock, a macroblock bundle, and an area of any size. For example, if two macroblocks are designated as two macroblocks, the frequency of occurrence of the motion vector resolution is updated by every two macroblocks, and the number of bits of the motion vector resolution is assigned, or if four region groups are designated as quadtrees. The frequency of occurrence of the motion vector resolution is updated every four to allocate the number of bits of the motion vector resolution.
또한, 해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 부호화 방법을 달리할 수 있다. 즉, 주위 영역 또는 영역 그룹의 움직임 벡터 해상도의 분포에 따라 해당 영역의 해상도가 될 확률이 가장 높은 해상도에 가장 짧은 비트수가 할당된다. 예를 들면, 해당 영역의 왼쪽 영역의 움직임 벡터 해상도가 1/2이고 위쪽 영역의 움직임 벡터 해상도가 1/2인 경우, 해당 영역의 움직임 벡터 해상도는 1/2이 될 확률이 가능 높으므로 1/2 움직임 벡터 해상도에 가장 짧은 비트수가 할당되어 부호화된다. 또 다른 예로, 해당 영역의 왼쪽 영역의 움직임 벡터 해상도가 1/4이고 왼쪽위 영역의 움직임 벡터 해상도가 1/2이고 위쪽 영역의 움직임 벡터 해상도가 1/2이고 오른쪽위 영역의 움직임 벡터 해상도가 1/2인 경우, 해당 영역의 움직임 벡터 해상도의 확률을 1/2, 1/4, 1/8 등의 순서와 같이 확률이 높은 순으로 짧은 비트수가 할당되어 부호화된다.In addition, the resolution encoder 940 may change the encoding method of the resolution identification flag according to the distribution of the motion vector resolutions of the surrounding areas of each region based on the motion vector resolution determined for each region or motion vector. That is, the shortest number of bits is allocated to the resolution having the highest probability of being the resolution of the corresponding area according to the distribution of the motion vector resolution of the surrounding area or the area group. For example, if the motion vector resolution of the left region of the region is 1/2 and the motion vector resolution of the upper region is 1/2, the motion vector resolution of the region is likely to be 1/2, so 1 / The shortest number of bits is allocated to two motion vector resolutions and encoded. As another example, the motion vector resolution of the left region of the region is 1/4, the motion vector resolution of the upper region is 1/2, the motion vector resolution of the upper region is 1/2 and the motion vector resolution of the upper right region is 1 In the case of / 2, the number of short bits is allocated and encoded in the order of the highest probability, such as the order of 1/2, 1/4, 1/8, etc., of the motion vector resolution of the corresponding region.
또한, 해상도 부호화기(940)는 산술 부호화로 엔트로피 부호화할 때, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 이진화 비트열의 생성 방법을 달리하고, 확률 모델도 주위 영역의 움직임 벡터 해상도의 분포 및 현재까지 발생한 움직임 벡터 해상도의 확률에 따라 달리 적용하여 산술 부호화 및 확률 업데이트를 수행한다. 또한, 비트의 위치에 따라 각기 다른 확률 모델을 사용하여 산술 부호화 및 확률 업데이트를 수행한다.Further, when entropy encoding by arithmetic coding, the resolution encoder 940 generates a binary coded bit string of the resolution identification flag based on the distribution of the motion vector resolution determined for each region or motion vector according to the distribution of the motion vector resolution of the surrounding region of each region. In addition, the arithmetic coding and the probability update are performed by applying the probability model differently according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution which has occurred up to now. In addition, arithmetic coding and probability updating are performed using different probability models according to bit positions.
도 21을 참조하여 예를 들면, CABAC으로 엔트로피 부호화하고 부호화에 사용되는 움직임 벡터 해상도가 1/2, 1/4, 1/8과 같은 3 개의 움직임 벡터 해상도만 사용한다고 가정할 때, 해당 영역의 왼쪽 영역의 움직임 벡터 해상도가 1/2이고 해당 영역의 위쪽 영역의 움직임 벡터 해상도가 1/2인 경우, 1/2 움직임 벡터 해상도에 가장 짧은 이진화 비트열를 할당하고, 나머지 1/4 움직임 벡터 해상도와 1/8 움직임 벡터 해상도에는 지금까지 발생한 확률이 높은 순서로 짧은 이진화 비트를 할당한다. 이때, 1/4 움직임 벡터 해상도보다 1/8 움직임 벡터 해상도가 지금까지 발생한 확률이 높은 경우, 도 21과 같이 '00'인 비트열을 1/8 움직임 벡터 해상도에 할당하고, '01'인 비트열을 1/2 움직임 벡터 해상도에 할당하여 산술 부호화한다.Referring to FIG. 21, for example, assuming that only three motion vector resolutions, such as 1/2, 1/4, and 1/8, are used for entropy encoding by CABAC and the encoding is used. If the motion vector resolution of the left region is 1/2 and the motion vector resolution of the upper region of the region is 1/2, then assign the shortest binarized bit string to 1/2 motion vector resolution, and match the remaining 1/4 motion vector resolution. The short binary bits are allocated to the 1/8 motion vector resolution in the order of the highest probability of occurrence. At this time, when the probability that the 1/8 motion vector resolution has occurred until now is higher than the 1/4 motion vector resolution, the bit string having '00' is allocated to the 1/8 motion vector resolution as shown in FIG. 21, and the bit having '01'. Arithmetic coding is performed by assigning columns to half motion vector resolution.
또한, 첫 번째 이진화 비트를 부호화할 때, 확률 모델을 4 가지의 확률 모델로 나누어 부호화할 수 있다. 4 가지의 확률 모델은 첫째, 왼쪽 영역과 위쪽 영역의 해상도가 모두 같고 지금까지의 가장 높은 확률의 해상도와 같은 경우의 확률 모델, 둘 째, 왼쪽 영역과 위쪽 영역의 해상도가 모두 같고 지금까지의 가장 높은 확률의 해상도와 다른 경우의 확률 모델, 셋째, 왼쪽 영역과 위쪽 영역의 해상도가 모두 다르고 지금까지의 가장 높은 확률의 해상도와 왼쪽 영역 또는 위쪽 영역의 해상도와 같은 해상도가 있는 경우의 확률 모델, 넷째, 왼쪽 영역과 위쪽 영역의 해상도와 지금까지의 가장 높은 확률의 해상도가 모두 다른 경우의 확률 모델 등으로 구분될 수 있다. 두 번째 이진화 비트를 부호화할 때, 확률 모델을 2 가지의 확률 모델로 나누어 부호화할 수 있다. 2 가지의 확률 모델은 첫째 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 모두 다르고 지금까지의 가장 높은 확률의 움직임 벡터 해상도와 왼쪽 영역 또는 위쪽 영역의 움직임 벡터 해상도와 같은 움직임 벡터 해상도가 있는 경우의 확률 모델, 둘째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도와 지금까지의 가장 높은 확률의 해상도가 모두 다른 경우의 확률 모델로 구분될 수 있다.In addition, when encoding the first binarization bit, the probability model may be divided into four probability models and encoded. The four probabilistic models are, firstly, a probability model in which both the left and top regions have the same resolution and are the same as the highest probability resolution so far; second, the left and the top regions all have the same resolution and the most Probability model when the resolution of the high probability differs from the third. Third, the probability model when the resolution of the left and upper regions are all different, and the resolution of the highest probability so far and the resolution of the left or upper region is the fourth. In this case, the resolution of the left region and the upper region and the highest probability resolution so far can be divided into probability models. When the second binarization bit is encoded, the probability model may be divided into two probability models and encoded. The two probabilistic models are the first when the motion vector resolutions of both the left and top regions of the corresponding region are different and have the highest probability motion vector resolution so far and the motion vector resolution such as the motion vector resolution of the left or upper region. Probability model can be classified into a probability model in which the motion vector resolution of the left region and the upper region of the corresponding region and the resolution of the highest probability so far are different.
또 다른 예를 들면, CABAC를 이용하여 부호화하고, 부호화에 사용되는 움직임 벡터 해상도가 1/2, 1/4, 1/8과 같이 3 개의 움직임 벡터 해상도만 사용하고, 지금까지 발생한 확률이 가장 높은 움직임 벡터 해상도가 1/4인 경우, 1/4 움직임 벡터 해상도에 가장 짧은 이진화 비트열인 '1'을 할당하고, 나머지 1/2 움직임 벡터 해상도와 1/8 움직임 벡터 해상도에 각각 '00'과 '01'을 할당 한다. 또한, 첫 번째 이진화 비트를 부호화할 때, 확률모델을 3 가지의 확률 모델로 나누어 부호화할 수 있다. 3 가지의 확률 모델은 첫째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 지금까지 발생한 확률이 가장 높은 해상도와 같은 경우의 확률 모델, 둘째, 해당 영역의 왼쪽 영역과 위쪽 영역의 해상도 중 하나만 지금까지 발생한 확률이 가장 높은 해상도와 같은 경우의 확률 모델, 셋째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도와 지금까지 발생한 확률이 가장 높은 움직임 벡터 해상도와 모두 다른 경우의 확률 모델로 구분될 수 있다. 두 번째 이진화 비트를 부호화할 때, 확률 모델을 6 가지의 확률 모델로 나누어 부호화할 수 있다. 6 가지의 확률 모델은 첫째, 해당 영역의 왼쪽 영역과 위쪽 영역의 해상도가 모두 1/8 움직임 벡터 해상도인 경우의 확률 모델, 둘째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 모두 1/2 움직임 벡터 해상도인 경우의 확률 모델, 셋째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 모두 1/4 움직임 벡터 해상도인 경우의 확률 모델, 넷째, 해당 영역의 왼쪽 영역과 위쪽 영역의 해상도 중 하나는 1/8 움직임 벡터 해상도이고 다른 하나는 1/4 움직임 벡터 해상도인 경우의 확률 모델, 다섯째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도 중 하나는 1/2 움직임 벡터 해상도이고 다른 하나는 1/4 움직임 벡터 해상도인 경우의 확률 모델, 여섯째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도 중 하나는 1/8 움직임 벡터 해상도이고 다른 하나는 1/2 움직임 벡터 해상도 일 경우의 확률 모델로 구분될 수 있다. 지금까지 발생한 확률이 가장 높은 해상도는 이전의 영역까지 부호화된 해상도의 확률일 수도 있고, 임의의 영역의 확률이거나 소정의 고정된 해상도 일 수도 있다.In another example, the CABAC is used for encoding, and the motion vector resolution used for encoding uses only three motion vector resolutions, such as 1/2, 1/4, and 1/8, and has the highest probability of occurrence. If the motion vector resolution is 1/4, assign the shortest binarization bit string '1' to 1/4 motion vector resolution, and set '00' to the remaining 1/2 motion vector resolution and 1/8 motion vector resolution, respectively. Assign '01'. In addition, when encoding the first binarization bit, a probability model may be divided into three probability models and encoded. The three probabilistic models are: first, a probability model where the motion vector resolution of the left region and the upper region of the region is the same as the highest resolution that has occurred so far; and second, only one of the resolutions of the left region and the upper region of the region. Probability model in which the probability that occurred so far is the same as the highest resolution, and third, the probability model when the motion vector resolution of the left and upper regions of the corresponding region differs from the motion vector resolution of the highest probability so far. Can be. When encoding the second binarization bit, the probability model may be divided into six probability models and encoded. The six probabilistic models are, firstly, probabilistic models when the resolution of the left and top regions of the region is 1/8 motion vector resolution, and second, the motion vector resolution of the left and upper regions of the region is 1/1. Probabilistic model with 2 motion vector resolutions, Third, Probabilistic model with motion vector resolutions of the left and upper regions of the corresponding region being 1/4 motion vector resolution, and Fourth, resolution of the left and upper regions of the region Probability model when one is 1/8 motion vector resolution and the other is 1/4 motion vector resolution.Fifth, one of the motion vector resolutions of the left and upper regions of the region is 1/2 motion vector resolution and the other Probabilistic model for one motion of 1/4 motion vector resolution, and sixth for motion vector resolutions of the left and upper areas of the area. Im a vector resolution and the other may be separated by one-half if the probability model of the motion vector resolution. The resolution with the highest probability so far may be the probability of the resolution encoded up to the previous region, the probability of any region, or the predetermined fixed resolution.
또한, 해상도 부호화기(940)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 영상 복호화 장치에서 미리 약속된 추정 방식에 따라 추정할 수 있는지 여부를 판단하여, 움직임 벡터 해상도를 추정할 수 있는 영역에 대해서는 추정 가능함을 나타내는 식별자를 부호화하여 해상도 식별 플래그를 생성하고, 움직임 벡터 해상도를 추정할 수 없는 영역에 대해서는 추정 불가능함을 나타내는 식별자와 해당 영역의 움직임 벡터 해상도를 부호화하여 해상도 식별 플래그를 생성할 수 있다.In addition, the resolution encoder 940 determines whether the motion vector resolution determined for each region or motion vector can be estimated according to a pre-determined estimation method in the image decoding apparatus, and thus, for the region where the motion vector resolution can be estimated. A resolution identification flag may be generated by encoding an identifier indicating that it is possible to estimate, and a resolution identification flag may be generated by encoding an identifier indicating that the motion vector resolution cannot be estimated and a motion vector resolution of the corresponding area. .
즉, 해상도 부호화기(940)는 어느 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 부호화하고자 하는 경우, 여러 개의 움직임 벡터 해상도를 적용하여 해당 영역의 움직임 벡터와 예측 움직임 벡터를 계산하고 그 차분 벡터를 부호화하고, 차분 벡터를 복호화하여 복원된 차분 벡터를 다시 각각의 해상도를 최적의 해상도로 가정하고 움직임 벡터를 각각의 해상도 마다 복호화한다. 각 해상도가 최적의 해상도로 가정하고 복원된 움직임 벡터를 이용하여 해당 영역의 주위의 화소들의 움직임을 보상하였을 때 소정의 비용 함수에 따른 비용이 최소가 되는 움직임 벡터 해상도를 결정한다. 해상도 부호화기(940)는 이와 같이 결정된 움직임 벡터 해상도가 원래 부호화하고자 하는 해당 영역의 움직임 벡터 해상도(해당 영역의 최적의 움직임 벡터 해상도로서 결정된 움직임 벡터 해상도, 단 최적의 움직임 벡터 해상도가 항상 최적의 성능을 낸다는 것은 아니라 움직임 벡터 해상도를 결정하는 조건에서 최적으로 결정된 움직임 벡터 해상도를 나타내는 것임)와 동일한 경우에는 해당 영역의 움직임 벡터 해상도를 영상 복호화 장치에서 추정할 수 있음을 나타내는 식별자(예를 들면, '1')를 해당 영역의 해상도 식별 플래그로서 생성할 수 있으며, 이 경우 해당 영역의 움직임 벡터 해상도를 부호화하지 않는다. 결정된 움직임 벡터 해상도가 원래 부호화하고자 하는 해당 영역의 움직임 벡터 해상도와 동일하지 않은 경우에는 해당 영역의 움직임 벡터 해상도를 영상 복호화 장치에서 추정할 수 없음을 나타내는 식별자(예를 들면, '0')와 해당 영역의 원래의 움직임 벡터 해상도를 부호화하여 해당 영역의 해상도 식별 플래그로서 생성할 수 있다. 여기서, 소정의 비용 함수로서는 MSE(Mean Squre Error) 또는 SATD(Sum of Absolute Transformed Differences) 등 다양한 왜곡 함수가 이용될 수 있다. That is, when the encoder 940 wants to encode a motion vector resolution for each region or motion vector, the motion encoder calculates a motion vector and a predicted motion vector of the corresponding region by applying a plurality of motion vector resolutions, and encodes the difference vector. After decoding the difference vector, the reconstructed difference vector is assumed to be the optimum resolution, and the motion vector is decoded for each resolution. Assuming that each resolution is an optimal resolution, when the motion of the pixels around the region is compensated for by using the reconstructed motion vector, the motion vector resolution that minimizes the cost according to a predetermined cost function is determined. The resolution encoder 940 determines that the motion vector resolution thus determined is the motion vector resolution of the region to be originally encoded (the motion vector resolution determined as the optimal motion vector resolution of the region, except that the optimal motion vector resolution always provides the best performance. In the case where the resolution is equal to the motion vector resolution that is optimally determined under the conditions for determining the motion vector resolution, the identifier indicating that the motion vector resolution of the corresponding area can be estimated by the image decoding apparatus (eg, '1' ') May be generated as a resolution identification flag of the corresponding area, in which case the motion vector resolution of the corresponding area is not encoded. If the determined motion vector resolution is not the same as the motion vector resolution of the region to be originally encoded, the identifier (eg, '0') indicating that the motion vector resolution of the region cannot be estimated by the image decoding apparatus and the corresponding The original motion vector resolution of the region may be encoded and generated as a resolution identification flag of the region. Here, as the predetermined cost function, various distortion functions such as Mean Squre Error (MSE) or Sum of Absolute Transformed Differences (SATD) may be used.
또한, 해상도 부호화기(940)는 차분 벡터의 각 컴포넌트가 '0'인 경우에는 영역 또는 움직임 벡터의 해상도를 부호화하지 않을 수 있다. 차분 벡터의 각 컴포넌트가 '0'인 경우에는 예측 움직임 벡터를 움직임 벡터로 부호화하기 때문에 움직임 벡터 해상도를 부호화하지 않아도 된다.In addition, when each component of the difference vector is '0', the resolution encoder 940 may not encode the resolution of the region or the motion vector. When each component of the difference vector is '0', the motion vector resolution does not need to be encoded because the predictive motion vector is encoded as a motion vector.
도 15는 본 발명의 실시예에 따라 영역의 주위 화소들을 이용하여 움직임 벡터 해상도를 결정하는 과정을 설명하기 위한 예시도이다.FIG. 15 is an exemplary diagram for describing a process of determining a motion vector resolution using pixels around a region according to an embodiment of the present invention.
도 15를 참조하면, 해상도 부호화기(940)가 움직임 벡터 해상도를 부호화하고자 하는 영역에 대해 움직임 추정을 수행하여 결정한 최적의 움직임 벡터 해상도가 1/2의 움직임 벡터 해상도이고, 움직임 벡터가 (4,10)이며, 예측 움직임 벡터가 (2,7)인 경우, 차분 벡터는 (2,3)이 된다. 이때, 해상도 부호화기(940)는 영상 복호화 장치에서는 차분 벡터만을 복호화하여 복원할 수 있다고 가정하고, 움직임 벡터 해상도를 여러 개로 변화시켜 각각의 움직임 벡터 해상도에 따른 예측 움직임 벡터를 예측하여 각각의 움직임 벡터 해상도에 따른 움직임 벡터를 복원한 후, 현재 영역의 주위 화소들과 복원된 각각의 움직임 벡터 해상도에 따른 움직임 벡터에 의해 지시되는 영역의 주위 화소들 간의 왜곡이 최소가 되는 움직임 벡터 해상도를 결정한다.Referring to FIG. 15, an optimal motion vector resolution determined by the motion encoder 940 performing motion estimation on a region to which motion vector resolution is to be encoded is a motion vector resolution of 1/2, and a motion vector is (4,10). If the predicted motion vector is (2,7), the difference vector is (2,3). At this time, the resolution encoder 940 assumes that the image decoding apparatus can decode and reconstruct only the difference vector, and changes the motion vector resolution to several to predict the predicted motion vector according to each motion vector resolution, thereby resolving each motion vector resolution. After reconstructing the motion vector according to the motion vector resolution, the motion vector resolution at which the distortion between the surrounding pixels of the current area and the surrounding pixels of the area indicated by the motion vector according to the reconstructed motion vector resolution is minimized is determined.
일단 움직임 벡터 해상도가 1/4 화소 단위인 경우 예측 움직임 벡터가 (3,14)라면, 영상 복호화 장치에서 복원된 차분 벡터가 (2,3)이므로 복원되는 해당 영역의 움직임 벡터는 (5,17)이 된다. 또한, 움직임 벡터 해상도가 1/2 화소 단위인 경우 예측 움직임 벡터가 (2,7)이라면, 영상 복호화 장치에서 복원된 차분 벡터가 (2,3)이므로 복원되는 해당 영역의 움직임 벡터는 (4,10)이 된다. 이와 같은 방식으로 움직임 벡터 해상도가 1/8 화소 단위인 경우의 영상 복호화 장치에서 복원되는 해당 영역의 움직임 벡터도 계산된다.Once the motion vector resolution is 1/4 pixel unit, if the predictive motion vector is (3,14), the difference vector reconstructed by the image decoding apparatus is (2,3), and thus the motion vector of the corresponding region to be reconstructed is (5,17). ) In addition, when the motion vector resolution is 1/2 pixel unit and the predicted motion vector is (2,7), since the difference vector reconstructed by the image decoding apparatus is (2,3), the motion vector of the corresponding region to be reconstructed is (4, 10). In this manner, the motion vector of the corresponding region restored by the image decoding apparatus when the motion vector resolution is 1/8 pixel units is also calculated.
이와 같은 각각의 움직임 벡터 해상도에 따라 복원되는 해당 영역의 움직임 벡터를 이용하여 참조 픽처에서 해당 영역의 움직임을 보상한 영역의 주위 화소들과 해당 영역의 주위 화소들 간의 왜율이 최소가 되는 해상도가 이전에 미리 결정한 최적의 움직임 벡터 해상도와 동일한 경우, 해상도 부호화기(940)는 움직임 벡터 해상도를 영상 복호화 장치에서 추정할 수 있음을 나타내는 식별자만을 부호화하여 해당 영역의 해상도 식별 플래그로서 생성하고 해당 영역의 움직임 벡터 해상도는 부호화하지 않는다.By using the motion vector of the corresponding region reconstructed according to the resolution of each motion vector, the resolution at which the distortion ratio between the surrounding pixels of the region compensating for the movement of the corresponding region in the reference picture and the surrounding pixels of the region is minimum When the resolution is equal to the optimal motion vector resolution determined in advance, the resolution encoder 940 encodes only an identifier indicating that the motion vector resolution can be estimated by the image decoding apparatus, and generates the resolution vector as a resolution identification flag of the corresponding region. The resolution is not encoded.
해상도 결정기(930)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터의 예측 움직임 벡터 또는 차분 벡터의 크기가 임계값보다 큰 경우에는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 소정의 값으로 결정할 수 있다. 예를 들어, 어느 영역의 예측 움직임 벡터의 크기 또는 차분 벡터의 크기가 임계값보다 큰 경우에는 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도를 소정의 값 또는 임의의 값으로 결정하여 해당 영역의 움직임 벡터 해상도를 부호화하지 않을 수 있다. 또한, 어느 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터의 크기가 크거나 해당 영역 또는 움직임 벡터의 움직임 벡터의 크기가 임계값보다 큰 경우에는 해당 영역의 움직임 벡터 해상도를 소정의 값 또는 임의의 값으로 결정하여 해당 영역의 움직임 벡터 해상도를 부호화하지 않을 수 있다. 이 경우, 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도는 어떠한 플래그가 없이도 임의의 해상도로 변경될 수 있다. 임계값은 미리 지정된 값이거나 입력되는 어떠한 값이 될 수도 있으며, 주위 블록의 움직임 벡터로부터 계산될 수도 있다.The resolution determiner 930 determines a motion vector resolution determined for each region or motion vector when the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region or motion vector is larger than a threshold. Can be determined. For example, when the magnitude of the prediction motion vector or the difference vector of a certain region is larger than the threshold, the motion vector resolution of the region or motion vector is determined as a predetermined value or a random value. May not be encoded. In addition, when the size of the motion vector of the region or the surrounding vector of the motion vector is large or the size of the motion vector of the region or the motion vector is larger than the threshold, the motion vector resolution of the region is set to a predetermined value or a random value. In this case, the motion vector resolution of the corresponding region may not be encoded. In this case, the motion vector resolution of the region or motion vector may be changed to any resolution without any flag. The threshold may be a predetermined value or any value input and may be calculated from the motion vectors of the surrounding blocks.
해상도 결정기(930)는 참조 픽처 인덱스를 이용하여 현재 블록의 해상도를 알 수 있는 경우에는 해상도 식별 플래그를 생성하지 않고 참조픽처 인덱스를 부호화함으로써 해상도에 대한 정보를 부호화할 수도 있다.The resolution determiner 930 may encode information about the resolution by encoding the reference picture index without generating a resolution identification flag when the resolution of the current block is known using the reference picture index.
예를 들어, 도 30과 같은 현재 픽처와 참조 픽처 간의 거리를 기준으로 참조픽처를 인덱싱하고 부호화할 수 있다. 예를 들어 참조픽처를 4장 쓴다고 가정하면 현재 픽처가 5번인 경우 인덱싱할 수 있는 참조 픽처의 후보는 도 31과 같이 인덱싱을 할 수 있다.For example, the reference picture may be indexed and encoded based on the distance between the current picture and the reference picture as shown in FIG. 30. For example, if four reference pictures are written, candidates of indexable reference pictures can be indexed as shown in FIG. 31 when the current picture is five times.
도 31은 참조픽처 번호 및 해상도에 따른 참조픽처 인덱스를 예시한 도면이다.31 is a diagram illustrating a reference picture index according to a reference picture number and a resolution.
사용하는 해상도가 1/4, 1/8인 경우에, 도 31에서 예시하듯이 최적의 참조 픽처가 3번이고 해상도가 1/8인 경우였다면 참조 픽처 인덱스를 3으로 부호화할 수 있으며, 복호화 장치에서는 참조 픽처 번호 3을 비트스트림에서 추출하여 참조 픽처가 3번이고 부호화기와 동일한 테이블을 이용하여 해상도가 1/8 임을 알 수 있다.When the resolution used is 1/4 and 1/8, as shown in FIG. 31, if the optimal reference picture is 3 times and the resolution is 1/8, the reference picture index can be encoded with 3, and the decoding apparatus In FIG. 3, reference picture number 3 is extracted from a bitstream, and reference picture is 3 and resolution is 1/8 using the same table as the encoder.
차분 벡터 부호화기(950)는 움직임 벡터 해상도에 따라 차분 벡터를 다르게 부호화할 수 있다. 즉, 움직임 벡터 해상도가 커지면 움직임 벡터의 크기도 커지므로 차분 벡터를 부호화하는 데 필요한 비트량도 커진다. 따라서, 움직임 벡터 해상도의 크기에 따라 차분 벡터를 다른 방식으로 부호화하여 비트량을 줄일 수 있다.The difference vector encoder 950 may encode the difference vector differently according to the motion vector resolution. In other words, as the motion vector resolution increases, the size of the motion vector increases, so that the amount of bits required for encoding the difference vector also increases. Accordingly, the amount of bits can be reduced by encoding the difference vector in different ways according to the size of the motion vector resolution.
예를 들어, 차분 벡터 부호화기(950)가 UVLC를 이용하여 차분 벡터를 부호화하는 경우에는, K차 지수 골룸 코드를 이용하여 부호화할 수 있으며, 이때 영역마다 결정되는 움직임 벡터 해상도에 따라 지수 골룸 코드의 차수(K)를 변경할 수 있다. 예를 들어, UVLC를 이용하여 차분 벡터를 부호화하는 경우에는, 움직임 벡터 해상도가 1/4 화소 단위이면 코드의 차수 K는 '0'으로 설정될 수 있고 움직임 벡터 해상도가 1/8 화소 단위이면 코드의 차수 K는 '1'로 설정될 수 있다.For example, when the difference vector encoder 950 encodes the difference vector using UVLC, the difference vector encoder 950 may encode using the K-th order exponential golem code, and according to the motion vector resolution determined for each region, The order K can be changed. For example, when encoding a difference vector using UVLC, if the motion vector resolution is 1/4 pixel unit, the order K of the code may be set to '0', and if the motion vector resolution is 1/8 pixel unit, The order K of may be set to '1'.
또한, 차분 벡터 부호화기(950)가 CABAC를 이용하여 차분 벡터를 부호화하는 경우에는, 단항/K차 지수 골룸 결합형 코드를 이용하여 부호화할 수 있으며, 이때 영역마다 결정되는 움직임 벡터 해상도에 따라 단항/K차 지수 골룸 결합형 코드의 차수(K)와 최대값(T)을 변경하여 부호화할 수 있다. 예를 들어, CABAC를 이용하여 차분 벡터를 부호화하는 경우에는, 움직임 벡터 해상도가 1/4 화소 단위이면 코드의 차수 K는 '3'으로 설정되고 최대값 T는 '6'으로 설정될 수 있고 움직임 벡터 해상도가 1/8 화소 단위이면 코드의 차수 K는 '5'로 설정되고 최대값 T는 '12'로 설정될 수 있다.In addition, when the difference vector encoder 950 encodes the difference vector using CABAC, the difference vector encoder 950 may encode using the unary / K-order exponential golem combined code, wherein the unary / The order (K) and the maximum value (T) of the K-order exponential golem combined code may be changed and encoded. For example, when encoding a differential vector using CABAC, if the motion vector resolution is 1/4 pixel unit, the order K of the code may be set to '3' and the maximum value T may be set to '6' and the motion If the vector resolution is 1/8 pixel units, the order K of the code may be set to '5' and the maximum value T may be set to '12'.
또한, 차분 벡터 부호화기(950)가 CABAC를 이용하여 차분 벡터를 부호화하는 경우에는, 영역마다 결정되는 움직임 벡터 해상도에 따라 누적 확률을 다르게 계산하여 부호화할 수 있다. 예를 들어, 영역들의 차분 벡터를 부호화할 때마다, 확률 모델을 영역마다 결정되는 움직임 벡터 해상도에 따라 각각 업데이트하고, 다른 영역의 차분 벡터를 부호화할 때에는 업데이트된 각 움직임 벡터 해상도에 따른 확률 모델을 이용할 수 있다. 즉, 어느 영역의 움직임 벡터 해상도가 1/2 화소 단위인 경우, 1/2 화소 단위의 확률 모델을 이용하여 차분 벡터를 부호화하고 1/2 화소 단위의 확률 모델을 업데이트하며, 어느 영역의 움직임 벡터 해상도가 1/8 화소 단위인 경우, 1/8 화소 단위의 확률 모델을 이용하여 차분 벡터를 부호화하고 1/8 화소 단위의 확률 모델을 업데이트할 수 있다.In addition, when the difference vector encoder 950 encodes the difference vector using CABAC, the cumulative probability may be differently calculated and encoded according to the motion vector resolution determined for each region. For example, each time the difference vector of the regions is encoded, the probability model is updated according to the motion vector resolution determined for each region, and when the difference vector of the other regions is encoded, the probability model according to the updated motion vector resolution is updated. It is available. That is, when the motion vector resolution of a region is 1/2 pixel unit, the difference vector is encoded using a probability model of 1/2 pixel unit, the probability model of 1/2 pixel unit is updated, and the motion vector of a region When the resolution is 1/8 pixel units, the differential vector may be encoded using a 1/8 pixel unit probability model and the probability model may be updated in 1/8 pixel unit.
또한, 차분 벡터 부호화기(950)는 각 영역의 차분 벡터를 계산하기 위해, 각 영역의 주위 영역의 움직임 벡터를 이용하여 각 영역의 움직임 벡터에 대한 예측 움직임 벡터를 예측할 수 있는데, 이때 주위 영역의 움직임 벡터 해상도와 각 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는, 주위 영역의 움직임 벡터 해상도를 각 영역의 움직임 벡터 해상도로 변환하여 예측할 수 있다. 움직임 벡터 해상도로 변환할 때에는 반올림, 버림 또는 올림 등을 사용할 수도 있다. 여기서, 주위 영역은 인접 영역을 포함하는 개념으로 이해되어야 할 것이다.In addition, the difference vector encoder 950 may predict the predicted motion vector for the motion vector of each region by using the motion vector of the surrounding region of each region, in order to calculate the difference vector of each region. When the vector resolution and the motion vector resolution of each region are not the same, the motion vector resolution of the surrounding region may be converted into the motion vector resolution of each region to be predicted. When converting to motion vector resolution, rounding, rounding, or rounding may be used. Here, the surrounding area should be understood as a concept including an adjacent area.
도 16은 본 발명의 실시예에 따라 예측 움직임 벡터를 예측하는 과정을 설명하기 위한 예시도이다.16 is an exemplary diagram for describing a process of predicting a predicted motion vector according to an embodiment of the present invention.
도 16에 도시한 예를 참조하면, 예측 움직임 벡터를 예측하고자 하는 영역의 주위 영역의 움직임 벡터가 (4,5), (10,7), (5,10)이고 변환할 때 반올림을 사용하면, 각 움직임 벡터의 해상도가 1/2, 1/8, 1/8인 경우, 예측하고자 하는 영역의 움직임 벡터의 해상도가 1/4이면 예측 움직임 벡터는 (5,5)이 될 수 있으며, 예측하고자 하는 영역의 움직임 벡터 해상도가 1/8이면 예측 움직임 벡터는 (10, 10)가 될 수 있다.Referring to the example shown in FIG. 16, if the motion vectors of the surrounding area of the region to be predicted are (4,5), (10,7), (5,10) and rounding is used when converting the predicted motion vector, When the resolution of each motion vector is 1/2, 1/8, or 1/8, if the resolution of the motion vector of the region to be predicted is 1/4, the predicted motion vector may be (5,5). If the motion vector resolution of the desired region is 1/8, the predictive motion vector may be (10, 10).
또한, 차분 벡터 부호화기(950)는 각 영역 중 하나 이상의 영역의 블록 모드가 스킵 모드(SKIP Mode)인 경우에는, 해당 영역의 주위 영역의 움직임 벡터 해상도 중 가장 높은 해상도로 움직임 벡터를 예측하고자 하는 영역의 움직임 벡터 해상도를 변환하여 예측할 수 있다. 도 16에 도시한 예를 참조하면, 예측하고자 하는 영역이 스킵 모드인 경우, 주위 영역의 움직임 벡터의 해상도 중에 가장 높은 해상도는 1/8이므로, 예측하고자 하는 영역의 해상도를 1/8로 가정하고 예측 움직임 벡터를 예측하면 (10,10)이 될 수 있다.In addition, when the block mode of one or more regions of each region is the skip mode (SKIP mode), the difference vector encoder 950 is an area to predict the motion vector at the highest resolution among the motion vector resolutions of the surrounding regions of the region. The motion vector resolution of can be converted and predicted. Referring to the example illustrated in FIG. 16, when the region to be predicted is the skip mode, since the highest resolution among the resolutions of the motion vectors of the surrounding region is 1/8, it is assumed that the resolution of the region to be predicted is 1/8. Predicting the predicted motion vector may be (10, 10).
또한, 차분 벡터 부호화기(950)는 주위 영역의 움직임 벡터를 이용하여 예측하고자 하는 영역의 예측 움직임 벡터를 예측할 때, 임의의 해상도로 주위 영역의 움직임 벡터를 변환하여 예측할 수 있다. 이때, 임의의 움직임 벡터 해상도와 예측하고자 하는 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는 예측 움직임 벡터를 예측하고자 하는 영역의 움직임 벡터 해상도로 변환하여 최종적인 예측 움직임 벡터를 얻을 수 있다. 도 16에 도시한 예를 참조하면, 임의의 움직임 벡터 해상도가 1/2 화소 단위이면 예측 움직임 벡터는 (3,3)으로 변환되며, 예측하고자 하는 영역의 움직임 벡터 해상도가 1/8 화소 단위라면 임의의 움직임 벡터 해상도와 동일하지 않으므로, 예측 움직임 벡터 (3,3)은 1/8 화소 단위로 변환되어 최종적인 예측 움직임 벡터는 (12,12)가 될 수 있다. 같은 방법으로, 예측하고자 하는 영역의 움직임 벡터 해상도가 1/4 화소 단위라면 최종적인 예측 움직임 벡터는 (6,6)이 될 수 있다.In addition, when predicting the predicted motion vector of the region to be predicted using the motion vector of the surrounding region, the differential vector encoder 950 may convert and predict the motion vector of the surrounding region at an arbitrary resolution. In this case, when the arbitrary motion vector resolution and the motion vector resolution of the region to be predicted are not the same, the final predicted motion vector may be obtained by converting the predicted motion vector to the motion vector resolution of the region to be predicted. Referring to the example shown in FIG. 16, if the arbitrary motion vector resolution is 1/2 pixel unit, the predicted motion vector is converted to (3,3), and if the motion vector resolution of the region to be predicted is 1/8 pixel unit Since it is not the same as any motion vector resolution, the predicted motion vector (3,3) may be converted in units of 1/8 pixels so that the final predicted motion vector may be (12,12). In the same way, if the motion vector resolution of the region to be predicted is 1/4 pixel unit, the final predicted motion vector may be (6,6).
도 17은 본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법을 설명하기 위한 순서도이다.17 is a flowchart illustrating a video encoding method using adaptive motion vector resolution according to the first embodiment of the present invention.
본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법은 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고, 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화한다. 이를 위해, 본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 장치(900)는 영상의 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 변경하는지 여부를 판단하여(S1710), 영역마다 움직임 벡터 해상도를 변경하는 경우, 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고(S1720), 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화하며(S1730), 영역마다 움직임 벡터 해상도를 변경하지 않고 고정하는 경우, 영상의 모든 영역이나 일부 영역 내의 하위 영역에 대해 고정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화한다(S1740).In an image encoding method using adaptive motion vector resolution according to the first embodiment of the present invention, the motion vector resolution is determined for each region or motion vector, and the image is encoded using the motion vector according to the motion vector resolution determined for each region or motion vector. Inter prediction coding is performed on an area basis. To this end, the image encoding apparatus 900 using the adaptive motion vector resolution according to the first embodiment of the present invention determines whether to change the motion vector resolution for each region or motion vector of the image (S1710), and moves for each region. When the vector resolution is changed, the motion vector resolution is determined for each region or motion vector (S1720), and the image is inter prediction encoded by region using a motion vector according to the motion vector resolution determined for each region or motion vector (S1730). In the case of fixing the motion vector resolution without changing the resolution for each region, the inter prediction encoding is performed on a region-by-region basis by using a motion vector according to a fixed motion vector resolution for all regions or subregions of a portion of the image (S1740). .
여기서, 영역마다 결정되는 움직임 벡터 해상도는 움직임 벡터의 x 컴포넌트와 y 컴포넌트별로 서로 다를 수 있다.Here, the motion vector resolution determined for each region may be different for each x component and y component of the motion vector.
또한, 영상 부호화 장치(900)는 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는지 여부를 나타내는 해상도 변경 플래그를 생성할 수 있다. 예를 들어, 영상 부호화 장치(900)는 단계 S1710에서 움직임 벡터 해상도가 변경되는 것으로 판단되는 경우 영역마다 움직임 벡터 해상도가 변경됨을 나타내는 해상도 변경 플래그(예를 들면, '1')를 생성하고, 단계 S1710에서 움직임 벡터 해상도가 변경되지 않고 고정되는 것으로 판단되는 경우 영역마다 움직임 벡터 해상도가 고정됨을 나타내는 해상도 변경 플래그(예를 들면, '0')를 생성할 수 있다. 반대로, 영상 부호화 장치(900)는 사용자 또는 외부로부터 입력되는 설정 정보에 따라 해상도 변경 플래그를 생성하고, 생성된 해상도 변경 플래그의 비트값을 토대로 단계 S1710과 같이 영역마다 움직임 벡터 해상도를 결정하는지 여부를 판단할 수도 있다.Also, the image encoding apparatus 900 may generate a resolution change flag indicating whether the motion vector resolution is determined for each region or motion vector. For example, when it is determined in step S1710 that the motion vector resolution is changed, the image encoding apparatus 900 generates a resolution change flag (eg, '1') indicating that the motion vector resolution is changed for each region. When it is determined in S1710 that the motion vector resolution is fixed without being changed, a resolution change flag (eg, '0') indicating that the motion vector resolution is fixed for each region may be generated. In contrast, the image encoding apparatus 900 generates a resolution change flag according to the setting information input from the user or the outside, and determines whether to determine the motion vector resolution for each region in step S1710 based on the bit value of the generated resolution change flag. You can also judge.
또한, 영상 부호화 장치(900)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 부호화할 수 있다. 예를 들어, 영상 부호화 장치(900)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 동일한 움직임 벡터 해상도를 가지는 영역끼리 묶어 쿼드 트리 구조로 계층적으로 부호화하거나, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 부호화하거나, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 런과 길이를 이용하여 부호화하거나 영역마다 결정되는 움직임 벡터 해상도를 태그 트리를 이용하여 계층적으로 부호화하거나, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도의 빈도수에 따라 움직임 벡터 해상도에 할당하는 비트수를 변경하여 부호화하거나, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 영상 복호화 장치에서 미리 약속된 추정 방식에 따라 추정할 수 있는지 여부를 판단하여, 움직임 벡터 해상도를 추정할 수 있는 영역에 대해서는 추정 가능함을 나타내는 식별자를 부호화하며, 움직임 벡터 해상도를 추정할 수 없는 영역에 대해서는 추정 불가능함을 나타내는 식별자와 움직임 벡터 해상도를 함께 부호화할 수 있다. 여기서, 영상 부호화 장치(900)가 쿼드 트리 구조로 계층적으로 부호화하거나 태그 트리를 이용하여 계층적으로 부호화하는 경우에는 각각 쿼드 트리 계층의 최대 개수 및 쿼드 트리 계층의 최하위 노드가 가리키기는 영역 크기 또는 태그 트리 계층의 최대 개수 및 태그 트리 계층의 최하위 노드가 가리키는 영역 크기를 나타내는 식별자를 부호화하여 헤더에 포함시킬 수 있다.Also, the image encoding apparatus 900 may encode a motion vector resolution determined for each region or motion vector. For example, the image encoding apparatus 900 hierarchically encodes a motion vector resolution determined for each region or motion vector in a quad tree structure by tying regions having the same motion vector resolution, or a motion vector determined for each region or motion vector. The resolution is encoded using a motion vector resolution predicted using the motion vector resolution of the surrounding area of each region, or the motion vector resolution determined for each region or motion vector is encoded using run and length, or the motion vector determined for each region. Resolution is encoded hierarchically using tag tree, or it is encoded by changing the number of bits allocated to motion vector resolution according to the frequency of motion vector resolution determined for each region or motion vector, or motion vector determined for each region or motion vector. sea It is determined whether or not the image can be estimated according to a pre-scheduled estimation method by the image decoding apparatus, and an identifier indicating that the motion vector resolution can be estimated is encoded, and the motion vector resolution cannot be estimated. An identifier indicating that the region cannot be estimated and a motion vector resolution may be encoded together. Here, when the image encoding apparatus 900 hierarchically encodes the quad tree structure or hierarchically encodes using the tag tree, the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer respectively. Alternatively, an identifier indicating the maximum number of tag tree hierarchies and the area size indicated by the lowest node of the tag tree hierarchies may be encoded and included in the header.
또한, 영상 부호화 장치(900)는 영역마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터의 예측 움직임 벡터 또는 차분 벡터의 크기가 임계값보다 큰 경우에는 영역마다 결정되는 움직임 벡터 해상도를 소정의 값 또는 임의의 값으로 결정할 수 있다. 또한, 차분 벡터의 각 컴포넌트가 '0'인 경우에는 영역 또는 움직임 벡터의 해상도를 부호화하지 않을 수 있다.In addition, the image encoding apparatus 900 may determine a motion vector resolution determined for each region if the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region is larger than a threshold. Can be determined by value. In addition, when each component of the difference vector is '0', the resolution of the region or the motion vector may not be encoded.
또한, 영상 부호화 장치(900)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터와 예측 움직임 벡터 간의 차이인 차분 벡터를 부호화할 수 있다. 이때, 영상 부호화 장치(900)는 움직임 벡터 해상도에 따라 차분 벡터를 다르게 부호화할 수 있다. 이를 위해, 영상 부호화 장치(900)는 UVLC를 이용하여 차분 벡터를 부호화하는 경우에는, K차 지수 골룸 코드를 이용하여 부호화할 수 있으며, 이 경우 영역마다 결정되는 움직임 벡터 해상도에 따라 지수 골룸 코드의 차수(K)를 변경할 수 있다. 영상 부호화 장치(900)는 CABAC를 이용하여 차분 벡터를 부호화하는 경우에는, 단항/K차 지수 골룸 결합형 코드를 이용하여 부호화할 수 있으며, 이 경우 영역마다 결정되는 움직임 벡터 해상도에 따라 단항/K차 지수 골룸 결합형 코드의 차수(K)와 최대값(T)를 변경하여 부호화할 수 있다. CABAC를 이용하여 차분 벡터를 부호화하는 경우에는, 영역마다 결정되는 움직임 벡터 해상도에 따라 누적 확률을 다르게 계산하여 부호화할 수 있다. Also, the image encoding apparatus 900 may encode a difference vector that is a difference between a motion vector and a predicted motion vector according to a motion vector resolution determined for each region or motion vector. In this case, the image encoding apparatus 900 may encode the difference vector differently according to the motion vector resolution. To this end, when encoding the difference vector using UVLC, the image encoding apparatus 900 may encode using the K-th order exponential golem code, and in this case, the image of the exponential golem code according to the motion vector resolution determined for each region. The order K can be changed. When the image encoding apparatus 900 encodes the difference vector using CABAC, the image encoding apparatus 900 may encode using the unary / K-order exponential golem combined code, in which case the unary / K according to the motion vector resolution determined for each region. The order K and the maximum value T of the difference exponential golem combined code may be changed and encoded. When encoding a difference vector using CABAC, the cumulative probability may be calculated and encoded differently according to a motion vector resolution determined for each region.
또한, 영상 부호화 장치(900)는 각 영역의 주위 영역의 움직임 벡터를 이용하여 각 영역의 움직임 벡터에 대한 예측 움직임 벡터를 예측할 수 있으며, 이 경우 주위 영역의 움직임 벡터 해상도와 각 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는, 주위 영역의 움직임 벡터 해상도를 각 영역의 움직임 벡터 해상도로 변환하여 예측할 수 있다.In addition, the image encoding apparatus 900 may predict the predicted motion vector of the motion vector of each region by using the motion vector of the surrounding region of each region. In this case, the motion vector resolution of the surrounding region and the motion vector resolution of each region may be predicted. If is not the same, the motion vector resolution of the surrounding area may be converted to the motion vector resolution of each area to be predicted.
또한, 영상 부호화 장치(900)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 부호화 방법을 달리할 수 있다.In addition, the image encoding apparatus 900 may change the method of encoding the resolution identification flag according to the distribution of the motion vector resolutions of the surrounding areas of each region based on the motion vector resolution determined for each region or motion vector.
또한, 영상 부호화 장치(900)는 산술 부호화로 엔트로피 부호화할 때, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 이진화 비트열의 생성 방법을 달리 하고, 확률 모델도 주위 영역의 움직임 벡터 해상도의 분포 및 현재까지 발생한 움직임 벡터 해상도의 확률에 따라 달리 적용하여 산술 부호화 및 확률 업데이트를 수행한다. 또한, 비트의 위치에 따라 각기 다른 확률 모델을 사용하여 산술 부호화 및 확률 업데이트를 수행한다.In addition, when the image encoding apparatus 900 performs entropy encoding by arithmetic coding, a method of generating a binarization bit string of a resolution identification flag based on a distribution of a motion vector resolution determined for each region or motion vector according to a distribution of motion vector resolutions of surrounding regions of each region. Are applied differently according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution that has occurred so far to perform arithmetic coding and probability update. In addition, arithmetic coding and probability updating are performed using different probability models according to bit positions.
또한, 영상 부호화 장치(900)는 각 영역 중 하나 이상의 영역의 블록 모드가 스킵 모드인 경우에는, 주위 영역의 움직임 벡터 해상도 중 가장 높은 해상도로 예측하고자 하는 영역의 움직임 벡터 해상도를 변환하여 예측할 수 있다.In addition, when the block mode of one or more regions of each region is the skip mode, the image encoding apparatus 900 may convert and predict the motion vector resolution of the region to be predicted to the highest resolution among the motion vector resolutions of the surrounding region. .
도 32는 본 발명의 제2 실시예에 따른 적응적 움직임 벡터를 이용한 영상 부호화 장치(3200)를 도시한 도면이다.32 is a diagram illustrating an image encoding apparatus 3200 using an adaptive motion vector, according to a second embodiment of the present invention.
본 발명의 제2 실시예에 따른 적응적 움직임 벡터를 이용한 영상 부호화 장치(3200)는, 인터 예측 부호화기(Inter Prediction Encoder, 3210), 해상도 지정 플래그 생성기(Resolution Change Flag Encoder, 3220), 해상도 결정기(Resolution Determiner, 3230), 해상도 부호화기(Resolution Encoder, 3240), 차분 벡터 부호화기(Differential Vector Encoder, 3250) 및 해상도 전환 플래그 생성기(3260)를 포함하여 구성될 수 있다. 한편, 해상도 지정 플래그 생성기(3220) 및 해상도 부호화기(3240), 차분 벡터 부호화기(3250), 해상도 전환 플래그 생성기(3260)는 반드시 모두가 영상 부호화 장치(3200)에 포함되어야 하는 것은 아니며, 구현 방식에 따라 선택적으로 포함될 수 있다.The image encoding apparatus 3200 using the adaptive motion vector according to the second embodiment of the present invention includes an inter prediction encoder 3210, a resolution change flag encoder 3220, and a resolution determiner ( Resolution Determiner 3230, Resolution Encoder 3240, Differential Vector Encoder 3250, and Resolution Conversion Flag Generator 3260. The resolution designation flag generator 3220, the resolution encoder 3240, the differential vector encoder 3250, and the resolution conversion flag generator 3260 are not necessarily all included in the image encoding apparatus 3200. May optionally be included.
인터 예측 부호화기(3210)는 영상의 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도(Motion Vector Resolution)에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화(Inter Prediction Encoding)한다. 이러한 인터 예측 부호화기(3210)는 도 1을 통해 전술한 영상 부호화 장치(100)로 구현될 수 있다. 여기서, 도 32의 해상도 부호화기(3240), 차분 벡터 부호화기(3250) 중에서 하나 이상의 구성요소가 추가로 포함되는 경우 추가로 포함되는 구성요소의 기능과 인터 예측 부호화기(3210) 내의 부호화기(150)의 기능이 중복되는 경우 부호화기(150)에서는 그 중복되는 기능이 생략될 수 있다. 또한 인터 예측 부호화기(3210) 내의 예측기(110)의 기능과 해상도 결정기(3230)의 기능이 중복되는 부분이 있는 경우 그 중복되는 기능은 예측기(110) 내에서는 생략될 수도 있다.The inter prediction encoder 3210 inter-prediction encodes an image in units of regions by using a motion vector according to a motion vector resolution determined for each region or motion vector of the image. The inter prediction encoder 3210 may be implemented with the image encoding apparatus 100 described above with reference to FIG. 1. Here, when one or more components among the resolution encoder 3240 and the difference vector encoder 3250 of FIG. 32 are additionally included, the functions of the components included in the inter prediction encoder 3210 and the functions of the encoder 150 in the inter prediction encoder 3210 may be included. In case of overlapping, the overlapping function may be omitted in the encoder 150. In addition, when the function of the predictor 110 in the inter prediction encoder 3210 and the function of the resolution determiner 3230 overlap, the overlapping function may be omitted in the predictor 110.
또한, 해상도 부호화기(3240), 차분 벡터 부호화기(3250) 중에서 추가되는 하나 이상의 구성요소는 도 32와 같이 인터 예측 부호화기(3210)와 별개의 구성요소로 구성될 수도 있지만 인터 예측 부호화기(3210) 내의 부호화기(150)와 일체로 구성될 수도 있다. 또한 해상도 지정 플래그 생성기(3220), 해상도 전환 플래그 생성기(3260)에서 발생한 플래그 정보는 각각 해상도 지정 플래그 생성기(3220), 해상도 전환 플래그 생성기(3260)에서 비트스트림으로 변환할 수도 있지만 비트스트림으로 변환하는 기능은 인터 예측 부호화기(3210) 내의 부호화기(150)가 담당할 수도 있다.In addition, although one or more components added among the resolution encoder 3240 and the differential vector encoder 3250 may be configured as components separate from the inter prediction encoder 3210 as shown in FIG. 32, the encoder in the inter prediction encoder 3210 may be used. It may be configured integrally with 150. Also, the flag information generated by the resolution specifying flag generator 3220 and the resolution switching flag generator 3260 may be converted into a bitstream by the resolution specifying flag generator 3220 and the resolution switching flag generator 3260, respectively. The function may be performed by the encoder 150 in the inter prediction encoder 3210.
한편, 인터 예측 부호화기(3210), 해상도 부호화기(3240), 차분 벡터 부호화기(3250)의 기능은 도 9에서의 인터 예측 부호화기(910), 해상도 부호화기(940), 차분 벡터 부호화기(950)의 기능과 각각 동일 또는 유사할 수 있으므로 인터 예측 부호화기(3210), 해상도 부호화기(3240), 차분 벡터 부호화기(3250)에 대한 상세한 설명은 생략한다.The functions of the inter prediction encoder 3210, the resolution encoder 3240, and the difference vector encoder 3250 are the same as the functions of the inter prediction encoder 910, the resolution encoder 940, and the differential vector encoder 950 in FIG. 9. Since each may be the same or similar, detailed descriptions of the inter prediction encoder 3210, the resolution encoder 3240, and the differential vector encoder 3250 are omitted.
해상도 지정 플래그 생성기(3220)는 해상도의 적응성(Adaptive) 정도를 영상의 영역 또는 움직임 벡터마다 다르게 지정할 수 있다. 해상도 지정 플래그 생성기(3220)는 영상의 영역 또는 움직임 벡터마다 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도의 세트(set)를 지정하는 해상도 지정 플래그를 생성하여 비트스트림에 포함시킬 수 있다. 해상도 지정 플래그에 의해서 움직임 벡터 해상도 및/또는 차분 움직임 벡터의 해상도를 지정하는 영역은 블록, 매크로블록, 블록을 묶은 그룹, 매크로블록을 묶은 그룹, MxN과 같이 임의의 크기를 가지는 영역 등이 될 수 있다. 즉, 해상도 지정 플래그 생성기(3220)는 영상의 모든 영역 또는 일부 영역 내의 하위 영역들에 대해 사용 가능한 해상도를 나타내는 해상도 지정 플래그를 생성하여 비트스트림에 포함시킬 수 있다. 이러한 해상도 지정 플래그는 사용자에 의해 입력되는 설정 정보에 따라 결정되어 생성되거나 부호화할 영상을 분석하여 소정의 판단 기준에 따라 결정되어 생성될 수 있다. 이러한 해상도 지정 플래그는 비트스트림의 헤더에 포함될 수 있는데, 헤더는 픽처 파라미터 셋(Picture Parameter Set), 시퀀스 파라미터 셋(Sequence Parameter Set), 슬라이스 헤더(Slice Header) 등이 될 수 있다.The resolution designation flag generator 3220 may designate an adaptive degree of resolution differently for each region or motion vector of the image. The resolution designation flag generator 3220 may generate and include a resolution designation flag for designating a set of the motion vector resolution and / or the resolution of the differential motion vector for each region or motion vector of the image. The area for specifying the motion vector resolution and / or the differential motion vector resolution by the resolution specification flag may be a block, a macroblock, a group grouping blocks, a group grouping macroblocks, or an area having an arbitrary size such as MxN. have. That is, the resolution designation flag generator 3220 may generate and include a resolution designation flag indicating a resolution available for all regions or sub-regions in a partial region of the image in the bitstream. The resolution designation flag may be determined and generated according to setting information input by a user, or may be determined and generated according to a predetermined criterion by analyzing an image to be encoded. Such a resolution designation flag may be included in a header of the bitstream. The header may be a picture parameter set, a sequence parameter set, a slice header, or the like.
만일, 해상도 지정 플래그가 해상도 종류를 1/2, 1/4로 지정한다면 해상도 결정기(3230)가 결정하는 최적의 해상도 및 해상도 부호화기(3240)가 부호화하는 해상도 식별 플래그는 1/2, 1/4의 해상도 중에서 선택되고, 해상도 식별 플래그는 임의의 방법으로 부호화될 수 있다. 도 33은 지정된 해상도가 1/2, 1/4인 경우에 해상도 식별 플래그를 예시한 도면이다.If the resolution designation flag specifies the resolution type as 1/2 or 1/4, the optimal resolution determined by the resolution determiner 3230 and the resolution identification flag encoded by the resolution encoder 3240 are 1/2 and 1/4. The resolution identification flag can be encoded in any manner. 33 is a diagram illustrating a resolution identification flag when the designated resolutions are 1/2 and 1/4.
또한 해상도 식별 플래그는 Unary, CABAC, 쿼드 트리 부호화 등을 사용하여 부호화 할 수 있다. 예를 들어 CABAC으로 부호화 하는 경우 도 33의 표를 참조하여 이진 비트열을 생성한 다음 산술 및 확률 부호화할 수 있다. 예를 들어 확률 모델은 주변의 움직임 벡터 또는 블록의 해상도를 이용하여 3가지의 경우로 나눌 수 있다. 도 34은 현재 블록 X의 주변 블록인 A와 B와 C를 나타내며, 도 35은 조건에 따른 확률 모델을 예시한 도면이다.In addition, the resolution identification flag may be encoded using Unary, CABAC, quad tree encoding, or the like. For example, when encoding with CABAC, a binary bit string may be generated with reference to the table of FIG. 33, and then arithmetic and probability encoding may be performed. For example, the probabilistic model can be divided into three cases by using the resolution of the surrounding motion vector or block. 34 illustrates A, B, and C, which are neighboring blocks of the current block X, and FIG. 35 is a diagram illustrating a probability model according to a condition.
만일, 해상도 지정 플래그가 해상도 종류를 1/2, 1/4, 1/8로 지정한다면 부호화되는 해상도 식별 플래그는 1/2, 1/4, 1/8의 해상도 중에서 선택되고, 해상도 식별 플래그는 임의의 방법으로 부호화될 수 있다. 도 36은 지정된 해상도가 1/2, 1/4, 1/8인 경우에 해상도 식별 플래그를 예시한 도면이다. 도 36을 참조하면 해상도 식별 플래그는 0 또는 10 또는 11이 될 수 있다.If the resolution designation flag specifies the resolution type as 1/2, 1/4, or 1/8, the resolution identification flag to be encoded is selected from resolutions of 1/2, 1/4, and 1/8, and the resolution identification flag is It can be encoded in any way. 36 is a diagram illustrating a resolution identification flag when the designated resolutions are 1/2, 1/4, and 1/8. Referring to FIG. 36, the resolution identification flag may be 0, 10, or 11.
여기서 해상도 식별 플래그는 Unary, CABAC, 쿼드 트리 부호화 등을 사용하여 부호화 할 수 있다. 예를 들어 CABAC을 부호화 하는 경우 도 36의 표를 참조하여 이진 비트열을 생성한 다음 산술 및 확률 부호화할 수 있다. 예를 들어 확률 모델은 이진 비트열의 색인(binidx)과 주변의 움직임 벡터 또는 블록의 해상도를 이용하여 총 6가지의 경우로 나눌 수 있다. 여기서 도 34와 같이 현재 블록 X의 주변 블록인 A와 B와 C를 나타내는 경우, 도 37은 조건에 따른 확률 모델을 예시한 도면이다.In this case, the resolution identification flag may be encoded using Unary, CABAC, quad tree encoding, or the like. For example, when CABAC is encoded, a binary bit string may be generated with reference to the table of FIG. 36 and then arithmetic and probability encoded. For example, the probabilistic model can be divided into six cases using a binary bit string index (binidx) and the surrounding motion vector or block resolution. Here, as shown in FIG. 34, when A, B, and C, which are neighboring blocks of the current block X, are shown, FIG. 37 is a diagram illustrating a probability model according to a condition.
한편, 해상도 지정 플래그 생성기(3220)가 발생하는 해상도 지정 플래그가 단일 해상도를 나타낼 수도 있다. 예를 들어, 해상도를 적응적으로 적용하지 않고 1/2로 고정하는 경우에 해상도 지정 플래그로 해당 영역의 해상도는 1/2의 해상도로 고정됨을 나타내도록 부호화할 수 있다.Meanwhile, the resolution specifying flag generated by the resolution specifying flag generator 3220 may indicate a single resolution. For example, when the resolution is fixed to 1/2 without adaptively applying the resolution, the resolution designation flag may be encoded to indicate that the resolution of the corresponding area is fixed at 1/2 resolution.
또한, 복수개의 참조 픽처를 사용하는 경우, 해상도 지정 플래그를 부호화하지 않고 임의의 기준에 따라 참조 픽처마다 해상도의 적응성(adaptive) 정도(즉, 해상도 세트)를 다르게 할 수 있다. 예를 들어, 참조 픽처와 현재 픽처 간의 거리에 따라 해상도의 적응성 정도를 다르게 할 수 있다.In the case where a plurality of reference pictures are used, the adaptive degree of the resolution (that is, the resolution set) can be changed for each reference picture according to an arbitrary criterion without encoding the resolution designation flag. For example, the degree of adaptability of the resolution may vary according to the distance between the reference picture and the current picture.
도 38 및 도 39는 현재 픽처와 참조 픽처 간의 거리에 따른 적응성 정도(즉, 해상도 세트)를 예시한 도면이다. 도 38에 도시하듯이, 현재 픽처와 참조 픽처 간의 거리가 복수개의 참조 픽처들 중 가장 가까운 경우 해상도는 1/1, 1/2, 1/4, 1/8 의 해상도 세트 중에서 최적의 해상도를 선택하고 해상도 식별 플래그를 부호화하고, 현재 픽처와 참조 픽처 간의 거리가 복수개의 참조 픽처들 중 가장 먼 경우 해상도는 1/2, 1/4의 해상도 세트 중에서 최적의 해상도를 선택하고 해상도 식별 플래그를 부호화하고, 현재 픽처와 참조 픽처 간의 거리가 복수개의 참조 픽처들 중 가장 멀지도 않고 가장 가깝지도 않다면, 해상도는 1/2, 1/4, 1/8의 해상도 세트 중에서 최적의 해상도를 선택하고 부호화 하도록 설정할 수 있다. 도 39를 참조하면 단일 해상도를 사용할 수도 있음을 알 수 있다.38 and 39 are diagrams illustrating the degree of adaptability (ie, a resolution set) according to a distance between a current picture and a reference picture. As shown in FIG. 38, when the distance between the current picture and the reference picture is the closest among the plurality of reference pictures, the resolution selects an optimal resolution from a set of resolutions of 1/1, 1/2, 1/4, and 1/8. And encoding a resolution identification flag, and if the distance between the current picture and the reference picture is the furthest of the plurality of reference pictures, the resolution selects an optimal resolution from a resolution set of 1/2, 1/4, and encodes the resolution identification flag. If the distance between the current picture and the reference picture is not the furthest or closest among the plurality of reference pictures, the resolution can be set to select and encode the optimal resolution among the 1/2, 1/4, and 1/8 resolution sets. Can be. Referring to FIG. 39, it can be seen that a single resolution may be used.
또한, 참조 픽처 생성 시에 각 해상도 간의 SSD (Sum of Squared Difference) 등의 에러 측정 수단을 이용하여 해상도의 적응성 정도를 다르게 할 수 있다. 예를 들어, 사용 가능한 해상도가 1/1, 1/2, 1/4, 1/8인 경우, 참조 픽처를 보간(interpolation) 할 때, 먼저 1/1과 1/2의 해상도에 대하여 SSD 등의 에러 측정 수단을 이용하여 구한 에러값이 임의의 임계값(threshold)을 넘지 않는 경우 해상도 1/2은 사용하지 않도록 하고 임계값(threshold)을 넘는 경우 해상도 1/2을 사용하도록 설정할 수 있다. 그리고 1/2의 해상도를 사용하지 않도록 설정된 경우, 1/1과 1/4의 해상도에 대하여 SSD 등의 에러 측정 수단을 이용하여 구한 에러값이 임의의 임계값을 넘지 않는 경우 1/4을 사용하지 않고 에러값이 임의의 임계값을 넘는 경우 1/1과 1/4의 해상도를 모두 사용하도록 설정한다. 그리고 1/4의 해상도를 사용하도록 설정된 경우, 1/4과 1/8 의 해상도에 대하여 SSD 등의 에러 측정 수단을 이용하여 구한 에러값이 임의의 임계값을 넘지 않는 경우 1/8을 사용하지 않고 에러값이 임의의 임계값을 넘는 경우 1/1, 1/4, 1/8의 해상도를 모두 사용한다. 여기서, 임계값은 해상도 별로 또는 양자화 파라미터 별로 다를 수도 있고 동일할 수도 있다.In addition, the degree of adaptability of the resolution may be changed by using error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture. For example, when the available resolutions are 1/1, 1/2, 1/4, and 1/8, when interpolating a reference picture, SSD, etc., for the resolution of 1/1 and 1/2 are first used. If the error value obtained using the error measuring means does not exceed a certain threshold, the resolution 1/2 may not be used, and if the error value exceeds the threshold, the resolution 1/2 may be set to be used. When the resolution of 1/2 is set not to be used, 1/4 is used when the error value obtained by using an error measuring means such as SSD for the resolution of 1/1 and 1/4 does not exceed an arbitrary threshold value. If the error value exceeds a certain threshold, set both 1/1 and 1/4 resolutions. When the resolution of 1/4 is set, do not use 1/8 when the error value obtained by using an error measuring means such as SSD for the resolution of 1/4 and 1/8 does not exceed an arbitrary threshold value. If the error value exceeds a certain threshold, all resolutions of 1/1, 1/4, and 1/8 are used. Here, the threshold may be different or the same by resolution or by quantization parameter.
또한, 참조 픽처마다 해상도의 적응성 정도를 다르게 함을 부호화 할 수 있다. 예를 들어, 참조 픽처를 3개 사용하는 경우 도 40과 같이 소정의 해상도 세트마다 다른 참조픽처 인덱스 번호(도 9에서 해상도 세트 인덱스. 이는 참조픽처 번호일 수 있음)를 헤더에 저장하여 복호화 장치로 전송할 수 있다.In addition, it is possible to encode that the degree of adaptability of the resolution is different for each reference picture. For example, when three reference pictures are used, as shown in FIG. 40, a reference picture index number (the resolution set index in FIG. 9, which may be a reference picture number) for each predetermined resolution set is stored in a header to the decoding apparatus. Can transmit
도 41은 참조픽처들이 부호화되는 구조를 예시한 도면이다.41 is a diagram illustrating a structure in which reference pictures are encoded.
한편, 해상도 지정 플래그 생성기(3220)는 참조 픽처로 사용될 픽처의 경우와 참조 픽처로 사용되지 않는 경우 해상도 세트를 다르게 둘 수 있다. 예를 들어 참조 픽처들이 도 41과 같은 구조로 부호화 되고 타임 레이어(Time layer)에 따라 TL0, TL1, TL2는 참조 픽처로 사용되는 픽처들이고 TL3의 픽처들은 참조 픽처로 사용되지 않는 픽처들인 것으로 가정한다. 이때, 해상도 지정 플래그 생성기(3220)에 의해 해상도 세트가 1/2, 1/4로 지정된 경우 참조 픽처별 해상도 세트를 도 42와 같이 둘 수 있다.Meanwhile, the resolution designation flag generator 3220 may set the resolution set differently in case of a picture to be used as a reference picture and when it is not used as a reference picture. For example, it is assumed that reference pictures are encoded in the structure as shown in FIG. 41 and according to a time layer, TL0, TL1, and TL2 are pictures used as reference pictures, and pictures of TL3 are pictures not used as reference pictures. . In this case, when the resolution set is set to 1/2 and 1/4 by the resolution designation flag generator 3220, the resolution set for each reference picture may be set as shown in FIG. 42.
도 42를 참조하면 픽처 6번을 부호화 할 때의 해상도 세트는 1/2과 1/4이 되고, 이와 같이 결정된 해상도 세트에 대하여 임의의 영역 또는 움직임 벡터 단위로 해상도 식별 플래그 또는 해상도 지정 플래그가 부호화될 수 있다. 픽처 9번을 부호화 할 때는 해상도가 단일 해상도이므로 해상도 식별 플래그 또는 해상도 지정 플래그는 부호화 하지 않을 수 있다.Referring to FIG. 42, the resolution sets at the time of encoding picture 6 are 1/2 and 1/4, and the resolution identification flag or the resolution designation flag is encoded in an arbitrary region or motion vector unit with respect to the resolution set thus determined. Can be. When picture 9 is encoded, since the resolution is a single resolution, the resolution identification flag or the resolution designation flag may not be encoded.
한편, 해상도 지정 플래그 생성기(3220)는 도 9의 설명에서 언급한 해상도 변경 플래그 생성기(920)의 기능을 모두 포함할 수 있다.Meanwhile, the resolution designation flag generator 3220 may include all the functions of the resolution change flag generator 920 mentioned in the description of FIG. 9.
해상도 전환 플래그 생성기(3260)는 현재 해상도를 부호화할 영역의 주변 또는 이전 값과의 변화를 알려주는 해상도 전환 플래그를 발생한다.The resolution switch flag generator 3260 generates a resolution switch flag indicating a change from the surrounding or previous value of the area to encode the current resolution.
도 43은 현재 블록의 해상도와 주변 블록의 해상도를 예시한 도면이다.43 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block.
예를 들어 해상도 세트가 1/2, 1/4, 1/8 이고, 주변 블록의 해상도와 현재 최적의 해상도가 도 43과 같을 경우, 주변 블록의 해상도는 (1/8, 1/4, 1/4, 1/4) 이므로 빈도수가 가장 높은 해상도는 1/4이다. 또한 현재 블록 X의 최적의 해상도 역시 1/4 이므로 해상도 전환 플래그를 0으로 부호화한다. 이 경우에 복호화기에서는 비트스트림에서 해상도 전환 플래그를 추출하고, 해상도 전환 플래그가 0인 경우 주변 블록의 해상도 중에서 빈도수가 가장 높은 해상도인 1/4이 현재 블록 X의 해상도 임을 알 수 있다.For example, if the resolution set is 1/2, 1/4, 1/8, and the resolution of the neighboring block and the current optimal resolution are as shown in FIG. 43, the resolution of the neighboring block is (1/8, 1/4, 1 / 4, 1/4), so the highest resolution is 1/4. In addition, since the optimal resolution of the current block X is 1/4, the resolution conversion flag is encoded as 0. In this case, the decoder extracts the resolution switch flag from the bitstream, and when the resolution switch flag is 0, it can be seen that 1/4, the resolution having the highest frequency among the resolutions of the neighboring blocks, is the resolution of the current block X.
도 44는 현재 블록의 해상도와 주변 블록의 해상도의 다른 예를 도시한 도면이고, 도 45는 해상도에 따른 해상도 식별 플래그를 예시한 도면이다.FIG. 44 is a diagram illustrating another example of the resolution of the current block and the resolution of the neighboring block, and FIG. 45 is a diagram illustrating a resolution identification flag according to the resolution.
도 44에서 현재 블록 X의 최적의 해상도가 주변 블록의 해상도 중 빈도수가 가장 높은 1/4이 아니므로 해상도 전환 플래그는 1로 부호화하여 주변값과 다른 해상도임을 나타내고 현재 블록 X의 해상도는 도 45의 표를 이용하여 해상도 식별 플래그를 1로 부호화 한다. 현재 해상도가 1/4인 경우 전환되는 해상도가 1/4이 선택될 가능성은 없으므로 해상도 1/4의 경우에는 해상도 식별 플래그를 부여하지 않는다.In FIG. 44, since the optimal resolution of the current block X is not 1/4 of the highest frequency among the resolutions of the neighboring blocks, the resolution conversion flag is coded as 1 to indicate that the resolution is different from the neighboring value. The resolution identification flag is encoded as 1 using the table. If the current resolution is 1/4, it is unlikely that 1/4 will be selected as the resolution to be switched. Therefore, resolution 1/4 is not given a resolution identification flag.
도 46은 현재 블록의 해상도와 주변 블록의 해상도를 예시한 도면이다.46 is a diagram illustrating a resolution of a current block and a resolution of a neighboring block.
예를 들어 해상도 세트가 1/2, 1/4 이고 도 46과 같이 부호화 할 경우 현재 블록 X의 이전 블록은 A 이므로 해상도 전환 플래그는 블록 A와 현재 블록 X의 해상도가 동일한지를 나타낼 수 있다. 따라서 위와 같은 경우 블록 A와 현재 블록 X의 해상도가 동일하지 않으므로 해상도 전환 플래그는 1이 될 수 있다. 또한 해상도 세트가 1/2과 1/4이므로 해상도 식별 플래그를 따로 부호화 하지 않고 해상도 전환 플래그 만으로도 현재 블록의 해상도가 1/4임을 알 수 있다. For example, when the resolution set is 1/2, 1/4, and the encoding is performed as shown in FIG. 46, the previous block of the current block X is A, and thus the resolution switch flag may indicate whether the resolution of the block A and the current block X are the same. Therefore, in the above case, since the resolutions of the block A and the current block X are not the same, the resolution switching flag may be 1. In addition, since the resolution sets are 1/2 and 1/4, it is understood that the resolution of the current block is 1/4 using only the resolution conversion flag without encoding the resolution identification flag.
도 47은 본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법을 도시한 도면이다.FIG. 47 is a diagram illustrating a video encoding method using adaptive motion vector resolution, according to a second embodiment of the present invention.
도 47에 도시하듯이, 본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법은 해상도 지정 플래그 생성단계(S4702), 해상도 결정단계(S4704), 인터예측 부호화단계(S4706), 차분벡터 부호화단계(S4708), 해상도 부호화단계(S4710), 해상도 전환 플래그 생성단계(S4712)를 포함한다.As shown in FIG. 47, in the video encoding method using the adaptive motion vector resolution according to the second embodiment of the present invention, a resolution designation flag generation step (S4702), a resolution determination step (S4704), and an inter prediction encoding step (S4706) , Differential vector encoding step S4708, resolution encoding step S4710, and resolution conversion flag generation step S4712.
해상도 지정 플래그 생성단계(S4702)는 해상도 지정 플래그 생성기(3220)의 동작에, 해상도 결정단계(S4704)는 해상도 결정기(3230)의 동작에, 인터예측 부호화단계(S4706)는 인터예측 부호화기(3210)의 동작에, 차분벡터 부호화단계(S4708)는 차분벡터 부호화기(3250)의 동작에, 해상도 부호화단계(S4710)는 해상도 부호화기(3240)의 동작에, 해상도 전환 플래그 생성단계(S4712)는 해상도 전환 플래그 생성기(3260)의 동작에 각각 대응되므로 상세한 설명은 생략한다.The resolution designation flag generation step S4702 is performed by the operation of the resolution designation flag generator 3220, the resolution determination step S4704 is performed by the resolution determiner 3230, and the inter prediction encoding step S4706 is the inter prediction encoder 3210. In operation S4708, the difference vector encoding operation S4708 operates in the operation of the difference vector encoder 3250, the resolution encoding operation S4710 operates in the operation of the resolution encoder 3240, and the resolution conversion flag generating operation S4712 includes the resolution switching flag. Since the operation corresponds to the operation of the generator 3260, detailed description thereof will be omitted.
또한, 상기의 단계 중에서 영상 부호화 장치(3200)의 각 구성요소의 존재 여부에 따라 본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 부호화 방법 중에서 생략되는 단계가 존재할 수도 있다.In addition, there may be a step omitted from the image encoding method using the adaptive motion vector resolution according to the second embodiment of the present invention, depending on whether each component of the image encoding apparatus 3200 exists.
도 18은 본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 장치를 간략하게 나타낸 블록 구성도이다.18 is a block diagram schematically illustrating an apparatus for decoding an image using adaptive motion vector resolution according to a first embodiment of the present invention.
본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 장치(1800)는, 해상도 변경 플래그 추출기(1810), 해상도 복호화기(1820), 차분 벡터 복호화기(1830) 및 인터 예측 복호화기(1840)를 포함하여 구성될 수 있다.The image decoding apparatus 1800 using the adaptive motion vector resolution according to the first embodiment of the present invention includes a resolution change flag extractor 1810, a resolution decoder 1820, a differential vector decoder 1830, and inter prediction decoding. It can be configured to include a group (1840).
해상도 변경 플래그 추출기(1810)는 비트스트림으로부터 해상도 변경 플래그를 추출한다. 즉, 해상도 변경 플래그 추출기(1810)는 비트스트림의 헤더에서 움직임 벡터 해상도가 고정되는지 또는 영역마다 변경되어 결정되는지 여부를 나타내는 해상도 변경 플래그를 추출한다. 해상도 변경 플래그 추출기(1810)는 해상도 변경 플래그가 움직임 벡터 해상도가 고정되는 것을 나타내면, 비트스트림으로부터 부호화된 움직임 벡터 해상도를 추출하여 복호화함으로써 복원된 고정된 움직임 벡터 해상도 또는 기 설정된 움직임 벡터 해상도로 인터 예측 복호화기(1840)가 헤더에서 정의된 모든 하위 영역에 대해 인터 예측 복호화하도록 제어하며, 차분 벡터 복호화기(1830)로 하여금 고정된 움직임 벡터 해상도로 각 영역의 움직임 벡터를 복원하도록 제어한다. 해상도 변경 플래그 추출기(1810)는 해상도 변경 플래그가 움직임 벡터 해상도가 영역 또는 움직임 벡터마다 변경되어 결정됨을 나타내면, 해상도 복호화기(1820)로 하여금 헤더에 정의된 하위 영역의 각 영역 또는 움직임 벡터의 움직임 벡터 해상도를 복원하도록 제어하며, 인터 예측 복호화기(1840)로 하여금 헤더에서 정의된 하위 각 영역 또는 움직임 벡터에 대해 복원된 움직임 벡터 해상도로 인터 예측 복호화하도록 제어하며, 차분 벡터 복호화기(1830)로 하여금 복원된 움직임 벡터 해상도로 각 영역의 움직임 벡터를 복원하도록 제어한다.The resolution change flag extractor 1810 extracts a resolution change flag from the bitstream. That is, the resolution change flag extractor 1810 extracts a resolution change flag indicating whether the motion vector resolution is fixed or changed for each region in the header of the bitstream. When the resolution change flag extractor 1810 indicates that the motion change resolution is fixed, the resolution change flag extractor 1810 extracts and decodes the encoded motion vector resolution from the bitstream to inter-predict the fixed motion vector resolution or the preset motion vector resolution. The decoder 1840 controls inter prediction decoding on all sub-regions defined in the header, and controls the difference vector decoder 1830 to reconstruct the motion vector of each region at a fixed motion vector resolution. When the resolution change flag extractor 1810 indicates that the resolution change flag indicates that the motion vector resolution is changed for each region or motion vector, the resolution decoder flag 1820 causes the motion decoder 1820 to move the motion vector of each region or motion vector of the lower region defined in the header. Control to reconstruct the resolution, and control the inter prediction decoder 1840 to inter predict and decode the reconstructed motion vector resolution for the lower angular region or motion vector defined in the header, and cause the differential vector decoder 1830 to Control to restore the motion vector of each region to the reconstructed motion vector resolution.
또한, 해상도 변경 플래그 추출기(1810)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터의 예측 움직임 벡터 또는 차분 벡터의 크기가 임계값보다 큰 경우에는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 소정의 값으로 결정할 수 있다. 예를 들어, 어느 영역의 예측 움직임 벡터의 크기 또는 차분 벡터의 크기가 임계값보다 큰 경우에는 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도를 소정의 값 또는 임의의 값으로 결정하여 해당 영역의 움직임 벡터 해상도를 복호화하지 않을 수 있다. 또한, 어느 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터의 크기가 크거나 해당 영역의 움직임 벡터의 크기가 임계값보다 큰 경우에는 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도를 소정의 값 또는 임의의 값으로 결정하여 움직임 벡터 해상도를 복호화하지 않을 수 있다. 이 경우, 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도는 어떠한 플래그가 없이도 임의의 해상도로 변경될 수 있다. 임계값은 미리 지정된 값이거나 입력되는 어떠한 값이 될 수도 있으며 주위 블록의 움직임 벡터부터 계산될 수도 있다.Further, the resolution change flag extractor 1810 may determine the motion vector resolution determined for each region or motion vector when the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region or motion vector is larger than the threshold. May be determined as a predetermined value. For example, when the magnitude of the prediction motion vector or the difference vector of a certain region is larger than the threshold, the motion vector resolution of the region or motion vector is determined as a predetermined value or a random value. It may not be decoded. In addition, when the size of the motion vector of the region or the surrounding vector of the motion vector is large or the size of the motion vector of the region is larger than the threshold value, the motion vector resolution of the region or the motion vector is set to a predetermined value or any value. In this case, the motion vector resolution may not be decoded. In this case, the motion vector resolution of the region or motion vector may be changed to any resolution without any flag. The threshold may be a predetermined value or any value input and may be calculated from motion vectors of surrounding blocks.
해상도 복호화기(1820)는 해상도 변경 플래그 추출기(1810)에 의해 추출된 해상도 변경 플래그에 따라 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 영역마다의 움직임 벡터 해상도를 복원한다. 한편 이하의 설명에서 해상도 복호화기(1820)가 움직임 벡터 해상도를 복호하는 것으로 설명한다고 하더라도 이는 설명의 편의를 위한 것이며, 실제로는 움직임 벡터 해상도 또는 차분 움직임 벡터의 해상도를 복호하거나 둘 모두의 해상도를 복호할 수도 있다. 따라서, 해상도 식별 플래그가 나타내는 해상도는 움직임 벡터 해상도 또는 차분 움직임 벡터의 해상도이거나 움직임 벡터 해상도와 차분 움직임 벡터의 해상도에 동시에 사용될 수도 있다.The resolution decoder 1820 extracts and decodes the resolution identification flag encoded from the bitstream according to the resolution change flag extracted by the resolution change flag extractor 1810 to restore the motion vector resolution for each region. In the following description, although the resolution decoder 1820 decodes the motion vector resolution, this is for convenience of description, and in reality, the resolution of the motion vector resolution or the differential motion vector or both resolutions are decoded. You may. Accordingly, the resolution indicated by the resolution identification flag may be the resolution of the motion vector resolution or the differential motion vector, or may be used simultaneously for the motion vector resolution and the resolution of the differential motion vector.
이를 위해, 해상도 복호화기(1810)는 동일한 움직임 벡터 해상도를 가지는 영역끼리 묶어 쿼드 트리 구조로 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다.To this end, the resolution decoder 1810 may reconstruct the motion vector resolution for each region or motion vector by decoding resolution identification flags hierarchically encoded in a quad tree structure by tying regions having the same motion vector resolution.
도 10 내지 도 12를 참조하면, 해상도 복호화기(1820)는 도 10에 도시한 바와 같은 쿼드 트리 형태를 도 12와 같이 각 영역별로 나누어 해상도 식별 플래그를 복호화하여 움직임 벡터 해상도를 복원한다. 예를 들어, 도 11과 같이 부호화되어 생성된 해상도 식별 플래그를 복호하는 경우, 첫 번째 비트는 '1'이므로 계층이 분할되었음을 알 수 있고, 두 번째 비트는 '0'이므로 레벨 1의 첫 번째 노드는 분할되지 않았음을 알 수 있으므로 다음 비트들을 복호화하여 1/2의 움직임 벡터 해상도를 복원한다. 이와 같은 방법으로, 도 10 및 도 11을 통해 전술한 바와 같은 부호화 방법과 동일하되 역순으로 레벨 1과 레벨 2에 대한 해상도 식별 플래그를 복호화하여 해당 영역들 또는 움직임 벡터들의 움직임 벡터 해상도를 복원하며, 레벨 3은 헤더에 포함된 최대 계층의 개수와 최하위 노드가 가리키는 영역의 크기를 나타내는 식별자에 의해 최대 계층의 개수가 3 개로 정의되어 있으므로, 더 이상의 하위 계층이 없다고 판단하여 각 영역들의 움직임 벡터 해상도만을 복원한다. 이를 위해, 해상도 복호화기(1810)는 쿼드 트리 계층의 최대 개수 및 쿼드 트리 계층의 최하위 노드가 가리키기는 영역 크기를 나타내는 식별자를 복호화하는데, 이러한 식별자는 비트스트림의 헤더에 포함된다.10 to 12, the resolution decoder 1820 reconstructs a motion vector resolution by decoding a resolution identification flag by dividing a quad tree form as shown in FIG. 10 into respective regions as shown in FIG. 12. For example, when decoding the resolution identification flag generated by encoding as shown in FIG. 11, the first bit is '1' and thus the layer is divided. The second bit is '0', so the first node of level 1 Since it is known that is not divided, the next bits are decoded to restore the motion vector resolution of 1/2. In this manner, the same as the encoding method described above with reference to FIGS. 10 and 11, but in reverse order, the resolution identification flags for level 1 and level 2 are decoded to restore motion vector resolution of the corresponding regions or motion vectors. In level 3, since the maximum number of layers is defined as three by the identifier indicating the maximum number of layers included in the header and the size of the area indicated by the lowest node, it is determined that there are no lower layers, so only the motion vector resolution of each area is determined. Restore To this end, the resolution decoder 1810 decodes an identifier indicating the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer, which is included in the header of the bitstream.
또한, 전술한 예시에서는 노드가 하위 계층으로 분할되었음(즉, 4개의 구역으로 분할됨) 또는 분할되지 않았음의 두 가지만 예를 들었으나, 도 20에 도시한 바와 같이, 하위 계층으로 분할되지 않았음, 가로로 긴 두 개의 영역으로 나누어짐, 세로로 긴 두 개의 영역으로 나누어짐, 4 개의 구역으로 나누어짐과 같이 다양한 방식으로 노드를 하위 계층으로 분할할 수 있다.In addition, in the above-described example, only two examples of nodes are divided into lower layers (that is, divided into four zones) or not divided are shown. However, as shown in FIG. 20, the nodes are not divided into lower layers. Well, a node can be divided into lower layers in various ways: divided into two horizontally long regions, divided into two vertically long regions, and divided into four regions.
또한, 해상도 복호화기(1820)는 각 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 예를 들어, 해상도 복호화기(1820)는 비트스트림으로부터 각 영역 또는 움직임 벡터에 대해 추출된 해상도 식별 플래그가 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도와 동일함을 나타내는 경우(예를 들어, 해상도 식별 플래그의 비트값이 '1'인 경우), 비트트스트림으로부터 다음 해상도 식별 플래그를 읽지 않고 해당 영역의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 복원할 수 있으며, 해상도 식별 플래그가 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도와 동일하지 않음을 나타내는 경우(예를 들어, 해상도 식별 플래그의 비트값이 '0'인 경우), 비트스트림으로부터 해당 해상도 식별 플래그의 다음 비트값을 읽어들여 복호화함으로써 복원되는 움직임 벡터 해상도를 복원할 수 있다.In addition, the resolution decoder 1820 decodes the resolution identification flag encoded by using the motion vector resolution predicted by using the motion vector resolution of each area or the surrounding area of the motion vector to determine the motion vector resolution for each area or motion vector. Can be restored For example, the resolution decoder 1820 indicates that the resolution identification flag extracted for each region or motion vector from the bitstream is the same as the motion vector resolution predicted using the motion vector resolution of the surrounding region (e.g., For example, when the bit value of the resolution identification flag is '1'), the motion vector resolution predicted using the motion vector resolution of the surrounding area of the corresponding region may be restored without reading the next resolution identification flag from the bitstream. If the resolution identification flag indicates that it is not the same as the motion vector resolution predicted using the motion vector resolution of the surrounding area (for example, when the bit value of the resolution identification flag is '0'), the corresponding resolution is identified from the bitstream. Solution of motion vector restored by reading and decoding the next bit value of the flag You can restore the top view.
또한, 해상도 복호화기(1820)는 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 런과 길이가 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 예를 들어, 해상도 복호화기(1820)는 여러 영역들을 포함하는 일부 영역에 대한 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도가 함께 부호화된 해상도 식별 플래그를 복호화하여 움직임 벡터 해상도의 런과 길이를 복원하고 복원된 움직임 벡터 해상도의 런과 길이를 이용하여 도 12와 같은 영역들의 움직임 벡터 해상도를 복원할 수 있다.In addition, the resolution decoder 1820 may restore the motion vector resolution for each region or motion vector by decoding the resolution identification flag in which the run and the length of the motion vector resolution for each region or the motion vector are encoded. For example, the resolution decoder 1820 decodes the resolution identification flag encoded together with the motion vector resolution and / or the differential motion vector resolution for some regions including several regions to restore the run and length of the motion vector resolution. The motion vector resolution of the regions shown in FIG. 12 may be restored using the reconstructed run and length of the motion vector resolution.
또한, 해상도 복호화기(1820)는 영역 또는 움직임 벡터마다의 움직임 벡터 해상도가 태그 트리를 이용하여 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 영역마다의 움직임 벡터 해상도를 복원할 수 있다. 도 13 및 도 14를 참조하여 예를 들면, 해상도 복호화기(1820)는 도 14에 도시된 첫 번째 영역의 비트가 '0111'이어서 레벨 0에 대응되는 비트는 '01'임을 알 수 있으므로, 레벨 0에서 상위 계층의 움직임 벡터 해상도의 번호는 '0'이라고 가정되었으므로, 번호의 차이값이 '1'이 증가되는 1/2의 움직임 벡터 해상도를 복원할 수 있다. 또한, 그 다음 비트는 '1'이어서 상위 계층과의 번호의 차이값이 '0'이므로, 레벨 1도 1/2의 움직임 벡터 해상도로 복원된다. 그 다음 비트도 '1'이므로 같은 방법으로 레벨 2와 레벨 3도 1/2의 움직임 벡터 해상도로 복원될 수 있다. 도 14에 도시된 두 번째 영역의 비트는 '01'인데, 이미 첫 번째 영역에서 레벨 0, 레벨 1, 레벨 2에 대해서는 복호화되었으므로, 레벨 3만을 복호화하면 되며, 레벨 3에서는 상위 계층과의 번호의 차이값이 '1'이므로 1/4의 움직임 벡터 해상도를 복원할 수 있다. 이와 같은 방법으로, 나머지 영역들의 움직임 벡터 해상도도 복원될 수 있다.In addition, the resolution decoder 1820 may reconstruct the motion vector resolution for each region by decoding the resolution identification flag hierarchically coded using the tag tree for the motion vector resolution for each region or motion vector. For example, with reference to FIGS. 13 and 14, the resolution decoder 1820 may know that the bit corresponding to the level 0 is '01' because the bit of the first region illustrated in FIG. 14 is '0111'. Since the number of motion vector resolutions of the upper layer from 0 is assumed to be '0', it is possible to restore the motion vector resolution of 1/2 in which the difference value of the number is increased to '1'. In addition, since the next bit is '1', the difference between the number and the upper layer is '0', so that the level 1 is also restored to the motion vector resolution of 1/2. Since the next bit is also '1', level 2 and level 3 may be restored to a motion vector resolution of 1/2 as well. The bit of the second region shown in FIG. 14 is '01', and since it has already been decoded for level 0, level 1, and level 2 in the first region, only level 3 needs to be decoded. Since the difference is '1', the motion vector resolution of 1/4 can be restored. In this way, the motion vector resolution of the remaining areas can also be restored.
또한, 해상도 복호화기(1820)는 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 빈도수에 따라 해상도 식별 플래그에 할당하는 비트수를 변경하여 복호화할 수 있다. 예를 들어, 해상도 복호화기(1820)는 직전 영역까지 복원된 움직임 벡터 해상도의 빈도수를 계산하고 계산된 빈도수에 따라 움직임 벡터 해상도에 번호를 부여하고 번호에 따라 비트수를 할당하여 복호화할 수 있다.The resolution decoder 1820 may change and decode the number of bits allocated to the resolution identification flag according to the frequency of the motion vector resolution for each region or motion vector. For example, the resolution decoder 1820 may calculate the frequency of the motion vector resolution reconstructed up to the last region, number the motion vector resolution according to the calculated frequency, and allocate and decode the number of bits according to the number.
영역 그룹은 쿼드 트리, 쿼드 트리 묶음, 태그 트리, 태그 트리 묶음, 매크로블록, 매크로블록 묶음, 임의의 크기의 영역이 될 수 있다. 예를 들면, 영역 그룹을 매크로블록 2 개로 지정한 경우, 매크로블록 2 개마다 움직임 벡터 해상도의 발생 빈도수를 업데이트하여 움직임 벡터 해상도의 비트수를 할당하여 복호화하거나, 영역 그룹을 쿼드 트리 4개로 지정한 경우, 쿼드 트리 4개마다 움직임 벡터 해상도의 발생 빈도수를 업데이트하여 움직임 벡터 해상도의 비트수를 할당하여 복호화한다An area group may be a quad tree, a quad tree bundle, a tag tree, a tag tree bundle, a macroblock, a macroblock bundle, and an area of any size. For example, when the area group is designated as two macroblocks, the frequency of occurrence of the motion vector resolution is updated by every two macroblocks, and the number of bits of the motion vector resolution is allocated and decoded, or the area group is designated as four quad trees. The frequency of occurrence of the motion vector resolution is updated every four quad trees, and the number of bits of the motion vector resolution is allocated and decoded.
또한, 해상도 복호화기(1820)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 복호화 방법을 달리할 수 있다. 주위 영역 또는 영역 그룹의 움직임 벡터 해상도의 분포에 따라 해당 영역의 해상도가 될 확률이 가장 높은 움직임 벡터 해상도에 가장 짧은 비트수를 할당하여 복호화한다. 예를 들면, 해당 영역의 왼쪽 영역의 움직임 벡터 해상도가 1/2이고 위쪽 영역의 움직임 벡터 해상도가 1/2인 경우, 해당 영역의 움직임 벡터 해상도는 1/2이 될 확률이 가장 높으므로 1/2 움직임 벡터 해상도에 가장 짧은 비트수를 할당하여 복호화한다. 또 다른 예로, 해당 영역의 왼쪽 영역의 움직임 벡터 해상도가 1/4이고 왼쪽위 영역의 움직임 벡터 해상도가 1/2이고 위쪽 영역의 움직임 벡터 해상도가 1/2이고 오른쪽위 영역의 움직임 벡터 해상도가 1/2인 경우, 해당 영역의 움직임 벡터 해상도의 확률을 1/2, 1/4, 1/8 등과 같이 확률이 높은 순서로 짧은 비트수를 할당하여 복호화한다.In addition, the resolution decoder 1820 may vary the decoding method of the resolution identification flag based on the distribution of the motion vector resolution of the surrounding area of each region with the motion vector resolution determined for each region or motion vector. According to the distribution of the motion vector resolution of the surrounding area or region group, the shortest number of bits is allocated and decoded to the motion vector resolution having the highest probability of being the resolution of the corresponding area. For example, if the motion vector resolution of the left region of the region is 1/2 and the motion vector resolution of the upper region is 1/2, the motion vector resolution of the region is most likely to be 1/2, so 1 / The shortest number of bits is allocated to two motion vector resolutions and decoded. As another example, the motion vector resolution of the left region of the region is 1/4, the motion vector resolution of the upper region is 1/2, the motion vector resolution of the upper region is 1/2 and the motion vector resolution of the upper right region is 1 In case of / 2, the probability of motion vector resolution of the corresponding region is decoded by allocating short bits in order of high probability such as 1/2, 1/4, 1/8, and so on.
또한, 해상도 복호화기(1820)는 산술 복호화로 엔트로피 복호화할 때, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 이진화 비트열의 생성 방법을 달리 하고, 확률 모델도 주위 영역의 움직임 벡터 해상도의 분포 및 현재까지 발생한 움직임 벡터 해상도의 확률에 따라 달리 적용하여 산술 복호화 및 확률 업데이트를 수행할 수 있다. 또한, 비트의 위치에 따라 각기 다른 확률 모델을 사용하여 산술 복호화 및 확률 업데이트를 수행할 수 있다. 예를 들면, CABAC으로 복호화 하고, 복호화에 사용되는 움직임 벡터 해상도가 1/2, 1/4, 1/8과 같이 3개의 움직임 벡터 해상도만 사용한다고 가정할 때, 해당 영역의 왼쪽 영역의 움직임 벡터 해상도가 1/2이고 위쪽 영역의 움직임 벡터 해상도가 1/2인 경우, 1/2 움직임 벡터 해상도에 도 21과 같이 '0'인 가장 짧은 이진화 비트열를 할당하고 나머지 1/4 움직임 벡터 해상도와 1/8 움직임 벡터 해상도에는 지금까지 발생한 확률이 높은 순서로 짧은 이진화 비트를 할당한다.In addition, when the resolution decoder 1820 entropy decodes by arithmetic decoding, a method of generating a binarization bit string of the resolution identification flag based on a distribution of motion vector resolutions of the surrounding regions of each region according to a motion vector resolution determined for each region or motion vector. In this case, the arithmetic decoding and the probability update may be performed by differently applying the probabilistic model according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution generated up to now. In addition, arithmetic decoding and probability updating may be performed using different probability models according to bit positions. For example, assuming that only three motion vector resolutions such as 1/2, 1/4, and 1/8 are used for decoding with CABAC, and the motion vector resolution used for decoding is 1/2, 1/4, 1/8, If the resolution is 1/2 and the motion vector resolution of the upper region is 1/2, assign the shortest binarization bit string of '0' to 1/2 motion vector resolution as shown in Fig. 21, and the remaining 1/4 motion vector resolution and 1 The / 8 motion vector resolutions are assigned short binarization bits in the order of the highest probability of occurrence.
이때, 1/4 움직임 벡터 해상도보다 1/8 움직임 벡터 해상도가 지금까지 발생한 확률이 높은 경우, 도 21과 같이 '00'인 비트열을 1/8 움직임 벡터 해상도에 할당하고, '01'인 비트열을 1/2 움직임 벡터 해상도에 할당한다. 또한, 첫 번째 이진화 비트를 복호화할 때, 확률 모델을 4 가지의 확률 모델로 나누어 복호화할 수 있다. 4 가지의 확률 모델은 첫째, 왼쪽 영역과 위쪽 영역의 해상도가 모두 같고 지금까지의 가장 높은 확률의 해상도와 같은 경우의 확률 모델, 둘째, 왼쪽 영역과 위쪽 영역의 해상도가 모두 같고 지금까지의 가장 높은 확률의 해상도와 다른 경우의 확률 모델, 셋째, 왼쪽 영역과 위쪽 영역의 해상도가 모두 다르고 지금까지의 가장 높은 확률의 해상도와 왼쪽 영역 또는 위쪽 영역의 해상도와 같은 해상도가 있는 경우의 확률 모델, 넷째, 왼쪽 영역과 위쪽 영역의 해상도와 지금까지의 가장 높은 확률의 해상도가 모두 다른 경우의 확률 모델 등으로 구분될 수 있다. 두 번째 이진화 비트를 복호화할 때, 확률 모델을 2 가지의 확률 모델로 나누어 복호화할 수 있다. 2 가지의 확률 모델은 첫째 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 모두 다르고 지금까지의 가장 높은 확률의 움직임 벡터 해상도와 왼쪽 영역 또는 위쪽 영역의 움직임 벡터 해상도와 같은 움직임 벡터 해상도가 있는 경우의 확률 모델, 둘째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도와 지금까지의 가장 높은 확률의 해상도가 모두 다른 경우의 확률 모델로 구분될 수 있다.At this time, when the probability that the 1/8 motion vector resolution has occurred until now is higher than the 1/4 motion vector resolution, the bit string having '00' is allocated to the 1/8 motion vector resolution as shown in FIG. 21, and the bit having '01'. Assign columns to 1/2 motion vector resolution. In addition, when decoding the first binarization bit, the probability model may be divided into four probability models to be decoded. The four probabilistic models are, firstly, probabilistic models where both the left and top regions have the same resolution and are the same as the highest probabilities resolution so far. Second, the left and the top regions have the same resolution and the highest Probabilistic model when the resolution of the probability is different from the third. Third, the probability model when the resolution of the left region and the upper region are all different and the resolution of the highest probability up to now and the resolution of the left region or the upper region is the fourth. Probability models in the case where the resolution of the left region and the upper region and the resolution of the highest probability up to now are all different. When decoding the second binarization bit, the probability model may be divided into two probability models to be decoded. The two probabilistic models are the first when the motion vector resolutions of both the left and top regions of the corresponding region are different and have the highest probability motion vector resolution so far and the motion vector resolution such as the motion vector resolution of the left or upper region. Probability model can be classified into a probability model in which the motion vector resolution of the left region and the upper region of the corresponding region and the resolution of the highest probability so far are different.
또 다른 예를 들면, CABAC으로 복호화하고 복호화에 사용되는 움직임 벡터 해상도가 1/2, 1/4, 1/8과 같이 3 개의 움직임 벡터 해상도만 사용한다고 가정하면, 지금까지 발생한 확률이 가장 높은 움직임 벡터 해상도가 1/4인 경우, 1/4 움직임 벡터 해상도에 가장 짧은 이진화 비트열인 '1'을 할당하고, 나머지 1/2 움직임 벡터 해상도와 1/8 움직임 벡터 해상도에 각각 '00'과 '01'을 할당한다.As another example, assuming that only motion vector resolutions such as 1/2, 1/4, and 1/8 are used for decoding with CABAC and decoding, the most probable motion so far If the vector resolution is 1/4, assign the shortest binarization bit string '1' to the 1/4 motion vector resolution, and '00' and 'for the remaining 1/2 motion vector resolution and 1/8 motion vector resolution, respectively. Assign 01 '.
또한, 첫번째 이진화 비트를 부호화할 때, 확률모델을 3 가지의 확률 모델로 나누어 복호화할 수 있다. 3 가지의 확률 모델은 첫째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 지금까지 발생한 확률이 가장 높은 해상도와 같은 경우의 확률 모델, 둘째, 해당 영역의 왼쪽 영역과 위쪽 영역의 해상도 중 하나만 지금까지 발생한 확률이 가장 높은 해상도와 같은 경우의 확률 모델, 셋째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도와 지금까지 발생한 확률이 가장 높은 움직임 벡터 해상도와 모두 다른 경우의 확률 모델로 구분될 수 있다. 두 번째 이진화 비트를 복호화할 때, 확률 모델을 6 가지의 확률 모델로 나누어 복호화할 수 있다. 6 가지의 확률 모델은 첫째, 해당 영역의 왼쪽 영역과 위쪽 영역의 해상도가 모두 1/8 움직임 벡터 해상도인 경우의 확률 모델, 둘째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 모두 1/2 움직임 벡터 해상도인 경우의 확률 모델, 셋째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도가 모두 1/4 움직임 벡터 해상도인 경우의 확률 모델, 넷째, 해당 영역의 왼쪽 영역과 위쪽 영역의 해상도 중 하나는 1/8 움직임 벡터 해상도이고 다른 하나는 1/4 움직임 벡터 해상도인 경우의 확률 모델, 다섯째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도 중 하나는 1/2 움직임 벡터 해상도이고 다른 하나는 1/4 움직임 벡터 해상도인 경우의 확률 모델, 여섯째, 해당 영역의 왼쪽 영역과 위쪽 영역의 움직임 벡터 해상도 중 하나는 1/8 움직임 벡터 해상도이고 다른 하나는 1/2 움직임 벡터 해상도 일 경우의 확률 모델로 구분될 수 있다. 지금까지 발생한 확률이 가장 높은 해상도는 이전의 영역까지 부호화된 해상도의 확률일 수도 있고, 임의의 영역의 확률이거나 소정의 고정된 해상도 일 수도 있다.In addition, when encoding the first binarization bit, the probability model may be divided into three probability models and decoded. The three probabilistic models are: first, a probability model where the motion vector resolution of the left region and the upper region of the region is the same as the highest resolution that has occurred so far; and second, only one of the resolutions of the left region and the upper region of the region. Probability model in which the probability that occurred so far is the same as the highest resolution, and third, the probability model when the motion vector resolution of the left and upper regions of the corresponding region differs from the motion vector resolution of the highest probability so far. Can be. When decoding the second binarization bit, the probability model may be divided into six probability models to be decoded. The six probabilistic models are, firstly, probabilistic models when the resolution of the left and top regions of the region is 1/8 motion vector resolution, and second, the motion vector resolution of the left and upper regions of the region is 1/1. Probabilistic model with 2 motion vector resolutions, Third, Probabilistic model with motion vector resolutions of the left and upper regions of the corresponding region being 1/4 motion vector resolution, and Fourth, resolution of the left and upper regions of the region Probability model when one is 1/8 motion vector resolution and the other is 1/4 motion vector resolution.Fifth, one of the motion vector resolutions of the left and upper regions of the region is 1/2 motion vector resolution and the other Probabilistic model for one motion of 1/4 motion vector resolution, and sixth for motion vector resolutions of the left and upper areas of the area. Im a vector resolution and the other may be separated by one-half if the probability model of the motion vector resolution. The resolution with the highest probability so far may be the probability of the resolution encoded up to the previous region, the probability of any region, or the predetermined fixed resolution.
또한, 해상도 복호화기(1820)는 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래그가 추정 가능함을 나타내는 플래그인 경우에는 미리 약속된 추정 방식에 따라 움직임 벡터 해상도를 추정하여 추정된 움직임 벡터 해상도를 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도로서 복원하고, 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래가 추정 불가능함을 나타내는 플래그인 경우에는 복호화된 해상도 식별 플래그가 나타내는 움직임 벡터 해상도를 해당 영역의 움직임 벡터로서 복원할 수 있다.In addition, when the resolution decoder 1820 is a flag indicating that a resolution identification flag decoded for each region or motion vector can be estimated, the resolution decoder 1820 estimates the motion vector resolution according to a pre-determined estimation method and uses the estimated motion vector resolution as the region or the motion vector resolution. In the case of a flag indicating that the resolution identification flag decoded for each region or motion vector cannot be estimated, the motion vector resolution indicated by the decoded resolution identification flag can be restored as a motion vector of the corresponding region. have.
예를 들어, 해상도 복호화기(1820)는 영역별로 복호화되는 해상도 식별 플래그가 움직임 벡터 해상도가 추정가능함을 나타내는 경우에는, 영상 부호화 장치(900)와 동일 또는 유사한 방법으로 복호화된 각각의 움직임 벡터 해상도마다 변화시켜 예측 움직임 벡터를 예측하고, 예측된 예측 움직임 벡터과 차분 벡터 복호화기(1830)에 의해 복원된 차분 벡터를 이용하여 움직임 벡터를 복원한다. 우선, 어느 영역의 움직임 벡터 해상도가 1/4 화소 단위라고 가정할 때 예측 움직임 벡터가 (3, 14)인 경우 차분 벡터는 (2, 3)이므로 해당 영역의 복원된 움직임 벡터는 (5, 17)이 된다. 해당 영역의 움직임 벡터 해상도가 1/2 화소 단위라고 가정할 때 예측 움직임 벡터가 (2, 7)인 경우 복원된 차분 벡터는 (2, 3)이므로 해당 영역의 복원된 움직임 벡터는 (4, 10)이 된다. 이와 같은 각각의 해상도마다의 복원된 움직임 벡터를 이용하여 참조 픽쳐에서 움직임을 보상한 영역의 주위 화소들과 해당 영역의 주위 화소들간의 왜율이 최소가 되는 해상도가 최적의 움직임 벡터 해상도가 된다. 따라서, 1/2 화소 단위로 움직임 보상한 영역의 주위 화소들의 왜곡이 가장 작은 경우 1/2의 움직임 벡터 해상도가 최적의 움직임 벡터 해상도가 된다.For example, when the resolution identification flag decoded for each region indicates that the motion vector resolution can be estimated, the resolution decoder 1820 may perform each motion vector resolution decoded by the same or similar method as that of the image encoding apparatus 900. The predicted motion vector is predicted by using a change, and the motion vector is reconstructed using the predicted predictive motion vector and the difference vector reconstructed by the difference vector decoder 1830. First, assuming that the motion vector resolution of a region is 1/4 pixel unit, when the prediction motion vector is (3, 14), the difference vector is (2, 3), and thus the reconstructed motion vector of the region is (5, 17). ) Assuming that the motion vector resolution of the region is 1/2 pixel, if the predicted motion vector is (2, 7), then the reconstructed difference vector is (2, 3), so the reconstructed motion vector of the region is (4, 10). ) Using the reconstructed motion vector for each resolution, the resolution at which the distortion is minimized between the surrounding pixels of the region whose motion is compensated in the reference picture and the surrounding pixels of the region is the optimal motion vector resolution. Therefore, when the distortion of the surrounding pixels of the motion-compensated region in the unit of 1/2 pixel is the smallest, the motion vector resolution of 1/2 becomes the optimal motion vector resolution.
또한, 해상도 복호화기(1820)는 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래그가 움직임 벡터 해상도가 추정가능함을 나타내는 경우에는, 해상도 식별 플래그에서 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도를 추가적으로 복호화하여 복원할 수 있다.In addition, when the resolution identification flag decoded for each region or motion vector indicates that the motion vector resolution is estimated, the resolution decoder 1820 may additionally decode and reconstruct the motion vector resolution of the corresponding region or motion vector in the resolution identification flag. Can be.
또한, 해상도 복호화기(1820)는 차분 벡터의 각 컴포넌트가 '0'이 아닌 경우에만 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 즉, 특정 영역의 차분 벡터의 컴포넌트가 '0'인 경우에는 예측 움직임 벡터를 움직임 벡터로 복호화하기 때문에 해당 영역의 움직임 벡터 해상도를 복원하지 않을 수 있다.In addition, the resolution decoder 1820 may restore the motion vector resolution for each region or motion vector only when each component of the difference vector is not '0'. That is, when the component of the difference vector of the specific region is '0', since the prediction motion vector is decoded into the motion vector, the motion vector resolution of the corresponding region may not be restored.
차분 벡터 복호화기(1830)는 비트스트림으로부터 부호화된 차분 벡터를 추출하고 복호화하는데, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 복호화하여 영역 또는 움직임 벡터마다의 차분 벡터를 복원하고, 추가적으로는 영역마다의 예측 움직임 벡터를 예측하고 복원된 차분 벡터 및 예측 움직임 벡터를 이용하여 영역마다의 움직임 벡터를 복원할 수 있다.The difference vector decoder 1830 extracts and decodes the encoded difference vector from the bitstream. The difference vector decoder 1830 reconstructs the difference vector for each region or motion vector by decoding according to the motion vector resolution for each reconstructed region or motion vector. A motion vector for each area may be reconstructed by predicting the prediction motion vector for each area and using the reconstructed difference vector and the predictive motion vector.
이를 위해, 차분 벡터 복호화기(1830)는 UVLC를 이용하여 차분 벡터를 복호화할 수 있으며, 이 경우 K차 지수 골룸 코드를 이용하여 복호화하되, 복원된 영역마다의 움직임 벡터 해상도에 따라 K차 지수 골룸 코드의 차수(K)를 변경할 수 있다. 또한, 차분 벡터 복호화기(1830)는 CABAC를 이용하여 차분 벡터를 복호화할 수 있으며, 이 경우 단항/K차 지수 골룸 결합형 코드를 이용하여 복호화하되, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 단항/K차 지수 골룸 결합형 코드의 차수(K)와 최대값(T)를 변경하여 복호화할 수 있다. 또한, 차분 벡터 복호화기(1830)는 CABAC를 이용하여 차분 벡터를 복호화하는 경우에는, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 누적 확률을 다르게 계산하여 복호화할 수 있다.To this end, the difference vector decoder 1830 can decode the difference vector using UVLC, and in this case, decode using the K-order exponential golem code, but in accordance with the motion vector resolution for each reconstructed region. You can change the order (K) of the code. In addition, the difference vector decoder 1830 can decode the difference vector using CABAC. In this case, the vector is decoded using the unary / K-order exponential golem combined code, but the motion vector resolution for each reconstructed region or motion vector. The decoding can be performed by changing the order (K) and the maximum value (T) of the unary / K-order exponential golem combined code. In addition, when the difference vector decoder 1830 decodes the difference vector using the CABAC, the difference vector decoder 1830 may calculate and decode the cumulative probability differently according to the motion vector resolution for each reconstructed region or motion vector.
또한, 차분 벡터 복호화기(1830)는 각 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터를 이용하여 각 영역 또는 움직임 벡터에 대한 예측 움직임 벡터를 예측할 수 있는데, 이 경우 주위 영역의 움직임 벡터 해상도와 각 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는, 주위 영역의 움직임 벡터 해상도를 각 영역의 움직임 벡터 해상도로 변환하여 예측할 수 있다. 예측 움직임 벡터는 영상 부호화 장치와 영상 복호화 장치에서 동일한 방법으로 얻어질 수 있다. 따라서 도 22 내지 도 26을 참조하면서 영상 부호화 장치에 의한 예측 움직임 벡터를 유도하는 다양한 실시예들 및 움직임 벡터 해상도 변환에 관한 실시예들은 본 발명에 따른 영상 복호화 장치의 실시예에서도 동일하게 구현될 수 있다.In addition, the difference vector decoder 1830 may predict the predicted motion vector for each region or the motion vector by using the motion vector of the region or the surrounding region of the motion vector. When the motion vector resolutions of Δ are not the same, the motion vector resolution of the surrounding area may be converted into the motion vector resolution of each area to be predicted. The predictive motion vector may be obtained in the same manner in the image encoding apparatus and the image decoding apparatus. Accordingly, various embodiments of deriving a predictive motion vector by the image encoding apparatus and embodiments of motion vector resolution conversion with reference to FIGS. 22 to 26 may be similarly implemented in the embodiment of the image decoding apparatus according to the present invention. have.
또한, 차분 벡터 복호화기(1830)는 각 영역 중 하나 이상의 영역이 블록이고 블록의 블록 모드가 스킵 모드인 경우에는, 주위 영역의 움직임 벡터 해상도 중 가장 높은 해상도로 주위 영역의 움직임 벡터 해상도를 변환하여 예측할 수 있다.In addition, when one or more of each region is a block and the block mode of the block is the skip mode, the differential vector decoder 1830 converts the motion vector resolution of the surrounding region to the highest resolution among the motion vector resolutions of the surrounding region. It can be predicted.
또한, 해상도 복호화기(1820)에서 복호화된 움직임 벡터 해상도를 나타내는 해상도 식별 플래그는 움직임 벡터의 x 컴포넌트(Componenet)와 y 컴포넌트를 모두 나타내거나 각각의 해상도를 나타낼 수도 있다. 즉, 영상을 촬영하는 카메라가 이동하거나 영상 내의 물체가 이동하는 경우 등과 같은 때에는, 해상도 복호화기(1820)에서 움직임 추정을 위한 움직임 벡터의 x 컴포넌트와 y 컴포넌트의 해상도를 서로 다르게 복호화할 수 있다. 예를 들어, 어느 영역의 움직임 벡터의 x 컴포넌트에 대해서는 1/8 화소 단위의 움직임 벡터 해상도로 복호화하고, y 컴포넌트에 대해서는 1/2 화소 단위의 움직임 벡터 해상도로 복호화할 수 있으며, 이에 따라 인터 예측 복호화기(1840)는 해당 영역의 움직임 벡터에 대해서는 x 컴포넌트와 y 컴포넌트별로 다른 움직임 벡터 해상도의 움직임 벡터로 움직임 추정 및 움직임 보상함으로써 해당 영역을 인터 예측 복호화할 수 있다.In addition, the resolution identification flag indicating the motion vector resolution decoded by the resolution decoder 1820 may represent both the x component and the y component of the motion vector, or may indicate respective resolutions. That is, when the camera photographing the image moves or an object in the image moves, the resolution decoder 1820 may decode the resolutions of the x component and the y component of the motion vector for motion estimation differently. For example, the x component of a motion vector of a certain region may be decoded at a motion vector resolution of 1/8 pixel unit, and the y component may be decoded at a motion vector resolution of 1/2 pixel unit, thereby inter prediction. The decoder 1840 may inter-prediction-decode a corresponding region by motion estimation and motion compensation with a motion vector having different motion vector resolutions for each x component and y component.
인터 예측 복호화기(1840)는 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 영역마다의 움직임 벡터를 이용하여 각 영역을 인터 예측 복호화한다. 이러한 인터 예측 복호화기(1840)는 도 8을 통해 전술한 영상 복호화 장치(800)로 구현될 수 있다. 여기서, 도 18의 해상도 변경 플래그 추출기(1810), 해상도 복호화기(1820), 차분 벡터 복호화기(1830)의 기능과 영상 복호화 장치(800) 내의 복호화기(810)의 기능이 중복되는 경우 복호화기(810)에서는 그 중복되는 기능이 생략될 수 있다. 또한 해상도 복호화기(1820)의 동작과 영상 복호화 장치(800) 내의 예측기(850)의 동작이 중복되는 경우에는 그 중복되는 동작은 예측기(850)에서는 생략될 수도 있다.The inter prediction decoder 1840 inter-predicts and decodes each region by using motion vectors for each region according to the motion vector resolution of each reconstructed region or motion vector. The inter prediction decoder 1840 may be implemented by the image decoding apparatus 800 described above with reference to FIG. 8. Here, when the functions of the resolution change flag extractor 1810, the resolution decoder 1820, and the differential vector decoder 1830 of FIG. 18 overlap with the functions of the decoder 810 in the image decoding apparatus 800, the decoder. In 810, the overlapping function may be omitted. In addition, when the operation of the resolution decoder 1820 and the operation of the predictor 850 in the image decoding apparatus 800 overlap, the overlapping operation may be omitted in the predictor 850.
또한, 해상도 변경 플래그 추출기(1810), 해상도 복호화기(1820), 차분 벡터 복호화기(1830)는 도 18과 같이 인터 예측 복호화기(1840)와 별개의 구성요소로 구성될 수도 있지만 인터 예측 복호화기(1800) 내의 복호화기(810)와 일체로 구성될 수도 있다.In addition, although the resolution change flag extractor 1810, the resolution decoder 1820, and the differential vector decoder 1830 may be configured as separate components from the inter prediction decoder 1840 as shown in FIG. 18, the inter prediction decoder It may be integrated with the decoder 810 in 1800.
다만, 도 8을 통해 전술한 영상 복호화 장치(800)는 영상을 블록 단위로 부호화하는 것으로 설명했지만, 인터 예측 복호화기(1840)는 영역을 매크로블록, 블록, 서브블록, 슬라이스, 픽처 등과 같은 다양한 형태와 크기의 영역으로 분할하여 임의의 크기를 가지는 영역 단위로 복호화할 수 있다. 이러한 소정의 영역은 16X16 크기의 매크로블록이 될 수도 있지만, 이에 한정하지 않고 64X64 크기의 블록, 32X16 크기의 블록 등과 같은 다양한 크기와 형태의 블록이 될 수도 있다.However, although the above-described image decoding apparatus 800 described with reference to FIG. 8 encodes an image in units of blocks, the inter prediction decoder 1840 uses various regions such as macroblocks, blocks, subblocks, slices, pictures, and the like. It can be divided into areas of shape and size and decoded by area having an arbitrary size. The predetermined area may be a macroblock of 16 × 16 size, but may be a block of various sizes and shapes such as a 64 × 64 size block and a 32 × 16 size block.
또한, 도 8을 통해 전술한 영상 복호화 장치(800)는 영상의 모든 블록에 대해 동일한 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도를 가지는 움직임 벡터 및/또는 차분 움직임 벡터로 인터 예측 복호화하지만, 인터 예측 복호화기(1840)는 영역 또는 움직임 벡터마다 다르게 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도를 가지는 움직임 벡터 및/또는 차분 움직임 벡터로 각 영역을 인터 예측 복호화할 수 있다. 즉, 인터 예측 복호화기(1840)는 소정의 영역을 인터 예측 복호화할 때, 해상도 복호화기(1820)에 의해 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도에 따라 이미 부호화되고 복호화되어 복원된 참조 픽처를 보간하여 해상도를 높인 후, 차분 벡터 복호화기(1830)에 의해 복원된 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도에 따른 움직임 벡터 및/또는 차분 움직임 벡터를 이용하여 움직임 추정을 수행한다. 참조 픽처를 보간하기 위한 보간 필터로는 위너 필터, 양선형 필터, 칼만 필터 등과 같은 다양한 필터가 사용될 수 있으며, 보간을 위한 해상도로는 2 화소 단위, 1 화소 단위, 1/2 화소 단위, 1/4 화소 단위, 1/8 화소 단위 단위 등과 같은 다양한 분수 화소 단위 및 정수 화소 단위의 해상도가 적용될 수 있다. 또한, 이러한 다양한 해상도에 따라 서로 다른 필터 계수를 사용하거나 필터 계수의 개수를 다르게 할 수도 있다. 예를 들면, 해상도가 1/2 화소 단위인 경우 위너 필터를 사용하여 보간하고, 1/4 화소 단위인 경우 칼만 필터를 사용하여 보간한다. 또한, 각 해상도를 보간할 때 필터 탭의 개수를 달리 할 수도 있다. 예를 들면, 해상도가 1/2 화소 단위인 경우 8 탭 위너 필터를 사용하여 보간하고, 1/4 화소 단위인 경우 6탭 위너 필터를 사용하여 보간 할 수 있다.In addition, although the image decoding apparatus 800 described above with reference to FIG. 8 performs inter prediction decoding on motion blocks and / or differential motion vectors having the same motion vector resolution and / or differential motion vector resolution for all blocks of the image, inter prediction is performed. The decoder 1840 may inter-prediction and decode each region with a motion vector and / or a differential motion vector having a motion vector resolution and / or a differential motion vector resolution determined differently for each region or motion vector. That is, when the inter prediction decoder 1840 inter predicts and decodes a predetermined region, the inter prediction decoder 1840 is already encoded according to the motion vector resolution and / or differential motion vector resolution of each region or motion vector reconstructed by the resolution decoder 1820. The interpolated, decoded and reconstructed reference picture to increase the resolution, and then the motion vector and / or differential according to the motion vector resolution and / or differential motion vector resolution of the corresponding region or motion vector reconstructed by the differential vector decoder 1830. Motion estimation is performed using the motion vector. As an interpolation filter for interpolating a reference picture, various filters such as a Wiener filter, a bilinear filter, a Kalman filter, and the like can be used. The resolution for interpolation is 2 pixel unit, 1 pixel unit, 1/2 pixel unit, 1 / Resolution of various fractional pixel units and integer pixel units such as 4 pixel units, 1/8 pixel units, and the like may be applied. In addition, different filter coefficients may be used or the number of filter coefficients may be changed according to the various resolutions. For example, when the resolution is 1/2 pixel unit, interpolation is performed using a Wiener filter, and when the resolution is 1/4 pixel unit, interpolation is performed using a Kalman filter. In addition, the number of filter taps may be changed when interpolating each resolution. For example, when the resolution is 1/2 pixel unit, interpolation may be performed using an 8 tap winner filter, and when the resolution is 1/4 pixel unit, an interpolation may be performed using a 6 tap winner filter.
또한, 인터 예측 복호화기(1840)는 비트스트림에서 각 움직임 벡터 해상도마다의 필터 계수를 복호화하여 각 움직임 벡터 해상도마다의 최적의 계수로 참조 픽처를 보간할 수 있다. 이때, 필터는 위너`필터 칼만 필터 등 어떠한 필터를 사용할 수 있고, 각 필터 탭의 개수도 여러 개가 될 수 있다. 또한, 각 움직임 벡터 해상도마다 필터와 필터 탭의 개수를 다르게 할 수도 있다. 또한, 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따라 다른 필터를 이용하여 보간한 참조 픽처를 이용하여 인터 예측 복호화할 수 있다. 예를 들면, 비트스트림에서 1/2 움직임 벡터 해상도에는 6탭 위너 필터의 필터를, 1/4 움직임 벡터 해상도에는 8탭 칼만 필터를, 1/8 움직임 벡터 해상도에는 선형 필터의 필터 계수를 복호화하여 움직임 벡터 해상도마다 참조 픽터를 보간하여 복호화할 수 있다. 이때, 현재 영역 또는 움직임 벡터의 움직임 벡터 해상도가 1/2 움직임 벡터 해상도인경우 6탭 위너 필터로 보간된 참조 픽처를 사용하여 복호화하고, 1/4 움직임 벡터 해상도인 경우 8탭 칼만 필터로 보간된 참조 픽처를 사용하여 복호화할 수 있다.In addition, the inter prediction decoder 1840 may decode filter coefficients for each motion vector resolution in the bitstream and interpolate the reference picture with optimal coefficients for each motion vector resolution. In this case, the filter may use any filter such as a Wiener `Kalman filter, and the number of filter taps may be several. In addition, the number of filters and filter taps may be changed for each motion vector resolution. In addition, inter prediction decoding may be performed using a reference picture interpolated using a different filter according to the motion vector resolution of the region or the motion vector. For example, in a bitstream, a filter with a 6-tap Winner filter for 1/2 motion vector resolution, an 8-tap Kalman filter for 1/4 motion vector resolution, and a filter coefficient of a linear filter for 1/8 motion vector resolution are decoded. The reference picture may be interpolated and decoded for each motion vector resolution. In this case, when the motion vector resolution of the current region or the motion vector is 1/2 motion vector resolution, it is decoded using the reference picture interpolated by the 6-tap winner filter, and when the 1/4 motion vector resolution is interpolated by the 8-tap Kalman filter. The reference picture can be used to decode.
도 48은 본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 장치를 간략하게 나타낸 블록 구성도이다.48 is a block diagram schematically illustrating an apparatus for decoding an image using adaptive motion vector resolution according to a second embodiment of the present invention.
본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 장치(4800)는, 해상도 지정 플래그 추출기(4810), 해상도 복호화기(4820), 차분 벡터 복호화기(4830), 인터 예측 복호화기(4840) 및 해상도 전환 플래그 추출기(4850)를 포함하여 구성될 수 있다. 여기서, 해상도 지정 플래그 추출기(4810), 해상도 복호화기(4820), 차분 벡터 복호화기(4830) 및 해상도 전환 플래그 추출기(4850)는 반드시 모두가 영상 복호화 장치(4800)에 포함되어야 하는 것은 아니며, 부호화된 비트스트림을 발생하는 영상 부호화장치의 부호화 방식에 따라 선택적으로 포함될 수 있다. The video decoding apparatus 4800 using the adaptive motion vector resolution according to the second embodiment of the present invention includes a resolution designation flag extractor 4810, a resolution decoder 4820, a differential vector decoder 4830, and inter prediction decoding. 4840 and resolution switch flag extractor 4850. In this case, the resolution designation flag extractor 4810, the resolution decoder 4820, the differential vector decoder 4830, and the resolution change flag extractor 4850 are not necessarily included in the image decoding apparatus 4800. It may be selectively included according to the encoding method of the video encoding apparatus for generating the bitstream.
또한, 인터 예측 복호화기(4840)는 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 영역마다의 움직임 벡터를 이용하여 각 영역을 인터 예측 복호화한다. 이러한 인터 예측 복호화기(4840)는 도 8을 통해 전술한 영상 복호화 장치(800)로 구현될 수 있다. 여기서, 도 48의 해상도 지정 플래그 추출기(4810), 해상도 복호화기(4820), 차분 벡터 복호화기(4830) 및 해상도 전환 플래그 추출기(4850)의 기능 중에서 하나 이상의 기능과 영상 복호화 장치(4800) 내의 복호화기(810)의 기능이 중복되는 경우 복호화기(810)에서는 그 중복되는 기능이 생략될 수 있다. 또한 해상도 복호화기(4820)의 동작과 인터 예측 복호화기(4840) 내의 예측기(850)의 동작이 중복되는 경우에는 그 중복되는 동작은 예측기(850)에서는 생략될 수도 있다.In addition, the inter prediction decoder 4840 inter-predicts and decodes each region by using motion vectors for each region according to the motion vector resolution of each reconstructed region or motion vector. The inter prediction decoder 4840 may be implemented by the image decoding apparatus 800 described above with reference to FIG. 8. Here, at least one of the functions of the resolution designation flag extractor 4810, the resolution decoder 4820, the difference vector decoder 4830, and the resolution change flag extractor 4850 of FIG. 48, and the decoding in the image decoding apparatus 4800. When the functions of the device 810 overlap, the overlapping function may be omitted in the decoder 810. In addition, when the operation of the resolution decoder 4820 and the operation of the predictor 850 in the inter prediction decoder 4840 overlap, the overlapping operation may be omitted in the predictor 850.
또한, 해상도 지정 플래그 추출기(4810), 해상도 복호화기(4820), 차분 벡터 복호화기(4830) 및 해상도 전환 플래그 추출기(4850)는 도 48과 같이 인터 예측 복호화기(4840)와 별개의 구성요소로 구성될 수도 있지만 인터 예측 복호화기(4800) 내의 복호화기(810)와 일체로 구성될 수도 있다. In addition, the resolution designation flag extractor 4810, the resolution decoder 4820, the differential vector decoder 4830, and the resolution conversion flag extractor 4850 are separate components from the inter prediction decoder 4840 as shown in FIG. 48. It may be configured, but may be integrated with the decoder 810 in the inter prediction decoder 4800.
해상도 지정 플래그 추출기(4810)는 입력된 비트스트림으로부터 해상도 지정 플래그를 추출한다. 해상도 지정 플래그는 단일 해상도로 고정됨을 나타내는 플래그이거나 또는 하나 이상의 해상도를 갖는 해상도 세트가 된다.The resolution specifying flag extractor 4810 extracts the resolution specifying flag from the input bitstream. The resolution designation flag is a flag indicating that it is fixed at a single resolution or a resolution set having one or more resolutions.
해상도 지정 플래그 추출기(4810)는 비트스트림으로부터 해상도 지정 플래그를 추출한다. 즉, 해상도 지정 플래그 추출기(4810)는 비트스트림의 헤더에서 움직임 벡터 해상도가 임의의 값으로 고정되는지 또는 영역마다 변경되는 해상도 세트가 있는지 여부를 나타내는 해상도 변경 플래그를 추출한다. 해상도 지정 플래그 추출기(4810)는 해상도 지정 플래그가 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도가 임의 해상도로 고정되는 것을 나타내면, 해상도 지정 플래그로 수신한 해상도를 인터예측 복호화기(4840) 및 차분벡터 부호화기(4830)로 전송하면, 차분벡터 부호화기(4830)는 수신한 해상도로 차분벡터를 부호화하여 인터예측 복호화기(4840)로 전송한다. 이 경우 인터예측 복호화기(4840)는 수신한 차분벡터 및 해상도 지정 플래그 추출기(4810)로부터 수신한 해상도 및 수신한 비트스트림을 이용하여 인터예측 복호화를 수행한다.The resolution specification flag extractor 4810 extracts the resolution specification flag from the bitstream. That is, the resolution designation flag extractor 4810 extracts a resolution change flag indicating whether the motion vector resolution is fixed to an arbitrary value or there is a resolution set changed for each region in the header of the bitstream. If the resolution designation flag extractor 4810 indicates that the resolution designation flag indicates that the motion vector resolution and / or the differential motion vector resolution is fixed to an arbitrary resolution, the resolution specification flag extractor 4840 and the differential vector encoder In operation 4830, the difference vector encoder 4830 encodes the difference vector at the received resolution and transmits the difference vector to the inter prediction decoder 4840. In this case, the inter-prediction decoder 4840 performs inter-prediction decoding using the received difference vector and the resolution received from the resolution designation flag extractor 4810 and the received bitstream.
해상도 지정 플래그 추출기(4810)는 추출한 해상도 지정 플래그가 소정의 해상도 세트인 경우에는 해상도 복호화기(4820)로 하여금 헤더에 정의된 하위 영역의 각 영역 또는 움직임 벡터의 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도를 복원하도록 제어하며, 인터 예측 복호화기(4840)로 하여금 헤더에서 정의된 하위 각 영역 또는 움직임 벡터에 대해 복원된 움직임 벡터 해상도로 인터 예측 복호화하도록 제어하며, 차분 벡터 복호화기(4830)로 하여금 복원된 차분 움직임 벡터 해상도로 각 영역의 움직임 벡터를 복원하도록 제어한다.The resolution designation flag extractor 4810 causes the resolution decoder 4820 to perform motion vector resolution and / or differential motion vector of each region or motion vector of the lower region defined in the header when the extracted resolution designation flag is a predetermined resolution set. Control to reconstruct the resolution, and control the inter prediction decoder 4840 to inter predict and decode the reconstructed motion vector resolution for the lower angular region or motion vector defined in the header, and cause the differential vector decoder 4830 to Control to restore the motion vector of each region with the reconstructed differential motion vector resolution.
또한, 복수개의 참조 픽처를 사용하는 경우, 해상도 지정 플래그가 비트스트림으로부터 추출되지 않는 경우 임의의 기준에 따라 참조 픽처마다 해상도의 적응성(adaptive) 정도(즉, 해상도 세트)를 산출할 수 있다. 예를 들어, 참조 픽처와 현재 픽처 간의 거리에 따라 해상도의 적응성 정도를 다르게 할 수 있다. 이에 대한 설명은 도 38과 도 39의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, when using a plurality of reference pictures, when the resolution designation flag is not extracted from the bitstream, an adaptive degree of resolution (that is, a resolution set) may be calculated for each reference picture according to an arbitrary reference. For example, the degree of adaptability of the resolution may vary according to the distance between the reference picture and the current picture. Since the description thereof has been mentioned in the descriptions of FIGS. 38 and 39, a detailed description thereof will be omitted.
또한, 참조 픽처 생성 시에 각 해상도 간의 SSD (Sum of Squared Difference) 등의 에러 측정 수단을 이용하여 해상도 세트를 산출할 수 있다. 예를 들어, 사용 가능한 해상도가 1/1, 1/2, 1/4, 1/8인 경우, 참조 픽처를 보간(interpolation) 할 때, 먼저 1/1과 1/2의 해상도에 대하여 SSD 등의 에러 측정 수단을 이용하여 구한 에러값이 임의의 임계값(threshold)을 넘지 않는 경우 해상도 1/2은 사용하지 않도록 하고 임계값(threshold)을 넘는 경우 해상도 1/2을 사용하도록 설정할 수 있다. 그리고 1/2의 해상도를 사용하지 않도록 설정된 경우, 1/1과 1/4의 해상도에 대하여 SSD 등의 에러 측정 수단을 이용하여 구한 에러값이 임의의 임계값을 넘지 않는 경우 1/4을 사용하지 않고 에러값이 임의의 임계값을 넘는 경우 1/1과 1/4의 해상도를 모두 사용하도록 설정한다. 그리고 1/4의 해상도를 사용하도록 설정된 경우, 1/4과 1/8 의 해상도에 대하여 SSD 등의 에러 측정 수단을 이용하여 구한 에러값이 임의의 임계값을 넘지 않는 경우 1/8을 사용하지 않고 에러값이 임의의 임계값을 넘는 경우 1/1, 1/4, 1/8의 해상도를 모두 사용한다. 여기서, 임계값은 해상도 별로 또는 양자화 파라미터 별로 다를 수도 있고 동일할 수도 있다.In addition, the resolution set may be calculated by using an error measuring means such as a sum of squared difference (SSD) between the resolutions when generating the reference picture. For example, when the available resolutions are 1/1, 1/2, 1/4, and 1/8, when interpolating a reference picture, SSD, etc., for the resolution of 1/1 and 1/2 are first used. If the error value obtained using the error measuring means does not exceed a certain threshold, the resolution 1/2 may not be used, and if the error value exceeds the threshold, the resolution 1/2 may be set to be used. When the resolution of 1/2 is set not to be used, 1/4 is used when the error value obtained by using an error measuring means such as SSD for the resolution of 1/1 and 1/4 does not exceed an arbitrary threshold value. If the error value exceeds a certain threshold, set both 1/1 and 1/4 resolutions. When the resolution of 1/4 is set, do not use 1/8 when the error value obtained by using an error measuring means such as SSD for the resolution of 1/4 and 1/8 does not exceed an arbitrary threshold value. If the error value exceeds a certain threshold, all resolutions of 1/1, 1/4, and 1/8 are used. Here, the threshold may be different or the same by resolution or by quantization parameter.
또한, 참조 픽처마다 해상도의 적응성 정도를 다르게 함을 부호화하는 경우에, 해상도 지정 플래그 추출기(4810)는 비트스트림으로부터 해상도 지정 플래그 대신에 참조픽처 인덱스 번호를 추출하고 도 40과 같이 소정의 해상도 세트마다 대응되는 참조픽처 인덱스 번호를 저장하여 참조함으로써 해상도 세트를 추출할 수 있다.In addition, when encoding that the degree of adaptability of the resolution is different for each reference picture, the resolution designation flag extractor 4810 extracts the reference picture index number from the bitstream instead of the resolution designation flag, and for each predetermined resolution set as shown in FIG. A resolution set can be extracted by storing and referring to a corresponding reference picture index number.
또한 해상도 지정 플래그에 의해 해상도 세트가 지정된 경우, 참조 픽처로 사용될 픽처의 경우와 참조 픽처로 사용되지 않는 경우 해상도 세트를 다르게 설정함으로써 실제 사용가능한 해상도 세트를 참조 픽처의 사용여부에 따라 각각 설정할 수 있다. 따라서 영상 복호화 장치(4800)에도 도 42와 같은 테이블이 저장되어 해상도 복호화기(4820)에 의해 참조되어 해상도를 복호화하는데 사용될 수 있다. 이에 대한 설명은 도 41 및 도 42의 설명에서 언급하였으므로 더 이상의 자세한 설명은 생략한다.In addition, when the resolution set is designated by the resolution designation flag, the resolution set that is actually used may be set differently according to whether the reference picture is used by setting the resolution set differently in case of a picture to be used as a reference picture and when it is not used as a reference picture. . Accordingly, the table shown in FIG. 42 is also stored in the image decoding apparatus 4800 and may be used by the resolution decoder 4820 to decode the resolution. Since the description thereof has been mentioned in the descriptions of FIGS. 41 and 42, a detailed description thereof will be omitted.
또한, 해상도 지정 플래그 추출기(4810)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도에 따른 움직임 벡터의 예측 움직임 벡터 또는 차분 움직임 벡터의 크기가 임계값보다 큰 경우에는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도 및/또는 차분 움직임 벡터 해상도를 소정의 값으로 결정할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 변경 플래그 추출기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, the resolution designation flag extractor 4810 may determine the area or the motion vector when the predicted motion vector or the differential motion vector of the motion vector according to the motion vector resolution and / or the differential motion vector resolution determined for each area or motion vector is larger than the threshold. The motion vector resolution and / or differential motion vector resolution determined for each motion vector may be determined as a predetermined value. Details of this have been mentioned in the description of the resolution change flag extractor 1810 of the image decoding apparatus 1800 according to the first embodiment, and thus detailed descriptions thereof will be omitted.
해상도 복호화기(4820)는 해상도 지정 플래그 추출기(4810)에 의해 추출된 해상도 지정 플래그에 따라 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 영역마다의 움직임 벡터 해상도를 복원한다.The resolution decoder 4820 extracts and decodes the resolution identification flag encoded from the bitstream according to the resolution designation flag extracted by the resolution designation flag extractor 4810 to restore the motion vector resolution for each region.
이를 위해, 해상도 복호화기(4810)는 동일한 움직임 벡터 해상도를 가지는 영역끼리 묶어 쿼드 트리 구조로 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.To this end, the resolution decoder 4810 may reconstruct the motion vector resolution for each region or motion vector by decoding regions of the same region having the same motion vector resolution and decoding the resolution identification flag hierarchically encoded in a quad tree structure. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 각 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, the resolution decoder 4820 decodes the resolution identification flag encoded by using the motion vector resolution predicted by using the motion vector resolution of each region or the surrounding region of the motion vector, thereby obtaining the motion vector resolution for each region or motion vector. Can be restored Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 런과 길이가 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, the resolution decoder 4820 may restore the motion vector resolution for each region or motion vector by decoding the resolution identification flag in which the run and the length of the motion vector resolution for each region or the motion vector are encoded. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 영역 또는 움직임 벡터마다의 움직임 벡터 해상도가 태그 트리를 이용하여 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 영역마다의 움직임 벡터 해상도를 복원할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, the resolution decoder 4820 may restore the motion vector resolution for each region by decoding the resolution identification flag hierarchically encoded using the tag tree. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 빈도수에 따라 해상도 식별 플래그에 할당하는 비트수를 변경하여 복호화할 수 있다. 예를 들어, 해상도 복호화기(4820)는 직전 영역까지 복원된 움직임 벡터 해상도의 빈도수를 계산하고 계산된 빈도수에 따라 움직임 벡터 해상도에 번호를 부여하고 번호에 따라 비트수를 할당하여 복호화할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, the resolution decoder 4820 may change the number of bits allocated to the resolution identification flag according to the frequency of the motion vector resolution for each region or the motion vector, and decode. For example, the resolution decoder 4820 may calculate the frequency of the motion vector resolution reconstructed up to the last region, number the motion vector resolution according to the calculated frequency, and allocate and decode the number of bits according to the number. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 복호화 방법을 달리할 수 있다. 주위 영역 또는 영역 그룹의 움직임 벡터 해상도의 분포에 따라 해당 영역의 해상도가 될 확률이 가장 높은 움직임 벡터 해상도에 가장 짧은 비트수를 할당하여 복호화한다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, the resolution decoder 4820 may vary the decoding method of the resolution identification flag according to the distribution of the motion vector resolutions of the surrounding areas of each area. According to the distribution of the motion vector resolution of the surrounding area or region group, the shortest number of bits is allocated and decoded to the motion vector resolution having the highest probability of being the resolution of the corresponding area. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 산술 복호화로 엔트로피 복호화할 때, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 이진화 비트열의 생성 방법을 달리 하고, 확률 모델도 주위 영역의 움직임 벡터 해상도의 분포 및 현재까지 발생한 움직임 벡터 해상도의 확률에 따라 달리 적용하여 산술 복호화 및 확률 업데이트를 수행할 수 있다. 또한, 비트의 위치에 따라 각기 다른 확률 모델을 사용하여 산술 복호화 및 확률 업데이트를 수행할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, when the resolution decoder 4820 performs entropy decoding by arithmetic decoding, a method of generating a binary coded bit stream of the resolution identification flag based on the distribution of the motion vector resolution of each region or the motion vector resolution determined for each region or motion vector is determined. In this case, the arithmetic decoding and the probability update may be performed by differently applying the probabilistic model according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution generated up to now. In addition, arithmetic decoding and probability updating may be performed using different probability models according to bit positions. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래그가 추정 가능함을 나타내는 플래그인 경우에는 미리 약속된 추정 방식에 따라 움직임 벡터 해상도를 추정하여 추정된 움직임 벡터 해상도를 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도로서 복원하고, 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래가 추정 불가능함을 나타내는 플래그인 경우에는 복호화된 해상도 식별 플래그가 나타내는 움직임 벡터 해상도를 해당 영역의 움직임 벡터로서 복원할 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.In addition, when the resolution decoder 4820 is a flag indicating that a resolution identification flag decoded for each region or motion vector can be estimated, the resolution decoder 4820 estimates the motion vector resolution according to a pre-determined estimation method and uses the estimated motion vector resolution as the region or the motion vector resolution. In the case of a flag indicating that the resolution identification flag decoded for each region or motion vector cannot be estimated, the motion vector resolution indicated by the decoded resolution identification flag can be restored as a motion vector of the corresponding region. have. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래그가 움직임 벡터 해상도가 추정가능함을 나타내는 경우에는, 해상도 식별 플래그에서 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도를 추가적으로 복호화하여 복원할 수 있다. 또한, 해상도 복호화기(4820)는 차분 벡터의 각 컴포넌트가 '0'이 아닌 경우에만 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원할 수 있다. 즉, 특정 영역의 차분 벡터의 컴포넌트가 '0'인 경우에는 예측 움직임 벡터를 움직임 벡터로 복호화하기 때문에 해당 영역의 움직임 벡터 해상도를 복원하지 않을 수 있다. 이에 대한 상세한 내용은 제1 실시예에 따른 영상 복호화 장치(1800)의 해상도 복호화기(1810)의 설명에서 언급하였으므로 더 이상의 상세한 설명은 생략한다.When the resolution identification flag decoded for each region or motion vector indicates that the motion vector resolution is estimated, the resolution decoder 4820 may additionally decode and reconstruct the motion vector resolution of the corresponding region or motion vector in the resolution identification flag. Can be. In addition, the resolution decoder 4820 may restore the motion vector resolution for each region or motion vector only when each component of the difference vector is not '0'. That is, when the component of the difference vector of the specific region is '0', since the prediction motion vector is decoded into the motion vector, the motion vector resolution of the corresponding region may not be restored. Since details thereof have been mentioned in the description of the resolution decoder 1810 of the image decoding apparatus 1800 according to the first embodiment, detailed descriptions thereof will be omitted.
또한, 해상도 복호화기(4820)는 헤더에서 추출되고 복호화된 해상도 변경 플래그의 해상도 종류에 따라 해상도 식별 플래그를 추출하고 이를 이용하여 차분벡터 복호화기(4830)는 도 25에 나타난 바와 같은 움직임 벡터 해상도에 따른 차분 움직임 벡터 부호번호 테이블을 영상 부호화 장치와 동일한 내용으로 저장하여 추출한 부호 번호를 참조하여 해당 해상도에 대응하는 차분 움직임 벡터의 값을 추출한다. 복호화된 해상도 식별 플래그가 1/4이면 움직임 벡터를 복호화 할 때 비트스트림에서 추출한 차분 움직임 벡터와 주변 움직임 벡터의 해상도 1/4로 변환하여 구한 예측 움직임 벡터를 이용하여 복호화할 수 있다. 예측 움직임 벡터는 부호화기와 동일하게 곱셈, 나눗셈을 이용하여 변환된 주변 움직임 벡터를 이용하여 median을 취하여 구할 수 있으나 본 발명이 이에 한정되지는 않는다. In addition, the resolution decoder 4820 extracts a resolution identification flag according to the resolution type of the resolution change flag extracted and decoded from the header, and by using the difference vector decoder 4830 to the motion vector resolution as shown in FIG. The value of the differential motion vector corresponding to the resolution is extracted by referring to the extracted code number by storing the differential motion vector code number table according to the same content as the video encoding apparatus. When the decoded resolution identification flag is 1/4, when the motion vector is decoded, it may be decoded using the prediction motion vector obtained by converting the motion vector extracted from the bitstream and the resolution 1/4 of the neighboring motion vector. The predicted motion vector can be obtained by taking a median using a neighboring motion vector transformed using multiplication and division similarly to the encoder, but the present invention is not limited thereto.
도 49는 현재 블록(X)의 주변 움직임 벡터를 예시한 도면이고, 도 50은 현재 해상도에 따른 주변 움직임 벡터의 변환된 값을 예시한 도면이다.FIG. 49 is a diagram illustrating a peripheral motion vector of the current block X, and FIG. 50 is a diagram illustrating a converted value of the peripheral motion vector according to the current resolution.
또한, 해상도 복호화기(4820)는 해상도 식별 플래그를 추출하지 않고 참조픽처 인덱스로 해상도를 산출할 수 있다. 이에 대한 설명은 영상 부호화 장치(3200)에서 도 30 내지 도 31의 설명에서 언급하였으므로 상세한 내용을 생략한다.In addition, the resolution decoder 4820 may calculate the resolution using the reference picture index without extracting the resolution identification flag. Since this is described in the description of FIGS. 30 to 31 in the image encoding apparatus 3200, detailed descriptions thereof will be omitted.
인터예측 복호화기(4840)는 도 50과 같은 표를 이용하여 구한 예측 움직임 벡터와 차분벡터 복호화기(4830)로부터 산출된 차분벡터를 이용하여 움직임 벡터를 구하고 복호화를 수행할 수 있다.The inter prediction decoder 4840 may obtain a motion vector and perform decoding using the prediction motion vector obtained using the table shown in FIG. 50 and the difference vector calculated from the difference vector decoder 4830.
만일, 도 26 및 도 27의 설명에서 언급된 것과 같이 차분 움직임 벡터 해상도가 부호화되어 비트스트림으로 전송된 경우에는 해상도 복호화기(4820)는 비트스트림에서 차분 움직임 벡터의 해상도 식별 플래그를 추출 및 복호화하고, 차분 움직임 벡터의 부호 번호와 차분 움직임 벡터의 기호(sign)를 복호화한다. 도 27과 같은 차분 움직임 벡터 해상도에 따른 차분 움직임 벡터의 부호 번호 테이블을 저장하여 비트스트림으로부터 추출한 부호번호가 (1, 1)인 경우 도 27의 차분 움직임 벡터 해상도에 따른 차분 움직임 벡터 부호 번호 테이블을 참조함으로써 차분 움직임 벡터 (-1/8, -1/4)를 구할 수 있다. 이 경우 인터예측 복호화기(4840)는 아래와 같이 영상 부호화 장치와 동일한 방법으로 예측 움직임 벡터를 계산할 수 있다.If the differential motion vector resolution is encoded and transmitted in the bitstream as described in the description of FIGS. 26 and 27, the resolution decoder 4820 extracts and decodes the resolution identification flag of the differential motion vector in the bitstream. The code number of the differential motion vector and the sign of the differential motion vector are decoded. If the code number table of the differential motion vector according to the differential motion vector resolution as shown in FIG. 27 is stored and the code number extracted from the bitstream is (1, 1), the differential motion vector code number table according to the differential motion vector resolution of FIG. By reference, the differential motion vectors (-1/8, -1/4) can be obtained. In this case, the inter prediction decoder 4840 may calculate the predictive motion vector in the same manner as the image encoding apparatus as follows.
PMVx = median(7/8, 1/8, 2/8) = 2/8PMVx = median (7/8, 1/8, 2/8) = 2/8
PMVy = median(-6/8, 1/8, -2/8) = -2/8PMVy = median (-6/8, 1/8, -2/8) = -2/8
따라서 PMV = (2/8, -2/8) = (1/4, -1/4)이 된다.Thus PMV = (2/8, -2/8) = (1/4, -1/4).
따라서 움직임 벡터는 So the motion vector is
MV (1/8, -4/8) = MVD(-1/8, -1/4) - PMV(1/4, -1/4)MV (1/8, -4/8) = MVD (-1/8, -1/4)-PMV (1/4, -1/4)
가 되고 따라서 복호화된 움직임 벡터는 (1/8, -4/8)이 된다.And thus the decoded motion vector is (1/8, -4/8).
한편, 차분 벡터 복호화기(1830)가 기준해상도 플래그를 수신하는 경우 차분 벡터 복호화기(1830)는 차분 움직임 벡터를 복원하고 기준 해상도로 복호화한다. 이러한 경우 기준 해상도 플래그에 포함된 부호번호를 추출하여 도 29와 같은 차분 기준 움직임 벡터 해상도에 따른 부호번호 테이블을 참조하여 차분 기준 움직임 벡터를 복호화하고, 기준 해상도 플래그에 포함된 위치정보를 이용하여 차분 움직임 벡터를 복원한다. 즉, 차분 벡터 복호화기(1830)는 차분 움직임 벡터를 복호화 하는 경우, 비트스트림에서 기준 해상도를 추출하고, 도 29와 같은 차분 기준 움직임 벡터 해상도에 따른 부호번호 테이블을 이용하여 차분 기준 움직임 벡터를 산출한다. 이때 비트스트림으로부터 기준 해상도 및 움직임 벡터의 위치좌표를 나타내는 기준 해상도 플래그를 추출하여 차분 기준 움직임 벡터로부터 기준 해상도 플래그를 이용하여 차분 움직임 벡터를 복호한다.On the other hand, when the differential vector decoder 1830 receives the reference resolution flag, the differential vector decoder 1830 reconstructs the differential motion vector and decodes it at the reference resolution. In this case, the code number included in the reference resolution flag is extracted, the differential reference motion vector is decoded by referring to the code number table according to the differential reference motion vector resolution as shown in FIG. 29, and the difference is obtained by using the position information included in the reference resolution flag. Restore the motion vector. That is, when the differential vector decoder 1830 decodes the differential motion vector, the differential vector decoder 1830 extracts a reference resolution from the bitstream and calculates a differential reference motion vector using a code number table according to the differential reference motion vector resolution as shown in FIG. 29. do. At this time, the reference resolution flag representing the reference resolution and the position coordinate of the motion vector is extracted from the bitstream, and the differential motion vector is decoded using the reference resolution flag from the differential reference motion vector.
만일, 움직임 벡터가 기준 해상도 이외의 해상도인 경우에는 기준해상도 플래그를 추가로 부호화 하는 방법을 사용할 수 있다. 여기서 기준 해상도 플래그는 같은 기준 해상도와 같은 해상도인 여부를 나타내는 데이터와 실제 움직임 벡터의 위치를 나타내는 데이터를 포함할 수 있다.If the motion vector has a resolution other than the reference resolution, a method of additionally encoding the reference resolution flag may be used. The reference resolution flag may include data indicating whether the resolution is the same as the same reference resolution and data indicating the position of the actual motion vector.
한편 차분 벡터 복호화기(1830)의 다른 기능은 제1실시예에 따른 영상 복호화 장치(1800)에서 설명한 차분 벡터 복호화기(1830)의 기능을 포함할 수 있다. 띠라서 상세한 설명은 제1실시예에서 차분 벡터 복호화기(1830)의 기능을 설명하였으므로 더 이상의 상세한 설명은 생략한다.Meanwhile, another function of the difference vector decoder 1830 may include a function of the difference vector decoder 1830 described in the image decoding apparatus 1800 according to the first embodiment. Since the detailed description has described the function of the differential vector decoder 1830 in the first embodiment, the detailed description thereof will be omitted.
비트스트림에서 추출한 해상도 변경 플래그의 값(예컨대 1인 경우)에 따라 부호화기와 동일한 주변 해상도 중에서 빈도수가 가장 높은 해상도를 제외한 해상도 식별 플래그 테이블을 이용하여 비트스트림에서 해상도 식별 플래그를 추출하고 복호화 한다.According to the value of the resolution change flag extracted from the bitstream (for example, 1), the resolution identification flag is extracted and decoded from the bitstream using a resolution identification flag table excluding the resolution having the highest frequency among the same peripheral resolutions of the encoder.
한편, 해상도 전환 플래그 추출기(4850)는 비트스트림에서 해상도 전환 플래그를 추출하고 해상도 전환 플래그의 값(예컨대 1인 경우)에 따라 주변 해상도 중에서 빈도수가 가장 높은 해상도를 제외한 해상도 식별 플래그 테이블(도 45의 테이블)을 이용하여 비트스트림에서 해상도 식별 플래그를 추출하고 복호화 할 수 있다. 또한 주변 블록의 해상도를 이용하는 경우 빈도수가 가장 높은 해상도뿐만 아니라 A와 B의 해상도 중에서 낮은 해상도와 현재 블록의 해상도가 같은 경우에는 해상도 전환 플래그를 0으로 부호화하고, 다른 경우에는 해상도 전환 플래그를 1로 부호화할 수도 있다. 해상도 전환 플래그가 1로 부호화 되는 경우에는 해상도 식별 플래그 테이블에서 해당 플래그를 제외할 수 있다.Meanwhile, the resolution switching flag extractor 4850 extracts the resolution switching flag from the bitstream and excludes the resolution having the highest frequency among the peripheral resolutions according to the value of the resolution switching flag (for example, 1). Table), the resolution identification flag can be extracted and decoded in the bitstream. In addition, when using the resolution of the neighboring block, the resolution conversion flag is encoded as 0 when the resolution of the current block is the same as the resolution among the A and B resolutions as well as the highest frequency resolution, and the resolution conversion flag is set to 1 when the resolution is different. It can also be encoded. When the resolution switch flag is encoded as 1, the flag may be excluded from the resolution identification flag table.
한편, 해상도 전환 플래그 추출기(4850)는 비트스트림에서 해상도 전환 플래그 값(예컨대 1인 경우)을 추출하여 이전 블록 A와 해상도가 다름을 알 수 있도록 함으로써 현재 블록의 해상도를 산출한다. 예를 들어, 해상도 세트가 1/2, 1/4인 경우에 이전 블록의 해상도가 1/2이면 전환되는 해상도는 1/4임을 알 수 있다.Meanwhile, the resolution switch flag extractor 4850 calculates the resolution of the current block by extracting a resolution switch flag value (for example, 1) from the bitstream so that the resolution is different from the previous block A. FIG. For example, if the resolution set is 1/2, 1/4, the resolution to be converted is 1/4 if the resolution of the previous block is 1/2.
한편, 본 발명의 일 실시예에 따른 영상 부호화/복호화 장치는 도 9 또는 도 32의 영상 부호화 장치의 비트스트림 출력단과 도 18 또는 도 48의 영상 복호화 장치의 비트스트림 입력단을 연결함으로써 구현할 수 있다.Meanwhile, the image encoding / decoding apparatus according to an embodiment of the present invention may be implemented by connecting the bitstream output terminal of the image encoding apparatus of FIG. 9 or 32 and the bitstream input terminal of the image decoding apparatus of FIG. 18 or 48.
본 발명의 일 실시예에 따른 영상 부호화/복호화 장치는 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화하는 영상 부호화기; 및 비트스트림으로부터 해상도 정보를 추출하여 해상도를 복원하고 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 각 영역을 인터 예측 복호화하는 영상 복호화기를 포함한다.An image encoding / decoding apparatus according to an embodiment of the present invention determines a motion vector resolution for each region or motion vector and inter-predictively encodes an image in units of regions using a motion vector according to the motion vector resolution determined for each region or motion vector. Image encoder; And an image decoder extracting the resolution information from the bitstream to restore the resolution and inter-prediction-decoding each region by using the motion vector according to the reconstructed motion vector resolution of each region or motion vector.
도 19는 본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 방법을 설명하기 위한 순서도이다.19 is a flowchart illustrating an image decoding method using adaptive motion vector resolution according to the first embodiment of the present invention.
본 발명의 제1 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 방법은 비트스트림으로부터 해상도 변경 플래그를 추출하고, 추출된 해상도 변경 플래그에 따라 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하며, 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 영역마다의 움직임 벡터를 이용하여 각 영역을 인터 예측 복호화한다.In the image decoding method using the adaptive motion vector resolution according to the first embodiment of the present invention, a resolution change flag is extracted from a bitstream, and a resolution identification flag encoded from the bitstream is extracted and decoded according to the extracted resolution change flag. The motion vector resolution for each region or motion vector is reconstructed, and each region is inter predicted and decoded using the motion vector for each region according to the reconstructed each region or motion vector resolution.
이를 위해, 영상 복호화 장치(1800)는 비트스트림으로부터 해상도 변경 플래그를 추출하고(S1910), 추출된 해상도 변경 플래그가 움직임 벡터 해상도가 영역마다 변경되는지 여부를 판단하여(S1920), 해상도 변경 플래그가 움직임 벡터 해상도가 영역 또는 움직임 벡터마다 변경됨을 나타내는 경우에는 비트스트림으로부터 해상도 식별 플래그를 추출하고 복호화하여 각 영역 또는 움직임 벡터의 움직임 벡터 해상도를 복원하며(S1930), 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도로 각 영역 또는 움직임 벡터의 움직임 벡터를 복원하여 인터 예측 복호화한다(S1940). 또한, 영상 복호화 장치(1800)는 해상도 변경 플래그가 움직임 벡터 해상도가 영역 또는 움직임 벡터마다 변경되지 않고 고정됨을 나타내는 경우에는 비트스트림으로부터 움직임 벡터 해상도 플래그를 추출하고 복호화하여 복원하고(S1950), 복원된 움직임 벡터 해상도에 따라 헤더에서 정의된 하위 영역에 대해 고정된 움직임 벡터 해상도에 따라 움직임 벡터를 복원하여 각 영역을 인터 예측 복호화한다(S1960). 여기서, 영역 또는 움직임 벡터마다 복호화되는 움직임 벡터 해상도는 움직임 벡터의 x 컴포넌트와 y 컴포넌트별로 서로 다를 수 있다.To this end, the image decoding apparatus 1800 extracts a resolution change flag from the bitstream (S1910), and determines whether the extracted resolution change flag changes the motion vector resolution for each region (S1920). If the vector resolution is changed for each region or motion vector, the resolution identification flag is extracted and decoded from the bitstream to restore the motion vector resolution of each region or motion vector (S1930), and the motion vector of each restored region or motion vector. Inter-prediction decoding is performed by reconstructing the motion vector of each region or the motion vector at the resolution (S1940). In addition, when the resolution change flag indicates that the motion vector resolution is fixed without changing for each region or motion vector, the image decoding apparatus 1800 extracts, decodes, and restores the motion vector resolution flag from the bitstream (S1950). Inter-prediction decoding is performed on each region by reconstructing the motion vector according to the fixed motion vector resolution for the lower region defined in the header according to the motion vector resolution (S1960). Here, the motion vector resolution decoded for each region or motion vector may be different for each x component and y component of the motion vector.
여기서, 영상 복호화 장치(1800)는 동일한 움직임 벡터 해상도를 가지는 영역 또는 움직임 벡터끼리 묶어 쿼드 트리 구조로 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하거나, 각 영역의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 부호화된 해상도 식별 플래그를 복호화하여 영역마다의 움직임 벡터 해상도를 복원하거나, 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 런과 길이가 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하거나, 영역 또는 움직임 벡터마다의 움직임 벡터 해상도가 태그 트리를 이용하여 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하거나, 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 빈도수에 따라 해상도 식별 플래그에 할당하는 비트수를 변경하여 복호화하거나, 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래그가 추정 가능함을 나타내는 플래그인 경우에는 미리 약속된 추정 방식에 따라 움직임 벡터 해상도를 추정하여 추정된 움직임 벡터 해상도를 해당 영역 또는 움직임 벡터의 움직임 벡터 해상도로서 복원하고, 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래가 추정 불가능함을 나타내는 플래그인 경우에는 복호화된 해상도 식별 플래그가 나타내는 움직임 벡터 해상도를 복원할 수 있다. 이때, 영상 복호화 장치(1800)는 비트스트림의 헤더로부터 쿼드 트리 계층의 최대 개수 및 쿼드 트리 계층의 최하위 노드가 가리키는 영역 크기를 나타내는 식별자와 태그 트리 계층의 최대 개수 및 태그 트리 계층의 최하위 노드가 가리키는 영역 크기를 나타내는 식별자를 복호화하여 복원할 수 있다.Here, the image decoding apparatus 1800 decodes the resolution identification flag hierarchically coded in a quad tree structure by tying regions or motion vectors having the same motion vector resolution to restore motion vector resolution for each region or motion vector, or Decode the resolution identification flag encoded using the motion vector resolution predicted using the motion vector resolution of the surrounding area of the area to restore the motion vector resolution for each area, or the run and length of the motion vector resolution for each area or motion vector. Decodes the encoded resolution identification flag to restore the motion vector resolution for each region or motion vector, or decodes the resolution identification flag hierarchically encoded using the tag tree by using the tag tree.Restores the motion vector resolution for each direct vector, or decodes by changing the number of bits allocated to the resolution identification flag according to the frequency of the motion vector resolution for each region or motion vector, or the resolution identification flag decoded for each region or motion vector is estimated. In the case of the flag indicating that it is possible, the motion vector resolution is estimated according to a pre-determined estimation method, and the estimated motion vector resolution is restored as the motion vector resolution of the corresponding region or motion vector, and the resolution identification flag decoded for each region or motion vector In the case of a flag indicating that the estimation is impossible, the motion vector resolution indicated by the decoded resolution identification flag may be restored. In this case, the image decoding apparatus 1800 may identify an identifier indicating the maximum number of quad tree layers and the area size indicated by the lowest node of the quad tree layer from the header of the bitstream, the maximum number of tag tree layers, and the lowest node of the tag tree hierarchy. The identifier indicating the area size can be decrypted and restored.
또한, 영상 복호화 장치(1800)는 비트스트림으로부터 부호화된 차분 벡터를 추출하고 복호화하되, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 복호화하여 영역 또는 움직임 벡터마다의 차분 벡터를 복원할 수 있으며, 추가로 영역 또는 움직임 벡터마다의 예측 움직임 벡터를 예측하고 복원된 차분 벡터 및 예측 움직임 벡터를 이용하여 영역마다의 움직임 벡터를 복원할 수 있다.In addition, the image decoding apparatus 1800 extracts and decodes the encoded difference vector from the bitstream, and decodes the difference vector for each region or motion vector by decoding according to the reconstructed region or the motion vector resolution for each motion vector. In addition, the prediction motion vector for each region or motion vector may be predicted, and the motion vector for each region may be reconstructed using the reconstructed difference vector and the prediction motion vector.
이를 위해, 영상 복호화 장치(1800)는 UVLC를 이용하여 차분 벡터를 복호화할 수 있으며, 이 경우 K차 지수 골룸 코드를 이용하여 복호화하되, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 K차 지수 골룸 코드의 차수(K)를 변경할 수 있다. 영상 복호화 장치(1800)는 문맥 기반 이진 산술 부호화를 이용하여 차분 벡터를 복호화할 수 있으며, 이 경우 단항/K차 지수 골룸 결합형 코드를 이용하여 복호화하되, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 단항/K차 지수 골룸 결합형 코드의 차수(K)와 최대값(T)를 변경하여 복호화할 수 있다. 영상 복호화 장치(1800)는 CABAC를 이용하여 차분 벡터를 복호화하는 경우에는, 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 누적 확률을 다르게 계산하여 복호화할 수 있다.To this end, the image decoding apparatus 1800 may decode the difference vector using UVLC. In this case, the image decoding apparatus 1800 may decode using the K-th order exponential golem code, but according to the reconstructed region or the motion vector resolution for each motion vector. The order K of the exponential Gollum code can be changed. The image decoding apparatus 1800 may decode the difference vector by using context-based binary arithmetic coding. In this case, the image decoding apparatus 1800 may decode using the unary / K-order exponential golem combined code, but the motion vector for each reconstructed region or motion vector. The order (K) and the maximum value (T) of the unary / K-order exponential golem combined code can be changed and decoded according to the resolution. When decoding the difference vector using the CABAC, the image decoding apparatus 1800 may calculate and decode a cumulative probability differently according to the motion vector resolution for each reconstructed region or motion vector.
또한, 영상 복호화 장치(1800)는 각 영역의 주위 영역의 움직임 벡터를 이용하여 각 영역 또는 움직임 벡터의 움직임 벡터에 대한 예측 움직임 벡터를 예측하되, 주위 영역의 움직임 벡터 해상도와 각 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는, 주위 영역의 움직임 벡터 해상도를 각 영역 또는 움직임 벡터의 움직임 벡터 해상도로 변환하여 예측할 수 있다. 예측 움직임 벡터는 영상 부호화 장치와 복호화 장치에서 동일한 방법으로 얻어질 수 있다. 따라서 도 22 내지 도 26을 참조하면서 영상 부호화 장치에 의한 예측 움직임 벡터를 유도하는 다양한 실시예들 및 움직임 벡터 해상도 변환에 관한 실시예들은 본 발명에 따른 영상 복호화 장치에서도 동일하게 구현될 수 있다.In addition, the image decoding apparatus 1800 predicts a predicted motion vector with respect to the motion vector of each region or the motion vector by using the motion vector of the surrounding region of each region, but the motion vector resolution of the surrounding region and the motion vector resolution of each region If is not equal, the motion vector resolution of the surrounding area may be predicted by converting the motion vector resolution of each area or the motion vector. The predicted motion vector may be obtained in the same manner in the image encoding apparatus and the decoding apparatus. Accordingly, various embodiments of deriving a predictive motion vector by the image encoding apparatus and embodiments of motion vector resolution conversion with reference to FIGS. 22 to 26 may be similarly implemented in the image decoding apparatus according to the present invention.
또한, 영상 복호화 장치(1800)는 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 복호화 방법을 달리할 수 있다.In addition, the image decoding apparatus 1800 may change the resolution identification flag decoding method according to the distribution of the motion vector resolution of each region or the motion vector resolution determined for each region or motion vector.
또한, 영상 복호화 장치(1800)는 산술 복호화로 엔트로피 복호화할 때, 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 해상도 식별 플래그의 이진화 비트열의 생성 방법을 달리 하고, 확률 모델도 주위 영역의 움직임 벡터 해상도의 분포 및 현재까지 발생한 움직임 벡터 해상도의 확률에 따라 달리 적용하여 산술 복호화 및 확률 업데이트를 수행할 수 있다. 또한 비트의 위치에 따라 각기 다른 확률 모델을 사용하여 산술 복호화 및 확률 업데이트를 수행할 수 있다.In addition, when the image decoding apparatus 1800 performs entropy decoding by arithmetic decoding, a method of generating a binarization bit string of a resolution identification flag based on a distribution of a motion vector resolution determined for each region or motion vector according to the distribution of the motion vector resolution of the peripheral region of each region. In addition, the arithmetic decoding and the probability update may be performed by differently applying the probability model according to the distribution of the motion vector resolution of the surrounding area and the probability of the motion vector resolution that has occurred up to now. In addition, arithmetic decoding and probability updating may be performed using different probability models according to bit positions.
영상 복호화 장치(1800)는 각 영역 중 하나 이상의 영역이 블록이고 블록 모드가 스킵 모드인 경우에는, 주위 영역의 움직임 벡터 해상도 중 가장 높은 해상도로 주위 영역의 움직임 벡터 해상도를 변환하여 예측할 수 있다.When at least one of each region is a block and the block mode is a skip mode, the image decoding apparatus 1800 may convert and predict the motion vector resolution of the surrounding region to the highest resolution among the motion vector resolutions of the surrounding region.
도 51은 본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 방법을 설명하기 위한 순서도이다.51 is a flowchart illustrating a method of decoding an image using adaptive motion vector resolution according to a second embodiment of the present invention.
본 발명의 제2 실시예에 따른 적응적 움직임 벡터 해상도를 이용한 영상 복호화 방법은 해상도 지정 플래그 추출단계기(S5102), 해상도 복호단계(S5104), 차분 벡터 복호단계(S5106), 인터 예측 복호화단계(S5108) 및 해상도 전환 플래그 추출단계(S5110)를 포함하여 구성될 수 있다.The video decoding method using the adaptive motion vector resolution according to the second embodiment of the present invention includes a resolution designation flag extraction step (S5102), a resolution decoding step (S5104), a differential vector decoding step (S5106), and an inter prediction decoding step ( S5108) and the resolution switching flag extraction step (S5110).
여기서 해상도 지정 플래그 추출단계기(S5102)는 해상도 지정 플래그 추출기(4810)의 동작에, 해상도 복호단계(S5104)는 해상도 복호화기(4820)의 동작에, 차분 벡터 복호단계(S5106)는 차분 벡터 복호화기(4830)의 동작에, 인터 예측 복호화단계(S5108)는 인터 예측 복호화기(4840)의 동작에, 해상도 전환 플래그 추출단계(S5110)는 해상도 전환 플래그 추출기(4850)의 동작에 각각 대응될 수 있으므로, 자세한 설명은 생략한다.Here, the resolution designation flag extraction step S5102 is performed by the operation of the resolution designation flag extractor 4810, the resolution decoding step S5104 is performed by the resolution decoder 4820, and the differential vector decoding step S5106 is differential vector decoding. In operation 4830, the inter prediction decoding operation S5108 may correspond to the operation of the inter prediction decoder 4840, and the resolution switching flag extraction operation S5110 may correspond to an operation of the resolution conversion flag extractor 4850, respectively. Therefore, detailed description is omitted.
한편, 본 발명의 일 실시예에 따른 영상 부호화/복호화 방법은 본 발명의 제1 또는 제2 실시예에 따른 영상 부호화 방법과 제1 또는 제2 실시예에 따른 영상 복호화 방법을 결합함으로써 구현될 수 있다.Meanwhile, the image encoding / decoding method according to an embodiment of the present invention may be implemented by combining the image encoding method according to the first or second embodiment of the present invention and the image decoding method according to the first or second embodiment. have.
본 발명의 일 실시예에 따른 영상 부호화/복호화 방법은 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 영상을 영역 단위로 인터 예측 부호화하는 영상 부호화단계; 및 비트스트림으로부터 해상도 정보를 추출하여 해상도를 복원하고 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 각 영역을 인터 예측 복호화하는 영상 복호화단계를 포함한다.An image encoding / decoding method according to an embodiment of the present invention determines a motion vector resolution for each region or motion vector, and inter-predictively encodes an image in units of regions using a motion vector according to the motion vector resolution determined for each region or motion vector. Image encoding step; And an image decoding step of extracting the resolution information from the bitstream, restoring the resolution, and inter-prediction-decoding each region by using a motion vector according to the reconstructed motion vector resolution of each region or motion vector.
이상에서 전술한 바와 같이, 본 발명의 실시예에 따르면, 영상의 특성(예를 들어, 영상의 복잡한 정도 또는 영상의 움직임 정도)에 따라 임의의 크기의 영역 단위 또는 움직임 벡터 단위로 움직임 벡터 해상도를 결정하여 적응적인 움직임 벡터 해상도를 가지는 움직임 벡터를 이용하여 인터 예측 부호화를 수행할 수 있기 때문에, 영상의 품질을 높이면서도 부호화에 따른 비트량을 줄일 수 있어서 압축 효율을 향상시킬 수 있다. 예를 들어, 영상의 임의의 픽처에서 일부 영역은 영상의 복잡한 정도가 크지만 움직임 정도가 작고, 다른 영역은 영상의 복잡한 정도가 작지만 움직임 정도가 큰 경우, 일부 영역에 대해서는 움직임 벡터 해상도를 높여 인터 예측 부호화하면 인터 예측의 정확성이 높아져서 잔차 신호와 그에 따른 부호화된 비트량을 줄일 수 있을 뿐만 아니라 움직임 정도가 작아 움직임 벡터 해상도가 커져도 움직임 벡터를 부호화한 비트량을 크게 증가시키지 않으므로, 영상 품질을 향상시키면서도 부호화 비트량을 줄일 수 있다. 또한, 다른 영역에 대해서는 움직임 벡터 해상도는 낮추어 인터 예측 부호화하더라도 영상 품질을 크게 떨어뜨리지 않으면서도 움직임 벡터 해상도가 작기 때문에 움직임 벡터를 부호화한 비트량을 줄일 수 있어, 영상 품질을 크게 떨어뜨리지 않으면서도 전체적인 부호화 비트량을 줄일 수 있어 압축 효율을 향상시킬 수 있다.As described above, according to an exemplary embodiment of the present invention, the motion vector resolution may be adjusted in units of an area or a motion vector of any size according to the characteristics of the image (for example, the complexity of the image or the degree of motion of the image). Since inter prediction encoding may be performed using a motion vector having a determined and adaptive motion vector resolution, the bit rate due to encoding may be reduced while improving the quality of an image, thereby improving compression efficiency. For example, in some pictures of an image, if some areas have a high degree of complexity but a small amount of motion, and other areas have a low degree of complexity but a large degree of motion, for some areas, the motion vector resolution may be increased for some areas. Predictive coding improves the accuracy of inter prediction, which reduces the residual signal and the amount of encoded bits. In addition, even if the motion degree is small and the resolution of the motion vector is increased, the amount of bits encoding the motion vector is not significantly increased, thereby improving image quality. In addition, the amount of encoded bits can be reduced. In addition, for other regions, the motion vector resolution is lowered so that even if the inter prediction encoding is performed, the motion vector resolution is small without significantly reducing the image quality, thereby reducing the amount of bits encoding the motion vector, thereby reducing the overall image quality without significantly reducing the image quality. The amount of coding bits can be reduced, so that the compression efficiency can be improved.
이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 캐리어 웨이브 매체 등이 포함될 수 있다.In the above description, it is described that all the components constituting the embodiments of the present invention are combined or operated in one, but the present invention is not necessarily limited to these embodiments. In other words, within the scope of the present invention, all of the components may be selectively operated in combination with one or more. In addition, although all of the components may be implemented as one independent hardware, each or some of the components of the program modules are selectively combined to perform some or all of the functions combined in one or a plurality of hardware It may be implemented as a computer program having a. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program may be stored in a computer readable storage medium and read and executed by a computer, thereby implementing embodiments of the present invention. The storage medium of the computer program may include a magnetic recording medium, an optical recording medium, a carrier wave medium, and the like.
또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재할 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.In addition, the terms "comprise", "comprise" or "having" described above mean that the corresponding component may be inherent unless specifically stated otherwise, and thus excludes other components. It should be construed that it may further include other components instead. All terms, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. Terms commonly used, such as terms defined in a dictionary, should be interpreted to coincide with the contextual meaning of the related art, and shall not be interpreted in an ideal or excessively formal sense unless explicitly defined in the present invention.
이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those skilled in the art to which the present invention pertains may make various modifications and changes without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical idea of the present invention but to describe the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The protection scope of the present invention should be interpreted by the following claims, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of the present invention.
이상에서 설명한 바와 같이 본 발명은 동영상을 압축하는 영상 처리 분야에 적용되어, 영상을 소정의 영역 단위로 움직임 벡터 해상도를 적응적으로 변경하여 인터 예측 부호화함으로써, 영상을 효율적으로 부호화할 수 있는 효과를 발생하는 매우 유용한 발명이다.As described above, the present invention is applied to an image processing field for compressing a video, and the image can be efficiently encoded by inter-prediction coding by adaptively changing a motion vector resolution in a predetermined area unit. It is a very useful invention that occurs.
CROSS-REFERENCE TO RELATED APPLICATIONCROSS-REFERENCE TO RELATED APPLICATION
본 특허출원은 2009년 08월 21일 한국에 출원한 특허출원번호 제 10-2009-0077452 호 및 2010년 08월 20일 출원한 특허출원번호 제 10-2010-0081096 호에 대해 미국 특허법 119(a)조(35 U.S.C § 119(a))에 따라 우선권을 주장하면, 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다. 아울러, 본 특허출원은 미국 이외에 국가에 대해서도 위와 동일한 동일한 이유로 우선권을 주장하면 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다.This patent application is related to US patent law No. 119 (a) for patent application No. 10-2009-0077452 filed in Korea on August 21, 2009 and patent application No. 10-2010-0081096 filed on August 20, 2010. If priority is claimed under Article 35 (35 USC § 119 (a)), all of this is incorporated by reference in this patent application. In addition, if this patent application claims priority for the same reason as above for a country other than the United States, all the contents thereof are incorporated into this patent application by reference.

Claims (80)

  1. 영상 부호화/복호화 장치에 있어서,In the video encoding / decoding device,
    영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 영상 부호화기; 및An image encoder for determining a motion vector resolution for each region or motion vector and inter prediction encoding using a motion vector according to the motion vector resolution determined for each region or motion vector; And
    비트스트림으로부터 해상도 정보를 추출하여 해상도를 복원하고 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 영상 복호화기The image decoder extracts the resolution information from the bitstream, restores the resolution, and inter-predicts and decodes the motion vector according to the motion vector resolution of each reconstructed region or motion vector.
    를 포함하는 것을 특징으로 하는 영상 부호화/복호화 장치.Image encoding / decoding apparatus comprising a.
  2. 영상을 부호화하는 장치에 있어서,In the apparatus for encoding a video,
    영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는 해상도 결정기; 및A resolution determiner for determining a motion vector resolution for each region or motion vector; And
    상기 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 인터 예측 부호화기An inter prediction encoder for inter prediction encoding using a motion vector according to a motion vector resolution determined for each region or motion vector
    를 포함하는 것을 특징으로 하는 영상 부호화 장치.An image encoding apparatus comprising a.
  3. 제 2 항에 있어서, 상기 영상 부호화 장치는,The video encoding apparatus of claim 2,
    상기 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는지 여부를 나타내는 해상도 변경 플래그를 생성하는 해상도 변경 플래그 생성기를 추가로 포함하는 것을 특징으로 하는 영상 부호화 장치.And a resolution change flag generator for generating a resolution change flag indicating whether the motion vector resolution is determined for each region or motion vector.
  4. 제 2 항에 있어서, 상기 영상 부호화 장치는,The video encoding apparatus of claim 2,
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 나타내는 해상도 식별 플래그를 부호화하는 해상도 부호화기를 추가로 포함하는 것을 특징으로 하는 영상 부호화 장치.And a resolution encoder for encoding a resolution identification flag indicating a motion vector resolution determined for each region or motion vector.
  5. 제 2 항에 있어서, 상기 영상 부호화 장치는,The video encoding apparatus of claim 2,
    상기 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터와 예측 움직임 벡터 간의 차이인 차분 벡터를 부호화하는 차분 벡터 부호화기를 추가로 포함하되, 상기 차분 벡터 부호화기는 상기 움직임 벡터 해상도에 따라 상기 차분 벡터를 다르게 부호화하는 것을 특징으로 하는 영상 부호화 장치.And further comprising a difference vector encoder for encoding a difference vector that is a difference between a motion vector and a predicted motion vector according to the motion vector resolution determined for each region or motion vector, wherein the difference vector encoder determines the difference vector according to the motion vector resolution. An image encoding device, characterized in that for encoding differently.
  6. 제 4 항에 있어서,The method of claim 4, wherein
    상기 해상도 식별 플래그는,The resolution identification flag,
    움직임 벡터의 해상도 및 차분 움직임 벡터의 해상도 중에서 하나 이상인 것을 특징으로 하는 영상 부호화 장치.And at least one of a resolution of the motion vector and a resolution of the differential motion vector.
  7. 제 5 항에 있어서,The method of claim 5,
    상기 차분 벡터 부호화기는,The difference vector encoder is
    차분 움직임 벡터를 부호화 하는 경우, 기준 해상도를 정하고, 기준 해상도가 아닌 해상도를 갖는 움직임 벡터는 기준 해상도를 갖는 움직임 벡터로 변환하고 주변 블록의 기준 움직임 벡터로부터 구한 기준 예측 움직임 벡터를 이용하여 차분 움직임 벡터를 산출하는 것을 특징으로 하는 영상 부호화 장치.When encoding a differential motion vector, a reference resolution is determined, a motion vector having a resolution other than the reference resolution is converted to a motion vector having a reference resolution, and the differential motion vector is obtained by using a reference prediction motion vector obtained from the reference motion vector of the neighboring block. And a video encoding apparatus.
  8. 제 5 항에 있어서,The method of claim 5,
    상기 차분 벡터 부호화기는,The difference vector encoder is
    상기 기준 해상도와 상기 움직임 벡터의 해상도가 다른 경우에 기준 해상도 플래그를 추가로 부호화하는 것을 특징으로 하는 영상 부호화 장치.And a reference resolution flag is further encoded when the resolution of the reference resolution and the motion vector are different.
  9. 제 2항에 있어서,The method of claim 2,
    상기 영상 부호화 장치는,The video encoding apparatus,
    영상의 영역 또는 움직임 벡터마다 해상도 세트를 다르게 지정하는 해상도 지정 플래그 생성기를 추가로 포함하는 것을 특징으로 하는 영상 부호화 장치.And a resolution specifying flag generator for differently specifying a resolution set for each region or motion vector of the image.
  10. 제 2 항에 있어서,The method of claim 2,
    상기 해상도 결정기는,The resolution determiner,
    참조 픽처 인덱스를 이용하여 현재 블록의 해상도를 알 수 있는 경우에는 해상도 식별 플래그를 생성하지 않고 참조픽처 인덱스를 부호화함으로써 해상도에 대한 정보를 부호화하는 것을 특징으로 하는 영상 부호화 장치.And when the resolution of the current block is known using the reference picture index, information about the resolution is encoded by encoding the reference picture index without generating a resolution identification flag.
  11. 제 9항에 있어서,The method of claim 9,
    상기 해상도 지정 플래그 생성기는,The resolution designation flag generator,
    복수개의 참조 픽처를 사용하는 경우 해상도 지정 플래그를 부호화하지 않고 기설정된 기준에 따라 참조 픽처마다 해상도 세트를 다르게 설정하는 것을 특징으로 하는 영상 부호화 장치.And a resolution set is set differently for each reference picture according to a predetermined reference without encoding a resolution designation flag when a plurality of reference pictures are used.
  12. 제 11항에 있어서,The method of claim 11,
    상기 기설정 기준은,The preset criteria,
    참조픽처와 현재 픽처 간의 거리, 에러측정수단을 이용하여 측정한 해상도 간의 에러값, 참조픽처마다 해상도 세트가 설정된 테이블 중에서 어느 하나인 것을 특징으로 하는 영상 부호화 장치.And a distance value between the reference picture and the current picture, an error value between resolutions measured using error measuring means, and a table in which a resolution set is set for each reference picture.
  13. 제 11항에 있어서,The method of claim 11,
    상기 해상도 지정 플래그 생성기는,The resolution designation flag generator,
    참조 픽처로 사용될 픽처의 경우와 참조 픽처로 사용되지 않는 경우 해상도 세트를 다르게 설정하는 것을 특징으로 하는 영상 부호화 장치.And a resolution set differently for a picture to be used as a reference picture and a picture not to be used as a reference picture.
  14. 제 2항에 있어서,The method of claim 2,
    상기 영상 부호화 장치는,The video encoding apparatus,
    현재 해상도를 부호화할 영역의 주변 해상도 또는 이전 블록의 해상도와의 변화를 알려주는 해상도 전환 플래그를 발생하는 해상도 전환 플래그 생성기를 추가로 포함하는 것을 특징으로 하는 영상 부호화 장치.And a resolution change flag generator for generating a resolution change flag indicating a change in the peripheral resolution of the region to be encoded with the current resolution or the resolution of the previous block.
  15. 영상을 복호화하는 장치에 있어서,In the apparatus for decoding an image,
    비트스트림으로부터 해상도 변경 플래그를 추출하는 해상도 변경 플래그 추출기;A resolution change flag extractor for extracting a resolution change flag from the bitstream;
    상기 추출된 해상도 변경 플래그에 따라 상기 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 해상도 복호화기; 및A resolution decoder which extracts and decodes an encoded resolution identification flag from the bitstream according to the extracted resolution change flag to restore a motion vector resolution for each region or motion vector; And
    상기 복원된 각 영역의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 인터 예측 복호화기An inter prediction decoder for performing inter prediction decoding on the reconstructed motion vector resolution of each region.
    를 포함하는 것을 특징으로 하는 영상 복호화 장치.Video decoding apparatus comprising a.
  16. 제 15 항에 있어서, 상기 영상 복호화 장치는,The video decoding apparatus of claim 15,
    상기 비트스트림으로부터 부호화된 차분 벡터를 추출하고 복호화하되, 상기 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 복호화하여 상기 영역마다의 차분 벡터를 복원하는 차분 벡터 복호화기를 추가로 포함하되, 상기 인터 예측 복호화기는 상기 영역마다의 예측 움직임 벡터를 예측하고 상기 복원된 차분 벡터 및 상기 예측 움직임 벡터를 이용하여 상기 영역마다의 움직임 벡터를 복원하는 것을 특징으로 하는 영상 복호화 장치.And extracting and decoding the encoded difference vector from the bitstream, and decoding the encoded difference vector according to the reconstructed region or the motion vector resolution for each motion vector to reconstruct the difference vector for each region. And a predictive decoder predicts a predicted motion vector for each region and reconstructs the motion vector for each region by using the reconstructed difference vector and the predicted motion vector.
  17. 영상을 복호화하는 장치에 있어서,In the apparatus for decoding an image,
    비트스트림으로부터 수신한 정보를 이용하여 영역 또는 움직임 벡터마다의 해상도를 복원하는 해상도 복호화기; 및A resolution decoder for reconstructing resolution for each region or motion vector using information received from the bitstream; And
    상기 복원된 각 영역의 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 인터 예측 복호화기An inter prediction decoder that performs inter prediction decoding using motion vectors according to the resolutions of the reconstructed regions
    를 포함하는 것을 특징으로 하는 영상 복호화 장치.Video decoding apparatus comprising a.
  18. 제 17 항에 있어서, 상기 영상 복호화 장치는,The image decoding apparatus of claim 17,
    상기 비트스트림으로부터 해상도 지정 플래그를 추출하는 해상도 지정 플래그 추출기를 추가로 포함하고,Further comprising a resolution specifying flag extractor for extracting a resolution specifying flag from the bitstream,
    상기 해상도 복호화기는, 상기 추출된 해상도 지정 플래그에 따라 상기 해상도를 복원하는 것을 특징으로 하는 영상 복호화 장치.And the resolution decoder restores the resolution according to the extracted resolution designation flag.
  19. 제 18 항에 있어서, The method of claim 18,
    상기 해상도 지정 플래그는,The resolution designation flag is,
    단일 해상도로 고정됨을 나타내는 플래그이거나 또는 하나 이상의 해상도를 갖는 해상도 세트인 것을 특징으로 하는 영상 복호화 장치.And a flag indicating that the image is fixed at a single resolution or a resolution set having one or more resolutions.
  20. 제 18항에 있어서,The method of claim 18,
    상기 해상도 지정 플래그 추출기는,The resolution designation flag extractor,
    복수개의 참조 픽처를 사용하는 경우 기설정된 기준에 따라 참조 픽처마다 해상도 세트를 다르게 설정하는 것을 특징으로 하는 영상 복호화 장치.When the plurality of reference pictures are used, the image decoding apparatus characterized in that different resolution sets are set for each reference picture according to a predetermined reference.
  21. 제 20항에 있어서,The method of claim 20,
    상기 기설정 기준은,The preset criteria,
    참조픽처와 현재 픽처 간의 거리, 에러측정수단을 이용하여 측정한 해상도 간의 에러값, 참조픽처마다 해상도 세트가 설정된 테이블 중에서 어느 하나인 것을 특징으로 하는 영상 복호화 장치.And a distance value between the reference picture and the current picture, an error value between resolutions measured using error measuring means, and a table in which a resolution set is set for each reference picture.
  22. 제 18항에 있어서,The method of claim 18,
    상기 해상도 복호화기는,The resolution decoder,
    참조픽처 인덱스에 대하여 설정된 해상도를 산출하는 것을 특징으로 하는 영상 복호화 장치.And a resolution set for a reference picture index.
  23. 제 17항에 있어서,The method of claim 17,
    상기 영상 복호화 장치는,The video decoding apparatus,
    상기 비트스트림에서 해상도 전환 플래그를 추출하고 해상도 전환 플래그의 값에 따라 해상도 식별 플래그를 추출하는 해상도 전환 플래그 추출기를 추가로 포함하는 것을 특징으로 하는 영상 복호화 장치.And a resolution change flag extractor for extracting a resolution change flag from the bitstream and extracting a resolution identification flag according to a value of the resolution change flag.
  24. 제 23항에 있어서,The method of claim 23, wherein
    해상도 복호화기는,The resolution decoder is
    상기 비트스트림의 헤더에서 추출되고 복호화된 해상도 전환 플래그의 해상도 종류에 따라 해상도 식별 플래그를 추출하고 이를 이용하여 부호번호 테이블로부터 추출한 부호 번호를 참조하여 해당 해상도에 대응하는 차분 움직임 벡터의 값을 추출하는 것을 특징으로 하는 영상 복호화 장치.Extracting a resolution identification flag according to the resolution type of the resolution conversion flag extracted and decoded from the header of the bitstream, and extracting a value of a differential motion vector corresponding to the corresponding resolution by referring to a code number extracted from a code number table using the resolution identification flag And a video decoding apparatus.
  25. 영상을 부호화/복호화하는 방법에 있어서, 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하고 영역 또는 움직임 벡터마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 영상 부호화단계; 및 A method of encoding / decoding an image, the method comprising: an image encoding step of determining a motion vector resolution for each region or motion vector and inter prediction encoding using a motion vector according to a motion vector resolution determined for each region or motion vector; And
    비트스트림으로부터 해상도 정보를 추출하여 해상도를 복원하고 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 영상 복호화단계Image decoding step of extracting the resolution information from the bitstream to restore the resolution and inter-prediction decoding using the motion vector according to the motion vector resolution of each reconstructed region or motion vector
    를 포함하는 것을 특징으로 하는 영상 부호화/복호화 방법.Image encoding / decoding method comprising a.
  26. 영상을 부호화하는 방법에 있어서,In the method of encoding an image,
    영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는 단계; 및Determining a motion vector resolution for each region or motion vector; And
    상기 영역마다 결정된 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 부호화하는 단계Inter-prediction encoding using a motion vector according to the motion vector resolution determined for each region;
    를 포함하는 것을 특징으로 하는 영상 부호화 방법.Image encoding method comprising a.
  27. 제 26 항에 있어서, 상기 움직임 벡터 해상도는,The method of claim 26, wherein the motion vector resolution,
    움직임 벡터의 x 컴포넌트와 y 컴포넌트별로 서로 다른 것을 특징으로 하는 영상 부호화 방법.The video encoding method of claim 1, wherein the x component and the y component of the motion vector are different.
  28. 제 26 항에 있어서, 상기 영상 부호화 방법은,The method of claim 26, wherein the video encoding method,
    상기 영역 또는 움직임 벡터마다 움직임 벡터 해상도를 결정하는지 여부를 나타내는 해상도 변경 플래그를 생성하는 단계를 추가로 포함하는 것을 특징으로 하는 영상 부호화 방법.And generating a resolution change flag indicating whether a motion vector resolution is determined for each region or motion vector.
  29. 제 26 항에 있어서, 상기 영상 부호화 방법은,The method of claim 26, wherein the video encoding method,
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 부호화하는 단계를 추가로 포함하는 것을 특징으로 하는 영상 부호화 방법.And encoding a motion vector resolution determined for each of the regions or the motion vectors.
  30. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 동일한 움직임 벡터 해상도를 가지는 영역끼리 묶어 쿼드 트리 구조로 계층적으로 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding a motion vector resolution determined for each region or motion vector hierarchically and quadratically encoding regions having the same motion vector resolution.
  31. 제 30 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 30, wherein the encoding of the motion vector resolution comprises:
    상기 쿼드 트리 계층의 최대 개수 및 상기 쿼드 트리 계층의 최하위 노드가 가리키기는 영역 크기를 나타내는 식별자를 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding an identifier indicating a maximum number of the quad tree layers and an area size indicated by the lowest node of the quad tree layer.
  32. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding the motion vector resolution determined for each region or motion vector using the motion vector resolution predicted using the motion vector resolution of the surrounding area of each region.
  33. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 런과 길이를 이용하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.And a motion vector resolution determined for each region or motion vector using run and length.
  34. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 태그 트리를 이용하여 계층적으로 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding the motion vector resolution determined for each region or motion vector hierarchically using a tag tree.
  35. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도의 빈도수에 따라 상기 움직임 벡터 해상도에 할당하는 비트수를 변경하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding the number of bits allocated to the motion vector resolution according to the frequency of the motion vector resolution determined for each region or motion vector.
  36. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 영상 복호화 장치에서 미리 약속된 추정 방식에 따라 추정할 수 있는지 여부를 판단하여, 움직임 벡터 해상도를 추정할 수 있는 영역에 대해서는 추정 가능함을 나타내는 식별자를 부호화하며, 움직임 벡터 해상도를 추정할 수 없는 영역에 대해서는 추정 불가능함을 나타내는 식별자와 움직임 벡터 해상도를 함께 부호화하는 것을 특징으로 하는 영상 부호화 방법.It is determined whether or not the motion vector resolution determined for each region or motion vector can be estimated according to a pre-scheduled estimation scheme by the image decoding apparatus, and an identifier indicating that the motion vector resolution can be estimated is encoded. And encoding a motion vector resolution and an identifier indicating that the motion vector resolution cannot be estimated in the region where the motion vector resolution cannot be estimated.
  37. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 다른 비트수를 할당하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding a different number of bits according to the distribution of the motion vector resolution of the surrounding area of each region.
  38. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    산술 부호화를 이용하여 부호화할 때, 상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 다른 이진화 비트열의 생성 방법을 이용하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.When encoding using arithmetic coding, the motion vector resolution determined for each region or motion vector is encoded using a method of generating a binarized bit string according to the distribution of the motion vector resolution of the peripheral region of each region. Encoding method.
  39. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    산술 부호화를 이용하여 부호화할 때, 상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 각 영역의 주위 영역의 움직임 벡터 해상도의 분포 및 움직임 벡터 해상도의 발생 확률에 따라 다른 확률 모델을 이용하여 산술 부호화하고 확률 모델을 업데이트하는 것을 특징으로 하는 영상 부호화 방법.When encoding using arithmetic coding, the motion vector resolution determined for each region or motion vector is arithmetic encoded using a different probability model according to the distribution of the motion vector resolution of each region and the occurrence probability of the motion vector resolution. The video encoding method, characterized by updating the probability model.
  40. 제 29 항에 있어서, 상기 움직임 벡터 해상도를 부호화하는 단계는,The method of claim 29, wherein the encoding of the motion vector resolution comprises:
    차분 벡터의 각 컴포넌트가 '0'이 아닌 경우에만, 상기 영역 또는 움직임마다 결정되는 움직임 벡터 해상도를 부호화하는 것을 특징으로 하는 영상 부호화 방법.And a motion vector resolution determined for each region or motion only when each component of the difference vector is not '0'.
  41. 제 26 항에 있어서, 상기 움직임 벡터 해상도를 결정하는 단계는,27. The method of claim 26, wherein determining the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터의 예측 움직임 벡터 또는 차분 벡터의 크기가 임계값보다 큰 경우에는 상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도를 소정의 값으로 결정하는 것을 특징으로 하는 영상 부호화 방법.If the size of the predicted motion vector or the difference vector of the motion vector according to the motion vector resolution determined for each region or motion vector is larger than a threshold, determining the motion vector resolution determined for each region or motion vector as a predetermined value. An image encoding method.
  42. 제 26 항에 있어서, 상기 영상 부호화 방법은,The method of claim 26, wherein the video encoding method,
    상기 영역 또는 움직임 벡터마다 결정되는 움직임 벡터 해상도에 따른 움직임 벡터와 예측 움직임 벡터 간의 차이인 차분 벡터를 부호화하는 단계를 추가로 포함하되, 상기 움직임 벡터 해상도에 따라 상기 차분 벡터를 다르게 부호화하는 것을 특징으로 하는 영상 부호화 방법.And encoding a difference vector that is a difference between a motion vector and a predicted motion vector according to the motion vector resolution determined for each region or motion vector, wherein the difference vector is encoded differently according to the motion vector resolution. The video encoding method.
  43. 제 42 항에 있어서, 상기 차분 벡터를 부호화하는 단계는,43. The method of claim 42, wherein encoding the difference vector comprises:
    범용 가변 길이 부호화를 이용하여 상기 차분 벡터를 부호화하는 경우에는, K차 지수 골룸 코드를 이용하여 부호화하되, 상기 영역마다 결정되는 움직임 벡터 해상도에 따라 상기 지수 골룸 코드의 차수(K)를 변경하는 것을 특징으로 하는 영상 부호화 방법.In the case of encoding the difference vector using universal variable length coding, the difference vector is encoded using a K-order exponential golem code, and the order K of the exponential golem code is changed according to the motion vector resolution determined for each region. An image encoding method.
  44. 제 42 항에 있어서, 상기 차분 벡터를 부호화하는 단계는,43. The method of claim 42, wherein encoding the difference vector comprises:
    문맥 기반 이진 산술 부호화를 이용하여 상기 차분 벡터를 부호화하는 경우에는, 단항/K차 지수 골룸 결합형 코드를 이용하여 부호화하되, 상기 영역마다 결정되는 움직임 벡터 해상도에 따라 단항/K차 지수 골룸 결합형 코드의 차수(K)와 최대값(T)를 변경하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.In the case of encoding the difference vector using context-based binary arithmetic coding, encoding is performed using a unary / K-order exponential golem combined code, but the unary / K-order exponential golem combined according to the motion vector resolution determined for each region. And encoding and changing the order (K) and the maximum value (T) of the code.
  45. 제 42 항에 있어서, 상기 차분 벡터를 부호화하는 단계는,43. The method of claim 42, wherein encoding the difference vector comprises:
    문맥 기반 이진 산술 부호화를 이용하여 상기 차분 벡터를 부호화하는 경우에는, 상기 영역마다 결정되는 움직임 벡터 해상도에 따라 누적 확률을 다르게 계산하여 부호화하는 것을 특징으로 하는 영상 부호화 방법.When encoding the difference vector using context-based binary arithmetic coding, the image encoding method according to the present invention is characterized by calculating and encoding a cumulative probability differently according to a motion vector resolution determined for each region.
  46. 제 42 항에 있어서, 상기 차분 벡터를 부호화하는 단계는,43. The method of claim 42, wherein encoding the difference vector comprises:
    각 영역의 주위 영역의 움직임 벡터를 이용하여 각 영역의 움직임 벡터에 대한 예측 움직임 벡터를 예측하되, 상기 주위 영역의 움직임 벡터 해상도와 상기 각 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는, 상기 주위 영역의 움직임 벡터 해상도를 상기 각 영역의 움직임 벡터 해상도로 변환하여 예측하는 것을 특징으로 하는 영상 부호화 방법.The predicted motion vector for the motion vector of each area is predicted using the motion vector of the surrounding area of each area, but when the motion vector resolution of the surrounding area and the motion vector resolution of each area are not the same, the surrounding area And converting the motion vector resolution of the motion vector resolution into the motion vector resolution of each region to predict the motion vector resolution.
  47. 제 46 항에 있어서, 상기 차분 벡터를 부호화하는 단계는,47. The method of claim 46, wherein encoding the difference vector comprises:
    각 영역 중 하나 이상의 영역이 블록이고 상기 블록의 블록 모드가 스킵 모드인 경우에는, 상기 주위 영역의 움직임 벡터 해상도 중 가장 높은 해상도로 예측하고자 하는 영역의 움직임 벡터 해상도를 변환하여 예측하는 것을 특징으로 하는 영상 부호화 방법.When at least one of each region is a block and the block mode of the block is a skip mode, the motion vector resolution of the region to be predicted is predicted by the highest resolution among the motion vector resolutions of the surrounding region. Image coding method.
  48. 제 26 항에 있어서, 상기 인터 예측 부호화하는 단계는,The method of claim 26, wherein the inter prediction encoding is performed.
    상기 움직임 벡터 해상도마다 현재 픽처와 참조 픽처 간의 에러가 최소가 되는 필터 계수를 결정하고, 상기 결정되는 필터 계수를 가지는 보간 필터를 이용하여 상기 움직임 벡터 해상도마다 다른 참조 픽처를 이용하여 인터 예측 부호화하며, 상기 결정되는 필터 계수를 부호화하는 것을 특징으로 하는 영상 부호화 방법.Determining a filter coefficient that minimizes an error between a current picture and a reference picture for each of the motion vector resolutions, using interpolation filters having the determined filter coefficients, and inter-prediction-encoding using different reference pictures for each motion vector resolution; And encoding the determined filter coefficients.
  49. 제 42 항에 있어서,The method of claim 42,
    상기 차분 벡터를 부호화하는 단계에서는,In the encoding of the difference vector,
    차분 움직임 벡터를 부호화 하는 경우, 기준 해상도를 정하고, 기준 해상도가 아닌 해상도를 갖는 움직임 벡터는 기준 해상도를 갖는 움직임 벡터로 변환하고 주변 블록의 기준 움직임 벡터로부터 구한 기준 예측 움직임 벡터를 이용하여 차분 움직임 벡터를 산출하는 것을 특징으로 하는 영상 부호화 방법.When encoding a differential motion vector, a reference resolution is determined, a motion vector having a resolution other than the reference resolution is converted to a motion vector having a reference resolution, and the differential motion vector is obtained by using a reference prediction motion vector obtained from the reference motion vector of the neighboring block. The video encoding method, characterized in that for calculating.
  50. 제 42 항에 있어서,The method of claim 42,
    상기 차분 벡터를 부호화하는 단계에서는,In the encoding of the difference vector,
    상기 기준 해상도와 상기 움직임 벡터의 해상도가 다른 경우에 기준 해상도 플래그를 추가로 부호화하는 것을 특징으로 하는 영상 부호화 방법.And a reference resolution flag is further encoded when the resolution of the reference resolution and the motion vector are different.
  51. 제 26항에 있어서,The method of claim 26,
    상기 영상 부호화 방법은,The video encoding method,
    영상의 영역 또는 움직임 벡터마다 해상도 세트를 다르게 지정하는 해상도 지정 플래그 생성단계를 추가로 포함하는 것을 특징으로 하는 영상 부호화 방법.And a resolution designation flag generation step for differently designating a resolution set for each region or motion vector of the image.
  52. 제 26 항에 있어서,The method of claim 26,
    상기 해상도를 결정하는 단계에서는,In the determining of the resolution,
    참조 픽처 인덱스를 이용하여 현재 블록의 해상도를 알 수 있는 경우에는 해상도 식별 플래그를 생성하지 않고 참조픽처 인덱스를 부호화함으로써 해상도에 대한 정보를 부호화하는 것을 특징으로 하는 영상 부호화 방법.And when the resolution of the current block is known using the reference picture index, information about the resolution is encoded by encoding the reference picture index without generating a resolution identification flag.
  53. 제 51항에 있어서,The method of claim 51,
    상기 해상도 지정 플래그 생성단계에서는,In the resolution designation flag generation step,
    복수개의 참조 픽처를 사용하는 경우 해상도 지정 플래그를 부호화하지 않고 기설정된 기준에 따라 참조 픽처마다 해상도 세트를 다르게 설정하는 것을 특징으로 하는 영상 부호화 방법.And a resolution set is set differently for each reference picture according to a predetermined standard without encoding resolution designation flags when a plurality of reference pictures are used.
  54. 제 53항에 있어서,The method of claim 53,
    상기 기설정 기준은,The preset criteria,
    참조픽처와 현재 픽처 간의 거리, 에러측정수단을 이용하여 측정한 해상도 간의 에러값, 참조픽처마다 해상도 세트가 설정된 테이블 중에서 어느 하나인 것을 특징으로 하는 영상 부호화 방법.And a distance value between the reference picture and the current picture, an error value between resolutions measured using error measuring means, and a table in which a resolution set is set for each reference picture.
  55. 제 53항에 있어서,The method of claim 53,
    상기 해상도 지정 플래그 생성단계에서는,In the resolution designation flag generation step,
    참조 픽처로 사용될 픽처의 경우와 참조 픽처로 사용되지 않는 경우 해상도 세트를 다르게 설정하는 것을 특징으로 하는 영상 부호화 방법.And a resolution set differently for a picture to be used as a reference picture and a picture not to be used as a reference picture.
  56. 제 26항에 있어서,The method of claim 26,
    상기 영상 부호화 방법은,The video encoding method,
    현재 해상도를 부호화할 영역의 주변 해상도 또는 이전 블록의 해상도와의 변화를 알려주는 해상도 전환 플래그를 발생하는 해상도 전환 플래그 생성단계를 추가로 포함하는 것을 특징으로 하는 영상 부호화 방법.And a resolution conversion flag generation step of generating a resolution conversion flag informing of a change in the peripheral resolution of the region to be encoded with the current resolution or the resolution of the previous block.
  57. 영상을 복호화하는 방법에 있어서,In the method of decoding an image,
    비트스트림으로부터 해상도 변경 플래그를 추출하는 단계;Extracting a resolution change flag from the bitstream;
    상기 추출된 해상도 변경 플래그에 따라 상기 비트스트림으로부터 부호화된 해상도 식별 플래그를 추출하고 복호화하여 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 단계; 및Extracting and decoding a resolution identification flag encoded from the bitstream according to the extracted resolution change flag to restore motion vector resolution for each region or motion vector; And
    상기 복원된 각 영역 또는 움직임 벡터의 움직임 벡터 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 단계Inter-prediction decoding using a motion vector according to the motion vector resolution of each reconstructed region or motion vector
    를 포함하는 것을 특징으로 하는 영상 복호화 방법.Image decoding method comprising a.
  58. 제 57 항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    동일한 움직임 벡터 해상도를 가지는 영역 또는 움직임 벡터끼리 묶어 쿼드 트리 구조로 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 것을 특징으로 하는 영상 복호화 방법.And decoding a resolution identification flag hierarchically coded in a quad tree structure by tying regions or motion vectors having the same motion vector resolution and restoring the motion vector resolution for each region or motion vector.
  59. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    상기 쿼드 트리 계층의 최대 개수 및 상기 쿼드 트리 계층의 최하위 노드가 가리키기는 영역 크기를 나타내는 식별자를 복호화하는 것을 특징으로 하는 영상 복호화 방법.And decoding an identifier indicating a maximum number of the quad tree layers and an area size indicated by the lowest node of the quad tree layer.
  60. 제 57 항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    각 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터 해상도를 이용하여 예측되는 움직임 벡터 해상도를 이용하여 상기 부호화된 해상도 식별 플래그를 복호화하여 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 것을 특징으로 하는 영상 복호화 방법.An image comprising: decoding the encoded resolution identification flag by using a motion vector resolution predicted by using a motion vector resolution of each region or a surrounding region of the motion vector to restore a motion vector resolution for each region or motion vector Decryption method.
  61. 제 57 항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 런과 길이가 부호화된 해상도 식별 플래그를 복호화하여 상기 영역마다의 움직임 벡터 해상도를 복원하는 것을 특징으로 하는 영상 복호화 방법.And reconstructing the motion vector resolution for each region by decoding a resolution identification flag encoded with a run and a length of the motion vector resolution for each region or motion vector.
  62. 제 57 항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도가 태그 트리를 이용하여 계층적으로 부호화된 해상도 식별 플래그를 복호화하여 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 것을 특징으로 하는 영상 복호화 방법.And reconstructing the motion vector resolution of each region or motion vector by decoding a resolution identification flag hierarchically encoded using a tag tree.
  63. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도의 빈도수에 따라 상기 해상도 식별 플래그에 할당하는 비트수를 변경하여 복호화하는 것을 특징으로 하는 영상 복호화 방법.And decoding the number of bits allocated to the resolution identification flag according to the frequency of the motion vector resolution for each region or motion vector.
  64. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래그가 추정 가능함을 나타내는 플래그인 경우에는 미리 약속된 추정 방식에 따라 움직임 벡터 해상도를 추정하여 추정된 움직임 벡터 해상도를 해당 영역의 움직임 벡터 해상도로서 복원하고, 상기 영역 또는 움직임 벡터별로 복호화되는 해상도 식별 플래가 추정 불가능함을 나타내는 플래그인 경우에는 복호화된 해상도 식별 플래그가 나타내는 움직임 벡터 해상도를 해당 영역의 움직임 벡터로서 복원하는 것을 특징으로 하는 영상 복호화 방법.In the case of a flag indicating that the resolution identification flag decoded for each region or motion vector can be estimated, the motion vector resolution is estimated according to a pre-determined estimation method, and the estimated motion vector resolution is restored as the motion vector resolution of the corresponding region. Or if the resolution identification flag to be decoded for each motion vector is a flag indicating that it is impossible to estimate, reconstructing the motion vector resolution indicated by the decoded resolution identification flag as a motion vector of a corresponding region.
  65. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    차분 벡터의 각 컴포넌트가 '0'이 아닌 경우에만 상기 영역 또는 움직임 벡터마다의 움직임 벡터 해상도를 복원하는 것을 특징으로 하는 영상 복호화 방법.And reconstructing the motion vector resolution for each region or motion vector only when each component of the difference vector is not '0'.
  66. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 다른 비트수를 할당하여 상기 해상도 식별 플래그를 복호화하는 것을 특징으로 하는 영상 복호화 방법.And decoding the resolution identification flag by allocating a different number of bits according to the distribution of the motion vector resolution of the surrounding area of each area.
  67. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    상기 산술 부호화를 이용하여 상기 해상도 식별 플래그를 복호화할 때, 각 영역의 주위 영역의 움직임 벡터 해상도의 분포에 따라 이진화 비트열의 생성 방법을 달리하여 상기 해상도 식별 플래그를 복호화하는 것을 특징으로 하는 영상 복호화 방법.When the resolution identification flag is decoded using the arithmetic coding, the resolution identification flag is decoded by using a method of generating a binary bit stream according to a distribution of motion vector resolutions of surrounding regions of each region. .
  68. 제 57항에 있어서, 상기 움직임 벡터 해상도를 복원하는 단계는,59. The method of claim 57, wherein restoring the motion vector resolution comprises:
    상기 산술 부호화를 이용하여 상기 해상도 식별 플래그를 복호화할 때, 각 영역의 주위 영역의 움직임 벡터 해상도의 분포 및 움직임 벡터 해상도의 발생 확률에 따라 다른 확률 모델을 이용하여 상기 해상도 식별 플래그를 복호화하는 것을 특징으로 하는 영상 복호화 방법.When the resolution identification flag is decoded using the arithmetic coding, the resolution identification flag is decoded using a different probability model according to the distribution of motion vector resolution of the surrounding area of each region and the occurrence probability of the motion vector resolution. An image decoding method.
  69. 제 57항에 있어서, 상기 영상 복호화 방법은,The method of claim 57, wherein the video decoding method,
    상기 비트스트림으로부터 움직임 벡터 해상도마다의 부호화된 필터 계수 추출하고 복호화하여 움직임 벡터 해상도마다의 필터 계수를 복원하는 단계를 추가로 포함하되, 상기 인터 예측 복호화하는 단계는 상기 복원된 움직임 벡터 해상도마다의 필터 계수를 이용하여 참조 픽처를 보간하고, 움직임 벡터 해상도마다 다른 참조 픽처를 이용하여 인터 예측 복호화하는 것을 특징으로 하는 영상 복호화 방법.Extracting and decoding coded filter coefficients for each motion vector resolution from the bitstream, and reconstructing filter coefficients for each motion vector resolution, wherein the inter-prediction decoding comprises performing the filter for each reconstructed motion vector resolution. A reference picture is interpolated using coefficients, and inter prediction decoding is performed using a different reference picture for each motion vector resolution.
  70. 제 57 항에 있어서, 상기 영상 복호화 방법은,The method of claim 57, wherein the video decoding method,
    상기 비트스트림으로부터 부호화된 차분 벡터를 추출하고 복호화하되, 상기 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 복호화하여 상기 영역마다의 차분 벡터를 복원하는 단계를 추가로 포함하되, 상기 인터 예측 복호화하는 단계는 상기 영역마다의 예측 움직임 벡터를 예측하고 상기 복원된 차분 벡터 및 상기 예측 움직임 벡터를 이용하여 움직임 벡터를 복원하는 것을 특징으로 하는 영상 복호화 방법.Extracting and decoding an encoded difference vector from the bitstream, and decoding the encoded difference vector according to the reconstructed region or the motion vector resolution for each motion vector to restore the difference vector for each region, wherein the inter prediction decoding is performed. And predicting the predicted motion vector for each region and reconstructing the motion vector using the reconstructed difference vector and the predicted motion vector.
  71. 제 70항에 있어서, 상기 차분 벡터를 복원하는 단계는,71. The method of claim 70, wherein restoring the difference vector comprises:
    범용 가변 길이 부호화를 이용하여 상기 차분 벡터를 복호화하는 경우에는, K차 지수 골룸 코드를 이용하여 복호화하되, 상기 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 상기 K차 지수 골룸 코드의 차수(K)를 변경하는 것을 특징으로 하는 영상 복호화 방법.In the case of decoding the difference vector using universal variable length coding, the difference vector is decoded using a K-order exponential golem code, and the order of the K-th exponential gollum code according to the motion vector resolution for each reconstructed region or motion vector ( K) is changed.
  72. 제 71 항에 있어서, 상기 차분 벡터를 복원하는 단계는,72. The method of claim 71 wherein the reconstructing the difference vector comprises:
    문맥 기반 이진 산술 부호화를 이용하여 상기 차분 벡터를 복호화하는 경우에는, 단항/K차 지수 골룸 결합형 코드를 이용하여 복호화하되, 상기 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 단항/K차 지수 골룸 결합형 코드의 차수(K)와 최대값(T)를 변경하여 복호화하는 것을 특징으로 하는 영상 복호화 방법.When decoding the difference vector using context-based binary arithmetic coding, decoding is performed using a unary / K-order exponential golem combined code, but the unary / K-difference according to the motion vector resolution for each reconstructed region or motion vector. And decoding (K) and maximum value (T) of an exponential golem combined code.
  73. 제 70 항에 있어서, 상기 차분 벡터를 복원하는 단계는,71. The method of claim 70, wherein restoring the difference vector comprises:
    문맥 기반 이진 산술 부호화를 이용하여 상기 차분 벡터를 복호화하는 경우에는, 상기 복원된 영역 또는 움직임 벡터마다의 움직임 벡터 해상도에 따라 누적 확률을 다르게 계산하여 복호화하는 것을 특징으로 하는 영상 복호화 방법.When decoding the difference vector using context-based binary arithmetic coding, cumulative probability is calculated and decoded differently according to the motion vector resolution for each reconstructed region or motion vector.
  74. 제 70 항에 있어서, 상기 예측 움직임 벡터를 예측하는 단계는,73. The method of claim 70, wherein predicting the predictive motion vector comprises:
    각 영역 또는 움직임 벡터의 주위 영역의 움직임 벡터를 이용하여 상기 각 영역의 움직임 벡터에 대한 예측 움직임 벡터를 예측하되, 상기 주위 영역의 움직임 벡터 해상도와 상기 각 영역의 움직임 벡터 해상도가 동일하지 않은 경우에는, 상기 주위 영역의 움직임 벡터 해상도를 상기 각 영역 또는 움직임 벡터의 움직임 벡터 해상도로 변환하여 예측하는 것을 특징으로 하는 영상 복호화 방법.When the predicted motion vector of the motion vector of each area is predicted by using the motion vector of each area or the surrounding area of the motion vector, but the motion vector resolution of the surrounding area and the motion vector resolution of each area are not the same. And predicting the motion vector resolution of the surrounding area by converting the motion vector resolution into the motion vector resolution of each area or motion vector.
  75. 제 74 항에 있어서, 상기 예측 움직임 벡터를 예측하는 단계는,75. The method of claim 74, wherein predicting the predictive motion vector comprises:
    각 영역 중 하나 이상의 영역이 블록이고 상기 블록의 블록 모드가 스킵 모드인 경우에는, 상기 주위 영역의 움직임 벡터 해상도 중 가장 높은 해상도로 상기 주위 영역의 움직임 벡터 해상도를 변환하여 예측하는 것을 특징으로 하는 영상 복호화 방법.If at least one of the regions is a block and the block mode of the block is the skip mode, the image is predicted by converting the motion vector resolution of the surrounding region to the highest resolution among the motion vector resolutions of the surrounding region. Decryption method.
  76. 영상을 복호화하는 방법에 있어서,In the method of decoding an image,
    비트스트림으로부터 수신한 정보를 이용하여 상기 영역 또는 움직임 벡터마다의 해상도를 복원하는 해상도 복호화단계; 및A resolution decoding step of reconstructing the resolution for each region or motion vector using information received from a bitstream; And
    상기 복원된 각 영역의 해상도에 따른 움직임 벡터를 이용하여 인터 예측 복호화하는 인터 예측 복호화단계An inter prediction decoding step of performing inter prediction decoding using a motion vector according to the resolution of each reconstructed region
    를 포함하는 것을 특징으로 하는 영상 복호화 방법.Image decoding method comprising a.
  77. 제 76 항에 있어서, 상기 영상 복호화 방법은,The method of claim 76, wherein the image decoding method,
    상기 비트스트림으로부터 해상도 지정 플래그를 추출하는 해상도 지정 플래그 추출단계를 추가로 포함하고,A resolution specifying flag extraction step of extracting a resolution specifying flag from the bitstream;
    상기 해상도 복호화단계는, 상기 추출된 해상도 지정 플래그에 따라 상기 해상도를 복원하는 것을 특징으로 하는 영상 복호화 방법.In the resolution decoding step, the resolution is reconstructed according to the extracted resolution specification flag.
  78. 제 77항에 있어서,78. The method of claim 77 wherein
    상기 해상도 지정 플래그 추출단계는,The resolution specifying flag extraction step,
    복수개의 참조 픽처를 사용하는 경우 기설정된 기준에 따라 참조 픽처마다 해상도 세트를 다르게 설정하는 것을 특징으로 하는 영상 복호화 방법.And using a plurality of reference pictures, different resolution sets for different reference pictures according to preset criteria.
  79. 제 76항에 있어서,77. The method of claim 76,
    상기 영상 복호화 방법은,The video decoding method,
    상기 비트스트림에서 해상도 전환 플래그를 추출하고 해상도 전환 플래그의 값에 따라 해상도 식별 플래그를 추출하는 해상도 전환 플래그 추출단계를 추가로 포함하는 것을 특징으로 하는 영상 복호화 방법.And a resolution conversion flag extraction step of extracting a resolution conversion flag from the bitstream and extracting a resolution identification flag according to a value of the resolution conversion flag.
  80. 제 79항에 있어서,The method of claim 79,
    해상도 복호화기는,The resolution decoder is
    상기 비트스트림의 헤더에서 추출되고 복호화된 해상도 전환 플래그의 해상도 종류에 따라 해상도 식별 플래그를 추출하고 이를 이용하여 부호번호 테이블로부터 추출한 부호 번호를 참조하여 해당 해상도에 대응하는 차분 움직임 벡터의 값을 추출하는 것을 특징으로 하는 영상 복호화 방법.Extracting a resolution identification flag according to the resolution type of the resolution conversion flag extracted and decoded from the header of the bitstream, and extracting a value of a differential motion vector corresponding to the corresponding resolution by referring to a code number extracted from a code number table Image decoding method characterized in that.
PCT/KR2010/005568 2009-08-21 2010-08-21 Method and apparatus for encoding/decoding images using adaptive motion vector resolution WO2011021911A2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US13/391,509 US11622124B2 (en) 2009-08-21 2010-08-21 Method and apparatus for encoding/decoding images using adaptive motion vector resolution
US16/668,502 US20200068215A1 (en) 2009-08-21 2019-10-30 Method and apparatus for encoding/decoding images using adaptive motion vector resolution

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2009-0077452 2009-08-21
KR20090077452 2009-08-21
KR1020100081096A KR101441874B1 (en) 2009-08-21 2010-08-20 Video Coding Method and Apparatus by Using Adaptive Motion Vector Resolution
KR10-2010-0081096 2010-08-20

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US13/391,509 A-371-Of-International US11622124B2 (en) 2009-08-21 2010-08-21 Method and apparatus for encoding/decoding images using adaptive motion vector resolution
US16/668,502 Continuation US20200068215A1 (en) 2009-08-21 2019-10-30 Method and apparatus for encoding/decoding images using adaptive motion vector resolution

Publications (2)

Publication Number Publication Date
WO2011021911A2 true WO2011021911A2 (en) 2011-02-24
WO2011021911A3 WO2011021911A3 (en) 2011-06-09

Family

ID=43607506

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2010/005568 WO2011021911A2 (en) 2009-08-21 2010-08-21 Method and apparatus for encoding/decoding images using adaptive motion vector resolution

Country Status (1)

Country Link
WO (1) WO2011021911A2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10536701B2 (en) 2011-07-01 2020-01-14 Qualcomm Incorporated Video coding using adaptive motion vector resolution

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990073648A (en) * 1998-03-02 1999-10-05 박호군 Fast Motion Vector Estimation Method for Real-Time Video Coding
KR20000018311A (en) * 1998-09-01 2000-04-06 윤종용 Method for presume motion of image system and apparatus
KR20080069110A (en) * 2007-01-22 2008-07-25 삼성전자주식회사 Method and apparatus for video encoding and decoding using adaptive interpolation filter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990073648A (en) * 1998-03-02 1999-10-05 박호군 Fast Motion Vector Estimation Method for Real-Time Video Coding
KR20000018311A (en) * 1998-09-01 2000-04-06 윤종용 Method for presume motion of image system and apparatus
KR20080069110A (en) * 2007-01-22 2008-07-25 삼성전자주식회사 Method and apparatus for video encoding and decoding using adaptive interpolation filter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10536701B2 (en) 2011-07-01 2020-01-14 Qualcomm Incorporated Video coding using adaptive motion vector resolution

Also Published As

Publication number Publication date
WO2011021911A3 (en) 2011-06-09

Similar Documents

Publication Publication Date Title
WO2019225993A1 (en) Method and apparatus for processing video signal
WO2020171444A1 (en) Dmvr-based inter-prediction method and device
WO2020085800A1 (en) Method and device for processing video signal by using subblock-based motion compensation
WO2020055107A1 (en) Affine motion prediction-based image decoding method and apparatus using affine mvp candidate list in image coding system
WO2011021914A2 (en) Method and apparatus for encoding/decoding images using adaptive motion vector resolution
WO2020251330A1 (en) Image encoding/decoding method and device for utilizing simplified mpm list generation method, and method for transmitting bitstream
WO2019182295A1 (en) Method and apparatus for processing video signal
WO2020055161A1 (en) Image decoding method and apparatus based on motion prediction in sub-block unit in image coding system
WO2020184848A1 (en) Dmvr-based inter-prediction method and device
WO2021054676A1 (en) Image encoding/decoding method and device for performing prof, and method for transmitting bitstream
WO2020184847A1 (en) Inter-prediction method and device based on dmvr and bdof
WO2019190199A1 (en) Video signal processing method and device
WO2016190627A1 (en) Method and device for processing video signal
WO2020096427A1 (en) Image signal encoding/decoding method and apparatus therefor
WO2020005007A1 (en) Method and apparatus for processing video signal
WO2020184952A1 (en) Video signal processing method and device for processing motion vector difference information for inter prediction in video signal
WO2019235893A1 (en) Method and apparatus for processing video signal
WO2020262931A1 (en) Signaling method and device for merge data syntax in video/image coding system
WO2020251329A1 (en) Image encoding/decoding method and device having simplified mip mode mapping, and method for transmitting bitstream
WO2020009449A1 (en) Method and apparatus for processing video signal by using affine prediction
WO2020032609A1 (en) Affine motion prediction-based image decoding method and device using affine merge candidate list in image coding system
WO2021040410A1 (en) Method for decoding video for residual coding and device therefor
WO2020251258A1 (en) Image decoding method and apparatus for deriving weight index information for weighted average when bi-prediction is applied
WO2020256400A1 (en) Luma mapping- and chroma scaling-based video or image coding
WO2011021915A2 (en) Method and apparatus for encoding/decoding images using adaptive motion vector resolution

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10810219

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase in:

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 13391509

Country of ref document: US

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29/05/12)

122 Ep: pct application non-entry in european phase

Ref document number: 10810219

Country of ref document: EP

Kind code of ref document: A2