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

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

Info

Publication number
WO2013065527A1
WO2013065527A1 PCT/JP2012/077347 JP2012077347W WO2013065527A1 WO 2013065527 A1 WO2013065527 A1 WO 2013065527A1 JP 2012077347 W JP2012077347 W JP 2012077347W WO 2013065527 A1 WO2013065527 A1 WO 2013065527A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
image data
filter
image
pixel
Prior art date
Application number
PCT/JP2012/077347
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 ソニー株式会社
Publication of WO2013065527A1 publication Critical patent/WO2013065527A1/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/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/167Position within a video image, e.g. region of interest [ROI]
    • 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/117Filters, e.g. for pre-processing or post-processing
    • 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/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/182Methods 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 a pixel

Definitions

  • This technology relates to an image processing apparatus and an image processing method. Specifically, it is possible to reduce the memory capacity of the memory used in the loop filter processing of the image that has been encoded and decoded in units of blocks.
  • MPEG2 compressed by orthogonal transform such as discrete cosine transform and motion compensation is used for the purpose of transmission and storage of information with high efficiency.
  • An apparatus conforming to a method such as ISO (International Organization for Standardization) / IEC (International Electrotechnical Commission) 13818-2) is widely used for both information distribution in broadcasting stations and information reception in general households.
  • ISO International Organization for Standardization
  • IEC International Electrotechnical Commission
  • H.D. can achieve higher encoding efficiency.
  • H.264 and MPEG4 Part 10 AVC: Advanced Video Coding
  • HEVC High Efficiency Video Coding
  • JCTVC Joint Collaboration Team-Video Coding
  • the adaptive loop filter (ALF: Adaptive Loop Filter) is used to reduce the block distortion remaining in the deblocking filter processing and distortion due to quantization.
  • ALF Adaptive Loop Filter
  • Non-Patent Document 2 PQAO (Picture Quality Quality Adaptive Offset) disclosed in Non-Patent Document 2 between a deblocking filter and an adaptive loop filter.
  • PQAO Picture Quality Quality Adaptive Offset
  • band offsets There are two types of offsets called band offsets and six types called edge offsets, and it is also possible not to apply offsets.
  • edge offsets There are two types of offsets called edge offsets and six types called edge offsets. Then, the image is divided into quad-trees, and the encoding efficiency is improved by selecting which of the above-described offset types is to be encoded for each region.
  • the horizontal filter in the deblocking filter processing is performed using image data of a desired block (current block) and a block adjacent to the right side of the current block. Further, the loop filter process of the current block is performed using the image data after the deblocking filter process or the deblocking filter process and the SAO process are performed. For this reason, it is necessary to store the image data in a memory so that the loop filter process can be performed using the image after the deblocking filter process.
  • FIG. 1 is a diagram for explaining image data stored in a memory in a conventional loop filter process.
  • image data for four pixel columns from the block boundary is used to generate image data after filtering processing for three pixel columns from the block boundary.
  • the process target pixel of a deblocking filter is shown with the double circle.
  • a block boundary between blocks, for example, LCU (Largest Coding Unit) m and LCU m + 1 is indicated as “BB”.
  • a tap is set for a pixel to be processed (indicated by a black square) of the adaptive loop filter, and the image data of the tap is used.
  • a filter operation is performed.
  • the tap is constructed at, for example, the position indicated by a black circle and the position of the pixel to be processed.
  • a filter size using a tap of 5 ⁇ 5 pixels is illustrated.
  • the image processing apparatus that performs the loop filter process can perform the loop filter process without using the image data after the deblocking filter process.
  • the target pixel of the loop filter process is the pixel in the fifth pixel column on the left from the block boundary BB
  • the tap is included in the filter processing range of the deblocking filter. That is, in the loop filter process, image data after the deblocking filter process is required. Therefore, the image processing apparatus that performs the loop filter process stores the image data for the four pixel columns from the seventh pixel column to the left four pixel column in the memory in order to perform the loop filter process after the deblocking filter process. It is necessary to keep.
  • the image data stored in the memory must be increased. For example, as shown in FIG. 1D, when the filter size uses a tap of 11 ⁇ 5 pixels, when the target pixel of the loop filter processing is at the position of the eighth pixel column on the left from the block boundary BB, the tap is deblocked. Included in the filter processing range of the filter. That is, in the loop filter process, image data after the deblocking filter process is required. Therefore, an image processing apparatus that performs loop filter processing must store image data for 10 pixel columns from the 13th pixel column to the 4th pixel column in the memory in order to perform loop filter processing after deblocking filter processing. I must.
  • this technology provides an image processing apparatus and an image processing method capable of reducing the memory capacity of the memory used in the loop filter processing.
  • a first aspect of this technology is constructed for a decoding unit that decodes an encoded stream to generate an image, and a filtering target pixel of an image in units of CU (Coding Unit) generated by the decoding unit.
  • a filter operation unit that performs a filter operation using the image data of the taps and the coefficient set, and a filter size that minimizes the number of taps in a direction orthogonal to the boundary direction of the predetermined block boundary and is within a predetermined range from the predetermined block boundary.
  • a memory for storing image data of a region not included in the predetermined range used for the filter calculation in the case of performing the filter calculation of the image of the image, and the number of taps in a direction orthogonal to the boundary direction of the predetermined block boundary.
  • the image processing apparatus includes a filter control unit that copies image data or changes a coefficient set used in the filter operation.
  • a direction orthogonal to the boundary direction of a predetermined block boundary for example, orthogonal to a right block boundary
  • the filter size with the minimum number of taps in the horizontal direction is within a predetermined range from the right block boundary, for example, within the filter processing range of the deblocking filter processing, or when performing SAO (Sample Adaptive Offset) processing
  • SAO Sample Adaptive Offset
  • the filter control unit when a filter size that does not minimize the number of taps in the right block boundary direction is selected, the filter control unit is within a predetermined range in which image data is not obtained based on the image position of the target pixel to be filtered.
  • the tap of the image data for the determined tap is determined so that the tap calculation is performed without using the image data stored in the predetermined range and the memory without determining the tap in which the image data is stored in the tap.
  • the filter coefficient used in the copying or filter operation is changed. For example, the image data of adjacent pixels whose image data is stored in the memory is copied as the image data of the determined tap. Alternatively, the coefficient of the adjacent pixel whose image data is stored in the memory is changed.
  • the second aspect of this technique is constructed for a process of decoding an encoded stream to generate an image, and a filtering target pixel of an image in CU (Coding Unit) unit generated by the decoding process
  • a step of performing a filter operation using the image data of the tap and the coefficient set, and a selectable filter size having a minimum number of taps in a direction orthogonal to the boundary direction of the predetermined block boundary within a predetermined range from the predetermined block boundary Storing image data of a region not included in the predetermined range used for the filter calculation in the case of performing the filter calculation of the image in the memory, and a tap in a direction orthogonal to the boundary direction of the predetermined block boundary
  • the filter size is located within the predetermined range based on the position of the pixel to be filtered.
  • the image processing method includes a step of copying image data or changing a coefficient set used in the filter operation.
  • the third aspect of this technique uses the tap image data and coefficient set constructed for the filtering target pixel of the CU (Coding Unit) unit image that is locally decoded when the image is encoded.
  • CU Coding Unit
  • Image data is recorded in the tap and the memory located within the predetermined range based on the position of the pixel to be filtered.
  • the image processing apparatus includes a filter control unit that changes a coefficient set used in the calculation.
  • the filter operation is performed using the tap image data and the coefficient set constructed for the filter target pixel of the CU-unit image that has been locally decoded.
  • Image data of an area not included in the predetermined range used for the filter calculation when performing the calculation is stored in the memory.
  • the filter control unit selects a filter size with a minimum number of taps in the block boundary direction based on the position of the pixel to be filtered.
  • the taps that are located within and the taps for which no image data is stored in the memory are determined, and the filter operation is performed without using the image data that is not stored in the predetermined range and in the memory. Then, change the coefficient set used for copying image data or filtering. Further, the filter control unit includes information on the filter size and coefficient set used for the filter calculation in the encoded stream.
  • the fourth aspect of this technique uses tap image data and a coefficient set constructed for a pixel to be filtered of a CU (Coding Unit) unit image that has been locally decoded when the image is encoded.
  • a step of storing image data of a region not included in the predetermined range used for filter calculation in a memory, and a case of selecting a filter size in which the number of taps in a direction orthogonal to the boundary direction of the predetermined block boundary is not minimum The image data is stored in the tap and the memory located within the predetermined range based on the position of the pixel to be filtered. In order to discriminate taps that have not been detected and to perform the filter operation without using image data that is within the predetermined range and not stored in the memory, copying of the image data or the filter operation is performed on the determined taps. And a step of changing a coefficient set used in the image processing method.
  • the filter control unit when performing filter operation on an image within a predetermined range from a predetermined block boundary with a filter size having a minimum number of taps in a direction orthogonal to the boundary direction of the predetermined block boundary, the filter operation is performed.
  • the image data of the area not included in the predetermined range used for the is stored.
  • the filter control unit when a filter size with a minimum number of taps in the block boundary direction is selected, no image data is stored in the taps and memory located within a predetermined range based on the position of the filter processing target pixel.
  • the image encoding device 10 includes an inverse quantization unit 21, an inverse orthogonal transform unit 22, an addition unit 23, a deblocking filter processing unit 24, a SAO unit 25, a loop filter processing unit 26, a coefficient memory 27, a frame memory 28, A selector 29, an intra prediction unit 31, a motion prediction / compensation unit 32, and a predicted image / optimum mode selection unit 33 are provided.
  • 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 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.
  • 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 SAO unit 25 divides the image into quad-trees, and selects what offset is applied to each region for encoding.
  • the SAO unit 25 performs SAO processing, that is, selected offset processing, on the image data supplied from the deblocking filter processing unit 24 and outputs the result to the loop filter processing unit 26.
  • the loop filter processing unit 26 uses the coefficients supplied from the coefficient memory 27 and the image data supplied from the SAO unit 25 to perform adaptive loop filter processing (hereinafter simply referred to as “loop filter processing” or “ALF processing”). Do.
  • the loop filter processing unit 26 uses, for example, a Wiener filter as a filter. Of course, a filter other than the Wiener filter may be used.
  • the loop filter processing unit 26 includes a plurality of filters having different tap sizes, and performs loop filter processing.
  • the loop filter processing unit 26 supplies the filter processing result to the frame memory 28 and stores it as image data of the reference image.
  • the selector 29 supplies the pre-filter reference image data read from the frame memory 28 to the intra prediction unit 31 for performing intra prediction. Further, the selector 29 supplies the filtered reference image data read from the frame memory 28 to the motion prediction / compensation unit 32 for performing inter prediction.
  • 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 in units of macroblocks, and the cost function value is small. Is selected as the optimum mode with the best coding 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 may perform intra prediction or inter prediction in units of slices.
  • step ST18 the adding unit 23 generates decoded image data.
  • the adder 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 to generate decoded image data.
  • step ST20 the SAO unit 25 adaptively performs offset processing.
  • the SAO unit 25 performs SAO processing on the image data output from the deblocking filter processing unit 24.
  • the frame memory 28 stores the decoded image data.
  • the frame memory 28 stores the decoded image data before the deblocking filter process and the decoded image data after the loop filter process.
  • 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.
  • prediction processes in all candidate prediction modes are performed, and cost function values in all candidate prediction modes are calculated.
  • 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 supplies it 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.
  • the intra prediction unit 31 performs intra prediction in each prediction mode.
  • the intra prediction unit 31 uses the decoded image data before filter processing stored in the frame memory 28 to generate predicted image data for each intra prediction mode.
  • 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 QPtoQuant is a function given as a function of the quantization parameter QP.
  • 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 of 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 transformation and the predicted image data supplied from the selector 65 to generate decoded image data, and outputs the decoded image data to the deblocking filter processing unit 56 and the frame memory 61.
  • the frame memory 61 holds the decoded image data before the filtering process supplied from the adding unit 55 and the decoded image data after the filtering process supplied from the loop filter processing unit 58 as the image data of the reference image.
  • step ST51 the accumulation buffer 51 accumulates the transmitted encoded stream.
  • step ST55 the addition unit 55 generates decoded image data.
  • the adding unit 55 adds the data obtained by performing the inverse orthogonal transform process and the predicted image data selected in step ST61 described later to generate decoded image data. As a result, the original image is decoded.
  • step ST58 the loop filter processing unit 58 performs loop filter processing.
  • the loop filter processing unit 58 filters the decoded image data after the SAO process to reduce block distortion and distortion due to quantization.
  • step ST59 the frame memory 61 performs a process of storing decoded image data.
  • the intra prediction unit 63 performs intra prediction processing based on the prediction mode information, and generates predicted image data.
  • the motion compensation unit 64 performs motion compensation based on the prediction mode information, and generates predicted image data.
  • step ST61 the selector 65 selects predicted image data. That is, the selector 65 selects the prediction image supplied from the intra prediction unit 63 and the prediction image data generated by the motion compensation unit 64 and supplies the selected prediction image data to the adding unit 55. As described above, the selector 65 performs inverse orthogonal in step ST55. It is added to the output of the conversion unit 54.
  • step ST62 the screen rearrangement buffer 59 performs image rearrangement. That is, the screen rearrangement buffer 59 rearranges the order of frames rearranged for encoding by the screen rearrangement buffer 12 of the image encoding device 10 of FIG. 2 to the original display order.
  • step ST63 the D / A converter 60 D / A converts the image data from the screen rearrangement buffer 59. This image is output to a display (not shown), and the image is displayed.
  • the image encoding device 10 calculates a cost function value J0 of Level-0 (division depth 0) indicating a state where the region 0 is not divided. Further, cost function values J1, J2, J3, and J4 of Level-1 (division depth 0) indicating a state where the area 0 is divided into four areas 1 to 4 are calculated.
  • the cost function values J5 to J20 of Level-2 (division depth 2) indicating the state where the area 0 is divided into 16 areas 5 to 20 are calculated. Is done.
  • a partition region (Partitions) of Level-1 is selected in region 1 by J1 ⁇ (J5 + J6 + J9 + J10).
  • a Level-2 divided region is selected by J2> (J7 + J8 + J11 + J12).
  • a Level-2 divided region is selected by J3> (J13 + J14 + J17 + J18).
  • the division region of Level-1 is selected by J4> (J15 + J16 + J19 + J20).
  • EO (4) that is, the fourth type of edge offset is determined.
  • OFF that is, no offset is determined
  • EO (2) that is, the second type of edge offset is determined.
  • OFF that is, no offset is determined.
  • BO (1) that is, the first type of band offset
  • EO (2) that is, 2 of edge offset
  • the type has been determined.
  • BO (2) that is, the second type of band offset
  • BO (1) that is, the first type of band offset.
  • EO (1) that is, the first type of edge offset is determined.
  • the edge offset the pixel value is compared with the adjacent pixel value adjacent to the pixel value, and the offset value is transmitted to the category corresponding to this.
  • FIGS. 10A to 10D there are four one-dimensional patterns shown in FIGS. 10A to 10D and two two-dimensional patterns shown in FIGS. 10E and 10F.
  • the offset is transmitted in the category shown in FIG.
  • adjacent pixels are arranged one-dimensionally on the left and right with respect to the pixel C, that is, 1-D forming 0 degree with respect to the pattern of FIG. , Represents a 0-degree pattern.
  • the adjacent pixels are arranged one-dimensionally above and below the pixel C, that is, 1-D forming 90 degrees with respect to the pattern of FIG. , Represents a 90-degree pattern.
  • adjacent pixels are arranged one-dimensionally in the upper left and lower right with respect to the pixel C, that is, 135 degrees with respect to the pattern of FIG. It represents a 1-D, 135-degree pattern.
  • adjacent pixels are arranged one-dimensionally in the upper right and lower left with respect to the pixel C, that is, 45 degrees with respect to the pattern of FIG. -D, 135-degree pattern.
  • FIG. 10E shows a 2-D, cross pattern in which adjacent pixels are arranged two-dimensionally in the vertical and horizontal directions with respect to the pixel C, that is, intersect with the pixel C.
  • FIG. 10F shows that 2-D adjacent pixels are arranged two-dimensionally with respect to the pixel C, ie, upper right lower left and upper left lower right, that is, obliquely intersect the pixel C. , represents the diagonal pattern.
  • FIG. 11A shows a one-dimensional pattern rule list (Classification (rule for 1-D patterns).
  • the patterns of (A) to (D) in FIG. 10 are classified into five types of categories as shown in (A) of FIG. 11, offsets are calculated based on the categories, and sent to the decoding unit.
  • the pixel value of the pixel C When the pixel value of the pixel C is smaller than the pixel values of two adjacent pixels, it is classified into category 1. When the pixel value of the pixel C is smaller than the pixel value of one adjacent pixel and matches the pixel value of the other adjacent pixel, it is classified into category 2. When the pixel value of the pixel C is larger than the pixel value of one adjacent pixel and matches the pixel value of the other adjacent pixel, it is classified into category 3. When the pixel value of the pixel C is larger than the pixel values of two adjacent pixels, it is classified into category 4. If none of the above, it is classified into category 0.
  • FIG. 11 shows a two-dimensional pattern rule list (Classification rule for 2-D patterns).
  • the patterns (E) and (F) in FIG. 10 are classified into seven types of categories as shown in FIG. 11 (B), and offsets are sent to the decoding unit according to the categories.
  • the pixel C When the pixel value of the pixel C is smaller than the pixel values of the four adjacent pixels, it is classified into category 1. When the pixel value of the pixel C is smaller than the pixel values of the three adjacent pixels and matches the pixel value of the fourth adjacent pixel, the pixel C is classified into category 2. When the pixel value of the pixel C is smaller than the pixel values of the three adjacent pixels and larger than the pixel value of the fourth adjacent pixel, the pixel C is classified into category 3.
  • the pixel C When the pixel value of the pixel C is larger than the pixel values of the three adjacent pixels and smaller than the pixel value of the fourth adjacent pixel, it is classified into category 4. When the pixel value of the pixel C is larger than the pixel values of the three adjacent pixels and matches the pixel value of the fourth adjacent pixel, the pixel C is classified into category 5. When the pixel value of the pixel C is larger than the pixel values of the four adjacent pixels, it is classified into category 6. If none of the above, it is classified into category 0.
  • the SAO unit advances the offset process when the pixel position including the filter processing target pixel of the deblocking filter is included in the determination process. I can't. After that, when the filtering process is performed with the deblocking filter, the SAO unit performs the determination process using the pixel after the filtering process in the filtering process range of the deblocking filter. Therefore, the SAO unit needs to store image data so that the SAO process can be performed after the deblocking filter process.
  • the loop filter processing unit cannot proceed with the loop filter processing when a pixel position where a pixel that has not been processed by the SAO unit is included in the tap range of the loop filter processing. After that, when processing is performed with SAO, the loop filter processing unit performs loop filter processing using the pixels processed with SAO 28. Therefore, the loop filter processing unit needs to store the image data processed by the SAO unit.
  • FIG. 12 illustrates filter taps that can be selected by the loop filter processing unit.
  • a filter having a horizontal filter size of 5 taps shown in FIG. 12A or a filter having a horizontal filter size of 11 taps shown in FIG. Filtering is performed using taps that reduce the cost function value.
  • each tap is Ta0 to Ta16 when the horizontal filter size is 5 taps.
  • each tap is denoted as Tb0 to Tb14.
  • the image data of the tap Ta0 is Pa0.
  • the image data of the taps Ta1 to Ta16 and Tb0 to Tb14 are Pa1 to Pa16 and Pb0 to Pb14.
  • FIG. 13 shows a range of pixels to be stored in the memory in order to perform the loop filter process using the filter having the tap size shown in FIG. 12 when the deblocking filter process and the SAO process are performed.
  • the deblocking filter processing unit stores, in the memory, image data in a range corresponding to the left four pixel columns from the right block boundary BB, as shown in FIG. There is a need to.
  • a double circle indicates that the pixel to be processed by the deblocking filter is not subjected to deblocking filter processing (DF processing).
  • the SAO unit cannot proceed with the process when the pixel position including the filtering target pixel of the deblocking filter is included in the determination process. That is, as shown in FIG. 13B, the processing can proceed from the right block boundary BB to the position of the left fifth pixel column, but at the position of the left fourth pixel column, 3 ⁇
  • the filtering target pixel of the deblocking filter is included in the range of the determination process of three pixels. For this reason, the SAO unit cannot proceed to the position of the left fourth pixel column. Therefore, after the deblocking filter processing, the image of the position of the left fifth pixel column being processed in the SAO unit so that the process can proceed from the position of the fourth pixel column on the left with respect to the right block boundary BB Data needs to be stored in memory.
  • FIG. 13B pixels with a cross mark in a circle indicate pixels that cannot be subjected to SAO processing because deblocking filter processing has not been performed.
  • the loop filter processing unit cannot proceed with the process if the pixel position includes a pixel not processed by the SAO unit in the tap. That is, as shown in FIG. 13C, the processing can proceed from the right block boundary BB to the position of the left 7th pixel column, but at the position of the left 6th pixel column, within the tap of 5 ⁇ 5 pixels. Cannot include the pixel that has not been processed by the SAO unit. Therefore, after the deblocking filter processing, the four pixel columns from the left eighth pixel column to the left fifth pixel column being processed in the SAO unit so that the process can proceed from the position of the sixth pixel column on the left. Minute image data must be stored in the memory.
  • the loop filter processing unit cannot proceed the process when the pixel position includes a pixel not processed by the SAO unit in the tap. That is, as shown in FIG. 13D, the processing can proceed from the right block boundary BB to the position of the 10th pixel column on the left. Cannot include the pixel that has not been processed by the SAO unit. Therefore, the 10 pixel columns from the left 14 pixel column to the left 5 pixel column, which are processed in the SAO unit, so that the process can proceed from the position of the left 9 pixel column after the deblocking filter process. Minute image data must be stored in the memory.
  • the 11 ⁇ 5 pixel tap is processed from the position of the 9th pixel column on the left with respect to the right block boundary BB.
  • the memory capacity in this case is 2.5 times the memory capacity required for a 5 ⁇ 5 pixel tap.
  • a memory capacity of 768 bytes is unused.
  • the loop filter processing unit performs filtering processing when a filter size that does not minimize the number of taps in the direction orthogonal to the boundary direction of the predetermined block boundary, for example, the horizontal direction orthogonal to the right block boundary is selected. Based on the pixel position, taps within the predetermined range from the right block boundary and taps for which no image data is stored in the memory are discriminated, and filter calculation is performed without using image data that is not stored in the predetermined range and in the memory. The coefficient set used in the copying of the image data or the filter operation is changed for the determined tap.
  • the loop filter processing unit 26 of the image encoding device 10 illustrated in FIG. 2 and the loop filter processing unit 58 of the image decoding device illustrated in FIG. 6 have the same configuration and operation, and correspond to the image processing device of the present technology. .
  • the loop filter processing unit performs deblocking processing and SAO processing on a block-unit image generated by decoding a block-unit image and an encoded stream that have been locally decoded when the image is encoded.
  • a tap and a coefficient set are constructed for the processing target pixel of the broken image, and a filter operation is performed using the image data of the tap and the coefficient set.
  • the filter operation is performed by copying the image data or changing the coefficient set.
  • FIG. 14 illustrates the configuration of the loop filter processing unit 26.
  • the loop filter processing unit 26 includes a memory 261, a tap construction unit 262, a coefficient construction unit 263, a filter calculation unit 264, and a filter control unit 269.
  • the image data output from the SAO unit 25 is supplied to the memory 261 and the tap construction unit 262.
  • the memory 261 Based on the control signal from the filter control unit 269, the memory 261 has a selectable filter size with a minimum number of taps in a direction orthogonal to the boundary direction of the predetermined block boundary, and images in a predetermined range from the predetermined block boundary. Image data of an area not included in the predetermined range used for the filter calculation when the filter calculation is performed is stored. For example, when a filter operation is performed on an image in a range where the SAO processing is not performed from the right block boundary with a filter size having a minimum number of horizontal taps of 5 pixels, the SAO-processed image used for this filter operation Store the data. In addition, the memory 261 reads out the stored image data based on the control signal and outputs it to the tap construction unit 262.
  • the tap constructing unit 262 constructs a tap using the image data supplied from the SAO unit 25 and the image data stored in the memory 261 with reference to the processing target pixel of the loop filter. In the tap construction, a plurality of filters having different filter sizes can be selected.
  • the tap construction unit 262 outputs the constructed tap image data to the filter calculation unit 264.
  • the coefficient construction unit 263 reads the coefficient used for the filter operation from the coefficient memory 27, determines the coefficient corresponding to the tap constructed by the tap construction unit 262, and constructs a coefficient set including the coefficients of each tap.
  • the coefficient construction unit 263 outputs the constructed coefficient set to the filter calculation unit 264.
  • the filter operation unit 264 performs an operation using the tap image data supplied from the tap construction unit 262 and the coefficient supplied from the coefficient construction unit 263, and generates image data after the loop filter processing.
  • the filter control unit 269 supplies a control signal to the memory 261 and controls storage of the image data in the memory 261 and reading of the stored image data.
  • the filter control unit 269 selects a filter to be used for loop filter processing.
  • the filter control unit 269 includes a processing position determination unit 2691 and controls the tap construction unit 262 and the coefficient construction unit 263 based on the determination result of the pixel position where the loop filter process is performed.
  • the filter control unit 269 selects a filter having a size with a minimum number of taps in the block boundary direction, a tap located within a predetermined range based on the position of the pixel to be filtered and a tap in which no image data is stored in the memory 261
  • the coefficient set used for copying or filtering the image data is changed with respect to the determined tap so that the filter calculation is performed without using the image data not stored in the predetermined range and in the memory 261.
  • the filter control unit 269 copies image data that has been subjected to SAO processing as image data at a pixel position that has not been subjected to SAO processing.
  • the filter control unit 269 uses the image data stored in the memory 261 as image data of a pixel position in which no image data is stored. Duplicate.
  • the loop filter processing unit 58 of the image decoding apparatus performs filter size selection and coefficient set setting based on information relating to loop filter processing included in the encoded stream.
  • step ST71 the loop filter processing unit 26 initializes the target image position and proceeds to step ST72.
  • step ST72 the loop filter processing unit 26 determines the target pixel position.
  • the loop filter processing unit 26 sets the position of the pixel on which the loop filter process is performed as the target pixel position, and proceeds to step ST73.
  • step ST73 the loop filter processing unit 26 determines whether the filter size is 5 ⁇ 5 pixels.
  • the loop filter processing unit 26 proceeds to step ST86 when a 5 ⁇ 5 pixel filter is used, and proceeds to step ST74 when an 11 ⁇ 5 pixel filter is used.
  • step ST74 the loop filter processing unit 26 determines whether the target pixel position is the fifth pixel column to the left from the input boundary.
  • the loop filter processing unit 26 cannot perform SAO processing because the SAO processing is performed and the image data is input to the loop filter processing unit 26 and the deblocking filter processing is not performed.
  • a boundary with a pixel where image data after SAO processing cannot be input to the unit 26 is set as an input boundary.
  • the loop filter processing unit 26 proceeds to step ST75, and when the target pixel position is located on the left or right side of the left five pixel column from the input boundary. Then, the process proceeds to step ST76.
  • step ST75 the loop filter processing unit 26 copies the image data for one pixel from the right end of the tap.
  • the loop filter processing unit 26 copies, for example, the image data of the SAO-processed pixel adjacent to the left side as the image data of one pixel from the right end of the tap at the pixel position where the SAO process is not performed, and proceeds to step ST86.
  • step ST76 the loop filter processing unit 26 determines whether the target pixel position is the fourth pixel column on the left from the input boundary. When the target pixel position is the fourth pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST77. If the target pixel position is located on the left side of the fifth pixel column on the left from the input boundary or on the right side of the fourth pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST78.
  • step ST77 the loop filter processing unit 26 copies the image data for two pixels from the right end of the tap.
  • the loop filter processing unit 26 copies, for example, image data of SAO-processed pixels adjacent to the left side as image data for two pixels from the right end of the tap at the pixel position where SAO processing is not performed, and the process proceeds to step ST86. .
  • step ST78 the loop filter processing unit 26 determines whether the target pixel position is the third pixel column on the left from the input boundary. When the target pixel position is the third pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST79. If the target pixel position is located on the left side of the fifth pixel column on the left from the input boundary or on the right side of the third pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST80.
  • step ST79 the loop filter processing unit 26 copies image data for three pixels from the right end of the tap.
  • the loop filter processing unit 26 copies, for example, image data of SAO-processed pixels adjacent to the left side as image data for three pixels from the right end of the tap at the pixel position where SAO processing is not performed, and the process proceeds to step ST86. .
  • step ST80 the loop filter processing unit 26 determines whether the target pixel position is the second pixel column on the left from the input boundary. If the target pixel position is the second pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST81. If the target pixel position is located on the left side of the fifth pixel column on the left from the input boundary or on the right side of the second pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST82.
  • step ST81 the loop filter processing unit 26 copies image data for three pixels from the left end of the tap.
  • the loop filter processing unit 26 copies, for example, image data stored in pixels adjacent to the right side as image data for three pixels from the left end of the tap at a pixel position in which image data is not stored, and the process proceeds to step ST86. .
  • step ST82 the loop filter processing unit 26 determines whether the target pixel position is the first pixel row on the left from the input boundary. When the target pixel position is the first pixel column on the left from the input boundary, the loop filter processing unit 26 proceeds to step ST83. If the target pixel position is located on the left side of the fifth pixel column on the left from the input boundary or on the right side of the input boundary, the loop filter processing unit 26 proceeds to step ST84.
  • step ST83 the loop filter processing unit 26 copies image data for two pixels from the left end of the tap.
  • the loop filter processing unit 26 copies, for example, image data stored in pixels adjacent to the right side as image data of two pixels from the left end of the tap at the pixel position in which no image data is stored, and proceeds to step ST86.
  • step ST84 the loop filter processing unit 26 determines whether the target pixel position is the first pixel row on the right side from the input boundary. If the target pixel position is the first pixel column on the right side from the input boundary, the loop filter processing unit 26 proceeds to step ST85. If the target pixel position is located on the left side of the fifth pixel column on the left from the input boundary or on the right side of the first pixel column on the right from the input boundary, the loop filter processing unit 26 proceeds to step ST86.
  • step ST85 the loop filter processing unit 26 copies the image data for one pixel from the left end of the tap.
  • the loop filter processing unit 26 copies, for example, image data stored in pixels adjacent to the right side as image data of one pixel from the left end of the tap at a pixel position where no image data is stored, and the process proceeds to step ST86.
  • step ST86 the loop filter processing unit 26 performs a filter operation.
  • the loop filter processing unit 26 performs the processing from step ST74 to step ST85, so that even when the horizontal tap size is 11 pixels, the position is not subjected to SAO processing or the position where image data is not stored.
  • the image data for each tap can be determined. Therefore, the loop filter processing unit 26 performs an operation using the image data and filter coefficient of each tap, calculates the image data after the filter processing at the target pixel position, and proceeds to step ST87.
  • step ST87 the loop filter processing unit 26 determines whether the target pixel position is the third pixel column on the left from the input boundary. When the loop filter processing of the third pixel column on the left from the input boundary is completed, the loop filter processing unit 26 ends the loop filter processing of the block. Thereafter, the loop filter processing unit 26 performs deblocking filter processing using image data of adjacent blocks and SAO processing using image data after the deblocking filter processing, and image data located on the right side from the input boundary is input. In such a case, loop filter processing is performed from the position of the second pixel column on the left from the input boundary.
  • step ST88 the loop filter processing unit 26 moves the target pixel position.
  • the loop filter processing unit 26 moves to the pixel position next to the target pixel position and returns to step ST72.
  • FIG. 17 and 18 illustrate the operation of the tap construction unit 262.
  • FIG. 17 exemplifies processing until the target pixel position is the third pixel column on the left from the input boundary IB (the seventh pixel column on the left from the right block boundary BB).
  • the image data of the pixel located on the right side of the input boundary IB is input, and the target pixel position is shifted from the second pixel column on the left side of the input boundary IB (the sixth pixel column on the left side from the right block boundary BB) to the right side.
  • the process up to the second pixel column (from the right block boundary BB to the left three pixel column) is shown.
  • FIG. 17A shows the number of taps with a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the sixth pixel column on the left from the input boundary IB (the tenth pixel column on the left from the right block boundary BB). The case is illustrated.
  • the target pixel position is the position of the sixth pixel column on the left from the input boundary IB
  • the image data of each tap is subjected to SAO processing. Therefore, the filter operation is performed without copying the image data.
  • FIG. 17B shows the number of taps having a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the fifth pixel column on the left from the input boundary IB (the ninth pixel column on the left from the right block boundary BB).
  • the target pixel position is the position of the fifth pixel column on the left from the input boundary IB
  • the position of the first pixel from the right end of the tap is the position of the pixel on which SAO processing has not been performed. Therefore, the processing of step ST75 described above is performed, and the filter operation is performed by copying the SAO-processed pixel image data Pb11 adjacent to the left side as the image data Pb12 of one pixel from the right end of the tap.
  • FIG. 17C shows the number of taps with a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the fourth pixel column on the left from the input boundary IB (the eighth pixel column on the left from the right block boundary BB). The case is illustrated.
  • the target pixel position is the position of the fourth pixel column on the left from the input boundary IB
  • the position from the right end of the tap to the second pixel is the position of the pixel on which SAO processing is not performed.
  • step ST77 the process of step ST77 described above is performed, and the SAO-processed pixels adjacent to the left side, that is, the image data Pb10 of the third pixel from the right end of the tap are copied as the image data Pb11 and Pb12 from the right end of the tap to the second pixel. Perform a filter operation.
  • FIG. 17D shows the number of taps with a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the third pixel column on the left from the input boundary IB (the seventh pixel column on the left from the right block boundary BB). The case is illustrated.
  • the target pixel position is the position of the third pixel column on the left from the input boundary IB
  • the position from the right end of the tap to the third pixel is the position of the pixel on which SAO processing is not performed.
  • step ST79 the process of step ST79 described above is performed, and the SAO-processed pixel adjacent to the left side, that is, the image data Pb9 of the fourth pixel from the right end of the tap is copied as the image data Pb10, Pb11, Pb12 from the right end of the tap. Filter operation.
  • the filter size is the number of taps of 5 ⁇ 5 pixels
  • the target pixel position is the position of the third pixel column on the left from the input boundary IB (the seventh pixel column on the left from the right block boundary BB). The case where it is is illustrated.
  • the target pixel position is the position of the third column on the left from the input boundary IB, the image data of each tap is subjected to SAO processing.
  • the filter can be performed up to a pixel position that can be processed by the minimum size filter having the number of taps of 5 ⁇ 5 pixels. Processing can proceed.
  • FIG. 18A shows the number of taps with a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the second pixel column on the left from the input boundary IB (the sixth pixel column on the left from the right block boundary BB).
  • the target pixel position is the position of the second pixel column on the left from the input boundary IB
  • the image data from the left end of the tap to the third pixel is not stored in the memory
  • the image data from the fourth pixel to the seventh pixel is Stored in memory.
  • the image data from the 8th pixel to the 11th pixel is supplied from the SAO unit 25 after being subjected to SAO processing.
  • the loop filter processing unit 26 stores the fourth pixel from the left end of the tap adjacent to the right side as image data Pb2, Pb3, Pb4 from the left end of the tap to the third pixel at the pixel position where no image data is stored.
  • the image data Pb5 being copied is copied and a filter operation is performed.
  • FIG. 18B shows the number of taps with a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the first pixel column on the left from the input boundary IB (the fifth pixel column on the left from the right block boundary BB).
  • the target pixel position is the position of the first pixel column on the left from the input boundary IB
  • the image data from the left end of the tap to the second pixel is not stored in the memory
  • the image data from the third pixel to the sixth pixel is Stored in memory.
  • the image data from the seventh pixel to the eleventh pixel is subjected to SAO processing and supplied from the SAO unit 25.
  • FIG. 18C shows the number of taps with a filter size of 11 ⁇ 5 pixels
  • the target pixel position is the position of the first pixel column on the right from the input boundary IB (the fourth pixel column on the left from the right block boundary BB).
  • the target pixel position is the position of the first pixel column on the right from the input boundary IB
  • the image data from the left end of the tap to the first pixel is not stored in the memory
  • the image data from the second pixel to the fifth pixel is Stored in memory.
  • the image data from the sixth pixel to the eleventh pixel is subjected to SAO processing and supplied from the SAO unit 25.
  • the loop filter processing unit 26 uses the image data Pb3 stored in the second pixel from the left end of the tap adjacent to the right side as the image data Pb2 of one pixel from the left end of the tap at the pixel position where no image data is stored. Copy and perform filter operation.
  • loop filter processing is performed by selectively using taps having different sizes in the vertical direction.
  • loop filter processing is performed by selectively using taps having different sizes in the vertical direction.
  • the same processing may be performed.
  • the memory capacity of the line memory is set according to the tap having the smallest vertical size, if the tap is not the smallest in the vertical size, the image data can be copied or the filter coefficient can be changed.
  • Loop filter processing can be performed.
  • the number of filter taps, the tap arrangement, the number of filters of different sizes, etc. in the above-described embodiment are merely examples, and are not limited to the embodiment.
  • the terms “block” and “macroblock” include a coding unit (CU), a prediction unit (PU), and a transform unit (TU) in the context of HEVC. Shall be.
  • the image encoding device 10 and the image decoding device 50 according to the above-described embodiment using the image processing device of the present technology are used for satellite broadcasting, cable broadcasting such as cable TV, distribution on the Internet, and terminal communication using cellular communication.
  • the present invention can be applied to various electronic devices such as a transmitter or receiver in distribution, a recording device that records an image on a medium such as an optical disk, a magnetic disk, and a flash memory, or a reproducing device that reproduces an image from these storage media.
  • a transmitter or receiver in distribution a recording device that records an image on a medium such as an optical disk, a magnetic disk, and a flash memory, or a reproducing device that reproduces an image from these storage media.
  • FIG. 19 shows an example of a schematic configuration of a television apparatus to which the above-described embodiment 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.
  • Tuner 902 extracts a signal of a desired channel from a broadcast signal received via antenna 901, and demodulates the extracted signal. Then, the tuner 902 outputs the encoded bit stream obtained by the demodulation to the demultiplexer 903. That is, the tuner 902 has a role as a transmission unit in the television device 90 that receives an encoded stream in which an image is encoded.
  • the user interface unit 911 is connected to the control unit 910.
  • the user interface unit 911 includes, for example, buttons and switches for the user to operate the television device 90, a remote control signal receiving unit, and the like.
  • the user interface unit 911 detects an operation by the user via these components, generates an operation signal, and outputs the generated operation signal to the control unit 910.
  • the bus 912 connects the tuner 902, the demultiplexer 903, the decoder 904, the video signal processing unit 905, the audio signal processing unit 907, the external interface unit 909, and the control unit 910 to each other.
  • FIG. 20 shows an example of a schematic configuration of a mobile phone to which the above-described embodiment is applied.
  • the cellular phone 92 includes an antenna 921, a communication unit 922, an audio codec 923, a speaker 924, a microphone 925, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, a control unit 931, and an operation.
  • a portion 932 and a bus 933 includes an antenna 921, a communication unit 922, an audio codec 923, a speaker 924, a microphone 925, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, a control unit 931, and an operation.
  • a portion 932 and a bus 933 is a bus 933.
  • the analog voice signal generated by the microphone 925 is supplied to the voice codec 923.
  • the audio codec 923 converts an analog audio signal into audio data, A / D converts the converted audio data, and compresses it. Then, the audio codec 923 outputs the compressed audio data to the communication unit 922.
  • the communication unit 922 encodes and modulates audio data, and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921. In addition, the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal.
  • Communication unit 922 then demodulates and decodes the received signal to generate audio data, and outputs the generated audio data to audio codec 923.
  • the audio codec 923 expands the audio data and performs D / A conversion to generate an analog audio signal. Then, the audio codec 923 supplies the generated audio signal to the speaker 924 to output audio.
  • Communication unit 922 then demodulates and decodes the received signal to restore the stream, and outputs the restored stream to demultiplexing unit 928.
  • the demultiplexing unit 928 separates the video stream and the audio stream from the input stream, and outputs the video stream to the image processing unit 927 and the audio stream to the audio codec 923.
  • the image processing unit 927 decodes the video stream and generates video data.
  • the video data is supplied to the display unit 930, and a series of images is displayed on the display unit 930.
  • the audio codec 923 decompresses the audio stream and performs D / A conversion to generate an analog audio signal. Then, the audio codec 923 supplies the generated audio signal to the speaker 924 to output audio.
  • the recording / reproducing apparatus 94 includes a tuner 941, an external interface unit 942, an encoder 943, an HDD (Hard Disk Drive) 944, a disk drive 945, a selector 946, a decoder 947, an OSD (On-Screen Display) unit 948, a control unit 949, and A user interface unit 950 is provided.
  • the external interface unit 942 is an interface for connecting the recording / reproducing device 94 to an external device or a network.
  • the external interface unit 942 may be, for example, an IEEE 1394 interface, a network interface, a USB interface, or a flash memory interface.
  • video data and audio data received via the external interface unit 942 are input to the encoder 943. That is, the external interface unit 942 has a role as a transmission unit in the recording / reproducing apparatus 94.
  • the encoder 943 encodes video data and audio data when the video data and audio data input from the external interface unit 942 are not encoded. Then, the encoder 943 outputs the encoded bit stream to the selector 946.
  • the HDD 944 records an encoded bit stream in which content data such as video and audio are compressed, various programs, and other data are recorded on an internal hard disk. Further, the HDD 944 reads out these data from the hard disk when reproducing video and audio.
  • the disk drive 945 performs recording and reading of data with respect to the mounted recording medium.
  • the recording medium mounted on the disk drive 945 may be, for example, a DVD disk (DVD-Video, DVD-RAM, DVD-R, DVD-RW, DVD + R, DVD + RW, etc.) or a Blu-ray (registered trademark) disk.
  • the selector 946 selects an encoded bit stream input from the tuner 941 or the encoder 943 when recording video and audio, and outputs the selected encoded bit stream to the HDD 944 or the disk drive 945. In addition, the selector 946 outputs the encoded bit stream input from the HDD 944 or the disk drive 945 to the decoder 947 during video and audio reproduction.
  • the user interface unit 950 is connected to the control unit 949.
  • the user interface unit 950 includes, for example, buttons and switches for the user to operate the recording / reproducing device 94, a remote control signal receiving unit, and the like.
  • the user interface unit 950 detects an operation by the user via these components, generates an operation signal, and outputs the generated operation signal to the control unit 949.
  • the camera signal processing unit 963 performs various camera signal processing such as knee correction, gamma correction, and color correction on the image signal input from the imaging unit 962.
  • the camera signal processing unit 963 outputs the image data after the camera signal processing to the image processing unit 964.
  • the image processing unit 964 encodes the image data input from the camera signal processing unit 963, and generates encoded data. Then, the image processing unit 964 outputs the generated encoded data to the external interface unit 966 or the media drive 968. In addition, the image processing unit 964 decodes encoded data input from the external interface unit 966 or the media drive 968 to generate image data. Then, the image processing unit 964 outputs the generated image data to the display unit 965. In addition, the image processing unit 964 may display the image by outputting the image data input from the camera signal processing unit 963 to the display unit 965. Further, the image processing unit 964 may superimpose display data acquired from the OSD unit 969 on an image output to the display unit 965.

Landscapes

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

Abstract

 メモリ261は、例えば右側ブロック境界に対して直交する水平方向のタップ数が最小であるフィルタサイズで右側ブロック境界から所定範囲内の画像のフィルタ演算を行う場合におけるフィルタ演算に用いられる所定範囲に含まれていない領域の画像データを記憶する。フィルタ制御部269は、水平方向のタップ数が最小でないフィルタサイズが選択されている場合、フィルタ処理対象画素の位置に基づき所定範囲内に位置するタップおよびメモリに画像データが記憶されていないタップを判別して、所定範囲内およびメモリに記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対して画像データの複写またはフィルタ演算で用いる係数セットの変更を行う。ループフィルタ処理で用いるメモリのメモリ容量を削減できる。

Description

画像処理装置と画像処理方法
 この技術は、画像処理装置と画像処理方法に関する。詳しくは、ブロック単位で符号化処理と復号処理が行われた画像のループフィルタ処理で用いるメモリのメモリ容量を削減できるようにする。
 近年、画像情報をディジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮するMPEG2(ISO(International Organization for Standardization)/IEC(International Electrotechnical Commission)13818-2)などの方式に準拠した装置が、放送局などの情報配信、および一般家庭における情報受信の双方において普及している。また、MPEG2等に比べ、その符号化、復号により多くの演算量が要求されるものの、より高い符号化効率が実現されることができるH.264およびMPEG4 Part10(AVC:Advanced Video Coding)と呼ばれる方式も用いられるようになった。さらに、昨今、ハイビジョン画像の4倍の、4000×2000画素程度の高解像度画像の圧縮や配信等を効率よく行うことができるように、次世代の画像符号化方式であるHEVC(High Efficiency Video Coding)の標準化作業が、ITU-TとISO/IECとの共同の標準化団体であるJCTVC(Joint Collaboration Team - Video Coding)により進められている。
 このような高い符号化効率を実現する画像符号化方式では、適応ループフィルタ(ALF:Adaptive Loop Filter)を用いて、デブロッキングフィルタ処理で残ってしまったブロック歪みや量子化による歪みの低減がはかられている(特許文献1,非特許文献1)。
 また、HEVCでは、非特許文献2に開示されているPQAO(Picture Quality Adaptive Offset))をデブロックフィルタと適応ループフィルタの間に設けることが検討されている。オフセットの種類としては、バンドオフセットと呼ばれるものが2種類、エッジオフセットと呼ばれるものが6種類あり、さらに、オフセットを適応しないことも可能である。そして、画像をquad-treeに分割し、それぞれの領域に、上述したどのオフセットの種類により符号化するかを選択することで符号化効率を向上させる。
特開2011-49740号公報
Ken.McCann(Samsung/ZetaCast),Benjamin.Bross(HHI),Shun-ichi.Sekiguchi(Mitsubishi),Woo-Jin.Han (Samsung),"JCTVC-E602 HM3: High Efficiency Video Coding(HEVC) Test Model 3 Encoder Description",Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11,5th Meeting: Geneva, CH, 16-23 March, 2011 "CE8 Subtest 3:Picture Quality Adaptive Offset",JCTVC-D122,2011年1月
 ところで、画像をブロック単位でラスタースキャン方向に処理する場合、デブロッキングフィルタ処理における水平フィルタは、所望のブロック(カレントブロック)と、カレントブロックの右側に隣接するブロックの画像データを用いて行われる。また、カレントブロックのループフィルタ処理は、デブロッキングフィルタ処理、またはデブロッキングフィルタ処理とSAO処理が行われた後の画像データを用いて行われる。このため、デブロッキングフィルタ処理後の画像を用いてループフィルタ処理を行うことができるように、画像データをメモリに記憶しておく必要がある。
 図1は、従来のループフィルタ処理においてメモリに記憶する画像データを説明するための図である。デブロッキングフィルタ処理における水平フィルタでは、図1の(A)に示すように、ブロック境界から例えば4画素列分の画像データを用いてブロック境界から3画素列分のフィルタ処理後の画像データを生成する。なお、デブロッキングフィルタの処理対象画素を二重丸で示している。また、ブロック例えばLCU(Largest Coding Unit)mとLCUm+1のブロック境界を「BB」として示している。
 適応ループフィルタでは、例えば図1の(B),(C)に示すように、適応ループフィルタの処理対象画素(黒四角で示す)に対してタップを設定して、タップの画像データを用いてフィルタ演算が行われる。タップは、例えば黒丸で示す位置と処理対象画素の位置に構築されており、図では5×5画素のタップを用いるフィルタサイズを例示している。
 ここで、図1の(B)に示すように、LCUmにおけるループフィルタ処理の対象画素がブロック境界BBから左6画素列目の画素である場合、タップはデブロッキングフィルタのフィルタ処理範囲に含まれない。したがって、ループフィルタ処理を行う画像処理装置は、デブロッキングフィルタ処理後の画像データを用いることなくループフィルタ処理が可能である。しかし、図1の(C)に示すように、ループフィルタ処理の対象画素がブロック境界BBから左5画素列目の画素となると、タップはデブロッキングフィルタのフィルタ処理範囲に含まれる。すなわち、ループフィルタ処理では、デブロッキングフィルタ処理後の画像データが必要となる。したがって、ループフィルタ処理を行う画像処理装置は、デブロッキングフィルタ処理後にループフィルタ処理を行うため、左7画素列目から左4画素列目までの4画素列分の画像データをメモリに記憶しておく必要がある。
 また、ループフィルタ処理における水平方向のタップ数が大きくなると、メモリに記憶する画像データを増やさなければならない。例えば図1の(D)に示すように11×5画素のタップを用いるフィルタサイズとする場合、ループフィルタ処理の対象画素がブロック境界BBから左8画素列目の位置となると、タップはデブロッキングフィルタのフィルタ処理範囲に含まれる。すなわち、ループフィルタ処理では、デブロッキングフィルタ処理後の画像データが必要となる。したがって、ループフィルタ処理を行う画像処理装置は、デブロッキングフィルタ処理後にループフィルタ処理を行うため、左13画素列目から左4画素列目までの10画素列分の画像データをメモリに記憶しなければならない。
 さらに、フィルタサイズを切り替えてループフィルタ処理を行う場合、水平方向のタップ数が最も大きいフィルタサイズに対応した画素列分の画像データを記憶する必要があり、容量の大きいメモリが必要となってしまう。
 そこで、この技術ではループフィルタ処理で用いるメモリのメモリ容量を削減できる画像処理装置と画像処理方法を提供する。
 この技術の第1の側面は、符号化ストリームを復号処理して画像を生成する復号部と、前記復号部により生成されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行うフィルタ演算部と、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小であるフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データを記憶するメモリと、前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズが選択されている場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行うフィルタ制御部とを備える画像処理装置にある。
 この技術においては、符号化ストリームを復号処理して生成されたCU単位の画像ループフィルタ処理を行う場合に、所定ブロック境界の境界方向に対して直交する方向、例えば右側ブロック境界に対して直交する水平方向のタップ数が最小であるフィルタサイズで右側ブロック境界から所定範囲内、例えばデブロッキングフィルタ処理のフィルタ処理範囲内、またSAO(Sample Adaptive Offset)処理を行う場合、デブロッキングフィルタ処理が行われていないためにSAO処理を行うことができない画素範囲内の画像のフィルタ演算に用いられる所定範囲に含まれていない画像データがメモリに記憶される。
 ここで、フィルタ制御部は、右側ブロック境界方向のタップ数が最小でないフィルタサイズが選択されている場合、フィルタ処理を行う対象画素の画像位置に基づき、画像データが得られていない所定範囲内に位置するタップおよびメモリに画像データが記憶されていないタップを判別して、所定範囲内およびメモリに記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対する画像データの複写またはフィルタ演算で用いるフィルタ係数の変更が行われる。例えば、メモリに画像データが記憶されている隣接画素の画像データが判別されたタップの画像データとして複写される。または、メモリに画像データが記憶されている隣接画素の係数が変更される。
 この技術の第2の側面は、符号化ストリームを復号処理して画像を生成する工程と、前記復号処理により生成されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行う工程と、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データをメモリに記憶する工程と、前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズが選択されている場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行う工程と含む画像処理方法にある。
 この技術の第3の側面は、画像を符号化する際にローカル復号処理されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行うフィルタ演算部と、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データを記憶するメモリと、前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズを選択する場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行うフィルタ制御部とを備える画像処理装置にある。
 この技術では、画像を符号化する際にローカル復号処理されたCU単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算が行われる。また、所定ブロック境界の境界方向に対して直交する方向、例えば右側ブロック境界に対して直交する水平方向のタップ数が最小である選択可能なフィルタサイズで右側ブロック境界から所定範囲内の画像のフィルタ演算を行う場合におけるフィルタ演算に用いられる所定範囲に含まれていない領域の画像データがメモリに記憶される。
 フィルタ制御部は、符号化効率の良いフィルタサイズを選択してフィルタ処理を行う際に、ブロック境界方向のタップ数が最小でないフィルタサイズを選択する場合は、フィルタ処理対象画素の位置に基づき所定範囲内に位置するタップおよびメモリに画像データが記憶されていないタップを判別して、所定範囲内およびメモリに記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対して画像データの複写またはフィルタ演算で用いる係数セットの変更を行う。また、フィルタ制御部は、フィルタ演算に用いたフィルタサイズと係数セットの情報を、符号化ストリームに含めるようにする。
 この技術の第4の側面は、画像を符号化する際にローカル復号処理されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行う工程と、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データをメモリに記憶する工程と、前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズを選択する場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行う工程とを含む画像処理方法にある。
 この技術によれば、メモリでは、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小であるフィルタサイズで所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる所定範囲に含まれていない領域の画像データが記憶される。また、フィルタ制御部では、ブロック境界方向のタップ数が最小でないフィルタサイズが選択されている場合、フィルタ処理対象画素の位置に基づき所定範囲内に位置するタップおよびメモリに画像データが記憶されていないタップを判別して、所定範囲内およびメモリに記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対して画像データの複写またはフィルタ演算で用いる係数セットの変更が行われる。このため、異なるサイズのフィルタを選択的に用いてフィルタ演算を行う場合に、最小サイズのフィルタに対応させて画像データをメモリに記憶させても、最小サイズよりも大きいフィルタサイズでフィルタ演算が可能となり、適応ループフィルタ処理を行うために画像データを記憶するメモリのメモリ容量を削減できる。
従来のループフィルタ処理においてメモリに記憶する画像データを説明するための図である。 画像符号化装置に適用した場合の構成を示す図である。 画像符号化動作を示すフローチャートである。 イントラ予測処理を示すフローチャートである。 インター予測処理を示すフローチャートである。 画像復号装置に適用した場合の構成を示す図である。 画像復号動作を示すフローチャートである。 記憶する画像データを説明するための図である。 quad-tree構造を説明するための図である。 エッジオフセットを説明するための図である。 エッジオフセットの規則一覧表を示す図である。 ループフィルタ処理部で選択可能なフィルタのタップを例示した図である。 メモリに記憶する画像データの範囲を示す図である。 ループフィルタ処理部の構成を例示した図である。 ループフィルタ処理部の動作を示すフローチャート(1/2)である。 ループフィルタ処理部の動作を示すフローチャート(2/2)である。 タップ構築部の動作(1/2)を例示した図である。 タップ構築部の動作(2/2)を例示した図である。 テレビジョン装置の概略的な構成の一例を示した図である。 携帯電話機の概略的な構成の一例を示した図である。 記録再生装置の概略的な構成の一例を示した図である。 撮像装置の概略的な構成の一例を示した図である。
 以下、本技術を実施するための形態について説明する。なお、説明は以下の順序で行う。
  1.画像符号化装置に適用した場合の構成
  2.画像符号化装置の動作
  3.画像復号装置に適用した場合の構成
  4.画像復号装置の動作
  5.ループフィルタ処理部の構成と動作
  6.応用例
 <1.画像符号化装置に適用した場合の構成>
 図2は、本技術の画像処理装置を画像符号化装置に適用した場合の構成を示している。画像符号化装置10は、アナログ/ディジタル変換部(A/D変換部)11、画面並べ替えバッファ12、減算部13、直交変換部14、量子化部15、可逆符号化部16、蓄積バッファ17、レート制御部18を備えている。さらに、画像符号化装置10は、逆量子化部21、逆直交変換部22、加算部23、デブロッキングフィルタ処理部24、SAO部25、ループフィルタ処理部26、係数メモリ27、フレームメモリ28、セレクタ29、イントラ予測部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は、予測モード情報や後述するSAO処理に関する情報や適応ループフィルタ処理に関する情報等を可逆符号化して、符号化ストリームのヘッダ情報に付加する。
 蓄積バッファ17は、可逆符号化部16からの符号化ストリームを蓄積する。また、蓄積バッファ17は、蓄積した符号化ストリームを伝送路に応じた伝送速度で出力する。
 レート制御部18は、蓄積バッファ17の空き容量の監視を行い、空き容量に応じてレート制御信号を生成して量子化部15に出力する。レート制御部18は、例えば蓄積バッファ17から空き容量を示す情報を取得する。レート制御部18は空き容量が少なくなっているとき、レート制御信号によって量子化データのビットレートを低下させる。また、レート制御部18は蓄積バッファ17の空き容量が十分大きいとき、レート制御信号によって量子化データのビットレートを高くする。
 逆量子化部21は、量子化部15から供給された量子化データの逆量子化処理を行う。逆量子化部21は、逆量子化処理を行うことで得られた変換係数データを逆直交変換部22に出力する。
 逆直交変換部22は、逆量子化部21から供給された変換係数データの逆直交変換処理を行うことで得られたデータを加算部23に出力する。
 加算部23は、逆直交変換部22から供給されたデータと予測画像・最適モード選択部33から供給された予測画像データを加算して復号画像データを生成して、デブロッキングフィルタ処理部24とフレームメモリ28に出力する。
 デブロッキングフィルタ処理部24は、画像の符号化時に生じるブロック歪みを減少させるためのフィルタ処理を行う。デブロッキングフィルタ処理部24は、加算部23から供給された復号画像データ、すなわちローカル復号処理された復号画像の画像データからブロック歪みを除去するフィルタ処理を行い、フィルタ処理後の画像データをSAO部25に出力する。
 SAO部25は、画像をquad-treeに分割し、それぞれの領域にどのようなオフセットを適用して符号化するかを選択する。SAO部25はデブロッキングフィルタ処理部24から供給された画像データに対してSAO処理すなわち選択したオフセット処理を行いループフィルタ処理部26に出力する。
 ループフィルタ処理部26は、係数メモリ27から供給された係数とSAO部25から供給された画像データを用いて、適応ループフィルタ処理(以下、単に「ループフィルタ処理」または「ALF処理」という)を行う。ループフィルタ処理部26は、フィルタとして、例えばウィナーフィルタ(Wiener Filter)が用いられる。もちろんウィナーフィルタ以外のフィルタを用いてもよい。さらに、ループフィルタ処理部26は、タップサイズの異なる複数のフィルタを有しており、ループフィルタ処理を行う。ループフィルタ処理部26は、フィルタ処理結果をフレームメモリ28に供給し、参照画像の画像データとして記憶させる。また、ループフィルタ処理部26は、後述する最適モードの選択結果に基づき符号化効率が良好となるループフィルタ処理に用いたフィルタサイズや係数セット等を示す情報を可逆符号化部16に供給して符号化ストリームに含めるようにする。
 フレームメモリ28は、加算部23から供給された復号画像データとループフィルタ処理部26から供給されたフィルタ処理後の復号画像データを参照画像の画像データとして保持する。
 セレクタ29は、イントラ予測を行うためにフレームメモリ28から読み出されたフィルタ処理前の参照画像データをイントラ予測部31に供給する。また、セレクタ29は、インター予測を行うためフレームメモリ28から読み出されたフィルタ処理後の参照画像データを動き予測・補償部32に供給する。
 イントラ予測部31は、画面並べ替えバッファ12から出力された符号化対象画像の画像データとフレームメモリ28から読み出したフィルタ処理前の参照画像データを用いて、候補となる全てのイントラ予測モードのイントラ予測処理を行う。さらに、イントラ予測部31は、各イントラ予測モードに対してコスト関数値を算出して、算出したコスト関数値が最小となるイントラ予測モード、すなわち符号化効率が最良となるイントラ予測モードを、最適イントラ予測モードとして選択する。イントラ予測部31は、最適イントラ予測モードで生成された予測画像データと最適イントラ予測モードに関する予測モード情報、および最適イントラ予測モードでのコスト関数値を予測画像・最適モード選択部33に出力する。また、イントラ予測部31は、後述するようにコスト関数値の算出で用いる発生符号量を得るため、各イントラ予測モードのイントラ予測処理において、イントラ予測モードに関する予測モード情報を可逆符号化部16に出力する。
 動き予測・補償部32は、マクロブロックに対応する全ての予測ブロックサイズで動き予測・補償処理を行う。動き予測・補償部32は、画面並べ替えバッファ12から読み出された符号化対象画像における各予測ブロックサイズの画像毎に、フレームメモリ28から読み出されたフィルタ処理後の参照画像データを用いて動きベクトルを検出する。さらに、動き予測・補償部32は、検出した動きベクトルに基づいて復号画像に動き補償処理を施して予測画像の生成を行う。また、動き予測・補償部32は、各予測ブロックサイズやループフィルタ処理部26のフィルタサイズや係数セット毎にコスト関数値を算出する。動き予測・補償部32は、算出したコスト関数値が最小となる予測ブロックサイズやループフィルタ処理のフィルタサイズおよび係数セットを、最適インター予測モードとして選択する。動き予測・補償部32は、最適インター予測モードで生成された予測画像データと最適インター予測モードに関する予測モード情報、および最適インター予測モードでのコスト関数値を予測画像・最適モード選択部33に出力する。また、動き予測・補償部32は、コスト関数値の算出で用いる発生符号量を得るため、各予測ブロックサイズでのインター予測処理において、インター予測モードに関する予測モード情報を可逆符号化部16に出力する。
 予測画像・最適モード選択部33は、イントラ予測部31から供給されたコスト関数値と動き予測・補償部32から供給されたコスト関数値を、マクロブロック単位で比較して、コスト関数値が少ない方を、符号化効率が最良となる最適モードとして選択する。また、予測画像・最適モード選択部33は、最適モードで生成した予測画像データを減算部13と加算部23に出力する。さらに、予測画像・最適モード選択部33は、最適モードの予測モード情報を可逆符号化部16に出力する。なお、予測画像・最適モード選択部33は、スライス単位でイントラ予測またはインター予測を行うようにしてもよい。
 なお、請求項における符号化部は、予測画像データを生成するイントラ予測部31や動き予測・補償部32、予測画像・最適モード選択部33、減算部13、直交変換部14、量子化部15、可逆符号化部16等で構成される。
 <2.画像符号化装置の動作>
 図3は、画像符号化動作を示すフローチャートである。ステップST11において、A/D変換部11は入力された画像信号をA/D変換する。
 ステップST12において画面並べ替えバッファ12は、画面並べ替えを行う。画面並べ替えバッファ12は、A/D変換部11より供給された画像データを記憶し、各ピクチャの表示する順番から符号化する順番への並べ替えを行う。
 ステップST13において減算部13は、予測誤差データの生成を行う。減算部13は、ステップST12で並べ替えられた画像の画像データと予測画像・最適モード選択部33で選択された予測画像データとの差分を算出して予測誤差データを生成する。予測誤差データは、元の画像データに比べてデータ量が小さい。したがって、画像をそのまま符号化する場合に比べて、データ量を圧縮することができる。なお、予測画像・最適モード選択部33でイントラ予測部31から供給された予測画像と動き予測・補償部32からの予測画像の選択がスライス単位で行われる場合、イントラ予測部31から供給された予測画像が選択されたスライスでは、イントラ予測が行われる。また、動き予測・補償部32からの予測画像が選択されたスライスでは、インター予測が行われる。
 ステップST14において直交変換部14は、直交変換処理を行う。直交変換部14は、減算部13から供給された予測誤差データを直交変換する。具体的には、予測誤差データに対して離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数データを出力する。
 ステップST15において量子化部15は、量子化処理を行う。量子化部15は、変換係数データを量子化する。量子化に際しては、後述するステップST26の処理で説明されるように、レート制御が行われる。
 ステップST16において逆量子化部21は、逆量子化処理を行う。逆量子化部21は、量子化部15により量子化された変換係数データを量子化部15の特性に対応する特性で逆量子化する。
 ステップST17において逆直交変換部22は、逆直交変換処理を行う。逆直交変換部22は、逆量子化部21により逆量子化された変換係数データを直交変換部14の特性に対応する特性で逆直交変換する。
 ステップST18において加算部23は、復号画像データの生成を行う。加算部23は、予測画像・最適モード選択部33から供給された予測画像データと、この予測画像と対応する位置の逆直交変換後のデータを加算して、復号画像データを生成する。
 ステップST19においてデブロッキングフィルタ処理部24は、デブロッキングフィルタ処理を行う。デブロッキングフィルタ処理部24は、加算部23より出力された復号画像データをフィルタリングしてブロック歪みを除去する。
 ステップST20においてSAO部25は、適応的にオフセット処理を行う。SAO部25は、デブロッキングフィルタ処理部24より出力された画像データに対してSAO処理を行う。
 ステップST21においてループフィルタ処理部26は、ループフィルタ処理を行う。ループフィルタ処理部26は、デブロッキングフィルタ処理やSAO処理が行われた復号画像データをフィルタリングして、デブロッキングフィルタ処理等で残ってしまったブロック歪みや量子化による歪み等を低減する。
 ステップST22においてフレームメモリ28は、復号画像データを記憶する。フレームメモリ28は、デブロッキングフィルタ処理前の復号画像データとループフィルタ処理後の復号画像データを記憶する。
 ステップST23においてイントラ予測部31と動き予測・補償部32は、それぞれ予測処理を行う。すなわち、イントラ予測部31は、イントラ予測モードのイントラ予測処理を行い、動き予測・補償部32は、インター予測モードの動き予測・補償処理を行う。この処理により、候補となる全ての予測モードでの予測処理がそれぞれ行われ、候補となる全ての予測モードでのコスト関数値がそれぞれ算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードが選択され、選択された予測モードで生成された予測画像とそのコスト関数および予測モード情報が予測画像・最適モード選択部33に供給される。
 ステップST24において予測画像・最適モード選択部33は、予測画像データの選択を行う。予測画像・最適モード選択部33は、イントラ予測部31および動き予測・補償部32より出力された各コスト関数値に基づいて、符号化効率が最良となる最適モードに決定する。さらに、予測画像・最適モード選択部33は、決定した最適モードの予測画像データを選択して、減算部13と加算部23に供給する。この予測画像が、上述したように、ステップST13,ST18の演算に利用される。
 ステップST25において可逆符号化部16は、可逆符号化処理を行う。可逆符号化部16は、量子化部15より出力された量子化データを可逆符号化する。すなわち、量子化データに対して可変長符号化や算術符号化等の可逆符号化が行われて、データ圧縮される。このとき、上述したステップST22において可逆符号化部16に入力された予測モード情報(例えばマクロブロックタイプや予測モード、動きベクトル情報、参照ピクチャ情報等を含む)なども可逆符号化される。さらに、量子化データを可逆符号化して生成された符号化ストリームのヘッダ情報に、予測モード情報の可逆符号化データが付加される。
 ステップST26において蓄積バッファ17は、蓄積処理を行い符号化ストリームを蓄積する。この蓄積バッファ17に蓄積された符号化ストリームは適宜読み出され、伝送路を介して復号側に伝送される。
 ステップST27においてレート制御部18は、レート制御を行う。レート制御部18は、蓄積バッファ17で符号化ストリームを蓄積するとき、オーバーフローまたはアンダーフローが蓄積バッファ17で発生しないように、量子化部15の量子化動作のレートを制御する。
 次に、図3のステップST23における予測処理を説明する。予測処理では、イントラ予測処理とインター予測処理を行う。イントラ予測処理では、処理対象のブロックの画像を、候補となる全てのイントラ予測モードでイントラ予測する。なお、イントラ予測において参照される参照画像の画像データは、デブロッキングフィルタ処理部24とループフィルタ処理部26によりフィルタ処理が行われることなくフレームメモリ28に記憶されている参照画像データが用いられる。イントラ予測処理の詳細は後述するが、この処理により、候補となる全てのイントラ予測モードでイントラ予測が行われ、候補となる全てのイントラ予測モードに対してコスト関数値が算出される。そして、算出されたコスト関数値に基づいて、全てのイントラ予測モードの中から、符号化効率が最良となる1つのイントラ予測モードが選択される。
 インター予測処理では、フレームメモリ28に記憶されているフィルタ処理後の参照画像データを用いて、候補となる全てのインター予測モード(全ての予測ブロックサイズ)のインター予測処理を行う。インター予測処理の詳細は後述するが、この処理により、候補となる全てのインター予測モードで予測処理が行われ、候補となる全てのインター予測モードに対してコスト関数値が算出される。そして、算出されたコスト関数値に基づいて、全てのインター予測モードの中から、符号化効率が最良となる1つのインター予測モードが選択される。
 次に、イントラ予測処理について図4のフローチャートを参照して説明する。ステップST31でイントラ予測部31は、各予測モードのイントラ予測を行う。イントラ予測部31は、フレームメモリ28に記憶されているフィルタ処理前の復号画像データを用いて、イントラ予測モード毎に予測画像データを生成する。
 ステップST32でイントラ予測部31は、各予測モードに対するコスト関数値を算出する。例えば、候補となる全ての予測モードに対して、仮に可逆符号化処理までを行い、次の式(1)で表されるコスト関数値を各予測モードに対して算出する。
  Cost(Mode∈Ω)=D+λ・R      ・・・(1)
 Ωは、当該ブロック乃至マクロブロックを符号化するための候補となる予測モードの全体集合を示している。Dは、予測モードで符号化を行った場合の復号画像と入力画像との差分エネルギー(歪み)を示している。Rは、直交変換係数や予測モード情報等を含んだ発生符号量、λは、量子化パラメータQPの関数として与えられるラグランジュ乗数である。
 また、候補となる全ての予測モードに対して、予測画像の生成、および、動きベクトル情報や予測モード情報などのヘッダビットまでを算出し、次の式(2)で表されるコスト関数値を各予測モードに対して算出する。
  Cost(Mode∈Ω)=D+QPtoQuant(QP)・Header_Bit   ・・・(2)
 Ωは、当該ブロック乃至マクロブロックを符号化するための候補となる予測モードの全体集合を示している。Dは、予測モードで符号化を行った場合の復号画像と入力画像との差分エネルギー(歪み)を示している。Header_Bitは、予測モードに対するヘッダビット、QPtoQuantは、量子化パラメータQPの関数として与えられる関数である。
 ステップST33でイントラ予測部31は、最適イントラ予測モードを決定する。イントラ予測部31は、ステップST32において算出されたコスト関数値に基づいて、それらの中から、コスト関数値が最小値である1つのイントラ予測モードを選択して最適イントラ予測モードに決定する。
 次に、図5のフローチャートを参照して、インター予測処理について説明する。ステップST41で動き予測・補償部32は、各予測モードに対して動きベクトルと参照画像をそれぞれ決定する。すなわち、動き予測・補償部32は、各予測モードの処理対象のブロックについて、動きベクトルと参照画像をそれぞれ決定する。
 ステップST42で動き予測・補償部32は、各予測モードに対して動き補償を行う。動き予測・補償部32は、各予測モード(各予測ブロックサイズ)について、ステップST41で決定された動きベクトルに基づいて、参照画像に対する動き補償を行い、各予測モードについて予測画像データを生成する。
 ステップST43で動き予測・補償部32は、各予測モードに対して動きベクトル情報の生成を行う。動き予測・補償部32は、各予測モードで決定された動きベクトルについて、符号化ストリームに含める動きベクトル情報を生成する。例えば、メディアン予測等を用いて予測動きベクトルを決定して、動き予測により検出した動きベクトルと予測動きベクトルの差を示す動きベクトル情報を生成する。このようにして生成された動きベクトル情報は、次のステップST44におけるコスト関数値の算出にも用いられて、最終的に予測画像・最適モード選択部33で対応する予測画像が選択された場合には、予測モード情報に含まれて可逆符号化部16へ出力される。
 ステップST44で動き予測・補償部32は、各インター予測モードに対して、コスト関数値の算出を行う。動き予測・補償部32は、上述した式(1)または式(2)を用いてコスト関数値の算出を行う。
 ステップST45で動き予測・補償部32は、最適インター予測モードを決定する。動き予測・補償部32は、ステップST44において算出されたコスト関数値に基づいて、それらの中から、コスト関数値が最小値である1つの予測モードを選択して最適インター予測モードに決定する。
 <3.画像復号装置に適用した場合の構成>
 入力画像を符号化して生成された符号化ストリームは、所定の伝送路や記録媒体等を介して画像復号装置に供給されて復号される。
 図6は、本技術の画像処理装置を画像復号装置に適用した場合の構成を示している。画像復号装置50は、蓄積バッファ51、可逆復号部52、逆量子化部53、逆直交変換部54、加算部55、デブロッキングフィルタ処理部56、SAO部57、ループフィルタ処理部58、画面並べ替えバッファ59、D/A変換部60を備えている。さらに、画像復号装置50は、フレームメモリ61、セレクタ62,65、イントラ予測部63、動き補償部64を備えている。
 蓄積バッファ51は、伝送されてきた符号化ストリームを蓄積する。可逆復号部52は、蓄積バッファ51より供給された符号化ストリームを、図2の可逆符号化部16の符号化方式に対応する方式で復号する。また、可逆復号部52は、符号化ストリームのヘッダ情報を復号して得られた予測モード情報をイントラ予測部63や動き補償部64、ループフィルタ処理の係数セットをループフィルタ処理部58に出力する。
 逆量子化部53は、可逆復号部52で復号された量子化データを、図2の量子化部15の量子化方式に対応する方式で逆量子化する。逆直交変換部54は、図2の直交変換部14の直交変換方式に対応する方式で逆量子化部53の出力を逆直交変換して加算部55に出力する。
 加算部55は、逆直交変換後のデータとセレクタ65から供給される予測画像データを加算して復号画像データを生成してデブロッキングフィルタ処理部56とフレームメモリ61に出力する。
 デブロッキングフィルタ処理部56は、加算部55から供給された復号画像データに対してフィルタ処理を行い、ブロック歪みを除去してSAO部57に出力する。
 SAO部57は、図2のSAO部25と同様に構成されており、デブロッキングフィルタ処理部56から供給された画像データに対してSAO処理を行う。すなわち、SAO部57は、quad-treeに分割された画像領域毎にどのようなオフセットを適用するか可逆復号部52によって符号化ストリームから取得したSAO処理の情報に基づき選択してオフセット処理を行う。SAO部57は、SAO処理後の画像データをループフィルタ処理部58に出力する。
 ループフィルタ処理部58は、図2のループフィルタ処理部26と同様に構成されており、可逆復号部52によって符号化ストリームから取得したループフィルタ情報に基づき、SAO処理後の画像データのループフィルタ処理を行う。ループフィルタ処理部58は、フィルタ処理後の画像データをフレームメモリ61に供給し蓄積させるとともに、画面並べ替えバッファ59に出力する。
 画面並べ替えバッファ59は、画像の並べ替えを行う。すなわち、図2の画面並べ替えバッファ12により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられて、D/A変換部60に出力される。
 D/A変換部60は、画面並べ替えバッファ59から供給された画像データをD/A変換し、図示せぬディスプレイに出力することで画像を表示させる。
 フレームメモリ61は、加算部55から供給されたフィルタ処理前の復号画像データとループフィルタ処理部58から供給されたフィルタ処理後の復号画像データとを、参照画像の画像データとして保持する。
 セレクタ62は、可逆復号部52から供給された予測モード情報に基づき、イントラ予測が行われた予測ブロックの復号が行われるとき、フレームメモリ61から読み出されたフィルタ処理前の参照画像データをイントラ予測部63に供給する。また、セレクタ29は、可逆復号部52から供給された予測モード情報に基づき、インター予測が行われた予測ブロックの復号が行われるとき、フレームメモリ61から読み出されたフィルタ処理後の参照画像データを動き補償部64に供給する。
 イントラ予測部63は、可逆復号部52から供給された予測モード情報に基づいて予測画像の生成を行い、生成した予測画像データをセレクタ65に出力する。
 動き補償部64は、可逆復号部52から供給された予測モード情報に基づいて、動き補償を行い、予測画像データを生成してセレクタ65に出力する。すなわち、動き補償部64は、予測モード情報に含まれる動きベクトル情報と参照フレーム情報に基づいて、参照フレーム情報で示された参照画像に対して動きベクトル情報に基づく動きベクトルで動き補償を行い、予測画像データを生成する。
 セレクタ65は、イントラ予測部63で生成された予測画像データを加算部55に供給する。また、セレクタ65は、動き補償部64で生成された予測画像データを加算部55に供給する。
 なお、請求項における復号部は、可逆復号部52、逆量子化部53、逆直交変換部54、加算部55、イントラ予測部63、動き補償部64等で構成される。
 <4.画像復号装置の動作>
 次に、図7のフローチャートを参照して、画像復号装置50で行われる画像復号動作について説明する。
 ステップST51で蓄積バッファ51は、伝送されてきた符号化ストリームを蓄積する。
 ステップST52で可逆復号部52は、可逆復号処理を行う。可逆復号部52は、蓄積バッファ51から供給される符号化ストリームを復号する。すなわち、図2の可逆符号化部16により符号化された各ピクチャの量子化データが得られる。また、可逆復号部52、符号化ストリームのヘッダ情報に含まれている予測モード情報の可逆復号を行い、得られた予測モード情報をデブロッキングフィルタ処理部56やセレクタ62,65に供給する。さらに、可逆復号部52は、予測モード情報がイントラ予測モードに関する情報である場合、予測モード情報をイントラ予測部63に出力する。また、可逆復号部52は、予測モード情報がインター予測モードに関する情報である場合、予測モード情報を動き補償部64に出力する。また、可逆復号部52は、符号化ストリームを復号して得られたループフィルタ処理の係数セットをループフィルタ処理部58に出力する。
 ステップST53において逆量子化部53は、逆量子化処理を行う。逆量子化部53は、可逆復号部52により復号された量子化データを、図2の量子化部15の特性に対応する特性で逆量子化する。
 ステップST54において逆直交変換部54は、逆直交変換処理を行う。逆直交変換部54は、逆量子化部53により逆量子化された変換係数データを、図2の直交変換部14の特性に対応する特性で逆直交変換する。
 ステップST55において加算部55は、復号画像データの生成を行う。加算部55は、逆直交変換処理を行うことにより得られたデータと、後述するステップST61で選択された予測画像データを加算して復号画像データを生成する。これにより元の画像が復号される。
 ステップST56においてデブロッキングフィルタ処理部56は、デブロッキングフィルタ処理を行う。デブロッキングフィルタ処理部56は、加算部55より出力された復号画像データのフィルタ処理を行い、復号画像に含まれているブロック歪みを除去する。
 ステップST57においてSAO部57は、適応的にオフセット処理を行う。SAO部57は、デブロッキングフィルタ処理部56より出力された画像データに対してSAO処理を行う。
 ステップST58においてループフィルタ処理部58は、ループフィルタ処理を行う。ループフィルタ処理部58は、SAO処理後の復号画像データをフィルタリングして、ブロック歪みや量子化による歪みを低減する。
 ステップST59においてフレームメモリ61は、復号画像データの記憶処理を行う。
 ステップST60においてイントラ予測部63と動き補償部64は、予測処理を行う。イントラ予測部63と動き補償部64は、可逆復号部52から供給される予測モード情報に対応してそれぞれ予測処理を行う。
 すなわち、可逆復号部52からイントラ予測の予測モード情報が供給された場合、イントラ予測部63は、予測モード情報に基づいてイントラ予測処理を行い、予測画像データを生成する。また、可逆復号部52からインター予測の予測モード情報が供給された場合、動き補償部64は、予測モード情報に基づき動き補償を行い、予測画像データを生成する。
 ステップST61において、セレクタ65は予測画像データの選択を行う。すなわち、セレクタ65は、イントラ予測部63から供給された予測画像と動き補償部64で生成された予測画像データを選択して加算部55に供給して、上述したように、ステップST55において逆直交変換部54の出力と加算させる。
 ステップST62において画面並べ替えバッファ59は、画像並べ替えを行う。すなわち画面並べ替えバッファ59は、図2の画像符号化装置10の画面並べ替えバッファ12により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。
 ステップST63において、D/A変換部60は、画面並べ替えバッファ59からの画像データをD/A変換する。この画像が図示せぬディスプレイに出力され、画像が表示される。
 <5.ループフィルタ処理部の構成と動作>
 [画像データの記憶]
 ここで、ループフィルタ処理部においてメモリに記憶する画像データについて説明する。LCU単位でラスタースキャン方向に処理を行う場合、デブロッキングフィルタ部では、隣接するLCUの画像データを用いてデブロッキングフィルタ処理を行うことから、LCU単位で閉じた処理とならない。また、SAO部はデブロッキングフィルタ処理後の画像データを用いており、ループフィルタ処理部はSAO処理後の画像データを用いることから、SAO部とループフィルタ処理部の処理もLCU単位で閉じた処理とならない。したがって、LCU単位でラスタースキャン方向に処理を行う場合、図8に示すように、処理対象のLCUmにおいて、右側および下側のブロック境界から斜線で示すように所定範囲の画像データをメモリに一時記憶しておく必要がある。
 ここで、SAO処理について説明する。SAO部のオフセットの種類としては、バンドオフセットと呼ばれるものが2種類、エッジオフセットと呼ばれるものが6種類あり、さらに、オフセットを適応しないことも可能である。そして、画像をquad-treeに分割し、それぞれの領域に、上述したどのオフセットの種類により符号化するかを選択することができる。
 次に、図9を参照して、quad-tree構造について説明する。例えば、画像符号化装置10では、図9の(A)に示されるように、領域0が分割されていない状態を示すLevel-0(分割深度0)のコスト関数値J0が計算される。また、領域0が4つの領域1乃至4に分割された状態を示すLevel-1(分割深度0)のコスト関数値J1,J2,J3,J4が計算される。
 そして、図9の(B)に示されるように、コスト関数値が比較され、J0>(J1+J2+J3+J4)により、コスト関数値が小さいLevel-1の分割領域(Partitions)が選択される。
 同様にして、図9の(C)に示されるように、領域0が16個の領域5乃至20に分割された状態を示すLevel-2(分割深度2)のコスト関数値J5乃至J20が計算される。
 そして、図9の(D)に示されるように、コスト関数値がそれぞれ比較され、J1<(J5+J6+J9+J10)により、領域1においては、Level-1の分割領域(Partitions)が選択される。J2>(J7+J8+J11+J12)により、領域2においては、Level-2の分割領域が選択される。J3>(J13+J14+J17+J18)により、領域3においては、Level-2の分割領域が選択される。J4>(J15+J16+J19+J20)により、領域4においては、Level-1の分割領域が選択される。
 その結果、quad-tree構造における図9の(D)に示される最終的なquad-tree領域(Partitions)が決定される。そして、quad-tree構造の決定された領域毎に、2種類のバンドオフセット、6種類のエッジオフセット、およびオフセットなしの全てについてコスト関数値が算出され、どのオフセットにより符号化されるのかが決定される。
 例えば、図9の(E)に示すように、領域1に対しては、EO(4)、すなわち、エッジオフセットのうちの4種類目が決定されている。領域7に対しては、OFF、すなわち、オフセットなしが決定されており、領域8に対しては、EO(2)、すなわち、エッジオフセットのうちの2種類目が決定されている。領域11および12に対しては、OFF、すなわち、オフセットなしが決定されている。
 また、領域13に対しては、BO(1)、すなわち、バンドオフセットのうちの1種類目が決定されており、領域14に対しては、EO(2)、すなわち、エッジオフセットのうちの2種類目が決定されている。領域17に対しては、BO(2)、すなわち、バンドオフセットのうちの2種類目が決定されており、領域18に対しては、BO(1)、すなわち、バンドオフセットのうちの1種類目が決定されている。領域4に対しては、EO(1)、すなわち、エッジオフセットのうちの1種類目が決定されている。
 次に、図10を参照して、エッジオフセットの詳細について説明する。エッジオフセットにおいては、当該画素値と、当該画素値に隣接する隣接画素値の比較が行われ、これに対応したカテゴリに対して、オフセット値が伝送されることになる。
 エッジオフセットには、図10の(A)乃至(D)に示される4つの1次元パターンと、図10の(E)および(F)に示される2つの2次元パターンが存在し、それぞれ、図11に示されるカテゴリでオフセットが伝送される。
 図10の(A)は、当該画素Cに対して、隣接画素が左右の1次元に配置されている、すなわち、図10の(A)のパターンに対して0度をなしている1-D,0-degreeパターンを表している。図10の(B)は、当該画素Cに対して、隣接画素が上下の1次元に配置されている、すなわち、図10の(A)のパターンに対して90度をなしている1-D,90-degreeパターンを表している。
 図10の(C)は、当該画素Cに対して、隣接画素が左上と右下の1次元に配置されている、すなわち、図10の(A)のパターンに対して135度をなしている1-D,135-degreeパターンを表している。図10の(D)は、当該画素Cに対して、隣接画素が右上と左下の1次元に配置されている、すなわち、図10の(A)のパターンに対して45度をなしている1-D,135-degreeパターンを表している。
 図10の(E)は、当該画素Cに対して、隣接画素が上下左右2次元に配置されている、すなわち、当該画素Cに対して交差している2-D,crossパターンを表している。図10の(F)は、当該画素Cに対して、隣接画素が右上左下、左上右下の2次元に配置されている、すなわち、当該画素Cに対して斜めに交差している2-D,diagonalパターンを表している。
 図11の(A)は、1次元パターンの規則一覧表(Classification rule for 1-D patterns)を示している。図10の(A)乃至(D)のパターンは、図11の(A)に示されるような5種類のカテゴリに分類され、そのカテゴリによりオフセットが算出されて、復号部に送られる。
 当該画素Cの画素値が2つの隣接画素の画素値より小さい場合、カテゴリ1に分類される。当該画素Cの画素値が一方の隣接画素の画素値より小さくて、他方の隣接画素の画素値と一致する場合、カテゴリ2に分類される。当該画素Cの画素値が一方の隣接画素の画素値より大きくて、他方の隣接画素の画素値と一致する場合、カテゴリ3に分類される。当該画素Cの画素値が2つの隣接画素の画素値より大きい場合、カテゴリ4に分類される。以上のどれでもない場合、カテゴリ0に分類される。
 図11の(B)は、2次元パターンの規則一覧表(Classification rule for 2-D patterns)を示している。図10の(E)および(F)のパターンは、図11の(B)に示されるような7種類のカテゴリに分類され、そのカテゴリによりオフセットが復号部に送られる。
 当該画素Cの画素値が4つの隣接画素の画素値より小さい場合、カテゴリ1に分類される。当該画素Cの画素値が3つの隣接画素の画素値より小さくて、4番目の隣接画素の画素値と一致する場合、カテゴリ2に分類される。当該画素Cの画素値が3つの隣接画素の画素値より小さくて、4番目の隣接画素の画素値より大きい場合、カテゴリ3に分類される。
 当該画素Cの画素値が3つの隣接画素の画素値より大きくて、4番目の隣接画素の画素値より小さい場合、カテゴリ4に分類される。当該画素Cの画素値が3つの隣接画素の画素値より大きくて、4番目の隣接画素の画素値と一致する場合、カテゴリ5に分類される。当該画素Cの画素値が4つの隣接画素の画素値より大きい場合、カテゴリ6に分類される。以上のどれでもない場合、カテゴリ0に分類される。
 以上のように、エッジオフセットにおいては、3×3画素の判定処理が行われることから、SAO部では、判定処理にデブロッキングフィルタのフィルタ処理対象画素が含まれる画素位置となるとオフセット処理を進めることができない。また、その後、デブロッキングフィルタでフィルタ処理が行われた場合、SAO部は、デブロッキングフィルタのフィルタ処理範囲のフィルタ処理後の画素を用いて判定処理を行う。したがって、SAO部は、デブロッキングフィルタ処理後にSAO処理を行うことができるように画像データを記憶しておく必要がある。
 さらに、ループフィルタ処理部は、ループフィルタ処理のタップ範囲にSAO部で処理が行われていない画素が含まれる画素位置となるとループフィルタ処理を進めることができない。また、その後、SAOで処理が行われた場合、ループフィルタ処理部は、SAO28で処理された画素を用いてループフィルタ処理を行う。したがって、ループフィルタ処理部は、SAO部で処理された画像データを記憶しておく必要がある。
 図12は、ループフィルタ処理部で選択可能なフィルタのタップを例示している。例えば、ループフィルタ処理部では、図12の(A)に示す水平方向のフィルタサイズが5タップであるフィルタと図12の(B)に示す水平方向のフィルタサイズが11タップであるフィルタの何れかコスト関数値が少なくなるタップを用いてフィルタ処理を行う。
 水平方向のフィルタサイズが5タップである場合の各タップをTa0~Ta16とする。また、水平方向のフィルタサイズが11タップである場合の各タップをTb0~Tb14とする。また、以下の説明では、タップTa0の画像データをPa0とする。同様にタップTa1~Ta16,Tb0~Tb14の画像データをPa1~Pa16,Pb0~Pb14とする。
 図13は、デブロッキングフィルタ処理とSAO処理が行われる場合、図12に示すタップサイズとされたフィルタを用いてループフィルタ処理を行うためにメモリに記憶する画素の範囲を示している。
 デブロッキングフィルタ処理部は、例えば4タップでブロック境界のフィルタ処理を行う場合、図13の(A)に示すように、右側ブロック境界BBから左4画素列分の範囲の画像データをメモリに記憶する必要がある。なお、図13の(A)において二重丸印は、デブロッキングフィルタの処理対象画素であってデブロッキングフィルタ処理(DF処理)が行われていないことを示している。
 SAO部は、判定処理にデブロッキングフィルタのフィルタ処理対象画素が含まれる画素位置となると処理を進めることができない。すなわち、図13の(B)に示すように、右側ブロック境界BBから左5画素列目の位置まで処理を進めることができるが、左4画素列目の位置では、破線で示すように3×3画素の判定処理の範囲内にデブロッキングフィルタのフィルタ処理対象画素が含まれる。このため、SAO部は左4画素列目の位置に処理を進めることができない。したがって、デブロッキングフィルタ処理後に、右側ブロック境界BBに対して左4画素列目の位置から処理を進めることができるように、SAO部で処理が行われている左5画素列目の位置の画像データをメモリに記憶する必要がある。なお、図13の(B)において、丸印の中にバツ印が示されている画素は、デブロッキングフィルタ処理が行われていないためにSAO処理を行うことができない画素を示している。
 ループフィルタ処理部は、例えばタップが5×5画素である場合、タップ内にSAO部で処理されていない画素が含まれる画素位置となると処理を進めることができない。すなわち、図13の(C)に示すように、右側ブロック境界BBから左7画素列目の位置まで処理を進めることができるが、左6画素列目の位置では、5×5画素のタップ内にSAO部で処理されていない画素が含まれることから処理を進めることができない。したがって、デブロッキングフィルタ処理後に、左6画素列目の位置から処理を進めることができるように、SAO部で処理が行われている左8画素列目から左5画素列目までの4画素列分の画像データをメモリに記憶する必要がある。
 また、ループフィルタ処理部は、例えばタップが11×5画素である場合、タップ内にSAO部で処理されていない画素が含まれる画素位置となると処理を進めることができない。すなわち、図13の(D)に示すように、右側ブロック境界BBから左10画素列目の位置まで処理を進めることができるが、左9画素列目の位置では、11×5画素のタップ内にSAO部で処理されていない画素が含まれることから処理を進めることができない。したがって、デブロッキングフィルタ処理後に、左9画素列目の位置から処理を進めることができるように、SAO部で処理が行われている左14画素列目から左5画素列目までの10画素列分の画像データをメモリに記憶する必要がある。
 なお、図13の(C),(D)において、丸印の中に+印が示されている画素は、デブロッキングフィルタ処理が行われていないことによるSAO処理後の画像データが入力されないため、ループフィルタ処理を行うことができない画素を示している。
 ここで、例えばLCUのサイズが64×64画素である場合、図13の(D)に示すように11×5画素のタップでは、右側ブロック境界BBに対して左9画素列目の位置から処理を進めるためには、輝度および色差データを合わせて1280バイト程度のメモリ容量が必要となる。この場合のメモリ容量は、5×5画素のタップで必要となるメモリ容量の2.5倍である。また、5×5画素のタップが選択された場合には、768バイトのメモリ容量が未使用となる。
 このように、フィルタサイズが大きいと画像データを記憶するメモリの容量を大ききしなければならない。また、最小サイズのフィルタが選択された場合、未使用のメモリ領域が生じることになる。そこで、ループフィルタ処理部は、所定ブロック境界の境界方向に対して直交する方向、例えば右側ブロック境界に対して直交する水平方向のタップ数が最小でないフィルタサイズが選択されている場合、フィルタ処理対象画素の位置に基づき右側ブロック境界から所定範囲内に位置するタップおよびメモリに画像データが記憶されていないタップを判別して、所定範囲内およびメモリに記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対して画像データの複写またはフィルタ演算で用いる係数セットの変更を行う。
 [ループフィルタ処理部の構成]
 図2に示す画像符号化装置10のループフィルタ処理部26と図6に示す画像復号装置のループフィルタ処理部58は、同等の構成および動作とされており、本技術の画像処理装置に相当する。
 ループフィルタ処理部は、画像を符号化する際にローカル復号処理されたブロック単位の画像や符号化ストリームを復号処理して生成されたブロック単位の画像に対して、デブロッキング処理およびSAO処理が行われた画像の処理対象画素に対してタップの構築と係数セットの構築を行い、タップの画像データと係数セットを用いてフィルタ演算を行う。また、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズが選択される場合は、画像データの複写または係数セットを変更してフィルタ演算を行う。
 [ループフィルタ処理部の構成]
 図14は、ループフィルタ処理部26の構成を例示している。ループフィルタ処理部26は、メモリ261、タップ構築部262、係数構築部263、フィルタ演算部264、フィルタ制御部269を備えている。
 SAO部25から出力された画像データは、メモリ261とタップ構築部262に供給される。
 メモリ261は、フィルタ制御部269からの制御信号に基づき、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる所定範囲に含まれていない領域の画像データを記憶する。例えば水平方向のタップ数が最小で5画素であるフィルタサイズで右側ブロック境界からSAO処理が行われていない範囲内の画像のフィルタ演算を行う場合に、このフィルタ演算に用いられるSAO処理済みの画像データを記憶する。また、メモリ261は、制御信号に基づき記憶している画像データを読み出してタップ構築部262に出力する。
 タップ構築部262は、SAO部25から供給された画像データやメモリ261に記憶されている画像データを用いて、ループフィルタの処理対象画素を基準としてタップを構築する。タップの構築では、フィルタサイズの異なる複数のフィルタが選択可能とされている。タップ構築部262は、構築したタップの画像データをフィルタ演算部264に出力する。
 係数構築部263は、係数メモリ27からフィルタ演算に用いる係数を読み出して、タップ構築部262で構築したタップに対応する係数を決定して、各タップの係数からなる係数セットを構築する。係数構築部263は、構築した係数セットをフィルタ演算部264に出力する。
 フィルタ演算部264は、タップ構築部262から供給されたタップの画像データと係数構築部263から供給された係数を用いて演算を行い、ループフィルタ処理後の画像データを生成する。
 フィルタ制御部269は、制御信号をメモリ261に供給して、メモリ261への画像データの記憶および記憶されている画像データの読み出しを制御する。また、フィルタ制御部269はループフィルタ処理に用いるフィルタの選択を行う。さらに、フィルタ制御部269は、処理位置判定部2691を有しており、ループフィルタ処理を行う画素位置の判定結果に基づきタップ構築部262や係数構築部263の制御を行う。フィルタ制御部269は、ブロック境界方向のタップ数が最小でないサイズのフィルタを選択する場合、フィルタ処理対象画素の位置に基づき所定範囲内に位置するタップおよびメモリ261に画像データが記憶されていないタップを判別して、所定範囲内およびメモリ261に記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対して画像データの複写またはフィルタ演算で用いる係数セットの変更を行う。例えば、フィルタ制御部269は、タップの位置がSAO処理の行われていない画素位置である場合、SAO処理が行われている画像データをSAO処理の行われていない画素位置の画像データとして複写する。また、タップ位置がメモリ261に画像データの記憶されていない画素位置である場合、フィルタ制御部269は、メモリ261に記憶されている画像データを画像データの記憶されていない画素位置の画像データとして複写する。
 また、画像復号装置のループフィルタ処理部58では、符号化ストリームに含まれているループフィルタ処理に関する情報に基づきフィルタサイズの選択や係数セットの設定を行う。
 [ループフィルタ処理部の動作]
 図15,16は、ループフィルタ処理部26の動作を示すフローチャートである。ステップST71でループフィルタ処理部26は、対象画像位置の初期化を行ってステップST72に進む。
 ステップST72でループフィルタ処理部26は、対象画素位置を決定する。ループフィルタ処理部26は、ループフィルタ処理を行う画素の位置を対象画素位置としてステップST73に進む。
 ステップST73でループフィルタ処理部26は、フィルタサイズが5×5画素であるか判別する。ループフィルタ処理部26は、5×5画素のフィルタを用いる場合にステップST86に進み、11×5画素のフィルタを用いる場合にステップST74に進む。
 ステップST74でループフィルタ処理部26は、対象画素位置が入力境界から左に5画素列目であるか判別する。ループフィルタ処理部26は、SAO処理が行われてループフィルタ処理部26に画像データが入力される画素と、デブロッキングフィルタ処理が行われていないためにSAO処理を行うことができずループフィルタ処理部26にSAO処理後の画像データを入力することができない画素との境界を入力境界とする。ループフィルタ処理部26は、対象画素位置が入力境界から左5画素列目である場合にはステップST75に進み、対象画素位置が入力境界から左5画素列目よりも左側または右側に位置する場合にはステップST76に進む。
 ステップST75でループフィルタ処理部26は、タップ右端から1画素分に対して画像データを複写する。ループフィルタ処理部26は、SAO処理が行われていない画素位置となるタップ右端から1画素の画像データとして、例えば左側に隣接するSAO処理済みの画素の画像データを複写してステップST86に進む。
 ステップST76でループフィルタ処理部26は、対象画素位置が入力境界から左4画素列目であるか判別する。ループフィルタ処理部26は、対象画素位置が入力境界から左4画素列目である場合にはステップST77に進む。また、ループフィルタ処理部26は、対象画素位置が入力境界から左5画素列目よりも左側または入力境界から左4画素列目よりも右側に位置する場合にはステップST78に進む。
 ステップST77でループフィルタ処理部26は、タップ右端から2画素分に対して画像データを複写する。ループフィルタ処理部26は、SAO処理が行われていない画素位置となるタップ右端から2画素分の画像データとして、例えば左側に隣接するSAO処理済みの画素の画像データを複写してステップST86に進む。
 ステップST78でループフィルタ処理部26は、対象画素位置が入力境界から左3画素列目であるか判別する。ループフィルタ処理部26は、対象画素位置が入力境界から左3画素列目である場合にはステップST79に進む。また、ループフィルタ処理部26は、対象画素位置が入力境界から左5画素列目よりも左側または入力境界から左3画素列目よりも右側に位置する場合にはステップST80に進む。
 ステップST79でループフィルタ処理部26は、タップ右端から3画素分に対して画像データを複写する。ループフィルタ処理部26は、SAO処理が行われていない画素位置となるタップ右端から3画素分の画像データとして、例えば左側に隣接するSAO処理済みの画素の画像データを複写してステップST86に進む。
 ステップST80でループフィルタ処理部26は、対象画素位置が入力境界から左2画素列目であるか判別する。ループフィルタ処理部26は、対象画素位置が入力境界から左2画素列目である場合にはステップST81に進む。また、ループフィルタ処理部26は、対象画素位置が入力境界から左5画素列目よりも左側または入力境界から左2画素列目よりも右側に位置する場合にはステップST82に進む。
 ステップST81でループフィルタ処理部26は、タップ左端から3画素分に対して画像データを複写する。ループフィルタ処理部26は、画像データが記憶されていない画素位置となるタップ左端から3画素分の画像データとして、例えば右側に隣接する画素の記憶されている画像データを複写してステップST86に進む。
 ステップST82でループフィルタ処理部26は、対象画素位置が入力境界から左1画素列目であるか判別する。ループフィルタ処理部26は、対象画素位置が入力境界から左1画素列目である場合にはステップST83に進む。また、ループフィルタ処理部26は、対象画素位置が入力境界から左5画素列目よりも左側または入力境界よりも右側に位置する場合にはステップST84に進む。
 ステップST83でループフィルタ処理部26は、タップ左端から2画素分に対して画像データを複写する。ループフィルタ処理部26は、画像データが記憶されていない画素位置となるタップ左端から2画素の画像データとして、例えば右側に隣接する画素の記憶されている画像データを複写してステップST86に進む。
 ステップST84でループフィルタ処理部26は、対象画素位置が入力境界から右1画素列目であるか判別する。ループフィルタ処理部26は、対象画素位置が入力境界から右1画素列目である場合にはステップST85に進む。また、ループフィルタ処理部26は、対象画素位置が入力境界から左5画素列目よりも左側または入力境界から右1画素列目よりも右側に位置する場合にはステップST86に進む。
 ステップST85でループフィルタ処理部26は、タップ左端から1画素分に対して画像データを複写する。ループフィルタ処理部26は、画像データが記憶されていない画素位置となるタップ左端から1画素の画像データとして、例えば右側に隣接する画素の記憶されている画像データを複写してステップST86に進む。
 ステップST86でループフィルタ処理部26は、フィルタ演算を行う。ループフィルタ処理部26は、ステップST74乃至ステップST85の処理を行うことで、水平方向のタップサイズが11画素の場合でも、SAO処理が行われていない位置や画像データが記憶されていない位置となる各タップの画像データを決定できる。したがって、ループフィルタ処理部26は、各タップの画像データとフィルタ係数を用いて演算を行い、対象画素位置のフィルタ処理後の画像データを算出してステップST87に進む。
 ステップST87でループフィルタ処理部26は、対象画素位置が入力境界から左3画素列目である処理を完了したか判別する。ループフィルタ処理部26は、入力境界から左3画素列目のループフィルタ処理を完了した場合には当該ブロックのループフィルタ処理を終了する。その後、ループフィルタ処理部26は、隣接するブロックの画像データを用いたデブロッキングフィルタ処理とデブロッキングフィルタ処理後の画像データを用いたSAO処理を行い、入力境界から右側に位置する画像データが入力された場合に、入力境界から左2画素列目の位置からループフィルタ処理を行う。
 ステップST88でループフィルタ処理部26は、対象画素位置を移動する。ループフィルタ処理部26は、対象画素位置の次の画素位置に移動してステップST72に戻る。
 図17,18は、タップ構築部262の動作を例示している。なお、図17は、対象画素位置が入力境界IBから左3画素列目(右側ブロック境界BBから左7画素列目)となるまでの処理を例示している。また、図18は、入力境界IBの右側に位置する画素の画像データが入力されて、対象画素位置が入力境界IBの左2画素列目(右側ブロック境界BBから左6画素列目)から右2画素列目(右側ブロック境界BBから左3画素列目)となるまでの処理を示している。
 図17の(A)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから左6画素列目(右側ブロック境界BBから左10画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左6画素列目の位置である場合、各タップの画像データはSAO処理が行われている。したがって、画像データの複写を行うことなくフィルタ演算を行う。
 図17の(B)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから左5画素列目(右側ブロック境界BBから左9画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左5画素列目の位置である場合、タップ右端から1画素目の位置はSAO処理が行われていない画素の位置である。したがって、上述のステップST75の処理を行い、タップ右端から1画素の画像データPb12として、左側に隣接するSAO処理済みの画素の画像データPb11を複写してフィルタ演算を行う。
 図17の(C)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから左4画素列目(右側ブロック境界BBから左8画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左4画素列目の位置である場合、タップ右端から2画素目までの位置はSAO処理が行われていない画素の位置である。したがって、上述のステップST77の処理を行い、タップ右端から2画素目までの画像データPb11,Pb12として、左側に隣接するSAO処理済みの画素すなわちタップ右端から3画素目の画像データPb10を複写してフィルタ演算を行う。
 図17の(D)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから左3画素列目(右側ブロック境界BBから左7画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左3画素列目の位置である場合、タップ右端から3画素目までの位置はSAO処理が行われていない画素の位置である。したがって、上述のステップST79の処理を行い、タップ右端から3画素目までの画像データPb10,Pb11,Pb12として、左側に隣接するSAO処理済みの画素すなわちタップ右端から4画素目の画像データPb9を複写してフィルタ演算を行う。
 なお、図17の(E)は、フィルタサイズが5×5画素のタップ数であり、対象画素位置が入力境界IBから左3画素列目(右側ブロック境界BBから左7画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左に3列目の位置である場合、各タップの画像データはSAO処理が行われている。
 このように、11×5画素のタップ数であるフィルタが選択されても、画像データを複写することで、5×5画素のタップ数である最小サイズのフィルタで処理が可能な画素位置までフィルタ処理を進めることができる。
 図18の(A)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから左2画素列目(右側ブロック境界BBから左6画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左2画素列目の位置である場合、タップ左端から3画素目までの画像データはメモリに記憶されておらず、4画素目から7画素目までの画像データはメモリに記憶されている。また、8画素目から11画素目までの画像データはSAO処理が行われてSAO部25から供給される。したがって、ループフィルタ処理部26は、画像データが記憶されていない画素位置となるタップ左端から3画素目までの画像データPb2,Pb3,Pb4として、右側に隣接するタップ左端から4画素目の記憶されている画像データPb5を複写してフィルタ演算を行う。
 図18の(B)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから左1画素列目(右側ブロック境界BBから左5画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左1画素列目の位置である場合、タップ左端から2画素目までの画像データはメモリに記憶されておらず、3画素目から6画素目までの画像データはメモリに記憶されている。また、7画素目から11画素目までの画像データはSAO処理が行われてSAO部25から供給される。したがって、ループフィルタ処理部26は、画像データが記憶されていない画素位置となるタップ左端から2画素目までの画像データPb2,Pb3として、右側に隣接するタップ左端から3画素目の記憶されている画像データPb4を複写してフィルタ演算を行う。
 図18の(C)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから右1画素列目(右側ブロック境界BBから左4画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから右1画素列目の位置である場合、タップ左端から1画素目までの画像データはメモリに記憶されておらず、2画素目から5画素目までの画像データはメモリに記憶されている。また、6画素目から11画素目までの画像データはSAO処理が行われてSAO部25から供給される。したがって、ループフィルタ処理部26は、画像データが記憶されていない画素位置となるタップ左端から1画素の画像データPb2として、右側に隣接するタップ左端から2画素目の記憶されている画像データPb3を複写してフィルタ演算を行う。
 図18の(D)は、フィルタサイズが11×5画素のタップ数であり、対象画素位置が入力境界IBから右2画素列目(右側ブロック境界BBから左3画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから右2画素列目の位置である場合、タップ左端から4画素目までの画像データはメモリに記憶されており、5画素目から11画素目までの画像データはSAO処理が行われてSAO部25から供給される。したがって、ループフィルタ処理部26は、画像データの複写を行うことなくフィルタ演算を行う。
 なお、図18の(E)は、フィルタサイズが5×5画素のタップ数であり、対象画素位置が入力境界IBから左2画素列目(右側ブロック境界BBから左3画素列目)の位置である場合を例示している。対象画素位置が入力境界IBから左2画素列目の位置である場合、タップ左端から4画素目までの画像データはメモリに記憶されており、5画素目の画像データはSAO処理が行われてSAO部25から供給される。したがって、ループフィルタ処理部26は、SAO部25でSAO処理が行われた画像データを用いてフィルタ演算を行うことができる。
 このように、画像データを複写して用いるようにすれば、画像データを記憶するメモリが最小のタップサイズに対応させて設けられていても、フィルタサイズに係らず最小のフィルタサイズと等しい画素位置までフィルタ処理を進めることができる。また、その後SAO処理が行われた画像データが入力された場合、右側に隣接する画素位置から再びフィルタ処理をフィルタサイズに係らず継続できる。したがって、画像データを記憶するメモリのメモリ容量を最小のフィルタサイズに対応させて設けておけば、フィルタサイズが大きい場合でも画像データを複写することでフィルタサイズが最小の場合と同様にフィルタ処理を行うことができる。例えば、11×5画素のタップ数であるフィルタを用いる場合でも、左8画素列目から左5画素列目までの4画素列分の画像データを用いてループフィルタ処理を行うことができる。
 また、上述の実施の形態では、画像データが記憶されていない画素位置のタップやSAO処理が行われていない画素位置のタップの画像データとして、記憶されているまたはSAO処理が行われている画像データを複写した。しかし、ループフィルタ処理部は、フィルタ係数を変更して、画像データを複写した場合と同様なフィルタ演算結果を得られるようにしてもよい。例えば、図17において、タップTb11(画像データPb11のタップ)に対するフィルタ係数をFb11、タップTb12(画像データPb12のタップ)に対するフィルタ係数をFb12とする。ここで、図17の(B)に示す場合、フィルタ係数Fb12を「0」に変更する。また、フィルタ係数Fb11は、画像データPb11を画像データPb12として複写した場合と同様なフィルタ演算結果となる係数、例えば(Fb11+Fb12)に変更する。このようにすれば、フィルタ係数を変更して、画像データを複写した場合と同様なフィルタ演算結果を得ることができる。
 さらに、上述の実施の形態では、水平方向のサイズが異なるタップを選択的に用いてループフィルタ処理を行う場合を例示したが、垂直方向のサイズが異なるタップを選択的に用いてループフィルタ処理を行う場合に、同様な処理を行ってもよい。この場合、垂直方向のサイズが最小のタップに応じてラインメモリのメモリ容量を設定しても、垂直方向のサイズが最小でないタップの場合には画像データの複写またはフィルタ係数の変更を行うことでループフィルタ処理を行うことができる。
 また、上述の実施の形態におけるフィルタのタップ数やタップ配置、サイズの異なるフィルタの数等は例示であって、実施の形態に限られない。さらに、本明細書において、ブロックおよびマクロブロックとの用語は、HEVCの文脈における符号化単位(CU:Coding Unit)、予測単位(PU:Prediction Unit)、変換単位(TU:Transform Unit)をも含むものとする。
 また、上述した一連の処理はハードウェア、またはソフトウェア、または両者の複合構成によって実行することが可能である。ソフトウェアによる処理を実行する場合は、処理シーケンスを記録したプログラムを、専用のハードウェアに組み込まれたコンピュータ内のメモリにインストールして実行させる。または、各種処理が実行可能な汎用コンピュータにプログラムをインストールして実行させることも可能である。
 例えば、プログラムは記録媒体としてのハードディスクやROM(Read Only Memory)に予め記録しておくことができる。または、プログラムはフレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体に、一時的または永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウェアとして提供することができる。
 なお、プログラムは、上述したようなリムーバブル記録媒体からコンピュータにインストールする他、ダウンロードサイトから、コンピュータに無線転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送する。コンピュータでは、そのようにして転送されてくるプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることができる。
 <6.応用例>
 本技術の画像処理装置を用いた上述の実施形態に係る画像符号化装置10および画像復号装置50は、衛星放送、ケーブルTVなどの有線放送、インターネット上での配信、およびセルラー通信による端末への配信等における送信機若しくは受信機、光ディスク、磁気ディスクおよびフラッシュメモリなどの媒体に画像を記録する記録装置、または、これら記憶媒体から画像を再生する再生装置などの様々な電子機器に応用され得る。以下、4つの応用例について説明する。
  [第1の応用例]
 図19は、上述した実施形態を適用したテレビジョン装置の概略的な構成の一例を示している。テレビジョン装置90は、アンテナ901、チューナ902、デマルチプレクサ903、デコーダ904、映像信号処理部905、表示部906、音声信号処理部907、スピーカ908、外部インタフェース部909を有している。さらに、テレビジョン装置90は、制御部910、ユーザインタフェース部911等を有している。
 チューナ902は、アンテナ901を介して受信される放送信号から所望のチャンネルの信号を抽出し、抽出した信号を復調する。そして、チューナ902は、復調により得られた符号化ビットストリームをデマルチプレクサ903へ出力する。すなわち、チューナ902は、画像が符号化されている符号化ストリームを受信する、テレビジョン装置90における伝送手段としての役割を有する。
 デマルチプレクサ903は、符号化ビットストリームから視聴対象の番組の映像ストリームおよび音声ストリームを分離し、分離した各ストリームをデコーダ904へ出力する。また、デマルチプレクサ903は、符号化ビットストリームからEPG(Electronic Program Guide)などの補助的なデータを抽出し、抽出したデータを制御部910に供給する。なお、デマルチプレクサ903は、符号化ビットストリームがスクランブルされている場合には、デスクランブルを行ってもよい。
 デコーダ904は、デマルチプレクサ903から入力される映像ストリームおよび音声ストリームを復号する。そして、デコーダ904は、復号処理により生成される映像データを映像信号処理部905へ出力する。また、デコーダ904は、復号処理により生成される音声データを音声信号処理部907へ出力する。
 映像信号処理部905は、デコーダ904から入力される映像データを再生し、表示部906に映像を表示させる。また、映像信号処理部905は、ネットワークを介して供給されるアプリケーション画面を表示部906に表示させてもよい。また、映像信号処理部905は、映像データについて、設定に応じて、例えばノイズ除去などの追加的な処理を行ってもよい。さらに、映像信号処理部905は、例えばメニュー、ボタンまたはカーソルなどのGUI(Graphical User Interface)の画像を生成し、生成した画像を出力画像に重畳してもよい。
 表示部906は、映像信号処理部905から供給される駆動信号により駆動され、表示デバイス(例えば、液晶ディスプレイ、プラズマディスプレイまたはOLEDなど)の映像面上に映像または画像を表示する。
 音声信号処理部907は、デコーダ904から入力される音声データについてD/A変換および増幅などの再生処理を行い、スピーカ908から音声を出力させる。また、音声信号処理部907は、音声データについてノイズ除去などの追加的な処理を行ってもよい。外部インタフェース部909は、テレビジョン装置90と外部機器またはネットワークとを接続するためのインタフェースである。例えば、外部インタフェース部909を介して受信される映像ストリームまたは音声ストリームが、デコーダ904により復号されてもよい。すなわち、外部インタフェース部909もまた、画像が符号化されている符号化ストリームを受信する、テレビジョン装置90における伝送手段としての役割を有する。
 制御部910は、CPU(Central Processing Unit)などのプロセッサ、並びにRAM(Random Access Memory)およびROM(Read Only Memory)などのメモリを有する。メモリは、CPUにより実行されるプログラム、プログラムデータ、EPGデータ、およびネットワークを介して取得されるデータなどを記憶する。メモリにより記憶されるプログラムは、例えば、テレビジョン装置90の起動時にCPUにより読み込まれ、実行される。CPUは、プログラムを実行することにより、例えばユーザインタフェース部911から入力される操作信号に応じて、テレビジョン装置90の動作を制御する。
 ユーザインタフェース部911は、制御部910と接続される。ユーザインタフェース部911は、例えば、ユーザがテレビジョン装置90を操作するためのボタンおよびスイッチ、並びに遠隔制御信号の受信部などを有する。ユーザインタフェース部911は、これら構成要素を介してユーザによる操作を検出して操作信号を生成し、生成した操作信号を制御部910へ出力する。
 バス912は、チューナ902、デマルチプレクサ903、デコーダ904、映像信号処理部905、音声信号処理部907、外部インタフェース部909および制御部910を相互に接続する。
 このように構成されたテレビジョン装置90において、デコーダ904は、上述した実施形態に係る画像復号装置50の機能を有する。それにより、テレビジョン装置90での画像の復号に際して、ループフィルタ処理を行うために画像データを記憶するメモリのメモリ容量を削減できる。
  [第2の応用例]
 図20は、上述した実施形態を適用した携帯電話機の概略的な構成の一例を示している。携帯電話機92は、アンテナ921、通信部922、音声コーデック923、スピーカ924、マイクロホン925、カメラ部926、画像処理部927、多重分離部928、記録再生部929、表示部930、制御部931、操作部932、およびバス933を備える。
 アンテナ921は、通信部922に接続される。スピーカ924およびマイクロホン925は、音声コーデック923に接続される。操作部932は、制御部931に接続される。バス933は、通信部922、音声コーデック923、カメラ部926、画像処理部927、多重分離部928、記録再生部929、表示部930、および制御部931を相互に接続する。
 携帯電話機92は、音声通話モード、データ通信モード、撮影モードおよびテレビ電話モードを含む様々な動作モードで、音声信号の送受信、電子メールまたは画像データの送受信、画像の撮像、およびデータの記録などの動作を行う。
 音声通話モードにおいて、マイクロホン925により生成されるアナログ音声信号は、音声コーデック923に供給される。音声コーデック923は、アナログ音声信号を音声データへ変換し、変換された音声データをA/D変換し圧縮する。そして、音声コーデック923は、圧縮後の音声データを通信部922へ出力する。通信部922は、音声データを符号化および変調し、送信信号を生成する。そして、通信部922は、生成した送信信号をアンテナ921を介して基地局(図示せず)へ送信する。また、通信部922は、アンテナ921を介して受信される無線信号を増幅しおよび周波数変換し、受信信号を取得する。そして、通信部922は、受信信号を復調および復号して音声データを生成し、生成した音声データを音声コーデック923へ出力する。音声コーデック923は、音声データを伸張しおよびD/A変換し、アナログ音声信号を生成する。そして、音声コーデック923は、生成した音声信号をスピーカ924に供給して音声を出力させる。
 また、データ通信モードにおいて、例えば、制御部931は、操作部932を介するユーザによる操作に応じて、電子メールを構成する文字データを生成する。また、制御部931は、文字を表示部930に表示させる。また、制御部931は、操作部932を介するユーザからの送信指示に応じて電子メールデータを生成し、生成した電子メールデータを通信部922へ出力する。通信部922は、電子メールデータを符号化および変調し、送信信号を生成する。そして、通信部922は、生成した送信信号をアンテナ921を介して基地局(図示せず)へ送信する。また、通信部922は、アンテナ921を介して受信される無線信号を増幅しおよび周波数変換し、受信信号を取得する。そして、通信部922は、受信信号を復調および復号して電子メールデータを復元し、復元した電子メールデータを制御部931へ出力する。制御部931は、表示部930に電子メールの内容を表示させると共に、電子メールデータを記録再生部929の記憶媒体に記憶させる。
 記録再生部929は、読み書き可能な任意の記憶媒体を有する。例えば、記憶媒体は、RAMまたはフラッシュメモリなどの内蔵型の記憶媒体であってもよく、ハードディスク、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、またはメモリカードなどの外部装着型の記憶媒体であってもよい。
 また、撮影モードにおいて、例えば、カメラ部926は、被写体を撮像して画像データを生成し、生成した画像データを画像処理部927へ出力する。画像処理部927は、カメラ部926から入力される画像データを符号化し、符号化ストリームを記録再生部929の記憶媒体に記憶させる。
 また、テレビ電話モードにおいて、例えば、多重分離部928は、画像処理部927により符号化された映像ストリームと、音声コーデック923から入力される音声ストリームとを多重化し、多重化したストリームを通信部922へ出力する。通信部922は、ストリームを符号化および変調し、送信信号を生成する。そして、通信部922は、生成した送信信号をアンテナ921を介して基地局(図示せず)へ送信する。また、通信部922は、アンテナ921を介して受信される無線信号を増幅しおよび周波数変換し、受信信号を取得する。これら送信信号および受信信号には、符号化ビットストリームが含まれ得る。そして、通信部922は、受信信号を復調および復号してストリームを復元し、復元したストリームを多重分離部928へ出力する。多重分離部928は、入力されるストリームから映像ストリームおよび音声ストリームを分離し、映像ストリームを画像処理部927、音声ストリームを音声コーデック923へ出力する。画像処理部927は、映像ストリームを復号し、映像データを生成する。映像データは、表示部930に供給され、表示部930により一連の画像が表示される。音声コーデック923は、音声ストリームを伸張しおよびD/A変換し、アナログ音声信号を生成する。そして、音声コーデック923は、生成した音声信号をスピーカ924に供給して音声を出力させる。
 このように構成された携帯電話機92において、画像処理部927は、上述した実施形態に係る画像符号化装置10および画像復号装置50の機能を有する。それにより、携帯電話機92での画像の符号化および復号に際して、ループフィルタ処理を行うために画像データを記憶するメモリのメモリ容量を削減できる。
  [第3の応用例]
 図21は、上述した実施形態を適用した記録再生装置の概略的な構成の一例を示している。記録再生装置94は、例えば、受信した放送番組の音声データおよび映像データを符号化して記録媒体に記録する。また、記録再生装置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へ出力する。すなわち、チューナ941は、記録再生装置94における伝送手段としての役割を有する。
 外部インタフェース部942は、記録再生装置94と外部機器またはネットワークとを接続するためのインタフェースである。外部インタフェース部942は、例えば、IEEE1394インタフェース、ネットワークインタフェース、USBインタフェース、またはフラッシュメモリインタフェースなどであってよい。例えば、外部インタフェース部942を介して受信される映像データおよび音声データは、エンコーダ943へ入力される。すなわち、外部インタフェース部942は、記録再生装置94における伝送手段としての役割を有する。
 エンコーダ943は、外部インタフェース部942から入力される映像データおよび音声データが符号化されていない場合に、映像データおよび音声データを符号化する。そして、エンコーダ943は、符号化ビットストリームをセレクタ946へ出力する。
 HDD944は、映像および音声などのコンテンツデータが圧縮された符号化ビットストリーム、各種プログラムおよびその他のデータを内部のハードディスクに記録する。また、HDD944は、映像および音声の再生時に、これらデータをハードディスクから読み出す。
 ディスクドライブ945は、装着されている記録媒体へのデータの記録および読み出しを行う。ディスクドライブ945に装着される記録媒体は、例えばDVDディスク(DVD-Video、DVD-RAM、DVD-R、DVD-RW、DVD+R、DVD+RW等)またはBlu-ray(登録商標)ディスクなどであってよい。
セレクタ946は、映像および音声の記録時には、チューナ941またはエンコーダ943から入力される符号化ビットストリームを選択し、選択した符号化ビットストリームをHDD944またはディスクドライブ945へ出力する。また、セレクタ946は、映像および音声の再生時には、HDD944またはディスクドライブ945から入力される符号化ビットストリームをデコーダ947へ出力する。
 デコーダ947は、符号化ビットストリームを復号し、映像データおよび音声データを生成する。そして、デコーダ947は、生成した映像データをOSD部948へ出力する。また、デコーダ904は、生成した音声データを外部のスピーカへ出力する。
OSD部948は、デコーダ947から入力される映像データを再生し、映像を表示する。また、OSD部948は、表示する映像に、例えばメニュー、ボタンまたはカーソルなどのGUIの画像を重畳してもよい。
 制御部949は、CPUなどのプロセッサ、並びにRAMおよびROMなどのメモリを有する。メモリは、CPUにより実行されるプログラム、およびプログラムデータなどを記憶する。メモリにより記憶されるプログラムは、例えば、記録再生装置94の起動時にCPUにより読み込まれ、実行される。CPUは、プログラムを実行することにより、例えばユーザインタフェース部950から入力される操作信号に応じて、記録再生装置94の動作を制御する。
 ユーザインタフェース部950は、制御部949と接続される。ユーザインタフェース部950は、例えば、ユーザが記録再生装置94を操作するためのボタンおよびスイッチ、並びに遠隔制御信号の受信部などを有する。ユーザインタフェース部950は、これら構成要素を介してユーザによる操作を検出して操作信号を生成し、生成した操作信号を制御部949へ出力する。
 このように構成された記録再生装置94において、エンコーダ943は、上述した実施形態に係る画像符号化装置10の機能を有する。また、デコーダ947は、上述した実施形態に係る画像復号装置50の機能を有する。それにより、記録再生装置94での画像の符号化および復号に際して、ループフィルタ処理を行うために画像データを記憶するメモリのメモリ容量を削減できる。
  [第4の応用例]
 図22は、上述した実施形態を適用した撮像装置の概略的な構成の一例を示している。撮像装置96は、被写体を撮像して画像を生成し、画像データを符号化して記録媒体に記録する。
 撮像装置96は、光学ブロック961、撮像部962、カメラ信号処理部963、画像処理部964、表示部965、外部インタフェース部966、メモリ967、メディアドライブ968、OSD部969、制御部970、ユーザインタフェース部971、およびバス972を備える。
 光学ブロック961は、フォーカスレンズおよび絞り機構などを有する。光学ブロック961は、被写体の光学像を撮像部962の撮像面に結像させる。撮像部962は、CCDまたはCMOSなどのイメージセンサを有し、撮像面に結像した光学像を光電変換によって電気信号としての画像信号に変換する。そして、撮像部962は、画像信号をカメラ信号処理部963へ出力する。
 カメラ信号処理部963は、撮像部962から入力される画像信号に対してニー補正、ガンマ補正、色補正などの種々のカメラ信号処理を行う。カメラ信号処理部963は、カメラ信号処理後の画像データを画像処理部964へ出力する。
 画像処理部964は、カメラ信号処理部963から入力される画像データを符号化し、符号化データを生成する。そして、画像処理部964は、生成した符号化データを外部インタフェース部966またはメディアドライブ968へ出力する。また、画像処理部964は、外部インタフェース部966またはメディアドライブ968から入力される符号化データを復号し、画像データを生成する。そして、画像処理部964は、生成した画像データを表示部965へ出力する。また、画像処理部964は、カメラ信号処理部963から入力される画像データを表示部965へ出力して画像を表示させてもよい。また、画像処理部964は、OSD部969から取得される表示用データを、表示部965へ出力する画像に重畳してもよい。
 OSD部969は、例えばメニュー、ボタンまたはカーソルなどのGUIの画像を生成して、生成した画像を画像処理部964へ出力する。
 外部インタフェース部966は、例えばUSB入出力端子として構成される。外部インタフェース部966は、例えば、画像の印刷時に、撮像装置96とプリンタとを接続する。また、外部インタフェース部966には、必要に応じてドライブが接続される。ドライブには、例えば、磁気ディスクまたは光ディスクなどのリムーバブルメディアが装着され、リムーバブルメディアから読み出されるプログラムが、撮像装置96にインストールされ得る。さらに、外部インタフェース部966は、LANまたはインターネットなどのネットワークに接続されるネットワークインタフェースとして構成されてもよい。すなわち、外部インタフェース部966は、撮像装置96における伝送手段としての役割を有する。
 メディアドライブ968に装着される記録媒体は、例えば、磁気ディスク、光磁気ディスク、光ディスク、または半導体メモリなどの、読み書き可能な任意のリムーバブルメディアであってよい。また、メディアドライブ968に記録媒体が固定的に装着され、例えば、内蔵型ハードディスクドライブまたはSSD(Solid State Drive)のような非可搬性の記憶部が構成されてもよい。
 制御部970は、CPUなどのプロセッサ、並びにRAMおよびROMなどのメモリを有する。メモリは、CPUにより実行されるプログラム、およびプログラムデータなどを記憶する。メモリにより記憶されるプログラムは、例えば、撮像装置96の起動時にCPUにより読み込まれ、実行される。CPUは、プログラムを実行することにより、例えばユーザインタフェース部971から入力される操作信号に応じて、撮像装置96の動作を制御する。
 ユーザインタフェース部971は、制御部970と接続される。ユーザインタフェース部971は、例えば、ユーザが撮像装置96を操作するためのボタンおよびスイッチなどを有する。ユーザインタフェース部971は、これら構成要素を介してユーザによる操作を検出して操作信号を生成し、生成した操作信号を制御部970へ出力する。
 バス972は、画像処理部964、外部インタフェース部966、メモリ967、メディアドライブ968、OSD部969、および制御部970を相互に接続する。
 このように構成された撮像装置96において、画像処理部964は、上述した実施形態に係る画像符号化装置10および画像復号装置50の機能を有する。それにより、撮像装置96での画像の符号化および復号に際して、ループフィルタ処理を行うために画像データを記憶するメモリのメモリ容量を削減できる。
 さらに、本技術は、上述した実施形態に限定して解釈されるべきではない。この実施形態は、例示という形態で本技術を開示しており、本技術の要旨を逸脱しない範囲で当業者が実施形態の修正や代用をなし得ることは自明である。すなわち、本技術の要旨を判断するためには、請求の範囲を参酌すべきである。
 なお、本技術の画像処理装置は以下のような構成も取ることができる。
 (1)符号化ストリームを復号処理して画像を生成する復号部と、
 前記復号部により生成されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行うフィルタ演算部と、
 所定ブロック境界の境界方向に対して直交する方向のタップ数が最小であるフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データを記憶するメモリと、
 前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズである場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行うフィルタ制御部と
を備える画像処理装置。
 (2) 前記フィルタ制御部は、前記メモリに画像データが記憶されている隣接画素の画像データを前記判別されたタップの画像データとして複写する(1)に記載の画像処理装置。
 (3) 前記フィルタ制御部は、前記メモリに画像データが記憶されている隣接画素の係数を変更する(1)に記載の画像処理装置。
 (4) 前記所定ブロック境界の境界方向に対して直交する方向は水平方向である(1)乃至(3)の何れかに記載の画像処理装置。
 (5) 前記所定範囲は、デブロッキングフィルタ処理が行われていないためにSAO処理を行うことができない画像範囲である(1)乃至(4)の何れかに記載の画像処理装置。
 (6) 画像を符号化する際にローカル復号処理されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行うフィルタ演算部と、
 所定ブロック境界の境界方向に対して直交する方向のタップ数が最小であるフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データを記憶するメモリと、
 前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズである場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行うフィルタ制御部と
を備える画像処理装置。
 (7) 前記フィルタ制御部は、前記フィルタ演算に用いた前記フィルタサイズと係数セットの情報を、前記符号化ストリームに含める(6)に記載の画像処理装置。
 (8) 前記フィルタ演算に用いた前記フィルタサイズは、符号化効率の良いフィルタサイズである(6)または(7)の何れかに記載の画像処理装置。
 この技術の画像処理装置と画像処理方法によれば、メモリでは、所定ブロック境界の境界方向に対して直交する方向のタップ数が最小であるフィルタサイズで所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる所定範囲に含まれていない領域の画像データが記憶される。また、フィルタ制御部では、ブロック境界方向のタップ数が最小でないフィルタサイズが選択されている場合、フィルタ処理対象画素の位置に基づき所定範囲内に位置するタップおよびメモリに画像データが記憶されていないタップを判別して、所定範囲内およびメモリに記憶されていない画像データを用いることなくフィルタ演算を行うように、判別されたタップに対して画像データの複写またはフィルタ演算で用いる係数セットの変更が行われる。このため、異なるサイズのフィルタを選択的に用いてフィルタ演算を行う場合に、最小サイズのフィルタに対応させて画像データをメモリに記憶させても、最小サイズよりも大きいフィルタサイズでフィルタ演算が可能となり、適応ループフィルタ処理を行うために画像データを記憶するメモリのメモリ容量を削減できる。この技術の画像処理装置や画像処理方法を適用した電子機器を安価に提供することが可能となる。
 10・・・画像符号化装置、11・・・A/D変換部、12,59・・・画面並べ替えバッファ、13・・・減算部、14・・・直交変換部、15・・・量子化部、16・・・可逆符号化部、17・・・蓄積バッファ、18・・・レート制御部、21,53・・・逆量子化部、22,54・・・逆直交変換部、23,55・・・加算部、24,56・・・デブロッキングフィルタ処理部、25,57・・・SAO部、26,58・・・ループフィルタ処理部、27・・・係数メモリ、28,61・・・フレームメモリ、29,62,65・・・セレクタ、31,63・・・イントラ予測部、32・・・動き予測・補償部、33・・・予測画像・最適モード選択部、50・・・画像復号装置、51・・・蓄積バッファ、52・・・可逆復号部、60・・・D/A変換部、64・・・動き補償部、90・・・テレビジョン装置、92・・・携帯電話機、94・・・記録再生装置、96・・・撮像装置、261・・・メモリ、262・・・タップ構築部、263・・・係数構築部、264・・・フィルタ演算部、269・・・フィルタ制御部、2691・・・処理位置判定部

Claims (10)

  1.  符号化ストリームを復号処理して画像を生成する復号部と、
     前記復号部により生成されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行うフィルタ演算部と、
     所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データを記憶するメモリと、
     前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズが選択されている場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行うフィルタ制御部と
    を備える画像処理装置。
  2.  前記フィルタ制御部は、前記メモリに画像データが記憶されている隣接画素の画像データを前記判別されたタップの画像データとして複写する請求項1記載の画像処理装置。
  3.  前記フィルタ制御部は、前記メモリに画像データが記憶されている隣接画素の係数を変更する請求項1記載の画像処理装置。
  4.  前記所定ブロック境界の境界方向に対して直交する方向は水平方向である請求項1記載の画像処理装置。
  5.  前記所定範囲は、デブロッキングフィルタ処理が行われていないためにSAO(Sample Adaptive Offset)処理を行うことができない画像範囲である請求項1記載の画像処理装置。
  6.  符号化ストリームを復号処理して画像を生成する工程と、
     前記復号処理により生成されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行う工程と、
     所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データをメモリに記憶する工程と、
     前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズが選択されている場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行う工程と
    含む画像処理方法。
  7.  画像を符号化する際にローカル復号処理されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行うフィルタ演算部と、
     所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データを記憶するメモリと、
     前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズを選択する場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行うフィルタ制御部と
    を備える画像処理装置。
  8.  前記フィルタ制御部は、前記フィルタ演算に用いた前記フィルタサイズと係数セットの情報を、前記符号化ストリームに含める請求項7記載の画像処理装置。
  9.  前記フィルタ演算に用いた前記フィルタサイズは、符号化効率の良いフィルタサイズである請求項8記載の画像処理装置。
  10.  画像を符号化する際にローカル復号処理されたCU(Coding Unit)単位の画像のフィルタ処理対象画素に対して構築されたタップの画像データと係数セットを用いてフィルタ演算を行う工程と、
     所定ブロック境界の境界方向に対して直交する方向のタップ数が最小である選択可能なフィルタサイズで前記所定ブロック境界から所定範囲内の画像のフィルタ演算を行う場合における該フィルタ演算に用いられる前記所定範囲に含まれていない領域の画像データをメモリに記憶する工程と、
     前記所定ブロック境界の境界方向に対して直交する方向のタップ数が最小でないフィルタサイズを選択する場合、前記フィルタ処理対象画素の位置に基づき前記所定範囲内に位置するタップおよび前記メモリに画像データが記憶されていないタップを判別して、前記所定範囲内および前記メモリに記憶されていない画像データを用いることなく前記フィルタ演算を行うように、前記判別されたタップに対して画像データの複写または前記フィルタ演算で用いる係数セットの変更を行う工程と
    を含む画像処理方法。
PCT/JP2012/077347 2011-11-02 2012-10-23 画像処理装置と画像処理方法 WO2013065527A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011241680A JP2013098873A (ja) 2011-11-02 2011-11-02 画像処理装置と画像処理方法
JP2011-241680 2011-11-02

Publications (1)

Publication Number Publication Date
WO2013065527A1 true WO2013065527A1 (ja) 2013-05-10

Family

ID=48191881

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/077347 WO2013065527A1 (ja) 2011-11-02 2012-10-23 画像処理装置と画像処理方法

Country Status (2)

Country Link
JP (1) JP2013098873A (ja)
WO (1) WO2013065527A1 (ja)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015170994A (ja) 2014-03-07 2015-09-28 ソニー株式会社 画像処理装置および方法、画像符号化装置および方法、並びに、画像復号装置および方法
JP6519185B2 (ja) * 2015-01-13 2019-05-29 富士通株式会社 動画像符号化装置
WO2018225593A1 (ja) * 2017-06-05 2018-12-13 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 符号化装置、復号装置、符号化方法および復号方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003076986A (ja) * 2001-09-05 2003-03-14 Noritsu Koki Co Ltd データ整列回路
JP2005295319A (ja) * 2004-04-01 2005-10-20 Renesas Technology Corp 動き検出装置
WO2013001945A1 (ja) * 2011-06-28 2013-01-03 ソニー株式会社 画像処理装置と画像処理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003076986A (ja) * 2001-09-05 2003-03-14 Noritsu Koki Co Ltd データ整列回路
JP2005295319A (ja) * 2004-04-01 2005-10-20 Renesas Technology Corp 動き検出装置
WO2013001945A1 (ja) * 2011-06-28 2013-01-03 ソニー株式会社 画像処理装置と画像処理方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHING-YEH CHEN ET AL.: "Adaptive Loop Filter with Zero Pixel Line Buffers for LCU-based Decoding", JCTVC-F054, JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11, 14 July 2011 (2011-07-14), pages 1 - 11 *

Also Published As

Publication number Publication date
JP2013098873A (ja) 2013-05-20

Similar Documents

Publication Publication Date Title
JP6477939B2 (ja) テレビジョン装置、携帯電話機、再生装置、カメラ、および画像処理方法
KR102005209B1 (ko) 화상 처리 장치와 화상 처리 방법
KR101696950B1 (ko) 화상 처리 장치 및 방법
WO2013001945A1 (ja) 画像処理装置と画像処理方法
WO2012017858A1 (ja) 画像処理装置と画像処理方法
US20150036758A1 (en) Image processing apparatus and image processing method
WO2012063878A1 (ja) 画像処理装置と画像処理方法
WO2011086963A1 (ja) 画像処理装置および方法
WO2013088833A1 (ja) 画像処理装置及び画像処理方法
JP2013150164A (ja) 符号化装置および符号化方法、並びに、復号装置および復号方法
WO2013047325A1 (ja) 画像処理装置および方法
WO2013065527A1 (ja) 画像処理装置と画像処理方法
WO2014002900A1 (ja) 画像処理装置および画像処理方法
WO2014156705A1 (ja) 復号装置および復号方法、並びに、符号化装置および符号化方法

Legal Events

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

Ref document number: 12846646

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12846646

Country of ref document: EP

Kind code of ref document: A1