The present disclosure relates to a video decoding method and a video encoding method. More particularly, the present disclosure relates to video decoding and video encoding performing inter prediction in a bi-directional motion prediction mode.
As hardware for reproducing and storing high resolution or high quality video content is being developed and supplied, a need for a video codec for effectively encoding or decoding high resolution or high quality video content has increased. In a conventional video codec, a video is encoded according to a limited encoding method based on coding units of a tree structure.
Image data of a spatial domain is transformed into coefficients of a frequency domain via frequency transformation. According to a video codec, an image is split into blocks having a predetermined size, discrete cosine transform (DCT) is performed on each block, and frequency coefficients are encoded in block units, for rapid calculation of frequency transformation. Compared with image data of a spatial domain, coefficients of a frequency domain are easily compressed. In particular, since an image pixel value of a spatial domain is expressed according to a prediction error via inter prediction or intra prediction of a video codec, when frequency transformation is performed on the prediction error, a large amount of data may be transformed to 0. According to a video codec, an amount of data may be reduced by replacing data that is consecutively and repeatedly generated with small-sized data.
According to various embodiments, a prediction pixel value of a current block may be generated by not only using a pixel value of a first reference block of a first reference picture and a pixel value of a second reference block of a second reference picture, but also using a first gradient value of the first reference block and a second gradient value of the second reference block, in a bi-directional motion prediction mode. Accordingly, encoding and decoding efficiency may be increased since a prediction block similar to an original block may be generated.
Provided is a computer-readable recording medium having recorded thereon a program for executing a method according to various embodiments.
Here, aspects of various embodiments are not limited thereto, and additional aspects will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the presented embodiments.
Aspects of the present disclosure are not limited thereto, and additional aspects will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the presented embodiments.
According to an aspect of the present disclosure, a video decoding method includes: obtaining, from a bitstream, motion prediction mode information regarding a current block in a current picture; when the obtained motion prediction mode information indicates a bi-directional motion prediction mode, obtaining, from the bitstream, 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; generating a pixel value of a first pixel from among pixels of the first reference block indicated by the first motion vector and a pixel value of a second pixel from among pixels of the second reference block indicated by the second motion vector by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel; generating a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region and the second neighboring region; and generating a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel.
The generating of the prediction pixel value of the current block may include: determining displacement vectors per unit time in a horizontal direction and a vertical direction by using gradient values of pixels in a first window having a certain size and including the first pixel, gradient values of pixels in a second window having a certain size and including the second pixel, pixel values of the pixels in the first window, and pixel values of the pixels in the second window; and generating the prediction pixel value of the current block by further using the displacement vectors per unit time in the horizontal direction and the vertical direction, a first temporal distance between the current picture and the first reference picture, and a second temporal distance between the current picture and the second reference picture.
The first motion vector may be a vector indicating the first pixel at a fractional pixel position (i+α, j+β), wherein i and j are each an integer and α and β are each a fraction, and the generating of the gradient value of the first pixel and the gradient value of the second pixel may include: generating a gradient value at a pixel position (i, j+β) by applying a gradient filter to a pixel value at a pixel position (i,j) and pixel values of integer pixels positioned in a vertical direction from a pixel at the pixel position (i,j); and generating a gradient value of the first pixel in the vertical direction at the fractional pixel position (i+α, j+β) by applying an interpolation filter to the gradient value at the pixel position (i, j+β) and gradient values of pixels, in which a position of a horizontal component is an integer pixel position, from among pixels positioned in the horizontal direction from the pixel position (i, j+β).
The first motion vector may be a vector indicating the first pixel at a fractional pixel position (i+α, j+β), wherein i and j are each an integer and α and β are each a fraction, and the generating of the gradient value of the first pixel and the gradient value of the second pixel may include: generating a pixel value at a pixel position (i, j+β) by applying an interpolation filter to a pixel value at a pixel position (i,j) and pixel values of integer pixels positioned in a vertical direction from a pixel at the pixel position (i,j); and generating a gradient value of the first pixel in the horizontal direction at the fractional pixel position (i+α, j+β) by applying a gradient filter to the pixel value at the pixel position (i, j+β) and pixel values of pixels, in which a position of a horizontal component is an integer pixel position, from among pixels positioned in the horizontal direction from the pixel position (i, j+β).
The generating of the gradient value at a pixel position (i, j+β) may include generating the gradient value at the pixel position (i, j+β) by applying an M-tap gradient filter with respect to the pixel at the pixel position (i,j) and M−1 neighboring integer pixels positioned in the vertical direction from the pixel at the pixel position (i,j), wherein M is an integer, and the generating of the gradient value of the first pixel in the vertical direction at the fractional pixel position (i+α, j+β) may include generating the gradient value of the first pixel in the vertical direction at the fractional pixel position (i+α, j+β) by applying an N-tap interpolation filter with respect to the gradient value at the pixel position (i, j+β) and gradient values of N−1 pixels, in which a position of a horizontal component is an integer pixel position, from among pixels positioned in the horizontal direction from the pixel position (i, j+β), wherein N is an integer.
The generating of the pixel value at the pixel position (i, j+β) may include generating the pixel value at the pixel position (i, j+β) by applying an N-tap interpolation filter with respect to the pixel value at the pixel position (i, j+β) and pixel values of N−1 neighboring pixels, in which a component in a predetermined direction is an integer, the N−1 neighboring pixels positioned in the vertical direction from the pixel position (i, j+β), wherein Nis an integer, and the generating of the gradient value of the first pixel in the horizontal direction at the fractional pixel position (i+α, j+β) may include generating the gradient value of the first pixel in the horizontal direction at the fractional pixel position (i+α, j+β) by applying an M-tap gradient filter with respect to the pixel value at the pixel position (i, j+β) and pixel values of M−1 pixels, in which a position of a horizontal component is an integer pixel position, from among the pixels positioned in the horizontal direction from the pixel position (i, j+β), wherein M is an integer.
The N-tap interpolation filter may be a discrete cosine transform-based interpolation filter for a pixel value at a fractional pixel position in a horizontal direction, and N may be 6.
The M-tap gradient filter may be an interpolation filter for a gradient value at a fractional pixel position in a vertical direction, in which a filter coefficient is pre-determined by using a discrete cosine transform-based interpolation filter in the vertical direction, and M may be 6.
The generating of the gradient value at the pixel position (i, j+β) by applying the M-tap gradient filter may include generating the gradient value at the pixel position (i, j+β) by performing de-scaling on a value to which the M-tap gradient filter is applied, based on a de-scaling bit number, wherein the de-scaling bit number may be based on a bit depth of a sample, and the de-scaling may include bit-shifting to right by the de-scaling bit number.
When a filter coefficient of the M-tap gradient filter is scaled by 2{circumflex over ( )}x and a filter coefficient of the N-tap interpolation filter is scaled by 2{circumflex over ( )}y, wherein x and y are each an integer, the generating of the gradient value of the first pixel in the vertical direction at the fractional pixel position (i+α, j+β) by applying the N-tap interpolation filter may include generating the gradient value of the first pixel in the vertical direction at the fractional pixel position (i+α, j+β) by performing de-scaling on a value to which the N-tap interpolation filter is applied, based on a de-scaling bit number, the de-scaling bit number may be based on a bit depth of a sample, x, and y, and the de-scaling may include bit-shifting to right by the de-scaling bit number.
According to another aspect of the present disclosure, a video decoding apparatus includes: an obtainer configured to obtain, from a bitstream, motion prediction mode information regarding a current block in a current picture, and when the obtained motion prediction mode information indicates a bi-directional motion prediction mode, obtain, from the bitstream, 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; and an inter predictor configured to generate a pixel value of a first pixel from among pixels of the first reference block indicated by the first motion vector and a pixel value of a second pixel from among pixels of the second reference block indicated by the second motion vector by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel, generate a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region and the second neighboring region, and generate a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel.
According to another aspect of the present disclosure, a video encoding method includes: determining a first reference block of a first reference picture corresponding to a current block in a current picture, and a second reference block of a second reference picture corresponding to the current block, and determining a first motion vector indicating the first reference block and a second motion vector indicating the second reference block; generating a pixel value of a first pixel from among pixels of the first reference block and a pixel value of a second pixel from among pixels of the second reference block, by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel; generating a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region of the first pixel and the second neighboring region of the second pixel, and generating a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel; and generating a bitstream including information about the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode of the current block is a bi-directional motion prediction mode.
According to another aspect of the present disclosure, a video encoding apparatus includes: an inter predictor configured to determine a first reference block of a first reference picture corresponding to a current block in a current picture, and a second reference block of a second reference picture corresponding to the current block, determine a first motion vector indicating the first reference block and a second motion vector indicating the second reference block, generate a pixel value of a first pixel from among pixels of the first reference block and a pixel value of a second pixel from among pixels of the second reference block, by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel, generate a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region of the first pixel and the second neighboring region of the second pixel, and generate a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel; and a bitstream generator configured to generate a bitstream including information about the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode of the current block is a bi-directional motion prediction mode.
According to another aspect of the present disclosure, a computer-readable recording medium has recorded thereon a program for executing a method according to various embodiments.
According to various embodiments, encoding 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 bi-directional motion prediction mode to predict a value similar to that of an original block of the current block.
According to an aspect of the present disclosure, a video decoding method includes: obtaining, from a bitstream, motion prediction mode information regarding a current block in a current picture; when the obtained motion prediction mode information indicates a bi-directional motion prediction mode, obtaining, from the bitstream, 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; generating a pixel value of a first pixel from among pixels of the first reference block indicated by the first motion vector and a pixel value of a second pixel from among pixels of the second reference block indicated by the second motion vector by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel; generating a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region and the second neighboring region; and generating a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel.
According to another aspect of the present disclosure, a video decoding apparatus includes: an obtainer configured to obtain, from a bitstream, motion prediction mode information regarding a current block in a current picture, and when the obtained motion prediction mode information indicates a bi-directional motion prediction mode, obtain, from the bitstream, 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; and an inter predictor configured to generate a pixel value of a first pixel from among pixels of the first reference block indicated by the first motion vector and a pixel value of a second pixel from among pixels of the second reference block indicated by the second motion vector by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel, generate a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region and the second neighboring region, and generate a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel.
According to another aspect of the present disclosure, a video encoding method includes: determining a first reference block of a first reference picture corresponding to a current block in a current picture, and a second reference block of a second reference picture corresponding to the current block, and determining a first motion vector indicating the first reference block and a second motion vector indicating the second reference block; generating a pixel value of a first pixel from among pixels of the first reference block and a pixel value of a second pixel from among pixels of the second reference block, by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel; generating a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region of the first pixel and the second neighboring region of the second pixel, and generating a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel; and generating a bitstream including information about the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode of the current block is a bi-directional motion prediction mode.
According to another aspect of the present disclosure, a video encoding apparatus includes: an inter predictor configured to determine a first reference block of a first reference picture corresponding to a current block in a current picture, and a second reference block of a second reference picture corresponding to the current block, determine a first motion vector indicating the first reference block and a second motion vector indicating the second reference block, generate a pixel value of a first pixel from among pixels of the first reference block and a pixel value of a second pixel from among pixels of the second reference block, by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel, generate a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region of the first pixel and the second neighboring region of the second pixel, and generate a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel; and a bitstream generator configured to generate a bitstream including information about the first motion vector and the second motion vector and motion prediction mode information indicating that a motion prediction mode of the current block is a bi-directional motion prediction mode.
According to another aspect of the present disclosure, a computer-readable recording medium has recorded thereon a program for executing a method according to various embodiments.
Hereinafter, an ‘image’ may denote a still image of a video, or a moving image, i.e., a video itself.
Hereinafter, a ‘sample’ denotes data that is assigned to a sampling location of an image and is to be processed. For example, pixels in an image of a spatial domain may be samples.
Hereinafter, a ‘current block’ may denote a block of an image to be encoded or decoded.
A video decoding apparatus 100 according to various embodiments includes an obtainer 105 and an inter predictor 110.
The obtainer 105 receives a bitstream 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 bitstream, the information about the prediction mode of the current block, the information indicating the motion prediction mode of the current block, and the information about the motion vector. Also, the obtainer 105 may obtain, from the bitstream, a reference picture index indicating a reference picture from 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 pictures decoded before a current picture including the current block. For example, when the motion prediction mode of the current block is a bi-directional motion prediction mode, the inter predictor 110 may generate the prediction pixel value of the current block by using two pictures decoded before the current picture. In other words, when the information about the motion prediction mode obtained from the bitstream indicates the bi-directional motion prediction mode, the inter predictor 110 may generate the prediction pixel value of the current block by using the two pictures decoded before the current picture.
The inter predictor 110 may include a block unit motion compensator 115 and a pixel unit motion compensator 120.
The block unit motion compensator 115 may 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 bitstream. Here, the reference picture index may denote a reference picture index with respect to each of prediction directions including an L0 direction and an L1 direction. Here, the reference picture index with respect to the L0 direction may denote an index indicating a reference picture among pictures included in an L0 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 positioned in the at least one reference picture by using the information about the motion vector received from the bitstream. Here, a corresponding block that corresponds to the current block 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 from 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 upper left coordinates of the current block are (1, 1) and upper left coordinates of the reference block in the reference picture are (3, 3), the motion vector may be (2, 2).
Here, the information about the motion vector may include a differential value of the motion vector, and the block unit motion compensator 115 may reconstruct the motion vector by using a predictor of the motion vector and the differential value of the motion vector obtained from the bitstream, and determine the reference block of the current block positioned 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 L0 direction and the L1 direction. Here, the differential value of the motion vector with respect to the L0 direction may denote a differential value of a motion vector indicating the reference block in the reference picture included in the L0 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 corresponding 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 that corresponds 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 bi-directional motion prediction mode, the block unit motion compensator 115 may determine two reference pictures from among the previously encoded 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 generate a motion compensation value in block units by performing the motion compensation on the current block in block units, by 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 a position of an integer pixel, but is not limited thereto, and may be a position of a fractional pixel. Here, the integer pixel may denote a pixel in which a position component is an integer, and may be a pixel at an integer pixel position. The 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 upper left coordinates of the current block are (1, 1) and the motion vector is (2.5, 2.5), the upper left coordinates of the reference block in the reference picture may be (3.5, 3.5). Here, the position of the fractional pixel may be determined in ¼ pel or 1/16 pel units, wherein pel denotes a pixel element. Alternatively, the position of the fractional pixel may be determined in various fractional pel units.
When the reference position of the reference block is the position of the fractional pixel, the block unit motion compensator 115 may generate a pixel value of a first pixel from among pixels of a first reference block indicated by a first motion vector and a pixel value of a second pixel from 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 may be determined by using pixel values of neighboring pixels in which a component in a certain direction is an integer. Here, the certain direction may be a horizontal direction or a vertical direction.
For example, the block unit motion compensator 115 may determine, as the pixel value of the reference pixel, a value obtained by performing filtering on 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 with respect 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 be a discrete cosine transform (DCT)-based M-tap interpolation filter. A coefficient of the DCT-based M-tap interpolation filter may be induced from DCT and inverse DCT (IDCT). Here, the coefficient of the interpolation filter may be a filter coefficient scaled to an integer coefficient so as to reduce real number operations during the filtering. Here, the interpolation filter may be a one-dimensional (1D) interpolation filter in a horizontal or vertical direction. For example, when a position of a pixel is expressed in x, y orthogonal 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 first perform filtering with respect to pixel values of pixels at an integer position by using the 1D interpolation filter in the vertical direction, and then perform filtering with respect to a value generated via the filtering by using the 1D interpolation filter in the horizontal direction to determine the pixel value of the reference pixel at the fractional pixel position.
Meanwhile, the value generated via the filtering when a scaled filter coefficient is used may be higher than a value generated via filtering when an un-scaled filter is used. Accordingly, the block unit motion compensator 115 may perform de-scaling with respect to the value generated via the filtering.
The block unit motion compensator 115 may perform the de-scaling after performing filtering on the pixel values of the pixels at the integer position by using the 1D interpolation filter in the vertical direction. Here, the de-scaling may include bit-shifting to the right by a de-scaling bit number. The de-scaling bit number may be determined based on a bit depth of a sample of an input image. For example, the de-scaling 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 the filtering with respect to the pixel values of the pixels at the integer position by using the 1D interpolation filter in the vertical direction, and perform the filtering with respect to the value generated via the filtering by using the 1D interpolation filter in the horizontal direction, and then perform the de-scaling. Here, the de-scaling may include bit-shifting to the right by a de-scaling bit number. The de-scaling bit number may be determined based on a scaling bit number of the 1D interpolation filter in the vertical direction, a scaling bit number of the 1D interpolation filter in the horizontal direction, and the bit depth of the sample. For example, when the scaling bit number p of the 1D interpolation filter in the vertical direction is 6, the scaling bit number q of the 1D interpolation filter in the horizontal direction is 6, and the bit depth of the sample is b, the de-scaling bit number may be p+q+8−b, i.e., 20−b.
When the block unit motion compensator 115 performs only bit-shifting to the right by a de-scaling bit number after performing filtering with respect to a pixel, in which a component in a certain direction is an integer, by using a 1D interpolation filter, a round-off error may be generated, and thus the block unit motion compensator 115 may perform the de-scaling after performing the filtering with respect to the pixel, in which the component in the certain direction is the integer, by using the 1D interpolation filter, and then adding an offset value. Here, the offset value may be 2{circumflex over ( )}(de-scaling bit number−1).
The pixel unit motion compensator 120 may generate a motion compensation value in pixel units by performing motion compensation on the current block in pixel units. When the motion prediction mode of the current block is the bi-directional motion prediction mode, the pixel unit motion compensator 120 may generate the motion compensation value in pixel units by performing motion compensation on the current block in pixel units.
The pixel unit motion compensator 120 may generate the motion compensation value in pixel units by performing the motion compensation on the current block in pixel units, based on an optical flow of the pixels of the first reference picture and second reference picture. The optical flow will be described later with reference to
The pixel unit motion compensator 120 may generate the motion compensation value in pixel units by performing the motion compensation in pixel units with respect to pixels included in the reference block of the current block.
The pixel unit motion compensator 120 may determine the reference pixel in the reference block, which corresponds to the current pixel of the current block, and determine a gradient value of the reference pixel.
The pixel unit motion compensator 120 may generate the motion compensation value in pixel units by performing the motion compensation in pixel units with respect to the current block by using the gradient value of the reference pixel.
The pixel unit motion compensator 120 may generate a gradient value of the first pixel from among pixels of the first reference block indicated by the first motion vector and a gradient value of the second pixel from among pixels of the second reference block indicated by the second motion vector, by applying a filter to a first neighboring region of the first pixel including the first pixel and a second neighboring region of the second pixel including the second pixel.
The pixel unit motion compensator 120 may determine pixel values and gradient values of pixels in a first window having a certain size and including the first pixel around the first pixel in the first reference picture, and determine pixel values and gradient values of pixels in a second window having a certain size and including the second pixel around the second pixel in the second reference picture.
The pixel unit motion compensator 120 may determine a displacement vector per unit time with respect to the current pixel, by using the pixel values and gradient values of the pixels in the first window and the pixel values and gradient values of the pixels in the second window.
The pixel unit motion compensator 120 may perform the motion compensation on the current block in pixel units, by using the displacement vector per unit time with respect to the current pixel and the gradient value of the reference pixel.
A reference position of the reference block may be an integer pixel position, but alternatively, may 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 may be determined by using pixel values of neighboring pixels, in which a component in a certain direction is an integer.
For example, the pixel 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 the neighboring pixels, in which the component in the certain direction is an integer, by using a gradient filter. Here, a filter coefficient of the gradient filter may be determined by using a coefficient pre-determined 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 so as to reduce real number operations during the filtering.
Here, the gradient filter may be a 1D gradient filter in a horizontal or vertical direction.
The pixel 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 1D gradient filter in the horizontal or vertical direction, so as to determine a gradient value of the reference pixel in the horizontal or vertical direction.
For example, the pixel 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 from a pixel, in which a horizontal direction component is an integer, from among pixels adjacent to the reference pixel, by using the 1D gradient filter in the horizontal direction.
When the position of the reference pixel is (x+α, y+β), wherein x and y are each an integer and α and β are each a fraction, the pixel unit motion compensator 120 may determine, as a pixel value at a (x, y+β) position, a result value obtained by performing filtering on a pixel at a (x, y) position and a pixel, in which a vertical component is an integer, from among pixels positioned in the vertical direction from the pixel at the (x, y) position, by using the 1D interpolation filter.
The pixel unit motion compensator 120 may determine, as a gradient value at a (x+α, y+β) position in the horizontal direction, a result value obtained by performing filtering on the pixel value at the (x, y+β) position 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 (x, y+β) position, by using the 1D gradient filter in the horizontal direction.
An order of using the 1D gradient filter and the 1D interpolation filter is not limited. In the above description, an interpolation filtering value in a vertical direction is first generated by performing filtering on a pixel at an integer position by using a 1D interpolation filter in the vertical direction, and then filtering is performed on the interpolation filtering value in the vertical direction by using a 1D gradient filter in a horizontal direction, but alternatively, an interpolation filtering value in the horizontal direction may be generated first by performing filtering on the pixel at the integer position by using the 1D gradient filter in the horizontal direction, and then filtering may be performed on the interpolation filtering value in the horizontal direction by using the 1D interpolation filter in the vertical direction.
Hereinabove, the pixel unit motion compensator 120 determining a gradient value in a horizontal direction at a (x+α, y+β) position has been described in detail. Since the pixel unit motion compensator 120 determines a gradient value in a vertical direction at a (x+α, y+β) position in the similar manner as determining of a gradient value in a horizontal direction, details thereof are not provided again.
Hereinabove, the pixel unit motion compensator 120 using a 1D gradient filter and a 1D interpolation filter so as 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 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 in a fractional pixel. For example, an interpolation filter coefficient in 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 may be performed by only using a pixel value of a current integer pixel, and as a result, filtering may 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 unit motion compensator 120 may perform de-scaling after performing filtering on a pixel at an integer position by using a 1D interpolation filter in a vertical direction. Here, the de-scaling may include bit-shifting to the right by a de-scaling bit number. The de-scaling bit number may be determined based on a bit depth of a sample. For example, the de-scaling bit number may be a value obtained by subtracting 8 from the bit depth of the sample.
The pixel unit motion compensator 120 may perform de-scaling after performing filtering on a value generated by performing the de-scaling by using a gradient filter in a horizontal direction. Likewise here, the de-scaling may include bit-shifting to the right by the de-scaling bit number. The de-scaling bit number may be determined based on a scaling bit number of a 1D interpolation filter in a vertical direction, a scaling bit number of a 1D gradient filter in a horizontal direction, and a bit depth of a sample. For example, when the scaling bit number p of the 1D interpolation filter in the vertical direction is 6, the scaling bit number q of the 1D gradient filter in the horizontal direction is 4, and the bit depth of the sample is b, the de-scaling bit number may be p+q+8−b, i.e., 18−b.
When the pixel unit motion compensator 120 performs only bit-shifting to the right by a de-scaling bit number on a value generated via filtering after performing the filtering, a round-off error may be generated, and thus the pixel unit motion compensator 120 may perform the de-scaling after adding an offset value to the value generated via the filtering. Here, the offset value may be 2{circumflex over ( )}(de-scaling bit number−1).
The inter predictor 110 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 units with respect to the current block. For example, the inter predictor 110 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 units with respect to the current block. Here, the motion compensation value in block units may denote a value generated by performing motion compensation in block units, and the motion compensation value in pixel units denote a value generated by performing motion compensation in pixel units, wherein the motion compensation value in block units may be an average value or weighted sum of the reference pixel, and the motion compensation value in pixel units may be a value determined based on the displacement vector related to the current pixel and the gradient value of the reference pixel.
The video decoding apparatus 100 may obtain a residual block of the current block from the bitstream, and reconstruct the current block by using the residual block and the prediction pixel value of the current block. For example, the video decoding apparatus 100 may determine, from the bitstream, a pixel value of a reconstructed block by adding a pixel value of the residual block of the current block and the prediction pixel value 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 and the inter predictor 110. The image decoder will be described below with reference to
In operation S105, the video decoding apparatus 100 may obtain, from a bitstream, motion prediction mode information with respect to a current block in a current picture. The video decoding apparatus 100 may receive the bitstream 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 bitstream.
The video decoding apparatus 100 may obtain, from the bitstream, 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, when the prediction mode of the current block is an inter prediction mode, the video decoding apparatus 100 may obtain the motion prediction mode information with respect to the current block.
For example, the video decoding apparatus 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 from the bitstream.
In operation S110, when the motion prediction mode information indicates a bi-directional motion prediction mode, the video decoding apparatus 100 may obtain, from the bitstream, 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 bitstream including information about the first and second motion vectors, and obtain the first and second motion vectors from the received bitstream. The video decoding apparatus 100 may obtain a reference picture index from the bitstream, and determine the first and second reference pictures from among previously decoded pictures based on the reference picture index.
In operation S115, the video decoding apparatus 100 may generate a pixel value of a first pixel from among pixels of the first reference block indicated by the first motion vector and a pixel value of a second pixel from among pixels of the second reference block indicated by the second motion vector, by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel.
In operation S120, the video decoding apparatus 100 may generate a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to the first neighboring region and the second neighboring region. Here, the filter may be a 1D filter, and may include a gradient filter and an interpolation filter.
In operation S125, the video decoding apparatus 100 may generate a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel.
The video decoding apparatus 100 may obtain a residual signal regarding the current block from the bitstream, and reconstruct the current block by using the residual signal and the prediction pixel value of the current block. In other words, the video decoding apparatus 100 may generate a pixel value of a reconstructed block of the current block by adding the prediction pixel value of the current block and a residual pixel value of the current block indicated by the residual signal.
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. In other words, when a prediction mode of the current block is an inter prediction mode, the inter predictor 155 may generate a prediction pixel value of the current block by using at least one of pictures encoded before a current picture included in the current block.
The inter predictor 155 may include a block unit motion compensator 160 and a pixel unit motion compensator 165.
The block unit motion compensator 160 may generate 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 encoded pictures, and determine a reference block of the current block positioned in the at least one reference picture.
The block unit motion compensator 160 may generate the motion compensation value in block units by performing the motion compensation on the current block in block units, by using a pixel value of the reference block. The block unit motion compensator 160 may generate the motion compensation value in block units by performing the motion compensation on the current block in block units by 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 the 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 a motion prediction mode of the current block is a bi-directional prediction mode, the block unit motion compensator 160 may determine two reference pictures from among the previously encoded pictures, and determine two reference blocks included in the two reference pictures. Here, bi-directional prediction does not only mean that inter prediction is performed by using a picture displayed before the current picture and a picture displayed after the current picture, but may also mean that inter prediction is performed by using two pictures encoded before the current picture regardless of an order of being displayed.
The block unit motion compensator 160 may generate the motion compensation value in block units by performing the 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 160 may generate the motion compensation value in block units by performing the motion compensation on the current block in block units, by using an average pixel value or weighted sum 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 encoded 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 motion vector. The motion vector may denote 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 coordinates of an upper left corner of the current block are (1, 1) and upper left coordinates of the reference block in the reference picture are (3, 3), the motion vector may be (2, 2).
A reference position of the reference block may be a position of an integer pixel, but alternatively, may be a position of a fractional pixel. Here, the position of the fractional pixel may be determined in ¼ pel or 1/16 pel units. Alternatively, the position of the fractional pixel may be determined in various fractional pel 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 ¼ or 1/16 pel units to indicate the reference position of the reference block, which is a position of a fractional pixel, a motion vector of an integer is determined by scaling the motion vector, and the reference position of the reference block may be determined by using the up-scaled motion vector. When the reference position of the reference block is a position of a fractional pixel, a position of the reference pixel of the reference block may also be a position of a fractional pixel. Accordingly, a pixel value at a fractional pixel position in the reference block may 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 determine 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 M-tap interpolation filter. A coefficient of the DCT-based M-tap interpolation filter may be induced from DCT and IDCT. Here, the coefficient of the interpolation filter may be a filter coefficient scaled to an integer coefficient so as to reduce real number operations during the filtering.
Here, the interpolation filter may be a 1D 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 a 1D interpolation filter in a vertical direction, and then perform filtering with respect to a value on which the filtering is performed, by using a 1D 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 de-scaling on a value on which filtering is performed, after performing filtering on a pixel at an integer position by using the 1D interpolation filter in the vertical direction. Here, the de-scaling may include bit-shifting to the right by a de-scaling bit number. The de-scaling bit number may be determined based on a bit depth of a sample. For example, the de-scaling bit number may be a value obtained by subtracting 8 from the bit depth of the sample.
Also, the block unit motion compensator 160 may perform filtering on a pixel, in which a horizontal direction component is an integer, by using the 1D interpolation filter in the vertical direction, and then perform the bit-shifting to the right by the de-scaling bit number. The de-scaling bit number may be determined based on a scaling bit number of the 1D interpolation filter in the vertical direction, a scaling bit number of the 1D interpolation filter in the horizontal direction, and the bit depth of the sample.
When the block unit motion compensator 160 performs only bit-shifting to the right by a de-scaling bit number, a round-off 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 a 1D interpolation filter in the certain direction, add an offset value to a value on which the filtering is performed, and then perform de-scaling on a value to which the offset value is added. Here, the offset value may be 2{circumflex over ( )}(de-scaling bit number−1).
Hereinabove, determining of a de-scaling bit number based on a bit depth of a sample after filtering using a 1D interpolation filter in a vertical direction has been described, but alternatively, the de-scaling bit number may be determined not only the bit depth of the sample, but also a bit number scaled with respect to an interpolation filter coefficient. In other words, the de-scaling bit number may be determined based on the bit depth of the sample and the bit number scaled with respect to the interpolation coefficient, within a range that overflow does not occur, while considering a size of a register used during filtering and a size of a buffer storing a value generated during the filtering.
The pixel unit motion compensator 165 may generate a motion compensation value in pixel units by performing motion compensation on the current block in pixel units. For example, when the motion prediction mode is a bi-directional motion prediction mode, the pixel unit motion compensator 165 may generate the motion compensation value in pixel units by performing the motion compensation on the current block in pixel units.
The pixel unit motion compensator 165 may generate the motion compensation value in pixel units by performing the motion compensation on the current block in pixel units, by using gradient values of pixels included in the reference block of the current block.
The pixel unit motion compensator 165 may generate a gradient value of a first pixel from among pixels of a first reference block in a first reference picture and a gradient value of a second pixel from among pixels of a second reference block in a second reference picture by applying a filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel.
The pixel 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 picture, 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 picture. The pixel unit motion compensator 165 may determine a displacement vector per unit time with respect to the current pixel by using the pixel values and gradient values of the pixels in the first window and the pixel values and gradient values of the pixels in the second window.
The pixel unit motion compensator 165 may generate the motion compensation value in pixel units by performing the motion compensation on the current block in pixel units, by using the displacement vector per unit time and a gradient value of the reference pixel.
A position of the reference pixel may be a position of an integer pixel, but alternatively, may be a position of a fractional pixel.
When a reference position of the reference block is a position of a fractional pixel, the gradient value of the reference pixel in the reference block may be determined by using pixel values of neighboring pixels, in which a component in a certain direction is an integer.
For example, the pixel 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 the 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 may be determined by using a coefficient pre-determined 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 so as to reduce real number operations during the filtering. Here, the gradient filter may be a 1D gradient filter in a horizontal or vertical direction.
The pixel unit motion compensator 165 may perform filtering on a neighboring pixel, in which a component in a corresponding direction is an integer, by using a 1D gradient filter in a horizontal or vertical direction, so as to determine a gradient value of the reference pixel in the horizontal or vertical direction.
For example, the pixel 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, from among pixels in a vertical direction from an integer pixel adjacent to a reference pixel, by using a 1D interpolation filter in the vertical direction.
With respect to a pixel positioned in another column adjacent to the integer pixel adjacent to the reference pixel, the pixel unit motion compensator 165 may determine a pixel value of a fractional pixel position positioned in the other column by performing filtering on a neighboring integer pixel in the vertical direction, by using the 1D interpolation filter in the vertical direction. Here, a position of the pixel positioned in the other column may be a position of a fractional pixel in the vertical direction and a position of an integer pixel in the horizontal direction.
In other words, when the position of the reference pixel is (x+α, y+β), wherein x and y are each an integer and α and β are each a fraction, the pixel unit motion compensator 165 may determine a pixel value at a (x, y+β) position by performing filtering on a neighboring integer pixel in the vertical direction from a (x, y) position by using an interpolation filter in the vertical direction.
The pixel unit motion compensator 165 may determine a gradient value at a (x+α, y+β) position in the horizontal direction by performing filtering on the pixel value at the (x, y+β) position and a pixel value of a pixel, in which a horizontal component is an integer, from among pixels positioned in the horizontal direction from the pixel value at the (x, y+β) position, by using a gradient filter in the horizontal direction.
An order of using the 1D gradient filter and the 1D interpolation filter is not limited. As described above, an interpolation filtering value in a vertical direction may be first generated by performing filtering on a pixel at an integer position by using a 1D interpolation filter in the vertical direction, and then filtering may be performed on the interpolation filtering value in the vertical direction by using a 1D gradient filter in a horizontal direction, but alternatively, a gradient filtering value in the horizontal direction may be generated first by performing filtering on the pixel at the integer position by using the 1D gradient filter in the horizontal direction, and then filtering may be performed on the gradient filtering value in the horizontal direction by using the 1D interpolation filter in the vertical direction.
Hereinabove, the pixel unit motion compensator 165 determining a gradient value in a horizontal direction at a (x+α, y+β) position has been described in detail.
The pixel unit motion compensator 165 may determine a gradient value in a vertical direction at a (x+α, y+β) position in the similar manner as determining of a gradient value in a horizontal direction.
The pixel unit motion compensator 165 may determine a gradient value of a reference pixel in a vertical direction by performing filtering on a neighboring integer pixel in the vertical direction from integer pixels adjacent to the reference pixel, by using a 1D gradient filter in the vertical direction. Also with respect to a pixel adjacent to the reference pixel and positioned in another column, the pixel 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 performing filtering on a neighboring integer pixel in the vertical direction, by using the 1D gradient filter in the vertical direction. Here, a position of the pixel may be a position of a fractional pixel in the vertical direction and a position of an integer pixel in a horizontal direction.
In other words, when a position of a reference pixel is (x+α, y+β), wherein x and y are each an integer, and α and β are each a fraction, the pixel unit motion compensator 165 may determine a gradient value in a vertical direction at a (x, y+β) position by performing filtering on a neighboring integer pixel in the vertical direction from a (x, y) position, by using a gradient filter in the vertical direction.
The pixel unit motion compensator 165 may determine a gradient value in a vertical direction at a (x+α, y+β) position by performing filtering on a gradient value at a (x, y+β) position and a gradient value of a neighboring integer pixel positioned in a horizontal direction from the (x, y+β) position, by using an interpolation filter in the horizontal direction.
An order of using the 1D gradient filter and the 1D interpolation filter is not limited. As described above, a gradient filtering value in a vertical direction may be first generated by performing filtering on pixels at an integer position by using a 1D gradient filter in the vertical direction, and then filtering may be performed on the gradient filtering value in the vertical direction by using a 1D interpolation filter in a horizontal direction, but alternatively, an interpolation filtering value in the horizontal direction may be generated first by performing filtering on the pixel at the integer position by using the 1D interpolation filter in the horizontal direction, and then filtering may be performed on the interpolation filtering value in the horizontal direction by using the 1D gradient filter in the vertical direction.
Hereinabove, the pixel unit motion compensator 165 using a gradient filter and an interpolation filter so as 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 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 in a fractional pixel. For example, an interpolation filter coefficient in an integer pixel may be {0, 0, 64, 0, 0}, and since an interpolation filter coefficient multiplied to the neighboring integer pixel is 0, filtering may be performed by only using a pixel value of a current integer pixel, and as a result, the pixel value of the current integer pixel may identically determined as a value generated by performing filtering on the current integer pixel and the neighboring integer pixel by using the interpolation filter.
Meanwhile, when a scaled filter coefficient is used, the pixel unit motion compensator 165 may perform filtering on a pixel at an integer position by using a 1D gradient filter in a horizontal direction, and then perform de-scaling on a value on which the filtering is performed. Here, the de-scaling may include bit-shifting to the right by a de-scaling bit number. The de-scaling bit number may be determined based on a bit depth of a sample. For example, the de-scaling bit number may be a value obtained by subtracting 8 from the bit depth of the sample.
The pixel 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 de-scaling. Here, the de-scaling may include bit-shifting to the right by a de-scaling bit number. The de-scaling bit number may be determined based on a scaling bit number of a 1D interpolation filter in the vertical direction, a scaling bit number of a 1D gradient filter in a horizontal direction, and the bit depth of the sample.
When the pixel unit motion compensator 165 performs only bit-shifting to the right by a de-scaling bit number, a round-off error may be generated. Thus, the pixel unit motion compensator 165 may perform filtering by using a 1D interpolation filter, add an offset value to a value on which the filtering is performed, and then perform de-scaling on a value to which the offset value is added. Here, the offset value may be 2{circumflex over ( )}(de-scaling bit number−1).
The inter predictor 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 units with respect to the current block. For example, the inter predictor 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 units with respect to the current block. In particular, when the motion prediction mode of the current block is a bi-directional motion prediction mode, the inter predictor 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 units with respect to the current block.
When the motion prediction mode of the current block is a uni-directional motion prediction mode, the inter predictor 155 may generate the prediction pixel value of the current block by using the motion compensation value in block units with respect to the current block. Here, a uni-direction denotes that one reference picture is used from among the previously encoded pictures. The one reference picture may be a picture displayed before the current picture, but alternatively, may be a picture displayed after the current picture.
The inter predictor 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 predictor 155 may determine the motion prediction mode of the current block to be a bi-directional motion prediction mode, and output information indicating the bi-directional motion prediction mode. Here, the bi-directional motion prediction mode denotes a mode in which motion is predicted by using reference blocks in two decoded reference pictures.
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 L0 direction and an L1 direction. Here, the differential value of the motion vector with respect to the L0 direction may denote a differential value of a motion vector indicating a reference picture in a reference picture included in an L0 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 an L1 reference picture list.
Also, the bitstream generator 170 may generate the bitstream further including information indicating the motion prediction mode of the current block. The bitstream generator 170 may encode a reference picture index indicating the reference picture of the current block from among the previously encoded pictures, and generate a bitstream including the encoded reference picture index. Here, the reference picture index may denote a reference picture index with respect to each of prediction directions including an L0 direction and an L1 direction. Here, the reference picture index with respect to the L0 direction may denote an index indicating a reference picture among pictures included in an L0 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 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
Referring to
In operation S155, the video encoding apparatus 150 may generate a pixel value of a first pixel among pixels of the first reference block and a pixel value of a second pixel among pixels of the second reference block, by applying an interpolation filter to a first neighboring region of the first pixel and a second neighboring region of the second pixel.
In operation S160, the video encoding apparatus 150 may generate a gradient value of the first pixel and a gradient value of the second pixel by applying a filter to a first neighboring region of the first pixel among the pixels of the first reference block and a second neighboring region of the second pixel among the second reference block, and generate a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the gradient value of the first pixel, and the gradient value of the second pixel.
In operation S165, the video encoding apparatus 150 may generate a bitstream 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 bi-directional motion prediction mode.
The video encoding apparatus 150 may encode a residual signal of the current block, the residual signal indicating a difference between the prediction pixel value of the current block and an original block of the current block, and generate the bitstream further including the encoded residual signal. The video encoding apparatus 150 may encode information about a prediction mode of the current block and a reference picture index, and generate the bitstream further including the encoded information about the prediction mode and the encoded 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 from among previously decoded pictures, and generate the bitstream further including the encoded information about the prediction mode and the encoded reference picture index.
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
An intra predictor 640 performs intra prediction per block. An inter predictor 635 performs inter prediction by using a reference image obtained from a reconstructed picture buffer 630, per block. The inter predictor 635 of
Data in a spatial domain with respect to a block of a current image may be reconstructed by adding prediction data and the residue data of each block generated by the intra predictor 640 or the inter predictor 635, and a deblocking unit 645 and an SAO performer 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 picture 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, stepwise operations of the image decoder 600 according to various embodiments may be performed per block.
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 predictor 720 performs intra prediction per block on a current image 705, and an inter predictor 715 performs inter prediction by using the current image 705 per block and a reference image obtained from a reconstructed picture buffer 710. Here, the inter predictor 715 of
Residue data may be generated by subtracting prediction data regarding each block output from the intra predictor 720 or the inter predictor 715 from data regarding an encoded block of the current image 705, and a transformer 725 and a quantizer 730 may output a transformation coefficient quantized per block by preforming transformation and quantization on the residue data. An inverse quantizer 745 and an inverse transformer 750 may reconstruct residue data in a spatial domain by performing inverse quantization and inverse transformation on the quantized transformation coefficient. The reconstructed residue data in the spatial domain may be added to the prediction data regarding each block output from the intra predictor 720 or the inter predictor 715 to be reconstructed as data in spatial domain regarding a block of the current image 705. A deblocking unit 755 and an SAO performer 760 generate a filtered reconstructed image by performing in-loop filtering on the reconstructed data in the spatial domain. The generated reconstructed image is stored in the reconstructed picture buffer 710. Reconstructed images stored in the reconstructed picture buffer 710 may be used as reference images for inter prediction of another image. An entropy encoder 735 may entropy-encode the quantized transformation coefficient, and the entropy-encoded coefficient may be output as a bitstream 740.
In order for the image encoder 700 according to various embodiments to be applied to the video encoding apparatus 150, stepwise operations of the image encoder 700 according to various embodiments may be performed per block.
Referring to
Also, the video encoding 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 encoding apparatus 150 performs block unit bi-directional motion compensation on 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 picture 210 is P0(i,j), a pixel value positioned at (i, j) of the second reference picture 220 is P1(i,j), MV1=(MVx1, MVy1), and MV2=(MVx2, MVy2), wherein i and j are each an integer, a block unit bi-directional motion compensation value P_BiPredBlock(i,j) of a pixel at a (i, j) position of the current block 201 may be calculated according to an equation: P_BiPredBlock(i,j)={P0(i+MVx1, j+MVy1)+P1(i+MVx2, j+MVy2)}/2. As such, the video encoding apparatus 150 may generate the motion compensation value in block units by performing motion compensation on the current block 201 in block unit by using an average value or weighted sum of pixels in the first and second corresponding regions 212 and 222 indicated by the first and second motion vectors MV1 and MV2.
In
Also, P(i,j) denotes a pixel of the current block 300 at a (i, j) position that is bi-directional predicted, P0(i,j) denotes a first reference pixel value of a first reference picture corresponding to the pixel P(i,j) of the current block 300 that is bi-directional predicted, and P1(i,j) denotes a second reference pixel value of a second reference picture corresponding to the pixel P(i,j) of the current block 300 that is bi-directional predicted, wherein i and j each denote 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 bi-directional motion vector MV1 indicating the first reference picture, and the second reference pixel value P1(i,j)() is a pixel value of a pixel corresponding to the pixel P(i,j) of the current block 300 determined by the bi-directional motion vector MV2 indicating the second reference picture.
Also, ∂P0(Ij)/∂x denotes a gradient value of a first reference pixel in a horizontal direction, ∂P0 (Ij)/∂y denotes a gradient value of the first reference pixel in a vertical direction, ∂P0 (Ij)/∂x denotes a gradient value of a second reference pixel in the horizontal direction, and ∂P0 (Ij)/∂y denotes a gradient value of the second reference pixel in the vertical direction.
Also, τ0 denotes a temporal distance between a current picture to which the current block 300 belongs and the first reference picture to which the first corresponding region 310 belongs, and τ1 denotes a temporal distance between the current picture and the second reference picture to which the second corresponding region 320 belongs. Here, a temporal distance between pictures may denote a difference of picture order count (POC) of the pictures.
When there is uniform small motion in a video sequence, a pixel in the first corresponding region 310 of the first reference picture, which is most similar to the pixel P(i,j) on which bi-directional motion compensation is performed in pixel units, is not the first reference pixel P0(i,j), but is a first displacement reference pixel PA, in which the first reference pixel P0(i,j) is moved 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 most similar to the pixel P(i,j), may be a second displacement reference pixel PB, in which the second reference pixel P1(i,j) is moved 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 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 perform motion compensation in pixel units by using the displacement vector.
An optical flow denotes a pattern of apparent motion on an object or surface, which is induced by relative motion between a scene and an observer (eyes or a video image obtaining apparatus like a camera). In a video sequence, an optical flow may be represented by calculating motion between frames obtained at arbitrary times t and t+Δt. A pixel value positioned at (x, y) in the frame of the time t may be I(x,y,t). In other words, I(x,y,t) may be a value changing temporally and spatially. I(x,y,t) may be differentiated according to Equation 1 with respect to the time t.
When a pixel value changes according to motion but does not change according to time with respect to small motion in a block, dI/dt is 0. Also, when motion of a pixel value according to time is uniform, dx/dt may denote the displacement vector Vx of the pixel value I(x,y,t) in the x-axis direction and dy/dt may denote the displacement vector Vy of the pixel value I(x,y,t) in the y-axis direction, and accordingly, Equation 1 may be expressed as Equation 2.
Here, sizes of the displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction may have a value smaller than pixel accuracy used in bi-directional motion prediction. For example, when pixel accuracy is ¼ or 1/16 during bi-directional motion prediction, the sizes of the displacement vectors Vx and Vy may have a value smaller than ¼ or 1/16.
The pixel 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 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 overheads may be induced during encoding when the value of the original signal is used. Accordingly, the pixel unit motion compensator 165 may calculate the displacement vectors Vx and Vy according to Equation 2 by using pixels of the first and second reference pictures, which are determined as results of performing bi-directional motion prediction in block units. In other words, the pixel 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 Ωij having a certain size and including neighboring pixels around the pixel P(i,j) on which bi-directional 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 Ωij, may not exist, and thus 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 of obtaining the displacement vectors Vx and Vy will be described in detail with reference to
In order to determine a prediction pixel value of a current pixel, a function P(t) with respect to t may be determined according to Equation 3.
Here, a picture when t=0 is a current picture in which a current block is included. Accordingly, the prediction pixel value of the current pixel included in the current block may be defined as a value of P(t) when t is 0.
When the temporal distance between the current picture and the first reference picture (the first reference picture is temporally before the current picture) is to and the temporal distance between the current picture and the second reference picture (the second reference picture is temporally after the current picture) is 11, a reference pixel value in the first reference picture is equal to P(−τ0), and a reference pixel value in the second reference picture is equal to P(τ1). Hereinafter, for convenience of calculation, it is assumed that τ0 and τ1 are both equal to T.
Coefficients of each degree of P(t) may be determined according to Equation 4. Here, P0(i,j) may denote a pixel value at a (i,j) position of the first reference picture, and P1(i,j) may denote a pixel value at a (i,j) of the second reference picture.
Accordingly, a prediction pixel value P(0) of the current pixel in the current block may be determined according to Equation 5.
Equation 5 may be expressed as Equation 6 considering Equation 2.
Accordingly, the prediction pixel value of the current pixel may 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 (P0(i,j)+P1(i,j))/2) not related to the displacement vectors Vx and Vy may be a motion compensation value in block 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 may be determined by adding the motion compensation value in block units and the motion compensation value in pixel units.
Hereinabove, processes of determining the prediction pixel value of the current pixel when 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 are both t, and thus the same are described for convenience of description, but the temporal distance between the first reference picture and the current picture may be τ0 and the temporal distance between the second reference picture and the current picture may be τ1. Here, the prediction pixel value P(0) of the current pixel may be determined according to Equation 7.
Considering Equation 2, Equation 7 may be expressed as Equation 8.
Hereinabove, the first reference picture is displayed temporally after the current picture and the second reference picture is displayed temporally before the current picture, but alternatively, the first and second reference pictures may both be displayed temporally before the current picture, or after the current picture.
For example, as shown in
In this case, the prediction pixel value P(0) of the current pixel may be determined according to Equation 9, in which ti indicating the temporal distance between the second reference picture and the current picture in Equation 8 indicated with reference to
For example, as shown in
In this case, the prediction pixel value P(0) of the current pixel may be determined according to Equation 10, in which τ0 indicating the temporal distance between the first reference picture and the current picture in Equation 8 indicated with reference to
However, when the first and second reference pictures are both displayed temporally before the current picture or after the current picture as shown in
Referring to
Pixel values of the fractional pixels P0(i−h,j) 460, P0(i+h,j) 470, P0(i,j−h) 480, and P0(i,j+h) 490 may be calculated by using general interpolation. Also, gradient values of a second reference pixel of a second reference picture in horizontal and vertical directions may also be calculated similarly to Equation 11.
According to an 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 in a reference pixel may be calculated by using a certain filter. A filter coefficient of the certain filter may be determined based on a coefficient of an interpolation filter used to obtain a pixel value at a fractional pixel position considering linearity of a filter.
According to another embodiment, a gradient value may be determined by applying a certain filter to pixels of a reference picture. Referring to
Referring to
Referring to
For example, when a position of a reference pixel is a position of a fractional pixel at (x+α, y+β), wherein x and y are each an integer and α and β are each a fraction, filtering may be performed according to Equation 12 by using a 1D vertical interpolation filter with respect to integer pixels (x,y), (x−1,y), (x+1, y), through (x+MMin,y) and (x+MMax,y) in a horizontal direction, wherein MMin and MMmax are each an integer.
Here, fracFilterβ may denote an interpolation filter for determining a pixel value at a fractional pixel position β in a vertical direction, and fracFilterβ[j′] may denote a coefficient of an interpolation filter applied to a pixel at a (i,j′) position. I[i,j′] may denote a pixel value at the (i,j′) position.
In other words, the first 1D filter may be an interpolation filter for determining a fractional pixel value in a vertical direction. offset1 may denote an offset for preventing a round-off error, and shift1 may denote a de-scaling bit number. Temp[i,j+β] may denote pixel value at a fractional pixel position (i,j+β). Temp[i′,j+β] may also be determined according to Equation 12 by replacing i by i′, wherein i′ is an integer from i+Mmin to, i+Mmax excluding i.
Then, the video decoding apparatus 100 may perform filtering on a pixel value at a fractional pixel position (i,j+β) and a pixel value at a fractional pixel position (i′j+β) by using a second 1D filter.
Here, gradFilterα may be a gradient filter for determining a gradient value at a fractional pixel position α in a horizontal direction. gradFilterα[i′] may denote a coefficient of an interpolation filter applied to a pixel at a (i′,j+β) position. In other words, the second 1D filter may be a gradient filter for determining a gradient value in a horizontal direction. offset2 may denote an offset for preventing a round-off error, and shift2 may denote a de-scaling bit number.
In other words, according to Equation 13, the video decoding apparatus 100 may determine a gradient value ∂I/∂x[i+α,j+β] in a horizontal direction at (i+α,j+β) 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 from the pixel position (i, j+β), by using the gradient filter gradFilterα.
Hereinabove, 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 of determining a gradient value in a horizontal direction by applying a gradient filter and then an interpolation filter will be described.
For example, when a position of a reference pixel is a position of a fractional pixel at (x+α, y+β), wherein x and y are each an integer and α and β are each a fraction, filtering may be performed according to Equation 14 by using the first 1D filter, with respect to integer pixels (x,y), (x−1,y), (x+1, y), through (x+MMin,y) and (x+MMax,y) in a horizontal direction, wherein MMin and MMmax are each an integer.
Here, gradFilterα may denote a gradient filter for determining a gradient value at a fractional pixel position a in a horizontal direction, and gradFilterα[i′] may denote a coefficient of a gradient filter applied to a pixel at a (i′,j) position. I[i′,j] may denote a pixel value at the (i′,j) position.
In other words, the first 1D filter may be an interpolation filter for determining a gradient value of a pixel in a horizontal direction, wherein a horizontal component of a pixel position is a fractional position. offset3 may denote an offset for preventing a round-off error, and shift3 may denote a de-scaling bit number. Temp[i+α,j] may denote a gradient value at a pixel position (i+α,j) in the horizontal direction. Temp[i+α,j′] may also be determined according to Equation 14 by replacing j by j′, wherein 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+α,j) in the horizontal direction and a gradient value at a pixel position (i+α,j′) in the horizontal direction by using the second 1D filter, according to Equation 15.
Here, fracFilterβ may be an interpolation filter for determining a pixel value at a fractional pixel position β in a vertical direction. fracFilterβ[j′] may denote a coefficient of an interpolation filter applied to a pixel at a (i+B, j′) position. In other words, the second 1D filter may be an interpolation filter for determining a pixel value at a fractional pixel position ß in a vertical direction. offset4 may denote an offset for preventing a round-off error, and shift4 may denote a de-scaling bit number.
In other words, according to Equation 15, the video decoding apparatus 100 may determine a gradient value ∂I/∂x[i+α,j+β] in a horizontal direction at (i+α,j+β) by performing filtering on a gradient value (Temp[i+α,j]) at a pixel position (i+α, j) in a horizontal direction and a gradient value (Temp[i+α,j′]) of pixels in a horizontal direction positioned in a vertical direction from the pixel position (i+α, j), by using the gradient filter fracFilterβ.
Referring to
Referring to
For example, when a position of a reference pixel is a position of a fractional pixel at (x+α, y+β), wherein x and y are each an integer and α and β are each a fraction, filtering may be performed according to Equation 16 by using the first 1D filter with respect to integer pixels (x,y), (x−1,y−1), (x+1, y+1) through (x+MMin,y+MMin) and (x+MMax,y+Mmax) in a horizontal direction, wherein MMin and MMmax are each an integer.
Here, fracFilterα may denote an interpolation filter for determining a pixel value at a fractional pixel position α in a horizontal direction, and fracFilterα[i′] may denote a coefficient of an interpolation filter applied to a pixel at a (i′,j) position. I[i′,j] may denote a pixel value at the (i′,j) position.
In other words, the first 1D filter may be an interpolation filter for determining a pixel value at a fractional pixel position a in a horizontal direction. offset5 may denote an offset for preventing a round-off error, and shift5 may denote a de-scaling bit number.
Temp[i+α,j] may denote pixel value at a fractional pixel position (i+α,j). Temp[i+α,j′] may also be determined according to Equation 16 by replacing j by j′, wherein j′ is an integer from j+Mmin to, j+Mmax excluding j.
Then, the video decoding apparatus 100 may perform filtering on a pixel value at a pixel position (i+α,j) and a pixel value at a pixel position (i+α,j′) according to Equation 17, by using a second 1D filter.
Here, gradFilterβ may be a gradient filter for determining a gradient value at a fractional pixel position ß in a vertical direction. gradFilterβ[j′] may denote a coefficient of an interpolation filter applied to a pixel at a (i+α,j′) position. In other words, the second 1D filter may be a gradient filter for determining a gradient value in a vertical direction at a fractional pixel position β. offset6 may denote an offset for preventing a round-off error, and shift6 may denote a de-scaling bit number.
In other words, according to Equation 17, the video decoding apparatus 100 may determine a gradient value ∂I/∂y[i+α,j+β] in a vertical direction at (i+α,j+β) 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 from the pixel position (i+α,j), by using the gradient filter gradFilterβ.
Hereinabove, 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 of determining a gradient value in a vertical direction by applying a gradient filter and then an interpolation filter will be described.
For example, when a position of a reference pixel is a position of a fractional pixel at (x+α, y+β), wherein x and y are each an integer and α and β are each a fraction, filtering may be performed according to Equation 18 by using the first 1D filter, with respect to integer pixels (x,y), (x,y−1), (x, y+1) through (x,y+MMin) and (x,y+Mmax) in a vertical direction, wherein MMin and MMmax are each an integer.
Here, gradFilterβ may denote a gradient filter for determining a gradient value at a fractional pixel position ß in a vertical direction, and gradFilterβ[j′] may denote a coefficient of a gradient filter applied to a pixel at a (i,j′) position. I[i,j′] may denote a pixel value at the (i,j′) position.
In other words, the first 1D filter may be an interpolation filter for determining a gradient value of a pixel in a vertical direction, wherein a vertical component of a pixel position is a fractional position. offset7 may denote an offset for preventing a round-off error, and shift7 may denote a de-scaling bit number.
Temp[i,j+β] may denote a gradient value at a pixel position (i,j+β) in the vertical direction. Temp[i′j+β] may also be determined according to Equation 18 by replacing i by i′, wherein i′ is an integer from i+Mmin to, i+Mmax excluding i.
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 (i′,j+β) in the vertical direction by using the second 1D filter, according to Equation 19.
Here, fracFilterα may be an interpolation filter for determining a pixel value at a fractional pixel position α in a horizontal direction. fracFilterα[i′] may denote a coefficient of an interpolation filter applied to a pixel at a (i′,j+β) position. In other words, the second 1D filter may be an interpolation filter for determining a pixel value at a fractional pixel position α in a horizontal direction. offset8 may denote an offset for preventing a round-off error, and shift8 may denote a de-scaling bit number.
In other words, according to Equation 19, the video decoding apparatus 100 may determine a gradient value ∂I/∂y[i+α,j+β] in a vertical direction at (i+α,j+β) by performing filtering on a gradient value (Temp[i,j+β]) 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 from the pixel position (i, j+β), by using the gradient filter fracFilterα.
According to an embodiment, in the video decoding apparatus 100, gradient values in horizontal and vertical directions at (i+α, j+β) may be determined according to combinations of various 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 1D filter and a gradient filter for determining a gradient value in a horizontal direction may be used as a second 1D filter. Alternatively, a gradient filter for determining a gradient value in a vertical direction may be used as a first 1D filter, and an interpolation filter for determining a pixel value in a horizontal direction may be used as a second 1D filter.
As described above, a 1D gradient filter and a 1D interpolation filter may be used to determine a gradient value in a horizontal or vertical direction. Referring to
Referring to
As described above, two same 1D interpolation filters may be used in horizontal and vertical directions to determine a pixel value at a fractional pixel position.
Referring to
As described above, 1D gradient filter and 1D interpolation filter may be used to determine a gradient value in a horizontal or vertical direction. Referring to
Referring to
Referring to
When P(i′,j′) denotes a pixel of a current block bi-directionally predicted in the window Ωij 800, wherein, when i−M≤i′≤i+M and j−N≤j′≤j+N, (i′j′)∈Ωij, P0(i′,j′) denotes a pixel value of a first reference pixel of a first reference picture 810 corresponding to the pixel P(i′,j′) of the current block bi-directionally predicted, P1(i′,j′) denotes a pixel value of a second reference pixel of a second reference picture 820 corresponding to the pixel P(i′,j′) of the current block bi-directionally predicted, ∂P0(i′,j′)/∂x denotes a gradient value of the first reference pixel in a horizontal direction, ∂P0(i′,j′)/∂y denotes a gradient value of the first reference pixel in a vertical direction, ∂P1(i′,j′)/∂y denotes a gradient value of the second reference pixel in the horizontal direction, and ∂P1(i′,j′)/∂y denotes a gradient value of the second reference pixel in the vertical direction, a first displacement corresponding pixel PA′ and a second displacement corresponding pixel PB′ may be determined according to Equation 20. Here, PA′ and PB′ may be determined by using a first linear term of local Taylor expansion.
In Equation 20, a displacement vector Vx in an x-axis direction and a displacement vector Vy in a y-axis direction may be changed according to a position of the pixel P(i,j), i.e., are dependent on (i,j), the displacement vectors Vx and Vy may be expressed as Vx(i,j) and Vy(i,j).
A difference value Δi′j′ between the first displacement corresponding pixel PA′ and the second displacement corresponding pixel PB′ may be determined according to Equation 21.
The displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction, which minimize the difference value Δi′j′ between the first displacement corresponding pixel PA′ and the second displacement corresponding pixel PB′, may be determined by using the sum of squares Φ(Vx, Vy) of the difference value Δi′j′ as in Equation 22.
In other words, the displacement vectors Vx and Vy may be determined by using a local maximum value or a local minimum value of Φ(Vx,Vy). Φ(Vx, Vy) denotes a function using the displacement vectors Vx and Vy as parameters, and the local maximum or local minimum value may be determined by calculating a value that becomes 0 by partially differentiating Φ(Vx, Vy) arranged for τVx and τVy, with respect to τVx and τVy according to Equation 23. Hereinafter, for convenience of calculation, τ0 and τ1 are both the same, i.e., both τ.
Two linear equations using Vx(i,j) and Vy(i,j) as variables as Equation 24 may be obtained by using an equation:
and an equation:
In Equation 24, s1 through s6 may be calculated according to Equation 25.
By solving a simultaneous equation of Equation 24, values of Vx(i,j) and Vy(i,j) may be obtained according to τ*Vx(i,j)=−det1/det and t*Vy(i,j)=−det2/det based on Kramer's formulas. Here, det1=s3*s5−s2*s6, det2=s1*s6−s3*s4, and det=s1*s5−s2*s2.
By performing minimization first in a horizontal direction and then in a vertical direction, simplified solutions of the above equations may be determined. In other words, when only a displacement vector in a horizontal direction is changed, Vy−0 in the first equation of Equation 24, and thus an equation: τVx=s3/s1 may be determined.
Then, an equation: τVy−(s6−τVx*S2)/s5 may be determined when the second equation of Equation 24 is arranged by using an equation: τVx=s3/s1.
Here, gradient values ∂P0(i′,j′)/∂x, ∂P0(i′,j′)/∂y, ∂P1(i′,j′)/∂x, and ∂P1(i′,j′)/∂y may be scaled without changing result values Vx(i,j) and Vy(i,j). However, it is premised that an overflow does not occur and a round-off error is not generated.
Normalization parameters r and m may be introduced so as to prevent division from being performed by 0 or a very small value while calculating Vx(i,j) and Vy(i,j).
For convenience, it is considered that Vx(i,j) and Vy(i,j) are opposite to directions shown in
The first displacement corresponding pixel PA′ and the second displacement corresponding pixel PB′ may be determined according to Equation 26. Here, the first displacement corresponding pixel PA′ and the second displacement corresponding pixel PB′ may be determined by using a first linear term of local Taylor expansion.
A difference value Δi′j′ between the first displacement corresponding pixel PA′ and the second displacement corresponding pixel PB′ may be determined according to Equation 27.
The displacement vector Vx in the x-axis direction and the displacement vector Vy in the y-axis direction, which minimize the difference value Δi′j′ between the first displacement corresponding pixel PA′ and the second displacement corresponding pixel PB′, may 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 may be determined, and may be determined by using a local maximum value or a local minimum value of Φ(Vx, Vy).
Φ(Vx, Vy) is a function using the displacement vectors Vx and Vy as parameters, and the local maximum value or the local minimum value may 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.
In other words, the displacement vectors Vx and Vy that minimize Φ(Vx, Vy) may be determined. In order to solve optimization issues, minimization may be first performed in a vertical direction and then in a horizontal direction. According to the minimization, the displacement vector Vx may be determined according to Equation 31.
Here, a function clip3(x, y, z) is a function that outputs x when z<x, outputs y when z>y, and outputs z when x<z<y. According to Equation 31, when s1+r>m, the displacement vector Vx may be clip3(−thBIO,thBIO,−s3/(s1+r)), and when not s1+r>m, the displacement vector Vx may be 0.
According to the minimization, the displacement vector Vy may be determined according to Equation 32.
Here, a function clip3(x, y, z) ix a function that outputs x when z<x, outputs y when z>y, and outputs z when x<z<y. According to Equation 32, when s5+r>m, the displacement vector Vy may be clip3(−thBIO, thBIO,−(s6−Vx*s2)/2/(s5+r), and when not s5+r>m, the displacement vector Vy may be 0.
Here, s1, s2, s3, and s5 may be determined according to Equation 33.
As described above, r and m may be normalization parameters introduced to avoid a division result value being 0 or smaller and determined according to Equation 34 based on an internal bit depth d of an input video.
The displacement vectors Vx and Vy may have an upper limit and a lower limit of +thBIO. The displacement vectors Vx and Vy may be clipped by a certain threshold value thBIO since there may be cases where motion compensation in pixel units may not be trusted due to noise or irregular motion. thBIO may be determined based on whether directions of all reference pictures are the same. For example, when the directions of all reference pictures are the same, thBIO may be determined to be 12*2{circumflex over ( )}(14−d). When the directions of all reference pictures are different, thBIO may be determined to be 12*2{circumflex over ( )}(13−d).
Referring to
Hereinafter, performing of de-scaling during processes of generating 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 so as 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 will be described.
According to Equation 12 above, 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 so as to determine a gradient value in a horizontal direction. Here, shift1 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 de-scaling is actually performed based on shift1 will be described with reference to Table 1.
Here, a value of a variable in Table 1 may be determined according to Equation 35.
Here, Min(I) may denote a minimum value of a pixel value I determined by an internal bit depth, and Max(I) may 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 ¼ pel units in
A function Celing(x) may be a function outputting a smallest integer from among integers equal to or higher than x, with respect to a real number x. offset1 is an offset value added to a value on which filtering is performed so as to prevent a round-off error that may be generated while performing de-scaling using shift1, and offset1 may be determined to be 2{circumflex over ( )}(shift1−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 b 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 preform filtering is a 32-bit register, since bit depths of all registers in
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 de-scaling is performed is a 16-bit buffer, since bit depths of all 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 an integer position by using an interpolation filtering in the vertical direction so as to determine a gradient value in a horizontal direction, and then perform filtering on the interpolation filtering value in the vertical direction by using a gradient filter in the horizontal direction, according to Equation 13. Here, shift2 may be determined to be p+q−shift1. Here, p may denote a bit number scaled with respect to an interpolation filter including filter coefficients shown in
shift2 is determined as such because shift1+shift2, i.e., the total sum of de-scaled bit numbers, should be the same as the sum (p+q) of bit numbers up-scaled with respect to a filter such that a final filtering result values are the same in a case when a filter coefficient is up-scaled and in a case when the filter coefficient is not up-scaled.
Hereinafter, a bit depth (Reg Bitdepth) of a register and a bit depth (Temp Bitdepth) of a temporary buffer when de-scaling is actually performed based on shift2 will be described with reference to Table 2.
Here, a value of a variable in Table 2 may be determined according to Equation 36.
Here, TempMax may denotes TempMax of Table 1 and TempMin may denote TempMin of 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 a gradient filter gradFilter in ¼ pel units shown in
offset2 is an offset value added to a value on which filtering is performed so as to prevent a round-off error that may be generated while performing de-scaling using shift2, and offset1 may be determined to be 2{circumflex over ( )}(shift2−1).
shift1 and shift2 may be determined as such, but alternatively, shift1 and shift2 may be variously determined as long as the sum of shift1 and shift2 is equal to the sum of scaling bit numbers. Here, values of shift1 and shift2 may be determined based on the premise that an overflow phenomenon does not occur. shift1 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, shift1 and shift2 may not be necessarily determined such that the sum of shift1 and shift2 is equal to the num of scaling bit numbers with respect to a filter. For example, shift1 may be determined to be d−8, but shift2 may be determined to be a fixed number.
When shift1 is the same as previous and shift2 is a fixed number of 7, OutMax, OutMin, and Temp Bitdepth described with reference to Table 2 may be changed. Hereinafter, a bit depth (Temp Bitdepth) of a temporary buffer will now be described with reference to Table 3.
Unlike Table 2, in Table 3, the bit depths (Temp Bitdepth) of the temporary buffers are the same, i.e., 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 smaller 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 higher than 16, and thus an overflow phenomenon may occur.
When shift2 is a fixed number, a scaled filter coefficient is not used, and a result value of performing filtering and a result value of performing filtering and then de-scaling may be different. In this case, it would be obvious to one of ordinary skill in the art that de-scaling needs to be additionally performed.
Hereinabove, performing of de-scaling during processes of generating 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 so as 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 of ordinary skill in the art that de-scaling may be performed in the similar manner when filtering is performed on a pixel, in which a component in a certain direction is an integer, so as to determine gradient values in horizontal and vertical directions via a combination of various 1D filters.
Hereinafter, a method of determining a data unit that may be used while the video decoding apparatus 100 according to an embodiment decodes an image will be described with reference to
According to an 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 split by using split shape information. In other words, a split method of a coding unit, which is indicated by the split 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 an embodiment, the video decoding apparatus 100 may use block shape information indicating that a current coding unit has a square shape. For example, the video decoding apparatus 100 may determine, according to split shape information, whether to not split a square coding unit, to split the square coding unit vertically, to split the square coding unit horizontally, or to split the square coding unit into four coding units. Referring to
Referring to
According to an 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 split shape information, whether to not split the non-square current coding unit or to split the non-square current coding unit via a certain method. Referring to
According to an embodiment, the video decoding apparatus 100 may determine a shape into which a coding unit is split by using split shape information, and in this case, the split shape information may indicate the number of at least one coding unit generated as the coding unit is split. Referring to
According to an embodiment, when the video decoding apparatus 100 splits the current coding unit 1100 or 1150 having a non-square shape based on split shape information, the video decoding apparatus 100 may split 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 by splitting the current coding unit 1100 or 1150 in a direction of splitting the long sides of the current coding unit 1100 or 1150 considering a shape of the current coding unit 1100 or 1150.
According to an embodiment, when split shape information indicates that a coding unit is split 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 split shape information indicates that the current coding unit 1100 or 1150 is split into three coding units, the video decoding apparatus 100 may split the current coding unit 1100 or 1150 into three coding units 1130a through 1130c or 1180a through 1180c. According to an 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 be all the same. For example, the size of coding unit 1130b or 1180b from among the determined odd number of coding units 1130a through 1130c or 1180a through 1180c may be different from the sizes of coding units 1130a and 1130c or 1180a and 1180c. In other words, coding units that may be determined when the current coding unit 1100 or 1150 is split may have a plurality of types of sizes, and in some cases, the coding units 1130a through 1130c or 1180a through 1180c may have different sizes.
According to an embodiment, when split shape information indicates that a coding unit is split 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 in addition, may set a certain limit on at least one coding unit from among the odd number of coding units generated via splitting. Referring to
According to an embodiment, the video decoding apparatus 100 may determine that a first coding unit 1200 having a square shape is split or not split into coding units, based on at least one of block shape information and split shape information. According to an embodiment, when split shape information indicates that the first coding unit 1200 is split in a horizontal direction, the video decoding apparatus 100 may determine a second coding unit 1210 by splitting the first coding unit 1200 in a horizontal direction. A first coding unit, a second coding unit, and a third coding unit used according to an embodiment are terms used to indicate a relation between before and after splitting a coding unit. For example, a second coding unit may be determined by splitting a first coding unit, and a third coding unit may be determined by splitting a second coding unit. Hereinafter, it will be understood that relations between first through third coding units are in accordance with the features described above.
According to an embodiment, the video decoding apparatus 100 may determine that the determined second coding unit 1210 is split or not split into coding units based on at least one of block shape information and split shape information. Referring to
A method that may be used to recursively split a coding unit will be described below through various embodiments.
According to an embodiment, the video decoding apparatus 100 may determine that each of the third coding units 1220a through 1220d is split into coding units or that the second coding unit 1210 is not split, based on at least one of block shape information and split shape information. The video decoding apparatus 100 may split the second coding unit 1210 having a non-square shape into the odd number of third coding units 1220b through 1220d, according to an embodiment. The video decoding apparatus 100 may set a certain limit on a certain third coding unit from among the third coding units 1220b through 1220d. For example, the video decoding apparatus 100 may limit that the third coding unit 1220c located at the center of the third coding units 1220b through 1220d is no longer split, or is split into a settable number of times. Referring to
According to an embodiment, the video decoding apparatus 100 may obtain at least one of block shape information and split shape information used to split a current coding unit from a certain location in the current coding unit.
According to an embodiment, the video decoding apparatus 100 may select one coding unit when a current coding unit is split into a certain number of coding units. A method of selecting one of a plurality of coding units may vary, and details thereof will be described below through various embodiments.
According to an embodiment, the video decoding apparatus 100 may split a current coding unit into a plurality of coding units, and determine a coding unit at a certain location.
According to an embodiment, the video decoding apparatus 100 may use information indicating a location of each of the odd number of coding units so as to determine a coding unit located at the center from among the odd number of coding units. Referring to
According to an embodiment, the information indicating the locations of the upper left samples 1330a through 1330c included in the coding units 1320a through 1320c respectively may include information about a location or coordinates of the coding units 1320a through 1320c in a picture. According to an embodiment, the information indicating the locations of the upper left samples 1330a through 1330c included in the coding units 1320a through 1320c respectively may include information indicating widths or heights of the coding units 1320a through 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 through 1320c in a picture. In other words, the video decoding apparatus 100 may determine the coding unit 1320b located at the center by directly using the information about the locations or coordinates of the coding units 1320a through 1320c in a picture or by using information about the widths or heights of the coding units 1320a through 1320c corresponding to the differences between coordinates.
According to an embodiment, the information indicating the location of the upper left sample 1330a of the upper coding unit 1320a may indicate (xa, ya) coordinates, the information indicating the location of the upper left sample 1330b of the center coding unit 1320b may indicate (xb, yb) coordinates, and the information indicating the location of the upper left sample 1330c of the lower coding unit 1320c may indicate (xc, yc) coordinates. The video decoding apparatus 100 may determine the center coding unit 1320b by using the coordinates of the upper left samples 1330a through 1330c respectively included in the coding units 1320a through 1320c. For example, when the coordinates of the upper left samples 1330a through 1330c are arranged in an 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 from among the coding units 1320a through 1320c determined when the current coding unit 1300 is split. However, coordinates indicating the locations of the upper left samples 1330a through 1330c may be coordinates indicating absolute locations in a picture, and in addition, (dxb, dyb) coordinates, i.e., information indicating a relative location of the upper left sample 1330b of the center coding unit 1320b, and (dxc, dyc) coordinates, i.e., information indicating a relative location of the upper left sample 1330c of the lower coding unit 1320c, may be used based on the location of the upper left sample 1330a of the upper coding unit 1320a. Also, a method of determining a coding unit at a certain location by using, as information indicating locations of samples included in coding units, coordinates of the samples is not limited to the above, and various arithmetic methods capable of using coordinates of samples may be used.
According to an embodiment, the video decoding apparatus 100 may split the current coding unit 1300 into the plurality of coding units 1320a through 1320c, and select a coding unit from the coding units 1320a through 1320c according to a certain standard. For example, the video decoding apparatus 100 may select the coding unit 1320b having a different size from among the coding units 1320a through 1320c.
According to an embodiment, the video decoding apparatus 100 may determine widths or heights of the coding units 1320a through 1320c by respectively using the (xa, ya) coordinates, i.e., the information indicating the location of the upper left sample 1330a of the upper coding unit 1320a, the (xb, yb) coordinates, i.e., the information indicating the location of the upper left sample 1330b of the center coding unit 1320b, and the (xc, yc) coordinates, i.e., 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 through 1320c by respectively using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the locations of the coding units 1320a through 1320c.
According to an 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 an embodiment, the video decoding apparatus 100 may determine the width of the center coding unit 1320b to be xc-xb, and the height to be yc-yb. According to an 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 center coding unit 1320b. The video decoding apparatus 100 may determine a coding unit having a different size from other coding units based on the determined widths and heights of the coding units 1320a through 1320c. Referring to
However, a location of a sample considered to determine a location of a coding unit is not limited to the upper left as described above, and information about a location of an arbitrary sample included in a coding unit may be used.
According to an embodiment, the video decoding apparatus 100 may select a coding unit at a certain location from among an odd number of coding units determined when a current coding unit is split, 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 longer 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 limit on the one coding unit. When the current coding unit has a non-square shape in which a height is longer 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 limit on the one coding unit.
According to an embodiment, the video decoding apparatus 100 may use information indicating a location of each of an even number of coding units so as to determine a coding unit at a certain location from among the even number of coding units. The video decoding apparatus 100 may determine the even number of coding units by splitting a current coding unit, and determine the coding unit at the certain location by using information about the locations of the even number of coding units. Detailed processes thereof may correspond to those of determining a coding unit at a certain location (for example, a center location) from among an odd number of coding units described in
According to an embodiment, when a current coding unit having a non-square shape is split into a plurality of coding units, certain information about a coding unit at a certain location during splitting processes may be used to determine the coding unit at the certain location from among the plurality of coding units. For example, the video decoding apparatus 100 may use at least one of block shape information and split shape information stored in a sample included in a center coding unit during splitting processes so as to determine a coding unit located at the center from among a plurality of coding units obtained by splitting a current coding unit.
Referring to
According to an embodiment, certain 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
According to an embodiment, a location of a sample from which certain information is obtainable may be determined according to a shape of the current coding unit 1300. According to an 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 is obtainable according to the shape. For example, the video decoding apparatus 100 may determine, as a sample from which certain information is obtainable, a sample located on a boundary of splitting 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 is obtainable, one of samples adjacent to a boundary of splitting long sides of the current coding unit into halves.
According to an embodiment, when a current coding unit is split into a plurality of coding units, the video decoding apparatus 100 may use at least one of block shape information and split shape information so as to determine a coding unit at a certain location from among the plurality of coding units. According to an embodiment, the video decoding apparatus 100 may obtain at least one of block shape information and split shape information from a sample at a certain location included in a coding unit, and may split a plurality of coding units generated as a current coding unit is split by using at least one of the split shape information and the block shape information obtained from the sample at the certain location included in each of the plurality of coding units. In other words, a coding unit may be recursively split by using at least one of block shape information and split shape information obtained from a sample at a certain location included in each coding unit. Since processes of recursively splitting a coding unit have been described above with reference to
According to an embodiment, the video decoding apparatus 100 may determine at least one coding unit by splitting a current coding unit, and determine an order of decoding the at least one coding unit according to a certain block (for example, the current coding unit).
According to an embodiment, the video decoding apparatus 100 may determine second coding units 1410a and 1410b by splitting a first coding unit 1400 in a vertical direction, determine second coding units 1430a and 1430b by splitting the first coding unit 1400 in a horizontal direction, or determine second coding units 1450a through 1450d by splitting the first coding unit 140 in horizontal and vertical directions, according to block shape information and split shape information.
Referring to
According to an embodiment, the video decoding apparatus 100 may recursively split coding units. Referring to
According to an embodiment, the video decoding apparatus 100 may split the second coding unit 1410a at the left in a horizontal direction into third coding units 1420a and 1420b, and may not split the second coding unit 1410b at the right.
According to an embodiment, an order of processing coding units may be determined based on split processes of coding units. In other words, an order of processing coding units that are split may be determined based on an order of processing coding units before being split. The video decoding apparatus 100 may determine an order of processing the third coding units 1420a and 1420b determined when the second coding unit 1410a at the left is split independently from the second coding unit 1410b at the right. Since the third coding units 1420a and 1420b are determined when the second coding unit 1410a at the left is split in a horizontal direction, the third coding units 1420a and 1420b may be processed in a vertical direction 1420c. Also, since an order of processing the second coding unit 1410a at the left and the second coding unit 1410b at the right corresponds to the horizontal direction 1410c, the second coding unit 1410b at the right may be processed after the third coding units 1420a and 1420b included in the second coding unit 1410a at the left are processed in the vertical direction 1420c. The above descriptions are related processes of determining an order of processing coding units according to coding units before being split, but such processes are not limited to the above embodiments, and any method of independently processing, in a certain order, coding units split into various shapes may be used.
According to an embodiment, the video decoding apparatus 100 may determine that a current coding unit is split into an odd number of coding units based on obtained block shape information and split shape information. Referring to
According to an embodiment, the video decoding apparatus 100 may determine whether a coding unit split into an odd number exists by determining whether the third coding units 1520a through 1520e are processable in a certain order. Referring to
According to an embodiment, the video decoding apparatus 100 may determine whether the third coding units 1520a through 1520e included in the first coding unit 1500 satisfy a condition of being processable according to a certain order, wherein the condition is related to whether at least one of a width and a height of each of the second coding units 1510a and 1510b is split into halves according to boundaries of the third coding units 1520a through 1520c. For example, the third coding units 1520a and 1520b determined when the height of the second coding unit 1510a at the left and having a non-square shape is split into halves satisfy the condition, but it may be determined that the third coding units 1520c through 1520c do not satisfy the condition because the boundaries of the third coding units 1520c through 1520e that are determined when the second coding unit 1510b at the right is split into three coding units do not split the width or height of the second coding unit 1510b at the right into halves. The video decoding apparatus 100 may determine disconnection of a scan order when the condition is not satisfied, and determine that the second coding unit 1510b at the right is split into the odd number of coding units, based on a result of the determination. According to an embodiment, the video decoding apparatus 100 may set a certain limit on a coding unit at a certain location from among an odd number of coding units obtained by splitting a coding unit, and since such a limit or certain location has been described above through various embodiments, details thereof are not provided again.
According to an embodiment, the video decoding apparatus 100 may determine whether the second coding units 1610a through 1610c and 1620a through 1620c included in the first coding unit 1600 satisfy a condition of being processable in a certain order, wherein the condition is related to whether at least one of a width and a height of the first coding unit 1600 is split into halves according to boundaries of the second coding units 1610a through 1610c and 1620a through 1620c. Referring to
According to an embodiment, the video decoding apparatus 100 may determine coding units having various shapes by splitting a first coding unit.
Referring to
According to an embodiment, the video decoding apparatus 100 may determine that the first coding unit 1700 having a square shape is split 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 split shape information obtained through the obtainer 105. The second coding units 1710a and 1710b or 1720a and 1720b may be independently split. Accordingly, the video decoding apparatus 100 may determine that the second coding units 1710a and 1710b or 1720a and 1720b are split into a plurality of coding units or are not split based on at least one of block shape information and split shape information related to each of the coding units 1710a and 1710b or 1720a and 1720b. According to an embodiment, the video decoding apparatus 100 may determine third coding units 1712a and 1712b by splitting, in a horizontal direction, the second coding unit 1710a at the left having a non-square shape, which is determined when the first coding unit 1700 is split in a vertical direction. However, when the second coding unit 1710a at the left is split in the horizontal direction, the video decoding apparatus 100 may set a limit that the second coding unit 1710b at the right is not split in the horizontal direction like the second coding unit 1710a at the left. When third coding units 1714a and 1714b are determined when the second coding unit 1710b at the right is split in the same direction, i.e., the horizontal direction, the third coding units 1712a, 1712b, 1714a, and 1714b are determined when the second coding units 1710a at the left and the second coding unit 1710b at the right are each independently split in the horizontal direction. However, this is the same result as splitting the first coding unit 1700 into four second coding units 1730a through 1730d having a square shape based on at least one of block shape information and split shape information, and thus may be inefficient in terms of image decoding.
According to an embodiment, the video decoding apparatus 100 may determine third coding units 1722a and 1722b or 1724a, and 1724b by splitting, in a vertical direction, the second coding unit 1720a or 1720b having a non-square shape determined when the first coding unit 1700 is split in the horizontal direction. However, when one of second coding units (for example, the second coding unit 1720a at the top) is split in a vertical direction, the video decoding apparatus 100 may set a limit that the other second coding unit (for example, the second coding unit 1720b at the bottom) is not split in the vertical direction like the second coding unit 1720a at the top for the above described reasons.
According to an embodiment, the video decoding apparatus 100 may determine second coding units 1810a and 1810b, or 1820a and 1820b, by splitting a first coding unit 1800 based on at least one of block shape information and split shape information. Split shape information may include information about various shapes into which a coding unit may be split, but such information about various shapes may not include information for splitting a coding unit into four square coding units. According to such split shape information, the video decoding apparatus 100 is unable to split the first coding unit 1800 having a square shape into four second coding units 1830 through 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 non-square shape based on the split shape information.
According to an embodiment, the video decoding apparatus 100 may independently split 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 split in a certain order via a recursive method that may be a split method corresponding to a method of splitting the first coding unit 1800 based on at least one of the block shape information and the split shape information.
For example, the video decoding apparatus 100 may determine third coding units 1812a and 1812b having a square shape by splitting the second coding unit 1810a at the left in a horizontal direction, or determine third coding units 1814a and 1814b having a square shape by splitting the second coding unit 1810b at the right in a horizontal direction. In addition, the video decoding apparatus 100 may determine third coding units 1816a through 1816d having a square shape by splitting both the second coding unit 1810a at the left and the second coding unit 1810b at 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 split into four second coding units 1830a through 1830d having a square shape.
As another example, the video decoding apparatus 100 may determine third coding units 1822a and 1822b having a square shape by splitting the second coding unit 1820a at the top in a vertical direction, and determine third coding units 1824a and 1824b having a square shape by splitting the second coding unit 1820b at the bottom in a vertical direction. In addition, the video decoding apparatus 100 may determine third coding units 1826a through 1826d having a square shape by splitting 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 split into four second coding units 1830a through 1830d having a square shape.
According to an embodiment, the video decoding apparatus 100 may split a first coding unit 1900 based on block shape information and split shape information. When the block shape information indicates a square shape and the split shape information indicates that the first coding unit 1900 is split in at least one of a horizontal direction and a vertical direction, the video decoding apparatus 100 may split the first coding unit 1900 to determine second coding units 1910a and 1910b, or 1920a and 1920b. Referring to
According to an embodiment, the video decoding apparatus 100 may process coding units according to a certain order. Features about processing coding units according to a certain order have been described above with reference to
According to an embodiment, the video decoding apparatus 100 may determine the third coding units 1916a through 1916d by splitting, in the horizontal direction, the second coding units 1910a and 1910b generated as the first coding unit 1900 is split in the vertical direction, and process the third coding units 1916a through 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 1910a at the left, and then processing, in the vertical direction, the third coding units 1916c and 1916d included in the second coding unit 1910b at the right.
According to an embodiment, the video decoding apparatus 100 may determine the third coding units 1926a through 1926d by splitting, in the vertical direction, the second coding units 1920a and 1920b generated as the first coding unit 1900 is split in the horizontal direction, and process the third coding units 1926a through 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 processing, in the horizontal direction, the third coding units 1926c and 1926d included in the second coding unit 1920b at the bottom.
Referring to
According to an embodiment, the video decoding apparatus 100 may determine a depth of a coding unit according to a certain standard. For example, the certain standard may be a length of a long side of the coding unit. When a length of a long side of a current coding unit is split 2n times shorter than a length of a long side of a coding unit before being split, it may be determined that a depth of the current coding unit is increased n times a depth of the coding unit before being split, wherein n>0. Hereinafter, a coding unit having an increased depth is referred to as a coding unit of a lower depth.
Referring to
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 splitting 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 longer than a width, or ‘2:NS_HOR’ indicating a non-square shape in which a width is longer than a height), according to an embodiment.
The video decoding apparatus 100 may determine a second coding unit (for example, the second coding unit 2002, 2012, or 2022) by splitting at least one of a width and a height of the first coding unit 2010 having a size of N×2N. In other words, the video decoding apparatus 100 may determine the second coding unit 2002 having a size of N×N or the second coding unit 2022 having a size of N×N/2 by splitting the first coding unit 2010 in a horizontal direction, or determine the second coding unit 2012 having a size of N/2×N by splitting the first coding unit 2010 in horizontal and vertical directions.
The video decoding apparatus 100 may determine a second coding unit (for example, the second coding unit 2002, 2012, or 2022) by splitting at least one of a width and a height of the first coding unit 2020 having a size of 2N×N. In other words, the video decoding apparatus 100 may determine the second coding unit 2002 having a size of N×N or the second coding unit 2012 having a size of N/2×N by splitting the first coding unit 2020 in a vertical direction, or determine the second coding unit 2022 having a size of N×N/2 by splitting the first coding unit 2010 in horizontal and vertical directions.
According to an embodiment, the video decoding apparatus 100 may determine a third coding unit (for example, the third coding unit 2004, 2014, or 2024) by splitting at least one of a width and a height of the second coding unit 2002 having a size of N×N. In other words, the video decoding apparatus 100 may determine the third coding unit 2004 having a size of N/2×N/2, the third coding unit 2014 having a size of N/22×N/2, or the third coding unit 2024 having a size of N/2×N/22 by splitting the second coding unit 2002 in vertical and horizontal directions.
According to an embodiment, the video decoding apparatus 100 may determine a third coding unit (for example, the third coding unit 2004, 2014, or 2024) by splitting at least one of a width and a height of the second coding unit 2022 having a size of N/2×N. In other words, the video decoding apparatus 100 may determine the third coding unit 2004 having a size of N/2×N/2 or the third coding unit 2024 having a size of N/2×N/22 by splitting the second coding unit 2012 in a horizontal direction, or the third coding unit 2014 having a size of N/22×N/2 by splitting the second coding unit 2012 in vertical and horizontal directions.
According to an embodiment, the video decoding apparatus 100 may determine a third coding unit (for example, the third coding unit 2004, 2014, or 2024) by splitting at least one of a width and a height of the second coding unit 2022 having a size of N×N/2. In other words, the video decoding apparatus 100 may determine the third coding unit 2004 having a size of N/2×N/2 or the third coding unit 2014 having a size of N/22×N/2 by splitting the second coding unit 2022 in a vertical direction, or the third coding unit 2024 having a size of N/2×N/22 by splitting the second coding unit 2022 in vertical and horizontal directions.
According to an embodiment, the video decoding apparatus 100 may split a coding unit (for example, 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×2N may be determined by splitting the first coding unit 2000 having a size of 2N×2N in the vertical direction, or the first coding unit 2020 having a size of 2N×N may be determined by splitting the first coding unit 2000 in the horizontal direction. According to an embodiment, when a depth is determined based on a length of a longest side of a coding unit, a depth of a coding unit determined when the first coding unit 2000 having a size of 2N×2N is split in a horizontal or vertical direction may be the same as a depth of the first coding unit 2000.
According to an embodiment, the width and the height of the third coding unit 2014 or 2024 may be ½{circumflex over ( )}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 that is ½ of the width and the height of the first coding unit 2010 or 2020 may be D+1, and the depth of the third coding unit 2014 or 2024 that is ½{circumflex over ( )}2 of the width and the height of the first coding unit 2010 or 202 may be D+2.
According to an embodiment, the video decoding apparatus 100 may determine a second coding unit having various shapes by splitting a first coding unit 2100 having a square shape. Referring to
According to an embodiment, a depth of the second coding units 2102a and 2102b, 2104a and 2104b, or 2106a through 2106d determined according to the split 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 one side of the first coding unit 2100 having 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 having a non-square shape may be the same, i.e., D. On the other hand, when the video decoding apparatus 100 splits the first coding unit 2100 into the four second coding units 2106a through 2106d having a square shape, based on the split shape information, a length of one side of the second coding units 2106a through 2106d having a square shape is ½ of the length of one side of the first coding unit 2100, the depths of the second coding units 2106a through 2106d may be D+1, i.e., a depth lower than the depth D of the first coding unit 2100.
According to an embodiment, the video decoding apparatus 100 may split a first coding unit 2110, in which a height is longer than a width, in a horizontal direction into a plurality of second coding units 2112a and 2112b or 2114a through 2114c, according to split shape information. According to an embodiment, the video decoding apparatus 100 may split a first coding unit 2120, in which a width is longer than a height, in a vertical direction into a plurality of second coding units 2122a and 2122b or 2124a through 2124c, according to split shape information.
According to an embodiment, depths of the second coding units 2112a and 2112b, 2114a through 2114c, 2122a and 2122b, or 2124a through 2124c determined according to the split 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 one side of the second coding units 2112a and 2112b having a square shape is ½ 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, i.e., depths lower than the depth D of the first coding unit 2110 having a non-square shape.
In addition, the video decoding apparatus 100 may split the first coding unit 2110 having a non-square shape into an odd number of second coding units 2114a through 2114c, based on split shape information. The odd number of second coding units 2114a through 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 having a non-square shape and a length of one side of the second coding unit 2114b having a square shape are ½ of a length of one side of the first coding unit 2110, depths of the second coding units 2114a through 2114b may be D+1, i.e., a depth lower 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 longer than a height, in the same manner as the determining of depths of coding units related to the first coding unit 2110.
According to an embodiment, with respect to determining PIDs for distinguishing coding units, when an odd number of coding units do not have the same size, the video decoding apparatus 100 may determine PIDs based on a size ratio of the coding units. Referring to
According to an embodiment, the video decoding apparatus 100 may determine whether a plurality of coding units determined when a current coding unit is split have certain split shapes based on values of PID. Referring to
According to an embodiment, the video decoding apparatus 100 may determine a coding unit at a certain location from among coding units determined by using PIDs for distinguishing coding units. According to an embodiment, when split shape information of the first coding unit 2110 having a rectangular shape in which a height is longer than a width indicates that the first coding unit 2110 is split into three coding units, the video decoding apparatus 100 may split the first coding unit 2110 into the three second coding units 2114a through 2114c. The video decoding apparatus 100 may assign a PID to each of the three second coding units 2114a through 2114c. The video decoding apparatus 100 may compare PIDs of an odd number of coding units so as to determine a center coding unit from among the coding units. The video decoding apparatus 100 may determine, as a coding unit at a center location from among coding units determined when the first coding unit 2110 is split, the second coding unit 2114b having a PID corresponding to a center value from among PIDs, based on PIDs of the coding units. According to an embodiment, while determining PIDs for distinguishing coding units, when the coding units do not have the same sizes, the video decoding apparatus 100 may determine PIDs based on a size ratio of the coding units. Referring to
According to an embodiment, the video decoding apparatus 100 may use a certain data unit from which recursive splitting of a coding unit is started.
According to an embodiment, a certain data unit may be defined as a data unit from which a coding unit starts to be recursively split by using at least one of block shape information and split shape information. In other words, the certain data unit may correspond to a coding unit of an uppermost depth used while determining a plurality of coding units by splitting a current picture. Hereinafter, the certain data unit is referred to as a reference data unit for convenience of description.
According to an embodiment, the reference data unit may indicate a certain size and shape. According to an embodiment, the reference data unit may include M×N samples. Here, M and N may be the same, 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 later be split into an integer number of coding units.
According to an embodiment, the video decoding apparatus 100 may split a current picture into a plurality of reference data units. According to an embodiment, the video decoding apparatus 100 may split the plurality of reference data units obtained by splitting the current picture by using split shape information about each of the reference data units. Split processes of such reference data units may correspond to split processes using a quad-tree structure.
According to an embodiment, the video decoding apparatus 100 may pre-determine a smallest size available for the reference data unit included in the current picture. Accordingly, the video decoding apparatus 100 may determine the reference data unit having various 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 split shape information.
Referring to
According to an embodiment, the obtainer 105 of the video decoding apparatus 100 may obtain, from a bitstream, 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 various data units. Processes of determining at least one coding unit included in the reference coding unit 2200 having a square shape have been described above through processes of splitting the current coding unit 1000 of
According to an embodiment, in order to determine a size and shape of a reference coding unit according to some data units pre-determined based on a predetermined condition, the video decoding apparatus 100 may use a PID for distinguishing the size and shape of the reference coding unit. In other words, the obtainer 105 may obtain, from a bitstream, only a PID for distinguishing a size and shape of a reference coding unit as a data unit satisfying a predetermined condition (for example, a data unit having a size equal to or smaller than a slice) from among various data units (for example, a sequence, a picture, a slice, a slice segment, and a largest coding unit), according to slices, slice segments, and largest coding units. The video decoding apparatus 100 may determine the size and shape of the reference data unit according to data units that satisfy 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 bitstream and used according to data units having relatively small sizes, usage efficiency of the bitstream 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 a PID may be obtained and used. In this case, at least one of the size and the shape of the reference coding unit corresponding to the PID indicating the size and shape of the reference coding unit may be pre-determined. In other words, the video decoding apparatus 100 may select at least one of the pre-determined size and shape of the reference coding unit according to the PID so as to determine at least one of the size and shape of the reference coding unit included in a data unit that is a criterion for obtaining the PID.
According to an embodiment, the video decoding apparatus 100 may use at least one reference coding unit included in one largest coding unit. In other words, a largest coding unit splitting an image may include at least one reference coding unit, and a coding unit may be determined when each of the reference coding unit is recursively split. According to an embodiment, at least one of a width and height of the largest coding unit may be an integer times at least one of a width and height of the reference coding unit. According to an embodiment, a size of a reference coding unit may be equal to a size of a largest coding unit, which is split n times according to a quad-tree structure. In other words, the video decoding apparatus 100 may determine a reference coding unit by splitting a largest coding unit n times according to a quad-tree structure, and split the reference coding unit based on at least one of block shape information and split shape information according to various embodiments.
According to an embodiment, the video decoding apparatus 100 may determine at least one processing block splitting a picture. A processing block is a data unit including at least one reference coding unit splitting 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, a determining order of the at least one reference coding unit determined in each processing block may correspond to one of various orders for determining a reference coding unit, and may vary according to processing blocks. A determining order of reference coding units determined per processing block may be one of various orders, such as a raster scan order, a Z-scan order, an N-scan order, an up-right diagonal scan order, a horizontal scan order, and a vertical scan order, but should not be limitedly interpreted with respect to the scan orders.
According to an embodiment, the video decoding apparatus 100 may determine a size of at least one processing block included in an image by obtaining information about a size of a processing block. The video decoding apparatus 100 may obtain, from a bitstream, the information about a 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 information about a size of a processing block.
According to an embodiment, the obtainer 105 of the video decoding apparatus 100 may obtain, from the bitstream, the information about a size of a processing block according to certain data units. For example, the information about a size of a processing block may be obtained from the bitstream in data units of images, sequences, pictures, slices, and slice segments. In other words, the obtainer 105 may obtain, from the bitstream, the information about a size of a processing block according to such several data units, and the video decoding apparatus 100 may determine the size of at least one processing block splitting the picture by using the obtained information about a size of a processing block, wherein the size of the processing block may be an integer times a size of a reference coding unit.
According to an 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 bitstream. Referring to
According to an 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 a determining order of at least one reference coding unit included in each of the processing blocks 2302 and 2312. According to an embodiment, determining of a reference coding unit may include determining a size of the reference coding unit.
According to an embodiment, the video decoding apparatus 100 may obtain, from a bitstream, information about a determining order of at least one reference coding unit included in at least one processing block, and determine the determining order of the at least one reference coding unit based on the obtained information. The information about a determining order may be defined as an order or direction of determining reference coding units in a processing block. In other words, an order of determining reference coding units may be independently determined per processing block.
According to an embodiment, the video decoding apparatus 100 may obtain, from a bitstream, information about a determining order of a reference coding unit according to certain data units. For example, the obtainer 105 may obtain, from the bitstream, the information about a determining order of a reference coding unit according to data units, such as images, sequences, pictures, slices, slice segments, and processing blocks. Since the information about a determining order of a reference coding unit indicates a determining order of a reference coding unit in a processing block, the information about a determining order may be obtained per certain data unit including an integer number of processing blocks.
According to an embodiment, the video decoding apparatus 100 may determine at least one reference coding unit based on the determined order.
According to an embodiment, the obtainer 105 may obtain, from the bitstream, information about a determining order of a reference coding unit, as information related to the processing blocks 2302 and 2312, and the video decoding apparatus 100 may determine an order of determining at least one reference coding unit included in the processing blocks 2302 and 2312 and determine at least one reference coding unit included in the picture 2300 according to a determining order of a coding unit. Referring to
The video decoding apparatus 100 may decode determined at least one reference coding unit, according to an embodiment. The video decoding apparatus 100 may decode an image based on reference coding units determined through above embodiments. Examples of a method of decoding a reference coding unit may include various methods of decoding an image.
According to an embodiment, the video decoding apparatus 100 may obtain, from a bitstream, and use block shape information indicating a shape of a current coding unit or split shape information indicating a method of splitting the current coding unit. The block shape information or the split shape information may be included in a bitstream related to various data units. For example, the video decoding apparatus 100 may use the block shape information or split shape information, which is included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. In addition, the video decoding apparatus 100 may obtain, from a bitstream, and use syntax corresponding to the block shape information or the split shape information, according to largest coding units, reference coding units, and processing blocks.
While this disclosure has been particularly shown and described with reference to embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims. The embodiments should be considered in a descriptive sense only and not for purposes of limitation. Therefore, the scope of the disclosure is defined not by the detailed description of the disclosure but by the appended claims, and all differences within the scope will be construed as being included in the present disclosure.
The embodiments of the present disclosure can be written as computer programs and can be implemented in general-use 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-ROMs, or DVDs), etc.
This is a continuation of U.S. application Ser. No. 17/479,674 filed Sep. 20, 2021, which is a continuation of U.S. patent application Ser. No. 15/774,890, filed on May 9, 2018, in the United States Patent and Trademark Office, which is a National Stage Entry of Internal Application No. PCT/KR2016/013043, filed on Nov. 11, 2016, which claims priority under 35 U.S.C. § 119 to U.S. Provisional Application No. 62/253,816, filed on Nov. 11, 2015, in the United States Patent and Trademark Office, the disclosures of which are incorporated herein by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
62253816 | Nov 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 17479674 | Sep 2021 | US |
Child | 18652497 | US | |
Parent | 15774890 | May 2018 | US |
Child | 17479674 | US |