WO2011121715A1 - Image decoding method - Google Patents

Image decoding method Download PDF

Info

Publication number
WO2011121715A1
WO2011121715A1 PCT/JP2010/055640 JP2010055640W WO2011121715A1 WO 2011121715 A1 WO2011121715 A1 WO 2011121715A1 JP 2010055640 W JP2010055640 W JP 2010055640W WO 2011121715 A1 WO2011121715 A1 WO 2011121715A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
data
blocks
pattern data
order
Prior art date
Application number
PCT/JP2010/055640
Other languages
French (fr)
Japanese (ja)
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
Application filed by 株式会社 東芝 filed Critical 株式会社 東芝
Priority to PCT/JP2010/055640 priority Critical patent/WO2011121715A1/en
Priority to JP2012508020A priority patent/JPWO2011121843A1/en
Priority to CN2010800376170A priority patent/CN102484716A/en
Priority to PCT/JP2010/071155 priority patent/WO2011121843A1/en
Priority to KR1020127004738A priority patent/KR20120043014A/en
Publication of WO2011121715A1 publication Critical patent/WO2011121715A1/en

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to a method for decoding an image stored on a disk, for example, an image decoding method for receiving and reproducing an image by broadcasting or streaming.
  • H.264 (for example, Non-Patent Document 1) is known.
  • H. H.264 is a standard that defines a decoding method.
  • H. In H.264 a residual (prediction error) in intra-frame and inter-frame prediction is converted by a predetermined orthogonal transform, and the transform coefficient is quantized and encoded.
  • the size of the orthogonal transform either a 4 ⁇ 4 pixel block or an 8 ⁇ 8 pixel block is used depending on the encoding mode.
  • the coefficient of the orthogonal transform often becomes zero due to quantization. So H.
  • a 1-bit flag indicating whether all transform coefficients are zero is encoded, and when all transform coefficients are zero, encoding of transform coefficients is skipped. .
  • This flag indicates that all coefficients are zero if the value is 0, and that there is at least one non-zero coefficient if the value is 1.
  • CBF coded block block flag
  • CBP coded block pattern
  • CBP is encoded for a block of 16 ⁇ 16 pixels
  • this CBP is composed of four 8 ⁇ 8 pixel luminance signal (Luminance) blocks and all two color difference signal (Chrominance) blocks corresponding to the block of 16 ⁇ 16 pixels. Represents whether or not the conversion coefficient is zero.
  • information (CBP and CBF) indicating whether or not the transform coefficient is 0 is hierarchically encoded.
  • ITU-T Telecommunication Standardization-Sector-International-Telecommunication Union
  • Recommendation-H.264 -"Advanced-video-coding-for-generic-audiovisual-services",-2007.-(p.95-p.96-"coded_block_pattern", "p.101-” coded_block_flag "
  • An object of the present invention is to provide an image decoding method for decoding when data compressed by an encoding unit that eliminates redundancy in encoding of hierarchical CBP, CBF, and skip flag is given. That is.
  • the image decoding method of the present invention includes prediction information in units of blocks, coded pattern data indicating the presence or absence of a prediction residual signal in units of blocks, and prediction residual signals in units of blocks.
  • the information included in the bitstream is lower-order code pattern data that is code pattern data belonging to the higher-order code pattern data, and the combination of the already acquired higher-order code pattern data and the lower-order code pattern data is a specific combination.
  • a predetermined code as lower-order code pattern data in the case of a combination, a step of decoding the bitstream and obtaining the next lower-order code pattern data when not in the specific combination, and a block unit by the codet pattern data Determining whether or not there is a prediction residual signal in step B, and if the information included in the bit stream is prediction information in units of blocks, decoding the bit stream to obtain prediction information in units of blocks; When the information included in the bitstream is a prediction residual signal in units of blocks, decoding the bitstream to obtain a prediction residual signal in units of blocks; prediction information in units of blocks; And using the prediction residual signal in block units Characterized by comprising the steps of decoding an image signal.
  • an image decoding method for decoding when data compressed by an encoding unit that eliminates redundancy in encoding of hierarchical CBP, CBF, and skip flag is given. be able to.
  • FIG. 6 is a block diagram of an encoding device that performs the operation of FIG. 5.
  • movement of FIG. The figure which shows an example of the decoding method of hierarchical CBP of this Embodiment.
  • the figure which shows another example of FIG. The figure which shows an example of the decoding method which reversed the conditional branch of FIG.
  • H An encoding means for generating data that can be decoded by H.264 will be briefly described.
  • This encoding means for example, as shown in FIG. 1, is an integer-precision orthogonal transform that is an approximation of intra-frame prediction (Intra prediction), inter-frame prediction (Inter prediction), or discrete cosine transform (DCT).
  • Intra prediction intra-frame prediction
  • Inter prediction inter-frame prediction
  • DCT discrete cosine transform
  • CABAC Context-based Adaptive Binary Arithmetic Code
  • CAVLC variable length coding
  • the image decoding method of the present embodiment aims to decode such compressed data.
  • the upper skip flag is 0, encoding is performed while avoiding the assignment of codes to redundant combinations in which the lower skip flags are all 1.
  • the image decoding method according to the present embodiment decodes such compressed data.
  • coded pattern data (Reduce redundancy of hierarchical CBP, encoder)
  • coded pattern data data that summarizes flags for a plurality of 8 ⁇ 8 pixel or 16 ⁇ 16 pixel blocks corresponds to CBP, and a flag for one 4 ⁇ 4 pixel block corresponds to CBF.
  • the coded pattern data corresponding to the upper one block is called upper_flag
  • the i-th lower coded pattern data belonging to the upper one block is called lower_flags [i].
  • upper_flag and lower_flags [i] are 1 bit in CodedBlockPatternLuma and the remaining of the i-th 4 ⁇ 4 pixel block, respectively.
  • coded_block_flag for the difference signal corresponds to coded_block_flag for the difference signal.
  • MPEG-1 / 2/4 compressed video decoding standard and H.264 In the decoding process defined in many standards such as H.264, the image is divided in units of blocks, and then the decoding process is performed in units of blocks. Therefore, in the following description, an example of a process of encoding (encoding) in units of blocks and an example of a process of decoding (decoding) in units of blocks will be described.
  • the processing of the entire screen can be performed by repeating the processing for each block by the number of divided blocks.
  • a means for improving the compression ratio by reducing the amount of code corresponding to a specific pattern is provided, and generated by such means.
  • Decoded bitstream is decoded.
  • a specific example of a specific pattern (when the lower order is 4 bits) is shown in FIG. 2, and an example of simple hierarchical code pattern data corresponding to FIG. 2 (when the lower order is 4 bits) is shown in FIG. 3 is used in H.264 of Non-Patent Document 1).
  • the low-order code pattern data is 4 bits. However, it is not particularly required to be 4 bits. For example, 2 bits shown in FIG. 4 may be used. In the case of 2 bits, if it is found that the upper code pattern data is 1 and the first 1 bit is 0 in the 2-bit lower code pattern, the last 1 bit may be 1. Recognize. Therefore, in this case as well, there is a case where it is not necessary to encode one bit in encoding and it is not necessary to decode one bit in decoding encoded data.
  • FIG. 5 shows a flowchart showing the process of encoding CBP in block units
  • FIG. 6 shows an example of an apparatus used for encoding.
  • the coding pattern data can be encoded by the following method, for example. In the following description, step 3 and step 11 which are encoding of portions other than the codet pattern data will be described.
  • Step 1 The image input unit 601 reads an image block.
  • the block to be read here is typically assumed to have the same size or larger size (for example, 16 ⁇ 16 pixels) than the block corresponding to the higher-order code pattern data in step 5.
  • Step 2 The calculation unit 602 reads from the program memory 605 the prediction mode to be encoded for the block read in S501.
  • the prediction mode may be determined in advance, or the best mode may be selected by performing step S503 and subsequent steps in each of a plurality of prediction modes. There are many other variations for setting the prediction mode.
  • Step 3 The arithmetic unit 602 encodes the prediction mode, and the encoded data output unit 604 outputs it to the bit stream.
  • Step 4. The arithmetic unit 602 performs block prediction using the prediction mode and data that has already been decoded, and obtains a prediction residual that is the difference between the input image block and the predicted image block.
  • Step 5 The arithmetic unit 602 performs block transform (for example, KLT base generated by training data in advance or orthogonal transform using DCT base) and quantization on the prediction residual.
  • block transform for example, KLT base generated by training data in advance or orthogonal transform using DCT base
  • the arithmetic unit 602 calculates information representing whether or not non-zero coefficients exist in the quantized transform coefficients in units of blocks.
  • this information is 1-bit flag information for each block, which is 1 when a non-zero coefficient exists in the block and 0 when all the coefficients in the block are 0. This information is referred to as lower-order code pattern data (lower-order CBP or CBF).
  • higher-order code pattern data which is code pattern data for a larger block, represents information indicating whether or not a set of lower-order code pattern data (for example, four lower-order code pattern data) is all zero.
  • the high-order code pattern data is 1 bit for each block, 0 if the low-order code pattern data is all 0, and 1 if there is any non-zero information in the low-order code pattern data. It becomes flag information.
  • the size of the block corresponding to the high-order code pattern data is larger than the low-order code pattern data (for example, 8 ⁇ 8 pixels).
  • Step 6 The arithmetic unit 602 encodes the high-order code pattern data, and the encoded data output unit 604 outputs it to the bit stream.
  • Step 7. The arithmetic unit 602 skips Steps 8 to 10 if the higher-order code pattern data is 0, and executes Step 8 if not.
  • Step 8 to 10 are processes in which the lower code pattern data is encoded bit by bit.
  • the arithmetic unit 602 is a case where the already encoded lower-order code pattern data is specific pattern data (typically, the last one-bit lower-order code pattern data is encoded, and If all the encoded lower-order code pattern data is 0), step 9 for outputting to the next bit stream is skipped; otherwise, step 9 is executed.
  • Step 9 the arithmetic unit 602 encodes lower-order code pattern data to be encoded, and the encoded data output unit 604 outputs it to the bit stream.
  • Step 10 The arithmetic unit 602 proceeds to step 11 if all the lower-order code pattern data have been encoded, and returns to step 8 if not.
  • the number of times of rotation is determined according to the number of bits.
  • Step 11 The encoded data output unit 604 encodes the quantized transform coefficient for a block having non-zero coded pattern data, and outputs the result to a bit stream.
  • step 3 may be prior to S501 and S502.
  • the encoder can improve the compression rate by, for example, repeatedly trying steps 2 to 11 while switching the prediction mode to be encoded and then selecting a prediction mode with good encoding efficiency.
  • repetition is not essential, and the prediction mode may be determined based on another criterion.
  • the encoding apparatus includes an image input unit 601, an arithmetic unit 602, a data memory 603, an encoded data output unit 604, and a program memory 605.
  • the image input unit 601 reads an image block.
  • the arithmetic unit 602 encodes the image block read by the image input unit 601 with reference to the data memory 603 and the program memory 605.
  • the data memory 603 is a temporary storage device, and temporarily stores, for example, a frame before the currently processed frame.
  • the data memory 603 is a RAM, for example.
  • the program memory 605 stores a program for encoding.
  • the program memory 605 is, for example, a ROM or a RAM.
  • the encoded data output unit 604 outputs the encoded data to a bit stream.
  • FIG. 7 shows an example of a flowchart of a method for decoding the bit stream generated by the above method (decoding of CBP in units of blocks), and FIG. 8 shows an example of an apparatus for executing the decoding.
  • the decoding of the coded pattern data can be performed by, for example, the following steps 1 to 10.
  • Step 1 The encoded data input unit 801 inputs a bit stream as input data.
  • the bit stream includes prediction information in units of blocks, coded pattern data indicating the presence / absence of a prediction residual signal in units of blocks, and image data obtained by entropy encoding the prediction residual signal in units of blocks.
  • Step 2 the arithmetic unit 802 determines whether the data to be acquired is higher-order code pattern data (for example, higher-order CBP), and if it is determined that the data is higher-order code pattern data, step S702 If not, jump to step 4.
  • higher-order code pattern data for example, higher-order CBP
  • Step 3 The arithmetic unit 802 obtains higher-order code pattern data by entropy decoding. Jump to step 9.
  • Step 4. the arithmetic unit 802 determines whether the data to be acquired is low-order code pattern data (for example, low-order CBP or low-order CBF) that is code pattern data belonging to the high-order code pattern data. If it is determined that the code pattern data is lower order, the process jumps to step 6; otherwise, the process jumps to step 5.
  • low-order code pattern data for example, low-order CBP or low-order CBF
  • Step 5 the data to be acquired by the arithmetic unit 802 (other than the coded pattern data) is acquired and the process jumps to Step 9.
  • Step 6 The arithmetic unit 802 determines whether the already acquired lower-order code pattern data is a predetermined pattern. If it is a predetermined pattern, the operation unit 802 jumps to step 7, otherwise. Jump to step 8.
  • the predetermined pattern is that the lower-order code pattern data is 4 bits, and the lower-order code pattern data has already been acquired in 3 bits, and the next data to be acquired is It is the 4th bit code pattern data, and indicates the pattern in which 3 bits already acquired is 000.
  • Step 7 the arithmetic unit 802 sets a predetermined fixed value as lower-order code pattern data to be acquired, and jumps to step 9 after the setting. For example, in the example of FIG. 2, 1 is set as the fourth bit code pattern data to be acquired next.
  • Step 9 The arithmetic unit 802 determines whether or not the acquisition of the block information has been completed. If the acquisition has been completed, the process jumps to Step 10, and if not, the process jumps to Step 2.
  • Block information indicates decoded prediction information in units of blocks and prediction residual signals in units of blocks. That is, although not explicitly shown in this flow, when the information included in the bitstream is prediction information in units of blocks, there is a step of decoding the bitstream to obtain prediction information in units of blocks, which is included in the bitstream. If the information to be received is a prediction residual signal in units of blocks, there is a step of obtaining a prediction residual signal in units of blocks by decoding the bit stream.
  • Step 10 The arithmetic unit 802 restores the block image signal based on the acquired block information, and the image output unit 804 outputs the restored image.
  • the decoding apparatus includes an encoded data input unit 801, an arithmetic unit 802, a data memory 803, an image output unit 804, and a program memory 805.
  • the encoded data input unit 801 inputs a bit stream as input data.
  • the arithmetic unit 802 decodes the blocks included in the bit stream input by the encoded data input unit 801 with reference to the data memory 603 and the program memory 605 while determining the block breaks.
  • the data memory 803 is a temporary storage device, and temporarily stores, for example, the bit stream input by the encoded data input unit 801.
  • the program memory 805 stores a program for decoding and stores, for example, a program corresponding to the pseudo program shown in FIG. 9 or FIG.
  • FIG. 9 shows an example of the syntax of the decoding method when the lower-order code pattern data is a 4-bit hierarchical CBP.
  • FIG. 9 shows the decoding method when the lower-order code pattern data is a num_lower_blocks-bit hierarchical CBP.
  • An example of the syntax is shown in FIG. 9 and 10, a line indicated as ae (v) indicates that 1-bit information is acquired by entropy decoding (for example, CABAC), and a line that does not indicate that the line is executed.
  • “(Upper_flag is ready decoded)” indicates that the upper-level code pattern data has already been acquired as upper_flag.
  • “(Other decoding processes, optional)” indicates that if other syntax processing is necessary, the syntax processing is executed.
  • the conditional branch determination for determining whether the coded pattern data is a specific combination can be reversed. An example in which the conditional branch determination in FIG. 9 is reversed is shown in FIG. The same applies to other figures.
  • coded_block_flag that is coded pattern data corresponding to a block of 4 ⁇ 4 pixels is the first coded_block_flag, and when the first coded_block_flag is non-zero, the first conversion coefficient, the second coded_block_flag, and the second coded_block are In the case of non-zero, the second transform coefficient is decoded together with the transform coefficient.
  • the syntax is as shown in FIG. It can be expressed as follows.
  • FIG. 12 shows an example of a method for decoding a CBF of a 4 ⁇ 4 pixel block when the CBP corresponding to the block of 8 ⁇ 8 pixels is non-zero.
  • an argument blockIndex represents an index when a 4 ⁇ 4 pixel block being processed has a leading block of 0 in an 8 ⁇ 8 pixel block including the block, and (decode residual coefficients coeffLevel [i]) represents a conversion coefficient. It represents decoding. Also, before decoding the first 4 ⁇ 4 pixel block, 0 is set to nonzero_coded_block_flag_found. Since there are four 4 ⁇ 4 pixel blocks constituting an 8 ⁇ 8 pixel block, when blockIndex is 3 and other coded_block_flag is 0, coded_block_flag can be set to 1 without decoding. Otherwise, the coded_block_flag needs to be decoded. Although not included in FIG.
  • the size of a block (macroblock) having higher-order code pattern data is 16 ⁇ 16 pixels.
  • an extension of expanding the macroblock size to 32 ⁇ 32 pixels or 64 ⁇ 64 pixels is also conceivable.
  • This is called an extended macroblock.
  • the extended macroblock for example, there are four 16 ⁇ 16 pixel blocks constituting the extended macroblock of 32 ⁇ 32 pixels if only the luminance block is considered, and if there are four luminance blocks and Cb and Cr color difference blocks, there are 12 blocks. Will do. CBP is often 0, and it is desirable to avoid coding 12 flags of 0.
  • coded_block_pattern_32 is 1-bit flag information. If a level 2 extended macroblock of 64 ⁇ 64 pixels is considered as a larger extended macroblock, coded_block_pattern_32 which is a 32 ⁇ 32 pixel CBP constituting the level 2 extended macroblock is all 0, or one or more non-zero bits are set. It is conceivable to encode whether the CBP is possessed.
  • coded pattern data for an extended macroblock of 64 ⁇ 64 pixels is called coded_block_pattern_64, and the four 32 ⁇ 32 pixel blocks constituting the 64 ⁇ 64 pixel block are indexed and coded_block_pattern_32 [0] to coded_block_pattern_32 [3]. ].
  • FIG. 13 shows an example of the flow of processing for decoding coded_block_pattern_64 and coded_block_pattern_32
  • FIG. 14 shows another example. Both figures show an example of a method of decoding a hierarchical CBP in which the size of the upper block is 64 ⁇ 64 pixels, the size of the lower block is 32 ⁇ 32 pixels, and the lower block is 4 bits.
  • FIG. 13 illustrates an example of decoding data in which coded_block_pattern_64 and coded_block_pattern_32 are encoded. In FIG. 13, first, coded_block_pattern_64 is decoded, and when it is not 0, each element of coded_block_pattern_32 is decoded.
  • coded_block_pattern_32 [3] is decoded if at least one of coded_block_pattern_32 [0] to coded_block_pattern_32 [2] is non-zero, but coded_block_pattern_32 [0] to all of coded_block_block_patter_block_patt_p32_patt_patch_block0_32_32_3 In this case, coded_block_pattern_32 [3] is set to 1.
  • FIG. 14 shows an example in which coded_block_pattern_64 and coded_block_pattern_32 in FIG. 13 are expressed as different functions. In FIG.
  • macroblock_cluster_residual_64x64 is a function for decoding a residual of a level 2 extended macroblock of 64x64 pixels
  • macroblock_cluster_residual_32x32 is a function for decoding a residual of an extended macroblock of 32x32 pixels.
  • FIG. 15 shows an example of a syntax for obtaining cbp for 4 ⁇ 4, 8 ⁇ 8, 16 ⁇ 8, 8 ⁇ 16, and 16 ⁇ 16 conversion when a 1-bit luminance CBP for a 16 ⁇ 16 pixel block is given.
  • cur_transform_type when cur_transform_type is 0 or 1, reading corresponding to FIG. 2 is performed, and when cur_transform_type is 2 and the conversion size is 16 ⁇ 8/8 ⁇ 16, reading corresponding to FIG. 4 is performed.
  • cur_transform_type is 2 and the transform size is 16x16
  • the present invention can be used by using the given CBP as it is.
  • “cbp_luma — 1 bit” represents 1-bit luminance CBP
  • “MbPartWidth (mb_type)” and “MbPartHeight (mb_type)” represent prediction block sizes
  • cbp represents 16 ⁇ 16 luminance blocks in four 8 ⁇ 8 blocks.
  • cbp When divided, 4 bits of cbp corresponding to each 8 ⁇ 8 luminance block are represented.
  • cbp is set to 4 bits in accordance with the 8 ⁇ 8 block.
  • the skip mode is a mode in which there is no prediction residual of the direct mode.
  • H.264 it is possible to encode a direct mode in which no prediction residual exists, but in such a case, it is encoded in the skip mode, and it is interpreted that there is always a prediction residual in the direct mode at the time of decoding. It can be seen that the direct mode without the prediction residual is a redundant mode. Therefore, when decoding the hierarchical coded block data in the extended macroblock, only the coded block data having the same size as the block coded as the direct mode is acquired without entropy decoding. A fixed value (1) representing the presence of the prediction residual can be set.
  • a predetermined value is set without decoding higher-order code pattern data from the bitstream.
  • the prediction residual Presence / absence of existence is unknown, and it is necessary to encode and decode the coded block data.
  • the explanation so far has described means for reducing the waste of code block data. With the same means, redundant information can be reduced for the skip flag indicating the skip mode.
  • the skip mode is a flag that becomes 1 when the block is skipped and 0 when it is not.
  • FIG. 16 an example of a simple hierarchical skip flag. This is a table obtained by logically inverting the examples of CBP and CBF described so far. It is redundant for the same reason that the coded block data is redundant. Therefore, as shown in FIG.
  • the upper skip flag is 0 and the lower skip is performed. If the first, second, and third skip flags among the flags are 1, a fixed value of 0 can be used without encoding and decoding the fourth lower skip flag.
  • FIG. 20 shows the flow of a method for encoding a hierarchical skip flag. Encoding is performed in the following flow.
  • Step 1 The image input unit 601 reads an image block.
  • Step 2 The calculation unit 602 reads from the program memory 605 the prediction mode to be encoded for the block read in S501.
  • the prediction mode includes information on a skip flag (Skip).
  • the prediction mode may be determined in advance, or the best mode may be selected by performing step S503 and subsequent steps in each of a plurality of prediction modes. There are many other variations for setting the prediction mode.
  • Step 3 The arithmetic unit 602 encodes the upper skip flag, and the encoded data output unit 604 outputs it to the bit stream.
  • Step 4 This step executes the next conditional branch. If the upper skip flag is 1, the arithmetic unit 602 skips steps 5 to 9. Otherwise, step 5 is executed.
  • Step 5 The arithmetic unit 602 encodes an upper prediction mode other than the skip flag, and outputs the encoded prediction mode from the encoded data output unit 604 to a bit stream.
  • Step 6 to 8 are processes for encoding one bit of the lower skip flags.
  • the next conditional branch is executed.
  • the arithmetic unit 602 uses the encoding of the low-order skip flag that has already been encoded as the specific pattern data (typically, the encoding of the low-order skip flag of the last 1 bit and the encoding If all the skipped lower flags are 1), step 7 to be output to the next bit stream is skipped; otherwise, step 7 is executed.
  • Step 7 The arithmetic unit 602 encodes the low-order skip flag to be encoded, and outputs it from the encoded data output unit 604 to the bit stream.
  • Step 8. The arithmetic unit 602 encodes a lower prediction mode other than the skip flag, and outputs it from the encoded data output unit 604 to a bit stream. Also, if there is residual information, the arithmetic unit 602 encodes the residual information and outputs it from the encoded data output unit 604 to a bit stream.
  • Step 9 If all the lower blocks (including the lower skip flag) have been encoded, the arithmetic unit 602 ends the block encoding. Otherwise, go back to step 6 to encode the next lower block.
  • the number of turns depends on the number of lower-order blocks belonging to the higher-order block. For example, if the lower-order block is divided into four, it is turned only four times.
  • the encoder for example, can improve the compression rate by repeatedly selecting the prediction mode with good encoding efficiency after repeatedly trying steps 2 to 9 while switching the prediction mode to be encoded.
  • the prediction mode may be determined based on another criterion.
  • FIG. 18 shows an example of the decoding flow of the block-by-block skip flag corresponding to FIG.
  • the flow in FIG. 18 differs from FIG. 7 in that the CBP in S702 to S708 is replaced with a skip flag in S1802 to S1808 (indicated as skip in FIG. 18).
  • the corresponding syntax is, for example, as shown in FIG. FIG. 19 is an example of flag reduction using this embodiment for hierarchical skip flags.
  • the instructions shown in the processing procedure shown in the above-described embodiment can be executed based on a program that is software.
  • a general-purpose computer system stores this program in advance and reads this program, so that it is possible to obtain the same effects as those obtained by the image decoding method and the image encoding method of the above-described embodiment.
  • the instructions described in the above-described embodiments are, as programs that can be executed by a computer, magnetic disks (flexible disks, hard disks, etc.), optical disks (CD-ROM, CD-R, CD-RW, DVD-ROM, DVD). ⁇ R, DVD ⁇ RW, etc.), semiconductor memory, or a similar recording medium.
  • the storage format may be any form. If the computer reads the program from the recording medium and causes the CPU to execute instructions described in the program based on the program, the computer performs the same operation as the image decoding method and the image encoding method of the above-described embodiment. Can be realized. Of course, when the computer acquires or reads the program, it may be acquired or read through a network.
  • the OS operating system
  • database management software database management software
  • MW middleware
  • the storage medium in the present invention is not limited to a medium independent of a computer or an embedded system, but also includes a storage medium in which a program transmitted via a LAN or the Internet is downloaded and stored or temporarily stored.
  • the number of storage media is not limited to one, and the processing in the present embodiment is executed from a plurality of media, and the configuration of the media is included in the storage media in the present invention.
  • the computer or the embedded system in the present invention is for executing each process in the present embodiment based on a program stored in a storage medium, and includes a single device such as a personal computer or a microcomputer, Any configuration such as a system in which apparatuses are connected to a network may be used.
  • the computer in the embodiment of the present invention is not limited to a personal computer, but includes an arithmetic processing device, a microcomputer, and the like included in an information processing device, and a device capable of realizing the functions in the embodiment of the present invention by a program, The device is a general term.
  • the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying constituent elements without departing from the scope of the invention in the implementation stage.
  • various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment.
  • constituent elements over different embodiments may be appropriately combined.
  • 601 Image input unit, 602, 802 ... Arithmetic unit, 603, 803 ... Data memory, 604 ... Encoded data output unit, 605, 805 ... Program memory, 801 ... Encoded data input unit, 804 ... Image output unit .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

Involving a first step for inputting coded data that includes (1) a top coded pattern data indicating whether a prediction residual signal is present within a top block comprising from the 1st to the Nth (N>1) bottom blocks, (2) a bottom coded pattern data indicating whether a prediction residual signal is present in each of the 1st to N-1th aforementioned bottom blocks, and (3) the prediction residual signal of the aforementioned bottom block units; a second step for setting a predetermined value as the top coded pattern data of the Nth bottom block in cases in which the value of the abovementioned top coded pattern data is a value indicating that a prediction residual signal is present within the aforementioned top block and in which the values of the aforementioned bottom coded pattern data for the aforementioned 1st to N-1th bottom blocks are a specific combination; and a third step for acquiring a decoded image from the prediction residual signal in the aforementioned coded data for blocks from among the aforementioned first to Nth bottom blocks in which a prediction residual signal is present, in accordance with the aforementioned bottom coded pattern data.

Description

画像復号化方法Image decoding method
 本発明は、例えば、ディスクに保存された画像の復号化方法、例えば、放送やストリーミングにより画像を受信再生する画像復号化方法に関する。 The present invention relates to a method for decoding an image stored on a disk, for example, an image decoding method for receiving and reproducing an image by broadcasting or streaming.
 動画像の符号化技術の1つとしてH.264(例えば非特許文献1)が知られている。H.264は復号化(デコード)の方法を定めた規格である。H.264では、フレーム内およびフレーム間予測の残差(予測誤差)は予め定められた直交変換により変換し、その変換係数を量子化したうえで符号化する。直交変換のサイズは符号化モードにより4x4画素ブロック、8x8画素ブロックの2種類のいずれかが使用される。直交変換の係数は、量子化によりゼロになることが多い。そこでH.264では、符号量を減らすために、すべての変換係数がゼロであるかを表す1ビットのフラグが符号化され、すべての変換係数がゼロである場合には変換係数の符号化がスキップされる。このフラグは、値が0の場合にはすべての係数がゼロであることを表し、値が1の場合には少なくとも1つの非ゼロの係数があることを表す。 H. One of the video encoding technologies is H.264. H.264 (for example, Non-Patent Document 1) is known. H. H.264 is a standard that defines a decoding method. H. In H.264, a residual (prediction error) in intra-frame and inter-frame prediction is converted by a predetermined orthogonal transform, and the transform coefficient is quantized and encoded. As the size of the orthogonal transform, either a 4 × 4 pixel block or an 8 × 8 pixel block is used depending on the encoding mode. The coefficient of the orthogonal transform often becomes zero due to quantization. So H. In H.264, in order to reduce the code amount, a 1-bit flag indicating whether all transform coefficients are zero is encoded, and when all transform coefficients are zero, encoding of transform coefficients is skipped. . This flag indicates that all coefficients are zero if the value is 0, and that there is at least one non-zero coefficient if the value is 1.
 H.264では、4x4画素ブロック内の変換数に対するフラグはCBF(coded block flag)と呼ばれ、8x8画素以上のブロックに対するフラグはCBP(coded block pattern)と呼ばれる。CBFについては、符号化モードにより、すべての変換係数がゼロであるか否かを表す場合と、変換係数の最初の変換係数(DC成分)以外の係数がすべてゼロであるか否かを表す場合がある。また、4つの4x4画素ブロックは8x8画素のブロックが分割されたものとして扱われ、4つの4x4画素ブロックの変換係数がすべて0である場合には、8x8画素のブロックに対するフラグ(CBP)は0に設定される。また、16x16画素のブロックに対してもCBPは符号化され、このCBPは、4つの8x8画素の輝度信号(Luminance)ブロック、その16x16画素のブロックに対応する2つの色差信号(Chrominance)ブロックのすべての変換係数がゼロであるか否かを表す。これらのことからわかるように、変換係数が0であるか否かという情報(CBPおよびCBF)は階層的に符号化されている。 H. In H.264, a flag for the number of conversions in a 4 × 4 pixel block is called CBF (coded block block flag), and a flag for a block of 8 × 8 pixels or more is called a CBP (coded block pattern). For CBF, depending on the encoding mode, whether all transform coefficients are zero or not, and whether all coefficients other than the first transform coefficient (DC component) of the transform coefficient are zero There is. Also, four 4x4 pixel blocks are treated as if an 8x8 pixel block was divided, and when the conversion coefficients of the four 4x4 pixel blocks are all 0, the flag (CBP) for the 8x8 pixel block is 0. Is set. Also, CBP is encoded for a block of 16 × 16 pixels, and this CBP is composed of four 8 × 8 pixel luminance signal (Luminance) blocks and all two color difference signal (Chrominance) blocks corresponding to the block of 16 × 16 pixels. Represents whether or not the conversion coefficient is zero. As can be seen from these, information (CBP and CBF) indicating whether or not the transform coefficient is 0 is hierarchically encoded.
 符号化モードの中には、CBPおよびCBFの符号化において、CBPが0であるなら必ずCBFも0であるというモードが存在する。H.264では、これらの符号化モードにおいても、CBPが1、すべてのCBFが0という情報を符号化できる。このようなCBPとCBFの組み合わせに符号を割り当てることは冗長である。この冗長性を排除すれば、圧縮率を向上できる。 Among the coding modes, there is a mode in which CBF is always 0 when CBP is 0 in encoding of CBP and CBF. H. In H.264, even in these encoding modes, information that CBP is 1 and all CBFs are 0 can be encoded. It is redundant to assign a code to such a combination of CBP and CBF. If this redundancy is eliminated, the compression rate can be improved.
 なお、H.264におけるCBFとCBPの符号化でなくても、CBPを階層的に符号化する場合には同様の冗長性が生じる。また、H.264のインター予測ではスキップ予測であるか否かをあらわすモード情報を1ビットで符号化する。今後のH.264の拡張を考えると、このスキップフラグを階層的に符号化する場合についても同様の冗長性が生じると考えられる。階層的なスキップフラグの符号化における冗長性については、H.264におけるCBPおよびCBFの冗長性に対する本発明の解決手段と同じ手段で解決できる。 H. Even when the CBF and CBP are not encoded in H.264, the same redundancy occurs when the CBP is encoded hierarchically. H. In the H.264 inter prediction, mode information indicating whether or not the skip prediction is performed is encoded by 1 bit. Future H.D. Considering the extension of H.264, it is considered that the same redundancy occurs when the skip flag is encoded hierarchically. For redundancy in hierarchical skip flag encoding, see H.C. It can be solved by the same means as the solution of the present invention for CBP and CBF redundancy in H.264.
 本発明の課題は、階層的なCBPやCBF、スキップフラグの符号化時の冗長性を排除した符号化手段により圧縮されたデータが与えられたときに、復号化する画像復号化方法を提供することである。 An object of the present invention is to provide an image decoding method for decoding when data compressed by an encoding unit that eliminates redundancy in encoding of hierarchical CBP, CBF, and skip flag is given. That is.
 上述の課題を解決するため、本発明の画像復号化方法は、ブロック単位での予測情報、ブロック単位での予測残差信号の有無を表すコーデットパターンデータ、およびブロック単位での予測残差信号をエントロピー符号化した画像データを含むビットストリームを入力するステップと、前記ビットストリームに含まれる情報が上位コーデットパターンデータである場合に、前記ビットストリームを復号化し上位コーデットパターンデータを取得するステップと、前記ビットストリームに含まれる情報が前記上位コーデットパターンデータに属するコーデットパターンデータである下位コーデットパターンデータであり、かつ、すでに取得した前記上位コーデットパターンデータと該下位コーデットパターンデータの組み合わせが特定の組み合わせである場合に下位コーデットパターンデータとして予め定めたデータを設定し、前記特定の組み合わせでない場合に前記ビットストリームを復号化し次の下位コーデットパターンデータを取得するステップと、前記コーデットパターンデータによりブロック単位での予測残差信号の有無を判別するステップと、前記ビットストリームに含まれる情報がブロック単位での予測情報である場合には、前記ビットストリームを復号化しブロック単位での予測情報を得るステップと、前記ビットストリームに含まれる情報がブロック単位での予測残差信号である場合には、前記ビットストリームを復号化しブロック単位での予測残差信号を得るステップと、前記ブロック単位での予測情報、および前記ブロック単位での予測残差信号を利用して、画像信号を復号化するステップと、を具備することを特徴とする。 In order to solve the above-described problem, the image decoding method of the present invention includes prediction information in units of blocks, coded pattern data indicating the presence or absence of a prediction residual signal in units of blocks, and prediction residual signals in units of blocks. A step of inputting a bit stream including entropy-encoded image data; and a step of decoding the bit stream to obtain higher-order code pattern data when the information included in the bit stream is higher-order code pattern data; and The information included in the bitstream is lower-order code pattern data that is code pattern data belonging to the higher-order code pattern data, and the combination of the already acquired higher-order code pattern data and the lower-order code pattern data is a specific combination. A predetermined code as lower-order code pattern data in the case of a combination, a step of decoding the bitstream and obtaining the next lower-order code pattern data when not in the specific combination, and a block unit by the codet pattern data Determining whether or not there is a prediction residual signal in step B, and if the information included in the bit stream is prediction information in units of blocks, decoding the bit stream to obtain prediction information in units of blocks; When the information included in the bitstream is a prediction residual signal in units of blocks, decoding the bitstream to obtain a prediction residual signal in units of blocks; prediction information in units of blocks; And using the prediction residual signal in block units Characterized by comprising the steps of decoding an image signal.
 本発明によれば、階層的なCBPやCBF、スキップフラグの符号化時の冗長性を排除した符号化手段により圧縮されたデータが与えられたときに、復号化する画像復号化方法を提供することができる。 According to the present invention, there is provided an image decoding method for decoding when data compressed by an encoding unit that eliminates redundancy in encoding of hierarchical CBP, CBF, and skip flag is given. be able to.
符号化又は復号化の対象となる画素ブロックと符号化処理方向を表す図。The figure showing the pixel block used as the object of an encoding or decoding, and an encoding process direction. 本実施の形態の階層的CBP(下位が4ビットの場合)を示す図。The figure which shows hierarchical CBP (when a low-order is 4 bits) of this Embodiment. 図2に対応する単純な階層的CBPを示す図。FIG. 3 shows a simple hierarchical CBP corresponding to FIG. 2. 本実施の形態の階層的CBP(下位が2ビットの場合)を示す図。The figure which shows hierarchical CBP (when a low-order is 2 bits) of this Embodiment. 本実施の形態のブロック単位のCBPの符号化の動作の一例を示すフローチャート。The flowchart which shows an example of the operation | movement of CBP encoding of the block unit of this Embodiment. 図5の動作を実行する符号化装置のブロック図。FIG. 6 is a block diagram of an encoding device that performs the operation of FIG. 5. 本実施の形態のブロック単位のCBPの復号化の動作の一例を示すフローチャート。The flowchart which shows an example of the operation | movement of a CBP decoding of the block unit of this Embodiment. 図7の動作を実行する符号化装置のブロック図。The block diagram of the encoding apparatus which performs the operation | movement of FIG. 本実施の形態の階層的CBPの復号化方法の一例を示す図。The figure which shows an example of the decoding method of hierarchical CBP of this Embodiment. 図9の別の一例を示す図。The figure which shows another example of FIG. 図9の条件分岐を反転させた復号化方法の一例を示す図。The figure which shows an example of the decoding method which reversed the conditional branch of FIG. 8x8画素のブロックに対応するCBPが非0の場合に、4x4画素ブロックのCBFを復号化方法の一例を示す図。The figure which shows an example of the decoding method of CBF of a 4x4 pixel block, when CBP corresponding to a block of 8x8 pixel is non-zero. 上位ブロックのサイズが64x64画素、下位ブロックのサイズが32x32画素であり、かつ、下位が4ビットの階層的CBPを復号化方法の一例を示す図。The figure which shows an example of the decoding method of hierarchical CBP whose size of a high-order block is 64x64 pixels, the size of a low-order block is 32x32 pixels, and a low-order is 4 bits. 図13の別の一例を示す図。The figure which shows another example of FIG. 16x16の画素ブロックに対する1ビットの輝度CBPが与えられた場合に、4x4、8x8、16x8、8x16、16x16の変換についてのcbpを得るシンタックスの一例を示す図。The figure which shows an example of the syntax which obtains cbp about the conversion of 4x4, 8x8, 16x8, 8x16, 16x16, when the 1-bit brightness | luminance CBP with respect to a 16x16 pixel block is given. 単純な階層的スキップフラグを示す図。The figure which shows a simple hierarchical skip flag. 図16に対応する本実施の形態の階層的スキップフラグを示す図。The figure which shows the hierarchical skip flag of this Embodiment corresponding to FIG. 本実施の形態のブロック単位のスキップフラグの復号化の動作の一例を示す図。The figure which shows an example of the operation | movement of decoding of the skip flag of the block unit of this Embodiment. 図18の動作を実現するシンタックスの一例を示す図。The figure which shows an example of the syntax which implement | achieves the operation | movement of FIG. 本実施の形態の階層的なスキップフラグの符号化の動作の一例を示すフローチャート。The flowchart which shows an example of the operation | movement of a hierarchical skip flag encoding of this Embodiment.
 以下、図面を参照しながら本発明の実施の形態に係る画像復号化方法、画像符号化方法、および装置について詳細に説明する。なお、以下の実施の形態では、同一の番号を付した部分については同様の動作を行うものとして、重ねての説明を省略する。 
 まず、H.264で復号化可能なデータを生成する符号化手段について簡単に説明しておく。この符号化手段は、例えば、図1に示すような、フレーム内予測(Intra予測)またはフレーム間予測(Inter予測)、離散コサイン変換(DCT;Discrete Cosine Transform)の近似である整数精度の直交変換およびその逆変換、係数の量子化および逆量子化、コンテキスト適応2値算術符号(CABAC; Context-based Adaptive Binary Arithmetic Code)あるいは可変長符号化(CAVLC;Context-adaptive Variable Length Coding)と呼ばれるエントロピー符号を組み合わせた手段により、H.264で復号化可能なデータを生成できる。
Hereinafter, an image decoding method, an image encoding method, and an apparatus according to embodiments of the present invention will be described in detail with reference to the drawings. Note that, in the following embodiments, the same numbered parts are assumed to perform the same operation, and repeated description is omitted.
First, H. An encoding means for generating data that can be decoded by H.264 will be briefly described. This encoding means, for example, as shown in FIG. 1, is an integer-precision orthogonal transform that is an approximation of intra-frame prediction (Intra prediction), inter-frame prediction (Inter prediction), or discrete cosine transform (DCT). And its inverse transform, coefficient quantization and inverse quantization, entropy code called Context-based Adaptive Binary Arithmetic Code (CABAC) or variable length coding (CAVLC) By means of a combination of H.264 data that can be decoded can be generated.
 本実施の形態では、符号化においては上位のCBPが1である場合に、下位のCBP(4x4画素の場合はCBF)がすべて0であるという冗長な組み合わせに符号を割り当てないことを考える。本実施の形態の画像復号化方法はそのような圧縮データの復号化を目的とする。また、上位のスキップフラグが0である場合に、下位のスキップフラグがすべて1となるという冗長な組み合わせへの符号の割り当てを避けた符号化を行うものとする。本実施の形態の画像復号化方法はそのような圧縮データの復号化を行う。 In the present embodiment, it is considered that no code is assigned to a redundant combination in which all the lower CBPs (CBF in the case of 4 × 4 pixels) are 0 when the upper CBP is 1 in encoding. The image decoding method of the present embodiment aims to decode such compressed data. In addition, when the upper skip flag is 0, encoding is performed while avoiding the assignment of codes to redundant combinations in which the lower skip flags are all 1. The image decoding method according to the present embodiment decodes such compressed data.
 (階層的CBPの冗長性削減、エンコーダ) 
 以下、残差信号の有無を表す情報をコーデットパターンデータと呼ぶこととする。H.264の規格書においては、コーデットパターンデータのうち、複数の8x8画素あるいは16x16画素ブロックに対するフラグをまとめたデータがCBP、1つの4x4画素ブロックに対するフラグがCBFに対応する。コーデットパターンデータのうち、上位の1ブロックに対応するコーデットパターンデータをupper_flag、その上位の1ブロックに属するi番目の下位のコーデットパターンデータをlower_flags[i]と呼ぶことにする。例えば、上記非特許文献1において、Luminance信号に対する8x8画素ブロックのCBPおよび4x4画素ブロックのCBFの場合、upper_flagおよびlower_flags[i]は、それぞれCodedBlockPatternLuma内の1ビット、およびi番目の4x4画素ブロックの残差信号に対するcoded_block_flagに対応する。
(Reduce redundancy of hierarchical CBP, encoder)
Hereinafter, information indicating the presence / absence of a residual signal will be referred to as coded pattern data. H. In the H.264 standard, among the coded pattern data, data that summarizes flags for a plurality of 8 × 8 pixel or 16 × 16 pixel blocks corresponds to CBP, and a flag for one 4 × 4 pixel block corresponds to CBF. Of the coded pattern data, the coded pattern data corresponding to the upper one block is called upper_flag, and the i-th lower coded pattern data belonging to the upper one block is called lower_flags [i]. For example, in Non-Patent Document 1 above, in the case of CBP of 8 × 8 pixel block and CBF of 4 × 4 pixel block for the Luminance signal, upper_flag and lower_flags [i] are 1 bit in CodedBlockPatternLuma and the remaining of the i-th 4 × 4 pixel block, respectively. Corresponds to coded_block_flag for the difference signal.
 MPEG-1/2/4の圧縮ビデオ復号規格やH.264など多くの規格に定められた復号化の過程では、画像をブロック単位で区切ったうえで、ブロック単位での復号化処理を行う。そこで、以下の説明では、ブロック単位での符号化(エンコード)の過程の一例、およびブロック単位での復号化(デコード)の過程の一例について説明する。画面全体の処理は、ブロック単位の処理を区切られたブロックの数だけ繰り返すことで行える。 MPEG-1 / 2/4 compressed video decoding standard and H.264. In the decoding process defined in many standards such as H.264, the image is divided in units of blocks, and then the decoding process is performed in units of blocks. Therefore, in the following description, an example of a process of encoding (encoding) in units of blocks and an example of a process of decoding (decoding) in units of blocks will be described. The processing of the entire screen can be performed by repeating the processing for each block by the number of divided blocks.
 本発明の実施の形態では、コーデットパターンデータを階層的に符号化する際に、特定のパターンに対応する符号量を減らすことで圧縮率を向上させる手段を提供し、およびそのような手段で生成されたビットストリームを復号化する。特定のパターンの具体的な例(下位が4ビットの場合)を図2に示し、図2に対応した単純な階層的コーデットパターンデータの例(下位が4ビットの場合)を図3に示す(なお、図3は上記非特許文献1のH.264で使われている)。 In the embodiment of the present invention, when coded pattern data is hierarchically encoded, a means for improving the compression ratio by reducing the amount of code corresponding to a specific pattern is provided, and generated by such means. Decoded bitstream is decoded. A specific example of a specific pattern (when the lower order is 4 bits) is shown in FIG. 2, and an example of simple hierarchical code pattern data corresponding to FIG. 2 (when the lower order is 4 bits) is shown in FIG. 3 is used in H.264 of Non-Patent Document 1).
 図3では、下位コーデットパターンデータ(lower-flags)が0001の場合に、符号化データは0001になる。これに対し、図2の本発明の実施の形態では、下位コーデットパターンデータ(lower-flags)が0001の場合には最後の1ビットを符号せず、符号化データを000とする。復号化においては、上位コーデットパターンデータが1であり、かつ、4ビットの下位コーデットパターンのうち、最後の1ビットを除いた3ビットが000であることがわかれば、最後の1ビットは1であることがわかる。すなわち、符号化において1ビット分符号化する必要、および、符号化されたデータの復号化において1ビット分復号化する必要がなくなる場合がある。 In FIG. 3, when the lower code pattern data (lower-flags) is 0001, the encoded data is 0001. On the other hand, in the embodiment of the present invention shown in FIG. 2, when the low-order code pattern data (lower-flags) is 0001, the last 1 bit is not encoded and the encoded data is 000. In decoding, if it is found that the upper code pattern data is 1 and 3 bits excluding the last 1 bit in the 4-bit lower code pattern are 000, the last 1 bit is 1. I know that there is. That is, there is a case where it is not necessary to encode 1 bit in encoding, and it is not necessary to decode 1 bit in decoding encoded data.
 なお、図2では下位のコーデットパターンデータを4ビットとしているが、特に4ビットである必要はなく、例えば図4に示す2ビットであってもよい。2ビットの場合には、上位コーデットパターンデータが1であり、かつ、2ビットの下位コーデットパターンのうち、最初の1ビットが0であることがわかれば、最後の1ビットは1であることがわかる。したがって、この場合も、符号化において1ビット分符号化する必要、および、符号化されたデータの復号化において1ビット分復号化する必要がなくなる場合がある。 In FIG. 2, the low-order code pattern data is 4 bits. However, it is not particularly required to be 4 bits. For example, 2 bits shown in FIG. 4 may be used. In the case of 2 bits, if it is found that the upper code pattern data is 1 and the first 1 bit is 0 in the 2-bit lower code pattern, the last 1 bit may be 1. Recognize. Therefore, in this case as well, there is a case where it is not necessary to encode one bit in encoding and it is not necessary to decode one bit in decoding encoded data.
 次に、ブロック単位のCBPの符号化の過程を示すフローチャートを図5、符号化に利用する装置の一例を図6に示す。コーデットパターンデータの符号化は、例えば、次の方法により行える。なお、以下の説明では、コーデットパターンデータ以外の部分の符号化であるステップ3、ステップ11も含めて説明する。 Next, FIG. 5 shows a flowchart showing the process of encoding CBP in block units, and FIG. 6 shows an example of an apparatus used for encoding. The coding pattern data can be encoded by the following method, for example. In the following description, step 3 and step 11 which are encoding of portions other than the codet pattern data will be described.
 ステップ1.(S501)画像入力部601が画像ブロックを読み込む。ここで読み込むブロックは、典型的には、ステップ5における上位コーデットパターンデータに対応したブロックと同じか、それより大きなサイズ(例えば、16x16画素)を持つものとする。 Step 1. (S501) The image input unit 601 reads an image block. The block to be read here is typically assumed to have the same size or larger size (for example, 16 × 16 pixels) than the block corresponding to the higher-order code pattern data in step 5.
 ステップ2.(S502)演算ユニット602がS501で読みこんだブロックに対して符号化すべき予測モードをプログラム用メモリ605から読み込む。なお、この予測モードは予め決めておく場合もあるし、複数の予測モードのそれぞれでステップS503以降を行い最も良いモードを選択する場合もある。他にも予測モードを設定する変形例はたくさんある。 Step 2. (S502) The calculation unit 602 reads from the program memory 605 the prediction mode to be encoded for the block read in S501. The prediction mode may be determined in advance, or the best mode may be selected by performing step S503 and subsequent steps in each of a plurality of prediction modes. There are many other variations for setting the prediction mode.
 ステップ3.演算ユニット602は予測モードを符号化して、符号化データ出力部604はビットストリームに出力する。 Step 3. The arithmetic unit 602 encodes the prediction mode, and the encoded data output unit 604 outputs it to the bit stream.
 ステップ4.(S503)演算ユニット602は予測モードとすでに復号可能となったデータを利用してブロック予測を行い、入力画像ブロックと予測画像ブロックの差である予測残差を求める。 Step 4. (S503) The arithmetic unit 602 performs block prediction using the prediction mode and data that has already been decoded, and obtains a prediction residual that is the difference between the input image block and the predicted image block.
 ステップ5.(S504)演算ユニット602は、予測残差にブロック変換(例えば、あらかじめトレーニングデータにより生成したKLTの基底や、DCTの基底を利用した直交変換)および量子化を施す。ここで変換を行うブロックは、ステップ1のブロックよりも小さなサイズ(例えば、4x4画素)を持つものとする。次に、演算ユニット602は量子化された変換係数の中に非0の係数が存在するか否かをあらわす情報をブロック単位で算出する。典型的には、この情報は、ブロック内に非0の係数が存在する場合には1、ブロック内の係数がすべて0の場合には0という、ブロックごとに1ビットのフラグ情報になる。この情報を下位のコーデットパターンデータ(下位CBPやCBF)と呼ぶ。次に、下位のコーデットパターンデータの集合(例えば、4つの下位のコーデットパターンデータ)がすべて0か否かという情報を表す、より大きなブロックに対するコーデットパターンデータである上位のコーデットパターンデータ(上位CBP)を求める。典型的には、上位のコーデットパターンデータは、下位のコーデットパターンデータがすべて0であれば0、下位のコーデットパターンデータに1つでも非0の情報があれば1という、ブロックごとに1ビットのフラグ情報になる。ここで、上位コーデットパターンデータに対応するブロックのサイズは、下位コーデットパターンデータよりも大きなサイズ(例えば8x8画素)を持つものとする。 Step 5. (S504) The arithmetic unit 602 performs block transform (for example, KLT base generated by training data in advance or orthogonal transform using DCT base) and quantization on the prediction residual. Here, it is assumed that the block to be converted has a smaller size (for example, 4 × 4 pixels) than the block in Step 1. Next, the arithmetic unit 602 calculates information representing whether or not non-zero coefficients exist in the quantized transform coefficients in units of blocks. Typically, this information is 1-bit flag information for each block, which is 1 when a non-zero coefficient exists in the block and 0 when all the coefficients in the block are 0. This information is referred to as lower-order code pattern data (lower-order CBP or CBF). Next, higher-order code pattern data (upper CBP), which is code pattern data for a larger block, represents information indicating whether or not a set of lower-order code pattern data (for example, four lower-order code pattern data) is all zero. Ask for. Typically, the high-order code pattern data is 1 bit for each block, 0 if the low-order code pattern data is all 0, and 1 if there is any non-zero information in the low-order code pattern data. It becomes flag information. Here, it is assumed that the size of the block corresponding to the high-order code pattern data is larger than the low-order code pattern data (for example, 8 × 8 pixels).
 ステップ6.(S505)演算ユニット602が上位のコーデットパターンデータを符号化して、符号化データ出力部604がビットストリームに出力する。 Step 6. (S505) The arithmetic unit 602 encodes the high-order code pattern data, and the encoded data output unit 604 outputs it to the bit stream.
 ステップ7.(S506)演算ユニット602は、上位のコーデットパターンデータが0である場合にはステップ8~10を飛ばし、そうでないのならステップ8を実行する。 Step 7. (S506) The arithmetic unit 602 skips Steps 8 to 10 if the higher-order code pattern data is 0, and executes Step 8 if not.
 ステップ8.(S507)ステップ8~10は下位のコーデットパターンデータを1ビットずつ符号化していく過程である。このステップでは次の条件分岐を実行する。演算ユニット602は、すでに符号化された下位のコーデットパターンデータが特定のパターンデータである場合(典型的には、最後の1ビットの下位のコーデットパターンデータを符号化する場合であって、かつ、符号化済みの下位のコーデットパターンデータがすべて0である場合)には、次のビットストリームに出力するステップ9を飛ばし、そうでなければステップ9を実行する。 Step 8. (S507) Steps 8 to 10 are processes in which the lower code pattern data is encoded bit by bit. In this step, the next conditional branch is executed. The arithmetic unit 602 is a case where the already encoded lower-order code pattern data is specific pattern data (typically, the last one-bit lower-order code pattern data is encoded, and If all the encoded lower-order code pattern data is 0), step 9 for outputting to the next bit stream is skipped; otherwise, step 9 is executed.
 ステップ9.(S508)次に、演算ユニット602は符号化すべき下位のコーデットパターンデータを符号化して、符号化データ出力部604はビットストリームに出力する。 Step 9. (S508) Next, the arithmetic unit 602 encodes lower-order code pattern data to be encoded, and the encoded data output unit 604 outputs it to the bit stream.
 ステップ10.(S509)演算ユニット602は、下位のコーデットパターンデータをすべて符号化していればステップ11に進め、そうでなければステップ8に戻る。S507からS509のループはビット数に応じて回る回数が決まり、例えば4ビットであれば4回だけ回すことになる。 Step 10. (S509) The arithmetic unit 602 proceeds to step 11 if all the lower-order code pattern data have been encoded, and returns to step 8 if not. In the loop from S507 to S509, the number of times of rotation is determined according to the number of bits.
 ステップ11.符号化データ出力部604は、コーデットパターンデータが非0のブロックについて、量子化された変換係数を符号化してビットストリームに出力する。 Step 11. The encoded data output unit 604 encodes the quantized transform coefficient for a block having non-zero coded pattern data, and outputs the result to a bit stream.
 なお、ステップ3はS501やS502より前にあってもよい。エンコーダは、例えば、符号化すべき予測モードを切り替えながらステップ2~11を繰り返し試したうえで、符号化効率が良い予測モードを選択することで、圧縮率を向上させることができる。ただし、デコード可能なビットストリームを出力するために、このような繰り返しは必須ではなく、別の基準で予測モードを決めてもよい。 Note that step 3 may be prior to S501 and S502. The encoder can improve the compression rate by, for example, repeatedly trying steps 2 to 11 while switching the prediction mode to be encoded and then selecting a prediction mode with good encoding efficiency. However, in order to output a decodable bitstream, such repetition is not essential, and the prediction mode may be determined based on another criterion.
 次に、符号化装置について図6を参照して説明する。 
 本実施の形態の符号化装置は、画像入力部601、演算ユニット602、データ用メモリ603、符号化データ出力部604、プログラム用メモリ605を含む。
Next, the encoding apparatus will be described with reference to FIG.
The encoding apparatus according to the present embodiment includes an image input unit 601, an arithmetic unit 602, a data memory 603, an encoded data output unit 604, and a program memory 605.
 画像入力部601は画像ブロックを読み込む。演算ユニット602は、画像入力部601が読み込んだ画像ブロックに対し、データ用メモリ603およびプログラム用メモリ605を参照して符号化を行う。データ用メモリ603は、一時記憶装置であり、例えば現在処理しているフレームの前フレームを一時的に記憶する。データ用メモリ603は例えばRAMである。プログラム用メモリ605は、符号化のためのプログラムを記憶している。プログラム用メモリ605は例えばROMまたはRAMである。符号化データ出力部604は、符号化されたデータをビットストリームに出力する。 The image input unit 601 reads an image block. The arithmetic unit 602 encodes the image block read by the image input unit 601 with reference to the data memory 603 and the program memory 605. The data memory 603 is a temporary storage device, and temporarily stores, for example, a frame before the currently processed frame. The data memory 603 is a RAM, for example. The program memory 605 stores a program for encoding. The program memory 605 is, for example, a ROM or a RAM. The encoded data output unit 604 outputs the encoded data to a bit stream.
 (階層的CBPの冗長性削減、デコーダ) 
 以上の方法で生成されたビットストリームを復号化(ブロック単位のCBPの復号化)する方法のフローチャートの一例を図7に、復号化を実行するための装置の一例を図8に示す。コーデットパターンデータの復号化は、例えば、次のステップ1~10の方法により行える。
(Reduce redundancy of hierarchical CBP, decoder)
FIG. 7 shows an example of a flowchart of a method for decoding the bit stream generated by the above method (decoding of CBP in units of blocks), and FIG. 8 shows an example of an apparatus for executing the decoding. The decoding of the coded pattern data can be performed by, for example, the following steps 1 to 10.
 ステップ1.(S701)符号化データ入力部801が入力データとしてビットストリームを入力する。ビットストリームは、ブロック単位での予測情報、ブロック単位での予測残差信号の有無を表すコーデットパターンデータ、およびブロック単位での予測残差信号をエントロピー符号化した画像データを含む。 Step 1. (S701) The encoded data input unit 801 inputs a bit stream as input data. The bit stream includes prediction information in units of blocks, coded pattern data indicating the presence / absence of a prediction residual signal in units of blocks, and image data obtained by entropy encoding the prediction residual signal in units of blocks.
 ステップ2.(S702)次に演算ユニット802が、取得すべきデータが上位のコーデットパターンデータ(例えば、上位のCBP)であるかどうかを判定し、上位のコーデットパターンデータであると判定された場合にはステップ3へ、そうでなければステップ4へ飛ぶ。 Step 2. (S702) Next, the arithmetic unit 802 determines whether the data to be acquired is higher-order code pattern data (for example, higher-order CBP), and if it is determined that the data is higher-order code pattern data, step S702 If not, jump to step 4.
 ステップ3.(S703)演算ユニット802が上位のコーデットパターンデータをエントロピー復号により取得する。ステップ9へ飛ぶ。 Step 3. (S703) The arithmetic unit 802 obtains higher-order code pattern data by entropy decoding. Jump to step 9.
 ステップ4.(S704)次に演算ユニット802が、取得すべきデータが上位コーデットパターンデータに属するコーデットパターンデータである下位のコーデットパターンデータ(例えば、下位のCBPあるいは下位のCBF)であるかどうかを判定し、下位のコーデットパターンデータであると判定された場合にはステップ6へ、そうでなければステップ5へ飛ぶ。 Step 4. (S704) Next, the arithmetic unit 802 determines whether the data to be acquired is low-order code pattern data (for example, low-order CBP or low-order CBF) that is code pattern data belonging to the high-order code pattern data. If it is determined that the code pattern data is lower order, the process jumps to step 6; otherwise, the process jumps to step 5.
 ステップ5.(S705)次に演算ユニット802が取得すべき(コーデットパターンデータ以外の)データを取得しステップ9へ飛ぶ。 Step 5. (S705) Next, the data to be acquired by the arithmetic unit 802 (other than the coded pattern data) is acquired and the process jumps to Step 9.
 ステップ6.(S706)演算ユニット802が、すでに取得された下位のコーデットパターンデータが予め定められたパターンであるかどうかを判定し、予め定められたパターンである場合にはステップ7へ飛び、そうでなければステップ8へ飛ぶ。例えば、図2の例においては、予め定められたパターンとは、下位のコーデットパターンデータが4ビットであり、かつ、すでに下位のコーデットパターンデータが3ビット取得されていて次に取得すべきデータが4ビット目のコーデットパターンデータであり、かつ、すでに取得された3ビットが000であるパターンを指す。 Step 6. (S706) The arithmetic unit 802 determines whether the already acquired lower-order code pattern data is a predetermined pattern. If it is a predetermined pattern, the operation unit 802 jumps to step 7, otherwise. Jump to step 8. For example, in the example of FIG. 2, the predetermined pattern is that the lower-order code pattern data is 4 bits, and the lower-order code pattern data has already been acquired in 3 bits, and the next data to be acquired is It is the 4th bit code pattern data, and indicates the pattern in which 3 bits already acquired is 000.
 ステップ7.(S707)次に演算ユニット802が、取得すべき下位のコーデットパターンデータとして、予め定められた固定値を設定し、設定後ステップ9へ飛ぶ。例えば、図2の例では、次に取得すべき4ビット目のコーデットパターンデータとして1を設定する。 Step 7. (S707) Next, the arithmetic unit 802 sets a predetermined fixed value as lower-order code pattern data to be acquired, and jumps to step 9 after the setting. For example, in the example of FIG. 2, 1 is set as the fourth bit code pattern data to be acquired next.
 ステップ8.(S708)次に演算ユニット802が、取得すべき下位のコーデットパターンデータをエントロピー復号により取得する。 Step 8. (S708) Next, the arithmetic unit 802 acquires lower-order codet pattern data to be acquired by entropy decoding.
 ステップ9.(S709)演算ユニット802がブロック情報の取得が完了しているかどうかを判定し、取得が完了していればステップ10へ飛び、そうでなければステップ2へ飛ぶ。ブロック情報は、復号された、ブロック単位での予測情報およびブロック単位での予測残差信号を示す。すなわち、このフローでは明示されていないが、ビットストリームに含まれる情報がブロック単位での予測情報である場合にはビットストリームを復号化しブロック単位での予測情報を得るステップがあり、ビットストリームに含まれる情報がブロック単位での予測残差信号である場合にはビットストリームを復号化しブロック単位での予測残差信号を得るステップがある。 Step 9. (S709) The arithmetic unit 802 determines whether or not the acquisition of the block information has been completed. If the acquisition has been completed, the process jumps to Step 10, and if not, the process jumps to Step 2. Block information indicates decoded prediction information in units of blocks and prediction residual signals in units of blocks. That is, although not explicitly shown in this flow, when the information included in the bitstream is prediction information in units of blocks, there is a step of decoding the bitstream to obtain prediction information in units of blocks, which is included in the bitstream. If the information to be received is a prediction residual signal in units of blocks, there is a step of obtaining a prediction residual signal in units of blocks by decoding the bit stream.
 ステップ10.(S710)演算ユニット802が取得されたブロック情報に基づきブロック画像信号を復元し、画像出力部804が復元された画像を出力する。 Step 10. (S710) The arithmetic unit 802 restores the block image signal based on the acquired block information, and the image output unit 804 outputs the restored image.
 次に、復号化装置について図8を参照して説明する。 
 本実施の形態の復号化装置は、符号化データ入力部801、演算ユニット802、データ用メモリ803、画像出力部804、プログラム用メモリ805を含む。
Next, the decoding apparatus will be described with reference to FIG.
The decoding apparatus according to the present embodiment includes an encoded data input unit 801, an arithmetic unit 802, a data memory 803, an image output unit 804, and a program memory 805.
 符号化データ入力部801は入力データとしてビットストリームを入力する。演算ユニット802は、符号化データ入力部801が入力したビットストリームに含まれるブロックを、ブロックの切れ目を判断しながら、データ用メモリ603およびプログラム用メモリ605を参照して復号化を行う。データ用メモリ803は、一時記憶装置であり、例えば符号化データ入力部801が入力したビットストリームを一時的に記憶する。プログラム用メモリ805は、復号化のためのプログラムを記憶していて、例えば下記図9または図10に示す擬似プログラムに対応するプログラムを格納している。 The encoded data input unit 801 inputs a bit stream as input data. The arithmetic unit 802 decodes the blocks included in the bit stream input by the encoded data input unit 801 with reference to the data memory 603 and the program memory 605 while determining the block breaks. The data memory 803 is a temporary storage device, and temporarily stores, for example, the bit stream input by the encoded data input unit 801. The program memory 805 stores a program for decoding and stores, for example, a program corresponding to the pseudo program shown in FIG. 9 or FIG.
 次に、下位のコーデットパターンデータが4ビットの階層的CBPの場合の復号化方法のシンタックスの一例を図9に、下位のコーデットパターンデータがnum_lower_blocksビットの階層的CBPの場合の復号化方法のシンタックスの一例を図10に示す。図9、図10において、ae(v)とされた行はエントロピー復号(例えばCABAC)により1ビットの情報を取得することを表し、そうでない行はその行を実行することを表す。「(upper_flag is already decoded)」は、上位のコーデットパターンデータがすでにupper_flagとして取得されていることを表す。「(other decoding processes, optional)」は、もし他のシンタックス処理が必要であれば、そのシンタックス処理を実行することを表す。なお、コーデットパターンデータが特定の組み合わせであるかを判定する条件分岐判定は反転させることが可能である。図9の条件分岐判定を反転させた例を図11に示す。他の図についても同様である。 Next, FIG. 9 shows an example of the syntax of the decoding method when the lower-order code pattern data is a 4-bit hierarchical CBP. FIG. 9 shows the decoding method when the lower-order code pattern data is a num_lower_blocks-bit hierarchical CBP. An example of the syntax is shown in FIG. 9 and 10, a line indicated as ae (v) indicates that 1-bit information is acquired by entropy decoding (for example, CABAC), and a line that does not indicate that the line is executed. “(Upper_flag is ready decoded)” indicates that the upper-level code pattern data has already been acquired as upper_flag. “(Other decoding processes, optional)” indicates that if other syntax processing is necessary, the syntax processing is executed. It should be noted that the conditional branch determination for determining whether the coded pattern data is a specific combination can be reversed. An example in which the conditional branch determination in FIG. 9 is reversed is shown in FIG. The same applies to other figures.
 (CBPとCBF) 
 H.264では、4x4画素のブロックに対応したコーデットパターンデータであるcoded_block_flagは、第1のcoded_block_flag、第1のcoded_block_flagが非0の場合には第1の変換係数、第2のcoded_block_flag、第2のcoded_block_flagが非0の場合には第2の変換係数、というように、変換係数とあわせて復号化される。この場合、上位のコーデットパターンデータとして8x8画素のブロックに対応するCBP、下位のコーデットパターンデータとして8x8画素のブロックを構成する各4x4画素のブロックに対応したCBFを考えると、シンタックスは図12のように表せる。図12は、8x8画素のブロックに対応するCBPが非0の場合に、4x4画素ブロックのCBFを復号化する方法の一例を示す。
(CBP and CBF)
H. In H.264, coded_block_flag that is coded pattern data corresponding to a block of 4 × 4 pixels is the first coded_block_flag, and when the first coded_block_flag is non-zero, the first conversion coefficient, the second coded_block_flag, and the second coded_block are In the case of non-zero, the second transform coefficient is decoded together with the transform coefficient. In this case, considering the CBP corresponding to the 8 × 8 pixel block as the upper code pattern data and the CBF corresponding to each 4 × 4 pixel block constituting the 8 × 8 pixel block as the lower code pattern data, the syntax is as shown in FIG. It can be expressed as follows. FIG. 12 shows an example of a method for decoding a CBF of a 4 × 4 pixel block when the CBP corresponding to the block of 8 × 8 pixels is non-zero.
 図12において、引数blockIndexは、処理中の4x4画素ブロックがそれを含む8x8画素のブロック内で先頭のブロックを0としたときのインデックスを表し、(decode residual coefficients coeffLevel[i])は変換係数を復号化することを表す。また、最初の4x4画素ブロックを復号化する前に、nonzero_coded_block_flag_foundには0を設定しておくものとする。8x8画素のブロックを構成する4x4画素ブロックは4つあるから、blockIndexが3であり、かつ、他のcoded_block_flagが0である場合には、coded_block_flagを復号化せずに1とすることができる。そうでない場合には、coded_block_flagを復号化する必要がある。なお、図12には含まれていないが、予測モードによっては常にcoded_block_flagを復号化する必要があるため、図12の関数を呼び出す前に、常にcoded_block_flagを復号化する必要があるかを、判定しておく必要がある。常にcoded_block_flagを復号化する必要がある予測モードとしては、例えば、H.264のIntra16x16予測があげられる。このモードでは、輝度ブロックに対応したCBPの表現として、16x16画素ブロックを構成する4つの8x8ブロックに対する4ビットのCBPについて、すべてのビットが0であるかすべてのビットが1であるかの2通りしか用意されていない。この場合、上位のCBPが1かつ下位のCBFがすべて0という符号を用意しておかなければ、16x16画素内の任意の8x8画素ブロックにおいて、8x8画素ブロック内のCBFがすべて0になるというコーデットパターンデータを表現できない。したがって、H.264のIntra16x16予測では、常にcoded_block_flagを復号化する必要がある。 In FIG. 12, an argument blockIndex represents an index when a 4 × 4 pixel block being processed has a leading block of 0 in an 8 × 8 pixel block including the block, and (decode residual coefficients coeffLevel [i]) represents a conversion coefficient. It represents decoding. Also, before decoding the first 4 × 4 pixel block, 0 is set to nonzero_coded_block_flag_found. Since there are four 4 × 4 pixel blocks constituting an 8 × 8 pixel block, when blockIndex is 3 and other coded_block_flag is 0, coded_block_flag can be set to 1 without decoding. Otherwise, the coded_block_flag needs to be decoded. Although not included in FIG. 12, since it is necessary to always decode coded_block_flag depending on the prediction mode, it is determined whether it is necessary to always decode coded_block_flag before calling the function of FIG. It is necessary to keep. As a prediction mode in which coded_block_flag must always be decoded, for example, H.264 H.264 Intra16 × 16 prediction. In this mode, CBP corresponding to the luminance block is expressed in two ways, with all bits being 0 or all bits being 1 for 4-bit CBP for four 8x8 blocks constituting a 16x16 pixel block. Only available. In this case, unless a sign that the upper CBP is 1 and the lower CBF is all 0 is prepared, a coded pattern in which all CBFs in an 8x8 pixel block are 0 in an arbitrary 8x8 pixel block in 16x16 pixels. The data cannot be represented. Therefore, H.H. In H.264 Intra16 × 16 prediction, it is necessary to always decode coded_block_flag.
 (上位CBPと下位CBP) 
 H.264では、上位のコーデットパターンデータを持つブロック(マクロブロック)のサイズは16x16画素である。しかし、符号化効率を考えると、例えばマクロブロックのサイズを32x32画素や64x64画素に拡張するという拡張も考えられる。これを拡張マクロブロックと呼ぶことにする。拡張マクロブロックでは、例えば、32x32画素の拡張マクロブロックを構成する16x16画素のブロックは、輝度ブロックのみを考えれば4個、輝度ブロック4つに加えてCb、Crの色差ブロックまで考えれば12個存在することになる。CBPは0となることが多く、0のフラグを12個も符号化することは避けたい。そこでマクロブロックの拡張として、32x32画素の拡張マクロブロックを構成するCBPがすべて0であるか、1つ以上の非0のビットを持つCBPであるかというコーデットパターンデータを符号化することが考えられる。この実施例では、32x32画素の拡張マクロブロックに対するコーデットパターンデータをcoded_block_pattern_32と呼ぶことにする。coded_block_pattern_32は1ビットのフラグ情報である。さらに大きな拡張マクロブロックとして、64x64画素のレベル2拡張マクロブロックを考えるなら、レベル2拡張マクロブロックを構成する32x32画素のCBPであるcoded_block_pattern_32がすべて0であるか、1つ以上の非0のビットを持つCBPであるかを符号化することが考えられる。この実施例では、64x64画素の拡張マクロブロックに対するコーデットパターンデータをcoded_block_pattern_64と呼ぶこととし、その64x64画素ブロックを構成する4つの32x32画素ブロックについては、インデックスを付与してcoded_block_pattern_32[0]~coded_block_pattern_32[3]と呼ぶことにする。
(Upper CBP and Lower CBP)
H. In H.264, the size of a block (macroblock) having higher-order code pattern data is 16 × 16 pixels. However, considering the encoding efficiency, for example, an extension of expanding the macroblock size to 32 × 32 pixels or 64 × 64 pixels is also conceivable. This is called an extended macroblock. In the extended macroblock, for example, there are four 16 × 16 pixel blocks constituting the extended macroblock of 32 × 32 pixels if only the luminance block is considered, and if there are four luminance blocks and Cb and Cr color difference blocks, there are 12 blocks. Will do. CBP is often 0, and it is desirable to avoid coding 12 flags of 0. Thus, as an extension of the macroblock, it is conceivable to code the coded pattern data indicating whether the CBPs constituting the extended macroblock of 32 × 32 pixels are all 0s or CBPs having one or more non-zero bits. . In this embodiment, the coded pattern data for an extended macroblock of 32 × 32 pixels is called coded_block_pattern_32. coded_block_pattern_32 is 1-bit flag information. If a level 2 extended macroblock of 64 × 64 pixels is considered as a larger extended macroblock, coded_block_pattern_32 which is a 32 × 32 pixel CBP constituting the level 2 extended macroblock is all 0, or one or more non-zero bits are set. It is conceivable to encode whether the CBP is possessed. In this embodiment, the coded pattern data for an extended macroblock of 64 × 64 pixels is called coded_block_pattern_64, and the four 32 × 32 pixel blocks constituting the 64 × 64 pixel block are indexed and coded_block_pattern_32 [0] to coded_block_pattern_32 [3]. ].
 coded_block_pattern_64およびcoded_block_pattern_32をデコードする処理の流れの一例を図13、別の一例を図14に示す。双方の図は、上位ブロックのサイズが64x64画素、下位ブロックのサイズが32x32画素であり、かつ、下位が4ビットの階層的CBPを復号化する方法の一例を示す。 FIG. 13 shows an example of the flow of processing for decoding coded_block_pattern_64 and coded_block_pattern_32, and FIG. 14 shows another example. Both figures show an example of a method of decoding a hierarchical CBP in which the size of the upper block is 64 × 64 pixels, the size of the lower block is 32 × 32 pixels, and the lower block is 4 bits.
 「(other decoding processes, optional)」は、もし他のシンタックス処理が必要であれば、そのシンタックス処理を実行することを表す。図13は、coded_block_pattern_64とcoded_block_pattern_32が符号化されたデータを復号化する場合の一例を表している。図13では、まずcoded_block_pattern_64を復号化し、それが0でない場合にはcoded_block_pattern_32の各要素を復号化している。この際、coded_block_pattern_32[3]については、coded_block_pattern_32[0]~coded_block_pattern_32[2]のうち1つ以上が非0であれば復号化するが、coded_block_pattern_32[0]~coded_block_pattern_32[2]のすべてが0である場合にはcoded_block_pattern_32[3]を1とする。図14は、図13におけるcoded_block_pattern_64とcoded_block_pattern_32が別の関数として表現された場合の一例を表している。図14において、macroblock_cluster_residual_64x64()は64x64画素のレベル2拡張マクロブロックの残差を復号化するための関数であり、macroblock_cluster_residual_32x32()は32x32画素の拡張マクロブロックの残差を復号化するための関数である。図13に対し、図14では、coded_block_pattern_64の復号化がmacroblock_cluster_residual_64x64()で行われ、coded_block_pattern_32の各要素の復号化はmacroblock_cluster_residual_32x32()で行われている点が異なる。coded_block_pattern_32[0]~coded_block_pattern_32[2]のすべてが0である場合に、coded_block_pattern_32[3]を復号化せず固定値1とする点は図13と同じである。 “(Other decoding processes, optional)” indicates that if other syntax processing is necessary, the syntax processing is executed. FIG. 13 illustrates an example of decoding data in which coded_block_pattern_64 and coded_block_pattern_32 are encoded. In FIG. 13, first, coded_block_pattern_64 is decoded, and when it is not 0, each element of coded_block_pattern_32 is decoded. At this time, coded_block_pattern_32 [3] is decoded if at least one of coded_block_pattern_32 [0] to coded_block_pattern_32 [2] is non-zero, but coded_block_pattern_32 [0] to all of coded_block_block_patter_block_patt_p32_patt_patch_block0_32_32_3 In this case, coded_block_pattern_32 [3] is set to 1. FIG. 14 shows an example in which coded_block_pattern_64 and coded_block_pattern_32 in FIG. 13 are expressed as different functions. In FIG. 14, macroblock_cluster_residual_64x64 () is a function for decoding a residual of a level 2 extended macroblock of 64x64 pixels, and macroblock_cluster_residual_32x32 () is a function for decoding a residual of an extended macroblock of 32x32 pixels. is there. 13, in FIG. 14, decoding of coded_block_pattern_64 is performed by macroblock_cluster_residual_64x64 (), and decoding of each element of coded_block_pattern_32 is performed by macroblock_cluster_residual_32 × 32 (points). 13 is the same as FIG. 13 in that when all of coded_block_pattern_32 [0] to coded_block_pattern_32 [2] are 0, coded_block_pattern_32 [3] is not decoded and is set to a fixed value 1.
 (階層的CBPの具体例) 
 シンタックスの一例として、16x16画素のブロックに対して1ビットの輝度CBPが符号化および復号化され、輝度CBPが1の場合にのみ、16x16画素のブロック内に属する各ブロックについて、変換係数の有無をCBPとして符号化および復号化される例を、図15のシンタックスにしたがって説明する。図15は、16x16の画素ブロックに対する1ビットの輝度CBPが与えられた場合に、4x4、8x8、16x8、8x16、16x16の変換についてのcbpを得るシンタックスの一例を示す。
(Specific example of hierarchical CBP)
As an example of syntax, if a 1-bit luminance CBP is encoded and decoded for a 16 × 16 pixel block and the luminance CBP is 1, the presence / absence of a conversion coefficient for each block belonging to the 16 × 16 pixel block An example of encoding and decoding as a CBP will be described with reference to the syntax of FIG. FIG. 15 shows an example of a syntax for obtaining cbp for 4 × 4, 8 × 8, 16 × 8, 8 × 16, and 16 × 16 conversion when a 1-bit luminance CBP for a 16 × 16 pixel block is given.
 変換のサイズとして、4x4、8x8、16x8、8x16、16x16の5通りを考える。変換タイプ「cur_transform_type」は、4x4に対応する0、8x8に対応する1、16x8/8x16/16x16のいずれかに対応する2の3値を取るものとする。「cur_transform_type」が2の場合、変換サイズは、予測ブロックのサイズが16x8であれば16x8、8x16であれば8x16、それ以外であれば16x16とする。変換サイズが4x4および8x8の場合には、4つの8x8ブロックに対する4ビットのCBPが必要である。変換サイズが16x8および8x16の場合には、それぞれ、2つの16x8ブロックおよび2つの8x16ブロックに対する2ビットのCBPが必要である。変換サイズが16x16の場合には、1ビットのCBPが必要である。 Suppose that there are 5 conversion sizes: 4x4, 8x8, 16x8, 8x16, 16x16. The conversion type “cur_transform_type” is assumed to take three values of 0 corresponding to one of 0 corresponding to 4 × 4, 1 corresponding to 8 × 8, and 16 × 8/8 × 16/16 × 16. When “cur_transform_type” is 2, the transform size is 16 × 8 if the predicted block size is 16 × 8, 8 × 16 if 8 × 16, and 16 × 16 otherwise. For transform sizes 4x4 and 8x8, a 4 bit CBP for 4 8x8 blocks is required. For transform sizes of 16x8 and 8x16, a 2-bit CBP is required for two 16x8 blocks and two 8x16 blocks, respectively. When the conversion size is 16 × 16, 1-bit CBP is required.
 この場合、図15に示すように、cur_transform_typeが0または1の場合には図2に対応した読み込みを行い、cur_transform_typeが2かつ変換サイズが16x8/8x16の場合には図4に対応した読み込みを行い、cur_transform_typeが2かつ変換サイズが16x16の場合には与えられたCBPをそのまま利用することで、本発明を利用できることになる。なお、図15において、「cbp_luma_1bit」は1ビットの輝度CBPを表し、「MbPartWidth(mb_type)」および「MbPartHeight(mb_type)」は予測ブロックのサイズを表し、cbpは16x16輝度ブロックを4つの8x8ブロックに分割した場合の、各8x8輝度ブロックに対応した4ビットのcbpを表す。図15のシンタックスでは、16x8/8x16/16x16の場合について、cbpを8x8ブロックにあわせて4ビットとしているが、これらの場合にcbpを8x8ブロックにあわせる必要はなく、それぞれ2ビット、2ビット、1ビットのcbpとして読み込んでもよい。 In this case, as shown in FIG. 15, when cur_transform_type is 0 or 1, reading corresponding to FIG. 2 is performed, and when cur_transform_type is 2 and the conversion size is 16 × 8/8 × 16, reading corresponding to FIG. 4 is performed. When cur_transform_type is 2 and the transform size is 16x16, the present invention can be used by using the given CBP as it is. In FIG. 15, “cbp_luma — 1 bit” represents 1-bit luminance CBP, “MbPartWidth (mb_type)” and “MbPartHeight (mb_type)” represent prediction block sizes, and cbp represents 16 × 16 luminance blocks in four 8 × 8 blocks. When divided, 4 bits of cbp corresponding to each 8 × 8 luminance block are represented. In the syntax of FIG. 15, in the case of 16 × 8/8 × 16/16 × 16, cbp is set to 4 bits in accordance with the 8 × 8 block. However, in these cases, it is not necessary to adjust cbp to the 8 × 8 block, and 2 bits, 2 bits, It may be read as 1-bit cbp.
 (ダイレクトモード) 
 H.264の多くのフレーム間符号化モードでは、すでに復号化した情報から求められる動き予測に対する動きの予測誤差、および予測で得られたブロックと画像ブロックとの予測残差の2つの情報を符号化および復号化する。しかし、動きの予測誤差を符号化および復号化せず予測残差のみを符号化および復号化するダイレクトモード、すでに復号化した情報から求められる動き予測のみを利用したスキップモードという2つの特殊なモードが用意されている。なお、H.264ではBスライスと呼ばれるデータに対してのみダイレクトモードが用意されているが、Pスライスと呼ばれるデータについても同じ定義でのダイレクトモードが実現できるため、本実施の形態ではスライスの種類については特に限定しない。
(Direct mode)
H. In many inter-frame coding modes of H.264, two pieces of information such as a motion prediction error for motion prediction obtained from already decoded information and a prediction residual between a block and an image block obtained by the prediction are encoded and Decrypt. However, there are two special modes: a direct mode that encodes and decodes only a prediction residual without encoding and decoding motion prediction errors, and a skip mode that uses only motion prediction obtained from already decoded information Is prepared. H. In H.264, a direct mode is prepared only for data called a B slice, but since a direct mode with the same definition can be realized for data called a P slice, the type of slice is particularly limited in this embodiment. do not do.
 スキップモードとダイレクトモードという2つのモードを比較すると、スキップモードはダイレクトモードの予測残差が存在しないモードであると考えられる。H.264では予測残差が存在しないダイレクトモードを符号化することも可能であるが、そのような場合にはスキップモードで符号化し、復号化時にダイレクトモードでは常に予測残差が存在すると解釈してもよく、予測残差が存在しないダイレクトモードは冗長なモードであることがわかる。したがって、拡張マクロブロックにおける階層的なコーデットブロックデータをデコードする際には、ダイレクトモードとして符号化されたブロックと同一サイズのコーデットブロックデータに限り、コーデットブロックデータをエントロピー復号化により取得せずに、予測残差の存在を表す固定値(1)を設定できる。換言すれば、ブロック単位での予測情報がダイレクトモードである場合に、上位コーデットパターンデータを前記ビットストリームから復号化せずに予め定めた値を設定する。なお、ダイレクトモードにおける下位のブロック(例えば、64x64画素のレベル2拡張マクロブロックでダイレクトモードと記録されている場合にそのブロックを構成する4つの32x32画素の拡張マクロブロック)については、予測残差の存在の有無は不明であって、コーデットブロックデータを符号化および復号化する必要がある。 Comparing the two modes, skip mode and direct mode, it is considered that the skip mode is a mode in which there is no prediction residual of the direct mode. H. In H.264, it is possible to encode a direct mode in which no prediction residual exists, but in such a case, it is encoded in the skip mode, and it is interpreted that there is always a prediction residual in the direct mode at the time of decoding. It can be seen that the direct mode without the prediction residual is a redundant mode. Therefore, when decoding the hierarchical coded block data in the extended macroblock, only the coded block data having the same size as the block coded as the direct mode is acquired without entropy decoding. A fixed value (1) representing the presence of the prediction residual can be set. In other words, when the prediction information in units of blocks is in the direct mode, a predetermined value is set without decoding higher-order code pattern data from the bitstream. For the lower-level blocks in the direct mode (for example, four 32 × 32 pixel extended macroblocks constituting the block when the level 2 extended macroblock of 64 × 64 pixels is recorded as the direct mode), the prediction residual Presence / absence of existence is unknown, and it is necessary to encode and decode the coded block data.
 (スキップフラグ) 
 今までの説明ではコーデットブロックデータの無駄を減らす手段について述べてきた。同じ手段で、スキップモードをあらわすスキップフラグについても冗長な情報を減らすことができる。スキップモードは、ブロックがスキップである場合に1、そうでない場合に0となるフラグである。スキップ予測が可能なブロックのサイズとして2種以上のサイズが用意されている場合には、スキップフラグを階層的に符号化する必要がある。この場合、図16(単純な階層的スキップフラグの一例)のように実装することになるが、これは今まで述べてきたCBPとCBFの例を論理反転させた表になっており、従来のコーデットブロックデータが冗長であった理由と同じ理由で冗長である。したがって、図17(本実施の形態の階層的スキップフラグの一例)に示すように、下位のスキップフラグとして4つのフラグが符号化および復号化される場合、上位のスキップフラグが0、下位のスキップフラグのうち第1、第2、第3のスキップフラグが1であるなら、第4の下位のスキップフラグを符号化および復号化せずに、0という固定値を利用できる。
(Skip flag)
The explanation so far has described means for reducing the waste of code block data. With the same means, redundant information can be reduced for the skip flag indicating the skip mode. The skip mode is a flag that becomes 1 when the block is skipped and 0 when it is not. When two or more sizes are prepared as the sizes of blocks that can be skip-predicted, it is necessary to encode the skip flag hierarchically. In this case, it is implemented as shown in FIG. 16 (an example of a simple hierarchical skip flag). This is a table obtained by logically inverting the examples of CBP and CBF described so far. It is redundant for the same reason that the coded block data is redundant. Therefore, as shown in FIG. 17 (an example of a hierarchical skip flag according to the present embodiment), when four flags are encoded and decoded as the lower skip flags, the upper skip flag is 0 and the lower skip is performed. If the first, second, and third skip flags among the flags are 1, a fixed value of 0 can be used without encoding and decoding the fourth lower skip flag.
 階層的なスキップフラグを符号化する方法の流れを表す図を図20に示す。符号化は、次の流れで行われる。 FIG. 20 shows the flow of a method for encoding a hierarchical skip flag. Encoding is performed in the following flow.
 ステップ1.(S2001)画像入力部601が画像ブロックを読み込む。 Step 1. (S2001) The image input unit 601 reads an image block.
 ステップ2.(S2002)演算ユニット602がS501で読みこんだブロックに対して符号化すべき予測モードをプログラム用メモリ605から読み込む。予測モードは、スキップフラグ(Skip)の情報を含む。なお、この予測モードは予め決めておく場合もあるし、複数の予測モードのそれぞれでステップS503以降を行い最も良いモードを選択する場合もある。他にも予測モードを設定する変形例はたくさんある。 Step 2. (S2002) The calculation unit 602 reads from the program memory 605 the prediction mode to be encoded for the block read in S501. The prediction mode includes information on a skip flag (Skip). The prediction mode may be determined in advance, or the best mode may be selected by performing step S503 and subsequent steps in each of a plurality of prediction modes. There are many other variations for setting the prediction mode.
 ステップ3.(S2003)演算ユニット602は上位のスキップフラグを符号化して、符号化データ出力部604はビットストリームに出力する。 Step 3. (S2003) The arithmetic unit 602 encodes the upper skip flag, and the encoded data output unit 604 outputs it to the bit stream.
 ステップ4.(S2004)このステップは次の条件分岐を実行する。演算ユニット602は、上位のスキップフラグが1であれば、ステップ5~9を飛ばす。そうでなければステップ5を実行する。 Step 4. (S2004) This step executes the next conditional branch. If the upper skip flag is 1, the arithmetic unit 602 skips steps 5 to 9. Otherwise, step 5 is executed.
 ステップ5.(S2005)演算ユニット602は、スキップフラグ以外の、上位の予測モードを符号化して、符号化データ出力部604からビットストリームに出力する。 Step 5. (S2005) The arithmetic unit 602 encodes an upper prediction mode other than the skip flag, and outputs the encoded prediction mode from the encoded data output unit 604 to a bit stream.
 ステップ6.(S2006)ステップ6~8は下位のスキップフラグのうち1ビットを符号化する過程である。このステップでは次の条件分岐を実行する。演算ユニット602は、すでに符号化された下位のスキップフラグが特定のパターンデータである場合(典型的には、最後の1ビットの下位のスキップフラグを符号化する場合であって、かつ、符号化済みの下位のスキップフラグがすべて1である場合)には、次のビットストリームに出力するステップ7を飛ばし、そうでなければステップ7を実行する。 Step 6. (S2006) Steps 6 to 8 are processes for encoding one bit of the lower skip flags. In this step, the next conditional branch is executed. The arithmetic unit 602 uses the encoding of the low-order skip flag that has already been encoded as the specific pattern data (typically, the encoding of the low-order skip flag of the last 1 bit and the encoding If all the skipped lower flags are 1), step 7 to be output to the next bit stream is skipped; otherwise, step 7 is executed.
 ステップ7.(S2007)演算ユニット602は符号化すべき下位のスキップフラグを符号化して、符号化データ出力部604からビットストリームに出力する。 Step 7. (S2007) The arithmetic unit 602 encodes the low-order skip flag to be encoded, and outputs it from the encoded data output unit 604 to the bit stream.
 ステップ8.(S2008)演算ユニット602は、スキップフラグ以外の、下位の予測モードを符号化して、符号化データ出力部604からビットストリームに出力する。また、演算ユニット602は、残差情報があるなら、残差情報を符号化して、符号化データ出力部604からビットストリームに出力する。 Step 8. (S2008) The arithmetic unit 602 encodes a lower prediction mode other than the skip flag, and outputs it from the encoded data output unit 604 to a bit stream. Also, if there is residual information, the arithmetic unit 602 encodes the residual information and outputs it from the encoded data output unit 604 to a bit stream.
 ステップ9.(S2009)演算ユニット602は、(下位のスキップフラグを含めた)下位のブロックをすべて符号化していればブロックの符号化を終了する。そうでなければ、次の下位のブロックを符号化するために、ステップ6に戻る。S2006からS2009のループは上位のブロックに属する下位のブロックの数に応じて回る回数が決まり、例えば下位のブロックが4つに分割されているなら4回だけ回すことになる。 Step 9. (S2009) If all the lower blocks (including the lower skip flag) have been encoded, the arithmetic unit 602 ends the block encoding. Otherwise, go back to step 6 to encode the next lower block. In the loop from S2006 to S2009, the number of turns depends on the number of lower-order blocks belonging to the higher-order block. For example, if the lower-order block is divided into four, it is turned only four times.
 エンコーダは、例えば、符号化すべき予測モードを切り替えながらステップ2~9を繰り返し試したうえで、符号化効率が良い予測モードを選択することで、圧縮率を向上させることができる。ただし、デコード可能なビットストリームを出力するために、このような繰り返しは必須ではなく、別の基準で予測モードを決めてもよい。 The encoder, for example, can improve the compression rate by repeatedly selecting the prediction mode with good encoding efficiency after repeatedly trying steps 2 to 9 while switching the prediction mode to be encoded. However, in order to output a decodable bitstream, such repetition is not essential, and the prediction mode may be determined based on another criterion.
 階層的なスキップフラグの復号化の流れは図7とほとんど同じである。図7に対応する、ブロック単位のスキップフラグの復号化の流れの一例を図18に示す。図18の流れは、S702~S708におけるCBPが、S1802~S1808におけるスキップフラグ(図18ではskipと表記)に置き換わる点が図7と異なる。対応するシンタックスは、例えば、図19のようになる。図19は、階層的なスキップフラグに対する本実施の形態を利用したフラグ削減の一例である。 The flow of decoding the hierarchical skip flag is almost the same as in FIG. FIG. 18 shows an example of the decoding flow of the block-by-block skip flag corresponding to FIG. The flow in FIG. 18 differs from FIG. 7 in that the CBP in S702 to S708 is replaced with a skip flag in S1802 to S1808 (indicated as skip in FIG. 18). The corresponding syntax is, for example, as shown in FIG. FIG. 19 is an example of flag reduction using this embodiment for hierarchical skip flags.
 (発明の効果) 
 以上に述べたように、本実施の形態を用いると、階層的なCBPやCBF、およびスキップフラグについて、その冗長性の排除により、圧縮率の高い符号化手段、およびその符号化手段により圧縮されたデータの復号化手段を提供できる。なお、本実施の形態での手段および方法は従来の冗長性を排除するものであって、新しい符号化モードやフラグの追加は行っていない。したがって、従来の符号化方法に対して本実施の形態に記載の方法でフラグの符号化を行うという変更のみを加えた符号化手段を用いるなら、符号量が減ることはあっても増えることはないと期待できる。
(The invention's effect)
As described above, when this embodiment is used, hierarchical CBP, CBF, and skip flag are compressed by encoding means having a high compression ratio and the encoding means by eliminating redundancy. Data decoding means can be provided. Note that the means and method in the present embodiment eliminate conventional redundancy and do not add new encoding modes or flags. Therefore, if an encoding unit is used in which only a change of performing flag encoding by the method described in this embodiment is used with respect to the conventional encoding method, the amount of code may be reduced, but increased. I can expect that.
 (コンピュータ上での実行、および変形について) 
 上述の実施形態の中で示した処理手順に示された指示は、ソフトウェアであるプログラムに基づいて実行されることが可能である。汎用の計算機システムが、このプログラムを予め記憶しておき、このプログラムを読み込むことにより、上述した実施形態の画像復号化方法および画像符号化方法による効果と同様な効果を得ることも可能である。上述の実施形態で記述された指示は、コンピュータに実行させることのできるプログラムとして、磁気ディスク(フレキシブルディスク、ハードディスクなど)、光ディスク(CD-ROM、CD-R、CD-RW、DVD-ROM、DVD±R、DVD±RWなど)、半導体メモリ、又はこれに類する記録媒体に記録される。コンピュータまたは組み込みシステムが読み取り可能な記憶媒体であれば、その記憶形式は何れの形態であってもよい。コンピュータは、この記録媒体からプログラムを読み込み、このプログラムに基づいてプログラムに記述されている指示をCPUで実行させれば、上述した実施形態の画像復号化方法および画像符号化方法と同様な動作を実現することができる。もちろん、コンピュータがプログラムを取得する場合又は読み込む場合はネットワークを通じて取得又は読み込んでもよい。 
 また、記憶媒体からコンピュータや組み込みシステムにインストールされたプログラムの指示に基づきコンピュータ上で稼働しているOS(オペレーティングシステム)や、データベース管理ソフト、ネットワーク等のMW(ミドルウェア)等が本実施形態を実現するための各処理の一部を実行してもよい。 
 さらに、本願発明における記憶媒体は、コンピュータあるいは組み込みシステムと独立した媒体に限らず、LANやインターネット等により伝達されたプログラムをダウンロードして記憶または一時記憶した記憶媒体も含まれる。 
 また、記憶媒体は1つに限られず、複数の媒体から本実施形態における処理が実行される場合も、本発明における記憶媒体に含まれ、媒体の構成は何れの構成であってもよい。
(About execution on computers and transformation)
The instructions shown in the processing procedure shown in the above-described embodiment can be executed based on a program that is software. A general-purpose computer system stores this program in advance and reads this program, so that it is possible to obtain the same effects as those obtained by the image decoding method and the image encoding method of the above-described embodiment. The instructions described in the above-described embodiments are, as programs that can be executed by a computer, magnetic disks (flexible disks, hard disks, etc.), optical disks (CD-ROM, CD-R, CD-RW, DVD-ROM, DVD). ± R, DVD ± RW, etc.), semiconductor memory, or a similar recording medium. As long as the computer or embedded system can read the storage medium, the storage format may be any form. If the computer reads the program from the recording medium and causes the CPU to execute instructions described in the program based on the program, the computer performs the same operation as the image decoding method and the image encoding method of the above-described embodiment. Can be realized. Of course, when the computer acquires or reads the program, it may be acquired or read through a network.
In addition, the OS (operating system), database management software, MW (middleware) such as a network, etc. running on the computer based on the instructions of the program installed in the computer or embedded system from the storage medium realize this embodiment. A part of each process for performing may be executed.
Furthermore, the storage medium in the present invention is not limited to a medium independent of a computer or an embedded system, but also includes a storage medium in which a program transmitted via a LAN or the Internet is downloaded and stored or temporarily stored.
Also, the number of storage media is not limited to one, and the processing in the present embodiment is executed from a plurality of media, and the configuration of the media is included in the storage media in the present invention.
 なお、本願発明におけるコンピュータまたは組み込みシステムは、記憶媒体に記憶されたプログラムに基づき、本実施形態における各処理を実行するためのものであって、パソコン、マイコン等の1つからなる装置、複数の装置がネットワーク接続されたシステム等の何れの構成であってもよい。 
 また、本願発明の実施形態におけるコンピュータとは、パソコンに限らず、情報処理機器に含まれる演算処理装置、マイコン等も含み、プログラムによって本発明の実施形態における機能を実現することが可能な機器、装置を総称している。
The computer or the embedded system in the present invention is for executing each process in the present embodiment based on a program stored in a storage medium, and includes a single device such as a personal computer or a microcomputer, Any configuration such as a system in which apparatuses are connected to a network may be used.
Further, the computer in the embodiment of the present invention is not limited to a personal computer, but includes an arithmetic processing device, a microcomputer, and the like included in an information processing device, and a device capable of realizing the functions in the embodiment of the present invention by a program, The device is a general term.
 なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。 Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
601…画像入力部、602、802…演算ユニット、603、803…データ用メモリ、604…符号化データ出力部、605、805…プログラム用メモリ、801…符号化データ入力部、804…画像出力部。 601: Image input unit, 602, 802 ... Arithmetic unit, 603, 803 ... Data memory, 604 ... Encoded data output unit, 605, 805 ... Program memory, 801 ... Encoded data input unit, 804 ... Image output unit .

Claims (6)

  1.  (1)第1番目から第N番目(N>1)の下位ブロックを含む上位ブロック内に予測残差信号が存在するかを示す上位コーデットパターンデータ、(2)第1番目から第N-1番目までの前記下位ブロックのそれぞれに予測残差信号が存在するかを示す下位コーデットパターンデータ、および、(3)前記下位ブロック単位の予測残差信号、を含む符号化データを入力する第1ステップと、
     前記上位コーデットパターンデータの値が前記上位ブロック内に予測残差信号が存在することを示す値であって、かつ、前記第1番目から第N-1番目までの前記下位ブロックについての前記下位コーデットパターンデータの値が特定の組み合わせである場合に、第N番目の下位ブロックの下位コーデットパターンデータとして予め定められた値を設定する第2ステップと、
     前記下位コーデットパターンデータに従って、前記第1番目から第N番目までの前記下位ブロックのうち予測残差信号が存在するブロックについて、前記符号化データ中の予測残差信号から復号画像を求める第3ステップと、
    を有する画像復号化方法。
    (1) Upper code pattern data indicating whether a prediction residual signal exists in an upper block including the first to Nth (N> 1) lower blocks, (2) 1st to N−1 A first step of inputting encoded data including low-order code pattern data indicating whether a prediction residual signal exists in each of the sub-blocks up to the th, and (3) a prediction residual signal in units of the low-order blocks When,
    The value of the high-order code pattern data is a value indicating that a prediction residual signal is present in the high-order block, and the low-order code for the first to (N−1) -th low-order blocks. A second step of setting a predetermined value as the low-order code pattern data of the Nth low-order block when the value of the pattern data is a specific combination;
    A third step of obtaining a decoded image from a prediction residual signal in the encoded data for a block in which a prediction residual signal exists among the first to Nth lower blocks according to the lower code pattern data. When,
    An image decoding method comprising:
  2.  前記下位ブロックは縦横それぞれ32画素のサイズであり、
     前記上位ブロックは2つまたは4つの下位ブロックを含み、
     前記上位コーデットパターンデータおよび前記下位コーデットパターンデータは、予測残差信号が存在する場合に1、予測残差信号が存在しない場合に0をとるフラグ情報であることを特徴とする請求項1に記載の画像復号化方法。
    The lower block is 32 pixels in length and width,
    The upper block includes two or four lower blocks,
    The high-order codet pattern data and the low-order codet pattern data are flag information that takes 1 when a prediction residual signal exists and 0 when a prediction residual signal does not exist. Image decoding method.
  3.  前記符号化データは、前記上位ブロック単位の予測情報をさらに含み、
     前記予測情報がダイレクトモードを示す値である場合には、前記上位コーデットパターンデータを予め定めた値に設定することを特徴とする請求項1に記載の画像復号化方法。
    The encoded data further includes prediction information of the upper block unit,
    2. The image decoding method according to claim 1, wherein when the prediction information is a value indicating a direct mode, the higher-order code pattern data is set to a predetermined value.
  4.  前記下位ブロックは縦横それぞれ4画素のサイズのブロックであり、
     前記上位ブロックは4個の前記下位ブロックを含む、縦横それぞれ8画素のサイズのブロックであり、
     前記上位コーデットパターンデータおよび前記下位コーデットパターンデータは、予測残差信号が存在する場合に1、予測残差信号が存在しない場合に0をとるフラグ情報であり、
     前記第2ステップは、第1番目から第3番目までの下位ブロックについての下位コーデットパターンデータの値がいずれも0である場合に、第4番目の下位ブロックについての下位コーデットパターンデータの値を1に設定する、
    ことを特徴とする請求項1に記載の画像復号化方法。
    The lower block is a block having a size of 4 pixels in both vertical and horizontal directions,
    The upper block is a block having a size of 8 pixels in both vertical and horizontal directions, including the four lower blocks.
    The higher-order code pattern data and the lower-order code pattern data are flag information that takes 1 when a prediction residual signal exists, and takes 0 when a prediction residual signal does not exist.
    In the second step, when the values of the lower code pattern data for the first to third lower blocks are all 0, the value of the lower code pattern data for the fourth lower block is set to 1. Set to
    The image decoding method according to claim 1, wherein:
  5.  (1)第1番目から第N番目(N>1)の下位ブロックを含む上位ブロックがスキップされたブロックであるかを示す上位スキップデータ、(2)第1番目から第N-1番目までの前記下位ブロックのそれぞれがスキップされたブロックであるかを示す下位スキップデータ、および、(3)前記下位ブロック単位の予測残差信号、を含む符号化データを入力する第1ステップと、
     前記上位スキップデータの値がスキップされたブロックではないことを示す値であり、かつ、前記第1番目から第N-1番目までの前記下位ブロックについての前記下位スキップデータの値が特定の組み合わせである場合に、第N番目の下位ブロックの下位スキップデータの値に予め定められた値を設定する第2ステップと、
     前記下位スキップデータに従って、前記第1番目から第N番目までの下位ブロックのうちスキップされていないブロックについて、前記符号化データ中の前記予測残差信号から復号画像を求める第3ステップと、
    を有する画像復号化方法。
    (1) Upper skip data indicating whether the upper block including the first to Nth (N> 1) lower blocks is a skipped block; (2) 1st to N−1th blocks A first step of inputting encoded data including lower skip data indicating whether each of the lower blocks is a skipped block, and (3) a prediction residual signal in units of the lower blocks;
    The value of the upper skip data is a value indicating that it is not a skipped block, and the values of the lower skip data for the first to N−1th lower blocks are in a specific combination. A second step of setting a predetermined value to the value of the lower skip data of the Nth lower block, if any;
    A third step of obtaining a decoded image from the prediction residual signal in the encoded data for blocks that are not skipped among the first to Nth lower blocks according to the lower skip data;
    An image decoding method comprising:
  6.  前記上位スキップデータおよび前記下位スキップデータは、スキップされたブロックであることを示す場合に1、スキップされたブロックではないことを示す場合に0をとるフラグ情報であって、
     前記第2ステップは、第1番目から第N-1番目までの下位ブロックについての前記下位スキップデータの値がいずれも1である組み合わせである場合に、前記第N番目の下位ブロックの前記下位スキップデータの値を0に設定する、
    ことを特徴とする請求項5に記載の画像復号化方法。
    The upper skip data and the lower skip data are flag information that takes 1 when indicating that it is a skipped block, and takes 0 when indicating that it is not a skipped block,
    In the second step, the low-order skip of the N-th low-order block is a combination in which the values of the low-order skip data for the first to (N-1) -th low-order blocks are all 1. Set the data value to 0,
    The image decoding method according to claim 5, wherein:
PCT/JP2010/055640 2010-03-30 2010-03-30 Image decoding method WO2011121715A1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/JP2010/055640 WO2011121715A1 (en) 2010-03-30 2010-03-30 Image decoding method
JP2012508020A JPWO2011121843A1 (en) 2010-03-30 2010-11-26 Image encoding and image decoding method
CN2010800376170A CN102484716A (en) 2010-03-30 2010-11-26 Image coding and image decoding method
PCT/JP2010/071155 WO2011121843A1 (en) 2010-03-30 2010-11-26 Image coding and image decoding method
KR1020127004738A KR20120043014A (en) 2010-03-30 2010-11-26 Image coding and image decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/055640 WO2011121715A1 (en) 2010-03-30 2010-03-30 Image decoding method

Publications (1)

Publication Number Publication Date
WO2011121715A1 true WO2011121715A1 (en) 2011-10-06

Family

ID=44711509

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/JP2010/055640 WO2011121715A1 (en) 2010-03-30 2010-03-30 Image decoding method
PCT/JP2010/071155 WO2011121843A1 (en) 2010-03-30 2010-11-26 Image coding and image decoding method

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/071155 WO2011121843A1 (en) 2010-03-30 2010-11-26 Image coding and image decoding method

Country Status (4)

Country Link
JP (1) JPWO2011121843A1 (en)
KR (1) KR20120043014A (en)
CN (1) CN102484716A (en)
WO (2) WO2011121715A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013107309A1 (en) * 2012-01-19 2013-07-25 Mediatek Singapore Pte. Ltd. Method and apparatus for coded block flag coding in high efficiency video coding
CN104137545A (en) * 2012-01-19 2014-11-05 联发科技(新加坡)私人有限公司 Method and apparatus for coded block flag coding in high efficiency video coding
JP2015065645A (en) * 2013-09-25 2015-04-09 三菱電機株式会社 Image estimation method
JP2015065644A (en) * 2013-09-25 2015-04-09 三菱電機株式会社 Image estimation method
JP2015226111A (en) * 2014-05-26 2015-12-14 キヤノン株式会社 Image processing apparatus and control method thereof

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012121284A1 (en) * 2011-03-10 2012-09-13 シャープ株式会社 Image decoding apparatus, image encoding apparatus, and data structure of encoded data
US10390016B2 (en) 2011-11-04 2019-08-20 Infobridge Pte. Ltd. Apparatus of encoding an image
KR20130049524A (en) * 2011-11-04 2013-05-14 오수미 Method for generating intra prediction block
CN103118250B (en) * 2011-11-16 2017-09-26 中兴通讯股份有限公司 A kind of decoding method and device of frame in division symbolizing
US9462275B2 (en) * 2012-01-30 2016-10-04 Qualcomm Incorporated Residual quad tree (RQT) coding for video coding
CN104380737B (en) * 2012-06-22 2018-10-26 夏普株式会社 Arithmetic decoding device
WO2014000160A1 (en) * 2012-06-26 2014-01-03 Intel Corporation Inter-layer coding unit quadtree pattern prediction
CN104604225B (en) * 2012-09-10 2018-01-26 太阳专利托管公司 Method for encoding images, picture decoding method, picture coding device, picture decoding apparatus and image encoding/decoding device
CN103826115B (en) * 2014-03-21 2016-03-02 华为技术有限公司 The coding and decoding processing method of Iamge Segmentation mode and device
JP7168581B2 (en) * 2017-11-22 2022-11-09 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
JP6810827B2 (en) * 2018-03-05 2021-01-06 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Encoding device, decoding device, coding method and decoding method
CN118555394A (en) * 2019-04-26 2024-08-27 松下电器(美国)知识产权公司 Decoding device and non-transitory computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003324731A (en) * 2002-04-26 2003-11-14 Sony Corp Encoder, decoder, image processing apparatus, method and program for them
JP2009510962A (en) * 2005-10-03 2009-03-12 ノキア コーポレイション Adaptive variable length code for independent variables
JP2009531997A (en) * 2006-03-27 2009-09-03 クゥアルコム・インコーポレイテッド Method and system for encoding and decoding information related to video compression

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101258756A (en) * 2005-07-21 2008-09-03 诺基亚公司 Variable length codes for scalable video coding
US20070230564A1 (en) * 2006-03-29 2007-10-04 Qualcomm Incorporated Video processing with scalability
US8634456B2 (en) * 2008-10-03 2014-01-21 Qualcomm Incorporated Video coding with large macroblocks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003324731A (en) * 2002-04-26 2003-11-14 Sony Corp Encoder, decoder, image processing apparatus, method and program for them
JP2009510962A (en) * 2005-10-03 2009-03-12 ノキア コーポレイション Adaptive variable length code for independent variables
JP2009531997A (en) * 2006-03-27 2009-09-03 クゥアルコム・インコーポレイテッド Method and system for encoding and decoding information related to video compression

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013107309A1 (en) * 2012-01-19 2013-07-25 Mediatek Singapore Pte. Ltd. Method and apparatus for coded block flag coding in high efficiency video coding
WO2013107027A1 (en) * 2012-01-19 2013-07-25 Mediatek Singapore Pte. Ltd. Methods and apparatuses of cbf coding in hevc
CN104137545A (en) * 2012-01-19 2014-11-05 联发科技(新加坡)私人有限公司 Method and apparatus for coded block flag coding in high efficiency video coding
AU2013211390B2 (en) * 2012-01-19 2015-10-29 Hfi Innovation Inc. Method and apparatus for coded block flag coding in high efficiency video coding
US9930330B2 (en) 2012-01-19 2018-03-27 Hfi Innovation Inc. Method and apparatus for coded block flag coding in high efficiency video coding
US10531122B2 (en) 2012-01-19 2020-01-07 Hfi Innovation Inc. Method and apparatus for coded block flag coding in high efficiency video coding
JP2015065645A (en) * 2013-09-25 2015-04-09 三菱電機株式会社 Image estimation method
JP2015065644A (en) * 2013-09-25 2015-04-09 三菱電機株式会社 Image estimation method
JP2015226111A (en) * 2014-05-26 2015-12-14 キヤノン株式会社 Image processing apparatus and control method thereof

Also Published As

Publication number Publication date
CN102484716A (en) 2012-05-30
JPWO2011121843A1 (en) 2013-07-04
WO2011121843A1 (en) 2011-10-06
KR20120043014A (en) 2012-05-03

Similar Documents

Publication Publication Date Title
WO2011121715A1 (en) Image decoding method
TWI753356B (en) Method and apparatuses for coding transform blocks
KR102006236B1 (en) Methods of coding block information using quadtree and appararuses for using the same
JP6408098B2 (en) Video decoding method and video decoding apparatus
JP5819347B2 (en) Skip macroblock coding
RU2406258C2 (en) Method and system for coding and decoding of information related to compression of video signal
KR101538837B1 (en) Multiple sign bit hiding within a transform unit
TWI520584B (en) Signaling syntax elements for transform coefficients for sub-sets of a leaf-level coding unit
TWI650012B (en) Apparatus, method, and storage medium for data encoding and decoding
CN103597838A (en) Methods and devices for coding and decoding the position of the last significant coefficient
TW202131681A (en) Determining a parametrization for context-adaptive binary arithmetic coding
TWI738167B (en) Encoding and decoding a picture
JP6708211B2 (en) Moving picture coding apparatus, moving picture coding method, and recording medium storing moving picture coding program
JP6421426B2 (en) Encoding method conversion apparatus and program
US20120147972A1 (en) Image decoding apparatus, image decoding method, image encoding apparatus, image encoding method, and program
JP7531683B2 (en) Encoding device, decoding device, and program

Legal Events

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

Ref document number: 10848895

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10848895

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP