Patent ID: 8265405

Claim:
An image decoding apparatus comprising: a decoding part for decoding coded data obtained by dividing a coding target image into macroblocks of a predetermined size, dividing each said macroblock into blocks of a predetermined shape and size specified based on a macroblock type, performing a motion compensated prediction in each unit of said block to output a motion vector, generating a predicted image from a reference image on the basis of the motion vector, calculating a difference between the predicted image and the coding target image to output a predictive residual image, performing transform coding of the predictive residual image in each unit of a predetermined transform block to output transform coefficients, quantizing the transform coefficients on the basis of a quantization parameter to output quantized transform coefficients, and performing compression coding of coding-related information containing the motion vector, the quantized transform coefficients, the macroblock type, and the quantization parameter to yield coded data, wherein the decoding part comprises a decoded symbol memory for memorizing the coding-related information previously decoded; a decoding procedure provider for providing one or more types of decoding procedures; and a decoded data outputting part for selecting a decoding procedure which is one of the decoding procedures provided by the decoding procedure provider and which corresponds to a coding procedure used in the coding of the coding-related information as a decoding target, based on a predetermined decoding procedure selection criterion, using the coding-related information previously decoded and stored in the decoded symbol memory, and for decoding the coding-related information on the basis of the selected decoding procedure to output decoded data, wherein the decoding part has a function of, for each of the predeterminded transform blocks in a said macroblock, decoding coded block pattern information containing a nonzero coefficient existence flag indicating whether there exists a nonzero, said quantized transform coefficient, and wherein, on the occasion of decoding the coded block pattern information in a coding target macroblock, the decoding procedure provider provides a decoding procedure corresponding to a coding procedure provided so as to decrease a code length as a spatial correlation of the coded block pattern information becomes higher between the coding target macroblock and a neighboring macroblock thereto.