摘要 |
According to one embodiment, a prediction unit generates a prediction block to be used for prediction of a coding target block, based on at least one reference block adjacent to the coding target block in the image. Each number of pixels in the coding target block and the prediction block is a power of two. A calculation unit calculates a residual block having residual pixel values between the coding target block and the prediction block. A decision unit decides whether to code the residual block, based on pixel values of at least one of the coding target block, the reference block and the prediction block. A coding unit codes the residual block by variable length coding when the residual block is decided to be coded, and codes a skip flag representing the residual block not being coded when the residual block is not decided to be coded. |
主权项 |
1. An apparatus for coding a coding target block in an input image, comprising:
a prediction unit, realized by a computer processor to execute programs stored on a memory device, configured to acquire the input image, and generate a prediction block to be used for prediction of the coding target block based on at least one reference block in the input image, each number of pixels in the coding target block and the prediction block being a power of two, the at least one reference block including at least one pixel included in the coding target block; a calculation unit, realized by the computer processor, configured to calculate a residual block having residual pixel values between the coding target block and the prediction block; a decision unit, realized by the computer processor, configured to decide whether to code the residual block, based on pixel values of at least one of the coding target block, the reference block and the prediction block; a coding unit, realized by the computer processor, configured to code the residual block; and a skip processing unit, realized by the computer processor, configured to count up the number of residual blocks not being continuously coded, wherein the at least one reference block is a plurality of reference blocks adjacent to the coding target block in the input image, the decision unit decides not to code the residual block when pixel values of corresponding pixels among the plurality of reference blocks are equal and when a sum of absolute values of pixel values of the residual block is equal to “0”, and decides to code the residual block when pixel values of corresponding pixels among the plurality of reference blocks are not equal or when a sum of absolute values of pixel values of the residual block is not equal to “0”, the skip processing unit counts up the number of residual blocks when a sum of pixel values of the residual block absolute values is equal to “0”, and codes the number of residual blocks which is counted up, the coding unit codes the residual block by variable length coding when the residual block is decided to be coded, and codes the number of residual blocks when a sum of absolute values of pixel values of the residual block is not equal to “0”. |