[go: up one dir, main page]

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

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

Info

Publication number
WO2010123055A1
WO2010123055A1 PCT/JP2010/057126 JP2010057126W WO2010123055A1 WO 2010123055 A1 WO2010123055 A1 WO 2010123055A1 JP 2010057126 W JP2010057126 W JP 2010057126W WO 2010123055 A1 WO2010123055 A1 WO 2010123055A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction
image
pixel
unit
motion vector
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2010/057126
Other languages
English (en)
French (fr)
Inventor
佐藤 数史
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to CN2010800174713A priority Critical patent/CN102396232A/zh
Priority to US13/264,944 priority patent/US20120033737A1/en
Publication of WO2010123055A1 publication Critical patent/WO2010123055A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present invention relates to an image processing apparatus and method, and more particularly to an image processing apparatus and method that suppresses a decrease in prediction efficiency associated with secondary prediction.
  • 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).
  • motion prediction / compensation processing with 1/2 pixel accuracy is performed by linear interpolation processing.
  • H. In the H.264 / AVC format, 1/4 pixel accuracy prediction / compensation processing using a 6-tap FIR (Finite Impulse Response Filter) filter is performed.
  • FIR Finite Impulse Response Filter
  • interpolation processing with 1/2 pixel accuracy is performed by 6-tap FIR, and interpolation processing with 1/4 pixel accuracy is performed by linear interpolation.
  • Non-Patent Document 1 proposes motion prediction with 1/8 pixel accuracy.
  • Non-Patent Document 1 the interpolation process with 1/2 pixel accuracy is performed by the filter [ ⁇ 3,12, ⁇ 39,158,158, ⁇ 39,12, ⁇ 3] / 256.
  • the interpolation processing with 1/4 pixel accuracy is performed by the filter [-3,12, -37,229,71, -21,6, -1] / 256, and the interpolation processing with 1/8 pixel accuracy is performed by linear interpolation. Is called.
  • Non-Patent Document 2 proposes a secondary prediction method that further improves coding efficiency in inter prediction. Next, this secondary prediction method will be described with reference to FIG.
  • a target frame and a reference frame are shown, and a target block A is shown in the target frame.
  • each coordinate of the adjacent pixel group R is obtained from the upper left coordinate (x, y) of the target block A. Further, each coordinate of the adjacent pixel group R1 is obtained from the upper left coordinates (x + mv_x, y + mv_y) of the block associated with the target block A by the motion vector mv. Based on these coordinate values, difference information between adjacent pixel groups is calculated.
  • the difference between the calculated difference information regarding the target block and the difference information regarding adjacent pixels is H.264.
  • Intra prediction in the H.264 / AVC format is performed, whereby secondary difference information is generated.
  • the generated secondary difference information is orthogonally transformed and quantized, encoded with the compressed image, and sent to the decoding side.
  • This invention is made in view of such a situation, and suppresses the fall of the prediction efficiency accompanying secondary prediction.
  • Second-order difference information is generated by performing second-order prediction processing between difference information between the reference block and the difference information between the target adjacent pixel adjacent to the target block and the reference adjacent pixel adjacent to the reference block.
  • Coding efficiency determination means for determining which of coding of the target image difference information and coding of the secondary difference information generated by the secondary prediction means has better coding efficiency, Only when the encoding efficiency determination means determines that the encoding of the secondary difference information is good in encoding efficiency, the secondary difference information generated by the secondary prediction means, and the secondary difference information A secondary prediction flag indicating that a prediction process is to be performed can be encoded.
  • the secondary prediction means performs the secondary prediction processing when the vertical accuracy of the motion vector information of the target block is decimal pixel accuracy and the intra prediction mode in the secondary prediction processing is the vertical prediction mode. It can be carried out.
  • the secondary prediction means performs the secondary prediction processing when the horizontal accuracy of the motion vector information of the target block is decimal pixel accuracy and the intra prediction mode in the secondary prediction processing is a horizontal prediction mode. It can be carried out.
  • the secondary prediction means when the accuracy of at least one of the vertical direction and the horizontal direction of the motion vector information of the target block is decimal pixel accuracy, and the intra prediction mode in the secondary prediction process is a DC prediction mode, The secondary prediction process can be performed.
  • the secondary prediction means performs prediction using difference information between the target adjacent pixel and the reference adjacent pixel, and generates an intra prediction image for the target block; the target block and the reference block; Difference information and the intra-prediction image generated by the adjacent pixel prediction means, and a secondary difference generation means for generating the secondary difference information.
  • the image processing apparatus uses the motion vector information in the target block and the reference frame.
  • a secondary prediction process is performed between the difference information between the reference block associated with the target block and the difference information between the target adjacent pixel adjacent to the target block and the reference adjacent pixel adjacent to the reference block. Generating differential information and encoding the secondary differential information generated by the secondary prediction process.
  • An image processing apparatus includes a decoding unit that decodes an image of a target block in an encoded target frame and motion vector information detected for the target block in a reference frame, and the decoding unit
  • the motion vector information decoded by the above is integer pixel precision
  • the target adjacent pixel adjacent to the target block and the reference adjacent adjacent to the reference block associated with the target block by the motion vector information in the reference frame Secondary prediction means for performing secondary prediction processing using difference information with respect to pixels and generating a prediction image; an image of the target block; the prediction image generated by the secondary prediction means; and the motion vector information
  • the decoded image of the target block is generated by adding the image of the reference block obtained from That comprises an arithmetic unit.
  • the secondary prediction means acquires a secondary prediction flag indicating that the secondary prediction processing decoded by the decoding means is performed, and performs the secondary prediction processing according to the secondary prediction flag. it can.
  • the secondary prediction means when the vertical accuracy of the motion vector information of the target block is decimal pixel precision, and the intra prediction mode in the secondary prediction processing decoded by the decoding means is a vertical prediction mode
  • the secondary prediction process can be performed according to the secondary prediction flag.
  • the secondary prediction means when the horizontal accuracy of the motion vector information of the target block is decimal pixel precision, and the intra prediction mode in the secondary prediction processing decoded by the decoding means is a horizontal prediction mode
  • the secondary prediction process can be performed according to the secondary prediction flag.
  • the secondary prediction process can be performed according to the secondary prediction flag.
  • the image processing apparatus decodes the image of the target block in the encoded target frame and the motion vector information detected for the target block in the reference frame.
  • the motion vector information is an integer pixel precision
  • the target adjacent pixel adjacent to the target block, and the reference adjacent pixel adjacent to the reference block associated with the target block by the motion vector information in the reference frame Second order prediction processing is performed using the difference information, and a predicted image is generated, and the image of the target block, the generated predicted image, and the image of the reference block obtained from the motion vector information are added. And generating a decoded image of the target block.
  • the reference block associated with the target block by the motion vector information in the target block and the reference frame Secondary prediction processing is performed between the difference information between and the difference information between the target adjacent pixel adjacent to the target block and the reference adjacent pixel adjacent to the reference block, and secondary difference information is generated. Then, the secondary difference information generated by the secondary prediction process is encoded.
  • the image of the target block in the encoded target frame and the motion vector information detected for the target block in the reference frame are decoded, and the decoded motion vector information is an integer.
  • difference information between the target adjacent pixel adjacent to the target block and the reference adjacent pixel adjacent to the reference block associated with the target block by the motion vector information in the reference frame is 2
  • Next prediction processing is performed, and a predicted image is generated. Then, the image of the target block, the generated predicted image, and the image of the reference block obtained from the motion vector information are added to generate a decoded image of the target block.
  • 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 encoded. Moreover, according to the 1st side surface of this invention, the fall of the prediction efficiency accompanying secondary prediction can be suppressed.
  • an image can be decoded. Moreover, according to the 2nd side surface of this invention, the fall of the prediction efficiency accompanying secondary prediction can be suppressed.
  • FIG. 3 is a flowchart for describing an encoding process of the image encoding device in FIG. 2. 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 explaining encoding of the 4 * 4 pixel intra prediction mode of a luminance signal.
  • step S52 of FIG. It is a flowchart explaining the motion prediction / compensation process of step S52 of FIG. It is a block diagram which shows the structure of one Embodiment of the image decoding apparatus to which this invention is applied. It is a block diagram which shows the structural example of the secondary prediction part of FIG. It is a flowchart explaining the decoding process of the image decoding apparatus of FIG. It is a flowchart explaining the prediction process of step S138 of FIG. It is a flowchart explaining the secondary inter prediction process of step S180 of FIG. It is a block diagram which shows the structural example of the hardware of a computer.
  • FIG. 2 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, a storage 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, secondary prediction unit 76, motion vector accuracy determination
  • the unit 77, the predicted image selection unit 78, and the rate control unit 79 are configured.
  • 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 78 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.
  • the lossless encoding unit 66 acquires information indicating intra prediction from the intra prediction unit 74 and acquires information indicating inter prediction mode from the motion prediction / compensation unit 75. Note that the information indicating intra prediction and the information indicating inter prediction are also referred to as intra prediction mode information and inter prediction mode information, respectively.
  • the lossless encoding unit 66 encodes the quantized transform coefficient, encodes information indicating intra prediction, information indicating inter prediction mode, and the like, and uses it as a part of header information in the compressed image.
  • the lossless encoding unit 66 supplies the encoded data to the accumulation buffer 67 for accumulation.
  • lossless encoding processing such as variable length encoding or arithmetic encoding is performed.
  • variable length coding include H.264.
  • CAVLC Context-Adaptive Variable Length Coding
  • arithmetic coding include CABAC (Context-Adaptive Binary Arithmetic Coding).
  • 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 78 by the calculation unit 70, and becomes 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.
  • 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 78.
  • the intra prediction unit 74 supplies information indicating the optimal intra prediction mode to the lossless encoding unit 66.
  • the lossless encoding unit 66 encodes this information and uses it 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 performs secondary prediction on the detected motion vector information, information on the image to be inter-processed (address, etc.), and the primary residual that is the difference between the image to be inter-processed and the generated predicted image. To the unit 76. The motion prediction / compensation unit 75 also supplies the detected motion vector information to the motion vector accuracy determination unit 77.
  • the secondary prediction unit 76 reads out the target adjacent pixel adjacent to the target block to be inter-processed from the frame memory 72 based on the motion vector information from the motion prediction / compensation unit 75 and the information of the image to be inter-processed. In addition, the secondary prediction unit 76 reads out the reference adjacent pixels adjacent to the reference block associated with the target block from the frame memory 72 based on the motion vector information.
  • the secondary prediction unit 76 performs secondary prediction processing according to the determination result by the reference adjacency determination unit 77.
  • the secondary prediction process is a process of performing prediction between the primary residual and the difference between the target adjacent pixel and the reference adjacent pixel to generate secondary difference information (secondary residual).
  • the secondary prediction unit 76 outputs the secondary residual generated by the secondary prediction process to the motion prediction / compensation unit 75.
  • the secondary prediction unit 76 also performs secondary prediction processing and generates a secondary residual even when the determination result by the reference adjacency determination unit 77 and the type of intra prediction mode of the secondary prediction are a specific combination. And output to the motion prediction / compensation unit 75.
  • the motion vector accuracy determination unit 77 determines whether the accuracy of the motion vector information from the motion prediction / compensation unit 75 is integer pixel accuracy or decimal pixel accuracy, and the determination result is a secondary prediction unit. 76.
  • the motion prediction / compensation unit 75 compares the secondary residuals from the secondary prediction unit 76 to determine an optimal intra prediction mode in the secondary prediction. Also, the motion prediction / compensation unit 75 compares the secondary residual with the primary residual to determine whether or not to perform the secondary prediction processing (that is, encode the secondary residual or Whether to encode the residual). Note that these processes are performed for all candidate inter prediction modes.
  • the motion prediction / compensation unit 75 calculates cost function values for all candidate inter prediction modes. At this time, a cost function value is calculated using a residual determined for each inter prediction mode among the primary residual and the secondary residual. 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 (or the difference between the interpolated image and the secondary residual) and its cost function value to the predicted image selection unit 78.
  • the motion prediction / compensation unit 75 outputs information indicating the optimal inter prediction mode to the lossless encoding unit 66.
  • the lossless encoding unit 66 performs lossless encoding processing such as variable length encoding and arithmetic encoding on the information from the motion prediction / compensation unit 75 and inserts the information into the header portion of the compressed image.
  • the predicted image selection unit 78 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 78 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 78 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 79 controls the rate of the quantization operation of the quantization unit 65 based on the compressed image stored in the storage buffer 67 so that overflow or underflow does not occur.
  • 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. Further, in the lower part of FIG. 3, from the left, 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.
  • Figure 4 shows H. It is a figure explaining the prediction and compensation process of the 1/4 pixel precision in a H.264 / AVC system.
  • FIR Finite Impulse Response Filter
  • the position A is the position of the integer precision pixel
  • the positions b, c, and d are the positions of the 1/2 pixel precision
  • the positions e1, e2, and e3 are the positions of the 1/4 pixel precision.
  • max_pix When the input image has 8-bit precision, the value of max_pix is 255.
  • the pixel values at the positions b and d are generated by the following equation (2) using a 6-tap FIR filter.
  • the pixel value at the position c is generated as in the following Expression (3) by applying a 6-tap FIR filter in the horizontal direction and the vertical direction.
  • the clip process is executed only once at the end after performing both the horizontal and vertical product-sum processes.
  • the positions e1 to e3 are generated by linear interpolation as in the following equation (4).
  • FIG. 6 is a diagram for describing prediction / compensation processing of a multi-reference frame in the H.264 / AVC format.
  • a target frame Fn to be encoded from now and encoded frames Fn-5,..., Fn-1 are shown.
  • the frame Fn-1 is a frame immediately before the target frame Fn on the time axis
  • the frame Fn-2 is a frame two before the target frame Fn
  • the frame Fn-3 is the frame of the target frame Fn. This is the previous three frames.
  • the frame Fn-4 is a frame four times before the target frame Fn
  • the frame Fn-5 is a frame five times before the target frame Fn.
  • a smaller reference picture number (ref_id) is added to a frame closer to the time axis than the target frame Fn. That is, frame Fn-1 has the smallest reference picture number, and thereafter, the reference picture numbers are smallest in the order of Fn-2,..., Fn-5.
  • a block A1 and a block A2 are shown in the target frame Fn.
  • the block A1 is considered to be correlated with the block A1 'of the previous frame Fn-2, and the motion vector V1 is searched.
  • the block A2 is considered to be correlated with the block A1 'of the previous frame Fn-4, and the motion vector V2 is searched.
  • the block indicates any of the 16 ⁇ 16 pixel, 16 ⁇ 8 pixel, 8 ⁇ 16 pixel, and 8 ⁇ 8 pixel partitions described above with reference to FIG.
  • the reference frames within the 8x8 sub-block must be the same.
  • Figure 6 shows H. 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.
  • FIG. 7 is a block diagram illustrating a detailed configuration example of the secondary prediction unit.
  • the secondary prediction unit 76 includes a primary residual buffer 81, a secondary residual generation unit 82, an adjacent pixel prediction unit 83, and a switch 84.
  • the primary residual buffer 81 accumulates a primary residual that is a difference between the inter-processed image from the motion prediction / compensation unit 75 and the generated predicted image.
  • the secondary residual generation unit 82 converts the primary residual corresponding thereto into the primary residual. Read from buffer 81.
  • the secondary residual generation unit 82 generates a secondary residual that is a difference between the primary residual and the prediction image of the residual signal, and outputs the generated secondary residual to the switch 84.
  • the adjacent pixel prediction unit 83 receives the detected motion vector information and information (address) of the image to be inter-processed from the motion prediction / compensation unit 75.
  • the adjacent pixel prediction unit 83 reads the target adjacent pixel adjacent to the target block from the frame memory 72 based on the motion vector information from the motion prediction / compensation unit 75 and the information (address) of the target block to be encoded. Further, the adjacent pixel prediction unit 83 reads the reference adjacent pixel adjacent to the reference block associated with the target block by the motion vector information from the frame memory 72.
  • the adjacent pixel prediction unit 83 performs intra prediction on the target block using the difference between the target adjacent pixel and the reference adjacent pixel, and generates an intra image based on the difference.
  • the generated intra image (predicted image of the residual signal) is output to the secondary residual generation unit 82.
  • the switch 84 selects one terminal on the secondary residual generation unit 82 side, The secondary residual from the secondary residual generation unit 82 is output to the motion prediction / compensation unit 75.
  • the switch 84 connects the other terminal that is not on the secondary residual generation unit 82 side. Select and output nothing.
  • the secondary prediction unit 76 of FIG. 7 when the motion vector information is determined to have decimal pixel accuracy, the secondary residual is not selected as the prediction efficiency decreases, that is, the secondary prediction. Is not done.
  • circuit that performs the intra prediction in the adjacent pixel prediction unit 83 in the example of FIG. 7 can share the circuit with the intra prediction unit 74.
  • a target block E composed of 4 ⁇ 4 pixels and adjacent pixels A, B, C, D adjacent to the top of the target block E are used. It is shown.
  • the vertical prediction mode is selected because the adjacent pixels A, B, C, and D have a high frequency component. This is a case where a high frequency component is included in the horizontal direction. That is, the vertical prediction mode is selected in order to preserve this high frequency component. As a result, the high-frequency component in the horizontal direction is preserved by intra prediction in the vertical prediction mode, so that higher prediction efficiency is realized.
  • the secondary prediction unit 76 performs the secondary prediction only when it is determined that the motion vector information has integer pixel precision (that is, the secondary residual is selected). Thereby, it is suppressed that the prediction efficiency accompanying the secondary prediction falls.
  • Non-Patent Document 2 it is necessary to send to the decoding side, together with the compressed image, a flag relating to not performing secondary prediction for each motion prediction block.
  • the image encoding device 51 of FIG. 2 when the motion vector information has decimal pixel precision, it is not necessary to send the flag to the decoding side. Therefore, higher encoding efficiency can be achieved.
  • the vertical prediction mode (mode 0: Vertical Prediction mode) since a high frequency component is required in the horizontal direction indicated by the arrow H, it is necessary to have motion vector information with integer pixel accuracy in the horizontal direction. is there. On the other hand, even if motion vector information with decimal pixel precision is held in the vertical direction indicated by the arrow V, the high frequency component in the horizontal direction is not lost. That is, regarding the vertical prediction mode, if motion vector information with integer pixel precision is provided in the horizontal direction, secondary prediction can be performed even if the motion vector in the vertical direction has decimal precision.
  • the horizontal prediction mode (mode 1: horizontal Prediction mode) since a high frequency component is required in the vertical direction indicated by the arrow V, it is necessary to have motion vector information with integer pixel accuracy in the vertical direction. is there. On the other hand, even if it has motion vector information with decimal pixel accuracy in the horizontal direction indicated by the arrow H, the high frequency component in the vertical direction is not lost. That is, regarding the horizontal prediction mode, if motion vector information with integer pixel accuracy is provided in the vertical direction, secondary prediction can be performed even if the motion vector in the horizontal direction has decimal pixel accuracy.
  • the prediction method itself is a prediction method for obtaining an average value of adjacent pixel values, and the high frequency components of the adjacent pixels are lost by the prediction method itself. Therefore, with respect to the DC prediction mode, even when the motion vector information in at least one of the horizontal direction indicated by the arrow H and the vertical direction indicated by the arrow V has decimal pixel accuracy, the secondary prediction can be performed. .
  • 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 78.
  • ⁇ 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 S ⁇ b> 18 the calculation unit 70 adds the predicted image input via the predicted image selection unit 78 to the locally decoded difference information, and outputs the locally decoded image (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.
  • the motion vector accuracy determination unit 77 determines whether the accuracy of the motion vector information of the target block is integer pixel accuracy or decimal pixel accuracy, and the secondary prediction unit 76 determines the accuracy according to the determination result.
  • a quadratic prediction is performed to generate a quadratic residual.
  • the motion prediction / compensation unit 75 determines a residual with good coding efficiency, out of the primary residual and the secondary residual.
  • step S21 The details of the prediction process in step S21 will be described later with reference to FIG. 11.
  • prediction processes in all candidate intra prediction modes are performed, and in all the intra prediction modes that are candidates.
  • Cost function values are respectively 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 78.
  • prediction processing is performed in all candidate inter prediction modes, and the cost function values in all candidate inter prediction modes are calculated using the determined residuals.
  • 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 78.
  • the difference between the inter-image and the second-order residual is supplied to the predicted image selection unit 78 as a predicted image.
  • step S ⁇ b> 22 the predicted image selection unit 78 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 78 selects the predicted image in the determined optimal prediction mode and supplies it to the calculation units 63 and 70. This prediction image (if secondary prediction is performed, the difference between the interpolated image and the secondary difference information) is used for the calculations in steps S13 and S18 as described above.
  • 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 indicating the optimal intra prediction mode (that is, intra prediction mode information) to the lossless encoding unit 66.
  • the motion prediction / compensation unit 75 sends information indicating the optimal inter prediction mode and, if necessary, information corresponding to the optimal inter prediction mode to the lossless encoding unit 66. Output.
  • Information according to the optimal inter prediction mode includes a secondary prediction flag indicating that secondary prediction is performed, information indicating an intra prediction mode in secondary prediction, reference frame information, and the like.
  • the lossless encoding unit 66 encodes the quantized transform coefficient output from the quantization unit 65. That is, the difference image (secondary difference image in the case of secondary prediction) is subjected to lossless encoding such as variable length encoding and arithmetic encoding, and is compressed.
  • the intra prediction mode information from the intra prediction unit 74 or the information corresponding to the optimal inter prediction mode from the motion prediction / compensation unit 75, which is input to the lossless encoding unit 66 in step S22 described above, is also encoded. 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 79 controls the quantization operation rate of the quantization unit 65 based on the compressed image stored in the storage buffer 67 so that overflow or underflow does not occur.
  • 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 78.
  • 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.
  • the motion vector accuracy determination unit 77 determines whether the accuracy of the motion vector information of the target block obtained by the motion prediction / compensation unit 75 is integer pixel accuracy or decimal pixel accuracy.
  • the secondary prediction unit 76 performs secondary prediction according to the determination result of the motion vector accuracy and the intra prediction mode. That is, the secondary prediction unit 76 generates an intra prediction image of the target block using the difference between the target adjacent pixel and the reference adjacent pixel, and the primary residual obtained by the motion prediction / compensation unit 75 and the intra prediction image. 2 is output to the motion prediction / compensation unit 75.
  • the motion prediction / compensation unit 75 determines a residual with good coding efficiency out of the primary residual and the secondary residual and uses it for the subsequent processing.
  • step S32 Details of the inter motion prediction process in step S32 will be described later with reference to FIG.
  • motion prediction processing is performed in all candidate inter prediction modes, and a cost function value is calculated for all candidate inter prediction modes using a primary difference or a secondary difference. .
  • 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 giving the minimum value as the optimal inter prediction mode, and supplies the prediction image generated in the optimal inter prediction mode and its cost function value to the prediction image selection unit 78.
  • the intra prediction mode for the luminance signal 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. This is also referred to as a 16-pixel intra prediction mode as appropriate.
  • numerals -1 to 25 given to each block represent 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.
  • FIGS. 13 and 14 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.
  • pixels a to p represent pixels of a target block to be intra-processed
  • pixel values A to M represent pixel values of pixels belonging to 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 prediction 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 (7).
  • 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 (8).
  • 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 (8)
  • Mode 2 is a DC Prediction mode.
  • the predicted pixel value is generated as shown in Expression (9). (A + B + C + D + I + J + K + L + 4) >> 3 (9)
  • 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 (12).
  • 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 (13).
  • 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 (14).
  • 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 (15).
  • Mode 7 is a 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 (16).
  • 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”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (17).
  • a 4 ⁇ 4 pixel intra prediction mode (Intra_4x4_pred_mode) encoding method for luminance signals will be described with reference to FIG.
  • a target block C that is 4 ⁇ 4 pixels and is an encoding target 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 (18).
  • MostProbableMode Min (Intra_4x4_pred_modeA, Intra_4x4_pred_modeB) ... (18)
  • 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. 18 and 19 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 (20) when p [-1, -1] is “available”, and when “not available”: Is calculated as in the following equation (21).
  • 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 (21)
  • p '[x, -1] (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2 (22)
  • 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 ... (23)
  • p '[-1, -1] is calculated as follows when p [-1, -1] is "available”. That is, p ′ [ ⁇ 1, ⁇ 1] is calculated as shown in Expression (24) when both p [0, ⁇ 1] and p [ ⁇ 1,0] are available. -1,0] is “unavailable”, it is calculated as in equation (25). Further, p ′ [ ⁇ 1, ⁇ 1] is calculated as in Expression (26) 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 ...
  • p '[-1,0] (3 * p [-1,0] + p [-1,1] + 2) >> 2 ... (28)
  • p [-1, y] (p [-1, y-1] + 2 * p [-1, y] + p [-1, y + 1] + 2) >> 2 ...
  • p '[-1,7] (p [-1,6] + 3 * p [-1,7] + 2) >> 2 ... (30)
  • the prediction value in each intra prediction mode shown in FIG. 18 and FIG. 19 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 ... (38)
  • the predicted pixel value is generated as shown in the following formula (39), and the predicted pixel value as x ⁇ y is generated as shown in the following formula (40).
  • 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 expression (57). 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 (58).
  • pred8x8 L [x, y] (p '[-1,6] + 3 * p' [-1,7] + 2) >> 2 ... (57)
  • pred8x8 L [x, y] p '[-1,7] ... (58)
  • 20 and 21 are diagrams illustrating four types of luminance signal 16 ⁇ 16 pixel intra prediction modes (Intra — 16 ⁇ 16_pred_mode).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (59).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (60).
  • the predicted pixel value Pred (x, y) of each pixel 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 (64).
  • 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.
  • the predicted pixel value Pred (x, y) of each pixel is generated as in the following Expression (65).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (68).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (69).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (70).
  • 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.
  • FIG.11 S31 which is a process performed with respect to these prediction modes is demonstrated.
  • FIG. 24 the 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.
  • the intra prediction unit 74 calculates a cost function value for each intra prediction mode of 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, and 16 ⁇ 16 pixels.
  • the cost function value is determined based on a method of either High Complexity mode or Low Complexity mode. These modes are H.264. It is defined by JM (Joint Model) which is reference software in the H.264 / AVC format.
  • the encoding process is temporarily performed for all candidate prediction modes as the process in step S41. Then, the cost function value represented by the following equation (71) is calculated for each prediction mode, and the prediction mode that gives the minimum value is selected as the optimum prediction mode.
  • D a difference (distortion) between the original image and the decoded image
  • R is a generated code amount including up to the orthogonal transform coefficient
  • is a Lagrange multiplier given as a function of the quantization parameter QP.
  • step S41 generation of predicted images and header bits such as motion vector information, prediction mode information, and flag information are calculated for all candidate prediction modes. The Then, the cost function value represented by the following equation (72) is calculated for each prediction mode, and the prediction mode that gives the minimum value is selected as the optimum prediction mode.
  • Cost (Mode) D + QPtoQuant (QP) ⁇ Header_Bit (72)
  • D is a difference (distortion) between the original image and the decoded image
  • Header_Bit is a header bit for the prediction mode
  • QPtoQuant is a function given as a function of the quantization parameter QP.
  • 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 optimum 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 optimal intra prediction mode from among the optimal 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 78.
  • step S51 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 S52 the motion prediction / compensation unit 75 performs motion prediction on the reference image based on the motion vector determined in step S51 for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Perform compensation processing. Details of this motion prediction and compensation processing will be described later with reference to FIG.
  • step S52 it is determined whether or not the accuracy of the motion vector is a decimal pixel, or whether or not the combination of the accuracy of the motion vector and the intra prediction mode is a specific combination. Then, according to the determination result, prediction is performed between the primary residual that is the difference between the target image and the predicted image and the difference between the target adjacent pixel and the reference adjacent pixel, thereby generating a secondary residual. Then, by comparing the primary residual and the secondary residual, it is finally determined whether or not to perform the secondary prediction process.
  • the secondary residual is used for calculating the cost function value in step S54 described later instead of the primary residual.
  • a secondary prediction flag indicating that the secondary prediction is performed and information indicating the intra prediction mode in the secondary prediction are also output to the motion prediction / compensation unit 75.
  • step S53 the motion prediction / compensation unit 75 generates motion vector information mvd E for the motion vectors determined for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. At this time, the motion vector generation method described above with reference to FIG. 6 is used.
  • the generated motion vector information is also used in the cost function value calculation in the next step S54.
  • the prediction mode information and reference It is output to the lossless encoding unit 66 together with the frame information.
  • step S54 the mode determination unit 86 calculates the cost function value represented by the equation (71) or the equation (72) described above for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. calculate.
  • the cost function value calculated here is used when determining the optimal inter prediction mode in step S33 of FIG. 11 described above.
  • step S52 of FIG. 25 the motion prediction / compensation process in step S52 of FIG. 25 will be described with reference to the flowchart of FIG. In the example of FIG. 26, an example using the 4 ⁇ 4 pixel block intra prediction mode is shown.
  • the motion vector information obtained for the target block in step S51 of FIG. 25 is input to the motion vector accuracy determination unit 77 and the adjacent pixel prediction unit 83.
  • information (such as an address) of the target block is also input to the adjacent pixel prediction unit 83.
  • step S71 the motion vector accuracy determination unit 77 determines whether or not the motion vector information has decimal pixel accuracy in both horizontal and vertical directions. If it is determined in step S71 that the motion vector information does not have decimal pixel accuracy in both horizontal and vertical, the motion vector accuracy determination unit 77 in step S72 determines whether the motion vector information has integer pixel accuracy in both horizontal and vertical. Determine whether.
  • step S72 If it is determined in step S72 that the motion vector information has integer pixel precision in both horizontal and vertical directions, the determination result is output to the switch 84, and the process proceeds to step S73.
  • step S73 the motion prediction / compensation unit 75 converts the reference image into the reference image based on the motion vector determined in step S51 of FIG. 25 for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Perform motion prediction and compensation processing. With this motion prediction and compensation processing, a prediction image in each inter prediction mode is generated for the target block based on the pixel value of the reference block, and the primary difference that is the difference between the target block and the prediction image is the primary residual buffer. 81.
  • step S74 the adjacent pixel prediction unit 83 selects one intra prediction mode among the nine types of intra prediction modes described above with reference to FIGS. Then, for the intra prediction mode selected in step S74, secondary prediction processing is performed in subsequent steps S75 and S76.
  • step S75 the adjacent pixel prediction unit 83 performs an intra prediction process using the difference in the selected intra prediction mode, and in step S76, the secondary residual generation unit 82 generates a secondary residual.
  • the adjacent pixel prediction unit 83 is adjacent to the target adjacent pixel and reference block adjacent to the target block based on the motion vector information from the motion prediction / compensation unit 75 and the information of the target block.
  • Reference adjacent pixels are read from the frame memory 72.
  • the adjacent pixel prediction unit 83 performs intra prediction on the target block using the difference between the target adjacent pixel and the reference adjacent pixel in the selected intra prediction mode, and generates an intra prediction image based on the difference.
  • An intra prediction image (prediction image of a residual signal) based on the generated difference is output to the secondary residual generation unit 82.
  • step S76 when the intra prediction image (prediction image of the residual signal) based on the difference is input from the adjacent pixel prediction unit 83, the secondary residual generation unit 82 receives the primary residual corresponding thereto. The difference is read from the primary residual buffer 81. The secondary residual generation unit 82 generates a secondary residual that is a difference between the primary residual and the intra-prediction image of the residual signal, and outputs the generated secondary residual to the switch 84. The switch 84 outputs the secondary residual from the secondary residual generation unit 82 to the motion prediction / compensation unit 75 according to the determination result in step S72.
  • step S77 the adjacent pixel prediction unit 83 determines whether the processing for all intra prediction modes has been completed. If it is determined that the processing has not ended, the adjacent pixel prediction unit 83 returns to step S74 and repeats the subsequent processing. That is, in step S74, another intra prediction mode is selected, and the subsequent processing is repeated.
  • step S77 If it is determined in step S77 that the processing for all intra prediction modes has been completed, the processing proceeds to step S84.
  • step S72 determines whether the motion vector information is of integer pixel accuracy in both horizontal and vertical, that is, one of them is decimal pixel accuracy. If it is determined in step S72 that the motion vector information is not of integer pixel accuracy in both horizontal and vertical, that is, one of them is decimal pixel accuracy, the determination result is output to the switch 84, and the process is performed. The process proceeds to step S78.
  • step S78 the motion prediction / compensation unit 75 converts the reference image into the reference image based on the motion vector determined in step S51 of FIG. 25 for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Perform motion prediction and compensation processing. With this motion prediction and compensation processing, a prediction image in each inter prediction mode is generated for the target block, and a primary difference that is a difference between the target block and the prediction image is output to the primary residual buffer 81.
  • step S79 the adjacent pixel prediction unit 83 selects one intra prediction mode from the nine types of intra prediction modes described above with reference to FIGS.
  • step S80 the adjacent pixel prediction unit 83 determines whether the motion vector information and the selected intra prediction mode are a specific combination.
  • step S80 If it is determined in step S80 that the motion vector information and the selected intra prediction mode are not a specific combination, the process returns to step S79, another intra prediction mode is selected, and the subsequent processing is repeated.
  • step S80 If it is determined in step S80 that the motion vector information and the selected intra prediction mode are a specific combination, the process proceeds to step S81.
  • the adjacent pixel prediction unit 83 basically does not perform the secondary prediction process, which is the process of steps S81 and S82, because the accuracy of the motion vector in the horizontal direction or the vertical direction is decimal pixel accuracy.
  • the secondary prediction process is performed only when the combination of the accuracy of the motion vector and the intra prediction mode is the specific combination described above with reference to FIGS. Is called.
  • step S80 if the motion vector information in the vertical direction has decimal pixel accuracy, if the intra prediction mode is the vertical prediction mode, it is determined in step S80 that the combination is a specific combination. Proceed to step S81. That is, when the intra prediction mode is the vertical prediction mode, the secondary prediction process is performed as long as the horizontal motion vector information has integer pixel accuracy.
  • step S80 Even if the motion vector information in the horizontal direction has decimal pixel accuracy, if the intra prediction mode is the horizontal prediction mode, it is determined in step S80 that the combination is a specific combination, and the process proceeds to step S81. move on. That is, when the intra prediction mode is the horizontal prediction mode, the secondary prediction process is performed as long as the motion vector information in the vertical direction has integer pixel accuracy.
  • step S80 when the intra prediction mode is the DC prediction mode, it is determined in step S80 that the combination is a specific combination. Proceed to step S81. That is, when the intra prediction mode is the DC prediction mode, the secondary prediction process is performed even if neither the horizontal or vertical motion vector information has integer pixel accuracy.
  • step S81 the adjacent pixel prediction unit 83 performs an intra prediction process using the difference in the selected intra prediction mode.
  • the generated intra image based on the difference is output to the secondary residual generation unit 82 as a prediction image of the residual signal.
  • step S82 the secondary residual generator 82 generates a secondary residual.
  • the generated secondary residual is output to the switch 84.
  • the switch 84 outputs the secondary residual from the secondary residual generation unit 82 to the motion prediction / compensation unit 75 according to the determination result in step S72. Note that the processing in steps S81 and S82 is the same as the processing in steps S75 and S76.
  • step S83 the adjacent pixel prediction unit 83 determines whether the processing for all intra prediction modes has been completed. If it is determined that the processing has not ended, the neighboring pixel prediction unit 83 returns to step S79 and repeats the subsequent processing.
  • step S83 If it is determined in step S83 that the processing for all intra prediction modes has been completed, the processing proceeds to step S84.
  • step S84 the motion prediction / compensation unit 75 compares the secondary residuals of the respective intra prediction modes from the secondary prediction unit 76, and the secondary residual intra that is considered to have the best coding efficiency among them.
  • the prediction mode is determined as the intra prediction mode of the target block. That is, the intra prediction mode having the smallest secondary residual value is determined as the intra prediction mode of the target block.
  • the motion prediction / compensation unit 75 further compares the secondary residual and the primary residual in the determined intra prediction mode, and determines whether or not to use secondary prediction. That is, when it is determined that the secondary residual is more efficient in encoding, it is determined to use secondary prediction, and the difference between the interpolated image and the secondary residual becomes a candidate for inter prediction as a predicted image. . If it is determined that the primary residual has better encoding efficiency, it is determined that secondary prediction is not used, and the prediction image obtained in step S73 or S78 is a candidate for inter prediction.
  • the secondary residual is encoded and sent to the decoding side only when the secondary residual gives higher encoding efficiency than the primary residual.
  • step S85 the values of the residuals themselves are compared, and a value with a small value may be determined as having good coding efficiency, or the cost function represented by the above formula (71) or formula (72). You may make it determine a thing with favorable encoding efficiency by calculating a value.
  • step S71 determines whether the motion vector information has decimal pixel accuracy both horizontally and vertically. If it is determined in step S71 that the motion vector information has decimal pixel accuracy both horizontally and vertically, the determination result is output to the switch 84, and the process proceeds to step S86.
  • step S86 the motion prediction / compensation unit 75 converts the reference image into the reference image based on the motion vector determined in step S51 of FIG. 25 for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Perform motion prediction and compensation processing. By this motion prediction and compensation processing, a prediction image in each inter prediction mode is generated and becomes a candidate for inter prediction.
  • the intra prediction mode is DC In the prediction mode, it is possible to perform secondary prediction.
  • the secondary prediction is not performed when the accuracy of the motion vector information is decimal pixel accuracy, it is possible to suppress a decrease in encoding efficiency due to the secondary prediction.
  • the encoded compressed image is transmitted via a predetermined transmission path and decoded by an image decoding device.
  • FIG. 27 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 secondary prediction unit 123, and the switch 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. 2 by a method corresponding to the encoding method of the lossless encoding unit 66.
  • the inverse quantization unit 113 inversely quantizes the image decoded by the lossless decoding unit 112 by a method corresponding to the quantization method of the quantization unit 65 of FIG.
  • 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 inverse orthogonal transform is added to the prediction image supplied from the switch 124 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. 2 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 the inter-processed image and the referenced 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 information indicating the intra prediction mode obtained by decoding the header information is supplied from the lossless decoding unit 112 to the intra prediction unit 121.
  • the intra prediction unit 121 generates a prediction image based on this information, and outputs the generated prediction image to the switch 124.
  • the motion prediction / compensation unit 122 is supplied with prediction mode information, motion vector information, reference frame information, and the like from the lossless decoding unit 112.
  • the motion prediction / compensation unit 122 determines whether or not the motion vector information has integer pixel accuracy.
  • the motion prediction / compensation unit 122 has a secondary prediction flag indicating that the secondary prediction is performed, and an intra prediction mode in the secondary prediction.
  • Information is also supplied from the lossless decoding unit 122.
  • the motion prediction / compensation unit 122 further refers to the secondary prediction flag from the lossless decoding unit 112 and determines whether the secondary prediction process is applied. . When determining that the secondary prediction process is applied, the motion prediction / compensation unit 122 controls the secondary prediction unit 123 to perform the secondary prediction in the intra prediction mode indicated by the intra prediction mode information in the secondary prediction. Let it be done.
  • 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 adds the generated prediction image and the prediction difference value from the secondary prediction unit 123, and outputs it to the switch 124.
  • the motion prediction / compensation unit 122 performs motion prediction and compensation on the image based on the motion vector information and the reference frame information. Processing is performed to generate a predicted image.
  • the motion prediction / compensation unit 122 outputs the prediction image generated in the inter prediction mode to the switch 124.
  • the secondary prediction unit 123 performs secondary prediction using the difference between the target adjacent pixel and the reference adjacent pixel read from the frame memory 119. That is, the secondary prediction unit 123 acquires information on the intra prediction mode in the secondary prediction supplied from the lossless decoding unit 112, performs intra prediction on the target block in the intra prediction mode indicated by the information, and performs the intra prediction image. Is generated. The generated intra prediction image is output to the motion prediction / compensation unit 122 as a prediction difference value.
  • the switch 124 selects the prediction image (or the prediction image and the prediction difference value) 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.
  • FIG. 28 is a block diagram illustrating a detailed configuration example of the secondary prediction unit.
  • the secondary prediction unit 123 includes an adjacent pixel buffer 141 for the target block, an adjacent pixel buffer 142 for the reference block, an adjacent pixel difference calculation unit 143, and a prediction difference value generation unit 144.
  • the motion prediction / compensation unit 122 supplies the target block information (address) to the adjacent pixel buffer 141 for the target block, and the reference block information (address) as the reference block.
  • the adjacent pixel buffer 142 The information supplied to the adjacent pixel buffer 142 for the reference block may be information on the target block and motion vector information.
  • adjacent pixels for the target block are read from the frame memory 119 and stored in correspondence with the address of the target block.
  • adjacent pixels for the reference block are read from the frame memory 119 and stored in correspondence with the address of the reference block.
  • the adjacent pixel difference calculation unit 143 reads adjacent pixels for the target block from the adjacent pixel buffer 141 for the target block. Also, the adjacent pixel difference calculation unit 143 reads out adjacent pixels for the reference block associated with the target block by a motion vector from the adjacent pixel buffer 142 for the reference block. The adjacent pixel difference calculation unit 143 accumulates an adjacent pixel difference value that is a difference between an adjacent pixel for the target block and an adjacent pixel for the reference block in a built-in buffer (not shown).
  • the prediction difference value generation unit 144 is an intra prediction mode in the secondary prediction acquired from the lossless decoding unit 112, and uses the adjacent pixel difference value accumulated in the built-in buffer of the adjacent pixel difference calculation unit 143 as secondary prediction. Intra prediction is performed to generate a prediction difference value.
  • the prediction difference value generation unit 144 outputs the generated prediction difference value to the motion prediction / compensation unit 122.
  • circuit that performs intra prediction as the secondary prediction in the prediction difference value generation unit 144 in the example of FIG. 28 can share the circuit with the intra prediction unit 121.
  • the motion prediction / compensation unit 122 acquires motion vector information regarding the target block. When this value has decimal pixel accuracy, secondary prediction is not performed on the target block, and normal inter prediction processing is performed.
  • the image decoding apparatus 101 performs an inter prediction process based on the secondary prediction.
  • the image decoding apparatus 101 Inter prediction processing is performed.
  • the pixel value [A] of the target block, the pixel value [A ′] of the reference block, the adjacent pixel value [B] of the target block, and the adjacent pixel value [B ′] of the reference block are used.
  • mode is one of nine types of intra prediction modes and a value generated by intra prediction is expressed as Ipred (X) [mode]
  • the image encoding device 51 encodes the mode.
  • the prediction difference value Ipred (B ⁇ B ′) [mode] is generated in the secondary prediction unit 123 and output to the motion prediction / compensation unit 122. Further, the pixel value [A ′] of the reference block is generated in the motion prediction / compensation unit 122. These are output to the calculation unit 115 and added to the secondary residual [Res]. As a result, as shown in the equation (74), the pixel value [A] of the target block is obtained.
  • step S131 the storage buffer 111 stores the transmitted image.
  • step S132 the lossless decoding unit 112 decodes the compressed image supplied from the accumulation buffer 111. That is, the I picture, P picture, and B picture encoded by the lossless encoding unit 66 in FIG. 2 are decoded.
  • motion vector information reference frame information
  • prediction mode information prediction mode information
  • secondary prediction flag information indicating the intra prediction mode in the secondary prediction, and the like are also decoded.
  • the prediction mode information is intra prediction mode information
  • the prediction mode information is supplied to the intra prediction unit 121.
  • the prediction mode information is inter prediction mode information
  • motion vector information and reference frame information corresponding to the prediction mode information are supplied to the motion prediction / compensation unit 122.
  • the secondary prediction flag is supplied to the motion prediction / compensation unit 122, and information indicating the intra prediction mode in the secondary prediction is the secondary prediction. Supplied to the unit 123.
  • 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. 2 (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 124 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 performs an intra prediction process in the intra prediction mode.
  • the motion prediction / compensation unit 122 performs a motion prediction / compensation process in the inter prediction mode.
  • the motion prediction / compensation unit 122 performs inter prediction processing based on secondary prediction or normal inter prediction processing with reference to the accuracy of the motion vector information and the secondary prediction flag.
  • step S138 the prediction image generated by the intra prediction unit 121 or the prediction image (or the prediction image and the prediction difference value) generated by the motion prediction / compensation unit 122 is supplied to the switch 124.
  • step S139 the switch 124 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.
  • step S171 the intra prediction unit 121 determines whether the target block is intra-coded.
  • the intra prediction unit 121 determines in step 171 that the target block is intra-coded, and the process proceeds to step S172. .
  • the intra prediction unit 121 acquires the intra prediction mode information 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 acquired in step S172, and generates a predicted image.
  • the generated prediction image is output to the switch 124.
  • step S171 determines whether the intra encoding has been performed. If it is determined in step S171 that the intra encoding has not been performed, the process proceeds to step S174.
  • step S174 the motion prediction / compensation unit 122 acquires the prediction mode information from the lossless decoding unit 112 and the like.
  • the inter prediction mode information, the reference frame information, and the motion vector information are supplied from the lossless decoding unit 112 to the motion prediction / compensation unit 122.
  • the motion prediction / compensation unit 122 acquires inter prediction mode information, reference frame information, and motion vector information.
  • the motion prediction / compensation unit 122 refers to the acquired motion vector information, and determines in step S175 whether the motion vector information for the target block has integer pixel accuracy. In this case, if the motion vector information in one of the horizontal and vertical directions is integer pixel accuracy, it is determined in step S175 that the pixel accuracy is integer pixel accuracy.
  • step S175 If it is determined in step S175 that the motion vector information for the target block is not integer pixel accuracy, that is, both horizontal and vertical motion vector information is determined to be decimal pixel accuracy, and the process The process proceeds to S176.
  • step S176 the motion prediction / compensation unit 122 performs normal inter prediction. That is, when the processing target image 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 122 via the switch 170. In step S176, the motion prediction / compensation unit 122 performs motion prediction in the inter prediction mode based on the motion vector acquired in step S174, and generates a predicted image. The generated prediction image is output to the switch 124.
  • step S175 If it is determined in step S175 that the motion vector information for the target block has integer pixel precision, the process proceeds to step S177.
  • the secondary prediction flag is supplied to the motion prediction / compensation unit 122, and information indicating the intra prediction mode in the secondary prediction is supplied to the secondary prediction unit 123. .
  • step S177 the motion prediction / compensation unit 122 acquires the secondary prediction flag supplied from the lossless decoding unit 112, and in step S178, determines whether the secondary prediction processing is applied to the target block. To do.
  • Step S178 when it is determined that the secondary prediction process is not applied to the target block, the process proceeds to Step S176, and a normal inter prediction process is performed.
  • Step S178 when it is determined that the secondary prediction process is applied to the target block, the process proceeds to step S179.
  • step S179 the motion prediction / compensation unit 122 causes the secondary prediction unit 123 to acquire information indicating the intra prediction mode in the secondary prediction supplied from the lossless decoding unit 112.
  • the secondary prediction unit 123 performs a secondary inter prediction process as an inter prediction process based on the secondary prediction in step S180. This secondary inter prediction process will be described later with reference to FIG.
  • step S180 inter prediction is performed to generate a prediction image, and secondary prediction is performed to generate prediction difference values, which are added and output to the switch 124.
  • step S180 in FIG. 30 will be described with reference to the flowchart in FIG.
  • step S191 the motion prediction / compensation unit 122 performs motion prediction in the inter prediction mode based on the motion vector acquired in step S174 of FIG. 30, and generates a predicted image.
  • the motion prediction / compensation unit 122 supplies the address of the target block to the adjacent pixel buffer 141 for the target block, and supplies the address of the reference block to the adjacent pixel buffer 142 for the reference block.
  • adjacent pixels for the target block are read from the frame memory 119 and stored in correspondence with the address of the target block.
  • adjacent pixel buffer 142 for the reference block adjacent pixels for the reference block are read from the frame memory 119 and stored in correspondence with the address of the reference block.
  • the adjacent pixel difference calculation unit 143 reads adjacent pixels for the target block from the adjacent pixel buffer 141 for the target block, and reads adjacent pixels for the reference block corresponding to the target block from the adjacent pixel buffer 142 for the reference block. In step S192, the adjacent pixel difference calculation unit 143 calculates an adjacent pixel difference value that is a difference between the adjacent pixel for the target block and the adjacent pixel for the reference block, and stores the calculated value in an internal buffer.
  • step S193 the prediction difference value generation unit 144 generates a prediction difference value. That is, the prediction difference value generation unit 144 uses the adjacent pixel difference values accumulated in the buffer of the adjacent pixel difference calculation unit 143 in the intra prediction mode in the secondary prediction acquired in step S179 in FIG. To generate a prediction difference value. The generated prediction difference value is output to the motion prediction / compensation unit 122.
  • step S194 the motion prediction / compensation unit 122 adds the prediction image generated in step S191 and the prediction difference value from the prediction difference value generation unit 144, and outputs the result to the switch 124.
  • the predicted image and the predicted difference value are output as a predicted image to the calculation unit 115 by the switch 124 in step S139 in FIG. Then, the predicted image and the predicted difference value are added to the difference information from the inverse orthogonal transform unit 114 by the calculation unit 115 in step S135 of FIG. 29, so that the image of the target block is decoded.
  • the secondary prediction is not performed, so the encoding efficiency associated with the secondary prediction is improved. The decrease can be suppressed.
  • the present invention is not limited to this, and can be applied to any encoding device and decoding device that perform block-based motion prediction / compensation.
  • the present invention can also be applied to the intra 8 ⁇ 8 prediction mode, the intra 16 ⁇ 16 prediction mode, and the intra prediction mode for color difference signals.
  • the present invention relates to H.264.
  • the present invention can be applied not only to the case of performing motion prediction with 1/4 pixel accuracy as in the H.264 / AVC format, but also to the case of performing motion prediction with 1/2 pixel accuracy as in MPEG.
  • the present invention can also be applied to the case where motion prediction with 1/8 pixel accuracy is performed.
  • H.264 / AVC format is used, but other encoding / decoding methods can also be used.
  • the present invention is, for example, MPEG, H.264, When receiving image information (bitstream) compressed by orthogonal transformation such as discrete cosine transformation and motion compensation, such as 26x, via network media such as satellite broadcasting, cable television, the Internet, or mobile phones.
  • 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. 32 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.
  • the program can be received by the communication unit 309 via a wired or wireless transmission medium and installed in the storage unit 308.
  • 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

 本発明は、2次予測に伴う予測効率の低下を抑制することができるようにする画像処理装置および方法に関する。 隣接画素予測部83は、対象隣接画素と参照隣接画素の差分を用いて、対象ブロックについてイントラ予測を行い、残差信号による予測画像を生成し、2次残差生成部82に出力する。2次残差生成部82は、1次残差と残差信号による予測画像との差分である2次残差をスイッチ84に出力する。スイッチ84は、動きベクトル精度判定部77により動き予測・補償部75からの動きベクトル情報が整数画素精度であると判定された場合のみ、2次残差生成部82側の一方の端子を選択し、2次残差生成部82からの2次残差を動き予測・補償部75に出力する。本発明は、例えば、H.264/AVC方式で符号化する画像符号化装置に適用することができる。

Description

画像処理装置および方法
 本発明は画像処理装置および方法に関し、特に、2次予測に伴う予測効率の低下を抑制するようにした画像処理装置および方法に関する。
 近年、画像情報をデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮する符号化方式を採用して画像を圧縮符号する装置が普及しつつある。この符号化方式には、例えば、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) において、符号化効率の改善に関する検討が継続され行なわれている。
 例えば、MPEG2方式においては、線形内挿処理により1/2画素精度の動き予測・補償処理が行われている。一方、H.264/AVC方式においては、6タップのFIR (Finite Impulse Response Filter)フィルタを用いた1/4画素精度の予測・補償処理が行われている。
 すなわち、H.264/AVC方式においては、1/2画素精度の補間処理は6タップのFIRにより行われ、1/4画素精度の補間処理は線形補間により行われる。
 この1/4画素精度の予測・補償処理に対して、近年、H.264/AVC方式の効率をさらに向上させようという検討が行われている。このための符号化方式の1つとして、非特許文献1においては、1/8画素精度の動き予測が提案されている。
 すなわち、非特許文献1において、1/2画素精度の補間処理はフィルタ[-3,12,-39,158,158,-39,12,-3]/256により行われる。また、1/4画素精度の補間処理はフィルタ[-3,12,-37,229,71,-21,6,-1]/256により行われ、1/8画素精度の補間処理は線形補間により行われる。
 このように、より高い画素精度の補間処理を用いた動き予測を行うことにより、特に、解像度が高いテクスチャを持ち、比較的ゆっくりした動きのシーケンスにおいては、予測精度を向上させ、符号化効率の向上を実現することができる。
 ところで、また、非特許文献2においては、インター予測において、更なる符号化効率を向上させる2次予測方式が提案されている。次に、この2次予測方式について図1を参照して説明する。
 図1の例においては、対象フレームと参照フレームが示されており、対象フレームには、対象ブロックAが示されている。
 参照フレームと対象フレームにおいて対象ブロックAに対して動きベクトルmv(mv_x,mv_y)が求められた場合に、対象ブロックAと、対象ブロックAに動きベクトルmvで対応付けられるブロックの差分情報(残差)が算出される。
 2次予測方式においては、対象ブロックAに関する差分情報だけでなく、対象ブロックAに隣接する隣接画素群Rと、隣接画素群Rに動きベクトルmvで対応付けられる隣接画素群R1との差分情報も算出される。
 すなわち、対象ブロックAの左上の座標(x,y)から、隣接画素群Rの各座標が求められる。また、対象ブロックAに動きベクトルmvで対応付けられるブロックの左上の座標(x+mv_x,y+mv_y)から、隣接画素群R1の各座標が求められる。これらの座標値により、隣接画素群の差分情報が算出される。
 2次予測方式においては、このように算出された対象ブロックに関する差分情報と、隣接画素に関する差分情報との間で、H.264/AVC方式におけるイントラ予測が行われ、これにより、2次差分情報が生成される。生成された2次差分情報が直交変換、量子化され、圧縮画像とともに符号化されて、復号側に送られる。
"Motion compensated prediction with 1/8-pel displacement vector resolution",VCEG-AD09,ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group(VCEG), 23-27 Oct 2006
"Second Order Prediction (SOP) in P Slice", Sijia Chen , JinpengWang , Shangwen Li and, Lu Yu ,VCEG-AD09,ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group(VCEG), 16-18 July 2008
 しかしながら、図1を参照して上述した2次予測方法を適用する場合に、動きベクトル情報が小数画素精度を持つと、隣接画素群の画素値に対しても線形補間が施されてしまう。このため、2次予測に関する精度が低下してしまう。
 本発明は、このような状況に鑑みてなされたものであり、2次予測に伴う予測効率の低下を抑制するものである。
 本発明の第1の側面の画像処理装置は、対象フレームにおける対象ブロックの動きベクトル情報の精度が整数画素精度である場合、前記対象ブロックと参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックとの差分情報と、前記対象ブロックに隣接する対象隣接画素と前記参照ブロックに隣接する参照隣接画素との差分情報との間で2次予測処理を行い、2次差分情報を生成する2次予測手段と、前記2次予測手段により生成された前記2次差分情報を符号化する符号化手段とを備える。
 前記対象画像差分情報の符号化と前記2次予測手段により生成された前記2次差分情報の符号化とのうちどちらが符号化効率がよいかを判定する符号化効率判定手段をさらに備え、前記符号化手段は、前記符号化効率判定手段により前記2次差分情報の符号化が符号化効率がよいと判定された場合のみ、前記2次予測手段により生成された2次差分情報と、前記2次予測処理を行うことを示す2次予測フラグとを符号化することができる。
 前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向の精度が小数画素精度である場合かつ前記2次予測処理におけるイントラ予測モードが垂直予測モードである場合、前記2次予測処理を行うことができる。
 前記2次予測手段は、前記対象ブロックの動きベクトル情報の水平方向の精度が小数画素精度である場合かつ前記2次予測処理におけるイントラ予測モードが水平予測モードである場合、前記2次予測処理を行うことができる。
 前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向および水平方向の少なくとも一方の精度が小数画素精度である場合かつ前記2次予測処理におけるイントラ予測モードがDC予測モードである場合、前記2次予測処理を行うことができる。
 前記2次予測手段は、前記対象隣接画素と前記参照隣接画素との差分情報を用いて予測を行い、前記対象ブロックに対するイントラ予測画像を生成する隣接画素予測手段と、前記対象ブロックと前記参照ブロックとの差分情報と前記隣接画素予測手段により生成された前記イントラ予測画像とを差分して、前記2次差分情報を生成する2次差分生成手段とを備えることができる。
 本発明の第1の側面の画像処理方法は、画像処理装置が、対象フレームにおける対象ブロックの動きベクトル情報の精度が整数画素精度である場合、前記対象ブロックと参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックとの差分情報と、前記対象ブロックに隣接する対象隣接画素と前記参照ブロックに隣接する参照隣接画素との差分情報との間で2次予測処理を行い、2次差分情報を生成し、前記2次予測処理により生成された前記2次差分情報を符号化するステップを含む。
 本発明の第2の側面の画像処理装置は、符号化された対象フレームにおける対象ブロックの画像と、参照フレームにおいて前記対象ブロックについて検出された動きベクトル情報とを復号する復号手段と、前記復号手段により復号された前記動きベクトル情報が整数画素精度である場合、前記対象ブロックに隣接する対象隣接画素と、前記参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素との差分情報を用いて2次予測処理を行い、予測画像を生成する2次予測手段と、前記対象ブロックの画像、前記2次予測手段により生成された前記予測画像と、前記動きベクトル情報から求められる前記参照ブロックの画像とを加算して、前記対象ブロックの復号画像を生成する演算手段とを備える。
 前記2次予測手段は、前記復号手段により復号される前記2次予測処理を行うことを示す2次予測フラグを取得し、前記2次予測フラグに応じて、前記2次予測処理を行うことができる。
 前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向の精度が小数画素精度である場合かつ前記復号手段により復号される前記2次予測処理におけるイントラ予測モードが垂直予測モードである場合、前記2次予測フラグに応じて、前記2次予測処理を行うことができる。
 前記2次予測手段は、前記対象ブロックの動きベクトル情報の水平方向の精度が小数画素精度である場合かつ前記復号手段により復号される前記2次予測処理におけるイントラ予測モードが水平予測モードである場合、前記2次予測フラグに応じて、前記2次予測処理を行うことができる。
 前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向および水平方向の少なくとも一方の精度が小数画素精度である場合かつ前記復号手段により復号される前記2次予測処理におけるイントラ予測モードがDC予測モードである場合、前記2次予測フラグに応じて、前記2次予測処理を行うことができる。
 本発明の第2の側面の画像処理方法は、画像処理装置が、符号化された対象フレームにおける対象ブロックの画像と、参照フレームにおいて前記対象ブロックについて検出された動きベクトル情報とを復号し、復号された前記動きベクトル情報が整数画素精度である場合、前記対象ブロックに隣接する対象隣接画素と、前記参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素との差分情報を用いて2次予測処理を行い、予測画像を生成し、前記対象ブロックの画像、生成された前記予測画像と、前記動きベクトル情報から求められる前記参照ブロックの画像とを加算して、前記対象ブロックの復号画像を生成するステップを含む。
 本発明の第1の側面においては、対象フレームにおける対象ブロックの動きベクトル情報の精度が整数画素精度である場合、前記対象ブロックと参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックとの差分情報と、前記対象ブロックに隣接する対象隣接画素と前記参照ブロックに隣接する参照隣接画素との差分情報との間で2次予測処理が行われ、2次差分情報が生成される。そして、前記2次予測処理により生成された前記2次差分情報が符号化される。
 本発明の第2の側面においては、符号化された対象フレームにおける対象ブロックの画像と、参照フレームにおいて前記対象ブロックについて検出された動きベクトル情報とが復号され、復号された前記動きベクトル情報が整数画素精度である場合、前記対象ブロックに隣接する対象隣接画素と、前記参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素との差分情報が用いられて2次予測処理が行われ、予測画像が生成される。そして、前記対象ブロックの画像、生成された前記予測画像と、前記動きベクトル情報から求められる前記参照ブロックの画像とが加算されて、前記対象ブロックの復号画像が生成される。
 なお、上述の画像処理装置のそれぞれは、独立した装置であっても良いし、1つの画像符号化装置または画像復号装置を構成している内部ブロックであってもよい。
 本発明の第1の側面によれば、画像を符号化することができる。また、本発明の第1の側面によれば、2次予測に伴う予測効率の低下を抑制することができる。
 本発明の第2の側面によれば、画像を復号することができる。また、本発明の第2の側面によれば、2次予測に伴う予測効率の低下を抑制することができる。
インター予測における2次予測方式を説明する図である。 本発明を適用した画像符号化装置の一実施の形態の構成を示すブロック図である。 可変ブロックサイズ動き予測・補償処理を説明する図である。 1/4画素精度の動き予測・補償処理を説明する図である。 マルチ参照フレームの動き予測・補償方式について説明する図である。 動きベクトル情報の生成方法の例を説明する図である。 図2の2次予測部の構成例を示すブロック図である。 2次予測の場合における小数画素精度の動きベクトルによる予測効率の低下を説明する図である。 2次予測の場合における小数画素精度の動きベクトルによる予測効率の低下を説明する図である。 図2の画像符号化装置の符号化処理を説明するフローチャートである。 図10のステップS21の予測処理を説明するフローチャートである。 16×16画素のイントラ予測モードの場合の処理順序を説明する図である。 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。 4×4画素のイントラ予測の方向を説明する図である。 4×4画素のイントラ予測を説明する図である。 輝度信号の4×4画素のイントラ予測モードの符号化を説明する図である。 輝度信号の8×8画素のイントラ予測モードの種類を示す図である。 輝度信号の8×8画素のイントラ予測モードの種類を示す図である。 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。 16×16画素のイントラ予測を説明する図である。 色差信号のイントラ予測モードの種類を示す図である。 図11のステップS31のイントラ予測処理を説明するフローチャートである。 図11のステップS32のインター動き予測処理を説明するフローチャートである。 図25のステップS52の動き予測・補償処理を説明するフローチャートである。 本発明を適用した画像復号装置の一実施の形態の構成を示すブロック図である。 図27の2次予測部の構成例を示すブロック図である。 図27の画像復号装置の復号処理を説明するフローチャートである。 図29のステップS138の予測処理を説明するフローチャートである。 図30のステップS180の2次インター予測処理を説明するフローチャートである。 コンピュータのハードウエアの構成例を示すブロック図である。
 以下、図を参照して本発明の実施の形態について説明する。
[画像符号化装置の構成例]
 図2は、本発明を適用した画像処理装置としての画像符号化装置の一実施の形態の構成を表している。
 この画像符号化装置51は、例えば、H.264及びMPEG-4 Part10(Advanced Video Coding)(以下H.264/AVCと記す)方式で画像を圧縮符号化する。
 図2の例において、画像符号化装置51は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部75、2次予測部76、動きベクトル精度判定部77、予測画像選択部78、およびレート制御部79により構成されている。
 A/D変換部61は、入力された画像をA/D変換し、画面並べ替えバッファ62に出力し、記憶させる。画面並べ替えバッファ62は、記憶した表示の順番のフレームの画像を、GOP(Group of Picture)に応じて、符号化のためのフレームの順番に並べ替える。
 演算部63は、画面並べ替えバッファ62から読み出された画像から、予測画像選択部78により選択されたイントラ予測部74からの予測画像または動き予測・補償部75からの予測画像を減算し、その差分情報を直交変換部64に出力する。直交変換部64は、演算部63からの差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施し、その変換係数を出力する。量子化部65は直交変換部64が出力する変換係数を量子化する。
 量子化部65の出力となる、量子化された変換係数は、可逆符号化部66に入力され、ここで可変長符号化、算術符号化等の可逆符号化が施され、圧縮される。
 可逆符号化部66は、イントラ予測を示す情報をイントラ予測部74から取得し、インター予測モードを示す情報などを動き予測・補償部75から取得する。なお、イントラ予測を示す情報およびインター予測を示す情報は、以下、それぞれ、イントラ予測モード情報およびインター予測モード情報とも称する。
 可逆符号化部66は、量子化された変換係数を符号化するとともに、イントラ予測を示す情報、インター予測モードを示す情報などを符号化し、圧縮画像におけるヘッダ情報の一部とする。可逆符号化部66は、符号化したデータを蓄積バッファ67に供給して蓄積させる。
 例えば、可逆符号化部66においては、可変長符号化または算術符号化等の可逆符号化処理が行われる。可変長符号化としては、H.264/AVC方式で定められているCAVLC(Context-Adaptive Variable Length Coding)などがあげられる。算術符号化としては、CABAC(Context-Adaptive Binary Arithmetic Coding)などがあげられる。
 蓄積バッファ67は、可逆符号化部66から供給されたデータを、H.264/AVC方式で符号化された圧縮画像として、例えば、後段の図示せぬ記録装置や伝送路などに出力する。
 また、量子化部65より出力された、量子化された変換係数は、逆量子化部68にも入力され、逆量子化された後、さらに逆直交変換部69において逆直交変換される。逆直交変換された出力は演算部70により予測画像選択部78から供給される予測画像と加算されて、局部的に復号された画像となる。デブロックフィルタ71は、復号された画像のブロック歪を除去した後、フレームメモリ72に供給し、蓄積させる。フレームメモリ72には、デブロックフィルタ71によりデブロックフィルタ処理される前の画像も供給され、蓄積される。
 スイッチ73はフレームメモリ72に蓄積された参照画像を動き予測・補償部75またはイントラ予測部74に出力する。
 この画像符号化装置51においては、例えば、画面並べ替えバッファ62からのIピクチャ、Bピクチャ、およびPピクチャが、イントラ予測(イントラ処理とも称する)する画像として、イントラ予測部74に供給される。また、画面並べ替えバッファ62から読み出されたBピクチャおよびPピクチャが、インター予測(インター処理とも称する)する画像として、動き予測・補償部75に供給される。
 イントラ予測部74は、画面並べ替えバッファ62から読み出されたイントラ予測する画像とフレームメモリ72から供給された参照画像に基づいて、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。
 その際、イントラ予測部74は、候補となる全てのイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして選択する。
 イントラ予測部74は、最適イントラ予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部78に供給する。イントラ予測部74は、予測画像選択部78により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報を、可逆符号化部66に供給する。可逆符号化部66は、この情報を符号化し、圧縮画像におけるヘッダ情報の一部とする。
 動き予測・補償部75は、候補となる全てのインター予測モードの動き予測・補償処理を行う。すなわち、動き予測・補償部75には、画面並べ替えバッファ62から読み出されたインター処理する画像と、スイッチ73を介してフレームメモリ72から参照画像が供給される。動き予測・補償部75は、インター処理する画像と参照画像に基づいて、候補となる全てのインター予測モードの動きベクトルを検出し、動きベクトルに基づいて参照画像に補償処理を施し、予測画像を生成する。
 動き予測・補償部75は、検出された動きベクトル情報、インター処理する画像の情報(アドレスなど)、およびインター処理する画像と生成された予測画像の差分である1次残差を、2次予測部76に供給する。また、動き予測・補償部75は、検出された動きベクトル情報を、動きベクトル精度判定部77にも供給する。
 2次予測部76は、動き予測・補償部75からの動きベクトル情報とインター処理する画像の情報に基づいて、インター処理する対象の対象ブロックに隣接する対象隣接画素をフレームメモリ72から読み出す。また、2次予測部76は、動きベクトル情報により対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素をフレームメモリ72から読み出す。
 2次予測部76は、参照隣接判定部77による判定結果に応じて、2次予測処理を行う。ここで、2次予測処理とは、1次残差、および対象隣接画素と参照隣接画素の差分の間で予測を行い、2次差分情報(2次残差)を生成する処理である。2次予測部76は、2次予測処理により生成した2次残差を、動き予測・補償部75に出力する。また、2次予測部76は、参照隣接判定部77による判定結果と、2次予測のイントラ予測モードの種類が特定の組み合わせの場合にも、2次予測処理を行い、2次残差を生成して、動き予測・補償部75に出力する。
 動きベクトル精度判定部77は、動き予測・補償部75からの動きベクトル情報の精度が、整数画素精度であるか、または小数画素精度であるかを判定し、その判定結果を、2次予測部76に供給する。
 動き予測・補償部75は、2次予測部76からの2次残差を比較することで、2次予測における最適なイントラ予測モードを決定する。また、動き予測・補償部75は、2次残差と1次残差を比較することで、2次予測処理を行うか否か(すなわち、2次残差を符号化するか、または1次残差を符号化するか)を決定する。なお、これらの処理は、候補となる全てのインター予測モードに対して行われる。
 そして、動き予測・補償部75は、候補となる全てのインター予測モードに対してコスト関数値を算出する。このとき、1次残差および2次残差のうち、インター予測モード毎に決定された残差が用いられて、コスト関数値が算出される。動き予測・補償部75は、算出したコスト関数値のうち、最小値を与える予測モードを、最適インター予測モードとして決定する。
 動き予測・補償部75は、最適インター予測モードで生成された予測画像(またはインターする画像と2次残差の差分)、およびそのコスト関数値を、予測画像選択部78に供給する。動き予測・補償部75は、予測画像選択部78により最適インター予測モードで生成された予測画像が選択された場合、最適インター予測モードを示す情報を可逆符号化部66に出力する。
 このとき、動きベクトル情報、参照フレーム情報、2次予測を行うことを示す2次予測フラグ、および2次予測におけるイントラ予測モードの情報なども可逆符号化部66に出力される。可逆符号化部66は、動き予測・補償部75からの情報をやはり可変長符号化、算術符号化といった可逆符号化処理し、圧縮画像のヘッダ部に挿入する。
 予測画像選択部78は、イントラ予測部74または動き予測・補償部75より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードから、最適予測モードを決定する。そして、予測画像選択部78は、決定された最適予測モードの予測画像を選択し、演算部63,70に供給する。このとき、予測画像選択部78は、予測画像の選択情報を、イントラ予測部74または動き予測・補償部75に供給する。
 レート制御部79は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部65の量子化動作のレートを制御する。
[H.264/AVC方式の説明]
 図3は、H.264/AVC方式における動き予測・補償のブロックサイズの例を示す図である。H.264/AVC方式においては、ブロックサイズを可変にして、動き予測・補償が行われる。
 図3の上段には、左から、16×16画素、16×8画素、8×16画素、および8×8画素のパーティションに分割された16×16画素で構成されるマクロブロックが順に示されている。また、図3の下段には、左から、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画素のいずれかのサブパーティションに分割し、それぞれ独立した動きベクトル情報を持つことが可能である。
 図4は、H.264/AVC方式における1/4画素精度の予測・補償処理を説明する図である。H.264/AVC方式においては、6タップのFIR (Finite Impulse Response Filter)フィルタを用いた1/4画素精度の予測・補償処理が行われている。
 図4の例において、位置Aは、整数精度画素の位置、位置b,c,dは、1/2画素精度の位置、位置e1,e2,e3は、1/4画素精度の位置を示している。まず、以下においては、Clip()を次の式(1)のように定義する。
Figure JPOXMLDOC01-appb-M000001
 なお、入力画像が8ビット精度である場合、max_pixの値は255となる。
 位置bおよびdにおける画素値は、6タップのFIRフィルタを用いて、次の式(2)のように生成される。
 
Figure JPOXMLDOC01-appb-M000002
 位置cにおける画素値は、水平方向および垂直方向に6タップのFIRフィルタを適用し、次の式(3)のように生成される。

Figure JPOXMLDOC01-appb-M000003
 なお、Clip処理は、水平方向および垂直方向の積和処理の両方を行った後、最後に1度のみ実行される。
 位置e1乃至e3は、次の式(4)のように線形内挿により生成される。

Figure JPOXMLDOC01-appb-M000004
 図5は、H.264/AVC方式におけるマルチ参照フレームの予測・補償処理を説明する図である。H.264/AVC方式においては、マルチ参照フレーム(Multi-Reference Frame) の動き予測・補償方式が定められている。
 図5の例においては、いまから符号化される対象フレームFnと、符号化済みのフレームFn-5,…,Fn-1が示されている。フレームFn-1は、時間軸上、対象フレームFnの1つ前のフレームであり、フレームFn-2は、対象フレームFnの2つ前のフレームであり、フレームFn-3は、対象フレームFnの3つ前のフレームである。また、フレームFn-4は、対象フレームFnの4つ前のフレームであり、フレームFn-5は、対象フレームFnの5つ前のフレームである。一般的には、対象フレームFnに対して時間軸上に近いフレームほど、小さい参照ピクチャ番号(ref_id)が付加される。すなわち、フレームFn-1が一番参照ピクチャ番号が小さく、以降、Fn-2,…, Fn-5の順に参照ピクチャ番号が小さい。
 対象フレームFnには、ブロックA1とブロックA2が示されており、ブロックA1は、2つ前のフレームFn-2のブロックA1’と相関があるとされて、動きベクトルV1が探索されている。また、ブロックA2は、4つ前のフレームFn-4のブロックA1’と相関があるとされて、動きベクトルV2が探索されている。
 以上のように、H.264/AVC方式においては、複数の参照フレームをメモリに格納しておき、1枚のフレーム(ピクチャ)において、異なる参照フレームを参照することが可能である。すなわち、例えば、ブロックA1がフレームFn-2を参照し、ブロックA2がフレームFn-4を参照しているというように、1枚のピクチャにおいて、ブロック毎にそれぞれ独立した参照フレーム情報(参照ピクチャ番号(ref_id))を持つことができる。
 ここで、ブロックとは、図3を参照して上述した16×16画素、16×8画素、8×16画素、および8×8画素のパーティションのいずれかを示す。8×8サブブロック内における参照フレームは同一でなければならない。
 H.264/AVC方式においては、図3乃至図5を参照して上述した動き予測・補償処理が行われることにより、膨大な動きベクトル情報が生成され、これをこのまま符号化することは、符号化効率の低下を招いてしまう。これに対して、H.264/AVC方式においては、図6に示す方法により、動きベクトルの符号化情報の低減が実現されている。
 図6は、H.264/AVC方式による動きベクトル情報の生成方法について説明する図である。
 図6の例において、これから符号化される対象ブロックE(例えば、16×16画素)と、既に符号化済みであり、対象ブロックEに隣接するブロックA乃至Dが示されている。
 すなわち、ブロックDは、対象ブロックEの左上に隣接しており、ブロックBは、対象ブロックEの上に隣接しており、ブロックCは、対象ブロックEの右上に隣接しており、ブロックAは、対象ブロックEの左に隣接している。なお、ブロックA乃至Dが区切られていないのは、それぞれ、図3で上述した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を、圧縮画像のヘッダ部に付加することにより、動きベクトル情報を低減することができる。
[2次予測部の構成例]
 図7は、2次予測部の詳細な構成例を示すブロック図である。
 図7の例においては、2次予測部76は、1次残差バッファ81、2次残差生成部82、隣接画素予測部83、およびスイッチ84により構成される。
 1次残差バッファ81は、動き予測・補償部75からのインター処理する画像と生成された予測画像の差分である1次残差を蓄積する。
 2次残差生成部82は、隣接画素予測部83から、差分によるイントラ予測画像(すなわち、残差信号の予測画像)が入力されると、それに対応する1次残差を、1次残差バッファ81から読み出す。2次残差生成部82は、1次残差と残差信号の予測画像との差分である2次残差を生成し、生成した2次残差を、スイッチ84に出力する。
 隣接画素予測部83には、動き予測・補償部75から、検出された動きベクトル情報、インター処理する画像の情報(アドレス)が入力される。隣接画素予測部83は、動き予測・補償部75からの動きベクトル情報と、符号化対象の対象ブロックの情報(アドレス)に基づいて、対象ブロックに隣接する対象隣接画素をフレームメモリ72から読み出す。また、隣接画素予測部83は、対象ブロックに動きベクトル情報で対応付けられる参照ブロックに隣接する参照隣接画素をフレームメモリ72から読み出す。隣接画素予測部83は、対象隣接画素と参照隣接画素の差分を用いて、対象ブロックについてイントラ予測を行い、差分によるイントラ画像を生成する。生成された差分によるイントラ画像(残差信号の予測画像)は、2次残差生成部82に出力される。
 スイッチ84は、動きベクトル精度判定部77により動き予測・補償部75からの動きベクトル情報が整数画素精度であると判定された場合、2次残差生成部82側の一方の端子を選択し、2次残差生成部82からの2次残差を動き予測・補償部75に出力する。
 一方、スイッチ84は、動きベクトル精度判定部77により動き予測・補償部75からの動きベクトル情報が小数画素精度であると判定された場合、2次残差生成部82側ではない他方の端子を選択し、何も出力しない。
 このように、図7の2次予測部76においては、動きベクトル情報が小数画素精度であると判定された場合、予測効率が低下するとして、2次残差が選択されない、すなわち、2次予測が行われない。
 なお、図7の例の隣接画素予測部83におけるイントラ予測を行う回路は、イントラ予測部74との回路を共用することが可能である。
[小数画素精度の動きベクトルによる予測効率の低下の説明]
 次に、図8および図9を参照して、2次予測の場合における小数画素精度の動きベクトルによる予測効率の低下について説明する。
 図8および図9の例においては、垂直予測(Vertical Prediction)の例として、4×4画素で構成される対象ブロックEと、対象ブロックEの上部に隣接する隣接画素A,B,C,Dが示されている。
 対象ブロックEに対して、イントラ予測モードのうち、垂直予測モードが選択されるのは、隣接画素A,B,C,Dが高域成分を有し、対象ブロックEにおいても、矢印Hに示される水平方向に高域成分が含まれている場合である。すなわち、この高周波成分を保存するために、垂直予測モードが選択される。その結果、垂直予測モードのイントラ予測により、水平方向の高周波成分が保存されるので、より高い予測効率が実現される。
 しかしながら、動きベクトル情報が小数画素精度を持つ場合、隣接画素群の画素値に対しても線形補間が施されてしまう。すなわち、非特許文献2に記載の2次予測が行われた場合、図1に示された参照フレームにおいては、参照ブロックのみならず、その隣接画素群に対しても1/4画素精度の内挿処理が施され、矢印Hに示される水平方向の高域成分が失われてしまう。このため、隣接ブロックには、水平方向に高域成分が含まれないが、対象ブロックEには高域成分が含まれるというミスマッチが生じてしまい、その結果、予測効率の低下を招いてしまう。
 そこで、2次予測部76においては、動きベクトル情報が整数画素精度であると判定された場合のみ、2次予測が行われる(すなわち、2次残差が選ばれる)。これにより、2次予測に伴う予測効率の低下を引き起こすことが抑制される。
 また、非特許文献2に記載の方法の場合、動き予測ブロック毎に2次予測を行う、行わないに関するフラグを圧縮画像とともに復号側に送る必要がある。これに対して、図2の画像符号化装置51によれば、動きベクトル情報が小数画素精度である場合には、そのフラグを復号側に送る必要がない。したがって、より高い符号化効率を達成することができる。
 なお、上記説明においては、動きベクトル情報の精度に応じて、2次予測を行う例を説明したが、以下に説明するように、動きベクトル情報の精度とイントラ予測モードの種類の組み合わせに応じて2次予測を行うようにすることもできる。なお、4×4画素のイントラ予測モードについての詳細は、図13および図14で後述される。
 図9に示されるように、水平方向の動きベクトル情報が小数画素精度を持つ場合、矢印Hに示される水平方向の内挿処理により、画素の水平方向の高域成分が失われる。一方、垂直方向の動きベクトル情報が小数画素精度を持つ場合、矢印Vに示される垂直方向の内挿処理では、画素の水平方向の高域成分が失われない。
 したがって、垂直予測モード(モード0:Vertical Prediction mode)に関しては、矢印Hに示される水平方向には高域成分が必要であるので、水平方向に整数画素精度の動きベクトル情報を持っている必要がある。これに対して、矢印Vに示される垂直方向に小数画素精度の動きベクトル情報を持っていたとしても、水平方向の高域成分は失われない。すなわち、垂直予測モードに関しては、水平方向に整数画素精度の動きベクトル情報を持っていれば、垂直方向の動きベクトルが小数精度であったとしても、2次予測を行うことができる。
 また、水平予測モード(モード1:horizontal Prediction mode)に関しては、矢印Vに示される垂直方向には高域成分が必要であるので、垂直方向に整数画素精度の動きベクトル情報を持っている必要がある。これに対して、矢印Hに示される水平方向に小数画素精度の動きベクトル情報を持っていたとしても、垂直方向の高域成分は失われない。すなわち、水平予測モードに関しては、垂直方向に整数画素精度の動きベクトル情報を持っていれば、水平方向の動きベクトルが小数画素精度であったとしても、2次予測を行うことができる。
 さらに、DC予測モード(モード2:DC Prediction mode)に関しては、予測方法自体が隣接画素値の平均値を求める予測方法であり、予測方法自体により隣接画素の持つ高域成分が失われている。したがって、DC予測モードに関しては、矢印Hに示される水平方向、および矢印Vに示される垂直方向の少なくとも一方の動きベクトル情報が、小数画素精度であったとしても、2次予測を行うことができる。
[画像符号化装置の符号化処理の説明]
 次に、図10のフローチャートを参照して、図2の画像符号化装置51の符号化処理について説明する。
 ステップS11において、A/D変換部61は入力された画像をA/D変換する。ステップS12において、画面並べ替えバッファ62は、A/D変換部61より供給された画像を記憶し、各ピクチャの表示する順番から符号化する順番への並べ替えを行う。
 ステップS13において、演算部63は、ステップS12で並び替えられた画像と予測画像との差分を演算する。予測画像は、インター予測する場合は動き予測・補償部75から、イントラ予測する場合はイントラ予測部74から、それぞれ予測画像選択部78を介して演算部63に供給される。
 差分データは元の画像データに較べてデータ量が小さくなっている。したがって、画像をそのまま符号化する場合に較べて、データ量を圧縮することができる。
 ステップS14において、直交変換部64は演算部63から供給された差分情報を直交変換する。具体的には、離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数が出力される。ステップS15において、量子化部65は変換係数を量子化する。この量子化に際しては、後述するステップS25の処理で説明されるように、レートが制御される。
 以上のようにして量子化された差分情報は、次のようにして局部的に復号される。すなわち、ステップS16において、逆量子化部68は量子化部65により量子化された変換係数を量子化部65の特性に対応する特性で逆量子化する。ステップS17において、逆直交変換部69は逆量子化部68により逆量子化された変換係数を直交変換部64の特性に対応する特性で逆直交変換する。
 ステップS18において、演算部70は、予測画像選択部78を介して入力される予測画像を局部的に復号された差分情報に加算し、局部的に復号された画像(演算部63への入力に対応する画像)を生成する。ステップS19においてデブロックフィルタ71は、演算部70より出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS20においてフレームメモリ72は、フィルタリングされた画像を記憶する。なお、フレームメモリ72にはデブロックフィルタ71によりフィルタ処理されていない画像も演算部70から供給され、記憶される。
 ステップS21において、イントラ予測部74および動き予測・補償部75は、それぞれ画像の予測処理を行う。すなわち、ステップS21において、イントラ予測部74は、イントラ予測モードのイントラ予測処理を行う。動き予測・補償部75は、インター予測モードの動き予測・補償処理を行う。
 このとき、動きベクトル精度判定部77により、対象ブロックの動きベクトル情報の精度が整数画素精度であるか小数画素精度であるかが判定され、2次予測部76により、その判定結果に応じて、2次予測が行われて、2次残差が生成される。そして、動き予測・補償部75において、1次残差と2次残差のうち、符号化効率がよい残差が決定される。
 なお、2次予測が行われた場合には、2次予測を行うことを示す2次予測フラグや2次予測におけるイントラ予測モードを示す情報を復号側に送る必要がある。これらの情報は、後述するステップS22において最適インター予測モードの予測画像が選択された場合に、最適インター予測モード情報などとともに、可逆符号化部66に供給される。
 ステップS21における予測処理の詳細は、図11を参照して後述するが、この処理により、候補となる全てのイントラ予測モードでの予測処理がそれぞれ行われ、候補となる全てのイントラ予測モードでのコスト関数値がそれぞれ算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードが選択され、最適イントラ予測モードのイントラ予測により生成された予測画像とそのコスト関数値が予測画像選択部78に供給される。
 また、この処理により、候補となる全てのインター予測モードでの予測処理がそれぞれ行われ、決定された残差が用いられて、候補となる全てのインター予測モードでのコスト関数値がそれぞれ算出される。算出されたコスト関数値に基づいて、インター予測モードの中から、最適インター予測モードが決定され、最適インター予測モードで生成された予測画像とそのコスト関数値が、予測画像選択部78に供給される。なお、最適インター予測モードについて、2次予測が行われた場合には、予測画像として、インターする画像と2次残差の差分が予測画像選択部78に供給される。
 ステップS22において、予測画像選択部78は、イントラ予測部74および動き予測・補償部75より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードのうちの一方を、最適予測モードに決定する。そして、予測画像選択部78は、決定した最適予測モードの予測画像を選択し、演算部63,70に供給する。この予測画像(2次予測が行われた場合、インターする画像と2次差分情報との差分)が、上述したように、ステップS13,S18の演算に利用される。
 なお、この予測画像の選択情報は、イントラ予測部74または動き予測・補償部75に供給される。最適イントラ予測モードの予測画像が選択された場合、イントラ予測部74は、最適イントラ予測モードを示す情報(すなわち、イントラ予測モード情報)を、可逆符号化部66に供給する。
 最適インター予測モードの予測画像が選択された場合、動き予測・補償部75は、最適インター予測モードを示す情報と、必要に応じて、最適インター予測モードに応じた情報を可逆符号化部66に出力する。最適インター予測モードに応じた情報としては、2次予測を行うことを示す2次予測フラグ、2次予測におけるイントラ予測モードを示す情報、および参照フレーム情報などがあげられる。
 ステップS23において、可逆符号化部66は量子化部65より出力された量子化された変換係数を符号化する。すなわち、差分画像(2次予測の場合、2次差分画像)が可変長符号化、算術符号化等の可逆符号化され、圧縮される。このとき、上述したステップS22において可逆符号化部66に入力された、イントラ予測部74からのイントラ予測モード情報、または、動き予測・補償部75からの最適インター予測モードに応じた情報なども符号化され、ヘッダ情報に付加される。
 ステップS24において蓄積バッファ67は差分画像を圧縮画像として蓄積する。蓄積バッファ67に蓄積された圧縮画像が適宜読み出され、伝送路を介して復号側に伝送される。
 ステップS25においてレート制御部79は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部65の量子化動作のレートを制御する。
[予測処理の説明]
 次に、図11のフローチャートを参照して、図10のステップS21における予測処理を説明する。
 画面並べ替えバッファ62から供給される処理対象の画像がイントラ処理されるブロックの画像である場合、参照される復号済みの画像がフレームメモリ72から読み出され、スイッチ73を介してイントラ予測部74に供給される。これらの画像に基づいて、ステップS31において、イントラ予測部74は処理対象のブロックの画素を、候補となる全てのイントラ予測モードでイントラ予測する。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。
 ステップS31におけるイントラ予測処理の詳細は、図24を参照して後述するが、この処理により、候補となる全てのイントラ予測モードでイントラ予測が行われ、候補となる全てのイントラ予測モードに対してコスト関数値が算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードが選択され、最適イントラ予測モードのイントラ予測により生成された予測画像とそのコスト関数値が予測画像選択部78に供給される。
 画面並べ替えバッファ62から供給される処理対象の画像がインター処理される画像である場合、参照される画像がフレームメモリ72から読み出され、スイッチ73を介して動き予測・補償部75に供給される。これらの画像に基づいて、ステップS32において、動き予測・補償部75はインター動き予測処理を行う。すなわち、動き予測・補償部75は、フレームメモリ72から供給される画像を参照して、候補となる全てのインター予測モードの動き予測処理を行う。
 なお、このとき、動きベクトル精度判定部77は、動き予測・補償部75により求められた対象ブロックの動きベクトル情報の精度が整数画素精度であるか小数画素精度であるかを判定する。2次予測部76は、動きベクトル精度の判定結果やイントラ予測モードに応じて、2次予測を行う。すなわち、2次予測部76は、対象隣接画素と参照隣接画素の差分を用いて、対象ブロックのイントラ予測画像を生成し、動き予測・補償部75により求められた1次残差とイントラ予測画像との差分である2次残差を、動き予測・補償部75に出力する。これに対応して、動き予測・補償部75は、1次残差と2次残差のうち符号化効率がよい残差を決定し、これ以降の処理に用いる。
 ステップS32におけるインター動き予測処理の詳細は、図25を参照して後述する。この処理により、候補となる全てのインター予測モードで動き予測処理が行われ、1次差分または2次差分が用いられて、候補となる全てのインター予測モードに対してコスト関数値が算出される。
 ステップS33において、動き予測・補償部75は、ステップS32において算出されたインター予測モードに対してのコスト関数値を比較する。動き予測・補償部75は、最小値を与える予測モードを、最適インター予測モードとして決定し、最適インター予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部78に供給する。
[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画素のイントラ予測モードとも適宜称する。
 図12の例において、各ブロックに付されている数字-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直交変換が施される場合についてのみ適用可能である。
 図13および図14は、9種類の輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)を示す図である。平均値(DC)予測を示すモード2以外の8種類の各モードは、それぞれ、図15の番号0,1,3乃至8で示される方向に対応している。
 9種類のIntra_4x4_pred_modeについて、図16を参照して説明する。図16の例において、画素a乃至pは、イントラ処理される対象ブロックの画素を表し、画素値A乃至Mは、隣接ブロックに属する画素の画素値を表している。すなわち、画素a乃至pは、画面並べ替えバッファ62から読み出された処理対象の画像であり、画素値A乃至Mは、フレームメモリ72から読み出され、参照される復号済みの画像の画素値である。
 図13および図14に示す各イントラ予測モードの場合、画素a乃至pの予測画素値は、隣接ブロックに属する画素の画素値A乃至Mを用いて、以下のように生成される。なお、画素値が“available”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由がなく、利用可能であることを表す。これに対して、画素値が“unavailable”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により利用可能ではないことを表す。
 モード0はVertical Prediction modeであり、画素値A乃至Dが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(7)のように生成される。

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

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

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

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

 (A+B+C+D+2) >> 2          ・・・(11)
 なお、画素値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の予測画素値は、次の式(12)のように生成される。

 画素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
                           ・・・(12)
 モード4はDiagonal_Down_Right Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(13)のように生成される。

 画素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
                           ・・・(13)
 モード5はDiagonal_Vertical_Right Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(14)のように生成される。

 画素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
                           ・・・(14)
 モード6はHorizontal_Down Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(15)のように生成される。

 画素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
                           ・・・(15)
 モード7は、Vertical_Left Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(16)のように生成される。

 画素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
                           ・・・(16)
 モード8は、Horizontal_Up Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(17)のように生成される。

 画素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
                           ・・・(17)
 次に、図17を参照して、輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)の符号化方式について説明する。図17の例において、4×4画素からなり、符号化対象となる対象ブロックCが示されており、対象ブロックCに隣接する4×4画素からなるブロックAおよびブロックBが示されている。
 この場合、対象ブロックCにおけるIntra_4x4_pred_modeと、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeとは高い相関があると考えられる。この相関性を用いて、次のように符号化処理を行うことにより、より高い符号化効率を実現することができる。
 すなわち、図17の例において、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeを、それぞれ、Intra_4x4_pred_modeAおよびIntra_4x4_pred_modeBとして、MostProbableModeを次の式(18)と定義する。

 MostProbableMode=Min(Intra_4x4_pred_modeA, Intra_4x4_pred_modeB)
                           ・・・(18)
 すなわち、ブロックAおよびブロックBのうち、より小さなmode_numberを割り当てられている方をMostProbableModeとする。
 ビットストリーム中には、対象ブロックCに対するパラメータとして、prev_intra4x4_pred_mode_flag[luma4x4BlkIdx] および rem_intra4x4_pred_mode[luma4x4BlkIdx] という2つの値が定義されており、次の式(19)に示される擬似コードに基づく処理により、復号処理が行われ、対象ブロック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
                           ・・・(19)
 次に、8×8画素のイントラ予測モードについて説明する。図18および図19は、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” である場合には、次の式(20)のように算出され、“not available” である場合には、次の式(21)のように算出される。

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

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

 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
                           ・・・(23)
 p'[-1,-1]は、p[-1,-1]が “available” である場合には、以下のように算出される。すなわち、p'[-1,-1]は、p[0,-1]及びp[-1,0]の双方がavailableである場合には、式(24)のように算出され、p[-1,0] が “unavailable” である場合には、式(25)のように算出される。また、p'[-1,-1]は、p[0,-1] が “unavailable” である場合には、式(26)のように算出される。

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

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

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

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

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

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

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

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

 pred8x8L[x,y] = 128
                           ・・・(36)
  ただし、式(36)は、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である予測画素値は、次の式(37)のように生成され、その他の予測画素値は、次の式(38)のように生成される。

 pred8x8L[x,y] = (p'[14,-1] + 3*p[15,-1] + 2) >> 2
                           ・・・(37)
 red8x8L[x,y] = (p'[x+y,-1] + 2*p'[x+y+1,-1] + p'[x+y+2,-1] + 2) >> 2
                           ・・・(38)
 モード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 である予測画素値は、次の式(39)のように生成され、x < y である予測画素値は、次の式(40)のように生成される。また、x = y である予測画素値は、次の式(41)のように生成される。

 pred8x8L[x,y] = (p'[x-y-2,-1] + 2*p'[x-y-1,-1] + p'[x-y,-1] + 2) >> 2
                           ・・・(39)
 pred8x8L[x,y] = (p'[-1,y-x-2] + 2*p'[-1,y-x-1] + p'[-1,y-x] + 2) >> 2
                           ・・・(40)
 pred8x8L[x,y] = (p'[0,-1] + 2*p'[-1,-1] + p'[-1,0] + 2) >> 2
                           ・・・(41)
 モード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を、次の式(42)のように定義する。

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

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

 pred8x8L[x,y] = (p'[-1,0] + 2*p'[-1,-1] + p'[0,-1] + 2) >> 2
                           ・・・(45)
 pred8x8L[x,y] = (p'[-1,y-2*x-1] + 2*p'[-1,y-2*x-2] + p'[-1,y-2*x-3] + 2) >> 2
                           ・・・(46)
 モード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を次の式(47)のように定義するものとする。

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

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

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

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

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

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

 pred8x8L[x,y] = (p'[-1,6] + 3*p'[-1,7] + 2) >> 2
                           ・・・(57)
 pred8x8L[x,y] = p'[-1,7]
                           ・・・(58)
 次に、16×16画素のイントラ予測モードについて説明する。図20および図21は、4種類の輝度信号の16×16画素のイントラ予測モード(Intra_16x16_pred_mode)を示す図である。
 4種類のイントラ予測モードについて、図22を参照して説明する。図22の例において、イントラ処理される対象マクロブロック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)は、次の式(59)のように生成される。

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

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

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

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

Figure JPOXMLDOC01-appb-M000010
 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)は、次の式(64)のように生成される。

Figure JPOXMLDOC01-appb-M000011
 次に、色差信号に対するイントラ予測モードについて説明する。図23は、4種類の色差信号のイントラ予測モード(Intra_chroma_pred_mode)を示す図である。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。色差信号に対するイントラ予測モードは、上述した輝度信号の16×16画素のイントラ予測モードに順ずる。
 ただし、輝度信号の16×16画素のイントラ予測モードが、16×16画素のブロックを対象としているのに対し、色差信号に対するイントラ予測モードは、8×8画素のブロックを対象としている。さらに、上述した図20と図23に示されるように、両者においてモード番号は対応していない。
 ここで、図22を参照して上述した輝度信号の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)は、次の式(65)のように生成される。

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

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

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

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

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

Figure JPOXMLDOC01-appb-M000015
 以上のように、輝度信号のイントラ予測モードには、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つの予測モードが設定される。
 なお、予測モードの種類は、上述した図15の番号0,1,3乃至8で示される方向に対応している。予測モード2は平均値予測である。
[イントラ予測処理の説明]
 次に、図24のフローチャートを参照して、これらの予測モードに対して行われる処理である、図11のステップS31におけるイントラ予測処理を説明する。なお、図24の例においては、輝度信号の場合を例として説明する。
 イントラ予測部74は、ステップS41において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対してイントラ予測を行う。
 具体的には、イントラ予測部74は、処理対象のブロックの画素を、フレームメモリ72から読み出され、スイッチ73を介して供給される復号済みの画像を参照して、イントラ予測する。このイントラ予測処理が、各イントラ予測モードで行われることで、各イントラ予測モードでの予測画像が生成される。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。
 イントラ予測部74は、ステップS42において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対するコスト関数値を算出する。ここで、コスト関数値としては、High Complexity モードか、Low Complexity モードのいずれかの手法に基づいて行う。これらのモードは、H.264/AVC方式における参照ソフトウエアであるJM(Joint Model)で定められている。
 すなわち、High Complexity モードにおいては、ステップS41の処理として、候補となる全ての予測モードに対して、仮に符号化処理までが行われる。そして、次の式(71)で表わされるコスト関数値が各予測モードに対して算出され、その最小値を与える予測モードが最適予測モードであるとして選択される。
 Cost(Mode) = D + λ・R               ・・・(71)

 Dは、原画像と復号画像の差分(歪)、Rは、直交変換係数まで含んだ発生符号量、λは、量子化パラメータQPの関数として与えられるラグランジュ乗数である。
 一方、Low Complexity モードにおいては、ステップS41の処理として、候補となる全ての予測モードに対して、予測画像の生成、および、動きベクトル情報や予測モード情報、フラグ情報などのヘッダビットまでが算出される。そして、次の式(72)で表わされるコスト関数値が各予測モードに対して算出され、その最小値を与える予測モードが最適予測モードであるとして選択される。
 Cost(Mode) = D + QPtoQuant(QP)・Header_Bit     ・・・(72)
 Dは、原画像と復号画像の差分(歪)、Header_Bitは、予測モードに対するヘッダビット、QPtoQuantは、量子化パラメータQPの関数として与えられる関数である。
 Low Complexity モードにおいては、全ての予測モードに対して、予測画像を生成するのみで、符号化処理および復号処理を行う必要がないため、演算量が少なくて済む。
 イントラ予測部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は、最適イントラ予測モードで生成された予測画像とそのコスト関数値とを、予測画像選択部78に供給する。
[インター動き予測処理の説明]
 次に、図25のフローチャートを参照して、図11のステップS32のインター動き予測処理について説明する。
 動き予測・補償部75は、ステップS51において、図3を参照して上述した16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して動きベクトルと参照画像をそれぞれ決定する。すなわち、各インター予測モードの処理対象のブロックについて、動きベクトルと参照画像がそれぞれ決定される。
 動き予測・補償部75は、ステップS52において、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、ステップS51で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理の詳細は、図26を参照して後述する。
 ステップS52の処理により、動きベクトルの精度が小数画素であるか否か、または動きベクトルの精度およびイントラ予測モードの組み合わせが特定の組み合わせであるか否かが判定される。そして、判定結果に応じて、対象画像と予測画像の差分である1次残差と対象隣接画素と参照隣接画素の差分の間で予測が行われることで、2次残差が生成される。そして、1次残差と2次残差を比較することで、最終的に、2次予測処理を行うか否かが決定される。
 2次予測を行うと決定された場合、1次残差の代わりに2次残差が後述するステップS54のコスト関数値の算出に用いられる。この場合、2次予測を行うことを示す2次予測フラグと2次予測におけるイントラ予測モードを示す情報も動き予測・補償部75に出力される。
 動き予測・補償部75は、ステップS53において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して決定された動きベクトルについて、動きベクトル情報mvdEを生成する。このとき、図6を参照して上述した動きベクトルの生成方法が用いられる。
 生成された動きベクトル情報は、次のステップS54におけるコスト関数値算出の際にも用いられ、最終的に予測画像選択部78により対応する予測画像が選択された場合には、予測モード情報および参照フレーム情報とともに、可逆符号化部66へ出力される。
 モード判定部86は、ステップS54において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して、上述した式(71)または式(72)で示されるコスト関数値を算出する。ここで算出されたコスト関数値は、上述した図11のステップS33で最適インター予測モードを決定する際に用いられる。
[動き予測・補償処理の説明]
 次に、図26のフローチャートを参照して、図25のステップS52の動き予測・補償処理について説明する。図26の例においては、4×4画素ブロックのイントラ予測モードを用いる例が示されている。
 図25のステップS51において対象ブロックについて求められた動きベクトル情報は、動きベクトル精度判定部77および隣接画素予測部83に入力される。また、隣接画素予測部83には、動きベクトル情報とともに、対象ブロックの情報(アドレスなど)も入力される。
 動きベクトル精度判定部77は、ステップS71において、動きベクトル情報が水平および垂直ともに小数画素精度であるか否かを判定する。ステップS71において、動きベクトル情報が水平および垂直ともに小数画素精度ではないと判定された場合、ステップS72において、動きベクトル精度判定部77は、動きベクトル情報が水平および垂直ともに整数画素精度であるか否かを判定する。
 ステップS72において、動きベクトル情報が水平および垂直ともに整数画素精度であると判定された場合、その判定結果は、スイッチ84に出力され、処理は、ステップS73に進む。
 ステップS73において、動き予測・補償部75は、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、図25のステップS51で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理により、対象ブロックについて、参照ブロックの画素値により、各インター予測モードでの予測画像が生成され、対象ブロックとその予測画像の差分である1次差分が1次残差バッファ81に出力される。
 ステップS74において、隣接画素予測部83は、図13および図14で上述した9種類のイントラ予測モードのうち、1つのイントラ予測モードを選択する。そして、ステップS74において選択されたイントラ予測モードについて、以降のステップS75およびS76において、2次予測処理が行われる。
 すなわち、ステップS75において、隣接画素予測部83は、選択したイントラ予測モードで、差分を用いたイントラ予測処理を行い、ステップS76において、2次残差生成部82は、2次残差を生成する。
 ステップS75の具体的な処理として、隣接画素予測部83は、動き予測・補償部75からの動きベクトル情報と対象ブロックの情報に基づいて、対象ブロックに隣接する対象隣接画素および参照ブロックに隣接する参照隣接画素をフレームメモリ72から読み出す。
 隣接画素予測部83は、選択したイントラ予測モードで、対象隣接画素と参照隣接画素の差分を用いて、対象ブロックについてイントラ予測を行い、差分によるイントラ予測画像を生成する。生成された差分によるイントラ予測画像(残差信号の予測画像)は、2次残差生成部82に出力される。
 ステップS76の具体的な処理として、2次残差生成部82は、隣接画素予測部83から、差分によるイントラ予測画像(残差信号の予測画像)が入力されると、それに対応する1次残差を、1次残差バッファ81から読み出す。2次残差生成部82は、1次残差と残差信号のイントラ予測画像との差分である2次残差を生成し、生成された2次残差を、スイッチ84に出力する。スイッチ84は、ステップS72における判定結果に応じて、2次残差生成部82からの2次残差を、動き予測・補償部75に出力する。
 隣接画素予測部83は、ステップS77において、すべてのイントラ予測モードに対しての処理が終了したかを判定し、終了していないと判定した場合、ステップS74に戻り、それ以降の処理を繰り返す。すなわち、ステップS74において、他のイントラ予測モードが選択され、それ以降の処理が繰り返される。
 ステップS77において、すべてのイントラ予測モードに対しての処理が終了したと判定された場合、処理は、ステップS84に進む。
 一方、ステップS72において、動きベクトル情報が水平および垂直ともに整数画素精度ではない、すなわち、どちらか一方が小数画素精度であると判定された場合、その判定結果は、スイッチ84に出力され、処理は、ステップS78に進む。
 ステップS78において、動き予測・補償部75は、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、図25のステップS51で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理により、対象ブロックについて、各インター予測モードでの予測画像が生成され、対象ブロックとその予測画像の差分である1次差分が1次残差バッファ81に出力される。
 隣接画素予測部83は、ステップS79において、図13および図14で上述した9種類のイントラ予測モードのうち、1つのイントラ予測モードを選択する。隣接画素予測部83は、ステップS80において、動きベクトル情報と選択したイントラ予測モードが特定の組み合わせであるか否かを判定する。
 ステップS80において、動きベクトル情報と選択したイントラ予測モードが特定の組み合わせではないと判定された場合、処理は、ステップS79に戻り、他のイントラ予測モードが選択され、それ以降の処理が繰り返される。
 また、ステップS80において、動きベクトル情報と選択したイントラ予測モードが特定の組み合わせであると判定された場合、処理は、ステップS81に進む。
 すなわち、隣接画素予測部83は、水平方向または垂直方向の動きベクトルの精度が小数画素精度であるので、基本的には、ステップS81およびS82の処理である2次予測処理を行わない。ただし、隣接画素予測部83においては、例外として、動きベクトルの精度とイントラ予測モードの組み合わせが、図8および図9を参照して上述した特定の組み合わせである場合のみ、2次予測処理が行われる。
 具体的には、垂直方向の動きベクトル情報が小数画素精度であったとしても、イントラ予測モードが垂直予測モードである場合には、ステップS80において、特定の組み合わせであると判定され、処理は、ステップS81に進む。すなわち、イントラ予測モードが垂直予測モードである場合には、水平方向の動きベクトル情報が整数画素精度でありさえすれば、2次予測処理が行われる。
 また、水平方向の動きベクトル情報が小数画素精度であったとしても、イントラ予測モードが水平予測モードである場合には、ステップS80において、特定の組み合わせであると判定され、処理は、ステップS81に進む。すなわち、イントラ予測モードが水平予測モードである場合には、垂直方向の動きベクトル情報が整数画素精度でありさえすれば、2次予測処理が行われる。
 さらに、水平方向または垂直方向の動きベクトル情報が小数画素精度であったとしても、イントラ予測モードがDC予測モードである場合には、ステップS80において、特定の組み合わせであると判定され、処理は、ステップS81に進む。すなわち、イントラ予測モードがDC予測モードである場合には、水平方向または垂直方向の動きベクトル情報がどちらも整数画素精度でなくてもで、2次予測処理が行われる。
 ステップS81において、隣接画素予測部83は、選択したイントラ予測モードで、差分を用いたイントラ予測処理を行う。生成された差分によるイントラ画像は、残差信号の予測画像として、2次残差生成部82に出力される。
 ステップS82において、2次残差生成部82は、2次残差を生成する。生成された2次残差は、スイッチ84に出力される。スイッチ84は、ステップS72における判定結果に応じて、2次残差生成部82からの2次残差を、動き予測・補償部75に出力する。なお、ステップS81およびS82の処理は、ステップS75およびS76の処理と同じ処理である。
 隣接画素予測部83は、ステップS83において、すべてのイントラ予測モードに対しての処理が終了したかを判定し、終了していないと判定した場合、ステップS79に戻り、それ以降の処理を繰り返す。
 ステップS83において、すべてのイントラ予測モードに対しての処理が終了したと判定された場合、処理は、ステップS84に進む。
 ステップS84において、動き予測・補償部75は、2次予測部76からの各イントラ予測モードの2次残差を比較し、その中で最も符号化効率がよいとされる2次残差のイントラ予測モードを、対象ブロックのイントラ予測モードとして決定する。すなわち、対象ブロックのイントラ予測モードとして、2次残差の値が最も小さいイントラ予測モードが決定される。
 ステップ85において、動き予測・補償部75は、さらに、決定されたイントラ予測モードの2次残差と1次残差を比較し、2次予測を用いるか否かを決定する。すなわち、2次残差の方が符号化効率がよいと判定された場合、2次予測を用いると決定され、インターする画像と2次残差の差分が、予測画像としてインター予測の候補となる。また、1次残差の方が符号化効率がよいと判定された場合、2次予測を用いないと決定され、ステップS73またはS78で求められた予測画像がインター予測の候補となる。
 すなわち、2次残差が1次残差より、より高い符号化効率を与える場合のみ、2次残差が符号化されて、復号側に送られる。
 なお、ステップS85においては、残差そのものの値を比較し、値の小さいものを符号化効率がよいとして判定してもよいし、上述した式(71)または式(72)で示されるコスト関数値を算出することで符号化効率がよいものを判定するようにしてもよい。
 一方、ステップS71において、動きベクトル情報が、水平および垂直ともに小数画素精度であると判定された場合、その判定結果は、スイッチ84に出力され、処理は、ステップS86に進む。
 ステップS86において、動き予測・補償部75は、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、図25のステップS51で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理により、各インター予測モードでの予測画像が生成され、インター予測の候補となる。
 なお、図26の例においては、動きベクトル情報の精度とともに、イントラ予測モードに応じて2次予測処理を行うか否かを判定する例を説明したが、もちろん、動きベクトル情報の精度だけに応じて2次予測処理を行うか否かを判定することも可能である。
 また、図26の例においては、水平および垂直方向の動きベクトル情報がどちらも小数画素精度である場合、2次予測処理を行わない例を説明したが、この場合にも、イントラ予測モードがDC予測モードであれば、2次予測を行うようにすることも可能である。
 以上のように、動きベクトル情報の精度が小数画素精度である場合、2次予測を行わないようにしたので、2次予測に伴う符号化効率の低下を抑制することができる。
 また、動きベクトル情報の精度と2次予測のイントラ予測モードが特定の組み合わせの場合には、動きベクトル情報の精度が小数画素精度であったとしても、その組み合わせに応じて、2次予測を行うようにしたので、符号化効率を向上させることができる。
 符号化された圧縮画像は、所定の伝送路を介して伝送され、画像復号装置により復号される。
[画像復号装置の構成例]
 図27は、本発明を適用した画像処理装置としての画像復号装置の一実施の形態の構成を表している。
 画像復号装置101は、蓄積バッファ111、可逆復号部112、逆量子化部113、逆直交変換部114、演算部115、デブロックフィルタ116、画面並べ替えバッファ117、D/A変換部118、フレームメモリ119、スイッチ120、イントラ予測部121、動き予測・補償部122、2次予測部123、およびスイッチ124により構成されている。
 蓄積バッファ111は伝送されてきた圧縮画像を蓄積する。可逆復号部112は、蓄積バッファ111より供給された、図2の可逆符号化部66により符号化された情報を、可逆符号化部66の符号化方式に対応する方式で復号する。逆量子化部113は可逆復号部112により復号された画像を、図2の量子化部65の量子化方式に対応する方式で逆量子化する。逆直交変換部114は、図2の直交変換部64の直交変換方式に対応する方式で逆量子化部113の出力を逆直交変換する。
 逆直交変換された出力は演算部115によりスイッチ124から供給される予測画像と加算されて復号される。デブロックフィルタ116は、復号された画像のブロック歪を除去した後、フレームメモリ119に供給し、蓄積させるとともに、画面並べ替えバッファ117に出力する。
 画面並べ替えバッファ117は、画像の並べ替えを行う。すなわち、図2の画面並べ替えバッファ62により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられる。D/A変換部118は、画面並べ替えバッファ117から供給された画像をD/A変換し、図示せぬディスプレイに出力し、表示させる。
 スイッチ120は、インター処理される画像と参照される画像をフレームメモリ119から読み出し、動き予測・補償部122に出力するとともに、イントラ予測に用いられる画像をフレームメモリ119から読み出し、イントラ予測部121に供給する。
 イントラ予測部121には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報が可逆復号部112から供給される。イントラ予測部121は、この情報に基づいて、予測画像を生成し、生成した予測画像を、スイッチ124に出力する。
 動き予測・補償部122には、ヘッダ情報を復号して得られた情報のうち、予測モード情報、動きベクトル情報、参照フレーム情報などが可逆復号部112から供給される。インター予測モードを示す情報が供給された場合、動き予測・補償部122は、動きベクトル情報が整数画素精度であるか否かを判定する。なお、動き予測・補償部122には、対象ブロックに対して2次予測処理が適用されている場合には、2次予測を行うことを示す2次予測フラグと、2次予測におけるイントラ予測モード情報も可逆復号部122から供給される。
 動きベクトル情報が整数画素精度である場合、さらに、動き予測・補償部122は、可逆復号部112からの2次予測フラグを参照して、2次予測処理が適用されているか否かを判定する。動き予測・補償部122は、2次予測処理が適用されていると判定した場合、2次予測部123を制御し、2次予測におけるイントラ予測モード情報が示すイントラ予測モードで、2次予測を行わせる。
 動き予測・補償部122は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。すなわち、対象ブロックの予測画像は、参照フレームにおいて、対象ブロックに動きベクトルで対応付けられる参照ブロックの画素値が用いられて生成される。そして、動き予測・補償部122は、生成された予測画像と2次予測部123からの予測差分値を加算して、それをスイッチ124に出力する。
 一方、動きベクトル情報が小数画素精度である場合、または、2次予測処理が適用されていない場合、動き予測・補償部122は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。動き予測・補償部122は、インター予測モードにより生成された予測画像をスイッチ124に出力する。
 2次予測部123は、フレームメモリ119から読み出される対象隣接画素と参照隣接画素の差分を用いて、2次予測を行う。すなわち、2次予測部123は、可逆復号部112から供給される2次予測におけるイントラ予測モードの情報を取得し、その情報が示すイントラ予測モードで、対象ブロックについてイントラ予測を行い、イントラ予測画像を生成する。生成されたイントラ予測画像は、予測差分値として、動き予測・補償部122に出力される。
 スイッチ124は、動き予測・補償部122またはイントラ予測部121により生成された予測画像(または、予測画像と予測差分値)を選択し、演算部115に供給する。
[2次予測部の構成例]
 図28は、2次予測部の詳細な構成例を示すブロック図である。
 図28の例においては、2次予測部123は、対象ブロックに対する隣接画素バッファ141、参照ブロックに対する隣接画素バッファ142、隣接画素差分算出部143、および予測差分値生成部144により構成される。
 動き予測・補償部122は、動きベクトル情報が整数画素精度である場合、対象ブロックの情報(アドレス)を、対象ブロックに対する隣接画素バッファ141に供給し、参照ブロックの情報(アドレス)を、参照ブロックに対する隣接画素バッファ142に供給する。なお、参照ブロックに対する隣接画素バッファ142に供給される情報は、対象ブロックの情報と動きベクトル情報であってもよい。
 対象ブロックに対する隣接画素バッファ141には、対象ブロックのアドレスに対応して、対象ブロックに対する隣接画素がフレームメモリ119から読み出され、蓄積される。
 参照ブロックに対する隣接画素バッファ142には、参照ブロックのアドレスに対応して、参照ブロックに対する隣接画素がフレームメモリ119から読み出され、蓄積される。
 隣接画素差分算出部143は、対象ブロックに対する隣接画素バッファ141から、対象ブロックに対する隣接画素を読み出す。また、隣接画素差分算出部143は、参照ブロックに対する隣接画素バッファ142から、対象ブロックに動きベクトルで対応付けられる参照ブロックに対する隣接画素を読み出す。隣接画素差分算出部143は、対象ブロックに対する隣接画素と参照ブロックに対する隣接画素との差分である隣接画素差分値を、図示せぬ内蔵バッファに蓄積する。
 予測差分値生成部144は、可逆復号部112から取得される2次予測におけるイントラ予測モードで、隣接画素差分算出部143の内蔵バッファに蓄積された隣接画素差分値を用いて、2次予測として、イントラ予測を行い、予測差分値を生成する。予測差分値生成部144は、生成した予測差分値を、動き予測・補償部122に出力する。
 なお、図28の例の予測差分値生成部144における2次予測としてイントラ予測を行う回路は、イントラ予測部121との回路を共用することが可能である。
 次に、動き予測・補償部122および2次予測部123の動作を説明する。
 動き予測・補償部122は、対象ブロックに関する動きベクトル情報を取得する。この値が小数画素精度である場合、対象ブロックに対しては2次予測が行われてないため、通常のインター予測処理が行われる。
 一方、動きベクトル情報の値が整数画素精度である場合、対象ブロックに対して2次予測がおこなわれているかどうかは、可逆復号部112により復号される2次予測フラグにより判定される。2次予測が行われている場合には、画像復号装置101において、2次予測に基づくインター予測処理が行われ、2次予測が行われていない場合には、画像復号装置101において、通常のインター予測処理が行われる。
 ここで、対象ブロックの画素値[A]、参照ブロックの画素値[A']、対象ブロックの隣接画素値[B]、および参照ブロックの隣接画素値[B']とする。また、modeを9種類のイントラ予測モードのうちのどれかであるとして、イントラ予測によって生成される値を、Ipred(X)[mode]と表すとすると、画像符号化装置51において符号化される2次残差[Res]は、次の式(73)で表される。

 [Res] = (A-A') - Ipred(B-B')[mode]         ・・・(73)
 この式(73)を変形すると、式(74)になる。

 A = [Res] + A' + Ipred(B-B')[mode]         ・・・(74)
 すなわち、画像復号装置101において、予測差分値Ipred(B-B')[mode]は、2次予測部123において生成されて、動き予測・補償部122に出力される。また、参照ブロックの画素値[A']は、動き予測・補償部122において生成される。そして、これらが、演算部115に出力され、2次残差[Res]と加算され、その結果、式(74)に示されるように、対象ブロックの画素値[A]が求められる。
[画像復号装置の復号処理の説明]
 次に、図29のフローチャートを参照して、画像復号装置101が実行する復号処理について説明する。
 ステップS131において、蓄積バッファ111は伝送されてきた画像を蓄積する。ステップS132において、可逆復号部112は、蓄積バッファ111から供給される圧縮画像を復号する。すなわち、図2の可逆符号化部66により符号化されたIピクチャ、Pピクチャ、並びにBピクチャが復号される。
 このとき、符号化されていれば、動きベクトル情報、参照フレーム情報、予測モード情報、2次予測フラグ、および2次予測におけるイントラ予測モードを示す情報なども復号される。
 すなわち、予測モード情報がイントラ予測モード情報である場合、予測モード情報は、イントラ予測部121に供給される。予測モード情報がインター予測モード情報である場合、予測モード情報と対応する動きベクトル情報および参照フレーム情報は、動き予測・補償部122に供給される。このとき、図2の可逆符号化部66により符号化されていれば、2次予測フラグは、動き予測・補償部122に供給され、2次予測におけるイントラ予測モードを示す情報は、2次予測部123に供給される。
 ステップS133において、逆量子化部113は可逆復号部112により復号された変換係数を、図2の量子化部65の特性に対応する特性で逆量子化する。ステップS134において逆直交変換部114は逆量子化部113により逆量子化された変換係数を、図2の直交変換部64の特性に対応する特性で逆直交変換する。これにより図2の直交変換部64の入力(演算部63の出力)に対応する差分情報が復号されたことになる。
 ステップS135において、演算部115は、後述するステップS141の処理で選択され、スイッチ124を介して入力される予測画像を差分情報と加算する。これにより元の画像が復号される。ステップS136においてデブロックフィルタ116は、演算部115より出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS137においてフレームメモリ119は、フィルタリングされた画像を記憶する。
 ステップS138において、イントラ予測部121または動き予測・補償部122、は、可逆復号部112から供給される予測モード情報に対応して、それぞれ画像の予測処理を行う。
 すなわち、可逆復号部112からイントラ予測モード情報が供給された場合、イントラ予測部121は、イントラ予測モードのイントラ予測処理を行う。可逆復号部112からインター予測モード情報が供給された場合、動き予測・補償部122は、インター予測モードの動き予測・補償処理を行う。なお、このとき、動き予測・補償部122においては、動きベクトル情報の精度や2次予測フラグを参照して、2次予測に基づくインター予測処理、または通常のインター予測処理が行われる。
 ステップS138における予測処理の詳細は、図30を参照して後述する。この処理により、イントラ予測部121により生成された予測画像または動き予測・補償部122により生成された予測画像(あるいは予測画像と予測差分値)がスイッチ124に供給される。
 ステップS139において、スイッチ124は予測画像を選択する。すなわち、イントラ予測部121により生成された予測画像、または動き予測・補償部122により生成された予測画像が供給される。したがって、供給された予測画像が選択されて演算部115に供給され、上述したように、ステップS134において逆直交変換部114の出力と加算される。
 ステップS140において、画面並べ替えバッファ117は並べ替えを行う。すなわち画像符号化装置51の画面並べ替えバッファ62により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。
 ステップS141において、D/A変換部118は、画面並べ替えバッファ117からの画像をD/A変換する。この画像が図示せぬディスプレイに出力され、画像が表示される。
[予測処理の説明]
 次に、図30のフローチャートを参照して、図29のステップS138の予測処理を説明する。
 イントラ予測部121は、ステップS171において、対象ブロックがイントラ符号化されているか否かを判定する。可逆復号部112からイントラ予測モード情報がイントラ予測部121に供給されると、イントラ予測部121は、ステップ171において、対象ブロックがイントラ符号化されていると判定し、処理は、ステップS172に進む。
 イントラ予測部121は、ステップS172において、イントラ予測モード情報を取得し、ステップS173において、イントラ予測を行う。
 すなわち、処理対象の画像がイントラ処理される画像である場合、必要な画像がフレームメモリ119から読み出され、スイッチ120を介してイントラ予測部121に供給される。ステップS173において、イントラ予測部121は、ステップS172で取得したイントラ予測モード情報に従ってイントラ予測し、予測画像を生成する。生成した予測画像は、スイッチ124に出力される。
 一方、ステップS171において、イントラ符号化されていないと判定された場合、処理は、ステップS174に進む。
 ステップS174において、動き予測・補償部122は、可逆復号部112からの予測モード情報などを取得する。
 処理対象の画像がインター処理される画像である場合、可逆復号部112からインター予測モード情報、参照フレーム情報、動きベクトル情報が動き予測・補償部122に供給される。この場合、ステップS174において、動き予測・補償部122は、インター予測モード情報、参照フレーム情報、動きベクトル情報を取得する。
 動き予測・補償部122は、取得した動きベクトル情報を参照して、ステップS175において、対象ブロックについての動きベクトル情報は整数画素精度であるか否かを判定する。なお、いまの場合、水平および垂直方向のどちらか一方の動きベクトル情報が整数画素精度であれば、ステップS175において、整数画素精度であると判定されるものとする。
 ステップS175において、対象ブロックについての動きベクトル情報が整数画素精度ではないと判定された場合、すなわち、水平および垂直方向の両方の動きベクトル情報が、小数画素精度であると判定され、処理は、ステップS176に進む。
 ステップS176において、動き予測・補償部122は、通常のインター予測を行う。すなわち、処理対象の画像がインター予測処理される画像である場合、必要な画像がフレームメモリ169から読み出され、スイッチ170を介して動き予測・補償部122に供給される。ステップS176において動き予測・補償部122は、ステップS174で取得した動きベクトルに基づいて、インター予測モードの動き予測をし、予測画像を生成する。生成した予測画像は、スイッチ124に出力される。
 また、ステップS175において、対象ブロックについての動きベクトル情報が整数画素精度であると判定された場合、処理は、ステップS177に進む。
 なお、画像符号化装置51により符号化されていれば、2次予測フラグが動き予測・補償部122に供給され、2次予測におけるイントラ予測モードを示す情報が2次予測部123に供給される。
 動き予測・補償部122は、ステップS177において、可逆復号部112から供給された2次予測フラグを取得し、ステップS178において、対象ブロックに対して2次予測処理が適用されているか否かを判定する。
 ステップS178において、対象ブロックに対して2次予測処理が適用されていないと判定された場合、処理は、ステップS176に進み、通常のインター予測処理が行われる。ステップS178において、対象ブロックに対して2次予測処理が適用されていると判定された場合、処理は、ステップS179に進む。
 動き予測・補償部122は、ステップS179において、2次予測部123に、可逆復号部112から供給された2次予測におけるイントラ予測モードを示す情報を取得させる。これに対応して、2次予測部123は、ステップS180において、2次予測に基づくインター予測処理として、2次インター予測処理を行う。この2次インター予測処理は、図31を参照して後述する。
 ステップS180の処理により、インター予測が行われて予測画像が生成されるとともに、2次予測が行われて予測差分値が生成され、それらが加算されて、スイッチ124に出力される。
 次に、図31のフローチャートを参照して、図30のステップS180における2次インター予測処理について説明する。
 ステップS191において、動き予測・補償部122は、図30のステップS174で取得した動きベクトルに基づいて、インター予測モードの動き予測をし、予測画像を生成する。
 また、動き予測・補償部122は、対象ブロックのアドレスを、対象ブロックに対する隣接画素バッファ141に供給し、参照ブロックのアドレスを、参照ブロックに対する隣接画素バッファ142に供給する。対象ブロックに対する隣接画素バッファ141には、対象ブロックのアドレスに対応して、対象ブロックに対する隣接画素がフレームメモリ119から読み出され、蓄積される。参照ブロックに対する隣接画素バッファ142には、参照ブロックのアドレスに対応して、参照ブロックに対する隣接画素がフレームメモリ119から読み出され、蓄積される。
 隣接画素差分算出部143は、対象ブロックに対する隣接画素バッファ141から、対象ブロックに対する隣接画素を読み出し、参照ブロックに対する隣接画素バッファ142から、対象ブロックに対応する参照ブロックに対する隣接画素を読み出す。ステップS192において、隣接画素差分算出部143は、対象ブロックに対する隣接画素と参照ブロックに対する隣接画素との差分である隣接画素差分値を算出し、内蔵するバッファに蓄積する。
 ステップS193において、予測差分値生成部144は、予測差分値を生成する。すなわち、予測差分値生成部144は、図30のステップS179において取得された2次予測におけるイントラ予測モードで、隣接画素差分算出部143のバッファに蓄積された隣接画素差分値を用いて、イントラ予測を行い、予測差分値を生成する。生成された予測差分値は、動き予測・補償部122に出力される。
 ステップS194において、動き予測・補償部122は、ステップS191において生成した予測画像と、予測差分値生成部144からの予測差分値を加算し、スイッチ124に出力する。
 この予測画像と予測差分値は、図29のステップS139においてスイッチ124により、予測画像として演算部115に出力される。そして、この予測画像と予測差分値が、図29のステップS135において、演算部115により、逆直交変換部114からの差分情報と加算されることで、対象ブロックの画像が復号される。
 以上のように、画像符号化装置51および画像復号装置101において、動きベクトルの精度が小数画素精度の場合には、2次予測を行わないようにしたので、2次予測に伴う符号化効率の低下を抑制することができる。
 また、小数画素精度の場合には、2次予測フラグを送る必要がないので、2次予測の場合の符号化効率を向上させることができる。さらに、小数画素精度の場合には、2次予測フラグを見に行く必要がないので、その処理を減らすことができ、画像復号装置101の処理効率が上がる。
 なお、上記説明においては、H.264/AVC方式のイントラ4×4予測モードを例に説明したが、本発明は、これに限らず、ブロックベースの動き予測・補償を行うあらゆる符号化装置および復号装置について適用可能である。また、本発明は、イントラ8×8予測モード、イントラ16×16予測モード、および色差信号に対するイントラ予測モードへの適用も可能である。
 さらに、本発明は、H.264/AVC方式のように、1/4画素精度の動き予測を行う場合のみならず、MPEGのように、1/2画素精度の動き予測を行う場合にも適用することができる。あるいは、本発明は、非特許文献1に記載のように、1/8画素精度の動き予測を行う場合にも適用することができる。
 以上においては、符号化方式としてH.264/AVC方式を用いるようにしたが、その他の符号化方式/復号方式を用いることもできる。
 なお、本発明は、例えば、MPEG、H.26x等の様に、離散コサイン変換等の直交変換と動き補償によって圧縮された画像情報(ビットストリーム)を、衛星放送、ケーブルテレビジョン、インターネット、または携帯電話機などのネットワークメディアを介して受信する際に用いられる画像符号化装置および画像復号装置に適用することができる。また、本発明は、光、磁気ディスク、およびフラッシュメモリのような記憶メディア上で処理する際に用いられる画像符号化装置および画像復号装置に適用することができる。さらに、本発明は、それらの画像符号化装置および画像復号装置などに含まれる動き予測補償装置にも適用することができる。
 上述した一連の処理は、ハードウエアにより実行することもできるし、ソフトウエアにより実行することもできる。一連の処理をソフトウエアにより実行する場合には、そのソフトウエアを構成するプログラムが、コンピュータにインストールされる。ここで、コンピュータには、専用のハードウエアに組み込まれているコンピュータや、各種のプログラムをインストールすることで、各種の機能を実行することが可能な汎用のパーソナルコンピュータなどが含まれる。
 図32は、上述した一連の処理をプログラムにより実行するコンピュータのハードウエアの構成例を示すブロック図である。
 コンピュータにおいて、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 動き予測・補償部, 76 2次予測部, 77 動きベクトル精度判定部, 78 予測画像選択部, 81 1次残差バッファ, 82 2次残差生成部, 83 隣接画素予測部, 84 スイッチ, 101 画像復号装置, 112 可逆復号部, 121 イントラ予測部, 122 動き予測・補償部, 123 2次予測部, 124 スイッチ, 141 対象ブロックに対する隣接画素バッファ, 142 参照ブロックに対する隣接画素バッファ, 143 隣接画素差分算出部, 144 予測差分値生成部

Claims (13)

  1.  対象フレームにおける対象ブロックの動きベクトル情報の精度が整数画素精度である場合、前記対象ブロックと参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックとの差分情報と、前記対象ブロックに隣接する対象隣接画素と前記参照ブロックに隣接する参照隣接画素との差分情報との間で2次予測処理を行い、2次差分情報を生成する2次予測手段と、
     前記2次予測手段により生成された前記2次差分情報を符号化する符号化手段と
     を備える画像処理装置。
  2.  前記対象画像差分情報の符号化と前記2次予測手段により生成された前記2次差分情報の符号化とのうちどちらが符号化効率がよいかを判定する符号化効率判定手段を
     さらに備え、
     前記符号化手段は、前記符号化効率判定手段により前記2次差分情報の符号化が符号化効率がよいと判定された場合のみ、前記2次予測手段により生成された2次差分情報と、前記2次予測処理を行うことを示す2次予測フラグとを符号化する
     請求項1に記載の画像処理装置。
  3.  前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向の精度が小数画素精度である場合かつ前記2次予測処理におけるイントラ予測モードが垂直予測モードである場合、前記2次予測処理を行う
     請求項2に記載の画像処理装置。
  4.  前記2次予測手段は、前記対象ブロックの動きベクトル情報の水平方向の精度が小数画素精度である場合かつ前記2次予測処理におけるイントラ予測モードが水平予測モードである場合、前記2次予測処理を行う
     請求項2に記載の画像処理装置。
  5.  前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向および水平方向の少なくとも一方の精度が小数画素精度である場合かつ前記2次予測処理におけるイントラ予測モードがDC予測モードである場合、前記2次予測処理を行う
     請求項2に記載の画像処理装置。
  6.  前記2次予測手段は、
     前記対象隣接画素と前記参照隣接画素との差分情報を用いて予測を行い、前記対象ブロックに対するイントラ予測画像を生成する隣接画素予測手段と、
     前記対象ブロックと前記参照ブロックとの差分情報と前記隣接画素予測手段により生成された前記イントラ予測画像とを差分して、前記2次差分情報を生成する2次差分生成手段と
     を備える請求項1に記載の画像処理装置。
  7.  画像処理装置が、
     対象フレームにおける対象ブロックの動きベクトル情報の精度が整数画素精度である場合、前記対象ブロックと参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックとの差分情報と、前記対象ブロックに隣接する対象隣接画素と前記参照ブロックに隣接する参照隣接画素との差分情報との間で2次予測処理を行い、2次差分情報を生成し、
     前記2次予測処理により生成された前記2次差分情報を符号化するステップ
     を含む画像処理方法。
  8.  符号化された対象フレームにおける対象ブロックの画像と、参照フレームにおいて前記対象ブロックについて検出された動きベクトル情報とを復号する復号手段と、
     前記復号手段により復号された前記動きベクトル情報が整数画素精度である場合、前記対象ブロックに隣接する対象隣接画素と、前記参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素との差分情報を用いて2次予測処理を行い、予測画像を生成する2次予測手段と、
     前記対象ブロックの画像、前記2次予測手段により生成された前記予測画像と、前記動きベクトル情報から求められる前記参照ブロックの画像とを加算して、前記対象ブロックの復号画像を生成する演算手段と
     を備える画像処理装置。
  9.  前記2次予測手段は、前記復号手段により復号される前記2次予測処理を行うことを示す2次予測フラグを取得し、前記2次予測フラグに応じて、前記2次予測処理を行う
     請求項8に記載の画像処理装置。
  10.  前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向の精度が小数画素精度である場合かつ前記復号手段により復号される前記2次予測処理におけるイントラ予測モードが垂直予測モードである場合、前記2次予測フラグに応じて、前記2次予測処理を行う
     請求項9に記載の画像処理装置。
  11.  前記2次予測手段は、前記対象ブロックの動きベクトル情報の水平方向の精度が小数画素精度である場合かつ前記復号手段により復号される前記2次予測処理におけるイントラ予測モードが水平予測モードである場合、前記2次予測フラグに応じて、前記2次予測処理を行う
     請求項9に記載の画像処理装置。
  12.  前記2次予測手段は、前記対象ブロックの動きベクトル情報の垂直方向および水平方向の少なくとも一方の精度が小数画素精度である場合かつ前記復号手段により復号される前記2次予測処理におけるイントラ予測モードがDC予測モードである場合、前記2次予測フラグに応じて、前記2次予測処理を行う
     請求項9に記載の画像処理装置。
  13.  画像処理装置が、
     符号化された対象フレームにおける対象ブロックの画像と、参照フレームにおいて前記対象ブロックについて検出された動きベクトル情報とを復号し、
     復号された前記動きベクトル情報が整数画素精度である場合、前記対象ブロックに隣接する対象隣接画素と、前記参照フレームにおいて前記動きベクトル情報により前記対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素との差分情報を用いて2次予測処理を行い、予測画像を生成し、
     前記対象ブロックの画像、生成された前記予測画像と、前記動きベクトル情報から求められる前記参照ブロックの画像とを加算して、前記対象ブロックの復号画像を生成するステップ
     を含む画像処理方法。
PCT/JP2010/057126 2009-04-24 2010-04-22 画像処理装置および方法 Ceased WO2010123055A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2010800174713A CN102396232A (zh) 2009-04-24 2010-04-22 图像处理装置和方法
US13/264,944 US20120033737A1 (en) 2009-04-24 2010-04-22 Image processing device and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-105936 2009-04-24
JP2009105936A JP2010258739A (ja) 2009-04-24 2009-04-24 画像処理装置および方法、並びにプログラム

Publications (1)

Publication Number Publication Date
WO2010123055A1 true WO2010123055A1 (ja) 2010-10-28

Family

ID=43011171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/057126 Ceased WO2010123055A1 (ja) 2009-04-24 2010-04-22 画像処理装置および方法

Country Status (5)

Country Link
US (1) US20120033737A1 (ja)
JP (1) JP2010258739A (ja)
CN (1) CN102396232A (ja)
TW (1) TW201127066A (ja)
WO (1) WO2010123055A1 (ja)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5592779B2 (ja) * 2010-12-22 2014-09-17 日本電信電話株式会社 画像符号化方法、画像復号方法、画像符号化装置、及び画像復号装置
JP5594841B2 (ja) * 2011-01-06 2014-09-24 Kddi株式会社 画像符号化装置及び画像復号装置
JP5592295B2 (ja) * 2011-03-09 2014-09-17 日本電信電話株式会社 画像符号化方法,画像符号化装置,画像復号方法,画像復号装置およびそれらのプログラム
EP3515077B1 (en) * 2012-04-13 2020-09-09 JVC KENWOOD Corporation Picture decoding device, picture decoding method, picture decoding program, picture coding device, picture coding method, and picture coding program
CN103533324B (zh) 2012-07-03 2017-04-05 乐金电子(中国)研究开发中心有限公司 一种深度图像帧内编码方法、装置及编码器
JP6635751B2 (ja) * 2015-10-26 2020-01-29 キヤノン株式会社 画像符号化装置及びその制御方法、並びにプログラム及び記憶媒体
CN109121465B (zh) 2016-05-06 2023-06-06 交互数字麦迪逊专利控股公司 用于运动补偿残差预测的系统和方法
US20220337865A1 (en) * 2019-09-23 2022-10-20 Sony Group Corporation Image processing device and image processing method
CN114071157A (zh) * 2020-07-29 2022-02-18 Oppo广东移动通信有限公司 帧间预测方法、编码器、解码器以及计算机存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2240118C (en) * 1997-06-09 2005-11-22 Hitachi Ltd. Image sequence coding method and decoding method
JP3880985B2 (ja) * 2004-08-05 2007-02-14 松下電器産業株式会社 動きベクトル検出装置および動きベクトル検出方法
US8761250B2 (en) * 2004-09-15 2014-06-24 Orange Method of estimating motion in sequences of moving images using deformable meshes, video coder and decoder implementing the method
KR101330630B1 (ko) * 2006-03-13 2013-11-22 삼성전자주식회사 최적인 예측 모드를 적응적으로 적용하여 동영상을부호화하는 방법 및 장치, 동영상을 복호화하는 방법 및장치
CN101137065A (zh) * 2006-09-01 2008-03-05 华为技术有限公司 图像编码方法、解码方法、编码器、解码器、编解码方法及编解码器
CN101193090B (zh) * 2006-11-27 2011-12-28 华为技术有限公司 信号处理方法及其装置
KR100949917B1 (ko) * 2008-05-28 2010-03-30 한국산업기술대학교산학협력단 적응적 인트라 예측을 통한 고속 부호화 방법 및 시스템

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Document VCEG-AI27, Video Coding Experts Group (VCEG) 35th Meeting: Berlin, Germany, 2008.07", article SIJIA CHEN ET AL.: "Second Order Prediction (SOP) in P Slice, ITU - Telecommunications Standardization SectorSTUDY GROUP 16 Question 6" *
"Document VCEG-AJ27, Video Coding Experts Group (VCEG) 36th Meeting: San Diego, California, 2008.10", article SHANGWEN LI ET AL.: "Additional Results of Second Order Prediction (SOP) in P Slice, ITU - Telecommunications Standardization SectorSTUDY GROUP 16 Question 6" *

Also Published As

Publication number Publication date
CN102396232A (zh) 2012-03-28
US20120033737A1 (en) 2012-02-09
TW201127066A (en) 2011-08-01
JP2010258739A (ja) 2010-11-11

Similar Documents

Publication Publication Date Title
CN104320665B (zh) 图像处理设备和方法
CN102415098B (zh) 图像处理设备和方法
WO2010001916A1 (ja) 画像処理装置および方法
JP2010268259A (ja) 画像処理装置および方法、並びにプログラム
WO2010001917A1 (ja) 画像処理装置および方法
JP2010035137A (ja) 画像処理装置および方法、並びにプログラム
WO2010123055A1 (ja) 画像処理装置および方法
WO2010123057A1 (ja) 画像処理装置および方法
JP5488684B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
JP5488685B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
AU2017204660A1 (en) Image processing apparatus and method
JP6102977B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
JP5776804B2 (ja) 画像処理装置および方法、並びに記録媒体
JP6102978B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
JP5776803B2 (ja) 画像処理装置および方法、並びに記録媒体

Legal Events

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

Ref document number: 201080017471.3

Country of ref document: CN

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

Ref document number: 10767112

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13264944

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10767112

Country of ref document: EP

Kind code of ref document: A1