主权项 |
1. A macroblock shuffling device constituting an image coding device for coding image data, comprising:
a superblock dividing portion for inputting an image data constituted in the form of a plurality of macroblocks, and dividing and arranging the plurality of macroblocks into a plurality of superblocks, wherein each macroblock is arranged in only one superblock; a pack creation portion that sequentially extracts the macroblocks from each superblock and rearranges the extracted macroblocks and creates pieces of a plurality of packs, each having a first predetermined number of macroblocks or a second predetermined number of macroblocks that is smaller than the first predetermined number of macroblocks; and a slice creation portion that extracts macroblocks one by one in order from each of the plurality of packs created by the pack creation portion and creates the same number of slices as the first predetermined number of macroblocks, each slice having a plurality of macroblocks, wherein the pack creation portion divides the total of the macroblocks contained in the image data by the number of packs so as to make a quotient thereof the first predetermined number of macroblocks, and in a case where there is no remainder, the pieces of the plurality of packs are created so that the second predetermined number becomes equal to the first predetermined number, while in a case where there is a remainder, the remainder is made the second predetermined number, and the of pieces of the plurality of packs are created so that only one pack has the second predetermined number of macroblocks, and the slice creation portion extracts the plurality of macroblocks contained in each of the slices from different packs, respectively. |