WO2012017858A1 - 画像処理装置と画像処理方法 - Google Patents

画像処理装置と画像処理方法 Download PDF

Info

Publication number
WO2012017858A1
WO2012017858A1 PCT/JP2011/066920 JP2011066920W WO2012017858A1 WO 2012017858 A1 WO2012017858 A1 WO 2012017858A1 JP 2011066920 W JP2011066920 W JP 2011066920W WO 2012017858 A1 WO2012017858 A1 WO 2012017858A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
image
motion
upper limit
block
Prior art date
Application number
PCT/JP2011/066920
Other languages
English (en)
French (fr)
Inventor
佐藤 数史
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Priority to US13/809,419 priority Critical patent/US20130114727A1/en
Priority to KR1020137001925A priority patent/KR20130102527A/ko
Priority to RU2013103518/08A priority patent/RU2013103518A/ru
Priority to MX2013001034A priority patent/MX2013001034A/es
Priority to CN2011800367316A priority patent/CN103026710A/zh
Priority to AU2011286922A priority patent/AU2011286922A1/en
Priority to EP11814486.4A priority patent/EP2603002A4/en
Priority to JP2012527668A priority patent/JPWO2012017858A1/ja
Priority to CA2804517A priority patent/CA2804517A1/en
Priority to BR112013001948A priority patent/BR112013001948A2/pt
Publication of WO2012017858A1 publication Critical patent/WO2012017858A1/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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • This technology relates to an image processing apparatus and an image processing method. Specifically, an image processing apparatus and an image processing method capable of performing image processing corresponding to an expanded macroblock are provided.
  • MPEG2 (ISO / IEC13818-2) is defined as a general-purpose image encoding method, and is currently widely used in a wide range of applications for professional use and consumer use.
  • H.26L ITU-T Q6 / 16 VCEG
  • MPEG2 and MPEG4 the standardization of a standard called H.26L
  • MPEG4 the standardization of a standard called H.26L
  • H.264 Standardization that realizes higher encoding efficiency based on H.26L is performed as Joint ⁇ ⁇ ⁇ Model of Enhanced-Compression Video Coding. It became an international standard under the names of H.264 and MPEG-4 Part 10 (hereinafter referred to as “H.264 / AVC (Advanced Video Coding)”).
  • Non-Patent Document 1 the size of the macroblock is set to MPEG2 or H.264. It has been proposed to expand to a size larger than H.264 / AVC, for example, 32 pixels ⁇ 32 pixels. That is, in Non-Patent Document 1, by adopting a hierarchical structure for macroblocks, H. H.264 / AVC maintains compatibility with macroblocks, and a larger block is defined as a superset thereof.
  • Video Coding Using Extended Block Sizes (Study Group16, Contribution 123, ITU, January 2009)
  • H. In the H.264 / AVC format a macroblock composed of 16 ⁇ 16 pixels is divided into any of 16 ⁇ 16, 16 ⁇ 8, 8 ⁇ 16, or 8 ⁇ 8 partitions, and independent motion vector information is obtained. Can have. Furthermore, the 8 ⁇ 8 partition can be divided into any of 8 ⁇ 8, 8 ⁇ 4, 4 ⁇ 8, and 4 ⁇ 4 subpartitions and have independent motion vector information. When such motion prediction / compensation processing is performed and the number of partitions in the macroblock increases, the amount of information of the motion vector information becomes enormous and encoding the motion vector information as it is reduces the encoding efficiency. Invite. Therefore, H.H.
  • the block size of a motion compensation block is set so that the total number of motion vectors in two consecutive macroblocks does not exceed a predetermined upper limit value. For this reason, when the macroblock size is expanded, the When the upper limit value defined in the H.264 / AVC format is used, the block size cannot be reduced due to the limitation on the number of motion vectors, and there is a risk that image quality will be degraded.
  • a setting unit that sets an upper limit value of the number of motion vectors according to a block size of a block that is an encoding processing unit when encoding image data, and a motion of the block Motion prediction that detects a prediction mode in a state where the number of vectors is equal to or less than an upper limit set by the setting unit, and performs motion compensation of a reference image using a motion vector of the detected prediction mode to generate a prediction image
  • the image processing apparatus includes: a compensation unit; and an encoding unit that encodes the image data using the predicted image generated by the motion prediction / compensation unit to generate an encoded stream.
  • the motion vector number limit setting unit sets an upper limit value of the number of motion vectors according to the size of the macroblock.
  • the upper limit value is set to a value larger than the upper limit value of the macro block of 16 ⁇ 16 pixels.
  • the upper limit value of the number of motion vectors for a 16 ⁇ 16 pixel macroblock is p
  • the size of the expanded macroblock is (16 ⁇ m) ⁇ (16 ⁇ n) pixels
  • the upper limit The value is set to (p ⁇ m ⁇ n).
  • a prediction mode in which the number of motion vectors exceeds the upper limit value is excluded from the candidates for the optimal prediction mode, and the optimal prediction mode is detected, and the motion vector of the detected optimal prediction mode is used to detect the reference image.
  • Motion compensation is performed to generate a predicted image.
  • the motion prediction / compensation unit monitors the number of times that the number of motion vectors does not exceed the upper limit value for each frame, and if the number of times of control exceeds a predetermined number of times, the macro in the next frame When a block is enlarged and a scene change is detected by the scene change detector, the macro block is set to a predetermined size.
  • the motion prediction / compensation unit detects an optimal prediction mode regardless of the number of motion vectors, and uses the detected motion vector of the optimal prediction mode to perform motion compensation of the reference image to generate a predicted image.
  • this operation mode when the number of motion vectors in the optimal prediction mode exceeds the upper limit value, the number of motion vectors exceeds the upper limit value in the compressed image information generated using the predicted image. It is made to include discrimination information indicating that
  • a block having a size larger than a predetermined size is set as a maximum coding unit having a maximum size, for example, in a coding unit having a resolution structure.
  • a third aspect of this technique is a setting for setting an upper limit value of the number of motion vectors according to a block size of a block which is a decoding processing unit when decoding an encoded stream obtained by encoding image data. Detecting a prediction mode in a state where the number of motion vectors of the block is equal to or less than the upper limit set by the setting unit, and performing motion compensation of the reference image using the motion vector of the detected prediction mode,
  • An image processing apparatus includes: a motion compensation unit that generates a predicted image; and a decoding unit that decodes the encoded stream using the predicted image generated by the motion compensation unit.
  • the motion vector number limit setting unit sets an upper limit value of the number of motion vectors according to the size of the macroblock.
  • the macroblock has a predetermined size, for example, a size expanded from a 16 ⁇ 16 pixel macroblock
  • the upper limit value is set to a value larger than the upper limit value of the 16 ⁇ 16 pixel macroblock.
  • the upper limit value of the number of motion vectors for a 16 ⁇ 16 pixel macroblock is p
  • the upper limit value is set when the size of the expanded macroblock is (16 ⁇ m) ⁇ (16 ⁇ n) pixels. Is set to (p ⁇ m ⁇ n).
  • the prediction mode when generating a predicted image by performing motion compensation of the reference image based on the motion vector information included in the image compression information, the prediction mode is set in a state where the number of motion vectors is equal to or less than a set upper limit value. , And motion compensation of the reference image is performed using the detected motion vector of the prediction mode, and a predicted image is generated.
  • the encoded stream is decoded by the decoding unit using the generated predicted image. Further, when detecting the prediction mode, the motion compensation unit excludes a prediction mode in which the number of motion vectors exceeds the upper limit from prediction mode candidates to be detected.
  • the motion compensation unit monitors the number of times of control for preventing the number of motion vectors from exceeding the upper limit value for each frame, and when the number of times of control exceeds a predetermined number of times, the block of the block in the next frame Increase the size.
  • the block size is set to a predetermined size set in advance.
  • the motion vector is detected from the encoded stream. Discrimination information indicating that the number exceeds the upper limit value is acquired. Size identification information for identifying the block size of the block for which the upper limit value is set is also acquired from the encoded stream.
  • the fourth aspect of this technique is a step of setting an upper limit value of the number of motion vectors according to a block size of a block which is a decoding processing unit when decoding an encoded stream obtained by encoding image data.
  • a prediction mode is detected in a state where the number of motion vectors of the block is equal to or less than an upper limit value set by the setting unit, and motion compensation of the reference image is performed using the detected motion vector of the prediction mode, and prediction is performed.
  • An image processing method includes a step of generating an image and a step of decoding the encoded stream using the generated predicted image.
  • the upper limit of the number of motion vectors is set according to the size of the macroblock. Also, an optimal prediction mode in which the number of motion vectors does not exceed the upper limit value is detected, and motion compensation of the reference image is performed using the detected motion vector of the optimal prediction mode, and a predicted image is generated. For this reason, when a macroblock having an expanded size is used, the number of motion vectors is not limited more than necessary, and image processing corresponding to the expanded macroblock can be performed.
  • H. 2 is a diagram illustrating a macroblock in the H.264 / AVC format. It is a figure which shows a motion compensation block and an adjacent block. It is a figure for demonstrating Multi-Reference
  • FIG. 1 shows the configuration of an image encoding apparatus that is an image processing apparatus that performs image encoding.
  • the image encoding device 10 includes an analog / digital conversion unit (A / D conversion unit) 11, a screen rearrangement buffer 12, a subtraction unit 13, an orthogonal transformation unit 14, a quantization unit 15, a lossless encoding unit 16, and a storage buffer 17.
  • the rate control unit 18 is provided.
  • the image encoding device 10 includes an inverse quantization unit 21, an inverse orthogonal transform unit 22, an addition unit 23, a deblocking filter 24, a frame memory 25, an intra prediction unit 31, a motion prediction / compensation unit 32, a predicted image / optimum A mode selection unit 33 is provided.
  • the A / D converter 11 converts an analog image signal into digital image data and outputs the digital image data to the screen rearrangement buffer 12.
  • the screen rearrangement buffer 12 rearranges the frames of the image data output from the A / D conversion unit 11.
  • the screen rearrangement buffer 12 rearranges the frames according to the GOP (Group of Pictures) structure related to the encoding process, and subtracts the image data after the rearrangement, the intra prediction unit 31, and the motion prediction / compensation unit. 32.
  • GOP Group of Pictures
  • the subtraction unit 13 is supplied with the image data output from the screen rearrangement buffer 12 and the predicted image data selected by the predicted image / optimum mode selection unit 33 described later.
  • the subtraction unit 13 calculates prediction error data that is a difference between the image data output from the screen rearrangement buffer 12 and the prediction image data supplied from the prediction image / optimum mode selection unit 33, and sends the prediction error data to the orthogonal transformation unit 14. Output.
  • the orthogonal transform unit 14 performs orthogonal transform processing such as discrete cosine transform (DCT) and Karoonen-Loeve transform on the prediction error data output from the subtraction unit 13.
  • the orthogonal transform unit 14 outputs transform coefficient data obtained by performing the orthogonal transform process to the quantization unit 15.
  • the quantization unit 15 is supplied with transform coefficient data output from the orthogonal transform unit 14 and a rate control signal from a rate control unit 18 described later.
  • the quantization unit 15 quantizes the transform coefficient data and outputs the quantized data to the lossless encoding unit 16 and the inverse quantization unit 21. Further, the quantization unit 15 changes the bit rate of the quantized data by switching the quantization parameter (quantization scale) based on the rate control signal from the rate control unit 18.
  • the lossless encoding unit 16 is supplied with quantized data output from the quantization unit 15 and prediction mode information from an intra prediction unit 31, a motion prediction / compensation unit 32, and a predicted image / optimum mode selection unit 33, which will be described later.
  • the prediction mode information includes a prediction mode, a macroblock size, a macroblock type, motion vector information, and the like according to intra prediction or inter prediction. Further, the prediction mode information may include discrimination information, size identification information, and the like, which will be described later.
  • the lossless encoding unit 16 performs lossless encoding processing on the quantized data by, for example, variable length encoding or arithmetic encoding, generates image compression information, and outputs the image compression information to the accumulation buffer 17. Further, the lossless encoding unit 16 performs lossless encoding of the prediction mode information and includes it in the image compression information. For example, the lossless encoding unit 16 adds the header information of the encoded stream that is the image compression information.
  • the accumulation buffer 17 accumulates the compressed image information from the lossless encoding unit 16.
  • the accumulation buffer 17 outputs the accumulated image compression information at a transmission rate corresponding to the transmission path.
  • the rate control unit 18 monitors the free capacity of the storage buffer 17, generates a rate control signal according to the free capacity, and outputs it to the quantization unit 15.
  • the rate control unit 18 acquires information indicating the free capacity from the accumulation buffer 17, for example.
  • the rate control unit 18 reduces the bit rate of the quantized data by the rate control signal when the free space is low. Further, when the free capacity of the storage buffer 17 is sufficiently large, the rate control unit 18 increases the bit rate of the quantized data by the rate control signal.
  • the inverse quantization unit 21 performs an inverse quantization process on the quantized data supplied from the quantization unit 15.
  • the inverse quantization unit 21 outputs transform coefficient data obtained by performing the inverse quantization process to the inverse orthogonal transform unit 22.
  • the inverse orthogonal transform unit 22 outputs the data obtained by performing the inverse orthogonal transform process on the transform coefficient data supplied from the inverse quantization unit 21 to the addition unit 23.
  • the adding unit 23 adds the data supplied from the inverse orthogonal transform unit 22 and the predicted image data supplied from the predicted image / optimum mode selection unit 33 to generate decoded image data, and the deblocking filter 24 and the frame memory To 25.
  • the decoded image data is used as image data for the reference image.
  • the deblocking filter 24 performs a filter process for reducing block distortion that occurs during image coding.
  • the deblocking filter 24 performs a filter process for removing block distortion from the decoded image data supplied from the adding unit 23, and outputs the decoded image data after the filter process to the frame memory 25.
  • the frame memory 25 holds the decoded image data after the filtering process supplied from the deblocking filter 24.
  • the decoded image data held in the frame memory 25 is used by the motion prediction / compensation unit 32 as reference image data.
  • the intra prediction unit 31 uses the image data of the encoding target image output from the screen rearrangement buffer 12 and the decoded image data supplied from the addition unit 23 to perform intra prediction processing for all candidate intra prediction modes. Do. Furthermore, the intra prediction unit 31 calculates a cost function value for each intra prediction mode, and optimizes the intra prediction mode in which the calculated cost function value is minimum, that is, the intra prediction mode in which the encoding efficiency is the best. Select as the intra prediction mode. The intra prediction unit 31 outputs the predicted image data generated in the optimal intra prediction mode, the prediction mode information regarding the optimal intra prediction mode, and the cost function value in the optimal intra prediction mode to the predicted image / optimum mode selection unit 33.
  • the motion prediction / compensation unit 32 performs motion prediction / compensation processing with each motion compensation block size.
  • the motion prediction / compensation unit 32 uses the reference image data read from the frame memory 25 for each prediction mode, that is, for each mode in each motion compensation block, for the encoding target image read from the screen rearrangement buffer 12. Detect motion vectors. Furthermore, the motion prediction / compensation unit 32 performs motion compensation processing on the decoded image based on the detected motion vector to generate predicted image data.
  • the motion prediction / compensation unit 32 calculates a cost function value for each prediction mode.
  • the motion prediction / compensation unit 32 is a motion whose calculated cost function value is the smallest and the total number of motion vectors of two consecutive macroblocks does not exceed the upper limit set by the motion vector number limit setting unit 35 described later.
  • the compensation block size is selected as the optimal inter prediction mode.
  • the motion prediction / compensation unit 32 selects prediction image / optimum mode based on prediction image data generated in the optimal inter prediction mode, prediction mode information regarding the optimal inter prediction mode, and cost function values and motion vector information in the optimal inter prediction mode. To the unit 33. Note that the motion prediction / compensation unit 32 also performs prediction in a skipped macroblock or direct mode as the inter prediction mode.
  • the predicted image / optimum mode selection unit 33 compares the cost function value supplied from the intra prediction unit 31 with the cost function value supplied from the motion prediction / compensation unit 32, and encodes the one having the smaller cost function value. Select the optimal mode with the best efficiency. Further, the predicted image / optimum mode selection unit 33 outputs the predicted image data generated in the optimal mode to the subtraction unit 13 and the addition unit 23. Further, the predicted image / optimum mode selection unit 33 outputs the prediction mode information of the optimal mode to the lossless encoding unit 16. Note that the predicted image / optimum mode selection unit 33 performs intra prediction or inter prediction in units of slices.
  • the motion vector number limit setting unit 35 Unlike the H.264 / AVC format, an upper limit value of the number of motion vectors is set according to the size of the macroblock, and is output to the motion prediction / compensation unit 32.
  • H. A limitation on the number of motion vectors in the H.264 / AVC format will be described.
  • H. In the H.264 / AVC format as shown in FIG. 2A, a macroblock composed of 16 ⁇ 16 pixels is assigned to any partition of 16 ⁇ 16, 16 ⁇ 8, 8 ⁇ 16, or 8 ⁇ 8. It is possible to divide and have independent motion vector information. Further, as shown in FIG. 2B, the 8 ⁇ 8 partition is divided into any of 8 ⁇ 8, 8 ⁇ 4, 4 ⁇ 8, 4 ⁇ 4 subpartitions, and independent motion vectors. Can have information. If such motion prediction / compensation processing is performed, the amount of information of the motion vector information becomes enormous, and encoding the motion vector information as it is causes a decrease in encoding efficiency. Therefore, H.H. In the H.264 / AVC format, the amount of motion vector information is reduced by the following method.
  • the block “E” is the motion compensation block to be encoded, and the blocks “A” to “D” are already encoded and adjacent to the block “E”.
  • Data mvdE encoded as motion vector information for the motion compensation block “E” in the image compression information is generated as shown in Expression (2) using pmvE.
  • mvdE mvE ⁇ pmvE (2) Note that the actual processing is performed independently for each of the horizontal and vertical components of the motion vector information.
  • FIG. 4 is a diagram for explaining Multi-Reference Frame.
  • H. In the H.264 / AVC system it is possible to store a plurality of reference frames in a memory and refer to different frames for each motion compensation block as shown in FIG.
  • a direct mode is provided.
  • the motion vector information is not stored in the image compression information, and the motion vector information of the motion compensation block is extracted from the motion vector information of the peripheral or Co-Located block in the image decoding apparatus.
  • a spatial direct mode (Spatial Direct Mode) and a temporal direct mode (Temporal Direct Mode) are provided, and which one is used can be switched for each slice.
  • FIG. 5 is a diagram for explaining the time direct mode.
  • the block at the same space address as the motion compensation block in the L0 reference picture is a Co-Located block, and the motion vector information in the Co-Located block is mvcol.
  • the distance on the time axis between the current picture and the L0 reference picture is TDB, and the distance on the time axis between the L0 reference picture and the L1 reference picture is TDD.
  • L0 motion vector information mvL0 and L1 motion vector information mvL1 in the picture are generated as shown in equations (4) and (5).
  • mvL0 (TDB / TDD) mvcol (4)
  • mvL1 ((TDD ⁇ TDB) / TDD) mvcol (5)
  • POC Picture Order Count
  • FIG. 6 is a diagram for explaining a motion prediction / compensation process with 1/4 pixel accuracy.
  • “A” is the position of the integer precision pixel stored in the frame memory
  • “b”, “c”, “d” are the positions of 1/2 pixel precision
  • “e 1”, “e 2”, “ “e3” is a position with 1/4 pixel accuracy.
  • Clip1 () is defined as shown in Equation (6).
  • the value of max_pix is 255 when the input image has 8-bit precision.
  • Equation (9) The pixel value at the position “c” is generated as shown in either Equation (9) or Equation (10) and Equation (11) using a 6-tap FIR filter.
  • F b ⁇ 2 ⁇ 5 ⁇ b ⁇ 1 + 20 ⁇ b 0 + 20 ⁇ b 1 ⁇ 5 ⁇ b 2 + b 3 (9)
  • F d ⁇ 2 ⁇ 5 ⁇ d ⁇ 1 + 20 ⁇ d 0 + 20 ⁇ d 1 ⁇ 5 ⁇ d 2 + d 3
  • c Clip1 ((F + 512) >> 10) (11) Note that the Clip1 process is performed only once at the end after performing both the horizontal and vertical product-sum processes.
  • the block size is 16 ⁇ 16 pixels
  • the pixel value of ((21 ⁇ 21) / (16 ⁇ 16)) times is required, and when the block size is 4 ⁇ 4 pixels ((9 A pixel value of ( ⁇ 9) / (4 ⁇ 4)) times as many pixels is required. That is, when a larger block size is selected in the image coding apparatus, more pixel values are required and a larger memory bandwidth is required.
  • the sum of the number of motion vectors N (a + 1) of the macroblock MB (a + 1) and the number of motion vectors N (a + 2) of the macroblock MB (a + 2) does not exceed the upper limit NHL.
  • the total number of motion vectors in two consecutive macroblocks is limited so as not to exceed a predetermined upper limit value NHL.
  • the macroblock size is 16 ⁇ 16 pixels
  • the motion compensation block size is 4 ⁇ 4 pixels.
  • FIG. 9 shows a hierarchical structure when the macroblock size is expanded. 9, (C) and (D) in FIG. A 16 ⁇ 16 pixel macroblock and an 8 ⁇ 8 pixel sub-macroblock defined by the H.264 / AVC format are shown. H. As macroblocks having a size expanded from the H.264 / AVC format, 64 ⁇ 64 pixel macroblocks shown in FIG. 9A and 32 ⁇ 32 pixel macroblocks shown in FIG. 9B are defined.
  • “Skip / direct” indicates a block size when a skipped macroblock or a direct mode is selected.
  • ME indicates a motion compensation block size.
  • P8 ⁇ 8 indicates that further division is possible in a lower hierarchy with a smaller block size.
  • the number of motion vectors is limited more than necessary, and there is a possibility that the image quality is deteriorated.
  • the upper limit value when the macroblock is 16 ⁇ 16 pixels is used even with a macroblock of 64 ⁇ 64 pixels, the upper limit value is equal even if the block size is four times, so the number of motion vectors is more than necessary. It will be limited to. Therefore, the block size of the motion compensation block cannot be reduced to a small block size, and there is a possibility that the image quality is deteriorated.
  • the motion vector number limit setting unit 35 sets the upper limit value of the number of motion vectors according to the size of the macroblock.
  • the motion vector number limit setting unit 35 sets the upper limit value to be larger than the upper limit value of the macro block of the predetermined size (N) when the size is larger than the macro block of the predetermined size (N). Guarantees real-time operation from the viewpoint of memory bandwidth without limiting more than necessary.
  • FIG. 10 shows a configuration of a motion prediction / compensation unit and a motion vector number limit setting unit.
  • the motion prediction / compensation unit 32 includes a motion search unit 321, a mode determination unit 322, a motion compensation processing unit 323, and a motion vector buffer 324.
  • the motion search unit 321 is supplied with the rearranged image data supplied from the screen rearrangement buffer 12 and the reference image data read from the frame memory 25.
  • the motion search unit 321 performs motion search processing in all candidate inter prediction modes, and outputs motion vector information indicating the motion vector detected by the motion search processing to the mode determination unit 322. In addition, the motion search unit 321 performs motion compensation of the reference image data based on the detected motion vector, generates predicted image data, and outputs the predicted image data to the mode determination unit 322. Further, the motion search unit 321 outputs information indicating the size of the macroblock, that is, size identification information for identifying the block size of the block for which the upper limit value is set, to the motion vector number limit setting unit 35.
  • the motion vector number limit setting unit 35 sets an upper limit value of the number of motion vectors according to the block size based on the size identification information, and notifies the mode determination unit 322 of the set upper limit value.
  • the mode determination unit 322 is supplied with motion vector information and prediction image data regarding all candidate inter prediction modes from the motion search unit 321.
  • the mode determination unit 322 is supplied with motion vector information generated by the encoded adjacent block from a motion vector buffer 324 described later.
  • the image data after rearrangement supplied from the screen rearrangement buffer 12 is supplied to the mode determination unit 322 in order to calculate a cost function.
  • the mode determination unit 322 calculates a cost function value using the image data supplied from the screen rearrangement buffer 12 and the predicted image data supplied from the motion search unit 321 for each candidate mode of the optimal inter prediction mode.
  • the mode determination unit 322 selects the mode with the minimum cost function value as the optimal inter prediction mode for the macroblock to be encoded.
  • the mode determination unit 322 calculates the total number of motion vectors of two consecutive macroblocks using the motion vector information of adjacent macroblocks supplied from the motion vector buffer 324.
  • the mode determination unit 322 excludes the mode whose calculated number exceeds the upper limit set by the motion vector number limit setting unit 35 from the candidate mode, and determines the optimal inter prediction mode.
  • the mode determination unit 322 outputs prediction mode information, motion vector information, and cost function values regarding the mode determined to be optimal to the motion compensation processing unit 323.
  • the prediction mode information may include size identification information for identifying the block size of the block for which the upper limit value is set.
  • the mode determination unit 322 calculates a predicted motion vector based on the motion vector information supplied from the motion vector buffer 324.
  • the mode determination unit 322 calculates a difference motion vector that is a difference between the calculated predicted motion vector and the motion vector detected by the motion search unit 321, and uses the difference motion vector information indicating the difference motion vector as motion vector information. And output to the motion compensation processing unit 323.
  • the motion compensation processing unit 323 performs motion compensation based on the motion vector information supplied from the mode determination unit 322 using the image data of the reference image supplied from the frame memory 25, and generates predicted image data.
  • the motion compensation processing unit 323 selects the predicted image / optimum mode together with the generated predicted image data, cost function value, and prediction mode information (including, for example, macroblock size, macroblock type, prediction mode, and difference motion vector information). To the unit 33. Further, the motion compensation processing unit 323 outputs the motion vector information to the motion vector buffer 324.
  • the motion vector buffer 324 temporarily stores the motion vector information supplied from the motion compensation processing unit 323. In addition, the motion vector buffer 324 supplies the stored motion vector information to the mode determination unit 322 so that the total number of motion vectors of two consecutive macroblocks and a predicted motion vector can be calculated.
  • FIG. 11 is a flowchart showing the operation of the image coding apparatus.
  • the A / D converter 11 performs A / D conversion on the input image signal.
  • step ST12 the screen rearrangement buffer 12 performs image rearrangement.
  • the screen rearrangement buffer 12 stores the image data supplied from the A / D conversion unit 11, and rearranges from the display order of each picture to the encoding order.
  • step ST13 the subtraction unit 13 generates prediction error data.
  • the subtraction unit 13 calculates a difference between the image data of the images rearranged in step ST12 and the predicted image data selected by the predicted image / optimum mode selection unit 33, and generates prediction error data.
  • the prediction error data has a smaller data amount 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.
  • the orthogonal transform unit 14 performs an orthogonal transform process.
  • the orthogonal transformation unit 14 performs orthogonal transformation on the prediction error data supplied from the subtraction unit 13. Specifically, orthogonal transformation such as discrete cosine transformation and Karhunen-Loeve transformation is performed on the prediction error data, and transformation coefficient data is output.
  • step ST15 the quantization unit 15 performs a quantization process.
  • the quantization unit 15 quantizes the transform coefficient data.
  • rate control is performed as described in the process of step ST25 described later.
  • step ST16 the inverse quantization unit 21 performs an inverse quantization process.
  • the inverse quantization unit 21 inversely quantizes the transform coefficient data quantized by the quantization unit 15 with characteristics corresponding to the characteristics of the quantization unit 15.
  • the inverse orthogonal transform unit 22 performs an inverse orthogonal transform process.
  • the inverse orthogonal transform unit 22 performs inverse orthogonal transform on the transform coefficient data inversely quantized by the inverse quantization unit 21 with characteristics corresponding to the characteristics of the orthogonal transform unit 14.
  • step ST18 the adding unit 23 generates reference image data.
  • the adding unit 23 adds the predicted image data supplied from the predicted image / optimum mode selection unit 33 and the data after inverse orthogonal transformation of the position corresponding to the predicted image, and generates reference image data (decoded image data). Generate.
  • step ST19 the deblocking filter 24 performs filter processing.
  • the deblocking filter 24 filters the decoded image data output from the adding unit 23 to remove block distortion.
  • the frame memory 25 stores reference image data.
  • the frame memory 25 stores reference image data (decoded image data) after filtering.
  • the intra prediction unit 31 and the motion prediction / compensation unit 32 each perform a prediction process. That is, the intra prediction unit 31 performs intra prediction processing in the intra prediction mode, and the motion prediction / compensation unit 32 performs motion prediction / compensation processing in the inter prediction mode.
  • the details of the prediction process will be described later with reference to FIG. 12.
  • the prediction process is performed in all candidate prediction modes, and the cost function values in all candidate prediction modes are respectively determined. Calculated. Then, based on the calculated cost function value, the optimal intra prediction mode and the optimal inter prediction mode are selected, and the prediction image generated in the selected prediction mode and its cost function and prediction mode information are predicted image / optimum mode. It is supplied to the selector 33.
  • the predicted image / optimum mode selection unit 33 selects predicted image data.
  • the predicted image / optimum mode selection unit 33 determines the optimal mode with the best coding efficiency based on the cost function values output from the intra prediction unit 31 and the motion prediction / compensation unit 32. Further, the predicted image / optimum mode selection unit 33 selects the predicted image data of the determined optimal mode, and outputs the selected predicted image data to the subtraction unit 13 and the addition unit 23. As described above, this predicted image is used for the calculations in steps ST13 and ST18. Note that prediction mode information corresponding to the selected predicted image data is output to the lossless encoding unit 16.
  • the lossless encoding unit 16 performs a lossless encoding process.
  • the lossless encoding unit 16 performs lossless encoding on the quantized data output from the quantization unit 15. That is, lossless encoding such as variable length encoding or arithmetic encoding is performed on the quantized data, and the data is compressed.
  • the prediction mode information input to the lossless encoding unit 16 in step ST22 described above is also losslessly encoded. Further, lossless encoded data of prediction mode information is included in image compression information generated by lossless encoding of quantized data.
  • step ST24 the accumulation buffer 17 performs accumulation processing.
  • the accumulation buffer 17 accumulates the compressed image information output from the lossless encoding unit 16.
  • the compressed image information stored in the storage buffer 17 is appropriately read out and transmitted to the decoding side via the transmission path.
  • step ST25 the rate control unit 18 performs rate control.
  • the rate control unit 18 controls the quantization operation rate of the quantization unit 15 so that overflow or underflow does not occur in the storage buffer 17 when storing the compressed image information in the storage buffer 17.
  • the intra prediction unit 31 performs an intra prediction process.
  • the intra prediction unit 31 performs intra prediction on the image of the block to be processed in all candidate intra prediction modes.
  • the decoded image data before the blocking filter processing is performed by the deblocking filter 24 is used as the image data of the decoded image referred to in the intra prediction.
  • intra prediction is performed in all candidate intra prediction modes, and cost function values are calculated for all candidate intra prediction modes. Then, based on the calculated cost function value, one intra prediction mode with the best coding efficiency is selected from all the intra prediction modes.
  • step ST32 the motion prediction / compensation unit 32 performs an inter prediction process.
  • the motion prediction / compensation unit 32 uses the decoded image data after the deblocking filter processing stored in the frame memory 25 to perform inter prediction processing in a candidate inter prediction mode.
  • inter prediction processing prediction processing is performed in all candidate inter prediction modes, and cost function values are calculated for all candidate inter prediction modes. Then, based on the calculated cost function value, one inter prediction mode with the best coding efficiency is selected from all the inter prediction modes.
  • step ST41 the intra prediction unit 31 performs intra prediction in each prediction mode.
  • the intra prediction unit 31 generates predicted image data for each intra prediction mode using the decoded image data before the blocking filter processing.
  • the intra prediction unit 31 calculates a cost function value in each prediction mode.
  • the cost function value is H.264.
  • JM Joint Model
  • indicates the entire set of prediction modes that are candidates for encoding the block or macroblock.
  • D indicates the differential energy (distortion) between the decoded image and the input image when encoding is performed in the prediction mode.
  • R is a generated code amount including orthogonal transform coefficients and prediction mode information, and ⁇ is a Lagrange multiplier given as a function of the quantization parameter QP.
  • indicates the entire set of prediction modes that are candidates for encoding the block or macroblock.
  • D indicates the differential energy (distortion) between the decoded image and the input image when encoding is performed in the prediction mode.
  • Header_Bit is a header bit for the prediction mode, and QP2Quant is a function given as a function of the quantization parameter QP.
  • step ST43 the intra prediction unit 31 determines the optimal intra prediction mode. Based on the cost function value calculated in step ST42, the intra prediction unit 31 selects one intra prediction mode having a minimum cost function value from them, and determines the optimal intra prediction mode.
  • step ST51 the motion vector number limit setting unit 35 sets an upper limit value of the number of motion vectors.
  • FIG. 15 is a flowchart showing the setting of the upper limit value of the number of motion vectors.
  • the motion vector number limit setting unit 35 determines the size of the macroblock.
  • the motion vector number limit setting unit 35 acquires size identification information indicating the size of the macroblock in the case of performing inter prediction from the motion search unit 321, determines the size of the macroblock, and proceeds to step ST62.
  • the motion vector number limit setting unit 35 calculates the upper limit value of the number of motion vectors.
  • the motion vector number limit setting unit 35 calculates the upper limit value of the number according to the size of the macroblock.
  • the motion vector number limit setting unit 35 sets the upper limit value to be larger than the upper limit value of the macro block of 16 ⁇ 16 pixels. Real-time operation is guaranteed from the viewpoint of memory bandwidth without limiting the number of motion vectors more than necessary.
  • the motion vector number limit setting unit 35 sets the upper limit value of the number of motion vectors when the size of the macroblock is 16 ⁇ 16 pixels to p, and sets the size of the macroblock to (16 ⁇ m) ⁇ ( In the case of 16 ⁇ n) pixels, the upper limit value is (m ⁇ n ⁇ p) and the process returns to step ST52 in FIG.
  • step ST52 the motion prediction / compensation unit 32 performs a motion prediction process.
  • the motion prediction / compensation unit 32 performs motion prediction for each prediction mode to detect a motion vector, and proceeds to step ST53.
  • step ST53 the motion prediction / compensation unit 32 performs a motion vector encoding process.
  • the motion prediction / compensation unit 32 generates motion vector information indicating a difference motion vector that is a difference between a motion vector detected in each prediction mode and a predicted motion vector generated from a motion vector of an encoded block.
  • the motion prediction / compensation unit 32 performs lossless encoding on the generated motion vector information and proceeds to step ST54.
  • step ST54 the motion prediction / compensation unit 32 determines a motion vector and a reference image for each prediction mode.
  • the motion prediction / compensation unit 32 determines a motion vector and a reference image used to detect the motion vector for each mode for each motion compensation block size, and proceeds to step ST55.
  • the motion prediction / compensation unit 32 excludes a prediction mode in which the total number of motion vectors of two consecutive macroblocks exceeds the upper limit value from candidates for the optimal inter prediction mode.
  • step ST55 the motion prediction / compensation unit 32 calculates a cost function value in each prediction mode.
  • the motion prediction / compensation unit 32 calculates the cost function value using the above-described equation (15) or equation (16). Note that the cost function value for the inter prediction mode is calculated using the H.264 standard. Evaluation of cost function values in skipped macroblocks and direct mode defined in the H.264 / AVC format is also included.
  • step ST56 the motion prediction / compensation unit 32 determines the optimal inter prediction mode. Based on the cost function value calculated in step ST55, the motion prediction / compensation unit 32 selects one prediction mode having the minimum cost function value from them, and determines the optimum inter prediction mode.
  • the upper limit value of the number of motion vectors is set according to the size of the macroblock. Therefore, even if the number of motion vectors is limited so as not to exceed the upper limit value, real-time operation can be guaranteed from the viewpoint of memory bandwidth without limiting the number of motion vectors more than necessary. Further, it is possible to prevent the image quality from deteriorating due to the number of motion vectors being limited more than necessary. That is, image processing corresponding to the expanded macroblock can be performed.
  • FIG. 16 shows another configuration of the image encoding device.
  • the image encoding device 10 a includes an analog / digital conversion unit (A / D conversion unit) 11, a screen rearrangement buffer 12, a subtraction unit 13, an orthogonal conversion unit 14, a quantization unit 15, A lossless encoding unit 16, an accumulation buffer 17, and a rate control unit 18 are provided.
  • the image encoding device 10 a has an inverse quantization unit 21, an inverse orthogonal transform unit 22, an addition unit 23, a deblocking filter 24, a frame memory 25, an intra prediction unit 31, a motion prediction.
  • a compensation unit 32a, a predicted image / optimum mode selection unit 33, and a motion vector number limit setting unit 35 are provided.
  • the image encoding device 10 a includes a scene change detection unit 29. In the following description, only portions that are different from the image encoding device 10 will be described.
  • the scene change detection unit 29 detects a scene change using the input image data output from the image rearrangement buffer 12, and outputs a scene change detection result to the motion prediction / compensation unit 32a.
  • FIG. 17 shows another configuration of the motion prediction / compensation unit and a motion vector number limit setting unit.
  • the motion prediction / compensation unit 32a includes a motion search unit 321a, a mode determination unit 322a, a motion compensation processing unit 323, and a motion vector buffer 324.
  • the motion search unit 321a is supplied with the rearranged image data supplied from the screen rearrangement buffer 12 and the reference image data read from the frame memory 25.
  • the motion search unit 321a is supplied with a scene change detection result from the scene change detection unit 29 and a control count for preventing the number of motion vectors from exceeding the upper limit value from the mode determination unit 322a.
  • the motion search unit 321a performs motion search processing in all candidate inter prediction modes, and outputs motion vector information indicating the motion vector detected by the motion search processing to the mode determination unit 322a. Further, the motion search unit 321a performs motion compensation of the reference image data based on the detected motion vector, generates predicted image data, and outputs the predicted image data to the mode determination unit 322a. Further, the motion search unit 321a outputs size identification information for identifying the block size of the block for which the upper limit value is set to the motion vector number limit setting unit 35. Also, the motion search unit 321a enlarges the macroblock in the next frame when the number of controls for preventing the number of motion vectors from exceeding the upper limit value is greater than a predetermined number. In addition, when the scene change detection result indicates that a scene change has been detected, the motion search unit 321a performs processing to return the macroblock size to a predetermined size.
  • the mode determination unit 322a is supplied with motion vector information and prediction image data regarding all candidate inter prediction modes from the motion search unit 321a.
  • the mode determination unit 322a is supplied with motion vector information generated from the encoded adjacent block from the motion vector buffer 324. Furthermore, the rearranged image data supplied from the screen rearrangement buffer 12 is supplied to the mode determination unit 322a in order to calculate a cost function.
  • the mode determination unit 322a calculates the cost function value using the image data supplied from the screen rearrangement buffer 12 and the predicted image data supplied from the motion search unit 321a for each candidate mode of the optimal inter prediction mode.
  • the mode determination unit 322a selects the mode with the minimum cost function value as the optimal inter prediction mode for the macroblock to be encoded.
  • the mode determination unit 322a calculates the total number of motion vectors of two consecutive macroblocks using the motion vector information of adjacent macroblocks supplied from the motion vector buffer 324.
  • the mode determination unit 322a sets the mode in which the cost function value is minimum without exceeding the upper limit value as the optimal inter prediction mode. For example, a control mode in which a prediction mode in which the total number of motion vectors of two consecutive macroblocks exceeds the upper limit value is excluded from candidates for the optimal inter prediction mode, and the control count (number of macroblocks) per frame is Every time, it outputs to the motion search part 321a.
  • the mode determination unit 322a outputs prediction mode information, motion vector information, and cost function values related to the mode determined to be optimal to the motion compensation processing unit 323.
  • the mode determination unit 322a calculates a predicted motion vector based on the motion vector information supplied from the motion vector buffer 324.
  • the mode determination unit 322a calculates a difference motion vector that is a difference between the calculated predicted motion vector and the motion vector detected by the motion search unit 321a, and uses the difference motion vector information indicating the difference motion vector as motion vector information. And output to the motion compensation processing unit 323.
  • the upper limit is It becomes larger and the restriction on the number of motion vectors becomes loose. Therefore, it is possible to reduce the number of times of control for preventing the number of motion vectors from exceeding the upper limit value, and efficient coding processing can be performed. Also, when a scene change is detected, the macroblock is restored to a preset size, so when the scene change is made and the continuity of the image is lost, encoding is performed with the preset macroblock size. Processing can be performed.
  • the limitation on the number of motion vectors is provided to guarantee real-time operation from the viewpoint of memory bandwidth as described above. Therefore, an operation mode that does not require real-time operation may be provided so that the number of motion vectors exceeding the upper limit value can be allowed. In this case, since the number of motion vectors is not limited to the upper limit value, a more optimal predicted image can be generated.
  • information indicating that real-time decoding processing is not guaranteed in the sequence parameter set or the like in the image compression information that is, determination information indicating that the number of motion vectors exceeds the upper limit value (For example, a flag) is provided.
  • a flag an image decoding apparatus that decodes image compression information can easily determine that the number of motion vectors exceeds the upper limit value by detecting the flag. Therefore, it is possible to easily notify the user or the like that the decoding process of the real-time operation is not guaranteed.
  • Image compression information generated by encoding an input image is supplied to an image decoding apparatus via a predetermined transmission path, recording medium, or the like and decoded.
  • FIG. 18 shows a configuration of an image decoding apparatus that is an image processing apparatus that decodes compressed image information.
  • the image decoding device 50 includes a storage buffer 51, a lossless decoding unit 52, an inverse quantization unit 53, an inverse orthogonal transform unit 54, an addition unit 55, a deblocking filter 56, a screen rearrangement buffer 57, a digital / analog conversion unit ( D / A converter 58). Furthermore, the image decoding apparatus 50 includes a frame memory 61, an intra prediction unit 62, a motion compensation unit 63, a selector 64, and a motion vector number limit setting unit 65.
  • the accumulation buffer 51 accumulates the transmitted image compression information.
  • the lossless decoding unit 52 decodes the image compression information supplied from the accumulation buffer 51 by a method corresponding to the encoding method of the lossless encoding unit 16 of FIG.
  • the lossless decoding unit 52 outputs prediction mode information obtained by decoding the image compression information to the intra prediction unit 62 and the motion compensation unit 63.
  • the inverse quantization unit 53 inversely quantizes the quantized data decoded by the lossless decoding unit 52 by a method corresponding to the quantization method of the quantization unit 15 in FIG.
  • the inverse orthogonal transform unit 54 performs inverse orthogonal transform on the output of the inverse quantization unit 53 by a method corresponding to the orthogonal transform method of the orthogonal transform unit 14 of FIG.
  • the addition unit 55 adds the data after inverse orthogonal transform and the predicted image data supplied from the selector 64 to generate decoded image data, and outputs the decoded image data to the deblocking filter 56 and the intra prediction unit 62.
  • the deblocking filter 56 performs deblocking filter processing on the decoded image data supplied from the addition unit 55, removes block distortion, supplies the frame memory 61 to the frame memory 61, and outputs the frame memory 61 to the screen rearrangement buffer 57. To do.
  • the screen rearrangement buffer 57 rearranges images. That is, the order of frames rearranged for the encoding order by the screen rearrangement buffer 12 in FIG. 1 is rearranged in the original display order and output to the D / A conversion unit 58.
  • the D / A conversion unit 58 performs D / A conversion on the image data supplied from the screen rearrangement buffer 57 and outputs it to a display (not shown) to display an image.
  • the frame memory 61 stores the decoded image data after the filtering process supplied from the deblocking filter 24.
  • the intra prediction unit 62 generates a predicted image from the decoded image data supplied from the adding unit 55 based on the prediction mode information supplied from the lossless decoding unit 52, and outputs the generated predicted image data to the selector 64. .
  • the motion compensation unit 63 reads the image data of the reference image from the frame memory 61 based on the prediction mode information and the motion vector supplied from the lossless decoding unit 52, performs motion compensation, generates predicted image data, and selects the selector 64. Output to. In addition, the motion compensation unit 63 outputs the size of the macroblock indicated by the prediction mode information to the motion vector number limit setting unit 65. Further, the motion compensation unit 63 determines whether the total number of motion vectors of two consecutive macroblocks exceeds the upper limit value notified from the motion vector number limit setting unit 65, and determines the determination result, for example, a system controller or the like. Output to.
  • the selector 64 outputs the predicted image data generated by the intra prediction unit 62 to the adding unit 55.
  • the selector 64 outputs the predicted image data generated by the motion compensation unit 63 to the addition unit 55.
  • the motion vector number limit setting unit 65 sets an upper limit value of the number of motion vectors according to the size of the macroblock notified from the motion compensation unit 63 and notifies the motion compensation unit 63 of the set upper limit value.
  • the motion vector number limit setting unit 65 sets the upper limit value to be larger than the upper limit value of the macro block of 16 ⁇ 16 pixels. It is possible to determine whether the real-time operation can be guaranteed from the viewpoint of the memory bandwidth without limiting the number of wrinkle motion vectors more than necessary.
  • the motion vector number limit setting unit 65 has an upper limit of the number of motion vectors when the size of the macroblock is 16 ⁇ 16 pixels, and the size of the macroblock is (16 ⁇ m) ⁇ ( In the case of 16 ⁇ n) pixels, the upper limit value is (m ⁇ n ⁇ p) and the upper limit value with respect to the size of the macroblock is set to a predetermined ratio, so that the number of motion vectors is not limited more than necessary. It is possible to determine whether real-time operation can be guaranteed from the viewpoint of memory bandwidth.
  • FIG. 19 shows a configuration of a motion compensation unit and a motion vector number limit setting unit.
  • the motion compensation unit 63 includes a macroblock size buffer 631, a motion vector generation unit 632, a mode buffer 633, and a motion compensation processing unit 634.
  • the macroblock size buffer 631 stores the size identification information supplied from the lossless decoding unit 52.
  • the macroblock size buffer 631 outputs the stored size identification information to the motion vector number limit setting unit 65.
  • the motion vector number limit setting unit 65 determines the upper limit value of the number of motion vectors according to the size of the macroblock, and notifies the motion vector generation unit 632 of the upper limit value.
  • the motion vector generation unit 632 includes a buffer for storing motion vector information regarding blocks adjacent in space-time in order to reconstruct motion vector information.
  • the motion vector generation unit 632 reconstructs motion vector information related to the block using the motion vector information of the adjacent block and the difference motion vector information indicated by the prediction mode information supplied from the lossless decoding unit. Further, the motion vector generation unit 632 determines whether or not the number of reconstructed motion vectors exceeds the upper limit value determined by the motion vector number limit setting unit 65, and the determination result is a system controller or the like (not shown). Output).
  • the mode buffer 633 stores prediction mode information indicating the prediction mode supplied from the lossless decoding unit 52. Further, the mode buffer 633 outputs the stored prediction mode information to the motion compensation processing unit 634.
  • the motion compensation processing unit 634 reads the image data of the reference image from the frame memory 61 based on the prediction mode information, performs motion compensation based on the motion vector information generated by the motion vector generation unit 632, and generates predicted image data. To do.
  • the motion compensation processing unit 634 outputs the generated predicted image data to the selector 64.
  • step ST81 the accumulation buffer 51 accumulates the transmitted image compression information.
  • step ST82 the lossless decoding unit 52 performs lossless decoding processing.
  • the lossless decoding unit 52 decodes the compressed image information supplied from the accumulation buffer 51. That is, quantized data of each picture encoded by the lossless encoding unit 16 in FIG. 1 is obtained. Further, when the lossless decoding unit 52 performs lossless decoding of the prediction mode information included in the image compression information and the obtained prediction mode information is information related to the intra prediction mode, the prediction mode information is converted into the intra prediction unit 62. Output to.
  • the lossless decoding part 52 outputs prediction mode information to the motion compensation part 63, when prediction mode information is the information regarding inter prediction mode.
  • step ST83 the inverse quantization unit 53 performs an inverse quantization process.
  • the inverse quantization unit 53 inversely quantizes the quantized data decoded by the lossless decoding unit 52 with characteristics corresponding to the characteristics of the quantization unit 15 in FIG.
  • the inverse orthogonal transform unit 54 performs an inverse orthogonal transform process.
  • the inverse orthogonal transform unit 54 performs inverse orthogonal transform on the transform coefficient data inversely quantized by the inverse quantization unit 53 with characteristics corresponding to the characteristics of the orthogonal transform unit 14 of FIG.
  • step ST85 the addition unit 55 generates decoded image data.
  • the adder 55 adds the data obtained by performing the inverse orthogonal transform process and the predicted image data selected in step ST89 described later to generate decoded image data. As a result, the original image is decoded.
  • step ST86 the deblocking filter 56 performs filter processing.
  • the deblocking filter 56 performs a deblocking filter process on the decoded image data output from the adding unit 55 to remove block distortion included in the decoded image.
  • step ST87 the frame memory 61 performs a process of storing decoded image data.
  • step ST88 the intra prediction unit 62 and the motion compensation unit 63 perform predicted image generation processing.
  • the intra prediction unit 62 and the motion compensation unit 63 each perform a prediction image generation process corresponding to the prediction mode information supplied from the lossless decoding unit 52.
  • the intra prediction unit 62 when prediction mode information for intra prediction is supplied from the lossless decoding unit 52, the intra prediction unit 62 generates predicted image data based on the prediction mode information.
  • the motion compensation unit 63 performs motion compensation based on the prediction mode information to generate predicted image data.
  • step ST89 the selector 64 selects predicted image data.
  • the selector 64 selects the prediction image supplied from the intra prediction unit 62 and the prediction image data generated by the motion compensation unit 63, supplies the selected image to the addition unit 55, and, as described above, in step ST85, the inverse orthogonal transform unit.
  • the output of 54 is added.
  • step ST90 the screen rearrangement buffer 57 performs image rearrangement. That is, the screen rearrangement buffer 57 rearranges the order of frames rearranged for encoding by the screen rearrangement buffer 12 of the image encoding device 10 of FIG. 1 to the original display order.
  • step ST91 the D / A converter 58 D / A converts the image data from the screen rearrangement buffer 57. This image is output to a display (not shown), and the image is displayed.
  • step ST101 the lossless decoding unit 52 determines whether or not the target block is intra-coded.
  • the prediction mode information obtained by performing lossless decoding is prediction mode information for intra prediction
  • the lossless decoding unit 52 supplies the prediction mode information to the intra prediction unit 62 and proceeds to step ST102.
  • the prediction mode information is inter prediction mode information
  • the lossless decoding unit 52 supplies the prediction mode information to the motion compensation unit 63 and proceeds to step ST103.
  • the intra prediction unit 62 performs an intra predicted image generation process.
  • the intra prediction unit 62 performs intra prediction using the decoded image data and the prediction mode information supplied from the addition unit 55, and generates predicted image data.
  • step ST103 the motion compensation unit 63 performs an inter prediction image generation process.
  • the motion compensation unit 63 performs motion compensation of the reference image read from the frame memory 61 based on the prediction mode information and the motion vector from the lossless decoding unit 52, and generates predicted image data.
  • FIG. 22 is a flowchart showing the inter predicted image generation processing in step ST103.
  • the motion vector number limit setting unit 65 performs the same processing as in FIG. 15, and sets the upper limit value of the number of motion vectors.
  • the motion vector number limit setting unit 65 sets an upper limit value of the number of motion vectors according to the size of the macroblock.
  • the motion vector number limit setting unit 65 sets the upper limit value to be larger than the upper limit value of the macro block of 16 ⁇ 16 pixels.
  • the motion vector number limit setting unit 65 has an upper limit of the number of motion vectors when the size of the macroblock is 16 ⁇ 16 pixels, and the size of the macroblock is (16 ⁇ m) ⁇ ( In the case of 16 ⁇ n) pixels, the upper limit value is set to (m ⁇ n ⁇ p) and the process proceeds to step ST112.
  • step ST112 the motion compensation unit 63 acquires prediction mode information.
  • the motion compensation unit 63 acquires the prediction mode information from the lossless decoding unit 52 and proceeds to step ST113 in order to generate predicted image data.
  • step ST113 the motion compensation unit 63 reconstructs motion vector information.
  • the motion compensation unit 63 generates predicted motion vector information from the motion vectors of the neighboring blocks that have been decoded, and reconstructs motion vector information from the difference motion vector information indicated by the predicted motion vector information and the prediction mode information. Then, the process proceeds to step ST114.
  • step ST114 the motion compensation unit 63 monitors the number of motion vectors.
  • the motion compensation unit 63 monitors whether the total number of motion vectors of two adjacent macroblocks exceeds the upper limit value determined in step ST111. If the number of motion vectors exceeds the upper limit value, the motion compensation unit 63 notifies the system controller or the like, for example, and proceeds to step ST115.
  • step ST115 the motion compensation unit 63 generates predicted image data. Based on the prediction mode information acquired in step ST112 and the motion vector information reconstructed in step ST113, the motion compensation unit 63 reads the reference image data from the frame memory 61, performs motion compensation, generates predicted image data, and selects the selector. 64.
  • the upper limit value of the number of motion vectors is set according to the size of the macroblock, and the upper limit of the number of motion vectors is set.
  • the result of monitoring whether the value is exceeded is output. Therefore, it is possible to easily determine whether real-time operation is guaranteed based on the monitoring result.
  • the number of motion vectors exceeds the upper limit value and real-time operation is not guaranteed, the fact is notified to the user by display or voice. can do.
  • the image compression information includes determination information indicating that the number of motion vectors exceeds the upper limit value
  • a determination result indicating whether the number of motion vectors exceeds the upper limit value is output based on the determination information.
  • the size of the macroblock is not limited to the above-described embodiment, and may be other sizes.
  • H. For the purpose of further improving the coding efficiency of H.264 / AVC, JVCVC (Joint Collaboration Team-Video Coding), a joint standardization organization of ITU-T and ISO / IEC, Standardization of the so-called image encoding method is underway.
  • JVCVC Joint Collaboration Team-Video Coding
  • the size of a coding unit (CU: Coding Unit) can be dynamically specified for each sequence.
  • the coding unit of HEVC is also called a coding tree block (Coding
  • the sizes of these LCUs and SCUs in the sequence parameter set that is part of the image compression information the range of sizes of usable coding units is defined.
  • split_flag the size of the coding unit used in each sequence is specified.
  • the shape of the encoding unit is usually a square, and the size of one side is expressed by a power of 2.
  • the coding unit may be divided into prediction units (PUs) that are processing units for intra prediction or inter prediction.
  • the coding unit can be divided into transform units (TUs) that are orthogonal transform processing units.
  • PUs prediction units
  • TUs transform units
  • HEVC in addition to 4 ⁇ 4 pixels and 8 ⁇ 8 pixels, conversion units having sizes of 16 ⁇ 16 pixels and 32 ⁇ 32 pixels can be used. For this reason, in this specification, the concept of a unit such as a coding unit and a maximum coding unit is included as a block as well as a macro block.
  • the above-described upper limit value of the number of motion vectors need not be set for all CUs, for example, and it is possible to set only a block for which a value different from the reference upper limit value is set.
  • identification information for setting only a block for which a value different from the reference upper limit value is set is included in the encoded stream.
  • FIG. 23 exemplifies a syntax when identification information is included in a slice header (SliceHeader).
  • the number on the left end of each line is a line number given for explanation.
  • the upper limit value is set at a level of 128 ⁇ 128 pixel size, and the upper limit value is not set at a level of 64 ⁇ 64 pixel size or less.
  • MinUnitForNumMV is set to 1 as a flag
  • an upper limit is set at a level of 64 ⁇ 64 pixel size, and no upper limit is set at a level of 32 ⁇ 32 pixel size or less.
  • MinUnitForNumMV is set to 2 as a flag
  • an upper limit value is set at a level of 32 ⁇ 32 pixel size, and an upper limit value is not set at a level of 16 ⁇ 16 pixel size or less.
  • motion prediction / compensation is performed without setting an upper limit value in a CU of 8 ⁇ 8 pixel size.
  • a syntax “MinUnitForNumMV” in this case, control of a CU having an 8 ⁇ 8 pixel size can be omitted, and setting of an upper limit value and control of motion prediction / compensation can be flexibly set. be able to.
  • FIG. 23 illustrates the case where the syntax “MinUnitForNumMV” is provided in the slice header
  • this syntax may be stored other than in the slice header.
  • it may be stored in a picture parameter set (PictureParameterSet).
  • PictureParameterSet As described above, if the value is stored in the slice header or the picture parameter set, for example, an operation of changing this value after a scene change can be handled. Further, if “MinUnitForNumMV” is stored in the slice header, it is possible to cope with a case where a picture is multi-sliced and processed in parallel for each slice.
  • the program can be recorded in advance on a hard disk or ROM (Read Only Memory) as a recording medium.
  • the program is temporarily or permanently stored on a removable recording medium such as a flexible disk, CD-ROM (Compact Disc Read Only Memory), MO (Magneto optical disc), DVD (Digital Versatile Disc), magnetic disk, and semiconductor memory. It can be stored (recorded).
  • a removable recording medium can be provided as so-called package software.
  • the program is transferred wirelessly from a download site to the computer, or transferred to the computer via a network such as a LAN (Local Area Network) or the Internet.
  • the computer can receive the program transferred in this manner and install it on a recording medium such as a built-in hard disk.
  • the step of describing the program includes not only the processing that is performed in time series in the described order but also the processing that is not necessarily performed in time series but is executed in parallel or individually.
  • H.264 is used as the encoding method / decoding method.
  • the present technology can also be applied to an image encoding device / image decoding device using an encoding method / decoding method for performing other motion prediction / compensation processing.
  • the present technology is, for example, MPEG, H.264, etc.
  • Image information (bitstream) compressed by orthogonal transformation such as discrete cosine transformation and motion compensation, such as 26x, is transmitted via network media such as satellite broadcasting, cable TV (television), the Internet, and cellular phones.
  • the present invention can be applied to an image encoding device and an image decoding device that are used when receiving or processing on a storage medium such as an optical, magnetic disk, and flash memory.
  • the image encoding device 10 and the image decoding device 50 described above can be applied to any electronic device. Examples thereof will be described below.
  • FIG. 24 illustrates a schematic configuration of a television apparatus to which the present technology is applied.
  • the television apparatus 90 includes an antenna 901, a tuner 902, a demultiplexer 903, a decoder 904, a video signal processing unit 905, a display unit 906, an audio signal processing unit 907, a speaker 908, and an external interface unit 909. Furthermore, the television apparatus 90 includes a control unit 910, a user interface unit 911, and the like.
  • the tuner 902 selects a desired channel from the broadcast wave signal received by the antenna 901, performs demodulation, and outputs the obtained stream to the demultiplexer 903.
  • the demultiplexer 903 extracts video and audio packets of the program to be viewed from the stream, and outputs the extracted packet data to the decoder 904.
  • the demultiplexer 903 outputs a packet of data such as EPG (Electronic Program Guide) to the control unit 910. If scrambling is being performed, descrambling is performed by a demultiplexer or the like.
  • the decoder 904 performs packet decoding processing, and outputs video data generated by the decoding processing to the video signal processing unit 905 and audio data to the audio signal processing unit 907.
  • the video signal processing unit 905 performs noise removal, video processing according to user settings, and the like on the video data.
  • the video signal processing unit 905 generates video data of a program to be displayed on the display unit 906, image data by processing based on an application supplied via a network, and the like.
  • the video signal processing unit 905 generates video data for displaying a menu screen for selecting an item and the like, and superimposes the video data on the video data of the program.
  • the video signal processing unit 905 generates a drive signal based on the video data generated in this way, and drives the display unit 906.
  • the display unit 906 drives a display device (for example, a liquid crystal display element or the like) based on a drive signal from the video signal processing unit 905 to display a program video or the like.
  • a display device for example, a liquid crystal display element or the like
  • the audio signal processing unit 907 performs predetermined processing such as noise removal on the audio data, performs D / A conversion processing and amplification processing on the processed audio data, and outputs the audio data by supplying the audio data to the speaker 908. .
  • the external interface unit 909 is an interface for connecting to an external device or a network, and transmits and receives data such as video data and audio data.
  • a user interface unit 911 is connected to the control unit 910.
  • the user interface unit 911 includes an operation switch, a remote control signal receiving unit, and the like, and supplies an operation signal corresponding to a user operation to the control unit 910.
  • the control unit 910 is configured using a CPU (Central Processing Unit), a memory, and the like.
  • the memory stores a program executed by the CPU, various data necessary for the CPU to perform processing, EPG data, data acquired via a network, and the like.
  • the program stored in the memory is read and executed by the CPU at a predetermined timing such as when the television device 90 is activated.
  • the CPU controls each unit so that the television device 90 operates according to the user operation by executing the program.
  • the television device 90 is provided with a bus 912 for connecting the tuner 902, the demultiplexer 903, the video signal processing unit 905, the audio signal processing unit 907, the external interface unit 909, and the control unit 910.
  • the decoder 904 is provided with the function of the image decoding apparatus (image decoding method) of the present application. For this reason, even if an extended macroblock is used, an image encoding process corresponding to the extended macroblock can be performed. For example, if the number of motion vectors exceeds the upper limit during reproduction of image compression information using an extended macroblock and the real-time operation is not guaranteed, this can be notified to the user.
  • FIG. 25 illustrates a schematic configuration of a mobile phone to which the present technology is applied.
  • the cellular phone 92 includes a communication unit 922, an audio codec 923, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, and a control unit 931. These are connected to each other via a bus 933.
  • an antenna 921 is connected to the communication unit 922, and a speaker 924 and a microphone 925 are connected to the audio codec 923. Further, an operation unit 932 is connected to the control unit 931.
  • the mobile phone 92 performs various operations such as transmission / reception of voice signals, transmission / reception of e-mail and image data, image shooting, and data recording in various modes such as a voice call mode and a data communication mode.
  • the voice signal generated by the microphone 925 is converted into voice data and compressed by the voice codec 923 and supplied to the communication unit 922.
  • the communication unit 922 performs audio data modulation processing, frequency conversion processing, and the like to generate a transmission signal.
  • the communication unit 922 supplies a transmission signal to the antenna 921 and transmits it to a base station (not shown).
  • the communication unit 922 performs amplification, frequency conversion processing, demodulation processing, and the like of the reception signal received by the antenna 921, and supplies the obtained audio data to the audio codec 923.
  • the audio codec 923 performs audio data expansion or conversion into an analog audio signal, and outputs it to the speaker 924.
  • the control unit 931 receives character data input by operating the operation unit 932 and displays the input characters on the display unit 930.
  • the control unit 931 generates mail data based on a user instruction or the like in the operation unit 932 and supplies the mail data to the communication unit 922.
  • the communication unit 922 performs mail data modulation processing, frequency conversion processing, and the like, and transmits the obtained transmission signal from the antenna 921.
  • the communication unit 922 performs amplification, frequency conversion processing, demodulation processing, and the like of the reception signal received by the antenna 921, and restores mail data. This mail data is supplied to the display unit 930 to display the mail contents.
  • the mobile phone 92 can also store the received mail data in a storage medium by the recording / playback unit 929.
  • the storage medium is any rewritable storage medium.
  • the storage medium is a removable medium such as a semiconductor memory such as a RAM or a built-in flash memory, a hard disk, a magnetic disk, a magneto-optical disk, an optical disk, a USB memory, or a memory card.
  • the image data generated by the camera unit 926 is supplied to the image processing unit 927.
  • the image processing unit 927 performs encoding processing of image data and generates encoded data.
  • the demultiplexing unit 928 multiplexes the encoded data generated by the image processing unit 927 and the audio data supplied from the audio codec 923 by a predetermined method, and supplies the multiplexed data to the communication unit 922.
  • the communication unit 922 performs modulation processing and frequency conversion processing of multiplexed data, and transmits the obtained transmission signal from the antenna 921.
  • the communication unit 922 performs amplification, frequency conversion processing, demodulation processing, and the like of the reception signal received by the antenna 921, and restores multiplexed data.
  • This multiplexed data is supplied to the demultiplexing unit 928.
  • the demultiplexing unit 928 performs demultiplexing of the multiplexed data, and supplies the encoded data to the image processing unit 927 and the audio data to the audio codec 923.
  • the image processing unit 927 performs a decoding process on the encoded data to generate image data.
  • the image data is supplied to the display unit 930 and the received image is displayed.
  • the audio codec 923 converts the audio data into an analog audio signal, supplies the analog audio signal to the speaker 924, and outputs the received audio.
  • the image processing unit 927 is provided with the functions of the image encoding device (image encoding method) and the image decoding device (image decoding method) of the present application. Therefore, even if an extended macroblock is used, image encoding processing and image decoding processing corresponding to the extended macroblock can be performed.
  • FIG. 26 illustrates a schematic configuration of a recording / reproducing apparatus to which the present technology is applied.
  • the recording / reproducing apparatus 94 records, for example, audio data and video data of a received broadcast program on a recording medium, and provides the recorded data to the user at a timing according to a user instruction.
  • the recording / reproducing device 94 can also acquire audio data and video data from another device, for example, and record them on a recording medium.
  • the recording / reproducing device 94 decodes and outputs the audio data and video data recorded on the recording medium, thereby enabling image display and audio output on the monitor device or the like.
  • the recording / reproducing apparatus 94 includes a tuner 941, an external interface unit 942, an encoder 943, an HDD (Hard Disk Drive) unit 944, a disk drive 945, a selector 946, a decoder 947, an OSD (On-Screen Display) unit 948, a control unit 949, A user interface unit 950 is included.
  • Tuner 941 selects a desired channel from a broadcast signal received by an antenna (not shown).
  • the tuner 941 outputs image compression information obtained by demodulating the received signal of the desired channel to the selector 946.
  • the external interface unit 942 includes at least one of an IEEE 1394 interface, a network interface unit, a USB interface, a flash memory interface, and the like.
  • the external interface unit 942 is an interface for connecting to an external device, a network, a memory card, and the like, and receives data such as video data and audio data to be recorded.
  • the encoder 943 performs encoding by a predetermined method when the video data and audio data supplied from the external interface unit 942 are not encoded, and outputs image compression information to the selector 946.
  • the HDD unit 944 records content data such as video and audio, various programs, and other data on a built-in hard disk, and reads them from the hard disk during playback.
  • the disk drive 945 records and reproduces signals with respect to the mounted optical disk.
  • An optical disk such as a DVD disk (DVD-Video, DVD-RAM, DVD-R, DVD-RW, DVD + R, DVD + RW, etc.), Blu-ray disk, or the like.
  • the selector 946 selects any stream from the tuner 941 or the encoder 943 and supplies the selected stream to either the HDD unit 944 or the disk drive 945 when recording video or audio. In addition, the selector 946 supplies the stream output from the HDD unit 944 or the disk drive 945 to the decoder 947 when playing back video or audio.
  • the decoder 947 performs a stream decoding process.
  • the decoder 947 supplies the video data generated by performing the decoding process to the OSD unit 948.
  • the decoder 947 outputs audio data generated by performing the decoding process.
  • the OSD unit 948 generates video data for displaying a menu screen for selecting an item and the like, and superimposes it on the video data output from the decoder 947 and outputs the video data.
  • a user interface unit 950 is connected to the control unit 949.
  • the user interface unit 950 includes an operation switch, a remote control signal receiving unit, and the like, and supplies an operation signal corresponding to a user operation to the control unit 949.
  • the control unit 949 is configured using a CPU, a memory, and the like.
  • the memory stores programs executed by the CPU and various data necessary for the CPU to perform processing.
  • the program stored in the memory is read and executed by the CPU at a predetermined timing such as when the recording / reproducing apparatus 94 is activated.
  • the CPU executes the program to control each unit so that the recording / reproducing device 94 operates in accordance with the user operation.
  • the encoder 943 is provided with the function of the image encoding apparatus (image encoding method) of the present application
  • the decoder 947 is provided with the function of the image decoding apparatus (image decoding method). Even if an extended macroblock is used, an image encoding process or an image decoding process corresponding to the expanded macroblock can be performed.
  • FIG. 27 illustrates a schematic configuration of an imaging apparatus to which the present technology is applied.
  • the imaging device 96 images a subject and displays an image of the subject on a display unit, or records it on a recording medium as image data.
  • the imaging device 96 includes an optical block 961, an imaging unit 962, a camera signal processing unit 963, an image data processing unit 964, a display unit 965, an external interface unit 966, a memory unit 967, a media drive 968, an OSD unit 969, and a control unit 970. Have. In addition, a user interface unit 971 is connected to the control unit 970. Furthermore, the image data processing unit 964, the external interface unit 966, the memory unit 967, the media drive 968, the OSD unit 969, the control unit 970, and the like are connected via a bus 972.
  • the optical block 961 is configured using a focus lens, a diaphragm mechanism, and the like.
  • the optical block 961 forms an optical image of the subject on the imaging surface of the imaging unit 962.
  • the imaging unit 962 is configured using a CCD or CMOS image sensor, generates an electrical signal corresponding to the optical image by photoelectric conversion, and supplies the electrical signal to the camera signal processing unit 963.
  • the camera signal processing unit 963 performs various camera signal processing such as knee correction, gamma correction, and color correction on the electrical signal supplied from the imaging unit 962.
  • the camera signal processing unit 963 supplies the image data after the camera signal processing to the image data processing unit 964.
  • the image data processing unit 964 performs an encoding process on the image data supplied from the camera signal processing unit 963.
  • the image data processing unit 964 supplies the encoded data generated by performing the encoding process to the external interface unit 966 and the media drive 968. Further, the image data processing unit 964 performs a decoding process on the encoded data supplied from the external interface unit 966 and the media drive 968.
  • the image data processing unit 964 supplies the image data generated by performing the decoding process to the display unit 965. Further, the image data processing unit 964 superimposes the processing for supplying the image data supplied from the camera signal processing unit 963 to the display unit 965 and the display data acquired from the OSD unit 969 on the image data. To supply.
  • the OSD unit 969 generates display data such as a menu screen and icons made up of symbols, characters, or figures and outputs them to the image data processing unit 964.
  • the external interface unit 966 includes, for example, a USB input / output terminal, and is connected to a printer when printing an image.
  • a drive is connected to the external interface unit 966 as necessary, a removable medium such as a magnetic disk or an optical disk is appropriately mounted, and a computer program read from them is installed as necessary.
  • the external interface unit 966 has a network interface connected to a predetermined network such as a LAN or the Internet.
  • the control unit 970 reads the encoded data from the memory unit 967 in accordance with an instruction from the user interface unit 971, and supplies the encoded data to the other device connected via the network from the external interface unit 966. it can.
  • the control unit 970 may acquire encoded data and image data supplied from another device via the network via the external interface unit 966 and supply the acquired data to the image data processing unit 964. it can.
  • any readable / writable removable medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory is used.
  • the recording medium may be any type of removable medium, and may be a tape device, a disk, or a memory card. Of course, a non-contact IC card or the like may be used.
  • media drive 968 and the recording medium may be integrated and configured by a non-portable storage medium such as a built-in hard disk drive or an SSD (Solid State Drive).
  • a non-portable storage medium such as a built-in hard disk drive or an SSD (Solid State Drive).
  • the control unit 970 is configured using a CPU, a memory, and the like.
  • the memory stores programs executed by the CPU, various data necessary for the CPU to perform processing, and the like.
  • the program stored in the memory is read and executed by the CPU at a predetermined timing such as when the imaging device 96 is activated.
  • the CPU executes the program to control each unit so that the imaging device 96 operates according to the user operation.
  • the image data processing unit 964 is provided with the functions of the image encoding device (image encoding method) and the image decoding device (image decoding method) of the present application. Therefore, when the captured image is recorded in the memory unit 967, a recording medium, or the like, even if an extended macroblock is used, image encoding processing and image decoding processing corresponding to the extended macroblock can be performed. it can.
  • the present technology can take the following configurations.
  • a prediction mode is detected in a state where the number of motion vectors of the block is equal to or less than an upper limit set by the setting unit, and motion compensation of the reference image is performed using the detected motion vector of the prediction mode, and a prediction image is obtained.
  • a motion prediction / compensation unit to generate An image processing apparatus comprising: an encoding unit that generates an encoded stream by encoding the image data using the prediction image generated by the motion prediction / compensation unit.
  • the motion prediction / compensation unit monitors the number of times of control for preventing the number of motion vectors from exceeding the upper limit value for each frame, and when the number of times of control exceeds a predetermined number of times,
  • the image processing apparatus according to any one of (2) to (6), wherein the block size of the block in the next frame is set large.
  • the encoding unit detects an optimal prediction mode regardless of the number of motion vectors, and generates a predicted image by performing motion compensation of a reference image using the detected motion vector of the optimal prediction mode. In the mode, when the number of motion vectors in the prediction mode exceeds the upper limit value, the encoded stream and discrimination information indicating that the number of motion vectors exceeds the upper limit value are transmitted (1) to The image processing apparatus according to any one of (8). (10) It further includes a generation unit that generates size identification information for identifying a block size of a block for which an upper limit value is set by the setting unit, The image processing device according to any one of (1) to (9), wherein the encoding unit transmits the encoded stream and the size identification information.
  • a setting unit that sets an upper limit value of the number of motion vectors according to a block size of a block that is a decoding processing unit when decoding an encoded stream obtained by encoding image data;
  • a prediction mode is detected in a state where the number of motion vectors of the block is equal to or less than an upper limit set by the setting unit, and motion compensation of the reference image is performed using the detected motion vector of the prediction mode, and a prediction image is obtained.
  • a motion compensation unit to be generated;
  • An image processing apparatus comprising: a decoding unit that decodes the encoded stream using a prediction image generated by the motion compensation unit.
  • the image processing device according to any one of (12) to (14), wherein the block having a size larger than the predetermined size is a maximum coding unit having a maximum size in a coding unit having a hierarchical structure.
  • the motion compensation unit detects the prediction mode, the motion compensation unit excludes a prediction mode in which the number of motion vectors exceeds the upper limit from prediction mode candidates to be detected (12) to (15).
  • the image processing apparatus according to any one of the above.
  • the motion compensation unit monitors, for each frame, the number of times that the number of motion vectors does not exceed the upper limit, and if the number of times of control exceeds a predetermined number of times,
  • the image processing apparatus according to any one of (12) to (16), wherein a block size of a block in a frame is set to be large.
  • the image processing apparatus according to any one of (11) to (17), wherein the motion compensation unit sets a block size of a block to a predetermined size when a scene change is detected by the scene change detection unit. .
  • the decoding unit detects an optimal prediction mode regardless of the number of motion vectors, and performs an operation mode for generating a prediction image by performing motion compensation of a reference image using the detected motion vector of the optimal prediction mode.
  • the image processing device according to any one of (11) to (18), wherein discrimination information indicating that the number of motion vectors exceeds an upper limit value is acquired from the encoded stream.
  • the image processing device according to any one of (11) to (19), wherein the decoding unit acquires size identification information for identifying a block size of a block for which an upper limit value is set from the encoded stream.
  • the upper limit value of the number of motion vectors is set according to the size of the macroblock. Also, an optimal prediction mode in which the number of motion vectors does not exceed the upper limit value is detected, and motion compensation of the reference image is performed using the detected motion vector of the optimal prediction mode, and a predicted image is generated. For this reason, when a macroblock having an expanded size is used, the number of motion vectors is not limited more than necessary, and image processing corresponding to the expanded macroblock can be performed.
  • image compression information obtained by performing encoding in block units is transmitted / received via network media such as satellite broadcasting, cable TV, the Internet, and cellular phones, or optical or magnetic disks It is suitable for an image encoding device, an image decoding device, or the like used when processing on a storage medium such as a flash memory.
  • Image decoding device 51 ... Accumulation buffer 52 ... Reversible Decoding unit, 58... D / A conversion unit, 61. Memory 62... Intra Prediction Unit 63 63 Motion Compensation Unit 64. Selector 90. Television Device 92. Mobile Phone 94. Image pickup apparatus, 321, 321 a, motion search unit, 322, 322 a, mode determination unit, 323, 634, motion compensation processing unit, 324, motion vector buffer, 631, microphone block size Buffer, 632 ... motion vector generation unit, 633 ... mode buffer

Landscapes

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

Abstract

 動きベクトル本数制限設定部35は、マクロブロックの大きさに応じて動きベクトル本数の上限値を設定する。動き予測・補償部32は、動きベクトル本数が上限値を超えていない最適予測モードを検出して、検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する。マクロブロックの大きさに応じて動きベクトル本数の上限値を設定することで、拡張されたマクロブロックを用いた場合に、動きベクトル本数が必要以上に制限されてしまうことがなく、画質の劣化等を防止できる。

Description

画像処理装置と画像処理方法
 この技術は、画像処理装置と画像処理方法に関する。詳しくは、拡張されたマクロブロックに対応した画像処理を行うことができる画像処理装置と画像処理方法を提供する。
 近年、画像情報をディジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を行う装置、例えば離散コサイン変換等の直交変換と動き補償により圧縮するMPEG等の方式に準拠した装置が、放送局や一般家庭において普及しつつある。
 特に、MPEG2(ISO/IEC13818-2)は、汎用画像符号化方式として定義されており、プロフェッショナル用途およびコンシューマー用途の広範なアプリケーションに現在広く用いられている。
 また、テレビ会議用等の画像符号化を目的として、H.26L(ITU-T Q6/16 VCEG)という標準の規格化が進んでいる。H.26LはMPEG2やMPEG4といった従来の符号化方式に比べ、その符号化、復号化により多くの演算量が要求されるものの、より高い符号化効率が実現されることが知られている。また、現在、MPEG4の活動の一環として、このH.26Lをベースに、より高い符号化効率を実現する標準化がJoint Model of Enhanced-Compression Video Codingとして行われており、H.264およびMPEG-4 Part10 (以下「H.264/AVC(Advanced Video Coding)」と記す)という名の下に国際標準となった。
 さらに、昨今、4000×2000画素程度の画像を圧縮したい、またはインターネットのような限られた伝送容量の環境において、ハイビジョン画像を配信したいといった、さらに高圧縮率符号化に対するニーズが高まっている。このため、非特許文献1のように、マクロブロックの大きさを、MPEG2やH.264/AVCよりも大きい例えば32画素×32画素といった大きさに拡張することが提案されている。すなわち、非特許文献1では、マクロブロックについて階層構造を採用することにより、16×16画素ブロック以下に関しては、H.264/AVCにおけるマクロブロックと互換性を保ち、そのスーパーセットとして、より大きなブロックが定義されている。
"Video Coding Using Extended Block Sizes"(Study Group16, Contribution 123, ITU, 2009年1月)
 ところで、H.264/AVC方式では、16×16画素により構成されるマクロブロックは、16×16、16×8、8×16若しくは8×8のいずれかのパーティションに分割して、それぞれ独立した動きベクトル情報を持つことができる。さらに、8×8パーティションは、8×8、8×4、4×8、4×4のいずれかのサブパーティションに分割して、それぞれ独立した動きベクトル情報を持つことができる。このような動き予測・補償処理が行われて、マクロブロック内のパーティションの数が増えると動きベクトル情報は、情報量が膨大となり動きベクトル情報をこのまま符号化することは、符号化効率の低下を招く。したがって、H.264/AVC方式では、連続する2つのマクロブロックにおける動きベクトルの数の合計が、定められた上限値を超えないように動き補償ブロックのブロックサイズを設定することが行われている。このため、マクロブロックの大きさを拡張した場合にH.264/AVC方式で定められた上限値を用いると、動きベクトルの数の制限によりブロックサイズを小さくすることができなくなって、画質の劣化等を招いてしまうおそれがある。
 そこで、本技術では、拡張されたマクロブロックに対応した画像処理を行うことができる画像処理装置と画像処理方法を提供することを目的とする。
 この技術の第1の側面は、像データを符号化処理する際の符号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する設定部と、前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する動き予測・補償部と、前記動き予測・補償部により生成された予測画像を用いて、前記画像データを符号化して符号化ストリームを生成する符号化部とを備える画像処理装置にある。
 本技術において、動きベクトル本数制限設定部では、マクロブロックの大きさに応じて動きベクトルの数の上限値が設定される。マクロブロックが所定サイズ例えば16×16画素よりも拡張されたサイズである場合、上限値は16×16画素のマクロブロックにおける上限値よりも大きい値に設定される。ここで、16×16画素マクロブロックに対する動きベクトルの数の上限値をp本としたとき、拡張されたマクロブロックの大きさが(16×m)×(16×n)画素である場合、上限値は(p×m×n)本に設定される。動き予測・補償部では、動きベクトルの数が上限値を超える予測モードを最適予測モードの候補から除外して最適予測モードの検出を行い、検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い、予測画像が生成される。また、動き予測・補償部では、動きベクトルの数が上限値を超えないための制御回数をフレーム毎に監視して、制御回数が予め設定された所定回数を超えた場合、次のフレームにおけるマクロブロックを大きくして、シーンチェンジ検出部でシーンチェンジが検出された場合には、マクロブロックを予め設定した所定の大きさとする。さらに、動き予測・補償部では、動きベクトルの数にかかわらず最適予測モードを検出して、該検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する動作モードが設けられている場合、この動作モードにおいて、最適予測モードにおける動きベクトルの数が上限値を超える場合、予測画像を用いて生成された画像圧縮情報に、動きベクトルの数が上限値を超えていることを示す判別情報が含まれるようにする。また、所定サイズよりも大きいサイズのブロックは、解像構造を有する符号化単位において例えば最大サイズを有する最大符号化単位とする。
 この技術の第2の側面は、画像データを符号化処理する際の符号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する工程と、前記設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する工程と、前記生成された予測画像を用いて、前記画像データを符号化して符号化ストリームを生成する工程とを含む画像処理方法にある。
 この技術の第3の側面は、画像データを符号化した符号化ストリームを復号化処理する際の復号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する設定部と、前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する動き補償部と、前記動き補償部により生成された予測画像を用いて、前記符号化ストリームを復号化する復号化部とを備える画像処理装置にある。
 本技術において、画像データを符号化した符号化ストリームを復号化処理する際に、動きベクトル本数制限設定部では、マクロブロックの大きさに応じて動きベクトルの数の上限値が設定される。マクロブロックが所定サイズ例えば16×16画素のマクロブロックよりも拡張されたサイズである場合、上限値は16×16画素のマクロブロックにおける上限値よりも大きい値に設定される。ここで、16×16画素マクロブロックに対する動きベクトル数の上限値をp本としたとき、拡張されたマクロブロックの大きさが(16×m)×(16×n)画素である場合、上限値は(p×m×n)本に設定される。動き補償部では、画像圧縮情報に含まれている動きベクトル情報に基づいて参照画像の動き補償を行い予測画像を生成する場合に、動きベクトルの数が設定された上限値以下の状態で予測モードを検出し、検出した予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像が生成される。この生成された予測画像を用いて、復号化部で符号化ストリームが復号化される。また、動き補償部では、予測モードを検出する際、動きベクトルの数が上限値を超える予測モードを、検出対象となる予測モードの候補から除外する。さらに、動き補償部では、動きベクトルの数が上限値を超えないための制御回数をフレーム毎に監視して、制御回数が予め設定された所定回数を超えた場合、次のフレームにおけるブロックのブロックサイズを大きく設定する。また画像データにおけるシーンチェンジが検出された場合、ブロックサイズが予め設定した所定のサイズに設定される。また動きベクトルの数にかかわらず最適予測モードを検出して、検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する動作モードでは、符号化ストリームから動きベクトルの数が上限値を超えていることを示す判別情報を取得する。符号化ストリームから、上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を取得することも行われる。
 この技術の第4の側面は、画像データを符号化した符号化ストリームを復号化処理する際の復号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する工程と、前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する工程と、前記生成された予測画像を用いて、前記符号化ストリームを復号化する工程とを含む画像処理方法にある。
 この技術では、マクロブロックの大きさに応じて動きベクトルの数の上限値が設定される。また、動きベクトルの数が上限値を超えていない最適予測モードが検出されて、検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い、予測画像が生成される。このため、拡張された大きさのマクロブロックが用いられた場合に、動きベクトルの数が必要以上に制限されてしまうことがなく、拡張されたマクロブロックに対応した画像処理を行うことができる。
画像符号化装置の構成を示す図である。 H.264/AVC方式におけるマクロブロック示す図である。 動き補償ブロックと隣接ブロックを示す図である。 Multi-Reference Frameを説明するための図である。 時間ダイレクトモードを説明するための図である。 1/4画素精度の動き予測・補償処理を説明するための図である。 6タップのFIRフィルタを用いた1/4画素精度の動き予測・補償処理で用いる画素を示す図である。 動きベクトル本数の上限値を説明するための図である。 マクロブロックの大きさを拡張した場合の階層構造を示す図である。 動き予測・補償部の構成と動きベクトル本数制限設定部を示した図である。 画像符号化装置の動作を示すフローチャートである。 予測処理を示すフローチャートである。 イントラ予測処理を示すフローチャートである。 インター予測処理を示すフローチャートである。 動きベクトル本数の上限値設定を示すフローチャートである。 画像符号化装置の他の構成を示す図である。 動き予測・補償部の他の構成と動きベクトル本数制限設定部を示す図である。 画像復号化装置の構成を示す図である。 動き補償部の構成と動きベクトル本数制限設定部を示す図である。 画像復号化装置の動作を示すフローチャートである。 予測画像生成処理を示すフローチャートである。 インター予測画像生成処理を示すフローチャートである。 スライスヘッダを例示した図である。 テレビジョン装置の概略構成を例示した図である。 携帯電話機の概略構成を例示した図である。 記録再生装置の概略構成を例示した図である。 撮像装置の概略構成を例示した図である。
 以下、実施の形態について説明する。本技術では、マクロブロックの大きさを拡張した場合、H.264/AVC方式のようにレベルに応じた設定されている上限値を用いると、動きベクトルの数は、必要以上に制限されて画質の劣化を招いてしまうおそれがある。したがって、拡張されたサイズのマクロブロックを用いる場合、マクロブロックの大きさに応じて上限値を設定することで、動きベクトルの数を必要以上に制限することなくリアルタイム動作をメモリバンド幅の観点から保証する。また、動きベクトルの数が必要以上に制限されて画質が劣化してしまうことを防止する。なお、説明は以下の順序で行う。
 1.画像符号化装置の構成
 2.画像符号化装置の動作
 3.画像符号化装置の他の構成
 4.画像符号化装置の他の動作
 5.画像復号化装置の構成
 6.画像復号化装置の動作
 7.ソフトウェア処理の場合
 8.電子機器に適用した場合
 <1.画像符号化装置の構成>
 図1は画像符号化を行う画像処理装置である画像符号化装置の構成を示している。画像符号化装置10は、アナログ/ディジタル変換部(A/D変換部)11、画面並び替えバッファ12、減算部13、直交変換部14、量子化部15、可逆符号化部16、蓄積バッファ17、レート制御部18を備えている。さらに、画像符号化装置10は、逆量子化部21、逆直交変換部22、加算部23、デブロッキングフィルタ24、フレームメモリ25、イントラ予測部31、動き予測・補償部32、予測画像・最適モード選択部33を備えている。
 A/D変換部11は、アナログの画像信号をディジタルの画像データに変換して画面並べ替えバッファ12に出力する。
 画面並べ替えバッファ12は、A/D変換部11から出力された画像データに対してフレームの並べ替えを行う。画面並べ替えバッファ12は、符号化処理に係るGOP(Group of Pictures)構造に応じてフレームの並べ替えを行い、並べ替え後の画像データを減算部13とイントラ予測部31と動き予測・補償部32に出力する。
 減算部13には、画面並べ替えバッファ12から出力された画像データと、後述する予測画像・最適モード選択部33で選択された予測画像データが供給される。減算部13は、画面並べ替えバッファ12から出力された画像データと予測画像・最適モード選択部33から供給された予測画像データとの差分である予測誤差データを算出して、直交変換部14に出力する。
 直交変換部14は、減算部13から出力された予測誤差データに対して、離散コサイン変換(DCT;Discrete Cosine Transform)、カルーネン・レーベ変換等の直交変換処理を行う。直交変換部14は、直交変換処理を行うことにより得られた変換係数データを量子化部15に出力する。
 量子化部15には、直交変換部14から出力された変換係数データと、後述するレート制御部18からレート制御信号が供給されている。量子化部15は変換係数データの量子化を行い、量子化データを可逆符号化部16と逆量子化部21に出力する。また、量子化部15は、レート制御部18からのレート制御信号に基づき量子化パラメータ(量子化スケール)を切り替えて、量子化データのビットレートを変化させる。
 可逆符号化部16には、量子化部15から出力された量子化データと、後述するイントラ予測部31と動き予測・補償部32および予測画像・最適モード選択部33から予測モード情報が供給される。なお、予測モード情報には、イントラ予測またはインター予測に応じて、予測モード、マクロブロックの大きさ、マクロブロックタイプ、動きベクトル情報等が含まれる。また、予測モード情報には、後述する判別情報やサイズ識別情報等も含めてもよい。また、可逆符号化部16は、量子化データに対して例えば可変長符号化または算術符号化等により可逆符号化処理を行い、画像圧縮情報を生成して蓄積バッファ17に出力する。さらに、可逆符号化部16は、予測モード情報を可逆符号化して、画像圧縮情報に含める。例えば可逆符号化部16は、画像圧縮情報である符号化ストリームのヘッダ情報に付加する。
 蓄積バッファ17は、可逆符号化部16からの画像圧縮情報を蓄積する。また、蓄積バッファ17は、蓄積した画像圧縮情報を伝送路に応じた伝送速度で出力する。
 レート制御部18は、蓄積バッファ17の空き容量の監視を行い、空き容量に応じてレート制御信号を生成して量子化部15に出力する。レート制御部18は、例えば蓄積バッファ17から空き容量を示す情報を取得する。レート制御部18は空き容量が少なくなっている場合、レート制御信号によって量子化データのビットレートを低下させる。また、レート制御部18は蓄積バッファ17の空き容量が十分大きい場合、レート制御信号によって量子化データのビットレートを高くする。
 逆量子化部21は、量子化部15から供給された量子化データの逆量子化処理を行う。逆量子化部21は、逆量子化処理を行うことで得られた変換係数データを逆直交変換部22に出力する。
 逆直交変換部22は、逆量子化部21から供給された変換係数データの逆直交変換処理を行うことで得られたデータを加算部23に出力する。
 加算部23は、逆直交変換部22から供給されたデータと予測画像・最適モード選択部33から供給された予測画像データを加算して復号画像データを生成して、デブロッキングフィルタ24とフレームメモリ25に出力する。なお、復号画像データは参照画像の画像データとして用いられる。
 デブロッキングフィルタ24は、画像の符号化時に生じるブロック歪みを減少させるためのフィルタ処理を行う。デブロッキングフィルタ24は、加算部23から供給された復号画像データからブロック歪みを除去するフィルタ処理を行い、フィルタ処理後の復号画像データをフレームメモリ25に出力する。
 フレームメモリ25は、デブロッキングフィルタ24から供給されたフィルタ処理後の復号画像データを保持する。このフレームメモリ25に保持された復号画像データは、参照画像データとして動き予測・補償部32で用いられる。
 イントラ予測部31は、画面並べ替えバッファ12から出力された符号化対象画像の画像データと加算部23から供給された復号画像データを用いて、候補となる全てのイントラ予測モードのイントラ予測処理を行う。さらに、イントラ予測部31は、各イントラ予測モードに対してコスト関数値を算出して、算出したコスト関数値が最小となるイントラ予測モード、すなわち符号化効率が最良となるイントラ予測モードを、最適イントラ予測モードとして選択する。イントラ予測部31は、最適イントラ予測モードで生成された予測画像データと最適イントラ予測モードに関する予測モード情報、および最適イントラ予測モードでのコスト関数値を予測画像・最適モード選択部33に出力する。
 動き予測・補償部32は、各動き補償ブロックサイズで動き予測・補償処理を行う。動き予測・補償部32は、画面並べ替えバッファ12から読み出された符号化対象画像について予測モード毎すなわち各動き補償ブロックでモード毎に、フレームメモリ25から読み出された参照画像データを用いて動きベクトルを検出する。さらに、動き予測・補償部32は、検出した動きベクトルに基づいて復号画像に動き補償処理を施して予測画像データの生成を行う。
 また、動き予測・補償部32は、予測モード毎にコスト関数値を算出する。動き予測・補償部32は、算出したコスト関数値が最小で、連続する2つのマクロブロックの動きベクトルの合計本数が後述する動きベクトル本数制限設定部35で設定された上限値を超えていない動き補償ブロックサイズを、最適インター予測モードとして選択する。動き予測・補償部32は、最適インター予測モードで生成された予測画像データと最適インター予測モードに関する予測モード情報、および最適インター予測モードでのコスト関数値や動きベクトル情報を予測画像・最適モード選択部33に出力する。なお、動き予測・補償部32は、インター予測モードとして、スキップドマクロブロックやダイレクトモードでの予測も行う。
 予測画像・最適モード選択部33は、イントラ予測部31から供給されたコスト関数値と動き予測・補償部32から供給されたコスト関数値を比較して、コスト関数値が少ない方を、符号化効率が最良となる最適モードとして選択する。また、予測画像・最適モード選択部33は、最適モードで生成した予測画像データを減算部13と加算部23に出力する。さらに、予測画像・最適モード選択部33は、最適モードの予測モード情報を可逆符号化部16に出力する。なお、予測画像・最適モード選択部33は、スライス単位でイントラ予測またはインター予測を行う。
 動きベクトル本数制限設定部35は、H.264/AVC方式とは異なり、マクロブロックの大きさに応じて動きベクトルの数の上限値を設定して、動き予測・補償部32に出力する。ここで、H.264/AVC方式における動きベクトルの数の制限について説明しておく。
 H.264/AVC方式では、図2の(A)に示すように、16×16画素により構成されるマクロブロックは、16×16、16×8、8×16若しくは8×8のいずれかのパーティションに分割して、それぞれ独立した動きベクトル情報を持つことができる。さらに、8×8パーティションは、図2の(B)に示すように、8×8、8×4、4×8、4×4のいずれかのサブパーティションに分割して、それぞれ独立した動きベクトル情報を持つことができる。このような動き予測・補償処理が行われると、動きベクトル情報は、情報量が膨大となり動きベクトル情報をこのまま符号化することは、符号化効率の低下を招く。したがって、H.264/AVC方式では、以下のような手法により、動きベクトル情報の情報量の低減が実現されている。
 図3において、ブロック「E」はこれから符号化されようとしている当該動き補償ブロック、ブロック「A」~「D」は、既に符号化済みであってブロック「E」に隣接するブロックである。
 ここで、x=A,B,C,D,Eとして、xに対する動きベクトル情報を、mvxで表すものとする。まず、ブロックA,B,Cに関する動きベクトル情報を用い、動き補償ブロックEに対する予測動きベクトル情報pmvEを、メディアンオペレーションにより、式(1)から生成する。
  pmvE=med(mvA,mvB,mvC) ・・・(1)
 また、ブロック「C」に関する情報が、画枠の端である等の理由により「unavailable」である場合には、ブロック「D」に関する情報にて代用する。
 画像圧縮情報に、動き補償ブロック「E」に対する動きベクトル情報として符号化されるデータmvdEは、pmvEを用いて式(2)のように生成される。
  mvdE=mvE-pmvE         ・・・(2)
なお、実際の処理は、動きベクトル情報の水平方向、垂直方向のそれぞれの成分に対して、独立に処理が行われる。
 このように、動きベクトル情報として予測動きベクトル情報pmvEとの差分であるデータmvdEを用いることで、動きベクトル情報の情報量の低減が実現されている。
 また、H.264/AVC方式においては、Multi-Reference Frameという、MPEG-2やH.263等の画像情報符号化方式では規定されていなかった方式が規定されている。図4は、Multi-Reference Frameを説明するための図である。H.264/AVC方式では、複数の参照フレームをメモリに格納し、図4に示すように、動き補償ブロック毎に異なるフレームを参照することが可能とされている。
 また、H.264/AVC方式におけるBピクチャについては、ダイレクトモード(Direct Mode)が設けられている。ダイレクトモードでは、動きベクトル情報は、画像圧縮情報中には格納されず、画像復号化装置において、周辺若しくはCo-Locatedブロックの動きベクトル情報から、動き補償ブロックの動きベクトル情報が抽出される。
 ダイレクトモードでは、空間ダイレクトモード(Spatial Direct Mode)と時間ダイレクトモード(Temporal Direct Mode)が設けられており、どちらを用いるかは、スライス毎に切り替えることが可能とされている。
 空間ダイレクトモードでは、式(3)に示すように、メディアン予測により生成された動きベクトル情報を、動き補償ブロックに適用する。
  mvE=pmvE    ・・・(3)
 図5は、時間ダイレクトモードを説明するための図である。図5において、L0参照ピクチャにおける、動き補償ブロックと、同じ空間上のアドレスにあるブロックを、Co-Locatedブロックとし、Co-Located Blockにおける動きベクトル情報をmvcolとする。また、当該ピクチャとL0参照ピクチャの時間軸上の距離をTDBとし、L0参照ピクチャとL1参照ピクチャの時間軸上の距離をTDDとする。
 このとき、当該ピクチャにおけるL0動きベクトル情報mvL0およびL1動きベクトル情報mvL1を、式(4),(5)に示すように生成する。
  mvL0=(TDB/TDD)mvcol       ・・・(4)
  mvL1=((TDD-TDB)/TDD)mvcol  ・・・(5)
なお、画像圧縮情報においては、時間軸上の距離を表す情報が存在しないため、POC(Picture Order Count)を用いて演算を行う。
 H.264/AVC方式では、6タップのFIR(Finite Impulse Response)フィルタを用いた1/4画素精度の動き予測・補償処理を行うことで、符号化効率の向上がはかられている。図6は1/4画素精度の動き予測・補償処理を説明するための図である。
 図6において、「A」はフレームメモリに格納されている整数精度画素の位置、「b」,「c」,「d」は1/2画素精度の位置、「e1」,「e2」,「e3」は1/4画素精度の位置である。
 Clip1()は、式(6)のように定義する。
Figure JPOXMLDOC01-appb-M000001
なお、式(6)において、max_pixの値は、入力画像が8ビット精度である場合、255となる。
 位置「b」「d」における画素値は、6タップのFIRフィルタを用いて、式(7)(8)のように生成される。
  F=A-2-5・A-1+20・A+20・A-5・A+A ・・・(7)
  b,d=Clip1((F+16)>>5)          ・・・(8)
 位置「c」における画素値は、6タップのFIRフィルタを用いて、式(9)または式(10)のいずれかと式(11)のように生成される。
  F=b-2-5・b-1+20・b+20・b-5・b+b・・・(9)
  F=d-2-5・d-1+20・d+20・d-5・d+d・・・(10)
  c=Clip1((F+512)>>10)        ・・・(11)
なお、Clip1処理は、水平方向および垂直方向の積和処理の両方を行った後、最後に一度のみ行う。
 位置「e1」~「e3」における画素値は、線形内挿により式(12)~(14)のように生成される。
  e1=(A+b+1)>>1   ・・・(12)
  e2=(b+d+1)>>1   ・・・(13)
  e3=(b+c+1)>>1   ・・・(14)
 このような1/4画素精度の動き予測・補償処理では、動き補償ブロックのサイズが16×16画素である場合、図7の(A)に示す21×21画素のブロックの画素値が用いられる。また、動き補償ブロックのサイズが4×4画素である場合、図7の(B)に示す9×9画素のブロックの画素値が用いられる。このように、6タップのFIRフィルタを用いた1/4画素精度の動き予測・補償処理では、ブロックサイズに対して水平方向および垂直方向のそれぞれで5画素分のオーバーヘッドが必要となる。したがって、ブロックサイズが16×16画素である場合は((21×21)/(16×16))倍の画素の画素値が必要となり、ブロックサイズが4×4画素である場合は((9×9)/(4×4))倍の画素の画素値が必要となる。つまり、小さなブロックサイズが画像符号化装置においてより多く選択されると、より多くの画素の画素値が必要となり大きなメモリバンド幅が必要となる。
 このため、H.264/AVC方式では、図8に示すように、連続する2つのマクロブロックにおける動きベクトルの数の合計が、定められた上限値を超えないように動き補償ブロックのブロックサイズを設定することで、メモリバンド幅の増加が防止されている。すなわち、マクロブロックMB(a)の動きベクトル本数N(a)とマクロブロックMB(a+1)の動きベクトル本数N(a+1)の合計は、上限値NHL(レベル4(HDTVの解像度)の場合には16本)を超えないように制限される。同様に、マクロブロックMB(a+1)の動きベクトル本数N(a+1)とマクロブロックMB(a+2)の動きベクトル本数N(a+2)の合計は、上限値NHLを超えないように制限される。このように、連続する2つのマクロブロックにおける動きベクトルの数の合計は、定められた上限値NHLを超えないように制限する。例えば、Bピクチャでマクロブロックの大きさが16×16画素であり、動き補償ブロックサイズを4×4画素とする。この場合、1マクロブロックに16個の動き補償ブロックが含まれることになり、動きベクトル本数は16×2本となって上限値NHL(=16)を超えてしまう。したがって、動きベクトル本数が上限値を超えないように動き補償ブロックのサイズが設定される。
 図9は、マクロブロックの大きさを拡張した場合の階層構造を示している。図9において、図9の(C)(D)は、H.264/AVC方式で規定されている16×16画素のマクロブロックと8×8画素のサブマクロブロックを示している。また、H.264/AVC方式よりも拡張された大きさのマクロブロックとして、図9の(A)に示す64×64画素や図9の(B)に示す32×32画素のマクロブロックが規定される。なお、図9において、「Skip/direct」は、スキップドマクロブロックやダイレクトモードを選択した場合のブロックサイズであることを示している。また、「ME」は動き補償ブロックサイズであることを示している。また、「P8×8」は、ブロックサイズを小さくした下位の階層でさらに分割できることを示している。
 このように、マクロブロックの大きさを拡張した場合にH.264/AVC方式で定められた上限値を用いると、動きベクトル本数は、必要以上に制限されて画質の劣化を招いてしまうおそれがある。例えば、マクロブロックが16×16画素である場合の上限値を、64×64画素のマクロブロックでも用いると、ブロックサイズが4倍であっても上限値は等しいことから、動きベクトル本数は必要以上に制限されてしまう。したがって、動き補償ブロックのブロックサイズは、小さいブロックサイズとすることができなくなって、画質の劣化等を招いてしまうおそれがある。
 したがって、動きベクトル本数制限設定部35は、マクロブロックの大きさに応じて動きベクトル本数の上限値を設定する。動きベクトル本数制限設定部35は、所定サイズ(N)のマクロブロックよりも拡張されたサイズである場合、上限値を所定サイズ(N)のマクロブロックにおける上限値よりも大きくして、 動きベクトル本数が必要以上に制限することなくリアルタイム動作をメモリバンド幅の観点から保証する。例えば、動きベクトル本数制限設定部35は、マクロブロックの大きさが16×16画素(N=16)であるときの動きベクトル本数の上限値がp本であり、マクロブロックの大きさが(16×m)×(16×n)画素である場合、上限値を(m×n×p)本として、マクロブロックの大きさに対する上限値を所定の割合とすることで、動きベクトル本数が必要以上に制限することなくリアルタイム動作をメモリバンド幅の観点から保証する。
 図10は、動き予測・補償部の構成と動きベクトル本数制限設定部を示している。
 動き予測・補償部32は動き探索部321、モード判定部322、動き補償処理部323、動きベクトルバッファ324を備えている。
 動き探索部321には、画面並べ替えバッファ12から供給された並べ替え後の画像データと、フレームメモリ25から読み出した参照画像データが供給される。
 動き探索部321は、候補となる全てのインター予測モードで動き探索処理を行い、動き探索処理によって検出した動きベクトルを示す動きベクトル情報をモード判定部322に出力する。また、動き探索部321は、検出した動きベクトルに基づき参照画像データの動き補償を行い予測画像データを生成してモード判定部322に出力する。さらに、動き探索部321は、マクロブロックの大きさを示す情報、すなわち上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を動きベクトル本数制限設定部35に出力する。
 動きベクトル本数制限設定部35は、サイズ識別情報に基づきブロックサイズに応じて動きベクトル本数の上限値を設定して、設定した上限値をモード判定部322に通知する。
 モード判定部322には、動き探索部321から、候補となる全てのインター予測モードに関する動きベクトル情報および予測画像データが供給される。また、モード判定部322には、後述する動きベクトルバッファ324から符号化済みの隣接ブロックで生成された動きベクトル情報が供給される。さらに、モード判定部322には、コスト関数を算出するため、画面並べ替えバッファ12から供給された並べ替え後の画像データが供給される。
 モード判定部322は、最適インター予測モードの候補モード毎に、画面並べ替えバッファ12から供給された画像データと動き探索部321から供給された予測画像データを用いてコスト関数値を算出する。モード判定部322は、コスト関数値が最小となるモードを符号化対象のマクロブロックに対する最適インター予測モードとして選択する。また、モード判定部322は、動きベクトルバッファ324から供給された隣接するマクロブロックの動きベクトル情報を用いて、連続する2つのマクロブロックの動きベクトルの合計数を算出する。モード判定部322は、算出した数が動きベクトル本数制限設定部35で設定された上限値を超えるモードに関しては、候補モードから除外して最適インター予測モードの判定を行う。
 さらに、モード判定部322は、最適と判定されたモードに関する予測モード情報および動きベクトル情報やコスト関数値を動き補償処理部323に出力する。なお、予測モード情報には上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を含めるようにしてもよい。また、モード判定部322は、動きベクトルバッファ324から供給された動きベクトル情報に基づき予測動きベクトルを算出する。モード判定部322は、算出した予測動きベクトルと動き探索部321で検出された動きベクトルとの差分である差分動きベクトルを算出して、この差分動きベクトルを示す差分動きベクトル情報を動きベクトル情報に含めて動き補償処理部323に出力する。
 動き補償処理部323は、フレームメモリ25から供給された参照画像の画像データを用いて、モード判定部322から供給された動きベクトル情報に基づき動き補償を行い、予測画像データを生成する。動き補償処理部323は、生成された予測画像データとコスト関数値や予測モード情報(例えばマクロブロックの大きさやマクロブロックタイプ、予測モード、差分動きベクトル情報等を含む)とともに予測画像・最適モード選択部33に出力する。また、動き補償処理部323は、動きベクトル情報を動きベクトルバッファ324に出力する。
 動きベクトルバッファ324は、動き補償処理部323から供給された動きベクトル情報を一時記憶する。また、動きベクトルバッファ324は、記憶している動きベクトル情報をモード判定部322に供給して、連続する2つのマクロブロックの動きベクトルの合計本数や予測動きベクトルの算出を可能とする。
 <2.画像符号化装置の動作>
 図11は画像符号化装置の動作を示すフローチャートである。ステップST11において、A/D変換部11は入力された画像信号をA/D変換する。
 ステップST12において画面並べ替えバッファ12は、画像並べ替えを行う。画面並べ替えバッファ12は、A/D変換部11より供給された画像データを記憶し、各ピクチャの表示する順番から符号化する順番への並べ替えを行う。
 ステップST13において減算部13は、予測誤差データの生成を行う。減算部13は、ステップST12で並び替えられた画像の画像データと予測画像・最適モード選択部33で選択された予測画像データとの差分を算出して予測誤差データを生成する。予測誤差データは、元の画像データに比べてデータ量が小さい。したがって、画像をそのまま符号化する場合に比べて、データ量を圧縮することができる。
 ステップST14において直交変換部14は、直交変換処理を行う。直交変換部14は、減算部13から供給された予測誤差データを直交変換する。具体的には、予測誤差データに対して離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数データを出力する。
 ステップST15において量子化部15は、量子化処理を行う。量子化部15は、変換係数データを量子化する。量子化に際しては、後述するステップST25の処理で説明されるように、レート制御が行われる。
 ステップST16において逆量子化部21は、逆量子化処理を行う。逆量子化部21は、量子化部15により量子化された変換係数データを量子化部15の特性に対応する特性で逆量子化する。
 ステップST17において逆直交変換部22は、逆直交変換処理を行う。逆直交変換部22は、逆量子化部21により逆量子化された変換係数データを直交変換部14の特性に対応する特性で逆直交変換する。
 ステップST18において加算部23は、参照画像データの生成を行う。加算部23は、予測画像・最適モード選択部33から供給された予測画像データと、この予測画像と対応する位置の逆直交変換後のデータを加算して、参照画像データ(復号画像データ)を生成する。
 ステップST19においてデブロッキングフィルタ24は、フィルタ処理を行う。デブロッキングフィルタ24は、加算部23より出力された復号画像データをフィルタリングしてブロック歪みを除去する。
 ステップST20においてフレームメモリ25は、参照画像データを記憶する。フレームメモリ25はフィルタ処理後の参照画像データ(復号画像データ)を記憶する。
 ステップST21においてイントラ予測部31と動き予測・補償部32は、それぞれ予測処理を行う。すなわち、イントラ予測部31は、イントラ予測モードのイントラ予測処理を行い、動き予測・補償部32は、インター予測モードの動き予測・補償処理を行う。予測処理の詳細は、図12を参照して後述するが、この処理により、候補となる全ての予測モードでの予測処理がそれぞれ行われ、候補となる全ての予測モードでのコスト関数値がそれぞれ算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードが選択され、選択された予測モードで生成された予測画像とそのコスト関数および予測モード情報が予測画像・最適モード選択部33に供給される。
 ステップST22において予測画像・最適モード選択部33は、予測画像データの選択を行う。予測画像・最適モード選択部33は、イントラ予測部31および動き予測・補償部32より出力された各コスト関数値に基づいて、符号化効率が最良となる最適モードに決定する。さらに、予測画像・最適モード選択部33は、決定した最適モードの予測画像データを選択して、減算部13と加算部23に出力する。この予測画像が、上述したように、ステップST13,ST18の演算に利用される。なお、選択した予測画像データに対応する予測モード情報は、可逆符号化部16に出力される。
 ステップST23において可逆符号化部16は、可逆符号化処理を行う。可逆符号化部16は、量子化部15より出力された量子化データを可逆符号化する。すなわち、量子化データに対して可変長符号化や算術符号化等の可逆符号化が行われて、データ圧縮される。このとき、上述したステップST22において可逆符号化部16に入力された予測モード情報も可逆符号化される。さらに、量子化データを可逆符号化して生成された画像圧縮情報に、予測モード情報の可逆符号化データが含められる。
 ステップST24において蓄積バッファ17は、蓄積処理を行う。蓄積バッファ17は、可逆符号化部16から出力される画像圧縮情報を蓄積する。この蓄積バッファ17に蓄積された画像圧縮情報は、適宜読み出されて伝送路を介して復号側に伝送される。
 ステップST25においてレート制御部18は、レート制御を行う。レート制御部18は、蓄積バッファ17で画像圧縮情報を蓄積するとき、オーバーフローまたはアンダーフローが蓄積バッファ17で発生しないように、量子化部15の量子化動作のレートを制御する。
 次に、図12のフローチャートを参照して、図11のステップST21における予測処理を説明する。
 ステップST31において、イントラ予測部31はイントラ予測処理を行う。イントラ予測部31は処理対象のブロックの画像を、候補となる全てのイントラ予測モードでイントラ予測する。なお、イントラ予測において参照される復号画像の画像データは、デブロッキングフィルタ24でブロッキングフィルタ処理が行われる前の復号画像データが用いられる。このイントラ予測処理により、候補となる全てのイントラ予測モードでイントラ予測が行われ、候補となる全てのイントラ予測モードに対してコスト関数値が算出される。そして、算出されたコスト関数値に基づいて、全てのイントラ予測モードの中から、符号化効率が最良となる1つのイントラ予測モードが選択される。
 ステップST32において、動き予測・補償部32はインター予測処理を行う。動き予測・補償部32は、フレームメモリ25に記憶されているデブロッキングフィルタ処理後の復号画像データを用いて、候補となるインター予測モードのインター予測処理を行う。このインター予測処理により、候補となる全てのインター予測モードで予測処理が行われ、候補となる全てのインター予測モードに対してコスト関数値が算出される。そして、算出されたコスト関数値に基づいて、全てのインター予測モードの中から、符号化効率が最良となる1つのインター予測モードが選択される。
 次に、図11のステップST31におけるイントラ予測処理について図13のフローチャートを参照して説明する。
 ステップST41でイントラ予測部31は、各予測モードのイントラ予測を行う。イントラ予測部31は、ブロッキングフィルタ処理前の復号画像データを用いて、イントラ予測モード毎に予測画像データを生成する。
 ステップST42でイントラ予測部31は、各予測モードでのコスト関数値を算出する。コスト関数値としては、H.264/AVC方式における参照ソフトウェアであるJM(Joint Model)で定められているように、High Complexityモードか、Low Complexityモードのいずれかの手法に基づいて行う。
 すなわち、High Complexityモードにおいては、ステップST42の処理として、候補となる全ての予測モードに対して、仮に可逆符号化処理までを行い、次の式(15)で表されるコスト関数値を各予測モードに対して算出する。
  Cost(Mode∈Ω)=D+λ・R      ・・・(15)
 Ωは、当該ブロック乃至マクロブロックを符号化するための候補となる予測モードの全体集合を示している。Dは、予測モードで符号化を行った場合の復号画像と入力画像との差分エネルギー(歪み)を示している。Rは、直交変換係数や予測モード情報等を含んだ発生符号量、λは、量子化パラメータQPの関数として与えられるラグランジュ乗数である。
 つまり、High Complexityモードでの符号化を行うには、上記パラメータDおよびRを算出するため、候補となる全ての予測モードにより、一度、仮エンコード処理を行う必要があり、より高い演算量を要する。
 一方、Low Complexityモードにおいては、ステップST42の処理として、候補となる全ての予測モードに対して、予測画像の生成、および、動きベクトル情報や予測モード情報などのヘッダビットまでを算出し、次の式(16)で表されるコスト関数値を各予測モードに対して算出する。
  Cost(Mode∈Ω)=D+QP2Quant(QP)・Header_Bit   ・・・(16)
 Ωは、当該ブロック乃至マクロブロックを符号化するための候補となる予測モードの全体集合を示している。Dは、予測モードで符号化を行った場合の復号画像と入力画像との差分エネルギー(歪み)を示している。Header_Bitは、予測モードに対するヘッダビット、QP2Quantは、量子化パラメータQPの関数として与えられる関数である。
 すなわち、Low Complexityモードにおいては、それぞれの予測モードに関して、予測処理を行う必要があるが、復号化画像までは必要ないため、High Complexityモードより低い演算量での実現が可能である。
 ステップST43でイントラ予測部31は、最適イントラ予測モードを決定する。イントラ予測部31は、ステップST42において算出されたコスト関数値に基づいて、それらの中から、コスト関数値が最小値である1つのイントラ予測モードを選択して最適イントラ予測モードに決定する。
 次に、図14のフローチャートを参照して、図11のステップST32のインター予測処理について説明する。ステップST51で動きベクトル本数制限設定部35は、動きベクトル本数の上限値設定を行う。
 図15は、動きベクトル本数の上限値設定を示すフローチャートである。ステップST61で動きベクトル本数制限設定部35は、マクロブロックの大きさを判別する。動きベクトル本数制限設定部35は、動き探索部321からインター予測を行う場合のマクロブロックの大きさを示すサイズ識別情報を取得して、マクロブロックの大きさを判別してステップST62に進む。
 ステップST62で動きベクトル本数制限設定部35は、動きベクトル本数の上限値を算出する。動きベクトル本数制限設定部35は、マクロブロックの大きさに応じて、本数の上限値を算出する。ここで、マクロブロックが16×16画素のマクロブロックよりも拡張されたサイズである場合、動きベクトル本数制限設定部35は、上限値を16×16画素のマクロブロックにおける上限値よりも大きくして、 動きベクトル本数が必要以上に制限することなくリアルタイム動作をメモリバンド幅の観点から保証する。例えば、動きベクトル本数制限設定部35は、マクロブロックの大きさが16×16画素であるときの動きベクトル本数の上限値がp本であり、マクロブロックの大きさが(16×m)×(16×n)画素である場合、上限値を(m×n×p)本として、図14のステップST52に戻る。
 ステップST52で動き予測・補償部32は、動き予測処理を行う。動き予測・補償部32は、予測モード毎に動き予測を行って動きベクトルを検出してステップST53に進む。
 ステップST53で動き予測・補償部32は、動きベクトル符号化処理を行う。動き予測・補償部32は、各予測モードで検出された動きベクトルと符号化済みのブロックの動きベクトルから生成した予測動きベクトルとの差分である差分動きベクトルを示す動きベクトル情報を生成する。動き予測・補償部32は、生成された動きベクトル情報を可逆符号化してステップST54に進む。
 ステップST54で動き予測・補償部32は、各予測モードについて動きベクトルと参照画像を決定する。動き予測・補償部32は、各動き補償ブロックサイズについてモード毎に動きベクトルと、該動きベクトルの検出に用いた参照画像を決定してステップST55に進む。また、動き予測・補償部32は、連続する2つのマクロブロックの動きベクトルの合計本数が上限値を超える予測モードを、最適インター予測モードの候補から除外する。
 ステップST55で動き予測・補償部32は、各予測モードでのコスト関数値を算出する。動き予測・補償部32は、上述した式(15)または式(16)を用いてコスト関数値の算出を行う。なお、インター予測モードに対するコスト関数値の算出には、H.264/AVC方式において定められているスキップドマクロブロックやダイレクトモードのコスト関数値の評価も含まれる。
 ステップST56で動き予測・補償部32は、最適インター予測モードを決定する。動き予測・補償部32は、ステップST55において算出されたコスト関数値に基づいて、それらの中から、コスト関数値が最小値である1つの予測モードを選択して最適インター予測モードに決定する。
 このように、図1に示す画像処理装置や図11に示す画像処理方法によれば、動きベクトル本数の上限値がマクロブロックの大きさに応じて設定される。したがって、上限値を超えないように動きベクトル本数を制限しても、動きベクトル本数を必要以上に制限することなくリアルタイム動作をメモリバンド幅の観点から保証することができる。また、動きベクトル本数が必要以上に制限されて画質が劣化してしまうことを防止できる。すなわち、拡張されたマクロブロックに対応した画像処理を行うことができる。
 <3.画像符号化装置の他の構成>
 次に、画像符号化装置の他の構成として、動きベクトル本数が上限値を超えないための制御回数をフレーム毎に監視することで、符号化処理をより効率よく行えるようにする場合について説明する。
 図16は画像符号化装置の他の構成を示している。画像符号化装置10aは、画像符号化装置10と同様に、アナログ/ディジタル変換部(A/D変換部)11、画面並び替えバッファ12、減算部13、直交変換部14、量子化部15、可逆符号化部16、蓄積バッファ17、レート制御部18を備えている。また、画像符号化装置10aは、画像符号化装置10と同様に、逆量子化部21、逆直交変換部22、加算部23、デブロッキングフィルタ24、フレームメモリ25、イントラ予測部31、動き予測・補償部32a、予測画像・最適モード選択部33、動きベクトル本数制限設定部35を備えている。さらに、画像符号化装置10aは、シーンチェンジ検出部29を備えている。なお、以下の説明では、画像符号化装置10と相違する部分についてのみ説明を行う。
 シーンチェンジ検出部29は、画像並べ替えバッファ12から出力された入力画像データを用いてシーンの切り替えを検出して、シーンチェンジ検出結果を動き予測・補償部32aに出力する。
 図17は、動き予測・補償部の他の構成と動きベクトル本数制限設定部を示している。
 動き予測・補償部32aは動き探索部321a、モード判定部322a、動き補償処理部323、動きベクトルバッファ324を備えている。
 動き探索部321aには、画面並べ替えバッファ12から供給された並べ替え後の画像データと、フレームメモリ25から読み出した参照画像データが供給される。また、動き探索部321aには、シーンチェンジ検出部29からシーンチェンジ検出結果とモード判定部322aから動きベクトル本数が上限値を超えないための制御回数が供給される。
 動き探索部321aは、候補となる全てのインター予測モードで動き探索処理を行い、動き探索処理によって検出した動きベクトルを示す動きベクトル情報をモード判定部322aに出力する。また、動き探索部321aは、検出した動きベクトルに基づき参照画像データの動き補償を行い予測画像データを生成してモード判定部322aに出力する。さらに、動き探索部321aは、上限値が設定されるブロックのブロックサイズを識別するためのサイズ識別情報を動きベクトル本数制限設定部35に出力する。また、動き探索部321aは、動きベクトル本数が上限値を超えないための制御回数が所定回数よりも大きくなった場合、次のフレームでマクロブロックを大きくする。また、動き探索部321aは、シーンチェンジ検出結果によってシーンチェンジが検出されたことが示された場合、マクロブロックの大きさを所定サイズに戻す処理を行う。
 モード判定部322aには、動き探索部321aから、候補となる全てのインター予測モードに関する動きベクトル情報および予測画像データが供給される。また、モード判定部322aには、動きベクトルバッファ324から符号化済みの隣接ブロックで生成された動きベクトル情報が供給される。さらに、モード判定部322aには、コスト関数を算出するため、画面並べ替えバッファ12から供給された並べ替え後の画像データが供給される。
 モード判定部322aは、最適インター予測モードの候補モード毎に、画面並べ替えバッファ12から供給された画像データと動き探索部321aから供給された予測画像データを用いてコスト関数値を算出する。モード判定部322aは、コスト関数値が最小となるモードを符号化対象のマクロブロックに対する最適インター予測モードとして選択する。
 また、モード判定部322aは、動きベクトルバッファ324から供給された隣接するマクロブロックの動きベクトル情報を用いて、連続する2つのマクロブロックの動きベクトルの合計本数を算出する。モード判定部322aは、コスト関数値が最小となるモードにおける動きベクトルの合計本数が上限値を超える場合、合計値が上限値を超えることなくコスト関数値が最小となるモードを最適インター予測モードとする制御、例えば連続する2つのマクロブロックの動きベクトルの合計本数が上限値を超える予測モードを、最適インター予測モードの候補から除外する制御を行い、フレーム毎の制御回数(マクロブロック数)をフレーム毎に動き探索部321aに出力する。
 さらに、モード判定部322aは、最適と判定されたモードに関する予測モード情報および動きベクトル情報やコスト関数値を動き補償処理部323に出力する。また、モード判定部322aは、動きベクトルバッファ324から供給された動きベクトル情報に基づき予測動きベクトルを算出する。モード判定部322aは、算出した予測動きベクトルと動き探索部321aで検出された動きベクトルとの差分である差分動きベクトルを算出して、この差分動きベクトルを示す差分動きベクトル情報を動きベクトル情報に含めて動き補償処理部323に出力する。
 このように、動きベクトル本数が上限値を超えないための制御回数をフレーム毎に監視して、制御回数が所定回数よりも大きくなった場合、次のフレームでマクロブロックを大きくすると、上限値が大きくなり動きベクトル本数の制限が緩やかになる。したがって、動きベクトル本数が上限値を超えないための制御回数を少なくすることが可能となり、効率のよい符号化処理を行うことができる。また、シーンチェンジが検出されたときはマクロブロックが予め設定されたサイズに戻されるので、シーンチェンジが行われて画像の連続性が無くなったとき、予め設定されたマクロブロックの大きさで符号化処理を行うことができる。
 <4.画像符号化装置の他の動作>
 次に、画像符号化装置の他の動作として、画像符号化装置は、上限値を超える動きベクトル本数を許容する動作モードを有している場合を説明する。なお、この場合の画像符号化装置の構成は、図1,図10と同様である。
 動きベクトル本数の制限は、上述のようにリアルタイム動作をメモリバンド幅の観点から保証するために設けられている。したがって、リアルタイム動作を保証する必要のない動作モードを設けて、上限値を超えた動きベクトル本数を許容できるようにしてもよい。この場合、動きベクトル本数は上限値に制限されないことから、より最適な予測画像を生成することが可能となる。
 また、このような動作モードを用いる場合、画像圧縮情報におけるシーケンスパラメータセット等において、リアルタイム復号化処理を保証しないことを示す情報、すなわち動きベクトルの数が上限値を超えていることを示す判別情報(例えばフラグ)を設ける。このようなフラグを設けることで、画像圧縮情報の復号化を行う画像復号化装置は、フラグの検出を行うことで動きベクトル本数が上限値を超えていることを容易に判別できる。したがって、リアルタイム動作の復号化処理が保証されないことをユーザ等に対して容易に通知することが可能となる。
 <5.画像復号化装置の構成>
 入力画像を符号化して生成された画像圧縮情報は、所定の伝送路や記録媒体等を介して画像復号化装置に供給されて復号される。
 図18は、画像圧縮情報の復号化を行う画像処理装置である画像復号化装置の構成を示している。画像復号化装置50は、蓄積バッファ51、可逆復号化部52、逆量子化部53、逆直交変換部54、加算部55、デブロッキングフィルタ56、画面並べ替えバッファ57、ディジタル/アナログ変換部(D/A変換部)58を備えている。さらに、画像復号化装置50は、フレームメモリ61、イントラ予測部62、動き補償部63、セレクタ64、動きベクトル本数制限設定部65を備えている。
 蓄積バッファ51は、伝送されてきた画像圧縮情報を蓄積する。可逆復号化部52は、蓄積バッファ51より供給された画像圧縮情報を、図1の可逆符号化部16の符号化方式に対応する方式で復号化する。
 可逆復号化部52は、画像圧縮情報を復号して得られた予測モード情報をイントラ予測部62や動き補償部63に出力する。
 逆量子化部53は、可逆復号化部52で復号された量子化データを、図1の量子化部15の量子化方式に対応する方式で逆量子化する。逆直交変換部54は、図1の直交変換部14の直交変換方式に対応する方式で逆量子化部53の出力を逆直交変換して加算部55に出力する。
 加算部55は、逆直交変換後のデータとセレクタ64から供給される予測画像データを加算して復号画像データを生成してデブロッキングフィルタ56とイントラ予測部62に出力する。
 デブロッキングフィルタ56は、加算部55から供給された復号画像データに対してデブロッキングフィルタ処理を行い、ブロック歪みを除去してからフレームメモリ61に供給し蓄積させるとともに、画面並べ替えバッファ57に出力する。
 画面並べ替えバッファ57は、画像の並べ替えを行う。すなわち、図1の画面並べ替えバッファ12により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられて、D/A変換部58に出力される。
 D/A変換部58は、画面並べ替えバッファ57から供給された画像データをD/A変換し、図示せぬディスプレイに出力することで画像を表示させる。
 フレームメモリ61は、デブロッキングフィルタ24から供給されたフィルタ処理後の復号画像データを記憶する。
 イントラ予測部62は、可逆復号化部52から供給された予測モード情報に基づき、加算部55から供給された復号画像データから予測画像の生成を行い、生成した予測画像データをセレクタ64に出力する。
 動き補償部63は、可逆復号化部52から供給された予測モード情報や動きベクトルに基づき、フレームメモリ61から参照画像の画像データを読み出して動き補償を行い、予測画像データを生成してセレクタ64に出力する。また、動き補償部63は、予測モード情報で示されているマクロブロックの大きさを動きベクトル本数制限設定部65に出力する。さらに、動き補償部63は、連続する2つのマクロブロックの動くベクトルの合計本数が、動きベクトル本数制限設定部65から通知された上限値を超えているか判別して、判別結果を例えばシステムコントローラ等に出力する。
 セレクタ64は、イントラ予測部62で生成された予測画像データを加算部55に出力する。また、セレクタ64は、動き補償部63で生成された予測画像データを加算部55に出力する。
 動きベクトル本数制限設定部65は、動き補償部63から通知されたマクロブロックの大きさに応じて動きベクトル本数の上限値を設定して、設定した上限値を動き補償部63に通知する。ここで、マクロブロックが16×16画素のマクロブロックよりも拡張されたサイズである場合、動きベクトル本数制限設定部65は、上限値を16×16画素のマクロブロックにおける上限値よりも大きくして、 動きベクトル本数が必要以上に制限することなくリアルタイム動作がメモリバンド幅の観点から保証可能であるか判別できるようにする。例えば、動きベクトル本数制限設定部65は、マクロブロックの大きさが16×16画素であるときの動きベクトル本数の上限値がp本であり、マクロブロックの大きさが(16×m)×(16×n)画素である場合、上限値を(m×n×p)本として、マクロブロックの大きさに対する上限値を所定の割合とすることで、動きベクトル本数が必要以上に制限することなくリアルタイム動作がメモリバンド幅の観点から保証可能であるか判別できるようにする。
 図19は、動き補償部の構成と動きベクトル本数制限設定部を示している。
 動き補償部63は、マクロブロックサイズバッファ631、動きベクトル生成部632、モードバッファ633、動き補償処理部634を備えている。
 マクロブロックサイズバッファ631は、可逆復号化部52から供給されたサイズ識別情報を記憶する。また、マクロブロックサイズバッファ631は、記憶しているサイズ識別情報を動きベクトル本数制限設定部65に出力する。
 動きベクトル本数制限設定部65は、マクロブロックの大きさに応じて動きベクトル本数の上限値を決定して、この上限値を動きベクトル生成部632に通知する。
 動きベクトル生成部632は、動きベクトル情報を再構築するため、時空間で隣接するブロックに関する動きベクトル情報を格納するバッファを備えている。動きベクトル生成部632は、隣接ブロックの動きベクトル情報と可逆復号化部から供給された予測モード情報で示された差分動きベクトル情報を用いて、当該ブロックに関する動きベクトル情報を再構築する。また、動きベクトル生成部632は、再構築された動きベクトル本数が動きベクトル本数制限設定部65で決定された上限値を超えているか否かの判定を行い、判定結果をシステムコントローラ等(図示せず)に出力する。
 モードバッファ633は、可逆復号化部52から供給された予測モードを示す予測モード情報を記憶する。また、モードバッファ633は、記憶している予測モード情報を動き補償処理部634に出力する。
 動き補償処理部634は、予測モード情報に基づいてフレームメモリ61から参照画像の画像データを読み出して、動きベクトル生成部632で生成された動きベクトル情報に基づき動き補償を行い、予測画像データを生成する。動き補償処理部634は、生成した予測画像データをセレクタ64に出力する。
 <6.画像復号化装置の動作>
 次に、図20のフローチャートを参照して、画像復号化装置50で行われる画像復号処理動作について説明する。
 ステップST81で蓄積バッファ51は、伝送されてきた画像圧縮情報を蓄積する。ステップST82で可逆復号化部52は、可逆復号化処理を行う。可逆復号化部52は、蓄積バッファ51から供給される画像圧縮情報を復号化する。すなわち、図1の可逆符号化部16により符号化された各ピクチャの量子化データが得られる。また、可逆復号化部52、画像圧縮情報に含まれている予測モード情報の可逆復号化を行い、得られた予測モード情報がイントラ予測モードに関する情報である場合、予測モード情報をイントラ予測部62に出力する。また、可逆復号化部52は、予測モード情報がインター予測モードに関する情報である場合、予測モード情報を動き補償部63に出力する。
 ステップST83において逆量子化部53は、逆量子化処理を行う。逆量子化部53は、可逆復号化部52により復号された量子化データを、図1の量子化部15の特性に対応する特性で逆量子化する。
 ステップST84において逆直交変換部54は、逆直交変換処理を行う。逆直交変換部54は、逆量子化部53により逆量子化された変換係数データを、図1の直交変換部14の特性に対応する特性で逆直交変換する。
 ステップST85において加算部55は、復号画像データの生成を行う。加算部55は、逆直交変換処理を行うことにより得られたデータと、後述するステップST89で選択された予測画像データを加算して復号画像データを生成する。これにより元の画像が復号される。
 ステップST86においてデブロッキングフィルタ56は、フィルタ処理を行う。デブロッキングフィルタ56は、加算部55より出力された復号画像データのデブロッキングフィルタ処理を行い、復号画像に含まれているブロック歪みを除去する。
 ステップST87においてフレームメモリ61は、復号画像データの記憶処理を行う。
 ステップST88においてイントラ予測部62と動き補償部63は、予測画像生成処理を行う。イントラ予測部62と動き補償部63は、可逆復号化部52から供給される予測モード情報に対応してそれぞれ予測画像生成処理を行う。
 すなわち、可逆復号化部52からイントラ予測の予測モード情報が供給された場合、イントラ予測部62は、予測モード情報に基づいて予測画像データを生成する。また、可逆復号化部52からインター予測の予測モード情報が供給された場合、動き補償部63は、予測モード情報に基づき動き補償を行い予測画像データを生成する。
 ステップST89において、セレクタ64は予測画像データの選択を行う。セレクタ64は、イントラ予測部62から供給された予測画像と動き補償部63で生成された予測画像データを選択して加算部55に供給して、上述したように、ステップST85において逆直交変換部54の出力と加算させる。
 ステップST90において画面並べ替えバッファ57は、画像並べ替えを行う。すなわち画面並べ替えバッファ57は、図1の画像符号化装置10の画面並べ替えバッファ12により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。
 ステップST91において、D/A変換部58は、画面並べ替えバッファ57からの画像データをD/A変換する。この画像が図示せぬディスプレイに出力され、画像が表示される。
 次に、図21のフローチャートを参照して、図20のステップST88の予測画像生成処理について説明する。
 ステップST101で可逆復号化部52は、対象ブロックがイントラ符号化されているか否かを判定する。可逆復号化部52は、可逆復号化を行うことにより得られた予測モード情報がイントラ予測の予測モード情報である場合、予測モード情報をイントラ予測部62に供給してステップST102に進む。また、可逆復号化部52は、予測モード情報がインター予測の予測モード情報である場合、予測モード情報を動き補償部63に供給してステップST103に進む。
 ステップST102でイントラ予測部62は、イントラ予測画像生成処理を行う。イントラ予測部62は、加算部55から供給された復号画像データと予測モード情報を用いてイントラ予測を行い、予測画像データを生成する。
 ステップST103で動き補償部63は、インター予測画像生成処理を行う。動き補償部63は、可逆復号化部52からの予測モード情報や動きベクトルに基づいて、フレームメモリ61から読み出した参照画像の動き補償を行い、予測画像データを生成する。
 図22は、ステップST103のインター予測画像生成処理を示すフローチャートである。ステップST111で動きベクトル本数制限設定部65は、図15と同様な処理を行い、動きベクトル本数の上限値設定を行う。動きベクトル本数制限設定部65は、マクロブロックの大きさに応じて、動きベクトル本数の上限値を設定する。ここで、マクロブロックが16×16画素のマクロブロックよりも拡張されたサイズである場合、動きベクトル本数制限設定部65は、上限値を16×16画素のマクロブロックにおける上限値よりも大きくして、 動きベクトル本数が必要以上に制限することなくリアルタイム動作をメモリバンド幅の観点から保証可能であるか判別できるようにする。例えば、動きベクトル本数制限設定部65は、マクロブロックの大きさが16×16画素であるときの動きベクトル本数の上限値がp本であり、マクロブロックの大きさが(16×m)×(16×n)画素である場合、上限値を(m×n×p)本としてステップST112に進む。
 ステップST112で動き補償部63は、予測モード情報を取得する。動き補償部63は、予測画像データを生成するために、予測モード情報を可逆復号化部52から取得してステップST113に進む。
 ステップST113で動き補償部63は、動きベクトル情報を再構築する。動き補償部63は、例えば復号化済みの隣接ブロックの動きベクトルから予測動きベクトル情報を生成して、この予測動きベクトル情報と予測モード情報で示された差分動きベクトル情報から動きベクトル情報を再構築してステップST114に進む。
 ステップST114で動き補償部63は、動きベクトル本数の監視を行う。動き補償部63は、隣接する2つのマクロブロックの動きベクトルの合計本数が、ステップST111で決定された上限値を超えているか監視する。動き補償部63は、動きベクトル本数が上限値を超えた場合例えばシステムコントローラ等にその旨を通知してステップST115に進む。
 ステップST115で動き補償部63は、予測画像データの生成を行う。動き補償部63はステップST112で取得した予測モード情報や、ステップST113で再構築した動きベクトル情報に基づき、フレームメモリ61から参照画像データを読み出して動き補償を行い、予測画像データを生成してセレクタ64に出力する。
 このように、図18に示す画像処理装置や図20に示す画像処理方法によれば、動きベクトル本数の上限値がマクロブロックの大きさに応じて設定されて、動きベクトル本数が設定された上限値を超えるか否かの監視結果が出力される。したがって、監視結果に基づき、リアルタイム動作が保証されるか容易に判別することが可能となり、動きベクトル本数が上限値を超えてリアルタイム動作が保証されない場合、その旨を表示や音声等でユーザに通知することができる。
 また、画像圧縮情報に動きベクトル本数が上限値を超えていることを示す判別情報が含まれる場合、この判別情報に基づき動きベクトル本数が上限値を超えているかを示す判別結果を出力することで、リアルタイム動作が保証されない場合には表示や音声等でユーザにその旨を通知することが可能となる。
 なお、マクロブロックのサイズは、上述の実施の形態に限定されず、他のサイズであってもよい。現在、H.264/AVC方式より更なる符号化効率の向上を目的として、ITU-TとISO/IECとの共同の標準化団体であるJCTVC(Joint Collaboration Team - Video Coding)により、HEVC(High Efficiency Video Coding)と呼ばれる画像符号化方式の標準化が進められている。
 HEVCにおいて、符号化単位(CU:Coding Unit)のサイズはシーケンスごとに動的に指定され得る。HEVCの符号化単位は符号化ツリーブロック(Coding Tree Block)とも呼ばれ、最大のサイズを有する符号化単位を最大符号化単位(LCU:Largest Coding Unit)、最小のサイズを有する符号化単位を最小符号化単位(SCU:Smallest Coding Unit)という。画像圧縮情報の一部であるシーケンスパラメータセットにおいてこれらLCU及びSCUのサイズを指定することで、使用可能な符号化単位のサイズの範囲が定義される。さらに、split_flagの値を指定することで、個々のシーケンスにおいて使用される符号化単位のサイズが特定される。
 なお、符号化単位の形状は通常は正方形であり、一辺のサイズが2のべき乗で表現される。さらに、符号化単位は、イントラ予測又はインター予測の処理単位である予測単位(PU:Prediction Unit)に分割され得る。また、符号化単位は、直交変換の処理単位である変換単位(TU:Transform Unit)にも分割され得る。HEVCでは、4×4画素及び8×8画素に加えて、16×16画素及び32×32画素のサイズを有する変換単位を使用することができる。このため、本明細書ではブロックとして、マクロブロックだけでなく、符号化単位、最大符号化単位などユニットの概念を含む。 
 さらに、上述した動きベクトル本数の上限値は、例えば全てのCUに設定する必要はなく、基準となる上限値と異なる値を設定したいブロックのみ設定することも可能である。この場合、基準となる上限値と異なる値を設定したいブロックのみ設定するための識別情報を符号化ストリームに含める。図23は、識別情報をスライスヘッダ(SliceHeader)に含める場合のシンタックスを例示している。なお、図23において、各行の左端の数字は説明のために付した行番号である。
 第22行目のシンタックス「MinUnitForNumMV」は、上限値を設定する最小のCUサイズを指定(識別)するための情報である。例えば、CUの最小サイズが8×8画素であったとしても、「MinUnitForNumMV =16」と指定されている場合、16×16画素以上のサイズのCUのみ上限値を設定し、8×8画素のCUには上限値を設定しないようにする。
 また、別のアプローチとして、フラグとして設定することも可能である。例えば「MinUnitForNumMV」をフラグとして0と設定した場合は128×128画素サイズのレベルでは上限値を設定し、64×64画素サイズ以下のレベルでは上限値を設定しない。「MinUnitForNumMV」をフラグとして1と設定した場合は64×64画素サイズのレベルでは上限値を設定し、32×32画素サイズ以下のレベルでは上限値を設定しない。「MinUnitForNumMV」をフラグとして2と設定した場合は32×32画素サイズのレベルでは上限値を設定し、16×16画素サイズ以下のレベルでは上限値を設定しない。
 このようにすれば、例えば、16×16画素サイズ以上おいて上限値設定の制御しか望んでいなければ、8×8画素サイズのCUでは上限値を設けずに動き予測・補償を行う。このようなシンタックス「MinUnitForNumMV」を設定することにより、この場合には8×8画素サイズのCUの制御を省略することができ、上限値の設定と動き予測・補償のコントロールを柔軟に設定することができる。
 なお、図23は、シンタックス「MinUnitForNumMV」をスライスヘッダに設けた場合を例示したが、このシンタックスは、スライスヘッダ以外に格納するようにしてもよい。例えば、ピクチャパラメータセット(PictureParameterSet)に格納するようにしてもよい。このように、スライスヘッダまたはピクチャパラメータセットに格納すれば、例えばシーンチェンジ後にこの値を変更するといった操作に対応することができる。また、「MinUnitForNumMV」を、スライスヘッダに格納すれば、ピクチャをマルチスライス化してスライス毎に並列処理する場合に対応できる。
 <7.ソフトウェア処理の場合>
 また、明細書中において説明した一連の処理はハードウェア、またはソフトウェア、または両者の複合構成によって実行することが可能である。ソフトウェアによる処理を実行する場合は、処理シーケンスを記録したプログラムを、専用のハードウェアに組み込まれたコンピュータ内のメモリにインストールして実行させる。または、各種処理が実行可能な汎用コンピュータにプログラムをインストールして実行させることも可能である。
 例えば、プログラムは記録媒体としてのハードディスクやROM(Read Only Memory)に予め記録しておくことができる。または、プログラムはフレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体に、一時的または永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウェアとして提供することができる。
 なお、プログラムは、上述したようなリムーバブル記録媒体からコンピュータにインストールする他、ダウンロードサイトから、コンピュータに無線転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送し、コンピュータでは、そのようにして転送されてくるプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることができる。
 プログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
 <8.電子機器に適用した場合>
 また、以上においては、符号化方式/復号方式としてH.264/AVC方式が用いられたが、本技術は、その他の動き予測・補償処理を行う符号化方式/復号方式を用いる画像符号化装置/画像復号装置に適用することもできる。
 さらに、本技術は、例えば、MPEG,H.26x等のように、離散コサイン変換等の直交変換と動き補償によって圧縮された画像情報(ビットストリーム)を、衛星放送、ケーブルTV(テレビジョン)、インターネット、および携帯電話機などのネットワークメディアを介して受信する際に、あるいは、光、磁気ディスク、およびフラッシュメモリのような記憶メディア上で処理する際に用いられる画像符号化装置および画像復号装置に適用することができる。
 上述した画像符号化装置10や画像復号化装置50は、任意の電子機器に適用することができる。以下にその例について説明する。
 図24は、本技術を適用したテレビジョン装置の概略構成を例示している。テレビジョン装置90は、アンテナ901、チューナ902、デマルチプレクサ903、デコーダ904、映像信号処理部905、表示部906、音声信号処理部907、スピーカ908、外部インタフェース部909を有している。さらに、テレビジョン装置90は、制御部910、ユーザインタフェース部911等を有している。
 チューナ902は、アンテナ901で受信された放送波信号から所望のチャンネルを選局して復調を行い、得られたストリームをデマルチプレクサ903に出力する。
 デマルチプレクサ903は、ストリームから視聴対象である番組の映像や音声のパケットを抽出して、抽出したパケットのデータをデコーダ904に出力する。また、デマルチプレクサ903は、EPG(Electronic Program Guide)等のデータのパケットを制御部910に出力する。なお、スクランブルが行われている場合、デマルチプレクサ等でスクランブルの解除を行う。
 デコーダ904は、パケットの復号化処理を行い、復号処理化によって生成された映像データを映像信号処理部905、音声データを音声信号処理部907に出力する。
 映像信号処理部905は、映像データに対して、ノイズ除去やユーザ設定に応じた映像処理等を行う。映像信号処理部905は、表示部906に表示させる番組の映像データや、ネットワークを介して供給されるアプリケーションに基づく処理による画像データなどを生成する。また、映像信号処理部905は、項目の選択などのメニュー画面等を表示するための映像データを生成し、それを番組の映像データに重畳する。映像信号処理部905は、このようにして生成した映像データに基づいて駆動信号を生成して表示部906を駆動する。
 表示部906は、映像信号処理部905からの駆動信号に基づき表示デバイス(例えば液晶表示素子等)を駆動して、番組の映像などを表示させる。
 音声信号処理部907は、音声データに対してノイズ除去などの所定の処理を施し、処理後の音声データのD/A変換処理や増幅処理を行い、スピーカ908に供給することで音声出力を行う。
 外部インタフェース部909は、外部機器やネットワークと接続するためのインタフェースであり、映像データや音声データ等のデータ送受信を行う。
 制御部910にはユーザインタフェース部911が接続されている。ユーザインタフェース部911は、操作スイッチやリモートコントロール信号受信部等で構成されており、ユーザ操作に応じた操作信号を制御部910に供給する。
 制御部910は、CPU(Central Processing Unit)やメモリ等を用いて構成されている。メモリは、CPUにより実行されるプログラムやCPUが処理を行う上で必要な各種のデータ、EPGデータ、ネットワークを介して取得されたデータ等を記憶する。メモリに記憶されているプログラムは、テレビジョン装置90の起動時などの所定タイミングでCPUにより読み出されて実行される。CPUは、プログラムを実行することで、テレビジョン装置90がユーザ操作に応じた動作となるように各部を制御する。
 なお、テレビジョン装置90では、チューナ902、デマルチプレクサ903、映像信号処理部905、音声信号処理部907、外部インタフェース部909等と制御部910を接続するためバス912が設けられている。
 このように構成されたテレビジョン装置では、デコーダ904に本願の画像復号化装置(画像復号化方法)の機能が設けられる。このため、拡張されたマクロブロックが用いられても、拡張されたマクロブロックに対応した画像符号化処理を行うことができる。例えば、拡張されたマクロブロックが用いられている画像圧縮情報の再生時に動きベクトル本数が上限値を超えてリアルタイム動作が保証されない場合、その旨をユーザに通知することができる。
 図25は、本技術を適用した携帯電話機の概略構成を例示している。携帯電話機92は、通信部922、音声コーデック923、カメラ部926、画像処理部927、多重分離部928、記録再生部929、表示部930、制御部931を有している。これらは、バス933を介して互いに接続されている。
 また、通信部922にはアンテナ921が接続されており、音声コーデック923には、スピーカ924とマイクロホン925が接続されている。さらに制御部931には、操作部932が接続されている。
 携帯電話機92は、音声通話モードやデータ通信モード等の各種モードで、音声信号の送受信、電子メールや画像データの送受信、画像撮影、またはデータ記録等の各種動作を行う。
 音声通話モードにおいて、マイクロホン925で生成された音声信号は、音声コーデック923で音声データへの変換やデータ圧縮が行われて通信部922に供給される。通信部922は、音声データの変調処理や周波数変換処理等を行い、送信信号を生成する。また、通信部922は、送信信号をアンテナ921に供給して図示しない基地局へ送信する。また、通信部922は、アンテナ921で受信した受信信号の増幅や周波数変換処理および復調処理等を行い、得られた音声データを音声コーデック923に供給する。音声コーデック923は、音声データのデータ伸張やアナログ音声信号への変換を行い、スピーカ924に出力する。
 また、データ通信モードにおいて、メール送信を行う場合、制御部931は、操作部932の操作によって入力された文字データを受け付けて、入力された文字を表示部930に表示する。また、制御部931は、操作部932におけるユーザ指示等に基づいてメールデータを生成して通信部922に供給する。通信部922は、メールデータの変調処理や周波数変換処理等を行い、得られた送信信号をアンテナ921から送信する。また、通信部922は、アンテナ921で受信した受信信号の増幅や周波数変換処理および復調処理等を行い、メールデータを復元する。このメールデータを、表示部930に供給して、メール内容の表示を行う。
 なお、携帯電話機92は、受信したメールデータを、記録再生部929で記憶媒体に記憶させることも可能である。記憶媒体は、書き換え可能な任意の記憶媒体である。例えば、記憶媒体は、RAMや内蔵型フラッシュメモリ等の半導体メモリ、ハードディスク、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、またはメモリカード等のリムーバブルメディアである。
 データ通信モードにおいて画像データを送信する場合、カメラ部926で生成された画像データを、画像処理部927に供給する。画像処理部927は、画像データの符号化処理を行い、符号化データを生成する。
 多重分離部928は、画像処理部927で生成された符号化データと、音声コーデック923から供給された音声データを所定の方式で多重化して、通信部922に供給する。通信部922は、多重化データの変調処理や周波数変換処理等を行い、得られた送信信号をアンテナ921から送信する。また、通信部922は、アンテナ921で受信した受信信号の増幅や周波数変換処理および復調処理等を行い、多重化データを復元する。この多重化データを多重分離部928に供給する。多重分離部928は、多重化データの分離を行い、符号化データを画像処理部927、音声データを音声コーデック923に供給する。
 画像処理部927は、符号化データの復号化処理を行い、画像データを生成する。この画像データを表示部930に供給して、受信した画像の表示を行う。音声コーデック923は、音声データをアナログ音声信号に変換してスピーカ924に供給して、受信した音声を出力する。
 このように構成された携帯電話装置では、画像処理部927に本願の画像符号化装置(画像符号化方法)や画像復号化装置(画像復号化方法)の機能が設けられる。したがって、拡張されたマクロブロックが用いられても、拡張されたマクロブロックに対応した画像符号化処理や画像復号化処理を行うことができる。
 図26は、本技術を適用した記録再生装置の概略構成を例示している。記録再生装置94は、例えば受信した放送番組のオーディオデータとビデオデータを、記録媒体に記録して、その記録されたデータをユーザの指示に応じたタイミングでユーザに提供する。また、記録再生装置94は、例えば他の装置からオーディオデータやビデオデータを取得し、それらを記録媒体に記録させることもできる。さらに、記録再生装置94は、記録媒体に記録されているオーディオデータやビデオデータを復号して出力することで、モニタ装置等において画像表示や音声出力を行うことができるようにする。
 記録再生装置94は、チューナ941、外部インタフェース部942、エンコーダ943、HDD(Hard Disk Drive)部944、ディスクドライブ945、セレクタ946、デコーダ947、OSD(On-Screen Display)部948、制御部949、ユーザインタフェース部950を有している。
 チューナ941は、図示しないアンテナで受信された放送信号から所望のチャンネルを選局する。チューナ941は、所望のチャンネルの受信信号を復調して得られた画像圧縮情報をセレクタ946に出力する。
 外部インタフェース部942は、IEEE1394インタフェース、ネットワークインタフェース部、USBインタフェース、フラッシュメモリインタフェース等の少なくともいずれで構成されている。外部インタフェース部942は、外部機器やネットワーク、メモリカード等と接続するためのインタフェースであり、記録する映像データや音声データ等のデータ受信を行う。
 エンコーダ943は、外部インタフェース部942から供給された映像データや音声データが符号化されていないとき所定の方式で符号化を行い、画像圧縮情報をセレクタ946に出力する。
 HDD部944は、映像や音声等のコンテンツデータ、各種プログラムやその他のデータ等を内蔵のハードディスクに記録し、また再生時等にそれらを当該ハードディスクから読み出す。
 ディスクドライブ945は、装着されている光ディスクに対する信号の記録および再生を行う。光ディスク、例えばDVDディスク(DVD-Video、DVD-RAM、DVD-R、DVD-RW、DVD+R、DVD+RW等)やBlu-rayディスク等である。
 セレクタ946は、映像や音声の記録時には、チューナ941またはエンコーダ943からのいずれのストリームを選択して、HDD部944やディスクドライブ945のいずれに供給する。また、セレクタ946は、映像や音声の再生時に、HDD部944またはディスクドライブ945から出力されたストリームをデコーダ947に供給する。
 デコーダ947は、ストリームの復号化処理を行う。デコーダ947は、復号処理化を行うことにより生成された映像データをOSD部948に供給する。また、デコーダ947は、復号処理化を行うことにより生成された音声データを出力する。
 OSD部948は、項目の選択などのメニュー画面等を表示するための映像データを生成し、それをデコーダ947から出力された映像データに重畳して出力する。
 制御部949には、ユーザインタフェース部950が接続されている。ユーザインタフェース部950は、操作スイッチやリモートコントロール信号受信部等で構成されており、ユーザ操作に応じた操作信号を制御部949に供給する。
 制御部949は、CPUやメモリ等を用いて構成されている。メモリは、CPUにより実行されるプログラムやCPUが処理を行う上で必要な各種のデータを記憶する。メモリに記憶されているプログラムは、記録再生装置94の起動時などの所定タイミングでCPUにより読み出されて実行される。CPUは、プログラムを実行することで、記録再生装置94がユーザ操作に応じた動作となるように各部を制御する。
 このように構成された記録再生装置では、エンコーダ943に本願の画像符号化装置(画像符号化方法)の機能、デコーダ947に画像復号化装置(画像復号化方法)の機能が設けられて、拡張されたマクロブロックが用いられても、拡張されたマクロブロックに対応した画像符号化処理や画像復号化処理を行うことができる。
 図27は、本技術を適用した撮像装置の概略構成を例示している。撮像装置96は、被写体を撮像し、被写体の画像を表示部に表示させたり、それを画像データとして、記録媒体に記録する。
 撮像装置96は、光学ブロック961、撮像部962、カメラ信号処理部963、画像データ処理部964、表示部965、外部インタフェース部966、メモリ部967、メディアドライブ968、OSD部969、制御部970を有している。また、制御部970には、ユーザインタフェース部971が接続されている。さらに、画像データ処理部964や外部インタフェース部966、メモリ部967、メディアドライブ968、OSD部969、制御部970等は、バス972を介して接続されている。
 光学ブロック961は、フォーカスレンズや絞り機構等を用いて構成されている。光学ブロック961は、被写体の光学像を撮像部962の撮像面に結像させる。撮像部962は、CCDまたはCMOSイメージセンサを用いて構成されており、光電変換によって光学像に応じた電気信号を生成してカメラ信号処理部963に供給する。
 カメラ信号処理部963は、撮像部962から供給された電気信号に対してニー補正やガンマ補正、色補正等の種々のカメラ信号処理を行う。カメラ信号処理部963は、カメラ信号処理後の画像データを画像データ処理部964に供給する。
 画像データ処理部964は、カメラ信号処理部963から供給された画像データの符号化処理を行う。画像データ処理部964は、符号化処理を行うことにより生成された符号化データを外部インタフェース部966やメディアドライブ968に供給する。また、画像データ処理部964は、外部インタフェース部966やメディアドライブ968から供給された符号化データの復号化処理を行う。画像データ処理部964は、復号化処理を行うことにより生成された画像データを表示部965に供給する。また、画像データ処理部964は、カメラ信号処理部963から供給された画像データを表示部965に供給する処理や、OSD部969から取得した表示用データを、画像データに重畳させて表示部965に供給する。
 OSD部969は、記号、文字、または図形からなるメニュー画面やアイコンなどの表示用データを生成して画像データ処理部964に出力する。
 外部インタフェース部966は、例えば、USB入出力端子などで構成され、画像の印刷を行う場合に、プリンタと接続される。また、外部インタフェース部966には、必要に応じてドライブが接続され、磁気ディスク、光ディスク等のリムーバブルメディアが適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて、インストールされる。さらに、外部インタフェース部966は、LANやインターネット等の所定のネットワークに接続されるネットワークインタフェースを有する。制御部970は、例えば、ユーザインタフェース部971からの指示にしたがって、メモリ部967から符号化データを読み出し、それを外部インタフェース部966から、ネットワークを介して接続される他の装置に供給させることができる。また、制御部970は、ネットワークを介して他の装置から供給される符号化データや画像データを、外部インタフェース部966を介して取得し、それを画像データ処理部964に供給したりすることができる。
 メディアドライブ968で駆動される記録メディアとしては、例えば、磁気ディスク、光磁気ディスク、光ディスク、または半導体メモリ等の、読み書き可能な任意のリムーバブルメディアが用いられる。また、記録メディアは、リムーバブルメディアとしての種類も任意であり、テープデバイスであってもよいし、ディスクであってもよいし、メモリカードであってもよい。もちろん、非接触ICカード等であってもよい。
 また、メディアドライブ968と記録メディアを一体化し、例えば、内蔵型ハードディスクドライブやSSD(Solid State Drive)等のように、非可搬性の記憶媒体により構成されるようにしてもよい。
 制御部970は、CPUやメモリ等を用いて構成されている。メモリは、CPUにより実行されるプログラムやCPUが処理を行う上で必要な各種のデータ等を記憶する。メモリに記憶されているプログラムは、撮像装置96の起動時などの所定タイミングでCPUにより読み出されて実行される。CPUは、プログラムを実行することで、撮像装置96がユーザ操作に応じた動作となるように各部を制御する。
 このように構成された撮像装置では、画像データ処理部964に本願の画像符号化装置(画像符号化方法)や画像復号化装置(画像復号化方法)の機能が設けられる。したがって、撮像画像をメモリ部967や記録メディア等に記録する際に、拡張されたマクロブロックが用いられても、拡張されたマクロブロックに対応した画像符号化処理や画像復号化処理を行うことができる。
 さらに、本技術は、上述した実施の形態に限定して解釈されるべきではない。この実施の形態は、例示という形態で本技術を開示しており、本技術の要旨を逸脱しない範囲で当業者が実施の形態の修正や代用をなし得ることは自明である。すなわち、本技術の要旨を判断するためには、請求の範囲を参酌すべきである。
  また、本技術は以下のような構成も取ることができる。
 (1) 画像データを符号化処理する際の符号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する設定部と、
 前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する動き予測・補償部と、
 前記動き予測・補償部により生成された予測画像を用いて、前記画像データを符号化して符号化ストリームを生成する符号化部と
を備える画像処理装置。
 (2) 前記設定部は、前記ブロックのブロックサイズが所定サイズよりも大きいサイズである場合、前記上限値を前記所定サイズのブロックにおける上限値よりも大きく設定する(1)に記載の画像処理装置。
 (3) 前記設定部は、所定サイズ(N)のブロックに対する動きベクトル数の上限値がpであり、前記所定サイズよりも大きなブロックサイズが(N×m)×(N×n)画素である場合、前記上限値を(p×m×n)に設定する(2)に記載の画像処理装置。
 (4) 前記所定サイズは、16×16画素である(2)または(3)に記載の画像処理装置。
 (5) 前記所定サイズよりも大きいサイズのブロックは、階層構造を有する符号化単位において最大サイズを有する最大符号化単位である(2)乃至(4)の何れかに記載の画像処理装置。
 (6) 前記動き予測・補償部は、前記予測モードを検出する際、動きベクトルの数が前記上限値を超える予測モードを、検出対象となる予測モードの候補から除外する(2)乃至(5)の何れかに記載の画像処理装置。
 (7) 前記動き予測・補償部は、前記動きベクトルの数が前記上限値を超えないための制御回数をフレーム毎に監視して、該制御回数が予め設定された所定回数を超えた場合、次のフレームにおけるブロックのブロックサイズを大きく設定する(2)乃至(6)の何れかに記載の画像処理装置。
 (8) 前記画像データにおけるシーンチェンジを検出するシーンチェンジ検出部を有し、
 前記動き予測・補償部は、前記シーンチェンジ検出部でシーンチェンジが検出された場合、ブロックのブロックサイズを予め設定した所定のサイズに設定する(1)乃至(7)の何れかに記載の画像処理装置。
 (9) 前記符号化部は、前記動きベクトルの数にかかわらず最適予測モードを検出して、該検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する動作モードにおいて、予測モードにおける動きベクトルの数が前記上限値を超える場合は、前記符号化ストリームと、前記動きベクトルの数が上限値を超えていることを示す判別情報とを伝送する(1)乃至(8)の何れかに記載の画像処理装置。
 (10) 前記設定部により上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を生成する生成部を更に備え、
 前記符号化部は、前記符号化ストリームと前記サイズ識別情報とを伝送する(1)乃至(9)の何れかに記載の画像処理装置。
 (11) 画像データを符号化した符号化ストリームを復号化処理する際の復号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する設定部と、
 前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する動き補償部と、
 前記動き補償部により生成された予測画像を用いて、前記符号化ストリームを復号化する復号化部と
を備える画像処理装置。
 (12) 前記設定部は、前記ブロックのブロックサイズが所定サイズよりも大きいサイズである場合、前記上限値を前記所定サイズのブロックにおける上限値よりも大きく設定する(11)に記載の画像処理装置。
 (13) 前記設定部は、所定サイズ(N)のブロックに対する動きベクトル数の上限値がpであり、前記所定サイズよりも大きなブロックサイズが(N×m)×(N×n)画素である場合、前記上限値を(p×m×n)に設定する(12)に記載の画像処理装置。
 (14) 前記所定サイズは、16×16画素である(12)または(13)に記載の画像処理装置。
 (15) 前記所定サイズよりも大きいサイズのブロックは、階層構造を有する符号化単位において最大サイズを有する最大符号化単位である(12)乃至(14)の何れかに記載の画像処理装置。
 (16) 前記動き補償部は、前記予測モードを検出する際、動きベクトルの数が前記上限値を超える予測モードを、検出対象となる予測モードの候補から除外する(12)乃至(15)の何れかに記載の画像処理装置。
 (17) 前記動き補償部は、前記動きベクトルの数が前記上限値を超えないための制御回数をフレーム毎に監視して、該制御回数が予め設定された所定回数を超えた場合、次のフレームにおけるブロックのブロックサイズを大きく設定する(12)乃至(16)の何れかに記載の画像処理装置。
 (18) 前記画像データにおけるシーンチェンジを検出するシーンチェンジ検出部を有し、
 前記動き補償部は、前記シーンチェンジ検出部でシーンチェンジが検出された場合、ブロックのブロックサイズを予め設定した所定のサイズに設定する(11)乃至(17)の何れかに記載の画像処理装置。
 (19) 前記復号部は、前記動きベクトルの数にかかわらず最適予測モードを検出して、該検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する動作モードにおいて、前記符号化ストリームから前記動きベクトルの数が上限値を超えていることを示す判別情報を取得する(11)乃至(18)の何れかに記載の画像処理装置。
 (20) 前記復号化部は、上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を前記符号化ストリームから取得する(11)乃至(19)の何れかに記載の画像処理装置。
 この技術の画像処理装置と画像処理方法では、マクロブロックの大きさに応じて動きベクトルの数の上限値が設定される。また、動きベクトルの数が上限値を超えていない最適予測モードが検出されて、検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い、予測画像が生成される。このため、拡張された大きさのマクロブロックが用いられた場合に、動きベクトルの数が必要以上に制限されてしまうことがなく、拡張されたマクロブロックに対応した画像処理を行うことができる。
 したがって、ブロック単位で符号化を行うことにより得られた画像圧縮情報(ビットストリーム)を、衛星放送、ケーブルTV、インターネット、携帯電話などのネットワークメディアを介して送受信する際に、若しくは光、磁気ディスク、フラッシュメモリのような記憶メディア上で処理する際に用いられる画像符号化装置や画像復号化装置等に適している。
 10,10a・・・画像符号化装置、11・・・A/D変換部、12,57・・・画面並べ替えバッファ、13・・・減算部、14・・・直交変換部、15・・・量子化部、16・・・可逆量子化部、17・・・蓄積バッファ、18・・・レート制御部、21,53・・・逆量子化部、22,54・・・逆直交変換部、23,55・・・加算部、24,56・・・デブロッキングフィルタ、25・・・フレームメモリ、29・・・シーンチェンジ検出部、31・・・イントラ予測部、32,32a・・・動き予測・補償部、33・・・予測画像・最適モード選択部、3565・・・動きベクトル本数制限設定部、50・・・画像復号化装置、51・・・蓄積バッファ、52・・・可逆復号化部、58・・・D/A変換部、61・・・フレームメモリ、62・・・イントラ予測部、63・・・動き補償部、64・・・セレクタ、90・・・テレビジョン装置、92・・・携帯電話機、94・・・記録再生装置、96・・・撮像装置、321,321a・・・動き探索部、322,322a・・・モード判定部、323,634・・・動き補償処理部、324・・・動きベクトルバッファ、631・・・マイクブロックサイズバッファ、632・・・動きベクトル生成部、633・・・モードバッファ

Claims (22)

  1.  画像データを符号化処理する際の符号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する設定部と、
     前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する動き予測・補償部と、
     前記動き予測・補償部により生成された予測画像を用いて、前記画像データを符号化して符号化ストリームを生成する符号化部と
    を備える画像処理装置。
  2.  前記設定部は、前記ブロックのブロックサイズが所定サイズよりも大きいサイズである場合、前記上限値を前記所定サイズのブロックにおける上限値よりも大きく設定する
    請求項1記載の画像処理装置。
  3.  前記設定部は、所定サイズ(N)のブロックに対する動きベクトル数の上限値がpであり、前記所定サイズよりも大きなブロックサイズが(N×m)×(N×n)画素である場合、前記上限値を(p×m×n)に設定する
    請求項2記載の画像処理装置。
  4.  前記所定サイズは、16×16画素である
    請求項3に記載の画像処理装置。
  5.  前記所定サイズよりも大きいサイズのブロックは、階層構造を有する符号化単位において最大サイズを有する最大符号化単位である
    請求項2に記載の画像処理装置。
  6.  前記動き予測・補償部は、前記予測モードを検出する際、動きベクトルの数が前記上限値を超える予測モードを、検出対象となる予測モードの候補から除外する
    請求項2記載の画像処理装置。
  7.  前記動き予測・補償部は、前記動きベクトルの数が前記上限値を超えないための制御回数をフレーム毎に監視して、該制御回数が予め設定された所定回数を超えた場合、次のフレームにおけるブロックのブロックサイズを大きく設定する
    請求項2記載の画像処理装置。
  8.  前記画像データにおけるシーンチェンジを検出するシーンチェンジ検出部を有し、
     前記動き予測・補償部は、前記シーンチェンジ検出部でシーンチェンジが検出された場合、ブロックのブロックサイズを予め設定した所定のサイズに設定する
    請求項7記載の画像処理装置。
  9.  前記符号化部は、前記動きベクトルの数にかかわらず最適予測モードを検出して、該検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する動作モードにおいて、予測モードにおける動きベクトルの数が前記上限値を超える場合は、前記符号化ストリームと、前記動きベクトルの数が上限値を超えていることを示す判別情報とを伝送する
    請求項1記載の画像処理装置。
  10.  前記設定部により上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を生成する生成部を更に備え、
     前記符号化部は、前記符号化ストリームと前記サイズ識別情報とを伝送する
    請求項1に記載の画像処理装置。
  11.  画像データを符号化処理する際の符号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する工程と、
     前記設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する工程と、
     前記生成された予測画像を用いて、前記画像データを符号化して符号化ストリームを生成する工程と
    を含む画像処理方法。
  12.  画像データを符号化した符号化ストリームを復号化処理する際の復号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する設定部と、
     前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する動き補償部と、
     前記動き補償部により生成された予測画像を用いて、前記符号化ストリームを復号化する復号化部と
    を備える画像処理装置。
  13.  前記設定部は、前記ブロックのブロックサイズが所定サイズよりも大きいサイズである場合、前記上限値を前記所定サイズのブロックにおける上限値よりも大きく設定する
    請求項12記載の画像処理装置。
  14.  前記設定部は、所定サイズ(N)のブロックに対する動きベクトル数の上限値がpであり、前記所定サイズよりも大きなブロックサイズが(N×m)×(N×n)画素である場合、前記上限値を(p×m×n)に設定する
    請求項13記載の画像処理装置。
  15.  前記所定サイズは、16×16画素である
    請求項14に記載の画像処理装置。
  16.  前記所定サイズよりも大きいサイズのブロックは、階層構造を有する符号化単位において最大サイズを有する最大符号化単位である
    請求項13に記載の画像処理装置。
  17.  前記動き補償部は、前記予測モードを検出する際、動きベクトルの数が前記上限値を超える予測モードを、検出対象となる予測モードの候補から除外する
    請求項13記載の画像処理装置。
  18.  前記動き補償部は、前記動きベクトルの数が前記上限値を超えないための制御回数をフレーム毎に監視して、該制御回数が予め設定された所定回数を超えた場合、次のフレームにおけるブロックのブロックサイズを大きく設定する
    請求項13記載の画像処理装置。
  19.  前記画像データにおけるシーンチェンジを検出するシーンチェンジ検出部を有し、
     前記動き補償部は、前記シーンチェンジ検出部でシーンチェンジが検出された場合、ブロックのブロックサイズを予め設定した所定のサイズに設定する
    請求項18記載の画像処理装置。
  20.  前記復号部は、前記動きベクトルの数にかかわらず最適予測モードを検出して、該検出した最適予測モードの動きベクトルを用いて参照画像の動き補償を行い予測画像を生成する動作モードにおいて、前駆符号化ストリームから前記動きベクトルの数が上限値を超えていることを示す判別情報を取得する
    請求項12記載の画像処理装置。
  21.  前記復号化部は、上限値が設定されるブロックのブロックサイズを識別するサイズ識別情報を前記符号化ストリームから取得する
    請求項12に記載の画像処理装置。
  22.  画像データを符号化した符号化ストリームを復号化処理する際の復号化処理単位であるブロックのブロックサイズに応じて、動きベクトルの数の上限値を設定する工程と、
     前記ブロックの動きベクトルの数が前記設定部により設定された上限値以下の状態で予測モードを検出し、該検出した予測モードの動きベクトルを用いて参照画像の動き補償を行って、予測画像を生成する工程と、
     前記生成された予測画像を用いて、前記符号化ストリームを復号化する工程と
    を含む画像処理方法。
PCT/JP2011/066920 2010-08-03 2011-07-26 画像処理装置と画像処理方法 WO2012017858A1 (ja)

Priority Applications (10)

Application Number Priority Date Filing Date Title
US13/809,419 US20130114727A1 (en) 2010-08-03 2011-07-26 Image processing device and image processing method
KR1020137001925A KR20130102527A (ko) 2010-08-03 2011-07-26 화상 처리 장치와 화상 처리 방법
RU2013103518/08A RU2013103518A (ru) 2010-08-03 2011-07-26 Устройство обработки изображения и способ обработки изображения
MX2013001034A MX2013001034A (es) 2010-08-03 2011-07-26 Dispositivo de procesamiento de imagen y metodo de procesamiento de imagen.
CN2011800367316A CN103026710A (zh) 2010-08-03 2011-07-26 图像处理装置和图像处理方法
AU2011286922A AU2011286922A1 (en) 2010-08-03 2011-07-26 Image processing device and image processing method
EP11814486.4A EP2603002A4 (en) 2010-08-03 2011-07-26 IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD
JP2012527668A JPWO2012017858A1 (ja) 2010-08-03 2011-07-26 画像処理装置と画像処理方法
CA2804517A CA2804517A1 (en) 2010-08-03 2011-07-26 Image processing device and image processing method
BR112013001948A BR112013001948A2 (pt) 2010-08-03 2011-07-26 dispositivo de processamento de imagem, e, método de processamento de imagem

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010-174706 2010-08-03
JP2010174706 2010-08-03

Publications (1)

Publication Number Publication Date
WO2012017858A1 true WO2012017858A1 (ja) 2012-02-09

Family

ID=45559361

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/066920 WO2012017858A1 (ja) 2010-08-03 2011-07-26 画像処理装置と画像処理方法

Country Status (11)

Country Link
US (1) US20130114727A1 (ja)
EP (1) EP2603002A4 (ja)
JP (1) JPWO2012017858A1 (ja)
KR (1) KR20130102527A (ja)
CN (1) CN103026710A (ja)
AU (1) AU2011286922A1 (ja)
BR (1) BR112013001948A2 (ja)
CA (1) CA2804517A1 (ja)
MX (1) MX2013001034A (ja)
RU (1) RU2013103518A (ja)
WO (1) WO2012017858A1 (ja)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012096147A1 (ja) * 2011-01-13 2012-07-19 日本電気株式会社 映像符号化装置、映像復号装置、映像符号化方法、映像復号方法及びプログラム
WO2012096146A1 (ja) * 2011-01-13 2012-07-19 日本電気株式会社 映像符号化装置、映像復号装置、映像符号化方法、映像復号方法及びプログラム
JP2014531153A (ja) * 2011-09-14 2014-11-20 サムスン エレクトロニクスカンパニー リミテッド ビデオ符号化方法、ビデオ復号化方法及びその装置
CN104488268A (zh) * 2012-07-04 2015-04-01 汤姆逊许可公司 具有增加数量的可能编码模式的空间预测
US9924189B2 (en) 2012-09-28 2018-03-20 Sony Corporation Image processing device and method

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI526056B (zh) * 2011-04-27 2016-03-11 Jvc Kenwood Corp A moving picture coding apparatus, a motion picture coding method, a motion picture coding program, a transmission apparatus, a transmission method, a transmission program, a video decoding apparatus, a video decoding method, a video decoding program, a reception device, a reception method, Receiving program
WO2012147344A1 (ja) 2011-04-27 2012-11-01 株式会社Jvcケンウッド 動画像復号装置、動画像復号方法、及び動画像復号プログラム
US9544592B2 (en) * 2012-02-10 2017-01-10 Texas Instruments Incorporated Methods and systems for encoding pictures associated with video data
US20150085915A1 (en) * 2013-09-25 2015-03-26 Jay C.-C. Kuo Method and system for automatically encoding video with uniform throughput
JP5979512B2 (ja) * 2014-04-02 2016-08-24 コニカミノルタ株式会社 画像形成装置及びフラッシュメモリの制御方法
CN104581173A (zh) * 2015-01-13 2015-04-29 中国电子科技集团公司第三十二研究所 软解码验证模型平台
CN106331629A (zh) * 2016-08-29 2017-01-11 合肥康胜达智能科技有限公司 一种安全监控***
CN106331626A (zh) * 2016-08-29 2017-01-11 合肥康胜达智能科技有限公司 一种楼宇监控***
CN106375699A (zh) * 2016-08-29 2017-02-01 合肥康胜达智能科技有限公司 一种高清网络摄像机
CN106303450A (zh) * 2016-08-29 2017-01-04 合肥康胜达智能科技有限公司 一种视频图像处理方法
CN106254832A (zh) * 2016-08-29 2016-12-21 合肥康胜达智能科技有限公司 一种闭路监控***
US20200059657A1 (en) * 2017-03-10 2020-02-20 Sony Corporation Image processing apparatus and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006013690A1 (ja) * 2004-08-04 2006-02-09 Matsushita Electric Industrial Co., Ltd. 画像復号装置
JP2008193410A (ja) * 2007-02-05 2008-08-21 Matsushita Electric Ind Co Ltd 画像符号化装置、録画装置、動画像符号化方法、動画像符号化プログラム
JP2010154061A (ja) * 2008-12-24 2010-07-08 Sony Corp 画像処理装置およびその方法、並びにプログラム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100586882B1 (ko) * 2004-04-13 2006-06-08 삼성전자주식회사 모션 스케일러빌리티를 지원하는 코딩 방법 및 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006013690A1 (ja) * 2004-08-04 2006-02-09 Matsushita Electric Industrial Co., Ltd. 画像復号装置
JP2008193410A (ja) * 2007-02-05 2008-08-21 Matsushita Electric Ind Co Ltd 画像符号化装置、録画装置、動画像符号化方法、動画像符号化プログラム
JP2010154061A (ja) * 2008-12-24 2010-07-08 Sony Corp 画像処理装置およびその方法、並びにプログラム

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
P. CHEN, Y. YE ET AL.: "Video Coding Using Extended Block Sizes", ITU - TELECOMMUNICATIONS STANDARDIZATION SECTOR STUDY GROUP 16 QUESTION 6 VIDEO CODING EXPERTS GROUP (VCEG) 36TH MEETING, 8 October 2008 (2008-10-08) - 10 October 2008 (2008-10-10), SAN DIEGO, USA, XP030003645 *
See also references of EP2603002A4 *
VIDEO CODING USING EXTENDED BLOCK SIZES, January 2009 (2009-01-01)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9712826B2 (en) 2011-01-13 2017-07-18 Nec Corporation Video encoding device, video decoding device, video encoding method, video decoding method, and program
WO2012096146A1 (ja) * 2011-01-13 2012-07-19 日本電気株式会社 映像符号化装置、映像復号装置、映像符号化方法、映像復号方法及びプログラム
US11665352B2 (en) 2011-01-13 2023-05-30 Nec Corporation Video encoding device, video decoding device, video encoding method, video decoding method, and program using inter prediction
US11647205B2 (en) 2011-01-13 2023-05-09 Nec Corporation Video encoding device, video decoding device, video encoding method, video decoding method, and program using inter prediction
US11582461B2 (en) 2011-01-13 2023-02-14 Nec Corporation Video encoding device, video decoding device, video encoding method, video decoding method, and program restricts inter-prediction unit partitions based on coding unit depth
US11323720B2 (en) 2011-01-13 2022-05-03 Nec Corporation Video encoding device, video decoding device, video encoding method, video decoding method, and program using inter prediction
US10841590B2 (en) 2011-01-13 2020-11-17 Nec Corporation Video decoding device, video decoding method, and program
US10841588B2 (en) 2011-01-13 2020-11-17 Nec Corporation Video encoding device, video decoding device, video encoding method, video decoding method, and program using inter prediction
WO2012096147A1 (ja) * 2011-01-13 2012-07-19 日本電気株式会社 映像符号化装置、映像復号装置、映像符号化方法、映像復号方法及びプログラム
US9578332B2 (en) 2011-09-14 2017-02-21 Samsung Electronics Co., Ltd. Method and device for encoding and decoding video
JP2017063468A (ja) * 2011-09-14 2017-03-30 サムスン エレクトロニクス カンパニー リミテッド ビデオ符号化方法、ビデオ復号化方法及びその装置
US9544600B2 (en) 2011-09-14 2017-01-10 Samsung Electronics Co., Ltd. Method and device for encoding and decoding video
US9538188B2 (en) 2011-09-14 2017-01-03 Samsung Electronics Co., Ltd. Method and device for encoding and decoding video
US9538184B2 (en) 2011-09-14 2017-01-03 Samsung Electronics Co., Ltd. Method and device for encoding and decoding video
US9538187B2 (en) 2011-09-14 2017-01-03 Samsung Electronics Co., Ltd. Method and device for encoding and decoding video
JP2014531153A (ja) * 2011-09-14 2014-11-20 サムスン エレクトロニクスカンパニー リミテッド ビデオ符号化方法、ビデオ復号化方法及びその装置
CN104488268B (zh) * 2012-07-04 2018-07-17 汤姆逊许可公司 具有增加数量的可能编码模式的空间预测
CN104488268A (zh) * 2012-07-04 2015-04-01 汤姆逊许可公司 具有增加数量的可能编码模式的空间预测
US9924189B2 (en) 2012-09-28 2018-03-20 Sony Corporation Image processing device and method

Also Published As

Publication number Publication date
EP2603002A4 (en) 2014-12-31
RU2013103518A (ru) 2014-07-27
AU2011286922A1 (en) 2013-02-07
US20130114727A1 (en) 2013-05-09
JPWO2012017858A1 (ja) 2013-10-03
AU2011286922A2 (en) 2013-02-14
MX2013001034A (es) 2013-03-08
CA2804517A1 (en) 2012-02-09
CN103026710A (zh) 2013-04-03
KR20130102527A (ko) 2013-09-17
EP2603002A1 (en) 2013-06-12
BR112013001948A2 (pt) 2018-05-15

Similar Documents

Publication Publication Date Title
WO2012017858A1 (ja) 画像処理装置と画像処理方法
JP6477939B2 (ja) テレビジョン装置、携帯電話機、再生装置、カメラ、および画像処理方法
JPWO2011145601A1 (ja) 画像処理装置と画像処理方法
WO2012063878A1 (ja) 画像処理装置と画像処理方法
JP2011259204A (ja) 画像復号化装置と画像符号装置およびその方法とプログラム
WO2012063604A1 (ja) 画像処理装置と画像処理方法
WO2011155331A1 (ja) 画像復号化装置と画像符号化装置およびその方法とプログラム
JP2013150164A (ja) 符号化装置および符号化方法、並びに、復号装置および復号方法
WO2012056924A1 (ja) 画像処理装置と画像処理方法
JP5387520B2 (ja) 情報処理装置と情報処理方法
JP2013098873A (ja) 画像処理装置と画像処理方法
WO2014002900A1 (ja) 画像処理装置および画像処理方法
WO2012077533A1 (ja) 画像復号化装置と動きベクトル復号化方法、画像符号化装置と動きベクトル符号化方法

Legal Events

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

Ref document number: 201180036731.6

Country of ref document: CN

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

Ref document number: 11814486

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012527668

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 2804517

Country of ref document: CA

WWE Wipo information: entry into national phase

Ref document number: 13809419

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2011814486

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20137001925

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2013103518

Country of ref document: RU

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: MX/A/2013/001034

Country of ref document: MX

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2011286922

Country of ref document: AU

Date of ref document: 20110726

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112013001948

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 112013001948

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20130125