VIDEO DECODING METHOD AND DEVICE THEREFOR AND VIDEO ENCODING METHOD AND DEVICE THEREFOR
Patent Information
- Application Number
- MX2023000074
- Authority / Receiving Office
- MX · MX
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2016-07-14
- Filing Date
- 2019-01-11
- Publication Date
- 2026-02-25
- Estimated Expiration
- 2037-07-14
AI Technical Summary
Conventional video codecs face inefficiencies in encoding and decoding high-resolution video content due to limited coding methods based on tree structures, leading to increased data compression challenges, especially with prediction errors.
The proposed solution involves using bidirectional motion prediction mode that generates prediction blocks by incorporating gradient values of reference blocks, allowing for adaptive motion compensation of pixel groups, enhancing encoding and decoding efficiency.
This approach increases encoding and decoding efficiency by generating prediction blocks similar to the original block, reducing data complexity and improving compression performance.
Smart Images

Figure MX431618B0
Abstract
Description
The present disclosure relates to a method of video decoding and video encoding. More particularly, the present disclosure relates to video decoding and video encoding for performing inter prediction in a bidirectional motion prediction mode. Background of the Invention As hardware for playing and storing high-resolution, high-quality video content is developed and distributed, the need for a video codec to effectively encode and decode high-resolution or high-quality video content has increased. In a conventional video codec, a video is encoded according to a limited coding method based on coding units in a tree structure. Image data from a spatial domain are transformed into coefficients of a frequency domain through frequency transformation. According to a video codec, an image is divided into blocks of a predetermined size, a discrete cosine transform (DCT) is performed on each block, and the image is ML / a / ZUZ J / UUUU / 4 encode frequency coefficients in block units, for fast calculation of frequency transform. Compared with image data of a spatial domain, coefficient of a frequency domain is easily compressed. In particular, since an image pixel value of a spatial domain is expressed in accordance with a prediction error through inter prediction or intra prediction of a video codec, when frequency transform is performed on the prediction error, a large amount of data can be transformed to 0. In accordance with a video codec, an amount of data can be reduced by replacing data that are generated consecutively and repeatedly with small-sized data. Brief Description of the Invention Technical Problem According to various embodiments, a prediction pixel value of a current block may be generated not only by using a pixel value of a first reference block of a first reference image and a pixel value of a second reference block of a second reference image, but also by using a first gradient value of the first reference block and a second gradient value of the second reference block, in a bidirectional motion prediction mode. Accordingly, coding and decoding efficiency may be increased since a prediction block similar to an original block may be generated. The first gradient value of the first reference block and the second gradient value of the second reference block are used while performing motion compensation of a pixel group unit, and a parameter used while performing motion compensation of a pixel group unit is pointed out through a bit stream or obtained by using a parameter related to an image, and thereby motion compensation of a pixel group unit can be adaptively performed in the image. A computer-readable recording medium is provided having recorded thereon a program for executing a method in accordance with various embodiments. Here, aspects of various modalities are not limited to this, and additional aspects will be set forth in part in the description below and in part will be evident from the description, or may be learned by practice of the modalities presented. Solution to the Problem Aspects of the present description are not limited to this, and additional aspects will be set forth in part in the description below and in part will be MA / a / ZUZ J / UUUU / 4 evident from the description, or can be learned by practicing the modalities presented. In accordance with one aspect of the present disclosure, a video decoding includes: obtaining, from a bit stream, motion prediction mode information with respect to a current block in a current picture; when the obtained motion prediction mode information indicates a bidirectional motion prediction mode, obtaining, from the bit stream, a first motion vector and a second motion vector, wherein the first motion vector indicates a first reference block of the current block in a first reference picture, and the second motion vector indicates a second reference block of the current block in a second reference picture;obtaining a pixel group unit motion compensation-related parameter of the current block, based on at least one of information of the pixel group unit motion compensation-related parameter obtained from the bit stream and a parameter related to an image including the current image; generating a prediction block of the current block by performing, with respect to the current block, block unit motion compensation based on the first motion vector and the second motion vector and performing pixel group unit motion compensation based on the pixel group unit motion compensation-related parameter; obtaining a residual block of the current block from the bit stream; and reconstructing the current block based on the prediction block and the residual block, wherein a pixel group includes at least one pixel; The video decoding method may further include determining whether to perform pixel group unit motion compensation based on at least one of indicator information obtained from the bit stream and on whether to perform pixel group unit motion compensation, a size of the current block, a prediction direction, a size of a motion vector, a picture order count (POC) difference between the reference picture and the current picture, and availability of a predetermined encoding / decoding tool, wherein the prediction block generation may include generating the prediction block of the current block by performing pixel group unit motion compensation based on the determination. Obtaining the parameter related to pixel group unit motion compensation may include obtaining a change value for downscaling after an interpolation operation or a gradient operation, based on at least one of a bit depth MA / a / ZUZ J / UUUU / 4 of a sample, an input range of a filter used for the interpolation operation or the gradient operation, and a coefficient of the filter, and generating the prediction block of the current block may include performing downscaling after the interpolation operation to the gradient operation with respect to a pixel included in the first reference block and the second reference block by using the change value for downscaling. Obtaining the parameter related to the unit motion compensation of the pixel group may include obtaining a regularization parameter related to a displacement vector per unit time in a horizontal or vertical direction, based on at least one of information that is obtained from the bit stream and is about a parameter related to the displacement vector per unit time in the horizontal or vertical direction, a bit depth of a sample, a size of a group of pictures (GOP), a motion vector, a parameter related to a temporal distance between a reference picture and the current picture, a frame rate, a configuration parameter related to a coding prediction structure, and a prediction direction, generating a prediction block of the current block may include determining, based on the requularization parameter related to the MA / a / ZUZ J / UUUU / 4 displacement vector per unit time in the horizontal or vertical direction, the displacement vector per unit time in the horizontal or vertical direction by using a gradient value of pixels in a first window having a certain size and including a first group of pixels included in the first reference block, a gradient value of pixels in a second window having a certain size and including a second group of pixels included in the second reference block, pixel values of the pixels in the first window, and pixel values of the pixels in the second window. Obtaining the parameter related to the pixel group unit motion compensation may include: obtaining a parameter related to a size of a window used to calculate a displacement vector per unit time, based on at least one of information about a window size obtained from the bit stream, a hierarchy depth of a picture, a size of a GOP, a picture resolution, a parameter related to a temporal distance between a reference picture and the current picture, a frame rate, a motion vector, a configuration parameter related to a coding prediction structure, and a prediction direction, and generating a prediction block of the current block may include determining, based on the ML / a / ZUZ J / UUUU / 4 parameter related to the window size, a displacement vector per unit time in a horizontal or vertical direction by using a gradient value of pixels in a first window having a certain size and including a first group of pixels included in the first reference block, a gradient value of pixels in a second window having a certain size and including a second group of pixels included in the second reference block, pixel values of the pixels in the first window, and pixel values of the pixels in the second window. The pixel group may include a plurality of pixels, obtaining the parameter related to unit motion compensation of the pixel group may include obtaining a parameter related to a size of the pixel group based on at least one of information about the size of the pixel group obtained from the bit stream, an image resolution, and a frame rate, and generating the prediction block of the current block may include generating the prediction block of the current block by performing unit block motion compensation based on the first motion vector and the second motion vector and performing unit motion compensation of the pixel group based on the parameter related to the size of the pixel group. M / a / ZUZ J / UUUU / 4 In accordance with another aspect of the present disclosure, a video decoding apparatus includes: an obtainer configured to obtain, from a bit stream, motion prediction mode information with respect to a current block in a current picture, and when the obtained motion prediction mode information indicates a bidirectional motion prediction mode, obtaining, from the bit stream, a first motion vector indicating a first reference block of the current block in a first reference picture and a second motion vector indicating a second reference block of the current block in a second reference picture, obtaining a pixel group unit motion compensation-related parameter of the current block, based on at least one of pixel group unit motion compensation-related parameter information, the information being obtained from the bit stream,and a parameter related to an image including the current image, and obtaining a residual block of the current block from the bitstream; an inter-predictor configured to generate a prediction block of the current block by performing, with respect to the current block, block unit motion compensation based on the first motion vector and the second motion vector and pixel group unit motion compensation based on the ίο parameter related to the pixel group unit motion compensation; and a decoder configured to reconstruct the current block based on the prediction block and residual block, wherein a pixel group includes at least one pixel. The inter-predictor may further be configured to determine whether to perform pixel group unit motion compensation based on at least one of indicator information that is obtained from the bit stream and is about whether to perform pixel group unit motion compensation, a current block size, a prediction direction, a size of a motion vector, a picture order count difference between the reference picture and the current picture, and availability of a predetermined encoding / decoding tool, and generate the prediction block of the current block when performing pixel group unit motion compensation based on the determination. The interpredictor may further be configured to obtain a change value for downscaling after an interpolation operation or a gradient operation, based on at least one of a bit depth of a sample, an input range of a filter used for the interpolation operation, or the gradient operation. MA / a / ZUZ J / UUUU / 4 gradient, and a filter coefficient, and performing downscaling after the interpolation operation or the gradient operation with respect to a pixel included in the first reference block and the second reference block by using the shift value for downscaling. The inter-predictor may further be configured to obtain a regularization parameter related to a unit time displacement vector in a horizontal or vertical direction, based on at least one of information that is obtained from the bit stream and is about a parameter related to the unit time displacement vector in the horizontal or vertical direction, a bit depth of a sample, a size of a group of images, a motion vector, a parameter related to a temporal distance between a reference image and the current image, a frame rate, a configuration parameter related to a coding prediction structure, and a prediction direction, and determine, based on the regularization parameter related to the unit time displacement vector in the horizontal or vertical direction,the displacement vector per unit time in the horizontal or vertical direction by using a gradient value of pixels in a first window having a certain size and including a first group of pixels included in the first reference block, a gradient value of pixels in a second window having a certain size and including a second group of pixels included in the second reference block, pixel values of the pixels in the first window, and pixel values of the pixels in the second window. The obtainer may further be configured to obtain a parameter related to a size of a window used to calculate a unit time shift vector, based on at least one of information about a window size and obtained from the bit stream, a hierarchy depth of a picture, a size of a GOP, a picture resolution, a parameter related to a temporal distance between a reference picture and the current picture, a frame rate, a motion vector, a configuration parameter related to a coding prediction structure, and a prediction direction, and the inter-forecaster may further be configured to determine, based on the parameter related to the window size,a displacement vector per unit time in a horizontal or vertical direction by using a gradient value of pixels in a first window having a certain size and including a first group of pixels included in the first reference block, a gradient value of pixels in a second window having a certain size and including a second group of pixels included in the second reference block, pixel values of the pixels in the first window, and pixel values of the pixels in the second window. The pixel group may include a plurality of pixels, and the inter-predictor may further be configured to obtain a parameter related to a size of the pixel group based on at least one of information about the size of the pixel group and obtained from the bit stream, an image resolution, and a frame rate, and generate the prediction block of the current block by performing block unit motion compensation based on the first motion vector and the second motion vector and performing pixel group unit motion compensation based on the parameter related to the pixel group size. In accordance with another aspect of the present disclosure, a video coding method includes: obtaining a prediction block of a current block, a first motion vector, a second motion vector, and a parameter related to pixel group unit motion compensation by performing block unit motion compensation and pixel group unit motion compensation on the current block; and generating a bit stream including information related to the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode with respect to the current block is a bidirectional motion prediction mode, wherein a pixel group includes at least one pixel,the first motion vector is a motion vector indicating a first reference block of a first reference picture corresponding to the current block in a current picture of the current block, the second motion vector is a motion vector indicating a second reference block of a second reference picture corresponding to the current block in a current picture of the current block, and a parameter related to pixel group unit motion compensation of the current block is obtained from a parameter related to an image including the current picture while pixel group unit motion compensation is performed on the current block or the parameter related to pixel group unit motion compensation of the current block,Obtained while performing pixel group unit motion compensation on the current block, and includes information about the given parameter related to pixel group unit motion compensation in the bitstream. Pursuant to another aspect of this MA / a / ZUZ J / UUUU / 4 description, a video coding apparatus includes: an inter-predictor configured to obtain a prediction block of a current block, a first motion vector, a second motion vector, and a parameter related to unit motion compensation of the pixel group when performing block unit motion compensation and unit motion compensation of the pixel group in the current block; and a bit stream generator configured to generate a bit stream that includes information related to the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode with respect to the current block is a bidirectional motion prediction mode, wherein a pixel group includes at least one pixel,the first motion vector is a motion vector indicating a first reference block of a first reference picture corresponding to the current block in a current picture of the current block, the second motion vector is a motion vector indicating a second reference block of a second reference picture corresponding to the current block in a current picture of the current block,and a parameter related to the pixel group unit motion compensation of the current block is obtained from a parameter related to an image including the current image while performing pixel group unit motion compensation on the current block, or the parameter related to the pixel group unit motion compensation of the current block is determined while performing pixel group unit motion compensation on the current block, and information about the determined parameter related to the pixel group unit motion compensation is included in the bit stream. In accordance with another aspect of the present disclosure, a computer-readable recording medium has recorded thereon a program that performs the video decoding method. Advantageous Effects of Description According to various embodiments, coding and decoding efficiency may be increased by performing inter prediction on a current block by using a gradient value of a reference block of a reference picture in a bidirectional motion prediction mode to predict a value similar to that of an original block of the current block. Brief Description of the Figures Figure 1A is a block diagram of a video decoding apparatus in accordance with various embodiments. Figure IB is a flowchart of a video decoding method according to various embodiments. Figure 1C is a block diagram of a video encoding apparatus in accordance with various embodiments. Figure ID is a flow chart of a video coding method in accordance with various embodiments. Figure 1E is a block diagram of an image decoder according to various embodiments. Figure 1F is a block diagram of an image encoder according to various embodiments. Figure 2 is a reference diagram for describing block-based bidirectional motion prediction and compensation processes according to a modality. Figures 3A to 3C are reference diagrams for describing processes for performing pixel unit motion compensation, in accordance with embodiments. Figure 4 is a reference diagram for describing processes for calculating gradient values in horizontal and vertical directions, in accordance with a modality. M / a / ZUZ J / UUUU / 4 Figure 5 is a reference diagram for describing processes for calculating gradient values in horizontal and vertical directions, in accordance with another modality. Figures 6A and 6B are diagrams for describing processes for determining gradient values in horizontal and vertical directions when using one-dimensional (ID) filters, in accordance with embodiments. Figures 7A to 7E are tables showing filter coefficients used to determine a pixel value at a fractional pixel position of a fractional pixel unit, and gradient values in horizontal and vertical directions, in accordance with embodiments. Figure 8A is a reference diagram for describing processes for determining a horizontal direction displacement vector and a vertical direction displacement vector with respect to a pixel, in accordance with an embodiment. Figure 8B is a reference diagram for describing processes for determining a horizontal direction displacement vector and a vertical direction displacement vector with respect to a pixel group, in accordance with an embodiment. Figure 9A is a diagram for describing processes for adding an offset value after filtration is performed, and determining a gradient value in a IVI A / a / ZUZ J / UUUU / 4 horizontal or vertical direction when de-escalating, in accordance with a modality. Figure 9B is a diagram for describing an interval necessary for determining a horizontal direction displacement vector and a vertical direction displacement vector during processes for determining unit pixel motion compensation with respect to a current block. Figures 9C and 9D are diagrams for describing ranges of regions used during processes for performing motion compensation in pixel units, in accordance with various embodiments. Figure 9E is a diagram for describing processes for determining a horizontal direction displacement vector and a vertical direction displacement vector without expanding a reference block. Figure 9F is a diagram for describing processes for obtaining a temporal motion vector predictor candidate in which pixel group unit motion compensation is considered. Figure 10 illustrates processes for determining at least one coding unit as a current coding unit is divided, in accordance with an embodiment. Figure 11 illustrates processes for determining at least one coding unit when dividing a coding unit having a non-square shape, in accordance with an embodiment. Figure 12 illustrates processes for dividing a coding unit, based on at least one of block shape information and division shape information, in accordance with an embodiment. Figure 13 illustrates a method for determining a certain coding unit from an odd number of coding units, in accordance with an embodiment. Figure 14 illustrates a processing order of a plurality of coding units when the plurality of coding units is determined when dividing a current coding unit, according to an embodiment. Figure 15 illustrates processes for determining that a current coding unit is divided into an odd number of coding units when the coding units are not processable in a certain order, in accordance with an embodiment. Figure 16 illustrates processes for determining at least one coding unit when dividing a first coding unit, in accordance with an embodiment. Figure 17 illustrates that one way in which a coding unit can be divided is restricted. MA / a / ZUZ J / UUUU / 4 when the second coding unit having a certain non-square shape when dividing a first coding unit satisfies a certain condition, in accordance with a modality. Figure 18 illustrates a process for dividing a coding unit having a square shape when the division shape information is unable to indicate that a coding unit is divided into four square shapes, in accordance with an embodiment. Figure 19 illustrates that an order for processing a plurality of coding units may change in accordance with processes for dividing a coding unit, in accordance with a mode. Figure 20 illustrates processes for determining a depth of a coding unit as a shape and size of the coding unit change, when determining a plurality of coding units when recursively dividing the coding unit, in accordance with an embodiment. Figure 21 illustrates a part index (PID) for distinguishing depths and coding units, which may be determined according to shapes and sizes of coding units, in accordance with an embodiment. Figure 22 illustrates that a is determined ML / a / ZUZ J / UUUU / 4 plurality of coding units according to a plurality of certain data units included in an image, according to a modality. Figure 23 illustrates a processing block that serves as a criterion for determining an order of determining reference coding units included in an image, in accordance with a modality. Detailed Description of the Invention In accordance with one aspect of the present disclosure, a video decoding includes: obtaining, from a bit stream, motion prediction mode information with respect to a current block in a current picture; when the obtained motion prediction mode information includes a bidirectional motion prediction mode, obtaining, from the bit stream, a first motion vector and a second motion vector, wherein the first motion vector indicates a first reference block of the current block in a first reference picture, and the second motion vector indicates a second reference block of the current block in a second reference picture;obtaining a parameter related to unit motion compensation of the pixel group of the current block, based on at least one of parameter information related to unit motion compensation of the pixel group obtained from the bit stream and a parameter related to an image including the current image; generating a prediction block of the current block by performing, with respect to the current block, a block unit motion compensation based on the first motion vector and the second motion vector and performing the pixel group unit motion compensation based on the parameter related to the pixel group unit motion compensation; obtaining a residual block of the current block from the bit stream; and reconstructing the current block based on the prediction block and the residual block, wherein a pixel group includes at least one pixel; In accordance with another aspect of the present disclosure, a video decoding apparatus includes: an obtainer configured to obtain, from a bit stream, motion prediction mode information with respect to a current block in a current picture, and when the obtained motion prediction mode information indicates a bidirectional motion prediction mode, obtaining, from the bit stream, a first motion vector indicating a first reference block of the current block in a first reference picture and a second motion vector indicating a second reference block of the current block in a second reference picture, obtaining a parameter related to pixel group unit motion compensation of the current block, based on at least one of parameter information related to pixel group unit motion compensation, the information being obtained from the bit stream,and a parameter related to an image including the current image, and obtaining a residual block of the current block from the bitstream; an inter-predictor configured to generate a prediction block of the current block by performing, with respect to the current block, block unit motion compensation based on the first motion vector and the second motion vector and pixel group unit motion compensation based on the parameter related to the pixel group unit motion compensation; and a decoder configured to reconstruct the current block based on the prediction block and the residual block, wherein a pixel group includes at least one pixel. In accordance with another aspect of the present disclosure, a video coding method includes: obtaining a prediction block of a current block, a first motion vector, a second motion vector, and a parameter related to pixel group unit motion compensation by performing block unit motion compensation and pixel group unit motion compensation on the current block; and generating a bit stream that includes information related to the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode with respect to the current block is a bidirectional motion prediction mode, wherein a pixel group includes at least one pixel,the first motion vector is a motion vector indicating a first reference block of a first reference picture corresponding to the current block in a current picture of the current block, the second motion vector is a motion vector indicating a second reference block of a second reference picture corresponding to the current block in a current picture of the current block,and a parameter related to the pixel group unit motion compensation of the current block is obtained from a parameter related to the image including the current image while performing pixel group unit motion compensation on the current block, or the parameter related to the pixel group unit motion compensation of the current block is determined while performing pixel group unit motion compensation on the current block, and information about the determined parameter related to the pixel group unit motion compensation is included in the bit stream. MA / a / ZUZ J / UUUU / 4 In accordance with another aspect of the present disclosure, a video coding apparatus includes: an inter-predictor configured to obtain a prediction block of a current block, a first motion vector, a second motion vector, and a parameter related to unit motion compensation of the pixel group when performing block unit motion compensation and pixel group unit motion compensation on the current block; and a bitstream generator configured to generate a bitstream including information related to the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode with respect to the current block is a bidirectional motion prediction mode, wherein a pixel group includes at least one pixel,the first motion vector is a motion vector indicating a first reference block of a first reference picture corresponding to the current block in a current picture of the current block, the second motion vector is a motion vector indicating a second reference block of a second reference picture corresponding to the current block in a current picture of the current block,and a parameter related to pixel group unit motion compensation of the current block is obtained from a parameter related to an image including the current image while performing pixel group unit motion compensation on the current block, or the parameter related to pixel group unit motion compensation of the current block is determined while performing pixel group unit motion compensation on the current block, and information about the determined parameter related to pixel group unit motion compensation is included in the bit stream. In accordance with another aspect of the present disclosure, a computer-readable recording medium has recorded thereon a program that performs the video decoding method. Description Mode Hereinafter, an 'image' may denote a still image from a video, or a moving image, i.e., a video itself. Hereafter, a 'sample' denotes data that is assigned to a sampling location in an image and is to be processed. For example, pixels in an image in a spatial domain can be samples. Hereinafter, a 'current block' may denote a block of an image that is to be encoded or decoded. Figure 1A is a block diagram of a video decoding apparatus in accordance with various embodiments. A video decoding apparatus 100 according to various embodiments includes a retriever 105, an inter-predictor 110, and a reconstructor 125. The getter 105 receives a bit stream including information about a prediction mode of a current block, information indicating a motion prediction mode of the current block, and information about a motion vector. The obtainer 105 may obtain, from the received bit stream, information about the prediction mode of the current block, information indicating the motion prediction mode of the current block, and information about the motion vector. Also, the obtainer 105 may obtain, from the bit stream, a reference picture index indicating a reference picture among previously decoded pictures. When the prediction mode of the current block is an inter prediction mode, the inter-predictor 110 performs inter prediction on the current block. In other words, the inter-predictor 110 may generate a prediction pixel value of the current block by using at least one of the decoded pictures before a current picture that includes the current block. For example, when the motion prediction mode to the current block is an inter-prediction mode, the inter-predictor 110 performs inter prediction on the current block. MA / a / ZUZ J / UUUU / 4 bidirectional motion prediction, the inter-forecaster 110 may generate the prediction pixel value of the current block by using two decoded pictures before the pixel picture. In other words, when the motion prediction mode information obtained from the bit stream indicates the bidirectional motion prediction mode, the inter-forecaster 110 may generate the prediction pixel value of the current mode by using the two decoded pictures before the current picture. The inter-predictor 110 may include a block unit motion capacitor 115 and a pixel group unit motion capacitor 120. The block unit motion compensator 115 can perform motion compensation on the current block, in block units. The block unit motion compensator 115 may determine at least one reference picture from the previously decoded pictures by using a reference picture index obtained from the bit stream. Here, the reference picture index may denote a reference picture index with respect to each of the prediction directions including an LO direction and an L1 direction. Here, the reference picture index with respect to the LO direction may denote an index indicating a reference picture among pictures included in an LO reference picture list, and the reference picture index with respect to the L1 direction may denote an index indicating a reference picture among pictures included in an L1 reference picture list. The block unit motion compensator 115 may determine a reference block of the current block, the reference block placed in the at least one reference picture by using the information about the motion vector received from the bit stream. Here, a corresponding block in the reference picture, which corresponds to the current block in the current picture, may be the reference block. In other words, the block unit motion compensator 115 may determine the reference block of the current block by using the motion vector indicating the reference block of the current block. Here, the motion vector denotes a vector indicating displacement of reference coordinates of the current block in the current picture and reference coordinates of the reference block in the reference picture.For example, when the top left coordinates of the current block are (1, 1) and the top left coordinates of the reference block in the reference images are (3, 3), the motion vector may be (2, 2). Here, the information about the vector of MA / a / ZUZ J / UUUU / 4 motion may include a differential value of the motion vector, and the block unit motion compensator 115 may reconstruct the motion vector by using a motion vector predictor and the differential value of the motion vector obtained from the bit stream, and determine the reference block of the current block placed in the at least one reference picture by using the reconstructed motion vector. Here, the differential value of the motion vector may denote a differential value of a motion vector with respect to a reference picture related to each of the prediction directions including the LO direction and the L1 direction.Here, the differential value of the motion vector with respect to the LO direction may denote a differential value of a motion vector indicating the reference block in the reference picture included in the LO reference picture list, and the differential value of the motion vector with respect to the L1 direction may denote a differential value of a motion vector indicating the reference block in the reference picture included in the L1 reference picture list. The block-unit motion compensator 115 may perform motion compensation on the current block in block units by using a pixel value of the reference block. The block-unit motion compensator 115 may perform motion compensation on the current block in block units by using a pixel value of a reference pixel in the reference block that corresponds to a current pixel in the current block. Here, the reference pixel may be a pixel included in the reference block, and a corresponding pixel corresponding to the current pixel in the current block may be the reference pixel. The block-unit motion compensator 115 may perform motion compensation on the current block in block units by using a plurality of reference blocks respectively included in a plurality of reference pictures. For example, when the motion prediction mode of the current block is the bidirectional motion prediction mode, the block-unit motion compensator 115 may determine two reference pictures from among the previously coded pictures, and determine two reference blocks included in the two reference pictures. The block unit motion compensator 115 may perform motion compensation on the current block in block units by using pixel values of two reference pixels in the two reference blocks. The block unit motion compensator 115 may output a motion compensation value in units of IVI A / a / ZUZ J / UUUU / 4 block when performing motion compensation on the current block in block units, using an average value or a weighted sum of the pixel values of the two reference pixels. A reference position of the reference block may be an integer pixel position, but is not limited to this, and may be a fractional pixel position. Here, an integer pixel may denote a pixel in which a position component is an integer, and may be a pixel at an integer pixel position. A fractional pixel may denote a pixel in which a position component is a fraction, and may be a pixel at a fractional pixel position. For example, when the top left coordinates of the current block are (1, 1) and the motion vector is (2.5, 2.5), the top left coordinates of the reference block in the reference image may be (3.5, 3.5). Here, the fractional pixel position may be determined in units of 1 / 4 pixel or 1 / 16 pixel, where pixel denotes a pixel element. Alternatively, the fractional pixel position may be determined in several fractional pixel units. When the reference position of the reference block is the position of the fractional pixel, the block unit motion compressor 115 may generate a pixel value of a first pixel among pixels of a first reference block indicated by a first motion vector and a pixel value of a second pixel among pixels of a second reference block indicated by a second motion vector, by applying an interpolation filter to a first neighboring region including the first pixel and a second neighboring region including the second pixel. In other words, the pixel value of the reference pixel in the reference block can be determined by using pixel values of neighboring pixels in which a component in a certain direction is an integer. Here, a certain direction can be horizontal or vertical. For example, the block unit motion compensator 115 may determine, as the pixel value of the reference pixel, a value obtained by filtering pixel values of pixels in which a component in a certain direction is an integer, by using an interpolation filter, and determine a motion compensation value in block units relative to the current block, by using the pixel value of the reference pixel. A motion compensation value in block units by using an average value or a weighted sum of reference pixels. Here, the interpolation filter may MA / a / ZUZ J / UUUU / 4 be a DCT-based M-tap interpolation filter. A DCT-based M-tap interpolation filter coefficient can be inducible from DCT and inverse DCT (IDCT). Here, the interpolation filter coefficient may be a filter coefficient scaled to an integer coefficient to reduce real-number operations during filtering. Here, the interpolation filter may be a one-dimensional interpolation filter in a horizontal or vertical direction. For example, when a pixel position is expressed in orthogonal x, y coordinate components, the horizontal direction may be a direction parallel to an x-axis. The vertical direction may be a direction parallel to a y-axis. The block unit motion compensator 115 may perform filtering with respect to pixel values at an integer position by using the ID interpolation filter in the vertical direction, and then perform filtering with respect to a value generated through filtering by using the ID interpolation filter in the horizontal direction to determine the pixel value of the reference pixel at the fractional pixel position. Meanwhile, the value generated through filtering when using a scaled filter coefficient may be larger than a value generated through filtering when using an unscaled filter. Accordingly, the block unit motion compensator 115 may perform descaling with respect to the value generated through filtering. The block unit motion compensator 115 may perform descaling after filtering the pixel values of the pixels at the integer position by using the ID interpolation filter in the vertical direction. Here, the descaling may include bit shifting to the right by a descaling bit number. The descaling bit number may be determined based on a bit depth of a sample of an input image. For example, the descaling bit number may be a value obtained by subtracting 8 from the bit depth of the sample. Also, the block unit motion compensator 115 may perform filtering with respect to the pixel values of the pixels at the integer position by using the ID interpolation filter in the vertical direction, and perform filtering with respect to the value generated through filtering by using the ID interpolation filter in the horizontal direction, and then perform descaling. Here, the descaling may include bit shifting to the right by a descaling bit number. The descaling bit number may be determined based on a scaling bit number of the ID interpolation filter in the vertical direction, a scaling bit number of the ID interpolation filter in the horizontal direction, and the bit depth of the sample.For example, when the scaling bit number p of the ID interpolation filter in the vertical direction is 6, the scaling bit number q of the ID interpolation filter in the horizontal direction is 6, and the sample bit depth is b, and the descaling bit number can be p+q+8-b, that is, 20-b. When the block unit motion compensator 115 only performs right bit shifting by the descaling bit number after performing filtering with respect to a bit in which a component in a certain direction is an integer by using an ID interpolation filter, a rounding error may be generated, and thus the block unit motion compensator 115 can perform descaling after performing filtering with respect to the pixel in which the component in a certain direction is the integer by using the ID interpolation filter, and then adding a shift value. Here, the shift value may be 2Λ(descaling bit number - 1). The pixel group unit motion compensator 120 may output a pixel group unit motion compensation value by performing motion compensation on the current block in pixel group units. When the motion prediction mode of the current block is the bidirectional motion prediction mode, the pixel group unit motion compensator 120 may output the pixel group unit motion compensation value by performing pixel group unit motion compensation on the current block. The pixel group unit motion compensator 120 may output the motion compensation value in pixel group units when performing pixel group unit motion compensation in the current block, based on an optical flow of the pixel groups of the first reference image and the second reference image. The optical flow will be described later with reference to Figure 3A. The pixel group unit motion compensator 120 may output the motion compensation value in pixel units by performing motion compensation in pixel group units with respect to pixel groups included in the reference block of the current block. The pixel group may include at least one pixel. For example, the pixel group may be one pixel. Alternatively, the pixel group may be a plurality of pixels that include at least two pixels. The pixel group may be a plurality of pixels included in a block having a size of K x K (K is an integer). The pixel group unit motion compensator 120 may obtain a parameter related to a size of a pixel group, based on at least one of information about the size of the pixel group, which is obtained from the bit stream, image resolution, and a frame rate. The pixel group unit motion compensator 120 may determine the pixel group based on the parameter related to the size of the pixel group, and perform pixel group unit motion compensation with respect to the current block, based on the determined pixel group. The pixel group unit motion compensator 120 can determine the pixel group size based on the image resolution. For example, when the image resolution is higher than a certain resolution, the pixel group size can be determined to be larger than the pixel group size corresponding to a certain resolution. The pixel group unit motion compensator 120 may determine the pixel group size based on the frame rate. For example, when the frame rate is greater than a certain frame rate, the pixel group unit motion compensator 120 may determine the pixel group size to be larger than the pixel group size corresponding to a certain frame rate. The pixel group unit motion compensator 120 may determine the pixel group size based on the image resolution and the image frame rate. For example, when the image resolution is higher than a certain resolution and the frame rate is higher than a certain frame rate, the pixel group unit motion compensator 120 may determine the pixel group size to be larger than the size of a pixel group corresponding to a certain resolution and a certain frame rate. The pixel group unit motion compensator 120 can perform motion compensation on the pixel group units including a plurality of pixels, thereby reducing the complexity of encoding / decoding compared to when motion compensation is performed on pixel units at high image resolution. Also, the pixel group unit motion compensator 120 can perform motion compensation on the pixel group units including a plurality of pixels, thereby reducing the complexity of encoding / decoding compared to IVI A / a / ZUZ J / UUUU / 4 when performing motion compensation in pixel units at a high frame rate. The obtainer 105 may obtain information about the size of the pixel group included in the bit stream. The information about the size of the pixel group may be, when the size of the pixel group is KxK, information indicating a height or width K. The information about the size of the pixel group may be included in a high-level syntax carrier. The pixel group unit motion compensator 120 may determine at least one group division said to include pixels having similar pixel values from among the plurality of pixels included in the pixel group, and perform motion compensation on the pixel group divisions. Here, the pixel group division that includes the pixels having similar pixel values is highly likely to be the same object, and is highly likely to have similar motion, the pixel group unit motion compensator 120 is able to perform more precise motion compensation of pixel group units. Meanwhile, pixel group unit motion compensation is performed when motion prediction mode information indicates a bidirectional motion prediction mode, but pixel group unit motion compensation is not always performed, but it can be performed selectively. The pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation based on at least one of pixel group unit motion indicator information obtained from the bit stream, the size of the current block, a prediction direction, the size of a motion vector, a picture order count difference between the reference picture and the current picture, and availability of a certain encoding / decoding tool. The pixel group unit motion compensator 120 may perform pixel group unit motion compensation in the current block based on the above determination. The getter 105 may obtain, from the bit stream, information indicating whether to perform pixel group unit motion compensation. Here, the information indicating whether to perform pixel group unit motion compensation may be on / off information in a flag form. The information indicating whether to perform pixel group unit motion compensation may be included in a syntax element of a block level. The pixel group unit motion compensator 120 may determine whether to perform MA / a / ZUZ J / UUUU / 4 the pixel group unit motion compensation in the current block based on the information indicating whether to perform pixel group unit motion compensation, the information obtained from the bit stream. Alternatively, the pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation on the current block in the current image by using an image-related parameter that includes the current image. The pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation on the current block of the current image based on the availability of a certain encoding / decoding tool. The pixel group unit motion compensator 120 may determine the availability of encoding / decoding tools other than encoding tools related to the pixel group unit motion compensation with respect to the current block, and determine whether to perform pixel group unit motion compensation on the current block in the current image based on the availability of a certain encoding / decoding tool. For example, the pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation on the current block in the current image, when an overlapping block motion compensation (OBMC)-related encoding / decoding tool may be used. The pixel group unit motion compensator 120 may determine that pixel group unit motion compensation is not used with respect to the current block when the OBMC-related encoding / decoding tool may be used. OBMC is block-unit motion compensation, which allows reference blocks in a reference image corresponding to adjacent blocks in the current image to overlap each other, and can prevent a blocking deterioration phenomenon. Different from general block-unit motion compensation, OBMC compensates motion that considers precise motion of a pixel in a block by allowing overlapping of reference blocks, and thus the pixel group unit motion compensator 120 can determine that the pixel group unit motion compensation is not used in the current block when the OBMC-related encoding / decoding tool can be used. In other words, since two or more prediction directions are combined with respect to an overlapping direction, the pixel group unit motion compensator 120 can determine that the MA / a / ZUZ J / UUUU / 4 Motion compensation in pixel group units that consider two prediction directions is not generally used. However, one embodiment is not limited to this, and when an overlapping region across OBMC is not large, the pixel group unit motion compensator 120 may determine that pixel group unit motion compensation is used in the current block when the OBMC-related encoding / decoding tool may be used. Alternatively, since two or more prediction directions are combined with respect to the overlapping region, the pixel group unit motion compensator 120 may determine that motion compensation in the pixel group units that consider two prediction directions is not used to a limited extent for the overlapping region. Since only two prediction directions are used with respect to a non-overlapping region, the pixel group unit motion compensator 120 may determine that motion compensation in the pixel group units that consider two prediction directions is used to a limited extent for the non-overlapping region. When an encoding / decoding tool related to lighting compensation can be used, the group unit motion compensator MA / a / ZUZ J / UUUU / 4 of pixel 120 may determine whether to perform pixel group unit motion compensation in the current block. For example, when the lighting compensation-related encoding / decoding tool can be used, the pixel group unit motion compensator 120 may determine to perform pixel group unit motion compensation in the current block. The pixel group unit motion compensation-related encoding / decoding tool and the lighting compensation-related encoding / decoding tool do not contradict each other, and thus the pixel group unit motion compensator 120 may perform lighting compensation in the current block together with motion compensation in the current block in pixel group units.Here, illumination compensation denotes an operation in which a luminance pixel value is compensated to be close to a luminance pixel value of an original image, by using a linear coefficient and shift in block units. However, since illumination compensation is performed when there is a luminance difference Δ1 with respect to time, motion of a current object may not be properly compensated when motion compensation in pixel group units based on an optical flow (see Equation 1) is performed because a value of one side in the optical flow has a non-zero value. Accordingly, when the degree of illumination compensation is large, that is, when Δ1 is sufficiently large, the pixel group unit motion compensator 120 may determine not to perform pixel group motion compensation in the current block when the encoding / decoding tool related to illumination compensation can be used. The pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation on the current block when a weighted prediction-related encoding / decoding tool may be used. For example, when the pixel group unit motion compensator 120 determines not to perform pixel group unit motion compensation on the current block when the weighted compensation-related encoding / decoding tool may be used. The weighted compensation-related encoding / decoding tool denotes, when performing bidirectional motion prediction, an encoding / decoding tool in which a weight is assigned to each reference block of each reference image and the offset is assigned thereto to generate IVI A / a / ZUZ J / UUUU / 4 a prediction block related to the current block. The pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation in the current block when the affine motion-related encoding / decoding tool is usable. For example, the pixel group unit motion compensator 120 may determine not to perform pixel group unit motion compensation in the current block when the affine motion-related encoding / decoding tool is usable. Since the affine motion-related encoding / decoding tool is a fine-grained motion compensating encoding / decoding tool like the pixel group unit motion compensation encoding / decoding tool, the encoding / decoding tools are collapsed and thus cannot be used together in the same block. The pixel group unit motion compensator 120 may determine whether to perform pixel group unit motion compensation on the current block, based on the motion vector of the current block. For example, the pixel group unit motion compensator 120 may determine whether a ratio (Ratioreferencel = M / a / ZUZ J / UUUU / 4 MV1 / POCreferencel) between a first motion vector MV1 related to a first reference picture PICreferencel and a difference of POCreferencel between the current picture and the first reference picture and a ratio (Ratioreferencel=MV2 / POCreference2) between a second motion vector MV2 related to a second reference picture PICreference2 and a difference of POCreference2 between the current picture and the second reference picture are within a certain range, and when the ratios are within a certain range, determining to perform motion compensation on the current block in units of pixel group. When the size of the motion vector is a certain size, the pixel group unit motion compensator 120 may determine to perform pixel group unit motion compensation on the current block. For example, the pixel group unit motion compensator 120 may determine to perform motion compensation on the current block in pixel group units when the size of the motion vector is larger than a certain size. Here, a certain size may be 0. The pixel group unit motion compensator 120 may determine whether to perform motion compensation on the current block in the group units of MA / a / ZUZ J / UUUU / 4 pixel according to a temporal criterion of first and second prediction directions. For example, the pixel group unit motion compensator 120 may determine not to perform motion compensation in the current block in the pixel group units when the first prediction direction related to the first reference picture and the second prediction direction related to the second reference picture both point to a reference picture temporarily before the reference picture or both point to a reference picture temporarily after the current picture. Here, a temporal order of pictures is related to a display order, and even when a picture is to be displayed temporarily after the current picture, the picture may be pre-decoded and stored in a buffer memory and then displayed after the current picture. When temporal directions of the first prediction direction and the second prediction direction are different from each other, that is, when one of the prediction units is oriented to the reference image temporally before the current image and the other is oriented to the reference image temporally after the current image, the pixel group unit motion compensator 120 may determine to perform motion compensation. MA / a / ZUZ J / UUUU / 4 movement in the current block in pixel group units. The pixel group unit motion compensator 120 may determine to perform pixel group unit motion compensation in the current block when the size of the current block is a certain size. For example, the pixel group unit motion compensator 120 may determine to perform pixel group unit motion compensation in the current block when the size of the current block is equal to or greater than a certain size. The pixel group unit motion compensator 120 may determine availability of a certain encoding / decoding tool based on information about the availability of a certain encoding / decoding tool obtained from a high-level syntax carrier, such as a segment header, an image parameter, and a set of sequence parameters. Also, the pixel group unit motion compressor 120 may determine availability of a certain encoding / decoding tool based on information about the availability of the encoding / decoding tool obtained from a block-level syntax element. However, an embodiment is not limited to this, and the pixel group unit motion compensator 120 may obtain information about the availability of a certain encoding / decoding tool with respect to the current block from the block-level syntax element obtained from the bit stream, determine whether a certain encoding / decoding tool is used in the current block based on the information, and determine whether to perform pixel group unit motion compensation in the current block based on the determination whether a certain encoding / decoding tool is used. The pixel group unit motion compensator 120 may determine a reference pixel group in the reference block that corresponds to the current pixel group of the current block, and determine a gradient value of the reference pixel group. The pixel group unit motion compensator 120 may output the motion compensation value in pixel group units by performing motion compensation in pixel group units with respect to the current block by using the gradient value of the reference pixel group. The pixel group unit motion compensator 120 may generate a gradient value of the first pixel and a gradient value of the second pixel, by applying a filter to a first peripheral region of a first group ML / a / ZUZ J / UUUU / 4 pixel including the first pixel group among pixel groups of the first reference block indicated by the first motion vector and a second peripheral region of a second pixel group including the second pixel group among pixel groups of the second reference block indicated by the second motion vector. The pixel group unit motion compensator 120 may determine pixel values and pixel gradient values in a first window having a certain size and including the first pixel group around the first pixel group in the first reference image, and determine pixel values and pixel gradient values in a second window having a certain size and including the second reference pixels around the second reference pixel group in the second reference image.The pixel group unit motion compensator 120 may obtain a parameter related to a size of a window used to calculate a displacement vector per unit time based on at least one of information about a window size, which is obtained from the bit stream, a hierarchy depth of an image, an image group size, image resolution, a parameter related to a temporal distance between the reference image and the current image, a frame rate, a motion vector, a parameter of. MA / a / ZUZ J / UUUU / 4 configuration related to a coding prediction structure, and a prediction direction, and performing motion compensation on the current block in pixel group units based on the parameter related to the window size. For example, the MxM window size ensures motion consistency and a probability of error can be reduced while calculating the displacement vector per unit time with respect to the current pixel group. When there is a factor that may increase the possibility of error generation, the pixel group unit motion compensator 120 may employ the window size to ensure motion consistency and reduce the probability of error during calculation. When the GOP size is large, the distance between the current image and the reference image may increase, thereby increasing the possibility of error generation. Accordingly, the pixel group unit motion compensator 120 can perform motion compensation on the current block in pixel group units by enlarging the window size. Also, for example, when the pixel group size is KxK size, motion consistency is guaranteed more compared to when the pixel group includes only one pixel, and thus the pixel group unit motion compensator 120 can determine the window size with respect to the pixel group of KxK size to be smaller than a window size with respect to a pixel group that includes only one pixel. Information about the size of a window, such as a first window and a second window, may be explicitly signaled by a high-level syntax carrier included in the bit stream and in a segment header, a set of picture parameters, a set of sequence parameters, or various other forms. Alternatively, the window size can be introduced by an image-related parameter that includes the current image. For example, the window size can be determined based on the hierarchy depth of the current image. In other words, error accumulates as the hierarchy depth of the current image increases, thereby decreasing prediction accuracy. Therefore, the window size can be set to a large size. Here, the hierarchy depth of the current image may be larger than the hierarchy depth of the image referenced by the image. For example, the hierarchy depth of an intra-image may be 0, the hierarchy depth of a first image referencing the intra-image may be 1, and the hierarchy depth of a second image referencing the first image may be 2. Also, the motion compensator of a pixel group unit 120 can determine the window size based on the GOP size. Alternatively, the pixel group unit motion compensator 120 may determine the window size based on the image resolution. The pixel group unit motion compensator 120 may determine the window size based on the frame rate. Also, the pixel group unit motion compensator 120 may determine the window size based on the motion vector of the current block. In particular, the pixel group unit motion compensator 120 may determine the window size based on at least one of the size and angle of the motion vector of the current block. The pixel group unit motion compensator 120 may determine the window size based on a reference picture index indicating one of a plurality of pictures stored in a reference picture buffer. The pixel group unit motion compensator 120 may determine the window size based on the availability of bidirectional prediction of different time directions. Also, the pixel group unit motion compensator 120 may determine the window size based on a configuration parameter related to an encoding prediction structure. Here, the configuration parameter related to the encoding prediction structure may indicate low delay or random access. The pixel group unit motion compensator 120 may differently determine the window size based on whether the coding prediction structure is low delay or random access. The pixel group unit motion compensator 120 may perform motion compensation in pixel group units using a gradient value and pixel values of pixels, wherein a difference between the pixel values and a value of a pixel included in the current pixel group among pixels included in the window is not greater than a certain threshold value. This is to ensure consistent motion with respect to regions of the same object. The pixel group unit motion compensator 120 may determine the displacement vector per unit time relative to the current pixel group by using pixel values and pixel gradient values in the first window, and pixel values and pixel gradient values in the second window. Here, a value of the displacement vector per unit time relative to the current pixel group may be adjusted by a regularization parameter. The regularization parameter is a parameter introduced to prevent error generation when the displacement vector per unit time relative to an incorrect current pixel group is determined to perform motion compensation in pixel group units.The pixel group unit motion compensator 120 may obtain the regularization parameter related to the displacement vector per unit time in a horizontal or vertical direction, based on at least one of information about the regularization parameter related to the displacement vector per unit time in the horizontal or vertical direction, the information obtained from the bit stream, the bit depth of a sample, the GOP size, the motion vector, the parameter related to the temporal distance between the reference picture and the current picture, the frame rate, the configuration parameter related to the coding prediction structure, and the prediction direction.The pixel group unit motion compensator 120 may perform pixel group unit motion compensation in the current block based on the regularization parameter related to the displacement vector per unit time in the horizontal or vertical direction. The regularization parameter will be described later with reference to Figure 8A. The pixel group unit motion compensator 120 may determine the regularization parameter based on information about the regularization parameter obtained from the bit stream. The information about the regularization parameter may be included in a high-level syntax carrier in a segment header, a set of image parameters, a set of sequence parameters, or various other forms. However, an embodiment is not limited to this, and the pixel group unit motion compensator 120 may determine the regularization parameter based on the image-related parameter. For example, the pixel group unit motion compensator 120 may determine the regularization parameter based on the GOP size. The pixel group unit motion compensator 120 may determine the regularization parameter based on the distance from the current image to the reference image. Here, the distance to the reference image may be a POC difference between the current image and the reference image. The group unit motion compensator IVI A / a / ZUZ J / UUUU / 4 pixel 120 may determine the regularization parameter based on the motion vector of the current block. The pixel group unit motion compensator 120 may determine the regularization parameter based on at least one of the size and angle of the motion vector of the current block. The pixel group unit motion compensator 120 may determine the regularization parameter based on the reference image index. The pixel group motion compensator 120 may determine the regularization parameter based on the availability of bidirectional prediction of the different temporal directions. Also, the pixel group motion compensator 120 may determine the regularization parameter based on the configuration parameter related to the coding prediction structure. The configuration parameter related to the coding prediction structure may indicate low delay or random access. The pixel group unit motion compensator 120 may differently determine the regularization parameter based on low delay or random access. The pixel group unit motion compensator 120 can determine the regularization parameter with MA / a / ZUZ J / UUUU / 4 based on the frame rate. The pixel group motion compensator 120 may determine the regularization parameter based on the availability of bidirectional prediction having different temporal directions. The pixel group unit motion compensator 120 may perform motion compensation on the current block in pixel group units by using the displacement vector per unit time relative to the current pixel and the gradient value of the reference pixel. A reference block reference position can be an integer pixel position, but alternatively, it can be a fractional pixel position. When the reference position of the reference block is the fractional pixel position, the gradient value of the reference pixel in the reference block can be determined by using pixel values of neighboring pixels, in which a component in a certain direction is an integer. For example, the pixel group unit motion compensator 120 may determine, as the gradient value of the reference pixel, a result value obtained by performing filtering on the pixel values of neighboring pixels, in which the component in a certain direction is an integer, by using a gradient filter. Here, a filter coefficient of the gradient filter may be determined by using a predetermined coefficient with respect to a DCT-based interpolation filter. The filter coefficient of the gradient filter may be a filter coefficient scaled to an integer coefficient to reduce real-number operations during filtering. Here, the gradient filter can be an ID gradient filter in a horizontal or vertical direction. The pixel group unit motion compensator 120 may perform filtering on a neighboring pixel, in which a component in a corresponding direction is an integer, by using the gradient filter ID in the horizontal or vertical direction, to determine a gradient value of the reference pixel in the horizontal or vertical direction. For example, the pixel group unit motion compensator 120 may determine the gradient value of the reference pixel in the horizontal direction by performing filtering on a pixel positioned in a horizontal direction of a pixel, in which a horizontal direction component is an integer, from among pixels adjacent to the reference pixel, by using the gradient filter ID in the horizontal direction. When the reference pixel position is (x+a, y+β), where x and y are each an integer and ay β are each a fraction, the pixel group unit motion compensator 120 may determine, as a pixel value at a position (x, y+β), a result value obtained by performing filtering on a pixel at a position (x, y) and a pixel in which a vertical component is an integer, from among pixels positioned in the vertical direction of the pixel at the position (x, y), by using the ID interpolation filter. The pixel group unit motion compensator 120 may determine, as a gradient value at a position (x+a, y+β) in the horizontal direction, a result value obtained by performing filtering on the pixel value at the position (x, y+β) and pixel values of pixels, in which a horizontal component is an integer, from among pixels positioned in the horizontal direction from the pixel at the position (x, y+β), by using the gradient filter in the horizontal direction. An order for using the ID gradient filter and the ID interpolation filter is not limited. In the above description, an interpolation filtering value in a vertical direction is generated by first performing filtering on a pixel at an integer position by using an interpolation filter in the vertical direction, and then filtering is performed on the interpolation filtering value in the vertical direction by using an ID gradient filter in a horizontal direction, but alternatively, an interpolation filtering value in the horizontal direction may be generated by first performing filtering on the pixel at the integer position by using the ID gradient filter in the horizontal direction, and then filtering may be performed on the interpolation filtering value in the horizontal direction by using the ID interpolation filter in the vertical direction. Here above, the pixel group unit motion compensator 120 determining a gradient value in a horizontal direction at a position (x+a, y+β) has been described in detail. Since the pixel group unit motion compensator 120 determines a gradient value in a vertical direction at a position (x+a, y+β) in the same manner as determining a gradient value in a horizontal direction, details thereof are not provided again. Hereinbefore, the pixel group unit motion compensator 120 using an ID gradient filter and an ID interpolation filter to determine a gradient value at a fractional pixel position has been described in detail. However, alternatively, a gradient filter and an interpolation filter may be used to determine a gradient value at an integer pixel position. However, in the case of an integer pixel, a pixel value may be determined without using an interpolation filter, but the pixel value of the integer pixel may be determined by performing filtering on the integer pixel and a neighboring pixel, in which a component in a certain direction is an integer, by using an interpolation filter, for processes consistent with processes at a fractional pixel.For example, an interpolation filter coefficient at an integer pixel may be {0, 0, 64, 0, 0}, and since an interpolation filter coefficient related to a neighboring integer pixel is 0, filtering can be performed only by using a pixel value of a current integer pixel, and as a result, filtering can be performed on the current integer pixel and a neighboring integer pixel by using an interpolation filter to determine the pixel value of the current integer pixel. The pixel group unit motion compensator 120 may perform scaling after filtering a pixel at an integer position by using an ID interpolation filter in a vertical direction. Here, the descaling may include bit shifting to the right by a descaling bit number. The descaling bit number may be determined based on a bit depth of a sample. Also, the descaling bit number may be determined based on specific input data in the block. For example, the descaling bit number can be a value obtained by subtracting 8 from the sample bit depth. The pixel group unit motion compensator 120 may perform descaling after performing filtering on a value generated by performing descaling by using a gradient filter in a horizontal direction. Similarly here, the descaling may include right bit shifting by the descaling bit number. The descaling bit number may be determined based on a scaling bit number of an ID interpolation filter in a vertical direction, a scaling bit number of an ID gradient filter in a horizontal direction, and a bit depth of a sample. For example, when the scaling bit number p of the ID interpolation filter in the vertical direction is 6, the scaling bit number q of the ID gradient filter in the horizontal direction is 4, and the bit depth of the sample is b, the descaling bit number may be p+q+8-b, that is, 18-b. When the pixel group unit motion compensator 120 performs only bit shifting to the right by a number of descaling bits on a value generated through filtering after performing it IVI A / a / ZUZ J / UUUU / 4 filtration, a rounding error may occur, and thus the unit motion compensator of pixel group 120 can perform descaling after adding an offset value to the value generated through filtering. Here, the offset value may be 2Λ(descaling bit number - 1) . The inter-forecaster 110 may generate the predicted pixel value of the current block by using the motion compensation value in block units and the motion compensation value in pixel group units relative to the current block. For example, the inter-forecaster 110 may generate the predicted pixel value of the current block by adding the motion compensation value in block units and the motion compensation value in pixel group units relative to the current block.Here, the block unit motion compensation value may denote a value generated by performing motion compensation in block units, and the pixel group unit motion compensation value may denote a value generated by performing motion compensation in pixel group units, wherein the block unit motion compensation value may be an average value or weighted sum of the reference pixel, and the pixel group unit motion compensation value may be a value determined based on the displacement vector per unit time related to the current pixel and the gradient value of the reference pixel. The pixel group unit motion compensator 120 may obtain a shift value for downscaling after an interpolation operation or a gradient operation, based on at least one of a bit depth of the sample, an interval of an input of a filter used for the interpolation operation or the gradient operation, and a coefficient of the filter. The pixel group unit motion compensator 120 may perform downscaling after the interpolation operation or the gradient operation with respect to pixels included in the first reference block and the second reference block, by using the shift value for downscaling. The inter-forecaster 110 may use a motion vector when performing block-unit motion compensation, and store the motion vector. Here, a motion vector unit may be a block having a size of 4x4. Meanwhile, when storing the motion vector after block-unit motion compensation, a storage unit of the motion vector may be a block having various sizes other than the size of 4x4 (e.g., a block having a size of RxR, where R is an integer). Here, the motion vector storage unit may be a block larger than the size of 4x4. For example, the motion vector storage unit may be a block having a size of 16x16.When the motion vector unit is a block having a size of 4x4 and the motion vector storage unit is a block having a size of 16x16, the inter-forecaster 110 may store the motion vector according to an equation (MVx, MVy) =Írxr(MVx, MVy). Here MVx and MVy are respectively an x-component and a y-component of the motion vector used in block unit motion compensation, írxr(MVx, MVy) may denote a function of the motion vector MVx,MVy considering the size of the motion vector storage unit of RxR.For example, Írxr(MVx, MVy) may be a function in which an average value of x MVx components of motion vectors of a unit included in the motion vector storage unit of RxR is determined to be the x MVx component stored in the motion vector storage unit of RxR, and an average value of y MVy components of motion vectors of a unit included in the motion vector storage unit of RxR is determined to be the y MVy component stored in the vector storage unit of. IVI A / a / ZUZ J / UUUU / 4 RxR movement. In other words, the inter-predictor 110 can perform memory compression by using a larger unit when storing the motion vector. The inter-predictor 110 can perform not only block-unit motion compensation but also pixel-group motion compensation with respect to a block included in the current image. In that way, the motion vector that considers not only block-unit motion compensation but also pixel-group motion compensation can be stored.Here, the stored motion vector may be determined based on the motion vector used in motion compensation in block units, the displacement vector per unit time in the horizontal or vertical direction used in motion compensation in pixel group units, and a weight relative to the displacement vector per unit time in the horizontal or vertical direction. Here, the weight can be determined based on the size of the motion vector storage unit, the pixel group size, and a scaling factor of the gradient filter or interpolation filter used in motion compensation in pixel group units. IVI A / a / ZUZ J / UUUU / 4 The inter-predictor 110 may determine a motion vector predictor of a block in a decoded picture after the current picture by using temporary motion vector predictor candidates. The temporal motion vector predictor candidate may be a motion vector of a positioned block included in a previously decoded picture, and accordingly may be a motion vector stored with respect to the previously decoded picture. Here, when the stored motion vector is the motion vector considering motion compensation in pixel group units, the temporal motion vector predictor candidate may be determined as a motion vector used in more accurate motion compensation, and thereby may increase the prediction coding / decoding efficiency. Meanwhile, when performing pixel group unit motion compensation, a target block size for performing pixel group unit motion compensation can be enlarged based on a window size and an interpolation filter length, along with the current block size. The target block is enlarged more than the current block based on the window size because, at a pixel placed on an edge of the current block, motion compensation MA / a / ZUZ J / UUUU / 4 pixel group unit is performed on the current block based on the pixel placed on the edge of the current block and neighboring pixels. Accordingly, the pixel group unit motion compensator 120 may adjust a position of a pixel outside the current block between pixels in the window to a position of a pixel adjacent to the inside of the current block and determine a pixel value and a gradient value at the adjusted pixel position during a process for performing pixel group unit motion compensation by using the window to reduce memory access times and multiplication operation times, thereby reducing the memory access times and multiplication operation times. The reconstructor 125 may obtain a residual block of the current block from the bitstream, and reconstruct the current block by using the residual block and the predicted pixel value of the current block. For example, the reconstructor 125 may generate, from the bitstream, a pixel value of a reconstructed block by adding a value of the residual block of the current block and the pixel value of the predicted block of the current block. The video decoding apparatus 100 may include an image decoder (not shown), wherein the image decoder may include the obtainer 105, the IVI A / a / ZUZ J / UUUU / 4 inter-predictor 110, and the reconstructor 125. The image decoder will now be described with reference to Figure 1E. Figure IB is a flowchart of a video decoding method according to various embodiments. In operation S105, the video decoding apparatus 100 may obtain, from a bit stream, motion prediction mode information with respect to a current block in a current picture. The video decoding apparatus 100 may receive the bit stream including the motion prediction mode information with respect to the current block in the current picture, and obtain the motion prediction mode information with respect to the current block from the received bit stream. The video decoding apparatus 100 may obtain, from the bit stream, information about a prediction mode of the current block, and determine the prediction mode of the current block based on the information about the prediction mode of the current block. Here, the prediction mode of the current block is an inter prediction mode, and the video decoding apparatus 100 may obtain the motion prediction mode information with respect to the current block. For example, the video decoding device MA / a / ZUZ J / UUUU / 4 100 may determine the prediction mode of the current block to be the inter prediction mode, based on the information about the prediction mode of the current block. When the prediction mode of the current block is the inter prediction mode, the video decoding apparatus 100 may obtain the motion prediction mode information with respect to the current block of the bit stream. In operation S110, when the motion prediction mode information indicates a bidirectional motion prediction mode, the video decoding apparatus 100 may obtain, from the bit stream, a first motion vector indicating a first reference block of the current block in a first reference picture and a second motion vector indicating a second reference block of the current block in a second reference picture. In other words, the video decoding apparatus 100 may obtain the bit stream including information about the first and second motion vectors, and obtain the first and second motion vectors from the received bit stream. The video decoding apparatus 100 may obtain a reference picture index from the bit stream, and determine the first and second reference pictures from among previously decoded pictures based on the reference picture index. VI A / a / ZUZ J / UUUU / 4 In operation S115, the video decoding apparatus 100 may obtain a pixel group unit motion compensation-related parameter of the current block based on at least one of information of a pixel group unit offset-related parameter obtained from the bit stream and a parameter of an image including the current image. Here, a pixel group may include at least one pixel. In operation S120, the video decoding apparatus 100 may generate a current block prediction block by performing motion compensation based on the first motion vector and the second motion vector and pixel group unit motion compensation based on the parameter related to the pixel group unit motion compensation, with respect to the current block. In operation S125, the video decoding apparatus 100 may obtain a residual block of the current block of the bit stream. In operation S130, the video decoding apparatus 100 may reconstruct the current block based on the prediction block and the residual block. In other words, the video decoding apparatus 100 may generate a pixel value of a reconstructed block of the current block by adding a prediction pixel value of the prediction block and a pixel value of the residual block indicated by the residual block related to the current block. Figure 1C is a block diagram of a video encoding apparatus in accordance with various embodiments. A video encoding apparatus 150 according to various embodiments includes an inter-predictor 155 and a bitstream generator 170. The inter-predictor 155 performs inter-prediction on a current block by referencing multiple blocks based on a speed and distortion cost. In other words, the inter-predictor 155 may generate a prediction pixel value of the current block by using at least one of the encoded images prior to a current image included in the current block. The inter-predictor 155 may include a block unit motion compensator 160 and a pixel group unit motion compensator 165. The block unit motion compensator 160 may output a motion compensation value in block units by performing motion compensation on the current block in block units. The block unit motion compensator 160 may determine at least one reference picture from among previously coded pictures, and determine a reference block of the current block placed in the at least one reference picture. The block-unit motion compensator 160 may output the motion compensation value in block units by performing motion compensation on the current block in block units, using a pixel value of the reference block. The block-unit motion compensator 160 may output the motion compensation value in block units by performing motion compensation on the current block in block units using a reference pixel value of the reference block, which corresponds to a current pixel of the current block. The block-unit motion compensator 160 may generate the motion compensation value in block units by performing motion compensation of the current block in block units, using a plurality of reference blocks respectively included in a plurality of reference pictures. For example, when a motion prediction mode of the current block is a two-way prediction mode, the block-unit motion compensator 160 may determine two reference pictures from among the previously coded pictures, and determine two reference blocks included in the two reference pictures.Here, bidirectional prediction not only means that inter prediction is performed by using an image displayed before the current image and an image displayed after the current image, but also means that inter prediction is performed by using two images coded before the current image regardless of the order in which they are displayed. The block-unit motion compensator 160 may generate the motion compensation value in block units by performing motion compensation on the current block in block units using pixel values of two reference pixels in the two reference blocks. The block-unit motion compensator 160 may generate the motion compensation value in block units by performing motion compensation on the current block in block units using a weighted average or sum pixel value of the two reference pixels. The block unit motion compensator 160 may output a reference picture index indicating a reference picture for motion compensation of the current block, from among the previously coded pictures. The block unit motion compensator 160 may determine a motion vector having the current block as a start point and the reference block of the current block as an end point, and output the IVI A / a / ZUZ J / UUUU / 4 motion vector. The motion vector may denote a vector indicating displacement of reference coordinates of the current block in the current image and reference coordinates of the reference block in the reference image. For example, when the coordinates of an upper left corner of the current block are (1, 1) and upper left coordinates of the reference block in the reference image are (3, 3), the motion vector may be (2, 2). A reference block reference position can be a whole-number pixel position, but alternatively, it can be a fractional pixel position. Here, the fractional pixel position can be determined in units of 1 / 4 pixel or 1 / 6 pixel. Alternatively, the fractional pixel position can be determined in several fractional pixel units. For example, when the reference position of the reference block is (1.5, 1.5) and the coordinates of the upper left corner of the current block are (1, 1), the motion vector may be (0.5, 0.5). When the motion vector is determined in units of 1 / 4 or 1 / 6 pixels to indicate the reference position of the reference block, which is a fractional pixel position, an integer motion vector is determined by scaling the motion vector, and the reference position of the reference block can be determined by using the scaled-up motion vector. When the reference position of the reference block is a fractional pixel position, a fractional pixel position of the reference block may also be a fractional pixel position.Therefore, a pixel value at a fractional pixel position in the reference block can be determined by using pixel values of neighboring pixels, in which a component in a certain direction is an integer. For example, the block-unit motion compensator 160 may determine, as the pixel value of the reference pixel at the fractional pixel position, a value obtained by performing filtering on pixel values of neighboring pixels in which a component in a certain direction is an integer, by using an interpolation filter, and by determining the motion compensation value in block units with respect to the current block, by using the pixel value of the reference pixel. Here, the interpolation filter may be a DCT-based tap interpolation filter M. A DCT-based tap interpolation filter coefficient, M, may be induced from DCT and IDCT. Here, the interpolation filter coefficient may be a filter coefficient scaled to an integer coefficient to reduce MA / a / ZUZ J / UUUU / 4 real number operations during filtering. Here, the interpolation filter can be an ID interpolation filter in a horizontal or vertical direction. The block unit motion compensator 160 may first perform filtering with respect to neighboring integer pixels by using an ID interpolation filter in a vertical direction, and then perform filtering with respect to a value at which filtering is performed, by using an ID interpolation filter in a horizontal direction to determine the pixel value of the reference pixel at the fractional pixel position. When a scaled filter coefficient is used, the block unit motion compensator 160 may perform descaling at a value at which filtering is performed, after performing filtering on a pixel at an integer position by using the ID interpolation filter in the vertical direction. Here, the descaling may include right bit shifting by a descaling bit number. The descaling bit number may be determined based on a bit depth of a sample.For example, the descaling bit number can be a value obtained by subtracting 8 from the sample bit depth. Also, the block unit motion compensator 160 can perform filtering on a pixel, in which IVI A / a / ZUZ J / UUUU / 4 a horizontal direction component is an integer, by using the ID interpolation filter in the vertical direction, and then performing the bit shift to the right by the descaling bit number. The descaling bit number can be determined based on a scaling bit number of the ID interpolation filter in the vertical direction, a scaling bit number of the ID interpolation filter in the horizontal direction, and the sample bit depth. When the block unit motion compensator 160 only performs right bit shifting by a descaling bit number, a rounding error may be generated, and thus the block unit motion compensator 160 may perform filtering on a pixel in which a component in a certain direction is an integer by using an ID interpolation filter in a certain direction, add a shift value to a value at which filtering is performed, and then perform descaling at a value to which the shift value is added. Here, the shift value may be 2Λ(number of descaling bits - 1). Here in the above, determination of a downscaling bit number based on a bit depth of a sample after filtering by using an ID interpolation filter in a vertical direction has been described, IVI A / a / ZUZ J / UUUU / 4 but alternatively, the descaling bit number may be determined not only from the sample bit depth, but also a scaled bit number with respect to an interpolation filter coefficient. In other words, the descaling bit number may be determined based on the sample bit depth and the scaling bit number with respect to the interpolation coefficient, within a range where no overflow occurs, while considering a size of a register used during filtering and a size of a buffer storing a value generated during filtering. The pixel group unit motion compensator 165 may output a motion compensation value in pixel group units by performing motion compensation on the current block in pixel group units. For example, when the motion prediction mode is a two-way motion prediction mode, the pixel group unit motion compensator 165 may output the motion compensation value in pixel group units by performing motion compensation on the current block in pixel group units. The pixel group unit motion compensator 165 may output the motion compensation value in pixel group units by performing motion compensation on the current block in pixel group units, by using gradient values of pixels included in the reference block of the current block. The pixel group unit motion compensator 165 may generate a gradient value of a first pixel between pixels of a first reference block in a first reference image and a gradient value of a second pixel between pixels of a second reference block in a second reference image by applying a filter to a first peripheral region of the first pixel and a second peripheral region of the second pixel. The pixel group unit motion compensator 165 may determine pixel values and gradient values of pixels in a first window having a certain size and including the first reference pixel around the first reference pixel in the first reference image, and determine pixel values and gradient values of pixels in a second window having a certain size and including the second reference pixel around the second reference pixel in the second reference image. The pixel group unit motion compensator 165 may determine a displacement vector per unit time relative to the current pixel by using the pixel values and gradient values of the pixels in the MA / a / ZUZ J / UUUU / 4 first window and the pixel values and gradient values of the pixels in the second window. The pixel group unit motion compensator 165 may output the motion compensation value in pixel group units by performing motion compensation on the current block in pixel group units, by using the displacement vector per unit time and a reference pixel gradient value. A reference pixel position can be a whole number pixel position, but alternatively, it can be a fractional pixel position. When a reference position of the reference block is a fractional pixel position, the reference pixel gradient value in the reference block can be determined by using pixel values of neighboring pixels, in which a component in a certain direction is an integer. For example, the pixel group unit motion compensator 165 may determine, as the gradient value of the reference pixel, a result value obtained by performing filtering on the pixel values of neighboring pixels in which a component in a certain direction is an integer, by using a gradient filter. Here, a filter coefficient of the gradient filter IVI A / a / ZUZ J / UUUU / 4 gradient can be determined by using a predetermined coefficient with respect to a DCT-based interpolation filter. The filter coefficient of the gradient filter can be a filter coefficient scaled to an integer coefficient to reduce real-number operations during filtering. Here, the gradient filter can be an ID gradient filter in either a horizontal or vertical direction. The pixel group unit motion compensator 165 may perform filtering on a neighboring pixel, in which a component in a corresponding direction is an integer, by using an ID gradient filter in a horizontal or vertical direction, to determine a gradient value of the reference pixel in the horizontal or vertical direction. For example, the pixel group unit motion compensator 165 may determine a pixel value of a pixel, in which a vertical component is a fraction, by performing filtering on pixels, in which a vertical component is an integer, between pixels in a vertical direction of an integer pixel adjacent to the reference pixel, by using an ID interpolation filter in the vertical direction. With respect to a pixel placed in another column IVI A / a / ZUZ J / UUUU / 4 adjacent to the integer pixel adjacent to the reference pixel, the pixel group unit motion compensator 165 may determine a pixel value of a fractional pixel position placed in the other column by performing filtering on a neighboring integer pixel in the vertical direction, by using the ID interpolation filter in the vertical direction. Here, a pixel position placed in the other column may be a fractional pixel position in the vertical direction and an integer pixel position in the horizontal direction. In other words, when the position of the reference pixel is (x+a, y+β), where x and y are each an integer and ay β are each a fraction, the pixel group unit motion compensator 165 may determine a pixel value at a position (x, y+β) by performing filtering on a neighboring integer pixel in the vertical direction from a position (x, y) by using an interpolation filter in the vertical direction. The pixel group unit motion compensator 165 may determine a gradient value at a position (x+a, y+β) in the horizontal direction by performing filtering on the pixel value at the position (x, y+β) and a pixel value of a pixel, in which a horizontal component is an integer, from among pixels positioned in the horizontal direction of the pixel value at the position (x, y+β), by using a gradient filter in the horizontal direction. An order for using the ID gradient filter and the ID interpolation filter is not limited. As described above, an interpolation filtering value in a vertical direction may be generated by first performing filtering on a pixel at an integer position by using an interpolation filter in the vertical direction, and then filtering may be performed on the interpolation filtering value in the vertical direction by using an ID gradient filter in a horizontal direction, but alternatively, a gradient filtering value in the horizontal direction may be generated by first performing filtering on the pixel at the integer position by using the ID gradient filter in the horizontal direction, and then filtering may be performed on the gradient filtering value in the horizontal direction by using the ID interpolation filter in the vertical direction. Here in the above, the pixel group unit motion compensator 165 that determines a gradient value in a horizontal direction at a position (x+a, y+β) has been described in detail. The pixel group unit motion compensator 165 can determine a gradient value in a IVI A / a / ZUZ J / UUUU / 4 vertical direction at a position (x+a, y+β) in the manner similar to determining a gradient value in a horizontal direction. The pixel group unit motion compensator 165 may determine a gradient value of a reference pixel in a vertical direction by filtering on a neighboring integer pixel in the vertical direction of integer pixels adjacent to the reference pixel, by using an ID gradient filter in the vertical direction. Also, with respect to a pixel adjacent to the reference pixel and positioned in the other column, the pixel group unit motion compensator 165 may determine a gradient value in the vertical direction with respect to the pixel adjacent to the reference pixel and positioned in the other column by filtering on a neighboring integer pixel in the vertical direction, by using the ID gradient filter in the vertical direction. Here, a pixel position may be a fractional pixel position in the vertical direction and an integer pixel position in a horizontal direction. In other words, when a reference pixel position is (x+a, y+β) , where x and y are each an integer, a and β are each a fraction, the pixel group unit motion compensator 165 MA / a / ZUZ J / UUUU / 4 can determine a gradient value in a vertical direction at a position (x, y+β) by filtering on a neighboring integer pixel in the vertical direction from a position (x, y), by using a gradient filter in the vertical direction. The pixel group unit motion compensator 165 may determine a gradient value in a vertical direction at a position (x+a, y+β) by performing filtering on a gradient value at a position (x, y+β) and a gradient value of a neighboring integer pixel positioned in a horizontal direction from the position (x, y+β), by using an interpolation filter in the horizontal direction. An order for using the ID gradient filter and the ID interpolation filter is not limited. As described above, a gradient filtering value in a vertical direction may be generated by first performing filtering on pixels at an integer position by using a gradient filter in the vertical direction, and then filtering on the gradient filtering value in the vertical direction may be performed by using an ID interpolation filter in a horizontal direction, but alternatively, an interpolation filtering value in the horizontal direction may be generated by first performing filtering on the pixel at an integer position by using the ID interpolation filter in the horizontal direction, and then filtering on the interpolation filtering value in the horizontal direction may be performed by using the ID gradient filter in the vertical direction. Here in the foregoing, the pixel group unit motion compensator 165 that uses a gradient filter and an interpolation filter to determine a gradient value at a fractional pixel position has been described in detail. However, alternatively, a gradient filter and an interpolation filter may be used to determine a gradient value at an integer pixel position. In the case of an integer pixel, a pixel value may be determined without using an interpolation filter, but filtering may be performed on the integer pixel and a neighboring integer pixel by using an interpolation filter for processes consistent with processes at a fractional pixel. For example, an interpolation filter coefficient at an integer pixel may be {0, 0, 64, 0, 0}, and since an interpolation filter coefficient multiplied by the neighboring integer pixel is 0, filtering may be performed only by using a pixel value of a current integer pixel, and as a result, the pixel value of the current integer pixel may be determined identically as a value generated by performing filtering at the current integer pixel and the neighboring integer pixel by using the interpolation filter. Meanwhile, when a scaled filter coefficient is used, the pixel group unit motion compensator 165 may perform filtering on a pixel at an integer position by using an ID gradient filter in a horizontal direction, and then perform descaling at a value at which the filtering is performed. Here, the descaling may include bit shifting to the right by a descaling bit number. The descaling bit number may be determined based on a bit depth of a sample. For example, the descaling bit number may be a value obtained by subtracting 8 from the bit depth of the sample. The pixel group unit motion compensator 165 may perform filtering on a pixel in which a component in a vertical direction is an integer, by using an interpolation filter in the vertical direction, and then perform descaling. Here, the descaling may include bit shifting to the right by a descaling bit number. The descaling bit number may be determined based on a scaling bit number of an interpolation filter ID in the vertical direction, a bit number IVI A / a / ZUZ J / UUUU / 4 scaling of an ID gradient filter in a horizontal direction and the sample bit depth. When the pixel group unit motion compensator 165 only performs right bit shifting by a descaling bit number, a rounding error may occur. Thus, the pixel group unit motion compensator 165 may perform filtering by using an ID interpolation filter, add an offset value to a value on which filtering is performed, and then perform descaling on a value to which the offset value is added. Here, the offset value may be 2Λ(descaling bit number - 1). The inter-forecaster 155 may have the prediction pixel value of the current block by using the motion compensation value in block units and the motion compensation value in pixel group units with respect to the current block. For example, the inter-forecaster 155 may generate the prediction pixel value of the current block by adding the motion compensation value in block units and the motion compensation value in pixel group units with respect to the current block. In particular, when the motion prediction mode of the current block is a two-way motion prediction mode, the inter-forecaster 155 may generate the prediction pixel value of the current block by using the motion compensation value in block units and the motion compensation value in pixel group units with respect to the current block. When the motion prediction mode of the current block is a one-way motion prediction mode, the inter-predictor 155 may generate the prediction pixel value of the current block by using the motion offset value in block units relative to the current block. Here, one-way denotes that a reference picture from among the actually coded pictures is used. The reference picture may be a picture displayed before the current picture, but alternatively, it may be a picture displayed after the current picture. The inter-forecaster 155 may determine the motion prediction mode of the current block, and output information indicating the motion prediction mode of the current block. For example, the inter-forecaster 155 may determine the motion prediction mode of the current block to be a bidirectional motion prediction mode, and output information indicating the bidirectional motion prediction mode. Here, the bidirectional motion prediction mode denotes a mode in which motion is predicted by using reference blocks in MA / a / ZUZ J / UUUU / 4 two decoded reference images. The pixel group unit motion compensator 165 may determine a parameter related to pixel group unit motion compensation and perform pixel group unit motion compensation in the current block based on the parameter related to pixel group unit motion compensation. Here, the parameter related to pixel group unit motion compensation may be obtained from a parameter related to the image that includes the current image.Since processes of the pixel group unit motion compensator 165 that obtains the parameter related to pixel group unit motion compensation from the image-related parameter are the same as processes of the pixel group unit motion compensator 120 that obtains the parameter related to pixel group unit motion compensation from the image-related parameter, descriptions thereof are omitted. Alternatively, the pixel group unit motion compensator 165 may determine the parameter related to the pixel group unit motion compensation while performing the pixel group unit motion compensation, and output the determined parameter related to the pixel group unit motion compensation to the pixel group unit motion compensator 165. IVI A / a / ZUZ J / UUUU / 4 pixel group. The bitstream generator 170 can generate the bitstream including information about the pixel group unit motion compensation. Since processes of the pixel group unit motion compensator 165 that outputs the parameter related to the pixel group unit motion compensation when performing pixel group unit motion compensation in the current block and the bitstream generator 170 that generates the bitstream including information about the parameter related to the pixel group unit motion compensation are the inverse of processes of the getter 105 that obtains the parameter information related to the pixel group unit motion compensation from the bitstream and the pixel group unit motion compensator 170 that determines the parameter related to the pixel group unit motion compensation from theParameter information obtained related to pixel group unit motion compensation and performing pixel group unit motion compensation in the current block, descriptions of which are omitted. The bitstream generator 170 may generate a bitstream including a motion vector indicating the reference block. The bitstream generator 170 may encode the motion vector indicating the reference block, and generate a bitstream including the encoded motion vector. The bitstream generator 170 may encode a differential value of the motion vector indicating the reference block, and generate a bitstream including the encoded differential value of the motion vector. Here, the differential value of the motion vector may denote a difference between the motion vector and a predictor of the motion vector. Here, the differential value of the motion vector may denote a differential value of a motion vector with respect to reference pictures respectively related to prediction directions including an LO direction and an L1 direction.Here, the differential value of the motion vector with respect to the LO direction may denote a differential value of a motion vector indicating a reference picture in a reference picture included in an LO reference picture list, and the differential value of the motion vector with respect to the L1 direction may denote a differential value of a motion vector indicating a reference picture in a reference picture included in the L1 reference picture list. Also, the bitstream generator 170 may generate the bitstream which further includes information indicating the motion prediction mode of the current block. The bitstream generator 170 may encode an index MA / a / ZUZ J / UUUU / 4 of a reference picture indicating the reference picture of the current block from among the previously coded pictures, and generating a bit stream including the coded reference picture index. Here, the reference picture index may denote a reference picture index with respect to each of the prediction directions including an LO address and an L1 address. Here, the reference picture index with respect to the LO address may denote an index indicating a reference picture among pictures included in an LO reference picture list, and the reference picture index with respect to the L1 address may denote an index indicating a reference picture among pictures included in an L1 reference picture list. The video encoding apparatus 150 may include an image encoder (not shown), and the image encoder may include the inter-predictor 155 and the bitstream generator 170. The video encoder will be described later with reference to Figure 1F. Figure ID is a flow chart of a video coding method in accordance with various embodiments. Referring to Figure ID, in operation S150, the video coding apparatus 150 may obtain a prediction block of a current block, a first motion vector, a second motion vector, and a parameter related to pixel group unit motion compensation by performing motion compensation and pixel group unit motion compensation on the current block. In operation S155, the video coding apparatus 150 may generate a bit stream including information about the first and second motion vectors, and motion prediction mode information indicating that a motion prediction mode of the current block is a bidirectional motion prediction mode. Here, the first motion vector may be a motion vector indicating a first reference block of a first reference picture corresponding to the current block in the current picture of the current block, and the second motion vector may be a motion vector indicating a second reference block of a second reference picture corresponding to the current block in the current picture of the current block. The parameter related to the pixel group unit motion compensation of the current block can be obtained from a parameter related to an image that includes the current image, when the pixel group unit motion compensation is performed on the current block. However, a mode is not limited to 100 this, and the parameter related to the pixel group unit motion compensation of the current block may be determined when the pixel group unit motion compensation is performed, and the information about the parameter related to the determined pixel group unit motion compensation may be included in the bit stream. The video coding apparatus 150 may encode a residual block of the current block, the residual signal indicating a difference between a pixel of the prediction block of the current block and an original block of the current block, and generate the bit stream further including the coded residual signal. The video coding apparatus 150 may encode information about a prediction mode of the current block and a reference picture index, and generate the bit stream further including the coded information about the prediction mode and the coded reference picture index.For example, the video encoding apparatus 150 may encode information indicating that the prediction mode of the current block is an inter prediction mode and a reference picture index indicating at least one picture among previously decoded pictures, and generate the bit stream further including the encoded information about the prediction mode and the encoded reference picture index. 101 Figure 1E is a block diagram of an image decoder 600 in accordance with various embodiments. The image decoder 600 according to various embodiments performs operations performed by the image decoder (not shown) of the video decoding apparatus 100 to decode image data. Referring to Figure 1E, an entropy decoder 615 analyzes encoded image data to be decoded, and encoding information required for decoding, from a bit stream 605. The encoded image data is a quantized transform coefficient, and an inverse quantizer 620 and an inverse transformer 625 reconstruct residual data from the quantized transform coefficient. An intra forecaster 640 performs intra prediction on a per-block basis. An inter forecaster 635 performs inter prediction using a reference image obtained from a reconstructed image buffer 630, on a per-block basis. The inter forecaster 635 of Figure 1E may correspond to the inter forecaster 110 of Figure 1A. Data in a spatial domain with respect to a block of a current image 605 may be reconstructed by adding prediction data and the residual data of each block generated by the intra-predictor 640 or the inter-predictor 641. 102 predictor 635, and a deblocking unit 635 and an SAO executor 650 may output a filtered reconstructed image by performing loop filtering on the reconstructed data in the spatial domain. Also, reconstructed images stored in the reconstructed image buffer 630 may be output as a reference image. In order for a decoder (not shown) of the video decoding apparatus 100 to decode image data, step-by-step operations of the image decoder 600 may be performed according to various modes per block. Figure 1F is a block diagram of an image encoder according to various embodiments. An image encoder 700 according to various embodiments performs operations performed by the image encoder (not shown) of the video encoding apparatus 150 to encode image data. In other words, an intra forecaster 720 performs intra prediction per block on a current image 705, and an inter forecaster 715 performs inter prediction by using the current image 705 per block and a reference image obtained from a reconstructed image buffer 710. Here, the inter forecaster 715 of Figure 1E may correspond to the inter forecaster 155 of Figure 1C. 103 Residual data may be generated by subtracting prediction data with respect to each block output of the intra forecaster 720 or the inter forecaster 715 from data with respect to an coded block of the current image 705, and a transformer 725 and a quantizer 730 may output a quantized transform coefficient per block by performing transformation and quantization on the residual data. An inverse quantizer 745 and an inverse transformer 750 may reconstruct residual data in a spatial domain by performing inverse quantization and inverse transformation on the quantized transform coefficient. The reconstructed residual data in the spatial domain may be added to prediction data with respect to each block output of the intra forecaster 740 or the inter forecaster 715 to be reconstructed as spatial domain data with respect to a block of the current image 705.A deblocking unit 755 and an SAO executor 7 60 generate a filtered reconstructed image by performing loop filtering on the reconstructed data in the spatial domain. The generated reconstructed image is stored in the reconstructed image buffer 710. Reconstructed images stored in the reconstructed image buffer 710 may be used as reference images for inter-prediction of another image. An entropy encoder 735 may entropy encode the coefficient of. 104 quantized transformation and the entropy-encoded coefficient can be sent as a 740 bit stream. In order for the image encoder 700 according to various embodiments to be applied to the video encoding apparatus 150, step-by-step operations of the image encoder 700 according to various embodiments may be performed per block. Figure 2 is a reference diagram for describing block-based bidirectional motion prediction and compensation processes, according to a modality. Referring to Figure 2, the video coding apparatus 150 performs bidirectional motion prediction, in which a region most similar to a current block 201 of a current picture 200 to be encoded is searched in a first reference picture 210 and a second reference picture 220. Here, the first reference picture 210 may be a picture before the current picture 200, and the second reference picture 220 may be a picture after the current picture 200. As a result of the bidirectional motion prediction, the video coding apparatus 150 determines a corresponding first region 212 most similar to the current block 201 of the first reference picture 210, and a corresponding second region 222 most similar to the current block 201 of the IVI A / a / ZUZ J / UUUU / 4 105 second reference image 220. Here, the first corresponding region 212 and the second corresponding region 222 may be reference regions of the current block 201. Also, the video coding apparatus 150 may determine a first motion vector MV1 based on a position difference between the first corresponding region 212 and a block 211 of the first reference picture 210 at the same position as the current block 201, and determine a second motion vector MV2 based on a position difference between the second corresponding region 222 and a block 221 of the second reference picture 220 at the same position as the current block 201. The video coding apparatus 120 performs bidirectional block unit motion compensation in the current block 201 by using the first motion vector MV1 and the second motion vector MV2. For example, when a pixel value positioned at (i, j) of the first reference image 210 is PO(i, j), a pixel value positioned at (i, j) of the second reference image 220 is Pl(i, j), MVl=(MVxl, MVyl), and MV2=(MVx2, MVy2), where i and j are each an integer, a block unit bidirectional motion compensation value P_BiPredBlock(i, j) of a pixel at a position (i, j) of the current block 201 may be calculated according to an equation: P_BiPredBlock(i, j)={P0(i+MVxl, j+MVyl)+P1(i+MVx2, 106 j+MVy2)} / 2. As such, the video coding apparatus 150 may generate the motion compensation value in block units by performing motion compensation on the current block 201 in the block unit by using an average value or weighted sums of pixels in the corresponding first and second regions 212 and 222 indicated by the first and second motion vectors MV1 and MV2. Figures 3A to 3C are reference diagrams for describing processes for performing pixel unit motion compensation, in accordance with embodiments. In Figure 3A, a first corresponding region 310 and a second corresponding region 320 respectively correspond to the first corresponding region 212 and the second corresponding region 222 of Figure 2, and may have changed to overlap with a current block 300 by using bidirectional motion vectors MV1 and MV2. Also, P(i,j) denotes a pixel of the current block 300 at a position (i, j) that is bidirectionally predicted, P0(i,j) denotes a first reference pixel value of a first reference image that corresponds to pixel P(i,j) of the current block 300 that is bidirectionally predicted, and Pl(i,j) denotes a second reference pixel value of a second reference image that corresponds to pixel P(i,j) of the current block. 107 300 which is predicted bidirectionally, where each of i and j denotes an integer. In other words, the first reference pixel value P0(i,j) is a pixel value of a pixel corresponding to the pixel P(i,j) of the current block 300 determined by the bidirectional motion vector MV1 indicating the first reference picture, and the second reference pixel value PI(i,j) is a pixel value of a pixel corresponding to the pixel P(i,j) of the current block 300 determined by the bidirectional motion vector MV2 indicating the second reference picture. Also, -+211+21 denotes a gradient value of a first reference pixel in a horizontal direction, <>p\(íj) denotes a gradient value of a second reference pixel in the horizontal direction, and <>Pia.j) denotes a gradient value of the second reference pixel in the vertical direction. Also, To denotes a temporal distance between a current image to which the current block 300 belongs and the first reference image to which the corresponding first region 310 belongs, and Ti denotes a temporal distance between the current image and the second reference image to which the corresponding second region 320 belongs. Here, a temporal distance between images may denote a 108 difference in image order count of images. When there is small uniform motion in a video sequence, a pixel in the first corresponding region 310 of the first reference picture, which is very similar to the pixel P(i,j) in which bidirectional motion compensation is performed in units of pixel group, is not the first reference pixel PO(i,j), but is a first displacement reference pixel PA, in which the first reference pixel PO(i,j) moves by a certain displacement vector. As described above, since there is uniform motion in the video sequence, a pixel in the second corresponding region 320 of the second reference picture, which is very similar to the pixel P(i,j), may be a second displacement reference pixel PB, in which the second reference pixel Pl(i,j) moves by a certain displacement vector. A displacement vector may include a displacement vector Vx in an x-axis direction and a displacement vector Vy in a y-axis direction. Accordingly, the pixel group unit motion compensator 165 calculates the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction included in the displacement vector, and performs motion compensation in pixel group units. 109 pixels when using the displacement vector. An optical flow denotes a pattern of apparent motion in an object or surface, which is induced by relative motion between a scene and an observer (eyes or a video acquiring device such as a camera). In a video sequence, an optical flow can be represented by calculating motion between frames obtained at arbitrary times t and t+At. A pixel value placed at (x, y) in the frame at time t can be I(x,y,t). In other words, I(x,y,t) can be a value that changes temporally and spatially. I(x,y,t) can be differentiated according to Equation 1 with respect to time t. Equation 1 di _ dI dx di dy dI dt dx dt dy dt dt When a pixel value changes according to motion, but does not change according to time with respect to small motion in a block, dl / dt is 0. Also, when motion of a pixel value according to time is uniform, dx / dt can denote the displacement vector Vx of pixel value I(x,y,t) in the x-axis direction, and dy / dt can denote the displacement vector Vy of pixel value I(x,y,t) in the y-axis direction, and therefore, Equation 1 can be expressed as Equation 2. 110 Equation 2 MA / a / ZUZ J / UUUU / 4 Here, the sizes of the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction may be smaller than the pixel precision used in bidirectional motion prediction. For example, when the pixel precision is 1 / 4 or 1 / 16 during bidirectional motion prediction, the sizes of the displacement vectors Vx and Vy may be smaller than 1 / 4 or 1 / 16. The pixel group unit motion compensator 165 calculates the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction according to Equation 2, and performs motion compensation in pixel group units by using the displacement vectors Vx and Vy. In Equation 2, since the pixel value I(x,y,t) is a value of an original signal, high overhead may be induced during coding when the value of the original signal is used. Accordingly, the pixel group unit motion compensator 165 can calculate the displacement vectors Vx and Vy according to Equation 2 by using pixels of the first and second reference images, which are determined as results of performing motion prediction. 111 bidirectional motion compensation in block units. In other words, the pixel group unit motion compensator 165 determines the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction, in which Δ is minimum in a window Qij having a certain size and including neighboring pixels around the pixel P(i,j) in which bidirectional motion compensation is performed. Δ may be 0, but the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction, which satisfy Δ=0 with respect to all pixels in the window Qij, may not exist, and thereby the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction, in which Δ is minimum, are determined. Processes for obtaining the displacement vectors Vx and Vy will be described in detail with reference to FIG. 8A. In order to determine a prediction pixel value of a current pixel, a function P(t) with respect to at can be determined according to Equation 3. Equation 3 P(t) = a3 * t3+ a2 * t2+ al* t + aO Here, an image when t=0 is a current image in which a current block is included. Therefore, the predicted pixel value of the current pixel included in the current block can be defined as a value of P(t) when t 112 is 0 . When the temporal distance between the current image and the first reference image (the first reference image is temporally before the current image) is To and the temporal distance between the current image and the second reference image (the second reference image is temporally after the current image) is Ti, a reference pixel value in the first reference image is equal to P(-To) and a reference pixel value in the second reference image is equal to P(-Ti). Here in the above, for the convenience of calculation, it is assumed that To and Ti are both equal to T. Coefficients of each degree of P(t) can be determined according to Equation 4. Here, PO(i,j) can denote a pixel value at a position (i, j) of the first reference image, and Pl(i,j) can denote a pixel value at a (i, j) of the second reference image. Equation 4 M / a / ZUZ J / UUUU / 4 1 / T / dPO(i,j) a0=- PO(i,j) + Pl(i,j) +- ' ¿\ 2 \ Ot dPl(ij) dt al =;(;(PO(i,j)-Pl(i,j))-^Í>-^^) _ 1 .dPOG.í-j- d-d2 =G. 4τvdt dt ' a3 = ¿(i(P0aj)-Pl(i,j))+^)+^) 113 Consequently, a prediction pixel value ΜΛ / a / ZUZ J / UUUU / 4 P(0) of the current pixel in the current block can be determined in accordance with Equation 5. Equation 5 i( , , , , T / apo(¡,D apiGj) P(0) = aO = aO = - PO(i,j) + Pl(i,j) +- —2---——L 1 2 \ dt dt The Equation 5 can be expressed as Equation 6 considering Equation 2. Equation 6 1 / TVx / dPl(i,j) dPO(i,j)\ TVy / dPUi.j) 5P0(i,j)\\ P(O) = aO = - PO(i,j) + Pl(i,j) + -- —L--_+ — —— d-3 21 2 \ dx dx / 2 \ dy dy / / Therefore, the prediction pixel value of the current pixel can be determined by using the displacement vector Vx, the displacement vector Vy, gradient values of the first reference pixel in the horizontal and vertical directions, and gradient values of the second reference pixel in the horizontal and vertical directions. Here, a portion (PO(i,j)+P1(i,j)) / 2) unrelated to the displacement vectors Vx and Vy may be a motion compensation value in block group units, and a portion related to the displacement vectors Vx and Vy may be a motion compensation value in pixel units. As a result, the prediction pixel value of the current pixel can be determined by adding the motion compensation value in block units and 114 the motion compensation value in pixel group units. Here in the above, processes for determining the prediction pixel value of the current pixel when the temporal distance between the first reference image and the current image and the temporal distance between the second reference image and the current image are both T, and so the same are described for convenience of description, but the temporal distance between the first reference image and the current image may be Tq and the temporal distance between the second reference image and the current image may be Ti. Here, the prediction pixel value P(0) of the current pixel may be determined in accordance with Equation 7. Equation 7 i apo(íj) óPi(ij) P(0) = P0(i, j) + PI (i, j)+- (τ0—-T1 Considering Equation 2, Equation 7 can be expressed as Equation 8. Equation 8 vx / apian apoa,D\ vy / ápi(i,¡) apoa,j)\ p(o) = pog.j) + pi(i,j) + — (u —— _τLí”) + Di (τ_τLí”) x dx dx / 2 x dy dy J Here in the above, the first reference image is displayed temporarily after the current image and the second reference image is displayed IVI A / a / ZUZ J / UUUU / 4 115 temporarily before the current image, but alternatively, the first and second reference images may both be displayed temporarily before the current image, or after the current image. For example, as shown in Figure 3B, the first reference image including the first corresponding region 310 and the second reference image including the second corresponding region 320 may both be displayed temporarily before the current image including a current block 300. In this case, the prediction pixel value P(0) of the current pixel can be determined according to Equation 9, in which Ti indicating the temporal distance between the second reference image and the current image in Equation 8 indicated with reference to Figure 3A is replaced by -Ti. Equation 9 , , , , VXZ áPl(if) (?PO(i,j)\ Vy / aPl(ij) dPO(i,j)\ P(O) = P0(i, j) + p I (i, j) +—(-T1? - T0? + v (-n ? - r0? ) 2 \ dx dx / 2 \ dy dy / For example, as shown in Figure 3C, the first reference image including the first corresponding region 310 and the second reference image including the second corresponding region 320 may both be displayed temporarily after the current image including the current block 300. M / a / ZUZ J / UUUU / 4 116 In this case, the prediction pixel value P(0) of the current pixel can be determined according to Equation 10, in which To indicating the temporal distance between the first reference image and the current image in Equation 8 indicated with reference to Figure 3A is replaced by -To. Equation 10 Vxz api(ij) 3P0(í,j)\ Vyz dPl(ij) 5P0(i,j)\ P(0) = P0(i, j) + P1 (i, j) + — τ, —— + τ0--^) + γη —+ τ» 2 \ dx dx / 2 \ dy dy > However, when the first and second reference pictures are both displayed temporarily before the current picture or after the current picture as shown in Figures 3B and 3C, pixel group unit motion compensation can be performed when the first reference picture and the second reference picture are not the same reference picture. Also, in this case, pixel group unit motion compensation can be performed only when the bidirectional motion vectors MV1 and MV2 both have a non-0 component. Also, in this case, pixel group unit motion compensation can be performed only when a ratio of the motion vectors MV1 and MV2 is the same as a ratio of the temporal distance between the first reference picture and the current picture and the temporal distance between the second reference picture and the current picture. IVI A / a / ZUZ J / UUUU / 4 117 current. For example, unit motion compensation of the pixel group can be performed when a ratio of an x component of the motion vector MV1 and an x component of the motion vector MV2 is the same as a ratio of a y component of the motion vector MV1 and a y component of the motion vector MV2, and is the same as a ratio of the temporal distance To between the first reference image and the current image and the temporal distance Ti between the second reference image and the current image. Figure 4 is a reference diagram for describing processes for calculating gradient values in horizontal and vertical directions, in accordance with a modality. Referring to Figure 4, a gradient value of a first reference pixel PO(i,j) 410 dx of a first reference image in a horizontal direction and a gradient value of the first reference pixel P0(i,j) 410 in a vertical direction may be calculated by obtaining a variation of a pixel value at a neighboring fractional pixel position adjacent to the first reference pixel PO(i,j) 410 in the horizontal direction and a variation of a pixel value at a neighboring fractional pixel position adjacent to the first reference pixel PO(i,j) 410 in the vertical direction. In other words, according to Equation 11, the gradient value 118 of gradient ^'^in the horizontal direction dx can be calculated by calculating a variation of pixel values of a fractional pixel PO(ih,j) 460 and a fractional pixel P0(i+h,j) 470 away from PO(i,j) by h in the horizontal direction, where H is a fraction smaller than 1, and the gradient value θη in the vertical direction can be oy calculated by calculating a variation of pixel values of a fractional pixel P0(i,jh) 480 and a fractional pixel P0(i,j+h) 490 away from PO(i,j) by h in the vertical direction. Equation 11 apo(i,j) _ P0(i + h, j) - P0(i - hj) dx “ 2h apo(ij) _ P0(i, j + h) - P0(i, j - h) dy 2h The pixel values of fractional pixels P0(ih,j) 460, P0(i+h,j) 470, P0(i,jh) 480, and P0(i,j+h) 490 can be calculated by using general interpolation. Also, gradient values of a reference pixel of a second reference image in horizontal and vertical directions can be calculated similarly to Equation 11. In accordance with one embodiment, instead of calculating a gradient value by calculating a variation of pixel values at fractional pixel positions as in Equation 11, a gradient value at a reference pixel may be calculated by using a certain filter. A filter coefficient of a certain filter may be determined with MA / a / ZUZ J / UUUU / 4 119 based on a coefficient of an interpolation filter used to obtain a pixel value at a fractional pixel position that considers the linearity of a filter. Figure 5 is a reference diagram for describing processes for calculating gradient values in horizontal and vertical directions, in accordance with another modality. According to another embodiment, a gradient value may be determined by applying a certain filter to pixels of a reference image. Referring to Figure 5, the video decoding apparatus 100 may calculate a gradient value of a reference pixel P0 500 in a horizontal direction by applying a certain filter to MWax left pixels 520 and |MMinl right pixels 510 based on the reference pixel P0 500 from which a current horizontal gradient value is to be obtained. A filter coefficient used here may be determined in accordance with a value α indicating an interpolation position (fractional pixel position) between MMax and MMin integer pixels used to determine a window size, as shown in Figure 7A to 7B. For example, referring to Figure 7A, when μιπ and MMax for determining a window size are respectively -2 and 3, and are 500 by 1 / 4 away from the reference pixel P0, i.e., a=l / 4, coefficient filters {4, 120 17. -36. 60, -15, 4} in a second row of Figure 7A are applied to neighboring pixels P-2, P-i, Po, Pi, P2 and P3. In this case, a gradient value of q reference pixel PO dx 500 in the horizontal direction can be calculated through a weighted sum using a filter coefficient and a neighboring pixel, such as an equation; 4*P-2 - 17*Pi + ax 6*Po+6O*Pi-15*P2+4*P3 + 32>>6. Similarly, a gradient value in a vertical direction can also be calculated by applying the filter coefficients shown in Figures 7A through 7E to neighboring pixels according to an interpolation position, and MWin and MMax to determine a window size. Figures 6A and 6B are diagrams for describing processes for determining gradient values in horizontal and vertical directions when using ID filters, in accordance with embodiments. Referring to Figure 6A, filtering may be performed by using a plurality of ID filters with respect to an integer pixel to determine a gradient value of a reference pixel in a horizontal direction in a reference image. Motion compensation in pixel group units is additional motion compensation performed after motion compensation in block units. Accordingly, a reference block reference position of a reference block 121 current indicated by a motion vector during motion compensation in block units of being a fractional pixel position, and motion compensation in pixel group units can be performed with respect to reference pixels in a reference block at a fractional pixel position. Accordingly, filtering can be performed by considering that a gradient value of a pixel is determined at a fractional pixel position. Referring to Figure 6A, first, the video decoding apparatus 100 may perform filtering on pixels positioned in a horizontal or vertical direction of an integer pixel neighboring a reference pixel in a reference image, by using a first ID filter. Similarly, the video decoding apparatus 100 may perform filtering on adjacent integer pixels in a different row or column from the reference pixel, by using the first ID filter. The video decoding apparatus 100 may generate a gradient value of the reference pixel in the horizontal direction by performing filtering on values generated through filtering, by using a second ID filter. For example, when a reference pixel position is a fractional pixel position in (x+a, y+β) , where x and y are each integers and y and β are IVI A / a / ZUZ J / UUUU / 4 122 each a fraction, the filtering can be performed according to Equation 12 by using a vertical interpolation filter ID with respect to integer pixels (x,y), (xl,y), (x+1, y), through (x+MMin,y) and (x+MMax,y) in a horizontal direction, where MMin and MMax are each an integer. Equation 12 ('=j+Mmax \ fracFilterp [j']I [i, j'] + displacement! j » changei j*=j+Mmjn / Here, fracFilterp may denote an interpolation filter for determining a pixel value at a fractional pixel position β in a vertical direction, and fracFilterp[j' ] may denote a coefficient of an interpolation filter applied to a pixel at a position (i,j' ). I[i,j'] may denote a pixel value at position (i,j') . In other words, the first filter ID may be an interpolation filter to determine a fractional pixel value in a vertical direction, offseti may denote a shift to prevent a round-off error, and shifti may denote a number of downscaling bits. Temp[i,j'+p] may denote pixel value at a fractional pixel position (i,j+3). Temp[i,j'+3] may also be determined according to Equation 12 by replacing y by i' , where i' is an integer from i+MMin to i+Mnax M / a / ZUZ J / UUUU / 4 123 which excludes i. Then, the video decoding apparatus 100 may perform filtering on a pixel value at a fractional pixel position (i, j+P) and the pixel value at a fractional pixel position (i / , j+β) by using a second ID filter. Equation 13 (i / ==i+Mmax\ and gradFilter[i']I[i', j + β] + displacement2I » change2i=i+Mm¡n / Here, gradFiltera can be a gradient filter for determining a gradient value at a fractional pixel position a in a horizontal direction. gradFiltera[i' ] can denote a coefficient of an interpolation filter applied to a pixel at position (i,,j+β). In other words, the second filter ID can be a gradient filter for determining a gradient value in a horizontal direction. shiftz can denote an offset to prevent a rounding error, and shift2 can denote a number of descaling bits. In other words, according to the Equation 13, the video decoding apparatus 100 may di , determine a gradient value -q—[i+oy+β] in a horizontal ox direction at (ί+α^ + β) by performing filtering on a pixel value Temp[i,j+β] at a pixel position (i,j + β) and a pixel value (Temp[i',j+β]) positioned in a vertical direction of MA / a / ZUZ J / UUUU / 4 124 the pixel position (ί^ + β), when using the gradient filter gradFiltera. Hereinbefore, a gradient value in a horizontal direction is determined by first applying an interpolation filter and then applying a gradient filter, but alternatively, the gradient value in the horizontal direction may be determined by first applying the gradient filter and then applying the interpolation filter. Hereinafter, an embodiment will be described for determining a gradient value in a horizontal direction by applying a gradient filter and then an interpolation filter. For example, when a reference pixel position is a fractional pixel position in (x+a, y+β) , where x and y are each an integer and a and β are each a fraction, filtering may be performed according to Equation 14 by using the first ID filter, with respect to integer pixels (x,y), (xl,y), (x+1, y), to (x+MMin,y) and (x+MMax,y) in a horizontal direction, where MMin and MMin are each integer. Equation 14 (i' = i + Mmax\ gradFiltera[i']I[i',j] + displacement3j »ianib¡(>3 Here, gradFiltera can denote a gradient filter to determine a gradient value in a IVI A / a / ZUZ J / UUUU / 4 125 fractional pixel position a in a horizontal direction, and gradFiltera[ i' ] may denote a coefficient of a gradient filter applied to a pixel at position (i',j). I[i,j'] may denote a pixel value at position (i',j) . In other words, the first ID filter may be an interpolation filter for determining a gradient value of a pixel in a horizontal direction, where a horizontal component of a pixel position is a fractional position. shifts may denote a displacement to prevent a rounding error, and shifts ML / a / ZUZ J / UUUU / 4 can denote a bit number of the downscaling. Temp[i+a,j] can denote a gradient value at a pixel position (i+a,j) in the horizontal direction. Temp[i+a,j] can also be determined according to Equation 14 by replacing j by j', where j' is an integer from j+MMin to j+MMax excluding j. Then, the video decoding apparatus 100 may perform filtering on a gradient value at a pixel position (i+a,j) in the horizontal direction and a gradient value at a pixel position (i+a,j') in the horizontal direction by using the second ID filter, according to Equation 15. Equation 15 ()'=i +Mmax \ iy fracFilter [i']Temp[i + a, j']+ <l«plazamiento4I »cambio Z—i / 126 Here, fracFilterp may be an interpolation filter for determining a pixel value at a fractional pixel position β in a vertical direction, fracFilterp[j' ] may denote a coefficient of an interpolation filter applied to a pixel at a position (ί + β^ζ). In other words, the second filter ID may be an interpolation filter for determining a pixel value at a fractional pixel position beta in a vertical direction. shiftO4 may denote an offset to prevent a rounding error, and shift4 may denote a number of descaling bits. In other words, according to the Equation 15, the video decoding apparatus 100 may determine a gradient value [i+aj+β] in a horizontal X direction at (i+a,j+3) by performing filtering on a gradient value (Temp[i+oi, j]) at a pixel position (i+a,j) in a horizontal direction and a gradient value (Temp[i+ci, j']) of pixels in a horizontal direction positioned in a vertical direction from the pixel position (i+a,j), by using the gradient filter fracFilterp. Referring to Figure 6B, filtering may be performed by using a plurality of ID filters with respect to an integer pixel to determine a gradient value of a reference pixel in a vertical direction in a reference image. MA / a / ZUZ J / UUUU / 4 127 Motion compensation in pixel units is additional motion compensation performed after motion compensation in block units. Accordingly, a reference position of reference blocks of a current block indicated by a motion vector during motion compensation in block units may be a fractional pixel position, and motion compensation in pixel units may be performed with respect to reference pixels in a reference block at a fractional pixel position. Accordingly, filtering may be performed by considering that a gradient value of a pixel is determined at a fractional pixel position. Referring to Figure 6B, first, the video decoding apparatus 100 may perform filtering on pixels positioned in a horizontal or vertical direction from an integer pixel neighboring a reference pixel in a reference image, by using a first ID filter. Similarly, the video decoding apparatus 100 may perform filtering on adjacent integer pixels in a different row or column from the reference pixel, by using the first ID filter. The video decoding apparatus 100 may generate a reference pixel gradient value in the vertical direction by performing filtering on values generated through filtering, by using a second ID filter. MA / a / ZUZ J / UUUU / 4 128 For example, when a reference pixel position is a fractional pixel position in (x+1, y+β), where x and y are each integers and y and β are each fractions, filtering can be performed according to Equation 16 by using the first ID filter with respect to integer pixels (x,y), (xl,yl), (x+1, y+1) to (χ+Mμιπ, y+MMin) and (χ+Mwax, y+MMax) in one direction. IVI A / a / ZUZ J / UUUU / 4 horizontal, where Mμιπ and Mwax are each an integer. Equation 16 (i = i+Mmax\ fracFiltera[i']I[¡\j] + displacementsj »change5 i / =i+Mmjn / Here, fracFiltera can denote an interpolation filter for determining a pixel value at a fractional pixel position a in a horizontal direction, and fracFiltera[i' ] can denote a coefficient of an interpolation filter applied to a pixel at a position (i'j) . I [i',j] can denote a pixel value at position (i'j). In other words, the first ID filter can be an interpolation filter to determine a pixel value at a fractional pixel position a in a horizontal direction. The offset can denote a shift to prevent a rounding error, and the shift can denote a descaling bit number. Temp[i+a,j] can denote pixel value at a fractional pixel position (i+ot,j). Temp[i+a,j'] can also 129 can be determined according to Equation 16 by replacing j by j', where j' is an integer of j+MMin VI A / a / ZUZ J / UUUU / 4 a j+Mwax which excludes j . Then, the video decoding apparatus 100 may perform filtering on a pixel value at a pixel position (i+a,j) and a pixel value at a pixel position (i+a,j') according to Equation 17, by using a second ID filter. Equation 17 (j=j + Mmax\ Vi and gradFilterp [j ]Temp[i + a, j'] -(-displacement6I » tatnbiOg )'=j + Mm¡n / Here, gradFilterp may be a gradient filter for determining a gradient value at a fractional pixel position β in a vertical direction. gradFilterp[j' ] may denote a coefficient of an interpolation filter applied to a pixel at a position (i+a,j'). In other words, the second filter ID may be a gradient filter for determining a gradient value in a vertical direction at a fractional pixel position β. offsetO6 may denote an offset to prevent a rounding error, and shifts may denote a descaling bit number. In other words, according to Equation 17, the video decoding apparatus 100 can determine a gradient value, | / +a.y+p| in a direction 130 vertical at (i+a,j+P) by performing filtering on a pixel value (Temp[i+α,j]) at a pixel position (i+a,j) and a pixel value (Temp[i+α, j' ]) placed in a vertical direction from the pixel position (i+α,j), by using the gradient filter gradFilterg. Hereinbefore, a gradient value in a vertical direction is determined by first applying an interpolation filter and then applying a gradient filter, but alternatively, the gradient value in the vertical direction may be determined by first applying the gradient filter and then applying the interpolation filter. Hereinafter, an embodiment will be described for determining a gradient value in a vertical direction by applying a gradient filter and then an interpolation filter. For example, when a reference pixel position is a fractional pixel position in (x+a, y+β) , where x and y are each an integer and β and β are each a fraction, filtering can be performed according to Equation 18 by using the first ID filter, with respect to integer pixels (x,y), (x,yl), (x, y+1) to (x, y+MMin) and (x, y+Mmax) in a vertical direction, where Mwin and Μμπβχ are each an integer. Equation 18 Cl'* Í+Mmax\ gradFilterg [j']I[í, j'] + displacement 7 ) »change«7 j=j + Mmjn / M / a / ZUZ J / UUUU / 4 131 Here, gradFilterp may denote a gradient filter for determining a gradient value at a fractional pixel position β in a vertical direction, and gradFilterp[ j' ] may denote a coefficient of a gradient filter applied to a pixel at a position (i'j). I[i, j'] may denote a pixel value at position d' j ' ). In other words, the first ID filter may be an interpolation filter for determining a gradient value of a pixel in a vertical direction, where a vertical component of a pixel position is a fractional pixel, offset? may denote a shift to prevent a rounding error, and shift? may denote a descaling bit number. Temp[i,j+β] can denote a gradient value at a pixel position (ί^ + β) in the vertical direction. Temp[i,,j+β] can also be determined according to Equation 18 by replacing i by i' where i' is an integer from i+Mmin to i+Mmax excluding y. Then, the video decoding apparatus 100 may perform filtering on a gradient value at a pixel position (i, j+β) in the vertical direction and a gradient value at a pixel position (ί'^ + β) in the vertical direction by using the second ID filter, of IVI A / a / ZUZ J / UUUU / 4 accordance with Equation 19. 132 Equation 19 (i'=i + Mmax\ i / fracFilter[i']Temp[i', j + β] + shift51 »shift8i —> + Mmin / Here, fracFiltera can be an interpolation filter for determining a pixel value at a fractional pixel position a in a horizontal direction. fracFiltera[i'] can denote a coefficient of an interpolation filter applied to a pixel at a position (i',j+β). In other words, the second filter ID can be an interpolation filter for determining a pixel value at a fractional pixel position a in a horizontal direction, shifts can denote a shift to prevent a rounding error, and changes can denote a descaling bit number. In other words, according to Equation 19, the video decoding apparatus 100 may determine a gradient value -^[ / +oy+p] in a vertical oy direction at (ί+α^ + β) by performing filtering on a gradient value Temp[i,j+p] at a pixel position (i, j + β) in a vertical direction and a gradient value (Temp[i',j+β)]) of pixels in a vertical direction positioned in a horizontal direction of the pixel position (i,j+β) by using the gradient filter fracFiltera. According to one embodiment, in the video decoding apparatus 100, gradient values in IVI A / a / ZUZ J / UUUU / 4 133 horizontal and vertical directions in (i+a,j+P) may be determined in accordance with combinations of several filters described above. For example, in order to determine a gradient value in a horizontal direction, an interpolation filter for determining a pixel value in a vertical direction may be used as a first ID filter and a gradient filter for determining a gradient value in a horizontal direction may be used as a second ID filter. Alternatively, the gradient filter for determining a gradient value in a vertical direction may be used as a first ID filter, and an interpolation filter for determining a pixel value in a horizontal direction may be used as a second ID filter. Figures 7A to 7E are tables showing filter coefficients of filters used to determine a pixel value at a fractional pixel position of a fractional pixel unit, and gradient values in horizontal and vertical directions, in accordance with embodiments. Figures 7A and 7B are tables showing filter coefficients of filters for determining a gradient value at a fractional pixel position in units of 1 / 4 pixels, in a horizontal or vertical direction. As described above, an ID gradient filter and an ID interpolation filter can be used 134 to determine a gradient value in a horizontal or vertical direction. Referring to Figure 7A, filter coefficients of an ID gradient filter are illustrated. Here, a 6-tap filter may be used as the ID gradient filter. The filter coefficients of the ID gradient filter may be coefficients scaled by 2Λ4. Mmin denotes a difference between a center integer pixel position and a position of a furthest among integer pixels in a negative direction applied to a filter based on the center integer pixel, and Mmax denotes a difference between the position of the center integer pixel and a position of a furthest among integer pixels in a positive direction applied to the filter based on the center integer pixel.For example, gradient filter coefficients for obtaining a gradient value of a pixel in a horizontal direction, in which a fractional pixel position a is 1 / 4 in the horizontal direction, may be {4, -17, -36, 60, -15, -4}. Gradient filter coefficients for obtaining a gradient value of a pixel in the horizontal direction, in which a fractional pixel position a is 0, 1 / 2, or 3 / 4 in the horizontal direction, may also be determined by referring to Figure 7A. M / a / ZUZ J / UUUU / 4 Referring to Figure 7B, it is illustrated 135 filter coefficients of an ID interpolation filter. Here, a 6-tap filter can be used as the ID interpolation filter. The filter coefficients of the ID interpolation filter can be coefficients scaled by 2Λ6. Mmin denotes a difference between a center integer pixel position and a position of a furthest among integer pixels in a negative direction applied to a filter based on the center integer pixel, and Mmax denotes a difference between the position of the center integer pixel and a position of a furthest among integer pixels in a positive direction applied to the filter based on the center integer pixel. Figure 7C is a table showing filter coefficients of an ID interpolation filter used to determine a pixel value at a fractional pixel position in units of 1 / 4 pixel. As described above, two same ID interpolation filters can be used in horizontal and vertical directions to determine a pixel value at a fractional pixel position. Referring to Figure 1C, filter coefficients of an ID interpolation filter are illustrated. Here, a 6-tap filter can be used as the ID interpolation filter. The filter coefficients of the MA / a / ZUZ J / UUUU / 4 136 ID interpolation coefficients can be scaled by 2Λ6. Mmin denotes a difference between a center integer pixel position and a position of a furthest among integer pixels in a negative direction applied to a filter based on the center integer pixel, and Mmax denotes a difference between the center integer pixel position and a position of a furthest among integer pixels in a positive direction applied to the filter based on the center integer pixel. Figure 7D is a table showing filter coefficients of filters used to determine a gradient value in a horizontal or vertical direction at a fractional pixel position of 1 / 6 pixel units. As described above, the ID gradient filter and ID interpolation filter can be used to determine a gradient value in either a horizontal or vertical direction. Referring to Figure 7D, filter coefficients of an ID gradient filter are illustrated. Here, a 6-tap filter can be used as the ID gradient filter. The filter coefficients of the ID gradient filter (can be coefficients scaled by 2Λ4. For example, gradient filter coefficients to obtain a gradient value of a pixel in a horizontal direction, in which a fractional pixel position a is 1 / 16 in the 137 horizontal direction, may be {8, -32, -13, 50, -18, 5}. Gradient filter coefficients for obtaining a gradient value of a pixel in the horizontal direction, in which a fractional pixel position a is 0, 1 / 8, 3 / 16, 1 / 4, 5 / 16, 3 / 8, 7 / 16, or 1 / 12 in the horizontal direction, may also be determined by referring to Figure 7D. Meanwhile, gradient filter coefficients for obtaining a gradient value of a pixel in the horizontal direction, in which a fractional pixel position a is 9 / 16, 5 / 8, 11 / 16, 3 / 4, 13 / 16, 7 / 8, or 15 / 16 in the horizontal direction, may be determined by using symmetry of filter coefficients based on a=l / 2. In other words, filter coefficients at right fractional pixel positions based on a=l / 2 can be determined by using filter coefficients at left fractional pixel positions based on 0(=1 / 2 shown in Figure 7D.For example, the filter coefficients at a=15 / 16 can be determined by using filter coefficients {8, -32, -13, 50, -18, 5} at 0(=1 / 16, which is position symmetric based on a=1 / 2. In other words, filter coefficients at a=15 / 16 can be determined to be {5, -18, 50, -13, -32, 8} by arranging {8, -32, -13, 50, -18, 5} in a reverse order. Referring to Figure 7E, filter coefficients of an ID interpolation filter are illustrated. Here, a 6-tap filter can be used as the filter 138 ID interpolation. The filter coefficients of the ID interpolation filter may be coefficients scaled by 2Λ6. For example, ID interpolation filter coefficients for obtaining a pixel value and a pixel in a horizontal direction, in which a fractional pixel position ot is 1 / 16 in the horizontal direction, may be {1, -3, 64, 4, -2, 0}. Interpolation filter coefficients for obtaining a pixel value of a pixel in the horizontal direction, in which a fractional pixel position a is 0, 1 / 8, 3 / 16, 1 / 4, 5 / 16, 3 / 8, 7 / 16, or 1 / 2 in the horizontal direction, may also be determined by referring to Figure 7E. Meanwhile, interpolation filter coefficients to obtain a pixel value of a pixel in a horizontal direction, in which a fractional pixel position a is 9 / 16, 5 / 8, 11 / 16, 3 / 4, 13 / 16, 4 / 8, or 15 / 16 in the horizontal direction, can be determined by using symmetry of filter coefficients based on a=l / 2.In other words, filter coefficients at right fractional pixel positions based on 0(=1 / 2 can be determined by using filter coefficients at left fractional pixel positions based on 0(=1 / 2 shown in Figure 7E. For example, filter coefficients at a=15 / 16 can be determined by using filter coefficients {1, -3, 64, 4, 2, 0} at a=1 / 16, which is a symmetric position based on a=1 / 2. In other words, filter coefficients at a=15 / 16. M / a / ZUZ J / UUUU / 4 139 can be determined to be {0, -2, 4-, 64, -3, 1} by arranging {1, -3, 64, 4, -2, 0} in a reverse order. Figure 8A is a reference diagram for describing processes for determining a horizontal direction displacement vector and a vertical direction displacement vector with respect to a pixel, in accordance with an embodiment. Referring to Figure 8A, a window Qij 800 having a certain size has a size of (2M+1)*(2N+1) based on a pixel P(i,j) that is bidirectionally predicted from a current block, where M and N are each an integer. When P(i',j') denotes a pixel of a current bidirectionally predicted block in window Qij 800, where, when iM^i'^i+M and j-NDj' <j+N, (i',j')GQij, PO(i',j') denota un valor de pixel de un primer pixel de referencia de una primera imagen de referencia 810 que corresponde al pixel Ρ(ί',^) del bloque actual previsto bidireccionalmente, Pl(i',j') denota un valor de pixel de un segundo pixel de referencia de una segunda imagen de referencia 820 que corresponde al pixel P(i',j') del bloque actual previsto bidireccionalmente, V / denota un valor de gradiente del οχ primer pixel de referencia en una dirección horizontal, denota un valor de gradiente del primer pixel de referencia en una dirección vertical, 71 denota un valor de gradiente ox 140 of the second reference pixel in the horizontal direction, and dPKi'J') denotes a gradient value of the second reference pixel in the vertical direction, a corresponding first pixel offset PA' and a corresponding second pixel offset PB' can be determined according to Equation 20. Here, PA' and PB' can be determined by using a first linear expansion term of M / a / ZUZ J / UUUU / 4 Local Taylor. Equation 20 PA' = P0(i', j') — τθ » Vx dPO(i'.j')n irapoci'.j') ------τθ * Vy-------dx dy Pl(i'.j') dPl(i'.f) áx In the Equation 20 a displacement vector Vx in an xy-axis direction and a displacement vector Vy in a y-axis direction can change in accordance with a pixel position i.e. they depend on the displacement vectors Vx and Vy can be expressed as Vx(i, j) and Vy(i, j) . A difference value Ai'j' between the first corresponding pixel of displacement PA' and the second corresponding pixel of displacement PB' can be determined according to Equation 21. Equation 21 3P0(i',j') áPO(i',j') dPl(i'.j') Ai'j' = (PO(i'.j')-TO . Vx---——-τθ « Vy---—— - (Pl(i', j') - τΐ · Vx---—— αχ ay ax ,, 51(i',j') * Vy—t-dy dPOGTf) dx dy / apo(i'.j') dPl(i',j')\ PO(i',j ) - Pl(i',j') - Vx τθ .------— + τΐ »------— - Vy(iO \ ax ax / 141 The displacement vector Vx in the direction of MA / a / ZUZ J / UUUU / 4 xy-axis the displacement vector Vy in the y-axis direction, which minimizes the difference value Ai'j' between the first corresponding pixel of displacement PA' and the second corresponding pixel of displacement PB', can be determined by using the sum of squares Φ(νχ,νγ) of the difference value Ai'j' as in Equation 22. Equation 22 *(Vx,Vy)= £ Δ2ιγí'je n¡ j = £ ( PO(i'.j') - Pl(i'.j') - VxG.O θο. ijenii apod'.j'j dx apiGÚl' dx -Vy(ij) τθ 5y Vx one In other words, and Vy can be determined local minimum value of the displacement vectors by using a local maximum value or ®(Vx,Vy). ®(Vx,Vy) denotes a function using displacement vectors Vx and Vy as parameters, and the local maximum or local minimum value can be determined by calculating a value that becomes 0 by partially differentiating ®(Vx,Vy) arranged for TVx and TVy with respect to TVx and TVy in accordance with Equation 23. Hereinafter, for the convenience of calculation, TO and Ti are both the same, i.e., both T. Equation 23 Φ(νχ, Vy) = (rVx)2sl + 2(rVx)(TVy)s2 + (TVy)2s5 — 2(tVx)s3 — 2(rVy)s6 + (PO(i'tf) — PIG'.j'))2 Two linear equations using Vx(i,j) and Vy(i,j) as variables like Equation 24 can be obtained by using a 142 equation: όΦ(Ιχ,Ι>) =q yunaequation:=Q. ff tl'x o that Equation 24 tVx * if + TVy(i, j) * s2 = s3 tVx » s4 + fVy(i, j) * s5 = s6 In Equation 24, if a s6 can be calculated in accordance with Equation 25. ΜΛ / a / ZUZ J / UUUU / 4 Equation 25 y ρρθ(ί.ί') api(¡ x2 SZj \ dx dx I í.ien¡j s2 = s4 = Y / £Ρο(^+£Ρΐ^ν£Μ(όΠ^ \ dx dx dy dy / ij'enii V r· \ Í· \ dPl(i,j')\ S3 = - Y i .i enijs5_ y P££(m9+££10j0)2x—t \ dy dy / ijenij Σ / xr· \ / ^P°(>J') dPl(i,j')\<p°(0i )-PiO> ¡ + i ,i friend On solving a simultaneous equation of Eq 24, values of Vx(i,j) and Vy(i,j) can be obtained according to T*Vx(i,j)=-detl / det and T*Vy(i,j)=-det2 / det based on Kramer formulas. Here, detl=s3*s5-s2*s6, det2=sl*s6-s3*s4, and det=sl*s5-s2*s2. By minimizing first in a horizontal direction and then in a vertical direction, simplified solutions to the above equations can be determined. In other words, when only one displacement vector changes in a horizontal direction, Vy = 0 in the first equation of Equation 24, and thus an equation: TVx = s3 / sl can be determined. Then, an equation can be determined: TVy=(s6 143 TVx*S2) / s5 when the second equation of Equation 24 is set up using an equation: TVx=s3 / sl. Here, the gradient values Spoó VO , oPWJ)f¿pu / .j') dλ dy dx and 3piy. / ) can be scaled without changing result values oy Vx(i,j) and Vy(i, j) . However, it is assumed that no overflow occurs and no round-off error is generated. Regularization parameters r and m can be introduced to prevent division by 0 or a very small value while calculating Vx(i,j) and Vy(i,j). For convenience, Vx(i,j) and Vy(i,j) are considered to be opposite to directions shown in Figure 3A. For example, Vx(i,j) and Vy(i,j) derived by Equation 24 based on the directions of Vx(i,j) and Vy(i,j) in Figure 3A may have the same size as Vx(i,j) and Vy(i,j) determined to be opposite to the directions in Figure 3A, except for a sign. The corresponding first pixel of displacement PA' and the corresponding second pixel of displacement PB' can be determined according to Equation 26. Here, the corresponding first pixel of displacement PA' and the corresponding second pixel of displacement PB' can be determined by using a first linear local Taylor expansion term. Mol / azuz J / UUUU / 4 Equation 26 dPOG'.j') dPO(i'.j') PA' = P0(i', j') + τθ » Vx---+ τ0« Vy--dPl(i'.j') áPl(i'.j') PB' = Pl(i,j ) - Ti *Vx---L-^-τΙ * W--^p^ 144 A value of difference Ai'j between the first pixel NCNG The corresponding CC cc of offset PA' and the second pixel corresponding offset PB' can be determined in accordance with Equation 27. Equation 27 dPO(i'.j') aPOG'.j) 3Pl(i',j') Δί j = (P0(i', j') + τ() · Vx--------+ tO . Vy---—— - Pl(i'.j') - rl · Vx---— - τΐ σχ- oy σχ „ api(>V',j-j') • apiCí.jQX Δί j = (PO(i'.j') - Pl(i'.i') + Vx(τθ ·---+ 11'---jy^l* Vy(T0 apo(i·, f) The displacement vector Vx in áPl(i'.j') + U--í--the x-axis direction and the displacement vector Vy in the y-axis direction, which minimize the difference value Ai'j' between the first properly displaced pixel PA' and the second properly displaced pixel PB', can be determined by using a sum of squares ®(Vx,Vy) of a difference value Δ as in Equation 28. In other words, the displacement vectors Vx and Vy when ®(Vx,Vy) is minimum as in Equation 29 can be determined, and they can be determined by using a local maximum value or a local minimum value of ®(Vx,Vy). Equation 28 Φ(7χ, Vy) = £ Δ^γ [Equation 29] (Vx,Vy) argimvx,vy$ (Vx, Vy) ®(Vx,Vy) is a function that uses the vectors of 145 displacement Vx and Vy as parameters, and the local maximum value or the local minimum value can be determined by calculating a value that becomes 0 by partially differentiating Φ(Vx,Vy) with respect to the displacement vectors Vx and Vy as in Equation 30. Equation 30 or*(Vx,Vy)_ 30(Vx,Vy)_ 4(Vx) -0;d(Vy) “0 In other words, the displacement vectors Vx and Vy that minimize O(Vx,Vy) can be determined. In order to solve optimization problems, minimization can be performed first in a vertical direction and then in a horizontal direction. Following minimization, the displacement vector Vx can be determined according to Equation 31. [Equation 31 Vx= (sl + r) > m? clip3(-thBIO,thBIO,; 0 Here, a function clip3(x, y, z) is a function that outputs x when z<x, envía y cuando z> y, and sends z when x <z<y. De conformidad con la Ecuación 31, cuando sl+r> m, the displacement vector Vx can be clip3(-thBIO,thBIO,s3 / (sl+r)), and when it is not sl+r>m, the displacement vector Vx can be 0. According to the minimization, the displacement vector Vy can be determined according to Equation 32. M / a / ZUZ J / UUUU / 4 146 Equation 32 MA / a / ZUZ J / UUUU / 4 Vy= (s5 + r) > m? clip3(-thBIO,thBIO,-: 0 Here, a function clip3(x, y, z) is a function that outputs x when z<x, envía y cuando z> y, and sends z when x <z<y. De conformidad con la Ecuación 32, cuando s5+r> m, the displacement vector Vy can be clip3(-thBIO,thBIO, (s6-Vx*s2) / 2 / (s5+r), and when it is not s5+r>m, the displacement vector Vy can be 0. Here, if, s2, s3, and s5 can be determined according to Equation 33. Equation 33. V (η3Ρ0('·>') , . si = > ΙτΟ--------+ τΐ-------\ dx dx / , V (ndp°('O . áPi(i',j')W apo(i'.j') api(ij')' · \ dx dx / \ dy dy • jenij Σ, . .. , . ( dPOÍi'.j') dPl(i,j')\ (Pl(i,j ) - P0(i,j))(τθ —A—L+τΐJ i.jgnij c V / Ι / ΡΟθ''') *P1(Ú')V s5 = > rO--------+ rl---- I Z-. \ 3y áy / • j enij Σ. , / ·, / dPO(i,f) dPl(i,jj\ (P1 (, i) - po(¡ , i)) (το —¿22 + τΐ i.jenij As described above, r and m may be regularization parameters introduced to avoid a split result value that is 0 or smaller and determined according to Equation 34 based on an internal bit depth d of an input video. In other words, the regularization parameter m is a minimum allowable denominator and the regularization parameter r may be a regularization parameter introduced to 147 avoid division by using 0 as a denominator when a gradient value is 0. Equation 34 r = 500 * 4d~8m = 700 * 4d8The displacement vectors Vx and Vy can be given an upper and a lower bound of ithBIO. The displacement vectors Vx and Vy can be held to a certain threshold value thBIO since there may be cases where motion compensation in pixel group units may not be reliable due to noise or regular motion. The regularization parameter thBIO can be determined based on whether the directions of all reference images are the same. For example, when the directions of all reference images are the same, the regularization parameter thBIO can be determined to be 12A(d-8-l) or 12*2A(14-d). When the directions of all reference images are different, thBIO can be determined to be 12A(d-8-l) / 2 or 12*2A(13-d). However, one embodiment is not limited to this, and values of the regularization parameters r, m, and thBIO can be determined based on information about regularization parameters obtained from a bitstream. Here, the information about regularization parameters can be included in a high-level syntax carrier in IVI A / a / ZUZ J / UUUU / 4 148 a segment header, a set of image parameters, a set of sequence parameters, or in various other forms. Also, the regularization parameters r, m, and thBIO may be determined based on a parameter related to an image. For example, the regularization parameters r, m, and thBIO may be determined based on at least one of a bit depth of a sample, a GOP size, a distance from a reference image, a motion vector, an index of a reference image, availability of bidirectional prediction of different temporal directions, a frame rate, and a configuration parameter related to an coding prediction structure. For example, the regularization parameter can be determined based on the GOP size. For example, when the GOP size is 8 and the coding prediction structure is random access, thBIO can be 12 / '(d-8-l). When the GOP size is 16, which is twice 8, thBIO can be determined to be 2*2Λ(d-8-1). Also, the video decoding apparatus 100 may determine the regularization parameter based on the distance from the reference image. Here, the distance from the reference image may denote a POC difference between the current image and the reference image. For example, 149 For example, thBIO can be determined to be small when the distance to the reference image is small, and thBIO can be determined to be large when the distance to the reference image is large. The video decoding apparatus 100 may determine the regularization parameter based on the motion vector of the block. For example, when the size of the motion vector of the block is small, thBIO may be determined to be small, and when the size of the motion vector of the block is large, thBIO may be determined to be large. Also, for example, when an angle of the motion vector of the block is close to 0 and thus only has a horizontal component (generally, a horizontal component is larger than a vertical component), thBIO with respect to a vertical displacement vector may be determined to be small, and thBIO with respect to a horizontal displacement vector may be determined to be large. The video decoding apparatus 100 may determine the regularization parameter based on the reference picture index. The reference picture index may indicate a picture located closer to the current picture when a value thereof is small. Accordingly, when the reference picture index is small, thBIO may be determined to be small, and when 150 the reference image index is large, thBIO can be determined to be large. Also, the regularization parameter may be determined in accordance with the availability of temporally different bidirectional prediction. For example, thBIOdiff when temporally different bidirectional prediction is available may be larger than thBIOsame when temporally equal bidirectional prediction is available, and the size of thBIOdiff may be twice the size of thBIOsame. The video decoding apparatus 100 may determine the regularization parameter based on the frame rate. Even when the GOP sizes are the same, a temporal distance between frames is short when the frame rate is high, and so the video decoding apparatus 100 may determine thBIO to have a smaller value. The video decoding apparatus 100 may determine the regularization parameter based on the configuration parameter related to the coding prediction structure. For example, the configuration parameter related to the coding prediction structure may indicate random access or low delay, and when the configuration parameter related to the coding prediction structure indicates low delay, VI A / a / ZUZ J / UUUU / 4 151 The thBIO value may be set to a small value since a temporally future image is not indicated. When the configuration parameter related to the coding prediction structure indicates random access, the thBIO value may be set to a relatively large value. The video decoding apparatus 100 may determine the regularization parameters rym based on the sample bit depth. The regularization parameters rym may be proportional to si and s5 of Equation 25, and since the regularization parameters rym consist of gradient multiplication, as the gradient values increase, rym also increases. For example, as the sample bit depth increases, the gradient value may increase, and thus the size of the regularization parameter rym may increase. Figure 8B is a reference diagram for describing processes for determining a horizontal direction displacement vector and a vertical direction displacement vector with respect to a group of pixels, in accordance with an embodiment. Referring to Figure 8B, a window Oij 810 having a certain size has a size of (2M+K+1) * (2N+K+1) , where M and N are each a number 152 integer, based on a group of pixels 820 having a size KxK and including a plurality of pixels instead of a pixel of a current block on which bidirectional prediction is performed. Here, one difference from Figure 8A is that the window size is large, and a horizontal direction displacement vector and a vertical direction displacement vector with respect to a pixel group can be determined in the same way except for the difference. Figure 9A is a diagram for describing processes for adding an offset value after filtering is performed, and determining a gradient value in a horizontal or vertical direction when performing downscaling, in accordance with an embodiment. Referring to Figure 9A, the video decoding apparatus 100 may determine a gradient value in a horizontal or vertical direction by performing filtering at a pixel in which a component in a certain direction is at an integer position, by using a first ID filter and a second ID filter. However, a value obtained by performing filtering at the pixel in which the component in a certain direction is at an integer position, by using the first ID filter or the second ID filter may be outside a certain range. Such a phenomenon is referred to as an overflow phenomenon. The coefficients MA / a / ZUZ J / UUUU / 4 153 of an ID filter can be determined to be an integer for integer operation instead of an imprecise and complicated fractional operation. The coefficients of the ID filter can be scaled to be determined as an integer. When filtering is performed using the scaled coefficients of the ID filter, an integer operation is possible, but compared to when filtering is performed using an unscaled coefficient of an ID filter, a size of a value on which filtering is performed may be large and an overflow phenomenon may occur. Accordingly, in order to prevent an overflow phenomenon, descaling may be performed after filtering is performed using the ID filter. Here, the descaling may include bit shifting to the right by a descaling bit number.The descaling bit number may be determined by considering the maximum bit number of a register for a filtering operation and the maximum bit number of a temporary buffer storing a filtering result, while maximizing computational accuracy. In particular, the descaling bit number may be determined based on an internal bit depth, a scaling bit number of an interpolation filter, and a scaling bit number for a gradient filter. Hereafter, descaling will be described during processes to generate a value of IVI A / a / ZUZ J / UUUU / 4 154 interpolation filtering in a vertical direction by first performing filtering on a pixel at an integer position by using an interpolation filter in the vertical direction to determine a gradient value in a horizontal direction and then performing filtering on the interpolation filtering value in the vertical direction by using a gradient filter in the horizontal direction. According to the above Equation 12, the video decoding apparatus 100 may first perform filtering on a pixel at an integer position by using an interpolation filter in a vertical direction to determine a gradient value in a horizontal direction. Here, changei may be b-8. Here, b may denote an internal bit depth of an input image. Hereinafter, a bit depth (Reg Bitdepth) of a register and a bit depth (Temp Bitdepth) of a temporary buffer when actually performing downscaling based on changei will be described with reference to Table 1. M / a / ZUZ J / UUUU / 4 Table 1 b Min (I) Max (I) RegMax RegMin Reg Bitdepth TempMax TempMin Temp Bitdepth 8 0 255 22440 -6120 16 22440 -6121 16 9 0 511 44968 -12264 17 22484 -6133 16 10 0 1023 90024 -24552 18 22506 -6139 16 11 0 2047 180136 -49128 19 22517 -6142 16 12 0 4095 360360 -98280 20 22523 -6143 16 16 0 65535 5767080 -1572840 24 22528 -6145 16 155 Here, a value of a variable in Table 1 can be determined according to Equation 35. Equation 35 RegMin = Min(I) * FilterSumPos + Max(I) * FilterSumNeg RegMax = Max(I) * FilterSumPos + Min(I) * FilterSumNeg Reg BitDepth = limit(log2(RegMax - RegMin) + 1) TempMin = (RegMin + offset!) » cambiol TempMax = (RegMin + offset!) >> cambiol Temp BitDepth = limit(log2(TempMax - TempMin) + 1) Here, Min(I) can denote a minimum value of a pixel value I determined by an internal bit depth, and Max(I) can denote a maximum value of the pixel value I determined by the internal bit depth. FilterSumPos denotes a maximum value of the sum of positive filter coefficients, and FilterSumNeg denotes a minimum value of the sum of negative filter coefficients. For example, when a gradient filter FracFilter in units of 1 / 4 pixel in Figure 7C is used, FilterSumPos may be 88 and FilterSumNeg may be -24. A Limit(x) position can be a function that outputs a smallest integer among integers equal to or greater than x, relative to a real number x. Offseti is an offset value added to a value on which filtering is performed to prevent a rounding error that may occur while performing filtering. 156 downscaled by using shifti, and shifti can be determined to be 2Λ(shifti-1) . Referring to Table 1, when the internal bit depth b is 8, the bit depth (Reg Bitdepth) of the register may be 16, when the internal bit depth is 9, the bit depth of the register may be 17, and when the internal bit depth b is 10, 11, 12, and 16, the bit depth of the register may be 18, 19, and 24. When a register used to perform filtering is a 32-bit register, since the bit depths of all the registers in Figure 1 do not exceed 32, an overflow phenomenon does not occur. Similarly, when the internal bit depths b are 8, 9, 10, 11, 12, and 16, the bit depths (Temp Bitdepth) of the temporary buffers are all 16. When a temporary buffer used to store a value on which filtering is performed and then descaling is performed is a 16-bit buffer, since the bit depths of all the temporary buffers in Table 1 are 16 and thus do not exceed 16, an overflow phenomenon does not occur. According to Equation 12, the video decoding apparatus 100 may generate an interpolation filtering value in a vertical direction by first performing filtering on a pixel at a position of MA / a / ZUZ J / UUUU / 4 157 integer by using interpolation filtering in the vertical direction to determine a gradient value in a horizontal direction, and then performing filtering on the interpolation filtering value in the vertical direction by using a gradient filter in the horizontal direction, in accordance with Equation 13. Here, change2 may be determined to be p + q - changei. Here, p may denote a number of bits scaled with respect to an interpolation filter including filter coefficients shown in Figure 7C, and q may denote a number of bits scaled with respect to a gradient filter including filter coefficients shown in Figure 7A. For example, p may be 6 and 1 may be 4, and, accordingly, change2 = 18 - b. shift2 is determined as such because shifti+shift2, i.e., the total sum of descaled bit numbers, must be equal to the sum (p + q) of upscaled bit numbers with respect to a filter so that the values of a final filtering result are the same in a case when a filter coefficient is upscaled and in a case when the filter coefficient is not upscaled. Hereafter, a bit depth (Reg Bitdepth) of a register and a bit depth (Temp Bitdepth) of a temporary memory when actually performing 158 de-escalation based on change2 will be described with reference to Table 2. IVI A / a / ZUZ J / UUUU / 4 Table 2 b TempMin TempMax RegMax RegMin Reg Bitdepth OutMax OutMin Temp Bitdep th 8 -6121 22440 1942148 -1942148 23 1897 -1898 13 9 -6133 22484 1945956 -1945956 23 3801 -3802 14 10 -6139 22506 1947860 -1947860 23 7609 -7610 15 11 -6142 22517 1948812 -1948812 23 15225 -15226 16 12 -6143 22523 1949288 -1949288 23 30458 -30459 17 16 -6145 22528 1949764 -1949764 23 487441 -487442 21 Here, a value of a variable in Table 2 can be determined according to Equation 36. Equation 36 RegMin = TempMin * FilterSumPos + TempMax * FilterSumNeg RegMax = TempMax * FilterSumPos + TempMin * FilterSumNeg RegBitDepth = limit(log2(RegMax - RegMin) + 1) TempMin = (RegMin + offset!) » change2 TempMax = (RegMin + offset2) >> change2 TempBitDepth = limit(log2(TempMax - TempMin) + 1) Here, TempMax may denote TempMax from Table 1 and TempMin may denote TempMin from Table 1. FilterSumPos denotes a maximum value of the sum of positive filter coefficients and FilterSumNeg denotes a minimum value of the sum of negative filter coefficients. For example, when using a gradient filter gradFilter in 1 / 4 pixel units shown in Figure 7C, FilterSumPos may be 68 and FilterSumNeg may be -68. 159 ShiftO2 is an offset value added to a value on which filtering is performed to prevent a rounding error that may occur while performing downscaling when using shift2, and shifti can be determined to be 2Λ(shift2-l) . shifti and shift2 may be determined as such, but alternatively, shifti and shift2 may be determined variously as long as the sum of shifti and shift2 is equal to the sum of scaling bit numbers. Here, the values of shifti and shift2 may be determined based on the assumption that no overflow phenomenon occurs, shifti and shift2 may be determined based on an internal bit depth of an input image and a scaling bit number with respect to a filter. However, shifti and shift2 may not necessarily be determined such that the sum of shifti and shift2 equals the sum of the scaling bit numbers with respect to a filter. For example, shifti may be determined to be d-8, but shift2 may be determined to be a fixed number. When changei is the same as the previous one and change2 is a fixed number of 7, OutMax, OutMin, and Temp Bitdepth described with reference to Table 2 may change. Hereafter, a bit depth (Temp Bitdepth) of a temporary buffer will not be described with reference to 160 Table 3. MA / a / ZUZ J / UUUU / 4 Table 3 b OutMax OutMin Temp Bitdepth 8 15173 -15174 16 9 15203 -15204 16 10 15218 -15219 16 11 15225 -15226 16 12 15229 -15230 16 16 15233 -15234 16 Different from Table 2, in Table 3, the bit depths (Temp Bitdepth) of the temporary buffers are equal, that is, 16, in all b, and when result data is stored by using a 16-bit temporary buffer, the bit depth (Temp Bitdepth) of the temporary buffer is less than 16, and thus an overflow phenomenon does not occur with respect to internal bit depths of all input images. Meanwhile, referring to Table 2, when internal bit depths of input images are 12 and 16, and result data is stored by using a 16-bit temporary buffer, the bit depth (Temp Bitdepth) of the temporary buffer is greater than 16, and thus an overflow phenomenon may occur. When change2 is a fixed number, a scaled filter coefficient is not used, and a result value for performing filtering and a result value for performing filtering and then descaling can be different. In this case, it would be obvious to a technician in the field with average knowledge that the de-escalation needs to be carried out additionally. Here in the above, performing downscaling during processes to generate an interpolation filtering value in a vertical direction by first performing filtering on a pixel at an integer position by using an interpolation filter in the vertical direction to determine a gradient value in a horizontal direction, and then performing filtering on the interpolation filtering value in the vertical direction by using a gradient filter in the horizontal direction has been described, but it would be obvious to one skilled in the art with average knowledge that downscaling can be performed in the similar manner as when filtering is performed on a pixel, in which a component in a certain direction is an integer, to determine gradient values in horizontal and vertical directions through a combination of several ID filters. Figure 9B is a diagram for describing a range required for determining a horizontal direction displacement vector and a vertical direction displacement vector during processes for performing pixel unit motion compensation with respect to a current block. Al refers to Figure 9B, while MA / a / ZUZ J / UUUU / 4 162 performs pixel unit motion compensation on a reference block 910 corresponding to the current block, the video decoding apparatus 100 may determine a unit time shift vector in a horizontal direction and a unit time shift vector in a vertical direction at a pixel 915 by using a window 920 near the pixel 915 positioned at the upper left of the reference block 910. Here, the unit time shift vector in the horizontal or vertical direction may be determined by using a pixel value and gradient value of a pixel positioned at a range outside the reference block 910.In the same manner, while determining a horizontal direction shift vector and a vertical direction shift vector with respect to a pixel positioned on a reference block boundary 910, the video decoding apparatus 100 determines a pixel value and gradient value of a pixel positioned at a range outside the reference block 910. Accordingly, the video decoding apparatus 100 may determine the horizontal direction shift vector and the unit time shift vector in the vertical direction by using a block 925 at a range larger than the reference block 910. For example, when the current block size is AxB and the size of a window per pixel is (2M+1)x(2N+1), the size of an interval for determining the vector of. 163 horizontal direction displacement and vertical direction displacement vector can be (A+2M) x (B+2N) . Figures 9C and 9D are diagrams for describing ranges of regions used during processes for performing motion compensation in pixel units, in accordance with various embodiments. Referring to Figure 9C, while performing motion compensation in pixel units, the video decoding apparatus 100 may determine a horizontal direction displacement vector per pixel and a vertical direction unit time displacement vector per pixel included in a reference block 930 based on a block 935 in a range expanded by a window size of one pixel placed at the boundary of the reference block 930. However, while determining the horizontal and vertical direction displacement vectors, the video decoding apparatus 100 requires a pixel value and a gradient value of a pixel placed in the block 935, and at this time, an interpolation filter or gradient filter may be used to obtain the pixel value and gradient value.While using the interpolation filter or gradient filter on a block boundary pixel 935, a pixel value from a neighboring pixel may be used, and consequently, a pixel located outside a block boundary may be used. 164 Accordingly, pixel unit motion compensation may be performed by using a block 940 in a range further expanded to a value obtained by subtracting one from a tab number of the interpolation filter or gradient filter. Accordingly, when a size of a block is NxN, a size of a window per pixel is (2M+1)x(2M+1), and a length of an interpolation filter or gradient filter is T, a size of the block in the expanded range may be (N+2M+T-1)x(N+2M+T-1). Referring to Figure 9D, while performing motion compensation in pixel units, the video decoding apparatus 100 may determine a horizontal direction displacement vector per pixel and a displacement vector per unit time in the vertical direction by using a pixel value and a gradient value of a pixel placed in a reference block 945 without expanding a reference block in accordance with a size of a window of a pixel placed on the boundary of the reference block 945. In particular, processes of the video decoding apparatus 100 that determine the displacement vector per unit time in the horizontal direction and the displacement vector per unit time in the vertical direction without expanding a reference block are described with reference to Figure 9E. However, an interpolation filter or gradient filter of the reference block 165 945 is used to obtain the pixel value or gradient value of the pixel, and pixel unit motion compensation may be performed by using an expanded block 950. Accordingly, when a size of a block is NxN, a size of a window per pixel is (2M+1)x(2M+1), and a length of an interpolation filter or gradient filter is T, a size of the expanded block may be (N+Tl)x(N+Tl). Figure 9E is a diagram for describing processes for determining a horizontal direction displacement vector and a vertical direction displacement vector without expanding a reference block. Referring to Figure 9E, with respect to a pixel positioned outside a boundary of a reference block 955, the video decoding apparatus 100 may adjust the pixel position to a position of an available pixel at a closer position among pixels positioned on the boundary of the reference block 955 to determine a pixel value and gradient value of the pixel positioned outside the boundary to be a pixel value and gradient value of the pixel available at the closer position. Here, the video decoding apparatus 100 may adjust the position of the pixel positioned outside the reference block 955 to the available pixel position at the closer position according to an equation: i' = i'<0?0: i'; i'> H and an equation: j' = j'<0?0 : j' ; j'> W-12W-1: j' . M / a / ZUZ J / UUUU / 4 166 Here, i' denotes an x-coordinate value of a pixel, j' denotes a y-coordinate value of the pixel, and H and W denote a height and width of a reference block. Here, a top-left position of the reference block is assumed to be (0,0). When the top-left position of the reference block is (xP, yP), a final pixel position can be (i'+xP, j '+yP). Referring again to Figure 9C, pixel positions positioned outside the reference block boundary 930 in the block 235 expanded by the per-pixel window size are adjusted to adjacent pixel positions inside the reference block boundary 930, and the video decoding apparatus 100 may determine the per-pixel horizontal direction shift vector and the per-unit-time shift vector in the vertical direction in the per-pixel reference block 945b by using the pixel value and gradient value of the reference block 945 as shown in Figure 9D. Accordingly, since the video decoding apparatus 100 performs pixel unit motion compensation without expanding the reference block 945 in accordance with the window size per pixel, memory access times for pixel value reference are reduced and multiplication operation time is reduced, and thereby operation complexity can be reduced. 167 The video decoding apparatus 100 may perform a memory access operation and a multiplication operation at memory access times and multiplication operation times as shown in Table 4 below according to when the video decoding apparatus 100 performs block unit motion compensation (as operated in accordance with the HEVC standard), performs pixel unit motion compensation with block expansion in accordance with window size, and performs pixel unit motion compensation without block expansion. Here, it is assumed that a length T of a gradient filter is 7, a size of a block is NxN, and a size 2M+1 of a window per pixel is 5. IVI A / a / ZUZ J / UUUU / 4 Table 4 Block Unit Motion Compensation in Compliance with HEVC Standard Pixel Unit Motion Compensation with Block Expansion Pixel Unit Motion Compensation without Block Expansion Memory Access Times 2*(N+7)x(N+7) 2x(N+4+7)x(N+4+7) 2x(N+7)x(N+7) Multiplication Operation Times 2*8*{(N+7)xN+NxN} 2*8*{(N +4+7) x (N+4) + (N+4) x (N+4)} 2*6*{(N+4+5)x(N+4)+(N+4)x(N+4)} 2*6*{(N+4+5)x(N+4)+(N+4)x(N+4)} 2*8*{(N+7)xN+NxN+4} 2*6*{(N+5)xN+NxN} 2'6'{(N+5)xN+NxN} In block unit motion compensation in compliance with HEVC standard, since an 8-tab interpolation filter is used with respect to a 168 sample, 8 neighboring samples are required, and so when a size of a reference block is NxN, (N+7)x(N+7) reference samples are required according to 8-tab interpolation, and since bidirectional motion prediction compensation is performed, two reference blocks are used, and so in unit block motion compensation according to HEVC standard, memory access is performed 2*(N+7)x(N+7) times as shown in Table 4.When performing pixel unit motion compensation with block expansion, M=2 and the pixel unit motion compensation is performed by using an 8-tab interpolation filter or gradient filter with respect to a block having an expanded size of (N+4)x(N+4), (N+4+7)x(N+4+7) reference samples are required, and since two-way motion prediction compensation is performed, two reference blocks are used, and thus in the pixel unit motion compensation performed with block expansion, memory access is performed 2*(N+4+7)x(N+4+7) times as shown in Table 4. However, when performing unit pixel motion compensation without block expansion, since a block is not expanded, (N+7)x(N+7) reference samples are required as in unit block motion compensation according to HEVC standard, and since it is performed 169 bidirectional motion prediction compensation, two reference blocks are used, and thus in the pixel unit motion compensation performed without block expansion, memory access is performed 2*(N+7)x(N+7) times as in Table 4. Figure 9F is a diagram for describing processes for obtaining a temporal motion vector predictor candidate in which pixel group unit motion compensation is considered. The video decoding apparatus 100 may perform inter prediction on a current block 965 in a current picture 960. Here, the video decoding apparatus 100 may obtain a motion vector 980 of a positioned block 975 of a pre-decoded picture 970 as a temporal motion vector prediction candidate of the current block 965, determine one of the temporal motion vector predictor obtained from the current block and another motion vector predictor candidate as a motion vector predictor of the current block 965, and perform inter prediction on the current block 965 by using the motion vector predictor. The video decoding apparatus 100 may perform block unit motion compensation and pixel group unit motion compensation on the placed block 975 while performing inter prediction in IVI A / a / ZUZ J / UUUU / 4 170 the positioned block 975 included in the pre-decoded image 970. The video decoding apparatus 100 may perform block unit motion compensation by using the motion vector 980 and may perform pixel group unit motion compensation by using time unit displacement vectors in horizontal and vertical directions per pixel group. The video decoding apparatus 100 may store the motion vector 980 of the positioned block 975 by considering that the motion vector 980 of the positioned block 975 may be used as the temporal motion vector predictor candidate after the pre-decoded picture 970. Here, the video decoding apparatus 100 may store the motion vector 980 based on a motion vector storage unit. In particular, the video decoding apparatus 100 may store the motion vector 980 according to an equation: (MVx,MVy) =Crxr (MVx+pVx,MVy+pVy)). Here, MVx and MVy can respectively denote an x-component and a y-component of a motion vector used in block-unit motion compensation, and vx and vy can respectively denote an x-component and a y-component of a pixel-by-pixel displacement vector used in group-unit pixel motion compensation. Also, μ indicates a weight. Here, the weight μ can be determined MA / a / ZUZ J / UUUU / 4 171 based on a size R of a motion vector storage unit, a size K of a pixel group, and a scaling factor of a gradient filter or interpolation filter used in motion compensation in pixel group units. For example, when a value of the size K of the pixel group increases, the weight μ may decrease, and when the size R of the motion vector storage unit increases, the weight μ may decrease. Also, when a value of the scaling factor of the gradient filter or interpolation filter increases, the weight μ may decrease. Here, írxr(MVx, MVy) may denote a function of the motion vector MVx,MVy that considers the size of the motion vector storage unit of RxR.For example, írxr(MVx, MVy) may be a function in which an average value of x MVx components of motion vectors of a unit included in the motion vector storage unit of RxR is determined to be the x MVx component stored in the motion vector storage unit of RxR, and an average value of y MVy components of motion vectors of a unit included in the motion vector storage unit of RxR is determined to be the y MVy component stored in the motion vector storage unit of RxR. Since the stored motion vector 980 is a 172 motion vector considering motion compensation in pixel group units, the temporal motion vector predictor candidate of the current block 965 may be determined to be a motion vector used in more accurate motion compensation while performing inter prediction in the current block 965, and thereby may increase prediction coding / decoding efficiency. Hereinafter, a method for determining a data unit that can be used while the video decoding apparatus 100 according to an embodiment decodes an image is described with reference to Figures 10 to 23. Operations of the video encoding apparatus 150 may be similar to or the inverse of various embodiments of operations of the video decoding apparatus 100 described below. Figure 10 illustrates processes for determining at least one coding unit as the video decoding apparatus 100 divides a current coding unit, in accordance with an embodiment. According to one embodiment, the video decoding apparatus 100 may determine a shape of a coding unit by using block shape information, and determine a shape into which a coding unit is divided by using block shape information. IVI A / a / ZUZ J / UUUU / 4 173 division. In other words, a method of dividing a coding unit, which is indicated by the division shape information, may be determined based on a block shape indicated by the block shape information used by the video decoding apparatus 100. According to one embodiment, the video decoding apparatus 100 may use block-shaped information indicating that a current coding unit has a square shape. For example, the video decoding apparatus 100 may determine, according to the partitioning shape information, whether to not partition a square coding unit, partition the square coding unit vertically, partition the square coding unit horizontally, or partition the square coding unit into four coding units.Referring to Figure 10, when block shape information of a current coding unit 1000 indicates a square shape, the video decoding apparatus 100 may not divide a coding unit 1010a having the same size as the current coding unit 1000 in accordance with the division shape information indicating not dividing, or determine coding units 1010b, 1010c, or 1010d based on division shape information indicating a certain method. ΜΛ / a / ZUZ J / UUUU / 4 division. 174 Referring to Figure 10, the video decoding apparatus 100 may determine two coding units 1010b by dividing the current coding unit 1000 in a vertical direction based on division shape information indicating a division in a vertical direction, according to an embodiment. The video decoding apparatus 100 may determine two coding units 1010c by dividing the current coding unit 1000 in a horizontal direction based on division shape information indicating a division in a horizontal direction. The video decoding apparatus 100 may determine four coding units 1010d by dividing the current coding unit 1000 in vertical and horizontal directions based on division shape information indicating division in vertical and horizontal directions.However, the division forms into which a square coding unit may be divided are not limited to the above forms, and may include any form that may be indicated by division form information. Certain division forms into which a square coding unit is divided will now be described in detail through various embodiments. Figure 11 illustrates processes for determining at least one coding unit when the video decoding apparatus 100 divides a coding unit. M / a / ZUZ J / UUUU / 4 175 which has a non-square shape, in accordance with a modality. According to one embodiment, the video decoding apparatus 100 may use block shape information indicating that a current coding unit has a non-square shape. The video decoding apparatus 100 may determine, according to the partition shape information, whether to not partition the current non-square coding unit or to partition the current non-square coding unit by a certain method. Referring to Figure 11, when block shape information of a current coding unit 1100 or 1150 indicates a non-square shape, the video decoding apparatus 100 may not divide coding units 1110 or 1160 having the same size as the current coding unit 1100 or 1150 in accordance with the partitioning shape information indicating non-partitioning, or determine coding units 1120a, 1120b, 1130a, 1130b, 1130c, 1170a, 1170b, 1180a, 1180b, and 1180c based on information about the division method indicating a certain division method. A certain division method for dividing a non-square coding unit will now be described in detail through several embodiments. According to one embodiment, the video decoding apparatus 100 may determine a shape in which MA / a / ZUZ J / UUUU / 4 176 which a coding unit is divided by using division shape information, and in this case, the division shape information may indicate the number of at least one coding unit generated as the coding unit is divided. Referring to Figure 11, when the division shape information indicates that the current coding unit 1100 or 1150 is divided into two coding units, the video decoding apparatus 100 may determine two coding units 1120a and 1120b or 1170a and 1170b included in the current coding unit 1100 or 1150 when dividing the current coding unit 1100 or 1150 based on the division shape information. According to one embodiment, when the video decoding apparatus 100 divides the current coding unit 1100 or 1150 having a non-square shape based on division shape information, the video decoding apparatus 100 may divide the current coding unit 1100 or 1150 considering locations of long sides of the current coding unit 1100 or 1150 having a non-square shape. For example, the video decoding apparatus 100 may determine a plurality of coding units when dividing the current coding unit 1100 or 1150 in one direction to divide the long sides of the current coding unit 1100 or 1150 considering a shape of the MA / a / ZUZ J / UUUU / 4 177 current coding unit 1100 or 1150. According to one embodiment, when the division shape information indicates that a coding unit is divided into an odd number of blocks, the video decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 1100 or 1150. For example, when division shape information indicates that the current coding unit 1100 or 1150 is divided into three coding units, the video decoding apparatus 100 may divide the current coding unit 1100 or 1150 into three coding units 1130a to 1130c or 1180a to 1180c. According to one embodiment, the video decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 1100 or 1150, and the sizes of the determined coding units may not all be the same.For example, the coding unit size 1130b or 1180b among the determined odd number of coding units 1130a to 1130c or 1180a to 1180c may be different from the sizes of coding units 1130a and 1130e or 1180a and 1180c. In other words, coding units that can be determined when the current coding unit 1100 or 1150 is divided may have a plurality of types of sizes, and in some cases, the. MÁ / a / ZUZ J / UUUU / 4 178 coding units 1130a to 1130c or 1180a to 1180c can have different sizes. According to one embodiment, when division shape information indicates that a coding unit is divided into an odd number of blocks, the video decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 1100 or 1150, and further may set a certain limit on at least one coding unit among the odd number of coding units generated through division. Referring to Figure 11, the video decoding apparatus 100 may differentiate decoding processes performed in the centrally located coding unit 1130b or 1180b from among the three generated coding units 1130a to 1130c or 1180a to 1180c as the current coding unit 1100 or 1150 being divided into the other coding units 1130a and 1130c or 1180a and 1180c.For example, the video decoding apparatus 100 may limit the coding unit 1130b or 1180b located in the center to no longer be divided differently from the other coding units 1130a and 1130c or 1180a and 1180c, or to be divided only a certain number of times. Figure 12 illustrates processes of the video decoding apparatus 100 that divides a unit of 179 encoding based on at least one of block shape information and division shape information, in accordance with an embodiment. According to one embodiment, the video decoding apparatus 100 may determine that a first coding unit 1200 having a square shape is divided or not divided into coding units, based on at least one of block shape information and division shape information. According to one embodiment, when division shape information indicates that the first coding unit 1200 is divided in a horizontal direction, the video decoding apparatus 100 may determine a second coding unit 1210 by dividing the first coding unit 1200 in a horizontal direction. A first coding unit, a second coding unit, and a third coding unit used in accordance with one embodiment are terms used to indicate a relationship between before and after dividing a coding unit.For example, a second coding unit may be determined by dividing a first coding unit, and a third coding unit may be determined by dividing a second coding unit. Hereinafter, relationships between the first and third coding units will be understood as in accordance with the characteristics. 180 described above. According to one embodiment, the video decoding apparatus 100 may determine that the determined second coding unit 1210 is divided or not divided into coding units based on at least one of block shape information and division shape information. Referring to Figure 12, the video decoding apparatus 100 may divide the second coding unit 1210, which has a non-square shape and is determined by dividing the first coding unit 1200, into at least a third coding unit 1210a, 1220b, 1220c, or 1220d, or may not divide the second coding unit 1210, based on at least one of block shape information and division shape information.The video decoding apparatus 100 may obtain at least one of the block shape information from the partition shape information, and obtain a plurality of second coding units (for example, the second coding units 1210) having various shapes by partitioning the first coding unit 1200 based on at least one of the obtained block shape information and partition shape information, wherein the second coding unit 1210 may be partitioned according to a method for partitioning the first coding unit 1200 based on at least one of the block shape information. MA / a / ZUZ J / UUUU / 4 181 information and the split shape information. According to one embodiment, when the first coding unit 1200 is split into the second coding units 1210 based on at least one of block shape information and split shape information with respect to the first coding unit 1200, the second coding unit 1210 may be split into third coding units (e.g., third coding units 1220a to 1220d) based on at least one of block shape information and split shape information with respect to the second coding unit 1210. In other words, a coding unit may be recursively split based on at least one of split shape information and block shape information related to each coding unit.Accordingly, a square coding unit may be determined from a non-square coding unit, and each square coding unit may be recursively divided such that a non-square coding unit is determined. Referring to Figure 12, a certain coding unit (e.g., a centrally located coding unit or a square coding unit) from among the odd number of third coding units 1220b to 1220d determined when the second coding unit 1210 having an odd shape. 182 square is divided may be recursively divided. According to one embodiment, the third coding unit 1220c having a square shape among the third coding units 1220b to 1220d may be divided in a horizontal direction into a plurality of fourth coding units. A fourth coding unit 1240 having a non-square shape among the plurality of fourth coding units may be divided again into a plurality of coding units. For example, the fourth coding unit 1240 having a non-square shape may be divided into an odd number of coding units 1250a to 1250c. A method that can be used to recursively split a coding unit will be described below through several modalities. According to one embodiment, the video decoding apparatus 100 may determine that each of the third coding units 1220a to 1220d is divided into coding units or that the second coding unit 1210 is not divided, based on at least one of the block shape information and the division shape information. The video decoding apparatus 100 may divide the second coding unit 1210 having a non-square shape into the odd number of third coding units 1220b to 1220d, according to one embodiment. 183 The video decoding apparatus 100 may set a certain limit on a certain third coding unit among the third coding units 1220b to 1220d. For example, the video decoding apparatus 100 may limit that the third coding unit 1220c located in the center of the third coding units 1220b to 1220d is no longer divided, or is divided a configurable number of times.Referring to Figure 12, the video decoding apparatus 100 may limit that the third coding unit 1220c located at the center of the third coding units 1220b to 1220d include the second coding unit 1210 having a non-square shape is no longer divided, is divided in a certain way of dividing (for example, divided into four coding units or divided in ways corresponding to those into which the second coding unit 1210 is divided), or is divided only a certain number of times (for example, is divided only n times where n > 0). However, such limits on the third coding unit 1220c located at the center are only examples and should not be construed as limited by those examples, but should be construed as including various limits as long as the third coding unit 1220c located at the center is. IVI A / a / ZUZ J / UUUU / 4 decodes differently from the other third units 184 of 1220b and 1220d coding. According to one embodiment, the video decoding apparatus 100 may obtain at least one of block shape information and partition shape information used to partition a current coding unit from a certain location in the current coding unit. Figure 13 illustrates a method for determining, by the video decoding apparatus 100, a certain coding unit from among an odd number of coding units, according to an embodiment. Referring to Figure 13, at least one of block shape information and slice shape information of a current coding unit 1300 may be obtained from a sample at a certain location (for example, a sample 1340 located at the center) from among a plurality of samples included in the current coding unit 1300.However, a certain location in the current coding unit 1300 from which at least one of block shape information and slice shape information is obtained is not limited to the center location shown in Figure 13, but may be any location (for example, an upper location, a lower location, a left location, a right location, an upper left location, a lower left location, an upper right location, or a lower right location) included in the unit. IVI A / a / ZUZ J / UUUU / 4 185 current encoding 1300. The video decoding apparatus 100 may determine that a current coding unit is divided into coding units having various sizes and shapes or is not divided by obtaining at least one of block shape information and division shape information from a certain location. According to one embodiment, the video decoding apparatus 100 may select a coding unit when a current coding unit is divided into a certain number of coding units. A method for selecting one of a plurality of coding units may vary, and details thereof will be described below through several embodiments. According to one embodiment, the video decoding apparatus 100 may divide a current coding unit into a plurality of coding units, and determine a coding unit at a certain location. Figure 13 illustrates a method for determining, by the video decoding apparatus 100, a coding unit at a certain location from among an odd number of coding units, according to an embodiment. IVI A / a / ZUZ J / UUUU / 4 In accordance with one embodiment, the apparatus186 Video decoding apparatus 100 may use information indicating a location of each of the odd number of coding units to determine a coding unit located centrally among the odd number of coding units. Referring to FIG. 13, video decoding apparatus 100 may determine the odd number of coding units 1320a to 1320c by dividing the current coding unit 1300. Video decoding apparatus 100 may determine the central coding unit 1320b by using information about the locations of the odd number of coding units 1320a to 1320c. For example, the video decoding apparatus 100 may determine the centrally located coding unit 1320b by determining the locations of the coding units 1320a to 1320b based on information indicating locations of certain samples included in the coding units 1320a to 1320c.In detail, the video decoding apparatus 100 may determine the coding unit 1320b located at the center by determining the locations of the coding units 1320a to 1320c based on the information indicating locations in upper left samples 1330a to 1330c of the coding units 1320a to 1320c. In accordance with one embodiment, information indicating the locations of the left samples IVI A / a / ZUZ J / UUUU / 4 187 upper left and right coding units 1330a to 1330c included in coding units 1320a to 1320c respectively may include information about a location or coordinates of the coding units 1320a to 1320c in an image. According to one embodiment, the information indicating the locations of the upper left and right coding units 1330a to 1330c included in coding units 1320a to 1320c respectively may include information indicating widths or heights of the coding units 1320a to 1320c included in the current coding unit 1300, and such widths or heights may correspond to information indicating differences between coordinates of the coding units 1320a to 1320c in an image.In other words, the video decoding apparatus 100 may determine the coding unit 1320b located at the center by directly using information about the locations or coordinates of the coding units 1320a to 1320c in an image or by using information about the widths or heights of the coding units 1320a to 1320c corresponding to the differences between coordinates. According to one embodiment, the information indicating the location of the upper left sample 1330a of the upper coding unit 1320a may indicate coordinates (xa, ya), the information indicating the location of the upper left sample 1330b of the unit 188 of the middle coding unit 1320b may indicate coordinates (xb, yb), and the information indicating the location of the upper left sample 1330c of the lower coding unit 1330c may indicate coordinates (xc, ye). The video decoding apparatus 100 may determine the middle coding unit 1320b by using the coordinates of the upper left samples 1330a to 1330c respectively included in the coding units 1320a to 1320c. For example, when the coordinates of the upper left samples 1330a to 1330c are arranged in ascending order or descending order, the coding unit 1320b including the coordinates (xb, yb) of the sample 1330b located at the center may be determined as a coding unit located at the center among the coding units 1320a to 1320c determined when the current coding unit 1300 is divided.However, coordinates indicating the locations of the upper left samples 1330a to 1330c may be coordinates indicating absolute locations in an image, and further, coordinates (dxb, dyb), that is, information indicating a relative location of the upper left sample 1330b of the middle coding unit 1320b, and coordinates (dxc, dyc), that is, information indicating a relative location of the upper left sample 1330c of the lower coding unit 1320c, may be used based on the. M / a / ZUZ J / UUUU / 4 189 upper left sample location 1330a of upper coding unit 1320a. Also, a method for determining a coding unit at a certain location by using, as information indicating sample locations included in coding units, coordinates of the samples, is not limited to the above, and various arithmetic methods capable of using sample coordinates may be used. According to one embodiment, the video decoding apparatus 100 may divide the current coding unit 1300 into the plurality of decoding units 1320a to 1320c, and select a coding unit from the coding units 1320a to 1320c in accordance with a certain standard. For example, the video decoding apparatus 100 may select the coding unit 1320 having a different size from among the coding units 1320a to 1320c. According to one embodiment, the video decoding apparatus 100 may determine widths or heights of the coding units 1320a to 1320c by respectively using the coordinates (xa, ya), that is, information indicating the location of the upper left sample 1330a of the upper coding unit 1320a, the coordinates (xb, yb), that is, information indicating the location of the upper left sample 1330d of the upper coding unit 1320a, and the coordinates (xb, yb), that is, information indicating the location of the upper left sample 1330d of the upper coding unit 1320a. 190 middle coding unit 1320b, and the coordinates (xc, ye), that is, the information indicating the location of the upper left sample 1330c of the lower coding unit 1320c. The video decoding apparatus 100 may determine the sizes of the coding units 1320a to 1320c respectively by using the coordinates (xa, ya), (xb, yb), and (xc, ye) indicating the locations of the coding units 1320a to 1320c. According to one embodiment, the video decoding apparatus 100 may determine the width of the upper coding unit 1320a to be xb-xa, and the height to be yb-ya. According to one embodiment, the video decoding apparatus 100 may determine the width of the middle coding unit 1320b to be xc-xb, and the height to be yc-yb. According to one embodiment, the video decoding apparatus 100 may determine the width or height of the lower coding unit 1320c by using the width and height of the current coding unit 1300 and the widths and heights of the upper coding unit 1320a and middle coding unit 1320b. The video decoding apparatus 100 may determine a coding unit that is a different size from other coding units based on the determined widths and heights of the coding units 1320a to 1320c. By referring to the MA / a / ZUZ J / UUUU / 4 191 Figure 13 , the video decoding apparatus 100 may determine the middle coding unit 1320b having a size different from those of the upper coding unit 1320a and the lower coding unit 1320c as a coding unit at a certain location. However, processes of the video decoding apparatus 100 determining a coding unit having a size different from other coding units are only one example of determining a coding unit at a certain location by using coding unit sizes determined based on sample coordinates, and thus various processes may be used to determine a coding unit at a certain location by comparing coding unit sizes determined in accordance with certain sample coordinates. However, a sample location considered to determine a coding unit location is not limited to the upper left as described above, and information about an arbitrary sample location included in a coding unit may be used. According to one embodiment, the video decoding apparatus 100 may select a coding unit at a certain location from among a certain odd number of coding units when dividing a IVI A / a / ZUZ J / UUUU / 4 192 current coding unit, while considering a shape of the current coding unit. For example, when the current coding unit has a non-square shape in which a width is greater than a height, the video decoding apparatus 100 may determine a coding unit at a certain location in a horizontal direction. In other words, the video decoding apparatus 100 may determine one of coding units having a different location in the horizontal direction and set a boundary at a coding unit. When the current coding unit has a non-square shape in which a height is greater than a width, the video decoding apparatus 100 may determine a coding unit at a certain location in a vertical direction.In other words, the video decoding apparatus 100 may determine one of coding units having a different location in the vertical direction and set a boundary in a coding unit. According to one embodiment, the video decoding apparatus 100 may use information indicating a location of each of an even number of coding units to determine a coding unit at a certain location among the even number of coding units. The video decoding apparatus 100 may determine the even number of coding units by using information indicating a location of each of an even number of coding units. 193 dividing a current coding unit, and determining the coding unit at a certain location by using information about the locations of the even number of coding units. Detailed processes of this may correspond to those for determining a coding unit at a certain location (e.g., a central location) from among an odd number of coding units described in Figure 13, and thus no further details thereof are provided. According to one embodiment, when a current coding unit having a non-square shape is divided into a plurality of coding units, certain information about a coding unit at a certain location during division processes may be used to determine the coding unit at the certain location among the plurality of coding units. For example, the video decoding apparatus 100 may use at least one of block shape information and division shape information stored in the sample included in a central coding unit during division processes to determine a coding unit located at the center among a plurality of coding units obtained by dividing a current coding unit. Referring to Figure 13, the apparatus of MA / a / ZUZ J / UUUU / 4 194 Video decoding apparatus 100 may divide the current coding unit 1300 into the plurality of decoding units 1320a to 1320c based on at least one of block shape information and division shape information, and determine the coding unit 1320b located at the center among the plurality of coding units 1320a to 1320c. Furthermore, the video decoding apparatus 100 may determine the coding unit 1320b located at the center considering a location from which at least one of the block shape information and the division shape information is obtained.In other words, at least one of the block shape information and the partition shape information of the current coding unit 1300 may be obtained from the sample 1340 located at the center of the current coding unit 1300, and when the currently coding unit 1300 is divided into the plurality of coding units 1320a to 1320c based on at least one of the block shape information and the partition shape information, the coding unit 1320b including the sample 1340 may be determined as a coding unit located at the center. However, information used to determine a coding unit located at the center is not limited to at least one of the block shape information and the partition shape information. 195 division, and several types of information can be used while determining a centrally located coding unit. In accordance with one embodiment, some information for identifying a coding unit at a certain location may be obtained from a certain sample included in a coding unit to be determined. Referring to Figure 13, the video decoding apparatus 100 may use at least one of block shape information and partition shape information obtained from a sample at a certain location in the current coding unit 1300 (for example, a sample located at the center of the current coding unit 1300), to determine a coding unit at a certain location (for example, a coding unit located at the center of a plurality of coding units) among the plurality of coding units 1320a to 1320c determined when the current coding unit 1300 is partitioned.In other words, the video decoding apparatus 100 may determine the sample at a certain location by considering a block shape of the current coding unit 1300, and determine a set of a certain boundary in the coding unit 1320b that includes a sample from which certain information (e.g., at least one of information) may be obtained. IVI A / a / ZUZ J / UUUU / 4 196 block shape and division shape information), from among the plurality of coding units 1320a to 1320c determined when the current coding unit 1300 is divided. Referring to Figure 13, according to an embodiment, the video decoding apparatus 100 may determine, as a sample from which certain information can be obtained, the sample 1340 located at the center of the current coding unit 1300, and set a certain boundary in the coding unit 1320b including such sample 1340 during decoding processes. However, a location of a sample from which certain information can be obtained is not limited to the above, and may be a sample at an arbitrary location included in the coding unit 1320b determined to set a boundary. According to one embodiment, a location of a sample from which certain information can be obtained may be determined in accordance with a shape of the current coding unit 1300. According to one embodiment, block shape information may determine whether a shape of a current coding unit is square or non-square, and determine a location of a sample from which certain information can be obtained in accordance with the shape. For example, the video decoding apparatus 100 may determine, as a sample from which certain information can be obtained, a block shape information may be determined. IVI A / a / ZUZ J / UUUU / 4 197 obtaining certain information, a sample located at a boundary for dividing at least one of a width and a height of a current coding unit into halves by using at least one of information about the width of the current coding unit and information about the height of the current coding unit. As another example, when block shape information related to a current coding unit indicates a non-square shape, the video decoding apparatus 100 may determine as a sample from which certain information can be obtained, one of samples adjacent to a boundary for dividing long sides of the current coding unit into halves. According to one embodiment, when a current coding unit is divided into a plurality of coding units, the video decoding apparatus 100 may use at least one of block shape information and split shape information to determine a coding unit at a certain location among the plurality of coding units. According to one embodiment, the video decoding apparatus 100 may obtain at least one of block shape information and split shape information of a sample at a certain location included in a coding unit, and may divide a plurality of coding units generated as a coding unit is divided. IVI A / a / ZUZ J / UUUU / 4 198 current by using at least one of the partition shape information and the block shape information obtained from the sample at a certain location included in each of the plurality of coding units. In other words, a coding unit may be recursively partitioned by using at least one of block shape information and partition shape information obtained from a sample at a certain location included in each coding unit. Since processes for recursively partitioning a coding unit have been described above with reference to Figure 12, details thereof are not provided again. According to one embodiment, the video decoding apparatus 100 may determine at least one coding unit by dividing a current coding unit, and determine a decoding order of the at least one coding unit according to a certain block (for example, the current coding unit). Figure 14 illustrates a processing order of a plurality of coding units when the plurality of coding units are determined when the video decoding apparatus 100 divides a current coding unit, according to an embodiment. According to one embodiment, the video decoding apparatus 100 may determine second 199 coding units 1410a and 1410b by dividing a first coding unit 1400 in a vertical direction, determining second coding units 1430a and 1430b by dividing the first coding unit 1400 in a horizontal direction, or determining second coding units 1450a to 1450d by dividing the first coding unit 1400 in horizontal and vertical directions, in accordance with block shape information and division shape information. Referring to Figure 14, the video decoding apparatus 100 may determine second coding units 1410a and 1410b, which are determined by dividing the first coding unit 1400 in the vertical direction, to be processed in a horizontal direction 1410c. The video decoding apparatus 100 may determine second coding units 1430a and 1430b, which are determined by dividing the first coding unit 1400 in the horizontal direction, to be processed in a vertical direction 1430c. The video decoding apparatus 1400 may determine second coding units 1450a to 1450d, which are determined by dividing the first coding unit 1400 in the vertical and horizontal directions, to be processed) in accordance with a certain order in which the coding units located in a row are processed and then processed MA / a / ZUZ J / UUUU / 4 200 the coding units located in the next row (for example, a raster scan order in a z-scan order of 1450e). According to one embodiment, the video decoding apparatus 100 may recursively divide coding units. Referring to Figure 14, the video decoding apparatus 100 may determine the plurality of second coding units 1410a and 1410b, 1430a and 1430b, or 1450a to 1450d by dividing the first coding unit 1400, and recursively dividing each of the plurality of second coding units 1410a and 1410b, 1430a and 1430b, or 1450a to 1450d. A method for dividing the plurality of second coding units 1410a and 1410b, 1430a and 1430b, or 1450a to 1450d may correspond to a method for dividing a first coding unit 1400. Accordingly, each of the plurality of second coding units 1410a and 1410b, 1430a and 1430b, or 1450a to 1450d may be independently divided into a plurality of coding units.Referring to Figure 14, the video decoding apparatus 100 may determine the second coding units 1410a and 1410b by dividing the first coding unit 1400 in the vertical direction, and further, determine that each of the second coding units 1410a and 1410b is divided or not divided. M / a / ZUZ J / UUUU / 4 201 regardless. According to one embodiment, the video decoding apparatus 100 may divide the second coding unit 1410a on the left in a horizontal direction into third coding units 1420a and 1420b, and may not divide the second coding unit 1410a on the right. According to one embodiment, an order for processing coding units may be determined based on coding unit division processes. In other words, an order for processing coding units that are divided may be determined based on an order for processing coding units before they are divided. The video decoding apparatus 100 may determine an order for processing the third coding units 1420a and 1420b determined when the second coding unit 1410a on the left is divided independently of the second coding unit 1410b on the right. Since the third coding units 1420a and 1420b are determined when the second coding unit 1410a on the left is divided in a horizontal direction, the third coding units 1420a and 1420b may be processed in a vertical direction 1420c.Also, since a processing order of the second coding unit 1410a on the left and the second. IVI A / a / ZUZ J / UUUU / 4 202 coding unit 1410b on the right corresponds to the horizontal direction 1410c, the second coding unit 1410b on the right may be processed after the third coding units 1420a and 1420b are included in the second coding unit 1410a on the left are processed in the vertical direction 1420c. The above descriptions are related processes for determining an order for processing coding units according to coding units before they are divided, but such processes are not limited to the above embodiments, and any method may be used to independently process, in a certain order, coding units divided into various shapes. Figure 15 illustrates processes for determining that a current coding unit is divided into an odd number of coding units when coding units are not processable in a certain order by the video decoding apparatus 100, according to an embodiment. According to one embodiment, the video decoding apparatus 100 may determine that a current coding unit is divided into an odd number of coding units based on the obtained block shape information and division shape information. Referring to Figure 15, a first coding unit is divided into an odd number of coding units. MA / a / ZUZ J / UUUU / 4 203 coding unit 1500 having a square shape may be divided into second coding units 1510a and 1510b having a non-square shape, and the second coding units 1510a and 1510b may be respectively independently divided into third coding units 1520a and 1520b, and 1520c to 1520e. According to one embodiment, the video decoding apparatus 100 may divide the second coding unit 1510a on the left from among the second coding units 1510a and 1510b in a horizontal direction to determine the plurality of third coding units 1520a and 1520b, and divide the second coding unit 1510b on the right into the odd number of third coding units 1520c to 1520e. According to one embodiment, the video decoding apparatus 100 may determine whether there is a coding unit split into an odd number by determining whether the third coding units 1520a to 1520e are processable in a certain order. Referring to Figure 15, the video decoding apparatus 100 may determine the third coding units 1520a to 1520e by recursively splitting the first coding unit 1500. The video decoding apparatus 100 may determine, based on at least one of block shape information and split shape information, whether a IVI A / a / ZUZ J / UUUU / 4 204 coding unit is divided into an odd number of ways in which the first coding unit 1500, the second coding units 1510a and 1510b, or the third coding units 1520a to 1520e are divided. For example, the second coding unit 1510b to the right of the second coding units 1510a and 1510b may be divided into the odd number of third coding units 1520c to 1520e. A processing order of a plurality of coding units included in the first coding unit 1500 may be a certain order (for example, a z-scan order 1530), and the video decoding apparatus 100 may determine whether the third coding units 1520c to 1520e determined when the second coding unit 1510b on the right is divided into an odd number satisfy a condition of being able to be processed in accordance with a certain order. According to one embodiment, the video decoding apparatus 100 may determine whether the third coding units 1520a to 1520e included in the first coding unit 1500 satisfy a condition of being processable in accordance with a certain order, wherein the condition relates to whether at least one of a width and a height of each of the second coding units 1520a and 1520b is divided into halves of MÁ / a / ZUZ J / UUUU / 4 205 compliance with limits of third coding units 1520a to 1520e.For example, the third coding units 1520a and 1520b determined when the height of the second coding unit 1510a on the left and having a non-square shape is divided into halves satisfy the condition, but it may be determined that the third coding units 1520c to 1520e do not satisfy the condition because the boundaries of the third coding units 1520a to 1520e that are determined when the second coding unit 1510b on the right is divided into three coding units do not divide the width or height of the second coding unit 1510b on the right into halves. The video decoding apparatus 100 may determine disconnection of a scanning order when the condition is not satisfied, and determine that the second coding unit 1510b on the right is divided into the odd number of coding units, based on a result of the determination.According to one embodiment, the video decoding apparatus 100 may set a certain boundary in a coding unit at a certain location among an odd number of coding units obtained by dividing a coding unit, and since such a boundary or a certain location has been described above through various embodiments, details of it are not provided again. IVI A / a / ZUZ J / UUUU / 4 206 this . Figure 16 illustrates processes for determining at least one coding unit when the video decoding apparatus 100 divides a first coding unit 1600, according to an embodiment. According to an embodiment, the video decoding apparatus 100 may divide the first coding unit 1600 based on at least one of block shape information and division shape information obtained through the obtainer 105). The first coding unit 1600 having a square shape may be divided into four coding units having a square shape or a plurality of coding units having a non-square shape.For example, referring to Figure 16, when block shape information indicates that the first coding unit 1600 is a square and division shape information indicates a division into non-square coding units, the video decoding apparatus 100 may divide the first coding unit 1600 into a plurality of non-square coding units. In detail, when division shape information indicates that an odd number of coding units is determined by dividing the first coding unit 1600 in a horizontal direction or a vertical direction, the video decoding apparatus 100 may. IVI A / a / ZUZ J / UUUU / 4 207 determining, as the odd number of coding units, second coding units 1610a to 1610c by dividing the first coding unit 1600 having a square shape in a vertical direction, or second coding units 1620a to 1620c by dividing the first coding unit 1600 in a horizontal direction. According to one embodiment, the video decoding apparatus 100 may determine whether the second coding units 1610a to 1610c and 1620a to 1620c included in the first coding unit 1600 satisfy a condition of being processed in a certain order, wherein the condition relates to whether at least one of a width and a height of the first coding unit 1600 is divided into halves in accordance with boundaries of the second decoding units 1610a to 1610c and 1620a to 1620c. Referring to Figure 16, since the boundaries of the second coding units 1610a to 1610c determined when dividing the first coding unit 1600 having a square shape in a vertical direction do not release the width of the first coding unit 1600 into halves, it can be determined that the first coding unit 1600 does not satisfy the condition of being processed in a certain order.Also, since the boundaries of the second coding units 1620a to 1620c are determined when the first unit is split. MA / a / ZUZ J / UUUU / 4 208 of coding unit 1600 having a square shape in a horizontal direction do not divide the height of the coding unit 1600 into halves, it may be determined that the first coding unit 1600 does not satisfy the condition of being processable in a certain order. The video decoding apparatus 100 may determine disconnection of a scanning order when the condition is not satisfied, and determine that the first coding unit 1600 is divided into the odd number of coding units based on a result of the determination. According to one embodiment, the video decoding apparatus 100 may set a certain limit in a coding unit at a certain location among an odd number of coding units obtained by dividing a coding unit, and since such a limit or a certain location has been described above through various embodiments, details thereof are not provided again. According to one embodiment, the video decoding apparatus 100 may determine coding units having various forms by dividing a first coding unit. Referring to Figure 16, the video decoding apparatus 100 may divide the first coding unit 1600 having a square shape and a first coding unit 1630 and 1650 having a IVI A / a / ZUZ J / UUUU / 4 209 non-square shape in coding units that have various shapes. Figure 17 illustrates that a manner in which a second coding unit can be divided by the video decoding apparatus 100 is restricted when the second coding unit having a certain non-square shape when a first coding unit 1700 is divided satisfies a certain condition, according to an embodiment. According to one embodiment, the video decoding apparatus 100 may determine that the first coding unit 1700 having a square shape is divided into second coding units 1710a and 1710b or 1720a and 1720b having a non-square shape, based on at least one of block shape information and partition shape information obtained through the obtainer 105. The second coding units 1710a and 1710b or 1720a and 1720b may be divided independently. Accordingly, the video decoding apparatus 100 may determine that the second coding units 1710a and 1710b or 1720a and 1720b are divided into a plurality of coding units or are not divided based on at least one of block shape information and division shape information related to each of the coding units 1710a and 1710b or 1720a and 1720b. Accordingly, the second coding units 1710a and 1710b or 1720a and 1720b are divided into a plurality of coding units or are not divided based on at least one of block shape information and division shape information related to each of the coding units 1710a and 1710b or 1720a and 1720b. MA / a / ZUZ J / UUUU / 4 210 With one embodiment, the video decoding apparatus 100 may determine third coding units 1712a and 1712b by dividing, in a horizontal direction, the second coding unit 1710a on the left having a non-square shape, which is determined when the first coding unit 1700 follows in a vertical direction. However, when the second coding unit 1710a on the left is divided in the horizontal direction, the video decoding apparatus 100 may set a limit that the second coding unit 1710b on the right is not divided in the horizontal direction like the second coding unit 1710a on the left.When the third coding units 1714a and 1714b are determined when the second coding unit 1710b on the right is divided in the same direction, that is, the horizontal direction, the third coding units 1712a and 1712b, 1714a and 1714b are determined when the second coding units 1710a on the left and the second coding unit 1710b on the right are each independently divided in the horizontal direction. However, this is the same result as dividing the first coding unit 1700 into four second coding units 1730a to 1730b having a square shape based on at least one of block shape information and division shape information, and so on. MA / a / ZUZ J / UUUU / 4 211 may be inefficient in terms of image decoding. According to one embodiment, the video decoding apparatus 100 may determine third coding units 1722a and 1722b or 1724a and 1724b when dividing, in a vertical direction, the second coding unit 1720a or 1720b having a non-square shape determined when the first coding unit 1700 is divided in the horizontal direction. However, when one of the second coding units (e.g., the second coding unit 1720a at the top) is divided in a vertical direction, the video decoding apparatus 100 may set a limit that the other second coding unit (e.g., the second coding unit 1720b at the bottom) is not divided in the vertical direction like the second coding unit 1720a at the top for the reasons described above. Figure 18 illustrates processes of the video decoding apparatus 100 that divide a coding unit having a square shape when division shape information is unable to indicate that a coding unit is divided into four square shapes, according to an embodiment. In accordance with one embodiment, the apparatus IVI A / a / ZUZ J / UUUU / 4 212 video decoding apparatus 100 may determine second coding units 1810a and 1810b, or 1820a and 1820b, when dividing a first coding unit 1800 based on at least one of block shape information and partition shape information. The partition shape information may include information about various ways in which a coding unit may be divided, but such information about various ways may not include information for dividing a coding unit into four square coding units. In accordance with such partition shape information, the video decoding apparatus 100 is unable to divide the first coding unit 1800 having a square shape into four second coding units 1830 to 1830d having a square shape.The video decoding apparatus 100 may determine the second coding units 1810a and 1810b, or 1820a and 1820b having a square shape based on the division shape information. According to one embodiment, the video decoding apparatus 100 may independently divide each of the second coding units 1810a and 1810b, or 1820a and 1820b having a non-square shape. Each of the second coding units 1810a and 1810b, or 1820a and 1820b may be divided in a certain order through IVI A / a / ZUZ J / UUUU / 4 213 of a recursive method which may be a division method corresponding to a method for dividing the first coding unit based on at least one of the block shape information and the division shape information. For example, the video decoding apparatus 100 may determine third coding units 1812a and 1812b having a square shape by dividing the second coding unit 1810a to the left in a horizontal direction, or determine third coding units 1814a and 1814b having a square shape by dividing the second coding unit 1810b to the right in a horizontal direction. In addition, the video decoding apparatus 100 may determine third coding units 1816a to 1816d having a square shape by dividing both the second coding unit 1810a to the left and the second coding unit 1810b to the right in the horizontal direction. In this case, coding units may be determined in the same manner as when the first coding unit 1800 is divided into four second coding units 1830a to 1830b having a square shape. As another example, the video decoding apparatus 100 may determine third decoding units 1822a and 1822b having a square shape by dividing the second coding unit 1820a into the portion IVI A / a / ZUZ J / UUUU / 4 214 upper part in a vertical direction, and determining third coding units 1824a and 1824b having a square shape by dividing the second coding unit 1820b at the bottom in a vertical direction. Furthermore, the video decoding apparatus 100 may determine third coding units 1826a to 1826d having a square shape by dividing both the second coding unit 1820a at the top and the second coding unit 1820b at the bottom in the vertical direction. In this case, coding units may be determined in the same manner as when the first coding unit 1800 is divided into four second coding units 1830a to 1830d having a square shape. Figure 19 illustrates that a processing order of a plurality of coding units may change in accordance with processes for dividing a coding unit, in accordance with a mode. According to one embodiment, the video decoding apparatus 100 may divide a first coding unit 1900 based on block shape information and partition shape information. When the block shape information indicates a square shape and the partition shape information indicates that the first coding unit 1900 is divided into at least one of a 215 horizontal direction and a vertical direction, the video decoding apparatus 100 may divide the first coding unit 1900 to determine second coding units 1910a and 1910b, or 1920a and 1920b. Referring to Figure 19, the second coding units 1910a and 1910b, or 1920a and 1920b having a non-square shape and determined when the first coding unit 1900 is divided in the horizontal direction or the vertical direction may each be divided independently based on block shape information and division shape information.For example, the video decoding apparatus 100 may determine third coding units 1916a to 1916d by dividing, in the horizontal direction, each of the second coding units 1910a and 1910b generated as the first coding unit 1900 is divided in the vertical direction, or determine third coding units 1926a to 1926d by dividing, in the horizontal direction, the second coding units 1920a and 1920b generated as the first coding unit 1900 is divided in the horizontal direction. Processes for dividing the second coding units 1910a and 1910b, or 1920a and 1920b, have been described above with reference to Figure 19, and thus details thereof are not provided again. In accordance with one embodiment, the apparatus 216 video decoding apparatus 100 may process coding units in accordance with a certain order. Features about processing decoding units in accordance with a certain order have been described above with reference to Figure 14, and thus details thereof are not provided again. Referring to Figure 19, the video decoding apparatus 100 may determine four third coding units 1916a to 1916d or 1926a to 1926d having a square shape by dividing the first coding unit 1900 having a square shape. According to one embodiment, the video decoding apparatus 100 may determine a processing order of the third coding units 1916a to 1916d or 1926a to 1926d based on how the first coding unit 1900 is divided. According to one embodiment, the video decoding apparatus 100 may determine the third coding units 1916a to 1916d by dividing, in the horizontal direction, the second coding units 1910a and 1910b generated as the first coding unit 1900 is divided in the vertical direction, and process the third coding units 1916a to 1916d according to an order 1917 of first processing, in the vertical direction, the third coding units 1916a and 1916b included in the second coding unit. MA / a / ZUZ J / UUUU / 4 217 1910a on the left, and then process, in the vertical direction, the third coding units 1916c and 1916d included in the second coding unit 1910b on the right. According to one embodiment, the video decoding apparatus 100 may determine the third coding units 1926a to 1926d by dividing, in the vertical direction, the second coding units 1920a and 1920b generated as the first coding unit 1900 is divided in the horizontal direction, and process the third coding units 1926a to 1926d according to an order 1927 of first processing, in the horizontal direction, the third coding units 1926a and 1926b included in the second coding unit 1920a at the top, and then process, in the horizontal direction, the third coding units 1926c and 1926d included in the second coding unit 1920b at the bottom. Referring to Figure 19, the third coding units 1916a to 1916d or 1926a to 1926d having a square shape can be determined when dividing each of the second coding units 1910a and 1910b, or 1920 and 1920b. The second coding units 1910a and 1910b determined when dividing the first coding unit 1900 in the vertical direction MA / a / ZUZ J / UUUU / 4 218 and the second coding units 1920a and 1920b determined when the first coding unit 1900 is divided in the horizontal direction are divided into different shapes, but in accordance with the third coding units 1916a to 1916d and 1926a to 1926d determined thereafter, the first coding unit 1900 is divided into coding units having the same shapes. Accordingly, the video decoding apparatus 100 can process pluralities of coding units determined in the same shapes in different orders even when the coding units having the same shapes are consistently determined when coding units are recursively divided through different processes based on at least one of block shape information and division shape information. Figure 20 illustrates a process for determining a depth of a coding unit as a shape and size of the coding unit is changed, when a plurality of coding units are determined when the coding unit is recursively divided, according to an embodiment. According to one embodiment, the video decoding apparatus 100 may determine a depth of a coding unit according to a certain MA / a / ZUZ J / UUUU / 4 219 standard. For example, the certain standard may be a length of a long side of the coding unit. When the length of a long side of a current coding unit is divided 2n times to be shorter than a length of a long side of a coding unit before being divided, it can be determined that a depth of the current coding unit increases n times a depth of the coding unit before being divided, wherein n>0. After that, a coding unit having an increased depth is referred to as a coding unit of a lower depth. Referring to Figure 20, the video decoding apparatus 100 may determine a second coding unit 2002 and a third coding unit 2004 of lower depths by dividing a first coding unit 2000 having a square shape, based on block shape information indicating a square shape (for example, block shape information may indicate O:SQURE') according to an embodiment. When a size of the first coding unit 2000 having a square shape is 2N x 2N, the second coding unit 2002 determined by dividing a width and a height of the first coding unit 2000 by 1 / 2Λ1 may have a size of N x N. Furthermore, the third coding unit 2004 determined by dividing IVI A / a / ZUZ J / UUUU / 4 220 A width and a height of the second coding unit 2002 by 1 / 2 may have a size of N / 2 x N / 2. In this case, a width and a height of the third coding unit 2004 correspond to 1 / 2Λ2 of the first coding unit 2000. When a depth of the first coding unit 2000 is D, a depth of the second coding unit 2002 having 1 / 2Λ1 of the width and height of the first coding unit 2000 may be D+1, and a depth of the third coding unit 2004 having 1 / 2Λ2 of the width and height of the first coding unit 2000 may be D+2. According to an embodiment, the video decoding apparatus 100 may determine a second coding unit 2012 or 2022 and a third coding unit 2014 or 2024 by dividing a first coding unit 2010 or 2020 having a non-square shape, based on block shape information indicating a non-square shape (for example, block shape information may indicate '1:NS_VER' indicating a non-square shape in which a height is greater than a width, or '2:NS_HOR / indicating a non-square shape in which a width is greater than a height), according to an embodiment. The video decoding apparatus 100 may determine a second coding unit (e.g., the second coding unit 2002, 2012, or 2022) at the MÁ / a / ZUZ J / UUUU / 4 221 dividing at least one of a width and height of the first coding unit 2010 having a size of N x 2N. In other words, the video decoding apparatus 100 may determine the second coding unit 2002 having a size of N x N or the second coding unit 2022 having a size of N x N / 2 by dividing the first coding unit 2010 in a horizontal direction, or determine the second coding unit 2012 having a size of N / 2 x N by dividing the first coding unit 2010 in horizontal and vertical directions. The video decoding apparatus 100 may determine a second coding unit (e.g., the second coding unit 2002, 2012, or 2022) by dividing at least one of a width and a height of the first coding unit 2020 having a size of 2N x N. In other words, the video decoding apparatus 100 may determine the second coding unit 2002 having a size of N x N or the second coding unit 2012 having a size of N / 2 x N by dividing the first coding unit 2020 in a vertical direction, or determine the second coding unit 2022 having a size of N x N / 2 by dividing the first coding unit 2010 in horizontal and vertical directions. According to one embodiment, the video decoding apparatus 100 may determine a third 222 coding unit (e.g., the third coding unit 2004, 2014, or 2024) by dividing at least one of a width and a height of the second coding unit 2002 having a size of N x N. In other words, the video decoding apparatus 100 may determine the third coding unit 2004 having a size of N / 2 x N / 2, the third coding unit 2014 having a size of N / 22 x N / 2, or the third coding unit 2024 having a size of N / 2 x N / 22 by dividing the second coding unit 2002 in vertical and horizontal directions. According to one embodiment, the video decoding apparatus 100 may determine a third coding unit (e.g., the third coding unit 2004, 2014, or 2024) that may divide at least one of a width and a height of the second coding unit 2022 having a size of N / 2 x N. In other words, the video decoding apparatus 100 may determine the third coding unit 2004 having a size of N / 2 x N / 2 or the third coding unit 2024 having a size of N / 2 x N / 22 by dividing the second coding unit 2012 in a horizontal direction, or the third coding unit 2014 having a size of N / 22 x N / 2 by dividing the second coding unit 2012 in a vertical and horizontal directions. IVI A / a / ZUZ J / UUUU / 4 223 According to one embodiment, the video decoding apparatus 100 may determine a third coding unit (e.g., the third coding unit 2004, 2014, or 2024) by dividing at least one of a width and a height of the second coding unit 2022 having a size of N x N / 2. In other words, the video decoding apparatus 100 may determine the third coding unit 2004 having a size of N / 2 x N / 2 or the third coding unit 2014 having a size of N / 22 x N / 2 by dividing the second coding unit 2022 in a vertical direction, or the third coding unit 2024 having a size of N / 2 x N / 22 by dividing the second coding unit 2022 in vertical and horizontal directions. According to one embodiment, the video decoding apparatus 100 may divide a coding unit (e.g., the first, second, or third coding unit 2000, 2002, or 2004) having a square shape in a horizontal or vertical direction. For example, the first coding unit 2010 having a size of N x 2N may be determined by dividing the first coding unit 2000 having a size of 2N x 2N in the vertical direction, or the first coding unit 2020 having a size of 2N x N may be determined by dividing the first coding unit 2000 in the 224 horizontal direction. According to one embodiment, when a depth is determined based on a length of a longer side of a coding unit, a depth of a coding unit determined when the first coding unit 2000 having a size of 2N x 2N is divided in a horizontal or vertical direction may be the same as a depth of the first coding unit 2000. According to one embodiment, the width and height of the third coding unit 2014 or 2024 may be 1 / 2Λ2 of those of the first coding unit 2010 or 2020. When the depth of the first coding unit 2010 or 2020 is D, the depth of the second coding unit 2012 or 2022 which is 1 / 2 of the width and height of the first coding unit 2010 or 2020 may be D+1, and the depth of the third coding unit 2014 or 2024 which is 1 / 2Λ2 of the width and height of the first coding unit 2010 or 202 may be D+2. Figure 21 illustrates a part index for distinguishing depths and coding units, which may be determined in accordance with shapes and sizes of coding units, in accordance with an embodiment. According to one embodiment, the video decoding apparatus 100 may determine a second IVI A / a / ZUZ J / UUUU / 4 225 coding unit having various shapes by dividing a first coding unit 2100 having a square shape. Referring to Figure 21, the video decoding apparatus 100 may determine second coding units 2102a and 2102b, 2104a and 2104b, or 2106a to 2106d by dividing the first coding unit 2100 in at least one of a vertical direction and a horizontal direction, in accordance with division shape information. In other words, the video decoding apparatus 100 may determine the second coding units 2102a and 2102b, 2104a and 2104b, or 2106a to 2106d based on division shape information of the first coding unit 2100. According to one embodiment, a depth of the second coding units 2102a and 2102b, 2104a and 2104b, or 2106a to 2106d determined in accordance with the division shape information of the first coding unit 2100 having a square shape may be determined based on a length of a long side. For example, since a length of a side of the first coding unit 2100 in a square shape is the same as a length of a long side of the second coding units 2102a and 2102b or 2104a and 2104b having a non-square shape, the depths of the first coding unit 2100 and the second coding units 2102a and 2102b or 2104a and 2104b are determined based on the length of a long side. M / a / ZUZ J / UUUU / 4 226 2104b having a non-square shape may be equal, that is, D. On the other hand, when the video decoding apparatus 2100 divides the first coding unit 2100 into the four second coding units 2106a to 2106d having a square shape, based on the division shape information, a length of a side of the second coding units 2106a to 2106d having a square shape is 1 / 2 of a length of a side of the first coding unit 2100, the depths of the second coding units 2106a to 2106d may be D+1, that is, a depth smaller than the depth D of the first coding unit 2100. According to one embodiment, the video decoding apparatus 100 may divide a first coding unit 2110, in which a height is greater than a width, in a horizontal direction into a plurality of second coding units 2112a and 2112b or 2114a to 2114c, in accordance with the division shape information. According to one embodiment, the video decoding apparatus 100 may divide a first coding unit 2120, in which a width is greater than a height, in a vertical direction into a plurality of second coding units 2122a and 2122b or 2124a to 2124c, in accordance with the division shape information. ΜΛ / a / ZUZ J / UUUU / 4 division. 227 According to one embodiment, depths of the second coding units 2112a and 2112b, 2114a to 2114c, 2122a and 2122b, or 2124a to 2124c determined in accordance with the division shape information of the first coding unit 2110 or 2120 having a non-square shape may be determined based on a length of a long side. For example, since a length of a side of the second coding units 2112a and 2112b having a square shape is 1 / 2 of a length of a long side of the first coding unit 2110 having a non-square shape in which the height is longer than the width, the depths of the second coding units 2112a and 2112b are D+1, that is, depths less than the depth D of the first coding unit 2110 having a non-square shape. Furthermore, the video decoding apparatus 100 may divide the first coding unit 2110 having a non-square shape into an odd number of second coding units 2114a to 2114c based on division shape information. The even number of second coding units 2114a to 2114c may include the second coding units 2114a and 2114c having a non-square shape, and the second coding unit 2114b having a square shape. In this case, since a length of a long side of the second coding units 2114a and 2114c is greater than the length of a long side of the second coding units 2114a and 2114c, the number of the even number of the second coding units 2114a and 2114c may be greater than the length of the long side of the second coding units 2114a and 2114c. M / a / ZUZ J / UUUU / 4 228 coding units 2114a and 2114c having a non-square shape and a length of a side of the second coding unit 2114 having a square shape are 1 / 2 of a length of a side of the first coding unit 2110, depths of the second coding units 2114a to 2114b may be D+l, that is, a depth less than the depth D of the first coding unit 2110. The video decoding apparatus 100 may determine depths of coding units related to the first coding unit 2120 having a non-square shape in which a width is greater than a height, in the same manner as determining depths of coding units related to the first coding unit 2110. According to one embodiment, with respect to determining PID for distinguishing coding units, when an odd number of coding units do not have the same size, the video decoding apparatus 100 may determine PID based on a size ratio of the coding units. Referring to Figure 21, the second coding unit 2114b located at the center of the odd number of second coding units 2114a to 2114c may have the same width as the second coding units, but have a height twice as high as those of the coding units 2114a and 2114c. M / a / ZUZ J / UUUU / 4 229 2114c. In this case, the second coding unit 2114b located at the center may include two of the second decoding units 2114a and 2114c. Accordingly, when the PID of the second coding unit 2114b located at the center is one according to a scanning order, the PID of the second coding unit 2114c in a second order may be 3, the PID has increased by 2. In other words, the PID values may be discontinuous. According to one embodiment, the video decoding apparatus 100 may determine whether an odd number of coding units have the same sizes based on PID discontinuity to distinguish the coding units. According to one embodiment, the video decoding apparatus 100 may determine whether a plurality of coding units determined when dividing a current coding unit have certain division shapes based on PID values. Referring to Figure 21, the video decoding apparatus 100 may determine the even number of second coding units 2112a and 211b or the odd number of second coding units 2114a to 2114c when dividing the first coding unit 2110 having a rectangular shape in which the height is greater than the width. The video decoding apparatus 100 may use the PID indicating each MA / a / ZUZ J / UUUU / 4 230 coding unit for distinguishing a plurality of coding units. According to one embodiment, a PID of a sample at a certain location (e.g., an upper left sample) of each coding unit may be obtained.According to one embodiment, the video decoding apparatus 100 may determine a coding unit at a certain location among determined coding units by using PID to distinguish coding units. According to one embodiment, when division shape information of the first coding unit 2110 having a rectangular shape in which a height is greater than a width indicates that the first coding unit 2110 is divided into three coding units, the video decoding apparatus 100 may divide the first coding unit 2110 into the three second coding units 2114a to 2114c. The video decoding apparatus 100 may assign a PID to each of the three second coding units 2114a to 2114c.The video decoding apparatus 100 may compare PIDs of an odd number of coding units to determine a central coding unit among the coding units. The video decoding apparatus 100 may determine, as a coding unit at a central location among the units. IVI A / a / ZUZ J / UUUU / 4 231 coding determined when the first coding unit 2110 is divided, the second coding unit 2114b having a PID corresponding to a middle value among PIDs, based on PIDs of the coding units. According to one embodiment, when determining PIDs to distinguish coding units, when the coding units do not have the same sizes, the video decoding apparatus 100 may determine PID based on a size ratio of the coding units. Referring to Figure 21, the second coding unit 2114b generated when the first coding unit 2110 is divided, may have the same width as the second coding units 2114a and 2114c, but may have a height twice as high as that of the second coding units 2114a and 2114c.In this case, when the PID of the second coding unit 2114b located at the center is 1, the PID of the second coding unit 2114c in a following order may be 3, the PID being increased by 2. As such, when an increasing interval of PID differs while increasing uniformly, the video decoding apparatus 100 may determine that a current coding unit is divided into a plurality of coding units including a coding unit having a size different from other coding units. According to one embodiment, when. IVI A / a / ZUZ J / UUUU / 4 232 splitting manner information indicates splitting into an odd number of coding units, the video decoding apparatus 100 may split a current coding unit into a plurality of coding units, wherein a coding unit at a certain location (e.g., a center coding unit) has a size different from other coding units. In this case, the video decoding apparatus 100 may determine the center coding unit having the different size by using PIDs of the coding units. However, a PIB, and a size or location of a coding unit at a certain location described above are specified to describe an embodiment, and so should not be construed narrowly, and several PIDs, and several locations and sizes of a coding unit may be used. According to one embodiment, the video decoding apparatus 100 may use a certain data unit for which recursive division of an encoding unit is initiated. Figure 22 illustrates that a plurality of coding units are determined in accordance with a plurality of certain data units included in an image, in accordance with an embodiment. In accordance with a modality, a certain unit MA / a / ZUZ J / UUUU / 4 233 of data may be defined as a data unit from which a coding unit starts to be recursively divided by using at least one of block shape information and division shape information. In other words, a certain data unit may correspond to a coding unit of a higher depth used while determining a plurality of coding units when dividing a current image. Hereinafter, a certain data unit is referred to as a reference data unit for convenience of description. In one embodiment, the reference data unit may indicate a certain size and shape. In one embodiment, the reference data unit may include M x N samples. Here, M and N may be equal, and may be an integer expressed as a multiple of 2. In other words, a reference data unit may indicate a square shape or a non-square shape, and may then be divided into an integer number of coding units. According to one embodiment, the video decoding apparatus 100 may divide a current image into a plurality of reference data units. According to one embodiment, the video decoding apparatus 100 may divide the plurality of reference data units obtained by dividing a current image by using IVI A / a / ZUZ J / UUUU / 4 234 information about the splitting shape of each of the reference data units. Splitting processes for such reference data units may correspond to splitting processes using a quad-tree structure. According to one embodiment, the video decoding apparatus 100 may predetermine a smallest available size for the reference data unit included in the current picture. Accordingly, the video decoding apparatus 100 may determine the reference data unit having a plurality of sizes that are equal to or larger than the smallest size, and determine at least one coding unit based on the determined reference data unit by using block shape information and partition shape information. Referring to Figure 22, the video decoding apparatus 100 may use a reference coding unit 2200 having a square shape, or may use a reference coding unit 2202 having a non-square shape. According to one embodiment, a shape and size of a reference coding unit may be determined according to a plurality of data units (e.g., a sequence, an image, a segment, a portion of a segment, and a larger coding unit) that may include at least one reference coding unit. IVI A / a / ZUZ J / UUUU / 4 235 reference coding unit. According to one embodiment, the obtainer 105 of the video decoding apparatus 100 may obtain, from a bit stream, at least one of information about a shape of a reference coding unit and information about a size of the reference coding unit according to the plurality of data units. Processes for determining at least one coding unit included in the reference coding unit 2200 having a square shape have been described above through processes for dividing the current coding unit 1000 of Figure 10 , and processes for determining at least one coding unit included in the reference coding unit 2200 having a non-square shape have been described above through processes for dividing the current coding unit 1100 or 1150 of Figure 11 , and details thereof are not provided again. According to one embodiment, in order to determine a size and shape of a reference coding unit according to some predetermined data units based on a predetermined condition, the video decoding apparatus 100 may use a PID to distinguish the size and shape of the reference coding unit. In other words, the obtainer 105 may obtain, 236 of a bit stream, only a PID for distinguishing a size and shape of a reference coding unit as a data unit satisfying a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) from among plural data units (e.g., a sequence, an image, a slice, a slice portion, and a larger coding unit) according to slices, slice portions, and larger coding units. The video decoding apparatus 100 may determine the size and shape of the reference data unit according to data units satisfying the predetermined condition, by using the PID.When information about a shape of a reference coding unit and information about a size of a reference coding unit are obtained from a bit stream and used in accordance with data units having relatively small sizes, the efficiency of using the bit stream may not be sufficient, and thus, instead of directly obtaining the information about the shape of the reference coding unit and the information about the size of the reference coding unit, only one PID may be obtained and used. In this case, at least one of the size and shape of the reference coding unit that corresponds to the PID indicating the size and shape of the reference coding unit. IVI A / a / ZUZ J / UUUU / 4 237 may be predetermined. In other words, the video decoding apparatus 100 may select at least one of the predetermined size and shape of the reference coding unit in accordance with the PIB to determine at least one of the size and shape of the reference coding unit included in the data unit as its criterion for obtaining the PID. According to one embodiment, the video decoding apparatus 100 may use at least one reference coding unit included in a larger coding unit. In other words, a larger coding unit that divides an image may include at least one reference coding unit, and a coding unit may be determined when each of the reference coding units is recursively divided. According to one embodiment, at least one of a width and height of the larger coding unit may be an integer multiplied by at least one of a width and height of the reference coding unit. According to one embodiment, a size of a reference coding unit may be equal to a size of a larger coding unit, which is divided n times according to a quad tree structure.In other words, the video decoding apparatus 100 may determine a decoding unit of. 238 reference by dividing a larger coding unit n times according to a quad tree structure, and dividing the reference coding unit based on at least one of block shape information and division shape information according to various embodiments. Figure 23 illustrates a processing block that serves as a criterion for determining an order of determining reference coding units included in an image 2300, in accordance with an embodiment. According to one embodiment, the video decoding apparatus 100 may determine at least one processing block that divides an image. A processing block is a data unit that includes at least one reference coding unit that divides an image, and the at least one reference coding unit included in the processing block may be determined in a certain order. In other words, an order of determining the at least one reference coding unit determined in each processing block may correspond to one of several orders for determining a reference coding unit, and may vary according to processing blocks. A reference coding unit determination order determined per processing block MA / a / ZUZ J / UUUU / 4 239 processing may be one of several orders, such as a raster scan order, a Z scan order, an N scan order, a scan / up right order, a horizontal scan order, and a vertical scan order, but should not be construed in a limited manner with respect to the scan orders. According to one embodiment, the video decoding apparatus 100 may determine a size of at least one processing block included in an image by obtaining information about the processing block size. The video decoding apparatus 100 may obtain, from a bit stream, information about the size of a processing block to determine the size of the at least one processing block included in the image. The size of the processing block may be a certain size of a data unit indicated by the processing block size information. According to one embodiment, the processor 105 of the video decoding apparatus 100 may obtain, from the bit stream, information about a processing block size according to certain data units. For example, the information about a processing block size may be obtained from the bit stream in data units of graphical representations, sequences, images, segments, and segment parts. In other words, MA / a / ZUZ J / UUUU / 4 240 the obtainer 105 may obtain, from the bit stream, information about a size of a processing block according to such a plurality of data units, the video decoding apparatus 100 may determine the size of at least one processing block that divides the image by using the obtained information about a size of a processing block, wherein the processing block size may be an integer multiplied by a size of a reference coding unit. According to one embodiment, the video decoding apparatus 100 may determine sizes of processing blocks 2302 and 2312 included in the picture 2300. For example, the video decoding apparatus 100 may determine a size of a processing block based on information about a size of a processing block, the information being obtained from a bit stream. Referring to FIG. 23 , the video decoding apparatus 100 may determine horizontal sizes of the processing blocks 2302 and 2312 to be four times a horizontal size of a reference coding unit, and a vertical size thereof to be four times a vertical size of the reference coding unit, according to one embodiment. The video decoding apparatus 100 may determine an order of determining at least one coding unit. 241 reference in at least one processing block. According to one embodiment, the video decoding apparatus 100 may determine each of the processing blocks 2302 and 2312 included in the picture 2300 based on a size of a processing block, and determine an order of determining at least one reference coding unit included in each of the processing blocks 2302 and 2312. According to one embodiment, determining a reference coding unit may include determining a size of the reference coding unit. According to one embodiment, the video encoding apparatus 100 may obtain, from a bit stream, information about a determination order of at least one reference coding unit in at least one processing block, and determine the determination order of the at least one reference coding unit based on the obtained information. The determination order information may be defined as an order or direction for determining reference coding units in a processing block. In other words, an order for determining reference coding units may be determined independently per processing block. In accordance with one embodiment, the apparatus M / a / ZUZ J / UUUU / 4 242 video decoding 100 may obtain, from a bit stream, information about a determination order of a reference coding unit according to hundreds of data units. For example, the obtainer 105 may obtain, from the bit stream, information about a determination order of a reference coding unit according to data units such as graphic representations, sequences, images, segments, segment portions, and processing blocks. Since the information about a determination order of a reference coding unit indicates a determination order of a reference coding unit in a processing block, the information about a determination order may be obtained for a certain data unit including an integer number of processing blocks. According to one embodiment, the video decoding apparatus 100 may determine at least one reference coding unit based on the determined order. According to one embodiment, the obtainer 105 may obtain from the bit stream, information about an order of determining a reference coding unit, such as information related to the processing blocks 2302 and 2312, and the video decoding apparatus 100 may determine an order for determining at least IVI A / a / ZUZ J / UUUU / 4 243 a reference coding unit included in processing blocks 2302 and 2312 and determining at least one reference coding unit included in the image 2300 in accordance with a coding unit determination order. Referring to Figure 23, the video decoding apparatus 100 may determine determination orders 2304 and 2314 of at least one reference coding unit respectively related to the processing blocks 2302 and 2312. For example, when information about a determination order of a reference coding unit is obtained per processing block, determining determination orders of a reference coding unit related to the processing blocks 2302 and 2312 may be different from each other.When the determination order 2304 related to the processing block 2302 is a raster scanning order, reference coding units included in the processing block 2302 may be determined in accordance with the raster scanning order. On the other hand, when the determination order 2314 related to the processing block 2312 is a reverse order of a raster scanning order, reference coding units in the processing block 2312 may be determined in the reverse order of the raster scanning order. IVI A / a / ZUZ J / UUUU / 4 244 The video decoding apparatus 100 may determine at least one reference coding unit for decoding, according to one embodiment. The video decoding apparatus 100 may decode an image based on reference coding units determined via prior embodiments. Examples of a method for decoding a reference coding unit may include various methods for decoding an image. According to one embodiment, the video decoding apparatus 100 may obtain, from a bit stream, and use block shape information indicating a shape of a current coding unit or split shape information indicating a method for splitting the current coding unit. The block shape information or the split shape information may be included in a stream related to multiple data units. For example, the video decoding apparatus 100 may use the block shape information and split shape information, which are included in a sequence parameter set, a picture parameter set, a video parameter set, a segment header, and a segment part header. Furthermore, the video decoding portion 100 may obtain, from a bit stream, and use syntax corresponding to the block shape information. MÁ / a / ZUZ J / UUUU / 4 245 blocking form or splitting form information, in accordance with larger coding units - with reference coding units, and processing blocks. Although this disclosure has been shown and described specifically with reference to various embodiments thereof, it will be understood by those skilled in the art of ordinary skill that various changes in form and detail may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims. The embodiments are to be considered in a descriptive sense only and not for purposes of limitation. Therefore, the scope of the disclosure is defined not only by the detailed description of the disclosure but also by the appended claims, and all differences within the scope shall be construed as being included in the present disclosure. Embodiments of the present disclosure may be described as computer programs and may be implemented on general-purpose digital computers that execute the programs using a computer-readable recording medium. Examples of the computer-readable recording medium include magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.), optical recording media (e.g., CD-ROM, or M / a / ZUZ J / UUUU / 4 246 DVD), etc. It is noted that, as of this date, the best method known to the applicant to put the aforementioned invention into practice is the one that is clear from this description of the invention.
Claims
1. A video decoding method, comprising: determining whether to perform optical flow-based compensation by using at least one of a size of a current block, indicator information related to whether to perform optical flow-based compensation, a picture order count (POC) difference, and whether the current block is bi-predicted; if it is determined to perform optical flow-based compensation, obtaining a first displacement vector in a horizontal direction and a second displacement vector in a vertical direction for a pixel group; obtaining a predicted pixel value of the current block based on a pixel value of a first reference block, a pixel value of a second reference block, and a value obtained by using the first displacement vector and the second displacement vector for the pixel group;and reconstructing the current block based on the predicted pixel value, IVI A / a / ZUZ J / UUUU / 4 248 where: the indicator information is obtained from a bit stream, the POC difference is a difference between a POC of a reference image and a POC of a current image, and the pixel group is NxN, N is equal to or greater than 2.; 2. A video decoding apparatus comprising: an inter-predictor configured to: determine whether to perform optical flow-based compensation when using at least one of a size of a current block, indicator information related to whether to perform optical flow-based compensation, a picture order count (POC) difference, and whether the current block is bi-predicted; if it is determined to perform optical flow-based compensation, obtain a first shift vector in a horizontal direction and a second shift vector in a vertical direction for a pixel group;and obtaining a predicted pixel value of the current block based on a pixel value of a first reference block, a pixel value of a second reference block, and a value obtained by using the first displacement vector and the second displacement vector for the pixel group, and a decoder configured to reconstruct the current block based on the predicted pixel value, wherein: the indicator information is obtained from a bit stream, the POC difference is a difference between a POC of a reference picture and a POC of a current picture, and the pixel group is NxN block, N is equal to or greater than 2.; 3. A video coding method, comprising: determining whether to perform optical flow-based compensation by using at least one of a size of a current block, indicator information related to whether to perform optical flow-based compensation, a picture order count (POC) difference, and whether the current block is bi-predicted; if it is determined to perform optical flow-based compensation, obtaining a first displacement vector in a horizontal direction and a second displacement vector in a vertical direction for a pixel group; obtaining a predicted pixel value of the current block based on a pixel value of a first reference block, a pixel value of a second reference block, and a value obtained by using the first displacement vector and the second displacement vector for the pixel group;and encode the current block based on the predicted pixel value, wherein: the flag information is included in a bit stream, the POC difference is a difference between a POC of a reference picture and a POC of a current picture, and the pixel group is NxN, N is equal to or greater than 2.; 4. A video coding apparatus, comprising: an inter-predictor configured to: determine whether to perform optical flow-based compensation when using at least one of a size of a current block, indicator information related to whether to perform optical flow-based compensation, a picture order count (POC) difference, and whether the current block is bi-predicted; if it is determined to perform optical flow-based compensation, obtain a first displacement vector in a horizontal direction and a second displacement vector in a vertical direction for a group of pixels; obtain a predicted pixel value of the current block based on a pixel value of a first reference block, a pixel value of a second reference block, and a value obtained by using the first displacement vector and the second displacement vector for the pixel group;and encoding the current block based on the predicted pixel value, and a generator configured to generate a bit stream comprising the encoding results, wherein: the flag information is included in the bit stream, the POC difference is a difference between a POC of a reference picture and a POC of a current picture, and the pixel group is NxN, N is equal to or greater than 2.; 5. A non-transitory computer-readable medium for recording a bit stream, the bit stream comprising: encoding results of a current block, wherein, the encoding results of the current block are obtained by: determining whether to perform optical flow-based compensation using at least one of a size of a current block, indicator information related to whether to perform optical flow-based compensation, a picture order count (POC) difference, and whether the current block is bi-predicted; if it is determined to perform optical flow-based compensation, obtaining a first shift vector in a horizontal direction and a second shift vector in a vertical direction for a pixel group;obtaining a predicted pixel value of the current block based on a pixel value of a first reference block, a pixel value of a second reference block, and a value obtained by using the first displacement vector and the second displacement vector for the pixel group; and encoding the current block based on the predicted pixel value, wherein: the flag information is included in the bit stream, the POC difference is a difference between a POC of a reference picture and a POC of a current picture, and the pixel group is NxN, N is equal to or greater than 2.;