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

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

Info

Publication number
WO2010035731A1
WO2010035731A1 PCT/JP2009/066489 JP2009066489W WO2010035731A1 WO 2010035731 A1 WO2010035731 A1 WO 2010035731A1 JP 2009066489 W JP2009066489 W JP 2009066489W WO 2010035731 A1 WO2010035731 A1 WO 2010035731A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
prediction
template
unit
inter
Prior art date
Application number
PCT/JP2009/066489
Other languages
English (en)
French (fr)
Inventor
佐藤 数史
矢ケ崎 陽一
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Priority to JP2010530845A priority Critical patent/JPWO2010035731A1/ja
Priority to US13/119,719 priority patent/US20110176741A1/en
Priority to CN2009801361589A priority patent/CN102160379A/zh
Publication of WO2010035731A1 publication Critical patent/WO2010035731A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • the present invention relates to an image processing apparatus and method, and more particularly, to an image processing apparatus and method capable of performing weighted prediction based on local properties of an image.
  • MPEG compressed by orthogonal transform such as discrete cosine transform and motion compensation is used for the purpose of efficient transmission and storage of information.
  • a device that compresses and encodes an image using a method such as Moving (Pictures Experts Group) phase) is becoming popular.
  • MPEG2 ISO / IEC 13818-2
  • ISO / IEC 13818-2 is defined as a general-purpose image coding system, and is a standard that covers both interlaced and progressively scanned images, standard resolution images, and high-definition images. And widely used in a wide range of applications for consumer use.
  • MPEG2 compression method for example, a standard resolution interlaced scanning image having 720 ⁇ 480 pixels is 4 to 8 Mbps, and a high resolution interlaced scanning image having 1920 ⁇ 1088 pixels is 18 to 22 Mbps. (Bit rate) can be assigned to achieve a high compression rate and good image quality.
  • This MPEG2 was mainly intended for high-quality encoding suitable for broadcasting, but it does not support encoding with a lower code amount (bit rate) than MPEG1, that is, a higher compression rate.
  • bit rate code amount
  • MPEG4 encoding method has been standardized accordingly.
  • the MPEG4 image coding system was approved as an international standard as ISO / IEC ⁇ 14496-2 in December 1998.
  • H.C. 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. This is the same as that of H. H.264 and MPEG-4 Part 10 (Advanced Video Coding, hereinafter referred to as AVC) have become international standards.
  • AVC Advanced Video Coding
  • this method for example, there is a method of generating predicted motion vector information of a motion compensation block to be encoded by a median operation using motion vector information of an adjacent motion compensation block that has already been encoded.
  • This method is called an inter-template matching method, and uses a decoded image for matching. Therefore, by setting a search range in advance, it is possible to perform the same processing in the encoding device and the decoding device. That is, in the decoding apparatus, by performing motion prediction by the inter template matching method, it is not necessary to have motion vector information in the image compression information from the encoding apparatus, and it is possible to suppress a decrease in encoding efficiency. is there.
  • motion compensation defined by the MPEG-2 encoding method or the like is used.
  • the luminance change between frames cannot be absorbed.
  • using the frame Y 0 of encoded when performing motion compensation of the frame X to be coded luminance difference frame Y 0 and frame X may appear as noise (the prediction error). As a result, the encoding efficiency decreases.
  • Weighted Prediction a motion compensation method called Weighted Prediction
  • P (L0) is a predicted image extracted from the List0 reference frame indicated by the motion vector information, and w 0 and d 0 are respectively included in the image compression information. It is a weighting coefficient and an offset value.
  • Equation (2) P (L0) and P (L1) are predicted images extracted from the List0 reference frame and the List1 reference frame indicated by the motion vector information, respectively.
  • w 0 and w 1 are weighting factors included during image compression in Explicit Weighted Prediction
  • d 0 is an offset value included in image compression information.
  • Equation (3) tb is the time interval between the L0 reference frame and the target frame to be encoded, as shown in FIG. 2, and td is the time interval between the L0 reference frame and the L1 reference frame.
  • POC Picture Order Count
  • the POC is not necessarily equally spaced on the time axis, and calculating the Implicit Weighted Prediction weight coefficient based on this may lead to a decrease in coding efficiency.
  • the same weighting factor and offset value used in Explicit Weighted Prediction and Implicit Weight Prediction are used in the same picture (slice), but the values are optimal for each block in the screen. It is not always a correct value.
  • the present invention has been made in view of such a situation, and makes it possible to perform weighted prediction based on local properties of an image.
  • An image processing apparatus includes a matching unit that performs a matching process using an inter-template matching method on a block of an image of a decoding target frame, and a weight using a pixel value of a template in the matching process by the matching unit Prediction means for performing prediction.
  • the image of the frame is a P picture, and the weighted prediction is Implicit Weighted Prediction.
  • the prediction means can perform the weighted prediction using a weighting coefficient calculated from the pixel value of the template.
  • Pred (A) w 0 ⁇ Pix (A ′) using the weighting coefficient w 0 when the pixel value of the region in the image of the reference frame between is Pix (A ′)
  • the predicted pixel value of the block can be calculated.
  • the calculating means can approximate the weighting coefficient w 0 to a value expressed in the form of X / (2 n ).
  • the prediction means can perform the weighted prediction using an offset calculated from the pixel value of the template.
  • Pred (A) Pred (A ′) + d 0 using the offset d 0 when the predicted pixel value of the region in the image of the reference frame between them is Pred (A ′).
  • the predicted pixel value of the block can be calculated.
  • the prediction means extracts information indicating that Implicit Weighted Prediction was performed as weighted prediction at the time of encoding from the header part of the P picture as the image of the frame, and according to the information, Implicit Weighted Prediction can be performed as weighted prediction.
  • a calculation means for calculating first and second weighting coefficients used for the weighted prediction from the pixel values of the template sets Ave_tmplt_Cur as the average value of the pixel values of the template, and the first reference plate and the first reference plate that are the regions in the image of the first reference frame that are referenced with the matching and have the highest correlation with the template. Equations when the average values of the pixel values of the second reference template, which is an area in the image of the two reference frames, are Ave_tmplt_L0 and Ave_tmplt_L1, respectively, and the first and second weighting coefficients are w 0 and w 1 , respectively.
  • the prediction means sets the predicted pixel value of the block to Pred_Cur, and has the same positional relationship as the positional relationship between the template and the block between the first reference template and the first reference
  • the normalized first values when the pixel values of the region in the image of the frame and the pixel values of the region in the image of the second reference frame between the second reference template are Pix_L0 and Pix_L1, respectively.
  • Formula using 1 weighting factor w 0 and the second weighting factor w 1 Pred_Cur w 0 ⁇ Pix_L0 + w 1 ⁇ Pix_L1
  • the predicted pixel value of the block can be calculated.
  • the calculating means can approximate the first weighting factor w 0 and the second weighting factor w 1 to values represented in the form of X / (2 n ).
  • the image processing apparatus performs a matching process by an inter template matching method on an image block of a decoding target frame, and performs weighting using a template pixel value in the matching process. Including the step of making a prediction.
  • An image processing apparatus uses a matching unit that performs an inter-template matching method for a block of an image of a decoding target frame, and a template pixel value in the matching process by the matching unit.
  • Prediction means for performing weighted prediction.
  • the image of the frame is a P picture, and the weighted prediction is Implicit Weighted Prediction.
  • the image processing apparatus performs a matching process using an inter-template matching method on an image block of a decoding target frame, and weights using a template pixel value in the matching process. Including the step of making a prediction.
  • a matching process using an inter-template matching method is performed on an image block of a decoding target frame, and weighted prediction using a template pixel value in the matching process is performed.
  • matching processing by the inter template matching method is performed on the block of the image of the encoding target frame, and weighted prediction using the template pixel value in the matching processing is performed.
  • FIG. 3 is a flowchart explaining the encoding process of the apparatus. It is a flowchart explaining the prediction process 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.
  • FIG. 3 shows a configuration of an embodiment of the image encoding device of the present invention.
  • 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, and an inverse quantization unit 68.
  • the prediction image selection unit 78 and the rate control unit 79 are configured.
  • inter template motion prediction / compensation unit 76 is referred to as an inter TP motion prediction / compensation unit 76.
  • the image encoding device 51 compresses and encodes an image using, for example, H.264 and AVC (hereinafter referred to as H.264 / AVC).
  • motion prediction / compensation is performed with variable block size. That is, in the H.264 / AVC format, one macro block composed of 16 ⁇ 16 pixels is converted into 16 ⁇ 16 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, or 8 as shown in FIG. It is possible to divide into any partition of ⁇ 8 pixels and have independent motion vector information. In addition, as shown in FIG. 4, the 8 ⁇ 8 pixel partition is divided into 8 ⁇ 8 pixel, 8 ⁇ 4 pixel, 4 ⁇ 8 pixel, or 4 ⁇ 4 pixel subpartitions, respectively. It is possible to have independent motion vector information.
  • position A indicates the position of integer precision pixels
  • positions b, c, and d indicate positions with 1/2 pixel precision
  • positions e1, e2, and e3 indicate positions with 1/4 pixel precision.
  • the pixel values at the positions b and d are obtained by the following equation (5) using a 6-tap FIR filter.
  • b and d are a pixel value at the position b and a pixel value at the position d, respectively.
  • the pixel value at the position c is obtained by the following equation (6) by applying a 6-tap FIR filter in the horizontal direction and the vertical direction.
  • the Clip processing is executed only once after the calculation of F in Expression (6), that is, the product-sum operation in both the horizontal direction and the vertical direction.
  • the pixel values at the positions e 1 to e 3 are obtained by linear interpolation as in the following equation (7).
  • A, a to d, e 1 to e 3 are respectively the pixel value at the position A, a to d, e 1 to e 3.
  • 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.
  • the quantized transform coefficient has variable length coding such as CAVLC (Context-based Adaptive Variable Length Coding) and lossless coding such as arithmetic coding such as CABAC (Context-based Adaptive Binary Arithmetic Coding). Applied and compressed.
  • the compressed image is output after being stored in the storage buffer 67.
  • 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 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).
  • the B picture and the P picture read from the screen rearrangement buffer 62 are supplied to the motion prediction / compensation unit 75 as images to be subjected to inter prediction (also referred to as inter processing).
  • the intra prediction unit 74 uses all the intra prediction modes that are candidates based on the image to be intra predicted read from the screen rearrangement buffer 62 and the image as the reference image supplied from the frame memory 72 via the switch 73. Intra prediction processing is performed to generate a predicted image.
  • the intra prediction unit 74 calculates cost function values for all candidate intra prediction modes.
  • the intra prediction unit 74 determines a prediction mode that gives the minimum value among the calculated cost function values 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 related to the optimal intra prediction mode to the lossless encoding unit 66.
  • the lossless encoding unit 66 variably 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 motion prediction / compensation unit 75 becomes a candidate based on the inter-predicted image read from the screen rearrangement buffer 62 and the reference image supplied from the frame memory 72 via the switch 73.
  • Motion vectors in all inter prediction modes are detected, and motion prediction and compensation processing is performed on the reference image based on the motion vectors to generate a predicted image.
  • the motion prediction / compensation unit 75 supplies the image supplied from the frame memory 72 via the switch 73 to the inter TP motion prediction / compensation unit 76.
  • the motion prediction / compensation unit 75 calculates cost function values for all candidate inter prediction modes.
  • the motion prediction / compensation unit 75 has a minimum value among the cost function value for the calculated inter prediction mode and the cost function value for the inter template prediction mode calculated by the inter TP motion prediction / compensation unit 76. Is determined as the optimum inter prediction mode.
  • the motion prediction / compensation unit 75 supplies the predicted image generated in the optimal inter prediction mode and its cost function value to the predicted image selection unit 78.
  • the motion prediction / compensation unit 75 and information related to the optimal inter prediction mode and information corresponding to the optimal inter prediction mode (motion vector) Information, reference frame information, template method information (details will be described later), and the like are output 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 inter TP motion prediction / compensation unit 76 uses the inter template matching method or the inter template weighted prediction method (details will be described later) based on the image supplied from the motion prediction / compensation unit 75 to perform motion prediction in the inter template prediction mode. And compensation processing. As a result, a predicted image is generated.
  • the inter template Weighted Prediction method is a method combining the inter template matching method and the Weighted Prediction method.
  • the weighting factor and offset value used in Weighted ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ Prediction in the inter template Weighted Prediction method are supplied by the weighting factor calculation unit 77. Note that there are Explicit Weighted Prediction and Implicit Weighted Prediction as Weighted Prediction.
  • the inter TP motion prediction / compensation unit 76 supplies the image supplied from the motion prediction / compensation unit 75 to the weight coefficient calculation unit 77. Further, the inter TP motion prediction / compensation unit 76 calculates a cost function value for the inter template prediction mode, and supplies the calculated cost function value, predicted image, and template method information to the motion prediction / compensation unit 75. To do.
  • the template method information is information indicating whether the inter template Weighted Prediction method or the inter template matching method is used as the motion prediction / compensation processing method by the inter TP motion prediction / compensation unit 76. .
  • the inter template Weighted Prediction method is adopted as the motion prediction / compensation processing method by the inter TP motion prediction / compensation unit 76
  • Implicit Weighted Prediction is adopted as Weighted Prediction or Explicit Weighted Prediction is adopted Is also included in the template method information.
  • the inter TP motion prediction / compensation unit 76 supplies the weight coefficient and offset value used in Explicit Weight Prediction to the motion prediction / compensation unit 75.
  • the predicted image generated using these weighting factors and offset values is selected by the predicted image selection unit 78, the weighting factor and the offset value are supplied to the lossless encoding unit 66 and subjected to lossless encoding processing. Inserted.
  • the weighting factor calculation unit 77 when Explicit Weighted Prediction is adopted as Weighted ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ Prediction of the inter template Weighted Prediction method, the weighting factor and the offset for each picture in the inter TP motion prediction / compensation unit 76 in the picture unit. The value is determined and supplied to the inter TP motion prediction / compensation unit 76.
  • the weight coefficient calculating unit 77 is based on the image supplied from the inter TP motion prediction / compensation unit 76 in units of inter template matching blocks. The weight coefficient or the offset value is calculated and supplied to the inter TP motion prediction / compensation unit 76. Details of the processing of the weighting coefficient calculation unit 77 will be described later.
  • 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.
  • the predicted image in the optimum prediction mode is selected and supplied to the calculation units 63 and 70.
  • 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.
  • 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, the motion prediction / compensation unit 75, and the inter TP motion prediction / compensation unit 76 each perform image prediction processing. That is, in step S21, the intra prediction unit 74 performs intra prediction processing in the intra prediction mode, and the motion prediction / compensation unit 75 performs motion prediction / compensation processing in the inter prediction mode, and the inter TP motion prediction / compensation unit 76. Performs motion prediction / compensation processing in the inter template prediction mode.
  • step S21 The details of the prediction processing in step S21 will be described later with reference to FIG. 7.
  • prediction processing is performed in all candidate prediction modes, and cost functions in all candidate prediction modes are performed. Each value is calculated. Then, based on the calculated cost function value, the optimal intra prediction mode is selected, and the predicted image generated by the intra prediction in the optimal intra prediction mode and its cost function value are supplied to the predicted image selection unit 78. Also, based on the calculated cost function value, the optimal inter prediction mode is determined from the inter prediction mode and the inter template prediction mode, and the predicted image generated in the optimal inter prediction mode and its cost function value are predicted. The image is supplied to the image selection unit 78.
  • 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.
  • the prediction mode is determined, and the predicted image of the determined optimal prediction mode is selected and supplied to the calculation units 63 and 70. As described above, this predicted image is used for the calculations in steps S13 and S18.
  • the prediction image selection information is supplied to the intra prediction unit 74 or the motion prediction / compensation unit 75.
  • the intra prediction unit 74 supplies information related to the optimal intra prediction mode to the lossless encoding unit 66.
  • the motion prediction / compensation unit 75 When the prediction image in the optimal inter prediction mode is selected, the motion prediction / compensation unit 75 includes information on the optimal inter prediction mode and information corresponding to the optimal inter prediction mode (motion vector information, reference frame information, template method information). , Weighting coefficient, offset value, etc.) are output to the lossless encoding unit 66.
  • the motion prediction / compensation unit 75 performs information indicating the inter prediction mode (hereinafter referred to as inter prediction mode information as appropriate), a motion vector.
  • inter prediction mode information information indicating the inter prediction mode
  • Information and reference frame information are output to the lossless encoding unit 66.
  • the motion prediction / compensation unit 75 stores information indicating the inter template prediction mode (hereinafter referred to as inter template prediction mode information as appropriate).
  • the template method information is output to the lossless encoding unit 66.
  • the motion prediction / compensation unit 75 also outputs a weighting factor and an offset value to the lossless encoding unit 66.
  • the lossless encoding unit 66 encodes the quantized transform coefficient output from the quantization unit 65. That is, the difference image is subjected to lossless encoding such as variable length encoding and arithmetic encoding, and is compressed.
  • lossless encoding such as variable length encoding and arithmetic encoding
  • Mode information, motion vector information, reference frame information, template method information, weighting factors, offset values, etc. are also encoded and added to the header information.
  • step S24 the accumulation buffer 67 accumulates the compressed 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 process in step S31 The details of the intra prediction process in step S31 will be described later with reference to FIG. 18. With this process, intra prediction is performed in all candidate intra prediction modes, and for all candidate intra prediction modes. A cost function value is calculated.
  • step S32 the intra prediction unit 74 compares the cost function values for all the intra prediction modes that are candidates calculated in step S31, and determines the prediction mode that gives the minimum value as the optimal intra prediction mode. . Then, 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 decoded image to be referred to is read from the frame memory 72 and the motion prediction / compensation unit 75 is read via the switch 73. To be supplied. Based on these images, in step S33, the motion prediction / compensation unit 75 performs an inter motion prediction process. That is, the motion prediction / compensation unit 75 refers to the decoded image supplied from the frame memory 72 and performs motion prediction processing in all candidate inter prediction modes.
  • step S33 The details of the inter motion prediction process in step S33 will be described later with reference to FIG. 19.
  • the motion prediction process is performed in all candidate inter prediction modes, and all candidate inter prediction modes are set.
  • a cost function value is calculated.
  • the processing target image supplied from the screen rearrangement buffer 62 is an image to be inter-processed
  • the decoded image to be referred to and read from the frame memory 72 is the switch 73 and the motion prediction / compensation unit. It is also supplied to the inter TP motion prediction / compensation unit 76 via 75. Based on these images, the inter TP motion prediction / compensation unit 76 and the weight coefficient calculation unit 77 perform inter template motion prediction processing in the inter template prediction mode in step S34.
  • step S34 Details of the inter template motion prediction process in step S34 will be described later with reference to FIG. 23.
  • the motion prediction process is performed in the inter template prediction mode, and the cost function value is calculated for the inter template prediction mode. Is done.
  • the predicted image generated by the motion prediction process in the inter template prediction mode and its cost function value are supplied to the motion prediction / compensation unit 75.
  • step S35 the motion prediction / compensation unit 75 obtains the cost function value for the optimal inter prediction mode selected in step S33 and the cost function value for the inter template prediction mode calculated in step S34.
  • the prediction mode giving the minimum value is determined as the optimum inter prediction mode.
  • the motion prediction / compensation unit 75 supplies the predicted image generated in the optimal inter prediction mode and its cost function value to the predicted image selection unit 78.
  • the luminance signal intra prediction modes include nine types of 4 ⁇ 4 pixel block units and four types of 16 ⁇ 16 pixel macroblock unit prediction modes. As shown in FIG. 8, in the case of the 16 ⁇ 16 pixel intra prediction mode, the DC components of each block are collected to generate a 4 ⁇ 4 matrix, which is further subjected to orthogonal transformation.
  • an 8 ⁇ 8 pixel block prediction mode is defined for the 8th-order DCT block, but this method uses the 4 ⁇ 4 pixel intra prediction mode described below. According to the method.
  • FIG. 9 and FIG. 10 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 read from the screen rearrangement buffer 62, and the pixel values A to M are decoded before the deblocking filter processing that is read from the frame memory 72 as a reference image. This is the pixel value of the image.
  • the predicted pixel values of the pixels a to p are generated as follows using the pixel values A to M of the pixels belonging to the adjacent blocks.
  • the pixel value “available” means that the pixel value is “unavailable”, indicating that the pixel value can be used without any reason such as the end of the image frame or not yet encoded. “Present” indicates that the image is not usable because it is at the edge of the image frame or has not been encoded yet.
  • Mode 0 is VerticalVerPrediction, and is applied only when the pixel values A to D are available “available”.
  • the predicted pixel values of the pixels a to p are obtained by the following equation (8).
  • Mode 1 is Horizontal Prediction, and is applied only when the pixel values I to L are available “available”.
  • the predicted pixel values of the pixels a to p are obtained by the following equation (9).
  • Mode 2 is DC Prediction, and when the pixel values A, B, C, D, I, J, K, and L are all “available”, the predicted pixel value is obtained by Expression (10).
  • Mode 3 is Diagonal_Down_Left Prediction, 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 (13).
  • Mode 4 is Diagonal_Down_Right Prediction, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (14).
  • Mode 5 is Diagonal_Vertical_Right Prediction, 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 6 is Horizontal_Down Prediction, 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 7 is Vertical_Left Prediction, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (17).
  • Mode 8 is Horizontal_Up Prediction, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”.
  • the predicted pixel values of the pixels a to p are generated as in the following Expression (18).
  • a target block C that is an encoding target and includes 4 ⁇ 4 pixels is illustrated, and a block A and a block B that are 4 ⁇ 4 pixels adjacent to the target block C are illustrated.
  • Intra_4x4_pred_mode in the target block C and Intra_4x4_pred_mode in the block A and the block B are highly correlated.
  • Intra_4x4_pred_mode in the block A and the block B are respectively Intra_4x4_pred_modeA and Intra_4x4_pred_modeB, and MostProbableMode is defined as the following equation (19).
  • 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.
  • FIG. 14 and FIG. 15 are diagrams showing 16 ⁇ 16 pixel intra prediction modes (Intra_16 ⁇ 16_pred_mode) of four types of luminance signals.
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (21).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (22).
  • the predicted pixel value Pred (x, y) of each pixel is generated as in the following Expression (23).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (26).
  • FIG. 17 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 target macroblock A (the color difference signal of the color difference signal) is processed.
  • the predicted pixel value Pred (x, y) of each pixel is generated as in the following equation (27).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (30).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (31).
  • the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (32).
  • 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. There are four types of 8 ⁇ 8 pixel block mode prediction modes.
  • the color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode.
  • the 4 ⁇ 4 pixel and 8 ⁇ 8 pixel intra prediction modes of the luminance signal one intra prediction mode is defined for each block of the luminance signal of 4 ⁇ 4 pixels and 8 ⁇ 8 pixels.
  • the 16 ⁇ 16 pixel intra prediction mode for luminance signals and the intra prediction mode for color difference signals one prediction mode is defined for one macroblock.
  • Prediction mode 2 is average value prediction.
  • step S31 of FIG. 7, which is a process performed for these prediction modes, will be described with reference to the flowchart of FIG.
  • a case of a luminance signal will be described as an example.
  • step S41 the intra prediction unit 74 performs intra prediction for each of the 4 ⁇ 4 pixel, 8 ⁇ 8 pixel, and 16 ⁇ 16 pixel intra prediction modes of the luminance signal described above.
  • the case of the 4 ⁇ 4 pixel intra prediction mode will be described with reference to FIG. 12 described above.
  • the image to be processed for example, pixels a to p
  • decoded images pixel values A to M
  • Pixel is read from the frame memory 72 and supplied to the intra prediction unit 74 via the switch 73.
  • the intra prediction unit 74 performs intra prediction on the pixels of the block to be processed. 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 by the deblocking filter 71 are used as decoded pixels to be referred to (pixels having pixel values A to M).
  • 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 as defined by JM (Joint Model) which is reference software in the H.264 / AVC method, the cost function value is determined based on either the High Complexity Mode or the Low Complexity Mode. .
  • the encoding process is temporarily performed for all candidate prediction modes, and the cost function value represented by the following equation (33) is set in each prediction mode.
  • the prediction mode that calculates and gives the minimum value is selected as the optimum prediction mode.
  • D is the difference (distortion) between the original image and the decoded image
  • R is the amount of generated code including up to the orthogonal transform coefficient
  • is the Lagrange multiplier given as a function of the quantization parameter QP.
  • step S41 prediction image generation and header bits such as motion vector information and prediction mode information are calculated for all candidate prediction modes.
  • the cost function value represented by the equation (34) is calculated for each prediction mode, and the prediction mode that gives the minimum value is selected as the optimum prediction mode.
  • D is the difference (distortion) between the original image and the decoded image
  • Header_Bit is the 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 with reference to FIG. 11, 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 four types of prediction modes. Therefore, the intra prediction unit 74 selects the optimal intra 4 ⁇ 4 prediction mode, the optimal intra 8 ⁇ 8 prediction mode, and the optimal intra 16 ⁇ 16 prediction mode from among the cost function values calculated in step S42. decide.
  • the intra prediction unit 74 calculates the cost calculated in step S42 from among the optimal modes determined for the 4 ⁇ 4 pixel, 8 ⁇ 8 pixel, and 16 ⁇ 16 pixel intra prediction modes in step S44.
  • One intra prediction mode is selected based on the function value. That is, an intra prediction mode having a minimum cost function value is selected from the optimum modes determined for 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, and 16 ⁇ 16 pixels.
  • 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. To do. 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. By this motion prediction and compensation processing, a prediction image in each inter prediction mode is generated.
  • step S53 the motion prediction / compensation unit 75 adds motion vector information for adding to the compressed image the motion vectors determined for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. Is generated.
  • a method of generating motion vector information by the H.264 / AVC format will be described with reference to FIG.
  • a target block E to be encoded for example, 16 ⁇ 16 pixels
  • blocks A to D that have already been encoded and are adjacent to the target block E are illustrated.
  • 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.
  • predicted motion vector information (predicted value of motion vector) pmvE for the target block E is obtained by the following equation (35) by median operation using motion vector information regarding blocks A, B, and C.
  • the motion vector information regarding the block C is not available (because it is at the edge of the image frame or not yet encoded).
  • the motion vector information regarding the block C is The motion vector information regarding D is substituted.
  • the data mvdE added to the header part of the compressed image as motion vector information for the target block E is obtained by the following equation (36) using pmvE.
  • processing is performed independently for each of the horizontal and vertical components of the motion vector information.
  • the motion vector information is generated by generating the motion vector information and adding the difference between the motion vector information and the motion vector information generated by the correlation with the adjacent block to the header portion of the compressed image. Can be reduced.
  • the motion vector information generated as described above is also used when calculating the cost function value in the next step S54.
  • the inter prediction mode information and the reference frame information are output to the lossless encoding unit 66.
  • step S54 the motion prediction / compensation unit 75 performs the above-described Expression (33) or Expression (34) for each of the eight types of inter prediction modes including 16 ⁇ 16 pixels to 4 ⁇ 4 pixels. ) Is calculated.
  • the cost function value calculated here is used when determining the optimal inter prediction mode in step S35 of FIG. 7 described above.
  • the calculation of the cost function value for the inter prediction mode includes evaluation of the cost function values of Skip Mode and Direct Mode defined in the H.264 / AVC format.
  • a target frame to be encoded and a reference frame to be referred to when searching for a motion vector are shown.
  • a target frame a target block A to be encoded and a template region B that is adjacent to the target block A and includes already encoded pixels are shown. That is, when the encoding process is performed in the raster scan order, the template area B is an area located on the left and upper side of the target block A, as shown in FIG. 21, and the decoded image is accumulated in the frame memory 72. It is an area.
  • the inter TP motion prediction / compensation unit 76 performs a matching process using, for example, SAD (Sum of Absolute Difference) etc. within a predetermined search range E on the reference frame, and the correlation with the pixel value of the template region B Search for the highest region B ′. Then, the inter TP motion prediction / compensation unit 76 searches for the motion vector P for the target block A using the block A ′ corresponding to the searched region B ′ as a predicted image for the target block A. That is, in the inter template matching method, by performing a template matching process that is an encoded region, the motion vector of the encoding target block is searched to predict the motion of the encoding target block.
  • SAD Sud of Absolute Difference
  • the motion vector search process by the inter template matching method uses a decoded image for the template matching process, by setting a predetermined search range E in advance, the image encoding apparatus 51 of FIG. It is possible to perform the same processing in the image decoding apparatus. That is, in the image decoding apparatus, by configuring the inter TP motion prediction / compensation unit, it is not necessary to send the information of the motion vector P for the target block A to the image decoding apparatus, so that the motion vector information in the compressed image is reduced. can do.
  • the predetermined search range E is, for example, a search range centered on a motion vector (0, 0). Further, for example, as described above with reference to FIG. 20, the predetermined search range E may be a search range centered on predicted motion vector information generated by correlation with adjacent blocks. .
  • the prediction image obtained by the inter template matching method described above is the prediction image P (L0) of the List0 reference frame, and the image to be inter predicted
  • P (L0) of the List0 reference frame the prediction image obtained by the inter template matching method described above
  • the prediction image P (L0) of the List0 reference frame is the prediction image P (L0) of the List0 reference frame, and the image to be inter predicted
  • the above-described calculation of the equation (1) is performed on the P picture.
  • two predicted images obtained by the above-described inter template matching method are a predicted image P (L0) of a List0 reference frame and a predicted image of a List1 reference frame, respectively.
  • P (L1) the above-described calculation of the equation (2) is performed. If Explicit Weighted Prediction is used as Weighted Prediction, the weighting factor and the offset value are values determined by the weighting factor calculating unit 77 in units of pictures.
  • a method for obtaining a predicted image based on a weighting factor there are two methods for obtaining a predicted image based on an offset value, and either method may be used.
  • the weighting factor calculating unit 77 calculates the average value of the pixel values of the template region B and the region B ′ (FIG. 21) in the inter template matching method, and Ave (B ), Ave (B '). Then, the weight coefficient calculation unit 77 obtains the weight coefficient w 0 by the following equation (37) using the average values Ave (B) and Ave (B ′).
  • the weighting coefficient w 0 has a different value for each template matching block even within the same P picture.
  • the inter TP motion prediction / compensation unit 76 uses the weight coefficient w 0 and the pixel value Pix (A ′) of the block A ′ to calculate the predicted pixel value Pred (A) of the block A according to the following equation (38). Ask.
  • the inter TP motion prediction / compensation unit 76 since the inter TP motion prediction / compensation unit 76 generates a prediction image using the weighting coefficient w 0 obtained in units of template matching blocks, the prediction suitable for the property of the local pixel value in the screen is performed. An image can be generated.
  • weighting coefficient w 0 obtained by the equation (37) may be approximated to a value represented in the format of X / (2 n ). In this case, since division can be performed by bit shift, the amount of calculation of the weighted prediction process can be reduced.
  • the weighting factor calculation unit 77 obtains the offset value d 0 by the following equation (39) using the average values Ave (B) and Ave (B ′). .
  • the offset value d 0 becomes a different value for each template matching block even in the same P picture.
  • the inter TP motion prediction / compensation unit 76 uses the offset value d 0 and the predicted pixel value Pred (A ′) of the block A ′ to calculate the predicted pixel value Pred (A) of the block A according to the following equation (40). Ask for.
  • Pred (A) Pred (A ′) + d 0 ... (40)
  • the inter TP motion prediction / compensation unit 76 since the inter TP motion prediction / compensation unit 76 generates a prediction image using the offset value d 0 obtained in units of template matching blocks, the prediction suitable for the property of the local pixel value in the screen. An image can be generated.
  • the L0 reference frame and the L1 reference frame are used as the target frame to be encoded and the reference frame that is referred to when searching for a motion vector. Then, within a predetermined search range of the L0 reference frame, the same matching processing as in FIG. 21 is performed, block a 1 is the predicted image corresponding to the searched area b 1. Also, performed the same matching processing for the L1 reference frame, block a 2 corresponding to the searched region b 2 is the predicted image.
  • the weight coefficient calculation unit 77 calculates the average values of the pixel values of the template region B, the region b 1 , and the region b 2 and sets them as Ave_tmplt_Cur, Ave_tmplt_L0, and Ave_tmplt_L1, respectively. Then, the weight coefficient calculation unit 77 uses the average values Ave_tmplt_Cur, Ave_tmplt_L0, and Ave_tmplt_L1 to obtain the weight coefficients w 0 and w 1 according to the following equation (41).
  • weighting factor calculation unit 77 normalizes using Equation (42) below the weight coefficients w 0 and w 1 obtained by the equation (41).
  • the weight coefficients w 0 and w 1 have different values for each template matching block even in the same B picture.
  • the inter TP motion prediction / compensation unit 76 uses the weighting factors w 0 and w 1 , the pixel value Pix_L0 of the block a 1 , and the pixel value Pix_L1 of the block a 2 according to the following equation (43), A predicted pixel value Pred (A) is obtained.
  • the inter TP motion prediction / compensation unit 76 generates a predicted image using the weighting coefficients w 0 and w 1 obtained in units of template matching blocks.
  • a suitable prediction image can be generated.
  • weighting factors w 0 and w 1 obtained by the equation (42) may be approximated to a value expressed in the format of X / (2 n ). In this case, since division can be performed by bit shift, the amount of calculation of the weighted prediction process can be reduced.
  • the image encoding device 51 calculates the weight coefficient in Implicit Weighted Prediction, so even if the POC is not equally spaced, it is possible to calculate an appropriate weight coefficient without being confused by the value. Is possible. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • step S71 the inter TP motion prediction / compensation unit 76 searches for a motion vector by an inter template matching method.
  • the inter TP motion prediction / compensation unit 76 determines whether to adopt the inter template Weighted Prediction method as the motion prediction / compensation processing method.
  • step S73 the inter TP motion prediction / compensation unit 76 determines whether to adopt Explicit Weighted Prediction as Weighted Prediction. Determine whether.
  • step S 73 If it is determined in step S 73 that Explicit Weight Prediction is adopted as Weighted Prediction, the inter TP motion prediction / compensation unit 76 determines the weight coefficient and offset value determined in units of pictures by the weight coefficient calculation unit 77 in Step S 74. Then, using the reference frame block A or the blocks a1 and a2 indicated by the motion vector searched in step S71, a predicted image is generated by the above-described equation (1) or equation (2).
  • step S73 when it is determined in step S73 that Explicit Weighted Prediction is not adopted as Weighted Prediction, that is, Implicit Weighted Prediction is adopted as Weighted Prediction, the process proceeds to step S75.
  • step S ⁇ b> 75 the weighting factor calculation unit 77 calculates a weighting factor using the image supplied from the inter TP motion prediction / compensation unit 76.
  • the weighting factor calculating unit 77 calculates the weighting factor by the above-described equation (37) using the decoded images of the template region B and the region B ′. Further, when the image to be inter-predicted is a B picture, the weight coefficient calculation unit 77 uses the decoded images of the template region B, the region b 1 , and the region b 2 to obtain the above-described equations (41) and (42). To calculate the weighting coefficient. If the image to be inter-predicted is a P picture, the weighting factor calculation unit 77 uses the decoded images of the template region B and the region B ′ to calculate the offset value according to the above equation (39). May be.
  • step S76 the inter TP motion prediction / compensation unit 76 generates a predicted image by the above-described equation (38) or equation (43) using the weighting coefficient calculated in step S75.
  • the inter TP motion prediction / compensation unit 76 generates a predicted image by the above-described equation (40).
  • step S72 If it is determined in step S72 that the inter template Weighted Prediction method is not adopted as the motion prediction / compensation method, that is, if the inter template method is adopted as the motion prediction / compensation method, the process proceeds to step S77. Proceed to
  • step S77 the inter TP motion prediction / compensation unit 76 generates a prediction image based on the motion vector searched in step S71.
  • the inter TP motion prediction / compensation unit 76 directly uses the image of the region A ′ as a predicted image based on the motion vector P.
  • step S78 the inter TP motion prediction / compensation unit 76 calculates a cost function value for the inter template prediction mode.
  • the compressed image encoded by the image encoding device 51 is transmitted via a predetermined transmission path and decoded by the image decoding device.
  • FIG. 24 shows the configuration of an embodiment of such an image decoding apparatus.
  • 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 inter template motion prediction / compensation unit 123, the weight coefficient calculation unit 124, and the switch 125 are configured.
  • inter template motion prediction / compensation unit 123 is referred to as an inter TP motion prediction / compensation unit 123.
  • 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. 3 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 in 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 125 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. 3 is rearranged in the original display order.
  • the D / A conversion unit 118 performs D / A conversion on the image supplied from the screen rearrangement buffer 117, and outputs and displays the image on a display (not shown).
  • the switch 120 reads an image to be inter-coded and an image to be referred to from the frame memory 119, outputs the image to the motion prediction / compensation unit 122, and also reads an image used for intra prediction from the frame memory 119, 121 is supplied.
  • the intra prediction unit 121 is supplied with information about the intra prediction mode obtained by decoding the header information from the lossless decoding unit 112. When the information regarding the intra prediction mode is supplied, the intra prediction unit 121 generates a prediction image based on this information. The intra prediction unit 121 outputs the generated predicted image to the switch 125.
  • prediction mode information (prediction mode information, motion vector information, reference frame information, template method information, weight coefficient, offset value, etc.) obtained by decoding header information is supplied from the lossless decoding unit 112 to the motion prediction / compensation unit 122. Is 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.
  • the motion prediction / compensation unit 122 When the inter template prediction mode information is supplied as the prediction mode information, the motion prediction / compensation unit 122 performs inter TP motion prediction / compensation on the inter-coded image read from the frame memory 119 and the image to be referred to. Is supplied to the unit 123 to perform motion prediction / compensation processing in the inter template prediction mode. At this time, the template method information supplied from the lossless decoding unit 112 is also supplied to the inter TP motion prediction / compensation unit 123. When the weighting coefficient and the offset value are supplied from the lossless decoding unit 112, the weighting coefficient and the offset value are also supplied to the inter TP motion prediction / compensation unit 123.
  • the motion prediction / compensation unit 122 outputs either the prediction image generated in the inter prediction mode or the prediction image generated in the inter template prediction mode to the switch 125 according to the prediction mode information.
  • the inter TP motion prediction / compensation unit 123 performs motion prediction in the inter template prediction mode according to the template method information supplied from the motion prediction / compensation unit 122, similarly to the inter TP motion prediction / compensation unit 76 of FIG. Perform compensation processing. That is, the inter TP motion prediction / compensation unit 123 uses the inter template Weighted Prediction method or the inter template matching method based on the inter-coded image read from the frame memory 119 and the image to be referred to. Perform motion prediction and compensation processing in prediction mode. As a result, a predicted image is generated.
  • the inter TP motion prediction / compensation unit 123 Using the weighting coefficient and offset value supplied from the prediction / compensation unit 122, a prediction image is generated in the same manner as the inter TP motion prediction / compensation unit 76 of FIG.
  • the inter TP motion prediction / compensation unit 123 includes the template region of the target frame in the inter template matching method, and the template An image of a reference frame region having a high correlation with the region is supplied to the weighting coefficient calculation unit 124. Then, the inter TP motion prediction / compensation unit 123 uses the weighting coefficient or the offset value supplied from the weighting coefficient calculation unit 124 according to the image to perform prediction in the same manner as the inter TP motion prediction / compensation unit 76 in FIG. Generate an image.
  • the weighting factor calculation unit 124 uses the template region supplied from the inter TP motion prediction / compensation unit 123 and the image of the reference frame region having a high correlation with the template region. A weighting factor or offset value is calculated.
  • the predicted image generated by the motion prediction / compensation in the inter template prediction mode is supplied to the motion prediction / compensation unit 122.
  • the switch 125 selects the prediction image generated by the motion prediction / compensation unit 122 or the intra prediction unit 121 and supplies the selected prediction image to the calculation unit 115.
  • 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. 3 are decoded.
  • motion vector information and prediction mode information (information indicating an intra prediction mode, an inter prediction mode, or an inter template prediction mode) are also decoded. That is, when the prediction mode information represents the intra prediction mode, the prediction mode information is supplied to the intra prediction unit 121. When the prediction mode information represents the inter prediction mode or the inter template prediction mode, the prediction mode information is supplied to the motion prediction / compensation unit 122. At this time, if there is corresponding motion vector information, reference frame information, template method information, weighting coefficient, offset value, etc., they are also supplied to the motion prediction / compensation unit 122.
  • 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. 3 (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 S139 described later and input via the switch 125 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, the motion prediction / compensation unit 122, or the inter TP motion prediction / compensation unit 123 performs an image prediction process corresponding to the prediction mode information supplied from the lossless decoding unit 112, respectively.
  • intra prediction mode information information representing the intra prediction mode
  • the intra prediction unit 121 performs an intra prediction process in the intra prediction mode.
  • the motion prediction / compensation unit 122 performs motion prediction / compensation processing in the inter prediction mode.
  • the inter template prediction mode information is supplied from the lossless decoding unit 112
  • the inter TP motion prediction / compensation unit 123 performs a motion prediction / compensation process in the inter template prediction mode.
  • step S138 the prediction image generated by the intra prediction unit 121, the prediction image generated by the motion prediction / compensation unit 122, or the inter TP
  • the predicted image generated by the motion prediction / compensation unit 123 is supplied to the switch 125.
  • step S139 the switch 125 selects a predicted image. That is, a prediction image generated by the intra prediction unit 121, a prediction image generated by the motion prediction / compensation unit 122, or a prediction image generated by the inter TP motion prediction / compensation unit 123 is supplied.
  • the 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 S171 that the target block is intra-coded, and the process proceeds to step S172. .
  • step S172 the intra prediction unit 121 acquires intra prediction mode information.
  • step S173 an image necessary for processing is read from the frame memory 119, and the intra prediction unit 121 performs intra prediction according to the intra prediction mode information acquired in step S172, and generates a predicted image. Then, the process ends.
  • step S171 if it is determined in step S171 that the intra encoding has not been performed, the process proceeds to step S174.
  • the image to be processed is an inter-processed image, a necessary image is read from the frame memory 119 and supplied to the motion prediction / compensation unit 122 via the switch 120.
  • step S174 the motion prediction / compensation unit 122 determines whether the target block is encoded by the inter template matching method.
  • the motion prediction / compensation unit 122 determines in step S174 that the target block is encoded by the inter template matching method. Then, the process proceeds to step S175.
  • step S175 the motion prediction / compensation unit 122 acquires template method information from the lossless decoding unit 112 and supplies the template scheme information to the inter TP motion prediction / compensation unit 123.
  • step S176 the inter TP motion prediction / compensation unit 123 searches for a motion vector using the inter template matching method.
  • step S177 the inter TP motion prediction / compensation unit 123 determines whether or not the target block is encoded by the inter template Weighted Prediction method. If the template method information acquired from the lossless decoding unit 112 represents that the inter template Weighted Prediction method is adopted as the motion prediction / compensation method, the inter TP motion prediction / compensation unit 123, in step S177, It is determined that the target block is encoded by the inter template Weighted Prediction method, and the process proceeds to step S178.
  • step S178 the inter TP motion prediction / compensation unit 123 determines whether Explicit Weighted Prediction is adopted as Weighted Prediction of the inter template Weighted Prediction method. If the template method information acquired from the lossless decoding unit 112 represents that Explicit Weighted Prediction is adopted as Weighted Prediction, it is determined in step S178 that Explicit Weighted Prediction is adopted as Weighted Prediction, The process proceeds to step S179.
  • step S179 the inter TP motion prediction / compensation unit 123 acquires the weighting coefficient and the offset value supplied from the lossless decoding unit 112 via the motion prediction / compensation unit 122.
  • step S180 the inter TP motion prediction / compensation unit 123 uses the weight coefficient and the offset value acquired in step S179 and the image corresponding to the motion vector searched in step S176, and then the above equation (1). Alternatively, a prediction image is generated using (2). Then, the process ends.
  • step S178 Explicit Weighted Prediction is not adopted as Weighted Prediction. Then, the process proceeds to step S181.
  • step S181 the weighting factor calculation unit 124 calculates the weighting factor using the above-described equation (37), equation (41), and equation (42).
  • the weighting factor calculation unit 77 may calculate an offset value using the above-described equation (39).
  • step S182 the inter TP motion prediction / compensation unit 123 generates a predicted image using the above-described equation (38) or equation (43) using the weighting coefficient calculated in step S181.
  • the inter TP motion prediction / compensation unit 123 generates a predicted image using the above-described equation (40). Then, the process ends.
  • step S177 the target block is encoded using the inter template Weighted17Prediction method. Therefore, the process proceeds to step S183.
  • step S183 the inter TP motion prediction / compensation unit 123 generates a predicted image based on the motion vector searched in step S176.
  • step S174 When the inter prediction mode information is supplied from the lossless decoding unit 112 to the motion prediction / compensation unit 122, it is determined in step S174 that the target block is not encoded by the inter template matching method, and the process proceeds to step S184. move on.
  • step S184 the motion prediction / compensation unit 122 acquires inter prediction mode information, reference frame information, and motion vector information from the lossless decoding unit 112.
  • step S185 the motion prediction / compensation unit 122 performs motion prediction in the inter prediction mode based on the inter prediction mode information, reference frame information, and motion vector information acquired in step S184, and generates a predicted image. Then, the process ends.
  • motion prediction is performed on an inter-predicted image by an inter template matching method that performs motion search using a decoded image.
  • High quality image quality can be displayed without sending vector information.
  • FIG. 27 is a diagram illustrating an example of an expanded macroblock size.
  • the macroblock size is expanded to 32 ⁇ 32 pixels.
  • a macro block composed of 32 ⁇ 32 pixels divided into blocks (partitions) of 32 ⁇ 32 pixels, 32 ⁇ 16 pixels, 16 ⁇ 32 pixels, and 16 ⁇ 16 pixels from the left. They are shown in order.
  • blocks composed of 16 ⁇ 16 pixels divided into blocks of 16 ⁇ 16 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, and 8 ⁇ 8 pixels are sequentially shown from the left. Yes.
  • an 8 ⁇ 8 pixel block divided into 8 ⁇ 8 pixel, 8 ⁇ 4 pixel, 4 ⁇ 8 pixel, and 4 ⁇ 4 pixel blocks is sequentially shown from the left. .
  • the 32 ⁇ 32 pixel macroblock can be processed in the 32 ⁇ 32 pixel, 32 ⁇ 16 pixel, 16 ⁇ 32 pixel, and 16 ⁇ 16 pixel blocks shown in the upper part of FIG.
  • the 16 ⁇ 16 pixel block shown on the right side of the upper row is H.264.
  • processing in blocks of 16 ⁇ 16 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, and 8 ⁇ 8 pixels shown in the middle stage is possible.
  • the 8 ⁇ 8 pixel block shown on the right side of the middle row is H.264.
  • processing in blocks of 8 ⁇ 8 pixels, 8 ⁇ 4 pixels, 4 ⁇ 8 pixels, and 4 ⁇ 4 pixels shown in the lower stage is possible.
  • the present invention can also be applied to the extended macroblock size proposed as described above.
  • the H.264 / AVC method is used as the encoding method / decoding method.
  • the present invention encodes an image using an encoding method / decoding method that performs motion prediction / compensation processing in units of other blocks. It can also be applied to a device / image decoding device.
  • image information compressed by orthogonal transformation such as discrete cosine transformation and motion compensation, such as MPEG, H.26x, satellite broadcasting, cable TV (television), Applied to image encoding and decoding devices used when receiving via the Internet and network media such as mobile phones, or when processing on storage media such as optical, magnetic disks, and flash memory can do.
  • the series of processes described above can be executed by hardware or software.
  • a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.
  • Program recording media that store programs that are installed in the computer and can be executed by the computer are magnetic disks (including flexible disks), optical disks (CD-ROM (Compact Disc-Read Only Memory), DVD (Digital Versatile). Disk), a magneto-optical disk), or a removable medium that is a package medium made of semiconductor memory, or a ROM or hard disk in which a program is temporarily or permanently stored.
  • the program is stored in the program recording medium using a wired or wireless communication medium such as a local area network, the Internet, or digital satellite broadcasting via an interface such as a router or a modem as necessary.
  • the steps for describing a program are not only processes performed in time series in the order described, but also processes that are executed in parallel or individually even if they are not necessarily processed in time series. Is also included.
  • the image encoding device 51 and the image decoding device 101 described above can be applied to any electronic device. Examples thereof will be described below.
  • FIG. 28 is a block diagram showing a main configuration example of a television receiver using the image decoding device to which the present invention is applied.
  • the terrestrial tuner 313 receives a broadcast wave signal of terrestrial analog broadcast via an antenna, demodulates it, acquires a video signal, and supplies it to the video decoder 315.
  • the video decoder 315 performs a decoding process on the video signal supplied from the terrestrial tuner 313 and supplies the obtained digital component signal to the video signal processing circuit 318.
  • the video signal processing circuit 318 performs predetermined processing such as noise removal on the video data supplied from the video decoder 315, and supplies the obtained video data to the graphic generation circuit 319.
  • the graphic generation circuit 319 generates video data of a program to be displayed on the display panel 321, image data based on processing based on an application supplied via a network, and the generated video data and image data to the panel drive circuit 320. Supply.
  • the graphic generation circuit 319 generates video data (graphic) for displaying a screen used by the user for selecting an item, and superimposing the video data on the video data of the program.
  • a process of supplying data to the panel drive circuit 320 is also performed as appropriate.
  • the panel drive circuit 320 drives the display panel 321 based on the data supplied from the graphic generation circuit 319, and causes the display panel 321 to display the video of the program and the various screens described above.
  • the display panel 321 includes an LCD (Liquid Crystal Display) or the like, and displays a program video or the like according to control by the panel drive circuit 320.
  • LCD Liquid Crystal Display
  • the television receiver 300 also includes an audio A / D (Analog / Digital) conversion circuit 314, an audio signal processing circuit 322, an echo cancellation / audio synthesis circuit 323, an audio amplification circuit 324, and a speaker 325.
  • an audio A / D (Analog / Digital) conversion circuit 3144 an audio signal processing circuit 322, an echo cancellation / audio synthesis circuit 323, an audio amplification circuit 324, and a speaker 325.
  • the terrestrial tuner 313 acquires not only the video signal but also the audio signal by demodulating the received broadcast wave signal.
  • the terrestrial tuner 313 supplies the acquired audio signal to the audio A / D conversion circuit 314.
  • the audio A / D conversion circuit 314 performs A / D conversion processing on the audio signal supplied from the terrestrial tuner 313, and supplies the obtained digital audio signal to the audio signal processing circuit 322.
  • the audio signal processing circuit 322 performs predetermined processing such as noise removal on the audio data supplied from the audio A / D conversion circuit 314 and supplies the obtained audio data to the echo cancellation / audio synthesis circuit 323.
  • the echo cancellation / voice synthesis circuit 323 supplies the voice data supplied from the voice signal processing circuit 322 to the voice amplification circuit 324.
  • the audio amplification circuit 324 performs D / A conversion processing and amplification processing on the audio data supplied from the echo cancellation / audio synthesis circuit 323, adjusts to a predetermined volume, and then outputs the audio from the speaker 325.
  • the television receiver 300 also has a digital tuner 316 and an MPEG decoder 317.
  • the digital tuner 316 receives a broadcast wave signal of digital broadcasting (terrestrial digital broadcasting, BS (Broadcasting Satellite) / CS (Communications Satellite) digital broadcasting) via an antenna, demodulates, and MPEG-TS (Moving Picture Experts Group). -Transport Stream) and supply it to the MPEG decoder 317.
  • digital broadcasting terrestrial digital broadcasting, BS (Broadcasting Satellite) / CS (Communications Satellite) digital broadcasting
  • MPEG-TS Motion Picture Experts Group
  • the MPEG decoder 317 releases the scramble applied to the MPEG-TS supplied from the digital tuner 316, and extracts a stream including program data to be played (viewing target).
  • the MPEG decoder 317 decodes the audio packet constituting the extracted stream, supplies the obtained audio data to the audio signal processing circuit 322, decodes the video packet constituting the stream, and converts the obtained video data into the video
  • the signal is supplied to the signal processing circuit 318.
  • the MPEG decoder 317 supplies EPG (Electronic Program Guide) data extracted from the MPEG-TS to the CPU 332 via a path (not shown).
  • the television receiver 300 uses the above-described image decoding device 101 as the MPEG decoder 317 that decodes the video packet in this way. Therefore, since the MPEG decoder 317 calculates the weight coefficient in Implicit Weighted Prediction as in the case of the image decoding device 101, an appropriate weight can be obtained without being confused by the value even when the POC is not equally spaced. The coefficient can be calculated. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the video data supplied from the MPEG decoder 317 is subjected to predetermined processing in the video signal processing circuit 318 as in the case of the video data supplied from the video decoder 315.
  • the video data that has been subjected to the predetermined processing is appropriately superposed on the generated video data in the graphic generation circuit 319 and supplied to the display panel 321 via the panel drive circuit 320 to display the image. .
  • the audio data supplied from the MPEG decoder 317 is subjected to predetermined processing in the audio signal processing circuit 322 as in the case of the audio data supplied from the audio A / D conversion circuit 314.
  • the audio data that has been subjected to the predetermined processing is supplied to the audio amplifying circuit 324 via the echo cancel / audio synthesizing circuit 323, and subjected to D / A conversion processing and amplification processing.
  • sound adjusted to a predetermined volume is output from the speaker 325.
  • the television receiver 300 also has a microphone 326 and an A / D conversion circuit 327.
  • the A / D conversion circuit 327 receives the user's voice signal captured by the microphone 326 provided in the television receiver 300 for voice conversation.
  • the A / D conversion circuit 327 performs A / D conversion processing on the received audio signal, and supplies the obtained digital audio data to the echo cancellation / audio synthesis circuit 323.
  • the echo cancellation / audio synthesis circuit 323 When the audio data of the user (user A) of the television receiver 300 is supplied from the A / D conversion circuit 327, the echo cancellation / audio synthesis circuit 323 performs echo cancellation on the audio data of the user A. . The echo cancellation / speech synthesis circuit 323 then outputs voice data obtained by synthesizing with other voice data after echo cancellation from the speaker 325 via the voice amplification circuit 324.
  • the television receiver 300 also includes an audio codec 328, an internal bus 329, an SDRAM (Synchronous Dynamic Random Access Memory) 330, a flash memory 331, a CPU 332, a USB (Universal Serial Bus) I / F 333, and a network I / F 334.
  • SDRAM Serial Dynamic Random Access Memory
  • USB Universal Serial Bus
  • the A / D conversion circuit 327 receives the user's voice signal captured by the microphone 326 provided in the television receiver 300 for voice conversation.
  • the A / D conversion circuit 327 performs A / D conversion processing on the received audio signal, and supplies the obtained digital audio data to the audio codec 328.
  • the audio codec 328 converts the audio data supplied from the A / D conversion circuit 327 into data of a predetermined format for transmission via the network, and supplies the data to the network I / F 334 via the internal bus 329.
  • the network I / F 334 is connected to the network via a cable attached to the network terminal 335.
  • the network I / F 334 transmits the audio data supplied from the audio codec 328 to another device connected to the network.
  • the network I / F 334 receives, for example, audio data transmitted from another device connected via the network via the network terminal 335, and receives it via the internal bus 329 to the audio codec 328. Supply.
  • the voice codec 328 converts the voice data supplied from the network I / F 334 into data of a predetermined format and supplies it to the echo cancellation / voice synthesis circuit 323.
  • the echo cancellation / speech synthesis circuit 323 performs echo cancellation on the voice data supplied from the voice codec 328 and synthesizes voice data obtained by synthesizing with other voice data via the voice amplification circuit 324. And output from the speaker 325.
  • the SDRAM 330 stores various data necessary for the CPU 332 to perform processing.
  • the flash memory 331 stores a program executed by the CPU 332.
  • the program stored in the flash memory 331 is read out by the CPU 332 at a predetermined timing such as when the television receiver 300 is activated.
  • the flash memory 331 also stores EPG data acquired via digital broadcasting, data acquired from a predetermined server via a network, and the like.
  • the flash memory 331 stores MPEG-TS including content data acquired from a predetermined server via a network under the control of the CPU 332.
  • the flash memory 331 supplies the MPEG-TS to the MPEG decoder 317 via the internal bus 329 under the control of the CPU 332, for example.
  • the MPEG decoder 317 processes the MPEG-TS similarly to the MPEG-TS supplied from the digital tuner 316. As described above, the television receiver 300 receives content data including video and audio via the network, decodes it using the MPEG decoder 317, displays the video, and outputs audio. Can do.
  • the television receiver 300 also includes a light receiving unit 337 that receives an infrared signal transmitted from the remote controller 351.
  • the light receiving unit 337 receives infrared rays from the remote controller 351 and outputs a control code representing the contents of the user operation obtained by demodulation to the CPU 332.
  • the CPU 332 executes a program stored in the flash memory 331, and controls the overall operation of the television receiver 300 according to a control code supplied from the light receiving unit 337.
  • the CPU 332 and each part of the television receiver 300 are connected via a path (not shown).
  • the USB I / F 333 transmits and receives data to and from an external device of the television receiver 300 connected via a USB cable attached to the USB terminal 336.
  • the network I / F 334 is connected to the network via a cable attached to the network terminal 335, and transmits / receives data other than audio data to / from various devices connected to the network.
  • the television receiver 300 can perform weighted prediction based on the local properties of an image by using the image decoding apparatus 101 as the MPEG decoder 317. As a result, the television receiver 300 can obtain and display a higher-definition decoded image from the broadcast wave signal received via the antenna or the content data obtained via the network.
  • FIG. 29 is a block diagram showing a main configuration example of a mobile phone using an image encoding device and an image decoding device to which the present invention is applied.
  • a cellular phone 400 shown in FIG. 29 includes a main control unit 450, a power supply circuit unit 451, an operation input control unit 452, an image encoder 453, a camera I / F unit 454, an LCD control, which are configured to comprehensively control each unit.
  • the mobile phone 400 includes an operation key 419, a CCD (Charge Coupled Devices) camera 416, a liquid crystal display 418, a storage unit 423, a transmission / reception circuit unit 463, an antenna 414, a microphone (microphone) 421, and a speaker 417.
  • CCD Charge Coupled Devices
  • the power supply circuit unit 451 starts up the mobile phone 400 to an operable state by supplying power from the battery pack to each unit.
  • the mobile phone 400 transmits / receives voice signals, sends / receives e-mails and image data in various modes such as a voice call mode and a data communication mode based on the control of the main control unit 450 including a CPU, a ROM, a RAM, and the like. Various operations such as shooting or data recording are performed.
  • the cellular phone 400 converts a voice signal collected by the microphone (microphone) 421 into digital voice data by the voice codec 459, performs a spectrum spread process by the modulation / demodulation circuit unit 458, and transmits and receives
  • the unit 463 performs digital / analog conversion processing and frequency conversion processing.
  • the cellular phone 400 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 414.
  • the transmission signal (voice signal) transmitted to the base station is supplied to the mobile phone of the other party via the public telephone line network.
  • the cellular phone 400 amplifies the received signal received by the antenna 414 by the transmission / reception circuit unit 463, further performs frequency conversion processing and analog-digital conversion processing, and performs spectrum despreading processing by the modulation / demodulation circuit unit 458. Then, the audio codec 459 converts it into an analog audio signal. The cellular phone 400 outputs an analog audio signal obtained by the conversion from the speaker 417.
  • the mobile phone 400 when transmitting an e-mail in the data communication mode, receives the text data of the e-mail input by operating the operation key 419 in the operation input control unit 452.
  • the cellular phone 400 processes the text data in the main control unit 450 and displays it on the liquid crystal display 418 as an image via the LCD control unit 455.
  • the cellular phone 400 generates e-mail data in the main control unit 450 based on text data received by the operation input control unit 452, user instructions, and the like.
  • the cellular phone 400 subjects the electronic mail data to spread spectrum processing by the modulation / demodulation circuit unit 458 and performs digital / analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 463.
  • the cellular phone 400 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 414.
  • the transmission signal (e-mail) transmitted to the base station is supplied to a predetermined destination via a network and a mail server.
  • the mobile phone 400 when receiving an e-mail in the data communication mode, receives and amplifies the signal transmitted from the base station by the transmission / reception circuit unit 463 via the antenna 414, and further performs frequency conversion processing and Analog-digital conversion processing.
  • the mobile phone 400 performs spectrum despreading processing on the received signal by the modulation / demodulation circuit unit 458 to restore the original e-mail data.
  • the cellular phone 400 displays the restored e-mail data on the liquid crystal display 418 via the LCD control unit 455.
  • the mobile phone 400 can record (store) the received e-mail data in the storage unit 423 via the recording / playback unit 462.
  • the storage unit 423 is an arbitrary rewritable storage medium.
  • the storage unit 423 may be a semiconductor memory such as a RAM or a built-in flash memory, a hard disk, or a removable disk such as a magnetic disk, a magneto-optical disk, an optical disk, a USB memory, or a memory card. It may be media. Of course, other than these may be used.
  • the mobile phone 400 when transmitting image data in the data communication mode, the mobile phone 400 generates image data with the CCD camera 416 by imaging.
  • the CCD camera 416 includes an optical device such as a lens and a diaphragm and a CCD as a photoelectric conversion element, images a subject, converts the intensity of received light into an electrical signal, and generates image data of the subject image.
  • the image data is converted into encoded image data by compression encoding with a predetermined encoding method such as MPEG2 or MPEG4 by the image encoder 453 via the camera I / F unit 454.
  • the cellular phone 400 uses the above-described image encoding device 51 as the image encoder 453 that performs such processing. Therefore, since the image encoder 453 calculates the weight coefficient in Implicit Weighted Prediction as in the case of the image encoding device 51, even if the POC is not equidistant, it is not confused by its value, and an appropriate value is obtained. The weighting coefficient can be calculated. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the mobile phone 400 converts the sound collected by the microphone (microphone) 421 during imaging by the CCD camera 416 from analog to digital by the audio codec 459 and further encodes it.
  • the cellular phone 400 multiplexes the encoded image data supplied from the image encoder 453 and the digital audio data supplied from the audio codec 459 by a predetermined method.
  • the cellular phone 400 performs spread spectrum processing on the multiplexed data obtained as a result by the modulation / demodulation circuit unit 458 and digital / analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 463.
  • the cellular phone 400 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 414.
  • a transmission signal (image data) transmitted to the base station is supplied to a communication partner via a network or the like.
  • the mobile phone 400 can also display the image data generated by the CCD camera 416 on the liquid crystal display 418 via the LCD control unit 455 without passing through the image encoder 453.
  • the cellular phone 400 when receiving data of a moving image file linked to a simple homepage or the like, transmits a signal transmitted from the base station via the antenna 414 to the transmission / reception circuit unit 463. Receive, amplify, and further perform frequency conversion processing and analog-digital conversion processing. The cellular phone 400 performs spectrum despreading processing on the received signal by the modulation / demodulation circuit unit 458 to restore the original multiplexed data. In the cellular phone 400, the demultiplexing unit 457 separates the multiplexed data and divides it into encoded image data and audio data.
  • the cellular phone 400 In the image decoder 456, the cellular phone 400 generates reproduction moving image data by decoding the encoded image data with a decoding method corresponding to a predetermined encoding method such as MPEG2 or MPEG4, and this is controlled by the LCD control.
  • the image is displayed on the liquid crystal display 418 via the unit 455.
  • moving image data included in a moving image file linked to a simple homepage is displayed on the liquid crystal display 418.
  • the mobile phone 400 uses the above-described image decoding device 101 as the image decoder 456 that performs such processing. Therefore, since the image decoder 456 calculates the weight coefficient in Implicit Weighted Prediction as in the case of the image decoding device 101, an appropriate weight can be obtained without being confused by the value even when the POC is not equally spaced. The coefficient can be calculated. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the cellular phone 400 simultaneously converts the digital audio data into an analog audio signal in the audio codec 459 and causes the speaker 417 to output it.
  • audio data included in the moving image file linked to the simple homepage is reproduced.
  • the mobile phone 400 can record (store) the data linked to the received simplified home page or the like in the storage unit 423 via the recording / playback unit 462. .
  • the mobile phone 400 can analyze the two-dimensional code obtained by the CCD camera 416 by the main control unit 450 and acquire information recorded in the two-dimensional code.
  • the mobile phone 400 can communicate with an external device by infrared rays at the infrared communication unit 481.
  • the cellular phone 400 can improve the encoding efficiency of encoded data generated by encoding image data generated in the CCD camera 416, for example, by using the image encoding device 51 as the image encoder 453. As a result, the mobile phone 400 can provide encoded data (image data) with high encoding efficiency to other devices.
  • the cellular phone 400 can generate a predicted image with high accuracy by using the image decoding apparatus 101 as the image decoder 456. As a result, the mobile phone 400 can obtain and display a higher-definition decoded image from a moving image file linked to a simple homepage, for example.
  • the cellular phone 400 uses the CCD camera 416, but instead of the CCD camera 416, an image sensor (CMOS image sensor) using CMOS (Complementary Metal Metal Oxide Semiconductor) is used. May be. Also in this case, the mobile phone 400 can capture the subject and generate image data of the subject image, as in the case where the CCD camera 416 is used.
  • CMOS image sensor Complementary Metal Metal Oxide Semiconductor
  • the mobile phone 400 has been described.
  • an imaging function similar to that of the mobile phone 400 such as a PDA (Personal Digital Assistant), a smartphone, an UMPC (Ultra Mobile Personal Computer), a netbook, a notebook personal computer, or the like.
  • the image encoding device 51 and the image decoding device 101 can be applied to any device as in the case of the mobile phone 400.
  • FIG. 30 is a block diagram showing a main configuration example of a hard disk recorder using an image encoding device and an image decoding device to which the present invention is applied.
  • a hard disk recorder 500 shown in FIG. 30 receives audio data and video data of a broadcast program included in a broadcast wave signal (television signal) transmitted from a satellite or a ground antenna received by a tuner.
  • This is an apparatus that stores in a built-in hard disk and provides the stored data to the user at a timing according to the user's instruction.
  • the hard disk recorder 500 can, for example, extract audio data and video data from broadcast wave signals, decode them as appropriate, and store them in a built-in hard disk.
  • the hard disk recorder 500 can also acquire audio data and video data from other devices via a network, for example, decode them as appropriate, and store them in a built-in hard disk.
  • the hard disk recorder 500 decodes audio data and video data recorded in the built-in hard disk, supplies the decoded data to the monitor 560, and displays the image on the screen of the monitor 560. Further, the hard disk recorder 500 can output the sound from the speaker of the monitor 560.
  • the hard disk recorder 500 decodes, for example, audio data and video data extracted from a broadcast wave signal acquired via a tuner, or audio data and video data acquired from another device via a network, and monitors 560. And the image is displayed on the screen of the monitor 560.
  • the hard disk recorder 500 can also output the sound from the speaker of the monitor 560.
  • the hard disk recorder 500 includes a reception unit 521, a demodulation unit 522, a demultiplexer 523, an audio decoder 524, a video decoder 525, and a recorder control unit 526.
  • the hard disk recorder 500 further includes an EPG data memory 527, a program memory 528, a work memory 529, a display converter 530, an OSD (On Screen Display) control unit 531, a display control unit 532, a recording / playback unit 533, a D / A converter 534, And a communication unit 535.
  • the display converter 530 has a video encoder 541.
  • the recording / playback unit 533 includes an encoder 551 and a decoder 552.
  • the receiving unit 521 receives an infrared signal from a remote controller (not shown), converts it into an electrical signal, and outputs it to the recorder control unit 526.
  • the recorder control unit 526 is constituted by, for example, a microprocessor and executes various processes according to a program stored in the program memory 528. At this time, the recorder control unit 526 uses the work memory 529 as necessary.
  • the communication unit 535 is connected to the network and performs communication processing with other devices via the network.
  • the communication unit 535 is controlled by the recorder control unit 526, communicates with a tuner (not shown), and mainly outputs a channel selection control signal to the tuner.
  • the demodulator 522 demodulates the signal supplied from the tuner and outputs the demodulated signal to the demultiplexer 523.
  • the demultiplexer 523 separates the data supplied from the demodulation unit 522 into audio data, video data, and EPG data, and outputs them to the audio decoder 524, the video decoder 525, or the recorder control unit 526, respectively.
  • the audio decoder 524 decodes the input audio data by, for example, the MPEG system, and outputs it to the recording / playback unit 533.
  • the video decoder 525 decodes the input video data using, for example, the MPEG system, and outputs the decoded video data to the display converter 530.
  • the recorder control unit 526 supplies the input EPG data to the EPG data memory 527 for storage.
  • the display converter 530 encodes the video data supplied from the video decoder 525 or the recorder control unit 526 into video data of, for example, NTSC (National Television Standards Committee) using the video encoder 541 and outputs the video data to the recording / reproducing unit 533.
  • the display converter 530 converts the screen size of the video data supplied from the video decoder 525 or the recorder control unit 526 into a size corresponding to the size of the monitor 560.
  • the display converter 530 further converts the video data whose screen size has been converted into NTSC video data by the video encoder 541, converts it into an analog signal, and outputs the analog signal to the display control unit 532.
  • the display control unit 532 superimposes the OSD signal output from the OSD (On Screen Display) control unit 531 on the video signal input from the display converter 530 under the control of the recorder control unit 526 and displays the OSD signal on the display of the monitor 560. Output and display.
  • OSD On Screen Display
  • the monitor 560 is also supplied with the audio data output from the audio decoder 524 after being converted into an analog signal by the D / A converter 534.
  • the monitor 560 outputs this audio signal from a built-in speaker.
  • the recording / playback unit 533 has a hard disk as a storage medium for recording video data, audio data, and the like.
  • the recording / playback unit 533 encodes the audio data supplied from the audio decoder 524 by the encoder 551 in the MPEG system.
  • the recording / reproducing unit 533 encodes the video data supplied from the video encoder 541 of the display converter 530 by the encoder 551 in the MPEG system.
  • the recording / playback unit 533 combines the encoded data of the audio data and the encoded data of the video data by a multiplexer.
  • the recording / reproducing unit 533 amplifies the synthesized data by channel coding, and writes the data to the hard disk via the recording head.
  • the recording / reproducing unit 533 reproduces the data recorded on the hard disk via the reproducing head, amplifies it, and separates it into audio data and video data by a demultiplexer.
  • the recording / playback unit 533 uses the decoder 552 to decode the audio data and video data using the MPEG system.
  • the recording / playback unit 533 performs D / A conversion on the decoded audio data and outputs it to the speaker of the monitor 560.
  • the recording / playback unit 533 performs D / A conversion on the decoded video data and outputs it to the display of the monitor 560.
  • the recorder control unit 526 reads the latest EPG data from the EPG data memory 527 based on the user instruction indicated by the infrared signal from the remote controller received via the receiving unit 521, and supplies it to the OSD control unit 531. To do.
  • the OSD control unit 531 generates image data corresponding to the input EPG data, and outputs the image data to the display control unit 532.
  • the display control unit 532 outputs the video data input from the OSD control unit 531 to the display of the monitor 560 for display. As a result, an EPG (electronic program guide) is displayed on the display of the monitor 560.
  • the hard disk recorder 500 can acquire various data such as video data, audio data, or EPG data supplied from other devices via a network such as the Internet.
  • the communication unit 535 is controlled by the recorder control unit 526, acquires encoded data such as video data, audio data, and EPG data transmitted from another device via the network, and supplies it to the recorder control unit 526. To do.
  • the recorder control unit 526 supplies the encoded data of the acquired video data and audio data to the recording / reproducing unit 533 and stores the data in the hard disk.
  • the recorder control unit 526 and the recording / playback unit 533 may perform processing such as re-encoding as necessary.
  • the recorder control unit 526 decodes the acquired encoded data of video data and audio data, and supplies the obtained video data to the display converter 530.
  • the display converter 530 processes the video data supplied from the recorder control unit 526 in the same manner as the video data supplied from the video decoder 525, supplies the processed video data to the monitor 560 via the display control unit 532, and displays the image. .
  • the recorder control unit 526 may supply the decoded audio data to the monitor 560 via the D / A converter 534 and output the sound from the speaker.
  • the recorder control unit 526 decodes the encoded data of the acquired EPG data, and supplies the decoded EPG data to the EPG data memory 527.
  • the hard disk recorder 500 as described above uses the image decoding apparatus 101 as a decoder built in the video decoder 525, the decoder 552, and the recorder control unit 526. Accordingly, the video decoder 525, the decoder 552, and the decoder built in the recorder control unit 526 calculate the weighting coefficient in Implicit Weighted Prediction, as in the case of the image decoding device 101, and this is the case where the POC is not equidistant. However, an appropriate weighting factor can be calculated without being confused by the value. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the hard disk recorder 500 can generate a predicted image with high accuracy.
  • the hard disk recorder 500 acquires, for example, encoded data of video data received via a tuner, encoded data of video data read from the hard disk of the recording / playback unit 533, or via a network. From the encoded data of the video data, a higher-definition decoded image can be obtained and displayed on the monitor 560.
  • the hard disk recorder 500 uses the image encoding device 51 as the encoder 551. Therefore, since the encoder 551 calculates the weight coefficient in Implicit Weighted Prediction as in the case of the image encoding device 51, an appropriate weight can be obtained without being confused by the value even when the POC is not equally spaced. The coefficient can be calculated. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the hard disk recorder 500 can improve the encoding efficiency of the encoded data recorded on the hard disk, for example. As a result, the hard disk recorder 500 can use the storage area of the hard disk more efficiently.
  • the hard disk recorder 500 that records video data and audio data on the hard disk has been described.
  • any recording medium may be used.
  • the image encoding device 51 and the image decoding device 101 are applied as in the case of the hard disk recorder 500 described above. Can do.
  • FIG. 31 is a block diagram showing a main configuration example of a camera using the image decoding device and the image encoding device to which the present invention is applied.
  • the camera 600 shown in FIG. 31 captures a subject, displays an image of the subject on the LCD 616, and records it on the recording medium 633 as image data.
  • the lens block 611 causes light (that is, an image of the subject) to enter the CCD / CMOS 612.
  • the CCD / CMOS 612 is an image sensor using CCD or CMOS, converts the intensity of received light into an electric signal, and supplies it to the camera signal processing unit 613.
  • the camera signal processing unit 613 converts the electrical signal supplied from the CCD / CMOS 612 into Y, Cr, and Cb color difference signals and supplies them to the image signal processing unit 614.
  • the image signal processing unit 614 performs predetermined image processing on the image signal supplied from the camera signal processing unit 613 under the control of the controller 621, and encodes the image signal by the encoder 641 using, for example, the MPEG method. To do.
  • the image signal processing unit 614 supplies encoded data generated by encoding the image signal to the decoder 615. Further, the image signal processing unit 614 acquires display data generated in the on-screen display (OSD) 620 and supplies it to the decoder 615.
  • OSD on-screen display
  • the camera signal processing unit 613 appropriately uses DRAM (Dynamic Random Access Memory) 618 connected via the bus 617, and image data or a code obtained by encoding the image data as necessary.
  • DRAM Dynamic Random Access Memory
  • the digitized data is held in the DRAM 618.
  • the decoder 615 decodes the encoded data supplied from the image signal processing unit 614 and supplies the obtained image data (decoded image data) to the LCD 616. In addition, the decoder 615 supplies the display data supplied from the image signal processing unit 614 to the LCD 616. The LCD 616 appropriately synthesizes the image of the decoded image data supplied from the decoder 615 and the image of the display data, and displays the synthesized image.
  • the on-screen display 620 outputs display data such as menu screens and icons composed of symbols, characters, or figures to the image signal processing unit 614 via the bus 617 under the control of the controller 621.
  • the controller 621 executes various processes based on a signal indicating the content instructed by the user using the operation unit 622, and via the bus 617, the image signal processing unit 614, the DRAM 618, the external interface 619, an on-screen display. 620, media drive 623, and the like are controlled.
  • the FLASH ROM 624 stores programs and data necessary for the controller 621 to execute various processes.
  • the controller 621 can encode the image data stored in the DRAM 618 or decode the encoded data stored in the DRAM 618 instead of the image signal processing unit 614 or the decoder 615.
  • the controller 621 may perform the encoding / decoding process by a method similar to the encoding / decoding method of the image signal processing unit 614 or the decoder 615, or the image signal processing unit 614 or the decoder 615 can handle this.
  • the encoding / decoding process may be performed by a method that is not performed.
  • the controller 621 reads image data from the DRAM 618 and supplies it to the printer 634 connected to the external interface 619 via the bus 617. Let it print.
  • the controller 621 reads the encoded data from the DRAM 618 and supplies it to the recording medium 633 attached to the media drive 623 via the bus 617.
  • the recording medium 633 is an arbitrary readable / writable removable medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory.
  • the recording medium 633 may be of any type as a removable medium, and may be a tape device, a disk, or a memory card.
  • a non-contact IC card or the like may be used.
  • media drive 623 and the recording medium 633 may be integrated and configured by a non-portable storage medium such as a built-in hard disk drive or SSD (Solid State Drive).
  • SSD Solid State Drive
  • the external interface 619 includes, for example, a USB input / output terminal and is connected to the printer 634 when printing an image.
  • a drive 631 is connected to the external interface 619 as necessary, and a removable medium 632 such as a magnetic disk, an optical disk, or a magneto-optical disk is appropriately mounted, and a computer program read from them is loaded as necessary. Installed in the FLASH ROM 624.
  • the external interface 619 has a network interface connected to a predetermined network such as a LAN or the Internet.
  • the controller 621 can read the encoded data from the DRAM 618 in accordance with an instruction from the operation unit 622 and supply the encoded data from the external interface 619 to another device connected via the network. Also, the controller 621 acquires encoded data and image data supplied from other devices via the network via the external interface 619 and holds them in the DRAM 618 or supplies them to the image signal processing unit 614. Can be.
  • the camera 600 as described above uses the image decoding apparatus 101 as the decoder 615. Accordingly, since the decoder 615 calculates the weighting coefficient in Implicit Weighted Prediction as in the case of the image decoding apparatus 101, an appropriate weighting factor can be obtained without being confused by the value even when the POC is not equally spaced. Can be calculated. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the camera 600 can generate a predicted image with high accuracy.
  • the camera 600 encodes image data generated in the CCD / CMOS 612, encoded data of video data read from the DRAM 618 or the recording medium 633, and encoded video data acquired via the network.
  • a higher-resolution decoded image can be obtained from the data and displayed on the LCD 616.
  • the camera 600 uses the image encoding device 51 as the encoder 641. Therefore, since the encoder 641 calculates the weight coefficient in Implicit Weighted Prediction as in the case of the image encoding device 51, an appropriate weight can be obtained without being confused by the value even when the POC is not equally spaced. The coefficient can be calculated. As a result, a decrease in encoding efficiency can be suppressed. Further, since the weighting coefficient is calculated independently for each template matching block, Weighted Prediction based on the local properties of the image can be realized.
  • the camera 600 can improve the encoding efficiency of the encoded data recorded on the hard disk. As a result, the camera 600 can use the storage area of the DRAM 618 and the recording medium 633 more efficiently.
  • the decoding method of the image decoding apparatus 101 may be applied to the decoding process performed by the controller 621.
  • the encoding method of the image encoding device 51 may be applied to the encoding process performed by the controller 621.
  • the image data captured by the camera 600 may be a moving image or a still image.
  • image encoding device 51 and the image decoding device 101 can also be applied to devices and systems other than those described above.

Abstract

画像のローカルな性質に基づいた重み付け予測を行うことができる画像処理装置および方法に関する。 インターTP動き予測・補償部76は、符号化対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチングを行い、マッチングにおけるテンプレート領域の画素値から算出された重み係数を用いたImplicit Weighted Predictionを行う。この重み係数は、重み係数算出部77により算出される。本発明は、例えば、H.264/AVC方式で符号化する画像符号化装置に適用することができる。

Description

画像処理装置および方法
 本発明は、画像処理装置および方法に関し、特に、画像のローカルな性質に基づいた重み付け予測(Weighted Prediction)を行うことができるようにする画像処理装置および方法に関する。
 近年、画像情報をデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮するMPEG(Moving Picture Experts Group phase)などの方式を採用して画像を圧縮符号する装置が普及しつつある。
 特に、MPEG2(ISO/IEC 13818-2)は、汎用画像符号化方式として定義されており、飛び越し走査画像及び順次走査画像の双方、並びに標準解像度画像及び高精細画像を網羅する標準で、プロフェッショナル用途及びコンシューマ用途の広範なアプリケーションに現在広く用いられている。MPEG2圧縮方式を用いることにより、例えば720×480画素を持つ標準解像度の飛び越し走査画像であれば4乃至8Mbps、1920×1088画素を持つ高解像度の飛び越し走査画像であれば18乃至22Mbpsの符号量(ビットレート)を割り当てることで、高い圧縮率と良好な画質の実現が可能である。
 このMPEG2は主として放送用に適合する高画質符号化を対象としていたが、MPEG1より低い符号量(ビットレート)、つまりより高い圧縮率の符号化方式には対応していない。しかしながら、携帯端末の普及により、今後、そのような符号化方式のニーズは高まると思われ、これに対応してMPEG4符号化方式の標準化が行われた。例えば、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、以下AVCと称する)という名で国際標準となっている。
 ところで、MPEG-2等の符号化方式においては、線形内挿処理により、1/2画素精度の動き予測・補償処理が行われるが、AVC符号化方式においては、6タップのFIR(Finite Impulse Response Filter)フィルタを用いた1/4画素精度の動き予測・補償処理が行われる。これにより、AVC符号化方式では、符号化効率が向上するが、膨大な動きベクトル情報が生成される。従って、この動きベクトル情報をそのまま符号化すると、符号化効率の低下を招く。このため、AVC符号化方式においては、所定の方法により、動きベクトルの符号化情報の低減が実現されている。
 この方法としては、例えば、これから符号化される動き補償ブロックの予測動きベクトル情報を、既に符号化済の、隣接する動き補償ブロックの動きベクトル情報を用いてメディアンオペレーションにより生成する方法がある。
 しかしながら、この方法が用いられる場合であっても、画像圧縮情報における動きベクトル情報の占める割合は少なくない。そこで、符号化対象のフレーム(以下、対象フレームと称する)の画像内のこれから符号化する対象ブロックに対して、所定の位置関係で隣接する、復号画像からなるテンプレート領域と相関が最も高い画像の領域を、参照されるフレーム(以下、参照フレームと称する)の復号画像から探索して、探索された領域と所定の位置関係とに基づいて動き予測を行う方法が提案されている(例えば、非特許文献1参照)。
 この方法は、インターテンプレートマッチング方式と称され、マッチングに復号画像を用いているため、探索範囲を予め定めておくことで、符号化装置と復号装置において同一の処理を行うことが可能である。すなわち、復号装置においても、インターテンプレートマッチング方式で動き予測を行うことにより、符号化装置からの画像圧縮情報の中に動きベクトル情報を持つ必要がなくなり、符号化効率の低下を抑えることが可能である。
 また、MPEG-2符号化方式等に基づき、フェードを含むシーン等を符号化すると、符号化効率が低下する。
 すなわち、図1に示されるように、フェード等により、フレームY1、フレームY0、フレームXの順に暗くなる画像の動き補償を行う場合、MPEG-2符号化方式等で規定されている動き補償方式では、フレーム間の輝度変化分を吸収することができない。例えば、符号化済みのフレームY0を用いて、符号化対象のフレームXの動き補償を行う場合、フレームY0とフレームXの輝度差分がノイズ(予測誤差)として現れてしまう。その結果、符号化効率が低下する。
 そこで、このような符号化効率の低下を防止するため、AVC方式では、Weighted Predictionと呼ばれる動き補償方式が規定されている。
 そして、Pピクチャでは、Weighted PredictionのうちのExplicit Weighted Predictionと呼ばれる方式が使用可能であり、これが用いられる場合、予測画像Predは、以下の式(1)により求められる。
 Pred=w0×P(L0)+d0                       ・・・(1) 
 なお、式(1)において、P(L0)は、動きベクトル情報により指し示されるList0参照フレームから抽出される予測画像であり、w0,d0は、それぞれ、画像圧縮情報中に含まれる、重み係数、オフセット値である。
 また、Bピクチャでは、Weighted PredictionのうちのExplicit Weighted Predictionだけでなく、Implicit Weighted Predictionも使用可能である。Explicit Weighted PredictionやImplicit Weighted Predictionが用いられる場合、2つの参照フレームをL0参照フレームおよびL1参照フレームとすると、以下の式(2)により、予測画像Predが求められる。
 Pred=w0×P(L0)+w0×P(L1)+d0                  ・・・(2) 
 ただし、式(2)において、P(L0),P(L1)は、それぞれ、動きベクトル情報により指し示されるList0参照フレーム、List1参照フレームから抽出される予測画像である。また、式(2)において、w0,w1は、Explicit Weighted Predictionでは、画像圧縮中に含まれる重み係数であり、d0は、画像圧縮情報中に含まれるオフセット値である。
 これに対して、Implicit Weighted Predictionでは、d0=0で、w0およびw1は、以下の式(3)で求められる重み係数である。
 w1=tb/td
 w0=1-w1
                                  ・・・(3) 
 なお、式(3)において、tbは、図2に示すように、L0参照フレームと符号化対象の対象フレームの時間間隔であり、tdは、L0参照フレームとL1参照フレームの時間間隔である。但し、実際には、AVC方式では、画像圧縮情報にtbやtdに相当するパラメータが存在しないため、tbやtdの代わりにPOC(Picture Order Count)が用いられている。
 しかしながら、POCは、必ずしも、時間軸上、等間隔であるとは限らず、これを基にImplicit Weighted Predictionの重み係数を算出することは、符号化効率の低下につながる場合がある。
 また、AVC方式において、Explicit Weighted PredictionやImplicit Weighted Predictionで用いられる重み係数およびオフセット値は、同一ピクチャ(スライス)内では同一の値が用いられるが、その値が画面内の各ブロックに対して最適な値であるとは限らない。
 本発明はこのような状況に鑑みてなされたものであり、画像のローカルな性質に基づいた重み付け予測を行うことができるようにするものである。
 本発明の一側面の画像処理装置は、復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行うマッチング手段と、前記マッチング手段による前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行う予測手段とを備える。
 前記フレームの画像は、Pピクチャであり、前記重み付け予測は、Implicit Weighted Predictionである。
 前記予測手段は、前記テンプレートの画素値から算出された重み係数を用いて前記重み付け予測を行うことができる。
 前記テンプレートの画素値の平均値をAve(B)とし、そのテンプレートと相関の最も高い、前記マッチングで参照される参照フレームの画像内の領域である参照テンプレートの画素値の平均値をAve(B')とし、前記重み係数をw0としたときの式
 w0=Ave(B’)/Ave(B)
 により前記重み係数を算出する算出手段をさらに備え、前記予測手段は、前記ブロックの予測画素値をPred(A)とし、前記テンプレートと前記ブロックの位置関係と同一の位置関係を、前記参照テンプレートとの間に有する前記参照フレームの画像内の領域の画素値をPix(A’)としたときの、前記重み係数w0を用いた式
 Pred(A)=w0×Pix(A’)
 により前記ブロックの前記予測画素値を算出することができる。
 前記算出手段は、前記重み係数w0をX/(2n)の形式で表される値に近似することができる。
 前記予測手段は、前記テンプレートの画素値から算出されたオフセットを用いて前記重み付け予測を行うことができる。
 前記テンプレートの画素値の平均値をAve(B)とし、そのテンプレートと相関の最も高い、前記マッチングで参照される参照フレームの画像内の領域である参照テンプレートの画素値の平均値をAve(B')とし、前記オフセットをd0としたときの式
 d0=Ave(B)-Ave(B’)
 により前記オフセットを算出する算出手段をさらに備え、前記予測手段は、前記ブロックの予測画素値をPred(A)とし、前記テンプレートと前記ブロックの位置関係と同一の位置関係を、前記参照テンプレートとの間に有する前記参照フレームの画像内の領域の予測画素値をPred(A’)としたときの、前記オフセットd0を用いた式
 Pred(A)=Pred(A’)+d0
 により前記ブロックの前記予測画素値を算出することができる。
 前記予測手段は、前記ブロックについて、符号化時に重み付け予測としてImplicit Weighted Predictionが行われたことを表す情報を、前記フレームの画像としてのPピクチャのヘッダ部から抽出し、その情報に応じて、前記重み付け予測としてImplicit Weighted Predictionを行うことができる。
 前記テンプレートの画素値から、前記重み付け予測に用いられる第1および第2の重み係数を算出する算出手段
 をさらに備え、
 前記算出手段は、前記テンプレートの画素値の平均値をAve_tmplt_Curとし、そのテンプレートと相関の最も高い、前記マッチングで参照される第1の参照フレームの画像内の領域である第1の参照プレートおよび第2の参照フレームの画像内の領域である第2の参照テンプレートの画素値の平均値をそれぞれAve_tmplt_L0,Ave_tmplt_L1とし、前記第1および第2の重み係数をそれぞれw0,w1としたときの式
 w0=|Ave_tmplt_L1-Ave_tmplt_Cur|
 w1=|Ave_tmplt_L0-Ave_tmplt_Cur|
 により前記第1および第2の重み係数を算出し、
 その第1の重み係数w0と第2の重み係数w1を、式
 w0=w0/(w0+w1)
 w1=w1/(w0+w1)
 により正規化し、前記予測手段は、前記ブロックの予測画素値をPred_Curとし、前記テンプレートと前記ブロックの位置関係と同一の位置関係を、前記第1の参照テンプレートとの間に有する前記第1の参照フレームの画像内の領域の画素値および前記第2の参照テンプレートとの間に有する前記第2の参照フレームの画像内の領域の画素値をそれぞれPix_L0,Pix_L1としたときの、正規化後の第1の重み係数w0および前記第2の重み係数w1を用いた式 Pred_Cur=w0×Pix_L0+w1×Pix_L1
 により前記ブロックの予測画素値を算出することができる。
 前記算出手段は、前記第1の重み係数w0および前記第2の重み係数w1をX/(2n)の形式で表される値に近似することができる。
 本発明の第1の側面の画像処理方法は、画像処理装置が、復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行い、前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行うステップを含む。
 本発明の第2の側面の画像処理装置は、復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行うマッチング手段と、前記マッチング手段による前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行う予測手段を備える。
 前記フレームの画像は、Pピクチャであり、前記重み付け予測は、Implicit Weighted Predictionである。
 前記ブロックについて、前記重み付け予測としてImplicit Weighted Predictionが行われたことを表す情報を、前記フレームの画像としてのPピクチャのヘッダ部に挿入する挿入手段をさらに備えることができる。
 本発明の第2の側面の画像処理方法は、画像処理装置が、復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行い、前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行うステップを含む。
 本発明の第1の側面においては、復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理が行われ、マッチング処理におけるテンプレートの画素値を用いた重み付け予測が行われる。
 本発明の第2の側面においては、符号化対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理が行われ、マッチング処理におけるテンプレートの画素値を用いた重み付け予測が行われる。
 本発明によれば、画像のローカルな性質に基づいた重み付け予測を行うことができる。
フェードを含むシーンの符号化について説明する図である。 tb,tdを示す図である。 本発明を適用した画像符号化装置の一実施の形態の構成を示すブロック図である。 可変ブロックサイズ動き予測・補償処理を説明する図である。 1/4画素精度の動き予測・補償処理を説明する図である。 図3の画像符号が装置の符号化処理を説明するフローチャートである。 図6の予測処理を説明するフローチャートである。 16×16画素のイントラ予測モードの場合の処理順序を説明する図である。 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。 4×4画素のイントラ予測の方向を説明する図である。 4×4画素のイントラ予測を説明する図である。 輝度信号の4×4画素のイントラ予測モードの符号化を説明する図である。 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。 16×16画素のイントラ予測を説明する図である。 色差信号のイントラ予測モードの種類を示す図である。 イントラ予測処理を説明するフローチャートである。 インター動き予測処理を説明するフローチャートである。 動きベクトル情報の生成方法の例を説明する図である。 インターテンプレートマッチング方式について説明する図である。 Bピクチャのインターテンプレートマッチング方式について説明する図である。 インターテンプレート動き予測処理を説明するフローチャートである。 本発明を適用した画像復号装置の一実施の形態の構成を示すブロック図である。 図24の画像復号装置の復号処理を説明するフローチャートである。 図25の予測処理を説明するフローチャートである。 拡張されたブロックサイズの例を示す図である。 本発明を適用したテレビジョン受像機の主な構成例を示すブロック図である。 本発明を適用した携帯電話機の主な構成例を示すブロック図である。 本発明を適用したハードディスクレコーダの主な構成例を示すブロック図である。 本発明を適用したカメラの主な構成例を示すブロック図である。
 図3は、本発明の画像符号化装置の一実施の形態の構成を表している。この画像符号化装置51は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部75、インターテンプレート動き予測・補償部76、重み係数算出部77、予測画像選択部78、およびレート制御部79により構成されている。
 なお、以下、インターテンプレート動き予測・補償部76を、インターTP動き予測・補償部76と称する。
 この画像符号化装置51は、例えば、H.264およびAVC(以下H.264/AVCと称する)方式で画像を圧縮符号化する。
 H.264/AVC方式においては、ブロックサイズを可変にして、動き予測・補償が行われる。すなわち、H.264/AVC方式においては、16×16画素で構成される1つのマクロブロックを、図4に示されるように、16×16画素、16×8画素、8×16画素、あるいは8×8画素のいずれかのパーティションに分割して、それぞれ独立した動きベクトル情報を持つことが可能である。また、8×8画素のパーティションに関しては、図4に示されるように、8×8画素、8×4画素、4×8画素、あるいは4×4画素のいずれかのサブパーティションに分割し、それぞれ独立した動きベクトル情報を持つことが可能である。
 また、H.264/AVC方式においては、6タップのFIRフィルタを用いた1/4画素精度の予測・補償処理が行われる。図5を参照して、H.264/AVC方式における小数画素精度の予測・補償処理について説明する。
 図5の例において、位置Aは、整数精度画素の位置、位置b,c,dは、1/2画素精度の位置、位置e1,e2,e3は、1/4画素精度の位置を示している。まず、以下においては、Clip()を次の式(4)のように定義する。
Figure JPOXMLDOC01-appb-M000001
 なお、入力画像が8ビット精度である場合、max_pixの値は255となる。
 このとき、位置bおよびdにおける画素値は、6タップのFIRフィルタを用いて、次の式(5)により求められる。
Figure JPOXMLDOC01-appb-M000002
 なお、式(5)において、Ap(p=-2,-1,0,1,2,3)は、位置bまたはdに対応する位置Aからの水平方向または垂直方向の距離がpの位置Aにおける画素値である。また、式(5)において、b,dは、それぞれ、位置bにおける画素値、位置dにおける画素値である。
 また、位置cにおける画素値は、水平方向および垂直方向に6タップのFIRフィルタを適用し、次の式(6)により求められる。
Figure JPOXMLDOC01-appb-M000003
 なお、式(6)において、bp,dp(p=-2,-1,0,1,2,3)は、位置cに対応する位置b,dからの水平方向または垂直方向の距離がpの位置b,dにおける画素値であり、cは、位置cにおける画素値である。また、式(6)において、Clip処理は、式(6)のFの演算、即ち水平方向および垂直方向の両方の積和演算を行った後、最後に1度のみ実行される。
 さらに、位置e1乃至e3における画素値は、次の式(7)のように線形内挿により求められる。
Figure JPOXMLDOC01-appb-M000004
 なお、式(7)において、A,a乃至d,e1乃至e3は、それぞれ、位置A,a乃至d,e1乃至e3における画素値である。
 図3に戻って、A/D変換部61は、入力された画像をA/D変換し、画面並べ替えバッファ62に出力し、記憶させる。画面並べ替えバッファ62は、記憶した表示の順番のフレームの画像を、GOP(Group of Picture)に応じて、符号化のためのフレームの順番に並べ替える。
 演算部63は、画面並べ替えバッファ62から読み出された画像から、予測画像選択部78により選択されたイントラ予測部74からの予測画像または動き予測・補償部75からの予測画像を減算し、その差分情報を直交変換部64に出力する。直交変換部64は、演算部63からの差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施し、その変換係数を出力する。量子化部65は直交変換部64が出力する変換係数を量子化する。
 量子化部65の出力となる、量子化された変換係数は、可逆符号化部66に入力される。ここで、量子化された変換係数には、CAVLC(Context-based Adaptive Variable Length Coding)などの可変長符号化、CABAC(Context-based Adaptive Binary Arithmetic Coding)などの算術符号化等の可逆符号化が施され、圧縮される。なお、圧縮画像は、蓄積バッファ67に蓄積された後、出力される。
 また、量子化部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から読み出されたイントラ予測する画像とスイッチ73を介してフレームメモリ72から供給された参照画像としての画像に基づいて、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。
 イントラ予測部74は、候補となる全てのイントラ予測モードに対してコスト関数値を算出する。イントラ予測部74は、算出したコスト関数値のうち、最小値を与える予測モードを、最適イントラ予測モードとして決定する。
 イントラ予測部74は、最適イントラ予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部78に供給する。イントラ予測部74は、予測画像選択部78により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードに関する情報を、可逆符号化部66に供給する。可逆符号化部66は、この情報を可変符号化し、圧縮画像におけるヘッダ情報の一部とする。
 動き予測・補償部75は、候補となる全てのインター予測モードの動き予測・補償処理を行う。すなわち、動き予測・補償部75は、画面並べ替えバッファ62から読み出されたインター予測する画像と、スイッチ73を介してフレームメモリ72から供給される参照画像としての画像に基づいて、候補となる全てのインター予測モードの動きベクトルを検出し、動きベクトルに基づいて参照画像に動き予測と補償処理を施し、予測画像を生成する。
 また、動き予測・補償部75は、スイッチ73を介してフレームメモリ72から供給される画像を、インターTP動き予測・補償部76に供給する。
 動き予測・補償部75は、候補となる全てのインター予測モードに対してコスト関数値を算出する。動き予測・補償部75は、算出したインター予測モードに対してのコスト関数値と、インターTP動き予測・補償部76により算出されたインターテンプレート予測モードに対してのコスト関数値のうち、最小値を与える予測モードを、最適インター予測モードとして決定する。
 動き予測・補償部75は、最適インター予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部78に供給する。動き予測・補償部75は、予測画像選択部78により最適インター予測モードで生成された予測画像が選択された場合、最適インター予測モードに関する情報、およびその最適インター予測モードに応じた情報(動きベクトル情報、参照フレーム情報、テンプレート方式情報(詳細は後述する)など)を可逆符号化部66に出力する。可逆符号化部66は、動き予測・補償部75からの情報をやはり可変長符号化、算術符号化といった可逆符号化処理し、圧縮画像のヘッダ部に挿入する。
 インターTP動き予測・補償部76は、動き予測・補償部75から供給される画像に基づいて、インターテンプレートマッチング方式またはインターテンプレートWeighted Prediction方式(詳細は後述する)で、インターテンプレート予測モードの動き予測と補償処理を行う。その結果、予測画像が生成される。
 なお、インターテンプレートWeighted Prediction方式とは、インターテンプレートマッチング方式とWeighted Predictionを組み合わせた方式である。インターテンプレートWeighted Prediction方式のうちのWeighted Predictionで用いられる重み係数やオフセット値は、重み係数算出部77により供給される。なお、Weighted Predictionとしては、Explicit Weighted PredictionとImplicit Weighted Predictionがある。
 また、インターTP動き予測・補償部76は、動き予測・補償部75から供給される画像を重み係数算出部77に供給する。さらに、インターTP動き予測・補償部76は、インターテンプレート予測モードに対してコスト関数値を算出し、算出したコスト関数値、予測画像、および、テンプレート方式情報を、動き予測・補償部75に供給する。
 なお、テンプレート方式情報とは、インターTP動き予測・補償部76による動き予測・補償処理の方式として、インターテンプレートWeighted Prediction方式が採用されたか、インターテンプレートマッチング方式が採用されたかを表す情報などである。但し、インターTP動き予測・補償部76による動き予測・補償処理の方式としてインターテンプレートWeighted Prediction方式が採用された場合には、Weighted PredictionとしてImplicit Weighted Predictionが採用されたか、Explicit Weighted Predictionが採用されたかを表す情報もテンプレート方式情報に含まれる。
 また、インターTP動き予測・補償部76は、Weighted PredictionとしてExplicit Weighted Predictionが採用された場合、Explicit Weighted Predictionで用いられる重み係数とオフセット値を動き予測・補償部75に供給する。この重み係数とオフセット値は、これらを用いて生成された予測画像が予測画像選択部78により選択された場合、可逆符号化部66に供給されて可逆符号化処理され、圧縮画像のヘッダ部に挿入される。
 重み係数算出部77は、インターテンプレートWeighted Prediction方式のWeighted PredictionとしてExplicit Weighted Predictionが採用される場合、インターTP動き予測・補償部76におけるインター予測する画像に対して、ピクチャ単位で、重み係数およびオフセット値を決定し、インターTP動き予測・補償部76に供給する。
 また、重み係数算出部77は、インターテンプレートWeighted Prediction方式のWeighted PredictionとしてImplicit Weighted Predictionが採用される場合、インターTP動き予測・補償部76から供給される画像に基づいて、インターテンプレートマッチングブロック単位で、重み係数またはオフセット値を算出し、インターTP動き予測・補償部76に供給する。なお、重み係数算出部77の処理の詳細については後述する。
 予測画像選択部78は、イントラ予測部74または動き予測・補償部75より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードから、最適予測モードを決定し、決定された最適予測モードの予測画像を選択し、演算部63,70に供給する。このとき、予測画像選択部78は、予測画像の選択情報を、イントラ予測部74または動き予測・補償部75に供給する。
 レート制御部79は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部65の量子化動作のレートを制御する。
 次に、図6のフローチャートを参照して、図3の画像符号化装置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、およびインターTP動き予測・補償部76は、それぞれ画像の予測処理を行う。すなわち、ステップS21において、イントラ予測部74は、イントラ予測モードのイントラ予測処理を行い、動き予測・補償部75は、インター予測モードの動き予測・補償処理を行い、インターTP動き予測・補償部76は、インターテンプレート予測モードの動き予測・補償処理を行う。
 ステップS21における予測処理の詳細は、図7を参照して後述するが、この処理により、候補となる全ての予測モードでの予測処理がそれぞれ行われ、候補となる全ての予測モードでのコスト関数値がそれぞれ算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードが選択され、最適イントラ予測モードのイントラ予測により生成された予測画像とそのコスト関数値が予測画像選択部78に供給される。また、算出されたコスト関数値に基づいて、インター予測モードとインターテンプレート予測モードの中から、最適インター予測モードが決定され、最適インター予測モードで生成された予測画像とそのコスト関数値が、予測画像選択部78に供給される。
 ステップS22において、予測画像選択部78は、イントラ予測部74および動き予測・補償部75より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードのうちの一方を、最適予測モードに決定し、決定された最適予測モードの予測画像を選択し、演算部63,70に供給する。この予測画像が、上述したように、ステップS13,S18の演算に利用される。
 なお、この予測画像の選択情報は、イントラ予測部74または動き予測・補償部75に供給される。最適イントラ予測モードの予測画像が選択された場合、イントラ予測部74は、最適イントラ予測モードに関する情報を、可逆符号化部66に供給する。
 最適インター予測モードの予測画像が選択された場合、動き予測・補償部75は、最適インター予測モードに関する情報、およびその最適インター予測モードに応じた情報(動きベクトル情報、参照フレーム情報、テンプレート方式情報、重み係数、オフセット値など)を可逆符号化部66に出力する。
 すなわち、最適インター予測モードとして、インター予測モードによる予測画像が選択されているときには、動き予測・補償部75は、インター予測モードを表す情報(以下、適宜、インター予測モード情報と称する)、動きベクトル情報、参照フレーム情報を可逆符号化部66に出力する。
 一方、最適インター予測モードとして、インターテンプレート予測モードによる予測画像が選択されているときには、動き予測・補償部75は、インターテンプレート予測モードを表す情報(以下、適宜、インターテンプレート予測モード情報と称する)、テンプレート方式情報を可逆符号化部66に出力する。なお、インターテンプレートWeighted Prediction方式のWeighted Predictionとして、Explicit Weighted Predictionが採用されている場合には、動き予測・補償部75は、重み係数とオフセット値も可逆符号化部66に出力する。
 ステップS23において、可逆符号化部66は量子化部65より出力された量子化された変換係数を符号化する。すなわち、差分画像が可変長符号化、算術符号化等の可逆符号化され、圧縮される。このとき、上述したステップS22において可逆符号化部66に入力された、イントラ予測部74からの最適イントラ予測モードに関する情報や、動き予測・補償部75からの最適インター予測モードに応じた情報(予測モード情報、動きベクトル情報、参照フレーム情報、テンプレート方式情報、重み係数、オフセット値など)なども符号化され、ヘッダ情報に付加される。
 ステップS24において蓄積バッファ67は圧縮された差分画像を圧縮画像として蓄積する。蓄積バッファ67に蓄積された圧縮画像が適宜読み出され、伝送路を介して復号側に伝送される。
 ステップS25においてレート制御部79は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部65の量子化動作のレートを制御する。
 次に、図7のフローチャートを参照して、図6のステップS21における予測処理を説明する。
 画面並べ替えバッファ62から供給される処理対象の画像がイントラ処理されるブロックの画像である場合、参照される復号済みの画像がフレームメモリ72から読み出され、スイッチ73を介してイントラ予測部74に供給される。これらの画像に基づいて、ステップS31において、イントラ予測部74は処理対象のブロックの画素を、候補となる全てのイントラ予測モードでイントラ予測する。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。
 ステップS31におけるイントラ予測処理の詳細は、図18を参照して後述するが、この処理により、候補となる全てのイントラ予測モードでイントラ予測が行われ、候補となる全てのイントラ予測モードに対してコスト関数値が算出される。
 ステップS32において、イントラ予測部74は、ステップS31において算出された候補となる全てのイントラ予測モードに対してのコスト関数値を比較し、最小値を与える予測モードを、最適イントラ予測モードとして決定する。そして、イントラ予測部74は、最適イントラ予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部78に供給する。
 画面並べ替えバッファ62から供給される処理対象の画像がインター処理される画像である場合、参照される復号済みの画像がフレームメモリ72から読み出され、スイッチ73を介して動き予測・補償部75に供給される。これらの画像に基づいて、ステップS33において、動き予測・補償部75はインター動き予測処理を行う。すなわち、動き予測・補償部75は、フレームメモリ72から供給される復号済みの画像を参照して、候補となる全てのインター予測モードの動き予測処理を行う。
 ステップS33におけるインター動き予測処理の詳細は、図19を参照して後述するが、この処理により、候補となる全てのインター予測モードで動き予測処理が行われ、候補となる全てのインター予測モードに対してコスト関数値が算出される。
 さらに、画面並べ替えバッファ62から供給される処理対象の画像がインター処理される画像である場合、フレームメモリ72から読み出された参照される復号済みの画像は、スイッチ73および動き予測・補償部75を介してインターTP動き予測・補償部76にも供給される。これらの画像に基づいて、インターTP動き予測・補償部76および重み係数算出部77は、ステップS34において、インターテンプレート予測モードで、インターテンプレート動き予測処理を行う。
 ステップS34におけるインターテンプレート動き予測処理の詳細は、図23を参照して後述するが、この処理により、インターテンプレート予測モードで動き予測処理が行われ、インターテンプレート予測モードに対してコスト関数値が算出される。そして、インターテンプレート予測モードの動き予測処理により生成された予測画像とそのコスト関数値が動き予測・補償部75に供給される。
 ステップS35において、動き予測・補償部75は、ステップS33において選択された最適なインター予測モードに対してのコスト関数値と、ステップS34において算出されたインターテンプレート予測モードに対してのコスト関数値を比較し、最小値を与える予測モードを、最適インター予測モードとして決定する。そして、動き予測・補償部75は、最適インター予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部78に供給する。
 次に、H.264/AVC方式で定められているイントラ予測の各モードについて説明する。
 まず、輝度信号に対するイントラ予測モードについて説明する。輝度信号のイントラ予測モードには、9種類の4×4画素のブロック単位、並びに4種類の16×16画素のマクロブロック単位の予測モードがある。図8に示されるように、16×16画素のイントラ予測モードの場合、各ブロックの直流成分を集めて、4×4行列が生成され、これに対して、さらに、直交変換が施される。
 なお、ハイプロファイルについては、8次のDCTブロックに対して、8×8画素のブロック単位の予測モードが定められているが、この方式については、次に説明する4×4画素のイントラ予測モードの方式に準じる。
 図9および図10は、9種類の輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)を示す図である。平均値(DC)予測を示すモード2以外の8種類の各モードは、それぞれ、図11の番号0,1,3乃至8で示される方向に対応している。
 9種類のIntra_4x4_pred_modeについて、図12を参照して説明する。図12の例において、画素a乃至pは、イントラ処理される対象ブロックの画素を表し、画素値A乃至Mは、隣接ブロックに属する画素の画素値を表している。すなわち、画素a乃至pは、画面並べ替えバッファ62から読み出された処理対象の画像であり、画素値A乃至Mは、フレームメモリ72から参照画像として読み出されるデブロックフィルタ処理前の復号済みの画像の画素値である。
 図9および図10の各イントラ予測モードの場合、画素a乃至pの予測画素値は、隣接ブロックに属する画素の画素値A乃至Mを用いて、以下のように生成される。なお、画素値が“available”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由がなく、利用可能であることを表し、画素値が“unavailable”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により利用可能ではないことを表す。
 モード0はVertical Predictionであり、画素値A乃至Dが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(8)により求められる。
 画素a, e, i, mの予測画素値 = A
 画素b, f, j, nの予測画素値 = B
 画素c, g, k, oの予測画素値 = C
 画素d, h, l, pの予測画素値 = D              ・・・(8) 
 モード1はHorizontal Predictionであり、画素値I乃至Lが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(9)により求められる。
 画素a, b, c, dの予測画素値 = I
 画素e, f, g, hの予測画素値 = J
 画素i, j, k, lの予測画素値 = K
 画素m, n, o, pの予測画素値 = L              ・・・(9) 
 モード2はDC Predictionであり、画素値A,B,C,D,I,J,K,Lが全て “available” である時、予測画素値は式(10)により求められる。
 (A+B+C+D+i+J+K+L+4)>>3          ・・・(10) 
 また、画素値A,B,C,Dが全て “unavailable” である時、予測画素値は式(11)により求められる。
 (I+J+K+L+2)>>2                  ・・・(11) 
 また、画素値I,J,K,Lが全て “unavailable” である時、予測画素値は式(12)により求められる。
 (A+B+C+D+2)>>2                  ・・・(12) 
 なお、画素値A,B,C,D,I,J,K,Lが全て“unavailable” である時、128を予測画素値として用いる。
 モード3はDiagonal_Down_Left Predictionであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(13)のように生成される。
 画素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
                                 ・・・(13) 
 モード4はDiagonal_Down_Right Predictionであり、画素値A,B,C,D,I,J,K,L,Mが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(14)のように生成される。
 画素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
                                 ・・・(14) 
 モード5はDiagonal_Vertical_Right Predictionであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(15)のように生成される。
 画素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
                                 ・・・(15) 
 モード6はHorizontal_Down Predictionであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(16)のように生成される。
 画素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
                                 ・・・(16) 
 モード7は、Vertical_Left Predictionであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(17)のように生成される。
 画素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
                                 ・・・(17) 
 モード8は、Horizontal_Up Predictionであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(18)のように生成される。
 画素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
                                 ・・・(18) 
 次に、図13を参照して、輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)の符号化方式について説明する。
 図13の例において、4×4画素からなり、符号化対象となる対象ブロックCが示されており、対象ブロックCに隣接する4×4画素からなるブロックAおよびブロックBが示されている。
 この場合、対象ブロックCにおけるIntra_4x4_pred_modeと、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeとは高い相関があると考えられる。この相関性を用いて、次のように符号化処理を行うことにより、より高い符号化効率を実現することができる。
 すなわち、図13の例において、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeを、それぞれ、Intra_4x4_pred_modeAおよびIntra_4x4_pred_modeBとして、MostProbableModeを次の式(19)と定義する。
 MostProbableMode=Min(Intra_4x4_pred_modeA, Intra_4x4_pred_modeB)
                                 ・・・(19) 
 すなわち、ブロックAおよびブロックBのうち、より小さなmode_numberを割り当てられている方をMostProbableModeとする。
 ビットストリーム中には、対象ブロックCに対するパラメータとして、prev_intra4x4_pred_mode_flag[luma4x4BlkIdx] および rem_intra4x4_pred_mode[luma4x4BlkIdx] という2つの値が定義されており、次の式(20)に示される擬似コードに基づく処理により、復号処理が行われ、対象ブロック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                                 ・・・(20) 
 次に、16×16画素のイントラ予測モードについて説明する。図14および図15は、4種類の輝度信号の16×16画素のイントラ予測モード(Intra_16x16_pred_mode)を示す図である。
 4種類のイントラ予測モードについて、図16を参照して説明する。図16の例において、イントラ処理される対象マクロブロックAが示されており、P(x,y);x,y=-1,0,…,15は、対象マクロブロックAに隣接する画素の画素値を表している。
 モード0は、Vertical Predictionであり、P(x,-1); x,y=-1,0,…,15が “available”である時のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(21)のように生成される。
 Pred(x,y) = P(x,-1);x,y=0,…,15
                                 ・・・(21) 
 モード1はHorizontal Predictionであり、P(-1,y); x,y=-1,0,…,15が “available”である時のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(22)のように生成される。
 Pred(x,y) = P(-1,y);x,y=0,…,15
                                 ・・・(22) 
 モード2はDC Predictionであり、P(x,-1)およびP(-1,y); x,y=-1,0,…,15が全て“available” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(23)のように生成される。
Figure JPOXMLDOC01-appb-M000005
 また、P(x,-1); x,y=-1,0,…,15が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(24)のように生成される。
Figure JPOXMLDOC01-appb-M000006
 P(-1,y); x,y=-1,0,…,15が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(25)のように生成される。
Figure JPOXMLDOC01-appb-M000007
 P(x,-1)およびP(-1,y); x,y=-1,0,…,15が全て “unavailable” である場合には、予測画素値として128を用いる。
 モード3はPlane Predictionであり、P(x,-1)及びP(-1,y); x,y=-1,0,…,15が全て “available” の場合のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(26)のように生成される。
Figure JPOXMLDOC01-appb-M000008
 次に、色差信号に対するイントラ予測モードについて説明する。図17は、4種類の色差信号のイントラ予測モード(Intra_chroma_pred_mode)を示す図である。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。色差信号に対するイントラ予測モードは、上述した輝度信号の16×16画素のイントラ予測モードに順ずる。
 ただし、輝度信号の16×16画素のイントラ予測モードが、16×16画素のブロックを対象としているのに対し、色差信号に対するイントラ予測モードは、8×8画素のブロックを対象としている。さらに、上述した図14と図17に示されるように、両者においてモード番号は対応していない。
 図16を参照して上述した輝度信号の16×16画素のイントラ予測モードの対象マクロブロックAの画素値および隣接する画素値の定義に準じて、イントラ処理される対象マクロブロックA(色差信号の場合は、8×8画素)に隣接する画素の画素値をP(x,y);x,y=-1,0,…,7とする。
 モード0はDC Predictionであり、P(x,-1)およびP(-1,y); x,y=-1,0,…,7が全て “available” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(27)のように生成される。
Figure JPOXMLDOC01-appb-M000009
 また、P(-1,y) ; x,y=-1,0,…,7が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(28)のように生成される。
Figure JPOXMLDOC01-appb-M000010
 また、P(x,-1) ; x,y=-1,0,…,7が “unavailable”である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(29)のように生成される。
Figure JPOXMLDOC01-appb-M000011
 モード1はHorizontal Predictionであり、P(-1,y) ; x,y=-1,0,…,7が “available”の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(30)のように生成される。
 Pred(x,y) = P(-1,y);x,y=0,…,7
                                 ・・・(30) 
 モード2はVertical Predictionであり、P(x,-1) ; x,y=-1,0,…,7が “available”の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(31)のように生成される。
 Pred(x,y) = P(x,-1);x,y=0,…,7
                                 ・・・(31) 
 モード3はPlane Predictionであり、P(x,-1)及びP(-1,y) ; x,y=-1,0,…,7 が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(32)のように生成される。
Figure JPOXMLDOC01-appb-M000012
 以上のように、輝度信号のイントラ予測モードには、9種類の4×4画素および8×8画素のブロック単位、並びに4種類の16×16画素のマクロブロック単位の予測モードがあり、色差信号のイントラ予測モードには、4種類の8×8画素のブロック単位の予測モードがある。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。輝度信号の4×4画素および8×8画素のイントラ予測モードについては、4×4画素および8×8画素の輝度信号のブロック毎に1つのイントラ予測モードが定義される。輝度信号の16×16画素のイントラ予測モードと色差信号のイントラ予測モードについては、1つのマクロブロックに対して1つの予測モードが定義される。
 なお、予測モードの種類は、上述した図11の番号0,1,3乃至8で示される方向に対応している。予測モード2は平均値予測である。
 次に、これらの予測モードに対して行われる処理である、図7のステップS31におけるイントラ予測処理を図18のフローチャートを参照して説明する。なお、図18の例においては、輝度信号の場合を例として説明する。
 イントラ予測部74は、ステップS41において、上述した輝度信号の4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対してイントラ予測を行う。
 例えば、4×4画素のイントラ予測モードの場合について、上述した図12を参照して説明する。画面並べ替えバッファ62から読み出された処理対象の画像(例えば、画素a乃至p)がイントラ処理されるブロックの画像である場合、参照される復号済みの画像(画素値A乃至Mが示される画素)がフレームメモリ72から読み出され、スイッチ73を介してイントラ予測部74に供給される。
 これらの画像に基づいて、イントラ予測部74は、処理対象のブロックの画素をイントラ予測する。このイントラ予測処理が、各イントラ予測モードで行われることで、各イントラ予測モードでの予測画像が生成される。なお、参照される復号済みの画素(画素値A乃至Mが示される画素)としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。
 イントラ予測部74は、ステップS42において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対するコスト関数値を算出する。ここで、コスト関数値としては、H.264/AVC方式における参照ソフトウェアであるJM(Joint Model)で定められているように、High Complexity モードか、Low Complexity モードのいずれかの手法に基づいて行う。 
 すなわち、High Complexity モードにおいては、ステップS41の処理として、候補となる全ての予測モードに対して、仮に符号化処理までを行い、次の式(33)で表わされるコスト関数値を各予測モードに対して算出し、その最小値を与える予測モードを最適予測モードであるとして選択する。
 Cost(Mode) = D + λ・R                     ・・・(33) 
 Dは、原画像と復号画像の差分(歪)、Rは、直交変換係数まで含んだ発生符号量、λは、量子化パラメータQPの関数として与えられるラグランジュ乗数である。
 一方、Low Complexity モードにおいては、ステップS41の処理として、候補となる全ての予測モードに対して、予測画像の生成、および、動きベクトル情報や予測モード情報などのヘッダビットまでを算出し、次の式(34)で表わされるコスト関数値を各予測モードに対して算出し、その最小値を与える予測モードを最適予測モードであるとして選択する。
 Cost(Mode) = D + QPtoQuant(QP)・Header_Bit           ・・・(34) 
 Dは、原画像と復号画像の差分(歪)、Header_Bitは、予測モードに対するヘッダビット、QPtoQuantは、量子化パラメータQPの関数として与えられる関数である。
 Low Complexity モードにおいては、全ての予測モードに対して、予測画像を生成するのみで、符号化処理および復号処理を行う必要がないため、演算量が少なくて済む。
 イントラ予測部74は、ステップS43において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して、それぞれ最適モードを決定する。すなわち、図11を参照して上述したように、イントラ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において算出されたコスト関数値に基づいて、1つのイントラ予測モードを選択する。すなわち、4×4画素、8×8画素、および16×16画素に対して決定された各最適モードの中から、コスト関数値が最小値であるイントラ予測モードを選択する。
 次に、図19のフローチャートを参照して、図7のステップS33のインター動き予測処理について説明する。
 動き予測・補償部75は、ステップS51において、図4を参照して上述した16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して、動きベクトルと参照画像をそれぞれ決定する。すなわち、各インター予測モードの処理対象のブロックについて、動きベクトルと参照画像がそれぞれ決定される。
 動き予測・補償部75は、ステップS52において、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、ステップS51で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理により、各インター予測モードでの予測画像が生成される。
 動き予測・補償部75は、ステップS53において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して決定された動きベクトルについて、圧縮画像に付加するための動きベクトル情報を生成する。
 ここで、図20を参照して、H.264/AVC方式による動きベクトル情報の生成方法について説明する。図20の例において、これから符号化される対象ブロックE(例えば、16×16画素)と、既に符号化済みであり、対象ブロックEに隣接するブロックA乃至Dが示されている。
 すなわち、ブロックDは、対象ブロックEの左上に隣接しており、ブロックBは、対象ブロックEの上に隣接しており、ブロックCは、対象ブロックEの右上に隣接しており、ブロックAは、対象ブロックEの左に隣接している。なお、ブロックA乃至Dが区切られていないのは、それぞれ、図4で上述した16×16画素乃至4×4画素のうちのいずれかの構成のブロックであることを表している。
 例えば、X(=A,B,C,D,E)に対する動きベクトル情報を、mvXで表す。まず、対象ブロックEに対する予測動きベクトル情報(動きベクトルの予測値)pmvEは、ブロックA,B,Cに関する動きベクトル情報を用いて、メディアンオペレーションにより次の式(35)で求められる。
 pmvE = med(mvA,mvB,mvC)                    ・・・(35) 
 ブロックCに関する動きベクトル情報が、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により、利用可能でない(unavailableである)場合には、ブロックCに関する動きベクトル情報は、ブロックDに関する動きベクトル情報で代用される。
 対象ブロックEに対する動きベクトル情報として、圧縮画像のヘッダ部に付加されるデータmvdEは、pmvEを用いて、次の式(36)により求められる。
 mvdE = mvE - pmvE                       ・・・(36) 
 なお、実際には、動きベクトル情報の水平方向、垂直方向のそれぞれの成分に対して、独立に処理が行われる。
 このように、予測動きベクトル情報を生成し、隣接するブロックとの相関で生成された予測動きベクトル情報と動きベクトル情報との差分を、圧縮画像のヘッダ部に付加することにより、動きベクトル情報を低減することができる。
 以上のようにして生成された動きベクトル情報は、次のステップS54におけるコスト関数値算出の際にも用いられ、最終的に予測画像選択部78により対応する予測画像が選択された場合には、インター予測モード情報および参照フレーム情報とともに、可逆符号化部66へ出力される。
 図19に戻って、動き予測・補償部75は、ステップS54において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して、上述した式(33)または式(34)で示されるコスト関数値を算出する。ここで算出されたコスト関数値は、上述した図7のステップS35で最適インター予測モードを決定する際に用いられる。
 なお、インター予測モードに対するコスト関数値の算出には、H.264/AVC方式において定められているSkip ModeおよびDirect Modeのコスト関数値の評価も含まれる。
 次に、インターテンプレートWeighted Prediction方式について説明する。
 まず、図21を参照して、インターテンプレートマッチング方式について説明する。
 図21の例においては、符号化対象の対象フレームと、動きベクトルを探索する際に参照される参照フレームが示されている。対象フレームには、これから符号化する対象ブロックAと、対象ブロックAに対して隣接するとともに、既に符号化済みの画素で構成されるテンプレート領域Bが示されている。すなわち、テンプレート領域Bは、符号化処理をラスタスキャン順に行う場合には、図21に示されるように、対象ブロックAの左および上側に位置する領域であり、フレームメモリ72に復号画像が蓄積されている領域である。
 インターTP動き予測・補償部76は、参照フレーム上の所定の探索範囲E内において、例えば、SAD(Sum of Absolute Difference) 等をコスト関数としてマッチング処理を行い、テンプレート領域Bの画素値と相関が最も高くなる領域B’を探索する。そして、インターTP動き予測・補償部76は、探索された領域B’に対応するブロックA’を、対象ブロックAに対する予測画像として、対象ブロックAに対する動きベクトルPを探索する。すなわち、インターテンプレートマッチング方式においては、符号化済の領域であるテンプレートのマッチング処理を行うことにより、符号化対象ブロックの動きベクトルを探索して符号化対象ブロックの動きを予測するのである。
 このように、インターテンプレートマッチング方式による動きベクトル探索処理は、テンプレートマッチング処理に復号画像を用いているので、所定の探索範囲Eを予め定めておくことにより、図3の画像符号化装置51と後述する画像復号装置において同一の処理を行うことが可能である。すなわち、画像復号装置においても、インターTP動き予測・補償部を構成することにより、対象ブロックAに対する動きベクトルPの情報を画像復号装置に送る必要がなくなるので、圧縮画像中における動きベクトル情報を低減することができる。
 なお、この所定の探索範囲Eは、例えば、動きベクトル(0,0)を中心とした探索範囲とされる。また、この所定の探索範囲Eは、例えば、図20を参照して上述したように、隣接ブロックとの相関で生成された予測動きベクトル情報を中心とした探索範囲とされるようにしてもよい。
 インターテンプレートWeighted Prediction方式では、Weighted PredictionとしてExplicit Weighted Predictionが用いられる場合、上述したインターテンプレートマッチング方式で求められた予測画像が、List0参照フレームの予測画像P(L0)とされて、インター予測する画像としてのPピクチャに対して、上述した式(1)の演算が行われる。
 また、インター予測する画像としてのBピクチャに対しては、上述したインターテンプレートマッチング方式で求められた2つの予測画像が、それぞれ、List0参照フレームの予測画像P(L0)、List1参照フレームの予測画像P(L1)とされて、上述した式(2)の演算が行われる。なお、Weighted PredictionとしてExplicit Weighted Predictionが用いられる場合には、重み係数とオフセット値は、重み係数算出部77によりピクチャ単位で決定された値となる。
 これに対して、インターテンプレートWeighted Prediction方式において、Weighted PredictionとしてImplicit Weighted Predictionが用いられる場合には、以下のようにして予測画像が求められる。
 まず、インター予測する画像がPピクチャである場合について説明する。
 この場合、予測画像を求める方法には、重み係数に基づいて予測画像を求める方法とオフセット値に基づいて予測画像を求める方法の2つの方法があり、いずれの方法が用いられてもよい。
 重み係数に基づいて予測画像を求める方法では、重み係数算出部77は、インターテンプレートマッチング方式おけるテンプレート領域B、領域B’(図21)の画素値の平均値を算出し、それぞれ、Ave(B),Ave(B’)とする。そして、重み係数算出部77は、平均値Ave(B)およびAve(B’)を用いて、以下の式(37)により重み係数w0を求める。
Figure JPOXMLDOC01-appb-M000013
 これにより、重み係数w0は、同一のPピクチャ内であっても、各テンプレートマッチングブロックに対して異なる値となる。
 インターTP動き予測・補償部76は、この重み係数w0とブロックA’の画素値Pix(A')を用いて、以下の式(38)により、ブロックAの予測画素値Pred(A)を求める。
 Pred(A)=w0×Pix(A')
                                 ・・・(38) 
 以上のように、インターTP動き予測・補償部76は、テンプレートマッチングブロック単位で求められる重み係数w0を用いて、予測画像を生成するので、画面内のローカルな画素値の性質に適した予測画像を生成することができる。
 なお、式(37)で求められた重み係数w0を、X/(2n)の形式で表される値に近似するようにしてもよい。この場合、除算をビットシフトにより行うことができるので、Weighted Predictionの処理の演算量を減らすことができる。
 一方、オフセット値に基づいて予測画像を求める方法では、重み係数算出部77は、平均値Ave(B),Ave(B’)を用いて、以下の式(39)によりオフセット値d0を求める。
 d0=Ave(B)-Ave(B’)
                                 ・・・(39) 
 これにより、オフセット値d0は、同一のPピクチャ内であっても、各テンプレートマッチングブロックに対して異なる値となる。
 インターTP動き予測・補償部76は、このオフセット値d0とブロックA’の予測画素値Pred(A’)を用いて、以下の式(40)により、ブロックAの予測画素値Pred(A)を求める。
 Pred(A)=Pred(A’)+d0
                                 ・・・(40) 
 以上のように、インターTP動き予測・補償部76は、テンプレートマッチングブロック単位で求められるオフセット値d0を用いて、予測画像を生成するので、画面内のローカルな画素値の性質に適した予測画像を生成することができる。
 次に、インター予測する画像がBピクチャである場合について説明する。
 この場合、図22に示されるように、インターテンプレートマッチング方式では、符号化対象の対象フレームと、動きベクトルを探索する際に参照される参照フレームとして、L0参照フレームとL1参照フレームが用いられる。そして、L0参照フレーム上の所定の探索範囲内において、図21の場合と同様のマッチング処理が行われ、探索された領域b1に対応するブロックa1が予測画像とされる。また、L1参照フレームについても同様のマッチング処理が行われ、探索された領域b2に対応するブロックa2が予測画像とされる。
 重み係数算出部77は、テンプレート領域B、領域b1、領域b2の画素値の平均値を算出し、それぞれ、Ave_tmplt_Cur,Ave_tmplt_L0,Ave_tmplt_L1とする。そして、重み係数算出部77は、平均値Ave_tmplt_Cur,Ave_tmplt_L0、およびAve_tmplt_L1を用いて、以下の式(41)により重み係数w0およびw1を求める。
 w0=|Ave_tmplt_L1-Ave_tmplt_Cur|
 w1=|Ave_tmplt_L0-Ave_tmplt_Cur|
                                 ・・・(41) 
 また、重み係数算出部77は、式(41)により求められた重み係数w0およびw1を以下の式(42)を用いて正規化する。
Figure JPOXMLDOC01-appb-M000014
 以上により、重み係数w0およびw1は、同一のBピクチャ内であっても、各テンプレートマッチングブロックに対して異なる値となる。
 インターTP動き予測・補償部76は、この重み係数w0およびw1、ブロックa1の画素値Pix_L0、並びにブロックa2の画素値Pix_L1を用いて、以下の式(43)により、ブロックAの予測画素値Pred(A)を求める。
 Pred(A)=w0×Pix_L0+w1×Pix_L1
                                 ・・・(43) 
 以上のように、インターTP動き予測・補償部76は、テンプレートマッチングブロック単位で求められる重み係数w0およびw1を用いて、予測画像を生成するので、画面内のローカルな画素値の性質に適した予測画像を生成することができる。
 なお、式(42)で求められた重み係数w0およびw1を、X/(2n)の形式で表される値に近似するようにしてもよい。この場合、除算をビットシフトにより行うことができるので、Weighted Predictionの処理の演算量を減らすことができる。
 以上のようにして、画像符号化装置51では、Implicit Weighted Predictionにおける重み係数が算出されるので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 次に、図23のフローチャートを参照して、図7のステップS34のインターテンプレート動き予測処理の詳細な例について説明する。
 ステップS71において、インターTP動き予測・補償部76は、インターテンプレートマッチング方式で動きベクトルの探索を行う。ステップS72において、インターTP動き予測・補償部76は、動き予測・補償処理の方式としてインターテンプレートWeighted Prediction方式を採用するか否かを判定する。
 ステップS72で動き予測・補償処理の方式としてインターテンプレートWeighted Prediction方式を採用すると判定された場合、ステップS73において、インターTP動き予測・補償部76は、Weighted Predictionとして、Explicit Weighted Predictionを採用するか否かを判定する。
 ステップS73で、Weighted PredictionとしてExplicit Weighted Predictionを採用すると判定された場合、ステップS74において、インターTP動き予測・補償部76は、重み係数算出部77によりピクチャ単位で決定されている重み係数およびオフセット値と、ステップS71で探索された動きベクトルにより指し示される参照フレームのブロックAまたはブロックa1,a2とを用いて、上述した式(1)または式(2)により予測画像を生成する。
 一方、ステップS73で、Weighted PredictionとしてExplicit Weighted Predictionを採用しない、即ち、Weighted PredictionとしてImplicit Weighted Predictionを採用すると判定された場合、処理はステップS75に進む。ステップS75において、重み係数算出部77は、インターTP動き予測・補償部76から供給される画像を用いて、重み係数を算出する。
 具体的には、インター予測する画像がPピクチャである場合、重み係数算出部77は、テンプレート領域Bおよび領域B’の復号画像を用いて、上述した式(37)により重み係数を算出する。また、インター予測する画像がBピクチャである場合、重み係数算出部77は、テンプレート領域B、領域b1、および領域b2の復号画像を用いて、上述した式(41)および式(42)により重み係数を算出する。なお、インター予測する画像がPピクチャである場合には、重み係数算出部77は、テンプレート領域Bおよび領域B’の復号画像を用いて、上述した式(39)によりオフセット値を算出するようにしてもよい。
 ステップS76において、インターTP動き予測・補償部76は、ステップS75で算出された重み係数を用いて、上述した式(38)または式(43)により予測画像を生成する。なお、重み係数算出部77によりオフセット値が算出された場合には、インターTP動き予測・補償部76は、上述した式(40)により予測画像を生成する。
 また、ステップS72で、動き予測・補償処理の方式としてインターテンプレートWeighted Prediction方式を採用しないと判定された場合、即ち、動き予測・補償処理の方式としてインターテンプレート方式を採用する場合、処理はステップS77に進む。
 ステップS77において、インターTP動き予測・補償部76は、ステップS71で探索された動きベクトルに基づいて予測画像を生成する。例えば、インターTP動き予測・補償部76は、動きベクトルPに基づいて、領域A´の画像をそのまま予測画像とする。
 ステップS74,S76、またはS77の処理後、ステップS78において、インターTP動き予測・補償部76は、インターテンプレート予測モードに対してコスト関数値を算出する。
 このようにして、インターテンプレート動き予測処理が行われる。
 また、画像符号化装置51により符号化された圧縮画像は、所定の伝送路を介して伝送され、画像復号装置により復号される。図24は、このような画像復号装置の一実施の形態の構成を表している。
 画像復号装置101は、蓄積バッファ111、可逆復号部112、逆量子化部113、逆直交変換部114、演算部115、デブロックフィルタ116、画面並べ替えバッファ117、D/A変換部118、フレームメモリ119、スイッチ120、イントラ予測部121、動き予測・補償部122、インターテンプレート動き予測・補償部123、重み係数算出部124、およびスイッチ125により構成されている。
 なお、以下、インターテンプレート動き予測・補償部123を、インターTP動き予測・補償部123と称する。
 蓄積バッファ111は伝送されてきた圧縮画像を蓄積する。可逆復号部112は、蓄積バッファ111より供給された、図3の可逆符号化部66により符号化された情報を、可逆符号化部66の符号化方式に対応する方式で復号する。逆量子化部113は可逆復号部112により復号された画像を、図3の量子化部65の量子化方式に対応する方式で逆量子化する。逆直交変換部114は、図3の直交変換部64の直交変換方式に対応する方式で逆量子化部113の出力を逆直交変換する。
 逆直交変換された出力は演算部115によりスイッチ125から供給される予測画像と加算されて復号される。デブロックフィルタ116は、復号された画像のブロック歪を除去した後、フレームメモリ119に供給し、蓄積させるとともに、画面並べ替えバッファ117に出力する。
 画面並べ替えバッファ117は、画像の並べ替えを行う。すなわち、図3の画面並べ替えバッファ62により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられる。D/A変換部118は、画面並べ替えバッファ117から供給された画像をD/A変換し、図示せぬディスプレイに出力し、表示させる。
 スイッチ120は、インター符号化が行われる画像と参照される画像をフレームメモリ119から読み出し、動き予測・補償部122に出力するとともに、イントラ予測に用いられる画像をフレームメモリ119から読み出し、イントラ予測部121に供給する。
 イントラ予測部121には、ヘッダ情報を復号して得られたイントラ予測モードに関する情報が可逆復号部112から供給される。イントラ予測モードに関する情報が供給された場合、イントラ予測部121は、この情報に基づいて、予測画像を生成する。イントラ予測部121は、生成した予測画像を、スイッチ125に出力する。
 動き予測・補償部122には、ヘッダ情報を復号して得られた情報(予測モード情報、動きベクトル情報、参照フレーム情報、テンプレート方式情報、重み係数、オフセット値など)が可逆復号部112から供給される。予測モード情報としてインター予測モード情報が供給された場合、動き予測・補償部122は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。
 予測モード情報としてインターテンプレート予測モード情報が供給された場合、動き予測・補償部122は、フレームメモリ119から読み出されたインター符号化が行われる画像と参照される画像をインターTP動き予測・補償部123に供給し、インターテンプレート予測モードでの動き予測・補償処理を行わせる。なお、このとき、可逆復号部112から供給されるテンプレート方式情報もインターTP動き予測・補償部123に供給される。また、可逆復号部112から重み係数およびオフセット値が供給された場合、その重み係数およびオフセット値もインターTP動き予測・補償部123に供給する。
 また、動き予測・補償部122は、予測モード情報に応じて、インター予測モードにより生成された予測画像、または、インターテンプレート予測モードにより生成された予測画像のどちらか一方をスイッチ125に出力する。
 インターTP動き予測・補償部123は、動き予測・補償部122から供給されるテンプレート方式情報に応じて、図3のインターTP動き予測・補償部76と同様に、インターテンプレート予測モードの動き予測と補償処理を行う。すなわち、インターTP動き予測・補償部123は、フレームメモリ119から読み出されたインター符号化が行われる画像と参照される画像に基づいて、インターテンプレートWeighted Prediction方式またはインターテンプレートマッチング方式で、インターテンプレート予測モードの動き予測と補償処理を行う。その結果、予測画像が生成される。
 なお、インターテンプレートWeighted Prediction方式で動き予測と補償処理が行われる場合、テンプレート方式情報がWeighted PredictionとしてExplicit Weighted Predictionが採用されたことを表しているとき、インターTP動き予測・補償部123は、動き予測・補償部122から供給される重み係数とオフセット値を用いて、図3のインターTP動き予測・補償部76と同様に予測画像を生成する。
 これに対して、テンプレート方式情報がWeighted PredictionとしてImplicit Weighted Predictionが採用されたことを表しているとき、インターTP動き予測・補償部123は、インターテンプレートマッチング方式における対象フレームのテンプレート領域と、そのテンプレート領域と相関が高い参照フレームの領域の画像を、重み係数算出部124に供給する。そして、インターTP動き予測・補償部123は、その画像に応じて重み係数算出部124から供給される重み係数またはオフセット値を用いて、図3のインターTP動き予測・補償部76と同様に予測画像を生成する。
 重み係数算出部124は、インターTP動き予測・補償部123から供給されるテンプレート領域と、そのテンプレート領域と相関が高い参照フレームの領域の画像から、図3の重み係数算出部77と同様に、重み係数またはオフセット値を算出する。
 インターテンプレート予測モードの動き予測・補償により生成された予測画像は、動き予測・補償部122に供給される。
 スイッチ125は、動き予測・補償部122またはイントラ予測部121により生成された予測画像を選択し、演算部115に供給する。
 次に、図25のフローチャートを参照して、画像復号装置101が実行する復号処理について説明する。
 ステップS131において、蓄積バッファ111は伝送されてきた画像を蓄積する。ステップS132において、可逆復号部112は、蓄積バッファ111から供給される圧縮画像を復号する。すなわち、図3の可逆符号化部66により符号化されたIピクチャ、Pピクチャ、並びにBピクチャが復号される。
 このとき、動きベクトル情報や予測モード情報(イントラ予測モード、インター予測モード、またはインターテンプレート予測モードを表す情報)も復号される。すなわち、予測モード情報がイントラ予測モードを表す場合、予測モード情報は、イントラ予測部121に供給される。予測モード情報がインター予測モードまたはインターテンプレート予測モードを表す場合、予測モード情報は、動き予測・補償部122に供給される。その際、対応する動きベクトル情報、参照フレーム情報、テンプレート方式情報、重み係数、オフセット値などがあれば、それも、動き予測・補償部122に供給される。
 ステップS133において、逆量子化部113は可逆復号部112により復号された変換係数を、図3の量子化部65の特性に対応する特性で逆量子化する。ステップS134において逆直交変換部114は逆量子化部113により逆量子化された変換係数を、図3の直交変換部64の特性に対応する特性で逆直交変換する。これにより図3の直交変換部64の入力(演算部63の出力)に対応する差分情報が復号されたことになる。
 ステップS135において、演算部115は、後述するステップS139の処理で選択され、スイッチ125を介して入力される予測画像を差分情報と加算する。これにより元の画像が復号される。ステップS136においてデブロックフィルタ116は、演算部115より出力された画像をフィルタリングする。これによりブロック歪みが除去される。
ステップS137においてフレームメモリ119は、フィルタリングされた画像を記憶する。
 ステップS138において、イントラ予測部121、動き予測・補償部122、またはインターTP動き予測・補償部123は、可逆復号部112から供給される予測モード情報に対応して、それぞれ画像の予測処理を行う。
 すなわち、可逆復号部112からイントラ予測モードを表す情報(以下、イントラ予測モード情報と称する)が供給された場合、イントラ予測部121は、そのイントラ予測モードのイントラ予測処理を行う。また、可逆復号部112からインター予測モード情報が供給された場合、動き予測・補償部122は、そのインター予測モードの動き予測・補償処理を行う。可逆復号部112からインターテンプレート予測モード情報が供給された場合、インターTP動き予測・補償部123は、インターテンプレート予測モードの動き予測・補償処理を行う。
 ステップS138における予測処理の詳細は、図26を参照して後述するが、この処理により、イントラ予測部121により生成された予測画像、動き予測・補償部122により生成された予測画像、またはインターTP動き予測・補償部123により生成された予測画像がスイッチ125に供給される。
 ステップS139において、スイッチ125は予測画像を選択する。すなわち、イントラ予測部121により生成された予測画像、動き予測・補償部122により生成された予測画像、またはインターTP動き予測・補償部123により生成された予測画像が供給されるので、供給された予測画像が選択されて演算部115に供給され、上述したように、ステップS134において逆直交変換部114の出力と加算される。
 ステップS140において、画面並べ替えバッファ117は並べ替えを行う。すなわち画像符号化装置51の画面並べ替えバッファ62により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。
 ステップS141において、D/A変換部118は、画面並べ替えバッファ117からの画像をD/A変換する。この画像が図示せぬディスプレイに出力され、画像が表示される。
 次に、図26のフローチャートを参照して、図25のステップS138の予測処理について説明する。
 イントラ予測部121は、ステップS171において、対象ブロックがイントラ符号化されているか否かを判定する。可逆復号部112からイントラ予測モード情報がイントラ予測部121に供給されると、イントラ予測部121は、ステップS171において、対象ブロックがイントラ符号化されていると判定し、処理は、ステップS172に進む。
 ステップS172において、イントラ予測部121は、イントラ予測モード情報を取得する。
 ステップS173において、処理に必要な画像がフレームメモリ119から読み出されるとともに、イントラ予測部121は、ステップS172で取得されたイントラ予測モード情報に従ってイントラ予測し、予測画像を生成する。そして、処理は終了する。
 一方、ステップS171において、イントラ符号化されていないと判定された場合、処理は、ステップS174に進む。この場合、処理対象の画像がインター処理される画像であるから、必要な画像がフレームメモリ119から読み出され、スイッチ120を介して動き予測・補償部122に供給される。
 動き予測・補償部122は、ステップS174において、対象ブロックがインターテンプレートマッチング方式で符号化されているか否かを判定する。可逆復号部112からインターテンプレート予測モード情報が動き予測・補償部122に供給されると、動き予測・補償部122は、ステップS174において、対象ブロックがインターテンプレートマッチング方式で符号化されていると判定し、処理は、ステップS175に進む。
 ステップS175において、動き予測・補償部122は、可逆復号部112からテンプレート方式情報を取得し、インターTP動き予測・補償部123に供給する。ステップS176において、インターTP動き予測・補償部123は、インターテンプレートマッチング方式で動きベクトルの探索を行う。
 ステップS177において、インターTP動き予測・補償部123は、対象ブロックが、インターテンプレートWeighted Prediction方式で符号化されているか否かを判定する。可逆復号部112から取得されたテンプレート方式情報が、動き予測・補償方式としてインターテンプレートWeighted Prediction方式が採用されていることを表していると、インターTP動き予測・補償部123は、ステップS177において、対象ブロックがインターテンプレートWeighted Prediction方式で符号化されていると判定し、処理は、ステップS178に進む。
 ステップS178において、インターTP動き予測・補償部123は、インターテンプレートWeighted Prediction方式のWeighted PredictionとしてExplicit Weighted Predictionが採用されているか否かを判定する。可逆復号部112から取得されたテンプレート方式情報が、Weighted PredictionとしてExplicit Weighted Predictionが採用されていることを表していると、ステップS178において、Weighted PredictionとしてExplicit Weighted Predictionが採用されていると判定され、処理は、ステップS179に進む。
 ステップS179において、インターTP動き予測・補償部123は、可逆復号部112から動き予測・補償部122を介して供給される重み係数とオフセット値を取得する。
ステップS180において、インターTP動き予測・補償部123は、ステップS179で取得された重み係数およびオフセット値と、ステップS176で探索された動きベクトルに対応する画像とを用いて、上述した式(1)または(2)を用いて予測画像を生成する。そして、処理は終了する。
 一方、可逆復号部112から取得されたテンプレート方式情報が、Weighted PredictionとしてImplicit Weighted Predictionが採用されていることを表していると、ステップS178において、Weighted PredictionとしてExplicit Weighted Predictionが採用されていないと判定され、処理は、ステップS181に進む。
 ステップS181において、重み係数算出部124は、上述した式(37)または式(41)および式(42)により重み係数を算出する。なお、インター予測する画像がPピクチャである場合には、重み係数算出部77は、上述した式(39)によりオフセット値を算出するようにしてもよい。
 ステップS182において、インターTP動き予測・補償部123は、ステップS181で算出された重み係数を用いて、上述した式(38)または式(43)により予測画像を生成する。なお、重み係数算出部77によりオフセット値が算出された場合には、インターTP動き予測・補償部123は、上述した式(40)により予測画像を生成する。そして、処理は終了する。
 また、可逆復号部112から取得されたテンプレート方式情報が、動き予測・補償方式としてインターテンプレート方式が採用されていることを表していると、ステップS177において、対象ブロックがインターテンプレートWeighted Prediction方式で符号化されていないと判定され、処理はステップS183に進む。
 ステップS183において、インターTP動き予測・補償部123は、ステップS176で探索された動きベクトルに基づいて予測画像を生成する。
 また、可逆復号部112からインター予測モード情報が動き予測・補償部122に供給されると、ステップS174において、対象ブロックがインターテンプレートマッチング方式で符号化されていないと判定され、処理はステップS184に進む。
 ステップS184において、動き予測・補償部122は、可逆復号部112からインター予測モード情報、参照フレーム情報、および動きベクトル情報を取得する。
 ステップS185において、動き予測・補償部122は、ステップS184で取得したインター予測モード情報、参照フレーム情報、および動きベクトル情報に基づいて、インター予測モードの動き予測をし、予測画像を生成する。そして、処理は終了する。
 このようにして、予測処理が実行される。
 以上のように、本発明においては、画像符号化装置および画像復号装置において、インター予測する画像について、復号画像を用いて動き探索を行うインターテンプレートマッチング方式で動き予測を行うようにしたので、動きベクトル情報を送らずに、良質な画質を表示させることができる。
 なお、上記説明においては、マクロブロックの大きさが、16×16画素の場合について説明してきたが、本発明は、”Video Coding Using Extended Block Sizes”,VCEG-AD09,ITU-Telecommunications Standardization Sector STUDY GROUP Question 16 - Contribution 123, Jan 2009に記載の拡張されたマクロブロックサイズに対しても適用することが可能である。
 図27は、拡張されたマクロブロックサイズの例を示す図である。上記記載では、マクロブロックサイズが32×32画素に拡張されている。
 図27の上段には、左から、32×32画素、32×16画素、16×32画素、および16×16画素のブロック(パーティション)に分割された32×32画素で構成されるマクロブロックが順に示されている。図27の中段には、左から、16×16画素、16×8画素、8×16画素、および8×8画素のブロックに分割された16×16画素で構成されるブロックが順に示されている。また、図27の下段には、左から、8×8画素、8×4画素、4×8画素、および4×4画素のブロックに分割された8×8画素のブロックが順に示されている。
 すなわち、32×32画素のマクロブロックは、図27の上段に示される32×32画素、32×16画素、16×32画素、および16×16画素のブロックでの処理が可能である。
 また、上段の右側に示される16×16画素のブロックは、H.264/AVC方式と同様に、中段に示される16×16画素、16×8画素、8×16画素、および8×8画素のブロックでの処理が可能である。
 さらに、中段の右側に示される8×8画素のブロックは、H.264/AVC方式と同様に、下段に示される8×8画素、8×4画素、4×8画素、および4×4画素のブロックでの処理が可能である。
 このような階層構造を採用することにより、拡張されたマクロブロックサイズにおいては、16×16画素のブロック以下に関してH.264/AVC方式と互換性を保ちながら、そのスーパーセットとして、より大きなブロックが定義されている。
 以上のように提案される拡張されたマクロブロックサイズにも本発明を適用することができる。
 以上においては、符号化方式/復号方式としてH.264/AVC方式が用いられたが、本発明は、その他のブロック単位で動き予測・補償処理を行う符号化方式/復号方式を用いる画像符号化装置/画像復号装置に適用することもできる。
 また、本発明は、例えば、MPEG,H.26x等の様に、離散コサイン変換等の直交変換と動き補償によって圧縮された画像情報(ビットストリーム)を、衛星放送、ケーブルTV(テレビジョン)、インターネット、および携帯電話機などのネットワークメディアを介して受信する際に、あるいは、光、磁気ディスク、およびフラッシュメモリのような記憶メディア上で処理する際に用いられる画像符号化装置および画像復号装置に適用することができる。
 上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム記録媒体からインストールされる。
 コンピュータにインストールされ、コンピュータによって実行可能な状態とされるプログラムを格納するプログラム記録媒体は、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスクを含む)、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア、または、プログラムが一時的もしくは永続的に格納されるROMやハードディスクなどにより構成される。プログラム記録媒体へのプログラムの格納は、必要に応じてルータ、モデムなどのインタフェースを介して、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の通信媒体を利用して行われる。
 なお、本明細書において、プログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
 また、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。
 例えば、上述した画像符号化装置51や画像復号装置101は、任意の電子機器に適用することができる。以下にその例について説明する。
 図28は、本発明を適用した画像復号装置を用いるテレビジョン受像機の主な構成例を示すブロック図である。
 図28に示されるテレビジョン受像機300は、地上波チューナ313、ビデオデコーダ315、映像信号処理回路318、グラフィック生成回路319、パネル駆動回路320、および表示パネル321を有する。
 地上波チューナ313は、地上アナログ放送の放送波信号を、アンテナを介して受信し、復調し、映像信号を取得し、それをビデオデコーダ315に供給する。ビデオデコーダ315は、地上波チューナ313から供給された映像信号に対してデコード処理を施し、得られたデジタルのコンポーネント信号を映像信号処理回路318に供給する。
 映像信号処理回路318は、ビデオデコーダ315から供給された映像データに対してノイズ除去などの所定の処理を施し、得られた映像データをグラフィック生成回路319に供給する。
 グラフィック生成回路319は、表示パネル321に表示させる番組の映像データや、ネットワークを介して供給されるアプリケーションに基づく処理による画像データなどを生成し、生成した映像データや画像データをパネル駆動回路320に供給する。また、グラフィック生成回路319は、項目の選択などにユーザにより利用される画面を表示するための映像データ(グラフィック)を生成し、それを番組の映像データに重畳したりすることによって得られた映像データをパネル駆動回路320に供給するといった処理も適宜行う。
 パネル駆動回路320は、グラフィック生成回路319から供給されたデータに基づいて表示パネル321を駆動し、番組の映像や上述した各種の画面を表示パネル321に表示させる。
 表示パネル321はLCD(Liquid Crystal Display)などよりなり、パネル駆動回路320による制御に従って番組の映像などを表示させる。
 また、テレビジョン受像機300は、音声A/D(Analog/Digital)変換回路314、音声信号処理回路322、エコーキャンセル/音声合成回路323、音声増幅回路324、およびスピーカ325も有する。
 地上波チューナ313は、受信した放送波信号を復調することにより、映像信号だけでなく音声信号も取得する。地上波チューナ313は、取得した音声信号を音声A/D変換回路314に供給する。
 音声A/D変換回路314は、地上波チューナ313から供給された音声信号に対してA/D変換処理を施し、得られたデジタルの音声信号を音声信号処理回路322に供給する。
 音声信号処理回路322は、音声A/D変換回路314から供給された音声データに対してノイズ除去などの所定の処理を施し、得られた音声データをエコーキャンセル/音声合成回路323に供給する。
 エコーキャンセル/音声合成回路323は、音声信号処理回路322から供給された音声データを音声増幅回路324に供給する。
 音声増幅回路324は、エコーキャンセル/音声合成回路323から供給された音声データに対してD/A変換処理、増幅処理を施し、所定の音量に調整した後、音声をスピーカ325から出力させる。
 さらに、テレビジョン受像機300は、デジタルチューナ316およびMPEGデコーダ317も有する。
 デジタルチューナ316は、デジタル放送(地上デジタル放送、BS(Broadcasting Satellite)/CS(Communications Satellite)デジタル放送)の放送波信号を、アンテナを介して受信し、復調し、MPEG-TS(Moving Picture Experts Group-Transport Stream)を取得し、それをMPEGデコーダ317に供給する。
 MPEGデコーダ317は、デジタルチューナ316から供給されたMPEG-TSに施されているスクランブルを解除し、再生対象(視聴対象)になっている番組のデータを含むストリームを抽出する。MPEGデコーダ317は、抽出したストリームを構成する音声パケットをデコードし、得られた音声データを音声信号処理回路322に供給するとともに、ストリームを構成する映像パケットをデコードし、得られた映像データを映像信号処理回路318に供給する。また、MPEGデコーダ317は、MPEG-TSから抽出したEPG(Electronic Program Guide)データを図示せぬ経路を介してCPU332に供給する。
 テレビジョン受像機300は、このように映像パケットをデコードするMPEGデコーダ317として、上述した画像復号装置101を用いる。したがって、MPEGデコーダ317は、画像復号装置101の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 MPEGデコーダ317から供給された映像データは、ビデオデコーダ315から供給された映像データの場合と同様に、映像信号処理回路318において所定の処理が施される。そして、所定の処理が施された映像データは、グラフィック生成回路319において、生成された映像データ等が適宜重畳され、パネル駆動回路320を介して表示パネル321に供給され、その画像が表示される。
 MPEGデコーダ317から供給された音声データは、音声A/D変換回路314から供給された音声データの場合と同様に、音声信号処理回路322において所定の処理が施される。そして、所定の処理が施された音声データは、エコーキャンセル/音声合成回路323を介して音声増幅回路324に供給され、D/A変換処理や増幅処理が施される。その結果、所定の音量に調整された音声がスピーカ325から出力される。
 また、テレビジョン受像機300は、マイクロホン326、およびA/D変換回路327も有する。
 A/D変換回路327は、音声会話用のものとしてテレビジョン受像機300に設けられるマイクロホン326により取り込まれたユーザの音声の信号を受信する。A/D変換回路327は、受信した音声信号に対してA/D変換処理を施し、得られたデジタルの音声データをエコーキャンセル/音声合成回路323に供給する。
 エコーキャンセル/音声合成回路323は、テレビジョン受像機300のユーザ(ユーザA)の音声のデータがA/D変換回路327から供給されている場合、ユーザAの音声データを対象としてエコーキャンセルを行う。そして、エコーキャンセル/音声合成回路323は、エコーキャンセルの後、他の音声データと合成するなどして得られた音声のデータを、音声増幅回路324を介してスピーカ325より出力させる。
 さらに、テレビジョン受像機300は、音声コーデック328、内部バス329、SDRAM(Synchronous Dynamic Random Access Memory)330、フラッシュメモリ331、CPU332、USB(Universal Serial Bus) I/F333、およびネットワークI/F334も有する。
 A/D変換回路327は、音声会話用のものとしてテレビジョン受像機300に設けられるマイクロホン326により取り込まれたユーザの音声の信号を受信する。A/D変換回路327は、受信した音声信号に対してA/D変換処理を施し、得られたデジタルの音声データを音声コーデック328に供給する。
 音声コーデック328は、A/D変換回路327から供給された音声データを、ネットワーク経由で送信するための所定のフォーマットのデータに変換し、内部バス329を介してネットワークI/F334に供給する。
 ネットワークI/F334は、ネットワーク端子335に装着されたケーブルを介してネットワークに接続される。ネットワークI/F334は、例えば、そのネットワークに接続される他の装置に対して、音声コーデック328から供給された音声データを送信する。また、ネットワークI/F334は、例えば、ネットワークを介して接続される他の装置から送信される音声データを、ネットワーク端子335を介して受信し、それを、内部バス329を介して音声コーデック328に供給する。
 音声コーデック328は、ネットワークI/F334から供給された音声データを所定のフォーマットのデータに変換し、それをエコーキャンセル/音声合成回路323に供給する。
 エコーキャンセル/音声合成回路323は、音声コーデック328から供給される音声データを対象としてエコーキャンセルを行い、他の音声データと合成するなどして得られた音声のデータを、音声増幅回路324を介してスピーカ325より出力させる。
 SDRAM330は、CPU332が処理を行う上で必要な各種のデータを記憶する。
 フラッシュメモリ331は、CPU332により実行されるプログラムを記憶する。フラッシュメモリ331に記憶されているプログラムは、テレビジョン受像機300の起動時などの所定のタイミングでCPU332により読み出される。フラッシュメモリ331には、デジタル放送を介して取得されたEPGデータ、ネットワークを介して所定のサーバから取得されたデータなども記憶される。
 例えば、フラッシュメモリ331には、CPU332の制御によりネットワークを介して所定のサーバから取得されたコンテンツデータを含むMPEG-TSが記憶される。フラッシュメモリ331は、例えばCPU332の制御により、そのMPEG-TSを、内部バス329を介してMPEGデコーダ317に供給する。
 MPEGデコーダ317は、デジタルチューナ316から供給されたMPEG-TSの場合と同様に、そのMPEG-TSを処理する。このようにテレビジョン受像機300は、映像や音声等よりなるコンテンツデータを、ネットワークを介して受信し、MPEGデコーダ317を用いてデコードし、その映像を表示させたり、音声を出力させたりすることができる。
 また、テレビジョン受像機300は、リモートコントローラ351から送信される赤外線信号を受光する受光部337も有する。
 受光部337は、リモートコントローラ351からの赤外線を受光し、復調して得られたユーザ操作の内容を表す制御コードをCPU332に出力する。
 CPU332は、フラッシュメモリ331に記憶されているプログラムを実行し、受光部337から供給される制御コードなどに応じてテレビジョン受像機300の全体の動作を制御する。CPU332とテレビジョン受像機300の各部は、図示せぬ経路を介して接続されている。
 USB I/F333は、USB端子336に装着されたUSBケーブルを介して接続される、テレビジョン受像機300の外部の機器との間でデータの送受信を行う。ネットワークI/F334は、ネットワーク端子335に装着されたケーブルを介してネットワークに接続し、ネットワークに接続される各種の装置と音声データ以外のデータの送受信も行う。
 テレビジョン受像機300は、MPEGデコーダ317として画像復号装置101を用いることにより、画像のローカルな性質に基づいた重み付け予測(Weighted Prediction)を行うことができる。その結果として、テレビジョン受像機300は、アンテナを介して受信した放送波信号や、ネットワークを介して取得したコンテンツデータから、より高精細な復号画像を得て、表示することができる。
 図29は、本発明を適用した画像符号化装置および画像復号装置を用いる携帯電話機の主な構成例を示すブロック図である。
 図29に示される携帯電話機400は、各部を統括的に制御するようになされた主制御部450、電源回路部451、操作入力制御部452、画像エンコーダ453、カメラI/F部454、LCD制御部455、画像デコーダ456、多重分離部457、記録再生部462、変復調回路部458、および音声コーデック459を有する。これらは、バス460を介して互いに接続されている。
 また、携帯電話機400は、操作キー419、CCD(Charge Coupled Devices)カメラ416、液晶ディスプレイ418、記憶部423、送受信回路部463、アンテナ414、マイクロホン(マイク)421、およびスピーカ417を有する。
 電源回路部451は、ユーザの操作により終話および電源キーがオン状態にされると、バッテリパックから各部に対して電力を供給することにより携帯電話機400を動作可能な状態に起動する。
 携帯電話機400は、CPU、ROMおよびRAM等でなる主制御部450の制御に基づいて、音声通話モードやデータ通信モード等の各種モードで、音声信号の送受信、電子メールや画像データの送受信、画像撮影、またはデータ記録等の各種動作を行う。
 例えば、音声通話モードにおいて、携帯電話機400は、マイクロホン(マイク)421で集音した音声信号を、音声コーデック459によってデジタル音声データに変換し、これを変復調回路部458でスペクトラム拡散処理し、送受信回路部463でデジタルアナログ変換処理および周波数変換処理する。携帯電話機400は、その変換処理により得られた送信用信号を、アンテナ414を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(音声信号)は、公衆電話回線網を介して通話相手の携帯電話機に供給される。
 また、例えば、音声通話モードにおいて、携帯電話機400は、アンテナ414で受信した受信信号を送受信回路部463で増幅し、さらに周波数変換処理およびアナログデジタル変換処理し、変復調回路部458でスペクトラム逆拡散処理し、音声コーデック459によってアナログ音声信号に変換する。携帯電話機400は、その変換して得られたアナログ音声信号をスピーカ417から出力する。
 更に、例えば、データ通信モードにおいて電子メールを送信する場合、携帯電話機400は、操作キー419の操作によって入力された電子メールのテキストデータを、操作入力制御部452において受け付ける。携帯電話機400は、そのテキストデータを主制御部450において処理し、LCD制御部455を介して、画像として液晶ディスプレイ418に表示させる。
 また、携帯電話機400は、主制御部450において、操作入力制御部452が受け付けたテキストデータやユーザ指示等に基づいて電子メールデータを生成する。携帯電話機400は、その電子メールデータを、変復調回路部458でスペクトラム拡散処理し、送受信回路部463でデジタルアナログ変換処理および周波数変換処理する。携帯電話機400は、その変換処理により得られた送信用信号を、アンテナ414を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(電子メール)は、ネットワークおよびメールサーバ等を介して、所定のあて先に供給される。
 また、例えば、データ通信モードにおいて電子メールを受信する場合、携帯電話機400は、基地局から送信された信号を、アンテナ414を介して送受信回路部463で受信し、増幅し、さらに周波数変換処理およびアナログデジタル変換処理する。携帯電話機400は、その受信信号を変復調回路部458でスペクトラム逆拡散処理して元の電子メールデータを復元する。携帯電話機400は、復元された電子メールデータを、LCD制御部455を介して液晶ディスプレイ418に表示する。
 なお、携帯電話機400は、受信した電子メールデータを、記録再生部462を介して、記憶部423に記録する(記憶させる)ことも可能である。
 この記憶部423は、書き換え可能な任意の記憶媒体である。記憶部423は、例えば、RAMや内蔵型フラッシュメモリ等の半導体メモリであってもよいし、ハードディスクであってもよいし、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、またはメモリカード等のリムーバブルメディアであってもよい。もちろん、これら以外のものであってもよい。
 さらに、例えば、データ通信モードにおいて画像データを送信する場合、携帯電話機400は、撮像によりCCDカメラ416で画像データを生成する。CCDカメラ416は、レンズや絞り等の光学デバイスと光電変換素子としてのCCDを有し、被写体を撮像し、受光した光の強度を電気信号に変換し、被写体の画像の画像データを生成する。その画像データを、カメラI/F部454を介して、画像エンコーダ453で、例えばMPEG2やMPEG4等の所定の符号化方式によって圧縮符号化することにより符号化画像データに変換する。
 携帯電話機400は、このような処理を行う画像エンコーダ453として、上述した画像符号化装置51を用いる。したがって、画像エンコーダ453は、画像符号化装置51の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 なお、携帯電話機400は、このとき同時に、CCDカメラ416で撮像中にマイクロホン(マイク)421で集音した音声を、音声コーデック459においてアナログデジタル変換し、さらに符号化する。
 携帯電話機400は、多重分離部457において、画像エンコーダ453から供給された符号化画像データと、音声コーデック459から供給されたデジタル音声データとを、所定の方式で多重化する。携帯電話機400は、その結果得られる多重化データを、変復調回路部458でスペクトラム拡散処理し、送受信回路部463でデジタルアナログ変換処理および周波数変換処理する。携帯電話機400は、その変換処理により得られた送信用信号を、アンテナ414を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(画像データ)は、ネットワーク等を介して、通信相手に供給される。
 なお、画像データを送信しない場合、携帯電話機400は、CCDカメラ416で生成した画像データを、画像エンコーダ453を介さずに、LCD制御部455を介して液晶ディスプレイ418に表示させることもできる。
 また、例えば、データ通信モードにおいて、簡易ホームページ等にリンクされた動画像ファイルのデータを受信する場合、携帯電話機400は、基地局から送信された信号を、アンテナ414を介して送受信回路部463で受信し、増幅し、さらに周波数変換処理およびアナログデジタル変換処理する。携帯電話機400は、その受信信号を変復調回路部458でスペクトラム逆拡散処理して元の多重化データを復元する。携帯電話機400は、多重分離部457において、その多重化データを分離して、符号化画像データと音声データとに分ける。
 携帯電話機400は、画像デコーダ456において、符号化画像データを、MPEG2やMPEG4等の所定の符号化方式に対応した復号方式でデコードすることにより、再生動画像データを生成し、これを、LCD制御部455を介して液晶ディスプレイ418に表示させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる動画データが液晶ディスプレイ418に表示される。
 携帯電話機400は、このような処理を行う画像デコーダ456として、上述した画像復号装置101を用いる。したがって、画像デコーダ456は、画像復号装置101の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 このとき、携帯電話機400は、同時に、音声コーデック459において、デジタルの音声データをアナログ音声信号に変換し、これをスピーカ417より出力させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる音声データが再生される。
 なお、電子メールの場合と同様に、携帯電話機400は、受信した簡易ホームページ等にリンクされたデータを、記録再生部462を介して、記憶部423に記録する(記憶させる)ことも可能である。
 また、携帯電話機400は、主制御部450において、撮像されてCCDカメラ416で得られた2次元コードを解析し、2次元コードに記録された情報を取得することができる。
 さらに、携帯電話機400は、赤外線通信部481で赤外線により外部の機器と通信することができる。
 携帯電話機400は、画像エンコーダ453として画像符号化装置51を用いることにより、例えばCCDカメラ416において生成された画像データを符号化して生成する符号化データの符号化効率を向上させることができる。結果として、携帯電話機400は、符号化効率のよい符号化データ(画像データ)を、他の装置に提供することができる。
 また、携帯電話機400は、画像デコーダ456として画像復号装置101を用いることにより、精度の高い予測画像を生成することができる。その結果として、携帯電話機400は、例えば、簡易ホームページにリンクされた動画像ファイルから、より高精細な復号画像を得て、表示することができる。
 なお、以上において、携帯電話機400が、CCDカメラ416を用いるように説明したが、このCCDカメラ416の代わりに、CMOS(Complementary Metal Oxide Semiconductor)を用いたイメージセンサ(CMOSイメージセンサ)を用いるようにしてもよい。この場合も、携帯電話機400は、CCDカメラ416を用いる場合と同様に、被写体を撮像し、被写体の画像の画像データを生成することができる。
 また、以上においては携帯電話機400として説明したが、例えば、PDA(Personal Digital Assistants)、スマートフォン、UMPC(Ultra Mobile Personal Computer)、ネットブック、ノート型パーソナルコンピュータ等、この携帯電話機400と同様の撮像機能や通信機能を有する装置であれば、どのような装置であっても携帯電話機400の場合と同様に、画像符号化装置51および画像復号装置101を適用することができる。
 図30は、本発明を適用した画像符号化装置および画像復号装置を用いるハードディスクレコーダの主な構成例を示すブロック図である。
 図30に示されるハードディスクレコーダ(HDDレコーダ)500は、チューナにより受信された、衛星や地上のアンテナ等より送信される放送波信号(テレビジョン信号)に含まれる放送番組のオーディオデータとビデオデータを、内蔵するハードディスクに保存し、その保存したデータをユーザの指示に応じたタイミングでユーザに提供する装置である。
 ハードディスクレコーダ500は、例えば、放送波信号よりオーディオデータとビデオデータを抽出し、それらを適宜復号し、内蔵するハードディスクに記憶させることができる。また、ハードディスクレコーダ500は、例えば、ネットワークを介して他の装置からオーディオデータやビデオデータを取得し、それらを適宜復号し、内蔵するハードディスクに記憶させることもできる。
 さらに、ハードディスクレコーダ500は、例えば、内蔵するハードディスクに記録されているオーディオデータやビデオデータを復号してモニタ560に供給し、モニタ560の画面にその画像を表示させる。また、ハードディスクレコーダ500は、モニタ560のスピーカよりその音声を出力させることができる。
 ハードディスクレコーダ500は、例えば、チューナを介して取得された放送波信号より抽出されたオーディオデータとビデオデータ、または、ネットワークを介して他の装置から取得したオーディオデータやビデオデータを復号してモニタ560に供給し、モニタ560の画面にその画像を表示させる。また、ハードディスクレコーダ500は、モニタ560のスピーカよりその音声を出力させることもできる。
 もちろん、この他の動作も可能である。
 図30に示されるように、ハードディスクレコーダ500は、受信部521、復調部522、デマルチプレクサ523、オーディオデコーダ524、ビデオデコーダ525、およびレコーダ制御部526を有する。ハードディスクレコーダ500は、さらに、EPGデータメモリ527、プログラムメモリ528、ワークメモリ529、ディスプレイコンバータ530、OSD(On Screen Display)制御部531、ディスプレイ制御部532、記録再生部533、D/Aコンバータ534、および通信部535を有する。
 また、ディスプレイコンバータ530は、ビデオエンコーダ541を有する。記録再生部533は、エンコーダ551およびデコーダ552を有する。
 受信部521は、リモートコントローラ(図示せず)からの赤外線信号を受信し、電気信号に変換してレコーダ制御部526に出力する。レコーダ制御部526は、例えば、マイクロプロセッサなどにより構成され、プログラムメモリ528に記憶されているプログラムに従って、各種の処理を実行する。レコーダ制御部526は、このとき、ワークメモリ529を必要に応じて使用する。
 通信部535は、ネットワークに接続され、ネットワークを介して他の装置との通信処理を行う。例えば、通信部535は、レコーダ制御部526により制御され、チューナ(図示せず)と通信し、主にチューナに対して選局制御信号を出力する。
 復調部522は、チューナより供給された信号を、復調し、デマルチプレクサ523に出力する。デマルチプレクサ523は、復調部522より供給されたデータを、オーディオデータ、ビデオデータ、およびEPGデータに分離し、それぞれ、オーディオデコーダ524、ビデオデコーダ525、またはレコーダ制御部526に出力する。
 オーディオデコーダ524は、入力されたオーディオデータを、例えばMPEG方式でデコードし、記録再生部533に出力する。ビデオデコーダ525は、入力されたビデオデータを、例えばMPEG方式でデコードし、ディスプレイコンバータ530に出力する。レコーダ制御部526は、入力されたEPGデータをEPGデータメモリ527に供給し、記憶させる。
 ディスプレイコンバータ530は、ビデオデコーダ525またはレコーダ制御部526より供給されたビデオデータを、ビデオエンコーダ541により、例えばNTSC(National Television Standards Committee)方式のビデオデータにエンコードし、記録再生部533に出力する。また、ディスプレイコンバータ530は、ビデオデコーダ525またはレコーダ制御部526より供給されるビデオデータの画面のサイズを、モニタ560のサイズに対応するサイズに変換する。ディスプレイコンバータ530は、画面のサイズが変換されたビデオデータを、さらに、ビデオエンコーダ541によってNTSC方式のビデオデータに変換し、アナログ信号に変換し、ディスプレイ制御部532に出力する。
 ディスプレイ制御部532は、レコーダ制御部526の制御のもと、OSD(On Screen Display)制御部531が出力したOSD信号を、ディスプレイコンバータ530より入力されたビデオ信号に重畳し、モニタ560のディスプレイに出力し、表示させる。
 モニタ560にはまた、オーディオデコーダ524が出力したオーディオデータが、D/Aコンバータ534によりアナログ信号に変換されて供給されている。モニタ560は、このオーディオ信号を内蔵するスピーカから出力する。
 記録再生部533は、ビデオデータやオーディオデータ等を記録する記憶媒体としてハードディスクを有する。
 記録再生部533は、例えば、オーディオデコーダ524より供給されるオーディオデータを、エンコーダ551によりMPEG方式でエンコードする。また、記録再生部533は、ディスプレイコンバータ530のビデオエンコーダ541より供給されるビデオデータを、エンコーダ551によりMPEG方式でエンコードする。記録再生部533は、そのオーディオデータの符号化データとビデオデータの符号化データとをマルチプレクサにより合成する。記録再生部533は、その合成データをチャネルコーディングして増幅し、そのデータを、記録ヘッドを介してハードディスクに書き込む。
 記録再生部533は、再生ヘッドを介してハードディスクに記録されているデータを再生し、増幅し、デマルチプレクサによりオーディオデータとビデオデータに分離する。記録再生部533は、デコーダ552によりオーディオデータおよびビデオデータをMPEG方
式でデコードする。記録再生部533は、復号したオーディオデータをD/A変換し、モニタ560のスピーカに出力する。また、記録再生部533は、復号したビデオデータをD/A変換し、モニタ560のディスプレイに出力する。
 レコーダ制御部526は、受信部521を介して受信されるリモートコントローラからの赤外線信号により示されるユーザ指示に基づいて、EPGデータメモリ527から最新のEPGデータを読み出し、それをOSD制御部531に供給する。OSD制御部531は、入力されたEPGデータに対応する画像データを発生し、ディスプレイ制御部532に出力する。ディスプレイ制御部532は、OSD制御部531より入力されたビデオデータをモニタ560のディスプレイに出力し、表示させる。これにより、モニタ560のディスプレイには、EPG(電子番組ガイド)が表示される。
 また、ハードディスクレコーダ500は、インターネット等のネットワークを介して他の装置から供給されるビデオデータ、オーディオデータ、またはEPGデータ等の各種データを取得することができる。
 通信部535は、レコーダ制御部526に制御され、ネットワークを介して他の装置から送信されるビデオデータ、オーディオデータ、およびEPGデータ等の符号化データを取得し、それをレコーダ制御部526に供給する。レコーダ制御部526は、例えば、取得したビデオデータやオーディオデータの符号化データを記録再生部533に供給し、ハードディスクに記憶させる。このとき、レコーダ制御部526および記録再生部533が、必要に応じて再エンコード等の処理を行うようにしてもよい。
 また、レコーダ制御部526は、取得したビデオデータやオーディオデータの符号化データを復号し、得られるビデオデータをディスプレイコンバータ530に供給する。ディスプレイコンバータ530は、ビデオデコーダ525から供給されるビデオデータと同様に、レコーダ制御部526から供給されるビデオデータを処理し、ディスプレイ制御部532を介してモニタ560に供給し、その画像を表示させる。
 また、この画像表示に合わせて、レコーダ制御部526が、復号したオーディオデータを、D/Aコンバータ534を介してモニタ560に供給し、その音声をスピーカから出力させるようにしてもよい。
 さらに、レコーダ制御部526は、取得したEPGデータの符号化データを復号し、復号したEPGデータをEPGデータメモリ527に供給する。
 以上のようなハードディスクレコーダ500は、ビデオデコーダ525、デコーダ552、およびレコーダ制御部526に内蔵されるデコーダとして画像復号装置101を用いる。したがって、ビデオデコーダ525、デコーダ552、およびレコーダ制御部526に内蔵されるデコーダは、画像復号装置101の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 したがって、ハードディスクレコーダ500は、精度の高い予測画像を生成することができる。その結果として、ハードディスクレコーダ500は、例えば、チューナを介して受信されたビデオデータの符号化データや、記録再生部533のハードディスクから読み出されたビデオデータの符号化データや、ネットワークを介して取得したビデオデータの符号化データから、より高精細な復号画像を得て、モニタ560に表示させることができる。
 また、ハードディスクレコーダ500は、エンコーダ551として画像符号化装置51を用いる。したがって、エンコーダ551は、画像符号化装置51の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 したがって、ハードディスクレコーダ500は、例えば、ハードディスクに記録する符号化データの符号化効率を向上させることができる。その結果として、ハードディスクレコーダ500は、ハードディスクの記憶領域をより効率よく使用することができる。
 なお、以上においては、ビデオデータやオーディオデータをハードディスクに記録するハードディスクレコーダ500について説明したが、もちろん、記録媒体はどのようなものであってもよい。例えばフラッシュメモリ、光ディスク、またはビデオテープ等、ハードディスク以外の記録媒体を適用するレコーダであっても、上述したハードディスクレコーダ500の場合と同様に、画像符号化装置51および画像復号装置101を適用することができる。
 図31は、本発明を適用した画像復号装置および画像符号化装置を用いるカメラの主な構成例を示すブロック図である。
 図31に示されるカメラ600は、被写体を撮像し、被写体の画像をLCD616に表示させたり、それを画像データとして、記録メディア633に記録したりする。
 レンズブロック611は、光(すなわち、被写体の映像)を、CCD/CMOS612に入射させる。CCD/CMOS612は、CCDまたはCMOSを用いたイメージセンサであり、受光した光の強度を電気信号に変換し、カメラ信号処理部613に供給する。
 カメラ信号処理部613は、CCD/CMOS612から供給された電気信号を、Y,Cr,Cbの色差信号に変換し、画像信号処理部614に供給する。画像信号処理部614は、コントローラ621の制御の下、カメラ信号処理部613から供給された画像信号に対して所定の画像処理を施したり、その画像信号をエンコーダ641で例えばMPEG方式により符号化したりする。画像信号処理部614は、画像信号を符号化して生成した符号化データを、デコーダ615に供給する。さらに、画像信号処理部614は、オンスクリーンディスプレイ(OSD)620において生成された表示用データを取得し、それをデコーダ615に供給する。
 以上の処理において、カメラ信号処理部613は、バス617を介して接続されるDRAM(Dynamic Random Access Memory)618を適宜利用し、必要に応じて画像データや、その画像データが符号化された符号化データ等をそのDRAM618に保持させる。
 デコーダ615は、画像信号処理部614から供給された符号化データを復号し、得られた画像データ(復号画像データ)をLCD616に供給する。また、デコーダ615は、画像信号処理部614から供給された表示用データをLCD616に供給する。LCD616は、デコーダ615から供給された復号画像データの画像と表示用データの画像を適宜合成し、その合成画像を表示する。
 オンスクリーンディスプレイ620は、コントローラ621の制御の下、記号、文字、または図形からなるメニュー画面やアイコンなどの表示用データを、バス617を介して画像信号処理部614に出力する。
 コントローラ621は、ユーザが操作部622を用いて指令した内容を示す信号に基づいて、各種処理を実行するとともに、バス617を介して、画像信号処理部614、DRAM618、外部インタフェース619、オンスクリーンディスプレイ620、およびメディアドライブ623等を制御する。FLASH ROM624には、コントローラ621が各種処理を実行する上で必要なプログラムやデータ等が格納される。
 例えば、コントローラ621は、画像信号処理部614やデコーダ615に代わって、DRAM618に記憶されている画像データを符号化したり、DRAM618に記憶されている符号化データを復号したりすることができる。このとき、コントローラ621は、画像信号処理部614やデコーダ615の符号化・復号方式と同様の方式によって符号化・復号処理を行うようにしてもよいし、画像信号処理部614やデコーダ615が対応していない方式により符号化・復号処理を行うようにしてもよい。
 また、例えば、操作部622から画像印刷の開始が指示された場合、コントローラ621は、DRAM618から画像データを読み出し、それを、バス617を介して外部インタフェース619に接続されるプリンタ634に供給して印刷させる。
 さらに、例えば、操作部622から画像記録が指示された場合、コントローラ621は、DRAM618から符号化データを読み出し、それを、バス617を介してメディアドライブ623に装着される記録メディア633に供給して記憶させる。
 記録メディア633は、例えば、磁気ディスク、光磁気ディスク、光ディスク、または半導体メモリ等の、読み書き可能な任意のリムーバブルメディアである。記録メディア633は、もちろん、リムーバブルメディアとしての種類も任意であり、テープデバイスであってもよいし、ディスクであってもよいし、メモリカードであってもよい。もちろん、非接触ICカード等であっても良い。
 また、メディアドライブ623と記録メディア633を一体化し、例えば、内蔵型ハードディスクドライブやSSD(Solid State Drive)等のように、非可搬性の記憶媒体により構成されるようにしてもよい。
 外部インタフェース619は、例えば、USB入出力端子などで構成され、画像の印刷を行う場合に、プリンタ634と接続される。また、外部インタフェース619には、必要に応じてドライブ631が接続され、磁気ディスク、光ディスク、あるいは光磁気ディスクなどのリムーバブルメディア632が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて、FLASH ROM624にインストールされる。
 さらに、外部インタフェース619は、LANやインターネット等の所定のネットワークに接続されるネットワークインタフェースを有する。コントローラ621は、例えば、操作部622からの指示に従って、DRAM618から符号化データを読み出し、それを外部インタフェース619から、ネットワークを介して接続される他の装置に供給させることができる。また、コントローラ621は、ネットワークを介して他の装置から供給される符号化データや画像データを、外部インタフェース619を介して取得し、それをDRAM618に保持させたり、画像信号処理部614に供給したりすることができる。
 以上のようなカメラ600は、デコーダ615として画像復号装置101を用いる。したがって、デコーダ615は、画像復号装置101の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 したがって、カメラ600は、精度の高い予測画像を生成することができる。その結果として、カメラ600は、例えば、CCD/CMOS612において生成された画像データや、DRAM618または記録メディア633から読み出されたビデオデータの符号化データや、ネットワークを介して取得したビデオデータの符号化データから、より高精細な復号画像を得て、LCD616に表示させることができる。
 また、カメラ600は、エンコーダ641として画像符号化装置51を用いる。したがって、エンコーダ641は、画像符号化装置51の場合と同様に、Implicit Weighted Predictionにおける重み係数を算出するので、POCが等間隔でない場合であっても、その値に惑わされることなく、適切な重み係数の算出が可能となる。その結果、符号化効率の低下を抑制することができる。また、重み係数は、各テンプレートマッチングブロックに対して独立に算出されるので、画像のローカルな性質に基づいたWeighted Predictionを実現することができる。
 したがって、カメラ600は、例えば、ハードディスクに記録する符号化データの符号化効率を向上させることができる。その結果として、カメラ600は、DRAM618や記録メディア633の記憶領域をより効率よく使用することができる。
 なお、コントローラ621が行う復号処理に画像復号装置101の復号方法を適用するようにしてもよい。同様に、コントローラ621が行う符号化処理に画像符号化装置51の符号化方法を適用するようにしてもよい。
 また、カメラ600が撮像する画像データは動画像であってもよいし、静止画像であってもよい。
 もちろん、画像符号化装置51および画像復号装置101は、上述した装置以外の装置やシステムにも適用可能である。
 51 画像符号化装置, 76 インターテンプレート動き予測・補償部, 77 重み係数算出部, 101 画像復号装置, 123 インターテンプレート動き予測・補償部, 124 重み係数算出部

Claims (15)

  1.  復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行うマッチング手段と、
     前記マッチング手段による前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行う予測手段と
     を備える画像処理装置。
  2.  前記フレームの画像は、Pピクチャであり、
     前記重み付け予測は、Implicit Weighted Predictionである
     請求項1に記載の画像処理装置。
  3.  前記予測手段は、前記テンプレートの画素値から算出された重み係数を用いて前記重み付け予測を行う
     請求項2に記載の画像処理装置。
  4.  前記テンプレートの画素値の平均値をAve(B)とし、そのテンプレートと相関の最も高い、前記マッチングで参照される参照フレームの画像内の領域である参照テンプレートの画素値の平均値をAve(B')とし、前記重み係数をw0としたときの式
     w0=Ave(B’)/Ave(B)
     により前記重み係数を算出する算出手段をさらに備え、
     前記予測手段は、前記ブロックの予測画素値をPred(A)とし、前記テンプレートと前記ブロックの位置関係と同一の位置関係を、前記参照テンプレートとの間に有する前記参照フレームの画像内の領域の画素値をPix(A’)としたときの、前記重み係数w0を用いた式
     Pred(A)=w0×Pix(A’)
     により前記ブロックの前記予測画素値を算出する
     請求項3に記載の画像処理装置。
  5.  前記算出手段は、前記重み係数w0をX/(2n)の形式で表される値に近似する
     請求項4に記載の画像処理装置。
  6.  前記予測手段は、前記テンプレートの画素値から算出されたオフセットを用いて前記重み付け予測を行う
     請求項2に記載の画像処理装置。
  7.  前記テンプレートの画素値の平均値をAve(B)とし、そのテンプレートと相関の最も高い、前記マッチングで参照される参照フレームの画像内の領域である参照テンプレートの画素値の平均値をAve(B')とし、前記オフセットをd0としたときの式
     d0=Ave(B)-Ave(B’)
     により前記オフセットを算出する算出手段をさらに備え、
     前記予測手段は、前記ブロックの予測画素値をPred(A)とし、前記テンプレートと前記ブロックの位置関係と同一の位置関係を、前記参照テンプレートとの間に有する前記参照フレームの画像内の領域の予測画素値をPred(A’)としたときの、前記オフセットd0を用いた式
     Pred(A)=Pred(A’)+d0
     により前記ブロックの前記予測画素値を算出する
     請求項6に記載の画像処理装置。
  8.  前記予測手段は、前記ブロックについて、符号化時に重み付け予測としてImplicit Weighted Predictionが行われたことを表す情報を、前記フレームの画像としてのPピクチャのヘッダ部から抽出し、その情報に応じて、前記重み付け予測としてImplicit Weighted Predictionを行う
     請求項2に記載の画像処理装置。
  9.  前記テンプレートの画素値から、前記重み付け予測に用いられる第1および第2の重み係数を算出する算出手段
     をさらに備え、
     前記算出手段は、前記テンプレートの画素値の平均値をAve_tmplt_Curとし、そのテンプレートと相関の最も高い、前記マッチングで参照される第1の参照フレームの画像内の領域である第1の参照プレートおよび第2の参照フレームの画像内の領域である第2の参照テンプレートの画素値の平均値をそれぞれAve_tmplt_L0,Ave_tmplt_L1とし、前記第1および第2の重み係数をそれぞれw0,w1としたときの式
     w0=|Ave_tmplt_L1-Ave_tmplt_Cur|
     w1=|Ave_tmplt_L0-Ave_tmplt_Cur|
     により前記第1および第2の重み係数を算出し、
     その第1の重み係数w0と第2の重み係数w1を、式
     w0=w0/(w0+w1)
     w1=w1/(w0+w1)
     により正規化し、
     前記予測手段は、前記ブロックの予測画素値をPred_Curとし、前記テンプレートと前記ブロックの位置関係と同一の位置関係を、前記第1の参照テンプレートとの間に有する前記第1の参照フレームの画像内の領域の画素値および前記第2の参照テンプレートとの間に有する前記第2の参照フレームの画像内の領域の画素値をそれぞれPix_L0,Pix_L1としたときの、正規化後の第1の重み係数w0および前記第2の重み係数w1を用いた式 Pred_Cur=w0×Pix_L0+w1×Pix_L1
     により前記ブロックの予測画素値を算出する
     請求項1に記載の画像処理装置。
  10.  前記算出手段は、前記第1の重み係数w0および前記第2の重み係数w1をX/(2n)の形式で表される値に近似する
     請求項9に記載の画像処理装置。
  11.  画像処理装置が、
     復号対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行い、
     前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行うステップ
     を含む画像処理方法。
  12.  符号化対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行うマッチング手段と、
     前記マッチング手段による前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行う予測手段と
     を備える画像処理装置。
  13.  前記フレームの画像は、Pピクチャであり、
     前記重み付け予測は、Implicit Weighted Predictionである
     請求項12に記載の画像処理装置。
  14.  前記ブロックについて、前記重み付け予測としてImplicit Weighted Predictionが行われたことを表す情報を、前記フレームの画像としてのPピクチャのヘッダ部に挿入する挿入手段を
     さらに備える請求項13に記載の画像処理装置。
  15.  画像処理装置が、
     符号化対象のフレームの画像のブロックについて、インターテンプレートマッチング方式によるマッチング処理を行い、
     前記マッチング処理におけるテンプレートの画素値を用いた重み付け予測を行うステップ
     を含む画像処理方法。
PCT/JP2009/066489 2008-09-24 2009-09-24 画像処理装置および方法 WO2010035731A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010530845A JPWO2010035731A1 (ja) 2008-09-24 2009-09-24 画像処理装置および方法
US13/119,719 US20110176741A1 (en) 2008-09-24 2009-09-24 Image processing apparatus and image processing method
CN2009801361589A CN102160379A (zh) 2008-09-24 2009-09-24 图像处理装置和图像处理方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008243958 2008-09-24
JP2008-243958 2008-09-24

Publications (1)

Publication Number Publication Date
WO2010035731A1 true WO2010035731A1 (ja) 2010-04-01

Family

ID=42059730

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/066489 WO2010035731A1 (ja) 2008-09-24 2009-09-24 画像処理装置および方法

Country Status (4)

Country Link
US (1) US20110176741A1 (ja)
JP (1) JPWO2010035731A1 (ja)
CN (1) CN102160379A (ja)
WO (1) WO2010035731A1 (ja)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012157488A1 (ja) * 2011-05-17 2012-11-22 ソニー株式会社 画像処理装置および方法
JP2012532501A (ja) * 2009-07-02 2012-12-13 クゥアルコム・インコーポレイテッド ビデオコーディングのためのテンプレートマッチング
WO2013069117A1 (ja) * 2011-11-09 2013-05-16 株式会社東芝 予測画像生成方法、符号化方法及び復号方法
JP2013546267A (ja) * 2010-11-09 2013-12-26 株式会社ソニー・コンピュータエンタテインメント ビデオ符号化方法および装置
JP2014514808A (ja) * 2011-03-14 2014-06-19 トムソン ライセンシング 画像ブロックを再構成および符号化する方法
WO2018061503A1 (ja) * 2016-09-27 2018-04-05 株式会社ドワンゴ 符号化装置、符号化方法、復号化装置、及び復号化方法
JP2018522466A (ja) * 2015-06-09 2018-08-09 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコーディングのための照明補償ステータスを決定するシステムおよび方法
CN108429914A (zh) * 2011-01-12 2018-08-21 株式会社Ntt都科摩 图像预测解码装置、图像预测解码方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8923395B2 (en) * 2010-10-01 2014-12-30 Qualcomm Incorporated Video coding using intra-prediction
JP2012151576A (ja) * 2011-01-18 2012-08-09 Hitachi Ltd 画像符号化方法、画像符号化装置、画像復号方法及び画像復号装置
US9210438B2 (en) 2012-01-20 2015-12-08 Sony Corporation Logical intra mode naming in HEVC video coding
US9785852B2 (en) * 2013-11-06 2017-10-10 Xiaomi Inc. Method, TV set and system for recognizing TV station logo
CN104363449B (zh) * 2014-10-31 2017-10-10 华为技术有限公司 图像预测方法及相关装置
US10880570B2 (en) 2016-10-05 2020-12-29 Qualcomm Incorporated Systems and methods of adaptively determining template size for illumination compensation
US11956460B2 (en) * 2018-08-31 2024-04-09 Hulu, LLC Selective template matching in video coding
CN109672886B (zh) * 2019-01-11 2023-07-04 京东方科技集团股份有限公司 一种图像帧预测方法、装置及头显设备
CN111105342B (zh) * 2019-12-31 2023-11-21 北京集创北方科技股份有限公司 视频图像的处理方法及装置、电子设备、存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007092215A2 (en) * 2006-02-02 2007-08-16 Thomson Licensing Method and apparatus for adaptive weight selection for motion compensated prediction
JP2007300380A (ja) * 2006-04-28 2007-11-15 Ntt Docomo Inc 画像予測符号化装置、画像予測符号化方法、画像予測符号化プログラム、画像予測復号装置、画像予測復号方法及び画像予測復号プログラム
JP2008514122A (ja) * 2004-09-16 2008-05-01 トムソン ライセンシング 局在的な輝度変動を利用した重み付き予測ビデオ・コーデックのための方法および装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101218829A (zh) * 2005-07-05 2008-07-09 株式会社Ntt都科摩 动态图像编码装置、动态图像编码方法、动态图像编码程序、动态图像解码装置、动态图像解码方法以及动态图像解码程序
US20080260029A1 (en) * 2007-04-17 2008-10-23 Bo Zhang Statistical methods for prediction weights estimation in video coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008514122A (ja) * 2004-09-16 2008-05-01 トムソン ライセンシング 局在的な輝度変動を利用した重み付き予測ビデオ・コーデックのための方法および装置
WO2007092215A2 (en) * 2006-02-02 2007-08-16 Thomson Licensing Method and apparatus for adaptive weight selection for motion compensated prediction
JP2007300380A (ja) * 2006-04-28 2007-11-15 Ntt Docomo Inc 画像予測符号化装置、画像予測符号化方法、画像予測符号化プログラム、画像予測復号装置、画像予測復号方法及び画像予測復号プログラム

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012532501A (ja) * 2009-07-02 2012-12-13 クゥアルコム・インコーポレイテッド ビデオコーディングのためのテンプレートマッチング
JP2014064301A (ja) * 2009-07-02 2014-04-10 Qualcomm Incorporated ビデオコーディングのためのテンプレートマッチング
US8873626B2 (en) 2009-07-02 2014-10-28 Qualcomm Incorporated Template matching for video coding
JP2013546267A (ja) * 2010-11-09 2013-12-26 株式会社ソニー・コンピュータエンタテインメント ビデオ符号化方法および装置
CN108429914A (zh) * 2011-01-12 2018-08-21 株式会社Ntt都科摩 图像预测解码装置、图像预测解码方法
CN108429914B (zh) * 2011-01-12 2022-01-14 株式会社Ntt都科摩 图像预测解码装置、图像预测解码方法
JP2014514808A (ja) * 2011-03-14 2014-06-19 トムソン ライセンシング 画像ブロックを再構成および符号化する方法
JP2012244301A (ja) * 2011-05-17 2012-12-10 Sony Corp 画像処理装置および方法
WO2012157488A1 (ja) * 2011-05-17 2012-11-22 ソニー株式会社 画像処理装置および方法
US10218969B2 (en) 2011-05-17 2019-02-26 Sony Corporation Image processing device and method using adjusted motion vector accuracy between sub-pixels of reference frames
WO2013069117A1 (ja) * 2011-11-09 2013-05-16 株式会社東芝 予測画像生成方法、符号化方法及び復号方法
JP2018522466A (ja) * 2015-06-09 2018-08-09 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコーディングのための照明補償ステータスを決定するシステムおよび方法
US10887597B2 (en) 2015-06-09 2021-01-05 Qualcomm Incorporated Systems and methods of determining illumination compensation parameters for video coding
WO2018061503A1 (ja) * 2016-09-27 2018-04-05 株式会社ドワンゴ 符号化装置、符号化方法、復号化装置、及び復号化方法

Also Published As

Publication number Publication date
US20110176741A1 (en) 2011-07-21
CN102160379A (zh) 2011-08-17
JPWO2010035731A1 (ja) 2012-02-23

Similar Documents

Publication Publication Date Title
WO2010035731A1 (ja) 画像処理装置および方法
JP5597968B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
JP5234368B2 (ja) 画像処理装置および方法
WO2010035734A1 (ja) 画像処理装置および方法
WO2010095559A1 (ja) 画像処理装置および方法
WO2010101064A1 (ja) 画像処理装置および方法
WO2011024685A1 (ja) 画像処理装置および方法
WO2011018965A1 (ja) 画像処理装置および方法
WO2010095560A1 (ja) 画像処理装置および方法
WO2010035730A1 (ja) 画像処理装置および方法
WO2011086964A1 (ja) 画像処理装置および方法、並びにプログラム
WO2010035732A1 (ja) 画像処理装置および方法
WO2011089973A1 (ja) 画像処理装置および方法
WO2010064675A1 (ja) 画像処理装置および画像処理方法、並びにプログラム
WO2010064674A1 (ja) 画像処理装置および画像処理方法、並びにプログラム
WO2010101063A1 (ja) 画像処理装置および方法
WO2010035735A1 (ja) 画像処理装置および方法
JP6048774B2 (ja) 画像処理装置および方法
WO2011125625A1 (ja) 画像処理装置および方法
JP2013150347A (ja) 画像処理装置および方法

Legal Events

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

Ref document number: 200980136158.9

Country of ref document: CN

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

Ref document number: 09816146

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010530845

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13119719

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: 09816146

Country of ref document: EP

Kind code of ref document: A1