Method and apparatus for encoding video, and method and apparatus for decoding video
Abstract
Disclosed are a video encoding method and apparatus and a video decoding method and apparatus. The method of encoding video includes: producing a first predicted coding unit of a current coding unit, which is to be encoded; determining whether the current coding unit comprises a portion located outside a boundary of a current picture; and producing a second predicted coding unit is produced by changing a value of pixels of the first predicted coding unit by using the pixels of the first predicted coding unit and neighboring pixels of the pixels when the current coding unit does not include a portion located outside a boundary of the current picture. Accordingly, a residual block that is the difference between the current encoding unit and the second predicted encoding unit, can be encoded, thereby improving video prediction efficiency.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method of decoding video, the method comprising:
extracting information regarding a prediction mode for a current decoding unit, which is to be decoded, from a received bitstream; producing a first predicted decoding unit of the current decoding unit, based on the extracted information; determining whether the current decoding unit includes a portion located outside a boundary of a current picture; and producing a second predicted decoding unit by changing values of pixels of the first predicted decoding unit by using pixels of the first predicted decoding unit and neighboring pixels of the pixels when the current decoding unit does not include the portion located outside the boundary of the current picture, and skipping the producing the second predicted decoding unit when the current decoding unit includes the portion located outside the boundary of the current picture.
2. The method of claim 1 , wherein the determining whether the current decoding unit includes the portion located outside the boundary of the current picture comprises obtaining index information indicating whether the producing the second predicted decoding unit is to be performed.
3. The method of claim 2 , wherein:
if the index information has a first predetermined value, the index information indicates that the producing the second predicted decoding unit is not to be performed; and if the index information has a second predetermined value, the index information indicates that the producing the second predicted decoding unit is to be performed.
4. An apparatus for decoding video, the apparatus comprising:
an entropy decoder which extracts information regarding a prediction mode for a current decoding unit, which is to be decoded, from a received bitstream; a predictor which produces a first predicted decoding unit of the current decoding unit, based on the extracted information; a determiner which determines whether the current decoding unit includes a portion located outside a boundary of a current picture; and a post-processor which produces a second predicted decoding unit by changing values of pixels of the first predicted decoding unit by using the pixels of the first predicted decoding unit and neighboring pixels of the pixels when the current decoding unit does not include the portion located outside the boundary of the current picture, and which skips the producing the second predicted decoding unit when the current decoding unit includes the portion located outside the boundary of the current picture.
5. The apparatus of claim 4 , wherein the determiner obtains index information indicating whether a process of producing the second predicted decoding unit is to be performed.
6. The apparatus of claim 5 , wherein:
if the index information has a first predetermined value, the index information indicates that the process of producing the second predicted decoding unit is not to be performed; and if the index information has a second predetermined value, the index information indicates that the process of producing the second predicted decoding unit is to be performed.
7. A non-transitory computer readable recording medium having recorded thereon a program code for executing the method of claim 1 .
8. A method of restoring an encoded block, the method executed by one or more processors and comprising:
splitting, by the one or more processors, an image into a plurality of maximum coding units based on information about a size of a maximum coding unit; determining, by the one or more processors, at least one coding unit included in the maximum coding unit among the plurality of maximum coding units by splitting the maximum coding unit based on split information; extracting, by the one or more processors, information regarding a prediction mode of a current block included in the at least one coding unit, from a received bitstream; determining, by the one or more processors, neighboring pixels of the current block used for intra prediction by using available neighboring pixels of the current block when the extracted information indicates the prediction mode of the current block is intra prediction; producing, by the one or more processors, a first prediction value of the current block including a first pixel located on a top border in the current block and a second pixel located on a left border in the current block and a third pixel located on a upper left corner in the current block, by calculating an average value of at least one of the available neighboring pixels adjacent to the current block; producing, by the one or more processors, a second prediction value of the first pixel by using a weighted average value of the first prediction value and a pixel value of one neighboring pixel adjacent to the first pixel and located on a same column with the first pixel, a second prediction value of the second pixel by using a weighted average value of the first prediction value and a pixel value of one neighboring pixel adjacent to the second pixel and located on a same row with the second pixel, and a second prediction value of the third pixel by using a weighted average value of the first prediction value, a pixel value of one neighboring pixel adjacent to the third pixel and located on a same column with the third pixel, and a pixel value of one neighboring pixel adjacent to the third pixel and located on a same row with the third pixel; obtaining, by the one or more processors, a residual of the first pixel, a residual of the second pixel and a residual of the third pixel from the received bitstream; restoring, by the one or more processors, the current block including a restored pixel value of the first pixel obtained by adding the residual of the first pixel and the second prediction value of the first pixel, a restored pixel value of the second pixel obtained by adding the residual of the second pixel and the second prediction value of the second pixel, a restored pixel value of the third pixel obtained by adding the residual of the third pixel and the second prediction value of the third pixel; and outputting, by the one or more processors, a restored current block including the restored pixel value of the first pixel, the restored pixel value of the second pixel, and the restored pixel value of the third pixel, wherein, when the neighboring pixels of the current block are located within a boundary of a current picture, the neighboring pixels of the current block located within the boundary of a current picture are determined as available.
9. A method of encoding video, the method executed by one or more processors comprising:
splitting, by the one or more processors, an image into a plurality of maximum coding units based on information about a size of a maximum coding unit; determining, by the one or more processors, at least one coding unit included in the maximum coding unit among the plurality of maximum coding units by splitting the maximum coding unit based on split information; determining, by the one or more processors, neighboring pixels of a current block used for intra prediction by using available neighboring pixels of the current block when a prediction mode of the current block is intra prediction; producing, by the one or more processors, a first prediction value of the current block including a first pixel located on a top border in the current block and a second pixel located on a left border in the current block and a third pixel located on a upper left corner in the current block, by calculating an average value of at least one of the available neighboring pixels adjacent to the current block; producing, by the one or more processors, a second prediction value of the first pixel by using a weighted average value of the first prediction value and a pixel value of one neighboring pixel adjacent to the first pixel and located on a same column with the first pixel, a second prediction value of the second pixel by using a weighted average value of the first prediction value and a pixel value of one neighboring pixel adjacent to the second pixel and located on a same row with the second pixel, and a second prediction value of the third pixel by using a weighted average value of the first prediction value, a pixel value of one neighboring pixel adjacent to the third pixel and located on a same column with the third pixel, and a pixel value of one neighboring pixel adjacent to the third pixel and located on a same row with the third pixel; obtaining, by the one or more processors, a residual of the current block including a first residual of the first pixel obtained by using the second prediction value of the first pixel, a second residual of the second pixel obtained by using the second prediction value of the second pixel and a third residual of the third pixel obtained by using the second prediction value of the third pixel; and outputting the prediction mode of the current block, the first residual of the first pixel, the second residual of the second pixel and the third residual of the third pixel into a bitstream, wherein, when the neighboring pixels of the current block are located within boundary of a current picture, the neighboring pixels of the current block located within the boundary of a current picture are determined as available.
10. An apparatus comprising a non-transitory computer-readable storage medium storing thereon instructions that, when executed by one or more processors of the apparatus, cause the one or more processors to execute operations to generate image data corresponding to a video bitstream, the image data comprising:
an encoded data obtained by performing intra prediction on a current block; and an intra prediction mode information of the current block, wherein the operations, executed using the at least one processor of the apparatus, include:
splitting an image into a plurality of maximum coding units and generating information about a size of a maximum coding unit,
determining at least one coding unit included in the maximum coding unit among the plurality of maximum coding units by splitting the maximum coding unit and generating split information,
determining neighboring pixels of the current block used for intra prediction by using available neighboring pixels of the current block, producing a first prediction value of the current block including a first pixel located on a top border in the current block and a second pixel located on a left border in the current block and a third pixel located on a upper left corner in the current block, by calculating an average value of at least one of the available neighboring pixels adjacent to the current block, and
producing a second prediction value of the first pixel by using a weighted average value of the first prediction value and a pixel value of one neighboring pixel adjacent to the first pixel and located on a same column with the first pixel, a second prediction value of the second pixel by using a weighted average value of the first prediction value and a pixel value of one neighboring pixel adjacent to the second pixel and located on a same row with the second pixel, and a second prediction value of the third pixel by using a weighted average value of the first prediction value, a pixel value of one neighboring pixel adjacent to the third pixel and located on a same column with the third pixel, and a pixel value of one neighboring pixel adjacent to the third pixel and located on a same row with the third pixel,
wherein the encoded data includes a residual of the current block including a first residual of the first pixel obtained by using the second prediction value of the first pixel, a second residual of the second pixel obtained by using the second prediction value of the second pixel and a third residual of the third pixel obtained by using the second prediction value of the third pixel, and wherein, when the neighboring pixels of the current block are located within boundary of a current picture, the neighboring pixels of the current block located within the boundary of a current picture are determined as available.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.