WO2011007719A1 - 画像処理装置および方法 - Google Patents

画像処理装置および方法 Download PDF

Info

Publication number
WO2011007719A1
WO2011007719A1 PCT/JP2010/061658 JP2010061658W WO2011007719A1 WO 2011007719 A1 WO2011007719 A1 WO 2011007719A1 JP 2010061658 W JP2010061658 W JP 2010061658W WO 2011007719 A1 WO2011007719 A1 WO 2011007719A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
prediction mode
mode
quantization parameter
information
Prior art date
Application number
PCT/JP2010/061658
Other languages
English (en)
French (fr)
Inventor
佐藤 数史
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Priority to US13/383,400 priority Critical patent/US20120128064A1/en
Priority to RU2012100264/08A priority patent/RU2012100264A/ru
Priority to CN2010800311072A priority patent/CN102474618A/zh
Priority to BR112012000618A priority patent/BR112012000618A2/pt
Priority to EP10799777A priority patent/EP2456205A1/en
Publication of WO2011007719A1 publication Critical patent/WO2011007719A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • 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
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode

Definitions

  • the present invention relates to an image processing apparatus and method, and more particularly, to an image processing apparatus and method for improving encoding efficiency in VLC encoding.
  • MPEG2 (ISO / IEC 13818-2) is defined as a general-purpose image encoding system, and is a standard that covers both interlaced scanning images and progressive scanning images, as well as standard resolution images and high-definition images.
  • MPEG2 is currently widely used in a wide range of applications for professional and consumer applications.
  • a code amount (bit rate) of 4 to 8 Mbps is assigned to an interlaced scanned image having a standard resolution of 720 ⁇ 480 pixels.
  • a high resolution interlaced scanned image having 1920 ⁇ 1088 pixels is assigned a code amount (bit rate) of 18 to 22 Mbps.
  • bit rate code amount
  • MPEG2 was mainly intended for high-quality encoding suitable for broadcasting, but it did not support encoding methods with a lower code amount (bit rate) than MPEG1, that is, a higher compression rate. With the widespread use of mobile terminals, the need for such an encoding system is expected to increase in the future, and the MPEG4 encoding system has been standardized accordingly. Regarding the image coding system, the standard was approved as an international standard in December 1998 as ISO / IEC 14496-2.
  • H. The standardization of 26L (ITU-T Q6 / 16 ⁇ VCEG) is in progress.
  • H. 26L is known to achieve higher encoding efficiency than the conventional encoding schemes such as MPEG2 and MPEG4, although a large amount of calculation is required for encoding and decoding.
  • this H. Based on 26L, H. Standardization to achieve higher coding efficiency by incorporating functions that are not supported by 26L is performed as JointJModel of Enhanced-Compression Video Coding.
  • H. H.264 and MPEG-4 Part 10 Advanced Video Coding, hereinafter referred to as H.264 / AVC).
  • CAVLC a VLC table that is switched in accordance with generation of orthogonal transform coefficients in a peripheral block is used for encoding orthogonal transform coefficients.
  • an exponential Golomb code shown in FIG. 1 is used for the encoding of other syntax elements.
  • code number 0 and code word 1 correspond, code number 1 and code word 010 correspond, code number 2 and code The word 011 corresponds.
  • code number 3 corresponds to code word 00100
  • code number 4 corresponds to code word 00101
  • code number 5 corresponds to code word 00110
  • code number 6 corresponds to code word 00111. is doing.
  • FIG. 3 shows a configuration example of a lossless encoding unit that performs CABACBA encoding.
  • the lossless encoding unit includes a context modeling unit 11, a binarization unit 12, and an adaptive binary arithmetic encoding unit 13 including a probability estimation unit 21 and an encoding engine 22. .
  • the context modeling unit 11 first converts a symbol (symbol) of a syntax element into an appropriate context model according to a past history regarding an arbitrary syntax element in a compressed image.
  • a symbol symbol
  • CABAC CABAC encoding
  • the flag mb_skip_frag will be described as an example with reference to FIG. 4, but the same applies to the processing for other syntax elements.
  • f (X) is set to 1 when the macroblock X is a skipped macroblock that directly uses pixels at spatially corresponding positions in the reference frame, and is set to 0 otherwise.
  • the context Context (C) for the target macroblock C takes a value of 0, 1, 2 depending on the flags mb_skip_frag of the adjacent macroblocks A and B. That is, the flag mb_skip_frag for the target macroblock C is encoded using any one of 0, 1, and 2 different encoding engines 22.
  • the binarization unit 12 converts symbols of elements that are non-binarized data on the basis of the table shown in FIG.
  • the macroblock type is not based on this table, but is binarized based on a separately specified irregular table shown in FIGS. 6 to 8 for each of the I slice, P slice, and B slice. Processing is performed.
  • FIG. 6 shows a macroblock type binarization table in the case of I and SI slices.
  • a macroblock type value (Value (name) of mb_type) from 0 to 25 and a binary string (Bin string) corresponding thereto are shown.
  • FIG. 7 shows a binarization table of macro block types in the case of P, SP, and B slices.
  • values of macroblock types 0 to 30 in the case of P and SP slices and corresponding binary sequences are shown, and macroblock types 0 to 48 in the case of B slices. And the binarization sequence corresponding thereto are shown.
  • FIG. 8 shows a sub-macroblock type binarization table for P, SP, and B slices.
  • the values of macroblock types 0 to 3 in the case of P and SP slices and the binarized columns corresponding thereto are shown.
  • the macroblock types 0 to 12 in the case of B slices are shown.
  • the binarization sequence corresponding thereto are shown.
  • the syntax elements binarized by the binarization table as described above are encoded by the adaptive binary arithmetic encoding unit 13 at the subsequent stage.
  • probability estimation is performed on the binarized symbol by the probability estimation unit 21, and the binary arithmetic code based on the probability estimation is performed by the encoding engine 22. Is applied. At that time, the probabilities “0” and “1” are initialized at the head of the slice, and the probability table is updated every time 1 Bin is encoded. In other words, after the binary arithmetic coding process is performed, the related model is updated, so that each model can perform the coding process according to the statistics of the actual image compression information.
  • bit string “010” as an input signal is encoded when the occurrence (appearance) probability of “1” is 0.2 and the occurrence probability of “0” is 0.8.
  • step S1 '0' is encoded.
  • step S2 '1' is encoded.
  • step S3 '1' is encoded.
  • step S3 the upper 0.2 in the figure in the current section (0.0-0.8) becomes a new update section (0.64-0.8).
  • step S3 “0” is encoded.
  • the lower 0.8 in the figure in the current section (0.64-0.8) becomes a new update section (0.64-0.768).
  • the code word of the arithmetic code is a binary representation of a real value that specifies the final interval.
  • 0.64 to 0.768 is the final interval, so 0.75 can be taken as the real number in between. Since the binary representation of the real number 0.75 is 0.11, in step S4, “11” after removing the first digit that is always 0 from the binary representation (0.11) is taken as the code word, and finally In addition, a signal “11” is output.
  • the number of digits of the register holding the section interval such as “0.64” in FIG. 9 is actually finite. Therefore, in the processing of the adaptive binary arithmetic encoding unit 13, when the upper bits of the section to be output are determined in the binary arithmetic encoding of FIG. 9, timely fixed bits are output to widen the section width. A technique called renormalization is added.
  • step S2 “1” is encoded. As a result, the upper 0.2 in the figure in the current section (0.0-0.8) becomes the new update section (0.64-0.8). In step S3, since the section (0.64-0.8) exceeds 0.5, “1” is output at this time, and the range between 0.5 and 1.0 is expanded (renormalized) between 0.0 and 1.0. As a result, the normalized interval becomes (0.28-0.6).
  • step S3 ′ “0” is encoded.
  • the lower 0.8 in the figure in the current section (0.28-0.6) becomes a new update section (0.28-0.536).
  • 0.5 can be taken as a real number in between. Since the binary representation of the real number 0.5 is 0.1, in step S4 ′, “1” after removing the first digit that is always 0 from the binary representation (0.1) is used as the code word. Therefore, a signal “1” is output.
  • JM Joint Model
  • JM the following two modes can be selected: High Complexity Mode or Low Complexity Mode.
  • a cost function represented by the following equation (3) is used, and a cost function value is calculated for each prediction mode. Then, the prediction mode that gives the minimum value of the calculated cost function value is selected as the optimal prediction mode for the target block (or macroblock).
  • is the entire set of candidate modes for encoding the target block (or macroblock).
  • D is the difference (distortion) energy between the original image and the decoded image when encoded in the prediction mode (Mode).
  • R is a total code amount when encoding is performed in a prediction mode (Mode) including up to orthogonal transform coefficients.
  • is a Lagrange undetermined multiplier given as a function of the quantization parameter QP.
  • a cost function represented by the following equation (4) is used, and a cost function value is calculated for each prediction mode. Then, the prediction mode that gives the minimum value of the calculated cost function value is selected as the optimal prediction mode for the target block (or macroblock).
  • Cost (Mode ⁇ ) D + QPtoQuant (QP) ⁇ HeaderBit (4)
  • D is the difference (distortion) energy between the predicted image and the input image.
  • HeaderBit is a code amount related to information belonging to the header, such as a motion vector and a prediction mode, that does not include an orthogonal transform coefficient.
  • QPtoQuant is a function given as a function of the quantization parameter QP.
  • each graph represents the appearance frequency of each prediction mode
  • the horizontal axis represents the types of prediction modes of mode 0 to mode 7.
  • mode 0 (copy) represents a skip mode or direct mode
  • mode 1 (16 ⁇ 16) represents an inter 16 ⁇ 16 (pixel) mode
  • Mode 2 (16 ⁇ 8) represents an inter 16 ⁇ 8 (pixel) mode
  • mode 3 (8 ⁇ 16) represents an inter 8 ⁇ 16 (pixel) mode
  • Mode 4 (8 ⁇ 8) represents all modes having a block size of 8 ⁇ 8 (pixels) or less.
  • Mode 5 represents an intra 4 ⁇ 4 (pixel) mode
  • mode 6 represents an intra 8 ⁇ 8 (pixel) mode
  • mode 7 represents an intra 16 ⁇ 16 (pixel) mode.
  • the modes related to the inter are from mode 0 to mode 4 in descending order of the block size from the left, and the modes related to the intra are modes 5 to 7 from the left in the order from the small block size.
  • the first difference is that in the low quantization parameter, the appearance frequency of all modes having a block size of 8 ⁇ 8 or less expressed in mode 4 is appropriate, but in the high quantization parameter, it is almost the same. It does not appear.
  • the second difference is that the inter 16 ⁇ 16 mode represented by mode 1 has the highest appearance frequency in the low quantization parameter, but the skip mode and direct mode represented by mode 0 in the high quantization parameter.
  • the appearance frequency of is high.
  • the difference in the appearance frequency described above with reference to FIG. 11 corresponds to the update of the probability table by the context model described above with reference to FIG. 3 in CABAC, and the encoding corresponding to each quantization parameter. Processing will be performed.
  • the present invention has been made in view of such a situation, and improves encoding efficiency in VLC encoding.
  • the first image processing apparatus of the present invention includes a quantization parameter decoding unit that decodes a quantization parameter in a target block to be decoded, and information on a prediction mode for the target block according to the quantization parameter.
  • a switching unit that switches a decoding method; and a prediction mode decoding unit that decodes information about the prediction mode by the decoding method switched by the switching unit.
  • the switching unit can switch the decoding method by switching a VLC (Variable Length Coding) table for information on the prediction mode according to the quantization parameter.
  • VLC Very Length Coding
  • the information on the prediction mode is macro block type information.
  • the information on the prediction mode is information on the intra prediction mode.
  • the switching means can switch to a table having a short bit length for an event having a small code number in the case of a quantization parameter having a value larger than a predetermined threshold.
  • the switching means can switch to a table in which the increase in bit length is moderate even if the code number increases.
  • the encoding means can use Golomb code as the VLC table.
  • the encoding means can use a Huffman code as the VLC table.
  • the switching means can switch the decoding method by switching the code number assignment to the information related to the prediction mode according to the quantization parameter.
  • the information on the prediction mode is information on the inter macro block type.
  • the switching means can switch the skip or direct mode allocation to the minimum code number in the case of a quantization parameter having a value larger than a predetermined threshold.
  • the switching means can switch the allocation of the inter 16 ⁇ 16 prediction mode to the minimum code number in the case of a quantization parameter whose value is smaller than a predetermined threshold value.
  • the information on the prediction mode is information on the intra prediction mode.
  • the image processing apparatus decodes the quantization parameter in the target block to be decoded, and information on the prediction mode for the target block according to the quantization parameter. And decoding information related to the prediction mode using the switched decoding method.
  • An image processing apparatus includes a quantization parameter acquisition unit that acquires a quantization parameter in a target block to be encoded, and a prediction mode for the target block according to the quantization parameter.
  • the switching means can switch the encoding method by switching a VLC (Variable Length Coding) table for information on the prediction mode according to the quantization parameter.
  • VLC Very Length Coding
  • the switching means can switch to a table having a short bit length for an event having a small code number in the case of a quantization parameter having a value larger than a predetermined threshold.
  • the switching means can switch to a table in which the increase in bit length is moderate even if the code number increases.
  • the switching means can switch the coding method by switching the code number assignment for the information related to the prediction mode according to the quantization parameter.
  • the image processing method relates to a prediction mode for the target block, in which the image processing apparatus acquires the quantization parameter in the target block to be encoded, and according to the quantization parameter.
  • the method includes switching the information encoding method and encoding the information related to the prediction mode with the switched encoding method.
  • the quantization parameter in the target block to be decoded is decoded, and the decoding method of information related to the prediction mode for the target block is switched according to the quantization parameter. And the information regarding the prediction mode is decoded by the switched decoding method.
  • a quantization parameter in a target block to be encoded is acquired, and an encoding method of information related to a prediction mode for the target block is switched according to the quantization parameter. . Then, information on the prediction mode is encoded by the switched encoding method.
  • each of the above-described image processing apparatuses may be an independent apparatus, or may be an internal block constituting one image encoding apparatus or image decoding apparatus.
  • an image can be decoded. Further, according to the first aspect of the present invention, it is possible to improve the encoding efficiency in the VLC encoding.
  • an image can be encoded. Further, according to the second aspect of the present invention, it is possible to improve the encoding efficiency in the VLC encoding.
  • FIG. 13 is a flowchart for describing an encoding process of the image encoding device in FIG. 12. It is a flowchart explaining the prediction process of step S21 of FIG. It is a figure explaining the processing order in the case of 16 * 16 pixel intra prediction mode. It is a figure which shows the kind of 4 * 4 pixel intra prediction mode of a luminance signal. It is a figure which shows the kind of 4 * 4 pixel intra prediction mode of a luminance signal. It is a figure explaining the direction of 4 * 4 pixel intra prediction. It is a figure explaining intra prediction of 4x4 pixels. It is a figure which shows the kind of 8x8 pixel intra prediction mode of a luminance signal.
  • step S138 of FIG. It is a flowchart explaining the prediction process of step S138 of FIG. It is a block diagram which shows the structure of one Embodiment of the learning apparatus to which this invention is applied. It is a figure explaining a Huffman code. It is a flowchart explaining the learning flow of the learning apparatus of FIG. It is a block diagram which shows the structural example of the hardware of a computer.
  • FIG. 12 shows a configuration of an embodiment of an image encoding apparatus as an image processing apparatus to which the present invention is applied.
  • This image encoding device 51 is, for example, H.264. 264 and MPEG-4 Part10 (Advanced Video Coding) (hereinafter referred to as H.264 / AVC) format is used for compression coding.
  • H.264 / AVC Advanced Video Coding
  • the image encoding device 51 includes an A / D conversion unit 61, a screen rearrangement buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, an accumulation buffer 67, Inverse quantization unit 68, inverse orthogonal transform unit 69, operation unit 70, deblock filter 71, frame memory 72, switch 73, intra prediction unit 74, motion prediction / compensation unit 75, predicted image selection unit 76, rate control unit 77 And a mode table switching unit 78.
  • the A / D converter 61 A / D converts the input image, outputs it to the screen rearrangement buffer 62, and stores it.
  • the screen rearrangement buffer 62 rearranges the stored frames in the display order in the order of frames for encoding in accordance with GOP (Group of Picture).
  • the calculation unit 63 subtracts the prediction image from the intra prediction unit 74 or the prediction image from the motion prediction / compensation unit 75 selected by the prediction image selection unit 76 from the image read from the screen rearrangement buffer 62, The difference information is output to the orthogonal transform unit 64.
  • the orthogonal transform unit 64 subjects the difference information from the calculation unit 63 to orthogonal transform such as discrete cosine transform and Karhunen-Loeve transform, and outputs the transform coefficient.
  • the quantization unit 65 quantizes the transform coefficient output from the orthogonal transform unit 64.
  • the quantized transform coefficient that is the output of the quantization unit 65 is input to the lossless encoding unit 66, where lossless encoding such as variable length encoding and arithmetic encoding is performed and compressed.
  • lossless encoding unit 66 as a lossless encoding method, H.264 is used.
  • Variable length coding is performed by CAVLC (Context-Adaptive Variable Length Coding) defined in the H.264 / AVC format.
  • the lossless encoding unit 66 encodes the quantized transform coefficient and also encodes a syntax element, which is a part of header information in the compressed image. At this time, the lossless encoding unit 66 encodes information regarding the prediction mode among the syntax elements by the encoding method switched by the mode table switching unit 78. The lossless encoding unit 66 supplies the encoded data to the accumulation buffer 67 for accumulation.
  • the syntax elements include information on the prediction mode acquired from the intra prediction unit 74 or the motion prediction / compensation unit 75, quantization parameters acquired from the rate control unit 77, and motion vector information acquired from the motion prediction / compensation unit 75. And reference frame information. Moreover, as information regarding a prediction mode, there exists information on a macroblock type and information about which intra prediction mode (hereinafter, referred to as information of an intra prediction mode), for example.
  • Macro block type information is acquired from the motion prediction / compensation unit 75 and the intra prediction unit 74.
  • Information on the intra prediction mode is acquired from the intra prediction unit 74 as necessary.
  • the accumulation buffer 67 converts the data supplied from the lossless encoding unit 66 to H.264. As a compressed image encoded by the H.264 / AVC format, for example, it is output to a recording device or a transmission path (not shown) in the subsequent stage.
  • the quantized transform coefficient output from the quantization unit 65 is also input to the inverse quantization unit 68, and after inverse quantization, the inverse orthogonal transform unit 69 further performs inverse orthogonal transform.
  • the output subjected to the inverse orthogonal transform is added to the predicted image supplied from the predicted image selection unit 76 by the calculation unit 70 to be a locally decoded image.
  • the deblocking filter 71 removes block distortion from the decoded image, and then supplies the deblocking filter 71 to the frame memory 72 for accumulation.
  • the image before the deblocking filter processing by the deblocking filter 71 is also supplied to the frame memory 72 and accumulated.
  • the switch 73 outputs the reference image stored in the frame memory 72 to the motion prediction / compensation unit 75 or the intra prediction unit 74.
  • an I picture, a B picture, and a P picture from the screen rearrangement buffer 62 are supplied to the intra prediction unit 74 as images to be intra predicted (also referred to as intra processing). Further, the B picture and the P picture read from the screen rearrangement buffer 62 are supplied to the motion prediction / compensation unit 75 as an image to be inter-predicted (also referred to as inter-processing).
  • the intra prediction unit 74 performs intra prediction processing of all candidate intra prediction modes based on the image to be intra predicted read from the screen rearrangement buffer 62 and the reference image supplied from the frame memory 72, and performs prediction. Generate an image. At that time, the intra prediction unit 74 calculates cost function values for all candidate intra prediction modes, and selects an intra prediction mode in which the calculated cost function value gives the minimum value as the optimal intra prediction mode.
  • the intra prediction unit 74 supplies the predicted image generated in the optimal intra prediction mode and its cost function value to the predicted image selection unit 76.
  • the intra prediction unit 74 includes the information on the optimal intra prediction mode together with the corresponding macroblock type information on the lossless encoding unit 66.
  • the lossless encoding unit 66 encodes these pieces of information as syntax elements and uses them as a part of header information in the compressed image.
  • the motion prediction / compensation unit 75 performs motion prediction / compensation processing for all candidate inter prediction modes.
  • the inter prediction image read from the screen rearrangement buffer 62 and the reference image from the frame memory 72 are supplied to the motion prediction / compensation unit 75 via the switch 73.
  • the motion prediction / compensation unit 75 detects motion vectors of all candidate inter prediction modes based on the inter-processed image and the reference image, performs compensation processing on the reference image based on the motion vector, and converts the predicted image into a predicted image. Generate.
  • the motion prediction / compensation unit 75 calculates cost function values for all candidate inter prediction modes.
  • the motion prediction / compensation unit 75 determines a prediction mode that gives the minimum value among the calculated cost function values as the optimal inter prediction mode.
  • the motion prediction / compensation unit 75 supplies the predicted image generated in the optimal inter prediction mode and its cost function value to the predicted image selection unit 76.
  • the motion prediction / compensation unit 75 sends the macro block type information corresponding to the optimal inter prediction mode to the lossless encoding unit 66. Output.
  • the lossless encoding unit 66 performs lossless encoding processing using the information from the motion prediction / compensation unit 75 as a syntax element, and inserts the information into the header portion of the compressed image.
  • the predicted image selection unit 76 determines the optimal prediction mode from the optimal intra prediction mode and the optimal inter prediction mode based on each cost function value output from the intra prediction unit 74 or the motion prediction / compensation unit 75. Then, the predicted image selection unit 76 selects a predicted image in the determined optimal prediction mode and supplies the selected predicted image to the calculation units 63 and 70. At this time, the predicted image selection unit 76 supplies the selection information of the predicted image to the intra prediction unit 74 or the motion prediction / compensation unit 75.
  • the rate control unit 77 controls the quantization operation rate of the quantization unit 65 based on the compressed image stored in the storage buffer 67 so as not to cause an overflow or underflow.
  • the quantization parameter used for controlling the rate of the quantization unit 65 is supplied to the mode table switching unit 78 and the lossless encoding unit 66.
  • the mode table switching unit 78 switches the encoding method for the information related to the prediction mode according to the quantization parameter from the rate control unit 77, and supplies the information on the switched encoding method to the lossless encoding unit 66. For example, the VLC table for information regarding the prediction mode is switched.
  • FIG. 3 is a diagram illustrating an example of a block size for motion prediction / compensation in the H.264 / AVC format.
  • macroblocks composed of 16 ⁇ 16 pixels divided into 16 ⁇ 16 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, and 8 ⁇ 8 pixel partitions are sequentially shown from the left. ing.
  • 8 ⁇ 8 pixel partitions divided into 8 ⁇ 8 pixel, 8 ⁇ 4 pixel, 4 ⁇ 8 pixel, and 4 ⁇ 4 pixel subpartitions are sequentially shown. Yes.
  • one macroblock is divided into any partition of 16 ⁇ 16 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, or 8 ⁇ 8 pixels, and independent motion vector information is obtained. It is possible to have.
  • an 8 ⁇ 8 pixel partition is divided into 8 ⁇ 8 pixel, 8 ⁇ 4 pixel, 4 ⁇ 8 pixel, or 4 ⁇ 4 pixel subpartitions and has independent motion vector information. Is possible.
  • FIG. It is a figure explaining the production
  • a target block E to be encoded (for example, 16 ⁇ 16 pixels) and blocks A to D that have already been encoded and are adjacent to the target block E are shown.
  • the block D is adjacent to the upper left of the target block E
  • the block B is adjacent to the upper side of the target block E
  • the block C is adjacent to the upper right of the target block E
  • the block A is , Adjacent to the left of the target block E.
  • the blocks A to D are not divided represent blocks having any one of the 16 ⁇ 16 pixels to 4 ⁇ 4 pixels described above with reference to FIG.
  • the predicted motion vector information for the current block E pmv E is block A, B, by using the motion vector information on C, is generated as in the following equation by median prediction (5).
  • the motion vector information related to the block C may be unavailable (unavailable) because it is at the edge of the image frame or is not yet encoded. In this case, the motion vector information regarding the block C is substituted with the motion vector information regarding the block D.
  • the data mvd E added to the header portion of the compressed image as motion vector information for the target block E is generated as in the following equation (6) using pmv E.
  • mvd E mv E -pmv E (6)
  • processing is performed independently for each of the horizontal and vertical components of the motion vector information.
  • Motion vector information can be reduced.
  • the motion vector information of the target block is extracted from the motion vector information around the target block or the motion vector information of the co-located block whose coordinates are the same as the target block in the reference picture. . Therefore, there is no need to send motion vector information to the decoding side.
  • the spatial direct mode is a mode that mainly uses the correlation of motion information in the spatial direction (horizontal and vertical two-dimensional space in the picture), and is generally an image including similar motion, and the motion speed is Effective with changing images.
  • the temporal direct mode is a mode that mainly uses the correlation of motion information in the time direction, and is generally effective for images containing different motions and having a constant motion speed.
  • the spatial direct mode using the H.264 / AVC format will be described.
  • the target block E to be encoded for example, 16 ⁇ 16 pixels
  • the blocks A to D that have already been encoded and are adjacent to the target block E are shown.
  • Predicted motion vector information pmv E for the target block E is a block A, B, by using the motion vector information on C, is generated as described above wherein the median prediction (5).
  • the motion vector information mv E for the target block E in the spatial direct mode is expressed by the following equation (7).
  • mv E pmv E (7)
  • predicted motion vector information generated by median prediction is used as motion vector information of the target block. That is, the motion vector information of the target block is generated with the motion vector information of the encoded block. Therefore, since the motion vector in the spatial direct mode can be generated also on the decoding side, it is not necessary to send motion vector information.
  • the time axis t represents the passage of time, and in order from the left, an L0 (List0) reference picture, a current picture to be encoded, and an L1 (List1) reference picture are shown. .
  • the arrangement of the L0 reference picture, the target picture, and the L1 reference picture is H.264.
  • the H.264 / AVC format is not limited to this order.
  • the target block of the target picture is included in a B slice, for example. Therefore, for the target block of the target picture, L0 motion vector information mv L0 and L1 motion vector information mv L1 based on the temporal direct mode are calculated for the L0 reference picture and the L1 reference picture.
  • the motion vector information mv col in the co-located block which is a block at the same address (coordinates) as the current block to be encoded, is based on the L0 reference picture and the L1 reference picture. Is calculated.
  • the L0 motion vector information mv L0 in the target picture and the L1 motion vector information mv L1 in the target picture can be calculated by the following equation (8).
  • the encoded data related to the motion vector is 0 (in the case of the H.264 / AVC format, when the above equation (7) holds) and the DCT coefficients are all 0, the target block is in skip mode.
  • the target block is in the skip mode.
  • the direct mode is used and the DCT coefficient is 0, the target block is in the skip mode.
  • FIG. 16 is a block diagram illustrating a configuration example of the mode table switching unit.
  • the mode table switching unit 78 includes a VLC (Variable Length Coding) table switching unit 81 and a code number allocation unit 82.
  • VLC Very Length Coding
  • the quantization parameter from the rate control unit 77 is supplied to the VLC table switching unit 81 and the code number assigning unit 82. This quantization parameter is also supplied to the lossless encoding unit 66.
  • the VLC table switching unit 81 has at least two types of VLC tables for the macro block type.
  • the VLC table switching unit 81 selects one of the VLC tables for the two types of macroblock types according to the quantization parameter from the rate control unit 77.
  • the VLC table switching unit 81 adds the allocation information from the code number allocation unit 82 to the information of the VLC table for the selected macroblock type, and supplies the information to the lossless encoding unit 66.
  • the code number assigning unit 82 assigns a predetermined macroblock type to the code number 0 according to the quantization parameter from the rate control unit 77, and supplies the assignment information to the VLC table switching unit 81.
  • the lossless encoding unit 66 is H.264. Based on the H.264 / AVC standard, syntax elements other than orthogonal transform coefficients and macroblock types (including quantization parameters from the rate control unit 77) are encoded. On the other hand, the lossless encoding unit 66 performs encoding for the macroblock type using the VLC table selected by the VLC table switching unit 81.
  • code number 0 and codeword 1 correspond, code number 1 and codeword 01 correspond, code number 2 and codeword 001 correspond, Number 3 corresponds to codeword 0001. Also, code number 4 corresponds to code word 00001, code number 5 corresponds to code word 00001, and code number 6 corresponds to code word 00000001.
  • code number 0 and codeword 10 correspond, code number 1 and codeword 11 correspond, code number 2 and codeword 010 correspond, Number 3 corresponds to codeword 011.
  • the code number 4 corresponds to the code word 0010, the code number 5 corresponds to the code word 0011, and the code number 6 corresponds to the code word 00010.
  • the generation rule of the Golomb code is as follows.
  • this value is an integer value, ie, k is a power of 2
  • m is encoded with a binary code of log 2 k.
  • b [log 2 k]
  • the code number assigning unit 82 assigns the inter 16 ⁇ 16 mode to the code number “0” that can be expressed with the smallest bit length at a higher bit rate (that is, a lower quantization parameter).
  • the code number assigning unit 82 assigns the skip (or direct) mode to the code number “0” at a lower bit rate (that is, a higher quantization parameter). In this way, the average code length can be further shortened.
  • the VLC table switching unit 81 compares a predetermined threshold value with the value of the quantization parameter, and switches a table used for macroblock type encoding from a plurality of tables according to the quantization parameter. Further, the code number assigning unit 82 switches the assignment of the code number “1” according to the quantization parameter. Note that this predetermined threshold is obtained, for example, when learning a VLC table described later in FIG.
  • the average code length for the macroblock type can be shortened in the compressed image to be output at a low bit rate and a high hit rate, and higher encoding efficiency can be realized.
  • the macro block type related to the inter macro block has been described as an example, but in the above description, the VLC table switching is the same for the intra macro block.
  • the Golomb code has been described as an example, but a VLC table generated based on the Huffman code can also be used. In this case, it is necessary to prepare in advance a VLC table generated based on the Huffman code for each quantization parameter by learning using the training signal. The learning of the VLC table will be described in detail with reference to FIG.
  • VLC tables In the above description, an example in which two types of VLC tables are switched has been described. However, there may be a plurality of VLC tables, and the number is not limited to two.
  • step S11 the A / D converter 61 performs A / D conversion on the input image.
  • step S12 the screen rearrangement buffer 62 stores the image supplied from the A / D conversion unit 61, and rearranges the picture from the display order to the encoding order.
  • step S13 the calculation unit 63 calculates the difference between the image rearranged in step S12 and the predicted image.
  • the predicted image is supplied from the motion prediction / compensation unit 75 in the case of inter prediction and from the intra prediction unit 74 in the case of intra prediction to the calculation unit 63 via the predicted image selection unit 76, respectively.
  • ⁇ Difference data has a smaller data volume than the original image data. Therefore, the data amount can be compressed as compared with the case where the image is encoded as it is.
  • step S14 the orthogonal transformation unit 64 orthogonally transforms the difference information supplied from the calculation unit 63. Specifically, orthogonal transformation such as discrete cosine transformation and Karhunen-Loeve transformation is performed, and transformation coefficients are output.
  • step S15 the quantization unit 65 quantizes the transform coefficient. At the time of this quantization, the rate is controlled as described in the process of step S25 described later.
  • step S ⁇ b> 16 the inverse quantization unit 68 inversely quantizes the transform coefficient quantized by the quantization unit 65 with characteristics corresponding to the characteristics of the quantization unit 65.
  • step S ⁇ b> 17 the inverse orthogonal transform unit 69 performs inverse orthogonal transform on the transform coefficient inversely quantized by the inverse quantization unit 68 with characteristics corresponding to the characteristics of the orthogonal transform unit 64.
  • step S18 the calculation unit 70 adds the predicted image input via the predicted image selection unit 76 to the locally decoded difference information, and outputs the locally decoded image (for input to the calculation unit 63). Corresponding image).
  • step S ⁇ b> 19 the deblock filter 71 filters the image output from the calculation unit 70. Thereby, block distortion is removed.
  • step S20 the frame memory 72 stores the filtered image. Note that an image that has not been filtered by the deblocking filter 71 is also supplied to the frame memory 72 from the computing unit 70 and stored therein.
  • step S21 the intra prediction unit 74 and the motion prediction / compensation unit 75 each perform image prediction processing. That is, in step S21, the intra prediction unit 74 performs an intra prediction process in the intra prediction mode.
  • the motion prediction / compensation unit 75 performs inter prediction mode motion prediction / compensation processing.
  • step S21 The details of the prediction process in step S21 will be described later with reference to FIG. 19, but by this process, prediction processes in all the candidate intra prediction modes are performed, respectively, and in all the candidate intra prediction modes. Cost function values are respectively calculated. Then, based on the calculated cost function value, the optimal intra prediction mode is selected, and the predicted image generated by the intra prediction in the optimal intra prediction mode and its cost function value are supplied to the predicted image selection unit 76.
  • prediction processing in all candidate inter prediction modes is performed, and cost function values in all candidate inter prediction modes are calculated.
  • the optimal inter prediction mode is determined from the inter prediction modes, and the predicted image generated in the optimal inter prediction mode and its cost function value are supplied to the predicted image selection unit 76.
  • step S ⁇ b> 22 the predicted image selection unit 76 optimizes one of the optimal intra prediction mode and the optimal inter prediction mode based on the cost function values output from the intra prediction unit 74 and the motion prediction / compensation unit 75. Determine the prediction mode. Then, the predicted image selection unit 76 selects a predicted image in the determined optimal prediction mode and supplies the selected predicted image to the calculation units 63 and 70. As described above, this predicted image is used for the calculations in steps S13 and S18.
  • the prediction image selection information is supplied to the intra prediction unit 74 or the motion prediction / compensation unit 75.
  • the intra prediction unit 74 supplies information on the optimal intra prediction mode to the lossless encoding unit 66 together with information on the corresponding macroblock type.
  • the motion prediction / compensation unit 75 reversibly receives information on the macroblock type corresponding to the optimal inter prediction mode and, if necessary, information corresponding to the optimal inter prediction mode.
  • the data is output to the encoding unit 66.
  • Information according to the optimal inter prediction mode includes motion vector information, flags, reference frame information, and the like.
  • step S23 the lossless encoding unit 66 performs lossless encoding processing. This lossless encoding process will be described later with reference to FIG.
  • the quantized transform coefficient output from the quantization unit 65 is losslessly encoded and compressed.
  • the syntax elements such as the macroblock type and motion vector information input to the lossless encoding unit 66 in step S22 described above and the syntax elements of the quantization parameter used for the control in step S25 are also encoded.
  • the macroblock type is encoded by the VLC table selected according to the quantization parameter and added to the header information.
  • step S24 the accumulation buffer 67 accumulates the difference image as a compressed image.
  • the compressed image stored in the storage buffer 67 is appropriately read and transmitted to the decoding side via the transmission path.
  • step S25 the rate control unit 77 sets the quantization operation rate of the quantization unit 65 based on the compressed image stored in the storage buffer 67 according to the corresponding quantization parameter so that overflow or underflow does not occur. Control.
  • the quantization parameter used for controlling the rate of the quantization unit 65 is supplied to the mode table switching unit 78 and used for the lossless encoding process in step S23.
  • the quantization parameter is encoded in step S23 and added to the header.
  • the decoded image to be referred to is read from the frame memory 72, and the intra prediction unit 74 via the switch 73. To be supplied. Based on these images, in step S31, the intra prediction unit 74 performs intra prediction on the pixels of the block to be processed in all candidate intra prediction modes. Note that pixels that have not been deblocked filtered by the deblocking filter 71 are used as decoded pixels that are referred to.
  • intra prediction is performed in all candidate intra prediction modes, and for all candidate intra prediction modes.
  • a cost function value is calculated.
  • the optimal intra prediction mode is selected, and the predicted image generated by the intra prediction in the optimal intra prediction mode and its cost function value are supplied to the predicted image selection unit 76.
  • the processing target image supplied from the screen rearrangement buffer 62 is an image to be inter-processed
  • the referenced image is read from the frame memory 72 and supplied to the motion prediction / compensation unit 75 via the switch 73.
  • the motion prediction / compensation unit 75 performs an inter motion prediction process. That is, the motion prediction / compensation unit 75 refers to the image supplied from the frame memory 72 and performs motion prediction processing in all candidate inter prediction modes.
  • step S32 Details of the inter motion prediction process in step S32 will be described later with reference to FIG. With this process, motion prediction processing is performed in all candidate inter prediction modes, and cost function values are calculated for all candidate inter prediction modes.
  • step S33 the motion prediction / compensation unit 75 compares the cost function value for the inter prediction mode calculated in step S32.
  • the motion prediction / compensation unit 75 determines the prediction mode in which the cost function value gives the minimum value as the optimal inter prediction mode, and selects the prediction image generated in the optimal inter prediction mode and its cost function value as the prediction image selection. To the unit 76.
  • the intra prediction mode for luminance signals will be described.
  • three methods are defined: an intra 4 ⁇ 4 prediction mode, an intra 8 ⁇ 8 prediction mode, and an intra 16 ⁇ 16 prediction mode.
  • This is a mode for determining a block unit, and is set for each macroblock.
  • an intra prediction mode independent of the luminance signal can be set for each macroblock.
  • one prediction mode can be set from nine types of prediction modes for each target block of 4 ⁇ 4 pixels.
  • one prediction mode can be set from nine types of prediction modes for each target block of 8 ⁇ 8 pixels.
  • one prediction mode can be set from four types of prediction modes for a target macroblock of 16 ⁇ 16 pixels.
  • the intra 4 ⁇ 4 prediction mode, the intra 8 ⁇ 8 prediction mode, and the intra 16 ⁇ 16 prediction mode will be referred to as 4 ⁇ 4 pixel intra prediction mode, 8 ⁇ 8 pixel intra prediction mode, and 16 ⁇ , respectively. It is also referred to as 16-pixel intra prediction mode as appropriate.
  • numerals -1 to 25 given to each block indicate the bit stream order (processing order on the decoding side) of each block.
  • the macroblock is divided into 4 ⁇ 4 pixels, and DCT of 4 ⁇ 4 pixels is performed. Only in the case of the intra 16 ⁇ 16 prediction mode, as shown in the block of ⁇ 1, the DC components of each block are collected to generate a 4 ⁇ 4 matrix, and further, orthogonal transformation is performed on this. Is done.
  • the color difference signal after the macroblock is divided into 4 ⁇ 4 pixels and the DCT of 4 ⁇ 4 pixels is performed, the DC components of each block are collected as shown in the blocks 16 and 17. A 2 ⁇ 2 matrix is generated, and is further subjected to orthogonal transformation.
  • FIG. 21 and FIG. 22 are diagrams showing nine types of luminance signal 4 ⁇ 4 pixel intra prediction modes (Intra — 4 ⁇ 4_pred_mode). Each of the eight types of modes other than mode 2 indicating average value (DC) prediction corresponds to the directions indicated by numbers 0, 1, 3 to 8 in FIG.
  • the pixels a to p represent the pixels of the target block to be intra-processed
  • the pixel values A to M represent the pixel values of the pixels belonging to the adjacent blocks. That is, the pixels a to p are images to be processed that are read from the screen rearrangement buffer 62, and the pixel values A to M are pixel values of a decoded image that is read from the frame memory 72 and referred to. It is.
  • the predicted pixel values of the pixels a to p are generated as follows using the pixel values A to M of the pixels belonging to the adjacent blocks.
  • the pixel value “available” indicates that the pixel value can be used without any reason such as being at the end of the image frame or not yet encoded.
  • the pixel value “unavailable” indicates that the pixel value is not usable because it is at the end of the image frame or has not been encoded yet.
  • Mode 0 is the Vertical Prediction mode, and is applied only when the pixel values A to D are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (9).
  • Mode 1 is a horizontal prediction mode and is applied only when the pixel values I to L are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (10).
  • Predicted pixel value of pixels a, b, c, d I
  • Predicted pixel value of pixels e, f, g, h J
  • Predicted pixel value of pixels i, j, k, l K
  • Predicted pixel value of pixels m, n, o, p L (10)
  • Mode 2 is a DC Prediction mode.
  • the predicted pixel value is generated as shown in Expression (11). (A + B + C + D + I + J + K + L + 4) >> 3 (11)
  • Mode 3 is a Diagonal_Down_Left Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (14).
  • Mode 4 is a Diagonal_Down_Right Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (15).
  • Mode 5 is a Diagonal_Vertical_Right Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (16).
  • Mode 6 is a Horizontal_Down Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (17).
  • Mode 7 is Vertical_Left Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (18).
  • Mode 8 is a Horizontal_Up Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (19).
  • the encoding method of the 4 ⁇ 4 pixel intra prediction mode (Intra — 4 ⁇ 4_pred_mode) of the luminance signal will be described.
  • a target block C that is an encoding target and includes 4 ⁇ 4 pixels is illustrated, and a block A and a block B that are 4 ⁇ 4 pixels adjacent to the target block C are illustrated.
  • Intra_4x4_pred_mode in the target block C and Intra_4x4_pred_mode in the block A and the block B are highly correlated.
  • Intra_4x4_pred_mode in the block A and the block B is set as Intra_4x4_pred_modeA and Intra_4x4_pred_modeB, respectively, and MostProbableMode is defined as the following equation (20).
  • MostProbableMode Min (Intra_4x4_pred_modeA, Intra_4x4_pred_modeB) ... (20)
  • MostProbableMode the one to which a smaller mode_number is assigned is referred to as MostProbableMode.
  • prev_intra4x4_pred_mode_flag [luma4x4BlkIdx]
  • rem_intra4x4_pred_mode [luma4x4BlkIdx]
  • Intra_4x4_pred_mode and Intra4x4PredMode [luma4x4BlkIdx] for the target block C can be obtained.
  • FIGS. 25 and 26 are diagrams illustrating nine types of luminance signal 8 ⁇ 8 pixel intra prediction modes (Intra_8 ⁇ 8_pred_mode).
  • the pixel value in the target 8 ⁇ 8 block is p [x, y] (0 ⁇ x ⁇ 7; 0 ⁇ y ⁇ 7), and the pixel value of the adjacent block is p [-1, -1],. [-1,15], p [-1,0], ..., [p-1,7].
  • a low-pass filtering process is performed on adjacent pixels prior to generating a prediction value.
  • the pixel values before the low-pass filtering process are p [-1, -1], ..., p [-1,15], p [-1,0], ... p [-1,7], and after the process Are represented as p ′ [ ⁇ 1, ⁇ 1],..., P ′ [ ⁇ 1,15], p ′ [ ⁇ 1,0],... P ′ [ ⁇ 1,7].
  • p ′ [0, -1] is calculated as in the following equation (22) when p [-1, -1] is “available”, and when “not available”: Is calculated as in the following equation (23).
  • p '[0, -1] (p [-1, -1] + 2 * p [0, -1] + p [1, -1] + 2) >> 2
  • p '[0, -1] (3 * p [0, -1] + p [1, -1] + 2) >> 2 (23)
  • p '[x, -1] (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2 ... (24)
  • p '[x, -1] (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2
  • p '[15, -1] (p [14, -1] + 3 * p [15, -1] + 2) >> 2 ... (25)
  • p '[-1, -1] is calculated as follows when p [-1, -1] is "available”. That is, p ′ [ ⁇ 1, ⁇ 1] is calculated as in Equation (26) when both p [0, ⁇ 1] and p [ ⁇ 1,0] are available, and p [ -1,0] is “unavailable”, it is calculated as in equation (27). Further, p ′ [ ⁇ 1, ⁇ 1] is calculated as in Expression (28) when p [0, ⁇ 1] is “unavailable”.
  • p '[-1, -1] (p [0, -1] + 2 * p [-1, -1] + p [-1,0] + 2) >> 2 ...
  • p '[-1,0] (p [-1, -1] + 2 * p [-1,0] + p [-1,1] + 2) >> 2 ... (29)
  • p '[-1,0] (3 * p [-1,0] + p [-1,1] + 2) >> 2 ... (30)
  • p [-1, y] (p [-1, y-1] + 2 * p [-1, y] + p [-1, y + 1] + 2) >> 2 ... (31)
  • p '[-1,7] (p [-1,6] + 3 * p [-1,7] + 2) >> 2 ... (32)
  • the prediction value in each intra prediction mode shown in FIG. 25 and FIG. 26 is generated as follows using p ′ calculated in this way.
  • pred8x8 L [x, y] (p '[14, -1] + 3 * p [15, -1] + 2) >> 2 ...
  • red8x8 L [x, y] (p '[x + y, -1] + 2 * p' [x + y + 1, -1] + p '[x + y + 2, -1] + 2) >> 2 ... (40)
  • pred8x8 L [x, y] (p '[-1, y-2 * x-1] + 2 * p' [-1, y-2 * x-2] + p '[-1, y-2 * x-3] + 2) >> 2 ... (48)
  • pred8x8 L [x, y] (p '[x + (y >> 1),-1] + p' [x + (y >> 1) + 1, -1] + 1) >> 1 ...
  • the predicted pixel value is generated as in the following formula (59). In other cases, that is, when the value of zHU is larger than 13, the predicted pixel value is It is generated as shown in Equation (60).
  • pred8x8 L [x, y] (p '[-1,6] + 3 * p' [-1,7] + 2) >> 2 ... (59)
  • pred8x8 L [x, y] p '[-1,7] ... (60)
  • FIGS. 27 and 28 are diagrams illustrating 16 ⁇ 16 pixel intra prediction modes (Intra — 16 ⁇ 16_pred_mode) of four types of luminance signals.
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (61).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (62).
  • the predicted pixel value Pred (x, y) of each pixel is generated as in the following equation (63).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (66).
  • FIG. 23 is a diagram illustrating four types of color difference signal intra prediction modes (Intra_chroma_pred_mode).
  • the color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode.
  • the intra prediction mode for the color difference signal is in accordance with the 16 ⁇ 16 pixel intra prediction mode of the luminance signal described above.
  • the 16 ⁇ 16 pixel intra prediction mode of the luminance signal is intended for a block of 16 ⁇ 16 pixels
  • the intra prediction mode for the color difference signal is intended for a block of 8 ⁇ 8 pixels.
  • the mode numbers do not correspond to each other.
  • pixel values of pixels adjacent to the target macroblock A to be intra-processed 8 ⁇ 8 pixels in the case of a color difference signal
  • the predicted pixel value Pred (x, y) of each pixel is generated as in the following Expression (67).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (70).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (71).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (72).
  • the luminance signal intra prediction modes include nine types of 4 ⁇ 4 pixel and 8 ⁇ 8 pixel block units, and four types of 16 ⁇ 16 pixel macroblock unit prediction modes. This block unit mode is set for each macroblock unit.
  • the color difference signal intra prediction modes include four types of prediction modes in units of 8 ⁇ 8 pixel blocks. This color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode.
  • the 4 ⁇ 4 pixel intra prediction mode (intra 4 ⁇ 4 prediction mode) and the 8 ⁇ 8 pixel intra prediction mode (intra 8 ⁇ 8 prediction mode) of the luminance signal are 4 ⁇ 4 pixels and 8 ⁇ 8 pixels.
  • One intra prediction mode is set for each block of luminance signals.
  • 16 ⁇ 16 pixel intra prediction mode for luminance signals (intra 16 ⁇ 16 prediction mode) and the intra prediction mode for color difference signals one prediction mode is set for one macroblock.
  • Prediction mode 2 is average value prediction.
  • step S31 of FIG. 19 which is a process performed for these prediction modes, will be described with reference to the flowchart of FIG.
  • a case of a luminance signal will be described as an example.
  • step S41 the intra prediction unit 74 performs intra prediction for each of the 4 ⁇ 4 pixel, 8 ⁇ 8 pixel, and 16 ⁇ 16 pixel intra prediction modes.
  • the intra prediction unit 74 refers to a decoded image read from the frame memory 72 and supplied via the switch 73, and performs intra prediction on the pixel of the processing target block. By performing this intra prediction process in each intra prediction mode, a prediction image in each intra prediction mode is generated. Note that pixels that have not been deblocked filtered by the deblocking filter 71 are used as decoded pixels that are referred to.
  • step S42 the intra prediction unit 74 uses the cost function value represented by the above-described formula (3) or formula (4), and each intra prediction of 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, and 16 ⁇ 16 pixels. Calculate the cost function value for the mode.
  • the intra prediction unit 74 determines an optimum mode for each of the 4 ⁇ 4 pixel, 8 ⁇ 8 pixel, and 16 ⁇ 16 pixel intra prediction modes. That is, as described above, in the case of the intra 4 ⁇ 4 prediction mode and the intra 8 ⁇ 8 prediction mode, there are nine types of prediction modes, and in the case of the intra 16 ⁇ 16 prediction mode, there are types of prediction modes. There are four types. Therefore, the intra prediction unit 74 selects the optimal intra 4 ⁇ 4 prediction mode, the optimal intra 8 ⁇ 8 prediction mode, and the optimal intra 16 ⁇ 16 prediction mode from among the cost function values calculated in step S42. decide.
  • the intra prediction unit 74 calculates the cost calculated in step S42 from among the optimal modes determined for the 4 ⁇ 4 pixel, 8 ⁇ 8 pixel, and 16 ⁇ 16 pixel intra prediction modes in step S44.
  • the optimal intra prediction mode is selected based on the function value. That is, the mode having the minimum cost function value is selected as the optimum intra prediction mode from among the optimum modes determined for 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, and 16 ⁇ 16 pixels.
  • the intra prediction unit 74 supplies the predicted image generated in the optimal intra prediction mode and its cost function value to the predicted image selection unit 76.
  • step S61 the motion prediction / compensation unit 75 determines a motion vector and a reference image for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels described above with reference to FIG. . That is, a motion vector and a reference image are determined for each block to be processed in each inter prediction mode.
  • step S62 the motion prediction / compensation unit 75 performs motion prediction on the reference image based on the motion vector determined in step S61 for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Perform compensation processing. By this motion prediction and compensation processing, a prediction image in each inter prediction mode is generated.
  • step S63 the motion prediction / compensation unit 75 adds motion vector information for adding to the compressed image the motion vectors determined for each of the 8 types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Is generated. At this time, the motion vector generation method described above with reference to FIG. 14 is used.
  • the generated motion vector information is also used when calculating the cost function value in the next step S64.
  • the prediction mode information and the reference It is output to the lossless encoding unit 66 together with the frame information.
  • step S64 the motion prediction / compensation unit 75 uses each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels using the cost function represented by the above-described formula (3) or formula (4).
  • the cost function value is calculated for.
  • the cost function value calculated here is used when determining the optimal inter prediction mode in step S33 of FIG. 19 described above.
  • the lossless encoding unit 66 is supplied with the orthogonal transform coefficient quantized in step S15 of FIG. In step S81, the lossless encoding unit 66 performs the H.264 encoding.
  • the orthogonal transform coefficient quantized by the quantization unit 65 is encoded using a CAVLC table defined in the H.264 / AVC format. Details of the encoding process of the orthogonal transform coefficient will be described later with reference to FIGS. 34 and 35.
  • step S82 the lossless encoder 66
  • Other syntax elements other than the macroblock type are encoded using a CAVLC table defined in the H.264 / AVC format.
  • syntax elements such as a quantization parameter from the rate control unit 25 are also encoded.
  • syntax elements such as motion vector information, reference frame information, and flags are encoded.
  • each syntax element is encoded using the exponent Golomb code of FIG. 1 described above.
  • the exponent Golomb code of FIG. 1 is applied after being replaced with an unsigned code number based on the correspondence shown in FIG. And encoded.
  • step S83 the lossless encoding unit 66 performs macroblock type encoding processing. This macroblock type encoding process will be described later with reference to FIG.
  • the macro block type information is encoded using the VLC table selected according to the quantization parameter from the rate control unit 25.
  • step S84 the lossless encoding unit 66 adds the syntax element encoded in steps S82 and S83 to the header of the compressed image encoded in step S81.
  • the compressed image with the syntax element added to the header is accumulated in the accumulation buffer 67 in step S24 of FIG.
  • a 4 ⁇ 4 block is converted into 4 ⁇ 4 two-dimensional data corresponding to each frequency component by orthogonal transformation.
  • This two-dimensional data is further converted into one-dimensional data by a method depending on whether the target block to be encoded is frame-encoded or field-encoded. .
  • the lossless encoding unit 66 performs a reverse scan of the one-dimensional orthogonal transform coefficient from the high range to the low range as described above.
  • the lossless encoding unit 66 performs encoding of NumCoef (the number of non-zero coefficients) and T1s (the number of ⁇ 1 coefficients when scanning from a high frequency to a low frequency, 3 at the maximum). .
  • the target block C of the encoding process and the adjacent blocks A and B that are already encoded blocks and are adjacent to the target block C are shown. ing.
  • the lossless encoding unit 66 switches the VLC table according to the NumCoef in the adjacent blocks A and B.
  • the lossless encoding unit 66 performs encoding of Level (DCT coefficient value). For example, for T1s, only positive / negative is encoded. For other coefficients, a code number (Code Number) is assigned and encoded. At this time, the lossless encoding unit 66 switches the VLC table according to the intra / inter, the quantization parameter QP, and the last encoded level.
  • Level DCT coefficient value
  • the quantization parameter QP is supplied from the rate control unit 77 to the VLC table switching unit 81 and the code number assigning unit 82 (step S25 in FIG. 18).
  • the VLC table switching unit 81 and the code number assigning unit 82 obtain the quantization parameter QP from the rate control unit 77 in step S91.
  • step S93 the code number assigning unit 82 assigns the code number “0” according to the quantization parameter from the rate control unit 77. That is, the code number assigning unit 82 assigns the inter 16 ⁇ 16 mode to the code number “0” corresponding to the quantization parameter lower than the predetermined threshold. Also, the code number assigning unit 82 assigns the skip (or direct) mode to the code number “0” corresponding to a quantization parameter higher than a predetermined threshold.
  • This allocation information is supplied to the VLC table switching unit 81 and is supplied to the lossless encoding unit 66 together with the VLC table information for the macroblock type.
  • step S94 the lossless encoding unit 66 encodes the macroblock type with the VLC table selected by the VLC table switching unit 81.
  • the encoded macroblock type is added to the header of the compressed image encoded in step S81 in step S84 together with the other syntax elements encoded in step S82 of FIG.
  • the compressed image encoded as described above is transmitted via a predetermined transmission path and decoded by the image decoding device.
  • FIG. 37 shows the configuration of an embodiment of an image decoding apparatus as an image processing apparatus to which the present invention is applied.
  • the image decoding apparatus 101 includes a storage buffer 111, a lossless decoding unit 112, an inverse quantization unit 113, an inverse orthogonal transform unit 114, a calculation unit 115, a deblock filter 116, a screen rearrangement buffer 117, a D / A conversion unit 118, a frame
  • the memory 119, the switch 120, the intra prediction unit 121, the motion prediction / compensation unit 122, the switch 123, and the mode table switching unit 124 are configured.
  • the accumulation buffer 111 accumulates the transmitted compressed image.
  • the lossless decoding unit 112 decodes the information supplied from the accumulation buffer 111 and encoded by the lossless encoding unit 66 in FIG. 12 by a method corresponding to the encoding method of the lossless encoding unit 66.
  • the lossless decoding unit 112 decodes the image encoded by the lossless encoding unit 66 in FIG. 12, and also decodes syntax elements such as quantization parameters.
  • the decoded image and quantization parameter are supplied to the inverse quantization unit 113.
  • the quantization parameter is also supplied to the mode table switching unit 124.
  • the lossless decoding unit 112 also decodes the macroblock type by the decoding method (specifically, VLC table information) selected by the mode table switching unit 124 corresponding to the quantization parameter.
  • the decoded macroblock type is supplied to the corresponding motion prediction / compensation unit 122 or intra prediction unit 121.
  • the inverse quantization unit 113 converts the image decoded by the lossless decoding unit 112 with reference to the quantization parameter decoded by the lossless decoding unit 112 in a method corresponding to the quantization method of the quantization unit 65 in FIG. Quantize.
  • the inverse orthogonal transform unit 114 performs inverse orthogonal transform on the output of the inverse quantization unit 113 by a method corresponding to the orthogonal transform method of the orthogonal transform unit 64 in FIG.
  • the output subjected to the inverse orthogonal transform is added to the prediction image supplied from the switch 123 by the arithmetic unit 115 and decoded.
  • the deblocking filter 116 removes block distortion of the decoded image, and then supplies the frame to the frame memory 119 for storage and outputs it to the screen rearrangement buffer 117.
  • the screen rearrangement buffer 117 rearranges images. That is, the order of frames rearranged for the encoding order by the screen rearrangement buffer 62 in FIG. 12 is rearranged in the original display order.
  • the D / A conversion unit 118 performs D / A conversion on the image supplied from the screen rearrangement buffer 117, and outputs and displays the image on a display (not shown).
  • the switch 120 reads an image to be inter-processed and a reference image from the frame memory 119 and outputs them to the motion prediction / compensation unit 122, and also reads an image used for intra prediction from the frame memory 119 and sends it to the intra prediction unit 121. Supply.
  • the intra prediction unit 121 is supplied from the lossless decoding unit 112 with macroblock type information obtained by decoding the header information and information indicating the intra prediction mode.
  • the intra prediction unit 121 generates a prediction image based on this information, and outputs the generated prediction image to the switch 123.
  • the motion prediction / compensation unit 122 is supplied with macroblock type information, motion vector information, reference frame information, and the like from the lossless decoding unit 112.
  • the motion prediction / compensation unit 122 performs motion prediction and compensation processing on the image based on the motion vector information and the reference frame information, and generates a predicted image. That is, the predicted image of the target block is generated using the pixel value of the reference block associated with the target block by a motion vector in the reference frame. Then, the motion prediction / compensation unit 122 outputs the generated predicted image to the switch 123.
  • the switch 123 selects the prediction image generated by the motion prediction / compensation unit 122 or the intra prediction unit 121 and supplies the selected prediction image to the calculation unit 115.
  • the mode table switching unit 124 switches the decoding method (that is, the VLC table) for the macroblock type according to the quantization parameter decoded by the lossless decoding unit 112, and sends the information of the switched VLC table to the lossless decoding unit 112. Supply.
  • the mode table switching unit 124 differs only in that the quantization parameter is acquired from the rate control unit 77 while it is acquired from the lossless decoding unit 112. Other than that, the mode table switching unit 124 Processing basically similar to that of the unit 78 is performed.
  • FIG. 38 is a block diagram illustrating a detailed configuration example of the lossless decoding unit and the mode table switching unit.
  • the lossless decoding unit 112 is configured to include a quantization parameter decoding unit 131 and a macroblock type decoding unit 132.
  • the lossless decoding unit 112 actually includes a unit for decoding other syntax elements such as a compressed image from the image encoding device 51 and motion vector information other than the quantization parameter and the macroblock type.
  • the illustration is omitted.
  • the mode table switching unit 124 includes a VLC table switching unit 141 and a code number assigning unit 142.
  • the quantization parameter decoding unit 131 decodes the quantization parameter added to the header of the compressed image, and sends the decoded quantization parameter to the inverse quantization unit 113, the VLC table switching unit 141, and the code number assigning unit 142. Supply.
  • the macroblock type decoding unit 132 decodes the macroblock type using the VLC table selected by the VLC table switching unit 141, and supplies the decoded macroblock type to the motion prediction / compensation unit 122.
  • the macroblock type is related to inter and the macroblock type is not skip or direct mode, motion vector information, reference frame information, and the like are also separately decoded by the lossless decoding unit 112 to be a motion prediction / compensation unit. 122.
  • the macroblock type when the macroblock type is related to the intra, the macroblock type is supplied to the intra prediction unit 121.
  • the intra prediction mode information is also separately decoded by the lossless decoding unit 112 and supplied to the intra prediction unit 121.
  • the VLC table switching unit 141 has at least two types of VLC tables for the macro block type.
  • the VLC table switching unit 141 selects one of the VLC tables for the two types of macroblock types according to the quantization parameter from the quantization parameter decoding unit 131.
  • the VLC table switching unit 141 adds the allocation information from the code number allocation unit 142 to the information of the VLC table for the selected macroblock type and supplies the information to the macroblock type decoding unit 132.
  • the code number assigning unit 142 assigns a predetermined macroblock type to the code number 0 according to the quantization parameter from the quantization parameter decoding unit 131, and supplies the assignment information to the VLC table switching unit 141.
  • step S131 the storage buffer 111 stores the transmitted image.
  • step S132 the lossless decoding unit 112 performs a lossless decoding process for decoding the compressed image supplied from the accumulation buffer 111. Details of this lossless decoding process will be described later with reference to FIG.
  • step S132 the I picture, P picture, and B picture encoded by the lossless encoding unit 66 in FIG. 12 are decoded. Further, the quantization parameter, the macroblock type, and, if encoded at this time, motion vector information, reference frame information, information indicating the intra prediction mode, and the like are also decoded.
  • step S133 the inverse quantization unit 113 inversely quantizes the transform coefficient decoded by the lossless decoding unit 112 with characteristics corresponding to the characteristics of the quantization unit 65 in FIG.
  • step S134 the inverse orthogonal transform unit 114 performs inverse orthogonal transform on the transform coefficient inversely quantized by the inverse quantization unit 113 with characteristics corresponding to the characteristics of the orthogonal transform unit 64 in FIG. As a result, the difference information corresponding to the input of the orthogonal transform unit 64 of FIG. 12 (the output of the calculation unit 63) is decoded.
  • step S135 the calculation unit 115 adds the prediction image selected in the process of step S141 described later and input via the switch 123 to the difference information. As a result, the original image is decoded.
  • step S136 the deblocking filter 116 filters the image output from the calculation unit 115. Thereby, block distortion is removed.
  • step S137 the frame memory 119 stores the filtered image.
  • step S138 the intra prediction unit 121 or the motion prediction / compensation unit 122 performs image prediction processing corresponding to the prediction mode information supplied from the lossless decoding unit 112, respectively.
  • the intra prediction unit 121 when the macroblock type is related to the intra, information indicating the macroblock type and the intra prediction mode is supplied to the intra prediction unit 121.
  • the intra prediction unit 121 performs an intra prediction process in the intra prediction mode.
  • the macroblock type When the macroblock type is related to the inter, the macroblock type and, if necessary, motion vector information and reference frame information are supplied to the motion prediction / compensation unit 122.
  • the motion prediction / compensation unit 122 When a macroblock type or the like is supplied from the lossless decoding unit 112, the motion prediction / compensation unit 122 performs a motion prediction / compensation process in the inter prediction mode based on the macroblock type.
  • step S138 the prediction image generated by the intra prediction unit 121 or the prediction image generated by the motion prediction / compensation unit 122 is supplied to the switch 123.
  • step S139 the switch 123 selects a predicted image. That is, a prediction image generated by the intra prediction unit 121 or a prediction image generated by the motion prediction / compensation unit 122 is supplied. Therefore, the supplied predicted image is selected and supplied to the calculation unit 115, and is added to the output of the inverse orthogonal transform unit 114 in step S134 as described above.
  • step S140 the screen rearrangement buffer 117 performs rearrangement. That is, the order of frames rearranged for encoding by the screen rearrangement buffer 62 of the image encoding device 51 is rearranged to the original display order.
  • step S141 the D / A conversion unit 118 D / A converts the image from the screen rearrangement buffer 117. This image is output to a display (not shown), and the image is displayed.
  • the stored buffer 111 stores the transmitted image.
  • the lossless decoding unit 112 decodes the compressed image supplied from the accumulation buffer 111 by a decoding method corresponding to the encoding method of step S81 in FIG. 33, and the decoded image is sent to the inverse quantization unit 113. Supply.
  • step S112 the lossless decoding unit 112 decodes other syntax elements other than the macroblock type by a decoding method corresponding to the encoding method of step S82 in FIG.
  • the quantization parameter is decoded by the quantization parameter decoding unit 131 and supplied to the inverse quantization unit 113, the VLC table switching unit 141, and the code number assigning unit 142.
  • step S153 the macroblock type decoding unit 132 performs a macroblock type decoding process. Details of the macroblock type decoding process will be described later with reference to FIG.
  • step S153 the VLC table selected according to the quantization parameter from the quantization parameter decoding unit 131 is used to decode the macroblock type information.
  • the quantization parameter QP is supplied from the quantization parameter decoding unit 131 to the VLC table switching unit 141 and the code number assigning unit 142 (step S152 in FIG. 40).
  • step S161 the VLC table switching unit 141 and the code number assigning unit 142 acquire the quantization parameter QP from the quantization parameter decoding unit 131.
  • the predetermined threshold is the same as that set in the VLC table switching unit 81, and is obtained, for example, when learning a VLC table described later in FIG.
  • step S163 the code number assigning unit 142 assigns the code number “0” according to the quantization parameter from the quantization parameter decoding unit 131. That is, the code number assigning unit 142 assigns the inter 16 ⁇ 16 mode to the code number “0” corresponding to the quantization parameter lower than the predetermined threshold. Further, the code number assigning unit 142 assigns the skip (or direct) mode to the code number “0” corresponding to a quantization parameter higher than a predetermined threshold.
  • This allocation information is supplied to the VLC table switching unit 141, and is supplied to the macroblock type decoding unit 132 together with the VLC table information for the macroblock type.
  • step S164 the macroblock type decoding unit 13 decodes the macroblock type using the VLC table selected by the VLC table switching unit 141.
  • the decoded macroblock type is used for the prediction process in step S138 in FIG. 39 together with the other syntax elements encoded in step S152 in FIG.
  • step S171 the lossless decoding unit 112 refers to the macroblock type decoded in step S164 in FIG. 41, and determines whether or not the target block is intra-coded.
  • the lossless decoding unit 112 transmits the intra prediction mode information decoded in step S152 of FIG. To supply.
  • the intra prediction unit 121 acquires information on the macroblock type and the intra prediction mode in step S172, and performs intra prediction in step S173.
  • the intra prediction unit 121 performs intra prediction according to the intra prediction mode information with the macroblock type acquired in step S172, and generates a predicted image.
  • the generated prediction image is output to the switch 123.
  • the lossless decoding unit 112 supplies the macroblock type to the motion prediction / compensation unit 122.
  • the mode indicated by the macroblock type is the skip (direct) mode
  • the reference frame information, the motion vector information, and the like are also decoded in step S152 of FIG. 40, and are supplied to the motion prediction / compensation unit 122.
  • step S175 the motion prediction / compensation unit 122 performs normal inter prediction. That is, when the image to be processed is an image subjected to inter prediction processing, a necessary image is read from the frame memory 169 and supplied to the motion prediction / compensation unit 173 via the switch 170. In step S175, the motion prediction / compensation unit 173 performs motion prediction in the inter prediction mode with the macroblock type acquired in step S174, and generates a predicted image. The generated prediction image is output to the switch 123.
  • the VLC table of the macroblock type is switched according to the quantization parameter, so that the code length for the macroblock type can be shortened. Therefore, the average code length can be shortened.
  • FIG. 43 shows a configuration of an embodiment of a learning apparatus to which the present invention is applied.
  • the learning device 201 is a learning device for generating a VLC table based on a Huffman code using a training image signal.
  • the training image signal is a test image for obtaining a filter coefficient, and for example, a standard sequence used for standardization of image compression encoding that can be obtained at www.vqeg.org may be used.
  • an input image corresponding to each application may be used.
  • learning may be performed using a baseband signal photographed using a CCD or CMOS sensor.
  • a / D conversion unit 61 includes an A / D conversion unit 61, a screen rearranging buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, an accumulation buffer 67, and an inverse quantization unit 68.
  • the point is common to the image encoding device 51 of FIG.
  • the learning apparatus 201 has a point that a training image signal is used as a signal to be used and a mode table calculation unit 211 in place of the mode table switching unit 78. Different from the control device 51.
  • the learning device 201 uses the H.264 encoding for the macroblock type in the image encoding apparatus 51 of FIG.
  • the same encoding process is basically performed except that it is performed based on the H.264 / AVC standard.
  • the lossless encoding unit 66 is supplied with macroblock type information from the intra prediction unit 74 or the motion prediction / compensation unit 75 in response to the selection of the prediction image by the prediction image selection unit 76. And supplied to the mode table calculation unit 211.
  • the mode table calculation unit 211 controls the rate control unit 77 to control the rate of the quantization unit 65 with a fixed quantization parameter.
  • the mode table calculation unit 211 uses the quantization parameter information and the macroblock type information from the lossless encoding unit 66 to calculate the appearance probability of the macroblock type for each quantization parameter.
  • the mode table calculation unit 211 determines a VLC table corresponding to each quantization parameter by a Huffman code according to the calculated appearance probability. At this time, a threshold for the quantization parameter is also obtained.
  • the Huffman code is used as a method for assigning a bit rate to an event so that the average code length is minimized when the probability of the event is known in advance.
  • a leaf for each information source symbol is created.
  • the occurrence probability of the information source code is written on each leaf.
  • this is referred to as the probability of the leaf.
  • one node is created for the two leaves with the lowest probability, and the node and the two leaves are connected by branches.
  • One of the two branches is assigned 0, and the other is assigned 1.
  • the sum of the probabilities of the two leaves is written, and this node is considered a new leaf. In other words, it is considered that the branch from this node has been removed.
  • the code construction method ends. Otherwise, the process returns to the second step.
  • This code makes it possible to create a code tree with leaves corresponding to all information source symbols. A specific example will be described with reference to FIG.
  • FIG. 44 shows the configuration of the Huffman code when the occurrence probabilities of events A, B, C, and D are 0.6, 0.25, 0.1, and 0.05, respectively.
  • leaves corresponding to A, B, C, and D are created.
  • () indicates the probability of each event.
  • the node G when the node G is also considered as a leaf, only one leaf remains, and the code tree is completed.
  • the code word obtained from this code tree is 0, 10, 110, 111 for each of events A, B, C, and D, and the average code length is 1.55 (bits) from the following equation (73). Become. 0.6 * 1 + 0.25 * 2 + 0.1 * 3 + 0.05 * 3 ... (73)
  • the mode table calculation unit 211 controls the rate control unit 77 to fix the quantization parameter.
  • the image encoding device 201 encodes the training image signal.
  • the encoding for the macroblock type is also H.264.
  • the processing is basically the same as the encoding processing described above with reference to FIG. 18 except that the processing is performed based on the H.264 / AVC standard and rate control is performed with a fixed quantization parameter. Therefore, the description of this encoding process is omitted.
  • the lossless encoding unit 66 is supplied with macroblock type information from the intra prediction unit 74 or the motion prediction / compensation unit 75 in response to the selection of the predicted image by the predicted image selection unit 76.
  • the lossless encoding unit 66 supplies the information to the mode table calculation unit 211.
  • step S201 is performed for various quantization parameters.
  • step S202 the mode table calculation unit 211 calculates the appearance probability of the macroblock type for each quantization parameter using the quantization parameter information and the macroblock type information from the lossless encoding unit 66.
  • step S203 the mode table calculation unit 211 determines a VLC table corresponding to each quantization parameter by the Huffman code described above with reference to FIG. 44 according to the calculated appearance probability.
  • the learning device 43 shows an example of the learning device 201 integrated with the image encoding device, but the learning device is configured by a computer including at least the mode table calculation unit 211, and the image encoding device 51 in FIG.
  • the encoding process is performed with a fixed quantization parameter.
  • the VLC table corresponding to each quantization parameter is determined by using the macroblock type information obtained as a result of the encoding process, obtained online or offline from the image encoding device 51. It can also be done.
  • the VLC table generated by determining as described above is stored in the VLC table switching unit 81 of the image encoding device 51, the memory of the VLC table switching unit 141 of the image decoding device 101, and the like. Used for encoding.
  • the macro block type has been described among the information regarding the prediction mode.
  • the tendency regarding the quantization parameter and the prediction mode distribution for the macro block type described above with reference to FIG. The same applies to the 4 ⁇ 4 prediction mode.
  • a mode with a larger number is also selected so as to increase the prediction efficiency even if the mode bits are increased somewhat.
  • higher quantum parameters that is, at lower bit rates, there is a tendency that a mode with a lower number is easily selected so as not to increase the mode bits.
  • the assignment of code number “1” may be switched according to the quantization parameter.
  • the present invention can be applied not only to macroblock type encoding but also to intra prediction mode encoding.
  • the present invention is not limited to the intra 4 ⁇ 4 prediction mode, and the present invention can also be applied to the intra 8 ⁇ 8 prediction mode, the intra 16 ⁇ 16 prediction mode, and the color difference signal intra prediction mode.
  • H Although described based on the H.264 / AVC format, the present invention is not limited to this, and can be applied to any encoding device and decoding device that encode a plurality of macroblock types or intra prediction modes by VLC.
  • the present invention includes, for example, MPEG, H.264, and the like.
  • image information bitstream
  • orthogonal transformation such as discrete cosine transformation and motion compensation, such as 26x
  • network media such as satellite broadcasting, cable television, the Internet, or mobile phones.
  • the present invention can be applied to an image encoding device and an image decoding device used in the above. Further, the present invention can be applied to an image encoding device and an image decoding device used when processing on a storage medium such as an optical, magnetic disk, and flash memory. Furthermore, the present invention can also be applied to motion prediction / compensation devices included in such image encoding devices and image decoding devices.
  • the series of processes described above can be executed by hardware or software.
  • a program constituting the software is installed in the computer.
  • the computer includes a computer incorporated in dedicated hardware, a general-purpose personal computer capable of executing various functions by installing various programs, and the like.
  • FIG. 46 is a block diagram showing an example of the hardware configuration of a computer that executes the above-described series of processing by a program.
  • a CPU Central Processing Unit
  • ROM Read Only Memory
  • RAM Random Access Memory
  • An input / output interface 305 is further connected to the bus 304.
  • An input unit 306, an output unit 307, a storage unit 308, a communication unit 309, and a drive 310 are connected to the input / output interface 305.
  • the input unit 306 includes a keyboard, a mouse, a microphone, and the like.
  • the output unit 307 includes a display, a speaker, and the like.
  • the storage unit 308 includes a hard disk, a nonvolatile memory, and the like.
  • the communication unit 309 includes a network interface and the like.
  • the drive 310 drives a removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.
  • the CPU 301 loads the program stored in the storage unit 308 to the RAM 303 via the input / output interface 305 and the bus 304 and executes the program, thereby performing the series of processes described above. Is done.
  • the program executed by the computer (CPU 301) can be provided by being recorded on the removable medium 311 as a package medium or the like, for example.
  • the program can be provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital broadcasting.
  • the program can be installed in the storage unit 308 via the input / output interface 305 by attaching the removable medium 311 to the drive 310. Further, the program can be received by the communication unit 309 via a wired or wireless transmission medium and installed in the storage unit 308. In addition, the program can be installed in advance in the ROM 302 or the storage unit 308.
  • the program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

Landscapes

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

Abstract

 本発明は、VLC方式の符号化において、符号化効率を改善することができるようにする画像処理装置および方法に関する。 VLCテーブル切替部は、所定の閾値より低い量子化パラメータに対応して、k=0のテーブルを選択し、所定の閾値より高い量子化パラメータに対応して、k=1のテーブルを選択する。コードナンバ割当部は、所定の閾値より低い量子化パラメータに対応して、インター16×16モードを、コードナンバ"0"に割り当て、所定の閾値より高い量子化パラメータに対応して、スキップ(またはダイレクト)モードを、コードナンバ"0"に割り当てる。本発明は、例えば、H.264/AVC方式で符号化する画像符号化装置に適用することができる。

Description

画像処理装置および方法
 本発明は画像処理装置および方法に関し、特に、VLC方式の符号化において、符号化効率を改善するようにした画像処理装置および方法に関する。
 近年、画像情報をデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮する符号化方式を採用して画像を圧縮符号する装置が普及しつつある。この符号化方式には、例えば、MPEG(Moving Picture Experts Group)などがある。
 特に、MPEG2(ISO/IEC 13818-2)は、汎用画像符号化方式として定義されており、飛び越し走査画像及び順次走査画像の双方、並びに標準解像度画像及び高精細画像を網羅する標準である。例えば、MPEG2は、プロフェッショナル用途及びコンシューマ用途の広範なアプリケーションに現在広く用いられている。MPEG2圧縮方式を用いることにより、例えば720×480画素を持つ標準解像度の飛び越し走査画像であれば4乃至8Mbpsの符号量(ビットレート)が割り当てられる。また、MPEG2圧縮方式を用いることにより、例えば1920×1088画素を持つ高解像度の飛び越し走査画像であれば18乃至22 Mbpsの符号量(ビットレート)が割り当てられる。これにより、高い圧縮率と良好な画質の実現が可能である。
 MPEG2は主として放送用に適合する高画質符号化を対象としていたが、MPEG1より低い符号量(ビットレート)、つまりより高い圧縮率の符号化方式には対応していなかった。携帯端末の普及により、今後そのような符号化方式のニーズは高まると思われ、これに対応してMPEG4符号化方式の標準化が行われた。画像符号化方式に関しては、1998年12月にISO/IEC 14496-2としてその規格が国際標準に承認された。
 さらに、近年、当初テレビ会議用の画像符号化を目的として、H.26L (ITU-T Q6/16 VCEG)という標準の規格化が進んでいる。H.26LはMPEG2やMPEG4といった従来の符号化方式に比べ、その符号化、復号化により多くの演算量が要求されるものの、より高い符号化効率が実現されることが知られている。また、現在、MPEG4の活動の一環として、このH.26Lをベースに、H.26Lではサポートされない機能をも取り入れ、より高い符号化効率を実現する標準化がJoint Model of Enhanced-Compression Video Codingとして行われている。標準化のスケジュールとしては、2003年3月にはH.264及びMPEG-4 Part10 (Advanced Video Coding、以下H.264/AVCと記す)という国際標準となっている。
 さらに、その拡張として、RGBや4:2:2、4:4:4といった、業務用に必要な符号化ツールや、MPEG-2で規定されていた8x8DCTや量子化マトリクスをも含んだFRExt (Fidelity Range Extension) の標準化が2005年2月に完了している。これにより、H.264/AVCを用いて、映画に含まれるフィルムノイズをも良好に表現することが可能な符号化方式となって、Blu-Ray Disc(商標)等の幅広いアプリケーションに用いられる運びとなった。
 しかしながら、昨今、ハイビジョン画像の4倍の、4000×2000画素程度の画像を圧縮したいといった、更なる高圧縮率符号化に対するニーズが高まっている。あるいは、インターネットのような、限られた伝送容量の環境において、ハイビジョン画像を配信したいといった、更なる高圧縮率符号化に対するニーズが高まっている。このため、先述の、ITU-T傘下のVCEG (=Video Coding Expert Group) において、符号化効率の改善に関する検討が継続され行なわれている。
 このH.264/AVC方式においては、非特許文献1に記載のように、可逆符号化方式として、CAVLC(Context-Adaptive Variable Length Coding)と、CABAC(Context-Adaptive Binary Arithmetic Coding)の2通りの方式が規格化されている。
 まず、CAVLC方式について説明する。CAVLCにおいては、直交変換係数の符号化には、周辺ブロックにおける直交変換係数の発生に応じて切り替えられたVLCテーブルが用いられる。その他のシンタクス要素の符号化に関しては、図1に示される指数ゴロム(Exponential Golomb)符号が用いられる。
 図1の指数ゴロム符号においては、例えば、コードナンバ(Code Number)0と符号語(Code Words)1が対応しており、コードナンバ1と符号語010が対応しており、コードナンバ2と符号語011が対応している。また、コードナンバ3と符号語00100が対応しており、コードナンバ4と符号語00101が対応しており、コードナンバ5と符号語00110が対応しており、コードナンバ6と符号語00111が対応している。
 また、動きベクトルのようなシンタクス要素に関しては、負の値が生じる可能性がある。したがって、負の値が生じる可能性があるシンタクス要素の場合、図2に示される対応関係に基づいて、符号なしのコードナンバに置き換えられた後に、その符号化に、図1の指数ゴロム符号が用いられる。
 図2には、コードナンバと、シンタクス要素vの対応関係が示されている。すなわち、この対応関係に基づくことにより、例えば、シンタクス要素v=0が、コードナンバ0に置き換えられ、シンタクス要素v=1が、コードナンバ1に置き換えられ、シンタクス要素v=-1が、コードナンバ2に置き換えられる。また、シンタクス要素v=2が、コードナンバ3に置き換えられ、シンタクス要素v=-2が、コードナンバ4に置き換えられ、シンタクス要素v=3が、コードナンバ5に置き換えられる。
 次に、CABAC方式について説明する。
 図3は、CABAC 符号化を行う可逆符号化部の構成例を表している。図3の例において、可逆符号化部は、コンテクストモデル化部11、2値化部12、並びに、確率推定部21および符号化エンジン22からなる適応2値算術符号化部13により構成されている。
 コンテクストモデル化部11は、圧縮画像における任意のシンタクス要素に関し、まず、過去の履歴に応じて、シンタクス要素のシンボル(記号)を適切なコンテクストモデルに変換する。CABAC 符号化においては、異なるシンタクス要素は、異なるコンテクストにより符号化がなされる。また、同じシンタクス要素であっても、周辺ブロックまたはマクロブロックにおける符号化情報に応じて異なるコンテクストにより符号化がなされる。
 例えば、図4を参照して、フラグmb_skip_fragを例にとって説明するが、他のシンタクス要素に対する処理についても同様である。
 図4の例において、これから符号化される対象マクロブロックCと、既に符号化済みのブロックであり、対象マクロブロックCに隣接する隣接マクロブロックAおよびBが示されている。それぞれのマクロブロックX(X=A,B,C)に対して、フラグmb_skip_fragが定義されており、次の式(1)であるとする。
Figure JPOXMLDOC01-appb-M000001


 すなわち、マクロブロックXが、参照フレームの空間的に対応する位置の画素をそのまま用いるスキップトマクロブロックである場合、f(X)は1とされ、そうでない場合、0とされる。
 このとき、対象マクロブロックCに対するコンテクストContext(C)は、次の式(2)のように、左の隣接マクロブロックAのf(A)と上の隣接マクロブロックBのf(B)の和として算出される。

 Context(C) = f(A) + f(B)              ・・・(2)
 すなわち、対象マクロブロックCに対するコンテクストContext(C)は、隣接マクロブロックA,Bのフラグmb_skip_fragに応じて、0,1,2のいずれかの値をとることになる。つまり、対象マクロブロックCに対するフラグmb_skip_fragは、0,1,2のいずれかの異なる符号化エンジン22が用いられて符号化されることになる。
 2値化部12は、例えば、イントラ予測モードのように、シンタクス上、非2値化データである要素のシンボルを、図5に示されるテーブルに基づいて変換する。
 図5のテーブルにおいては、コードシンボルが0の場合、0に2値化され、コードシンボルが1の場合、10に2値化され、コードシンボルが2の場合、110に2値化されることが示されている。また、コードシンボルが3の場合、1110に2値化され、コードシンボルが4の場合、11110に2値化され、コードシンボルが5の場合、111110に2値化されることが示されている。
 ただし、マクロブロックタイプに関してはこのテーブルではなく、Iスライス、Pスライス、およびBスライス、それぞれに対して、図6乃至図8に示される、別途規定された不規則なテーブルに基づいて2値化処理が行われる。
 図6は、IおよびSIスライスの場合のマクロブロックタイプの2値化テーブルを示している。図6のテーブルにおいては、0乃至25のマクロブロックタイプの値(Value(name)of mb_type)と、それに対応する2値列(Bin string)が示されている。
 図7は、P、SP、およびBスライスの場合のマクロブロックタイプの2値化テーブルを示している。図7のテーブルにおいては、PおよびSPスライスの場合の0乃至30のマクロブロックタイプの値と、それに対応する2値化列が示されており、Bスライスの場合の0乃至48のマクロブロックタイプの値と、それに対応する2値化列が示されている。
 図8は、P、SP、およびBスライスの場合のサブマクロブロックタイプの2値化テーブルを示している。図8のテーブルにおいては、PおよびSPスライスの場合の0乃至3のマクロブロックタイプの値と、それに対応する2値化列が示されており、Bスライスの場合の0乃至12のマクロブロックタイプの値と、それに対応する2値化列が示されている。
 以上のような2値化テーブルにより2値化されたシンタクス要素は、後段の適応2値算術符号化部13により符号化される。
 図3に戻って、適応2値算術符号化部13においては、2値化されたシンボルに対して、確率推定部21によって確率推定がなされ、符号化エンジン22によって確率推定に基づく2値算術符号化が施される。その際、“0”,“1”の確率は、スライス先頭で初期化され、1Binの符号化が行われる毎にその確率テーブルが更新される。すなわち、2値算術符号化処理が行われた後、関連するモデルの更新が行われるため、それぞれのモデルは実際の画像圧縮情報の統計に応じた符号化処理を行うことが可能となる。
 次に、図9を参照して、2値算術符号化の動作について説明する。いま、‘1’の発生(出現)確率が0.2、‘0’の発生確率が0.8である場合に、入力信号であるビット列“010”を符号化することを考える。
 まず、ステップS1において、‘0’が符号化される。この結果、初期区間における図中下側0.8の部分(0.0-0.8)が更新された区間となる。ステップS2において、‘1’が符号化される。この結果、現在の区間(0.0-0.8)における図中上側0.2が新たな更新区間(0.64-0.8)となる。
 ステップS3において、‘0’が符号化される。この結果、現在の区間(0.64-0.8)における図中下側0.8が新たな更新区間(0.64-0.768)となる。
 算術符号の符号語は、最終区間を特定する実数値の2進表現になり、この例の場合は、0.64-0.768が最終区間となるので、その間に入る実数として、0.75をとることができる。実数0.75の2進表現は、0.11であるので、ステップS4においては、その2進表現(0.11)から、常に0になる最初の桁を除いた後の“11”が符号語とされ、最終的に、“11”なる信号が出力される。
 ここで、図9における、例えば、“0.64”といった、区間間隔を保持するレジスタの桁数は、実際には有限である。そこで、適応2値算術符号化部13の処理には、図9の2値算術符号化に、出力すべき区間の上位ビットが確定した段階で、適時確定ビットを出力し、区間の幅を広げる再正規化(Renormalization)と呼ばれる手法が加わえられる。
 次に、図10を参照して再正規化について説明する。なお、図10の例において、図9と同じステップ番号は同じステップを表している。
 ステップS2において、‘1’が符号化される。この結果、現在の区間(0.0-0.8)における図中上側0.2が新たな更新区間(0.64-0.8)となる。ステップS3において、区間(0.64-0.8)が0.5を超えたので、この時点で“1”を出力し、0.5から、1.0の間を、0.0から、1.0の間に拡大(再正規化)する。これにより、正規化された区間が(0.28-0.6)となる。
 ステップS3´において、‘0’が符号化される。この結果、現在の区間(0.28-0.6)における図中下側0.8が新たな更新区間(0.28-0.536)となる。
 この例の場合は、0.28-0.536が最終区間となるので、その間に入る実数として、0.5をとることができる。実数0.5の2進表現は、0.1であるので、ステップS4´においては、その2進表現(0.1)から、常に0になる最初の桁を除いた後の“1”が符号語とされ、最終的に、“1”なる信号が出力される。
 この再正規化により、レジスタの精度が有効利用可能となる。
 一方、H.264/AVC方式において、より高い符号化効率を達成するには、適切な予測モードの選択も重要である。
 この予測モードの選択方式の例として、非特許文献2において公開されているJM(Joint Model)と呼ばれる参照ソフトウエア(reference software)に実装されている方法が挙げられる。
 JMにおいては、次に述べるHigh Complexity モード、またはLow Complexity モードの2通りのモード判定方法を選択することができる。
 High Complexity モードにおいては、次の式(3)で表わされるコスト関数が用いられて、コスト関数値が各予測モードに対して算出される。そして、算出されたコスト関数値の最小値を与える予測モードが、対象ブロック(あるいはマクロブロック)に対する最適予測モードであるとして選択される。
 Cost(Mode∈Ω) = D + λ・R            ・・・(3)
 ここで、Ωは、対象ブロック(あるいはマクロブロック)を符号化するための候補モードの全体集合である。Dは、予測モード(Mode)で符号化した場合の、原画像と復号画像の差分(歪)エネルギーである。Rは、直交変換係数まで含んだ、予測モード(Mode)で符号化した場合の総符号量である。λは、量子化パラメータQPの関数として与えられるラグランジュ未定乗数である。
 すなわち、High Complexity モードでのモード判定を行うには、上述したパラメータDおよびRを算出する必要があるため、候補となる全ての予測モードに対して、仮に符号化処理までが行われるので、演算精度は高いが、より高い演算量を要する。
 一方、Low Complexity モードにおいては、次の式(4)で表わされるコスト関数が用いられて、コスト関数値が各予測モードに対して算出される。そして、算出されたコスト関数値の最小値を与える予測モードが、対象ブロック(あるいはマクロブロック)に対する最適予測モードであるとして選択される。
 Cost(Mode∈Ω) = D + QPtoQuant(QP)・HeaderBit   ・・・(4)
 ここで、Dは、High Complexity モードの場合と異なり、予測画像と入力画像の差分(歪)エネルギーである。HeaderBitは、直交変換係数を含まない、動きベクトルや予測モードといった、ヘッダに属する情報に関する符号量である。QPtoQuantは、量子化パラメータQPの関数として与えられる関数である。
 すなわち、Low Complexity モードにおいては、全ての予測モードに対して、予測画像を生成するのみで、復号画像は必要なく、符号化処理および復号処理を行う必要がない。このため、High Complexity モードの場合より演算精度は低いが、低い演算量での実現が可能である。
 ところで、図11を参照して、上述した参照ソフトウエアを用いて、あるシーケンスを2種類の量子化パラメータを用いて、CABACおよびCAVLCでそれぞれ符号化した時の予測モードの分布について説明する。
 図11の上側には、低い量子化パラメータQP=22を用いて、CABACおよびCAVLCでそれぞれ符号化した場合の予測モード毎の出現頻度のグラフが示されている。また、下側には、高い量子化パラメータQP=37を用いて、CABACおよびCAVLCでそれぞれ符号化した場合の予測モード毎の出現頻度のグラフが示されている。
 各グラフの縦軸は、各予測モードの出現頻度を表しており、横軸は、モード0乃至モード7の予測モードの種類を表している。ここで、モード0(copy)は、スキップモードやダイレクトモードを表しており、モード1(16×16)は、インター16×16(画素)モードを表している。モード2(16×8)は、インター16×8(画素)モードを表しており、モード3(8×16)は、インター8×16(画素)モードを表している。モード4(8×8)は、インター8×8(画素)以下のブロックサイズのすべてのモードを表している。モード5(intra 4×4)は、イントラ4×4(画素)モードを表しており、モード6(intra 8×8)は、イントラ8×8(画素)モードを表しており、モード7(intra 16×16)は、イントラ16×16(画素)モードを表している。
 すなわち、グラフにおいて、インターに関するモードは、左からブロックサイズが大きい順に、モード0乃至モード4となっており、イントラに関するモードは、左からブロックサイズが小さい順に、モード5乃至7となっている。
 ここで、両方のグラフからわかるように、低い量子化パラメータ(QP=22)と高い量子化パラメータ(QP=37)とは、予測モードの分布が異なる。
 すなわち、第1の違いは、低い量子化パラメータにおいては、モード4で表されるインター8×8以下のブロックサイズのすべてのモードの出現頻度がそれなりにあるが、高い量子化パラメータにおいては、ほとんど出現しないことである。
 第2の違いは、低い量子化パラメータにおいては、モード1で表されるインター16×16モードが最も出現頻度が高いが、高い量子化パラメータにおいては、モード0で表されるスキップモードやダイレクトモードの出現頻度が高いことである。
 これらは、上述したHigh Complexity モードまたはLow Complexity モードに基づくモード判定において、以下の傾向にあるという事実に基づいている。その事実とは、低い量子化パラメータ(高いビットレート)においては、動きベクトルなどのヘッダビットを増大させても、より高い予測効率を選択する傾向にあることである。また、それに対して、高い量子化パラメータ(低いビットレート)においては、多少予測効率を下げても、ヘッダビットが少ないモードが優先される傾向にあることである。
 なお、上記説明で用いられた図は、以下、本発明を説明する図としても適宜用いられる。
"7.4.2.2 Picture parameter set RBSP semantics", "ITU-T Recommendation H.264 Advanced video coding for generic audiovisual",P162-P164 November 2007 H.264/AVC Software Coordination、Institut Nachrichtentechnik Heinrich-Hertz-Institut、[平成21年7月10日検索]、インターネット<URL: http://iphome.hhi.de/suehring/tml/index.htm>
 図11を参照して上述した出現頻度の違いは、CABACにおいては、図3を参照して上述したコンテクストモデルによる確率テーブルの更新が対応することになり、それぞれの量子化パラメータに対応した符号化処理が行われることになる。
 しかしながら、CAVLCにおいては、量子化パラメータによる出現頻度の違いが考慮されていない単一のテーブルにより符号化処理が行われており、個々の量子化パラメータに対応した、高い符号化効率の実現が困難となっている。
 本発明は、このような状況に鑑みてなされたものであり、VLC方式の符号化において、符号化効率を改善するものである。
 本発明の第1の画像処理装置は、復号処理の対象となる対象ブロックにおける量子化パラメータを復号する量子化パラメータ復号手段と、前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の復号方法を切り替える切替手段と、前記切替手段により切り替えられた前記復号方法で、前記予測モードに関する情報を復号する予測モード復号手段とを備える。
 前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するVLC(Variable Length Coding)テーブルを切り替えることで、前記復号方法を切り替えることができる。
 前記予測モードに関する情報は、マクロブロックタイプの情報である。
 前記予測モードに関する情報は、イントラ予測モードの情報である。
 前記切替手段は、所定の閾値より値が大きい量子化パラメータの場合、コードナンバが小さい事象に対するビット長が短いテーブルに切り替えることができる。
 前記切替手段は、所定の閾値より値が小さい量子化パラメータの場合、コードナンバが増大しても、ビット長の増大が緩やかであるテーブルに切り替えることができる。
 前記符号化手段は、前記VLCテーブルとして、ゴロム符号を用いることができる。
 前記符号化手段は、前記VLCテーブルとして、ハフマン符号を用いることができる。
 前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するコードナンバの割当を切り替えることで、前記復号方法を切り替えることができる。
 前記予測モードに関する情報は、インターマクロブロックタイプの情報である。
 前記切替手段は、所定の閾値より値が大きい量子化パラメータの場合、スキップまたはダイレクトモードの割当を、最小のコードナンバに切り替えることができる。
 前記切替手段は、所定の閾値より値が小さい量子化パラメータの場合、インター16×16予測モードの割当を、最小のコードナンバに切り替えることができる。
 前記予測モードに関する情報は、イントラ予測モードの情報である。
 本発明の第1の側面の画像処理方法は、画像処理装置が、復号処理の対象となる対象ブロックにおける量子化パラメータを復号し、前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の復号方法を切り替え、切り替えられた前記復号方法で、前記予測モードに関する情報を復号するステップを含む。
 本発明の第2の側面の画像処理装置は、符号化処理の対象となる対象ブロックにおける量子化パラメータを取得する量子化パラメータ取得手段と、前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の符号化方法を切り替える切替手段と、前記切替手段により切り替えられた前記符号化方法で、前記予測モードに関する情報を符号化する符号化手段とを備える。
 前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するVLC(Variable Length Coding)テーブルを切り替えることで、前記符号化方法を切り替えることができる。
 前記切替手段は、所定の閾値より値が大きい量子化パラメータの場合、コードナンバが小さい事象に対するビット長が短いテーブルに切り替えることができる。
 前記切替手段は、所定の閾値より値が小さい量子化パラメータの場合、コードナンバが増大しても、ビット長の増大が緩やかであるテーブルに切り替えることができる。
 前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するコードナンバの割当を切り替えることで、前記符号化方法を切り替えることができる。
 本発明の第2の側面の画像処理方法は、画像処理装置が、符号化処理の対象となる対象ブロックにおける量子化パラメータを取得し、前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の符号化方法を切り替え、切り替えられた前記符号化方法で、前記予測モードに関する情報を符号化するステップを含む。
 本発明の第1の側面においては、復号処理の対象となる対象ブロックにおける量子化パラメータが復号され、前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の復号方法が切り替えられる。そして、切り替えられた前記復号方法で、前記予測モードに関する情報が復号される。
 本発明の第2の側面においては、符号化処理の対象となる対象ブロックにおける量子化パラメータが取得され、前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の符号化方法が切り替えられる。そして、切り替えられた前記符号化方法で、前記予測モードに関する情報が符号化される。
 なお、上述の画像処理装置のそれぞれは、独立した装置であっても良いし、1つの画像符号化装置または画像復号装置を構成している内部ブロックであってもよい。
 本発明の第1の側面によれば、画像を復号することができる。また、本発明の第1の側面によれば、VLC方式の符号化における符号化効率を改善することができる。
 本発明の第2の側面によれば、画像を符号化することができる。また、本発明の第2の側面によれば、VLC方式の符号化における符号化効率を改善することができる。
指数ゴロム符号を説明する図である。 シンタクス要素と符号なしコードナンバの対応関係を説明する図である。 CABAC 符号化を行う可逆符号化部の構成例を表すブロック図である。 CABAC 符号化を説明する図である。 2値化テーブルを示す図である。 IおよびSIスライスの場合のマクロブロックタイプの2値化テーブルを示す図である。 P、SP、およびBスライスの場合のマクロブロックタイプの2値化テーブルを示す図である。 P、SP、およびBスライスの場合のサブマクロブロックタイプの2値化テーブルを示す図である。 2値算術符号化の動作について説明する図である。 再正規化について説明する図である。 異なる量子化パラメータを用いて、CABACおよびCAVLCで符号化した時の予測モードの分布を示す図である。 本発明を適用した画像符号化装置の一実施の形態の構成を示すブロック図である。 可変ブロックサイズ動き予測・補償処理を説明する図である。 動きベクトル情報の生成方法の例を説明する図である。 時間ダイレクトモードについて説明する図である。 モードテーブル切替部の構成例を示すブロック図である。 図16のVTCテーブル切替部が有するテーブルを示す図である。 図12の画像符号化装置の符号化処理を説明するフローチャートである。 図18のステップS21の予測処理を説明するフローチャートである。 16×16画素のイントラ予測モードの場合の処理順序を説明する図である。 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。 4×4画素のイントラ予測の方向を説明する図である。 4×4画素のイントラ予測を説明する図である。 輝度信号の8×8画素のイントラ予測モードの種類を示す図である。 輝度信号の8×8画素のイントラ予測モードの種類を示す図である。 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。 16×16画素のイントラ予測を説明する図である。 色差信号のイントラ予測モードの種類を示す図である。 図19のステップS31のイントラ予測処理を説明するフローチャートである。 図19のステップS32のインター動き予測処理を説明するフローチャートである。 図18のステップS23の可逆符号化処理を説明するフローチャートである。 CAVLCによる直交変換係数の符号化処理について説明する図である。 CAVLCの動作原理の具体例について説明する図である。 図33のステップS83のマクロブロックタイプの符号化処理について説明するフローチャートである。 本発明を適用した画像復号装置の一実施の形態の構成を示すブロック図である。 図37の可逆復号部およびモードテーブル切替部の構成例を示すブロック図である。 図37の画像復号装置の復号処理を説明するフローチャートである。 図39のステップS132の可逆復号処理を説明するフローチャートである。 図40のステップS153のマクロブロックタイプの復号処理を説明するフローチャートである。 図39のステップS138の予測処理を説明するフローチャートである。 本発明を適用した学習装置の一実施の形態の構成を示すブロック図である。 ハフマン符号を説明する図である。 図43の学習装置の学習フローを説明するフローチャートである。 コンピュータのハードウエアの構成例を示すブロック図である。
 以下、図を参照して本発明の実施の形態について説明する。
[画像符号化装置の構成例]
 図12は、本発明を適用した画像処理装置としての画像符号化装置の一実施の形態の構成を表している。
 この画像符号化装置51は、例えば、H.264及びMPEG-4 Part10(Advanced Video Coding)(以下H.264/AVCと記す)方式で画像を圧縮符号化する。
 図12の例において、画像符号化装置51は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部75、予測画像選択部76、レート制御部77、およびモードテーブル切替部78により構成されている。
 A/D変換部61は、入力された画像をA/D変換し、画面並べ替えバッファ62に出力し、記憶させる。画面並べ替えバッファ62は、記憶した表示の順番のフレームの画像を、GOP(Group of Picture)に応じて、符号化のためのフレームの順番に並べ替える。
 演算部63は、画面並べ替えバッファ62から読み出された画像から、予測画像選択部76により選択されたイントラ予測部74からの予測画像または動き予測・補償部75からの予測画像を減算し、その差分情報を直交変換部64に出力する。直交変換部64は、演算部63からの差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施し、その変換係数を出力する。量子化部65は直交変換部64が出力する変換係数を量子化する。
 量子化部65の出力となる、量子化された変換係数は、可逆符号化部66に入力され、ここで可変長符号化、算術符号化等の可逆符号化が施され、圧縮される。可逆符号化部66においては、可逆符号化方式として、H.264/AVC方式で定められているCAVLC(Context-Adaptive Variable Length Coding)による可変長符号化が行われる。
 可逆符号化部66は、量子化された変換係数を符号化するとともに、シンタクス要素も符号化し、圧縮画像におけるヘッダ情報の一部とする。このとき、可逆符号化部66は、モードテーブル切替部78により切り替えられた符号化方法で、シンタクス要素のうちの予測モードに関する情報を符号化する。可逆符号化部66は、符号化したデータを蓄積バッファ67に供給して蓄積させる。
 シンタクス要素としては、イントラ予測部74または動き予測・補償部75から取得される予測モードに関する情報、レート制御部77から取得される量子化パラメータ、動き予測・補償部75から取得される動きベクトル情報や参照フレーム情報などがある。また、予測モードに関する情報としては、例えば、マクロブロックタイプの情報や、どのイントラ予測モードであるかの情報(以下、イントラ予測モードの情報と称する)がある。
 マクロブロックタイプの情報は、動き予測・補償部75やイントラ予測部74から取得される。イントラ予測モードの情報は、必要に応じてイントラ予測部74から取得される。
 蓄積バッファ67は、可逆符号化部66から供給されたデータを、H.264/AVC方式で符号化された圧縮画像として、例えば、後段の図示せぬ記録装置や伝送路などに出力する。
 また、量子化部65より出力された、量子化された変換係数は、逆量子化部68にも入力され、逆量子化された後、さらに逆直交変換部69において逆直交変換される。逆直交変換された出力は演算部70により予測画像選択部76から供給される予測画像と加算されて、局部的に復号された画像となる。デブロックフィルタ71は、復号された画像のブロック歪を除去した後、フレームメモリ72に供給し、蓄積させる。フレームメモリ72には、デブロックフィルタ71によりデブロックフィルタ処理される前の画像も供給され、蓄積される。
 スイッチ73はフレームメモリ72に蓄積された参照画像を、動き予測・補償部75またはイントラ予測部74に出力する。
 この画像符号化装置51においては、例えば、画面並べ替えバッファ62からのIピクチャ、Bピクチャ、およびPピクチャが、イントラ予測(イントラ処理とも称する)する画像として、イントラ予測部74に供給される。また、画面並べ替えバッファ62から読み出されたBピクチャおよびPピクチャが、インター予測(インター処理とも称する)する画像として、動き予測・補償部75に供給される。
 イントラ予測部74は、画面並べ替えバッファ62から読み出されたイントラ予測する画像とフレームメモリ72から供給された参照画像に基づいて、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。その際、イントラ予測部74は、候補となる全てのイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして選択する。
 イントラ予測部74は、最適イントラ予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部76に供給する。イントラ予測部74は、予測画像選択部76により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードの情報を、対応するマクロブロックタイプの情報とともに、可逆符号化部66に供給する。可逆符号化部66は、これらの情報をシンタクス要素として符号化し、圧縮画像におけるヘッダ情報の一部とする。
 動き予測・補償部75は、候補となる全てのインター予測モードの動き予測・補償処理を行う。すなわち、動き予測・補償部75には、画面並べ替えバッファ62から読み出されたインター処理する画像と、スイッチ73を介してフレームメモリ72から参照画像が供給される。動き予測・補償部75は、インター処理する画像と参照画像に基づいて、候補となる全てのインター予測モードの動きベクトルを検出し、動きベクトルに基づいて参照画像に補償処理を施し、予測画像を生成する。
 また、動き予測・補償部75は、候補となる全てのインター予測モードに対してコスト関数値を算出する。動き予測・補償部75は、算出したコスト関数値のうち、最小値を与える予測モードを、最適インター予測モードとして決定する。
 動き予測・補償部75は、最適インター予測モードで生成された予測画像、およびそのコスト関数値を、予測画像選択部76に供給する。動き予測・補償部75は、予測画像選択部76により最適インター予測モードで生成された予測画像が選択された場合、その最適インター予測モードに対応するマクロブロックタイプの情報を可逆符号化部66に出力する。
 このとき、動きベクトル情報、フラグ、参照フレーム情報なども可逆符号化部66に出力される。可逆符号化部66は、動き予測・補償部75からの情報をシンタクス要素として可逆符号化処理し、圧縮画像のヘッダ部に挿入する。
 予測画像選択部76は、イントラ予測部74または動き予測・補償部75より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードから、最適予測モードを決定する。そして、予測画像選択部76は、決定された最適予測モードの予測画像を選択し、演算部63,70に供給する。このとき、予測画像選択部76は、予測画像の選択情報を、イントラ予測部74または動き予測・補償部75に供給する。
 レート制御部77は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、対応する量子化パラメータにより、量子化部65の量子化動作のレートを制御する。量子化部65のレートの制御に用いられた量子化パラメータは、モードテーブル切替部78および可逆符号化部66に供給される。
 モードテーブル切替部78は、レート制御部77からの量子化パラメータに応じて、予測モードに関する情報に対する符号化方法を切り替え、切り替えた符号化方法の情報を、可逆符号化部66に供給する。例えば、予測モードに関する情報に対するVLCテーブルが切り替えられる。
 なお、本実施の形態においては、以下、予測モードに関する情報のうち、マクロブロックタイプに応じて、VLCテーブルが切り替えられる例について説明される。
[H.264/AVC方式の説明]
 図13は、H.264/AVC方式における動き予測・補償のブロックサイズの例を示す図である。H.264/AVC方式においては、ブロックサイズを可変にして、動き予測・補償が行われる。
 図13の上段には、左から、16×16画素、16×8画素、8×16画素、および8×8画素のパーティションに分割された16×16画素で構成されるマクロブロックが順に示されている。また、図13の下段には、左から、8×8画素、8×4画素、4×8画素、および4×4画素のサブパーティションに分割された8×8画素のパーティションが順に示されている。
 すなわち、H.264/AVC方式においては、1つのマクロブロックを、16×16画素、16×8画素、8×16画素、あるいは8×8画素のいずれかのパーティションに分割して、それぞれ独立した動きベクトル情報を持つことが可能である。また、8×8画素のパーティションに関しては、8×8画素、8×4画素、4×8画素、あるいは4×4画素のいずれかのサブパーティションに分割し、それぞれ独立した動きベクトル情報を持つことが可能である。
 H.264/AVC方式においては、図13を参照して上述した動き予測・補償処理が行われることにより、膨大な動きベクトル情報が生成され、これをこのまま符号化することは、符号化効率の低下を招いてしまう。これに対して、H.264/AVC方式においては、図14に示す方法により、動きベクトルの符号化情報の低減が実現されている。
 図14は、H.264/AVC方式による動きベクトル情報の生成方法について説明する図である。
 図14の例において、これから符号化される対象ブロックE(例えば、16×16画素)と、既に符号化済みであり、対象ブロックEに隣接するブロックA乃至Dが示されている。
 すなわち、ブロックDは、対象ブロックEの左上に隣接しており、ブロックBは、対象ブロックEの上に隣接しており、ブロックCは、対象ブロックEの右上に隣接しており、ブロックAは、対象ブロックEの左に隣接している。なお、ブロックA乃至Dが区切られていないのは、それぞれ、図13で上述した16×16画素乃至4×4画素のうちのいずれかの構成のブロックであることを表している。
 例えば、X(=A,B,C,D,E)に対する動きベクトル情報を、mvXで表す。まず、対象ブロックEに対する予測動きベクトル情報pmvEは、ブロックA,B,Cに関する動きベクトル情報を用いて、メディアン予測により次の式(5)のように生成される。
 pmvE = med(mvA,mvB,mvC)              ・・・(5)
 ブロックCに関する動きベクトル情報が、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により、利用可能でない(unavailableである)場合がある。この場合には、ブロックCに関する動きベクトル情報は、ブロックDに関する動きベクトル情報で代用される。
 対象ブロックEに対する動きベクトル情報として、圧縮画像のヘッダ部に付加されるデータmvdEは、pmvEを用いて、次の式(6)のように生成される。

 mvdE = mvE - pmvE                ・・・(6)
 なお、実際には、動きベクトル情報の水平方向、垂直方向のそれぞれの成分に対して、独立に処理が行われる。
 このように、予測動きベクトル情報を生成し、隣接するブロックとの相関で生成された予測動きベクトル情報と動きベクトル情報との差分であるデータmvdを、圧縮画像のヘッダ部に付加することにより、動きベクトル情報を低減することができる。
 ところで、Bピクチャについての動きベクトル情報における情報量は膨大であるが、H.264/AVC方式においては、ダイレクトモードと呼ばれるモードが用意されている。ダイレクトモードにおいては、動きベクトル情報は、圧縮画像中には格納されない。
 すなわち、復号側においては、対象ブロックの周辺の動きベクトル情報、または参照ピクチャにおいて、対象ブロックと座標が同じブロックであるco-locatedブロックの動きベクトル情報から、対象ブロックの動きベクトル情報が抽出される。したがって、動きベクトル情報を復号側に送る必要がない。
 このダイレクトモードには、空間ダイレクトモード(Spatial Direct Mode)と、時間ダイレクトモード(Temporal Direct Mode)の2種類が存在する。空間ダイレクトモードは、主として空間方向(ピクチャ内の水平、垂直の2次元空間)の動き情報の相関を利用するモードであり、一般的に、同じような動きが含まれる画像で、動きの速度が変化する画像で効果がある。一方、時間ダイレクトモードは、主として時間方向の動き情報の相関を利用するモードであり、一般的に、異なる動きが含まれる画像で、動きの速度が一定の画像で効果がある。
 これらの空間ダイレクトモードと時間ダイレクトモードのうち、どちらを用いるかは、スライス毎に切り替えることができる。
 再び、図14を参照して、H.264/AVC方式による空間ダイレクトモードについて説明する。図14の例においては、上述したように、これから符号化される対象ブロックE(例えば、16×16画素)と、既に符号化済みであり、対象ブロックEに隣接するブロックA乃至Dが示されている。そして、例えば、X(=A,B,C,D,E)に対する動きベクトル情報は、mvXで表わされる。
 対象ブロックEに対する予測動きベクトル情報pmvEは、ブロックA,B,Cに関する動きベクトル情報を用いて、メディアン予測により上述した式(5)のように生成される。そして、空間ダイレクトモードにおける対象ブロックEに対する動きベクトル情報mvEは、次の式(7)で表される。

 mvE = pmvE                    ・・・(7)
 すなわち、空間ダイレクトモードにおいては、メディアン予測により生成された予測動きベクトル情報が、対象ブロックの動きベクトル情報とされる。すなわち、対象ブロックの動きベクトル情報は、符号化済みブロックの動きベクトル情報で生成される。したがって、空間ダイレクトモードによる動きベクトルは、復号側でも生成することができるので、動きベクトル情報を送る必要がない。
 次に、図15を参照して、H.264/AVC方式における時間ダイレクトモードについて説明する。
 図15の例においては、時間軸tが時間の経過を表しており、左から順に、L0(List0)参照ピクチャ、いまから符号化される対象ピクチャ、L1(List1)参照ピクチャが示されている。なお、L0参照ピクチャ、対象ピクチャ、L1参照ピクチャの並びは、H.264/AVC方式においては、この順に限らない。
 対象ピクチャの対象ブロックは、例えば、Bスライスに含まれている。したがって、対象ピクチャの対象ブロックについては、L0参照ピクチャとL1参照ピクチャに対して、時間ダイレクトモードに基づくL0動きベクトル情報mvL0とL1動きベクトル情報mvL1が算出される。
 また、L0参照ピクチャにおいて、いまから符号化される対象ブロックと同じ空間上のアドレス(座標)にあるブロックであるco-locatedブロックにおける動きベクトル情報mvcolは、L0参照ピクチャとL1参照ピクチャに基づいて算出されている。
 ここで、対象ピクチャとL0参照ピクチャの時間軸上の距離をTDBとし、L0参照ピクチャとL1参照ピクチャの時間軸上の距離をTDDとする。この場合、対象ピクチャにおけるL0動きベクトル情報mvL0と、対象ピクチャにおけるL1動きベクトル情報mvL1は、次の式(8)で算出することができる。
Figure JPOXMLDOC01-appb-M000002
 なお、H.264/AVC方式においては、圧縮画像中には、対象ピクチャに対する時間軸t上の距離TDB、TDDに相当する情報が存在しない。したがって、距離TDB、TDDの実際の値としては、ピクチャの出力順序を示す情報であるPOC(Picture Order Count)が用いられる。
 また、H.264/AVC方式においては、同様に動きベクトル情報を送る必要がないモードとして、他に、スキップモードがある。動きベクトルに関する符号化データが0の場合(H.264/AVC方式の場合、上述した式(7)が成り立つ場合)で、かつ、DCT係数が全て0のとき、その対象ブロックは、スキップモードとなる。また、Bピクチャの場合には、ダイレクトモードで、かつ、DCT係数が0のとき、その対象ブロックは、スキップモードとなる。
[モードテーブル切替部の構成例]
 図16は、モードテーブル切替部の構成例を示すブロック図である。
 図16の例においては、モードテーブル切替部78は、VLC(Variable Length Coding)テーブル切替部81およびコードナンバ(Code Number)割当部82により構成される。
 レート制御部77からの量子化パラメータは、VLCテーブル切替部81およびコードナンバ割当部82に供給される。この量子化パラメータは、可逆符号化部66にも供給される。
 VLCテーブル切替部81は、マクロブロックタイプに対する、少なくとも2種類のVLCテーブルを有している。VLCテーブル切替部81は、レート制御部77からの量子化パラメータに応じて、2種類のマクロブロックタイプに対するVLCテーブルのうちのどちらかを選択する。VLCテーブル切替部81は、選択したマクロブロックタイプに対するVLCテーブルの情報に、コードナンバ割当部82からの割当情報を付加して、可逆符号化部66に供給する。
 コードナンバ割当部82は、レート制御部77からの量子化パラメータに応じて、コードナンバ0に、所定のマクロブロックタイプを割り当て、その割当情報を、VLCテーブル切替部81に供給する。
 可逆符号化部66は、H.264/AVC方式の規格に基づいて、直交変換係数や、マクロブロックタイプ以外のシンタクス要素(レート制御部77からの量子化パラメータを含む)を符号化する。これに対して、可逆符号化部66は、VLCテーブル切替部81により選択されたVLCテーブルを用いて、マクロブロックタイプに対する符号化を行う。
[モードテーブル切替処理の説明]
 次に、モードテーブル切替部78により行われるモードテーブル切替処理について説明する。
 図17の例においては、VTCテーブル切替部81が有するテーブルとして、非可逆符号化処理においてよく用いられるゴロム(Golomb)符号のk=0のテーブル(左)と、k=1のテーブル(右)が示されている。テーブルは、コードナンバ(Code Number)と対応する符号語(Code Words)で構成される。なお、k=0の場合は、図5に示したunary符号に他ならない。
 k=0のテーブルにおいては、例えば、コードナンバ0と符号語1が対応しており、コードナンバ1と符号語01が対応しており、コードナンバ2と符号語001が対応しており、コードナンバ3と符号語0001が対応している。また、コードナンバ4と符号語00001が対応しており、コードナンバ5と符号語000001が対応しており、コードナンバ6と符号語0000001が対応している。
 k=1のテーブルにおいては、例えば、コードナンバ0と符号語10が対応しており、コードナンバ1と符号語11が対応しており、コードナンバ2と符号語010が対応しており、コードナンバ3と符号語011が対応している。また、コードナンバ4と符号語0010が対応しており、コードナンバ5と符号語0011が対応しており、コードナンバ6と符号語00010が対応している。
 このように、図17の例においては、コードナンバ”0”に関しては、k=0のテーブルでは、1ビットで表されるのに対し、k=1のテーブルでは、2ビット必要である。しかしながら、コードナンバ”6”に関しては、k=0のテーブルでは、7ビットで表されるのに対し、k=1のテーブルでは、5ビット必要である。
 すなわち、k=0のテーブルとk=1のテーブルを比較すると、k=0のテーブルでは、小さい(若い)コードナンバに関しては、k=1のテーブルより符号量が短い。また、例えば、コードナンバと符号語のビット長との関数を考えたとき、k=0のテーブルとk=1のテーブルとは、その関数の傾きが異なる。k=0のテーブルは、k=1のテーブルに比して、その関数の傾きが大きい(急である)。それゆえ、k=0のテーブルでは、小さいコードナンバに関しては、k=1のテーブルより符号量が短いが、大きいコードナンバに関しては、k=1のテーブルより符号量が多くなる。
 なお、k≧2のテーブルは、k=1のテーブルよりさらに傾きが小さく(緩やかであり)、kが大きくなるにつれ、その関数の傾きがだんだん小さくなる傾向を有する。ちなみに、ゴロム符号の生成則は、次のとおりである。
 kを符号生成のためのパラメータとすると、k>0のとき、符号化対象とする整数x(≧0)について、xをkで割った商をq,余りをmとする。商qは、unary符号に符号化され、余りmはlog2kに従って、次のように符号化される。
 この値が整数値、すなわち、kが2のべき乗である場合、mは、log2kのバイナリ符号により符号化される。それ以外の場合、b=[log2k]としたとき、m=2b-k-1までの数は、b-1ビットまでのバイナリ符号により符号化され、残りについては、2b-kを加えた上で、bビットのバイナリ符号により符号化される。
 ここで、図11を参照して上述したように、QP=22のような予測モードの分布の場合、モード2乃至モード4の出現頻度が、QP=37と比して高くなる。すなわち、インター16×16モードのブロックサイズより小さいブロックサイズのモードの出現頻度が、QP=37と比して高い。
 VLCテーブル切替部81は、このようなQP=22の場合に、k=1のような関数の傾きが小さいテーブルによる符号を用いる。これにより、インター16×16モードのブロックサイズより小さいブロックサイズのモードに対する符号量を短くすることができ、その結果、平均符号長を短くすることが可能である。
 これに対して、QP=37のような予測モード分布の場合、モード2乃至モード4の出現頻度がかなり低い。モード4に関しては、ほとんど出現しない。すなわち、インター16×16モードのブロックサイズより小さいブロックサイズのモードの出現頻度が、QP=22と比してかなり低い。
 VLCテーブル切替部81は、このようなQP=37の場合に、k=0のような若いコードナンバの符号長が短いテーブルによる符号を用いる。これにより、スキップ(またはダイレクト)モードやインター16×16モードといったような、より大きいブロックサイズのモードに対する符号量を短くすることができ、その結果、平均符号長を短くすることが可能である。
 また、従来において上述した図11において、QP=22においては、最も出現確率の高い予測モードは、インター16×16モードであるが、QP=37においては、スキップ(またはダイレクト)モードである。
 そこで、コードナンバ割当部82は、より高いビットレート(つまり、より低い量子化パラメータ)においては、最も少ないビット長で表現できるコードナンバ”0”に対して、インター16×16モードを割り当てる。
 これに対して、コードナンバ割当部82は、より低いビットレート(つまり、より高い量子化パラメータ)においては、コードナンバ”0”に対して、スキップ(またはダイレクト)モードを割り当てる。このようにすることで、さらに、平均符号長を短くすることができる。
 すなわち、具体的には、画像符号化装置51において、VLCテーブル切替部81は、例えば、上述した小さい(若い)コードナンバの符号長、および傾きのうち少なくともどちらかが異なるk=0のテーブルおよびk=1のテーブルを有している。
 VLCテーブル切替部81は、所定の閾値と量子化パラメータの値とを比較し、複数のテーブルの中から、マクロブロックタイプの符号化に用いるテーブルを、量子化パラメータに応じて切り替える。さらに、コードナンバ割当部82は、コードナンバ”1”の割り当てを、量子化パラメータに応じて切り替える。なお、この所定の閾値は、例えば、図43以降で後述されるVLCテーブルの学習時に求められる。
 以上により、低いビットレートにおいても、高いヒットレートにおいても、出力となる圧縮画像において、マクロブロックタイプに対する平均符号長を短くし、より高い符号化効率の実現を可能とすることができる。
 なお、上記説明においては、インターマクロブロックに関するマクロブロックタイプを例に説明したが、上述した説明のうち、VLCテーブルの切替については、イントラマクロブロックに関しても同様である。
 すなわち、より高い量子化パラメータで符号化される場合、k=0のようなVLCテーブルによる符号を用いることで、より出現頻度の高い、若いコードナンバに対するイントラマクロブロックタイプに対する符号長を短くすることが可能である。一方、より低い量子化パラメータで符号化される場合、k=1のようなVLCテーブルによる符号を用いることで、それなりの頻度で出現する、コードナンバが若くないイントラマクロブロックタイプに対する符号長を短くすることが可能である。
 これにより、イントラマクロブロックタイプの場合も、符号化効率を改善することができる。
 また、上記説明においては、QP=37などのより高い量子化パラメータに対するVLCテーブルとして、例えば、ゴロム符号のk=0のテーブルを説明したが、VLCテーブルは、これに限らない。すなわち、より高い量子化パラメータに対するVLCテーブルとしては、ゴロム符号のk=0のテーブルのようにコードナンバが大きい事象に対しては比較的長いビットが発生するとしても、コードナンバが小さい事象に対するビット長が短いテーブルであればよい。
 さらに、QP=22などのより低い量子化パラメータに対するVLCテーブルとして、例えば、ゴロム符号のk=1のテーブルを説明したが、VLCテーブルは、これに限らない。すなわち、より低い量子化パラメータに対するVLCテーブルとしては、ゴロム符号のk=1のテーブルのようにコードナンバが小さい事象に対するビット長はk=0ほど短くないとしても、コードナンバが増大しても、k=0ほどビット長は増大しないテーブルであればよい。
 なお、上記説明においては、ゴロム符号を例に説明したが、ハフマン符号に基づいて生成されたVLCテーブルを用いることもできる。なお、この場合、トレーニング信号を用いて、学習することにより、各量子化パラメータに対して、ハフマン符号に基づいて生成されたVLCテーブルを予め準備しておくことが必要となる。このVLCテーブルの学習については、図43以降で詳しく説明する。
 また、上記説明においては、2種類のVLCテーブルを切り替える例を説明したが、VLCテーブルは、複数であればよく、2種類に限らない。
[画像符号化装置の符号化処理の説明]
 次に、図18のフローチャートを参照して、図12の画像符号化装置51の符号化処理について説明する。
 ステップS11において、A/D変換部61は入力された画像をA/D変換する。ステップS12において、画面並べ替えバッファ62は、A/D変換部61より供給された画像を記憶し、各ピクチャの表示する順番から符号化する順番への並べ替えを行う。
 ステップS13において、演算部63は、ステップS12で並び替えられた画像と予測画像との差分を演算する。予測画像は、インター予測する場合は動き予測・補償部75から、イントラ予測する場合はイントラ予測部74から、それぞれ予測画像選択部76を介して演算部63に供給される。
 差分データは元の画像データに較べてデータ量が小さくなっている。したがって、画像をそのまま符号化する場合に較べて、データ量を圧縮することができる。
 ステップS14において、直交変換部64は演算部63から供給された差分情報を直交変換する。具体的には、離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数が出力される。ステップS15において、量子化部65は変換係数を量子化する。この量子化に際しては、後述するステップS25の処理で説明されるように、レートが制御される。
 以上のようにして量子化された差分情報は、次のようにして局部的に復号される。すなわち、ステップS16において、逆量子化部68は量子化部65により量子化された変換係数を量子化部65の特性に対応する特性で逆量子化する。ステップS17において、逆直交変換部69は逆量子化部68により逆量子化された変換係数を直交変換部64の特性に対応する特性で逆直交変換する。
 ステップS18において、演算部70は、予測画像選択部76を介して入力される予測画像を局部的に復号された差分情報に加算し、局部的に復号された画像(演算部63への入力に対応する画像)を生成する。ステップS19においてデブロックフィルタ71は、演算部70より出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS20においてフレームメモリ72は、フィルタリングされた画像を記憶する。なお、フレームメモリ72にはデブロックフィルタ71によりフィルタ処理されていない画像も演算部70から供給され、記憶される。
 ステップS21において、イントラ予測部74および動き予測・補償部75は、それぞれ画像の予測処理を行う。すなわち、ステップS21において、イントラ予測部74は、イントラ予測モードのイントラ予測処理を行う。動き予測・補償部75は、インター予測モードの動き予測・補償処理を行う。
 ステップS21における予測処理の詳細は、図19を参照して後述するが、この処理により、候補となる全てのイントラ予測モードでの予測処理がそれぞれ行われ、候補となる全てのイントラ予測モードでのコスト関数値がそれぞれ算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードが選択され、最適イントラ予測モードのイントラ予測により生成された予測画像とそのコスト関数値が予測画像選択部76に供給される。
 また、この処理により、候補となる全てのインター予測モードでの予測処理がそれぞれ行われ、候補となる全てのインター予測モードでのコスト関数値がそれぞれ算出される。算出されたコスト関数値に基づいて、インター予測モードの中から、最適インター予測モードが決定され、最適インター予測モードで生成された予測画像とそのコスト関数値が、予測画像選択部76に供給される。
 ステップS22において、予測画像選択部76は、イントラ予測部74および動き予測・補償部75より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードのうちの一方を、最適予測モードに決定する。そして、予測画像選択部76は、決定した最適予測モードの予測画像を選択し、演算部63,70に供給する。この予測画像が、上述したように、ステップS13,S18の演算に利用される。
 なお、この予測画像の選択情報は、イントラ予測部74または動き予測・補償部75に供給される。最適イントラ予測モードの予測画像が選択された場合、イントラ予測部74は、最適イントラ予測モードの情報を、対応するマクロブロックタイプの情報とともに、可逆符号化部66に供給する。
 最適インター予測モードの予測画像が選択された場合、動き予測・補償部75は、最適インター予測モードに対応するマクロブロックタイプの情報と、必要に応じて、最適インター予測モードに応じた情報を可逆符号化部66に出力する。最適インター予測モードに応じた情報としては、動きベクトル情報や、フラグ、参照フレーム情報などがあげられる。
 ステップS23において、可逆符号化部66は、可逆符号化処理を行う。この可逆符号化処理については、図33を参照して後述される。
 ステップS23の処理により、量子化部65より出力された量子化された変換係数が可逆符号化され、圧縮される。このとき、上述したステップS22において可逆符号化部66に入力された、マクロブロックタイプや動きベクトル情報などのシンタクス要素、およびステップS25の制御に用いられた量子化パラメータのシンタクス要素も、符号化され、ヘッダ情報に付加される。なお、シンタクス要素のうち、マクロブロックタイプについては、その量子化パラメータに応じて選択されたVLCテーブルにより符号化され、ヘッダ情報に付加される。
 ステップS24において蓄積バッファ67は差分画像を圧縮画像として蓄積する。蓄積バッファ67に蓄積された圧縮画像が適宜読み出され、伝送路を介して復号側に伝送される。
 ステップS25においてレート制御部77は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、対応する量子化パラメータにより、量子化部65の量子化動作のレートを制御する。量子化部65のレートの制御に用いられた量子化パラメータは、モードテーブル切替部78に供給され、ステップS23の可逆符号化処理に用いられる。また、この量子化パラメータは、ステップS23において符号化され、ヘッダに付加される。
[予測処理の説明]
 次に、図19のフローチャートを参照して、図18のステップS21における予測処理を説明する。
 画面並べ替えバッファ62から供給される処理対象の画像がイントラ処理されるブロックの画像である場合、参照される復号済みの画像がフレームメモリ72から読み出され、スイッチ73を介してイントラ予測部74に供給される。これらの画像に基づいて、ステップS31において、イントラ予測部74は処理対象のブロックの画素を、候補となる全てのイントラ予測モードでイントラ予測する。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。
 ステップS31におけるイントラ予測処理の詳細は、図31を参照して後述するが、この処理により、候補となる全てのイントラ予測モードでイントラ予測が行われ、候補となる全てのイントラ予測モードに対してコスト関数値が算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードが選択され、最適イントラ予測モードのイントラ予測により生成された予測画像とそのコスト関数値が予測画像選択部76に供給される。
 画面並べ替えバッファ62から供給される処理対象の画像がインター処理される画像である場合、参照される画像がフレームメモリ72から読み出され、スイッチ73を介して動き予測・補償部75に供給される。これらの画像に基づいて、ステップS32において、動き予測・補償部75はインター動き予測処理を行う。すなわち、動き予測・補償部75は、フレームメモリ72から供給される画像を参照して、候補となる全てのインター予測モードの動き予測処理を行う。
 ステップS32におけるインター動き予測処理の詳細は、図32を参照して後述する。この処理により、候補となる全てのインター予測モードで動き予測処理が行われ、候補となる全てのインター予測モードに対してコスト関数値が算出される。
 ステップS33において、動き予測・補償部75は、ステップS32において算出されたインター予測モードに対してのコスト関数値を比較する。動き予測・補償部75は、そのコスト関数値が、最小値を与える予測モードを、最適インター予測モードとして決定し、最適インター予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部76に供給する。
[H.264/AVC方式におけるイントラ予測処理の説明]
 次に、H.264/AVC方式で定められているイントラ予測の各モードについて説明する。
 まず、輝度信号に対するイントラ予測モードについて説明する。輝度信号のイントラ予測モードには、イントラ4×4予測モード、イントラ8×8予測モード、およびイントラ16×16予測モードの3通りの方式が定められている。これは、ブロック単位を定めるモードであり、マクロブロック毎に設定される。また、色差信号に対しては、マクロブロック毎に輝度信号とは独立したイントラ予測モードを設定することが可能である。
 さらに、イントラ4×4予測モードの場合、4×4画素の対象ブロック毎に、9種類の予測モードから1つの予測モードを設定することができる。イントラ8×8予測モードの場合、8×8画素の対象ブロック毎に、9種類の予測モードから1つの予測モードを設定することができる。また、イントラ16×16予測モードの場合、16×16画素の対象マクロブロックに対して、4種類の予測モードから1つの予測モードを設定することができる。
 なお、以下、イントラ4×4予測モード、イントラ8×8予測モード、およびイントラ16×16予測モードは、それぞれ、4×4画素のイントラ予測モード、8×8画素のイントラ予測モード、および16×16画素のイントラ予測モードとも適宜称する。
 図20の例において、各ブロックに付されている数字-1乃至25は、その各ブロックのビットストリーム順(復号側における処理順)を表している。なお、輝度信号については、マクロブロックが4×4画素に分割されて、4×4画素のDCTが行われる。そして、イントラ16×16予測モードの場合のみ、-1のブロックに示されるように、各ブロックの直流成分を集めて、4×4行列が生成され、これに対して、さらに、直交変換が施される。
 一方、色差信号については、マクロブロックが4×4画素に分割され、4×4画素のDCTが行われた後に、16および17の各ブロックに示されるように、各ブロックの直流成分を集めて、2×2行列が生成され、これに対して、さらに、直交変換が施される。
 なお、このことは、イントラ8×8予測モードに関しては、ハイプロファイルまたはそれ以上のプロファイルで、対象マクロブロックに、8×8直交変換が施される場合についてのみ適用可能である。
 図21および図22は、9種類の輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)を示す図である。平均値(DC)予測を示すモード2以外の8種類の各モードは、それぞれ、図23の番号0,1,3乃至8で示される方向に対応している。
 9種類のIntra_4x4_pred_modeについて、図24を参照して説明する。図24の例において、画素a乃至pは、イントラ処理される対象ブロックの画素を表し、画素値A乃至Mは、隣接ブロックに属する画素の画素値を表している。すなわち、画素a乃至pは、画面並べ替えバッファ62から読み出された処理対象の画像であり、画素値A乃至Mは、フレームメモリ72から読み出され、参照される復号済みの画像の画素値である。
 図21および図22に示す各イントラ予測モードの場合、画素a乃至pの予測画素値は、隣接ブロックに属する画素の画素値A乃至Mを用いて、以下のように生成される。なお、画素値が“available”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由がなく、利用可能であることを表す。これに対して、画素値が“unavailable”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により利用可能ではないことを表す。
 モード0はVertical Prediction modeであり、画素値A乃至Dが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(9)のように生成される。

 画素a, e, i, mの予測画素値 = A
 画素b, f, j, nの予測画素値 = B
 画素c, g, k, oの予測画素値 = C
 画素d, h, l, pの予測画素値 = D       ・・・(9)
 モード1はHorizontal Prediction modeであり、画素値I乃至Lが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(10)のように生成される。

 画素a, b, c, dの予測画素値 = I
 画素e, f, g, hの予測画素値 = J
 画素i, j, k, lの予測画素値 = K
 画素m, n, o, pの予測画素値 = L       ・・・(10)
 モード2はDC Prediction modeであり、画素値A,B,C,D,I,J,K,Lが全て “available” である時、予測画素値は式(11)のように生成される。

 (A+B+C+D+I+J+K+L+4) >> 3  ・・・(11)
 また、画素値A,B,C,Dが全て “unavailable” である時、予測画素値は式(12)のように生成される。

 (I+J+K+L+2) >> 2          ・・・(12)
 また、画素値I,J,K,Lが全て “unavailable” である時、予測画素値は式(13)のように生成される。

 (A+B+C+D+2) >> 2          ・・・(13)
 なお、画素値A,B,C,D,I,J,K,Lが全て“unavailable” である時、128を予測画素値として用いる。
 モード3はDiagonal_Down_Left Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(14)のように生成される。

 画素aの予測画素値       = (A+2B+C+2) >> 2
 画素b,eの予測画素値     = (B+2C+D+2) >> 2
 画素c,f,iの予測画素値   = (C+2D+E+2) >> 2
 画素d,g,j,mの予測画素値 = (D+2E+F+2) >> 2
 画素h,k,nの予測画素値   = (E+2F+G+2) >> 2
 画素l,oの予測画素値     = (F+2G+H+2) >> 2
 画素pの予測画素値       = (G+3H+2)   >> 2
                           ・・・(14)
 モード4はDiagonal_Down_Right Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(15)のように生成される。

 画素mの予測画素値       = (J+2K+L+2) >> 2
 画素i,nの予測画素値     = (I+2J+K+2) >> 2
 画素e,j,oの予測画素値   = (M+2I+J+2) >> 2
 画素a,f,k,pの予測画素値 = (A+2M+I+2) >> 2
 画素b,g,lの予測画素値   = (M+2A+B+2) >> 2
 画素c,hの予測画素値     = (A+2B+C+2) >> 2
 画素dの予測画素値       = (B+2C+D+2) >> 2
                           ・・・(15)
 モード5はDiagonal_Vertical_Right Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(16)のように生成される。

 画素a,jの予測画素値     = (M+A+1)    >> 1
 画素b,kの予測画素値     = (A+B+1)    >> 1
 画素c,lの予測画素値     = (B+C+1)    >> 1
 画素dの予測画素値       = (C+D+1)    >> 1
 画素e,nの予測画素値     = (I+2M+A+2) >> 2
 画素f,oの予測画素値     = (M+2A+B+2) >> 2
 画素g,pの予測画素値     = (A+2B+C+2) >> 2
 画素hの予測画素値       = (B+2C+D+2) >> 2
 画素iの予測画素値       = (M+2I+J+2) >> 2
 画素mの予測画素値       = (I+2J+K+2) >> 2
                           ・・・(16)
 モード6はHorizontal_Down Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(17)のように生成される。

 画素a,gの予測画素値     = (M+I+1)    >> 1
 画素b,hの予測画素値     = (I+2M+A+2) >> 2
 画素cの予測画素値       = (M+2A+B+2) >> 2
 画素dの予測画素値       = (A+2B+C+2) >> 2
 画素e,kの予測画素値     = (I+J+1)    >> 1
 画素f,lの予測画素値     = (M+2I+J+2) >> 2
 画素i,oの予測画素値     = (J+K+1)    >> 1
 画素j,pの予測画素値     = (I+2J+K+2) >> 2
 画素mの予測画素値       = (K+L+1)    >> 1
 画素nの予測画素値       = (J+2K+L+2) >> 2
                           ・・・(17)
 モード7は、Vertical_Left Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(18)のように生成される。

 画素aの予測画素値       = (A+B+1)    >> 1
 画素b,iの予測画素値     = (B+C+1)    >> 1
 画素c,jの予測画素値     = (C+D+1)    >> 1
 画素d,kの予測画素値     = (D+E+1)    >> 1
 画素lの予測画素値       = (E+F+1)    >> 1
 画素eの予測画素値       = (A+2B+C+2) >> 2
 画素f,mの予測画素値     = (B+2C+D+2) >> 2
 画素g,nの予測画素値     = (C+2D+E+2) >> 2
 画素h,oの予測画素値     = (D+2E+F+2) >> 2
 画素pの予測画素値       = (E+2F+G+2) >> 2
                           ・・・(18)
 モード8は、Horizontal_Up Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(19)のように生成される。

 画素aの予測画素値       = (I+J+1)    >> 1
 画素bの予測画素値       = (I+2J+K+2) >> 2
 画素c,eの予測画素値     = (J+K+1)    >> 1
 画素d,fの予測画素値     = (J+2K+L+2) >> 2
 画素g,iの予測画素値     = (K+L+1)    >> 1
 画素h,jの予測画素値     = (K+3L+2)   >> 2
 画素k,l,m,n,o,pの予測画素値 = L
                           ・・・(19)
 次に、再び、図4を参照して、輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)の符号化方式について説明する。図4の例において、4×4画素からなり、符号化対象となる対象ブロックCが示されており、対象ブロックCに隣接する4×4画素からなるブロックAおよびブロックBが示されている。
 この場合、対象ブロックCにおけるIntra_4x4_pred_modeと、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeとは高い相関があると考えられる。この相関性を用いて、次のように符号化処理を行うことにより、より高い符号化効率を実現することができる。
 すなわち、図4の例において、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeを、それぞれ、Intra_4x4_pred_modeAおよびIntra_4x4_pred_modeBとして、MostProbableModeを次の式(20)と定義する。

 MostProbableMode=Min(Intra_4x4_pred_modeA, Intra_4x4_pred_modeB)
                           ・・・(20)
 すなわち、ブロックAおよびブロックBのうち、より小さなmode_numberを割り当てられている方をMostProbableModeとする。
 ビットストリーム中には、対象ブロックCに対するパラメータとして、prev_intra4x4_pred_mode_flag[luma4x4BlkIdx] および rem_intra4x4_pred_mode[luma4x4BlkIdx] という2つの値が定義されており、次の式(21)に示される擬似コードに基づく処理により、復号処理が行われ、対象ブロックCに対するIntra_4x4_pred_mode、Intra4x4PredMode[luma4x4BlkIdx] の値を得ることができる。
 if(prev_intra4x4_pred_mode_flag[luma4x4BlkIdx])
       Intra4x4PredMode[luma4x4BlkIdx] = MostProbableMode
 else
  if(rem_intra4x4_pred_mode[luma4x4BlkIdx] < MostProbableMode)
   Intra4x4PredMode[luma4x4BlkIdx]=rem_intra4x4_pred_mode[luma4x4BlkIdx]
    else
   Intra4x4PredMode[luma4x4BlkIdx]=rem_intra4x4_pred_mode[luma4x4BlkIdx] + 1
                           ・・・(21)
 次に、8×8画素のイントラ予測モードについて説明する。図25および図26は、9種類の輝度信号の8×8画素のイントラ予測モード(Intra_8x8_pred_mode)を示す図である。
 対象の8×8ブロックにおける画素値を、p[x,y](0≦x≦7;0≦y≦7)とし、隣接ブロックの画素値をp[-1,-1],…,p[-1,15],p[-1,0],…,[p-1,7]のように表すものとする。
 8×8画素のイントラ予測モードについては、予測値を生成するに先立ち、隣接画素にローパスフィルタリング処理が施される。ここで、ローパスフィルタリング処理前の画素値を、p[-1,-1],…,p[-1,15],p[-1,0],…p[-1,7]、処理後の画素値をp'[-1,-1],…,p'[-1,15],p'[-1,0],…p'[-1,7]と表すとする。
 まず、p'[0,-1]は、p[-1,-1] が “available” である場合には、次の式(22)のように算出され、“not available” である場合には、次の式(23)のように算出される。

 p'[0,-1] = (p[-1,-1] + 2*p[0,-1] + p[1,-1] + 2) >> 2
                           ・・・(22)
 p'[0,-1] = (3*p[0,-1] + p[1,-1] + 2) >> 2
                           ・・・(23)
 p'[x,-1] (x=0,…,7)は、次の式(24)のように算出される。

 p'[x,-1] = (p[x-1,-1] + 2*p[x,-1] + p[x+1,-1] + 2) >>2
                           ・・・(24)
 p'[x,-1] (x=8,…,15)は、p[x,-1] (x=8,…,15) が “available” である場合には、次の式(25)のように算出される。

 p'[x,-1] = (p[x-1,-1] + 2*p[x,-1] + p[x+1,-1] + 2) >>2
 p'[15,-1] = (p[14,-1] + 3*p[15,-1] + 2) >>2
                           ・・・(25)
 p'[-1,-1]は、p[-1,-1]が “available” である場合には、以下のように算出される。すなわち、p'[-1,-1]は、p[0,-1]及びp[-1,0]の双方がavailableである場合には、式(26)のように算出され、p[-1,0] が “unavailable” である場合には、式(27)のように算出される。また、p'[-1,-1]は、p[0,-1] が “unavailable” である場合には、式(28)のように算出される。

 p'[-1,-1] = (p[0,-1] + 2*p[-1,-1] + p[-1,0] + 2) >>2
                           ・・・(26)
 p'[-1,-1] = (3*p[-1,-1] + p[0,-1] + 2) >>2
                           ・・・(27)
 p'[-1,-1] = (3*p[-1,-1] + p[-1,0] + 2) >>2
                           ・・・(28)
 p'[-1,y] (y=0, … ,7) は、p[-1,y] (y=0, … ,7) が “available” の時、以下のように算出される。すなわち、まず、p'[-1,0]は、p[-1,-1]が “available” である場合には、次の式(29)のように算出され、“unavailable” である場合には、式(30)のように算出される。

 p'[-1,0] = (p[-1,-1] + 2*p[-1,0] + p[-1,1] + 2) >>2
                           ・・・(29)
 p'[-1,0] = (3*p[-1,0] + p[-1,1] + 2) >>2
                           ・・・(30)
 また、p'[-1,y] (y=1,…,6)は、次の式(31)のように算出され、p'[-1,7]は、式(32)のように算出される。

 p[-1,y] = (p[-1,y-1] + 2*p[-1,y] + p[-1,y+1] + 2) >>2
                           ・・・(31)
 p'[-1,7] = (p[-1,6] + 3*p[-1,7] + 2) >>2
                           ・・・(32)
 このように算出されたp'を用いて、図25および図26に示される各イントラ予測モードにおける予測値は以下のように生成される。
 モード0はVertical Prediction modeであり、p[x,-1] (x=0, … ,7) が “available” である時のみ適用される。予測値pred8x8L[x,y]は、次の式(33)のように生成される。

 pred8x8L[x,y] = p'[x,-1] x,y=0,...,7
                           ・・・(33)
 モード1はHorizontal Prediction modeであり、p[-1,y] (y=0, … ,7) が “available” である時のみ適用される。予測値pred8x8L[x,y]は、次の式(34)のように生成される。

 pred8x8L[x,y] = p'[-1,y] x,y=0,...,7
                           ・・・(34)
 モード2はDC Prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、p[x,-1] (x=0, … ,7) および p[-1,y] (y=0, … ,7) の両方が “available” である場合には、予測値pred8x8L[x,y]は、次の式(35)のように生成される。

Figure JPOXMLDOC01-appb-M000003
 p[x,-1] (x=0, … ,7) は “available” であるが、 p[-1,y] (y=0, … ,7) が “unavailable” である場合には、予測値pred8x8L[x,y]は、次の式(36)のように生成される。

Figure JPOXMLDOC01-appb-M000004
 p[x,-1] (x=0, … ,7) は “unavailable” であるが、 p[-1,y] (y=0, … ,7) が “available” である場合には、予測値pred8x8L[x,y]は、次の式(37)のように生成される。

Figure JPOXMLDOC01-appb-M000005
 p[x,-1] (x=0, … ,7) および p[-1,y] (y=0, … ,7) の両方が “unavailable” である場合には、予測値pred8x8L[x,y]は、次の式(38)のように生成される。

 pred8x8L[x,y] = 128
                          ・・・(38)
  ただし、式(38)は、8ビット入力の場合を表している。
 モード3はDiagonal_Down_Left_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Diagonal_Down_Left_prediction modeは、p[x,-1], x=0,…,15が “available” の時のみ適用され、x=7かつy=7である予測画素値は、次の式(39)のように生成され、その他の予測画素値は、次の式(40)のように生成される。

 pred8x8L[x,y] = (p'[14,-1] + 3*p[15,-1] + 2) >> 2
                          ・・・(39)
 red8x8L[x,y] = (p'[x+y,-1] + 2*p'[x+y+1,-1] + p'[x+y+2,-1] + 2) >> 2
                          ・・・(40)
 モード4はDiagonal_Down_Right_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Diagonal_Down_Right_prediction modeは、p[x,-1],x=0,…,7及びp[-1,y],y=0,…,7が “available”の時のみ適用され、x > y である予測画素値は、次の式(41)のように生成され、x < y である予測画素値は、次の式(42)のように生成される。また、x = y である予測画素値は、次の式(43)のように生成される。

 pred8x8L[x,y] = (p'[x-y-2,-1] + 2*p'[x-y-1,-1] + p'[x-y,-1] + 2) >> 2
                          ・・・(41)
 pred8x8L[x,y] = (p'[-1,y-x-2] + 2*p'[-1,y-x-1] + p'[-1,y-x] + 2) >> 2
                          ・・・(42)
 pred8x8L[x,y] = (p'[0,-1] + 2*p'[-1,-1] + p'[-1,0] + 2) >> 2
                          ・・・(43)
 モード5はVertical_Right_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Vertical_Right_prediction modeは、p[x,-1],x=0,…,7及びp[-1,y],y=-1,…,7が “available”の時のみ適用される。今、zVRを、次の式(44)のように定義する。

 zVR = 2*x - y
                          ・・・(44)
 この時、zVRが、0,2,4,6,8,10,12,14の場合には、画素予測値は、次の式(45)のように生成され、zVRが1,3,5,7,9,11,13の場合には、画素予測値は、次の式(46)のように生成される。

 pred8x8L[x,y] = (p'[x-(y>>1)-1,-1] + p'[x-(y>>1),-1] + 1) >> 1
                          ・・・(45)
 pred8x8L[x,y]
     = (p'[x-(y>>1)-2,-1] + 2*p'[x-(y>>1)-1,-1] + p'[x-(y>>1),-1] + 2) >> 2
                          ・・・(46)
 また、zVRが-1の場合には、画素予測値は、次の式(47)のように生成され、これ以外の場合、すなわち、zVRが-2,-3,-4,-5,-6,-7の場合には、画素予測値は、次の式(48)のように生成される。

 pred8x8L[x,y] = (p'[-1,0] + 2*p'[-1,-1] + p'[0,-1] + 2) >> 2
                          ・・・(47)
 pred8x8L[x,y] = (p'[-1,y-2*x-1] + 2*p'[-1,y-2*x-2] + p'[-1,y-2*x-3] + 2) >> 2
                          ・・・(48)
 モード6はHorizontal_Down_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Horizontal_Down_prediction modeは、p[x,-1],x=0,…,7及びp[-1,y],y=-1,…,7が “available”の時のみ適用される。今、zVRを次の式(49)のように定義するものとする。

 zHD = 2*y - x
                          ・・・(49)
 この時、zHDが0,2,4,6,8,10,12,14の場合には、予測画素値は、次の式(50)のように生成され、zHDが1,3,5,7,9,11,13の場合には、予測画素値は、次の式(51)のように生成される。

 pred8x8L[x,y] = (p'[-1,y-(x>>1)-1] + p'[-1,y-(x>>1) + 1] >> 1
                          ・・・(50)
 pred8x8L[x,y]
     = (p'[-1,y-(x>>1)-2] + 2*p'[-1,y-(x>>1)-1] + p'[-1,y-(x>>1)] + 2) >> 2
                          ・・・(51)
 また、zHDが-1の場合には、予測画素値は、次の式(52)のように生成され、zHDがこれ以外の値の場合、すなわち、-2,-3,-4,-5,-6,-7の場合には、予測画素値は、次の式(53)のように生成される。

 pred8x8L[x,y] = (p'[-1,0] + 2*p[-1,-1] + p'[0,-1] + 2) >> 2
                          ・・・(52)
 pred8x8L[x,y] = (p'[x-2*y-1,-1] + 2*p'[x-2*y-2,-1] + p'[x-2*y-3,-1] + 2) >> 2
                          ・・・(53)
 モード7はVertical_Left_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Vertical_Left_prediction modeは、p[x,-1], x=0,…,15が “available” の時のみ適用され、y=0,2,4,6の場合、予測画素値は、次の式(54)のように生成され、それ以外の場合、すなわち、y=1,3,5,7の場合、予測画素値は、次の式(55)のように生成される。

 pred8x8L[x,y] = (p'[x+(y>>1),-1] + p'[x+(y>>1)+1,-1] + 1) >> 1
                          ・・・(54)
 pred8x8L[x,y]
     = (p'[x+(y>>1),-1] + 2*p'[x+(y>>1)+1,-1] + p'[x+(y>>1)+2,-1] + 2) >> 2
                          ・・・(55)
 モード8はHorizontal_Up_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Horizontal_Up_prediction modeは、p[-1,y], y=0,…,7 が “available” の時のみ適用される。以下では、zHUを次の式(56)のように定義する。

 zHU = x + 2*y
                          ・・・(56)
 zHUの値が0,2,4,6,8,10,12の場合、予測画素値は、次の式(57)のように生成され、zHUの値が1,3,5,7,9,11の場合、予測画素値は、次の式(58)のように生成される。

 pred8x8L[x,y] = (p'[-1,y+(x>>1)] + p'[-1,y+(x>>1)+1] + 1) >> 1
                          ・・・(57)
 pred8x8L[x,y] = (p'[-1,y+(x>>1)]
                          ・・・(58)
 また、zHUの値が13の場合、予測画素値は、次の式(59)のように生成され、それ以外の場合、すなわち、zHUの値が13より大きい場合、予測画素値は、次の式(60)のように生成される。

 pred8x8L[x,y] = (p'[-1,6] + 3*p'[-1,7] + 2) >> 2
                          ・・・(59)
 pred8x8L[x,y] = p'[-1,7]
                          ・・・(60)
 次に、16×16画素のイントラ予測モードについて説明する。図27および図28は、4種類の輝度信号の16×16画素のイントラ予測モード(Intra_16x16_pred_mode)を示す図である。
 4種類のイントラ予測モードについて、図29を参照して説明する。図29の例において、イントラ処理される対象マクロブロックAが示されており、P(x,y);x,y=-1,0,…,15は、対象マクロブロックAに隣接する画素の画素値を表している。
 モード0は、Vertical Prediction modeであり、P(x,-1); x,y=-1,0,…,15が “available” である時のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(61)のように生成される。

 Pred(x,y) = P(x,-1);x,y=0,…,15
                           ・・・(61)
 モード1はHorizontal Prediction modeであり、P(-1,y); x,y=-1,0,…,15が “available” である時のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(62)のように生成される。

 Pred(x,y) = P(-1,y);x,y=0,…,15
                           ・・・(62)
 モード2はDC Prediction modeであり、P(x,-1)およびP(-1,y); x,y=-1,0,…,15が全て “available” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(63)のように生成される。

Figure JPOXMLDOC01-appb-M000006
 また、P(x,-1); x,y=-1,0,…,15が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(64)のように生成される。

Figure JPOXMLDOC01-appb-M000007
 P(-1,y); x,y=-1,0,…,15が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(65)のように生成される。

Figure JPOXMLDOC01-appb-M000008
 P(x,-1)およびP(-1,y); x,y=-1,0,…,15が全て “unavailable” である場合には、予測画素値として128を用いる。
 モード3はPlane Prediction modeであり、P(x,-1)及びP(-1,y); x,y=-1,0,…,15が全て “available” の場合のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(66)のように生成される。

Figure JPOXMLDOC01-appb-M000009
 次に、色差信号に対するイントラ予測モードについて説明する。図23は、4種類の色差信号のイントラ予測モード(Intra_chroma_pred_mode)を示す図である。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。色差信号に対するイントラ予測モードは、上述した輝度信号の16×16画素のイントラ予測モードに順ずる。
 ただし、輝度信号の16×16画素のイントラ予測モードが、16×16画素のブロックを対象としているのに対し、色差信号に対するイントラ予測モードは、8×8画素のブロックを対象としている。さらに、上述した図27と図30に示されるように、両者においてモード番号は対応していない。
 ここで、図29を参照して上述した輝度信号の16×16画素のイントラ予測モードの対象マクロブロックAの画素値および隣接する画素値の定義に準じる。例えば、イントラ処理される対象マクロブロックA(色差信号の場合は、8×8画素)に隣接する画素の画素値をP(x,y);x,y=-1,0,…,7とする。
 モード0はDC Prediction modeであり、P(x,-1)およびP(-1,y); x,y=-1,0,…,7が全て “available” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(67)のように生成される。

Figure JPOXMLDOC01-appb-M000010
 また、P(-1,y) ; x,y=-1,0,…,7が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(68)のように生成される。

Figure JPOXMLDOC01-appb-M000011
 また、P(x,-1) ; x,y=-1,0,…,7が “unavailable”である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(69)のように生成される。

Figure JPOXMLDOC01-appb-M000012
 モード1はHorizontal Prediction modeであり、P(-1,y) ; x,y=-1,0,…,7が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(70)のように生成される。

 Pred(x,y) = P(-1,y);x,y=0,…,7
                           ・・・(70)
 モード2はVertical Prediction modeであり、P(x,-1) ; x,y=-1,0,…,7が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(71)のように生成される。

 Pred(x,y) = P(x,-1);x,y=0,…,7
                           ・・・(71)
 モード3はPlane Prediction modeであり、P(x,-1)及びP(-1,y) ; x,y=-1,0,…,7 が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(72)のように生成される。

Figure JPOXMLDOC01-appb-M000013
 以上のように、輝度信号のイントラ予測モードには、9種類の4×4画素および8×8画素のブロック単位、並びに4種類の16×16画素のマクロブロック単位の予測モードがある。このブロック単位のモードは、マクロブロック単位毎に設定される。色差信号のイントラ予測モードには、4種類の8×8画素のブロック単位の予測モードがある。この色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。
 また、輝度信号の4×4画素のイントラ予測モード(イントラ4×4予測モード)および8×8画素のイントラ予測モード(イントラ8×8予測モード)については、4×4画素および8×8画素の輝度信号のブロック毎に1つのイントラ予測モードが設定される。輝度信号の16×16画素のイントラ予測モード(イントラ16×16予測モード)と色差信号のイントラ予測モードについては、1つのマクロブロックに対して1つの予測モードが設定される。
 なお、予測モードの種類は、上述した図23の番号0,1,3乃至8で示される方向に対応している。予測モード2は平均値予測である。
[イントラ予測処理の説明]
 次に、図31のフローチャートを参照して、これらの予測モードに対して行われる処理である、図19のステップS31におけるイントラ予測処理を説明する。なお、図31の例においては、輝度信号の場合を例として説明する。
 イントラ予測部74は、ステップS41において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対してイントラ予測を行う。
 具体的には、イントラ予測部74は、処理対象のブロックの画素を、フレームメモリ72から読み出され、スイッチ73を介して供給される復号済みの画像を参照して、イントラ予測する。このイントラ予測処理が、各イントラ予測モードで行われることで、各イントラ予測モードでの予測画像が生成される。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。
 イントラ予測部74は、ステップS42において、上述した式(3)または式(4)で示されるコスト関数値を用いて、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対するコスト関数値を算出する。
 イントラ予測部74は、ステップS43において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して、それぞれ最適モードを決定する。すなわち、上述したように、イントラ4×4予測モードおよびイントラ8×8予測モードの場合には、予測モードの種類が9種類あり、イントラ16×16予測モードの場合には、予測モードの種類が4種類ある。したがって、イントラ予測部74は、ステップS42において算出されたコスト関数値に基づいて、それらの中から、最適イントラ4×4予測モード、最適イントラ8×8予測モード、最適イントラ16×16予測モードを決定する。
 イントラ予測部74は、ステップS44において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して決定された各最適モードの中から、ステップS42において算出されたコスト関数値に基づいて、最適イントラ予測モードを選択する。すなわち、4×4画素、8×8画素、および16×16画素に対して決定された各最適モードの中から、コスト関数値が最小値であるモードを、最適イントラ予測モードとして選択する。そして、イントラ予測部74は、最適イントラ予測モードで生成された予測画像とそのコスト関数値とを、予測画像選択部76に供給する。
[インター動き予測処理の説明]
 次に、図32のフローチャートを参照して、図19のステップS32のインター動き予測処理について説明する。
 動き予測・補償部75は、ステップS61において、図13を参照して上述した16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して動きベクトルと参照画像をそれぞれ決定する。すなわち、各インター予測モードの処理対象のブロックについて、動きベクトルと参照画像がそれぞれ決定される。
 動き予測・補償部75は、ステップS62において、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、ステップS61で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理により、各インター予測モードでの予測画像が生成される。
 動き予測・補償部75は、ステップS63において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して決定された動きベクトルについて、圧縮画像に付加するための動きベクトル情報を生成する。このとき、図14を参照して上述した動きベクトルの生成方法が用いられる。
 生成された動きベクトル情報は、次のステップS64におけるコスト関数値算出の際にも用いられ、最終的に予測画像選択部76により対応する予測画像が選択された場合には、予測モード情報および参照フレーム情報とともに、可逆符号化部66へ出力される。
 動き予測・補償部75は、ステップS64において、上述した式(3)または式(4)で示されるコスト関数を用いて、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対してコスト関数値を算出する。ここで算出されたコスト関数値は、上述した図19のステップS33で最適インター予測モードを決定する際に用いられる。
[可逆符号化処理の説明]
 次に、図33のフローチャートを参照して、図18のステップS23の可逆符号化処理について説明する。
 可逆符号化部66には、図18のステップS15において量子化された直交変換係数が供給される。可逆符号化部66は、ステップS81において、H.264/AVC方式で定められているCAVLCのテーブルを用いて、量子化部65により量子化された直交変換係数を符号化する。この直交変換係数の符号化処理の詳細は、図34および図35を参照して後述する。
 ステップS82において、可逆符号化部66は、H.264/AVC方式で定められているCAVLCのテーブルを用いて、マクロブロックタイプ以外のその他のシンタクス要素を符号化する。ステップS82においては、レート制御部25からの量子化パラメータなどのシンタクス要素も符号化される。特に、インター予測が行われた場合には、動きベクトル情報や、参照フレーム情報、フラグなどのシンタクス要素が符号化される。
 すなわち、ここでは、上述した図1の指数ゴロム符号が用いられて各シンタクス要素が符号化される。また、負の値が生じる可能性がある動きベクトルなどのシンタクス要素については、図2に示される対応関係に基づいて、符号なしのコードナンバに置き換えられた後に、図1の指数ゴロム符号が適用されて符号化される。
 可逆符号化部66は、ステップS83において、マクロブロックタイプの符号化処理を行う。このマクロブロックタイプの符号化処理については、図36を参照して後述する。
 ステップS83の処理により、レート制御部25からの量子化パラメータに応じて選択されたVLCテーブルが用いられて、マクロブロックタイプの情報が符号化される。
 そして、可逆符号化部66は、ステップS84において、ステップS82およびS83で符号化されたシンタクス要素を、ステップS81で符号化された圧縮画像のヘッダに付加する。シンタクス要素がヘッダに付加された圧縮画像は、図18のステップS24において、蓄積バッファ67に蓄積される。
 次に、図34を参照して、図33のステップS81におけるCAVLCによる直交変換係数の符号化処理について説明する。なお、図34の例においては、4×4画素ブロックの例が示されており、各画素に付された数字は、スキャン順を表している。
 H.264/AVC方式においては、4×4ブロックは、直交変換により各周波数成分に相当する4×4の2次元データに変換される。この2次元データは、さらに、符号化処理の対象となる対象ブロックがフレーム符号化されたものであるか、フィールド符号化されたものであるかに応じた方式で、1次元データに変換される。
 すなわち、対象ブロックがフレーム符号化されたものである場合、4×4の2次元データは、図34のAに示されるジグザグスキャン方式により、1次元データに変換される。これに対して、対象ブロックがフィールド符号化されたものである場合、4×4の2次元データは、図34のBに示されるフィールドスキャン方式により、1次元データに変換される。
 第1に、可逆符号化部66は、上述したように1次元化された直交変換係数を、高域から低域に向かって逆スキャンを行う。第2に、可逆符号化部66は、NumCoef(0でない係数の個数)と、T1s(高域から低域にスキャンしたときの、±1の係数の個数、最大でも3)の符号化を行う。
 例えば、再度、図4を参照するに、図4の例においては、符号化処理の対象ブロックCと、既に符号化済みのブロックであり、対象ブロックCに隣接する隣接ブロックAおよびBが示されている。
 このとき、可逆符号化部66は、隣接ブロックAおよびBにおけるNumCoefに応じて、VLCテーブルを切り替える。
 第3に、可逆符号化部66は、Level(DCT係数値)の符号化を行う。例えば、T1sに関しては、正/負のみが符号化される。その他の係数に関しては、コードナンバ(Code Number)が割り当てられて符号化される。このとき、可逆符号化部66は、イントラ/インター、量子化パラメータQP、および、最後に符号化したLevelに応じてVLCテーブルを切り替える。
 第4に、可逆符号化部66は、Runの符号化を行う。このとき、可逆符号化部66は、TotalZeroの符号化において、NumCoefに応じてVLCテーブルの切り替えを行う。また、可逆符号化部66は、Run_before(非0係数の前に続く0の数)の符号化において、ZerosLeft(残りの非0係数の数)に応じてVLCテーブルの切り替えを行う。そして、ZerosLeft=0で、符号化処理は終了となる。
 次に、図35を参照して、CAVLCの動作原理の具体例について説明する。図35の例においては、逆スキャンした後、次に示す順で符号化処理が行われる。
 TotalCoef(非0係数の個数)=7
  TrailingOnes(最後に連続する絶対値1の係数の個数)=2
 Trailing_ones_sign_flag(最後に連続する絶対値1の係数の符号)=-
 Trailing_ones_sign_flag(最後に連続する絶対値1の係数の符号)=+
 Level(DCT係数)=-3
 Level=+8
 Level=+11
 Level=-4
 Level=+23
 TotalZeros(最後の非0係数以前の0係数の個数)=5(ZerosLeft=6)
 run_before(係数値の前の0の連続個数)=1(ZerosLeft=5)
 run_before=2(ZerosLeft=4)
 run_before=0(ZerosLeft=3)
 run_before=2(ZerosLeft=2)
 run_before=0(ZerosLeft=1)
 run_before=0(ZerosLeft=0)
 なお、これらの数値は、上述したように、周辺ブロックなどの符号化状況などに応じて切り替えられたテーブルによりVLC符号化される。
[マクロブロックタイプの符号化処理の説明]
 次に、図36のフローチャートを参照して、図33のステップS83のマクロブロックタイプの符号化処理について説明する。
 レート制御部77から、量子化パラメータQPが、VLCテーブル切替部81およびコードナンバ割当部82に供給される(図18のステップS25)。
 VLCテーブル切替部81およびコードナンバ割当部82は、ステップS91において、レート制御部77からの量子化パラメータQPを取得する。
 ステップS92において、VLCテーブル切替部81は、レート制御部77からの量子化パラメータに応じて、例えば、2種類のテーブルのどちらかを、マクロブロックタイプに対するVLCテーブルとして選択する。例えば、VLCテーブル切替部81は、所定の閾値より低い量子化パラメータ(例えば、QP=22)に対応して、図17のk=0のテーブルを選択し、所定の閾値より高い量子化パラメータ(例えば、QP=37)に対応して、k=1のテーブルを選択する。
 ステップS93において、コードナンバ割当部82は、レート制御部77からの量子化パラメータに応じて、コードナンバ”0”を割り当てる。すなわち、コードナンバ割当部82は、所定の閾値より低い量子化パラメータに対応して、インター16×16モードを、コードナンバ”0”に割り当てる。また、コードナンバ割当部82は、所定の閾値より高い量子化パラメータに対応して、スキップ(またはダイレクト)モードを、コードナンバ”0”に割り当てる。
 この割当情報は、VLCテーブル切替部81に供給され、マクロブロックタイプに対するVLCテーブル情報とともに、可逆符号化部66に供給される。
 ステップS94において、可逆符号化部66は、VLCテーブル切替部81により選択されたVLCテーブルで、マクロブロックタイプを符号化する。
 符号化されたマクロブロックタイプは、図33のステップS82において符号化された他のシンタクス要素とともに、ステップS84において、ステップS81で符号化された圧縮画像のヘッダに付加される。
 以上のようにして符号化された圧縮画像は、所定の伝送路を介して伝送され、画像復号装置により復号される。
[画像復号装置の構成例]
 図37は、本発明を適用した画像処理装置としての画像復号装置の一実施の形態の構成を表している。
 画像復号装置101は、蓄積バッファ111、可逆復号部112、逆量子化部113、逆直交変換部114、演算部115、デブロックフィルタ116、画面並べ替えバッファ117、D/A変換部118、フレームメモリ119、スイッチ120、イントラ予測部121、動き予測・補償部122、スイッチ123、およびモードテーブル切替部124により構成されている。
 蓄積バッファ111は伝送されてきた圧縮画像を蓄積する。可逆復号部112は、蓄積バッファ111より供給された、図12の可逆符号化部66により符号化された情報を、可逆符号化部66の符号化方式に対応する方式で復号する。
 すなわち、可逆復号部112は、図12の可逆符号化部66により符号化された画像を復号し、量子化パラメータなどのシンタクス要素も復号する。復号された画像および量子化パラメータは、逆量子化部113に供給される。また、量子化パラメータは、モードテーブル切替部124にも供給される。
 さらに、可逆復号部112は、この量子化パラメータに対応してモードテーブル切替部124により選択された復号方法(具体的には、VLCテーブル情報)で、マクロブロックタイプも復号する。復号されたマクロブロックタイプは、対応する動き予測・補償部122またはイントラ予測部121に供給される。
 逆量子化部113は可逆復号部112により復号された画像を、可逆復号部112により復号された量子化パラメータを参照して、図12の量子化部65の量子化方式に対応する方式で逆量子化する。逆直交変換部114は、図12の直交変換部64の直交変換方式に対応する方式で逆量子化部113の出力を逆直交変換する。
 逆直交変換された出力は演算部115によりスイッチ123から供給される予測画像と加算されて復号される。デブロックフィルタ116は、復号された画像のブロック歪を除去した後、フレームメモリ119に供給し、蓄積させるとともに、画面並べ替えバッファ117に出力する。
 画面並べ替えバッファ117は、画像の並べ替えを行う。すなわち、図12の画面並べ替えバッファ62により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられる。D/A変換部118は、画面並べ替えバッファ117から供給された画像をD/A変換し、図示せぬディスプレイに出力し、表示させる。
 スイッチ120は、インター処理される画像と参照される画像をフレームメモリ119から読み出し、動き予測・補償部122に出力するとともに、イントラ予測に用いられる画像をフレームメモリ119から読み出し、イントラ予測部121に供給する。
 イントラ予測部121には、ヘッダ情報を復号して得られたマクロブロックタイプ情報、およびイントラ予測モードを示す情報が可逆復号部112から供給される。イントラ予測部121は、この情報に基づいて、予測画像を生成し、生成した予測画像を、スイッチ123に出力する。
 動き予測・補償部122には、ヘッダ情報を復号して得られた情報のうち、マクロブロックタイプ情報、動きベクトル情報、参照フレーム情報などが可逆復号部112から供給される。動き予測・補償部122は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。すなわち、対象ブロックの予測画像は、参照フレームにおいて、対象ブロックに動きベクトルで対応付けられる参照ブロックの画素値が用いられて生成される。そして、動き予測・補償部122は、生成された予測画像をスイッチ123に出力する。
 スイッチ123は、動き予測・補償部122またはイントラ予測部121により生成された予測画像を選択し、演算部115に供給する。
 モードテーブル切替部124は、可逆復号部112により復号された量子化パラメータに応じて、マクロブロックタイプに対する復号方法(すなわち、VLCテーブル)を切り替え、切り替えたVLCテーブルの情報を、可逆復号部112に供給する。
 すなわち、モードテーブル切替部124は、量子化パラメータを、レート制御部77から取得するのに対して、可逆復号部112から取得するという点が異なるだけであり、その他は、図12のモードテーブル切替部78と基本的に同様な処理を行う。
[可逆復号部およびモードテーブル切替部の構成例]
 図38は、可逆復号部およびモードテーブル切替部の詳細な構成例を示すブロック図である。
 図38の例においては、可逆復号部112は、量子化パラメータ復号部131およびマクロブロックタイプ復号部132を含むように構成される。すなわち、可逆復号部112には、実際には、画像符号化装置51からの圧縮画像や、量子化パラメータおよびマクロブロックタイプ以外の動きベクトル情報などの他のシンタクス要素を復号する部も構成されるが、図38の例においては、その図示は省略されている。
 モードテーブル切替部124は、VLCテーブル切替部141およびコードナンバ割当部142により構成される。
 量子化パラメータ復号部131は、圧縮画像のヘッダに付加されていた量子化パラメータを復号し、復号した量子化パラメータを、逆量子化部113、VLCテーブル切替部141、およびコードナンバ割当部142に供給する。
 マクロブロックタイプ復号部132は、VLCテーブル切替部141により選択されたVLCテーブルを用いて、マクロブロックタイプを復号し、復号したマクロブロックタイプを、動き予測・補償部122に供給する。なお、マクロブロックタイプがインターに関するものであり、そのマクロブロックタイプがスキップやダイレクトモードではない場合、動きベクトル情報や参照フレーム情報なども、可逆復号部112において別途復号されて、動き予測・補償部122に供給される。
 なお、その図示は省略されているが、マクロブロックタイプがイントラに関するものである場合、そのマクロブロックタイプは、イントラ予測部121に供給される。この場合、イントラ予測モードの情報も、可逆復号部112において別途復号され、イントラ予測部121に供給される。
 VLCテーブル切替部141は、マクロブロックタイプに対する、少なくとも2種類のVLCテーブルを有している。VLCテーブル切替部141は、量子化パラメータ復号部131からの量子化パラメータに応じて、2種類のマクロブロックタイプに対するVLCテーブルのうちのどちらかを選択する。VLCテーブル切替部141は、選択したマクロブロックタイプに対するVLCテーブルの情報に、コードナンバ割当部142からの割当情報を付加して、マクロブロックタイプ復号部132に供給する。
 コードナンバ割当部142は、量子化パラメータ復号部131からの量子化パラメータに応じて、コードナンバ0に、所定のマクロブロックタイプを割り当て、その割当情報を、VLCテーブル切替部141に供給する。
[画像復号装置の復号処理の説明]
 次に、図39のフローチャートを参照して、画像復号装置101が実行する復号処理について説明する。
 ステップS131において、蓄積バッファ111は伝送されてきた画像を蓄積する。ステップS132において、可逆復号部112は、蓄積バッファ111から供給される圧縮画像を復号する可逆復号処理を行う。この可逆復号処理の詳細は、図40を参照して後述される。
 ステップS132の処理により、図12の可逆符号化部66により符号化されたIピクチャ、Pピクチャ、並びにBピクチャが復号される。さらに、量子化パラメータ、マクロブロックタイプ、そして、このとき、符号化されていれば、動きベクトル情報、参照フレーム情報、イントラ予測モードを示す情報なども復号される。
 ステップS133において、逆量子化部113は可逆復号部112により復号された変換係数を、図12の量子化部65の特性に対応する特性で逆量子化する。ステップS134において逆直交変換部114は逆量子化部113により逆量子化された変換係数を、図12の直交変換部64の特性に対応する特性で逆直交変換する。これにより図12の直交変換部64の入力(演算部63の出力)に対応する差分情報が復号されたことになる。
 ステップS135において、演算部115は、後述するステップS141の処理で選択され、スイッチ123を介して入力される予測画像を差分情報と加算する。これにより元の画像が復号される。ステップS136においてデブロックフィルタ116は、演算部115より出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS137においてフレームメモリ119は、フィルタリングされた画像を記憶する。
 ステップS138において、イントラ予測部121または動き予測・補償部122、は、可逆復号部112から供給される予測モード情報に対応して、それぞれ画像の予測処理を行う。
 すなわち、マクロブロックタイプがイントラに関するものである場合、マクロブロックタイプとイントラ予測モードを示す情報などが、イントラ予測部121に供給される。可逆復号部112からマクロブロックタイプとイントラ予測モードが供給された場合、イントラ予測部121は、イントラ予測モードのイントラ予測処理を行う。
 マクロブロックタイプがインターに関するものである場合、マクロブロックタイプと、必要に応じて、動きベクトル情報および参照フレーム情報などが、動き予測・補償部122に供給される。可逆復号部112からマクロブロックタイプなどが供給された場合、動き予測・補償部122は、マクロブロックタイプに基づいて、インター予測モードの動き予測・補償処理を行う。
 ステップS138における予測処理の詳細は、図42を参照して後述する。この処理により、イントラ予測部121により生成された予測画像または動き予測・補償部122により生成された予測画像がスイッチ123に供給される。
 ステップS139において、スイッチ123は予測画像を選択する。すなわち、イントラ予測部121により生成された予測画像、または動き予測・補償部122により生成された予測画像が供給される。したがって、供給された予測画像が選択されて演算部115に供給され、上述したように、ステップS134において逆直交変換部114の出力と加算される。
 ステップS140において、画面並べ替えバッファ117は並べ替えを行う。すなわち画像符号化装置51の画面並べ替えバッファ62により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。
 ステップS141において、D/A変換部118は、画面並べ替えバッファ117からの画像をD/A変換する。この画像が図示せぬディスプレイに出力され、画像が表示される。
[可逆復号処理の説明]
 次に、図40のフローチャートを参照して、図39のステップS132の可逆復号処理を説明する。
 蓄積バッファ111には、伝送されてきた画像を蓄積される。可逆復号部112は、ステップS151において、蓄積バッファ111から供給される圧縮画像を、図33のステップS81の符号化方法に対応する復号方法で復号し、復号した画像を、逆量子化部113に供給する。
 可逆復号部112は、ステップS112において、マクロブロックタイプ以外のその他のシンタクス要素を、図33のステップS82の符号化方法に対応する復号方法で復号する。特に、量子化パラメータは、量子化パラメータ復号部131により復号され、逆量子化部113、VLCテーブル切替部141、およびコードナンバ割当部142に供給される。
 マクロブロックタイプ復号部132は、ステップS153において、マクロブロックタイプの復号処理を行う。このマクロブロックタイプの復号処理の詳細は、図41を参照して後述される。
 ステップS153の処理により、量子化パラメータ復号部131からの量子化パラメータに応じて選択されたVLCテーブルが用いられて、マクロブロックタイプの情報が復号される。
[マクロブロックタイプの復号処理の説明]
 次に、図41のフローチャートを参照して、図40のステップS153のマクロブロックタイプの復号処理について説明する。
 量子化パラメータ復号部131から、量子化パラメータQPが、VLCテーブル切替部141およびコードナンバ割当部142に供給される(図40のステップS152)。
 VLCテーブル切替部141およびコードナンバ割当部142は、ステップS161において、量子化パラメータ復号部131からの量子化パラメータQPを取得する。
 ステップS162において、VLCテーブル切替部141は、量子化パラメータ復号部131からの量子化パラメータに応じて、例えば、2種類のテーブルのどちらかを、マクロブロックタイプに対するVLCテーブルとして選択する。すなわち、VLCテーブル切替部141は、所定の閾値より低い量子化パラメータ(例えば、QP=22)に対応して、図17のk=0のテーブルを選択し、所定の閾値より高い量子化パラメータ(例えば、QP=37)に対応して、k=1のテーブルを選択する。
 なお、この所定の閾値は、VLCテーブル切替部81に設定されるものと同じであり、例えば、図43以降で後述されるVLCテーブルの学習時に求められる。
 ステップS163において、コードナンバ割当部142は、量子化パラメータ復号部131からの量子化パラメータに応じて、コードナンバ”0”を割り当てる。すなわち、コードナンバ割当部142は、所定の閾値より低い量子化パラメータに対応して、インター16×16モードを、コードナンバ”0”に割り当てる。また、コードナンバ割当部142は、所定の閾値より高い量子化パラメータに対応して、スキップ(またはダイレクト)モードを、コードナンバ”0”に割り当てる。
 この割当情報は、VLCテーブル切替部141に供給され、マクロブロックタイプに対するVLCテーブル情報とともに、マクロブロックタイプ復号部132に供給される。
 ステップS164において、マクロブロックタイプ復号部13は、VLCテーブル切替部141により選択されたVLCテーブルで、マクロブロックタイプを復号する。
 復号されたマクロブロックタイプは、図40のステップS152において符号化された他のシンタクス要素とともに、図39のステップS138の予測処理に用いられる。
[予測処理の説明]
 次に、図42のフローチャートを参照して、図39のステップS138の予測処理を説明する。
 可逆復号部112は、ステップS171において、図41のステップS164において復号されたマクロブロックタイプを参照して、対象ブロックがイントラ符号化されているか否かを判定する。
 ステップS171において対象ブロックがイントラ符号化されていると判定された場合、可逆復号部112は、そのマクロブロックタイプとともに、図40のステップS152において復号されたイントラ予測モードの情報を、イントラ予測部121に供給する。
 これに対応して、イントラ予測部121は、ステップS172において、マクロブロックタイプ、およびイントラ予測モードの情報を取得し、ステップS173において、イントラ予測を行う。
 すなわち、処理対象の画像がイントラ処理される画像である場合、必要な画像がフレームメモリ119から読み出され、スイッチ120を介してイントラ予測部121に供給される。ステップS173において、イントラ予測部121は、ステップS172で取得したマクロブロックタイプで、イントラ予測モード情報に従ってイントラ予測し、予測画像を生成する。生成した予測画像は、スイッチ123に出力される。
 一方、ステップS171において、イントラ符号化されていないと判定された場合、可逆復号部112は、そのマクロブロックタイプを、動き予測・補償部122に供給する。このとき、マクロブロックタイプが示すモードがスキップ(ダイレクト)モードでない限り、参照フレーム情報および動きベクトル情報なども、図40のステップS152において復号されるので、動き予測・補償部122に供給される。
 ステップS175において、動き予測・補償部122は、通常のインター予測を行う。すなわち、処理対象の画像がインター予測処理される画像である場合、必要な画像がフレームメモリ169から読み出され、スイッチ170を介して動き予測・補償部173に供給される。ステップS175において動き予測・補償部173は、ステップS174で取得したマクロブロックタイプでのインター予測モードの動き予測をし、予測画像を生成する。生成した予測画像は、スイッチ123に出力される。
 以上のように、画像符号化装置51および画像復号装置101において、量子化パラメータに応じて、マクロブロックタイプのVLCテーブルを切り替えるようにしたので、マクロブロックタイプに対する符号長を短くすることができる。したがって、平均符号長を短くすることができる。
 図43は、本発明を適用した学習装置の一実施の形態の構成を表している。この学習装置201は、トレーニング画像信号を用いて、ハフマン符号に基づきVLCテーブルを生成するための学習装置である。
 なお、トレーニング画像信号とは、フィルタ係数を求めるためのテスト画像のことであり、例えば、www.vqeg.orgにおいて取得可能な画像圧縮符号化の標準化で使われる標準シーケンスを用いてもよい。あるいは、また、各アプリケーションに応じた入力画像を用いてもよい。例えば、入力がカメラ信号である場合には、CCDやCMOSセンサを用いて撮影されたベースバンド信号を用いて学習を行ってもよい。
 図43の学習装置201は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部75、予測画像選択部76、およびレート制御部77を備えている点が、図12の画像符号化装置51と共通している。
 また、学習装置201は、用いられる信号として、トレーニング用の画像信号が用いられる点、並びに、モードテーブル切替部78に代えて、モードテーブル算出部211を備えている点が、図12の画像符号化装置51と異なる。
 すなわち、学習装置201においては、モードテーブル算出部211の制御のもと、レート制御部77により固定された量子化パラメータ用いられて、トレーニング画像信号が符号化される。なお、学習装置201は、図12の画像符号化装置51において、マクロブロックタイプに対する符号化も、H.264/AVC方式の規格に基づいて行われる以外、基本的に同じ符号化処理を行う。
 可逆符号化部66には、予測画像選択部76による予測画像の選択に対応して、イントラ予測部74または動き予測・補償部75からのマクロブロックタイプの情報が供給されるので、その情報を、モードテーブル算出部211に供給する。
 モードテーブル算出部211は、レート制御部77を制御し、固定の量子化パラメータで、量子化部65のレートを制御させる。モードテーブル算出部211は、量子化パラメータの情報と、可逆符号化部66からのマクロブロックタイプの情報を用いて、量子化パラメータごとに、マクロブロックタイプの出現確率を算出する。
 モードテーブル算出部211は、算出した出現確率に応じてハフマン符号により、各量子化パラメータに対応したVLCテーブルを決定する。なお、このとき、量子化パラメータに対する閾値も求められる。
 ここで、ハフマン符号について説明する。ハフマン符号は、予め事象の確率がわかっているとき、平均符号長が最小になるよう、事象に対するビットレートの割り当て方法として用いられる。
 ハフマン符号による符号構成法を説明すると、第1のステップにおいては、各情報源記号に対する葉が作られる。各々の葉には、情報源符号の発生確率が記される。以下、これを、その葉の確率と称する。
 第2のステップにおいては、確率の最も小さい2枚の葉に対し、1つの節点が作られ、その節点と2枚の葉が枝で結ばれる。この2本の枝の一方には0、他方には1が割り当てられる。さらに、2枚の葉の確率の和が記され、この節点が新たに葉と考えられる。すなわち、この節点から出る枝が取り除かれたと考えられる。
 第3のステップにおいては、葉が1枚しか残っていなければ、それで符号構成法は終了となる。そうでなければ、処理は、第2のステップに戻る。
 この構成法によって、すべての情報源記号に対応した葉を持つ符号の木を作ることができる。その具体例について、図44を参照して説明する。
 図44の例においては、事象A,B,C,Dの発生確率が、それぞれ、0.6,0.25,0.1,0.05である場合のハフマン符号の構成が示されている。まず、第1のステップとして、A,B,C,Dに対応する葉が作られる。図44の例において、()に示されているのは、各事象の確率である。
 最も確率が小さい2枚の葉はCとDであるので、第2のステップとして、節点Eが作られ、CおよびDが節点Eに繋がれる。このときEの確率は、0.1+0.05=0.15である。
 次に、節点Eも葉と考えて、A,B,Eに対して同様の処理を行う。すなわち、最も小さい2枚の葉は、BとEであるので、これらの節点Fが作られ、BおよびEが節点Fに繋がれる。このときFの確率は、0.25+0.15=0.4である。
 さらに、節点Fも葉と考えて、残りの2枚の葉A,Fに対して同様の処理を行う。すなわち、AとFの節点Gが作られ、AおよびFが節点Gに繋がれる。このときGの確率は、0.6+0.4=1.0である。ここで、節点Gも葉と考えたときに、葉は1つしか残っていないので、符号の木が完成となる。
 そして、この符号の木から得られる符号語は、事象A,B,C,Dのそれぞれに対して、0,10,110,111となり、平均符号長は、次の式(73)より、1.55(ビット)となる。

 0.6*1+0.25*2+0.1*3+0.05*3
                           ・・・(73)
 次に、図45のフローチャートを参照して、図43の学習装置201の学習処理を説明する。
 モードテーブル算出部211は、レート制御部77を制御し、量子化パラメータを固定させる。これに対応して、ステップS201において、画像符号化装置201は、トレーニング画像信号の符号化を行う。なお、この符号化処理は、マクロブロックタイプに対する符号化もH.264/AVC方式の規格に基づいて行われること、および、固定の量子化パラメータでレート制御されること以外、図18を参照して上述した符号化処理と基本的に同じ処理である。したがって、この符号化処理の説明は、省略される。
 この符号化処理により、可逆符号化部66には、予測画像選択部76による予測画像の選択に対応して、イントラ予測部74または動き予測・補償部75からのマクロブロックタイプの情報が供給される。可逆符号化部66は、その情報を、モードテーブル算出部211に供給する。
 このステップS201の処理は、様々な各量子化パラメータに対して行われる。
 ステップS202において、モードテーブル算出部211は、量子化パラメータの情報と、可逆符号化部66からのマクロブロックタイプの情報を用いて、量子化パラメータ毎に、マクロブロックタイプの出現確率を算出する。
 ステップS203において、モードテーブル算出部211は、算出した出現確率に応じて、図44で上述したハフマン符号により、各量子化パラメータに対応したVLCテーブルを決定する。
 なお、図43においては、画像符号化装置と一体化された学習装置201の例を示したが、少なくともモードテーブル算出部211を含むコンピュータで学習装置を構成し、図12の画像符号化装置51に、固定の量子化パラメータで符号化処理を行わせる。そして、学習装置において、画像符号化装置51からオンラインまたはオフラインで取得された、符号化処理の結果得られるマクロブロックタイプの情報が用いられて、各量子化パラメータに対応したVLCテーブルが決定されるようにすることもできる。
 以上のようにして決定されることにより生成されたVLCテーブルが、画像符号化装置51のVLCテーブル切替部81や、画像復号装置101のVLCテーブル切替部141のメモリなどに記憶されて、上述した符号化に用いられる。
 なお、上記説明においては、予測モードに関する情報のうち、マクロブロックタイプを用いて説明してきたが、図11で上述したマクロブロックタイプに対しての量子化パラメータと予測モード分布についての傾向は、イントラ4×4予測モードにも当てはまる。
 すなわち、図21を参照して上述した9つのイントラ予測モードについて、モード0乃至8のいずれかの情報を、圧縮画像のヘッダに付加してブロック毎に伝送する際、より大きな番号のモードを送ると、モードビットがより大きくなる。
 このため、より低い量子化パラメータ、つまり、より高いビットレートにおいては、多少モードビットが増大しても、予測効率を高めるよう、より大きな番号のモードも選択される。これに対して、より高い量子パラメータ、つまり、より低いビットレートにおいては、モードビットを増大させないよう、より小さな番号のモードが選択されやすいという傾向がみられる。
 すなわち、高い量子化パラメータで符号化処理を行うと、より若いコードナンバが割り当てられているVertical,Horizontal,DCといったイントラ予測モードの出現確率が高く、それ以外の予測モードの出現確率は低くなる傾向にある。
 一方、低い量子化パラメータにより符号化処理を行うと、若いコードナンバに対する予測モードの出現確率は下がり、それ以外の出現確率が上昇するという傾向になる。
 そこで、イントラ予測モードの場合についても、より高い量子化パラメータで符号化される場合、k=0のようなVLCテーブルによる符号が用いられる。これにより、より出現頻度の高い、若いコードナンバに対するイントラ予測モードに対する符号長を短くすることが可能である。一方、より低い量子化パラメータで符号化される場合、k=1のようなVLCテーブルによる符号が用いられる。これにより、それなりの頻度で出現する、コードナンバが若くないイントラ予測モードに対する符号長を短くすることが可能である。
 また、イントラ予測モードの場合についても、コードナンバ”1”の割り当てを、量子化パラメータに応じて切り替えるようにしてもよい。
 以上のように、本発明は、マクロブロックタイプの符号化に限らず、イントラ予測モードの符号化にも適用することができる。もちろん、イントラ4×4予測モードに限らず、本発明は、イントラ8×8予測モード、イントラ16×16予測モード、色差信号のイントラ予測モードにも適用することができる。
 また、上記説明においては、H.264/AVC方式をベースに説明してきたが、本発明は、これに限らず、複数のマクロブロックタイプまたはイントラ予測モードをVLCにより符号化するあらゆる符号化装置および復号装置について適用可能である。
 なお、本発明は、例えば、MPEG、H.26x等の様に、離散コサイン変換等の直交変換と動き補償によって圧縮された画像情報(ビットストリーム)を、衛星放送、ケーブルテレビジョン、インターネット、または携帯電話機などのネットワークメディアを介して受信する際に用いられる画像符号化装置および画像復号装置に適用することができる。また、本発明は、光、磁気ディスク、およびフラッシュメモリのような記憶メディア上で処理する際に用いられる画像符号化装置および画像復号装置に適用することができる。さらに、本発明は、それらの画像符号化装置および画像復号装置などに含まれる動き予測補償装置にも適用することができる。
 上述した一連の処理は、ハードウエアにより実行することもできるし、ソフトウエアにより実行することもできる。一連の処理をソフトウエアにより実行する場合には、そのソフトウエアを構成するプログラムが、コンピュータにインストールされる。ここで、コンピュータには、専用のハードウエアに組み込まれているコンピュータや、各種のプログラムをインストールすることで、各種の機能を実行することが可能な汎用のパーソナルコンピュータなどが含まれる。
 図46は、上述した一連の処理をプログラムにより実行するコンピュータのハードウエアの構成例を示すブロック図である。
 コンピュータにおいて、CPU(Central Processing Unit)301、ROM(Read Only Memory)302、RAM(Random Access Memory)303は、バス304により相互に接続されている。
 バス304には、さらに、入出力インタフェース305が接続されている。入出力インタフェース305には、入力部306、出力部307、記憶部308、通信部309、およびドライブ310が接続されている。
 入力部306は、キーボード、マウス、マイクロフォンなどよりなる。出力部307は、ディスプレイ、スピーカなどよりなる。記憶部308は、ハードディスクや不揮発性のメモリなどよりなる。通信部309は、ネットワークインタフェースなどよりなる。ドライブ310は、磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリなどのリムーバブルメディア311を駆動する。
 以上のように構成されるコンピュータでは、CPU301が、例えば、記憶部308に記憶されているプログラムを入出力インタフェース305及びバス304を介してRAM303にロードして実行することにより、上述した一連の処理が行われる。
 コンピュータ(CPU301)が実行するプログラムは、例えば、パッケージメディア等としてのリムーバブルメディア311に記録して提供することができる。また、プログラムは、ローカルエリアネットワーク、インターネット、デジタル放送といった、有線または無線の伝送媒体を介して提供することができる。
 コンピュータでは、プログラムは、リムーバブルメディア311をドライブ310に装着することにより、入出力インタフェース305を介して、記憶部308にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部309で受信し、記憶部308にインストールすることができる。その他、プログラムは、ROM302や記憶部308に、あらかじめインストールしておくことができる。
 なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。
 本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。
 51 画像符号化装置, 66 可逆符号化部, 74 イントラ予測部, 75 動き予測・補償部, 77レート制御部, 78 モードテーブル切替部, 81 VLCテーブル切替部, 82 コードナンバ割当部,101 画像復号装置, 112 可逆復号部, 121 イントラ予測部, 122 動き予測・補償部, 124 モードテーブル切替部, 131 量子化パラメータ復号部, 132 マクロブロックタイプ復号部, 141 VLCテーブル切替部, 142 コードナンバ割当部, 201 学習装置, 211 モードテーブル算出部

Claims (20)

  1.  復号処理の対象となる対象ブロックにおける量子化パラメータを復号する量子化パラメータ復号手段と、
     前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の復号方法を切り替える切替手段と、
     前記切替手段により切り替えられた前記復号方法で、前記予測モードに関する情報を復号する予測モード復号手段と
     を備える画像処理装置。
  2.  前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するVLC(Variable Length Coding)テーブルを切り替えることで、前記復号方法を切り替える
     請求項1に記載の画像処理装置。
  3.  前記予測モードに関する情報は、マクロブロックタイプの情報である
     請求項2に記載の画像処理装置。
  4.  前記予測モードに関する情報は、イントラ予測モードの情報である
     請求項2に記載の画像処理装置。
  5.  前記切替手段は、所定の閾値より値が大きい量子化パラメータの場合、コードナンバが小さい事象に対するビット長が短いテーブルに切り替える
     請求項2に記載の画像処理装置。
  6.  前記切替手段は、所定の閾値より値が小さい量子化パラメータの場合、コードナンバが増大しても、ビット長の増大が緩やかであるテーブルに切り替える
     請求項2に記載の画像処理装置。
  7.  前記符号化手段は、前記VLCテーブルとして、ゴロム符号を用いる
     請求項2に記載の画像処理装置。
  8.  前記符号化手段は、前記VLCテーブルとして、ハフマン符号を用いる
     請求項2に記載の画像処理装置。
  9.  前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するコードナンバの割当を切り替えることで、前記復号方法を切り替える
     請求項1に記載の画像処理装置。
  10.  前記予測モードに関する情報は、インターマクロブロックタイプの情報である
     請求項9に記載の画像処理装置。
  11.  前記切替手段は、所定の閾値より値が大きい量子化パラメータの場合、スキップまたはダイレクトモードの割当を、最小のコードナンバに切り替える
     請求項10に記載の画像処理装置。
  12.  前記切替手段は、所定の閾値より値が小さい量子化パラメータの場合、インター16×16予測モードの割当を、最小のコードナンバに切り替える
     請求項10に記載の画像処理装置。
  13.  前記予測モードに関する情報は、イントラ予測モードの情報である
     請求項9に記載の画像処理装置。
  14.  画像処理装置が、
     復号処理の対象となる対象ブロックにおける量子化パラメータを復号し、
     前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の復号方法を切り替え、
     切り替えられた前記復号方法で、前記予測モードに関する情報を復号するステップ
     を含む画像処理方法。
  15.  符号化処理の対象となる対象ブロックにおける量子化パラメータを取得する量子化パラメータ取得手段と、
     前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の符号化方法を切り替える切替手段と、
     前記切替手段により切り替えられた前記符号化方法で、前記予測モードに関する情報を符号化する符号化手段と
     を備える画像処理装置。
  16.  前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するVLC(Variable Length Coding)テーブルを切り替えることで、前記符号化方法を切り替える
     請求項15に記載の画像処理装置。
  17.  前記切替手段は、所定の閾値より値が大きい量子化パラメータの場合、コードナンバが小さい事象に対するビット長が短いテーブルに切り替える
     請求項16に記載の画像処理装置。
  18.  前記切替手段は、所定の閾値より値が小さい量子化パラメータの場合、コードナンバが増大しても、ビット長の増大が緩やかであるテーブルに切り替える
     請求項16に記載の画像処理装置。
  19.  前記切替手段は、前記量子化パラメータに応じて、前記予測モードに関する情報に対するコードナンバの割当を切り替えることで、前記符号化方法を切り替える
     請求項15に記載の画像処理装置。
  20.  画像処理装置が、
     符号化処理の対象となる対象ブロックにおける量子化パラメータを取得し、
     前記量子化パラメータに応じて、前記対象ブロックに対する予測モードに関する情報の符号化方法を切り替え、
     切り替えられた前記符号化方法で、前記予測モードに関する情報を符号化するステップ を含む画像処理方法。
PCT/JP2010/061658 2009-07-17 2010-07-09 画像処理装置および方法 WO2011007719A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US13/383,400 US20120128064A1 (en) 2009-07-17 2010-07-09 Image processing device and method
RU2012100264/08A RU2012100264A (ru) 2009-07-17 2010-07-09 Устройство и способ обработки изображений
CN2010800311072A CN102474618A (zh) 2009-07-17 2010-07-09 图像处理装置和方法
BR112012000618A BR112012000618A2 (pt) 2009-07-17 2010-07-09 dispositivo e metodo de processamento de imagem
EP10799777A EP2456205A1 (en) 2009-07-17 2010-07-09 Image processing apparatus and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-168499 2009-07-17
JP2009168499A JP2011024066A (ja) 2009-07-17 2009-07-17 画像処理装置および方法

Publications (1)

Publication Number Publication Date
WO2011007719A1 true WO2011007719A1 (ja) 2011-01-20

Family

ID=43449328

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/061658 WO2011007719A1 (ja) 2009-07-17 2010-07-09 画像処理装置および方法

Country Status (8)

Country Link
US (1) US20120128064A1 (ja)
EP (1) EP2456205A1 (ja)
JP (1) JP2011024066A (ja)
KR (1) KR20120051639A (ja)
CN (1) CN102474618A (ja)
BR (1) BR112012000618A2 (ja)
RU (1) RU2012100264A (ja)
WO (1) WO2011007719A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140185948A1 (en) * 2011-05-31 2014-07-03 Humax Co., Ltd. Method for storing motion prediction-related information in inter prediction method, and method for obtaining motion prediction-related information in inter prediction method

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101824241B1 (ko) * 2011-01-11 2018-03-14 에스케이 텔레콤주식회사 인트라 부가정보 부호화/복호화 장치 및 방법
WO2013001717A1 (ja) * 2011-06-30 2013-01-03 三菱電機株式会社 画像符号化装置、画像復号装置、画像符号化方法及び画像復号方法
JP5768565B2 (ja) * 2011-07-28 2015-08-26 富士通株式会社 動画像符号化装置、動画像符号化方法及び動画像符号化プログラム
US20130188691A1 (en) 2012-01-20 2013-07-25 Sony Corporation Quantization matrix design for hevc standard
US11039138B1 (en) * 2012-03-08 2021-06-15 Google Llc Adaptive coding of prediction modes using probability distributions
WO2013162283A1 (ko) * 2012-04-24 2013-10-31 엘지전자 주식회사 비디오 신호 처리 방법 및 장치
CN104380733B (zh) * 2012-06-28 2017-09-05 日本电气株式会社 视频量化参数编码方法、视频量化参数解码方法、设备
US10904551B2 (en) * 2013-04-05 2021-01-26 Texas Instruments Incorporated Video coding using intra block copy
WO2015058397A1 (en) 2013-10-25 2015-04-30 Microsoft Technology Licensing, Llc Representing blocks with hash values in video and image coding and decoding
KR102185245B1 (ko) 2014-03-04 2020-12-01 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 해시 기반 블록 매칭을 위한 해시 테이블 구성 및 이용가능성 검사
CN105706450B (zh) * 2014-06-23 2019-07-16 微软技术许可有限责任公司 根据基于散列的块匹配的结果的编码器决定
JP6462119B2 (ja) 2014-09-30 2019-01-30 マイクロソフト テクノロジー ライセンシング,エルエルシー コンピューティングデバイス
GB2533155B (en) * 2014-12-12 2021-09-15 Advanced Risc Mach Ltd Video data processing system
KR20170007665A (ko) * 2015-07-10 2017-01-19 삼성전자주식회사 스킵 모드 정보를 이용한 레이트 조절 인코딩 방법 및 그에 따른 인코딩 장치
JP6727011B2 (ja) * 2016-04-14 2020-07-22 キヤノン株式会社 画像符号化装置及びその制御方法
WO2018030293A1 (ja) * 2016-08-10 2018-02-15 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 符号化装置、復号装置、符号化方法及び復号方法
US10366698B2 (en) * 2016-08-30 2019-07-30 Dts, Inc. Variable length coding of indices and bit scheduling in a pyramid vector quantizer
CN106341689B (zh) * 2016-09-07 2019-04-23 中山大学 一种avs2量化模块和反量化模块的优化方法及系统
US11095877B2 (en) 2016-11-30 2021-08-17 Microsoft Technology Licensing, Llc Local hash-based motion estimation for screen remoting scenarios
US10506258B2 (en) * 2017-07-13 2019-12-10 Google Llc Coding video syntax elements using a context tree
US10848775B2 (en) 2018-11-02 2020-11-24 Fungible, Inc. Memory layout for JPEG accelerator
US10827192B2 (en) * 2018-11-02 2020-11-03 Fungible, Inc. Work allocation for JPEG accelerator
US10827191B2 (en) 2018-11-02 2020-11-03 Fungible, Inc. Parallel coding of syntax elements for JPEG accelerator
US10931958B2 (en) 2018-11-02 2021-02-23 Fungible, Inc. JPEG accelerator using last-non-zero (LNZ) syntax element
CN114270825A (zh) 2019-08-19 2022-04-01 北京字节跳动网络技术有限公司 基于计数器的帧内预测模式的初始化
US11202085B1 (en) 2020-06-12 2021-12-14 Microsoft Technology Licensing, Llc Low-cost hash table construction and hash-based block matching for variable-size blocks
US20220292730A1 (en) 2021-03-10 2022-09-15 Tencent America LLC Method and apparatus for haar-based point cloud coding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004007376A (ja) * 2001-11-22 2004-01-08 Matsushita Electric Ind Co Ltd 可変長符号化方法および可変長復号化方法
JP2004135252A (ja) * 2002-10-09 2004-04-30 Sony Corp 符号化処理方法、符号化装置及び復号化装置
WO2004039083A1 (ja) * 2002-04-26 2004-05-06 Ntt Docomo, Inc. 画像符号化装置、画像復号装置、画像符号化方法、画像復号方法、画像符号化プログラム及び画像復号プログラム
JP2005516497A (ja) * 2002-01-22 2005-06-02 ノキア コーポレイション イメージ/ビデオ符号器及び/又は復号器における変換係数の符号化

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2794951B2 (ja) * 1990-12-17 1998-09-10 村田機械株式会社 Mr符号の復号化方法
US5995148A (en) * 1997-02-14 1999-11-30 At&T Corp Video coder having scalar dependent variable length coder
SE522261C2 (sv) * 2000-05-10 2004-01-27 Global Ip Sound Ab Kodning och avkodning av en digital signal
US6633242B2 (en) * 2001-02-08 2003-10-14 Sun Microsystems, Inc. Entropy coding using adaptable prefix codes
JP4163618B2 (ja) * 2001-08-28 2008-10-08 株式会社エヌ・ティ・ティ・ドコモ 動画像符号化伝送システム、動画像符号化伝送方法、これらに用いて好適な符号化装置、復号化装置、符号化方法、復号化方法及びプログラム
JP4492777B2 (ja) * 2001-08-28 2010-06-30 日本電気株式会社 動画像符号化装置
CN101064843B (zh) * 2001-11-22 2010-08-18 松下电器产业株式会社 可变长度编码方法
JP2004007563A (ja) * 2002-04-19 2004-01-08 Matsushita Electric Ind Co Ltd 動画像符号化方法および動画像復号化方法
US7170937B2 (en) * 2002-05-01 2007-01-30 Texas Instruments Incorporated Complexity-scalable intra-frame prediction technique
US20090198500A1 (en) * 2007-08-24 2009-08-06 Qualcomm Incorporated Temporal masking in audio coding based on spectral dynamics in frequency sub-bands

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004007376A (ja) * 2001-11-22 2004-01-08 Matsushita Electric Ind Co Ltd 可変長符号化方法および可変長復号化方法
JP2005516497A (ja) * 2002-01-22 2005-06-02 ノキア コーポレイション イメージ/ビデオ符号器及び/又は復号器における変換係数の符号化
WO2004039083A1 (ja) * 2002-04-26 2004-05-06 Ntt Docomo, Inc. 画像符号化装置、画像復号装置、画像符号化方法、画像復号方法、画像符号化プログラム及び画像復号プログラム
JP2004135252A (ja) * 2002-10-09 2004-04-30 Sony Corp 符号化処理方法、符号化装置及び復号化装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140185948A1 (en) * 2011-05-31 2014-07-03 Humax Co., Ltd. Method for storing motion prediction-related information in inter prediction method, and method for obtaining motion prediction-related information in inter prediction method
US20150036741A1 (en) * 2011-05-31 2015-02-05 Humax Holdings Co., Ltd. Method for storing movement prediction-related information in an interscreen prediction method, and method for calculating the movement prediction-related information in the inter-screen prediction method
US20150036751A1 (en) * 2011-05-31 2015-02-05 Humax Holdings Co., Ltd. Method for storing movement prediction-related information in an interscreen prediction method, and method for calculating the movement prediction-related information in the inter-screen prediction method
US20150036750A1 (en) * 2011-05-31 2015-02-05 Humax Holdings Co., Ltd. Method for storing movement prediction-related information in an interscreen prediction method, and method for calculating the movement prediction-related information in the inter-screen prediction method
US20150036752A1 (en) * 2011-05-31 2015-02-05 Humax Holdings Co., Ltd. Method for storing movement prediction-related information in an interscreen prediction method, and method for calculating the movement prediction-related information in the inter-screen prediction method

Also Published As

Publication number Publication date
KR20120051639A (ko) 2012-05-22
BR112012000618A2 (pt) 2019-09-24
RU2012100264A (ru) 2013-07-20
CN102474618A (zh) 2012-05-23
US20120128064A1 (en) 2012-05-24
JP2011024066A (ja) 2011-02-03
EP2456205A1 (en) 2012-05-23

Similar Documents

Publication Publication Date Title
WO2011007719A1 (ja) 画像処理装置および方法
JP7171646B2 (ja) ビデオ符号化での分割ブロック符号化方法、ビデオ復号化での分割ブロック復号化方法及びこれを実現する記録媒体
US9838718B2 (en) Secondary boundary filtering for video coding
EP2678944B1 (en) Methods and devices for data compression using offset-based adaptive reconstruction levels
EP2755388B1 (en) Method, device, and program for encoding and decoding image
EP3080988B1 (en) Parameter derivation for entropy coding of a syntax element
WO2010131601A1 (ja) 画像処理装置および方法、並びにプログラム
US20130101033A1 (en) Coding non-symmetric distributions of data
JP2010258738A (ja) 画像処理装置および方法、並びにプログラム
WO2010123055A1 (ja) 画像処理装置および方法
WO2010123057A1 (ja) 画像処理装置および方法
US9788000B2 (en) Method and apparatus for inter color component prediction
JP6708211B2 (ja) 動画像符号化装置、動画像符号化方法および動画像符号化プログラムを記憶する記録媒体
KR20180056597A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
JP7396883B2 (ja) 符号化装置、復号装置、及びプログラム
KR20150021980A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
KR20200008537A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
KR20170051389A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
KR20170051388A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
KR20170051390A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
KR20170051391A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체
KR20170054338A (ko) 비디오 복호화에서의 분할 블록 복호화 방법 및 이를 구현하는 기록매체

Legal Events

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

Ref document number: 201080031107.2

Country of ref document: CN

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

Ref document number: 10799777

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010799777

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20127000633

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 219/DELNP/2012

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: 13383400

Country of ref document: US

Ref document number: 2012100264

Country of ref document: RU

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112012000618

Country of ref document: BR

Kind code of ref document: A2

ENP Entry into the national phase

Ref document number: 112012000618

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20120110