WO2010052837A1 - 画像復号装置、画像復号方法、集積回路及びプログラム - Google Patents

画像復号装置、画像復号方法、集積回路及びプログラム Download PDF

Info

Publication number
WO2010052837A1
WO2010052837A1 PCT/JP2009/005476 JP2009005476W WO2010052837A1 WO 2010052837 A1 WO2010052837 A1 WO 2010052837A1 JP 2009005476 W JP2009005476 W JP 2009005476W WO 2010052837 A1 WO2010052837 A1 WO 2010052837A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
decoding
macroblock
block
decoded
Prior art date
Application number
PCT/JP2009/005476
Other languages
English (en)
French (fr)
Inventor
林宙輝
Original Assignee
パナソニック株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=42152650&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=WO2010052837(A1) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by パナソニック株式会社 filed Critical パナソニック株式会社
Priority to JP2010522111A priority Critical patent/JP5340289B2/ja
Priority to CN2009801399815A priority patent/CN102177715A/zh
Priority to US12/812,134 priority patent/US8737476B2/en
Publication of WO2010052837A1 publication Critical patent/WO2010052837A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Definitions

  • the present invention relates to an image decoding apparatus, an image decoding method, an integrated circuit, and a program for decoding encoded image data.
  • MPEG Motion Pictures Experts Group
  • the MPEG encoding method uses the property of moving images that a frame close in time to the current frame is similar. By utilizing this property and predicting the current frame from temporally close frames and encoding only the difference between the input image and the predicted image, the amount of data can be reduced.
  • the predicted image is generated using the image at the position shifted by the amount of movement as the reference image. is doing.
  • a high compression ratio is realized by encoding the difference between the predicted image thus generated and the input image and this motion information (this is referred to as a motion vector). Such processing is called motion compensation prediction.
  • Decoding processing or encoding processing including motion compensation prediction is performed by dividing one screen (picture) into blocks (luminance components: 16 pixels ⁇ 16 pixels) having a predetermined number of pixels. This pixel block is called a macro block.
  • an image at a position corresponding to a motion vector is acquired from a memory as a reference image for each macroblock, and motion compensation prediction is performed.
  • the data amount of one pixel is 1 byte.
  • MPEG-2 ISO / IEC13818-2
  • MPEG-4 ISO / IEC14496-2
  • H.C. H.264 / MPEG-4 AVC ISO / IEC 14496-10) (hereinafter simply referred to as “H.264”)
  • VC-1 SMPTE 421M
  • H.264 realizes a compression rate 2 to 4 times that of the conventional MPEG-2, and is often used for compression of high-definition images such as Full HD (High Definition) (1920 pixels ⁇ 1080 pixels). It has been.
  • a method for realizing high computing performance by performing parallel processing using a plurality of existing full HD image decoding devices can be considered.
  • H. In a new encoding method typified by H.264, when a certain macroblock is encoded, the compression rate is increased by utilizing the correlation with neighboring neighboring macroblocks.
  • Figure 1 shows H. 2 is a diagram illustrating a decoding method for increasing the compression rate by using the correlation with neighboring neighboring macroblocks in H.264.
  • FIG. 2 is a diagram for explaining a decoding method of a conventional image decoding apparatus.
  • Each block shown in the figure represents a macroblock in a picture, the number given to the macroblock indicates the processing time, and the macroblocks with the same number are decoded in parallel at the same time.
  • the conventional image decoding apparatus instantaneously transfers a lot of data from the memory. For this reason, it is necessary to use a memory capable of transferring a large amount of data, which increases the memory bandwidth required for the memory used in the image decoding apparatus.
  • the image decoding device shares a memory with another device, and there is an instantaneous increase in the data transfer amount of the image decoding device, the other device can be used. Since the memory bandwidth is reduced and the transfer of other devices is hindered, the processing of other devices is delayed. Thus, the conventional image decoding apparatus has a problem with respect to the memory bandwidth.
  • the present invention solves the above-described conventional problems, and suppresses an instantaneous increase in data transfer amount and enables image data parallel decoding of image data with a small memory bandwidth, an image decoding method, and an integrated circuit And to provide a program.
  • an image decoding apparatus decodes encoded image data divided and encoded for each block having a predetermined number of pixels, for each block.
  • a storage unit storing reference image data to be referred to when the encoded image data is decoded, and a reference when the encoded image data is decoded for each block.
  • a predecode unit that decodes reference information indicating the number of reference images to be read, and is read from the storage unit when the encoded image data is decoded for each block using the reference information Using the data transfer amount prediction unit that calculates the predicted data amount of the reference image and the calculated prediction data amount, the variation in the data amount read from the storage unit is reduced. Includes a block determining section for determining a plurality of blocks of the encoded image data decoding the column is performed, and a plurality of block decoding unit for decoding a plurality of blocks of the determined said coded image data in parallel.
  • the prediction data amount of the reference image is calculated from the number of reference images, and the plurality of blocks of the encoded image data to be decoded in parallel are determined, so that the plurality of blocks are decoded in parallel.
  • the predicted data amount is double that required when one reference image is required. That is, for example, H.I.
  • image data encoded by an MPEG encoding method such as H.264 is decoded in parallel, the amount of data to be acquired from the memory can be accurately predicted in advance.
  • the blocks to be decoded in parallel can be appropriately selected so as to be smaller. As a result, an instantaneous increase in data transfer amount can be suppressed and parallel decoding of image data can be performed with a small memory bandwidth.
  • the image decoding apparatus shares a storage unit with another apparatus and the data transfer amount of the other apparatus is large, the data transfer amount of the image decoding apparatus is reduced. By doing so, the transfer of the other device can be prevented, and the processing of the other device is not affected. Further, when the data transfer amount of the other device is small, the image decoding process itself of the image decoding device can be speeded up by increasing the data transfer amount of the image decoding device.
  • the predecoding unit performs variable-length decoding using macroblock type information of a macroblock, which is the block, included in the encoded image data as the reference information
  • the data transfer amount prediction unit includes: The predicted data amount is calculated by multiplying the number of reference images indicated by the macroblock type information by the data amount of the reference image.
  • the macro block type information is decoded as the reference information indicating the number of reference images.
  • the reference information indicating the number of reference images.
  • zero reference images are required for decoding an I macroblock type macroblock
  • one reference image is required for decoding a P macroblock type macroblock
  • a B macroblock type macroblock is Two reference images are necessary for decoding.
  • the number of reference images can be easily acquired, an increase in the instantaneous data transfer amount can be suppressed, and parallel decoding of image data can be performed with a small memory bandwidth.
  • the reference image is referred to in units of divided blocks obtained by dividing each block of the encoded image data into smaller blocks.
  • the predecoding unit further decodes block division pattern information indicating the size of the divided block included in the encoded image data, and the data transfer amount prediction unit is indicated by the block division pattern information
  • the data amount of the reference image at the integer pixel position and the probability that the reference image at the integer pixel position is referenced and the probability that the reference image at the decimal pixel position is referred to
  • the predicted data amount is calculated by weighting the data amount of the reference image at the decimal pixel position.
  • prediction is performed by weighting the data amount of the reference image at integer pixel positions and the data amount of the reference image at decimal pixel positions for each divided block. Calculate the amount of data.
  • the predicted data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected. Therefore, even when it is necessary to refer to the reference image in units of divided blocks, it is possible to suppress the instantaneous increase in data transfer amount and perform parallel decoding of image data with a small memory bandwidth.
  • the data transfer amount prediction unit sets, for each of the divided blocks, a first probability that a first reference image whose horizontal position and vertical position are both integer pixel positions is referred to as a first probability, and the horizontal position is a decimal number.
  • the probability that the second reference image having the pixel position and the vertical position is the integer pixel position is referred to as the second probability
  • the third reference image in which the horizontal position is the integer pixel position and the vertical position is the fractional pixel position is referred to.
  • the third probability, and the fourth probability that the fourth reference image whose horizontal position and vertical position are both decimal pixel positions is referred to as the fourth probability, and the first reference image, the second reference image, the third
  • the predicted data amount is calculated by multiplying the data amounts of the reference image and the fourth reference image by the first probability, the second probability, the third probability, and the fourth probability, respectively, and adding them.
  • the predicted data amount is calculated using the probability that a reference image whose horizontal position or vertical position is an integer pixel position or a decimal pixel position is referred to.
  • the calculation is performed in consideration of whether the horizontal position or the vertical position is an integer pixel position or a fractional pixel position, so that the predicted data amount can be calculated more accurately.
  • an instantaneous increase in data transfer amount can be suppressed and parallel decoding of image data can be performed with a small memory bandwidth.
  • the predecoding unit further decodes motion information indicating a motion amount between an image of the block to be decoded and a reference image for each block, and the data transfer amount prediction unit includes the block Each time, the predicted data amount may be calculated using the motion information.
  • the predicted data amount is calculated using the motion information. Therefore, since the prediction data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected. As a result, an instantaneous increase in data transfer amount can be suppressed and parallel decoding of image data can be performed with a small memory bandwidth.
  • the data transfer amount prediction unit determines whether the position of the reference image indicated by the motion information is a decimal pixel position, and determines that the position of the reference image is a decimal pixel position.
  • the data amount of the reference image at the decimal pixel position is calculated as the predicted data amount.
  • the data amount of the reference image at the decimal pixel position is calculated as the predicted data amount.
  • the prediction data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected.
  • an instantaneous increase in data transfer amount can be suppressed and parallel decoding of image data can be performed with a small memory bandwidth.
  • the data transfer amount prediction unit determines whether the address of the reference image indicated by the motion information is an aligned address, and determines that the address of the reference image is not an aligned address. In this case, the predicted data amount is calculated by correcting the address of the reference image to an aligned address.
  • the predicted data amount is calculated by correcting the address of the reference image to the aligned address.
  • the prediction data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected.
  • an instantaneous increase in data transfer amount can be suppressed and parallel decoding of image data can be performed with a small memory bandwidth.
  • the block determination unit uses the predicted data amount to change the decoding order of the blocks of the encoded image data so that a variation in the data amount read from the storage unit is reduced.
  • a plurality of blocks of the encoded image data to be decoded in parallel are determined.
  • the block determination unit uses the predicted data amount to change the number of blocks of the encoded image data to be decoded in parallel so that the fluctuation of the data amount read from the storage unit is reduced. Thus, a plurality of blocks of the encoded image data to be decoded in parallel may be determined.
  • the block determination unit is configured such that an average value of predicted data amounts of a plurality of blocks of the encoded image data to be decoded in parallel approaches an average value of predicted data amounts of a predetermined number of blocks.
  • a plurality of blocks of the encoded image data to be decoded in parallel are determined.
  • a plurality of blocks to be decoded in parallel are determined so that the average value of the prediction data amounts of the plurality of blocks approaches the average value of the prediction data amounts of a predetermined number of blocks.
  • the prediction data amount of the block in which parallel decoding is performed becomes an average value. Accordingly, it is possible to perform parallel decoding of image data with a small memory bandwidth while suppressing an instantaneous increase in data transfer amount.
  • the block determination unit is configured such that a total value of predicted data amounts of a plurality of blocks of the encoded image data to be decoded in parallel is different from a maximum data amount that can be transferred from the storage unit.
  • the plurality of blocks of the encoded image data to be decoded in parallel are determined so as to approach the difference data amount that is the data amount obtained by subtracting the data amount to which the data transfer is performed.
  • the block determination unit performs decoding in parallel so that a total value of predicted data amounts of a plurality of blocks of the encoded image data to be decoded in parallel is increased.
  • a plurality of blocks of encoded image data are determined.
  • the block determination unit performs decoding in parallel so that a total value of predicted data amounts of a plurality of blocks of the encoded image data to be decoded in parallel is small. A plurality of blocks of the encoded image data to be determined is determined.
  • the plurality of blocks to be decoded in parallel are determined so that the total value of the prediction data amounts of the plurality of blocks to be decoded in parallel approaches the difference data amount. That is, when the difference data amount is large, the total value of the prediction data amounts of a plurality of blocks to be decoded in parallel is increased, and when the difference data amount is small, the plurality of blocks to be decoded in parallel are decoded. A plurality of blocks to be decoded in parallel are determined so that the total value of the predicted data amount is small. Thereby, parallel decoding of image data can be performed with a preset memory bandwidth.
  • the present invention can be realized not only as such an image decoding device but also as an integrated circuit including each processing unit constituting the device, or as a method using the processing of each processing unit as a step. Can be realized. Furthermore, the present invention can be realized as a program for causing a computer to execute these steps, as a recording medium such as a computer-readable CD-ROM in which the program is recorded, or as information, data, or a signal indicating the program. It can also be realized. These programs, information, data, and signals may be distributed via a communication network such as the Internet.
  • the image decoding apparatus of the present invention it is possible to perform parallel decoding of image data with a small memory bandwidth while suppressing an instantaneous increase in data transfer amount.
  • the image decoding device shares a memory with another device and the data transfer amount of the other device is large, the data transfer amount of the image decoding device is reduced.
  • the transfer of another device can be prevented, and the processing of the other device is not affected.
  • the image decoding process itself of the image decoding device can be speeded up by increasing the data transfer amount of the image decoding device.
  • FIG. 2 is a diagram illustrating a decoding method for increasing the compression rate by using the correlation with neighboring neighboring macroblocks in H.264.
  • FIG. 2 is a diagram for explaining a decoding method of a conventional image decoding apparatus.
  • FIG. 3 is a block diagram illustrating a functional configuration of the image decoding apparatus according to the first embodiment.
  • FIG. 4 is a block diagram showing a functional configuration of the macroblock decoding unit in the first embodiment.
  • FIG. 2 is a diagram illustrating a configuration of an H.264 encoded stream.
  • FIG. 6 is a flowchart illustrating an example of the operation of the image decoding apparatus according to the first embodiment.
  • FIG. 7 is a flowchart illustrating an example of processing in which the data transfer amount prediction unit according to Embodiment 1 calculates the predicted data amount.
  • FIG. 8 is a diagram illustrating a macroblock type and a macroblock division pattern in a P slice.
  • FIG. 9 is a diagram illustrating a macroblock type and a macroblock division pattern in a B slice.
  • FIG. 10 is a flowchart illustrating an example of processing for determining macroblocks to be decoded in parallel by the block determination unit according to the first embodiment.
  • FIG. 11 is a flowchart illustrating an example of processing in which the macroblock decoding unit according to Embodiment 1 decodes a macroblock.
  • FIG. 8 is a diagram illustrating a macroblock type and a macroblock division pattern in a P slice.
  • FIG. 9 is a diagram illustrating a macroblock type and a macroblock division pattern in a B slice.
  • FIG. 10 is a flowchart illustrating an example of processing for determining
  • FIG. 12 is a flowchart illustrating an example of processing in which the data transfer amount prediction unit according to the second embodiment calculates the predicted data amount.
  • FIG. 13 is a diagram for explaining a macroblock division pattern.
  • FIG. 14 is a diagram for explaining a sub-macroblock division pattern.
  • FIG. 15 is a diagram illustrating sub-macroblock types and sub-macroblock division patterns in a P macroblock.
  • FIG. 16 is a diagram showing sub-macroblock types and sub-macroblock division patterns in the B macroblock.
  • FIG. 17 shows the H.264 in the second embodiment. It is a figure which shows the calculation method of the pixel value of a reference image of the decimal position pixel in H.264 motion compensation prediction.
  • FIG. 13 is a diagram for explaining a macroblock division pattern.
  • FIG. 14 is a diagram for explaining a sub-macroblock division pattern.
  • FIG. 15 is a diagram illustrating sub-macroblock types and sub-ma
  • FIG. 19 is a flowchart illustrating an example of a process in which the data transfer amount prediction unit according to the third embodiment calculates a predicted data amount.
  • FIG. 20 is a flowchart illustrating an example of processing for calculating a predicted data amount when the data transfer amount prediction unit according to the third embodiment has a macroblock division pattern of 8 pixels ⁇ 8 pixels.
  • FIG. 21 is a flowchart illustrating an example of processing for calculating a predicted data amount when the data transfer amount prediction unit according to the third embodiment has a macroblock division pattern other than 8 pixels ⁇ 8 pixels.
  • FIG. 19 is a flowchart illustrating an example of a process in which the data transfer amount prediction unit according to the third embodiment calculates a predicted data amount.
  • FIG. 20 is a flowchart illustrating an example of processing for calculating a predicted data amount when the data transfer amount prediction unit according to the third embodiment has a macroblock division pattern of 8 pixels ⁇ 8 pixels.
  • FIG. 21 is a flowchart illustrating an example of processing for
  • FIG. 22 is a flowchart illustrating an example of processing for calculating a predicted data amount when the data transfer amount prediction unit according to the fourth embodiment has a macroblock division pattern of 8 pixels ⁇ 8 pixels.
  • FIG. 23 is a diagram illustrating that the data transfer amount prediction unit according to the fourth embodiment corrects the reference image to the aligned address.
  • FIG. 24 is a flowchart illustrating an example of processing for calculating a predicted data amount when the data transfer amount prediction unit according to the fourth embodiment has a macroblock division pattern other than 8 pixels ⁇ 8 pixels.
  • FIG. 25 is a flowchart illustrating an example of processing in which the block determination unit according to Embodiment 5 determines macroblocks to be decoded in parallel.
  • FIG. 26 is a diagram illustrating that the block determination unit according to the fifth embodiment determines the number of macroblocks to be decoded in parallel.
  • FIG. 27 is a block diagram illustrating a functional configuration when another device according to Embodiment 6 accesses the external memory of the image decoding device.
  • FIG. 28 is a flowchart illustrating an example of processing for determining macroblocks to be decoded in parallel by the block determination unit according to the sixth embodiment.
  • FIG. 29 is a diagram illustrating an example of an integrated circuit that controls the image decoding apparatus.
  • H.264 An embodiment in which the present invention is applied to an image decoding apparatus compatible with the H.264 encoding method will be described with reference to the drawings. In the present embodiment, H.264 is used. Although an image decoding device corresponding to the H.264 encoding method is shown, any image decoding device corresponding to a moving image encoding method that performs motion compensation prediction can be realized in the same form.
  • FIG. 3 is a block diagram showing a functional configuration of the image decoding apparatus 100 according to Embodiment 1 of the present invention.
  • the image decoding apparatus 100 is an apparatus that performs decoding of encoded image data divided and encoded for each block having a predetermined number of pixels for each block.
  • the block having a predetermined number of pixels is a macro block.
  • the image decoding apparatus 100 includes an external memory 110, a stream parser unit 120, a decoding control unit 130, a macroblock decoding unit 140, a macroblock decoding unit 150, a macroblock decoding unit 160, and a deblocking filter unit 170. , And an adjacent MB information memory 180.
  • the adjacent MB information memory 180 stores information on neighboring adjacent macroblocks necessary for the macroblock decoding process.
  • the external memory 110 stores an encoded stream, a decoded stream, a reference image, and a decoded image.
  • the encoded stream is input encoded image data.
  • the decoded stream is encoded image data that has been variable-length decoded by the stream parser unit 120.
  • the reference image is an image that is referred to when encoded image data is decoded.
  • the decoded image is an image obtained by decoding the encoded image data.
  • the external memory 110 corresponds to a “storage unit” described in the claims.
  • the external memory 110 may be shared with a memory of another device different from the image decoding device 100 of the present embodiment.
  • the external memory 110 stores data other than the encoded stream, the decoded stream, the reference image, and the decoded image.
  • the stream parser unit 120 performs variable length decoding of the encoded stream, generates a decoded stream, and decodes parameters necessary for predicting the data amount of the reference image acquired from the external memory 110 during macroblock decoding. To the unit 130.
  • the stream parser unit 120 is H.264.
  • An encoded stream encoded by H.264 is read from the external memory 110, variable length decoding is performed, and the decoded decoded stream is written back to the external memory 110.
  • at least reference information indicating the number of reference images that are referred to for each macroblock when decoding the encoded image data is performed. Is sent to the decoding control unit 130.
  • the reference information is macroblock type information of a macroblock included in the encoded image data.
  • the stream parser unit 120 corresponds to the “predecode unit” recited in the claims.
  • the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 read the decoded stream from the external memory 110 in accordance with the instruction from the decoding control unit 130, perform the decoding process of the macroblock in parallel, and reconfigured Pixel data is output to the deblocking filter unit 170.
  • the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 read pixel data of a reference image used for motion compensation prediction from the external memory 110 as necessary.
  • Each of the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 corresponds to a “block decoding unit” described in the claims.
  • the deblocking filter unit 170 performs a deblocking filter process for removing block noise on the reconstructed pixel data, and outputs the decoded image to the external memory 110. At this time, the decoded image used as the reference image in the subsequent decoding process is also stored in the external memory as the reference image.
  • the decoding control unit 130 issues a processing start instruction to the stream parser unit 120, the macroblock decoding unit 140, the macroblock decoding unit 150, the macroblock decoding unit 160, and the deblocking filter unit 170, and performs the entire image decoding process. Control is in progress.
  • the decoding control unit 130 includes a data transfer amount prediction unit 131 and a block determination unit 132.
  • the data transfer amount prediction unit 131 uses the macro block type information for each macro block to calculate the prediction data amount of the reference image read from the external memory 110 when the encoded image data is decoded. That is, the data transfer amount prediction unit 131 uses the parameters sent from the stream parser unit 120 to calculate the amount of reference image data that needs to be acquired from the external memory 110 when performing motion compensation prediction in the macroblock decoding process. Predict by unit.
  • the data transfer amount prediction unit 131 calculates the predicted data amount by multiplying the number of reference images indicated by the macroblock type information by the data amount of the reference image.
  • the block determination unit 132 determines a plurality of macroblocks to be decoded in parallel using the predicted data amount calculated by the data transfer amount prediction unit 131 so that the fluctuation of the data amount read from the external memory 110 is reduced. To do. Specifically, the block determination unit 132 predetermines the macroblock decoding order based on the predicted data amount so that the amount of reference image data acquired from the external memory 110 does not increase instantaneously during macroblock decoding. Decide.
  • the decoding control unit 130 controls the macroblock decoding processes of the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 according to a predetermined decoding order.
  • the decoding control unit 130 issues a decoding start instruction to the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160
  • the neighboring adjacent information necessary for decoding the macroblock to be decoded is read from the adjacent MB information memory 180.
  • the macroblock information is read and passed to the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160.
  • the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 decode a plurality of macroblocks determined by the block determination unit 132 in parallel.
  • the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 finish the decoding process of the macroblock, it is necessary as the neighboring adjacent macroblock information for the subsequent decoding process among the decoded macroblock information.
  • Information is passed to the decoding control unit 130.
  • the decoding control unit 130 stores this in the adjacent MB information memory 180.
  • the configuration of the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 will be described in detail.
  • the configuration of the macroblock decoding unit 140 will be described below.
  • FIG. 4 is a block diagram illustrating a functional configuration of the macroblock decoding unit 140 according to the first embodiment.
  • the macroblock decoding unit 140 includes an inverse quantization unit 141, an inverse orthogonal transform unit 142, an intra-screen prediction unit 143, a motion compensation prediction unit 144, and an addition circuit 145.
  • the inverse quantization unit 141 reads the quantized coefficient data from the decoded stream read from the external memory 110, performs inverse quantization, and outputs the coefficient data to the inverse orthogonal transform unit 142.
  • the inverse orthogonal transform unit 142 performs inverse orthogonal transform on the coefficient data to generate pixel data in the spatial domain.
  • One of the intra-screen prediction unit 143 and the motion compensation prediction unit 144 is activated depending on the prediction mode read from the decoded stream, and generates pixel data of the predicted image.
  • the intra-screen prediction unit 143 is activated when the prediction mode is intra prediction, and generates pixel data of a predicted image by performing intra-screen prediction.
  • the motion compensation prediction unit 144 is activated when the prediction mode is inter prediction, acquires pixel data of a reference image corresponding to the decoded motion vector, and performs motion compensation prediction, thereby performing pixel compensation of the predicted image. Generate data.
  • intra-screen prediction unit 143 and the motion compensation prediction unit 144 perform intra-screen prediction and motion compensation prediction using information on neighboring neighboring macroblocks passed from the decoding control unit 130.
  • the adder circuit 145 adds the pixel data output from the inverse orthogonal transform unit 142 and the pixel data of the predicted image output from the in-screen prediction unit 143 or the motion compensation prediction unit 144, and outputs reconstructed pixel data. To do.
  • Figure 5 shows a typical H.264.
  • 2 is a diagram illustrating a configuration of an H.264 encoded stream.
  • FIG. 5 is a diagram illustrating a configuration of an H.264 encoded stream.
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • a start code (SC: Start Code) 501 indicating a data delimiter is inserted at the head of the SPS header 502, the PPS header 503, and the slice header 504. Therefore, by performing a start code search for the encoded stream and analyzing the data following the start code 501, the SPS header 502, the PPS header 503, and the slice header 504 can be searched from the encoded stream. .
  • SC Start Code
  • a PPS header 503 exists at the head of a picture, and a series of data until the next PPS header 503 appears is data for one picture.
  • one picture data there are as many sets of slice headers 504 and slice data 505 as the number of slices present in the picture.
  • FIG. 6 is a flowchart showing an example of the operation of the image decoding apparatus 100 according to Embodiment 1 of the present invention.
  • the stream parser unit 120 reads the encoded stream from the external memory 110, and sequentially performs decoding of the SPS header 502 (S102), decoding of the PPS header 503 (S104), and decoding of the slice header 504 (S106).
  • the stream parser unit 120 performs only variable length decoding of the macroblock included in the slice data and generates a decoded stream (S108).
  • an MB (Macroblock) start code is inserted at the head of the macroblock so that the head of the macroblock can be recognized when the macroblock is decoded in parallel in the subsequent processing.
  • the MB start code is set to 0x000001F0.
  • the MB start code may be anything as long as it is a unique value that does not overlap with other codes.
  • the stream parser unit 120 includes mb_type (Macroblock Type), sub_mb_type (Sub-Macroblock Type), ref_idx (Reference Index), ffdor, etc. among the decoded parameters.
  • the parameter necessary for calculating the motion vector is sent to the decoding control unit 130.
  • the stream parser unit 120 sends at least mb_type of the decoded parameters to the decoding control unit 130. Also, mb_type is included in the “macroblock type information” described in the claims.
  • the stream parser unit 120 determines whether the decoded slice is the end of the picture (S110).
  • the number of slices included in the picture can be determined by decoding num_slice_groups_minus1 in the PPS header 503. Therefore, if the number obtained by subtracting 1 from the number of decoded slices matches num_slice_groups_minus1, it is determined that the picture is at the end of the picture.
  • the stream parser unit 120 determines that it is not the end of the picture (NO in S110), it sequentially performs decoding of the slice header 504 (S106) and variable length decoding (S108) of the slice data 505 until the end of the picture is reached. .
  • the data transfer amount prediction unit 131 of the decoding control unit 130 performs an external process during the motion compensation prediction in the decoding process of the macroblock.
  • the predicted data amount of the reference image that must be acquired from the memory 110 is calculated for each macroblock (S112). Details of the process of calculating the predicted data amount by the data transfer amount prediction unit 131 will be described later.
  • the block determination unit 132 determines a plurality of macroblocks to be decoded in parallel according to the prediction value. (S114). Specifically, the block determination unit 132 determines the decoding order of macroblocks. The details of the process in which the block determination unit 132 determines macroblocks to be decoded in parallel will be described later.
  • the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 are each read from the external memory 110 according to the instruction of the decoding control unit 130.
  • the decoded stream is read, and decoding processing of the decoding target macroblock is performed in parallel (S116). Details of a process in which each of the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 decodes a macroblock will be described later.
  • the decoding control unit 130 instructs the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 to start decoding in units of macroblocks according to the decoding order determined by the block determination unit 132.
  • the decoding control unit 130 determines whether the decoded macroblock is the end of the picture. Is determined (S118).
  • the decoding control unit 130 determines that the decoded macroblock is not the end of the picture (NO in S118), the macroblock decoding unit 140, the macroblock decoding unit 150, and the macroblock decoding unit 160 The macroblock decoding process (S116) is performed until the end of.
  • the deblocking filter unit 170 applies the deblocking filter to the reconstructed pixel data for one picture. Processing is performed (S120).
  • the decoding control unit 130 determines whether or not the picture on which the deblocking filter process has been performed is the end of the stream (S122).
  • the decoding control unit 130 determines that the picture is not the end of the stream (NO in S122), and the stream parser unit 120 performs decoding of the PPS header 503 again (S104).
  • the encoded stream is decoded one after another.
  • the process ends.
  • the data transfer amount prediction unit 131 calculates the predicted data amount by a prediction method based on a macroblock type using mb_type in the macroblock layer.
  • FIG. 7 is a flowchart illustrating an example of processing in which the data transfer amount prediction unit 131 according to the first embodiment calculates the predicted data amount.
  • the process of calculating the prediction data amount for one macroblock is shown, but the data transfer amount prediction unit 131 performs the process shown in the figure for all the macroblocks in the picture.
  • the data transfer amount prediction unit 131 acquires the macroblock type of the macroblock to be decoded from the mb_type decoded by the stream parser unit 120 (S202).
  • mb_type is a parameter obtained when the stream parser unit 120 performs variable length decoding on the encoded stream, and is sent from the stream parser unit 120 to the decoding control unit 130 in advance.
  • I macroblock type there are three types of macroblock types: I macroblock type, P macroblock type, and B macroblock type. For this reason, it will be described below which of the three macroblock types the data transfer amount prediction unit 131 acquires from the mb_type.
  • FIG. 8 is a diagram showing a macroblock type and a macroblock division pattern in a P slice.
  • FIG. 9 is a diagram showing a macroblock type and a macroblock division pattern in a B slice.
  • the slice type of I slice, P slice, or B slice is obtained.
  • the P slice is composed of P macroblocks and I macroblocks. Specifically, a macroblock whose mb_type is “0 to 4” is a P macroblock, and a macroblock whose mb_type is “5 to 25” is an I macroblock.
  • the data transfer amount prediction unit 131 is the P macro block type
  • the mb_type is “5 to 25”
  • the macro block type is acquired assuming that the macro block is the I macro block type.
  • the B slice is composed of B macroblocks and I macroblocks.
  • macroblocks with mb_type “0 to 22” are B macroblocks
  • macroblocks with mb_type “23 to 25” are I macroblocks.
  • the data transfer amount prediction unit 131 is the B macroblock type
  • the mb_type is “23 to 25”
  • the macro block type is acquired assuming that the macro block is the I macro block type.
  • the I slice consists of only I macroblocks. For this reason, the data transfer amount prediction unit 131 acquires the macroblock type on the assumption that the macroblock of the I slice is the I macroblock type.
  • the data transfer amount prediction unit 131 determines which macroblock type is the acquired macroblock type (S204).
  • the data transfer amount prediction unit 131 calculates that the predicted data amount is 0 bytes (S206).
  • the macroblock of the I macroblock type does not require reference image data because a predicted image is generated by intra prediction and no motion compensation prediction is performed.
  • the data transfer amount prediction unit 131 calculates that the predicted data amount is 256 bytes (S208).
  • the macro block of the P macro block type performs motion compensation prediction using one temporally close frame as a reference image
  • one macro block that is, 256 bytes (16 pixels ⁇ 16 pixels ⁇ 1). Reference image data is required.
  • the data transfer amount prediction unit 131 calculates that the predicted data amount is 512 bytes (S210).
  • the macro block of the B macro block type performs motion compensation prediction using two temporally close frames as reference images, it is equivalent to two macro blocks, that is, 512 bytes (16 pixels ⁇ 16 pixels ⁇ 2). Reference image data is required.
  • the prediction data amount of the reference image necessary for motion compensation prediction can be calculated according to the macroblock type. That is, in the prediction method using the macroblock type according to the present embodiment, it is assumed that this prediction data amount is the prediction data amount of the reference image acquired from the external memory 110.
  • the block determination unit 132 is configured so that the average value of the prediction data amounts of a plurality of macroblocks that are decoded in parallel approaches the average value of the prediction data amounts of a predetermined number of macroblocks.
  • a plurality of macroblocks to be decoded in parallel are determined by changing the decoding order of the blocks.
  • FIG. 10 is a flowchart illustrating an example of a process for determining a macroblock to be decoded in parallel by the block determination unit 132 according to the first embodiment.
  • the block determination unit 132 calculates an average value of the predicted data amounts of a predetermined number of macroblocks (S302).
  • the predetermined number of macroblocks may be all macroblocks in the picture, or may be macroblocks for which the block determining unit 132 has already determined the decoding order.
  • the block determination unit 132 performs the macro decoding in parallel so that the average value of the prediction data amounts of the plurality of macro blocks that are decoded in parallel approaches the average value of the prediction data amounts of the predetermined number of macro blocks.
  • a block is selected (S304). Here, it is assumed that the predetermined number of macroblocks are all macroblocks in the picture.
  • the block determination unit 132 calculates the average value of the predicted data amount (S302) and selects macroblocks to be decoded in parallel (S304) will be specifically described.
  • the decoding order of the macro blocks is performed in the order shown in FIG. However, in this embodiment, since there are only three macroblock decoding units, if there are more than three macroblocks that can be decoded in parallel, macroblocks with the same number cannot be decoded at once.
  • the block determination unit 132 decodes the macroblocks decoded in parallel so that the average value of the prediction data amount of the reference image of the macroblocks decoded in parallel is as close as possible to the average value of the prediction data amount of each macroblock. Select. This is because the block determination unit 132 obtains all combination patterns of macroblocks to be decoded in parallel, calculates the average value of the prediction data amount of the reference image for each combination pattern, and the combination that is closest to the overall average value To do.
  • the block determination unit 132 changes the decoding order of the macroblocks so that the selected plurality of macroblocks are decoded in parallel (S306).
  • H.264 encoded image data can be decoded in parallel.
  • the data transfer necessary for decoding the H.264 encoded image is other than the acquisition and transfer of the reference image for motion compensation prediction.
  • the acquisition transfer of the reference image occupies most of the data transfer amount necessary for decoding, the memory bandwidth of the external memory 110 is reduced by suppressing an instantaneous increase in the data transfer amount of the reference image acquisition. Can be suppressed.
  • FIG. 11 is a flowchart showing an example of processing in which the macroblock decoding unit 140 according to the first embodiment decodes a macroblock. Note that the process of performing macroblock decoding by the macroblock decoding unit 150 and the macroblock decoding unit 160 is the same as the process of decoding the macroblock by the macroblock decoding unit 140, and is therefore omitted.
  • the macroblock decoding unit 140 when receiving a macroblock decoding start instruction from the decoding control unit 130, the macroblock decoding unit 140 reads the decoding stream of the decoding target macroblock from the external memory 110 (S402).
  • the macroblock decoding unit 140 reads the prediction mode from the decoded stream, and determines whether the prediction mode is intra prediction or inter prediction (S404).
  • the intra prediction unit 143 is activated to perform intra prediction processing, and to obtain pixel data of the prediction block. Generate (S406).
  • the motion compensation prediction unit 144 is activated to perform motion compensation prediction processing, and to obtain pixel data of the prediction block. Generate (S408).
  • the macroblock decoding unit 140 reads prediction error data from the decoded stream, performs inverse quantization by the inverse quantization unit 141, and performs inverse orthogonal transform by the inverse orthogonal transform unit 142, thereby converting the prediction error pixel data for the prediction block.
  • the macroblock decoding unit 140 adds the pixel data of the prediction block and the prediction error pixel data by the addition circuit 145 to obtain reconstructed pixel data (S412).
  • the macroblock decoding unit 140 notifies the decoding control unit 130 of the completion of the macroblock (S414). At the same time, the macroblock decoding unit 140 passes information to be used as neighboring adjacent macroblock information for subsequent decoding among the decoded macroblock information to the decoding control unit 130.
  • the predicted data amount of the reference image is calculated from the number of reference images, and a plurality of blocks of encoded image data to be decoded in parallel are determined.
  • a plurality of blocks are decoded in parallel. That is, when the encoded image data is decoded in parallel, the predicted data amount acquired from the memory can be accurately calculated in advance, so that the variation in the data amount read from the external memory 110 is reduced in parallel. It is possible to appropriately select a block to be decoded.
  • the macro block type information is decoded as reference information indicating the number of reference images. Thereby, the number of reference images can be easily obtained.
  • a plurality of blocks to be decoded in parallel are determined by changing the decoding order of the blocks. Thereby, the decoding order of blocks can be changed so that the data transfer amount does not increase instantaneously. If the encoded image data is most effective in this method, the memory bandwidth of the external memory 110 can be reduced by up to almost half.
  • a plurality of blocks to be decoded in parallel are determined so that the average value of the prediction data amounts of the plurality of blocks approaches the average value of the prediction data amounts of a predetermined number of blocks. Thereby, the prediction data amount of the block in which parallel decoding is performed becomes an average value.
  • the stream parser unit 120 when decoding the encoded image data, when referring to a reference image in units of divided blocks obtained by dividing each macroblock of the encoded image data into smaller blocks, the stream parser unit 120 further sends block division pattern information indicating the size of the divided blocks included in the encoded image data to the decoding control unit 130.
  • the data transfer amount prediction unit 131 further includes a probability that a reference image at an integer pixel position is referred to and a probability that a reference image at a decimal pixel position is referred to for each divided block having the size indicated by the block division pattern information. Is used to weight the data amount of the reference image at the integer pixel position and the data amount of the reference image at the decimal pixel position to calculate the predicted data amount.
  • the block division pattern information includes a macro block division pattern that is a macro block division pattern and a sub macro block division pattern that is a sub macro block division pattern. That is, in the second embodiment, the stream parser unit 120 sends at least mb_type and sub_mb_type among the decoded parameters to the decoding control unit 130. Details will be described later.
  • the process (S112 in FIG. 6) in which the data transfer amount prediction unit 131 shown in FIG. 6 calculates the predicted data amount is a process different from the first embodiment. Since this process is the same as that of the first embodiment, details of the process (S112 in FIG. 6) will be described below.
  • FIG. 12 is a flowchart illustrating an example of processing in which the data transfer amount prediction unit 131 according to the second embodiment calculates the predicted data amount.
  • the process of calculating the prediction data amount for one macroblock is shown, but the data transfer amount prediction unit 131 performs the process shown in the figure for all the macroblocks in the picture.
  • the data transfer amount prediction unit 131 acquires the macroblock type of the macroblock to be decoded from the mb_type decoded by the stream parser unit 120 (S502). Details are the same as the processing (S202 in FIG. 7) for acquiring the macroblock type in FIG.
  • the data transfer amount prediction unit 131 determines which macroblock type is the acquired macroblock type (S504).
  • the data transfer amount prediction unit 131 calculates that the predicted data amount is 0 bytes (S506), and ends the processing. To do.
  • the data transfer amount prediction unit 131 determines that the acquired macroblock type is the P macroblock type or the B macroblock type (“P or B” in S504)
  • the macroblock of the macroblock to be decoded is determined from mb_type.
  • a division pattern is acquired (S508).
  • FIG. 13 is a diagram for explaining a macroblock division pattern.
  • mb_type defines four types of macroblock division patterns of 16 pixels ⁇ 16 pixels, 16 pixels ⁇ 8 pixels, 8 pixels ⁇ 16 pixels, and 8 pixels ⁇ 8 pixels.
  • each divided block into which the macroblock is divided is assigned a number called mbPartIdx (Macroblock Partition Index).
  • mbPartIdx Macroblock Partition Index
  • a macroblock division pattern can be acquired from the value of mb_type. That is, “Name of mb_type” shown in FIGS. 8 and 9 represents a macroblock division pattern. “NumMbPart (mb_type)” indicates the number of divided blocks of the macroblock, “MbPartWidth (mb_type)” indicates the width of the divided block of the macroblock, and “MbPartHeight (mb_type)” indicates the height of the divided block of the macroblock. It shows.
  • the stream parser unit 120 decodes mb_type included in the encoded stream, so that the data transfer amount prediction unit 131 acquires the macroblock division pattern of the macroblock to be decoded from mb_type.
  • the data transfer amount prediction unit 131 determines which macroblock division pattern is the acquired macroblock division pattern (S510).
  • idx is an integer of 0 or more.
  • the sub_mb_type is a parameter obtained when the stream parser unit 120 performs variable length decoding on the encoded stream, and is sent in advance from the stream parser unit 120 to the decoding control unit 130.
  • FIG. 14 is a diagram for explaining a sub-macroblock division pattern.
  • a sub-macroblock division pattern of 8 pixels ⁇ 4 pixels, 4 pixels ⁇ 8 pixels, 4 pixels ⁇ 4 pixels is defined.
  • each divided block into which the sub macroblock is divided is assigned a number called subMbPartIdx (Sub-Macroblock Partition Index).
  • subMbPartIdx Sub-Macroblock Partition Index
  • FIG. 15 is a diagram showing a sub macroblock type and sub macroblock division pattern in a P macroblock.
  • FIG. 16 is a diagram showing sub-macroblock types and sub-macroblock division patterns in B macroblocks.
  • sub_mb_type is further determined for each sub-macroblock of 8 pixels ⁇ 8 pixels.
  • segmentation pattern can be acquired from the value of sub_mb_type.
  • “Name of sub_mb_type” shown in these drawings indicates a sub macroblock division pattern. “NumMbPart (sub_mb_type)” indicates the number of divided blocks of the sub macroblock, “MbPartWidth (sub_mb_type)” indicates the width of the divided block of the sub macroblock, and “MbPartHeight (sub_mb_sub block of sub_macro block)”. Indicates the height of the block.
  • the stream parser unit 120 decodes sub_mb_type included in the encoded stream, so that the data transfer amount prediction unit 131 acquires the sub-macroblock division pattern of the macroblock to be decoded from the sub_mb_type.
  • the data transfer amount prediction unit 131 determines which sub-macroblock division pattern is the acquired sub-macroblock division pattern (S516).
  • the prediction data amount is 121 bytes. Calculate (S518).
  • the prediction data amount is 49 bytes ⁇ 4 is calculated (S520).
  • the data transfer amount prediction unit 131 determines that the sub-macroblock division pattern is a sub-macroblock division pattern of 8 pixels ⁇ 4 pixels or 4 pixels ⁇ 8 pixels (“8 ⁇ 4 or 4 ⁇ 8” in S516)
  • the predicted data amount is calculated to be 77 bytes ⁇ 2 (S522).
  • the data transfer amount prediction unit 131 adds 1 to idx (S524), and determines whether idx is greater than 3 (S526).
  • the data transfer amount prediction unit 131 determines that idx is 3 or less (NO in S526), the data transfer amount prediction unit 131 repeats the process of calculating the predicted data amount (S514 to S524). That is, the data transfer amount prediction unit 131 calculates the predicted data amount for the divided blocks of all the sub macroblocks.
  • the prediction data amount is 361 bytes. Calculate (S528).
  • the data transfer amount prediction unit 131 determines that the macroblock division pattern is a macroblock division pattern of 16 pixels ⁇ 8 pixels or 8 pixels ⁇ 16 pixels (“16 ⁇ 8 or 8 ⁇ 16” in S510).
  • the predicted data amount is calculated to be 209 bytes ⁇ 2 (S530).
  • FIG. 17 shows H.264 in the second embodiment. It is a figure which shows the calculation method of the pixel value of a reference image of the decimal position pixel in H.264 motion compensation prediction.
  • the pixel value of the half-position pixel located between the pixels is calculated by a 6-tap FIR (Finite Impulse Response) filter operation. Therefore, in order to calculate the pixel value of the 1/2 position pixel, 6 pixels at integer positions adjacent to the periphery are required.
  • FIR Finite Impulse Response
  • the pixel value of the 1/4 position pixel is calculated by taking the average of the pixel values of adjacent integer position pixels or 1/2 position pixels as shown in FIG. For this reason, in order to calculate the pixel value of the 1/4 position pixel, reference image data having the same data amount as that for calculating the pixel value of the 1/2 position pixel is required.
  • FIG. 18 shows the H.264 in the second embodiment. It is a figure which shows the relationship between the unit block of H.264 motion compensation prediction, and prediction data amount.
  • the “motion compensated prediction unit block” column shows the size of the motion compensated prediction unit block.
  • the column “both horizontal and vertical positions is an integer pixel position” is the size of the reference image when a reference image in which both the horizontal position and the vertical position are integer pixel positions is required for motion compensation prediction. And the amount of data.
  • the data amount of the reference image necessary for motion compensation prediction is the same as the data amount of the unit block for motion compensation prediction.
  • the column “horizontal position is decimal pixel position” is a reference in the case where a reference image whose horizontal position is a decimal pixel position and a reference image whose vertical position is an integer pixel position is necessary for motion compensation prediction. The size of the image and the amount of data are shown.
  • the column “Vertical position is decimal pixel position” is a reference image in the case where a reference image whose vertical position is a decimal pixel position and a reference image whose horizontal position is an integer pixel position is necessary for motion compensation prediction. And the amount of data.
  • the column of “both horizontal and vertical positions is a decimal pixel position” indicates the size of the reference image when a reference image in which both the horizontal position and the vertical position are decimal pixel positions is required for motion compensation prediction. And the amount of data.
  • the column of “predicted data amount” indicates a predicted value of the data amount of the reference image that is actually acquired from the external memory 110.
  • the predicted value of the data amount of the reference image is calculated on the assumption that the position indicated by the motion vector is an integer position and the decimal position has an equal probability.
  • pixels C, D, I, and L both horizontal and vertical positions are integer pixel positions”. Further, there are six pixels “a” to “f” whose “horizontal position is the decimal pixel position”. In addition, there are six pixels “g” to “l” whose “vertical position is the decimal pixel position”. In addition, there are nine pixels m to u at “both horizontal and vertical positions are decimal pixel positions”.
  • the predicted data amount is calculated by weighting the data amount by 4: 6: 6: 9, respectively.
  • the data transfer amount prediction unit 131 calculates the predicted data amount according to the following equation.
  • the data transfer amount prediction unit 131 sets, for each divided block, the probability that the first reference image whose horizontal position and vertical position are both integer pixel positions are referred to as the first probability, and the horizontal position is the decimal pixel position.
  • the probability that the second reference image whose vertical position is the integer pixel position is referred to as the second probability
  • the probability that the third reference image whose horizontal position is the integer pixel position and whose vertical position is the decimal pixel position is referred to.
  • Is the third probability, and the probability that the fourth reference image whose horizontal position and vertical position are both decimal pixel positions is referred to is the fourth probability, the first reference image, the second reference image, the third reference image, and The predicted data amount is calculated by multiplying the data amount of the fourth reference image by the first probability, the second probability, the third probability, and the fourth probability, respectively, and adding them.
  • the data transfer amount prediction unit 131 determines which macroblock type is the macroblock type of the macroblock to be decoded (S532).
  • the data transfer amount prediction unit 131 determines that the macroblock type is the P macroblock type (“P” in S532), the data transfer amount prediction unit 131 ends the process.
  • the data transfer amount prediction unit 131 determines that the macroblock type is the B macroblock type (“B” in S532), the data transfer amount prediction unit 131 doubles the predicted data amount (S534), and ends the processing.
  • the macroblock type and the macroblock division pattern are obtained from mb_type and sub_mb_type in the macroblock layer. Then, it is assumed that the total sum of the prediction data amounts corresponding to the respective divided blocks in the macro block is the data amount of the reference image acquired from the external memory 110.
  • the macroblock type of the divided block is the B macroblock type, taking into account that two reference images are required, a value twice the predicted data amount in FIG. 18 is set as the predicted value. .
  • the prediction data amount in FIG. 18 is used as a prediction value, and in the case of the I macroblock pattern, motion compensation prediction is not performed. Therefore, the predicted value is calculated as zero.
  • MbPartWidth and MbPartHeight obtained from mb_type are the width and height of the divided block.
  • MbPartWidth and MbPartHeight obtained from sub_mb_type are the width and height of the divided block.
  • the predicted data amount is calculated using block division pattern information. Therefore, even when it is necessary to refer to the reference image in units of divided blocks, the predicted data amount can be calculated.
  • the predicted data amount is calculated by further weighting the data amount of the reference image at the integer pixel position and the data amount of the reference image at the decimal pixel position.
  • the predicted data amount is calculated using the probability that a reference image whose horizontal position or vertical position is an integer pixel position or decimal pixel position is referred to. As a result, the calculation is performed in consideration of whether the horizontal position or the vertical position is an integer pixel position or a fractional pixel position, so that the predicted data amount can be calculated more accurately.
  • Embodiment 3 for each macroblock, the stream parser unit 120 further sends motion information indicating the amount of motion between the macroblock image to be decoded and the reference image to the decoding control unit 130 for data transfer.
  • the amount prediction unit 131 further calculates the prediction data amount using the motion information for each macroblock.
  • the stream parser unit 120 sends at least mb_type, sub_mb_type, and mvd to the decoding control unit 130 among the decoded parameters.
  • the data transfer amount prediction unit 131 determines whether or not the position of the reference image indicated by the motion information is a decimal pixel position, and determines that the position of the reference image is a decimal pixel position.
  • the data amount of the reference image at the pixel position is calculated as the predicted data amount.
  • the process (S112 in FIG. 6) in which the data transfer amount prediction unit 131 shown in FIG. 6 calculates the predicted data amount is a process different from the first embodiment. Since this process is the same as that of the first embodiment, details of the process (S112 in FIG. 6) will be described below.
  • FIG. 19 is a flowchart illustrating an example of processing in which the data transfer amount prediction unit 131 in the third embodiment calculates the predicted data amount.
  • the process of calculating the prediction data amount for one macroblock is shown, but the data transfer amount prediction unit 131 performs the process shown in the figure for all the macroblocks in the picture.
  • the data transfer amount prediction unit 131 acquires the macroblock type of the macroblock to be decoded from the mb_type decoded by the stream parser unit 120 (S602). Details are the same as the processing (S202 in FIG. 7) for acquiring the macroblock type in FIG.
  • the data transfer amount prediction unit 131 determines which macroblock type is the acquired macroblock type (S604).
  • the data transfer amount prediction unit 131 calculates that the predicted data amount is 0 bytes (S606), and ends the process. To do.
  • the data transfer amount prediction unit 131 determines that the acquired macroblock type is the P macroblock type or the B macroblock type (“P or B” in S604)
  • the macroblock of the macroblock to be decoded is determined from mb_type.
  • a division pattern is acquired (S608). Details are the same as the processing (S508 in FIG. 12) for acquiring the macroblock division pattern in FIG.
  • the data transfer amount prediction unit 131 determines which macroblock division pattern is the acquired macroblock division pattern (S612).
  • the data transfer amount prediction unit 131 determines that the macroblock division pattern is a macroblock division pattern of 8 pixels ⁇ 8 pixels (“8 ⁇ 8” in S612), the data transfer amount prediction unit 131 uses the macroblock division pattern of 8 pixels ⁇ 8 pixels. In this case, the predicted data amount is calculated (S614). Processing for calculating the predicted data amount when the data transfer amount predicting unit 131 has a macroblock division pattern of 8 pixels ⁇ 8 pixels will be described later.
  • the data transfer amount prediction unit 131 determines that the macroblock division pattern is a macroblock division pattern other than 8 pixels ⁇ 8 pixels (“other than 8 ⁇ 8” in S612)
  • the predicted data amount is calculated (S616). Processing for calculating the predicted data amount when the data transfer amount prediction unit 131 is a macroblock division pattern other than 8 pixels ⁇ 8 pixels will be described later.
  • the data transfer amount prediction unit 131 adds 1 to idx (S618), and determines whether or not idx is larger than “the number of macroblock divisions ⁇ 1” (S620).
  • the data transfer amount prediction unit 131 determines that idx is equal to or less than “the number of divisions of the macroblock ⁇ 1” (NO in S620)
  • the data transfer amount prediction unit 131 repeats the process of calculating the predicted data amount (S612 to S618). That is, the data transfer amount prediction unit 131 calculates the prediction data amount for the divided blocks of all macroblocks.
  • FIG. 20 is a flowchart illustrating an example of a process for calculating the predicted data amount when the data transfer amount prediction unit 131 according to the third embodiment has a macroblock division pattern of 8 pixels ⁇ 8 pixels.
  • the sub macro block division pattern of the macro block to be decoded is 8 pixels ⁇ 8 pixels
  • the sub macro block division pattern exists in the sub macro block of 8 pixels ⁇ 8 pixels.
  • the sub_mb_type is a parameter obtained when the stream parser unit 120 performs variable length decoding on the encoded stream, and is sent in advance from the stream parser unit 120 to the decoding control unit 130.
  • subIdx is an integer of 0 or more.
  • the data transfer amount prediction unit 131 uses “MbPartWidth (sub_mb_type)” that is the width of the divided block of the sub macroblock and the height of the divided block of the sub macroblock shown in FIG. 15 or FIG. A certain “MbPartHeight (sub_mb_type)” is acquired. Then, the data transfer amount prediction unit 131 substitutes MbPartWidth (sub_mb_type) for subW, and substitutes MbPartHeight (sub_mb_type) for subH.
  • MbPartWidth sub_mb_type
  • the data transfer amount prediction unit 131 determines whether the horizontal position indicated by the motion vector is a decimal pixel position (S710).
  • the data transfer amount prediction unit 131 adds 5 to subW (S712). That is, the data transfer amount prediction unit 131 increases the width of the divided block of the sub macroblock by 5 pixels.
  • the data transfer amount prediction unit 131 determines that the horizontal position pointed to by the motion vector is not a decimal pixel position (NO in S710), it proceeds to the next process (S714) without adding to subW.
  • the data transfer amount prediction unit 131 determines whether or not the vertical position indicated by the motion vector is a decimal pixel position (S714).
  • the data transfer amount prediction unit 131 adds 5 to subH (S716). That is, the data transfer amount prediction unit 131 widens the height of the divided block of the sub macroblock by 5 pixels.
  • the data transfer amount prediction unit 131 determines that the vertical position indicated by the motion vector is not a decimal pixel position (NO in S714), the data transfer amount prediction unit 131 proceeds to the next process (S718) without adding to subH.
  • the data transfer amount prediction unit 131 calculates a value obtained by multiplying subW by subH as a predicted data amount (S718).
  • FIG. 21 is a flowchart illustrating an example of a process for calculating a predicted data amount when the data transfer amount prediction unit 131 according to the third embodiment has a macroblock division pattern other than 8 pixels ⁇ 8 pixels.
  • the submacroblock division pattern of the macroblock to be decoded is other than 8 pixels ⁇ 8 pixels, the submacroblock division pattern does not exist in the submacroblock, and the submacroblock is the minimum unit of the decoding process.
  • the data transfer amount prediction unit 131 acquires the size of the sub macroblock and substitutes it for w and h (S802).
  • the data transfer amount prediction unit 131 indicates “MbPartWidth (mb_type)” which is the width of the divided block of the macroblock and the height of the divided block of the macroblock shown in FIG. MbPartHeight (mb_type) ”is acquired. Then, the data transfer amount prediction unit 131 substitutes MbPartWidth (mb_type) for w and substitutes MbPartHeight (mb_type) for h.
  • the data transfer amount prediction unit 131 determines whether or not the horizontal position indicated by the motion vector is a decimal pixel position (S806).
  • the data transfer amount prediction unit 131 adds 5 to w (S808). That is, the data transfer amount prediction unit 131 widens the width of the sub macroblock by 5 pixels.
  • the data transfer amount prediction unit 131 determines that the horizontal position indicated by the motion vector is not a decimal pixel position (NO in S806), the data transfer amount prediction unit 131 proceeds to the next process (S810) without adding to w.
  • the data transfer amount prediction unit 131 determines whether the vertical position indicated by the motion vector is a decimal pixel position (S810).
  • the data transfer amount prediction unit 131 determines that the vertical position indicated by the motion vector is a decimal pixel position (YES in S810), it adds 5 to h (S812). That is, the data transfer amount prediction unit 131 widens the height of the sub macroblock by 5 pixels.
  • the data transfer amount prediction unit 131 determines that the vertical position indicated by the motion vector is not a decimal pixel position (NO in S810), the data transfer amount prediction unit 131 proceeds to the next process (S814) without adding to h.
  • the data transfer amount prediction unit 131 calculates a value obtained by multiplying w by h as a predicted data amount (S814).
  • the predicted data amount is calculated using the motion information. Therefore, since the prediction data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected.
  • the data amount of the reference image at the decimal pixel position is calculated as the predicted data amount. Therefore, since the prediction data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected.
  • the data transfer amount prediction unit 131 determines whether the address of the reference image indicated by the motion information is an aligned address, and determines that the address of the reference image is not an aligned address. In this case, the predicted data amount is calculated by correcting the address of the reference image to the aligned address.
  • the address of the reference image data read from the external memory 110 is an unaligned address, it must be read from the aligned address. Therefore, it is necessary to read out from the external memory 110 for that much.
  • the address of the external memory 110 from which the reference image is read can also be calculated, so that the data amount can be predicted in consideration of the address alignment.
  • the transfer data amount of the reference image can be completely predicted.
  • the stream parser unit 120 sends to the decoding control unit 130 parameters necessary for calculating at least motion vectors such as mb_type, sub_mb_type, ref_idx, and mvd among the decoded parameters.
  • the process (S614 and S616 in FIG. 19) in which the data transfer amount prediction unit 131 shown in FIG. 19 calculates the predicted data amount is a process different from the third embodiment. Since other processes are the same as those in the third embodiment, details of the processes (S614 and S616 in FIG. 19) will be described below.
  • FIG. 22 is a flowchart illustrating an example of a process for calculating a predicted data amount when the data transfer amount prediction unit 131 according to the fourth embodiment has a macroblock division pattern of 8 pixels ⁇ 8 pixels.
  • the sub_mb_type is a parameter obtained when the stream parser unit 120 performs variable length decoding on the encoded stream, and is sent in advance from the stream parser unit 120 to the decoding control unit 130.
  • the address on the external memory 110 of the reference image necessary for motion compensation of the divided blocks is calculated (S908).
  • ref_idx is a parameter obtained when the stream parser unit 120 performs variable length decoding on the encoded stream, and is sent from the stream parser unit 120 to the decoding control unit 130 in advance.
  • the data transfer amount prediction unit 131 determines whether or not the calculated address of the reference image is an aligned position (S910).
  • the data transfer amount prediction unit 131 determines that the calculated reference image address is not an aligned position (NO in S910), the data transfer amount prediction unit 131 corrects the reference image address to the aligned address (S912).
  • FIG. 23 is a diagram illustrating that the data transfer amount prediction unit 131 according to the fourth embodiment corrects the reference image to the aligned address.
  • the 13 ⁇ 13-byte reference image straddles the boundary of the memory alignment.
  • the 13 ⁇ 13-byte reference image When transferring a reference image having such an address that crosses the boundary of memory alignment, it must be transferred from the aligned address.
  • the data transfer amount prediction unit 131 corrects the address of the reference image that is not in the aligned position to the aligned address.
  • the data transfer amount prediction unit 131 calculates the data transfer amount of the reference image from the address of the reference image (S914). For example, in the case shown in FIG. 23, the data transfer amount prediction unit 131 calculates 312 bytes as the data transfer amount of the reference image.
  • the data transfer amount prediction unit 131 calculates the calculated data transfer amount of the reference image as the predicted data amount of the reference image (S916).
  • FIG. 24 is a flowchart illustrating an example of a process for calculating the predicted data amount when the data transfer amount prediction unit 131 according to the fourth embodiment has a macroblock division pattern other than 8 pixels ⁇ 8 pixels.
  • the address on the external memory 110 of the reference image necessary for motion compensation of the sub-macroblock is calculated (S1004).
  • ref_idx is a parameter obtained when the stream parser unit 120 performs variable length decoding on the encoded stream, and is sent from the stream parser unit 120 to the decoding control unit 130 in advance.
  • the data transfer amount prediction unit 131 determines whether or not the calculated address of the reference image is an aligned position (S1006).
  • the data transfer amount prediction unit 131 determines that the calculated reference image address is not an aligned position (NO in S1006), the data transfer amount prediction unit 131 corrects the reference image address to the aligned address (S1008).
  • the data transfer amount prediction unit 131 calculates the data transfer amount of the reference image from the address of the reference image (S1010). For example, in the case shown in FIG. 23, the data transfer amount prediction unit 131 calculates 312 bytes as the data transfer amount of the reference image.
  • the data transfer amount prediction unit 131 calculates the calculated data transfer amount of the reference image as the predicted data amount of the reference image (S1012).
  • the predicted data amount is calculated by correcting the address of the reference image to the aligned address. To do. Thereby, since the prediction data amount can be calculated more accurately, blocks to be decoded in parallel can be appropriately selected. As a result, an instantaneous increase in data transfer amount can be suppressed and parallel decoding of image data can be performed with a small memory bandwidth.
  • the block determination unit 132 changes the number of macroblocks that are decoded in parallel using the predicted data amount so that the fluctuation of the data amount read from the external memory 110 is reduced. Thus, a plurality of macroblocks of encoded image data to be decoded in parallel are determined.
  • the process (S114 in FIG. 6) in which the block determination unit 132 shown in FIG. 6 determines a macroblock to be decoded in parallel is a process different from that in the first embodiment. Since this process is the same as in the first embodiment, the details of the process (S114 in FIG. 6) will be described below.
  • FIG. 25 is a flowchart showing an example of processing for determining macroblocks to be decoded in parallel by the block determination unit 132 according to the fifth embodiment.
  • the block determination unit 132 calculates the average value of the predicted data amounts of a predetermined number of macroblocks (S1102).
  • the predetermined number of macroblocks may be all macroblocks in the picture, or may be macroblocks for which the block determining unit 132 has already determined the decoding order.
  • the block determination unit 132 performs the macro decoding in parallel so that the average value of the prediction data amounts of the plurality of macro blocks that are decoded in parallel approaches the average value of the prediction data amounts of the predetermined number of macro blocks.
  • the number of blocks is determined (S1104).
  • FIG. 26 is a diagram illustrating that the block determination unit 132 according to the fifth embodiment determines the number of macroblocks to be decoded in parallel.
  • the decoding order of the macroblocks is performed in the order shown in the figure, and basically the decoding is performed in the order of the numbers given to the macroblocks in the figure. That is, the macroblock on the left side of the second column in the next lower row is decoded in parallel in units of three rows.
  • the number of macroblocks that can be decoded in parallel may be larger than the number of macroblock decoding units.
  • the decoding order shown in FIG. 26 is set so that the number of macroblocks to be decoded in parallel is three or less in consideration of the fact that there are only three macroblock decoding units.
  • the macroblock to be decoded in parallel is a macroblock for which a lot of data must be acquired from the external memory 110, a lot of data is transferred at that moment. There must be.
  • the sum of the predicted transfer data amounts of these decoding candidate macroblocks is obtained as macroblock candidates for decoding the macroblocks with the same number in parallel.
  • the calculated predicted transfer data amount is larger than a predetermined transfer data amount, and if it is smaller, these three decoding candidate macroblocks are decoded. However, if it is larger, any one of the decoding candidate macroblocks is not decoded. Any macroblock that is not to be decoded may be selected. For example, the macroblock located in the lowermost row is not decoded.
  • the amount of data transferred from the external memory 110 is suppressed by limiting the number of macroblocks to be decoded in parallel to two.
  • a macroblock that has not been decoded is determined whether or not to decode again in addition to the decoding candidate macroblock at the decoding timing of the next macroblock.
  • the three macro blocks with the number 6 in FIG. 26 are decoding candidate macro blocks.
  • the sum of the predicted transfer data amounts of the sixth macro block is obtained. If the total transfer data amount is smaller than the predetermined transfer data amount, these three macro blocks are decoded. If the transfer data amount is larger than the predetermined transfer data amount, the sixth macroblock in the first and second rows from the top is removed except for the sixth macroblock in the third row from the top.
  • the macroblock to be decoded is determined by using the macroblock No. 7 in the first row and the second row and the macroblock No. 6 in the third row that was not decoded earlier as decoding candidate macroblocks. Go.
  • the image decoding device of the fifth embodiment occupies the memory bandwidth, and the other devices receive data from the external memory 110. It is possible to prevent a situation in which transfer is not possible.
  • the number of macroblocks to be decoded in parallel is changed so that the fluctuation in the amount of data read from the external memory 110 is reduced.
  • a plurality of macroblocks to be decoded in parallel are determined.
  • the number of macroblocks can be changed so that the data transfer amount does not increase instantaneously. Accordingly, it is possible to perform parallel decoding of image data with a small memory bandwidth while suppressing an instantaneous increase in data transfer amount.
  • the decoding order of the macroblocks is determined before performing the decoding process of the macroblocks, but only the data transfer amount of the reference image is predicted in advance, and the parallel decoding of the macroblocks is performed.
  • the decoding order may be determined adaptively. For example, if another device other than the image decoding device 100 according to the first embodiment also accesses the external memory 110, when the other device accesses the external memory 110, the data transfer amount of the reference image is small. Select a macroblock and decode it. In this way, the image decoding apparatus 100 and other apparatuses can be operated simultaneously.
  • the block determination unit 132 determines that the total value of the predicted data amounts of a plurality of macroblocks that are decoded in parallel from the maximum data amount that can be transferred from the external memory 110.
  • a plurality of macroblocks to be decoded in parallel are determined so as to approach the difference data amount that is the data amount obtained by subtracting the data amount to which other devices perform data transfer.
  • the block determination unit 132 performs a plurality of macroblocks that are decoded in parallel such that the total value of the prediction data amounts of the plurality of macroblocks that are decoded in parallel is large. To decide.
  • the block determination unit 132 performs a plurality of macroblocks that are decoded in parallel so that the total value of the prediction data amounts of the plurality of macroblocks that are decoded in parallel is small. To decide.
  • FIG. 27 is a block diagram illustrating a functional configuration when another device 200 according to the sixth embodiment accesses the external memory 110 of the image decoding device 100.
  • the image decoding apparatus 100 has the same configuration as the image decoding apparatus 100 according to the first embodiment described with reference to FIG.
  • another device 200 is a device different from the image decoding device 100 that accesses the external memory 110 of the image decoding device 100.
  • the other device 200 may be a single device or a plurality of devices.
  • the other device 200 is, for example, an image encoding block, an audio decoding block, an audio encoding block, a processor block, a graphic accelerator, or the like.
  • the other device 200 may be any device as long as it shares the image decoding device 100 and the external memory 110.
  • the external memory transfer amount control unit 300 receives the data transfer amount between the other device 200 and the external memory 110 from the other device 200. The external memory transfer amount control unit 300 then obtains the data transfer amount obtained by subtracting the data transfer amount of the other device 200 from the maximum transfer performance (transfer amount) of the external memory 110, and the decoding control unit 130 of the image decoding device 100. Notify
  • the decoding control unit 130 selects a macroblock and performs a decoding process so that the predicted data amount approaches the notified data transfer amount.
  • the process of determining the macroblock to be decoded in parallel by the block determination unit 132 shown in FIG. 6 is a process different from that of the first embodiment. Since this process is the same as in the first embodiment, the details of the process (S114 in FIG. 6) will be described below.
  • FIG. 28 is a flowchart showing an example of processing for determining macroblocks to be decoded in parallel by the block determination unit 132 according to the sixth embodiment.
  • the external memory transfer amount control unit 300 acquires the data transfer amount between the other device 200 and the external memory 110 from the other device 200 (S1202).
  • the external memory transfer amount control unit 300 calculates a difference data amount obtained by subtracting the data transfer amount of the other device 200 from the maximum data transfer amount that can be transferred from the external memory 110 (S1204). 132.
  • the block determination unit 132 determines a plurality of macroblocks to be decoded in parallel so that the total value of the prediction data amounts of the plurality of macroblocks to be decoded in parallel approaches the difference data amount (S1206). Specifically, the block determination unit 132 determines the plurality of macroblocks so that the total value is equal to or less than the difference data amount.
  • decoding is performed in parallel so that the total value of the prediction data amounts of a plurality of blocks to be decoded in parallel approaches the difference data amount.
  • Determine the blocks to be played That is, when the difference data amount is large, the total value of the prediction data amounts of a plurality of blocks to be decoded in parallel is increased, and when the difference data amount is small, the plurality of blocks to be decoded in parallel are decoded.
  • a plurality of blocks to be decoded in parallel are determined so that the total value of the predicted data amount is small.
  • control is performed so that the data transfer amount of the image decoding device 100 becomes small. Even if another device 200 is operated simultaneously with 100, the processing of the other device 200 can be operated without delay.
  • the control is performed so that the data transfer amount of the image decoding device 100 is increased. Therefore, the reference image can be transferred at a high speed in the decoding process. It can speed itself up.
  • the external memory transfer amount control unit 300 may not be provided, and the decoding control unit 130 and the other device 200 may directly communicate with each other. That is, the block determination unit 132 may acquire the data transfer amount of the other device 200 from the other device 200 and calculate the difference data amount.
  • the image decoding apparatus 100 may mount all or part of the configuration requirements on one integrated circuit, or a plurality of integrated circuits mounted on one substrate. It may be an independent device connected via a network or a bus.
  • FIG. 29 is a diagram illustrating an example of the integrated circuit 400 that controls the image decoding apparatus 100.
  • the integrated circuit 400 has functions other than the external memory 110 of the image decoding apparatus 100 shown in FIG.
  • each processing unit may be individually integrated into one chip, or may be integrated into one chip so as to include a part or all of the processing units.
  • the integrated circuit 400 may not include the adjacent MB information memory 180 and the deblocking filter unit. That is, the integrated circuit 400 only needs to include the stream parser unit 120, the data transfer amount prediction unit 131, the block determination unit 132, and the macroblock decoding units 140 to 160, and the configuration achieves the object of the present invention. be able to.
  • LSI is used, but depending on the degree of integration, it may be called IC, system LSI, super LSI, or ultra LSI.
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • the image decoding device has been described using the above embodiment, but the present invention is not limited to this.
  • Patent Document 1 describes a method of decoding macroblocks in parallel using three or more macroblock decoding units. According to this method, decoding is performed even using three or more macroblock decoding units. can do. Also, when determining the decoding order of the macroblocks, the block determination unit 132 determines that the average value of the predicted transfer data amount of the reference image of the macroblocks decoded in parallel is the average value of the predicted transfer data amount of each macroblock. The macroblocks should be selected so that they are as close as possible. For this reason, decoding processing can be performed regardless of the number of macroblock decoding units.
  • the stream parser unit 120 outputs a decoded stream that has been completely variable-length decoded to the external memory 110.
  • the stream parser unit 120 only needs to be able to decode only the parameters necessary for predicting the data transfer amount of the reference image, and does not necessarily need to output a decoded stream that has been completely variable-length decoded.
  • a method may be considered in which only the necessary parameters are decoded in the stream parser unit 120 and an intermediate stream obtained by decoding only the portions necessary for parallel decoding of macroblocks is output to the external memory 110. In this case, it is necessary to mount variable length decoding units in the macroblock decoding units 140 to 160 in order to decode the intermediate stream.
  • the block determination unit 132 determines macroblocks to be decoded in parallel. did. However, each time the data transfer amount prediction unit 131 calculates the prediction data amount of some macroblocks, the block determination unit 132 may determine macroblocks to be decoded in parallel.
  • the data transfer amount prediction unit 131 acquires the macroblock type of the macroblock to be decoded from mb_type.
  • the data transfer amount prediction unit 131 may acquire the macroblock type of the macroblock to be decoded from the slice_type included in the slice header.
  • the macroblocks of the macroblock to be decoded are assumed to be the macroblock types of the I slice, the P slice, and the B slice, respectively, the I macroblock type, the P macroblock type, and the B macroblock type You can get the type.
  • the data transfer amount prediction unit 131 of the decoding control unit 130 calculates the prediction data amount.
  • the stream parser unit 120 may calculate the prediction data amount. .
  • the image decoding apparatus 100 includes the external memory 110, the stream parser unit 120, the decoding control unit 130, the macroblock decoding units 140 to 160, the deblocking filter unit 170, and the adjacent MB information memory.
  • the decoding control unit 130 includes a data transfer amount prediction unit 131 and a block determination unit 132.
  • the deblocking filter unit 170 and the adjacent MB information memory 180 are not essential components to achieve the object of the present invention. That is, the image decoding apparatus 100 only needs to include the external memory 110, the stream parser unit 120, the data transfer amount prediction unit 131, the block determination unit 132, and the macroblock decoding units 140 to 160. Can achieve the purpose.
  • the image decoding apparatus has a feature capable of decoding moving image data at high speed. Therefore, it is useful as a digital television, a DVD, a Blu-ray Disc (registered trademark) recorder, etc. that handle compressed images such as MPEG. It can also be applied to the use of equipment that requires high-speed processing such as broadcasting stations.
  • DESCRIPTION OF SYMBOLS 100 Image decoding apparatus 110 External memory 120 Stream parser part 130 Decoding control part 131 Data transfer amount prediction part 132 Block determination part 140,150,160 Macroblock decoding part 141 Inverse quantization part 142 Inverse orthogonal transformation part 143 In-screen prediction part 144 Motion compensation prediction unit 145 Adder circuit 170 Deblocking filter unit 180 Adjacent MB information memory 200 Other device 300 External memory transfer amount control unit 400 Integrated circuit 501 Start code 502 SPS header 503 PPS header 504 Slice header 505 Slice data

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

 符号化画像データを並列復号する場合、復号時の瞬間的なデータ転送量の増加を抑えて、小さなメモリバンド幅で画像データの並列復号を行うことができる画像復号装置を提供する。  画像復号装置(100)であって、参照画像のデータを格納している外部メモリ(110)と、ブロックごとに、参照される参照画像の枚数を示す参照情報の復号を行うストリームパーサ部(120)と、ブロックごとに、参照情報を用いて、外部メモリ(110)から読み出される参照画像の予測データ量を計算するデータ転送量予測部(131)と、予測データ量を用いて、外部メモリ(110)から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる複数のブロックを決定するブロック決定部(132)と、決定された複数のブロックを並列に復号する複数のマクロブロック復号部(140~160)とを備える。

Description

画像復号装置、画像復号方法、集積回路及びプログラム
 本発明は、符号化画像データの復号を行う画像復号装置、画像復号方法、集積回路及びプログラムに関するものである。
 動画像データを圧縮符号化(以下、単に「符号化」と呼ぶ)する技術として、画面間差分を用いたMPEG(Motion Pictures Experts Group)符号化方式が用いられることが多い。
 MPEG符号化方式では、現在のフレームと時間的に近いフレームは似ているという、動画像の性質を利用している。この性質を利用して、時間的に近いフレームから現在のフレームを予測し、入力画像と予測画像との差分だけを符号化すれば、データ量を削減できる。
 一般的には、フレームの中の物体が動いたり、カメラがパンをしたりすることで、フレーム間で動きがあるため、動きの分だけをずらした位置の画像を参照画像として予測画像を生成している。
 こうして生成した予測画像と入力画像との差分と、この動き情報(これを動きベクトルという)を符号化することで、高い圧縮率を実現している。このような処理を動き補償予測という。
 動き補償予測を含めて復号処理または符号化処理は、1つの画面(ピクチャ)内を所定画素数のブロック(輝度成分:16画素×16画素)に分割して行われる。この画素ブロックのことをマクロブロックという。復号時には、マクロブロック毎に動きベクトルに応じた位置の画像を参照画像としてメモリから取得して動き補償予測を行う。なお、1画素のデータ量は1バイトである。
 MPEG符号化方式としては、従来からMPEG-2(ISO/IEC13818-2)やMPEG-4(ISO/IEC14496-2)が使用されている。加えて、近年ではH.264/MPEG-4 AVC(ISO/IEC14496-10)(以下、単に「H.264」と呼ぶ)やVC-1(SMPTE 421M)といった新しい符号化方式が用いられるようになってきている。
 特にH.264に代表される新しい符号化方式は、従来のMPEG-2の2~4倍の圧縮率を実現し、フルHD(High Definition)(1920画素×1080画素)といった高精細画像の圧縮に多く用いられている。
 一方、近年では、4K2K(4096画素×2048画素)といったフルHDを超える、超高精細なディスプレイの開発が行われており、このような超高精細な画像データを扱うことが今後必要となってくる。
 しかし、4K2Kの画像データはフルHDの約4倍のデータ量となり、4K2Kの画像データを復号するには、フルHDの画像データを復号する場合と比べて、約4倍近くの演算性能とメモリバンド幅が必要となる。4K2Kといった超高精細な画像データに対応した画像復号装置を実現するためには、この高い演算性能とメモリバンド幅をいかに実現するかが課題となる。
 演算性能の課題に対しては、既存のフルHD対応の画像復号装置を複数用いて並列処理することで、高い演算性能を実現する方法が考えられる。しかし、H.264に代表される新しい符号化方式では、あるマクロブロックを符号化する際、その周辺隣接マクロブロックとの相関を利用して圧縮率を高めている。
 図1は、H.264における周辺隣接マクロブロックとの相関を利用して圧縮率を高める復号方法を説明する図である。
 同図に示すように、ある任意のマクロブロックPを復号するには、左隣接マクロブロックA、左上隣接マクロブロックD、上隣接マクロブロックB、右上隣接マクロブロックCの、4つの隣接マクロブロックの処理結果を参照する必要がある。
 つまり、対象のマクロブロックを復号するためには、予めこれらの隣接マクロブロックを復号しておかなければならず、この依存関係が並列化する上での課題であった。
 そこで、従来、この依存関係を解決しながら画像データを並列復号する画像復号装置が提案されている(例えば、特許文献1参照)。
 図2は、従来の画像復号装置の復号方法を説明する図である。
 同図に示す各ブロックはピクチャ内のマクロブロックを表し、マクロブロックに付けられた番号は処理時間を示し、同じ番号のマクロブロックが同時に並列に復号されている。
 図2に示すように、ピクチャの左上のマクロブロックから処理を開始し、ある任意のマクロブロックを処理する場合、そのマクロブロックの、1つ下の行の2列左側に位置するマクロブロックを並列に復号する。これよって、位置による依存関係を解決している。
特開2006-129284号公報
 しかしながら、従来の画像復号装置では、瞬間的なデータ転送量が増加し、画像復号装置に用いるメモリに必要なメモリバンド幅が大きくなってしまうという課題がある。
 つまり、並列に復号するマクロブロックが、多くのデータをメモリから取得しなければならないマクロブロックであった場合、従来の画像復号装置では、瞬間的に多くのデータをメモリから転送することになる。そのため、この大きなデータ量の転送が可能なメモリを用いる必要があり、これによって、画像復号装置に用いるメモリに必要なメモリバンド幅が大きくなってしまう。
 このため、例えば、画像復号装置が他の装置とメモリを共用している場合であって、画像復号装置の瞬間的なデータ転送量の増加があった場合には、他の装置が使用可能なメモリバンド幅が小さくなり、他の装置の転送を妨げてしまうことから、他の装置の処理を遅延させてしまう。このように、従来の画像復号装置では、メモリバンド幅について課題を抱えている。
 本発明は、上記従来の課題を解決するものであり、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を可能とする画像復号装置、画像復号方法、集積回路及びプログラムを提供することを目的とする。
 上記目的を達成するために、本発明の一態様に係る画像復号装置は、所定の画素数のブロックごとに分割され符号化された符号化画像データの復号を、前記ブロックごとに行う画像復号装置であって、前記符号化画像データの復号が行われる際に参照される参照画像のデータを格納している記憶部と、前記ブロックごとに、前記符号化画像データの復号が行われる際に参照される前記参照画像の枚数を示す参照情報の復号を行うプリデコード部と、前記ブロックごとに、前記参照情報を用いて、前記符号化画像データの復号が行われる際に前記記憶部から読み出される前記参照画像の予測データ量を計算するデータ転送量予測部と、計算された前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定するブロック決定部と、決定された前記符号化画像データの複数のブロックを並列に復号する複数のブロック復号部とを備える。
 これによれば、参照画像の枚数から参照画像の予測データ量を計算し、並列に復号が行われる符号化画像データの複数のブロックを決定することで、複数のブロックを並列に復号する。例えば、復号に2枚の参照画像が必要な場合は、予測データ量は、1枚の参照画像が必要な場合の2倍になる。つまり、例えばH.264などのMPEG符号化方式で符号化された画像データを並列に復号する場合に、予め、メモリから取得するデータ量を正確に予測することができるため、記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号するブロックを適切に選択することができる。これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 これにより、例えば、画像復号装置が他の装置と記憶部を共用している場合であって、他の装置のデータ転送量が大きい場合には、画像復号装置のデータ転送量が小さくなるようにすることで、他の装置の転送を妨げることができ、他の装置の処理へ影響を与えない。また、他の装置のデータ転送量が小さい場合には、画像復号装置のデータ転送量が大きくなるようにすることで、画像復号装置の画像復号処理自体を高速化することができる。
 また、好ましくは、前記プリデコード部は、前記符号化画像データに含まれる、前記ブロックであるマクロブロックのマクロブロックタイプ情報を前記参照情報として可変長復号し、前記データ転送量予測部は、前記マクロブロックタイプ情報で示される前記参照画像の枚数に当該参照画像のデータ量を乗じて、前記予測データ量を計算する。
 これによれば、参照画像の枚数を示す参照情報として、マクロブロックタイプ情報の復号が行われる。例えば、Iマクロブロックタイプのマクロブロックの復号に必要な参照画像は0枚であり、Pマクロブロックタイプのマクロブロックの復号に必要な参照画像は1枚であり、Bマクロブロックタイプのマクロブロックの復号に必要な参照画像は2枚である。これにより、簡易に参照画像の枚数を取得して、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記ブロック復号部が前記符号化画像データの復号を行う際に、前記符号化画像データの各ブロックをさらに小さなブロックに分割した分割ブロックを単位とした前記参照画像を参照する場合、前記プリデコード部は、さらに、前記符号化画像データに含まれる、前記分割ブロックのサイズを示すブロック分割パターン情報の復号を行い、前記データ転送量予測部は、前記ブロック分割パターン情報で示されるサイズの前記分割ブロックごとに、さらに、整数画素位置の参照画像が参照される確率と小数画素位置の参照画像が参照される確率とを用いて、前記整数画素位置の参照画像のデータ量と前記小数画素位置の参照画像のデータ量とに重み付けを行うことで、前記予測データ量を計算する。
 これによれば、分割ブロック単位で参照画像を参照する場合、分割ブロックごとに、さらに整数画素位置の参照画像のデータ量と小数画素位置の参照画像のデータ量とに重み付けを行うことで、予測データ量を計算する。これにより、整数画素位置の参照画像のデータ量だけではなく、小数画素位置の参照画像のデータ量も考慮した予測データ量を計算することができる。このため、予測データ量をより正確に計算することができるため、並列に復号するブロックを適切に選択することができる。したがって、分割ブロック単位で参照画像を参照する必要がある場合でも、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記データ転送量予測部は、前記分割ブロックごとに、水平位置及び垂直位置がともに整数画素位置である第1参照画像が参照される確率を第1確率とし、水平位置が小数画素位置であり垂直位置が整数画素位置である第2参照画像が参照される確率を第2確率とし、水平位置が整数画素位置であり垂直位置が小数画素位置である第3参照画像が参照される確率を第3確率とし、水平位置及び垂直位置がともに小数画素位置である第4参照画像が参照される確率を第4確率とし、前記第1参照画像、前記第2参照画像、前記第3参照画像及び前記第4参照画像のデータ量に、それぞれ前記第1確率、前記第2確率、前記第3確率及び前記第4確率を乗じて加算することで、前記予測データ量を計算する。
 これによれば、水平位置又は垂直位置が整数画素位置又は小数画素位置の参照画像が参照される確率を用いて、予測データ量を計算する。これにより、水平位置又は垂直位置が整数画素位置か小数画素位置かを考慮して計算が行われるため、予測データ量をさらに正確に計算することができる。これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、前記プリデコード部は、前記ブロックごとに、さらに、復号対象の前記ブロックの画像と参照画像との間の動き量を示す動き情報の復号を行い、前記データ転送量予測部は、前記ブロックごとに、さらに前記動き情報を用いて、前記予測データ量を計算することにしてもよい。
 これによれば、動き情報を用いて、予測データ量を計算する。これにより、予測データ量をより正確に計算することができるため、並列に復号するブロックを適切に選択することができる。これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記データ転送量予測部は、前記動き情報が示す参照画像の位置が小数画素位置であるか否かを判断し、前記参照画像の位置が小数画素位置であると判断した場合、小数画素位置の参照画像のデータ量を前記予測データ量として計算する。
 これによれば、参照画像の位置が小数画素位置である場合、小数画素位置の参照画像のデータ量を予測データ量として計算する。これにより、予測データ量をさらに正確に計算することができるため、並列に復号するブロックを適切に選択することができる。これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記データ転送量予測部は、前記動き情報が示す参照画像のアドレスが、アライメントされたアドレスか否かを判断し、前記参照画像のアドレスがアライメントされたアドレスではないと判断した場合、前記参照画像のアドレスをアライメントされたアドレスに補正して前記予測データ量を計算する。
 これによれば、参照画像のアドレスがアライメントされたアドレスではない場合、参照画像のアドレスをアライメントされたアドレスに補正して予測データ量を計算する。これにより、予測データ量をさらに正確に計算することができるため、並列に復号するブロックを適切に選択することができる。これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記ブロック決定部は、前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、前記符号化画像データのブロックの復号順序を入れ替えることで、並列に復号が行われる前記符号化画像データの複数のブロックを決定する。
 これによれば、ブロックの復号順序を入れ替えることで、記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる複数のブロックを決定する。これにより、瞬間的にデータ転送量が増加しないように、ブロックの復号順序を入れ替えることができる。したがって、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、前記ブロック決定部は、前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データのブロック数を変更することで、並列に復号が行われる前記符号化画像データの複数のブロックを決定することにしてもよい。
 これによれば、並列に復号が行われるブロック数を変更することで、記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる複数のブロックを決定する。これにより、瞬間的にデータ転送量が増加しないように、ブロック数を変更することができる。したがって、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記ブロック決定部は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の平均値が、所定の数のブロックの予測データ量の平均値に近付くように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する。
 これによれば、複数のブロックの予測データ量の平均値が、所定の数のブロックの予測データ量の平均値に近付くように、並列に復号が行われる複数のブロックを決定する。これにより、並列復号が行われるブロックの予測データ量が平均的な値となる。したがって、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 また、好ましくは、前記ブロック決定部は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の合計値が、前記記憶部から読み出されるデータ転送可能な最大データ量から他の装置がデータ転送を行うデータ量を差し引いたデータ量である差分データ量に近付くように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する。前記ブロック決定部は、前記差分データ量が大きい場合は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の合計値が大きくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する。また、前記ブロック決定部は、前記差分データ量が小さい場合は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の合計値が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する。
 これによれば、並列に復号が行われる複数のブロックの予測データ量の合計値が、差分データ量に近付くように、並列に復号が行われる複数のブロックを決定する。つまり、差分データ量が大きい場合は、並列に復号が行われる複数のブロックの予測データ量の合計値が大きくなるように、差分データ量が小さい場合は、並列に復号が行われる複数のブロックの予測データ量の合計値が小さくなるように、並列に復号が行われる複数のブロックを決定する。これにより、予め設定されたメモリバンド幅で画像データの並列復号を行うことができる。
 なお、本発明は、このような画像復号装置として実現することができるだけでなく、その装置を構成する各処理部を備える集積回路として実現したり、当該各処理部の処理をステップとする方法として実現したりすることができる。さらに、本発明は、それらステップをコンピュータに実行させるプログラムとして実現したり、そのプログラムを記録したコンピュータ読み取り可能なCD-ROMなどの記録媒体として実現したり、そのプログラムを示す情報、データ又は信号として実現したりすることもできる。そして、それらプログラム、情報、データ及び信号は、インターネット等の通信ネットワークを介して配信してもよい。
 本発明の画像復号装置によれば、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。これにより、例えば、画像復号装置が他の装置とメモリを共用している場合であって、他の装置のデータ転送量が大きい場合には、画像復号装置のデータ転送量が小さくなるようにすることで、他の装置の転送を妨げることができ、他の装置の処理へ影響を与えない。また、他の装置のデータ転送量が小さい場合には、画像復号装置のデータ転送量が大きくなるようにすることで、画像復号装置の画像復号処理自体を高速化することができる。
図1は、H.264における周辺隣接マクロブロックとの相関を利用して圧縮率を高める復号方法を説明する図である。 図2は、従来の画像復号装置の復号方法を説明する図である。 図3は、実施の形態1における画像復号装置の機能構成を示すブロック図である。 図4は、実施の形態1におけるマクロブロック復号部の機能構成を示すブロック図である。 図5は、一般的なH.264の、符号化ストリームの構成を示す図である。 図6は、実施の形態1における画像復号装置の動作の一例を示すフローチャートである。 図7は、実施の形態1におけるデータ転送量予測部が予測データ量を計算する処理の一例を示すフローチャートである。 図8は、Pスライスにおけるマクロブロックタイプとマクロブロック分割パターンを示す図である。 図9は、Bスライスにおけるマクロブロックタイプとマクロブロック分割パターンを示す図である。 図10は、実施の形態1におけるブロック決定部が並列復号するマクロブロックを決定する処理の一例を示すフローチャートである。 図11は、実施の形態1におけるマクロブロック復号部がマクロブロックの復号を行う処理の一例を示すフローチャートである。 図12は、実施の形態2におけるデータ転送量予測部が予測データ量を計算する処理の一例を示すフローチャートである。 図13は、マクロブロック分割パターンを説明する図である。 図14は、サブマクロブロック分割パターンを説明する図である。 図15は、Pマクロブロックにおけるサブマクロブロックタイプとサブマクロブロック分割パターンを示す図である。 図16は、Bマクロブロックにおけるサブマクロブロックタイプとサブマクロブロック分割パターンを示す図である。 図17は、実施の形態2におけるH.264の動き補償予測における小数位置画素の、参照画像の画素値の計算方法を示す図である。 図18は、実施の形態2におけるH.264の動き補償予測の単位ブロックと予測データ量との関係を示す図である。 図19は、実施の形態3におけるデータ転送量予測部が予測データ量を計算する処理の一例を示すフローチャートである。 図20は、実施の形態3におけるデータ転送量予測部が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。 図21は、実施の形態3におけるデータ転送量予測部が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。 図22は、実施の形態4におけるデータ転送量予測部が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。 図23は、実施の形態4におけるデータ転送量予測部が参照画像をアライメントされたアドレスに補正することを説明する図である。 図24は、実施の形態4におけるデータ転送量予測部が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。 図25は、実施の形態5におけるブロック決定部が並列復号するマクロブロックを決定する処理の一例を示すフローチャートである。 図26は、実施の形態5におけるブロック決定部が並列に復号するマクロブロックの数を決定することを説明する図である。 図27は、実施の形態6における他の装置が画像復号装置の外部メモリにアクセスする場合の機能構成を示すブロック図である。 図28は、実施の形態6におけるブロック決定部が並列復号するマクロブロックを決定する処理の一例を示すフローチャートである。 図29は、画像復号装置を制御する集積回路の一例を示す図である。
 H.264符号化方式に対応した画像復号装置に本発明を適用した実施の形態について、図面を参照しながら説明する。なお、本実施の形態では、H.264符号化方式に対応した画像復号装置を示したが、動き補償予測を行う動画像符号化方式に対応した画像復号装置であれば、同様の形態で実現することができる。
 (実施の形態1)
 図3は、本発明の実施の形態1における画像復号装置100の機能構成を示すブロック図である。
 画像復号装置100は、所定の画素数のブロックごとに分割され符号化された符号化画像データの復号を、ブロックごとに行う装置である。ここで、所定の画素数のブロックとは、マクロブロックである。
 同図に示すように、画像復号装置100は、外部メモリ110、ストリームパーサ部120、復号制御部130、マクロブロック復号部140、マクロブロック復号部150、マクロブロック復号部160、デブロッキングフィルタ部170、及び隣接MB情報メモリ180を備えている。
 隣接MB情報メモリ180には、マクロブロックの復号処理に必要となる周辺隣接マクロブロックの情報が格納されている。
 外部メモリ110には、符号化ストリーム、復号ストリーム、参照画像、及び復号画像が格納されている。符号化ストリームは、入力される符号化画像データである。復号ストリームは、ストリームパーサ部120によって可変長復号された符号化画像データである。参照画像は、符号化画像データの復号が行われる際に参照される画像である。復号画像は、符号化画像データが復号された画像である。
 なお、外部メモリ110は、請求の範囲に記載の「記憶部」に相当する。
 なお、外部メモリ110は、本実施の形態の画像復号装置100とは異なる他の装置のメモリと共用されてもよい。その場合、外部メモリ110には、符号化ストリーム、復号ストリーム、参照画像、及び復号画像以外のデータも格納されることになる。
 ストリームパーサ部120は、符号化ストリームの可変長復号を行い、復号ストリームを生成すると共に、マクロブロック復号時に外部メモリ110から取得する参照画像のデータ量を予測するために必要なパラメータを、復号制御部130に送る。
 具体的には、ストリームパーサ部120は、H.264で符号化された符号化ストリームを外部メモリ110から読み出し、可変長復号を行い、復号した復号ストリームを外部メモリ110に書き戻す。この時、本実施の形態1では、可変長復号して得られたパラメータのうち、少なくとも、符号化画像データの復号が行われる際にマクロブロックごとに参照される参照画像の枚数を示す参照情報が、復号制御部130に送られる。ここで、参照情報は、符号化画像データに含まれるマクロブロックのマクロブロックタイプ情報である。
 なお、ストリームパーサ部120は、請求の範囲に記載の「プリデコード部」に相当する。
 マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160は、復号制御部130からの指示に従って、外部メモリ110から復号ストリームを読み出し、並列にマクロブロックの復号処理を行い、再構成した画素データをデブロッキングフィルタ部170に出力する。この時、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160は、外部メモリ110から動き補償予測に用いる参照画像の画素データの読出しを必要に応じて行う。
 なお、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160のそれぞれは、請求の範囲に記載の「ブロック復号部」に相当する。
 デブロッキングフィルタ部170は、再構成した画素データに対してブロックノイズを除去するデブロッキングフィルタ処理を行い、復号画像を外部メモリ110に出力する。この時、以降の復号処理で参照画像として用いられる復号画像は、参照画像としても外部メモリに保存される。
 復号制御部130は、ストリームパーサ部120、マクロブロック復号部140、マクロブロック復号部150、マクロブロック復号部160、及びデブロッキングフィルタ部170に対して、処理開始指示を出して画像復号処理全体の制御を行っている。
 また、復号制御部130は、データ転送量予測部131及びブロック決定部132を備えている。
 データ転送量予測部131は、マクロブロックごとに、マクロブロックタイプ情報を用いて、符号化画像データの復号が行われる際に外部メモリ110から読み出される参照画像の予測データ量を計算する。つまり、データ転送量予測部131は、ストリームパーサ部120から送られてきたパラメータを用いて、マクロブロック復号処理の動き補償予測の時に、外部メモリ110から取得を要する参照画像のデータ量をマクロブロック単位で予測する。
 具体的には、データ転送量予測部131は、マクロブロックタイプ情報で示される参照画像の枚数に当該参照画像のデータ量を乗じて、予測データ量を計算する。
 ブロック決定部132は、外部メモリ110から読み出されるデータ量の変動が小さくなるように、データ転送量予測部131が計算した予測データ量を用いて、並列に復号が行われる複数のマクロブロックを決定する。具体的には、ブロック決定部132は、この予測データ量に基づいて、マクロブロック復号時に、外部メモリ110から取得する参照画像のデータ量が瞬間的に増大しないように、予めマクロブロックの復号順序を決定しておく。
 予め決定した復号順序に従って、復号制御部130は、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160のマクロブロック復号処理を制御している。復号制御部130は、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160に復号開始指示を出す場合、隣接MB情報メモリ180から、復号対象のマクロブロックの復号に必要な周辺隣接マクロブロックの情報を読み出して、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160に渡す。
 マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160は、ブロック決定部132が決定した複数のマクロブロックを並列に復号する。マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160がマクロブロックの復号処理を終えると、復号したマクロブロックの情報のうち、以降の復号処理に周辺隣接マクロブロック情報として必要となる情報を、復号制御部130に渡す。復号制御部130はこれを隣接MB情報メモリ180に格納する。
 次に、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160の構成について、詳細に説明する。なお、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160は、共に同じ構成であるため、以下、マクロブロック復号部140の構成について説明を行う。
 図4は、本実施の形態1におけるマクロブロック復号部140の機能構成を示すブロック図である。
 同図に示すように、マクロブロック復号部140は、逆量子化部141、逆直交変換部142、画面内予測部143、動き補償予測部144及び加算回路145を備えている。
 逆量子化部141は、外部メモリ110から読み出した復号ストリームから、量子化された係数データを読み出して逆量子化を行い、係数データを逆直交変換部142に出力する。
 逆直交変換部142は、係数データに対して逆直交変換を行い、空間領域の画素データを生成する。
 画面内予測部143と動き補償予測部144は、復号ストリームから読み出される予測モードによって、どちらか一方が起動され、予測画像の画素データを生成する。
 画面内予測部143は、予測モードがイントラ予測であった場合に起動され、画面内予測を行うことで、予測画像の画素データを生成する。
 動き補償予測部144は、予測モードがインター予測であった場合に起動され、復号された動きベクトルに応じた参照画像の画素データを取得して、動き補償予測を行うことで、予測画像の画素データを生成する。
 なお、画面内予測部143及び動き補償予測部144は、画面内予測及び動き補償予測を、復号制御部130から渡された周辺隣接マクロブロックの情報を用いて行う。
 加算回路145は、逆直交変換部142が出力した画素データと、画面内予測部143または動き補償予測部144が出力した予測画像の画素データとを加算して、再構成された画素データを出力する。
 次に、一般的なH.264符号化ストリームの構成について説明する。
 図5は、一般的なH.264符号化ストリームの構成を示す図である。
 同図に示すように、符号化ストリームの先頭にはSPS(Sequence Parameter Set)ヘッダ502があり、その後にPPS(Picture Parameter Set)ヘッダ503、スライスヘッダ504、スライスデータ505が続く。
 SPSヘッダ502、PPSヘッダ503、及びスライスヘッダ504の先頭にはデータの区切りを示すスタートコード(SC:Start Code)501が挿入されている。そのため、符号化ストリームに対してスタートコードサーチを行い、スタートコード501に続くデータを解析することで、符号化ストリームの中からSPSヘッダ502、PPSヘッダ503、及びスライスヘッダ504を探索することができる。
 ピクチャの先頭にはPPSヘッダ503が存在し、次のPPSヘッダ503が現れるまでの一連のデータが1ピクチャ分のデータになっている。1ピクチャのデータの中には、スライスヘッダ504とスライスデータ505のセットが、そのピクチャに存在するスライスの数分存在する。
 次に、画像復号装置100の動作について、詳細に説明する。
 図6は、本発明の実施の形態1における画像復号装置100の動作の一例を示すフローチャートである。
 まず、ストリームパーサ部120は、外部メモリ110から符号化ストリームを読み出し、SPSヘッダ502の復号(S102)、PPSヘッダ503の復号(S104)、スライスヘッダ504の復号(S106)を順次行う。
 そして、ストリームパーサ部120は、スライスヘッダ504の復号(S106)が完了すると、スライスデータに含まれるマクロブロックの可変長復号のみを行い、復号ストリームを生成する(S108)。
 ここで、ストリームパーサ部120が生成する復号ストリームには、以降の処理でマクロブロックを並列に復号する時にマクロブロックの先頭が分かるように、マクロブロックの先頭にMB(Macroblock)スタートコードが挿入されている。本実施の形態では、MBスタートコードを0x000001F0とした。なお、MBスタートコードは、他のコードと重複しないユニークな値であれば何でもよい。
 また、復号ストリームの生成と合わせて、ストリームパーサ部120は、復号したパラメータのうち、mb_type(Macroblock Type)、sub_mb_type(Sub-Macroblock Type)と、ref_idx(Reference Index)やmvd(Motion Vector Difference)などの動きベクトルを算出するために必要なパラメータを復号制御部130に送る。
 なお、本実施の形態1では、ストリームパーサ部120は、復号したパラメータのうち、少なくともmb_typeを復号制御部130に送る。また、mb_typeは、請求の範囲に記載の「マクロブロックタイプ情報」に包含される。
 ストリームパーサ部120は、1スライス分の可変長復号を完了すると、復号を行ったスライスがピクチャの終端であるかどうかを判断する(S110)。ピクチャに含まれるスライスの数は、PPSヘッダ503にあるnum_slice_groups_minus1を復号することで分かる。このため、復号したスライスの数から1を引いた数と、num_slice_groups_minus1が一致すれば、ピクチャの終端であると判断する。
 ストリームパーサ部120は、ピクチャの終端でないと判断した場合は(S110でNO)、ピクチャの終端になるまで、スライスヘッダ504の復号(S106)及びスライスデータ505の可変長復号(S108)を順次行う。
 そして、ストリームパーサ部120がピクチャの終端であると判断した場合は(S110でYES)、復号制御部130のデータ転送量予測部131が、マクロブロックの復号処理の、動き補償予測の時に、外部メモリ110から取得しなければならない参照画像の予測データ量を、マクロブロック単位で計算する(S112)。データ転送量予測部131が予測データ量を計算する処理の詳細については、後ほど述べる。
 データ転送量予測部131がマクロブロック毎の参照画像のデータ転送量の予測を1ピクチャ分終えると、ブロック決定部132は、その予測値に従って、並列に復号が行われる複数のマクロブロックを決定する(S114)。具体的には、ブロック決定部132は、マクロブロックの復号順序を決定する。ブロック決定部132が並列復号するマクロブロックを決定する処理の詳細については、後ほど述べる。
 ブロック決定部132が1ピクチャ分のマクロブロックの復号順序を決定すると、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160は、それぞれ復号制御部130の指示に従って、外部メモリ110から復号ストリームを読み出し、復号対象マクロブロックの復号処理を並列に行う(S116)。マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160のそれぞれが、マクロブロックの復号を行う処理の詳細については、後ほど述べる。
 復号制御部130は、ブロック決定部132が決定した復号順序に従って、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160にマクロブロック単位で復号開始の指示を出している。
 マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160が復号対象マクロブロックの復号を完了すると、復号制御部130は、復号が行われたマクロブロックがピクチャの終端であるか否かを判断する(S118)。
 そして、復号制御部130が、復号が行われたマクロブロックがピクチャの終端でないと判断した場合(S118でNO)、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160は、ピクチャの終端になるまでマクロブロックの復号処理(S116)を行う。
 復号制御部130が、復号が行われたマクロブロックがピクチャの終端であると判断した場合(S118でYES)、デブロッキングフィルタ部170が1ピクチャ分の再構成画素データに対して、デブロッキングフィルタ処理を行う(S120)。
 デブロッキングフィルタ部170がデブロッキングフィルタ処理を完了すると、次に復号制御部130が、デブロッキングフィルタ処理を行ったピクチャがストリームの終端であるか否かを判断する(S122)。
 後続にストリームが続いている場合は、復号制御部130は、当該ピクチャがストリームの終端でないと判断し(S122でNO)、ストリームパーサ部120がPPSヘッダ503の復号(S104)を再度行うことにより、符号化ストリームを次々と復号していく。
 復号制御部130が、当該ピクチャがストリームの終端であると判断した場合は(S122でYES)、処理を終了する。
 以上により、画像復号装置100が符号化ストリームを復号する処理は終了する。
 次に、データ転送量予測部131が予測データ量を計算する処理(図6のS112)の詳細について、説明する。
 本実施の形態では、マクロブロックレイヤにあるmb_typeを用いたマクロブロックタイプによる予測方法により、データ転送量予測部131が予測データ量を計算する。
 図7は、本実施の形態1におけるデータ転送量予測部131が予測データ量を計算する処理の一例を示すフローチャートである。なお、同図では、1つのマクロブロックについての予測データ量を計算する処理を示しているが、データ転送量予測部131は、ピクチャ内の全てのマクロブロックについて、同図に示す処理を行う。
 同図に示すように、まず、データ転送量予測部131は、ストリームパーサ部120が復号したmb_typeから、復号対象のマクロブロックのマクロブロックタイプを取得する(S202)。なお、mb_typeは、ストリームパーサ部120が符号化ストリームを可変長復号した時に得られるパラメータで、ストリームパーサ部120から復号制御部130に予め送られている。
 ここで、マクロブロックのマクロブロックタイプは、Iマクロブロックタイプ、Pマクロブロックタイプ、及びBマクロブロックタイプの3種類がある。このため、データ転送量予測部131が、mb_typeから、この3種類のマクロブロックタイプのうちのどのマクロブロックタイプを取得するかを、以下に説明する。
 図8は、Pスライスにおけるマクロブロックタイプとマクロブロック分割パターンを示す図である。
 図9は、Bスライスにおけるマクロブロックタイプとマクロブロック分割パターンを示す図である。
 ストリームパーサ部120で復号された、復号対象のマクロブロックを含むスライスのスライスヘッダ504に含まれるslice_typeから、当該スライスは、Iスライス、Pスライス、又はBスライスのどのスライスタイプかが得られる。
 そして、図8に示すように、PスライスはPマクロブロックとIマクロブロックとで構成されている。具体的には、mb_typeが「0~4」のマクロブロックは、Pマクロブロックであり、mb_typeが「5~25」のマクロブロックは、Iマクロブロックである。
 このため、データ転送量予測部131は、Pスライスのマクロブロックのmb_typeが「0~4」の場合は、当該マクロブロックはPマクロブロックタイプであり、mb_typeが「5~25」の場合は、当該マクロブロックはIマクロブロックタイプであるとして、マクロブロックタイプを取得する。
 また、図9に示すように、BスライスはBマクロブロックとIマクロブロックとで構成されている。具体的には、mb_typeが「0~22」のマクロブロックは、Bマクロブロックであり、mb_typeが「23~25」のマクロブロックは、Iマクロブロックである。
 このため、データ転送量予測部131は、Bスライスのマクロブロックのmb_typeが「0~22」の場合は、当該マクロブロックはBマクロブロックタイプであり、mb_typeが「23~25」の場合は、当該マクロブロックはIマクロブロックタイプであるとして、マクロブロックタイプを取得する。
 また、IスライスはIマクロブロックのみで構成されている。このため、データ転送量予測部131は、IスライスのマクロブロックはIマクロブロックタイプであるとして、マクロブロックタイプを取得する。
 図7に戻り、データ転送量予測部131は、取得したマクロブロックタイプがどのマクロブロックタイプかを判断する(S204)。
 データ転送量予測部131は、取得したマクロブロックタイプがIマクロブロックタイプであると判断した場合(S204で「I」)、予測データ量は0バイトであると計算する(S206)。
 つまり、Iマクロブロックタイプのマクロブロックは、画面内予測によって予測画像を生成して、動き補償予測は行われないため、参照画像データを必要としない。
 データ転送量予測部131は、取得したマクロブロックタイプがPマクロブロックタイプであると判断した場合(S204で「P」)、予測データ量は256バイトであると計算する(S208)。
 つまり、Pマクロブロックタイプのマクロブロックは、時間的に近い1枚のフレームを参照画像として用いて動き補償予測を行うため、マクロブロック1つ分、つまり256バイト(16画素×16画素×1)の参照画像データを必要とする。
 データ転送量予測部131は、取得したマクロブロックタイプがBマクロブロックタイプであると判断した場合(S204で「B」)、予測データ量は512バイトであると計算する(S210)。
 つまり、Bマクロブロックタイプのマクロブロックは、時間的に近い2枚のフレームを参照画像として用いて動き補償予測を行うため、マクロブロック2つ分、つまり512バイト(16画素×16画素×2)の参照画像データを必要とする。
 このように、マクロブロックタイプによって動き補償予測に必要となる参照画像の予測データ量を計算することができる。つまり、本実施の形態のマクロブロックタイプによる予測方法では、この予測データ量を外部メモリ110から取得する参照画像の予測データ量であるとする。
 以上により、本実施の形態1におけるデータ転送量予測部131が予測データ量を計算する処理(図6のS112)は、終了する。
 次に、ブロック決定部132が並列復号するマクロブロックを決定する処理(図6のS114)の詳細について、説明する。
 本実施の形態では、ブロック決定部132は、並列に復号が行われる複数のマクロブロックの予測データ量の平均値が、所定の数のマクロブロックの予測データ量の平均値に近付くように、マクロブロックの復号順序を入れ替えることで、並列に復号が行われる複数のマクロブロックを決定する。
 図10は、本実施の形態1におけるブロック決定部132が並列復号するマクロブロックを決定する処理の一例を示すフローチャートである。
 まず、ブロック決定部132は、所定の数のマクロブロックの予測データ量の平均値を算出する(S302)。ここで、所定の数のマクロブロックとは、ピクチャ内の全てのマクロブロックでもよいし、ブロック決定部132が既に復号順序を決定したマクロブロックでもよい。
 そして、ブロック決定部132は、並列に復号が行われる複数のマクロブロックの予測データ量の平均値が、所定の数のマクロブロックの予測データ量の平均値に近付くように、並列に復号するマクロブロックを選択する(S304)。ここでは、所定の数のマクロブロックは、ピクチャ内の全てのマクロブロックであることとする。
 以下に、このブロック決定部132が予測データ量の平均値を算出し(S302)、並列に復号するマクロブロックを選択する(S304)処理について、具体的に説明する。
 マクロブロックの復号順序は図2に記載の順序で行い、基本的には、同図のマクロブロックに付けられた番号順に復号していく。しかし、本実施の形態では、マクロブロック復号部は3つしかないため、並列に復号可能なマクロブロックが3個より多い場合、同じ番号のマクロブロックを一度には復号することができない。
 例えば、11番のマクロブロックは6個あるが、マクロブロック復号部の数が3個であるため、2回に分けて復号する必要がある。どのマクロブロックを始めに復号し、どのマクロブロックを後で復号するかの判断に、参照画像の予測データ量を用いる。
 つまり、ブロック決定部132は、並列に復号するマクロブロックの、参照画像の予測データ量の平均値が、各マクロブロックの予測データ量の平均値となるべく近くなるように、並列に復号するマクロブロックを選択する。これは、ブロック決定部132が、並列に復号するマクロブロックの全組み合わせパターンを求め、各組み合わせパターンで参照画像の予測データ量の平均値を算出して、これが全体の平均値と最も近くなる組み合わせを求めることで行う。
 そして、ブロック決定部132は、選択した複数のマクロブロックが並列に復号されるように、マクロブロックの復号順序を入れ替える(S306)。
 このようにすることで、外部メモリ110から瞬間的に多くのデータが転送されることを防ぎ、小さなメモリバンド幅で、H.264で符号化された画像データを並列復号することができる。
 なお、H.264の符号化画像を復号する上で必要となるデータ転送は、動き補償予測のための参照画像の取得転送以外にもある。しかし、この参照画像の取得転送が復号に必要なデータ転送量の大部分を占めているため、参照画像取得のデータ転送量の瞬間的な増加を抑えることで、外部メモリ110のメモリバンド幅を抑えることができる。
 以上により、ブロック決定部132が並列復号するマクロブロックを決定する処理(図6のS114)は、終了する。
 次に、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160のそれぞれが、マクロブロックの復号を行う処理(図6のS116)の詳細について、説明する。
 図11は、本実施の形態1におけるマクロブロック復号部140がマクロブロックの復号を行う処理の一例を示すフローチャートである。なお、マクロブロック復号部150及びマクロブロック復号部160がマクロブロックの復号を行う処理は、マクロブロック復号部140がマクロブロックの復号を行う処理と同様であるため、省略する。
 まず、同図に示すように、マクロブロック復号部140は、復号制御部130からマクロブロック復号開始の指示を受けると、外部メモリ110から復号対象マクロブロックの復号ストリームを読み出す(S402)。
 次に、マクロブロック復号部140は、復号ストリームから予測モードを読み出し、予測モードがイントラ予測かインター予測かを判断する(S404)。
 マクロブロック復号部140は、予測モードがイントラ予測であると判断した場合(S404で「イントラ予測」)、画面内予測部143が起動して、画面内予測処理を行い、予測ブロックの画素データを生成する(S406)。
 マクロブロック復号部140は、予測モードがインター予測であると判断した場合(S404で「インター予測」)、動き補償予測部144が起動して、動き補償予測処理を行い、予測ブロックの画素データを生成する(S408)。
 次に、マクロブロック復号部140は、復号ストリームから予測誤差データを読み出し、逆量子化部141で逆量子化し、逆直交変換部142で逆直交変換することで、予測ブロックに対する予測誤差画素データを生成する(S410)。
 最後に、マクロブロック復号部140は、予測ブロックの画素データと、予測誤差画素データを加算回路145で加算して再構成画素データを得る(S412)。
 このように、1マクロブロックの復号処理が完了すると、マクロブロック復号部140は、復号制御部130にマクロブロック完了を通知する(S414)。また、それとともに、マクロブロック復号部140は、復号したマクロブロックの情報のうち、後の復号に周辺隣接マクロブロック情報として使用する情報を、復号制御部130に渡す。
 以上により、マクロブロック復号部140、マクロブロック復号部150及びマクロブロック復号部160のそれぞれが、マクロブロックの復号を行う処理(図6のS116)は、終了する。
 以上のことから、本実施の形態における画像復号装置100によれば、参照画像の枚数から参照画像の予測データ量を計算し、並列に復号が行われる符号化画像データの複数のブロックを決定することで、複数のブロックを並列に復号する。つまり、符号化画像データを並列に復号する場合に、予め、メモリから取得する予測データ量を正確に計算することができるため、外部メモリ110から読み出されるデータ量の変動が小さくなるように、並列に復号するブロックを適切に選択することができる。
 また、参照画像の枚数を示す参照情報として、マクロブロックタイプ情報の復号が行われる。これにより、簡易に参照画像の枚数を取得することができる。
 また、ブロックの復号順序を入れ替えることで、並列に復号が行われる複数のブロックを決定する。これにより、瞬間的にデータ転送量が増加しないように、ブロックの復号順序を入れ替えることができる。なお、この方法に最も効果がある符号化画像データであったとすれば、外部メモリ110のメモリバンド幅を最大で半分近く低減することが可能となる。
 また、複数のブロックの予測データ量の平均値が、所定の数のブロックの予測データ量の平均値に近付くように、並列に復号が行われる複数のブロックを決定する。これにより、並列復号が行われるブロックの予測データ量が平均的な値となる。
 これらにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 (実施の形態2)
 本実施の形態2では、符号化画像データの復号が行われる際に、符号化画像データの各マクロブロックをさらに小さなブロックに分割した分割ブロックを単位とした参照画像を参照する場合、ストリームパーサ部120は、符号化画像データに含まれる、分割ブロックのサイズを示すブロック分割パターン情報を、さらに復号制御部130に送る。
 そして、データ転送量予測部131は、ブロック分割パターン情報で示されるサイズの分割ブロックごとに、さらに、整数画素位置の参照画像が参照される確率と小数画素位置の参照画像が参照される確率とを用いて、整数画素位置の参照画像のデータ量と小数画素位置の参照画像のデータ量とに重み付けを行うことで、予測データ量を計算する。
 なお、ブロック分割パターン情報は、マクロブロックの分割パターンであるマクロブロック分割パターンと、サブマクロブロックの分割パターンであるサブマクロブロック分割パターンとを包含している。つまり、本実施の形態2では、ストリームパーサ部120は、復号したパラメータのうち、少なくともmb_type及びsub_mb_typeを復号制御部130に送る。詳細については、後述する。
 ここで、本実施の形態2では、図6に示されたデータ転送量予測部131が予測データ量を計算する処理(図6のS112)が、実施の形態1と異なる処理であり、それ以外の処理は実施の形態1と同様であるため、当該処理(図6のS112)の詳細について、以下に説明する。
 図12は、本実施の形態2におけるデータ転送量予測部131が予測データ量を計算する処理の一例を示すフローチャートである。なお、同図では、1つのマクロブロックについての予測データ量を計算する処理を示しているが、データ転送量予測部131は、ピクチャ内の全てのマクロブロックについて、同図に示す処理を行う。
 同図に示すように、まず、データ転送量予測部131は、ストリームパーサ部120が復号したmb_typeから、復号対象のマクロブロックのマクロブロックタイプを取得する(S502)。詳細については、実施の形態1の図7でのマクロブロックタイプを取得する処理(図7のS202)と同様であるため、省略する。
 そして、データ転送量予測部131は、取得したマクロブロックタイプがどのマクロブロックタイプかを判断する(S504)。
 データ転送量予測部131は、取得したマクロブロックタイプがIマクロブロックタイプであると判断した場合(S504で「I」)、予測データ量は0バイトであると計算し(S506)、処理を終了する。
 データ転送量予測部131は、取得したマクロブロックタイプがPマクロブロックタイプ又はBマクロブロックタイプであると判断した場合(S504で「PまたはB」)、mb_typeから、復号対象のマクロブロックのマクロブロック分割パターンを取得する(S508)。
 図13は、マクロブロック分割パターンを説明する図である。
 同図に示すように、mb_typeによって、16画素×16画素、16画素×8画素、8画素×16画素、8画素×8画素の4種類のマクロブロック分割パターンが定義されている。
 また、マクロブロックが分割された各分割ブロックには、mbPartIdx(Macroblock Partiotion Index)と呼ばれる番号が付けられている。例えば、8画素×8画素のマクロブロック分割パターンであれば、マクロブロックは、mbPartIdxが0~3の4つの分割ブロックに分割されている。
 そして、図8及び図9に示されたように、mb_typeの値から、マクロブロック分割パターンを取得することができる。つまり、図8及び図9に示された「Name of mb_type」はマクロブロック分割パターンを示している。また、「NumMbPart(mb_type)」はマクロブロックの分割ブロックの個数を示し、「MbPartWidth(mb_type)」はマクロブロックの分割ブロックの幅を示し、「MbPartHeight(mb_type)」はマクロブロックの分割ブロックの高さを示している。
 このように、ストリームパーサ部120が、符号化ストリームに含まれるmb_typeを復号することで、データ転送量予測部131は、mb_typeから、復号対象のマクロブロックのマクロブロック分割パターンを取得する。
 図12に戻り、データ転送量予測部131は、取得したマクロブロック分割パターンがどのマクロブロック分割パターンかを判断する(S510)。
 データ転送量予測部131は、マクロブロック分割パターンが8画素×8画素のマクロブロック分割パターンであると判断した場合(S510で「8×8」)、idx=0とする(S512)。ここでは、idxは、0以上の整数である。
 次に、データ転送量予測部131は、mbPartIdx=idxのサブマクロブロックのsub_mb_typeから、サブマクロブロック分割パターンを取得する(S514)。なお、sub_mb_typeは、ストリームパーサ部120が符号化ストリームを可変長復号した時に得られるパラメータで、ストリームパーサ部120から復号制御部130に予め送られている。
 図14は、サブマクロブロック分割パターンを説明する図である。
 同図に示すように、8画素×8画素のマクロブロック分割パターンの場合には、8画素×8画素の分割ブロックであるサブマクロブロックをさらに分割する分割パターンである、8画素×8画素、8画素×4画素、4画素×8画素、4画素×4画素のサブマクロブロック分割パターンが定義されている。
 また、サブマクロブロックが分割された各分割ブロックには、subMbPartIdx(Sub-Macroblock Partiotion Index)と呼ばれる番号が付けられている。例えば、4画素×4画素のサブマクロブロック分割パターンであれば、サブマクロブロックは、subMbPartIdxが0~3の4つの分割ブロックに分割されている。
 図15は、Pマクロブロックにおけるサブマクロブロックタイプとサブマクロブロック分割パターンを示す図である。
 図16は、Bマクロブロックにおけるサブマクロブロックタイプとサブマクロブロック分割パターンを示す図である。
 これらの図に示すように、mb_typeの値によって、分割ブロックのサイズが8画素×8画素であった場合には、その8画素×8画素のサブマクロブロックごとに、さらにsub_mb_typeが定められている。そして、sub_mb_typeの値から、サブマクロブロック分割パターンを取得することができる。
 つまり、これらの図に示された「Name of sub_mb_type」はサブマクロブロック分割パターンを示している。また、「NumMbPart(sub_mb_type)」はサブマクロブロックの分割ブロックの個数を示し、「MbPartWidth(sub_mb_type)」はサブマクロブロックの分割ブロックの幅を示し、「MbPartHeight(sub_mb_type)」はサブマクロブロックの分割ブロックの高さを示している。
 このように、ストリームパーサ部120が、符号化ストリームに含まれるsub_mb_typeを復号することで、データ転送量予測部131は、sub_mb_typeから、復号対象のマクロブロックのサブマクロブロック分割パターンを取得する。
 図12に戻り、データ転送量予測部131は、取得したサブマクロブロック分割パターンがどのサブマクロブロック分割パターンかを判断する(S516)。
 データ転送量予測部131は、サブマクロブロック分割パターンが8画素×8画素のサブマクロブロック分割パターンであると判断した場合(S516で「8×8」)、予測データ量は121バイトであると計算する(S518)。
 また、データ転送量予測部131は、サブマクロブロック分割パターンが4画素×4画素のサブマクロブロック分割パターンであると判断した場合(S516で「4×4」)、予測データ量は49バイト×4であると計算する(S520)。
 データ転送量予測部131は、サブマクロブロック分割パターンが8画素×4画素又は4画素×8画素のサブマクロブロック分割パターンであると判断した場合(S516で「8×4または4×8」)、予測データ量は77バイト×2であると計算する(S522)。
 そして、データ転送量予測部131は、idxに1加算し(S524)、idxが3よりも大きいか否かを判断する(S526)。
 データ転送量予測部131は、idxが3以下であると判断した場合(S526でNO)、予測データ量を計算する処理(S514~S524)を繰り返す。つまり、データ転送量予測部131は、全てのサブマクロブロックの分割ブロックについて、予測データ量を計算する。
 また、データ転送量予測部131は、マクロブロック分割パターンが16画素×16画素のマクロブロック分割パターンであると判断した場合(S510で「16×16」)、予測データ量は361バイトであると計算する(S528)。
 また、データ転送量予測部131は、マクロブロック分割パターンが16画素×8画素又は8画素×16画素のマクロブロック分割パターンであると判断した場合(S510で「16×8または8×16」)、予測データ量は209バイト×2であると計算する(S530)。
 ここで、データ転送量予測部131がマクロブロック分割パターン又はサブマクロブロック分割パターンから予測データ量を計算する処理(S518~S522、S528、S530)について、詳細に説明する。
 H.264では、1/4画素精度で動き補償予測を行うため、小数位置画素の参照画像を必要とする場合がある。この場合、画素と画素との間の小数位置の画素値を計算するために、余分に参照画像データを外部メモリ110から読み出す必要がある。この点を考慮したのが、マクロブロック分割パターン又はサブマクロブロック分割パターンを用いた予測方法である。
 図17は、本実施の形態2におけるH.264の動き補償予測における小数位置画素の、参照画像の画素値の計算方法を示す図である。
 同図に示すように、画素と画素との中間に位置する1/2位置画素の画素値は、6タップのFIR(Finite Impulse Response)フィルタ演算によって計算される。そのため、1/2位置画素の画素値を計算するためには、周辺隣接の整数位置の6画素が必要となる。
 例えば、動きベクトルが水平方向と垂直方向の両方で小数位置を指している場合、16画素×16画素の参照画像を生成するには、水平方向、垂直方向にそれぞれ余分に5画素必要となり、21画素×21画素の参照画像データが必要となる。
 また、動きベクトルが水平方向又は垂直方向のいずれか一方で小数位置を指している場合、16画素×16画素の参照画像を生成するには、水平方向、垂直方向のいずれか一方に余分に5画素必要となり、16画素×21画素又は21画素×16画素の参照画像データが必要となる。
 1/4位置画素の画素値は、同図に示す通り、隣接する整数位置画素または1/2位置画素の画素値の平均をとって算出する。このため、1/4位置画素の画素値を計算するためには、1/2位置画素の画素値を計算する場合と同じデータ量の参照画像データが必要となる。
 このように動きベクトルが小数位置を指す場合、画素値計算のために余分に参照画像が必要となるため、動きベクトルによって外部メモリ110から取得する参照画像のデータ量は異なる。
 また、H.264では、マクロブロックの大きさである16画素×16画素だけでなく、16画素×8画素、8画素×16画素、8画素×8画素、8画素×4画素、4画素×8画素、4画素×4画素のブロック単位で動き補償予測が可能である。どの単位で分割するかをマクロブロック単位に自由に選択・組み合わせることが可能になっている。
 16画素×16画素よりも細かい単位で動き補償予測する場合でも、動き補償予測する上で小数位置画素の参照画像が必要となると、動き補償予測の単位ブロックに対して水平方向、垂直方向にそれぞれ5画素分、余分に必要となる。そのため、動き補償予測する上で小数位置画素の参照画像が必要となる場合は、より細かい単位でマクロブロックを分割して動き補償予測を行うほど、余分に必要となる参照画像のデータ量が大きくなる。
 図18は、本実施の形態2におけるH.264の動き補償予測の単位ブロックと予測データ量との関係を示す図である。
 同図に示すように、「動き補償予測の単位ブロック」の欄は、動き補償予測の単位ブロックの大きさを示している。
 また、「水平、垂直位置の両方が整数画素位置」の欄は、動き補償予測する上で、水平位置及び垂直位置の両方が整数画素位置の参照画像が必要となる場合の、参照画像の大きさとそのデータ量を示している。なお、動きベクトルの水平、垂直位置の両方が整数画素位置を指す場合は、動き補償予測に必要な参照画像のデータ量は、動き補償予測の単位ブロックのデータ量と同じである。
 同様に、「水平位置が小数画素位置」の欄は、動き補償予測する上で、水平位置が小数画素位置の参照画像、及び垂直位置が整数画素位置の参照画像が必要となる場合の、参照画像の大きさとそのデータ量を示している。
 また、「垂直位置が小数画素位置」の欄は、動き補償予測する上で、垂直位置が小数画素位置の参照画像、及び水平位置が整数画素位置の参照画像が必要となる場合の、参照画像の大きさとそのデータ量を示している。
 また、「水平、垂直位置の両方が小数画素位置」の欄は、動き補償予測する上で、水平位置及び垂直位置の両方が小数画素位置の参照画像が必要となる場合の、参照画像の大きさとそのデータ量を示している。
 「予測データ量」の欄は、実際に外部メモリ110から取得する参照画像の、データ量の予測値を示している。参照画像のデータ量の予測値は、動きベクトルの指す位置が整数位置、小数位置のどの位置も等確率であるとして算出している。
 つまり、図17に示したように、「水平、垂直位置の両方が整数画素位置」の画素は、画素C、D、I、Lの4個である。また、「水平位置が小数画素位置」の画素は、画素a~fの6個である。また、「垂直位置が小数画素位置」の画素は、g~lの6個である。また、「水平、垂直位置の両方が小数画素位置」の画素は、画素m~uの9個である。
 このため、「水平、垂直位置の両方が整数画素位置」、「水平位置が小数画素位置」、「垂直位置が小数画素位置」及び「水平、垂直位置の両方が小数画素位置」の参照画像のデータ量を、それぞれ4:6:6:9で重み付けすることで、予測データ量が算出される。
 具体的には、データ転送量予測部131は、以下の式により、予測データ量を算出する。
 (「水平、垂直位置の両方が整数画素位置」の参照画像のデータ量×4
  +「水平位置が小数画素位置」の参照画像のデータ量×6
  +「垂直位置が小数画素位置」の参照画像のデータ量×6
  +「水平、垂直位置の両方が小数画素位置」の参照画像のデータ量×9)/25
 このように、データ転送量予測部131は、分割ブロックごとに、水平位置及び垂直位置がともに整数画素位置である第1参照画像が参照される確率を第1確率とし、水平位置が小数画素位置であり垂直位置が整数画素位置である第2参照画像が参照される確率を第2確率とし、水平位置が整数画素位置であり垂直位置が小数画素位置である第3参照画像が参照される確率を第3確率とし、水平位置及び垂直位置がともに小数画素位置である第4参照画像が参照される確率を第4確率とした場合、第1参照画像、第2参照画像、第3参照画像及び第4参照画像のデータ量に、それぞれ第1確率、第2確率、第3確率及び第4確率を乗じて加算することで、予測データ量を計算する。
 図12に戻り、次に、データ転送量予測部131は、復号対象のマクロブロックのマクロブロックタイプがどのマクロブロックタイプかを判断する(S532)。
 データ転送量予測部131は、マクロブロックタイプがPマクロブロックタイプであると判断した場合は(S532で「P」)、処理を終了する。
 また、データ転送量予測部131は、マクロブロックタイプがBマクロブロックタイプであると判断した場合(S532で「B」)、予測データ量を2倍にし(S534)、処理を終了する。
 つまり、マクロブロック分割パターンを用いた予測方法では、マクロブロックレイヤにあるmb_type、sub_mb_typeからマクロブロックタイプとマクロブロックの分割パターンを求める。そして、マクロブロック内の各分割ブロックに対応する予測データ量の総和を、外部メモリ110から取得する参照画像のデータ量であるとする。
 この時、分割ブロックのマクロブロックタイプがBマクロブロックタイプである場合は、参照画像が2枚必要であることを考慮して、図18の予測データ量の、2倍の値を予測値とする。Pマクロブロックパターンである場合は、参照画像が1枚必要であることを考慮して、図18の予測データ量を予測値とし、Iマクロブロックパターンである場合は、動き補償予測は行われないため予測値はゼロとして計算する。
 動き補償予測の単位ブロックが8画素×8画素よりも大きい場合は、mb_typeから得られるMbPartWidthとMbPartHeightが、分割ブロックの幅と高さになる。動き補償予測の単位ブロックが8画素×8画素以下の場合は、8画素×8画素ブロック毎にsub_mb_typeがある。この、sub_mb_typeから得られるMbPartWidthとMbPartHeightが、分割ブロックの幅と高さになる。
 以上により、本実施の形態2におけるデータ転送量予測部131が予測データ量を計算する処理(図6のS112)は、終了する。
 以上のように、本実施の形態2における画像復号装置100によれば、分割ブロック単位で参照画像を参照する場合、ブロック分割パターン情報を用いて、予測データ量を計算する。これにより、分割ブロック単位で参照画像を参照する必要がある場合でも、予測データ量を計算することができる。
 また、分割ブロックごとに、さらに整数画素位置の参照画像のデータ量と小数画素位置の参照画像のデータ量とに重み付けを行うことで、予測データ量を計算する。これにより、整数画素位置の参照画像のデータ量だけではなく、小数画素位置の参照画像のデータ量も考慮した予測データ量を計算することができる。このため、予測データ量をより正確に計算することができるため、並列に復号するブロックを適切に選択することができる。
 また、水平位置又は垂直位置が整数画素位置又は小数画素位置の参照画像が参照される確率を用いて、予測データ量を計算する。これにより、水平位置又は垂直位置が整数画素位置か小数画素位置かを考慮して計算が行われるため、予測データ量をさらに正確に計算することができる。
 したがって、分割ブロック単位で参照画像を参照する必要がある場合でも、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 (実施の形態3)
 本実施の形態3では、ストリームパーサ部120は、マクロブロックごとに、復号対象のマクロブロックの画像と参照画像との間の動き量を示す動き情報を、さらに復号制御部130に送り、データ転送量予測部131は、マクロブロックごとに、さらに動き情報を用いて、予測データ量を計算する。
 つまり、本実施の形態3では、ストリームパーサ部120は、復号したパラメータのうち、少なくともmb_type、sub_mb_type及びmvdを復号制御部130に送る。
 具体的には、データ転送量予測部131は、動き情報が示す参照画像の位置が小数画素位置であるか否かを判断し、参照画像の位置が小数画素位置であると判断した場合、小数画素位置の参照画像のデータ量を予測データ量として計算する。
 ここで、本実施の形態3では、図6に示されたデータ転送量予測部131が予測データ量を計算する処理(図6のS112)が、実施の形態1と異なる処理であり、それ以外の処理は実施の形態1と同様であるため、当該処理(図6のS112)の詳細について、以下に説明する。
 図19は、本実施の形態3におけるデータ転送量予測部131が予測データ量を計算する処理の一例を示すフローチャートである。なお、同図では、1つのマクロブロックについての予測データ量を計算する処理を示しているが、データ転送量予測部131は、ピクチャ内の全てのマクロブロックについて、同図に示す処理を行う。
 同図に示すように、まず、データ転送量予測部131は、ストリームパーサ部120が復号したmb_typeから、復号対象のマクロブロックのマクロブロックタイプを取得する(S602)。詳細については、実施の形態1の図7でのマクロブロックタイプを取得する処理(図7のS202)と同様であるため、省略する。
 そして、データ転送量予測部131は、取得したマクロブロックタイプがどのマクロブロックタイプかを判断する(S604)。
 データ転送量予測部131は、取得したマクロブロックタイプがIマクロブロックタイプであると判断した場合(S604で「I」)、予測データ量は0バイトであると計算し(S606)、処理を終了する。
 データ転送量予測部131は、取得したマクロブロックタイプがPマクロブロックタイプ又はBマクロブロックタイプであると判断した場合(S604で「PまたはB」)、mb_typeから、復号対象のマクロブロックのマクロブロック分割パターンを取得する(S608)。詳細については、実施の形態2の図12でのマクロブロック分割パターンを取得する処理(図12のS508)と同様であるため、省略する。
 そして、データ転送量予測部131は、idx=0とする(S610)。
 そして、データ転送量予測部131は、取得したマクロブロック分割パターンがどのマクロブロック分割パターンかを判断する(S612)。
 データ転送量予測部131は、マクロブロック分割パターンが8画素×8画素のマクロブロック分割パターンであると判断した場合(S612で「8×8」)、8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する(S614)。このデータ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理については、後述する。
 また、データ転送量予測部131は、マクロブロック分割パターンが8画素×8画素以外のマクロブロック分割パターンであると判断した場合(S612で「8×8以外」)、当該マクロブロック分割パターンの場合の予測データ量を計算する(S616)。このデータ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理については、後述する。
 そして、データ転送量予測部131は、idxに1加算し(S618)、idxが「マクロブロックの分割数-1」よりも大きいか否かを判断する(S620)。
 データ転送量予測部131は、idxが「マクロブロックの分割数-1」以下であると判断した場合(S620でNO)、予測データ量を計算する処理(S612~S618)を繰り返す。つまり、データ転送量予測部131は、全てのマクロブロックの分割ブロックについて、予測データ量を計算する。
 データ転送量予測部131は、idxが「マクロブロックの分割数-1」よりも大きいと判断した場合(S620でYES)、処理を終了する。
 以上により、本実施の形態3におけるデータ転送量予測部131が予測データ量を計算する処理(図6のS112)は、終了する。
 次に、データ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS614)の詳細について、説明する。
 図20は、本実施の形態3におけるデータ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。
 復号対象のマクロブロックのマクロブロック分割パターンが8画素×8画素の場合は、8画素×8画素のサブマクロブロックにサブマクロブロック分割パターンが存在する。
 このため、まず、データ転送量予測部131は、mbPartIdx=idxのサブマクロブロックのsub_mb_typeから、サブマクロブロック分割パターンを取得する(S702)。なお、sub_mb_typeは、ストリームパーサ部120が符号化ストリームを可変長復号した時に得られるパラメータで、ストリームパーサ部120から復号制御部130に予め送られている。
 そして、データ転送量予測部131は、subIdx=0とする(S704)。ここで、subIdxは、0以上の整数である。
 そして、データ転送量予測部131は、mbPartIdx=idxのサブマクロブロックの分割サイズを取得し、subW及びsubHに代入する(S706)。
 具体的には、データ転送量予測部131は、図15又は図16に示された、サブマクロブロックの分割ブロックの幅である「MbPartWidth(sub_mb_type)」及びサブマクロブロックの分割ブロックの高さである「MbPartHeight(sub_mb_type)」を取得する。そして、データ転送量予測部131は、MbPartWidth(sub_mb_type)をsubWに代入し、及びMbPartHeight(sub_mb_type)をsubHに代入する。
 そして、データ転送量予測部131は、subMbPartIdx=subIdxのサブマクロブロックの分割ブロックの動きベクトルを算出する(S708)。つまり、まず、データ転送量予測部131は、subMbPartIdx=0のサブマクロブロックの分割ブロックの動きベクトルを算出する。なお、データ転送量予測部131は、ストリームパーサ部120が復号制御部130に送ったmvdから、当該動きベクトルを算出する。
 そして、データ転送量予測部131は、動きベクトルが指す水平位置が小数画素位置か否かを判断する(S710)。
 データ転送量予測部131は、動きベクトルが指す水平位置が小数画素位置であると判断した場合(S710でYES)、subWに5加算する(S712)。つまり、データ転送量予測部131は、サブマクロブロックの分割ブロックの幅を5画素広げる。
 データ転送量予測部131は、動きベクトルが指す水平位置が小数画素位置でないと判断した場合は(S710でNO)、subWに加算することなく、次の処理(S714)へ進む。
 次に、データ転送量予測部131は、動きベクトルが指す垂直位置が小数画素位置か否かを判断する(S714)。
 データ転送量予測部131は、動きベクトルが指す垂直位置が小数画素位置であると判断した場合(S714でYES)、subHに5加算する(S716)。つまり、データ転送量予測部131は、サブマクロブロックの分割ブロックの高さを5画素広げる。
 データ転送量予測部131は、動きベクトルが指す垂直位置が小数画素位置でないと判断した場合は(S714でNO)、subHに加算することなく、次の処理(S718)へ進む。
 次に、データ転送量予測部131は、subWにsubHを乗じた値を予測データ量として計算する(S718)。
 そして、データ転送量予測部131は、subIdxに1加算し(S720)、subIdxがmbPartIdx=idxのサブマクロブロックの分割数から1差し引いた値よりも大きいか否かを判断する(S722)。
 データ転送量予測部131は、subIdxがmbPartIdx=idxのサブマクロブロックの分割数から1差し引いた値以下であると判断した場合(S722でNO)、予測データ量を計算する処理(S706~S720)を繰り返す。つまり、データ転送量予測部131は、サブマクロブロックの全ての分割ブロックについて、予測データ量を計算する処理(S706~S720)を行う。
 データ転送量予測部131は、subIdxがmbPartIdx=idxのサブマクロブロックの分割数から1差し引いた値よりも大きいと判断した場合は(S722でYES)、処理を終了する。
 以上により、本実施の形態3におけるデータ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS614)は、終了する。
 次に、データ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS616)の詳細について、説明する。
 図21は、本実施の形態3におけるデータ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。
 復号対象のマクロブロックのマクロブロック分割パターンが8画素×8画素以外の場合は、サブマクロブロックにサブマクロブロック分割パターンが存在せず、サブマクロブロックが復号処理の最小単位である。
 このため、まず、データ転送量予測部131は、サブマクロブロックのサイズを取得し、w及びhに代入する(S802)。
 具体的には、データ転送量予測部131は、図8又は図9に示された、マクロブロックの分割ブロックの幅である「MbPartWidth(mb_type)」及びマクロブロックの分割ブロックの高さである「MbPartHeight(mb_type)」を取得する。そして、データ転送量予測部131は、MbPartWidth(mb_type)をwに代入し、及びMbPartHeight(mb_type)をhに代入する。
 そして、データ転送量予測部131は、mbPartIdx=idxのサブマクロブロックの動きベクトルを算出する(S804)。つまり、まず、データ転送量予測部131は、mbPartIdx=0のサブマクロブロックの動きベクトルを算出する。
 そして、データ転送量予測部131は、動きベクトルが指す水平位置が小数画素位置か否かを判断する(S806)。
 データ転送量予測部131は、動きベクトルが指す水平位置が小数画素位置であると判断した場合(S806でYES)、wに5加算する(S808)。つまり、データ転送量予測部131は、サブマクロブロックの幅を5画素広げる。
 データ転送量予測部131は、動きベクトルが指す水平位置が小数画素位置でないと判断した場合は(S806でNO)、wに加算することなく、次の処理(S810)へ進む。
 次に、データ転送量予測部131は、動きベクトルが指す垂直位置が小数画素位置か否かを判断する(S810)。
 データ転送量予測部131は、動きベクトルが指す垂直位置が小数画素位置であると判断した場合(S810でYES)、hに5加算する(S812)。つまり、データ転送量予測部131は、サブマクロブロックの高さを5画素広げる。
 データ転送量予測部131は、動きベクトルが指す垂直位置が小数画素位置でないと判断した場合は(S810でNO)、hに加算することなく、次の処理(S814)へ進む。
 次に、データ転送量予測部131は、wにhを乗じた値を予測データ量として計算する(S814)。
 以上により、本実施の形態3におけるデータ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS616)は、終了する。
 以上のように、本実施の形態3における画像復号装置100によれば、動き情報を用いて、予測データ量を計算する。これにより、予測データ量をより正確に計算することができるため、並列に復号するブロックを適切に選択することができる。
 また、参照画像の位置が小数画素位置である場合、小数画素位置の参照画像のデータ量を予測データ量として計算する。これにより、予測データ量をさらに正確に計算することができるため、並列に復号するブロックを適切に選択することができる。
 これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 (実施の形態4)
 本実施の形態4では、データ転送量予測部131は、動き情報が示す参照画像のアドレスが、アライメントされたアドレスか否かを判断し、参照画像のアドレスがアライメントされたアドレスではないと判断した場合、参照画像のアドレスをアライメントされたアドレスに補正して、予測データ量を計算する。
 つまり、外部メモリ110から読み出す参照画像データのアドレスが、アライメントされていないアドレスであった場合、アライメントされたアドレスから読み出さなければならない。そのため、その分、余分に外部メモリ110から読み出す必要がある。動きベクトルが分かれば、参照画像を読み出す外部メモリ110のアドレスも計算できるために、アドレスのアラインも考慮してデータ量を予測することができる。このように、動きベクトル自体を完全に算出して用いる予測方法では、参照画像の転送データ量を完全に予測することができる。
 なお、ストリームパーサ部120は、復号したパラメータのうち、少なくともmb_type、sub_mb_type、ref_idx及びmvdなどの動きベクトルを算出するために必要なパラメータを復号制御部130に送る。
 ここで、本実施の形態4では、図19に示されたデータ転送量予測部131が予測データ量を計算する処理(図19のS614及びS616)が、実施の形態3と異なる処理であり、それ以外の処理は実施の形態3と同様であるため、当該処理(図19のS614及びS616)の詳細について、以下に説明する。
 まず、データ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS614)の詳細について、説明する。
 図22は、本実施の形態4におけるデータ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。
 まず、データ転送量予測部131は、mbPartIdx=idxのサブマクロブロックのsub_mb_typeから、サブマクロブロック分割パターンを取得する(S902)。なお、sub_mb_typeは、ストリームパーサ部120が符号化ストリームを可変長復号した時に得られるパラメータで、ストリームパーサ部120から復号制御部130に予め送られている。
 そして、データ転送量予測部131は、subIdx=0とする(S904)。
 そして、データ転送量予測部131は、subMbPartIdx=subIdxのサブマクロブロックの分割ブロックの動きベクトルを算出する(S906)。つまり、まず、データ転送量予測部131は、subMbPartIdx=0のサブマクロブロックの分割ブロックの動きベクトルを算出する。なお、データ転送量予測部131は、ストリームパーサ部120が復号制御部130に送ったmvdから、当該動きベクトルを算出する。
 そして、データ転送量予測部131は、マクロブロックタイプ、サブマクロブロック分割パターン、subMbPartIdx=subIdxの分割ブロックの動きベクトル、及び参照画像に用いるフレームがどのフレームであるかを示すref_idxから、subMbPartIdx=subIdxの分割ブロックの動き補償に必要となる参照画像の外部メモリ110上のアドレスを算出する(S908)。なお、ref_idxは、ストリームパーサ部120が符号化ストリームを可変長復号した時に得られるパラメータで、ストリームパーサ部120から復号制御部130に予め送られている。
 次に、データ転送量予測部131は、算出した参照画像のアドレスがアライメントされた位置か否かを判断する(S910)。
 データ転送量予測部131は、算出した参照画像のアドレスがアライメントされた位置でないと判断した場合(S910でNO)、当該参照画像のアドレスをアライメントされたアドレスに補正する(S912)。
 ここで、データ転送量予測部131が、アライメントされた位置にない参照画像のアドレスをアライメントされたアドレスに補正することについて、以下に説明する。
 図23は、本実施の形態4におけるデータ転送量予測部131が参照画像をアライメントされたアドレスに補正することを説明する図である。
 同図の(a)に示すように、外部メモリ110が、8バイトのメモリアライメント(8バイト転送のメモリ)の場合、13×13バイトの参照画像は、メモリアライメントの境界を跨いでいる。このような、メモリアライメントの境界を跨ぐようなアドレスの参照画像を転送する場合、アライメントされたアドレスから転送しなければならない。
 このため、同図の(b)に示すように、参照画像のアドレスをアライメントされたアドレスに補正する必要がある。つまり、当該参照画像のデータ転送量は、13×13=169バイトから、24×13=312バイトに増加する。
 このように、データ転送量予測部131は、アライメントされた位置にない参照画像のアドレスを、アライメントされたアドレスに補正する。
 図22に戻り、データ転送量予測部131は、算出した参照画像のアドレスがアライメントされた位置であると判断した場合(S910でYES)、次の処理(S914)へ進む。
 次に、データ転送量予測部131は、参照画像のアドレスから、当該参照画像のデータ転送量を算出する(S914)。例えば、図23に示された場合であれば、データ転送量予測部131は、当該参照画像のデータ転送量として、312バイトと算出する。
 そして、データ転送量予測部131は、算出した当該参照画像のデータ転送量を、当該参照画像の予測データ量として計算する(S916)。
 そして、データ転送量予測部131は、subIdxに1加算し(S918)、subIdxがmbPartIdx=idxのサブマクロブロックの分割数から1差し引いた値よりも大きいか否かを判断する(S920)。
 データ転送量予測部131は、subIdxがmbPartIdx=idxのサブマクロブロックの分割数から1差し引いた値以下であると判断した場合(S920でNO)、予測データ量を計算する処理(S906~S918)を繰り返す。つまり、データ転送量予測部131は、サブマクロブロックの全ての分割ブロックについて、予測データ量を計算する処理(S906~S918)を行う。
 データ転送量予測部131は、subIdxがmbPartIdx=idxのサブマクロブロックの分割数から1差し引いた値よりも大きいと判断した場合は(S920でYES)、処理を終了する。
 以上により、本実施の形態4におけるデータ転送量予測部131が8画素×8画素のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS614)は、終了する。
 次に、データ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS616)の詳細について、説明する。
 図24は、本実施の形態4におけるデータ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理の一例を示すフローチャートである。
 まず、データ転送量予測部131は、mbPartIdx=idxのサブマクロブロックの動きベクトルを算出する(S1002)。なお、データ転送量予測部131は、ストリームパーサ部120が復号制御部130に送ったmvdから、当該動きベクトルを算出する。
 そして、データ転送量予測部131は、マクロブロックタイプ、マクロブロック分割パターン、mbPartIdx=idxのサブマクロブロックの動きベクトル、及び参照画像に用いるフレームがどのフレームであるかを示すref_idxから、mbPartIdx=idxのサブマクロブロックの動き補償に必要となる参照画像の外部メモリ110上のアドレスを算出する(S1004)。なお、ref_idxは、ストリームパーサ部120が符号化ストリームを可変長復号した時に得られるパラメータで、ストリームパーサ部120から復号制御部130に予め送られている。
 次に、データ転送量予測部131は、算出した参照画像のアドレスがアライメントされた位置か否かを判断する(S1006)。
 データ転送量予測部131は、算出した参照画像のアドレスがアライメントされた位置でないと判断した場合(S1006でNO)、当該参照画像のアドレスをアライメントされたアドレスに補正する(S1008)。
 データ転送量予測部131は、算出した参照画像のアドレスがアライメントされた位置であると判断した場合(S1006でYES)、次の処理(S1010)へ進む。
 次に、データ転送量予測部131は、参照画像のアドレスから、当該参照画像のデータ転送量を算出する(S1010)。例えば、図23に示された場合であれば、データ転送量予測部131は、当該参照画像のデータ転送量として、312バイトと算出する。
 そして、データ転送量予測部131は、算出した当該参照画像のデータ転送量を、当該参照画像の予測データ量として計算する(S1012)。
 以上により、本実施の形態4におけるデータ転送量予測部131が8画素×8画素以外のマクロブロック分割パターンの場合の予測データ量を計算する処理(図19のS616)は、終了する。
 以上のように、本実施の形態4における画像復号装置100によれば、参照画像のアドレスがアライメントされたアドレスではない場合、参照画像のアドレスをアライメントされたアドレスに補正して予測データ量を計算する。これにより、予測データ量をさらに正確に計算することができるため、並列に復号するブロックを適切に選択することができる。これにより、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 (実施の形態5)
 本実施の形態5では、ブロック決定部132は、外部メモリ110から読み出されるデータ量の変動が小さくなるように、予測データ量を用いて、並列に復号が行われるマクロブロックの数を変更することで、並列に復号が行われる符号化画像データの複数のマクロブロックを決定する。
 ここで、本実施の形態5では、図6に示されたブロック決定部132が並列復号するマクロブロックを決定する処理(図6のS114)が、実施の形態1と異なる処理であり、それ以外の処理は実施の形態1と同様であるため、当該処理(図6のS114)の詳細について、以下に説明する。
 図25は、本実施の形態5におけるブロック決定部132が並列復号するマクロブロックを決定する処理の一例を示すフローチャートである。
 まず、ブロック決定部132は、所定の数のマクロブロックの予測データ量の平均値を算出する(S1102)。ここで、所定の数のマクロブロックとは、ピクチャ内の全てのマクロブロックでもよいし、ブロック決定部132が既に復号順序を決定したマクロブロックでもよい。
 そして、ブロック決定部132は、並列に復号が行われる複数のマクロブロックの予測データ量の平均値が、所定の数のマクロブロックの予測データ量の平均値に近付くように、並列に復号するマクロブロックの数を決定する(S1104)。
 図26は、本実施の形態5におけるブロック決定部132が並列に復号するマクロブロックの数を決定することを説明する図である。
 同図に示すように、マクロブロックの復号順序は、同図に記載の順序で行い、基本的には、同図のマクロブロックに付けられた番号順に復号していく。つまり、1つ下の行の2列左側のマクロブロックを、3行単位で並列に復号処理していく。
 図2に記載の復号順序では、並列に復号できるマクロブロックがマクロブロック復号部の数よりも多くなることがあった。図26に記載の復号順序は、マクロブロック復号部が3つしかない点を考慮して、並列に復号するマクロブロック数を3つ以下になるようにしている。
 しかし、図26に記載の順序で復号する場合、並列に復号するマクロブロックが、多くのデータを外部メモリ110から取得しなければならないマクロブロックであった場合、その瞬間に多くのデータを転送しなければならない。
 そこで、この方法では、同じ番号が付いたマクロブロックを並列に復号するマクロブロックの候補として、まず、これらの復号候補マクロブロックの、予測転送データ量の総和を求める。
 求めた予測転送データ量が、予め定めた転送データ量よりも大きいかどうかを判定し、小さい場合は、これら3つの復号候補マクロブロックを復号する。しかし、大きい場合は、復号候補マクロブロックのうち、どれか1つを復号しないようにする。復号しないマクロブロックはどれを選んでも良いが、例えば、最も下の行に位置するマクロブロックは復号しないようにする。
 つまり、並列に復号するマクロブロックを2つまでに抑えることで、外部メモリ110から転送データ量を抑える。復号されなかったマクロブロックは、次のマクロブロックの復号タイミングで、復号候補マクロブロックに加えて、再び復号するかどうかの判定を行っていく。
 例えば、図26の6番の番号が付いた3つのマクロブロックが、復号候補マクロブロックであった場合を考える。まず、6番のマクロブロックの、予測転送データ量の総和を求め、所定の転送データ量よりも小さければ、この3つのマクロブロックを復号する。所定の転送データ量よりも大きい場合は、上から3行目にある6番のマクロブロックを除き、上から1行目と2行目にある6番のマクロブロックを復号するようにする。
 次に、1行目と2行目にある7番のマクロブロックと、先ほど復号されなかった、3行目の6番のマクロブロックとを復号候補マクロブロックとして、復号するマクロブロックを決定していく。
 なお、並列に復号するマクロブロックの数を2つに抑えても、求めた予測転送データ量が、予め定めた転送データ量よりも大きい場合は、さらに並列に復号するマクロブロックの数を減らしてもよい。
 このようにすることで、外部メモリ110の転送データ量が予め定めた転送データ量よりも大きくなることを防ぐことができる。また、これによって、外部メモリ110を、他の装置と共用していた場合に、本実施の形態5の画像復号装置がメモリのバンド幅を占有して、他の装置が外部メモリ110からデータを転送できないという状態を防ぐことができる。
 以上により、本実施の形態5におけるブロック決定部132が並列復号するマクロブロックを決定する処理(図6のS114)は、終了する。
 以上のように、本実施の形態5における画像復号装置100によれば、外部メモリ110から読み出されるデータ量の変動が小さくなるように、並列に復号が行われるマクロブロックの数を変更することで、並列に復号が行われる複数のマクロブロックを決定する。これにより、瞬間的にデータ転送量が増加しないように、マクロブロックの数を変更することができる。したがって、瞬間的なデータ転送量の増加を抑え、小さなメモリバンド幅で画像データの並列復号を行うことができる。
 (実施の形態6)
 上記実施の形態1では、マクロブロックの復号処理を行う前にマクロブロックの復号順序を決定したが、参照画像のデータ転送量の予測だけを予め行っておき、マクロブロックの並列復号を行いながら、復号順序を適応的に決定していっても良い。例えば、実施の形態1の画像復号装置100以外の他の装置も、外部メモリ110にアクセスするのであれば、当該他の装置が外部メモリ110にアクセスする時は、参照画像のデータ転送量が小さいマクロブロックを選んで復号する。こうすれば、画像復号装置100も他の装置も同時に動作させることができる。
 このように、本実施の形態6では、ブロック決定部132は、並列に復号が行われる複数のマクロブロックの予測データ量の合計値が、外部メモリ110から読み出されるデータ転送可能な最大データ量から他の装置がデータ転送を行うデータ量を差し引いたデータ量である差分データ量に近付くように、並列に復号が行われる複数のマクロブロックを決定する。
 つまり、ブロック決定部132は、当該差分データ量が大きい場合は、並列に復号が行われる複数のマクロブロックの予測データ量の合計値が大きくなるように、並列に復号が行われる複数のマクロブロックを決定する。
 また、ブロック決定部132は、当該差分データ量が小さい場合は、並列に復号が行われる複数のマクロブロックの予測データ量の合計値が小さくなるように、並列に復号が行われる複数のマクロブロックを決定する。
 図27は、本実施の形態6における他の装置200が画像復号装置100の外部メモリ110にアクセスする場合の機能構成を示すブロック図である。ここで、画像復号装置100は、図3で説明した実施の形態1における画像復号装置100と同じ構成であるため、詳細な説明は省略する。
 同図に示すように、他の装置200は、画像復号装置100の外部メモリ110にアクセスする、画像復号装置100とは異なる装置である。なお、他の装置200は、1つの装置であってもよいし、複数の装置であってもよい。
 また、他の装置200は、例えば、画像符号化ブロック、音声復号ブロック、音声符号化ブロック、プロセッサブロック、又はグラフィックアクセラレータなどである。なお、他の装置200は、画像復号装置100と外部メモリ110を共用するものであれば、どのような装置であってもよい。
 外部メモリ転送量制御部300は、他の装置200から、他の装置200と外部メモリ110との間のデータ転送量を受け取る。そして、外部メモリ転送量制御部300は、外部メモリ110が持つ最大転送性能(転送量)から、他の装置200のデータ転送量を差し引いたデータ転送量を、画像復号装置100の復号制御部130に通知する。
 復号制御部130は、予測データ量がこの通知されたデータ転送量に近付くように、マクロブロックを選択して復号処理を実施していく。
 次に、ブロック決定部132が並列復号するマクロブロックを決定する処理について、説明する。
 ここで、本実施の形態6では、図6に示されたブロック決定部132が並列復号するマクロブロックを決定する処理(図6のS114)が、実施の形態1と異なる処理であり、それ以外の処理は実施の形態1と同様であるため、当該処理(図6のS114)の詳細について、以下に説明する。
 図28は、本実施の形態6におけるブロック決定部132が並列復号するマクロブロックを決定する処理の一例を示すフローチャートである。
 同図に示すように、まず、外部メモリ転送量制御部300が、他の装置200から、他の装置200と外部メモリ110との間のデータ転送量を取得する(S1202)。
 そして、外部メモリ転送量制御部300は、外部メモリ110から読み出されるデータ転送可能な最大データ転送量から他の装置200のデータ転送量を差し引いた差分データ量を算出し(S1204)、ブロック決定部132に送信する。
 ブロック決定部132は、並列に復号が行われる複数のマクロブロックの予測データ量の合計値が、差分データ量に近付くように、並列に復号が行われる複数のマクロブロックを決定する(S1206)。具体的には、ブロック決定部132は、当該合計値が、差分データ量以下になるように、当該複数のマクロブロックを決定する。
 以上により、本実施の形態6におけるブロック決定部132が並列復号するマクロブロックを決定する処理(図6のS114)は、終了する。
 以上のように、本実施の形態6における画像復号装置100によれば、並列に復号が行われる複数のブロックの予測データ量の合計値が、差分データ量に近付くように、並列に復号が行われる複数のブロックを決定する。つまり、差分データ量が大きい場合は、並列に復号が行われる複数のブロックの予測データ量の合計値が大きくなるように、差分データ量が小さい場合は、並列に復号が行われる複数のブロックの予測データ量の合計値が小さくなるように、並列に復号が行われる複数のブロックを決定する。これにより、予め設定されたメモリバンド幅で画像データの並列復号を行うことができる。
 具体的には、他の装置200のデータ転送量が大きい時は、画像復号装置100のデータ転送量が小さくなるように制御するため、他の装置200の転送を妨げることがなく、画像復号装置100と同時に他の装置200を動作させても、他の装置200の処理を遅延させることなく、動作させることができる。
 また、他の装置200のデータ転送量が小さい時は、画像復号装置100のデータ転送量が大きくなるように制御するため、復号処理における参照画像の転送を高速に行うことができ、画像復号処理自体を高速化できる。
 なお、外部メモリ転送量制御部300が無く、復号制御部130と他の装置200とが直接通信するようにしてもよい。つまり、ブロック決定部132が、他の装置200から、他の装置200のデータ転送量を取得し、差分データ量を算出することにしてもよい。
 また、上記実施の形態1~6において、画像復号装置100は、構成要件の全部あるいはその一部を1つの集積回路上に実装してもよいし、1つの基板上に実装した複数の集積回路であってもよいし、ネットワークやバスを介して接続される独立した装置であっても構わない。
 図29は、画像復号装置100を制御する集積回路400の一例を示す図である。
 同図に示すように、集積回路400は、図3に示された画像復号装置100の外部メモリ110以外の機能を備えている。
 なお、集積回路400は、各処理部が個別に1チップ化されても良いし、一部又は全ての処理部を含むように1チップ化されても良い。
 また、集積回路400は、隣接MB情報メモリ180やデブロッキングフィルタ部を含まないことにしてもよい。つまり、集積回路400は、ストリームパーサ部120、データ転送量予測部131、ブロック決定部132、及びマクロブロック復号部140~160を備えていればよく、これらの構成により本発明の目的を達成することができる。
 ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。
 また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセッサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用しても良い。
 さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。
 以上、本発明に係る画像復号装置について、上記実施の形態を用いて説明したが、本発明は、これに限定されるものではない。
 例えば、上記実施の形態1~6では、3つのマクロブロック復号部を用いて並列にマクロブロックの復号を行ったが、マクロブロック復号部の個数は3個でなくてもよい。特許文献1には、3個以上のマクロブロック復号部を使って並列にマクロブロックを復号する方法が記載されており、この方法に従えば、3個以上のマクロブロック復号部を用いても復号することができる。また、ブロック決定部132は、マクロブロックの復号順序を決定する場合も、並列に復号するマクロブロックの、参照画像の予測転送データ量の平均値が、各マクロブロックの予測転送データ量の平均値となるべく近くなるように、マクロブロックを選択すればよい。このため、マクロブロック復号部の個数とは関係なく復号処理を行うことができる。
 また、上記実施の形態1~6では、ストリームパーサ部120が完全に可変長復号した復号ストリームを外部メモリ110に出力している。しかし、ストリームパーサ部120では、参照画像のデータ転送量の予測に必要なパラメータだけを復号さえできればよく、必ずしも完全に可変長復号した復号ストリームを出力する必要はない。例えば、ストリームパーサ部120では必要なパラメータの復号だけを行っておき、マクロブロックの並列復号を行うために必要な部分だけを復号した中間ストリームを外部メモリ110に出力する方法が考えられる。この場合、マクロブロック復号部140~160には、中間ストリームを復号するために可変長復号部を搭載させる必要がある。
 また、上記実施の形態1~6では、データ転送量予測部131がピクチャ内の全てのマクロブロックについて予測データ量を計算した後に、ブロック決定部132は、並列復号するマクロブロックを決定することとした。しかし、データ転送量予測部131が一部のマクロブロックの予測データ量を計算するごとに、ブロック決定部132は、並列復号するマクロブロックを決定することにしてもよい。
 また、上記実施の形態1~6では、データ転送量予測部131は、mb_typeから、復号対象のマクロブロックのマクロブロックタイプを取得することとした。しかし、データ転送量予測部131は、スライスヘッダに含まれるslice_typeから、復号対象のマクロブロックのマクロブロックタイプを取得することにしてもよい。この場合、正確ではないが、Iスライス、Pスライス、及びBスライスのマクロブロックは、それぞれIマクロブロックタイプ、Pマクロブロックタイプ、及びBマクロブロックタイプであるとして、復号対象のマクロブロックのマクロブロックタイプを取得することができる。
 また、上記実施の形態1~6では、復号制御部130のデータ転送量予測部131が予測データ量を計算することにしたが、ストリームパーサ部120が予測データ量を計算することにしてもよい。
 また、上記実施の形態1~6では、画像復号装置100は、外部メモリ110、ストリームパーサ部120、復号制御部130、マクロブロック復号部140~160、デブロッキングフィルタ部170、及び隣接MB情報メモリ180を備えており、復号制御部130は、データ転送量予測部131及びブロック決定部132を備えていることとした。しかし、デブロッキングフィルタ部170及び隣接MB情報メモリ180は、本発明の目的を達成するために必須の構成ではない。つまり、画像復号装置100は、外部メモリ110、ストリームパーサ部120、データ転送量予測部131、ブロック決定部132、及びマクロブロック復号部140~160を備えていればよく、これらの構成により本発明の目的を達成することができる。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。
 また、発明の趣旨を逸脱しない範囲で、上記複数の実施の形態における各構成要素を任意に組み合わせても良い。
 本発明にかかる画像復号装置は、高速に動画像データを復号することが可能な特徴を有する。このため、MPEG等の圧縮画像を扱うデジタルテレビ、DVDおよびBlu-ray Disc(登録商標)レコーダ等として有用である。また、放送局などの高速な処理が必要とされる機器の用途にも応用できる。
 100  画像復号装置
 110  外部メモリ
 120  ストリームパーサ部
 130  復号制御部
 131  データ転送量予測部
 132  ブロック決定部
 140、150、160 マクロブロック復号部
 141  逆量子化部
 142  逆直交変換部
 143  画面内予測部
 144  動き補償予測部
 145  加算回路
 170  デブロッキングフィルタ部
 180  隣接MB情報メモリ
 200  他の装置
 300  外部メモリ転送量制御部
 400  集積回路
 501  スタートコード
 502  SPSヘッダ
 503  PPSヘッダ
 504  スライスヘッダ
 505  スライスデータ

Claims (16)

  1.  所定の画素数のブロックごとに分割され符号化された符号化画像データの復号を、前記ブロックごとに行う画像復号装置であって、
     前記符号化画像データの復号が行われる際に参照される参照画像のデータを格納している記憶部と、
     前記ブロックごとに、前記符号化画像データの復号が行われる際に参照される前記参照画像の枚数を示す参照情報の復号を行うプリデコード部と、
     前記ブロックごとに、前記参照情報を用いて、前記符号化画像データの復号が行われる際に前記記憶部から読み出される前記参照画像の予測データ量を計算するデータ転送量予測部と、
     計算された前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定するブロック決定部と、
     決定された前記符号化画像データの複数のブロックを並列に復号する複数のブロック復号部と
     を備える画像復号装置。
  2.  前記プリデコード部は、前記符号化画像データに含まれる、前記ブロックであるマクロブロックのマクロブロックタイプ情報を前記参照情報として可変長復号し、
     前記データ転送量予測部は、前記マクロブロックタイプ情報で示される前記参照画像の枚数に当該参照画像のデータ量を乗じて、前記予測データ量を計算する
     請求項1に記載の画像復号装置。
  3.  前記ブロック復号部が前記符号化画像データの復号を行う際に、前記符号化画像データの各ブロックをさらに小さなブロックに分割した分割ブロックを単位とした前記参照画像を参照する場合、
     前記プリデコード部は、さらに、前記符号化画像データに含まれる、前記分割ブロックのサイズを示すブロック分割パターン情報の復号を行い、
     前記データ転送量予測部は、前記ブロック分割パターン情報で示されるサイズの前記分割ブロックごとに、さらに、整数画素位置の参照画像が参照される確率と小数画素位置の参照画像が参照される確率とを用いて、前記整数画素位置の参照画像のデータ量と前記小数画素位置の参照画像のデータ量とに重み付けを行うことで、前記予測データ量を計算する
     請求項1又は2に記載の画像復号装置。
  4.  前記データ転送量予測部は、前記分割ブロックごとに、
     水平位置及び垂直位置がともに整数画素位置である第1参照画像が参照される確率を第1確率とし、
     水平位置が小数画素位置であり垂直位置が整数画素位置である第2参照画像が参照される確率を第2確率とし、
     水平位置が整数画素位置であり垂直位置が小数画素位置である第3参照画像が参照される確率を第3確率とし、
     水平位置及び垂直位置がともに小数画素位置である第4参照画像が参照される確率を第4確率とし、
     前記第1参照画像、前記第2参照画像、前記第3参照画像及び前記第4参照画像のデータ量に、それぞれ前記第1確率、前記第2確率、前記第3確率及び前記第4確率を乗じて加算することで、前記予測データ量を計算する
     請求項3に記載の画像復号装置。
  5.  前記プリデコード部は、前記ブロックごとに、さらに、復号対象の前記ブロックの画像と参照画像との間の動き量を示す動き情報の復号を行い、
     前記データ転送量予測部は、前記ブロックごとに、さらに前記動き情報を用いて、前記予測データ量を計算する
     請求項1~3のいずれか1項に記載の画像復号装置。
  6.  前記データ転送量予測部は、前記動き情報が示す参照画像の位置が小数画素位置であるか否かを判断し、前記参照画像の位置が小数画素位置であると判断した場合、小数画素位置の参照画像のデータ量を前記予測データ量として計算する
     請求項5に記載の画像復号装置。
  7.  前記データ転送量予測部は、前記動き情報が示す参照画像のアドレスが、アライメントされたアドレスか否かを判断し、前記参照画像のアドレスがアライメントされたアドレスではないと判断した場合、前記参照画像のアドレスをアライメントされたアドレスに補正して前記予測データ量を計算する
     請求項5又は6に記載の画像復号装置。
  8.  前記ブロック決定部は、前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、前記符号化画像データのブロックの復号順序を入れ替えることで、並列に復号が行われる前記符号化画像データの複数のブロックを決定する
     請求項1~7のいずれか1項に記載の画像復号装置。
  9.  前記ブロック決定部は、前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データのブロック数を変更することで、並列に復号が行われる前記符号化画像データの複数のブロックを決定する
     請求項1~7のいずれか1項に記載の画像復号装置。
  10.  前記ブロック決定部は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の平均値が、所定の数のブロックの予測データ量の平均値に近付くように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する
     請求項8又は9に記載の画像復号装置。
  11.  前記ブロック決定部は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の合計値が、前記記憶部から読み出されるデータ転送可能な最大データ量から他の装置がデータ転送を行うデータ量を差し引いたデータ量である差分データ量に近付くように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する
     請求項8又は9に記載の画像復号装置。
  12.  前記ブロック決定部は、前記差分データ量が大きい場合は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の合計値が大きくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する
     請求項11に記載の画像復号装置。
  13.  前記ブロック決定部は、前記差分データ量が小さい場合は、並列に復号が行われる前記符号化画像データの複数のブロックの予測データ量の合計値が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定する
     請求項11に記載の画像復号装置。
  14.  所定の画素数のブロックごとに分割され符号化された符号化画像データの復号を、前記ブロックごとに行う画像復号方法であって、
     前記ブロックごとに、前記符号化画像データの復号が行われる際に参照される前記参照画像の枚数を示す参照情報の復号を行うプリデコードステップと、
     前記ブロックごとに、前記参照情報を用いて、前記符号化画像データの復号が行われる際に、前記符号化画像データの復号が行われる際に参照される参照画像のデータを格納している記憶部から読み出される前記参照画像の予測データ量を計算するデータ転送量予測ステップと、
     計算された前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定するブロック決定ステップと、
     決定された前記符号化画像データの複数のブロックを並列に復号する複数のブロック復号ステップと
     を含む画像復号方法。
  15.  所定の画素数のブロックごとに分割され符号化された符号化画像データの復号を、前記ブロックごとに行う画像復号装置を制御する集積回路であって、
     前記ブロックごとに、前記符号化画像データの復号が行われる際に参照される前記参照画像の枚数を示す参照情報の復号を行うプリデコード部と、
     前記ブロックごとに、前記参照情報を用いて、前記符号化画像データの復号が行われる際に、前記符号化画像データの復号が行われる際に参照される参照画像のデータを格納している記憶部から読み出される前記参照画像の予測データ量を計算するデータ転送量予測部と、
     計算された前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定するブロック決定部と、
     決定された前記符号化画像データの複数のブロックを並列に復号する複数のブロック復号部と
     を備える集積回路。
  16.  所定の画素数のブロックごとに分割され符号化された符号化画像データの復号を、前記ブロックごとに行うためのプログラムであって、
     前記ブロックごとに、前記符号化画像データの復号が行われる際に参照される前記参照画像の枚数を示す参照情報の復号を行うプリデコードステップと、
     前記ブロックごとに、前記参照情報を用いて、前記符号化画像データの復号が行われる際に、前記符号化画像データの復号が行われる際に参照される参照画像のデータを格納している記憶部から読み出される前記参照画像の予測データ量を計算するデータ転送量予測ステップと、
     計算された前記予測データ量を用いて、前記記憶部から読み出されるデータ量の変動が小さくなるように、並列に復号が行われる前記符号化画像データの複数のブロックを決定するブロック決定ステップと、
     決定された前記符号化画像データの複数のブロックを並列に復号する複数のブロック復号ステップと
     をコンピュータに実行させるプログラム。
PCT/JP2009/005476 2008-11-10 2009-10-20 画像復号装置、画像復号方法、集積回路及びプログラム WO2010052837A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010522111A JP5340289B2 (ja) 2008-11-10 2009-10-20 画像復号装置、画像復号方法、集積回路及びプログラム
CN2009801399815A CN102177715A (zh) 2008-11-10 2009-10-20 图像解码装置、图像解码方法、集成电路以及程序
US12/812,134 US8737476B2 (en) 2008-11-10 2009-10-20 Image decoding device, image decoding method, integrated circuit, and program for performing parallel decoding of coded image data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008-287320 2008-11-10
JP2008287320 2008-11-10

Publications (1)

Publication Number Publication Date
WO2010052837A1 true WO2010052837A1 (ja) 2010-05-14

Family

ID=42152650

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/005476 WO2010052837A1 (ja) 2008-11-10 2009-10-20 画像復号装置、画像復号方法、集積回路及びプログラム

Country Status (4)

Country Link
US (1) US8737476B2 (ja)
JP (1) JP5340289B2 (ja)
CN (1) CN102177715A (ja)
WO (1) WO2010052837A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012046366A1 (ja) * 2010-10-07 2012-04-12 パナソニック株式会社 画像再生方法、画像再生装置、画像再生プログラム、撮像システム、および再生システム
WO2019239931A1 (ja) * 2018-06-14 2019-12-19 ソニー株式会社 画像処理装置および方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102754437B (zh) * 2009-10-29 2015-03-18 松下电器(美国)知识产权公司 图像编码方法、图像编码装置及集成电路
US9877033B2 (en) * 2009-12-21 2018-01-23 Qualcomm Incorporated Temporal and spatial video block reordering in a decoder to improve cache hits
GB2477527B (en) 2010-02-04 2015-12-23 Advanced Risc Mach Ltd Parallel parsing in a video decoder
GB2488159B (en) * 2011-02-18 2017-08-16 Advanced Risc Mach Ltd Parallel video decoding
CN110198450B (zh) 2011-11-08 2021-12-31 韩国电子通信研究院 用于共享候选者列表的方法和装置
US20130188732A1 (en) * 2012-01-20 2013-07-25 Qualcomm Incorporated Multi-Threaded Texture Decoding
JP6080405B2 (ja) * 2012-06-29 2017-02-15 キヤノン株式会社 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
US10585874B2 (en) * 2016-04-25 2020-03-10 International Business Machines Corporation Locking concurrent commands in a database management system
JP6775558B2 (ja) * 2018-09-18 2020-10-28 キヤノン株式会社 画像伸長装置及びその制御方法及びプログラム
CN110930292B (zh) * 2018-09-19 2024-01-26 珠海金山办公软件有限公司 一种图像处理的方法、装置、计算机存储介质及终端
US11487544B2 (en) * 2020-01-15 2022-11-01 Western Digital Technologies, Inc. Method and device for simultaneously decoding data in parallel to improve quality of service

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU5632394A (en) * 1993-03-05 1994-09-08 Sony Corporation Apparatus and method for reproducing a prediction-encoded video signal
US5532744A (en) * 1994-08-22 1996-07-02 Philips Electronics North America Corporation Method and apparatus for decoding digital video using parallel processing
JP4453518B2 (ja) * 2004-10-29 2010-04-21 ソニー株式会社 符号化及び復号装置並びに符号化及び復号方法
KR20080094005A (ko) * 2006-01-10 2008-10-22 브라이트스케일, 인크. 병렬 프로세싱 시스템에서 멀티미디어 데이터의 서브블록들을 프로세싱하기 위한 방법 및 장치
JP2007318517A (ja) 2006-05-26 2007-12-06 Sony Corp 画像データの処理方法、画像データの処理方法のプログラム、画像データの処理方法のプログラムを記録した記録媒体及び画像データの処理装置
US8019002B2 (en) * 2006-06-08 2011-09-13 Qualcomm Incorporated Parallel batch decoding of video blocks
JP4254867B2 (ja) * 2007-01-31 2009-04-15 ソニー株式会社 情報処理装置および方法、プログラム、並びに記録媒体
RU2502213C2 (ru) * 2008-06-27 2013-12-20 Сони Корпорейшн Устройство обработки изображений и способ обработки изображений
JP5128389B2 (ja) * 2008-07-01 2013-01-23 株式会社日立国際電気 動画像符号化装置及び動画像符号化方法
KR101673186B1 (ko) * 2010-06-09 2016-11-07 삼성전자주식회사 매크로블록의 연관관계를 고려하여 영상 데이터의 부호화 및 복호화를 병렬 처리하는 장치 및 방법
KR101698797B1 (ko) * 2010-07-27 2017-01-23 삼성전자주식회사 영상 데이터를 분할하여 부호화 및 복호화를 병렬 처리하는 장치 및 상기 장치의 동작 방법

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Proc. of IEEE Int. Conf. on Multimedia and Expo, 2007.07.02", 2 July 2007, article CHONG, J. ET AL.: "Efficient Parallelization of H.264 Decoding with Macro Block Level Scheduling", pages: 1874 - 1877 *
YASUHIRO WATANABE ET AL.: "Keitai Kiki Muke Tei Shohidenryoku MPEG-4 ASP CODEC Macro", ITE TECHNICAL REPORT, vol. 29, no. 21, 11 March 2005 (2005-03-11), pages 29 - 32 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012046366A1 (ja) * 2010-10-07 2012-04-12 パナソニック株式会社 画像再生方法、画像再生装置、画像再生プログラム、撮像システム、および再生システム
JP2012085001A (ja) * 2010-10-07 2012-04-26 Panasonic Corp 画像再生方法、画像再生装置、画像再生プログラム、撮像システム、および再生システム
WO2019239931A1 (ja) * 2018-06-14 2019-12-19 ソニー株式会社 画像処理装置および方法

Also Published As

Publication number Publication date
JP5340289B2 (ja) 2013-11-13
JPWO2010052837A1 (ja) 2012-03-29
US20100284468A1 (en) 2010-11-11
CN102177715A (zh) 2011-09-07
US8737476B2 (en) 2014-05-27

Similar Documents

Publication Publication Date Title
JP5340289B2 (ja) 画像復号装置、画像復号方法、集積回路及びプログラム
US11070802B2 (en) Moving image coding device, moving image decoding device, moving image coding/decoding system, moving image coding method and moving image decoding method
US11647219B2 (en) Image encoding and decoding method with merge flag and motion vectors
JP5368631B2 (ja) 画像符号化方法、装置、及びプログラム
US20140105295A1 (en) Moving image encoding method and apparatus, and moving image decoding method and apparatus
JPH09154137A (ja) 動き依存予測を使用したビデオ情報の圧縮方法と装置
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
JP5479648B1 (ja) 画像符号化方法及び画像復号化方法
JP5444497B2 (ja) 画像符号化方法及び画像復号化方法
KR101841352B1 (ko) 참조 프레임 선택 방법 및 그 장치
JP2008289105A (ja) 画像処理装置およびそれを搭載した撮像装置
US20130170565A1 (en) Motion Estimation Complexity Reduction
US9838666B2 (en) Video decoding device and image display device
JP6609004B2 (ja) 画像符号化方法及び画像復号化方法
JP6608904B2 (ja) 動画像符号化装置及び方法
JP6370977B2 (ja) 画像符号化方法及び画像復号化方法
JP6514307B2 (ja) 動画像符号化装置及び方法
CN105933709B (zh) 运动图像编码方法、装置以及运动图像解码方法、装置
JP2020025308A (ja) 画像符号化方法及び画像復号化方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980139981.5

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2010522111

Country of ref document: JP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09824538

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 12812134

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09824538

Country of ref document: EP

Kind code of ref document: A1