WO2013018737A1 - 画像フィルタ装置、復号装置、符号化装置、および、データ構造 - Google Patents

画像フィルタ装置、復号装置、符号化装置、および、データ構造 Download PDF

Info

Publication number
WO2013018737A1
WO2013018737A1 PCT/JP2012/069255 JP2012069255W WO2013018737A1 WO 2013018737 A1 WO2013018737 A1 WO 2013018737A1 JP 2012069255 W JP2012069255 W JP 2012069255W WO 2013018737 A1 WO2013018737 A1 WO 2013018737A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
region
unit
image
mode
Prior art date
Application number
PCT/JP2012/069255
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 WO2013018737A1 publication Critical patent/WO2013018737A1/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/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
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties

Definitions

  • the present invention relates to an image filter device that performs image filtering.
  • the present invention also relates to an encoding device and a decoding device provided with such an image filter.
  • the present invention also relates to a data structure of encoded data decoded by such a decoding device.
  • a moving image encoding device that generates encoded data by encoding the moving image, and decoding by decoding the encoded data
  • a video decoding device (decoding device) that generates an image
  • As a specific moving picture encoding method for example, H.264 is used. H.264 / MPEG-4.
  • a method adopted in AVC a method adopted in KTA software, which is a codec for joint development in VCEG (Video Coding Expert Group), and a method adopted in TMuC (Test Model under Consideration) software, which is the successor codec And a method employed in HM (HEVC TestModel) software.
  • an image (picture) constituting a moving image is a slice obtained by dividing the image, a maximum coding unit obtained by dividing the slice (LCU: Largegest Coding Unit, tree block) Hierarchical structure consisting of coding units (CU: Coding Unit, also called coding node) obtained by dividing the maximum coding unit, and blocks and partitions obtained by dividing the coding unit
  • the block is encoded as a minimum unit.
  • a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and difference data between the predicted image and the input image is encoded. It becomes.
  • methods for generating a predicted image methods called inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction) are known.
  • intra prediction predicted images in a corresponding frame are sequentially generated based on a locally decoded image in the same frame.
  • one prediction direction is selected from prediction directions included in a predetermined prediction direction (prediction mode) group for each prediction unit (for example, block), and A prediction pixel value on the prediction target region is generated by extrapolating the pixel value of the reference pixel in the locally decoded image in the selected prediction direction.
  • inter prediction by applying motion compensation using a motion vector to a reference image in a reference frame (decoded image) in which the entire frame is decoded, a predicted image in a prediction target frame is converted into a prediction unit ( For example, it is generated for each block).
  • Non-Patent Document 1 discloses a technique for switching between two different filter shapes. Further, in Non-Patent Document 1, the region classification method used in Non-Patent Document 2 is used. Specifically, a method of dividing a decoded image into a plurality of regions according to horizontal and vertical coordinates and using filter coefficients set for each region is disclosed and is called an RA mode. Further, the same document discloses a method of dividing a decoded image into a plurality of regions according to the degree of activity and directionality calculated from the region and surrounding pixels, and using filter coefficients set for each region. This is called BA mode. This document discloses a method of switching between RA mode and BA mode by a flag (feature amount mode) in encoded data.
  • An encoding device and a decoding device provided with such an adaptive filter generate a prediction image with reference to a filtered decoded image obtained by performing filter processing on the decoded image with the adaptive filter. It is possible to improve accuracy and improve encoding efficiency.
  • JCTVC-F303 Joint Collaborative Team Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 6th Meeting: Torino, Italy, 13-22, July, 2011
  • JCTVC-E603 Joint Collaborative Team Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 5th Meeting: Geneva, CH16, 23, March, 2011
  • Non-Patent Document 1 has a problem that the encoding efficiency is not improved as expected.
  • the inventor has found that the conventional method has a problem in that it is not fully utilized in spite of different filter shapes suitable for the regions. That is, the inventor sets the feature classification mode and the region shape set by merging regions disclosed in Non-Patent Document 2 independently, and the relationship between the region classification and the filter shape is utilized. I got the knowledge that it was not.
  • the present invention has been made in view of the above problems, and improves coding efficiency by using a filter shape suitable for a region classified by a feature amount while suppressing an increase in the amount of code and the amount of processing. It is to realize an adaptive filter that can.
  • an image filter device operates on an input image composed of a plurality of unit regions, and each pixel value of an output image in each unit region is a reference pixel determined by a filter shape.
  • An image filter device comprising filter means for performing filter processing by calculating using each pixel value and a filter coefficient assigned to the unit area, wherein one or more characteristics are determined from the attributes of the unit area Means for selecting the characteristic value calculation method based on the filter shape, comprising area index calculation means for classifying the unit area into partial areas on the characteristic value area using the characteristic value obtained by the value calculation method; And at least one of means for selecting a filter shape based on the characteristic value calculation method, and a specific characteristic value calculation method If there are, the filter means is characterized by performing the filtering process using a filter shape having a shape corresponding to the characteristic value calculating method, and a filter coefficient associated with the partial area.
  • a filter shape corresponding to the characteristic value calculation method can be used.
  • the region classification changes, and the filter shape suitable for each region changes. Therefore, a highly effective adaptive filter can be applied by using a filter shape suitable for the characteristic value calculation method.
  • the image filter device operates on an input image composed of a plurality of unit regions, and assigns each pixel value of an output image in each unit region to a reference pixel determined by a filter shape and the unit region.
  • a filter means for performing a filter process by calculating using the obtained filter coefficient, and a region index for classifying each unit region from a multi-dimensional characteristic value calculated from the attribute of the unit region From the calculation means, the area structure decoding means for decoding the filter index table representing the correspondence between each area index and each filter index, the area index of the target unit area that is the unit area to be processed, and the filter index table While obtaining the filter index for the target unit area Filter coefficient allocating means for allocating a filter coefficient specified by the filter index to the target unit area, and filter shape decoding means for decoding the filter shape in units of filter index, the filter means including the decoded filter Filtering is performed using the shape.
  • the filter shape can be changed according to the filter coefficient group applied to each partial region.
  • a main edge strong edge in a specific direction or many edges in a specific direction
  • the effect of the adaptive filter is particularly great.
  • the region characteristic is an oblique edge
  • the oblique filter shape is effective
  • the region characteristic is a horizontal edge and a vertical edge
  • the horizontal and vertical filter shape is effective.
  • the filter shape suitable for the characteristics of the image is different. Therefore, since a filter shape suitable for each region can be used, a highly effective adaptive filter can be applied.
  • the data structure of the encoded data according to the present invention operates on an input image composed of a plurality of unit areas, and each pixel value of the output image in each unit area is determined by reference pixels determined by a filter shape and the unit.
  • the image filter device operates on an input image composed of a plurality of unit regions, and each pixel value of an output image in each unit region is converted to each pixel value of a reference pixel determined by the filter shape.
  • a region index calculating unit that classifies the unit region into partial regions on the characteristic value region using the obtained characteristic value; a unit that selects a characteristic value calculating method based on a filter shape; and a characteristic value
  • Filtering means performs a filtering process using a filter shape having a shape corresponding to the characteristic value calculating method, and a filter coefficient associated with the partial area.
  • a filter shape corresponding to the characteristic value calculation method can be used.
  • the region classification changes, and the filter shape suitable for each region changes. Therefore, a highly effective adaptive filter can be applied by using a filter shape suitable for the characteristic value calculation method. As a result, encoding efficiency is improved.
  • FIG. 1771 It is a figure which shows another example of the relationship between the area
  • (A) shows a transmitting apparatus equipped with a moving picture coding apparatus, and (b) shows a receiving apparatus equipped with a moving picture decoding apparatus. It is the figure shown about the structure of the recording device which mounts the said moving image encoder, and the reproducing
  • (A) shows a recording apparatus equipped with a moving picture coding apparatus, and (b) shows a reproduction apparatus equipped with a moving picture decoding apparatus.
  • Embodiment 1 Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. 1 to 6, FIG. 18, FIG. 22, FIG.
  • the adaptive filter according to the present embodiment derives two characteristic values having different derivation methods from each other for each unit region constituting the pre-filter image (for example, a deblocked decoded image P_DB described later). Each unit area is classified into one or a plurality of groups according to the characteristic value. In addition, the adaptive filter according to the present embodiment acts on the pre-filter image for each unit region using a filter coefficient determined for each unit region.
  • the unit region may be a block that is a unit of DCT transform (more generally, frequency transform) described later, a partition that is a unit for generating a predicted image described later, Instead of any partition, it may be an area whose size and position are set by the adaptive filter according to the present embodiment. Further, the unit area may be composed of one pixel.
  • Each group has a one-to-one correspondence with each partial area set on a two-dimensional area stretched by two characteristic values. Therefore, it is determined how to set one or a plurality of groups by designating how to divide the two-dimensional area into partial areas.
  • one characteristic value is referred to as a first characteristic value X
  • the other characteristic value is referred to as a second characteristic value Y.
  • the two-dimensional area spanned by the two characteristic values is also called a characteristic value area
  • each partial area set on the characteristic value area is also called a characteristic value partial area.
  • the first characteristic value X and the second characteristic value Y for example, the following combinations are possible.
  • the case where the first characteristic value X is the activity of the image is handled.
  • these combinations do not limit the invention according to the present application, and the present invention also applies to other characteristic values and combinations.
  • the embodiment can be easily applied.
  • First characteristic value X Image activity, second characteristic value Y: Image directionality First characteristic value X: Image activity, second characteristic value Y: Average pixel value First Characteristic value X: image activity, second characteristic value Y: unit area coordinates • first characteristic value X: unit area coordinates, second characteristic value Y: image activity • first characteristic Value X: slice number, second characteristic value Y: image activity level • first characteristic value X: average pixel value, second characteristic value Y: image activity level • first characteristic value X: unit area Y-coordinate, second characteristic value Y: x-coordinate of unit area ⁇ First characteristic value X: x-coordinate of unit area, second characteristic value Y: y-coordinate of unit area From the viewpoint of the effect of reducing the error between the current image and the encoding target image (noise reduction effect), priority is given to the activity.
  • the image activity as the first characteristic value X.
  • priority may be given to characteristic values that allow easy calculation of characteristic values.
  • the coordinates of the unit area, the slice number, the average pixel value, and the like can be used as the first characteristic value.
  • an application method in which the division is completed only by the first division is possible, and the effect of the filter by region can be obtained with a small complexity. .
  • each characteristic value derived for each unit region may depend on the size of the unit region depending on the derivation method. In such a case, a normalized characteristic value obtained by removing the dependency on the size of the unit region can be used as each characteristic value.
  • Encoded data # 1 Prior to detailed description of the video encoding device 2 and the video decoding device 1 according to the present embodiment, the encoded data # 1 generated by the video encoding device 2 and decoded by the video decoding device 1 is described. The data structure will be described.
  • FIG. 2 is a diagram showing a data structure of encoded data # 1.
  • the encoded data # 1 exemplarily includes a sequence and a plurality of pictures constituting the sequence.
  • FIG. 2 shows the hierarchical structure below the picture layer in the encoded data # 1.
  • 2A to 2D are included in the picture layer that defines the picture PICT, the slice layer that defines the slice S, the tree block layer that defines the tree block TBLK, and the tree block TBLK, respectively.
  • Picture layer In the picture layer, a set of data referred to by the video decoding device 1 for decoding a picture PICT to be processed (hereinafter also referred to as a target picture) is defined. As shown in FIG. 2A, the picture PICT includes a picture header PH and slices S1 to SNS (NS is the total number of slices included in the picture PICT).
  • the picture header PH includes a coding parameter group referred to by the video decoding device 1 in order to determine a decoding method of the target picture.
  • the encoding mode information (entropy_coding_mode_flag) indicating the variable length encoding mode used in encoding by the moving image encoding device 2 is an example of an encoding parameter included in the picture header PH.
  • the picture PICT is encoded by CAVLC (Context-based Adaptive Variable Variable Length Coding).
  • CAVLC Context-based Adaptive Variable Variable Length Coding
  • CABAC Context-based Adaptive Binary Arithmetic Coding
  • picture header PH is also referred to as a picture parameter set (PPS).
  • PPS picture parameter set
  • slice layer In the slice layer, a set of data referred to by the video decoding device 1 for decoding the slice S to be processed (also referred to as a target slice) is defined. As shown in FIG. 2B, the slice S includes a slice header SH and a sequence of tree blocks TBLK1 to TBLKNC (NC is the total number of tree blocks included in the slice S).
  • the slice header SH includes a coding parameter group that the moving image decoding apparatus 1 refers to in order to determine a decoding method of the target slice.
  • Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
  • I slice that uses only intra prediction at the time of encoding (2) P slice that uses unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.
  • the slice header SH includes a filter parameter FP that is referred to by an adaptive filter provided in the video decoding device 1. Details of the filter parameter FP will be described later.
  • Tree block layer In the tree block layer, a set of data referred to by the video decoding device 1 for decoding a processing target tree block TBLK (hereinafter also referred to as a target tree block) is defined. Note that a tree block may be referred to as a maximum coding unit (LCU).
  • LCU maximum coding unit
  • the tree block TBLK includes a tree block header TBLKH and coding unit information CU1 to CUNL (NL is the total number of coding unit information included in the tree block TBLK).
  • NL is the total number of coding unit information included in the tree block TBLK.
  • the tree block TBLK is divided into partitions for specifying a block size for each process of intra prediction or inter prediction and conversion.
  • the above partition of the tree block TBLK is divided by recursive quadtree partitioning.
  • the tree structure obtained by this recursive quadtree partitioning is hereinafter referred to as a coding tree.
  • a partition corresponding to a leaf that is a node at the end of the coding tree is referred to as a coding node.
  • the encoding node is a basic unit of the encoding process, hereinafter, the encoding node is also referred to as an encoding unit (CU).
  • CU encoding unit
  • coding unit information (hereinafter referred to as CU information)
  • CU1 to CUNL is information corresponding to each coding node (coding unit) obtained by recursively dividing the tree block TBLK into quadtrees.
  • the root of the coding tree is associated with the tree block TBLK.
  • the tree block TBLK is associated with the highest node of the tree structure of the quadtree partition that recursively includes a plurality of encoding nodes.
  • each encoding node is half the size of the encoding node to which the encoding node directly belongs (that is, the partition of the node one layer higher than the encoding node).
  • the size that each coding node can take depends on the size designation information of the coding node and the maximum hierarchy depth (maximum hierarchical depth) included in the sequence parameter set SPS of the coded data # 1. For example, when the size of the tree block TBLK is 64 ⁇ 64 pixels and the maximum hierarchical depth is 3, the encoding nodes in the hierarchy below the tree block TBLK have three types of sizes, that is, 64 ⁇ 64. It can take any of a pixel, 32 ⁇ 32 pixel, and 16 ⁇ 16 pixel.
  • the tree block header TBLKH includes an encoding parameter referred to by the video decoding device 1 in order to determine a decoding method of the target tree block. Specifically, as shown in FIG. 2C, tree block division information SP_TBLK that designates a division pattern of the target tree block into each CU, and a quantization parameter difference that designates the size of the quantization step. ⁇ qp (qp_delta) is included.
  • the tree block division information SP_TBLK is information representing a coding tree for dividing the tree block. Specifically, the shape and size of each CU included in the target tree block, and the position in the target tree block Is information to specify.
  • the tree block division information SP_TBLK may not explicitly include the shape or size of the CU.
  • the tree block division information SP_TBLK may be a set of flags (split_coding_unit_flag) indicating whether or not the entire target tree block or a partial area of the tree block is divided into four.
  • the shape and size of each CU can be specified by using the shape and size of the tree block together.
  • the quantization parameter difference ⁇ qp is a difference qp ⁇ qp ′ between the quantization parameter qp in the target tree block and the quantization parameter qp ′ in the tree block encoded immediately before the target tree block.
  • CU layer In the CU layer, a set of data referred to by the video decoding device 1 for decoding a CU to be processed (hereinafter also referred to as a target CU) is defined.
  • the encoding node is a prediction tree (prediction tree).
  • PT prediction tree
  • TT root node of the transform tree
  • the encoding node is divided into one or a plurality of prediction blocks, and the position and size of each prediction block are defined.
  • the prediction block is one or a plurality of non-overlapping areas constituting the encoding node.
  • the prediction tree includes one or a plurality of prediction blocks obtained by the above division.
  • Prediction processing is performed for each prediction block.
  • a prediction block that is a unit of prediction is also referred to as a prediction unit (PU).
  • intra prediction There are roughly two types of division in the prediction tree: intra prediction and inter prediction.
  • inter prediction there are 2N ⁇ 2N (the same size as the encoding node), 2N ⁇ N, N ⁇ 2N, N ⁇ N, and the like.
  • the encoding node is divided into one or a plurality of transform blocks, and the position and size of each transform block are defined.
  • the transform block is one or a plurality of non-overlapping areas constituting the encoding node.
  • the conversion tree includes one or a plurality of conversion blocks obtained by the above division.
  • the division in the transformation tree includes the one in which an area having the same size as the encoding node is assigned as the transformation block, and the one in the recursive quadtree division as in the above-described division of the tree block.
  • transform processing is performed for each conversion block.
  • the transform block which is a unit of transform is also referred to as a transform unit (TU).
  • the CU information CU specifically includes a skip flag SKIP, PT information PTI, and TT information TTI.
  • the skip flag SKIP is a flag indicating whether or not the skip mode is applied to the target PU.
  • the value of the skip flag SKIP is 1, that is, when the skip mode is applied to the target CU, PT information PTI and TT information TTI in the CU information CU are omitted. Note that the skip flag SKIP is omitted for the I slice.
  • the PT information PTI is information regarding the PT included in the CU.
  • the PT information PTI is a set of information related to each of one or more PUs included in the PT, and is referred to when the moving image decoding apparatus 1 generates a predicted image.
  • the PT information PTI includes prediction type information PType and prediction information PInfo.
  • Prediction type information PType is information that specifies whether intra prediction or inter prediction is used as a prediction image generation method for the target PU.
  • the prediction information PInfo is composed of intra prediction information or inter prediction information depending on which prediction method is specified by the prediction type information PType.
  • a PU to which intra prediction is applied is also referred to as an intra PU
  • a PU to which inter prediction is applied is also referred to as an inter PU.
  • the prediction information PInfo includes information specifying the shape, size, and position of the target PU. As described above, the generation of the predicted image is performed in units of PU. Details of the prediction information PInfo will be described later.
  • TT information TTI is information related to TT included in the CU.
  • the TT information TTI is a set of information regarding each of one or a plurality of TUs included in the TT, and is referred to when the moving image decoding apparatus 1 decodes residual data.
  • a TU may be referred to as a block.
  • the TT information TTI includes TT division information SP_TT that designates a division pattern for each transform block of the target CU, and quantized prediction residuals QD1 to QDNT (NT is a target CU). The total number of blocks contained in).
  • TT division information SP_TT is information for determining the shape and size of each TU included in the target CU and the position in the target CU.
  • the TT division information SP_TT can be realized from information (split_transform_unit_flag) indicating whether or not the target node is to be divided and information (trafoDepth) indicating the division depth.
  • each TU obtained by the division can have a size from 32 ⁇ 32 pixels to 2 ⁇ 2 pixels.
  • Each quantization prediction residual QD is encoded data generated by the moving image encoding apparatus 2 performing the following processes 1 to 3 on a target block that is a processing target block.
  • Process 1 DCT transform (Discrete Cosine Transform) of the prediction residual obtained by subtracting the prediction image from the encoding target image;
  • Process 2 Quantize the transform coefficient obtained in Process 1;
  • Process 3 Variable length coding is performed on the transform coefficient quantized in Process 2;
  • prediction information PInfo As described above, there are two types of prediction information PInfo: inter prediction information and intra prediction information.
  • the inter prediction information includes an encoding parameter that is referred to when the video decoding device 1 generates an inter predicted image by inter prediction. More specifically, the inter prediction information includes inter PU division information that specifies a division pattern of the target CU into each inter PU, and inter prediction parameters for each inter PU.
  • the inter prediction parameters include a reference image index, an estimated motion vector index, and a motion vector residual.
  • the intra prediction information includes an encoding parameter that is referred to when the video decoding device 1 generates an intra predicted image by intra prediction. More specifically, the intra prediction information includes intra PU division information that specifies a division pattern of the target CU into each intra PU, and intra prediction parameters for each intra PU.
  • the intra prediction parameter is a parameter for designating an intra prediction method (prediction mode) for each intra PU.
  • the moving picture decoding apparatus 1 includes H. H.264 / MPEG-4.
  • a method adopted in AVC a method adopted in KTA software, which is a codec for joint development in VCEG (Video Coding Expert Group), and a method adopted in TMuC (Test Model under Consideration) software, which is the successor codec And the technology employed in HM (HEVC Test Model) software.
  • FIG. 1 is a block diagram showing a configuration of the moving picture decoding apparatus 1.
  • the moving picture decoding apparatus 1 includes a variable length code decoding unit 13, a motion vector restoration unit 14, a buffer memory 15, an inter prediction image generation unit 16, an intra prediction image generation unit 17, and a prediction method determination unit 18. , An inverse quantization / inverse transform unit 19, an adder 20, a deblocking filter 41, and an adaptive filter 150.
  • the moving picture decoding apparatus 1 is an apparatus for generating moving picture # 2 by decoding encoded data # 1.
  • the variable length code decoding unit 13 decodes the prediction parameter PP related to each partition from the encoded data # 1. That is, for the inter prediction partition, the reference image index RI, the estimated motion vector index PMVI, and the motion vector residual MVD are decoded from the encoded data # 1, and these are supplied to the motion vector restoration unit 14. On the other hand, with respect to the intra prediction partition, (1) size designation information for designating the size of the partition and (2) prediction index designation information for designating the prediction index are decoded from the encoded data # 1, and this is decoded into the intra prediction image. This is supplied to the generation unit 17. In addition, the variable length code decoding unit 13 decodes the CU information from the encoded data, and supplies this to the prediction method determination unit 18 (not shown).
  • variable length code decoding unit 13 decodes the quantization prediction residual QD for each block and the quantization parameter difference ⁇ qp for the tree block including the block from the encoded data # 1, and dequantizes and decodes them. This is supplied to the inverse conversion unit 19. In addition, the variable length code decoding unit 13 decodes the filter on / off information, the filter set number, and the filter coefficient group from the encoded data # 1, and supplies them to the adaptive filter 150.
  • the motion vector restoration unit 14 restores the motion vector mv related to each inter prediction partition from the motion vector residual MVD related to that partition and the restored motion vector mv ′ related to another partition. Specifically, (1) the estimated motion vector pmv is derived from the restored motion vector mv ′ according to the estimation method specified by the estimated motion vector index PMVI, and (2) the derived estimated motion vector pmv and the motion vector remaining are derived. The motion vector mv is obtained by adding the difference MVD. It should be noted that the restored motion vector mv ′ relating to other partitions can be read from the buffer memory 15. The motion vector restoration unit 14 supplies the restored motion vector mv to the inter predicted image generation unit 17 together with the corresponding reference image index RI. For the inter prediction partition that performs bi-directional prediction (weighted prediction), the restored two motion vectors mv1 and mv2 are supplied to the inter prediction image generation unit 17 together with the corresponding reference image indexes RI1 and RI2.
  • the inter prediction image generation unit 16 generates a motion compensation image mc related to each inter prediction partition. Specifically, using the motion vector mv supplied from the motion vector restoration unit 14, the motion compensated image mc from the filtered decoded image P_FL ′ designated by the reference image index RI also supplied from the motion vector restoration unit 14 is used. Is generated.
  • the filtered decoded image P_FL ′ is obtained by performing deblocking processing by the deblocking filter 41 and adaptive filtering processing by the adaptive filter 150 on the decoded image that has already been decoded.
  • the inter prediction image generation unit 16 is an image, and can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 15.
  • the motion compensation image mc generated by the inter prediction image generation unit 16 is supplied to the prediction method determination unit 18 as an inter prediction image Pred_Inter.
  • a motion compensated image mc1 is generated from the filtered decoded image P_FL1 ′ specified by the reference image index RI1 using the motion vector mv1.
  • a motion compensated image mc2 is generated from the filtered decoded image P_FL2 ′ specified by the reference image index RI2 using the motion vector mv2, and (3) weighting between the motion compensated image mc1 and the motion compensated image mc2
  • An inter predicted image Pred_Inter is generated by adding an offset value to the average.
  • the intra predicted image generation unit 17 generates a predicted image Pred_Intra related to each intra prediction partition. Specifically, first, the prediction mode decoded from the encoded data # 1 is referred to, and the prediction mode is assigned to the target partition in, for example, raster scan order. Subsequently, a predicted image Pred_Intra is generated from the decoded image P according to the prediction method indicated by the prediction mode. The intra predicted image Pred_Intra generated by the intra predicted image generation unit 17 is supplied to the prediction method determination unit 18.
  • the intra predicted image generation unit 17 supplies the adaptive filter 150 with intra coding mode information IEM that is information indicating the size of the target partition and the prediction mode assigned to the target partition.
  • IEM intra coding mode information
  • the prediction method determination unit 18 determines whether each partition is an inter prediction partition for performing inter prediction or an intra prediction partition for performing intra prediction based on the CU information.
  • the inter predicted image Pred_Inter generated by the inter predicted image generation unit 16 is supplied to the adder 20 as the predicted image Pred.
  • the inter predicted image generation unit 17 generates the inter predicted image Pred_Inter.
  • the intra predicted image Pred_Intra that has been processed is supplied to the adder 20 as the predicted image Pred.
  • the inverse quantization / inverse transform unit 19 (1) inversely quantizes the quantized prediction residual QD, (2) performs inverse DCT (Discrete Cosine Transform) transform on the DCT coefficient obtained by the inverse quantization, and (3) The prediction residual D obtained by the inverse DCT transform is supplied to the adder 20.
  • the inverse quantization / inverse transform unit 19 derives the quantization step QP from the quantization parameter difference ⁇ qp supplied from the variable length code decoding unit 13.
  • the generation of the prediction residual D by the inverse quantization / inverse transform unit 19 is performed in units of blocks (transform units).
  • the adder 20 generates the decoded image P by adding the prediction image Pred supplied from the prediction method determination unit 18 and the prediction residual D supplied from the inverse quantization / inverse transformation unit 19.
  • the deblocking filter 41 determines that the block boundary in the decoded image P or the block boundary in the decoded image P when the difference between the pixel values of pixels adjacent to each other via the block boundary in the decoded image P or the CU boundary is smaller than a predetermined threshold value. By performing deblocking processing on the CU boundary, an image near the block boundary or the vicinity of the CU boundary is smoothed. The image subjected to the deblocking process by the deblocking filter 41 is output to the adaptive filter 150 as a deblocked decoded image P_DB.
  • the adaptive filter 150 performs a filtering process using the filter parameter FP decoded from the encoded data # 1 on the deblocked decoded image P_DB supplied from the deblocking filter 41, thereby obtaining a filtered decoded image P_FL. Is generated.
  • the image subjected to the filter processing by the adaptive filter 150 is output to the outside as the filtered decoded image P_FL, and is associated with the POC designation information decoded from the encoded data by the variable length code decoding unit 13 in the buffer memory 15. Stored. Since a specific configuration of the adaptive filter 150 will be described later, description thereof is omitted here.
  • Adaptive filter 150 When the syntax adaptive_loop_filter_flag is 1, the adaptive filter 150 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB.
  • the adaptive filter 150 associates the target unit region with one of the above-described characteristic value partial regions according to the characteristic value of the deblocked decoded image P_DB in the target unit region, and the characteristic value portion to which the unit region is associated.
  • a filter process is performed on the unit area using the filter coefficient decoded for the area.
  • the adaptive filter according to the present embodiment derives a plurality of characteristic values having different derivation methods from each other for each unit region constituting the pre-filter image (for example, the deblocked decoded image P_DB). Each unit region is classified into one or a plurality of groups according to the above. In addition, the adaptive filter according to the present embodiment acts on the pre-filter image for each unit region using a filter coefficient determined for each unit region.
  • the unit region may be a block that is a unit of DCT transform (more generally, frequency transform) described later, a partition that is a unit for generating a predicted image described later, Instead of any partition, it may be an area whose size and position are set by the adaptive filter according to the present embodiment. Further, the unit area may be composed of one pixel. In the present embodiment, a 4 ⁇ 4 block will be described as a unit area.
  • Each group has a one-to-one correspondence with each partial area set on a multidimensional area spanned by a plurality of characteristic values. Therefore, it is determined how to set one or a plurality of groups by designating how to divide the multidimensional region into partial regions.
  • the derived characteristic values are referred to as a first characteristic value X, a second characteristic value Y, and a third characteristic value Z, respectively.
  • the multidimensional area spanned by the plurality of characteristic values is also referred to as a characteristic value area, and each partial area set on the characteristic value area is also referred to as a characteristic value partial area.
  • a one-dimensional index is used as an index for designating each partial area.
  • An index that designates each characteristic value partial area is referred to as an area index ridx.
  • Each unit area is grouped (classified) by assigning an area index ridx. That is, the unit areas to which the area index ridx having the same value is assigned are grouped as areas having the same characteristics.
  • the grouped partial areas are called characteristic value classification areas or classification areas.
  • the characteristic value classification area of a certain area index ridx is simply called the area of the area index ridx.
  • the first characteristic value X the second characteristic value Y, and the third characteristic value Z
  • the following values can be used.
  • the calculation method for a characteristic value and a combination of characteristic values used to calculate a region index is called a characteristic value calculation method.
  • a characteristic value calculation method it is possible to use a plurality of characteristic values (characteristic value calculation methods) in the area index calculation.
  • the characteristic value calculation method since the characteristic value calculation method corresponds to the region index calculation method, it can be uniquely indicated by using a characteristic value mode alf_filter_mode described later.
  • the characteristic value calculation method can also be indicated by using a region adaptation mode that is a type of feature amount mode and a flag (for example, a BA calculation mode described later) that designates one feature amount mode belonging to a certain type.
  • the characteristic value calculation method can also be expressed by a set of characteristic values as in the following example, for example.
  • degree of activity an absolute value difference sum may be used, or Laplacian or variance may be used.
  • pixel decimation may be used to calculate the characteristic value including the degree of activity.
  • a pixel value outside the unit region may be used.
  • the pixel outside the slice using the pixel value within the slice so that the characteristic value can be calculated using only the pixel value within the slice. It is preferable to derive the value and calculate the characteristic value.
  • each characteristic value derived for each unit area may depend on the size of the unit area depending on the derivation method.
  • a normalized characteristic value obtained by removing the dependency on the size of the unit region can be used as each characteristic value.
  • FIG. 18 is an example of the syntax table of the filter parameter FP according to the present embodiment.
  • the filter parameters FP # 1 include adaptive_loop_filter_flag, alf_region_adaptation_flag, alf_filter_mode, alf_num_filters_minus1, alf_region_idx [], alf_pred_method, alf_min_kstart_minus1, alf_golomb_alco_j
  • adaptive_loop_filter_flag is a flag that specifies on / off of adaptive filter processing by the adaptive filter 150 to be described later.
  • adaptive_loop_filter_flag is 0, adaptive filter processing is specified to be off.
  • adaptive_loop_filter_flag is 1, adaptive filter processing is on. Specified.
  • the region adaptation mode alf_region_adaptation_flag is a syntax indicating the type of feature amount mode (region classification method) alf_feature_mode for switching the classification method when classifying the region from the attribute of the unit region, and takes a value of 0 or 1.
  • alf_filter_mode is a syntax indicating the shape of the filter reference region (hereinafter also referred to as filter shape).
  • alf_region_idx [i] (1 ⁇ i ⁇ AlfNumRegions) is a syntax for designating a filter index for each partial region.
  • the RA mode is a division when coordinates are used as the characteristic value calculation method, that is, when the coordinates in the image (frame) of the target unit region are used, and this division is called coordinate space division.
  • the BA mode is a division when a pixel value is used as a characteristic value calculation method, that is, when a pixel value or an encoding parameter in a target unit area is used, and is called feature space division with respect to coordinate space division.
  • the region adaptation mode alf_region_adaptation_flag a value that is further finely divided according to a difference in the characteristic value calculation method may be used.
  • the RA1 mode and the RA2 mode can be used as one of the RA modes
  • the BA1 mode and the BA2 mode can be used as the area adaptation mode as one of the BA modes.
  • the region adaptation mode may be a type in which feature amount modes are grouped, or the feature amount mode may be used as it is.
  • the region structure may be encoded using a one-dimensional syntax alf_filter_pattern [i] (1 ⁇ i ⁇ AlfNumRegions).
  • the partial areas are indexed in a predetermined order (raster scan order).
  • alf_filter_pattern only partial areas with adjacent indexes can be merged. That is, only sub-regions adjacent in a predetermined order can be merged.
  • alf_filter_pattern [i] is encoded with 0 when the partial region of i-1 and the partial region of i are merged, and is encoded with 1 when they are not merged. In the example of FIG.
  • alf_filter_pattern [] of 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0 is encoded.
  • FIG. 23 is a block diagram of the adaptive filter 150.
  • the adaptive filter 150 includes an adaptive filter information decoding unit 151 and an adaptive filter 152.
  • the adaptive filter information decoding unit 151 includes a filter shape decoding unit 1511, a region structure decoding unit 1512, a region adaptive mode decoding unit 1513, a filter coefficient decoding unit 1514, and a filter coefficient storage unit 1515.
  • the adaptive filter unit 152 An index calculation unit 1522, a filter coefficient allocation unit 1523, and a filter unit 1524 are provided.
  • the filter shape decoding unit 1511 decodes the syntax alf_filter_mode included in the filter parameter FP # 1.
  • the region structure decoding unit 1512 decodes the region structure from the syntax alf_region_idx [i] included in the filter parameter FP # 1 shown in FIG. Also, the region structure may be decoded from alf_filter_pattern [].
  • the region adaptation mode decoding unit 1513 decodes the syntax alf_region_adaptation_flag.
  • the decoded syntax alf_region_adaptation_flag is supplied to the region index calculation unit 1522.
  • the filter coefficient decoding unit 1514 uses a filter coefficient group AlfRegionFilterCoeff [i] [k] (0 ⁇ i ⁇ AlfNumFilters, 0 ⁇ k ⁇ Ntotal: Ntotal: Ntotal is included in one filter coefficient group from the syntax alf_coeff_luma [i] [k].
  • the total number of filter coefficient groups AlfRegionFilterCoeff [i] [k] is AlfNumFilters.
  • the filter coefficient decoding unit 1514 calculates a filter coefficient group AlfRegionFilterCoeff used for the filter processing using the following equation.
  • k is a value from 0 to the number of filter coefficients minus 1
  • AlfRegionFilterCoeff [i] [k] is calculated for each filter coefficient (that is, for each value of k) by the above equation.
  • the filter coefficient storage unit 1515 stores the filter coefficient group RegionFilterLuma [i] [k] decoded by the filter coefficient decoding unit 1514.
  • i is an index for referring to the filter coefficient group, and is also referred to as a filter index fidx hereinafter. Since the number of filter coefficient groups is AlfNumFilters, the filter index is designated by a value from 0 to AlfNumFilters-1.
  • a filter coefficient group decoded from the encoded data # 1 is used as a filter coefficient group used in the filter processing.
  • a filter coefficient group provided in advance in the decoding apparatus can be referred to as a filter coefficient. It may be used.
  • the filter coefficient storage unit 1515 stores the filter shape alf_filter_mode supplied from the filter coefficient decoding unit 1514.
  • the region structure decoding unit 1512 decodes the region structure syntax from the filter parameter FP # 1, and refers to the filter coefficient group for each of the partial regions (characteristic value classification regions) grouped by the region index. Assign a filter index. Specifically, one filter index fidx is assigned to each region index ridx (0 ⁇ ridx ⁇ AlfNumRegions) that designates a partial region.
  • the region structure decoding unit 1512 decodes the filter number AlfNumFilters and outputs it to the filter coefficient decoding unit 1514.
  • the region structure decoding unit 1512 decodes the filter index fidx for each region index ridx, and derives a filter index table FilterIdxTbl [ridx] (0 ⁇ ridx ⁇ AlfNumRegions) indicating the relationship between the region index ridx and the filter index fidx.
  • the derived filter index table FilterIdxTbl [] is output to the filter coefficient assigning unit 1523.
  • the filter index table FilterIdxTbl [] is a table that defines the filter index fidx when the region index is ridx by the following formula.
  • FilterIdxTblA [] ⁇ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ⁇
  • FilterIdxTblA a different filter index is assigned to each partial area. That is, all the partial areas are not merged but are assigned different values. At this time, the total number of filter indexes AlfNumFilters is 16.
  • the adaptive filter unit 152 is configured to generate a filtered decoded image P_FL by performing an adaptive filter process on each unit region constituting the deblocked decoded image P_DB.
  • the filter coefficient used for the filtering process of each unit region is changed from the filter coefficient RegionFilterLuma [i] [j] decoded from the filter parameter FP # 1 to the characteristic value of the deblocked decoded image P_DB in the unit region. It is selected according to the region index determined accordingly.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15.
  • the image input to the adaptive filter unit 152 is not limited to the deblocked decoded image P_DB, and a plurality of input images can be input.
  • the adaptive filter unit 152 may be configured to input at least one of the decoded image P and the prediction residual D in addition to the deblocked decoded image P_DB.
  • the region index calculation unit 1522 calculates each characteristic value not only for the deblocked decoded image P_DB but also for at least one of the decoded image P and the prediction residual D, and the filter unit 1524. May be configured to perform adaptive filter processing on each input image, and output after adding the filtered images.
  • the filter parameter FP # 1 may include a filter coefficient for each input image and a filter coefficient corresponding to each characteristic value partial region.
  • the area index calculation unit 1522 is area classification means for classifying into partial areas from the attribute of the unit area using the characteristic values obtained by one or more characteristic value calculation methods. Specifically, the area index calculating unit 1522 includes certain coordinates (x, The area index ridx of the unit area indicated by y) is obtained. In this embodiment, an example in which a one-dimensional area index is used will be described. However, an area index of a vector amount may be used, such as a value including a characteristic value X and a characteristic value Y.
  • the feature amount mode alf_feature_mode which is a region index calculation method, is set based on the region adaptation mode alf_region_adaptation_flag.
  • the feature amount mode alf_feature_mode is calculated according to the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode.
  • FIG. 17 is a block diagram illustrating a configuration of the area index calculation unit 1522.
  • the area index calculation unit 1522 includes an RA mode area index calculation unit 1550, a BA1 mode area index calculation unit 1560, a BA2 mode area index calculation unit 1570, an area index selection unit 1525, and a feature amount mode calculation unit 1526.
  • a first characteristic value calculation unit 1571, a BA2 second characteristic value calculation unit 1572, and a BA2 area index calculation unit 1575 are provided.
  • the BA1 mode area index calculation unit 1560 and the BA2 mode area index calculation unit 1561 are shown as separate means. However, as will be described later, the BA1 mode and the BA2 mode indicate the calculation direction of the intermediate value. Except for the above, since the calculation can be performed by means of the same configuration, the operation may be changed according to the BA mode calculation mode alf_ba_comp_mode for switching between the BA1 mode and the BA2 mode using a common means and a BA mode area index calculation unit.
  • the area index calculation unit 1522 calculates two or more of the unit area specified by the coordinate values (xC, yC) from the coordinate value, the unit area and its surrounding pixel values, and the unit area and its surrounding encoding parameters.
  • the region index is calculated by calculating the characteristic value of the axis.
  • the feature amount mode calculation unit 1526 calculates a feature amount mode alf_feature_mode according to the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode.
  • the region adaptation mode alf_region_adaptation_flag takes one of the values of RA mode and BA mode
  • the feature amount mode alf_feature_mode takes one of the values of RA mode, BA1 mode, and BA2 mode.
  • FIG. 15 is a diagram illustrating a relationship among the region adaptation mode alf_region_adaptation_flag, the filter shape alf_filter_mode, and the feature amount mode alf_feature_mode according to the first embodiment.
  • the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode are values encoded as syntax of the encoding mode, and the feature amount mode alf_feature_mode is a value derived from the decoded syntax. As shown in the figure, when the region adaptation mode alf_region_adaptation_flag is the RA mode, the feature amount mode alf_feature_mode uses the RA mode, and when the region adaptation mode alf_region_adaptation_flag is the BA mode, the feature amount depends on the filter shape alf_filter_mode. Switch mode alf_feature_mode.
  • alf_ba_comp_mode in the figure is a value for identifying the characteristic value calculation method in the feature space division (BA mode), and is referred to as a BA calculation mode.
  • FIG. 6 is a diagram illustrating a combination of the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode according to the present embodiment.
  • the filter shape is selected for each of the two area adaptive modes (RA mode and BA mode).
  • the filter shape options are two filter shapes (star, cross).
  • the feature amount calculation mode is selected in accordance with the filter shape.
  • the region index selection unit 1525 switches the region index calculation method according to the value of the feature amount mode alf_feature_mode. Specifically, from the RA mode area index calculation unit 1550, the BA1 mode area index calculation unit 1560, and the BA2 mode area index calculation unit 1570 depending on whether the feature amount mode is the RA mode, BA1 mode, or BA2 mode. Select each output region index.
  • the region index selection unit 1525 includes at least one characteristic value calculation method, calculates a characteristic value of the unit region based on the characteristic value calculation method, and calculates a region index for classifying the unit region.
  • At least one coordinate space division here, RA mode
  • at least one feature space division mode are provided, if the region classification based on one feature amount is not appropriate, the other region classification can compensate. This is suitable for encoding efficiency. It is also appropriate to provide a plurality of different feature space division modes for the same reason.
  • the RA mode area index calculation unit 1550 calculates an area index with reference to the coordinate values for the unit area specified by the coordinate values (xC, yC).
  • the RA first characteristic value calculation unit 1551 outputs a value xIdx obtained by quantizing the X coordinate xC
  • the RA second characteristic value calculation unit 1552 outputs a value yIdx obtained by quantizing the Y coordinate yC
  • the RA region index calculation unit 1555 is calculated from xIdx and yIdx. More specifically, xIdx and yIdx are calculated by the following equations.
  • calculation is performed by the following formula using the table regionTab.
  • yIdx ⁇ 2 can also be expressed as yIdx ⁇ w.
  • w is the range of the characteristic value X.
  • raster scanning can be used as a method of calculating the region index ridx from the characteristic value X and the characteristic value Y.
  • ridx (yIdx ⁇ 2) + xIdx
  • the BA1 mode area index calculation unit 1560 calculates an area index for a unit area specified by coordinate values (xC, yC) with reference to the unit area or pixel values around the unit area.
  • the BA1 first characteristic value calculation unit 1561 outputs the activity act as the characteristic value X of the unit block
  • the BA1 second characteristic value calculation unit 1562 outputs the activity direction as the characteristic value Y of the unit block, and calculates the BA1 region index.
  • a region index ridx is calculated from act and direction. More specifically, act and direction are calculated according to the following procedure.
  • act and direction are calculated according to the following procedure.
  • the horizontal activity varTempH and the vertical activity varTempV of each pixel are calculated. In the following formula, Laplacian is used, but a simple difference may be used.
  • varTempH [x] [y]
  • varTempV [x] [y]
  • s ′ is an input pixel value of the adaptive filter, and
  • is a function for calculating an absolute value.
  • varTemp1 and varTemp2 are calculated by the following formula.
  • i, j -1..1.
  • the activity of the unit block is calculated by adding the intermediate values within the unit block (or including the periphery of the unit block) by the following formula. That is, the activity varTemp3, the horizontal activity varTempH1, and the horizontal activity varTempV1 are calculated.
  • the direction of the partial area where there is no edge may be set to 1, and the direction of the partial area assumed to have an edge may be set to 0 or 2. That is, when the direction is arranged in the characteristic value Y, the order of magnitude is preferably horizontal edge, no edge, vertical edge, or vertical edge, no edge, horizontal edge. In general, a partial region that is assumed to have a vertical edge and a partial region that is assumed to have a horizontal edge have different characteristics from each other, and therefore, filter processing is often performed using different filter coefficient groups. When the filter index is estimated from the already processed partial area (adjacent area) having the same characteristic value X or characteristic value Y, the characteristics of the adjacent partial areas are similar in the characteristic value area. The order is preferred. Note that the above order is suitable not only for filter indexes but also for estimating filter coefficient groups from adjacent regions.
  • the intermediate value varTemp3 is normalized according to the bit depth and clipped to a value of 0 to 15 as follows. Furthermore, the clipped value is acted by quantizing the table varTab.
  • Clip3 (x, y, z) is a function that clips the value z between x and y, and BitDepthY indicates the bit depth of the pixel.
  • the table varTab is set so that the area with smaller activity is classified more finely. That is, the range of the pre-quantization activity varTemp3 that is quantized to a small value is set to be narrower than the range of the pre-quantization activity varTemp3 that is quantized to a large value. This is because, in general, an image is often concentrated in a region having a small activity.
  • the above constraint that the range of values quantized to a small value is smaller does not necessarily have to be satisfied at all stages, and may be satisfied in many cases.
  • the edges in the two directions orthogonal to each other are identified with a relatively small amount of calculation, and classified as different regions.
  • the horizontal edge and the vertical edge can be distinguished by using the horizontal activity and the vertical activity.
  • the horizontal activity and the vertical activity used to calculate the directionality can be used to calculate the activity.
  • the amount of calculation can be reduced.
  • the calculation of directionality is performed by comparing the horizontal activity and the vertical activity, it can be realized with a relatively small amount of calculation.
  • the BA2 mode area index calculation unit 1570 calculates an area index with reference to the coordinate values for the unit area specified by the coordinate values (xC, yC).
  • the BA2 first characteristic value calculation unit 1571 outputs the activity act as the characteristic value X of the unit block
  • the BA2 second characteristic value calculation unit 1572 outputs the activity direction of the unit block
  • the BA2 filter index calculation unit 1575 activates the act.
  • the area index ridx is calculated from and direction. More specifically, act and direction are calculated according to the following flow. First, as an intermediate value, the first oblique activity varTempDA of each pixel and the second oblique activity varTempDB in a direction different from the first oblique activity are calculated.
  • Laplacian is used, but a simple difference may be used.
  • varTempDA [x] [y]
  • varTempDB [x] [y]
  • s ′ is an input pixel value of the adaptive filter
  • is a function for calculating an absolute value.
  • varTemp1 and varTemp2 are calculated by the following formula.
  • i, j -1..1.
  • the activity of the unit block is calculated by adding the intermediate values within the unit block (or including the periphery of the unit block) by the following formula. That is, the activity varTemp3, the horizontal activity varTempDA1, and the horizontal activity varTempDB1 are calculated.
  • the first characteristic value act is calculated from the intermediate value varTemp3 by the same method as in the BA1 mode.
  • the BA2 area index calculation unit 1575 also obtains ridx from the act and direction as in BA1.
  • FIG. 31 is a diagram illustrating a method for calculating a region index from two characteristic values.
  • FIG. 31 (a) is a diagram for explaining a first region index calculation method.
  • the five-stage characteristic value X and the three-stage characteristic value Y are scanned in the order of raster scan, and in the order of 0 to 15 in the figure. to scan.
  • FIG. 31B is a diagram for explaining a second region index calculation method.
  • the raster scan order as in the first region index calculation method
  • the next lower left edge characteristic value X is 0
  • the change in the characteristic value X in the X-axis direction is large between adjacent partial regions in the scan order.
  • This calculation method is called a one-stroke (Hilbert scan) calculation method.
  • FIG. 31 (c) is a diagram for explaining a third region index calculation method.
  • the characteristic value X when the characteristic value X is small, the characteristic value Y is assigned without distinction.
  • the characteristic value X corresponding to the degree of activity regional disorder, edge strength, gradient magnitude
  • the directionality is relatively low, so the directionality is fine when the activity level is low.
  • the subspace is not divided using. More specifically, it can be calculated by the following formula using a predetermined threshold TH.
  • FIG. 31 (d) is a diagram for explaining a fourth region index calculation method.
  • the fourth region index calculation method when the characteristic value X is small and the characteristic value Y belongs to a specific group, the granularity of classification of the characteristic value X is lowered.
  • the characteristic value X is small, the case (frequency) classified as having directionality is relatively small. Therefore, when the characteristic value Y corresponding to the directionality is 1 or 2 indicating the directionality, since the frequency when the characteristic value X is small is small, a plurality of characteristic values X are collectively assigned to one area index. .
  • the range (threshold value) of the characteristic value X assigned to a certain area index is made larger than when the characteristic value Y corresponds to no directionality.
  • ridxtbl [] ⁇ 0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15 ⁇ Can be calculated by the following formula.
  • ridx tbl [tmpidx]
  • the BA2 mode described above is different from the BA1 mode in that the edges in the two directions orthogonal to each other are identified with a relatively small amount of computation by obtaining the two-dimensional characteristic value using the activities in the directions orthogonal to each other. It can be classified as a region.
  • an oblique 45 degree edge and an oblique 135 degree direction edge perpendicular thereto can be identified.
  • the angle is described as an angle formed by an edge when the horizontal direction is 0 degree.
  • the filter coefficient assigning unit 1523 assigns a filter coefficient to the area.
  • fix FilterIdxTbl [ridx].
  • the filter coefficient RegionFilterLuma [ridx] corresponding to the obtained filter index fix is read from the filter coefficient storage unit 1515 and output to the filter unit 1524.
  • the region index calculation unit 1522 and the filter coefficient assignment unit 1523 assign a filter coefficient group to each unit region. That is, the region index calculation unit 1522 calculates a region index ridx for each unit region, and the filter coefficient allocation unit 1523 allocates a filter coefficient group from the region index ridx.
  • the filter coefficient allocating unit 1523 When the target partial region is filtered off, the filter coefficient allocating unit 1523 outputs a signal for filtering off to the filter unit 1524 without allocating the filter coefficient for the region.
  • the adaptive filter-off decoding unit corresponds to the case where the filter-off for each region is designated or the case where the filter-off is designated for each unit region such as a CU unit.
  • FIG. 13 is a diagram showing an example of the filter shape used in the embodiment of the present invention.
  • the filter shape defines a reference region R described later.
  • the filter shapes in FIGS. 13A to 13D are examples of filter shapes (oblique shape) having a relatively large number of reference pixels in the oblique direction, and are sequentially referred to as a star, a rectangle, a rectangle ', and a rectangle'. .
  • the filter shapes shown in FIGS. 13E to 13H are examples of a filter shape (horizontal and vertical direction shape) having a relatively large number of reference pixels in the horizontal direction or the vertical direction. This is called a rhombus.
  • 13F is a filter shape that refers to a pixel in a rectangular region centered on the filter target pixel and pixels located in the vertical and horizontal directions of the filter target pixel. Since this filter shape includes a diagonal pixel located in the rectangular area and a pixel extending in the vertical and horizontal directions in a well-balanced manner, high coding efficiency can be realized with a small number of reference pixels. In addition, since this filter shape is a combination of a simple shape of a rectangle and a line, mounting is easy.
  • a spatial filter that uses surrounding pixels of the target pixel reduces noise generated in the target pixel by a weighted average of pixels that are highly correlated with the target pixel (pixels that are close in pixel value to the target pixel) and has high correlation. Using more pixels in the direction is more effective. Since the region including the diagonal edge has a high correlation in the diagonal direction, a filter shape having a large number of pixels in the diagonal direction is suitable. The region including the horizontal edge or the vertical edge has a high correlation between the horizontal edge and the vertical edge. Therefore, a filter shape having a large number of horizontal and vertical pixels is preferable.
  • the classification of the filter shape is basically determined using a ratio of the total number of reference pixels located in a specific direction.
  • the horizontal direction, vertical direction, 45 ° oblique direction, and 135 ° oblique direction are counted closest to the center pixel, and the horizontal and vertical counts are counted.
  • the horizontal / vertical shape is classified.
  • the number of reference pixels in the oblique direction is equal to the number of pixels in the horizontal and vertical directions, and it cannot be said that the number of reference pixels in the oblique direction is relatively large.
  • the filter shape classification may be relative.
  • FIG. 14 is an example of a set of filter coefficients used in the embodiment of the present invention.
  • a set of an oblique shape and a horizontal and vertical shape is used.
  • a set of stars and crosses is used.
  • filter coefficients having different directions are included.
  • the directionality of the filter shape is not limited to the oblique direction and the horizontal / vertical direction, and may have other directions.
  • a filter shape having a direction of 45 degrees oblique direction, 135 degrees oblique direction (counterclockwise with the horizontal direction being 0 degree), or a horizontal vertical direction A filter shape having horizontal and vertical directivity can be used.
  • FIG. 4 is a diagram illustrating a relationship between a filter shape and a characteristic value calculation method (BA calculation mode alf_ba_comp_mode) in a suitable feature space division.
  • BA calculation mode alf_ba_comp_mode a characteristic value calculation method
  • the BA calculation mode being in the diagonal direction corresponds to using the BA mode having a high performance of decomposing edges and gradients in the diagonal direction
  • the BA2 mode corresponds to the feature amount mode
  • the horizontal / vertical BA calculation mode corresponds to the use of a BA mode having relatively high resolution performance of edges and gradients in the horizontal and vertical directions
  • the feature amount mode corresponds to the BA1 mode.
  • the diagonal BA calculation mode is suitable for a filter shape of 45 degrees and 135 degrees
  • the horizontal and vertical BA calculation mode is suitable for a horizontal and vertical filter shape. It is.
  • FIG. 5 is a diagram illustrating an example of a combination of the filter shape and the BA calculation mode according to the present embodiment.
  • the filter shape mode alf_filter_mode is 0, an oblique star is used as the filter shape, and an oblique direction is used as the BA characteristic mode.
  • the filter shape mode alf_filter_mode is 1, an example is shown in which an oblique cross is used as the filter shape and the horizontal / vertical direction is used as the BA characteristic mode.
  • the filter shape is suitable for the diagonal direction
  • the characteristic value calculation method suitable for the diagonal direction is used, and when the filter shape is suitable for the horizontal and vertical direction, the characteristic suitable for the horizontal and vertical direction is used.
  • the value calculation method it is possible to classify into characteristic value partial regions suitable for the edge direction and gradient direction of the image, and a high adaptive filter effect can be obtained. Furthermore, by using a filter shape suitable for the edge direction and gradient direction of the image, a higher adaptive filter effect can be obtained.
  • the combination of the region adaptive mode is the RA mode, the BA1 mode, and the BA2 mode.
  • the complexity can be reduced by matching the directionality of the characteristic value calculation method used for the feature space division with the directionality of the filter shape.
  • FIG. 32 shows another configuration of a combination of the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode of the present embodiment.
  • the region adaptive mode takes values of the RA1 mode, RA2 mode, BA1 mode, and BA2 mode, and uses the diagonal shape in the RA1 mode and BA2 mode, and the horizontal and vertical shape in the RA2 mode and BA1 mode.
  • the RA mode is used as the feature amount mode in both cases where the region adaptation mode is the RA1 mode and the RA2 mode.
  • the directionality of the characteristic value calculation method corresponds to the directionality of the filter shape.
  • the configuration for switching the characteristic value division characteristic value calculation method (BA calculation mode) according to the filter shape has been described.
  • the filter shape calculation method according to the characteristic value division characteristic value calculation method is described. It doesn't matter.
  • FIG. 32B shows an example in which the BA calculation mode is further decoded when the area adaptation mode is the BA mode.
  • the BA calculation mode is an oblique direction
  • an oblique shape such as a star or a rectangle is used as the filter shape
  • a horizontal shape such as a cross or a rhombus is used as the filter shape.
  • a vertical shape is used. Even if the filter shape is decoded so that the RECT1 box in FIG. 32A and the RECT2 box in FIG.
  • the calculation method may be decrypted.
  • the data structure does not encode the filter structure alf_filter_mode as in FP # 5, or the characteristic value calculation method is similar to FP # 7 in the case where the region adaptive mode corresponding to the coordinate space division is the RA mode.
  • the filter structure alf_filter_mode is encoded, but when the characteristic value calculation method is the BA mode corresponding to the feature space division, alf_fitler_mode is not encoded.
  • the means for calculating the filter shape from the characteristic value calculation method includes a region adaptive mode / filter shape decoding unit 1913, a region adaptive mode / filter shape as described in the third embodiment and the modification of the third embodiment.
  • the decoding unit 2113 is used.
  • the filter unit 1524 performs a filtering process using the filter coefficient RegionFilterLuma [fidx] and the filter shape alf_filter_mode on the target unit area, thereby generating a filtered decoded image P_FL in the target unit area.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15.
  • the pixel value of the filter target pixel in the filtered decoded image P_FL (also referred to as “filtered image”) is represented as SF (x ′, y ′), and the deblocked decoded image P
  • the filter unit 1524 calculates the pixel value SF (x ′, y ′) by the equation (1). To do.
  • the coordinates (x, y) may be the same coordinates as the coordinates (x ′, y ′), or different coordinates as long as they have a one-to-one correspondence.
  • a (u, v) represents a filter coefficient multiplied by the pixel value S (x + u, y + v) of the pre-filter image, and each component of the filter coefficient RegionFilterLuma [fidx] supplied from the filter coefficient assigning unit 1523
  • o represents an offset component included in the filter coefficient RegionFilterLuma [fidx].
  • R in Equation (1) represents a region referred to in the filter process (also referred to as “filter reference region R”).
  • the filter shape of the reference region R is specified by alf_filter_mode.
  • the decoding apparatus has an adaptive filter-off decoding unit and no filter coefficient is allocated, the filtering process is not performed.
  • the moving picture coding apparatus 2 includes H.264 as a part thereof. H.264 / MPEG-4.
  • a method adopted in AVC a method adopted in KTA software, which is a codec for joint development in VCEG (Video Coding Expert Group), and a method adopted in TMuC (Test Model under Consideration) software, which is the successor codec And the technology employed in HM (HEVC TestModel) software.
  • FIG. 3 is a block diagram showing a configuration of the moving picture encoding apparatus 2 according to the present embodiment.
  • the moving image encoding device 2 includes a transform / quantization unit 21, a variable-length code encoding unit 22, an inverse quantization / inverse transform unit 23, a buffer memory 24, an intra predicted image generation unit 25, An inter-predicted image generation unit 26, a motion vector detection unit 27, a prediction scheme control unit 28, a motion vector redundancy deletion unit 29, an adder 31, a subtractor 32, a deblocking filter 33, and an adaptive filter 160 are provided.
  • the moving image encoding device 2 is a device that generates encoded data # 1 by encoding moving image # 10 (encoding target image).
  • the transform / quantization unit 21 performs (1) DCT transform (Discrete Cosine Transform) on the prediction residual D obtained by subtracting the predicted image Pred from the encoding target image, and (2) DCT coefficients obtained by the DCT transform. (3) The quantized prediction residual QD obtained by the quantization is supplied to the variable-length code encoding unit 22 and the inverse quantization / inverse transform unit 23.
  • the transform / quantization unit 21 selects (1) a quantization step QP used for quantization for each tree block, and (2) a quantization parameter difference indicating the size of the selected quantization step QP. ⁇ qp is supplied to the variable length code encoding unit 22, and (3) the selected quantization step QP is supplied to the inverse quantization / inverse conversion unit 23.
  • DCT transform Discrete Cosine Transform
  • the variable length code encoding unit 22 includes (1) a quantized prediction residual QD and ⁇ qp supplied from the transform / quantization unit 21, and (2) a quantization parameter PP supplied from a prediction scheme control unit 28 described later, (3)
  • the encoded data # 1 is generated by variable-length encoding the filter set number, filter coefficient group, region designation information, and on / off information supplied from the adaptive filter 160 described later.
  • the inverse quantization / inverse transform unit 23 (1) inversely quantizes the quantized prediction residual QD, (2) performs inverse DCT (Discrete Cosine Transform) transformation on the DCT coefficient obtained by the inverse quantization, and (3) The prediction residual D obtained by the inverse DCT transform is supplied to the adder 31.
  • the quantization step QP supplied from the transform / quantization unit 21 is used.
  • the prediction residual D output from the inverse quantization / inverse transform unit 23 is obtained by adding a quantization error to the prediction residual D input to the transform / quantization unit 21. Common names are used for this purpose.
  • the intra predicted image generation unit 25 generates a predicted image Pred_Intra related to each partition. Specifically, (1) a prediction mode used for intra prediction is selected for each partition, and (2) a prediction image Pred_Intra is generated from the decoded image P using the selected prediction mode. The intra predicted image generation unit 25 supplies the generated intra predicted image Pred_Intra to the prediction method control unit 28.
  • the intra-predicted image generation unit 25 identifies the prediction index PI for each partition from the size of each partition from the prediction mode selected for each partition, and supplies the prediction index PI to the prediction method control unit 28. .
  • the intra predicted image generation unit 25 supplies the adaptive filter 160 with intra coding mode information IEM that is information indicating the size of the target partition and the prediction mode assigned to the target partition.
  • IEM intra coding mode information
  • the motion vector detection unit 27 detects a motion vector mv related to each partition. Specifically, (1) the filtered decoded image P_FL ′ to be used as a reference image is selected, and (2) the target partition is searched by searching for the region that best approximates the target partition in the selected filtered decoded image P_FL ′. Detects a motion vector mv.
  • the filtered decoded image P_FL ′ is obtained by performing deblocking processing by the deblocking filter 33 and adaptive filtering processing by the adaptive filter 160 on the decoded image that has already been decoded. It is an image, and the motion vector detection unit 27 can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 24.
  • the motion vector detection unit 27 supplies the detected motion vector mv to the inter prediction image generation unit 26 and the motion vector redundancy deletion unit 29 together with the reference image index RI that specifies the filtered decoded image P_FL ′ used as the reference image.
  • the reference image index RI specifies the filtered decoded image P_FL ′ used as the reference image.
  • two filtered decoded images P_FL1 ′ and P_FL2 ′ are selected as reference images, and each of the two filtered decoded images P_FL1 ′ and P_FL2 ′ is selected.
  • Corresponding motion vectors mv1 and mv2 and reference image indexes RI1 and RI2 are supplied to the inter predicted image generation unit 26 and the motion vector redundancy deletion unit 29.
  • the inter prediction image generation unit 26 generates a motion compensation image mc related to each inter prediction partition. Specifically, using the motion vector mv supplied from the motion vector detection unit 27, the motion compensated image mc is obtained from the filtered decoded image P_FL ′ designated by the reference image index RI supplied from the motion vector detection unit 27. Generate. Similar to the motion vector detection unit 27, the inter predicted image generation unit 26 can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 24. The inter prediction image generation unit 26 supplies the generated motion compensated image mc (inter prediction image Pred_Inter) together with the reference image index RI supplied from the motion vector detection unit 27 to the prediction method control unit 28.
  • inter prediction image Pred_Inter inter prediction image Pred_Inter
  • the motion compensated image mc1 is generated from the filtered decoded image P_FL1 ′ specified by the reference image index RI1 using the motion vector mv1, and (2 )
  • a motion compensated image mc2 is generated from the filtered reference image P_FL2 ′ designated by the reference image index RI2 using the motion vector mv2, and (3) an offset value is added to the weighted average of the motion compensated image mc1 and the motion compensated image mc2. Is added to generate the inter predicted image Pred_Inter.
  • the prediction method control unit 28 compares the intra predicted image Pred_Intra and the inter predicted image Pred_Inter with the encoding target image, and selects whether to perform intra prediction or inter prediction.
  • the prediction scheme control unit 28 supplies the intra prediction image Pred_Intra as the prediction image Pred to the adder 31 and the subtracter 32 and also predicts the prediction index PI supplied from the intra prediction image generation unit 25.
  • the parameter PP is supplied to the variable length code encoder 22.
  • the prediction scheme control unit 28 supplies the inter prediction image Pred_Inter as the prediction image Pred to the adder 31 and the subtractor 32, and the reference image index supplied from the inter prediction image generation unit 26.
  • the RI and the estimated motion vector index PMVI and the motion vector residual MVD supplied from the motion vector redundancy deleting unit 29 (described later) are supplied to the variable length code encoding unit as the prediction parameters PP.
  • the prediction residual D is generated by the subtractor 32 by subtracting the prediction image Pred selected by the prediction method control unit 28 from the encoding target image.
  • the prediction residual D generated by the subtractor 32 is DCT transformed / quantized by the transform / quantization unit 21 as described above.
  • the adder 31 by adding the prediction image Pred selected by the prediction method control unit 28 to the prediction residual D generated by the inverse quantization / inverse transformation unit 23, the adder 31 generates a local decoded image P. Generated.
  • the local decoded image P generated by the adder 31 passes through the deblocking filter 33 and the adaptive filter 160, and is then stored in the buffer memory 24 as a filtered decoded image P_FL and used as a reference image in inter prediction.
  • the motion vector redundancy deleting unit 29 deletes the redundancy in the motion vector mv detected by the motion vector detecting unit 27. Specifically, (1) an estimation method used for estimating the motion vector mv is selected, (2) an estimated motion vector pmv is derived according to the selected estimation method, and (3) the estimated motion vector pmv is subtracted from the motion vector mv. As a result, a motion vector residual MVD is generated.
  • the motion vector redundancy deletion unit 29 supplies the generated motion vector residual MVD to the prediction method control unit 28 together with the estimated motion vector index PMVI indicating the selected estimation method.
  • the deblocking filter 33 determines whether the block boundary in the decoded image P or the block boundary in the decoded image P or the block boundary in the decoded image P or the block boundary in the decoded image P is smaller than a predetermined threshold value. By performing deblocking processing on the CU boundary, an image near the block boundary or the vicinity of the CU boundary is smoothed. The image subjected to the deblocking process by the deblocking filter 33 is output to the adaptive filter 160 as a deblocked decoded image P_DB.
  • the adaptive filter 160 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB supplied from the deblocking filter 33.
  • the filtered decoded image P_FL that has been filtered by the adaptive filter 160 is stored in the buffer memory 24. Since a specific configuration of the adaptive filter 160 will be described later, description thereof is omitted here.
  • the adaptive filter 160 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB.
  • the generated filtered decoded image P_FL is stored in the buffer memory 24.
  • the adaptive filter 160 supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as the filter parameter FP # 1.
  • the variable length code encoding unit 22 encodes the filter parameter FP # 1 as part of the encoded data # 1.
  • FIG. 24 is a block diagram showing a configuration of the adaptive filter 160.
  • the adaptive filter 160 includes an adaptive filter information setting unit 161 and an adaptive filter unit 162.
  • the adaptive filter information setting unit 161 includes a filter shape setting unit 1611, a region structure setting unit 1612, a region adaptive mode setting unit 1613, a filter coefficient residual generation unit 1614, a filter coefficient storage unit 1615, and A filter parameter generation unit 1616 is provided.
  • the filter shape setting unit 1611 sets the syntax alf_filter_mode for specifying the filter shape of the filter coefficient.
  • the set syntax alf_filter_mode is supplied to the filter parameter generation unit 1616.
  • the area structure setting unit 1612 sets the filter index table FilterIndexTbl.
  • the set syntax FilterIndexTbl is supplied to the filter parameter generation unit 1616.
  • the region adaptation mode setting unit 1613 sets the syntax alf_region_adaptation_flag.
  • the set syntax alf_region_adaptation_flag is supplied to the adaptive filter unit 162 and further supplied to the filter parameter generation unit 1616.
  • alf_filter_mode is set so that the encoding efficiency is further improved.
  • FilterIndexTbl is set so that the encoding efficiency is further improved.
  • the filter coefficient residual generation unit 1614 generates the syntax alf_coeff_luma [i] [k] by the following equation.
  • the generated filter coefficient residual alf_coeff_luma [i] [k] is supplied to the filter parameter generation unit 1616.
  • the filter coefficient storage unit 1615 stores a filter coefficient group AlfRegionFilterCoeff [i] [k] and a filter shape alf_filter_mode supplied from a filter coefficient deriving unit 1623 described later.
  • the filter parameter generation unit 1616 generates the filter parameter FP # 1 from the syntax alf_filter_mode and alf_region_adaptation_flag, the filter index FilterIndexTbl [ridx], and alf_coeff_luma [i] [k].
  • the generated filter parameter FP # 1 is supplied to the variable length code encoding unit 22.
  • the adaptive filter unit 162 includes an area index calculation unit 1522, a filter coefficient derivation unit 1623, and a filter unit 1524.
  • An area index calculation unit 1522 is provided. Since the region index calculation unit 1522 and the filter unit 1524 have already been described, description thereof is omitted here.
  • the filter coefficient deriving unit 1623 derives a filter coefficient RegionFilterLuma [i] [j] such that the error between the filtered decoded image P_FL and the encoding target image in the target characteristic value classification region becomes smaller.
  • the derived filter coefficient RegionFilterLuma [i] [j] is supplied to the filter unit 1524 and stored in the filter coefficient storage unit 1615.
  • a filter coefficient is derived.
  • the unit 1623 derives a filter coefficient a (u, v) and an offset o that minimize the square error E given by the following equation (1-5), for example.
  • the filter coefficient a (u, v) and the offset o are components of RegionFilterLuma [i] [j].
  • the region index calculation unit calculates a classification parameter (region index) for classifying each unit region from the multi-dimensional characteristic value calculated from the attribute of the unit region. Filter processing is performed using one filter shape from the filter shapes.
  • the feature space division for performing region classification using the pixel values of the unit region is provided as the region index calculation method
  • the direction of the characteristic calculation method used for the feature space division and the characteristic value division region in the adaptive filter The directionality of the filter shape of the filter coefficient group assigned and used for the filter processing in the filter unit is made to correspond.
  • a characteristic value calculation method (BA1 mode) having horizontal / vertical directionality
  • a horizontal / vertical filter shape cross in this embodiment
  • an oblique directionality is provided.
  • the direction of the characteristic calculation method used for the feature space division and the direction of the filter shape of the filter coefficient group such as using an oblique shape (star in this embodiment) filter shape.
  • a filtering process suitable for the directionality such as the edge direction or gradient direction of the region.
  • a filter shape having two directions of cross and stars is used.
  • a filter shape having one or more directions such as only a cross and only a star may be provided.
  • two modes, BA1 mode and BA2 mode are used as a region index calculation method having directionality
  • a single mode such as only the BA1 mode or only the BA2 mode may be used.
  • the area index calculation method a configuration including any of the BA1 mode only, the BA2 mode only, the RA mode and the BA1 mode, and the RA mode and the BA2 mode is possible.
  • a filter shape corresponding to the region index calculation method can be used.
  • the region classification changes and the filter shape suitable for each region changes, but by using a filter shape suitable for the region index calculation method as shown in this embodiment, a high effect can be obtained.
  • An adaptive filter can be applied.
  • the above configuration also has an effect of reducing the complexity of the encoding device by matching the directionality of the characteristic value calculation method used for the feature space division with the directionality of the filter shape.
  • the data structure of the encoded data # 3 is substantially the same as the data structure of the encoded data # 1 according to the first embodiment, but the configuration of the filter parameter FP is different.
  • FIG. 19 is an example of the syntax table of the filter parameter FP according to the present embodiment.
  • the filter parameters FP # 3 include adaptive_loop_filter_flag, alf_region_adaptation_flag, alf_filter_mode [], alf_num_filters_minus1, alf_region_idx [], alf_pred_method, alf_min_kstart_minus1, alf_coloeff_lumf_i. .
  • the filter shape mode alf_filter_mode [i] (0 ⁇ i ⁇ AlfNumFilters) for each filter coefficient group is included.
  • Adaptive_loop_filter_flag is a flag for designating on / off of adaptive filter processing by the adaptive filter 170.
  • alf_filter_mode [i] (1 ⁇ i ⁇ AlfNumFilters) is a syntax indicating a filter shape.
  • alf_region_idx [i] (1 ⁇ i ⁇ AlfNumRegions) is a syntax for designating a filter index for each partial region.
  • the video decoding device 3 according to the present embodiment includes an adaptive filter 170 instead of the adaptive filter 150 included in the video decoding device 1 according to the first embodiment.
  • Other configurations of the video decoding device according to the present embodiment are the same as the configurations of the video decoding device 1 according to the first embodiment, and thus the description thereof is omitted.
  • FIG. 25 is a block diagram of the adaptive filter 170.
  • the adaptive filter 170 includes an adaptive filter information decoding unit 171 and an adaptive filter 172.
  • the adaptive filter information decoding unit 171 includes a filter shape decoding unit 1711, a region structure decoding unit 1712, a region adaptive mode decoding unit 1713, a filter coefficient decoding unit 1714, and a filter coefficient storage unit 1715.
  • the adaptive filter unit 172 includes a region An index calculation unit 1722, a filter coefficient allocation unit 1723, and a filter unit 1524 are provided.
  • the region structure decoding unit 1712 decodes the filter number AlfNumFilters and outputs the result to the filter coefficient decoding unit 1714 and the filter shape decoding unit 1711.
  • the filter number AlfNumFilters is supplied from the region structure decoding unit 1712.
  • FIG. 7 is a diagram showing the relationship between the filter coefficient group and the filter shape.
  • the filter shape of the filter coefficient group (characteristic value classification region) of the filter index i is specified by alf_filter_mode [i].
  • the region structure decoding unit 1512 decodes the region structure from the syntax alf_region_idx [i] included in the filter parameter FP # 3 shown in FIG.
  • the region adaptation mode decoding unit 1713 decodes the syntax alf_region_adaptation_flag.
  • the decoded syntax alf_region_adaptation_flag is supplied to the region index calculation unit 1722.
  • the filter coefficient decoding unit 1714 uses the syntax alf_coeff_luma [i] [k] to generate a filter coefficient group AlfRegionFilterCoeff [i] [k] (0 ⁇ i ⁇ AlfNumFilters, 0 ⁇ k ⁇ Ntotal: Ntotal is included in one filter coefficient group.
  • the total number of filter coefficient groups AlfRegionFilterCoeff [i] [k] is AlfNumFilters.
  • the filter coefficient decoding unit 1714 calculates a filter coefficient group AlfRegionFilterCoeff used for the filter processing using the following equation.
  • k is a value from 0 to the number of filter coefficients ⁇ 1.
  • the prediction filter index pred_idx (0 ⁇ pred_idx ⁇ i) is an index that designates a reference filter used for prediction of filter coefficients, and a filter index of a filter coefficient group that has already been decoded is used.
  • AlfRegionFilterCoeff [i] [k] is calculated by the above equation for each filter coefficient (that is, for each value of k). That is, each filter coefficient of the filter coefficient group corresponding to each filter index is restored by adding a predicted value to the filter coefficient residual (here, alf_coeff_luma) obtained by decoding the encoded data.
  • the prediction filter index pred_idx is characterized by using a filter coefficient of an already decoded filter coefficient group having the same filter shape as a prediction value.
  • FIG. 12 is a block diagram showing the configuration of the filter coefficient decoding unit 1714.
  • the filter coefficient predicted value calculation unit 1772 calculates the last filter index number using the filter shape of alf_filter_mode [i] as follows:
  • the prediction index number pred_idx is calculated by reading from the filter index storage unit 1773 classified by filter shape as in the following formula.
  • pred_idx last_idx [alf_filter_idx [i]]
  • the filter coefficient specified by pred_idx is obtained from the filter coefficient storage unit 1715. Read out and use the predicted value pred for the following equation.
  • pred [k] AlfRegionCoeff [pred_idx] [k]
  • a fixed value in this case, 0 is used as the prediction value.
  • the filter coefficient restoration unit 1771 restores the filter coefficient by the following formula using the calculated predicted value pred.
  • AlfRegionFilterCoeff [i] [k] pred [k] + alf_coeff_luma [i] [k]
  • addition is used, but if the following difference value is in the form of the predicted value-encoded value, the filter coefficient is restored by the following equation.
  • FIG. 8 is a diagram for explaining the prediction filter index calculation method.
  • the reference filter is referred to with the filter index (1) having the same filter shape as the prediction filter index, and the prediction of the filter coefficient is performed. I do.
  • the filter coefficient storage unit 1715 stores the filter coefficient group RegionFilterLuma [i] [k] decoded by the filter coefficient decoding unit 1714.
  • the filter coefficient storage unit 1715 stores the filter shape alf_filter_mode [i] supplied from the filter coefficient decoding unit 1714.
  • i is an index for referring to the filter coefficient group.
  • the region index calculation unit 1722 calculates the region index ridx of the filter target pixel having a certain coordinate (x, y).
  • the region index calculation method differs depending on the region adaptation mode alf_region_adaptation_flag.
  • the configuration of the region index calculation unit 1722 is substantially the same as that of the region index calculation unit 1522, except that a feature amount mode calculation unit 1726 (not shown) is provided instead of the feature amount mode calculation unit 1526.
  • the feature amount mode calculation unit 1726 calculates a feature amount mode alf_feature_mode according to the region adaptation mode alf_region_adaptation_flag.
  • FIG. 16 is a diagram illustrating a relationship between the region adaptation mode alf_region_adaptation_flag and the feature amount mode alf_feature_mode according to the second embodiment.
  • the region adaptation mode alf_region_adaptation_flag is a value encoded as the syntax of the encoding mode, and the filter shape alf_filter_mode and the feature amount mode alf_feature_mode are values derived from the decoded syntax. As shown in FIG.
  • the RA mode, BA1 mode, and BA2 mode are assigned to the feature amount mode alf_feature_mode when the region adaptation mode alf_region_adaptation_flag is the RA mode, BA1 mode, and BA2 mode.
  • the allocation is performed as shown in FIG. That is, allocation is performed so that different filter shapes are used in the two region adaptive modes.
  • the filter coefficient assigning unit 1723 assigns a filter coefficient to the area.
  • fix FilterIdxTbl [ridx].
  • the filter coefficient RegionFilterLuma [fidx] and the filter shape alf_filter_mode [fidx] corresponding to the obtained filter index fix are read from the filter coefficient storage unit 1715 and output to the filter unit 1524.
  • Moving image encoding device 4 which produces
  • the same wording and the same reference numerals are used for the parts already described, and the description thereof is omitted.
  • the moving image encoding device 4 according to the present embodiment includes an adaptive filter 180 instead of the adaptive filter 160 included in the moving image encoding device 2 according to the first embodiment.
  • Other configurations of the video encoding device 4 according to the present embodiment are the same as the configurations of the video encoding device 2 according to the first embodiment, and thus the description thereof is omitted.
  • the adaptive filter 180 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB.
  • the generated filtered decoded image P_FL is stored in the buffer memory 24.
  • the adaptive filter 180 supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as the filter parameter FP # 3.
  • the variable length code encoding unit 22 encodes the filter parameter FP # 3 as part of the encoded data # 3.
  • FIG. 26 is a block diagram showing the configuration of the adaptive filter 180.
  • the adaptive filter 180 includes an adaptive filter information setting unit 181 and an adaptive filter unit 182.
  • the adaptive filter information setting unit 181 includes a filter shape setting unit 1811, a region structure setting unit 1812, a region adaptive mode setting unit 1813, a filter coefficient residual generation unit 1814, a filter coefficient storage unit 1815, and a filter parameter generation unit 1816. ing.
  • the filter shape setting unit 1811 sets the syntax alf_filter_mode [i] for specifying the filter shape of the filter coefficient.
  • the set syntax alf_filter_mode is supplied to the filter parameter generation unit 1816.
  • the area structure setting unit 1812 sets the filter index table FilterIndexTbl.
  • the set syntax FilterIndexTbl is supplied to the filter parameter generation unit 1816.
  • the region adaptation mode setting unit 1813 sets the syntax alf_region_adaptation_flag.
  • the set syntax alf_region_adaptation_flag is supplied to the adaptive filter unit 182 and further supplied to the filter parameter generation unit 1816.
  • alf_filter_mode [i] FilterIndexTbl
  • alf_region_adaptation_flag are set so that the encoding efficiency is further improved.
  • the filter coefficient residual generation unit 1814 generates the syntax alf_coeff_luma [i] [k] by the following equation.
  • alf_coeff_luma [i] [k] AlfRegionFilterCoeff [i] [k]-pred [k] pred is a predicted value. Since the calculation method of the prediction value pred is the same as that of the filter coefficient decoding unit 1714, the description is omitted.
  • the following formula may be used as a method for calculating the difference value.
  • alf_coeff_luma [i] [k] pred [k]-AlfRegionFilterCoeff [i] [k]
  • the filter coefficient restoration in the filter coefficient decoding unit 1714 is calculated by the difference from the predicted value.
  • the generated filter coefficient residual alf_coeff_luma [i] [k] is supplied to the filter parameter generation unit 1816.
  • the filter coefficient storage unit 1815 stores a filter coefficient group AlfRegionFilterCoeff [i] [k] and a filter shape alf_filter_mode [i] supplied from a filter coefficient deriving unit 1823 described later.
  • the filter parameter generation unit 1816 generates the filter parameter FP # 3 from the syntax alf_filter_mode [i] and alf_region_adaptation_flag, the filter index FilterIndexTbl [ridx], and alf_coeff_luma [i] [k].
  • the generated filter parameter FP # 3 is supplied to the variable length code encoding unit 22.
  • the adaptive filter unit 182 includes a region index calculation unit 1722, a filter coefficient derivation unit 1823, and a filter unit 1524. Since the region index calculation unit 1722 and the filter unit 1524 have already been described, description thereof will be omitted here.
  • the filter coefficient deriving unit 1823 derives a filter coefficient RegionFilterLuma [i] [j] such that the error between the filtered decoded image P_FL and the encoding target image in the target characteristic value classification region becomes smaller.
  • the derived filter coefficient RegionFilterLuma [i] [j] is supplied to the filter unit 1524 and stored in the filter coefficient storage unit 1815.
  • the filter shape can be changed according to the filter coefficient group applied to each partial region.
  • a main edge strong edge in a specific direction or many edges in a specific direction
  • the effect of the adaptive filter is particularly great.
  • the region characteristic is an oblique edge
  • the oblique filter shape is effective
  • the region characteristic is a horizontal edge and a vertical edge
  • the horizontal and vertical filter shape is effective.
  • the filter shape suitable for the characteristics of the image is different. Therefore, a highly effective adaptive filter can be applied in the configuration of the present embodiment in which a filter shape suitable for each region can be used.
  • the third embodiment of the present invention will be described below with reference to FIGS. 9, 10, 16, 20, 20, 27, and 28.
  • the same words and the same reference numerals are used for the parts already described in the first and second embodiments, and the description thereof is omitted.
  • the third embodiment is characterized in that the filter shape is set according to the region adaptation mode.
  • the data structure of the encoded data # 5 is substantially the same as the data structure of the encoded data # 1 according to the first embodiment, but the configuration of the filter parameter FP is different.
  • FIG. 20 is an example of the syntax table of the filter parameter FP according to the present embodiment.
  • the filter parameter FP # 5 includes adaptive_loop_filter_flag, alf_region_adaptation_flag, alf_num_filters_minus1, alf_region_idx [], alf_pred_method, alf_min_kstart_minus1, alf_golomb_index_bit [i], alf_coeff_lum [co] lum.
  • the filter shape mode alf_filter_mode is not included.
  • Adaptive_loop_filter_flag is a flag that specifies on / off of adaptive filter processing by the adaptive filter 190.
  • alf_region_idx [i] (1 ⁇ i ⁇ AlfNumRegions) is a syntax for designating a filter index for each partial region.
  • Video decoding device 5 The video decoding device 5 according to the present embodiment includes an adaptive filter 190 instead of the adaptive filter 150 included in the video decoding device 1 according to the first embodiment.
  • Other configurations of the video decoding device according to the present embodiment are the same as the configurations of the video decoding device 1 according to the first embodiment, and thus the description thereof is omitted.
  • FIG. 27 is a block diagram of the adaptive filter 190.
  • the adaptive filter 190 includes an adaptive filter information decoding unit 191 and an adaptive filter 192.
  • the adaptive filter information decoding unit 191 includes a region structure decoding unit 1512, a region adaptive mode / filter shape decoding unit 1913, a filter coefficient decoding unit 1514, and a filter coefficient storage unit 1515.
  • the adaptive filter unit 192 includes a region index calculation unit. 1722, a filter coefficient assigning unit 1523, and a filter unit 1524.
  • the region index calculation unit 1722 calculates the feature amount mode alf_feature_mode according to the region adaptation mode alf_region_adaptation_flag, as already described with reference to FIG.
  • the region adaptive mode / filter shape decoding unit 1913 is means for decoding the filter shape so that the characteristic value calculation method and the filter shape correspond to each other, and decodes the syntax alf_region_adaptation_flag.
  • the decoded syntax alf_region_adaptation_flag is supplied to the region index calculation unit 1522.
  • the region adaptive mode / filter shape decoding unit 1913 also uses the region adaptive mode alf_region_adaptation_flag to select a filter shape as described below.
  • FIG. 9 is a diagram illustrating a combination of the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode according to the present embodiment.
  • the region adaptation mode alf_region_adaptation_flag is the feature space division (BA2 mode and BA1 mode)
  • the directionality of the filter shape and the directionality of the characteristic value calculation method seem to match.
  • the filter shape is selected.
  • the area adaptive mode is the oblique direction
  • the diagonal shape is associated
  • the area adaptive mode is the horizontal / vertical direction
  • the horizontal / vertical shape is associated. Specifically, as shown in FIGS.
  • the area adaptation mode is the BA2 mode, which is a characteristic value calculation method in the oblique direction
  • the stars and areas adapted to the oblique filter shape are used.
  • the mode is the BA1 mode, which is a characteristic value calculation method in the horizontal and vertical directions
  • the filter shape is assigned so that the cross is a horizontal and vertical filter shape.
  • the area adaptive mode is the RA mode
  • a horizontal / vertical cross is used as the filter shape.
  • the region index calculation unit 1522 selects a characteristic value calculation method from the filter shape.
  • the adaptive mode / filter shape decoding unit 1913 selects the characteristic value calculation method from the filter shape.
  • the configuration and arrangement of the means are not limited to this. That is, in the first embodiment, the means (feature amount mode calculation unit 1526) for selecting a characteristic value calculation method from the filter shape is set outside the region index calculation unit 1522, for example, the filter shape decoding unit 1511 or the region adaptive mode decoding unit. 1513 may be arranged. Similarly, in the third embodiment, the means for selecting the characteristic value calculation method from the filter shape may be arranged outside the adaptive mode / filter shape decoding unit 1913, for example, in the region index calculation unit 1722.
  • FIG. 10 is another example showing a combination of the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode of the present embodiment.
  • one coordinate space division and one feature space division are used as the region adaptation mode.
  • the area adaptive mode is the RA mode that is coordinate space division
  • the horizontal and vertical filter shapes are cross and the area adaptive mode is the feature space division.
  • the BA mode a star having an oblique filter shape is used.
  • the directionality of the filter shape matches the directionality of the characteristic value calculation method.
  • the filter shape corresponding to each region adaptive mode are different. Contrary to FIG. 10, when the region adaptive mode is the RA mode that is coordinate space division, the filter shape is oblique, and when the region adaptive mode is the BA mode that is feature space division, the horizontal and vertical shapes are used. It is also possible to use the filter shape.
  • the moving image encoding device 6 according to the present embodiment includes an adaptive filter 200 instead of the adaptive filter 160 included in the moving image encoding device 2 according to the first embodiment. Since the other configuration of the video decoding device 6 according to the present embodiment is the same as the configuration of the video encoding device 2 according to the first embodiment, description thereof will be omitted.
  • the adaptive filter 200 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB.
  • the generated filtered decoded image P_FL is stored in the buffer memory 24.
  • the adaptive filter 200 supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as the filter parameter FP # 5.
  • the variable length code encoding unit 22 encodes the filter parameter FP # 5 as part of the encoded data # 5.
  • FIG. 28 is a block diagram showing the configuration of the adaptive filter 200.
  • the adaptive filter 200 includes an adaptive filter information setting unit 201 and an adaptive filter unit 202.
  • the adaptive filter information setting unit 201 includes a region structure setting unit 1612, a region adaptive mode / filter shape setting unit 2013, a filter coefficient residual generation unit 1614, a filter coefficient storage unit 1615, and a filter parameter generation unit 2016.
  • the area structure setting unit 1612 sets the filter index table FilterIndexTbl and outputs it to the filter parameter generation unit 2016.
  • the region adaptation mode / filter shape setting unit 2013 sets the syntax alf_region_adaptation_flag and the filter shape alf_filter_mode.
  • the set syntax alf_region_adaptation_flag is supplied to the adaptive filter unit 2022, and alf_region_adaptation_flag and alf_filter_mode are output to the filter parameter generation unit 2016.
  • FilterIndexTbl and alf_region_adaptation_flag are set such that the encoding efficiency is further improved.
  • the filter coefficient residual generation unit 1614 generates the syntax alf_coeff_luma [i] [k].
  • the generated filter coefficient residual alf_coeff_luma [i] [k] is supplied to the filter parameter generation unit 2016.
  • the filter parameter generation unit 2016 generates a filter parameter FP # 5 from the syntax alf_region_adaptation_flag, the filter index FilterIndexTbl [ridx], and alf_coeff_luma [i] [k].
  • the generated filter parameter FP # 5 is supplied to the variable length code encoding unit 22. .
  • the filter shape can be changed according to the region adaptation mode. Select an appropriate filter shape based on the characteristic value calculation method determined in the area adaptive mode, assign a filter coefficient group of the selected filter shape to the partial area, and select a filter coefficient group of the filter shape selected in the assigned partial area.
  • the filter processing that is, when using the characteristic value calculation method (BA1 mode) having the directionality in the horizontal and vertical directions, the filter shape having a horizontal and vertical shape (cross in the present embodiment) is used.
  • the characteristic value calculation method (BA2 mode) having directionality is used, the directionality and filter coefficient of the characteristic calculation method used for the feature space division are used so as to use an oblique shape (star in this embodiment) filter shape.
  • the fill suitable for the directionality such as the edge direction and gradient direction of the region Processing can be performed.
  • a higher adaptive filter effect can be obtained with simpler processing than when different filter shapes can be selected for each region adaptive mode.
  • different filter shapes can be selected for each region adaptive mode
  • the processing amount is large.
  • the complexity can be reduced by matching the direction of the characteristic value calculation method used for the feature space division with the direction of the filter shape. Further, when the characteristic value calculation method is coordinate space division, the complexity can be reduced by assigning one filter shape.
  • the filter shape is set according to the region adaptation mode, and the filter shape is decoded in units of filter coefficients and the elements of the first embodiment in which the filter shape is assigned according to the region characteristic mode.
  • the feature is that the elements of the second embodiment are incorporated.
  • Encoded data # 7 Prior to detailed description of the video encoding device 8 and the video decoding device 7 according to the present embodiment, the encoded data # 7 generated by the video encoding device 8 and decoded by the video decoding device 7 is described. The data structure will be described.
  • the data structure of the encoded data # 7 is substantially the same as that of the encoded data # 1 according to the first embodiment, but the configuration of the filter parameter FP is different.
  • FIG. 21 is an example of the syntax table of the filter parameter FP # 7 according to the present embodiment.
  • the filter parameter FP # 7 includes adaptive_loop_filter_flag, alf_region_adaptation_flag, alf_filter_mode [], alf_num_filters_minus1, alf_region_idx [], alf_pred_method, alf_min_kstart_minus1, alf_golomb_alf_lumco_j
  • Adaptive_loop_filter_flag is a flag that specifies on / off of adaptive filter processing by the adaptive filter 210.
  • alf_region_idx [i] (1 ⁇ i ⁇ AlfNumRegions) is a syntax for designating a filter index for each partial region.
  • Video decoding device 7 The video decoding device 7 according to the present embodiment includes an adaptive filter 210 instead of the adaptive filter 150 included in the video decoding device 1 according to the first embodiment.
  • Other configurations of the video decoding device according to the present embodiment are the same as the configurations of the video decoding device 1 according to the first embodiment, and thus the description thereof is omitted.
  • FIG. 29 is a block diagram of the adaptive filter 210.
  • the adaptive filter 210 includes an adaptive filter information decoding unit 211 and an adaptive filter 212.
  • the adaptive filter information decoding unit 211 includes a region structure decoding unit 1712, a region adaptive mode / filter shape decoding unit 2113, a filter coefficient decoding unit 1714, and a filter coefficient storage unit 1715.
  • the adaptive filter unit 212 includes a region index calculation unit. 1522, a filter coefficient assigning unit 1723, and a filter unit 1524.
  • the region index calculation unit 1522 calculates the feature mode alf_feature_mode according to the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode, as already described with reference to FIG.
  • the region adaptive mode / filter shape decoding unit 2113 decodes the syntax alf_region_adaptation_flag.
  • the decoded syntax alf_region_adaptation_flag is supplied to the region index calculation unit 1522.
  • FIG. 11 is a diagram illustrating a combination of a region adaptation mode alf_region_adaptation_flag and a filter shape alf_filter_mode according to a modification of the present embodiment.
  • three region adaptive modes RA mode, BA1 mode, BA2 mode
  • the filter shape is selected in accordance with the region adaptive mode.
  • the region adaptive mode / filter shape decoding unit 2113 decodes the filter shape in units of filter coefficient groups as in the second embodiment when the region adaptive mode is the RA mode that is coordinate space division. Conversely, when the area adaptive mode is the BA1 mode or BA2 mode that is the feature space division, the filter shape is assigned according to the area adaptive mode, as in the third embodiment. At this time, the feature amount calculation mode is selected according to the filter shape as in the first embodiment. In this embodiment, a filter shape is assigned according to the region adaptation mode.
  • the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode obtained by the region adaptation mode / filter shape decoding unit 2113 are supplied to the region index calculation unit 1522.
  • the filter shape alf_filter_mode is further supplied to the filter coefficient decoding unit 1714.
  • Moving picture encoding device 8 In the following, a moving picture encoding apparatus 8 that generates encoded data # 7 by encoding an encoding target picture will be described with reference to FIG. In the following description, the same wording and the same reference numerals are used for the parts already described, and the description thereof is omitted.
  • the moving picture encoding apparatus 8 according to the present embodiment includes an adaptive filter 220 instead of the adaptive filter 160 included in the moving picture encoding apparatus 2 according to the first embodiment.
  • Other configurations of the video encoding device 8 according to the present embodiment are the same as the configurations of the video encoding device 2 according to the first embodiment, and thus the description thereof is omitted.
  • the adaptive filter 220 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB.
  • the generated filtered decoded image P_FL is stored in the buffer memory 24.
  • the adaptive filter 220 supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as the filter parameter FP # 7.
  • the variable length code encoding unit 22 encodes the filter parameter FP # 7 as part of the encoded data # 7.
  • FIG. 30 is a block diagram showing the configuration of the adaptive filter 220. As shown in FIG. As shown in FIG. 30, the adaptive filter 220 includes an adaptive filter information setting unit 221 and an adaptive filter unit 222.
  • the adaptive filter information setting unit 221 includes a region structure setting unit 1812, a region adaptive mode / filter shape setting unit 2213, a filter coefficient residual generation unit 1814, a filter coefficient storage unit 1815, and a filter parameter generation unit 2216.
  • the area structure setting unit 1812 sets the filter index table FilterIndexTbl and outputs the filter index table FilterIndexTbl to the filter parameter generation unit 2216.
  • the region adaptation mode / filter shape setting unit 2213 sets the syntax alf_region_adaptation_flag and the filter shape alf_filter_mode [i].
  • the set syntax alf_region_adaptation_flag and alf_filter_mode [i] are supplied to the adaptive filter unit 222 and further output to the filter parameter generation unit 2216.
  • filter_mode [i] FilterIndexTbl
  • alf_region_adaptation_flag are set so that the encoding efficiency is further improved.
  • the filter coefficient residual generation unit 1814 generates the syntax alf_coeff_luma [i] [k].
  • the generated filter coefficient residual alf_coeff_luma [i] [k] is supplied to the filter parameter generation unit 2216.
  • the filter parameter generation unit 2216 generates the filter parameter FP # 7 from the syntax alf_region_adaptation_flag, the filter index FilterIndexTbl [ridx], and alf_coeff_luma [i] [k].
  • alf_region_adaptation_flag is in the BA1 mode and BA2 mode, which are feature space divisions, alf_filter_mode is not encoded.
  • the generated filter parameter FP # 7 is supplied to the variable length code encoding unit 22.
  • the adaptive filter unit 222 includes a region index calculation unit 1522, a filter coefficient derivation unit 1823, and a filter unit 1524. Since the filter coefficient deriving unit 1823 and the filter unit 1524 have already been described, description thereof is omitted here.
  • the region index calculation unit 1522 calculates the feature amount mode alf_feature_mode according to the region adaptation mode alf_region_adaptation_flag and the filter shape alf_filter_mode.
  • the filter shape can be changed according to the characteristic value calculation method determined by the region adaptation mode.
  • the area adaptation mode characteristic value calculation method
  • the filter shape is changed in units of partial areas, so that the characteristics of the partial areas that differ depending on the position and coordinates of the area on the screen It is possible to use a filter shape according to the above, and a high adaptive filter effect can be obtained. That is, even when coordinates having no directionality are used as the characteristic values (coordinate space division), it is possible to perform a filtering process in accordance with characteristics such as the directionality of the region.
  • the characteristic value calculation method of the area adaptive mode is the feature space division BA mode (BA1 mode and BA2 mode)
  • the characteristic of the partial area is calculated from the pixel value of the unit area by the corresponding characteristic value calculation method (BA calculation).
  • BA calculation characteristic value calculation method
  • a highly effective adaptive filter can be applied regardless of whether the characteristic value calculation method is coordinate space division or feature space division.
  • the complexity is reduced by matching the direction of the characteristic value calculation method used for the feature space division with the direction of the filter shape. Is realized.
  • the above-described moving image encoding device 2 and moving image decoding device 1 can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like.
  • FIG. 33A is a block diagram illustrating a configuration of a transmission device PROD_A in which the moving image encoding device 2 is mounted.
  • the transmission device PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image and the encoded data obtained by the encoding unit PROD_A1.
  • a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided.
  • the moving image encoding apparatus 2 described above is used as the encoding unit PROD_A1.
  • the transmission device PROD_A is a camera PROD_A4 that captures a moving image, a recording medium PROD_A5 that records the moving image, an input terminal PROD_A6 that inputs the moving image from the outside, as a supply source of the moving image input to the encoding unit PROD_A1.
  • An image processing unit A7 that generates or processes an image may be further provided.
  • FIG. 33A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 according to the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
  • FIG. 33 is a block diagram illustrating a configuration of a receiving device PROD_B in which the moving image decoding device 1 is mounted.
  • the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator.
  • a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2.
  • the moving picture decoding apparatus 1 described above is used as the decoding unit PROD_B3.
  • the receiving device PROD_B has a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3.
  • PROD_B6 may be further provided.
  • FIG. 33B illustrates a configuration in which the reception apparatus PROD_B includes all of these, but a part of the configuration may be omitted.
  • the recording medium PROD_B5 may be used for recording a non-encoded moving image, or may be encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
  • a terrestrial digital broadcast broadcasting station (broadcasting equipment or the like) / receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting.
  • a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
  • a server workstation etc.
  • Client television receiver, personal computer, smart phone etc.
  • VOD Video On Demand
  • video sharing service using the Internet is a transmitting device for transmitting and receiving modulated signals by communication.
  • PROD_A / reception device PROD_B usually, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN.
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multi-function mobile phone terminal.
  • the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
  • FIG. 34 is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described moving picture encoding apparatus 2 is mounted.
  • the recording device PROD_C has an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M.
  • the moving image encoding apparatus 2 described above is used as the encoding unit PROD_C1.
  • the recording medium PROD_M may be of a type built in the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) For example, it may be loaded into a drive device (not shown) built in the recording device PROD_C.
  • the recording device PROD_C is a camera PROD_C3 that captures moving images as a supply source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and reception for receiving moving images.
  • the unit PROD_C5 and an image processing unit C6 that generates or processes an image may be further provided.
  • FIG. 34A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but a part of the configuration may be omitted.
  • the receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
  • Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is a main supply source of moving images).
  • a camcorder in this case, the camera PROD_C3 is a main source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images
  • a smartphone is also an example of such a recording device PROD_C.
  • FIG. 34 (b) is a block diagram showing a configuration of a playback device PROD_D in which the above-described video decoding device 1 is mounted.
  • the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written in the recording medium PROD_M and a coded data read by the read unit PROD_D1. And a decoding unit PROD_D2 to be obtained.
  • the moving picture decoding apparatus 1 described above is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory, It may be of a type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.
  • the playback device PROD_D has a display PROD_D3 that displays a moving image, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image as a supply destination of the moving image output by the decoding unit PROD_D2.
  • PROD_D5 may be further provided.
  • FIG. 34B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but a part may be omitted.
  • the transmission unit PROD_D5 may transmit an unencoded moving image, or transmits encoded data encoded by a transmission encoding method different from the recording encoding method. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using an encoding method for transmission between the decoding unit PROD_D2 and the transmission unit PROD_D5.
  • Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main supply destination of moving images).
  • a television receiver in this case, the display PROD_D3 is a main supply destination of moving images
  • a digital signage also referred to as an electronic signboard or an electronic bulletin board
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images.
  • Desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main video image supply destination), laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a moving image)
  • a smartphone which is a main image supply destination
  • a smartphone in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination
  • the like are also examples of such a playback device PROD_D.
  • each block of the moving picture decoding apparatus 1 and the moving picture encoding apparatus 2 may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). ) May be implemented in software.
  • IC chip integrated circuit
  • CPU Central Processing Unit
  • each of the devices includes a CPU that executes instructions of a control program that realizes each function, a ROM (Read Memory) that stores the program, a RAM (Random Access Memory) that expands the program, the program, and A storage device (recording medium) such as a memory for storing various data is provided.
  • An object of the present invention is to provide a recording medium in which a program code (execution format program, intermediate code program, source program) of a control program for each of the above devices, which is software that realizes the above-described functions, is recorded so as to be readable by a computer. This can also be achieved by supplying each of the above devices and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU (Micro Processing Unit)).
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and CD-ROMs (Compact Disc-Read-Only Memory) / MO (Magneto-Optical) / Discs including optical discs such as MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable), cards such as IC cards (including memory cards) / optical cards, mask ROM / EPROM (Erasable) Programmable Read-only Memory) / EEPROM (registered trademark) (Electrically Eraseable and Programmable Read-only Memory) / Semiconductor memories such as flash ROM, or logic circuits such as PLD (Programmable Logic Device) and FPGA (Field Programmable Gate Gate Array) Etc. can be used.
  • tapes such as magnetic tapes and cassette tapes
  • magnetic disks such as floppy (registered trademark) disks / hard disk
  • each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • the communication network is not particularly limited as long as it can transmit the program code.
  • the Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna Television) communication network, Virtual Private Network (Virtual Private Network), A telephone line network, a mobile communication network, a satellite communication network, etc. can be used.
  • the transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.
  • the image filter device operates on an input image composed of a plurality of unit regions, and each pixel value of an output image in each unit region is converted to each pixel value of a reference pixel determined by the filter shape.
  • a region index calculating unit that classifies the unit region into partial regions on the characteristic value region using the obtained characteristic value; a unit that selects a characteristic value calculating method based on a filter shape; and a characteristic value
  • Filter means When further comprising at least one means for selecting a filter shape based on the calculation method, and using a specific characteristic value calculation method, Filter means, and performing a filtering process using a filter shape having a shape corresponding to the characteristic value calculating method, and a filter coefficient associated with the partial area.
  • a filter shape corresponding to the characteristic value calculation method can be used.
  • the region classification changes, and the filter shape suitable for each region changes. Therefore, a highly effective adaptive filter can be applied by using a filter shape suitable for the characteristic value calculation method.
  • the filter shape used by the filter means has one or more directional characteristics
  • the region index calculating means includes a characteristic value calculating method having at least one directional characteristic, and has a predetermined directional characteristic.
  • the filter means performs a filter process using a filter shape having a direction corresponding to the direction.
  • the directionality of the filter shape and the region index calculation method is an oblique direction or a horizontal vertical direction.
  • the filter means includes an oblique direction filter.
  • the filter means apply a horizontal and vertical filter shape.
  • the filter shape decoding unit for decoding the filter shape the region adaptive mode decoding unit for decoding the region adaptive mode, the filter shape decoded by the filter shape decoding unit, and the region adaptive mode decoded It is preferable to further include a feature amount mode calculation means for selecting a region index calculation method using the region adaptation mode.
  • the direction has a direction corresponding to the direction according to the direction of the decoded filter shape. It is preferable to use a region index calculation method.
  • the region index calculation method corresponding to the oblique direction is used.
  • the decoded filter shape is a horizontal and vertical shape
  • the horizontal and vertical directions are used. It is preferable to use a corresponding region index calculation method.
  • the image filter device operates on an input image composed of a plurality of unit regions, and assigns each pixel value of an output image in each unit region to a reference pixel determined by a filter shape and the unit region.
  • a filter means for performing a filter process by calculating using the obtained filter coefficient, and a region index for classifying each unit region from a multi-dimensional characteristic value calculated from the attribute of the unit region From the calculation means, the area structure decoding means for decoding the filter index table representing the correspondence between each area index and each filter index, the area index of the target unit area that is the unit area to be processed, and the filter index table While obtaining the filter index for the target unit area Filter coefficient allocating means for allocating a filter coefficient specified by the filter index to the target unit area, and filter shape decoding means for decoding the filter shape in units of filter index, the filter means including the decoded filter Filtering is performed using the shape.
  • the filter shape can be changed according to the filter coefficient group applied to each partial region.
  • a main edge strong edge in a specific direction or many edges in a specific direction
  • the effect of the adaptive filter is particularly great.
  • the region characteristic is an oblique edge
  • the oblique filter shape is effective
  • the region characteristic is a horizontal edge and a vertical edge
  • the horizontal and vertical filter shape is effective.
  • the filter shape suitable for the characteristics of the image is different. Therefore, since a filter shape suitable for each region can be used, a highly effective adaptive filter can be applied.
  • the image filter device restores each filter coefficient of the filter coefficient group corresponding to each filter index by adding a prediction value to a filter coefficient residual obtained by decoding the encoded data. It is preferable to use a filter coefficient of an already decoded filter coefficient group having decoding means and having the same filter shape as the predicted value.
  • the image filter device includes region adaptive mode decoding means for decoding the region adaptive mode, and the filter means uses a filter coefficient corresponding to the region adaptive mode.
  • the area adaptation mode corresponds to at least a diagonal or horizontal / vertical area index calculation method
  • the filter means when the area adaptation mode corresponds to a diagonal area index calculation method, the filter means When the filter shape in the oblique direction is applied and the region index calculation method in the horizontal / vertical direction is applied, the filter means preferably applies the filter shape in the horizontal / vertical direction.
  • the area adaptation mode includes at least a mode for classifying the area using the coordinates of the area (RA mode) and a mode for classifying the area using the pixels of the area (BA mode).
  • RA mode the coordinates of the area
  • BA mode a mode for classifying the area using the pixels of the area
  • the filter shape is decoded in units of filter index
  • the region adaptive mode uses the pixels of the region
  • the filter shape is decoded in units of filter index. It is preferable to do.
  • the decoding device is a decoding device that decodes encoded data and generates a decoded image after filtering, wherein the image filter device and the predicted image in each unit region are represented by the image filter device.
  • a prediction image generation unit that generates a reference image by referring to the generated output image, and the image filter device includes a prediction image generated by the prediction image generation unit, a residual image decoded from the encoded data, and The decoded image obtained by adding is used as the input image, and the decoded image after the filter is generated as the output image.
  • An encoding apparatus is an encoding apparatus that generates encoded data by encoding a residual image between an encoding target image and a prediction image, the image filter device, and each unit Prediction image generation means for generating the prediction image in the region with reference to the output image generated by the image filter device, and the image filter device includes the prediction image generated by the prediction image generation means and the prediction image generation device.
  • a decoded image obtained by adding the residual image is used as an input image, and an output image is generated.
  • the data structure of the encoded data according to the present invention operates on an input image composed of a plurality of unit areas, and each pixel value of the output image in each unit area is determined by reference pixels determined by a filter shape and the unit.
  • the present invention can be suitably applied to an image filter device that performs image filtering. Further, the present invention can be suitably applied to an encoding device and a decoding device. Further, the present invention can be suitably applied to the data structure of encoded data.
  • Video decoding device 16 Inter prediction image generation unit (prediction image generation means) 17 Intra prediction image generation unit (prediction image generation means) 2, 4, 6, 8 video encoding device (encoding device) 25 Intra prediction image generation unit (prediction image generation means) 26 Inter prediction image generation unit (prediction image generation means) 150, 160 Adaptive filter (image filter device) 151, 171, 191, 211 Adaptive filter information decoding unit 1511, 171 Filter shape decoding unit 1512, 1712 Region structure decoding unit (region structure decoding means) 1513, 1713 Region adaptive mode decoding unit (region adaptive mode decoding means) 1913, 2113 Region adaptive mode / filter shape decoding unit 1514, 1714 Filter coefficient decoding unit (region classification means) 1515, 1715 Filter coefficient storage units 152, 172, 192, 212 Adaptive filter units 1522, 1722 Region index calculation unit (region index calculation means) 1523, 1723 Filter coefficient assigning unit (filter coefficient assigning means) 1524 Filter section (filter means).

Landscapes

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

Abstract

 適応フィルタ(150)は、フィルタ形状を復号するフィルタ形状復号部(1511)、部分領域の各々をグループである特性値分類領域に分類する領域構造復号部(1512)、特性値分類領域に割り当てられるフィルタ係数群を復号するフィルタ係数復号部(1514)、及び各単位領域における出力画像の各画素値を該単位領域に対して割り付けられたフィルタ係数群を用いてフィルタ処理を行うフィルタ部(1524)を備えている。

Description

画像フィルタ装置、復号装置、符号化装置、および、データ構造
 本発明は、画像のフィルタリングを行う画像フィルタ装置に関する。また、そのような画像フィルタを備えている符号化装置、および、復号装置に関する。また、そのような復号装置によって復号される符号化データのデータ構造に関する。
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置(符号化装置)、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置(復号装置)が用いられている。具体的な動画像符号化方式としては、例えば、H.264/MPEG-4.AVCに採用されている方式、VCEG(Video Coding Expert Group)における共同開発用コーデックで
あるKTAソフトウェアに採用されている方式、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式、及び、HM(HEVC TestModel)ソフトウェアに採用されている方式などが挙げられる。
 このような符号化方式において、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる最大符号化単位(LCU:Largest Coding Unit、ツリーブロックとも呼ばれる)、最大符号化単位を分割することにより得られる符号化単位(CU:Coding Unit、符号化ノードとも呼ばれる)、及び、符号化単位を分割することより得られるブロックおよびパーティションからなる階層構造により管理され、多くの場合、ブロックを最小単位として符号化される。
 また、このような符号化方式においては、通常、入力画像を符号化/復号化することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像と入力画像との差分データが符号化される。また、予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)と呼ばれる方法が知られている。
 イントラ予測においては、同一フレーム内の局所復号画像に基づいて、当該フレームにおける予測画像が順次生成される。具体的には、イントラ予測においては、通常、予測単位(例えば、ブロック)毎に、予め定められた予測方向(予測モード)群に含まれる予測方向から何れかの予測方向が選択されると共に、局所復号画像における参照画素の画素値を、選択された予測方向に外挿することによって、予測対象領域上の予測画素値が生成される。また、インター予測においては、フレーム全体が復号された参照フレーム(復号画像)内の参照画像に対し、動きベクトルを用いた動き補償を適用することによって、予測対象フレーム内の予測画像が予測単位(例えば、ブロック)毎に生成される。
 非特許文献1には、2つの異なるフィルタ形状を切り替える技術が開示されている。さらに、非特許文献1では、非特許文献2で用いられている領域分類手法が用いられている。具体的には、水平方向及び垂直方向の座標に応じて、復号画像を複数の領域に分割し、領域毎に設定されたフィルタ係数を用いる手法が開示されRAモードと呼ばれる。また、同文献には、領域および領域周辺の画素から算出される活性度及び方向性に応じて、復号画像を複数の領域に分割し、領域毎に設定されたフィルタ係数を用いる方法が開示されBAモードと呼ばれる。同文献では、RAモードとBAモードを符号化データ中のフラグ(特徴量モード)により切り替える方法が開示されている。
 このような適応フィルタを備えた符号化装置および復号装置は、復号画像に対して当該適応フィルタによりフィルタ処理を施して得られるフィルタ済みの復号画像を参照して予測画像を生成することにより、予測精度の向上および符号化効率の向上を図ることができる。
「JCTVC-F303」,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 6th Meeting: Torino, Italy,13-22, July, 2011 「JCTVC-E603」,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
 しかしながら、非特許文献1に開示された方法では、符号化効率が期待される程向上しないという問題があった。発明者は、この問題に関し、従来の方法では、領域に応じて適したフィルタ形状が異なるにも関わらず、十分に活かされていないという点に問題があるとの知見を得た。すなわち、発明者は、非特許文献2に開示されている特徴量モードおよび領域のマージにより設定される領域分類とフィルタ形状は独立に設定されるものであり、領域分類とフィルタ形状の関係が活かされていないとの知見を得た。
 本発明は、上記の問題に鑑みてなされたものであり、符号量及び処理量の増大を抑えつつ、特徴量によって分類される領域に適したフィルタ形状を用いることにより、符号化効率を向上させることのできる適応フィルタを実現することにある。
 上記の問題を解決するために、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素の各画素値と、該単位領域について割り付けられたフィルタ係数とを用いて算出することによりフィルタ処理を行うフィルタ手段を備えた画像フィルタ装置であって、上記単位領域の属性から1つ以上の特性値算出方法によって得られる特性値を用いて、上記単位領域を、特性値領域上の部分領域に分類する領域インデックス算出手段を備えており、フィルタ形状に基づいて特性値算出方法を選択する手段、及び、特性値算出方法に基づいてフィルタ形状を選択する手段の少なくとも何れかの手段を更に備えており、特定の特性値算出方法を用いる場合、上記フィルタ手段は、該特性値算出方法に対応する形状のフィルタ形状と、上記部分領域に関連付けられたフィルタ係数とを用いてフィルタ処理を行うことを特徴とする。
 上記のように構成された本発明に係る画像フィルタ装置によれば、特性値算出方法に対応したフィルタ形状を用いることができる。特性値算出方法に応じて、領域分類が変化し、各領域に適したフィルタ形状が変化する。よって、特性値算出方法に適したフィルタ形状を用いることにより、高い効果の適応フィルタを適用することができる。
 また、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素と、該単位領域について割り付けられたフィルタ係数を用いて算出することによりフィルタ処理を行うフィルタ手段と、各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段とフィルタインデックス単位で、フィルタ形状を復号するフィルタ形状復号手段を備え、該フィルタ手段は、復号されたフィルタ形状を用いてフィルタ処理を行うことを特徴とする。
 以上の構成によって、各部分領域に適用されるフィルタ係数群に応じてフィルタ形状を変更することができる。領域の特性として、主要なエッジ(特定方向への強いエッジもしくは特定方向への多くのエッジ)が存在する場合には、特に適応フィルタの効果が大きい。領域の特性として斜めエッジである場合には、斜め形状のフィルタ形状が有効であり、領域の特性として水平エッジ及び垂直エッジである場合には、水平垂直形状のフィルタ形状が有効である、というように、画像の特性に応じて適したフィルタ形状が異なる。そのため、領域毎に適したフィルタ形状を用いることができるため、高い効果の適応フィルタを適用することができる。
 また、本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素と、該単位領域について割り付けられたフィルタ係数を用いて算出することによりフィルタ処理を行うフィルタ手段と、各単位領域を分類するための分類パラメータである領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段を備え、上記フィルタ手段は、2つ以上のフィルタ形状から1つのフィルタ形状を用いてフィルタ処理を行うフィルタ手段であり、上記領域インデックス算出手段は、2つ以上の領域インデックス算出方法を備え、特定の領域インデックス算出方法を用いる場合には、該領域インデックス算出方法に対応する特定のフィルタ形状を用いてフィルタ処理を行う画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタ形状と、上記フィルタ係数と、を含んでいることを特徴とする。
 以上のように、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素の各画素値と、該単位領域について割り付けられたフィルタ係数とを用いて算出することによりフィルタ処理を行うフィルタ手段を備えた画像フィルタ装置であって、上記単位領域の属性から1つ以上の特性値算出方法によって得られる特性値を用いて、上記単位領域を、特性値領域上の部分領域に分類する領域インデックス算出手段を備えており、フィルタ形状に基づいて特性値算出方法を選択する手段、及び、特性値算出方法に基づいてフィルタ形状を選択する手段の少なくとも何れかの手段を更に備えており、特定の特性値算出方法を用いる場合、上記フィルタ手段は、該特性値算出方法に対応する形状のフィルタ形状と、上記部分領域に関連付けられたフィルタ係数とを用いてフィルタ処理を行う。
 上記のように構成された本発明に係る画像フィルタ装置によれば、特性値算出方法に対応したフィルタ形状を用いることができる。特性値算出方法に応じて、領域分類が変化し、各領域に適したフィルタ形状が変化する。よって、特性値算出方法に適したフィルタ形状を用いることにより、高い効果の適応フィルタを適用することができる。そのため、符号化効率が向上する。
本発明の実施形態に係る動画像復号装置の構成を示すブロック図である。 第1の実施形態に係る符号化データの構成を説明するための図であって、(a)は、ピクチャPICTを規定するピクチャレイヤを示しており、(b)は、スライスSを規定するスライスレイヤを示しており、(c)は、ツリーブロック(Tree block)TBLKを規定するツリーブロックレイヤを示しており、(d)は、ツリーブロックTBLKに含まれる符号化単位(Coding Unit;CU)を規定するCUレイヤを示している。 本発明の実施形態に係る動画像符号化装置の構成を示すブロック図である。 第1の実施形態に係るフィルタ形状とBA計算モードの関係を示す図である。 第1の実施形態に係るフィルタ形状とBA計算モードの関係を示す図である。 本実施形態の領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeの組み合わせを示す図である。 第2の実施形態に係るフィルタ係数群とフィルタ形状の関係を示す図である。 第2の実施形態に係るフィルタ係数予測方法を示す図である。 第3の実施形態に係る領域適応モードとフィルタ形状の関係を示す図である。 第3の実施形態に係る領域適応モードとフィルタ形状の関係の別の例を示す図である。 フィルタ係数復号部1771の構成を示すブロック図である。 第4の実施形態に係る特性領域別フィルタ形状の関係を示す図である。 本発明の実施形態のフィルタ形状を示す図である。 本発明の実施形態のフィルタ形状の組み合わせを示す図である。 第1及び第3の実施形態に係る領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeと、特徴量モードalf_feature_modeの関係を示す図である。 第2の実施形態に係る領域適応モードalf_region_adaptation_flagと、特徴量モードalf_feature_modeの関係を示す図である。 本実施形態の実施形態に係る領域インデックス算出部の構成を示すブロック図である。 第1の実施形態に係るフィルタパラメータFP#1に含まれる各シンタックスを示す図である。 第2の実施形態に係るフィルタパラメータFP#3に含まれる各シンタックスを示す図である。 第3の実施形態に係るフィルタパラメータFP#5に含まれる各シンタックスを示す図である。 第3の実施形態の変形例に係るフィルタパラメータFP#7に含まれる各シンタックスを示す図である。 領域構造を示すシンタックスalf_filter_patternを説明する図である。 第1の実施形態に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。 第1の実施形態に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。 第2の実施形態に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。 第2の実施形態に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。 第3の実施形態に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。 第3の実施形態に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。 第3の実施形態の変形例に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。 第3の実施形態の変形例に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。 本発明の実施形態に係る特性値算出方法を説明する図である。 本発明の第1の実施形態に係る領域適応モードとフィルタ形状の関係を示す図である。 上記動画像符号化装置を搭載した送信装置、および、上記動画像復号装置を搭載した受信装置の構成について示した図である。(a)は、動画像符号化装置を搭載した送信装置を示しており、(b)は、動画像復号装置を搭載した受信装置を示している。 上記動画像符号化装置を搭載した記録装置、および、上記動画像復号装置を搭載した再生装置の構成について示した図である。(a)は、動画像符号化装置を搭載した記録装置を示しており、(b)は、動画像復号装置を搭載した再生装置を示している。
 〔実施形態1〕
 以下では、本発明の第1の実施形態について、特に図1~図6、図18、図22、図23、図24を参照して説明する。
 本実施形態に係る適応フィルタは、フィルタ前画像(例えば、後述するデブロック済復号画像P_DB)を構成する各単位領域について、互いに導出方法の異なる2つの特性値を導出し、導出された2つの特性値に応じて、各単位領域を1または複数のグループの何れかに分類する。また、本実施形態に係る適応フィルタは、単位領域毎に定められたフィルタ係数を用いて、フィルタ前画像に対して単位領域毎に作用する。
 ここで単位領域とは、後述するDCT変換(より一般には周波数変換)の単位であるブロックであってもよいし、後述する予測画像を生成する単位であるパーティションであってもよいし、ブロックまたはパーティションの何れでもなく、本実施形態に係る適応フィルタによってサイズおよび位置が設定された領域であってもよい。また、単位領域は、1画素から構成されるものであってもよい。
 また、各グループは、2つの特性値によって張られる2次元領域上に設定される各部分領域と1対1の対応を有する。したがって、上記2次元領域をどのように各部分領域へ分割するのかを指定することにより、1または複数のグループをどのように設定するかが定まることになる。また、導出された2つの特性値のうち、一方の特性値を第1の特性値Xと呼び、もう一方の特性値を第2の特性値Yと呼ぶ。なお、以下の説明において、上記2つの特性値によって張られる2次元領域を特性値領域とも呼称し、特性値領域上に設定される各部分領域を特性値部分領域とも呼称する。
 第1の特性値Xおよび第2の特性値Yとして、例えば以下のような組み合わせが可能である。本実施形態においては第1の特性値Xが画像の活性度である場合を取り扱うが、これらの組み合わせは本願に係る発明を限定するものではなく、他の特性値および組み合わせに対しても、本実施形態を容易に適用することができる。
 ・第1の特性値X:画像の活性度、第2の特性値Y:画像の方向性
 ・第1の特性値X:画像の活性度、第2の特性値Y:平均画素値
 ・第1の特性値X:画像の活性度、第2の特性値Y:単位領域の座標
 ・第1の特性値X:単位領域の座標、第2の特性値Y:画像の活性度
 ・第1の特性値X:スライス番号、第2の特性値Y:画像の活性度
 ・第1の特性値X:平均画素値、第2の特性値Y:画像の活性度
 ・第1の特性値X:単位領域のy座標、第2の特性値Y:単位領域のx座標
 ・第1の特性値X:単位領域のx座標、第2の特性値Y:単位領域のy座標
 なお、適応フィルタによる、フィルタ済みの画像と符号化対象画像との誤差を減らす効果(ノイズ低減の効果)の観点からは、活性度を優先する。すなわち、第1の特性値Xとして画像の活性度を用いることが適当である。一方、複雑性の観点からは、特性値の算出が容易な特性値を優先することも考えられる。具体的には、単位領域の座標や、スライス番号、平均画素値などを第1の特性値として用いることも可能である。この場合、低複雑性が要求されるようなアプリケーションの場合において、第1の分割のみで分割を終了させるような適用方法が可能であり、小さな複雑性で領域別フィルタの効果を得ることができる。
 ここで、画像の活性度に代えて、画素値の分散を用いてもよい。また、各単位領域について導出される各特性値は、導出方法如何によって、単位領域のサイズに依存する場合がある。このような場合には、各特性値として、単位領域のサイズへの依存性を取り除くことによって得られる正規化された特性値を用いることができる。
 (符号化データ#1)
 本実施形態に係る動画像符号化装置2及び動画像復号装置1の詳細な説明に先立って、動画像符号化装置2によって生成され、動画像復号装置1によって復号される符号化データ#1のデータ構造について説明を行う。
 図2は、符号化データ#1のデータ構造を示す図である。符号化データ#1は、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。
 符号化データ#1におけるピクチャレイヤ以下の階層の構造を図2に示す。図2の(a)~(d)は、それぞれ、ピクチャPICTを規定するピクチャレイヤ、スライスSを規定するスライスレイヤ、ツリーブロック(Tree block)TBLKを規定するツリーブロックレイヤ、ツリーブロックTBLKに含まれる符号化単位(Coding Unit;CU)を規定するCUレイヤを示す図である。
  (ピクチャレイヤ)
 ピクチャレイヤでは、処理対象のピクチャPICT(以下、対象ピクチャとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。ピクチャPICTは、図2の(a)に示すように、ピクチャヘッダPH、及び、スライスS1~SNSを含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
 なお、以下、スライスS1~SNSのそれぞれを区別する必要が無い場合、符号の添え字
を省略して記述することがある。また、以下に説明する符号化データ#1に含まれるデータであって、添え字を付している他のデータについても同様である。
 ピクチャヘッダPHには、対象ピクチャの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれている。例えば、動画像符号化装置2が符号化の際に用いた可変長符号化のモードを示す符号化モード情報(entropy_coding_mode_flag)は、ピクチャヘッダPHに含まれる符号化パラメータの一例である。
 entropy_coding_mode_flagが0の場合、当該ピクチャPICTは、CAVLC(Context-based Adaptive Variable Length Coding)によって符号化されている。また、entropy_coding_mode_flagが1である場合、当該ピクチャPICTは、CABAC(Context-based Adaptive Binary Arithmetic Coding)によって符号化されている。
 なお、ピクチャヘッダPHは、ピクチャー・パラメーター・セット(PPS:Picture Parameter Set)とも称される。
  (スライスレイヤ)
 スライスレイヤでは、処理対象のスライスS(対象スライスとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。スライスSは、図2の(b)に示すように、スライスヘッダSH、及び、ツリーブロックTBLK1~TBLKNC(NCはスライスSに含まれるツリーブロックの総数)のシーケンスを含んでいる。
 スライスヘッダSHには、対象スライスの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、又は、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、又は、イントラ予測を用いるBスライスなどが挙げられる。
 また、スライスヘッダSHには、動画像復号装置1の備える適応フィルタによって参照されるフィルタパラメータFPが含まれている。フィルタパラメータFPの詳細については後述する。
  (ツリーブロックレイヤ)
 ツリーブロックレイヤでは、処理対象のツリーブロックTBLK(以下、対象ツリーブロックとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。なお、ツリーブロックのことを最大符号化単位(LCU:Largest Cording Unit)と呼ぶこともある。
 ツリーブロックTBLKは、ツリーブロックヘッダTBLKHと、符号化単位情報CU1~CUNL(NLはツリーブロックTBLKに含まれる符号化単位情報の総数)とを含む。ここで、まず、ツリーブロックTBLKと、符号化単位情報CUとの関係について説明すると次のとおりである。
 ツリーブロックTBLKは、イントラ予測またはインター予測、および、変換の各処理ためのブロックサイズを特定するためのパーティションに分割される。
 ツリーブロックTBLKの上記パーティションは、再帰的な4分木分割により分割されている。この再帰的な4分木分割により得られる木構造のことを以下、符号化ツリー(coding tree)と称する。
 以下、符号化ツリーの末端のノードであるリーフ(leaf)に対応するパーティションを、符号化ノード(coding node)として参照する。また、符号化ノードは、符号化処理の
基本的な単位となるため、以下、符号化ノードのことを、符号化単位(CU)とも称する。
 つまり、符号化単位情報(以下、CU情報と称する)CU1~CUNLは、ツリーブロックTBLKを再帰的に4分木分割して得られる各符号化ノード(符号化単位)に対応する情報である。
 また、符号化ツリーのルート(root)は、ツリーブロックTBLKに対応付けられる。換言すれば、ツリーブロックTBLKは、複数の符号化ノードを再帰的に含む4分木分割の木構造の最上位ノードに対応付けられる。
 なお、各符号化ノードのサイズは、当該符号化ノードが直接に属する符号化ノード(すなわち、当該符号化ノードの1階層上位のノードのパーティション)のサイズの縦横とも半分である。
 また、各符号化ノードのとり得るサイズは、符号化データ#1のシーケンスパラメータセットSPSに含まれる、符号化ノードのサイズ指定情報および最大階層深度(maximum hierarchical depth)に依存する。例えば、ツリーブロックTBLKのサイズが64×64画素であって、最大階層深度が3である場合には、当該ツリーブロックTBLK以下の階層における符号化ノードは、3種類のサイズ、すなわち、64×64画素、32×32画素、および16×16画素の何れかをとり得る。
  (ツリーブロックヘッダ)
 ツリーブロックヘッダTBLKHには、対象ツリーブロックの復号方法を決定するために動画像復号装置1が参照する符号化パラメータが含まれる。具体的には、図2の(c)に示すように、対象ツリーブロックの各CUへの分割パターンを指定するツリーブロック分割情報SP_TBLK、および、量子化ステップの大きさを指定する量子化パラメータ差分Δqp(qp_delta)が含まれる。
 ツリーブロック分割情報SP_TBLKは、ツリーブロックを分割するための符号化ツリーを表す情報であり、具体的には、対象ツリーブロックに含まれる各CUの形状、サイズ、および、対象ツリーブロック内での位置を指定する情報である。
 なお、ツリーブロック分割情報SP_TBLKは、CUの形状やサイズを明示的に含んでいなくてもよい。例えばツリーブロック分割情報SP_TBLKは、対象ツリーブロック全体またはツリーブロックの部分領域を四分割するか否かを示すフラグ(split_coding_unit_flag)の集合であってもよい。その場合、ツリーブロックの形状やサイズを併用することで各CUの形状やサイズを特定できる。
 また、量子化パラメータ差分Δqpは、対象ツリーブロックにおける量子化パラメータqpと、当該対象ツリーブロックの直前に符号化されたツリーブロックにおける量子化パラメータqp’との差分qp-qp’である。
  (CUレイヤ)
 CUレイヤでは、処理対象のCU(以下、対象CUとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。
 ここで、CU情報CUに含まれるデータの具体的な内容の説明をする前に、CUに含まれるデータの木構造について説明する。符号化ノードは、予測ツリー(prediction tree
;PT)および変換ツリー(transform tree;TT)のルートのノードとなる。予測ツリーおよび変換ツリーについて説明すると次のとおりである。
 予測ツリーにおいては、符号化ノードが1または複数の予測ブロックに分割され、各予測ブロックの位置とサイズとが規定される。別の表現でいえば、予測ブロックは、符号化ノードを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ブロックを含む。
 予測処理は、この予測ブロックごとに行われる。以下、予測の単位である予測ブロックのことを、予測単位(prediction unit;PU)とも称する。
 予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。
 イントラ予測の場合、分割方法は、2N×2N(符号化ノードと同一サイズ)と、N×Nとがある。
 また、インター予測の場合、分割方法は、2N×2N(符号化ノードと同一サイズ)、2N×N、N×2N、および、N×Nなどがある。
 また、変換ツリーにおいては、符号化ノードが1または複数の変換ブロックに分割され、各変換ブロックの位置とサイズとが規定される。別の表現でいえば、変換ブロックは、符号化ノードを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ブロックを含む。
 変換ツリーにおける分割には、符号化ノードと同一のサイズの領域を変換ブロックとして割り付けるものと、上述したツリーブロックの分割と同様、再帰的な4分木分割によるものがある。
 変換処理は、この変換ブロックごとに行われる。以下、変換の単位である変換ブロックのことを、変換単位(transform unit;TU)とも称する。
  (CU情報のデータ構造)
 続いて、図2の(d)を参照しながらCU情報CUに含まれるデータの具体的な内容について説明する。図2の(d)に示すように、CU情報CUは、具体的には、スキップフラグSKIP、PT情報PTI、および、TT情報TTIを含む。
 スキップフラグSKIPは、対象のPUについて、スキップモードが適用されているか否かを示すフラグであり、スキップフラグSKIPの値が1の場合、すなわち、対象CUにスキップモードが適用されている場合、そのCU情報CUにおけるPT情報PTI、および、TT情報TTIは省略される。なお、スキップフラグSKIPは、Iスライスでは省略される。
 PT情報PTIは、CUに含まれるPTに関する情報である。言い換えれば、PT情報PTIは、PTに含まれる1または複数のPUそれぞれに関する情報の集合であり、動画像復号装置1により予測画像を生成する際に参照される。PT情報PTIは、図2の(d)に示すように、予測タイプ情報PType、および、予測情報PInfoを含んでいる。
 予測タイプ情報PTypeは、対象PUについての予測画像生成方法として、イントラ予測を用いるのか、または、インター予測を用いるのかを指定する情報である。
 予測情報PInfoは、予測タイプ情報PTypeが何れの予測方法を指定するのかに応じて、イントラ予測情報、または、インター予測情報より構成される。以下では、イントラ予測が適用されるPUをイントラPUとも呼称し、インター予測が適用されるPUをインターPUとも呼称する。
 また、予測情報PInfoは、対象PUの形状、サイズ、および、位置を指定する情報が含まれる。上述のとおり予測画像の生成は、PUを単位として行われる。予測情報PInfoの詳細については後述する。
 TT情報TTIは、CUに含まれるTTに関する情報である。言い換えれば、TT情報TTIは、TTに含まれる1または複数のTUそれぞれに関する情報の集合であり、動画像復号装置1により残差データを復号する際に参照される。なお、以下、TUのことをブロックと称することもある。
 TT情報TTIは、図2の(d)に示すように、対象CUの各変換ブロックへの分割パターンを指定するTT分割情報SP_TT、および、量子化予測残差QD1~QDNT(NTは、対象CUに含まれるブロックの総数)を含んでいる。
 TT分割情報SP_TTは、具体的には、対象CUに含まれる各TUの形状、サイズ、および、対象CU内での位置を決定するための情報である。例えば、TT分割情報SP_TTは、対象となるノードの分割を行うのか否かを示す情報(split_transform_unit_flag)と、その分割の深度を示す情報(trafoDepth)とから実現することができる。
 また、例えば、CUのサイズが、64×64の場合、分割により得られる各TUは、32×32画素から2×2画素までのサイズをとり得る。
 各量子化予測残差QDは、動画像符号化装置2が以下の処理1~3を、処理対象のブロックである対象ブロックに施すことによって生成した符号化データである。
 処理1:符号化対象画像から予測画像を減算した予測残差をDCT変換(Discrete Cosine Transform)する;
 処理2:処理1にて得られた変換係数を量子化する;
 処理3:処理2にて量子化された変換係数を可変長符号化する;
 なお、上述した量子化パラメータqpは、動画像符号化装置2が変換係数を量子化する際に用いた量子化ステップQPの大きさを表す(QP=2qp/6)。
  (予測情報PInfo)
 上述のとおり、予測情報PInfoには、インター予測情報およびイントラ予測情報の2種類がある。
 インター予測情報には、動画像復号装置1が、インター予測によってインター予測画像を生成する際に参照される符号化パラメータが含まれる。より具体的には、インター予測情報には、対象CUの各インターPUへの分割パターンを指定するインターPU分割情報、および、各インターPUについてのインター予測パラメータが含まれる。
 インター予測パラメータには、参照画像インデックスと、推定動きベクトルインデックスと、動きベクトル残差とが含まれる。
 一方、イントラ予測情報には、動画像復号装置1が、イントラ予測によってイントラ予測画像を生成する際に参照される符号化パラメータが含まれる。より具体的には、イントラ予測情報には、対象CUの各イントラPUへの分割パターンを指定するイントラPU分割情報、および、各イントラPUについてのイントラ予測パラメータが含まれる。イントラ予測パラメータは、各イントラPUについてのイントラ予測方法(予測モード)を指定するためのパラメータである。
 (動画像復号装置1)
 以下では、本実施形態に係る動画像復号装置1について特に図1~図6、図23、図31、図32を参照して説明する。動画像復号装置1は、その一部に、H.264/MPEG-4.AVCに採用されている方式、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式、及び、HM(HEVCTestModel)ソフトウェアに採用されている技術を含んでいる。
 図1は、動画像復号装置1の構成を示すブロック図である。図1に示すように、動画像復号装置1は、可変長符号復号部13、動きベクトル復元部14、バッファメモリ15、インター予測画像生成部16、イントラ予測画像生成部17、予測方式決定部18、逆量子化・逆変換部19、加算器20、デブロッキングフィルタ41、および、適応フィルタ150を備えている。動画像復号装置1は、符号化データ#1を復号することによって動画像#2を生成するための装置である。
 可変長符号復号部13は、各パーティションに関する予測パラメータPPを、符号化データ#1から復号する。すなわち、インター予測パーティションに関しては、参照画像インデックスRI、推定動きベクトルインデックスPMVI、及び、動きベクトル残差MVDを符号化データ#1から復号し、これらを動きベクトル復元部14に供給する。一方、イントラ予測パーティションに関しては、(1)パーティションのサイズを指定するサイズ指定情報、および、(2)予測インデックスを指定する予測インデックス指定情報を符号化データ#1から復号し、これをイントラ予測画像生成部17に供給する。また、可変長符号復号部13は、CU情報を符号化データから復号し、これを予測方式決定部18に供給する(図示省略)。更に、可変長符号復号部13は、各ブロックに関する量子化予測残差QD、及び、そのブロックを含むツリーブロックに関する量子化パラメータ差分Δqpを符号化データ#1から復号し、これらを逆量子化・逆変換部19に供給する。また、可変長符号復号部13は、符号化データ#1からフィルタオンオフ情報、フィルタセット番号、および、フィルタ係数群を復号し、それらを適応フィルタ150に供給する。
 動きベクトル復元部14は、各インター予測パーティションに関する動きベクトルmvを、そのパーティションに関する動きベクトル残差MVDと、他のパーティションに関する復元済みの動きベクトルmv’とから復元する。具体的には、(1)推定動きベクトルインデックスPMVIにより指定される推定方法に従って、復元済みの動きベクトルmv’から推定動きベクトルpmvを導出し、(2)導出した推定動きベクトルpmvと動きベクトル残差MVDとを加算することによって動きベクトルmvを得る。なお、他のパーティションに関する復元済みの動きベクトルmv’は、バッファメモリ15から読み出すことができる。動きベクトル復元部14は、復元した動きベクトルmvを、対応する参照画像インデックスRIと共に、インター予測画像生成部17に供給する。なお、双方向予測(重み付き予測)を行うインター予測パーティションについては、復元した2つの動きベクトルmv1及びmv2を、対応する参照画像インデックスRI1及びRI2と共に、インター予測画像生成部17に供給する。
 インター予測画像生成部16は、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル復元部14から供給された動きベクトルmvを用いて、同じく動きベクトル復元部14から供給された参照画像インデックスRIによって指定されるフィルタ済復号画像P_FL’から動き補償画像mcを生成する。ここで、フィルタ済復号画像P_FL’は、既に復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ41によるデブロック処理、および、適応フィルタ150による適応的フィルタ処理を施すことによって得られる画像であり、インター予測画像生成部16は、フィルタ済復号画像P_FL’を構成する各画素の画素値をバッファメモリ15から読み出すことができる。インター予測画像生成部16によって生成された動き補償画像mcは、インター予測画像Pred_Interとして予測方式決定部18に供給される。なお、双方向予測(重み付き予測)を行うインター予測パーティションについては、(1)動きベクトルmv1を用いて、参照画像インデックスRI1によって指定されたフィルタ済復号画像P_FL1’から動き補償画像mc1を生成し、(2)動きベクトルmv2を用いて、参照画像インデックスRI2によって指定されたフィルタ済復号画像P_FL2’とから動き補償画像mc2を生成し、(3)動き補償画像mc1と動き補償画像mc2との加重平均にオフセット値を加えることによってインター予測画像Pred_Interを生成する。
 イントラ予測画像生成部17は、各イントラ予測パーティションに関する予測画像Pred_Intraを生成する。具体的には、まず、符号化データ#1から復号された予測モードを参照し、該予測モードを対象パーティションに対して、例えば、ラスタスキャン順に割り付ける。続いて、当該予測モードの示す予測方法に従って、復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部17によって生成されたイントラ予測画像Pred_Intraは、予測方式決定部18に供給される。
 また、イントラ予測画像生成部17は、対象パーティションのサイズ、および、対象パーティションに割り付けられた予測モードを示す情報であるイントラ符号化モード情報IEMを適応フィルタ150に供給する。なお、イントラ予測画像生成部17によるイントラ予測画像Pred_Intraの具体的な生成処理については、後述するためここでは説明を省略する。
 予測方式決定部18は、CU情報に基づいて、各パーティションがインター予測を行うべきインター予測パーティションであるのか、イントラ予測を行うべきイントラ予測パーティションであるのかを決定する。そして、前者の場合には、インター予測画像生成部16にて生成されたインター予測画像Pred_Interを予測画像Predとして加算器20に供給し、後者の場合には、イントラ予測画像生成部17にて生成されたイントラ予測画像Pred_Intraを予測画像Predとして加算器20に供給する。
 逆量子化・逆変換部19は、(1)量子化予測残差QDを逆量子化し、(2)逆量子化によって得られたDCT係数を逆DCT(Discrete Cosine Transform)変換し、(3)
逆DCT変換によって得られた予測残差Dを加算器20に供給する。なお、量子化予測残差QDを逆量子化する際に、逆量子化・逆変換部19は、可変長符号復号部13から供給された量子化パラメータ差分Δqpから量子化ステップQPを導出する。量子化パラメータqpは、直前に逆量子化/逆DCT変換したツリーブロックに関する量子化パラメータqp’に量子化パラメータ差分Δqpを加算することによって導出でき、量子化ステップQPは、量子化ステップqpからQP=2pq/6によって導出できる。また、逆量子化・逆変換部19による予測残差Dの生成は、ブロック(変換単位)を単位として行われる。
 加算器20は、予測方式決定部18から供給された予測画像Predと、逆量子化・逆変換部19から供給された予測残差Dとを加算することによって復号画像Pを生成する。
 デブロッキングフィルタ41は、復号画像Pにおけるブロック境界、またはCU境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、復号画像Pにおける当該ブロック境界、または当該CU境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該CU境界付近の画像の平滑化を行う。デブロッキングフィルタ41によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、適応フィルタ150に出力される。
 適応フィルタ150は、デブロッキングフィルタ41から供給されるデブロック済復号画像P_DBに対して、符号化データ#1から復号されたフィルタパラメータFPを用いたフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ150によりフィルタ処理が施された画像は、フィルタ済復号画像P_FLとして外部に出力されると共に、可変長符号復号部13によって符号化データから復号されたPOC指定情報と関連付けてバッファメモリ15に格納される。適応フィルタ150の具体的な構成については、後述するため、ここでは説明を省略する。
 (適応フィルタ150)
 適応フィルタ150は、シンタックスadaptive_loop_filter_flagが1である場合に、デブロック済復号画像P_DBに対して適応的フィルタ処理を施すことによってフィルタ済復号画像P_FLを生成する。
 適応フィルタ150は、対象単位領域におけるデブロック済復号画像P_DBの特性値に応じて、該対象単位領域を、上述した各特性値部分領域の何れかと関連付け、該単位領域が関連付けられた特性値部分領域について復号されたフィルタ係数を用いて、該単位領域に対するフィルタ処理を施す。
 本実施形態に係る適応フィルタは、フィルタ前画像(例えば、デブロック済復号画像P_DB)を構成する各単位領域について、互いに導出方法の異なる複数の特性値を導出し、導出された複数の特性値に応じて、各単位領域を1または複数のグループの何れかに分類する。また、本実施形態に係る適応フィルタは、単位領域毎に定められたフィルタ係数を用いて、フィルタ前画像に対して単位領域毎に作用する。
 ここで単位領域とは、後述するDCT変換(より一般には周波数変換)の単位であるブロックであってもよいし、後述する予測画像を生成する単位であるパーティションであってもよいし、ブロックまたはパーティションの何れでもなく、本実施形態に係る適応フィルタによってサイズおよび位置が設定された領域であってもよい。また、単位領域は、1画素から構成されるものであってもよい。本実施形態では4×4のブロックを単位領域として説明する。
 各グループは、複数の特性値によって張られる多次元領域上に設定される各部分領域と1対1の対応を有する。したがって、上記多次元領域をどのように各部分領域へ分割するのかを指定することにより、1または複数のグループをどのように設定するかが定まることになる。また、導出された複数の特性値は各々、第1の特性値X、第2の特性値Y、第3の特性値Zと呼ぶ。上記複数の特性値によって張られる多次元領域を特性値領域とも呼称し、特性値領域上に設定される各部分領域を特性値部分領域とも呼称する。
 各部分領域を指定するインデックスとして1次元のインデックスを用いる。各特性値部分領域を指定するインデックスを、領域インデックスridxと呼ぶ。各単位領域は、領域インデックスridxを割り付けることでグループ化(分類)が行われる。すなわち、同じ値の領域インデックスridxが割り当てられる単位領域は同じ特性の領域であるとしてグループ化される。グループ化された部分領域は、特性値分類領域、もしくは、分類領域と呼ぶ。ある領域インデックスridxの特性値分類領域を、単に領域インデックスridxの領域と呼ぶ。
 本実施形態においては、第1の特性値X、第2の特性値Y、第3の特性値Zとして、例えば以下のような値が使用可能である。
 画像の方向性、画像の活性度、画像の特定方向活性度、予測モード、予測モード及び画像の方向性、平均画素値、単位領域の座標、スライス番号。
 領域インデックスの算出に用いる特性値および特性値の組について、その算出方法を、特性値算出方法と呼ぶ。本実施形態では、領域インデックス算出において、複数の特性値(特性値算出方法)を用いることが可能である。本実施形態では、特性値算出方法は領域インデックス算出方法に対応するため、後述する特性値モードalf_filter_modeを用いて一意に示すことが可能である。また、特性値算出方法は、特徴量モードのタイプである領域適応モードと、あるタイプ内に属する1つの特徴量モードを指定するフラグ(例えば後述のBA計算モード)を用いて示すこともできる。また、特性値算出方法は、例えば以下の例のように特性値の組によって表現することもできる。
 {単位領域のX座標、単位領域のY座標}(後述のRAモードに対応)
 {単位領域の第1の活性度、単位領域の第2の活性度}(後述のBAモードに対応)
 {単位領域の水平方向活性度、単位領域の垂直方向活性度}(後述のBA1モードに対応)
 {単位領域の斜め45度方向活性度、単位領域の斜め135度方向活性度}(後述のBA2モードに対応)
 なお、活性度の算出には、絶対値差分和を用いても良いし、ラプラシアンや分散を用いても良い。また、活性度を含む特性値の算出には、画素の間引きを用いても良い。単位領域の特性値の算出には、単位領域外の画素値を用いても良い。但し、特性値の参照画像の一部がスライス外に位置する場合には、スライス内の画素値のみを用いて特性値を算出可能なように、スライス内の画素値を用いてスライス外の画素値を導出し特性値を算出すると良い。
 また、各単位領域について導出される各特性値は、導出方法如何によって、単位領域のサイズに依存する場合がある。このような場合には、各特性値として、単位領域のサイズへの依存性を取り除くことによって得られる正規化された特性値を用いることができる。
 <フィルタパラメータFP#1>
 本実施形態に係るフィルタパラメータFP#1の構成を詳述する。図18は、本実施形態に係るフィルタパラメータFPのシンタックステーブルの一例である。図18に示すように、フィルタパラメータFP#1には、adaptive_loop_filter_flag、alf_region_adaptation_flag、alf_filter_mode、alf_num_filters_minus1、alf_region_idx[]、alf_pred_method、alf_min_kstart_minus1、alf_golomb_index_bit[i]、alf_coeff_luma[i][j]が含まれている。
 adaptive_loop_filter_flagは、後述する適応フィルタ150による適応的フィルタ処理のオンオフを指定するフラグであり、adaptive_loop_filter_flagが0の場合、適応的フィルタ処理がオフに指定され、adaptive_loop_filter_flagが1の場合、適応的フィルタ処理がオンに指定される。
 alf_num_filters_minus1は本実施形態に係る適応フィルタで用いるフィルタ数AlfNumFiltersを示すシンタックスであり、AlfNumFilters = alf_num_filters_minus1 + 1により求めることができる。領域適応モードalf_region_adaptation_flagは、単位領域の属性からその領域を分類する場合における分類方法を切り替える特徴量モード(領域分類方法)alf_feature_modeのタイプを示すシンタックスであり、0か1の値をとる。alf_filter_modeは、フィルタ参照領域の形状(以下、フィルタ形状とも呼称する)を示すシンタックスである。alf_region_idx[i] (1≦i<AlfNumRegions)は、各部分領域に対するフィルタインデックスを指定するシンタックスである。
 領域適応モードalf_region_adaptation_flag=0、1は各々、特徴量モードのタイプであるRAモード、BAモードに対応する。なお。RAモードは、特性値算出方法として座標を用いる、すなわち、対象単位領域の画像(フレーム)内座標を用いる場合の分割であり、この分割を座標空間分割と呼ぶ。BAモードは、特性値算出方法として画素値を用いる、すなわち、対象単位領域における画素値もしくは符号化パラメータを用いる場合の分割であり、座標空間分割に対して特徴空間分割と呼ぶ。なお、領域適応モードalf_region_adaptation_flagとして、特性値算出方法の違いによりさらに細かく区分した値を用いても良い。例えば、RAモードの一つとしてRA1モード、RA2モードや、BAモードの一つとしてBA1モード、BA2モードを領域適応モードとして用いることができる。すなわち、領域適応モードは、特徴量モードをグループ化したタイプでも良いし、特徴量モードをそのまま用いても良い。
 また、図22に示すように1次元のシンタックスalf_filter_pattern[i] (1≦i<AlfNumRegions)を用いて領域構造を符号化しても構わない。図22に示す通り、部分領域は所定の順序(ラスタスキャン順)でインデックスが付される。1次元シンタックスalf_filter_patternでは、隣り合うインデックスが付された部分領域同士のみがマージ可能である。すなわち、所定の順序に沿って隣り合うサブ領域同士のみがマージ可能である。alf_filter_pattern[i]は、i―1の部分領域と、iの部分領域がマージされる場合には0、マージされない場合には1で符号化される。図22の例では、領域インデックスが{0、1}、{2、3、4}、{5、6、7}、{8、9}、{10、11、12}、{13、14}の組によってグループ化される例であるが、この場合、0、1、0、0、1、0、0、1、0、1、0、0、1、0のalf_filter_pattern[]が符号化される。
 (適応フィルタ150)
 図23は、適応フィルタ150のブロック図である。適応フィルタ150は、適応フィルタ情報復号部151、適応フィルタ152を備えている。適応フィルタ情報復号部151は、フィルタ形状復号部1511、領域構造復号部1512、領域適応モード復号部1513、フィルタ係数復号部1514、フィルタ係数格納部1515を備えており、適応フィルタ部152は、領域インデックス算出部1522、フィルタ係数割り付け部1523、フィルタ部1524を備えている。
 フィルタ形状復号部1511は、フィルタパラメータFP#1に含まれるシンタックスalf_filter_modeを復号する。図7は、フィルタ係数群とフィルタ形状の関係を示す図である。図7(a)に示すように、第1の実施形態では、フィルタインデックスi=0からi=AlfNumFilters-1までのフィルタインデックスで示される各フィルタ係数群(特性値分類領域)に対して1つのフィルタ形状alf_filter_modeが復号されることが示されている。ここでは、図に示す通り、フィルタ係数群のフィルタ形状として星もしくはクロスが復号される。
 領域構造復号部1512は、概略的に言えば、図18に示すフィルタパラメータFP#1に含まれるシンタックスalf_region_idx[i]から領域構造を復号する。また、alf_filter_pattern[]から領域構造を復号しても構わない。
 領域適応モード復号部1513は、シンタックスalf_region_adaptation_flagを復号する。復号されたシンタックスalf_region_adaptation_flagは、領域インデックス算出部1522に供給される。
 フィルタ係数復号部1514は、シンタックスalf_coeff_luma[i][k]よりフィルタ係数群AlfRegionFilterCoeff[i][k] (0≦i<AlfNumFilters、0≦k<Ntotal:Ntotalは、1つのフィルタ係数群に含まれるフィルタ係数の数)を復号する。フィルタ係数群AlfRegionFilterCoeff[i][k]の総数は、AlfNumFiltersである。
 また、フィルタ係数復号部1514は、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを、以下の式を用いて算出する。
 AlfRegionFilterCoeff[i][k] = AlfRegionFilterCoeff[i-1][k] + alf_coeff_luma[i][k] (i=0以外の場合)
 AlfRegionFilterCoeff[i][k] = alf_coeff_luma[i][k] (i=0の場合)
なお、kは、0~フィルタ係数の数-1までの値であり、AlfRegionFilterCoeff[i][k]は
、各フィルタ係数毎に(すなわち、kの各値について)上記式により算出される。
 フィルタ係数格納部1515には、フィルタ係数復号部1514によって復号されたフィルタ係数群RegionFilterLuma[i][k]が格納される。ここで、iは、フィルタ係数群を参照するためのインデックスであり、以下フィルタインデックスfidxとも呼ぶ。フィルタ係数群の数はAlfNumFiltersであるから、フィルタインデックスは0からAlfNumFilters-1までの値で指定される。なお、本実施形態では、フィルタ処理で用いられるフィルタ係数群として、符号化データ#1から復号されるフィルタ係数群を用いるが、復号装置に予め備わっているフィルタ係数群を参照可能なフィルタ係数として用いても良い。また、処理対象のピクチャおよびスライスに対応するヘッダ及びピクチャパラメータセットだけではなく、それ以前の特定のピクチャやスライスで符号化されるフィルタ係数群を参照しても良い。また、フィルタ係数格納部1515には、フィルタ係数復号部1514から供給されるフィルタ形状alf_filter_modeが格納される。
 (領域構造復号部1512)
 領域構造復号部1512は、フィルタパラメータFP#1から領域構造シンタックスを復号し、領域インデックスでグループ化される部分領域(特性値分類領域)の各々に対して、フィルタ係数群を参照するためのフィルタインデックスを割り当てる。具体的には、部分領域を指定する各領域インデックスridx(0≦ridx<AlfNumRegions)に対して、1つのフィルタインデックスfidxを割り当てる。
 領域構造復号部1512は、フィルタ数AlfNumFiltersを復号し、フィルタ係数復号部1514に出力する。
 領域構造復号部1512は、各領域インデックスridxに対するフィルタインデックスfidxを復号し、領域インデックスridxとフィルタインデックスfidxの関係を示すフィルタインデックステーブルFilterIdxTbl[ridx](0≦ridx<AlfNumRegions)を導出する。導出されたフィルタインデックステーブルFilterIdxTbl[]はフィルタ係数割り付け部1523に出力する。フィルタインデックステーブルFilterIdxTbl[]は、領域インデックスがridxの場合のフィルタインデックスfidxを下記の式により定めるテーブルである。
 fidx = FilterIdxTbl[ridx]
 例えば、フィルタインデックステーブルが下記のFilterIdxTblAの場合には、領域インデックスridx=0に割り当てられるフィルタインデックスfidxは、FilterIdxTbl[ridx]=FilterIdxTblA[0]=0になる。
 FilterIdxTblA[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
 また、FilterIdxTblAでは、各部分領域に対して異なるフィルタインデックスが割り当
てられる。すなわち、全ての各部分領域はマージされず異なる値が割り当てられる。この時、フィルタインデックスの総数AlfNumFiltersは16である。
 領域インデックスridx=0のフィルタインデックスは0であるので、領域インデックスridx=0のフィルタインデックス復号を省略することができる。
 (適応フィルタ部152)
 適応フィルタ部152は、デブロック済復号画像P_DBを構成する各単位領域に対して、適応的フィルタ処理を行うことによってフィルタ済復号画像P_FLを生成するための構成である。ここで、各単位領域のフィルタ処理に用いられるフィルタ係数は、フィルタパラメータFP#1から復号されたフィルタ係数RegionFilterLuma[i][j]から、該単位領域におけるデブロック済復号画像P_DBの特性値に応じて定まる領域インデックスに応じて選択される。また、生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。
 なお、適応フィルタ部152に入力される画像は、デブロック済復号画像P_DBに限定されるものではなく、複数の入力画像を入力することもできる。例えば、適応フィルタ部152には、デブロック済復号画像P_DBに加えて、復号画像Pおよび予測残差Dの少なくとも何れかを入力する構成としてもよい。このような構成の場合、領域インデックス算出部1522は、デブロック済復号画像P_DBのみならず、復号画像Pおよび予測残差Dの少なくとも何れかについても各特性値を算出する構成とし、フィルタ部1524は、それぞれの入力画像に対して、適応的フィルタ処理を行い、フィルタ後の画像を加算した後に出力する構成としてもよい。このような場合、フィルタパラメータFP#1には、各入力画像に対するフィルタ係数であって、各特性値部分領域に対応するフィルタ係数を含めておく構成とすればよい。
 (領域インデックス算出部1522)
 領域インデックス算出部1522は、単位領域の属性から、1つ以上の特性値算出方法で得られる特性値を用いて部分領域に分類する領域分類手段であり、具体的には、ある座標(x, y)で示される単位領域の領域インデックスridxを求める。なお、本実施形態では1次元の領域インデックスを用いる例を説明するが、特性値X、特性値Yを組とする値のようにベクトル量の領域インデックスを用いても良い。
 領域インデックスの算出方法である特徴量モードalf_feature_modeは、領域適応モードalf_region_adaptation_flagを基づいて設定される。実施形態1では、領域適応モードalf_region_adaptation_flag、フィルタ形状alf_filter_modeに応じて特徴量モードalf_feature_modeを算出する。
 図17は、領域インデックス算出部1522の構成を示すブロック図である。領域インデックス算出部1522は、RAモード領域インデックス算出部1550、BA1モード領域インデックス算出部1560、BA2モード領域インデックス算出部1570、領域インデックス選択部1525、特徴量モード算出部1526を備え、また、さらにRA第1特性値算出部1551、RA第2特性値算出部1552、RA領域インデックス算出部1555、BA1第1特性値算出部1561、BA1第2特性値算出部1562、BA1領域インデックス算出部1565、BA2第1特性値算出部1571、BA2第2特性値算出部1572、BA2領域インデックス算出部1575、を備える。
 なお、図17では、BA1モード領域インデックス算出部1560と、BA2モード領域インデックス算出部1561を別の手段として示しているが、後述するように、BA1モードとBA2モードは、中間値の算出方向を除き、同じ構成の手段で算出可能であるので、共通の手段、BAモード領域インデックス算出部を用い、BA1モードとBA2モードを切り替えるBAモード計算モードalf_ba_comp_modeに応じて動作を変更しても構わない。
 領域インデックス算出部1522は、座標値(xC、yC)で指定される単位領域に対して、座標値、単位領域及びその周辺の画素値、単位領域及びその周辺の符号化パラメータから2つ以上の軸の特性値を算出して領域インデックスを算出する。
 特徴量モード算出部1526は、領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeに応じて、特徴量モードalf_feature_modeを算出する。本実施形態では、領域適応モードalf_region_adaptation_flagはRAモード、BAモードのいずれかの値をとり、特徴量モードalf_feature_modeはRAモード、BA1モード、BA2モードのいずれかの値をとる。図15は、実施形態1における領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeと、特徴量モードalf_feature_modeの関係を示す図である。領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeは、符号化モードのシンタックスとして符号化される値であり、特徴量モードalf_feature_modeは、復号したシンタックスから導出される値である。図に示すように、領域適応モードalf_region_adaptation_flagがRAモードである場合は、特徴量モードalf_feature_modeはRAモードを用い、領域適応モードalf_region_adaptation_flagがBAモードである場合には、フィルタ形状alf_filter_modeに応じて、特徴量モードalf_feature_modeを切り替える。なお、図中のalf_ba_comp_mode は、特徴空間分割(BAモード)における特性値算出方法を識別するための値であり、BA計算モードと呼ぶ。斜め方向の方向性を有する特性値算出方法であるBA2モードがalf_ba_comp_mode=0に対応し、水平垂直方向の方向性を有する特性値算出方法であるBA1モードがalf_ba_comp_mode=1に対応する。
 図6は、本実施形態の領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeの組み合わせを示す図である。本実施形態では2つの領域適応モード(RAモード、BAモード)の各々に対して、フィルタ形状を選択する。フィルタ形状の選択肢は、2つのフィルタ形状(星、クロス)である。また、図に示すようにBAモードではフィルタ形状に合わせて、特徴量算出モードの選択が行われる。
 領域インデックス選択部1525は、特徴量モードalf_feature_modeの値に応じて、領域インデックスの算出方法を切り替える。具体的には、特徴量モードがRAモード、BA1モード、BA2モードの何れであるかに応じて、RAモード領域インデックス算出部1550、BA1モード領域インデックス算出部1560、BA2モード領域インデックス算出部1570から出力される領域インデックスをそれぞれ選択する。
 本実施形態では、領域インデックス選択部1525は、少なくとも1つの特性値算出方法を備え、特性値算出方法に基づいて単位領域の特性値を算出し、単位領域を分類する領域インデックスを算出する。
 少なくとも1つの座標空間分割(ここではRAモード)と、少なくとも1つの特徴空間分割モードを備えれば、一方の特徴量による領域分類が適当ではない場合に、他方の領域分類で補うことができるため、符号化効率上適当である。また、さらに、互いに異なる複数の特徴空間分割モードを備えることも同様の理由で適当である。
 RAモード領域インデックス算出部1550では、座標値(xC、yC)で指定される単位領域に対して、座標値を参照して領域インデックスを算出する。RA第1特性値算出部1551がX座標xCを量子化した値xIdxを出力し、RA第2特性値算出部1552がY座標yCを量子化した値yIdxを出力し、RA領域インデックス算出部1555においてxIdxとyIdxから領域インデックスridxを算出する。より具体的には、下記の式により、xIdx、yIdxを算出する。
offset = 1 << (Log2MaxCUSize - 1)
xInterval = ( ( ( PicWidthInSamplesL + offset ) >> Log2MaxCUSize ) + 1 ) >> 2
yInterval = ( ( ( PicHeightInSamplesL + offset ) >> Log2MaxCUSize ) + 1 ) >> 2
xIdx = Min( 3, Floor( ( xC + x ) / ( xInterval << Log2MaxCUSize ) ) )
yIdx = Min( 3, Floor( ( yC + y ) / ( yInterval << Log2MaxCUSize ) ) )
ここで、Log2MaxCUSizeは最大CUサイズ(LCUサイズ)の2を底とした対数である。offset、xInterval、yIntervalは中間値である。Floor(x)はx以下の最大の整数を求める関数である。
 続いて、2次元の特性値X(=xIdx)と特性値Y(=yIdx)から領域インデックスridxが以下の式によって割り当てられる。一つの方法では、テーブルregionTabを用いて以下の式で算出する。
 regionTab[16] = { 0, 1, 4, 5, 15, 2, 3, 6, 14, 11, 10, 7, 13, 12, 9, 8 }
 ridx = regionTab[ ( yIdx << 2 ) + xIdx ]
 なお、yIdx << 2は、yIdx × wとも表現することができる。ここでwは特性値Xの値の範囲である。
 この場合は、各単位領域は、一筆書き(ヒルベルトスキャン)によってスキャンされるため、隣接領域とのマージを優先するようなエンコーダを用いる場合において、領域のフィルタインデックスが短い符号語で符号化されるため符号化効率が向上する。
 なお、特性値X、特性値Yから領域インデックスridxを算出する方法にはラスタスキャンを用いることも可能である。この場合、
 ridx = ( yIdx ×2 ) + xIdx
とする。なお、ここでは、特性値Xの値域をwを4(=1<<2)としているが、この限りではない。
 BA1モード領域インデックス算出部1560では、座標値(xC、yC)で指定される単位領域に対して、単位領域もしくは単位領域周辺の画素値を参照して領域インデックスを算出する。BA1第1特性値算出部1561は単位ブロックの特性値Xとして活性度actを出力し、BA1第2特性値算出部1562は単位ブロックの特性値Yとして活性度directionを出力し、BA1領域インデックス算出部1565においてactとdirectionから領域インデックスridxを算出する。より具体的には、下記の手順により、actとdirectionを算出する。中間値として、各画素の水平活性度varTempHと垂直活性度varTempVを算出する。以下の式ではラプラシアンを用いているが、単なる差分でも構わない。
varTempH[ x ][ y ] = | ( s’[ xC+x, yC+y ] << 1 ) - s’[ xC+x-1, yC+y ] - s’[ xC+x+1, yC+y ] |
varTempV[ x ][ y ] = | ( s’[ xC+x, yC+y ] << 1 ) - s’[ xC+x, yC+y-1 ] - s’[ xC+x, yC+y+1 ] |
ここで、s´は、適応フィルタの入力画素値、||は、絶対値を算出する関数である。
 続いて、以下の式によって、中間値varTemp1とvarTemp2を算出する。
varTemp1[ x ][ y ] = varTempH[ x ][ y ] + varTempV[ x ][ y ]
varTemp2[ x ][ y ] = ΣiΣj varTemp1[ x + i ][ y + j ]
但し、i, j = -1..1である。
 続いて、以下の式によって、単位ブロック内(もしくは単位ブロック周辺を含めて)で中間値を足し合わせることにより、単位ブロックの活性度を算出する。すなわち、活性度varTemp3、水平活性度varTempH1、水平活性度varTempV1を算出する。
varTemp3[ x ][ y ] = (ΣiΣj varTemp2[ (x << 2 ) + i ][ (y << 2) + j ]) >> 4
varTempH1[ x ][ y ] = ΣiΣj varTempH[ (x << 2 ) + i ][ (y << 2) + j ]
varTempV1[ x][ y ] = ΣiΣj varTempV[ (x << 2 ) + i ][ (y << 2) + j ]
但し、i, j = 0..3である。
 第2特性値directionは、以下のように、単位ブロックの水平活性度varTempH1と水平活性度varTempV1の大きさの比較から算出する。
varTempV1[ x >> 2 ][ y >> 2 ] > varTempH1[ x >> 2 ][ y >> 2 ] << 1の場合に、direction = 1
それ以外で、varTempH1[ x >> 2 ][ y >> 2 ] > varTempV1[ x >> 2 ][ y >> 2 ] << 1の場合に、direction = 2
それ以外の場合に、direction = 0。
但し、上記では、エッジがあると想定される部分領域(水平活性度と垂直活性度の差が大きい部分領域)にdirectionを1もしくは2として、エッジがないと想定される部分領域(差が大きくない場合)のdirectionを0としたが、この値の配置に限らない。エッジがないとされる部分領域のdirectionを1として、エッジがあると想定される部分領域のdirectionを0もしくは2としても良い。すなわち、特性値Yにdirectionが配置される場合、その大小順序は、水平エッジ、エッジ無し、垂直エッジ、もしくは、垂直エッジ、エッジ無し、水平エッジという順となると良い。一般に垂直エッジが存在すると想定される部分領域と、水平エッジが存在すると想定される部分領域は、互いに異なる特性であるため、異なるフィルタ係数群を用いてフィルタ処理を行うことが多い。特性値Xもしくは特性値Yが同一の値の既に処理済みの部分領域(隣接領域)から、フィルタインデックスを推定する場合には、特性値領域において隣接する部分領域の特性が類似するように、上記順序の方が好適である。なお、フィルタインデックスに限らず、隣接領域からフィルタ係数群を推定する場合にも、上記順序が好適である。
 第1特性値actは、以下のように、中間値varTemp3をビット深度に応じて正規化し0~15の値にクリップする。さらにクリップされた値をテーブルvarTabにより量子化することでactとする。
varTab[16] = { 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4 }
avgVar[x][y] = Clip3( 0, 15, (varTemp3[ x >> 2 ][ y >> 2 ] * 114 ) >> (3 + BitDepthY) )
act = Clip3( 0, 4, varTab[avgVar[x][y]])
 なお、Clip3(x, y, z)は値zをx以上、y以下にクリップする関数であり、BitDepthYは、画素のビット深度を示す。
 テーブルvarTabは、小さい活性度の領域ほど細かく分類するように設定する。すなわち、小さい値に量子化される、量子化前活性度varTemp3の範囲の方が、大きな値に量子化される量子化前活性度varTemp3の範囲よりも狭くなるように設定する。一般に画像は、小さい活性度の領域に集中することが多いからである。小さい値に量子化される値の範囲の方が小さい、という上記制約は必ずしも全ての段階で成り立つ必要はなく、多くの場合に成り立てばよい。量子化後活性度から3つの値0, m, nを選び出した場合(但し0<m<n)、0の範囲<mの範囲<nの範囲となるm, nの組が存在するという制約で良い。また、量子化化後活性度から4つの値、0, l, m, mを選び出した場合(但し0<l<m<n)、0の範囲<=lの範囲<mの範囲<=nの範囲となるl, m, nの組が存在するという制約でも良い。
 BA1領域インデックス算出部1565は、以下の式により、
ridx = act + w * direction
を求める。但しここではw=5である。
 以上のBA1モードでは、互いに直交する方向の活性度を用いて、2次元特性値を求めることにより、比較的少ない演算量で互いに直交する2つの方向のエッジを識別し、異なる領域として分類することができる。ここでは水平方向活性度と垂直方向活性度を用いることによって水平方向エッジと垂直方向エッジを識別することができる。2次元特性値を活性度と方向性という2軸にする場合に、活性度の算出に方向性の算出に用いる水平方向活性度と垂直方向活性度を使用することができるため、活性度の算出と方向性の算出に別の中間値を用いる場合に比べて演算量を削減することができる。また、方向性の算出は、水平方向活性度と垂直方向活性度の比較によって行うため比較的小さな演算量で実現可能である。
 BA2モード領域インデックス算出部1570では、座標値(xC、yC)で指定される単位領域に対して、座標値を参照して領域インデックスを算出する。BA2第1特性値算出部1571は単位ブロックの特性値Xとして活性度actを出力し、BA2第2特性値
算出部1572は単位ブロックの活性度directionを出力し、BA2フィルタインデック
ス算出部1575においてactとdirectionから領域インデックスridxを算出する。より具体的には、下記の流れにより、actとdirectionを算出する。まず、中間値として、各画素の第1の斜め活性度varTempDAと、第1の斜め活性度とは異なる方向の第2の斜め活性度varTempDBを算出する。以下の式ではラプラシアンを用いているが、単なる差分でも構わない。
varTempDA[ x ][ y ] = | ( s’[ xC+x, yC+y ] << 1 ) - s’[ xC+x-1, yC+y+1 ] - s’[ xC+x+1, yC+y-1 ] |
varTempDB[ x ][ y ] = | ( s’[ xC+x, yC+y ] << 1 ) - s’[ xC+x+1, yC+y-1 ] - s’[ xC+x-1, yC+y+1 ] |
ここで、s´は、適応フィルタの入力画素値、||は、絶対値を算出する関数である。
 続いて、以下の式によって、中間値varTemp1とvarTemp2を算出する。
varTemp1[ x ][ y ] = varTempDA[ x ][ y ] + varTempDB[ x ][ y ]
varTemp2[ x ][ y ] = ΣiΣj varTemp1[ x + i ][ y + j ]
但し、i, j = -1..1である。
 続いて、以下の式によって、単位ブロック内(もしくは単位ブロック周辺を含めて)で中間値を足し合わせることにより、単位ブロックの活性度を算出する。すなわち、活性度varTemp3、水平活性度varTempDA1、水平活性度varTempDB1を算出する。
varTemp3[ x ][ y ] = (ΣiΣj varTemp2[ (x << 2 ) + i ][ (y << 2) + j ]) >> 4
varTempDA1[ x ][ y ] = ΣiΣj varTempDA[ (x << 2 ) + i ][ (y << 2) + j ]
varTempDB1[ x ][ y ] = ΣiΣj varTempDB[ (x << 2 ) + i ][ (y << 2) + j ]
但し、i, j = 0..3である。
 第2特性値directionは、以下のように、単位ブロックの水平活性度varTempDA1と水平活性度varTempDB1の大きさの比較から算出する。
varTempDA1[ x >> 2 ][ y >> 2 ] > varTempDB1[ x >> 2 ][ y >> 2 ] << 1の場合に、direction = 1
それ以外で、varTempDB1[ x >> 2 ][ y >> 2 ] > varTempDA1[ x >> 2 ][ y >> 2 ] << 1の場合に、direction = 2
それ以外の場合に、direction = 0。
 第1特性値actは、BA1モードと同様の方法により中間値varTemp3から算出される。
 BA2領域インデックス算出部1575も、BA1と同様actとdirectionからridxを求める。
 特徴空間分割における特性値Xと特性値Yから領域インデックスを算出する方法(領域インデックス算出方法)は、既に説明した方法の他、別の方法を用いることができる。図31は、2つの特性値から領域インデックスを算出する方法を説明する図である。
 図31(a)は、第1の領域インデックス算出方法を説明する図である。BA1領域インデックス算出部1565及びBA2領域インデックス算出部1575で既に説明したように、5段階の特性値Xと3段階の特性値Yをラスタスキャン順にスキャンすることによって、図中の0~15の順にスキャンする。
 図31(b)は、第2の領域インデックス算出方法を説明する図である。第1の領域インデックス算出方法のようにラスタスキャン順の場合では、2次元座標上、右端(特性値Xが最大値)に到達すると、次には一つ下の左端(特性値Xが0)の部分領域をスキャンする。この場合、スキャン順において隣接する部分領域の間で、X軸方向の特性値Xの値の変化が大きい。図31(b)では、2次元座標上、端(特性値Xが最大値)に到達すると、次には一つ下の同じ端(特性値Xが0)の部分領域をスキャンする。より具体的には、
 ridx = act + w * direction     (direction が偶数の場合)
 ridx = -act - 1 + w * (direction+1)  (directionが奇数の場合)
 により計算できる。
 この算出方法は一筆書き(ヒルベルトスキャン)の算出方法と呼ぶ。
 図31(c)は第3の領域インデックス算出方法を説明する図である。第3の領域インデックス算出方法では、特性値Xが小さい場合に、特性値Yを区別せずに割り当てる。活性度(領域の乱雑さ、エッジの強さ、勾配の大きさ)に対応する特性値Xが小さい場合には、方向性の重要性が比較的低いため、活性度が低い場合に細かく方向性を用いて部分空間を分割を行わない。より具体的には、所定の閾値THを用いて、以下の式で、計算できる。
 ridx = act             (act < THの場合)
 ridx = act - TH + w *direction  (act >= THの場合)
図では、TH=1、w=6の例である。また、活性度が小さい場合をより細かい分割をすることも可能である。
 図31(d)は第4の領域インデックス算出方法を説明する図である。第4の領域インデックス算出方法では、特性値Xが小さい場合で、特性値Yが特定のグループに属する場合には、特性値Xの分類の粒度を下げる。特性値Xが小さい場合には、方向性有りと分類される場合(頻度)が比較的小さい。そのため方向性に対応する特性値Yが方向性ありを示す1もしくは2である場合には、特性値Xが小さい場合の頻度が小さいため、複数の特性値Xをまとめて1つの領域インデックスを割り当てる。逆にいえば、ある領域インデックスに割り当てられる特性値Xの範囲(閾値)を、特性値Yが方向性なしに対応する場合に比べて大きくする。
 また、tmpidx = act + w *directionで算出される中間インデックスで、所定のテーブルridxtbl[]を引くことによっても算出可能である。例えば
 ridxtbl[] = {0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15}
のテーブルにより次の式で算出可能である。
 ridx = tbl[tmpidx]
 このようにラスタスキャン順に割り当てら得るtmpidxのような中間インデックスを用いて、中間インデックスと領域インデックスの関係を示す所定のテーブルridxtbl[]を引いて、領域インデックスを算出する方法は、図31(a)、図31(b)、図31(c)など他の領域インデックス算出方法でも適用可能である。
 以上のBA2モードは、BA1モードと同様、互いに直交する方向の活性度を用いて、2次元特性値を求めることにより、比較的少ない演算量で互いに直交する2つの方向のエッジを識別し、異なる領域として分類することができる。ここでは2つの互いに直交する斜め方向活性度を用いることによって斜め45度エッジとそれと直交する斜め135度方向エッジを識別することができる。なお上記角度は、水平方向を0度とした場合のエッジのなす角で説明している。
 BA1モードとBA2モードは両者を備えることは互いに相補的な識別能力を有する2つの直交した特性値算出方法を用いるという点で適当である。
 (フィルタ係数割り付け部1523)
 フィルタ係数割り付け部1523は、領域にフィルタ係数を割り当てる。まず、領域インデックス算出部1522で算出された領域インデックスridxと、領域構造復号部1512で復号されたフィルタインデックステーブルFilterIdxTbl[]から、フィルタインデックスfidxを、fix = FilterIdxTbl[ridx]により算出する。続いて、得られたフィルタインデックスfixに対応するフィルタ係数RegionFilterLuma[ridx]をフィルタ係数格納部1515から読み出し、フィルタ部1524に出力する。
 領域インデックス算出部1522とフィルタ係数割り付け部1523は全体として、各単位領域に対してフィルタ係数群の割り付けが行われる。すなわち、領域インデックス算出部1522において各単位領域に対して領域インデックスridxが算出され、フィルタ係数割り付け部1523において領域インデックスridxからフィルタ係数群の割り付けが行われる。
 なお、対象の部分領域がフィルタオフとなる場合には、フィルタ係数割り付け部1523は、その領域に対するフィルタ係数を割り付けず、フィルタ部1524に対してフィルタオフとする信号を出力する。例えば、適応的フィルタオフ復号部において、各領域に対するフィルタオフが指定されている場合や、CU単位などの単位領域毎にフィルタオフが指定されている場合がこれに該当する。
 (フィルタ形状)
 図13は本発明の実施形態で用いるフィルタ形状の例を示す図である。フィルタ形状は、後述の参照領域Rを定める。図13(a)から(d)のフィルタ形状は、斜め方向の参照画素を比較的多く備えるフィルタ形状(斜め方向形状)の例であり、順に、星、矩形、矩形´、矩形´´と呼ぶ。図13(e)から(h)のフィルタ形状は、水平方向もしくは、垂直方向の参照画素を比較的多く備えるフィルタ形状(水平垂直方向形状)の例であり、順にクロス、クロス´、クロス´´、菱形と呼ぶ。図13(f)のフィルタ形状は、フィルタ対象画素を中心とした矩形領域の画素と、フィルタ対象画素の垂直方向および水平方向に位置する画素とを参照するフィルタ形状である。このフィルタ形状は、矩形領域に位置する斜め方向の画素と、縦横方向に延びる画素とをバランスよく含むため、少ない参照画素数で高い符号化効率を実現することができる。また、このフィルタ形状は、矩形と線という単純な形状の組み合わせであるため、実装が容易である。
 対象画素の周辺画素を用いる空間フィルタは、対象画素と相関の高い画素(対象画素と画素値が近い画素)の重み付き平均によって、対象画素に生じたノイズを低減するものであり、相関の高い方向の画素をより多く用いる方が効果が大きくなる。斜めエッジを含む領域は、斜め方向の相関が高いことから、斜め方向の画素を多く備えるフィルタ形状が好適であり、水平エッジもしくは垂直エッジを含む領域は、水平エッジ、垂直エッジの相関が高いことから、水平、垂直方向の画素を多く備えるフィルタ形状が好適である。フィルタ形状の分類は、基本的には、特定方向に位置する参照画素の数の全体からの割合を用いて定められる。具体的には、各参照画素に対し、中心画素からみて、水平方向、垂直方向、斜め45度方向、斜め135度方向のいずれの方向に最も近いかをカウントし、水平方向及び垂直方向のカウントが最も多い場合には、水平垂直形状、斜め方向のカウントが最も多い場合には、斜め形状に分類する。星については、斜め方向の参照画素と、水平垂直方向の画素の数が等しく、必ずしも斜め方向の参照画素を比較的多く備えるとは言えないが、図14に示すとおり、フィルタ係数の組を考慮した場合に、星と組をなすクロスよりも相対的に斜め方向の参照画素が多いことから斜め形状に分類している。このように、フィルタ形状の分類は相対的なものであっても良い。
 図14は本発明の実施形態で用いるフィルタ係数の組の例である。図14(a)から(d)に示すとおり、本発明の実施形態では、斜め方向形状と、水平垂直形状の組を用いる。例えば、星と、クロスの組を用いる。ここではフィルタ形状alf_feature_mode=0である方を斜め方向形状、フィルタ形状alf_filter_mode=1である方を水平垂直形状とする。
 さらに、フィルタ係数の組として2つより多いフィルタ係数の組を用いることも可能である。一つの例は、星、矩形、クロス、クロス´をフィルタ係数の組として用いる。この場合、相異なる方向性を有するフィルタ係数が含まれることが好ましい。例えば、斜め方向形状のフィルタ係数を1つ以上含み、水平垂直方向形状のフィルタ係数を1つ以上含む構成が良い。また、フィルタ形状の方向性は、斜め方向、水平垂直方向に限定されず、他の方向性を有しても良い。例えば、斜め方向を右上斜め方向と左上斜め方向で分離して、斜め45度方向、斜め135度方向(水平方向を0度とする反時計回り)の方向性を有するフィルタ形状や、水平垂直方向を2つに分離して、水平方向、垂直方向の方向性を有するフィルタ形状を用いることができる。
 (フィルタ形状と特徴量モード)
 特徴量モード算出部1526の算出で用いた、フィルタ形状alf_filter_modeに応じて、特徴量モードalf_feature_modeを切り替える方法について詳細を説明する。図4は、フィルタ形状と好適な特徴空間分割における特性値算出方法(BA計算モードalf_ba_comp_mode)の関係を示す図である。図に示すように、フィルタ形状が星および矩形など、斜め方向の参照画素を比較的多く備えるフィルタ形状においては、BA計算モードを斜め方向とすることを示す。また、フィルタ形状がクロスおよび菱形など、水平方向もしくは、垂直方向の参照画素を比較的多く備えるフィルタ形状においては、BA計算モードを水平垂直方向とすることを示す。
 BA計算モードが斜め方向であるとは、斜め方向のエッジや勾配の分解性能が高いBAモードを用いることに相当し、特徴量モードではBA2モードが該当する。BA計算モードが水平垂直方向とは、水平方向及び垂直方向のエッジや勾配の分解性能が比較的高いBAモードを用いることに相当し、特徴量モードではBA1モードが該当する。
 なお、斜め45度、斜め135度のフィルタ形状の場合には、斜め方向のBA計算モードが好適であり、水平方向、垂直方向のフィルタ形状の場合には、水平垂直方向のBA計算モードが好適である。
 図5は、本実施形態のフィルタ形状とBA計算モードの組み合わせの例を示す図である。フィルタ形状モードalf_filter_modeが0の場合、フィルタ形状には斜め形状である星が用いられ、BA特性モードには斜め方向が用いられる。逆に、フィルタ形状モードalf_filter_modeが1の場合、フィルタ形状には斜め形状であるクロスが用いられ、BA特性モードには水平垂直方向が用いられる例を示している。既に説明したように、斜め方向に適したフィルタ形状である場合に、斜め方向に適した特性値算出方法を用い、水平垂直方向に適したフィルタ形状である場合に、水平垂直方向に適した特性値算出方法を用いることにより、画像のエッジ方向及び勾配方向に適した特性値部分領域に分類することが可能になり、高い適応フィルタの効果を得ることができる。さらに画像のエッジ方向及び勾配方向に適したフィルタ形状を用いることによりさらに高い適応フィルタの効果を得ることができる。
 (自由度の数)
 図6を用いて既に説明したとおり、領域適応モードの組合せはRAモードとBAモードで2つ、フィルタ形状の組合せは2つであるため、領域適応モードとフィルタ形状で合わせて4つ(=領域適応モード×フィルタ形状=2×2)の自由度を有する。特徴空間分割を行う際に、フィルタ係数の方向性に関わらず、全ての方向性の特性値算出方法を用いることが可能な場合には、領域適応モードの組合せはRAモードとBA1モード、BA2モードで3つ、フィルタ形状の組合せは2つとする場合であり、この場合、領域適応モードとフィルタ形状で合わせて6つの自由度を有する。符号化装置において多くの自由度が大きい場合には、適当な場合を選択するために多くの演算量を必要とするため、同じもしくは近い程度の効果が得られる場合には、自由度は小さい方が良い。本実施形態では、特徴空間分割に用いる特性値算出方法の方向性と、フィルタ形状の方向性を一致させることにより、複雑度の低減を実現できる。
 (別の構成)
 図32は、本実施形態の領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeの組み合わせの別の構成である。この例では、図6の構成と同じ動作をするが、フィルタ形状毎に領域適応モードalf_region_adaptation_flagに値を割り当てる。具体的には、領域適応モードはRA1モード、RA2モード、BA1モード、BA2モードの値をとり、RA1モード、BA2モードでは斜め形状、RA2モード、BA1モードでは水平垂直形状を用いる。領域適応モードがRA1モード、RA2モードの場合のどちらも特徴量モードとしてはRAモードを用いる。図32(a)のRECT1のボックスで示すように、特性値算出方法の方向性とフィルタ形状の方向性は対応している。
 本実施形態では、フィルタ形状に合わせて、特徴空間分割の特性値算出方法(BA計算モード)を切り替える構成を説明したが、特徴空間分割の特性値算出方法に合わせて、フィルタ形状を算出する方法でも構わない。この場合、符号化データとしては、領域適応モードとBA計算モードを含む構成を用いることも可能である。図32(b)は、領域適応モードがBAモードである場合にはさらにBA計算モードを復号する例である。おのとき、BA計算モードが斜め方向である場合には、フィルタ形状として星や矩形などの斜め形状を用い、BA計算モードが水平垂直である場合には、フィルタ形状としてクロスや菱形などの水平垂直形状を用いる。図32(a)のRECT1と、図32(a)のRECT2のボックス内が実質的に同じ対応関係を有していうように、フィルタ形状を復号する構成であっても、特徴空間分割の特性値算出方法を復号する構成であっても構わない。この場合、データ構造は、FP#5と同様にフィルタ構造alf_filter_modeを符号化しない、もしくは、FP#7と同様に、特性値算出方法が座標空間分割に対応する領域適応モードがRAモードの場合では、フィルタ構造alf_filter_modeを符号化するが、特性値算出方法が特徴空間分割に対応するBAモードの場合ではalf_fitler_modeを符号化しない構成となる。また、特性値算出方法からフィルタ形状を算出する手段は、第3の実施形態および第3の実施形態の変形例で説明するように領域適応モード・ フィルタ形状復号部1913、領域適応モード・ フィルタ形状復号部2113となる。
 (フィルタ部1524)
 フィルタ部1524は、対象単位領域に対して、フィルタ係数RegionFilterLuma[fidx] 及びフィルタ形状alf_filter_modeを用いたフィルタ処理を施すことによって、該対象単位領域におけるフィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。
 より具体的には、フィルタ済復号画像P_FL(「フィルタ後画像」とも呼称する)におけるフィルタ対象画素の画素値をSF(x’、y’)と表し、デブロック済復号画像P
_DB(「フィルタ前画像」とも呼称する)における画素値をS(x、y)と表すことにすると、フィルタ部1524は、画素値SF(x’、y’)を、数式(1)によって算出する。
Figure JPOXMLDOC01-appb-M000001
 ここで、座標(x、y)は座標(x’、y’)と同一の座標としてもよいし、1対1の対応を有していれば、異なった座標としてもよい。また、a(u、v)は、フィルタ前画像の画素値S(x+u、y+v)に乗ぜられるフィルタ係数を表しており、フィルタ係数割り付け部1523から供給されたフィルタ係数RegionFilterLuma[fidx]の各成分に対応する。また、oは、フィルタ係数RegionFilterLuma[fidx]に含まれるオフセット成分を表している。
 また、数式(1)におけるRは、フィルタ処理において参照される領域(「フィルタ参照領域R」とも呼称する)を表している。参照領域Rのフィルタ形状は、alf_filter_modeによって指定される。
 また、各フィルタ係数は、180度の回転対称性を有するように、フィルタ参照領域Rに含まれる各画素に対して割り付けられる構成とすることができる。すなわち、a(u、
v)=a(-u、-v)を満たすように設定される構成とすることができる。このような
構成とすることによって、alf_coeff_luma[i][j]に含まれる各成分の数を削減することができる。
 なお、復号装置が、適応的フィルタオフ復号部を有する場合で、フィルタ係数の割り付けがない場合には、フィルタ処理は行わない。
 (動画像符号化装置2)
 以下では、符号化対象画像を符号化することによって符号化データ#1を生成する動画像符号化装置2について、図xxを参照して説明する。動画像符号化装置2は、その一部に、H.264/MPEG-4.AVCに採用されている方式、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式、及び、HM(HEVC TestModel)ソフトウェアに採用されている技術を含んでいる。
 図3は、本実施形態に係る動画像符号化装置2の構成を示すブロック図である。図3に示すように、動画像符号化装置2は、変換・量子化部21、可変長符号符号化部22、逆量子化・逆変換部23、バッファメモリ24、イントラ予測画像生成部25、インター予測画像生成部26、動きベクトル検出部27、予測方式制御部28、動きベクトル冗長性削除部29、加算器31、減算器32、デブロッキングフィルタ33、および、適応フィルタ160を備えている。動画像符号化装置2は、動画像#10(符号化対象画像)を符号化することによって、符号化データ#1を生成する装置である。
 変換・量子化部21は、(1)符号化対象画像から予測画像Predを減算した予測残差Dをブロック毎にDCT変換(Discrete Cosine Transform)し、(2)DCT変換により得られたDCT係数を量子化し、(3)量子化により得られた量子化予測残差QDを可変長符号符号化部22及び逆量子化・逆変換部23に供給する。なお、変換・量子化部21は、(1)量子化の際に用いる量子化ステップQPを、ツリーブロック毎に選択し、(2)選択した量子化ステップQPの大きさを示す量子化パラメータ差分Δqpを可変長符号符号化部22に供給し、(3)選択した量子化ステップQPを逆量子化・逆変換部23に供給する。ここで、量子化パラメータ差分Δqpとは、DCT変換/量子化するツリーブロックに関する量子化パラメータqp(QP=2pq/6)の値から、直前にDCT変換/量子化したツリーブロックに関する量子化パラメータqp’の値を減算して得られる差分値のことを指す。
 可変長符号符号化部22は、(1)変換・量子化部21から供給された量子化予測残差QD並びにΔqp、(2)後述する予測方式制御部28から供給された量子化パラメータPP、および、(3)後述する適応フィルタ160から供給されたフィルタセット番号、フィルタ係数群、領域指定情報、並びにオンオフ情報を可変長符号化することによって、符号化データ#1を生成する。
 逆量子化・逆変換部23は、(1)量子化予測残差QDを逆量子化し、(2)逆量子化によって得られたDCT係数を逆DCT(Discrete Cosine Transform)変換し、(3)逆DCT変換によって得られた予測残差Dを加算器31に供給する。量子化予測残差QDを逆量子化する際には、変換・量子化部21から供給された量子化ステップQPを利用する。なお、逆量子化・逆変換部23から出力される予測残差Dは、変換・量子化部21に入力される予測残差Dに量子化誤差が加わったものであるが、ここでは簡単のために共通の呼称を用いる。
 イントラ予測画像生成部25は、各パーティションに関する予測画像Pred_Intraを生成する。具体的には、(1)各パーティションついてイントラ予測に用いる予測モードを選択し、(2)選択した予測モードを用いて、復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部25は、生成したイントラ予測画像Pred_Intraを、予測方式制御部28に供給する。
 また、イントラ予測画像生成部25は、各パーティションについて選択された予測モードから、各パーティションのサイズとから各パーティションについての予測インデックスPIを特定し、当該予測インデックスPIを予測方式制御部28に供給する。
 また、イントラ予測画像生成部25は、対象パーティションのサイズ、および、対象パーティションに割り付けられた予測モードを示す情報であるイントラ符号化モード情報IEMを適応フィルタ160に供給する。
 動きベクトル検出部27は、各パーティションに関する動きベクトルmvを検出する。具体的には、(1)参照画像として利用するフィルタ済復号画像P_FL’を選択し、(2)選択したフィルタ済復号画像P_FL’において対象パーティションを最良近似する領域を探索することによって、対象パーティションに関する動きベクトルmvを検出する。ここで、フィルタ済復号画像P_FL’は、既に復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ33によるデブロック処理、および、適応フィルタ160による適応的フィルタ処理を施すことによって得られる画像であり、動きベクトル検出部27は、フィルタ済復号画像P_FL’を構成する各画素の画素値をバッファメモリ24から読み出すことができる。動きベクトル検出部27は、検出した動きベクトルmvを、参照画像として利用したフィルタ済復号画像P_FL’を指定する参照画像インデックスRIと共に、インター予測画像生成部26及び動きベクトル冗長性削除部29に供給する。なお、双方向予測(重み付き予測)を行うパーティションについては、参照画像として2枚のフィルタ済復号画像P_FL1’及びP_FL2’を選択し、2枚のフィルタ済復号画像P_FL1’及びP_FL2’の各々に対応する動きベクトルmv1及びmv2、並びに、参照画像インデックスRI1及びRI2をインター予測画像生成部26及び動きベクトル冗長性削除部29に供給する。
 インター予測画像生成部26は、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル検出部27から供給された動きベクトルmvを用いて、動きベクトル検出部27から供給された参照画像インデックスRIによって指定されるフィルタ済復号画像P_FL’から動き補償画像mcを生成する。動きベクトル検出部27と同様、インター予測画像生成部26は、フィルタ済復号画像P_FL’を構成する各画素の画素値をバッファメモリ24から読み出すことができる。インター予測画像生成部26は、生成した動き補償画像mc(インター予測画像Pred_Inter)を、動きベクトル検出部27から供給された参照画像インデックスRIと共に、予測方式制御部28に供給する。なお、双方向予測(重み付き予測)をパーティションについては、(1)動きベクトルmv1を用いて、参照画像インデックスRI1によって指定されたフィルタ済復号画像P_FL1’から動き補償画像mc1を生成し、(2)動きベクトルmv2を用いて、参照画像インデックスRI2によって指定されたフィルタ済参照画像P_FL2’から動き補償画像mc2を生成し、(3)動き補償画像mc1と動き補償画像mc2との加重平均にオフセット値を加えることによってインター予測画像Pred_Interを生成する。
 予測方式制御部28は、イントラ予測画像Pred_Intra及びインター予測画像Pred_Interを符号化対象画像と比較し、イントラ予測を行うかインター予測を行うかを選択する。イントラ予測を選択した場合、予測方式制御部28は、イントラ予測画像Pred_Intraを予測画像Predとして加算器31及び減算器32に供給すると共に、イントラ予測画像生成部25から供給された予測インデックスPIを予測パラメータPPとして可変長符号符号化部22に供給する。一方、インター予測を選択した場合、予測方式制御部28は、インター予測画像Pred_Interを予測画像Predとして加算器31及び減算器32に供給すると共に、インター予測画像生成部26から供給された参照画像インデックスRI、並びに、動きベクトル冗長性削除部29(後述)から供給された推定動きベクトルインデックスPMVI及び動きベクトル残差MVDを予測パラメータPPとして可変長符号符号化部に供給する。
 予測方式制御部28にて選択された予測画像Predを、符号化対象画像から減算することによって、減算器32にて予測残差Dが生成される。減算器32にて生成された予測残差Dは、上述したとおり、変換・量子化部21によってDCT変換/量子化される。一方、予測方式制御部28にて選択された予測画像Predを、逆量子化・逆変換部23にて生成された予測残差Dに加算することによって、加算器31にて局所復号画像Pが生成される。加算器31にて生成された局所復号画像Pは、デブロッキングフィルタ33および適応フィルタ160を経由したのち、フィルタ済復号画像P_FLとしてバッファメモリ24に格納され、インター予測における参照画像として利用される。
 なお、動きベクトル冗長性削除部29は、動きベクトル検出部27によって検出された動きベクトルmvにおける冗長性を削除する。具体的には、(1)動きベクトルmvの推定に用いる推定方法を選択し、(2)選択した推定方法に従って推定動きベクトルpmvを導出し、(3)動きベクトルmvから推定動きベクトルpmvを減算することにより動きベクトル残差MVDを生成する。動きベクトル冗長性削除部29は、生成した動きベクトル残差MVDを、選択した推定方法を示す推定動きベクトルインデックスPMVIと共に、予測方式制御部28に供給する。
 デブロッキングフィルタ33は、復号画像Pにおけるブロック境界、またはCU境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、復号画像Pにおける当該ブロック境界、または当該CU境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該CU境界付近の画像の平滑化を行う。デブロッキングフィルタ33によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、適応フィルタ160に出力される。
 適応フィルタ160は、デブロッキングフィルタ33から供給されるデブロック済復号画像P_DBに対して、適応的なフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ160によりフィルタ処理が施されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。適応フィルタ160の具体的な構成については、後述するため、ここでは説明を省略する。
 (適応フィルタ160)
 適応フィルタ160は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ160は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFP#1として可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFP#1を符号化データ#1の一部として符号化する。
 図24は、適応フィルタ160の構成を示すブロック図である。図24に示すように、適応フィルタ160は、適応フィルタ情報設定部161、および、適応フィルタ部162を備えている。
 適応フィルタ情報設定部161は、図24に示すように、フィルタ形状設定部1611、領域構造設定部1612、領域適応モード設定部1613、フィルタ係数残差生成部1614、フィルタ係数格納部1615、及び、フィルタパラメータ生成部1616を備えている。
 フィルタ形状設定部1611は、フィルタ係数のフィルタ形状を指定するためのシンタックスalf_filter_modeを設定する。設定されたシンタックスalf_filter_modeは、フィルタパラメータ生成部1616に供給される。
 領域構造設定部1612は、フィルタインデックステーブルFilterIndexTblを設定する。設定されたシンタックスFilterIndexTblは、フィルタパラメータ生成部1616に供給される。
 領域適応モード設定部1613は、シンタックスalf_region_adaptation_flag を設定する。設定されたシンタックスalf_region_adaptation_flagは、適応フィルタ部162に供給され、さらにフィルタパラメータ生成部1616に供給される。
 なお、alf_filter_mode、FilterIndexTbl、及び、alf_region_adaptation_flag、は、符号化効率がより向上するように設定される。
 フィルタ係数残差生成部1614は、以下の式によってシンタックスalf_coeff_luma[i][k]を生成する。
 alf_coeff_luma[i][k] = AlfRegionFilterCoeff[i-1][k] - AlfRegionFilterCoeff[i][k] (i=0以外の場合)
 alf_coeff_luma[0][k] = AlfRegionFilterCoeff[i][k] (i=0の場合)
 生成されたフィルタ係数残差alf_coeff_luma[i][k]はフィルタパラメータ生成部1616に供給される。
 フィルタ係数格納部1615には、後述するフィルタ係数導出部1623から供給されるフィルタ係数群AlfRegionFilterCoeff[i][k]とフィルタ形状alf_filter_modeが格納される。
 フィルタパラメータ生成部1616は、シンタックスalf_filter_modeとalf_region_adaptation_flag、フィルタインデックスFilterIndexTbl[ridx]、および、alf_coeff_luma[i][k]からフィルタパラメータFP#1を生成する。ここで、フィルタインデックスFilterIndexTbl[ridx]の符号化においては、ridx=1からAlfNumRegion-1までの各部分領域において、フィルタ係数群を示すフィルタインデックスを符号化することによって行われる。生成されたフィルタパラメータFP#1は、可変長符号符号化部22に供給される。
 (適応フィルタ部162)
 適応フィルタ部162は、適応フィルタ部162は、領域インデックス算出部1522、フィルタ係数導出部1623、及びフィルタ部1524を備えている。領域インデックス算出部1522を備えている。領域インデックス算出部1522、フィルタ部1524については、既に述べたため、ここでは説明を省略する。
 (フィルタ係数導出部1623)
 フィルタ係数導出部1623は、対象特性値分類領域におけるフィルタ済復号画像P_FLと符号化対象画像との誤差がより小さくなるようなフィルタ係数RegionFilterLuma[i][j]を導出する。導出されたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部1524に供給されると共に、フィルタ係数格納部1615に格納される。
 対象単位領域におけるデブロック済復号画像P_DBの画素値をS(x、y)と表し、対象単位領域における符号化対象画像の画素値をST(x、y)と表すことにすると、フ
ィルタ係数導出部1623は、例えば、以下の数式(1-5)によって与えられる二乗誤差Eを最小にするようなフィルタ係数a(u、v)およびオフセットoを導出する。ここで、フィルタ係数a(u、v)およびオフセットoは、RegionFilterLuma[i][j]の各成分である。
 以上の構成では、領域インデックス算出部において、単位領域の属性から算出される多次元の特性値から各単位領域を分類するための分類パラメータ(領域インデックス)を算出し、フィルタ部では、2つ以上のフィルタ形状から1つのフィルタ形状を用いてフィルタ処理を行う。領域インデックス算出方法として単位領域の画素値を用いて領域分類を行う特徴空間分割を備える場合においては、特徴空間分割に用いる特性算出方法の方向性と、適応フィルタ部において特性値分割領域に対して割り当てられ、フィルタ部におけるフィルタ処理に用いられる、フィルタ係数群のフィルタ形状の方向性とを対応させる。具体的には、水平垂直方向の方向性を有する特性値算出方法(BA1モード)を用いる場合には、水平垂直形状のフィルタ形状(本実施形態ではクロス)を用い、斜め方向の方向性を有する特性値算出方法(BA2モード)を用いる場合には、斜め形状(本実施形態では星)フィルタ形状を用いるように、特徴空間分割に用いる特性算出方法の方向性とフィルタ係数群のフィルタ形状の方向性を一致させることによって、領域のエッジ方向や勾配方向などの方向性に適したフィルタ処理を行うことができる。
 なお、本実施形態ではクロスと星という2つの方向性を有するフィルタ形状を用いたが、クロスのみ、星のみなど1つ以上の方向性を有するフィルタ形状を備える場合でも良い。また、方向性を有する領域インデックス算出方法としてBA1モードとBA2モードという2つのモードを用いたが、BA1モードのみ、BA2モードのみなど1つのモードを用いる場合でも良い。この場合にも、所定の方向性を有する領域インデックス算出方法を用いる場合には、該方向性に対応する方向性を有するフィルタ形状を用いることが好適である。例えば、BA1モードには水平垂直方向、BA2モードには斜め方向を用いることが適当である。また、領域インデックス算出方法としては、BA1モードのみ、BA2モードのみ、RAモードとBA1モード、RAモードとBA2モードの何れを備える構成も可能である。
 以上の構成によって、領域インデックス算出方法に対応したフィルタ形状を用いることができる。領域インデックス算出方法に応じて、領域分類が変化し、各領域に適したフィルタ形状が変化するが、本実施形態に示すように領域インデックス算出方法に適したフィルタ形状を用いることにより、高い効果の適応フィルタを適用することができる。以上の構成では、特徴空間分割に用いる特性値算出方法の方向性と、フィルタ形状の方向性を一致させることにより、符号化装置の複雑度の低減する効果も有する。
 〔実施形態2〕
 以下では、本発明の第1の実施形態について、特に図7~図8、図19、図25、図26を参照して説明する。なお、以下では、実施形態1において既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 (符号化データ#3)
 本実施形態に係る動画像符号化装置4及び動画像復号装置3の詳細な説明に先立って、動画像符号化装置4によって生成され、動画像復号装置3によって復号される符号化データ#3のデータ構造について説明を行う。
 符号化データ#3のデータ構造は、実施形態1に係る符号化データ#1のデータ構造と略同じであるが、フィルタパラメータFPの構成が異なる。
 <フィルタパラメータFP#3>
 図19は、本実施形態に係るフィルタパラメータFPのシンタックステーブルの一例である。図19に示すように、フィルタパラメータFP#3には、adaptive_loop_filter_flag、alf_region_adaptation_flag、alf_filter_mode[]、alf_num_filters_minus1、alf_region_idx[]、alf_pred_method、alf_min_kstart_minus1、alf_golomb_index_bit[i]、alf_coeff_luma[i][j]が含まれている。実施形態1とは異なり、各フィルタ係数群に対するフィルタ形状モードalf_filter_mode[i](0≦i<AlfNumFilters)を含む。
 adaptive_loop_filter_flagは、適応フィルタ170による適応的フィルタ処理のオンオフを指定するフラグであり。
 alf_num_filters_minus1は本実施形態に係る適応フィルタで用いるフィルタ数AlfNumFiltersを示すシンタックスであり、AlfNumFilters = alf_num_filters_minus1 + 1により求めることができる。alf_region_adaptation_flagは、領域適応モードを示すシンタックスである。本実施形態では、alf_region_adaptation_flag=0、1、2は各々、RAモード、BA2モード、BA1モードに対応する。alf_filter_mode[i] (1≦i<AlfNumFilters)は、フィルタ形状を示すシンタックスである。alf_region_idx[i] (1≦i<AlfNumRegions)は、各部分領域に対するフィルタインデックスを指定するシンタックスである。
 (動画像復号装置3)
 本実施形態に係る動画像復号装置3は、実施形態1に係る動画像復号装置1の備える適応フィルタ150に代えて、適応フィルタ170を備えている。本実施形態に係る動画像復号装置のその他の構成は、実施形態1に係る動画像復号装置1の構成と同様であるので、説明を省略する。
 (適応フィルタ170)
 図25は、適応フィルタ170のブロック図である。適応フィルタ170は、適応フィルタ情報復号部171、適応フィルタ172を備えている。適応フィルタ情報復号部171は、フィルタ形状復号部1711、領域構造復号部1712、領域適応モード復号部1713、フィルタ係数復号部1714、フィルタ係数格納部1715を備えており、適応フィルタ部172は、領域インデックス算出部1722、フィルタ係数割り付け部1723、フィルタ部1524を備えている。
 領域構造復号部1712は、フィルタ数AlfNumFiltersを復号し、フィルタ係数復号部1714及びフィルタ形状復号部1711に出力する。
 フィルタ形状復号部1711は、フィルタパラメータFP#3から、i=0からAlfNumFilters-1までのフィルタインデックスで示される各フィルタ係数群(特性値分類領域)に対応するフィルタ形状alf_filter_mode[i]を復号し、フィルタ係数復号部1714に出力する。フィルタ数AlfNumFiltersは、領域構造復号部1712から供給される。
 図7は、フィルタ係数群とフィルタ形状の関係を示す図である。図7(b)に示すように、フィルタインデックスiのフィルタ係数群(特性値分類領域)のフィルタ形状は、各々alf_filter_mode[i]で指定される。図では、i=0のフィルタ係数群のフィルタ形状は星であり、i=1のフィルタ係数群のフィルタ形状は、クロスである。
 領域構造復号部1512は、図19に示すフィルタパラメータFP#3に含まれるシンタックスalf_region_idx[i]から領域構造を復号する。
 領域適応モード復号部1713は、シンタックスalf_region_adaptation_flagを復号する。復号されたシンタックスalf_region_adaptation_flagは、領域インデックス算出部1722に供給される。
 (フィルタ係数復号部1714)
 フィルタ係数復号部1714は、シンタックスalf_coeff_luma[i][k]よりフィルタ係数群AlfRegionFilterCoeff[i][k] (0≦i<AlfNumFilters、0≦k<Ntotal:Ntotalは、1つのフィルタ係数群に含まれるフィルタ係数の数)を復号する。フィルタ係数群AlfRegionFilterCoeff[i][k]の総数は、AlfNumFiltersである。
 また、フィルタ係数復号部1714は、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを、以下の式を用いて算出する。
 AlfRegionFilterCoeff[i][k] = AlfRegionFilterCoeff[pred_idx][k] + alf_coeff_luma[i][k] (i=0以外の場合)
 AlfRegionFilterCoeff[i][k] = alf_coeff_luma[i][k] (i=0の場合)
なお、kは、0~フィルタ係数の数-1までの値である。予測フィルタインデックスpred_idx(0≦pred_idx<i)は、フィルタ係数の予測に用いられる参照フィルタを指定するインデックスであり、既に復号したフィルタ係数群のフィルタインデックスが用いられる。AlfRegionFilterCoeff[i][k]は、各フィルタ係数毎に(すなわち、kの各値について)上記式により算出される。すなわち、各フィルタインデックスに対応するフィルタ係数群の各フィルタ係数は、符号化データを復号することにより得られたフィルタ係数残差(ここではalf_coeff_luma)に予測値を加算することによって復元される。予測フィルタインデックスpred_idxは、同じフィルタ形状を有する既に復号されたフィルタ係数群のフィルタ係数を予測値として用いることを特徴とする。
 図12は、フィルタ係数復号部1714の構成を示すブロック図である。フィルタ係数復号部1714は、フィルタ係数復元部1771、フィルタ係数予測値算出部1772、フィルタ形状別フィルタインデックス格納部1773から構成される。各手段は、i=0からi=AlfFilterNum-1のフィルタインデックスに対して順に動作する。
 フィルタ形状別フィルタインデックス格納部1773は、フィルタ形状毎の格納領域last_idx[]を備える。最初に(i=0の時点で)、格納領域last_idx[]の要素を全て-1に初期化する。続いて、i=1からAlfFilterNum-1までのフィルタインデックスに対し、フィルタインデックスiのフィルタ係数AlfRegionFilterCoeff[i][k]を復号した時点で、最後のフィルタインデックス番号iを、以下の式によってフィルタ形状alf_filter_mode毎の格納領域last_idx[]に記録する。
 last_idx[alf_filter_idx[i]] = i
 フィルタ係数予測値算出部1772は、まず、復号対象となるフィルタ係数群のフィルタ形状がalf_filter_mode[i]である場合には、alf_filter_mode[i]のフィルタ形状を用いた最後のフィルタインデックス番号を、以下の式のようにフィルタ形状別フィルタインデックス格納部1773から読み出すことによって、予測インデックス番号pred_idxを算出する。
 pred_idx = last_idx[alf_filter_idx[i]]
 次に、算出された予測フィルタインデックスが-1以外の場合、すなわち、既に復号された同じフィルタ形状のフィルタ係数群がある場合には、フィルタ係数格納部1715から、pred_idxで指定されるフィルタ係数を読み出し、以下の式に用に予測値predとする。
 pred[k] = AlfRegionCoeff[pred_idx][k]
 算出された予測フィルタインデックスが-1の場合、すなわち、既に復号された同じフィルタ形状のフィルタ係数群がない場合には、予測値としては固定値、ここでは0を用いる。
 pred[k] = 0
 フィルタ係数復元部1771は、算出された予測値predを用いて以下の式によってフィルタ係数を復元する。
 AlfRegionFilterCoeff[i][k] = pred[k] + alf_coeff_luma[i][k]
 ここでは、加算を用いているが、次のような差分値が予測値―符号化値の形式であるいには、次の式によってフィルタ係数を復元する。
 AlfRegionFilterCoeff[i][k] = pred[k] - alf_coeff_luma[i][k]
 図8は、上記予測フィルタインデックス算出方法を説明する図である。この例では、フィルタインデックス0、4、5、8~12のフィルタ係数群は星のフィルタ形状を用い、それ以外、フィルタインデックス1~3、6、7、13~15のフィルタ係数群はクロスのフィルタ形状を用いる。フィルタ係数インデックス=0、フィルタ係数インデックス=1のフィルタ係数群には、既に復号された同じフィルタ形状のフィルタ係数群がないため、固定値(上記では0)を用いて予測を行う。フィルタ係数インデックス=2の場合、同じクロスのフィルタ係数群がフィルタインデックス1で既に復号済みであるので、同じフィルタ形状のフィルタインデックス(1)を予測フィルタインデックスとして参照フィルタを参照し、フィルタ係数の予測を行う。フィルタ係数インデックス=4の場合、同じ星のフィルタ係数群がフィルタインデックス0で既に復号済みであるので、同じフィルタ形状のフィルタインデックス(0)を予測フィルタインデックスとする。
 フィルタ係数格納部1715には、フィルタ係数復号部1714によって復号されたフィルタ係数群RegionFilterLuma[i][k]が格納される。また、フィルタ係数格納部1715には、フィルタ係数復号部1714から供給されるフィルタ形状alf_filter_mode[i]が格納される。ここでiは、フィルタ係数群を参照するためのインデックスである。
 (領域インデックス算出部1722)
 領域インデックス算出部1722は、ある座標(x, y)を有するフィルタ対象画素の領域インデックスridxを求める。領域インデックスの算出方法は、領域適応モードalf_region_adaptation_flagに応じて異なる。
 領域インデックス算出部1722の構成は、領域インデックス算出部1522とほぼ同様であるが、特徴量モード算出部1526の代わりに、図示しない特徴量モード算出部1726を備える点が異なる。
 特徴量モード算出部1726は、領域適応モードalf_region_adaptation_flagに応じて、特徴量モードalf_feature_modeを算出する。特徴量モードには、領域適応モードを割り当てる。すなわち、alf_feature_mode = alf_region_adaptation_flagにより、特徴量モードを算出する。図16は、実施形態2における領域適応モードalf_region_adaptation_flagと特徴量モードalf_feature_modeの関係を示す図である。領域適応モードalf_region_adaptation_flagは、符号化モードのシンタックスとして符号化される値であり、フィルタ形状alf_filter_mode、特徴量モードalf_feature_modeは、復号したシンタックスから導出される値である。図16(a)に示すように、領域適応モードalf_region_adaptation_flagがRAモード、BA1モード、BA2モードである場合に対し、特徴量モードalf_feature_modeに、RAモード、BA1モード、BA2モードを割り当てる。なお、使用する領域適応モードがRAモードとBA2モードだけの場合には、図16(b)に示すように割り当てる。すなわち、2つの領域適応モードで異なるフィルタ形状が用いられるように割り当てる。
 (フィルタ係数割り付け部1723)
 フィルタ係数割り付け部1723は、領域にフィルタ係数を割り当てる。まず、領域インデックス算出部1722で算出された領域インデックスridxと、領域構造復号部1712で復号されたフィルタインデックステーブルFilterIdxTbl[]から、フィルタインデックスfidxを、fix = FilterIdxTbl[ridx]により算出する。続いて、得られたフィルタインデックスfixに対応するフィルタ係数RegionFilterLuma[fidx]とフィルタ形状alf_filter_mode[fidx]をフィルタ係数格納部1715から読み出し、フィルタ部1524に出力する。
 (動画像符号化装置4)
 以下では、符号化対象画像を符号化することによって符号化データ#3を生成する動画像符号化装置4について、図26を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置4は、実施形態1に係る動画像符号化装置2の備える適応フィルタ160に代えて、適応フィルタ180を備えている。本実施形態に係る動画像符号化装置4のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 (適応フィルタ180)
 適応フィルタ180は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ180は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFP#3として可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFP#3を符号化データ#3の一部として符号化する。
 図26は、適応フィルタ180の構成を示すブロック図である。図26に示すように、適応フィルタ180は、適応フィルタ情報設定部181、および、適応フィルタ部182を備えている。
 適応フィルタ情報設定部181は、フィルタ形状設定部1811、領域構造設定部1812、領域適応モード設定部1813、フィルタ係数残差生成部1814、フィルタ係数格納部1815、及び、フィルタパラメータ生成部1816を備えている。
 フィルタ形状設定部1811は、フィルタ係数のフィルタ形状を指定するためのシンタックスalf_filter_mode[i]を設定する。設定されたシンタックスalf_filter_modeは、フィルタパラメータ生成部1816に供給される。
 領域構造設定部1812は、フィルタインデックステーブルFilterIndexTblを設定する。設定されたシンタックスFilterIndexTblは、フィルタパラメータ生成部1816に供給される。
 領域適応モード設定部1813は、シンタックスalf_region_adaptation_flag を設定する。設定されたシンタックスalf_region_adaptation_flagは、適応フィルタ部182に供給され、さらにフィルタパラメータ生成部1816に供給される。
 なお、alf_filter_mode[i]、FilterIndexTbl、及び、alf_region_adaptation_flag、は、符号化効率がより向上するように設定される。
 (フィルタ係数残差生成部1814)
 フィルタ係数残差生成部1814は、以下の式によってシンタックスalf_coeff_luma[i][k]を生成する。
 alf_coeff_luma[i][k] = AlfRegionFilterCoeff[i][k] - pred[k]
 predは予測値である。予測値predの計算方法はフィルタ係数復号部1714と同じであるので説明を省略する。
 また、差分値の算出方法としては、以下の式を用いても良い。
 alf_coeff_luma[i][k] = pred[k]- AlfRegionFilterCoeff[i][k]
 この場合には、フィルタ係数復号部1714におけるフィルタ係数の復元は、予測値との差分で算出される。
 生成されたフィルタ係数残差alf_coeff_luma[i][k]はフィルタパラメータ生成部1816に供給される。
 フィルタ係数格納部1815には、後述するフィルタ係数導出部1823から供給されるフィルタ係数群AlfRegionFilterCoeff[i][k]とフィルタ形状alf_filter_mode[i]が格納される。
 フィルタパラメータ生成部1816は、シンタックスalf_filter_mode[i]とalf_region_adaptation_flag、フィルタインデックスFilterIndexTbl[ridx]、および、alf_coeff_luma[i][k]からフィルタパラメータFP#3を生成する。フィルタパラメータ生成部1816は、i=0からAlfNumFilters-1までのフィルタインデックスで示される各フィルタ係数群(特性値分類領域)に対するフィルタ形状alf_filter_mode[i]を符号化することによって行われる。生成されたフィルタパラメータFP#3は、可変長符号符号化部22に供給される。
 一方で、適応フィルタ部182は、領域インデックス算出部1722、フィルタ係数導出部1823、及びフィルタ部1524を備えている。領域インデックス算出部1722、フィルタ部1524については、既に述べたため、ここでは説明を省略する。
 フィルタ係数導出部1823は、対象特性値分類領域におけるフィルタ済復号画像P_FLと符号化対象画像との誤差がより小さくなるようなフィルタ係数RegionFilterLuma[i][j]を導出する。導出されたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部1524に供給されると共に、フィルタ係数格納部1815に格納される。
 フィルタ係数導出部1823によるフィルタ係数群RegionFilterLuma[i][k]の導出処理は、実施形態1におけるフィルタ係数導出部1623と同様であるので、ここでは説明を省略する。
 以上の構成によって、各部分領域に適用されるフィルタ係数群に応じてフィルタ形状を変更することができる。領域の特性として、主要なエッジ(特定方向への強いエッジもしくは特定方向への多くのエッジ)が存在する場合には、特に適応フィルタの効果が大きい。領域の特性として斜めエッジである場合には、斜め形状のフィルタ形状が有効であり、領域の特性として水平エッジ及び垂直エッジである場合には、水平垂直形状のフィルタ形状が有効である、というように、画像の特性に応じて適したフィルタ形状が異なる。そのため、領域毎に適したフィルタ形状を用いることができる本実施形態の構成では、高い効果の適応フィルタを適用することができる。
 〔実施形態3〕
 以下では、本発明の第3の実施形態について、特に図9、図10、図16、図20、図27、図28を参照して説明する。なお、以下では、実施形態1、実施形態2において既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。第3の実施形態では、領域適応モードに応じてフィルタ形状を設定することが特徴である。
 (符号化データ#5)
 本実施形態に係る動画像符号化装置6及び動画像復号装置5の詳細な説明に先立って、動画像符号化装置6によって生成され、動画像復号装置5によって復号される符号化データ#5のデータ構造について説明を行う。
 符号化データ#5のデータ構造は、実施形態1に係る符号化データ#1のデータ構造と略同じであるが、フィルタパラメータFPの構成が異なる。
 <フィルタパラメータFP#5>
 図20は、本実施形態に係るフィルタパラメータFPのシンタックステーブルの一例である。図に示すように、フィルタパラメータFP#5には、adaptive_loop_filter_flag、alf_region_adaptation_flag、alf_num_filters_minus1、alf_region_idx[]、alf_pred_method、alf_min_kstart_minus1、alf_golomb_index_bit[i]、alf_coeff_luma[i][j]が含まれている。実施形態1、2とは異なり、フィルタ形状モードalf_filter_modeを含まない。
 adaptive_loop_filter_flagは、適応フィルタ190による適応的フィルタ処理のオンオフを指定するフラグである。
 alf_num_filters_minus1は本実施形態に係る適応フィルタで用いるフィルタ数AlfNumFiltersを示すシンタックスであり、AlfNumFilters = alf_num_filters_minus1 + 1により求めることができる。alf_region_adaptation_flagは、領域適応モードを示すシンタックスである。本実施形態では、alf_region_adaptation_flag=0、1、2は各々、RAモード、BA2モード、BA1モードに対応する。alf_region_idx[i] (1≦i<AlfNumRegions)は、各部分領域に対するフィルタインデックスを指定するシンタックスである。
 (動画像復号装置5)
 本実施形態に係る動画像復号装置5は、実施形態1に係る動画像復号装置1の備える適応フィルタ150に代えて、適応フィルタ190を備えている。本実施形態に係る動画像復号装置のその他の構成は、実施形態1に係る動画像復号装置1の構成と同様であるので、説明を省略する。
 (適応フィルタ190)
 図27は、適応フィルタ190のブロック図である。適応フィルタ190は、適応フィルタ情報復号部191、適応フィルタ192を備えている。適応フィルタ情報復号部191は、領域構造復号部1512、領域適応モード・フィルタ形状復号部1913、フィルタ係数復号部1514、フィルタ係数格納部1515を備えており、適応フィルタ部192は、領域インデックス算出部1722、フィルタ係数割り付け部1523、フィルタ部1524を備えている。
 領域構造復号部1512、フィルタ係数復号部1514、フィルタ係数格納部1515フィルタ係数割り付け部1523、フィルタ部1524は既に述べたため、説明を省略する。
 領域インデックス算出部1722は、図16を用いて既に述べたように、領域適応モードalf_region_adaptation_flagに応じて、特徴量モードalf_feature_modeを算出する。
 領域適応モード・フィルタ形状復号部1913は、特性値算出方法とフィルタ形状が対応するように、フィルタ形状を復号する手段であり、シンタックスalf_region_adaptation_flagを復号する。復号されたシンタックスalf_region_adaptation_flagは、領域インデックス算出部1522に供給される。領域適応モード・フィルタ形状復号部1913はまた、領域適応モードalf_region_adaptation_flagを用いて、次に説明するようにフィルタ形状を選択する。
 図9は、本実施形態の領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeの組み合わせを示す図である。本実施形態では、第1の実施形態と同様、領域適応モードalf_region_adaptation_flagが特徴空間分割の場合(BA2モード及びBA1モード)では、フィルタ形状の方向性と、特性値算出方法の方向性が一致するように、フィルタ形状を選択する。ここでは、領域適応モードが斜め方向の場合には斜め形状、領域適応モードが水平垂直方向の場合には水平垂直形状を対応させる。具体的には、図9(a)、図9(b)に示すように領域適応モードが斜め方向の特性値算出方法であるBA2モードの場合には斜め形状のフィルタ形状である星、領域適応モードが水平垂直方向の特性値算出方法であるBA1モードの場合には水平垂直形状のフィルタ形状であるクロスとなるように、フィルタ形状を割り当てる。ここでは、領域適応モードがRAモードの場合には、フィルタ形状には水平垂直形状のクロスを用いる。
 実施形態1では、領域インデックス算出部1522において、フィルタ形状から特性値算出方法を選択し、実施形態3では、適応モード・フィルタ形状復号部1913においてフィルタ形状から特性値算出方法を選択しているが、手段の構成および配置はこれに限らない。すなわち、実施形態1では、フィルタ形状から特性値算出方法を選択する手段(特徴量モード算出部1526)を、領域インデックス算出部1522の外部、例えば、フィルタ形状復号部1511や、領域適応モード復号部1513に配置しても良い。同様に、実施形態3においても、フィルタ形状から特性値算出方法を選択する手段を、適応モード・フィルタ形状復号部1913の外部、例えば、領域インデックス算出部1722に配置しても良い。
 図10は、本実施形態の領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeの組み合わせを示す別の例である。別の例では、領域適応モードとして1つの座標空間分割と1つの特徴空間分割を用いる。図10(a)、図10(b)に示すように、領域適応モードが座標空間分割であるRAモードである場合には、水平垂直形状のフィルタ形状であるクロス、領域適応モードが特徴空間分割であるBAモードである場合には、斜め形状のフィルタ形状である星を用いる。この場合も、フィルタ形状の方向性と、特性値算出方法の方向性が一致すると好適である。この図では、領域適応モードが特徴空間分割であるである場合には、斜め方向の特性値算出方法であるBA2モードを用いるので斜め形状のフィルタ形状である星を割り当てている。また、2つの領域適応モードを用いる場合には、各々の領域適応モードに対応するフィルタ形状は異なるものとすることが好適である。なお、図10とは逆に、領域適応モードが座標空間分割であるRAモードである場合に斜め形状のフィルタ形状、領域適応モードが特徴空間分割であるBAモードである場合には、水平垂直形状のフィルタ形状を用いることも可能である。
 (動画像符号化装置6)
 以下では、符号化対象画像を符号化することによって符号化データ#5を生成する動画像符号化装置6について、図28を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置6は、実施形態1に係る動画像符号化装置2の備える適応フィルタ160に代えて、適応フィルタ200を備えている。本実施形態に係る動画像復号装置6のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 適応フィルタ200は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ200は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFP#5として可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFP#5を符号化データ#5の一部として符号化する。
 図28は、適応フィルタ200の構成を示すブロック図である。図28に示すように、適応フィルタ200は、適応フィルタ情報設定部201、および、適応フィルタ部202を備えている。
 適応フィルタ情報設定部201は、領域構造設定部1612、領域適応モード・フィルタ形状設定部2013、フィルタ係数残差生成部1614、フィルタ係数格納部1615、及び、フィルタパラメータ生成部2016を備えている。
 領域構造設定部1612は、フィルタインデックステーブルFilterIndexTblを設定し、フィルタパラメータ生成部2016に出力される。
 領域適応モード・フィルタ形状設定部2013は、シンタックスalf_region_adaptation_flag とフィルタ形状alf_filter_modeを設定する。設定されたシンタックスalf_region_adaptation_flagは、適応フィルタ部2022に供給され、alf_region_adaptation_flagとalf_filter_modeはフィルタパラメータ生成部2016に出力される。
 なお、FilterIndexTbl、及び、alf_region_adaptation_flag、は、符号化効率がより向上するように設定される。
 フィルタ係数残差生成部1614は、シンタックスalf_coeff_luma[i][k]を生成する。
 生成されたフィルタ係数残差alf_coeff_luma[i][k]はフィルタパラメータ生成部2016に供給される。
 フィルタパラメータ生成部2016は、シンタックスalf_region_adaptation_flag、フィルタインデックスFilterIndexTbl[ridx]、および、alf_coeff_luma[i][k]からフィルタパラメータFP#5を生成する。
生成されたフィルタパラメータFP#5は、可変長符号符号化部22に供給される。。
 以上の構成によって、領域適応モードに応じてフィルタ形状を変更することができる。領域適応モードで定まる特性値算出方法に基づいて適したフィルタ形状を選択し、選択したフィルタ形状のフィルタ係数群を、部分領域に割り当て、割り当てた部分領域において選択されたフィルタ形状のフィルタ係数群を用いてフィルタ処理をすることによって、すなわち、水平垂直方向の方向性を有する特性値算出方法(BA1モード)を用いる場合には、水平垂直形状のフィルタ形状(本実施形態ではクロス)を用い、斜め方向の方向性を有する特性値算出方法(BA2モード)を用いる場合には、斜め形状(本実施形態では星)フィルタ形状を用いるように、特徴空間分割に用いる特性算出方法の方向性とフィルタ係数群のフィルタ形状の方向性を一致させることによって、領域のエッジ方向や勾配方向などの方向性に適したフィルタ処理を行うことができる。
 また、領域適応モード各々に対して異なるフィルタ形状を選択可能な場合に比べ簡単な処理で高い適応フィルタの効果を得ることができる。領域適応モード各々に対して異なるフィルタ形状を選択可能な場合には、領域適応モードが3種類、フィルタ形状が2種類である場合、組み合わせの自由度は3×2=6種類となる。この、符号化装置では6種類のパラメータの各々に対して適応フィルタの効果を推定しフィルタ係数群を導出する必要が有り処理量が大きい。本実施形態のように領域適応モードに対して1種類のフィルタ形状に制限する場合には、3種類のパラメータとなるため、フィルタ係数群を導出する演算量を約半分に低減することができる。すなわち、本実施形態では、特徴空間分割に用いる特性値算出方法の方向性と、フィルタ形状の方向性を一致させることにより、複雑度の低減を実現できる。また、特性値算出方法が座標空間分割である場合に1つのフィルタ形状を割り当てることによって複雑度の低減を実現できる。
 <実施形態3の変形例>
 以下では、実施形態3の変形例について、図11、図21、図29、図30を参照して説明する。なお、以下では、実施形態1~実施形態3において既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。第3の実施形態の変形例では、領域適応モードに応じてフィルタ形状を設定すると共に、領域特性モードに応じてフィルタ形状を割り当てる実施形態1の要素と、フィルタ係数群単位でフィルタ形状を復号する実施形態2の要素を取り入れている点が特徴である。
 (符号化データ#7)
 本実施形態に係る動画像符号化装置8及び動画像復号装置7の詳細な説明に先立って、動画像符号化装置8によって生成され、動画像復号装置7によって復号される符号化データ#7のデータ構造について説明を行う。
 符号化データ#7のデータ構造は、実施形態1に係る符号化データ#1のデータ構造と略同じであるが、フィルタパラメータFPの構成が異なる。
 <フィルタパラメータFP#7>
 図21は、本実施形態に係るフィルタパラメータFP#7のシンタックステーブルの一例である。図に示すように、フィルタパラメータFP#7には、adaptive_loop_filter_flag、alf_region_adaptation_flag、alf_filter_mode[]、alf_num_filters_minus1、alf_region_idx[]、alf_pred_method、alf_min_kstart_minus1、alf_golomb_index_bit[i]、alf_coeff_luma[i][j]が含まれている。
 adaptive_loop_filter_flagは、適応フィルタ210による適応的フィルタ処理のオンオフを指定するフラグである。
 alf_num_filters_minus1は本実施形態に係る適応フィルタで用いるフィルタ数AlfNumFiltersを示すシンタックスであり、AlfNumFilters = alf_num_filters_minus1 + 1により求めることができる。alf_region_adaptation_flagは、領域適応モードを示すシンタックスである。本実施形態では、alf_region_adaptation_flag=0、1、2は各々、RAモード、BA2モード、BA1モードに対応する。alf_region_idx[i] (1≦i<AlfNumRegions)は、各部分領域に対するフィルタインデックスを指定するシンタックスである。
 (動画像復号装置7)
 本実施形態に係る動画像復号装置7は、実施形態1に係る動画像復号装置1の備える適応フィルタ150に代えて、適応フィルタ210を備えている。本実施形態に係る動画像復号装置のその他の構成は、実施形態1に係る動画像復号装置1の構成と同様であるので、説明を省略する。
 (適応フィルタ210)
 図29は、適応フィルタ210のブロック図である。適応フィルタ210は、適応フィルタ情報復号部211、適応フィルタ212を備えている。適応フィルタ情報復号部211は、領域構造復号部1712、領域適応モード・フィルタ形状復号部2113、フィルタ係数復号部1714、フィルタ係数格納部1715を備えており、適応フィルタ部212は、領域インデックス算出部1522、フィルタ係数割り付け部1723、フィルタ部1524を備えている。
 領域構造復号部1712、フィルタ係数復号部1714、フィルタ係数格納部1715、フィルタ係数割り付け部1723、フィルタ部1524は既に述べたため、説明を省略する。
 領域インデックス算出部1522は、図15を用いて既に述べたように、領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeに応じて、特徴量モードalf_feature_modeを算出する。
 領域適応モード・フィルタ形状復号部2113は、シンタックスalf_region_adaptation_flagを復号する。復号されたシンタックスalf_region_adaptation_flagは、領域インデックス算出部1522に供給される。
 図11は、本実施形態の変形例の領域適応モードalf_region_adaptation_flagとフィルタ形状alf_filter_modeの組み合わせを示す図である。本変形例では3つの領域適応モード(RAモード、BA1モード、BA2モード)を用い、領域適応モードに合わせてフィルタ形状の選択を行う。
 領域適応モード・フィルタ形状復号部2113は、領域適応モードが座標空間分割であるRAモードである場合には、実施形態2と同様に、フィルタ係数群単位でフィルタ形状を復号する。逆に、領域適応モードが特徴空間分割であるBA1モード及びBA2モードである場合には、実施形態3と同様に、領域適応モードに応じてフィルタ形状を割り当てる。このとき、実施形態1と同様にフィルタ形状に合わせて、特徴量算出モードの選択が行われる。本実施形態では領域適応モードに応じて、フィルタ形状を割り当てる。
 領域適応モード・フィルタ形状復号部2113で得られた領域適応モードalf_region_adaptation_flag、及び、フィルタ形状alf_filter_modeは、領域インデックス算出部1522に供給される。フィルタ形状alf_filter_modeは、さらに、フィルタ係数復号部1714に供給される。
 (動画像符号化装置8)
 以下では、符号化対象画像を符号化することによって符号化データ#7を生成する動画像符号化装置8について、図30を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置8は、実施形態1に係る動画像符号化装置2の備える適応フィルタ160に代えて、適応フィルタ220を備えている。本実施形態に係る動画像符号化装置8のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 適応フィルタ220は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ220は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFP#7として可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFP#7を符号化データ#7の一部として符号化する。
 図30は、適応フィルタ220の構成を示すブロック図である。図30に示すように、適応フィルタ220は、適応フィルタ情報設定部221、および、適応フィルタ部222を備えている。
 適応フィルタ情報設定部221は、領域構造設定部1812、領域適応モード・フィルタ形状設定部2213、フィルタ係数残差生成部1814、フィルタ係数格納部1815、及び、フィルタパラメータ生成部2216を備えている。
 領域構造設定部1812は、フィルタインデックステーブルFilterIndexTblを設定し、フィルタパラメータ生成部2216に出力される。
 領域適応モード・フィルタ形状設定部2213は、シンタックスalf_region_adaptation_flag とフィルタ形状alf_filter_mode[i]を設定する。設定されたシンタックスalf_region_adaptation_flagとalf_filter_mode[i]は、適応フィルタ部222に供給され、さらにフィルタパラメータ生成部2216に出力される。
 なお、filter_mode[i]、FilterIndexTbl、及び、alf_region_adaptation_flag、は、符号化効率がより向上するように設定される。
 フィルタ係数残差生成部1814は、シンタックスalf_coeff_luma[i][k]を生成する。
 生成されたフィルタ係数残差alf_coeff_luma[i][k]はフィルタパラメータ生成部2216に供給される。
 フィルタパラメータ生成部2216は、シンタックスalf_region_adaptation_flag、フィルタインデックスFilterIndexTbl[ridx]、および、alf_coeff_luma[i][k]からフィルタパラメータFP#7を生成する。ここで、alf_region_adaptation_flagが座標空間分割であるRAモードの場合には、i=0からAlfNumFilters-1までのフィルタインデックスで示される各フィルタ係数群(特性値分類領域)に対するフィルタ形状alf_filter_mode[i]を符号化する。alf_region_adaptation_flagが特徴空間分割であるBA1モード、BA2モードの場合にはalf_filter_modeの符号化は行わない。生成されたフィルタパラメータFP#7は、可変長符号符号化部22に供給される。
 一方で、適応フィルタ部222は、領域インデックス算出部1522、フィルタ係数導出部1823、及びフィルタ部1524を備えている。フィルタ係数導出部1823、フィルタ部1524については、既に述べたため、ここでは説明を省略する。
 領域インデックス算出部1522は、図15を用いて既に述べたように、領域適応モードalf_region_adaptation_flag、フィルタ形状alf_filter_modeに応じて、特徴量モードalf_feature_modeを算出する。
 以上の構成によって、領域適応モードにより定まる特性値算出方法に応じてフィルタ形状を変更することができる。領域適応モード(特性値算出方法)が座標空間分割であるRAモードである場合には、部分領域単位でフィルタ形状を変更するため、領域の画面上の位置、座標に応じて異なる部分領域の特性に応じたフィルタ形状を用いることが可能であり、高い適応フィルタの効果を得ることができる。すなわち、特性値として方向性を有しない座標を用いる(座標空間分割)場合にも、領域の方向性などの特性にあわせたフィルタ処理を行うことができる。また、領域適応モードの特性値算出方法が特徴空間分割BAモード(BA1モード及びBA2モード)である場合には、部分領域の特性は、単位領域の画素値から対応する特性値算出方法(BA計算モード)に基づいて得られる特性値により算出され、その特性に適したフィルタ形状が存在する。そのため、特徴空間分割に用いる特性算出方法の方向性とフィルタ係数群のフィルタ形状の方向性を一致させることによって、領域のエッジ方向や勾配方向などの方向性に適したフィルタ処理を行うことができる。以上の構成では、特性値算出方法が座標空間分割であるか特徴空間分割であるかによらず高い効果の適応フィルタが適応可能である。なお、制約なく特性値算出方法とフィルタ形状を選択可能とする場合に比べると、特徴空間分割に用いる特性値算出方法の方向性と、フィルタ形状の方向性を一致させることにより、複雑度の低減を実現している。
 (他の動画像符号化/復号システムへの適用例)
 上述した動画像符号化装置2及び動画像復号装置1は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
 図33に基づいて、上述した動画像符号化装置2および動画像復号装置1を、動画像の送信および受信に利用できることを説明する。図33の(a)は、動画像符号化装置2を搭載した送信装置PROD_Aの構成を示したブロック図である。
 図33の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3とを備えている。上述した動画像符号化装置2は、この符号化部PROD_A1として利用される。
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図33の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。
 図33の(b)は、動画像復号装置1を搭載した受信装置PROD_Bの構成を示したブロック図である。図33の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3とを備えている。上述した動画像復号装置1は、この復号部PROD_B3として利用される。
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図33の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。
 また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線又は有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。
 なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。
 図34に基づいて、上述した動画像符号化装置2および動画像復号装置1を、動画像の記録および再生に利用できることを説明する。図34の(a)は、上述した動画像符号化装置2を搭載した記録装置PROD_Cの構成を示したブロック図である。
 図34の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_C1として利用される。
 なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)等のように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(Universal Serial Bus)フラッシュメモリ等のように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)等のように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部C6を更に備えていてもよい。図34の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。
 このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4又は受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5又は画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3又は受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。
 図34の(b)は、上述した動画像復号装置1を搭載した再生装置PROD_Dの構成を示したブロックである。図34の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置1は、この復号部PROD_D2として利用される。
 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図34の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。
 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。
 このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3又は送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4又は送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型又はタブレット型PC(この場合、ディスプレイPROD_D3又は送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3又は送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。
 (ハードウェア的実現およびソフトウェア的実現について)
 最後に、動画像復号装置1、動画像符号化装置2の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
 後者の場合、上記各装置は、各機能を実現する制御プログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(Random Access Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU(Micro Processing Unit))が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MO(Magneto-Optical)/MD(Mini Disc)/DVD(Digital Versatile Disk)/CD-R(CD Recordable)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-only Memory)/EEPROM(登録商標)(Electrically Erasable and Programmable Read-only Memory)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna Television)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、Bluetooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
 <付記事項>
 以上のように、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素の各画素値と、該単位領域について割り付けられたフィルタ係数とを用いて算出することによりフィルタ処理を行うフィルタ手段を備えた画像フィルタ装置であって、上記単位領域の属性から1つ以上の特性値算出方法によって得られる特性値を用いて、上記単位領域を、特性値領域上の部分領域に分類する領域インデックス算出手段を備えており、フィルタ形状に基づいて特性値算出方法を選択する手段、及び、特性値算出方法に基づいてフィルタ形状を選択する手段の少なくとも何れかの手段を更に備えており、特定の特性値算出方法を用いる場合、上記フィルタ手段は、該特性値算出方法に対応する形状のフィルタ形状と、上記部分領域に関連付けられたフィルタ係数とを用いてフィルタ処理を行うことを特徴とする。
 上記のように構成された本発明に係る画像フィルタ装置によれば、特性値算出方法に対応したフィルタ形状を用いることができる。特性値算出方法に応じて、領域分類が変化し、各領域に適したフィルタ形状が変化する。よって、特性値算出方法に適したフィルタ形状を用いることにより、高い効果の適応フィルタを適用することができる。
 上記の構成において、上記フィルタ手段が用いるフィルタ形状は1つ以上の方向性を有し、上記領域インデックス算出手段は少なくとも1つの方向性を有する特性値算出方法を備え、所定の方向性を有する特性値算出方法を用いる場合には、上記フィルタ手段は、該方向性に対応する方向性を有するフィルタ形状を用いてフィルタ処理を行うことが好ましい。
 また、上記の構成において、フィルタ形状と領域インデックス算出方法の方向性は、斜め方向または水平垂直方向であり、斜め方向の領域インデックス算出方法を用いる場合には、上記フィルタ手段は、斜め方向のフィルタ形状を適用し、水平垂直方向の領域インデックス算出方法を用いる場合には、上記フィルタ手段は、水平垂直方向のフィルタ形状を適用することが好ましい。
 また、上記の構成において、フィルタ形状を復号するフィルタ形状復号手段と、領域適応モードを復号する領域適応モード復号手段と、上記フィルタ形状復号手段が復号したフィルタ形状と、上記領域適応モードが復号した領域適応モードとを用いて、領域インデックス算出方法を選択する特徴量モード算出手段をさらに備えることが好ましい。
 また、上記の構成において、上記復号した領域適応モードが、上記単位領域の画素から算出するモードである場合において、復号したフィルタ形状の方向性に応じて、該方向性に対応する方向性を有する領域インデックス算出方法を用いることが好ましい。
 また、上記の構成において、復号したフィルタ形状が斜め形状である場合には、斜め方向に対応する領域インデックス算出方法を用い、復号したフィルタ形状が水平垂直形状である場合には、水平垂直方向に対応する領域インデックス算出方法を用いることが好ましい。
 また、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素と、該単位領域について割り付けられたフィルタ係数を用いて算出することによりフィルタ処理を行うフィルタ手段と、各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段とフィルタインデックス単位で、フィルタ形状を復号するフィルタ形状復号手段を備え、該フィルタ手段は、復号されたフィルタ形状を用いてフィルタ処理を行うことを特徴とする。
 以上の構成によって、各部分領域に適用されるフィルタ係数群に応じてフィルタ形状を変更することができる。領域の特性として、主要なエッジ(特定方向への強いエッジもしくは特定方向への多くのエッジ)が存在する場合には、特に適応フィルタの効果が大きい。領域の特性として斜めエッジである場合には、斜め形状のフィルタ形状が有効であり、領域の特性として水平エッジ及び垂直エッジである場合には、水平垂直形状のフィルタ形状が有効である、というように、画像の特性に応じて適したフィルタ形状が異なる。そのため、領域毎に適したフィルタ形状を用いることができるため、高い効果の適応フィルタを適用することができる。
 また、上記画像フィルタ装置は、各フィルタインデックスに対応するフィルタ係数群の各フィルタ係数を、符号化データを復号することにより得られたフィルタ係数残差に予測値を加算することによって復元するフィルタ係数復号手段を備え、同じフィルタ形状を有する既に復号されたフィルタ係数群のフィルタ係数を上記予測値として用いることが好ましい。
 また、上記画像フィルタ装置は、領域適応モードを復号する領域適応モード復号手段を備え、上記フィルタ手段は、領域適応モードに対応した、フィルタ係数を用いることが好ましい。
 また、上記画像フィルタ装置において、領域適応モードは、少なくとも斜め方向もしくは水平垂直方向の領域インデックス算出方法に対応し、領域適応モードが斜め方向の領域インデックス算出方法を対応する場合には、上記フィルタ手段は、斜め方向のフィルタ形状を適用し、水平垂直方向の領域インデックス算出方法に対応する場合には、上記フィルタ手段は、水平垂直方向のフィルタ形状を適用することが好ましい。
 また、上記画像フィルタ装置において、領域適応モードは、少なくとも、領域の座標を用いて領域分類を行うモード(RAモード)と、領域の画素を用いて領域分類を行うモード(BAモード)を備え、該領域適応モードが領域の座標を用いるモードにおいては、フィルタインデックス単位で、フィルタ形状を復号し、該領域適応モードが領域の画素を用いるモードにおいては、フィルタインデックスのグループ単位で、フィルタ形状を復号することが好ましい。
 また、本発明に係る復号装置は、符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、上記画像フィルタ装置と、各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、ことを特徴とする。
 また、本発明に係る符号化装置は、符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、上記画像フィルタ装置と、各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、ことを特徴とする。
 また、本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素と、該単位領域について割り付けられたフィルタ係数を用いて算出することによりフィルタ処理を行うフィルタ手段と、各単位領域を分類するための分類パラメータである領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段を備え、上記フィルタ手段は、2つ以上のフィルタ形状から1つのフィルタ形状を用いてフィルタ処理を行うフィルタ手段であり、上記領域インデックス算出手段は、2つ以上の領域インデックス算出方法を備え、特定の領域インデックス算出方法を用いる場合には、該領域インデックス算出方法に対応する特定のフィルタ形状を用いてフィルタ処理を行う画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタ形状と、上記フィルタ係数と、を含んでいることを特徴とする。
 本発明は、画像のフィルタリングを行う画像フィルタ装置に好適に適用することができる。また、本発明は、符号化装置、および、復号装置に好適に適用することができる。また、本発明は、符号化データのデータ構造に好適に適用することができる。
1、3、5、7        動画像復号装置(復号装置)
16             インター予測画像生成部(予測画像生成手段)
17             イントラ予測画像生成部(予測画像生成手段)
2、4、6、8        動画像符号化装置(符号化装置)
25             イントラ予測画像生成部(予測画像生成手段)
26             インター予測画像生成部(予測画像生成手段)
150、160        適応フィルタ(画像フィルタ装置)
151、171、191、211  適応フィルタ情報復号部
1511、171       フィルタ形状復号部
1512、1712      領域構造復号部(領域構造復号手段)
1513、1713      領域適応モード復号部(領域適応モード復号手段)
1913、2113      領域適応モード・フィルタ形状復号部
1514、1714      フィルタ係数復号部(領域分類手段)
1515、1715      フィルタ係数格納部
152、172、192、212        適応フィルタ部
1522、1722      領域インデックス算出部(領域インデックス算出手段)
1523、1723      フィルタ係数割り付け部(フィルタ係数割り付け手段)
1524           フィルタ部(フィルタ手段)
1525           領域インデックス選択部
1526、1726      特徴量モード算出部
1550           RAモード領域インデックス算出部
1551           RA第1特性値算出部(特性値算出手段)
1552           RA第2特性値算出部(特性値算出手段)
1553           RA領域インデックス算出部
1560           BA1モード領域インデックス算出部
1561           BA1第1特性値算出部(特性値算出手段)
1562           BA1第2特性値算出部(特性値算出手段)
1563           BA1領域インデックス算出部
1570           BA2モード領域インデックス算出部
1571           BA2第1特性値算出部(特性値算出手段)
1572           BA2第2特性値算出部(特性値算出手段)
1573           BA2領域インデックス算出部
161、181,201、221  適応フィルタ情報設定部
1611、1811      フィルタ形状設定部
1612、1812      領域構造設定部
1613、1813      領域適応モード設定部
2013、2213      領域適応モード・フィルタ形状設定部
1614、1814      フィルタ係数残差生成部
1615、1815      フィルタ係数格納部
1616、1816,2016、2216 フィルタパラメータ設定部
162、182、202、222        適応フィルタ部
1623、1823      フィルタ係数導出部

Claims (15)

  1.  複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素の各画素値と、該単位領域について割り付けられたフィルタ係数とを用いて算出することによりフィルタ処理を行うフィルタ手段を備えた画像フィルタ装置であって、
     上記単位領域の属性から1つ以上の特性値算出方法によって得られる特性値を用いて、上記単位領域を、特性値領域上の部分領域に分類する領域インデックス算出手段を備えており、
     フィルタ形状に基づいて特性値算出方法を選択する手段、及び、特性値算出方法に基づいてフィルタ形状を選択する手段の少なくとも何れかの手段を更に備えており、
     特定の特性値算出方法を用いる場合、上記フィルタ手段は、該特性値算出方法に対応する形状のフィルタ形状と、上記部分領域に関連付けられたフィルタ係数とを用いてフィルタ処理を行うことを特徴とする画像フィルタ装置。
  2.  上記フィルタ手段が用いるフィルタ形状は1つ以上の方向性を有し、上記領域インデックス算出手段は少なくとも1つの方向性を有する特性値算出方法を備え、所定の方向性を有する特性値算出方法を用いる場合には、上記フィルタ手段は、該方向性に対応する方向性を有するフィルタ形状を用いてフィルタ処理を行うことを特徴とする請求項1に記載の画像フィルタ装置。
  3.  フィルタ形状と領域インデックス算出方法の方向性は、斜め方向または水平垂直方向であり、斜め方向の領域インデックス算出方法を用いる場合には、上記フィルタ手段は、斜め方向のフィルタ形状を適用し、水平垂直方向の領域インデックス算出方法を用いる場合には、上記フィルタ手段は、水平垂直方向のフィルタ形状を適用することを特徴とする請求項2に記載の画像フィルタ装置。
  4.  フィルタ形状を復号するフィルタ形状復号手段と、
     領域適応モードを復号する領域適応モード復号手段と、
     上記フィルタ形状復号手段が復号したフィルタ形状と、上記領域適応モードが復号した領域適応モードとを用いて、領域インデックス算出方法を選択する特徴量モード算出手段をさらに備えることを特徴とする請求項1から3の何れか1項に記載の画像フィルタ装置。
  5.  上記復号した領域適応モードが、上記単位領域の画素から算出するモードである場合において、復号したフィルタ形状の方向性に応じて、該方向性に対応する方向性を有する領域インデックス算出方法を用いることを特徴とする請求項4に記載の画像フィルタ装置。
  6.  復号したフィルタ形状が斜め形状である場合には、斜め方向に対応する領域インデックス算出方法を用い、復号したフィルタ形状が水平垂直形状である場合には、水平垂直方向に対応する領域インデックス算出方法を用いることを特徴とする請求項5に記載の画像フィルタ装置。
  7.  複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素と、該単位領域について割り付けられたフィルタ係数を用いて算出することによりフィルタ処理を行うフィルタ手段と、
     各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、
     各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、
     処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段と
     フィルタインデックス単位で、フィルタ形状を復号するフィルタ形状復号手段を備え、
     該フィルタ手段は、復号されたフィルタ形状を用いてフィルタ処理を行うことを特徴とする画像フィルタ装置。
  8.  各フィルタインデックスに対応するフィルタ係数群の各フィルタ係数を、符号化データを復号することにより得られたフィルタ係数残差に予測値を加算することによって復元するフィルタ係数復号手段を備え、
     同じフィルタ形状を有する既に復号されたフィルタ係数群のフィルタ係数を上記予測値として用いることを特徴とする請求項7に記載の画像フィルタ装置。
  9.  領域適応モードを復号する領域適応モード復号手段を備え、上記フィルタ手段は、領域適応モードに対応した、フィルタ係数を用いることを特徴とする請求項8に記載の画像フィルタ装置。
  10.  領域適応モードは、少なくとも斜め方向もしくは水平垂直方向の領域インデックス算出方法に対応し、領域適応モードが斜め方向の領域インデックス算出方法を対応する場合には、上記フィルタ手段は、斜め方向のフィルタ形状を適用し、水平垂直方向の領域インデックス算出方法に対応する場合には、上記フィルタ手段は、水平垂直方向のフィルタ形状を適用することを特徴とする請求項9に記載の画像フィルタ装置。
  11.  領域適応モードは、少なくとも、領域の座標を用いて領域分類を行うモード(RAモード)と、領域の画素を用いて領域分類を行うモード(BAモード)を備え、
     該領域適応モードが領域の座標を用いるモードにおいては、フィルタインデックス単位で、フィルタ形状を復号し、該領域適応モードが領域の画素を用いるモードにおいては、フィルタインデックスのグループ単位で、フィルタ形状を復号することを特徴とする請求項9に記載の画像フィルタ装置。
  12.  上記フィルタ形状は、フィルタ対象画素を中心とした矩形領域に含まれる画素と、当該フィルタ対象画素の垂直方向及び水平方向にそれぞれ位置する画素とから構成される形状であることを特徴とする請求項1から9の何れか1項に記載の画像フィルタ装置。
  13.  符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
     請求項1から12の何れか1項に記載の画像フィルタ装置と、
     各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、
     上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
    ことを特徴とする復号装置。
  14.  符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
     請求項1から12の何れか1項に記載の画像フィルタ装置と、
     各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
    を備え、
     上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
    ことを特徴とする符号化装置。
  15.  複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、フィルタ形状により定まる参照画素と、該単位領域について割り付けられたフィルタ係数を用いて算出することによりフィルタ処理を行うフィルタ手段と、各単位領域を分類するための分類パラメータである領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段を備え、上記フィルタ手段は、2つ以上のフィルタ形状から1つのフィルタ形状を用いてフィルタ処理を行うフィルタ手段であり、上記領域インデックス算出手段は、2つ以上の領域インデックス算出方法を備え、特定の領域インデックス算出方法を用いる場合には、該領域インデックス算出方法に対応する特定のフィルタ形状を用いてフィルタ処理を行う画像フィルタ装置によって参照される符号化データのデータ構造であって、
     上記フィルタ形状と、
     上記フィルタ係数と
    を含んでいることを特徴とする符号化データのデータ構造。
PCT/JP2012/069255 2011-07-29 2012-07-27 画像フィルタ装置、復号装置、符号化装置、および、データ構造 WO2013018737A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011166994A JP2014197722A (ja) 2011-07-29 2011-07-29 画像フィルタ装置、復号装置、符号化装置、および、データ構造
JP2011-166994 2011-07-29

Publications (1)

Publication Number Publication Date
WO2013018737A1 true WO2013018737A1 (ja) 2013-02-07

Family

ID=47629260

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/069255 WO2013018737A1 (ja) 2011-07-29 2012-07-27 画像フィルタ装置、復号装置、符号化装置、および、データ構造

Country Status (2)

Country Link
JP (1) JP2014197722A (ja)
WO (1) WO2013018737A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109076219A (zh) * 2016-05-13 2018-12-21 夏普株式会社 图像解码装置以及图像编码装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
EHSAN MAANI ET AL.: "Parametric Adaptive Loop Filter", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11 5TH MEETING, 16 March 2011 (2011-03-16), GENEVA *
WANG (POLIN) LAI ET AL.: "CE8 Subtest 4: ALF using vertical-size 5 filters with up to 9 coefficients", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11 6TH MEETING, 14 July 2011 (2011-07-14), TORINO, ITALY *

Also Published As

Publication number Publication date
JP2014197722A (ja) 2014-10-16

Similar Documents

Publication Publication Date Title
US11627337B2 (en) Image decoding device
JP6957715B2 (ja) 画像フィルタ装置、フィルタ方法および動画像復号装置
US11509898B2 (en) Arithmetic decoding device, image decoding apparatus, arithmetic coding device, and image coding apparatus
US20220094960A1 (en) Video decoding device
JP2013236358A (ja) 画像フィルタ装置、画像復号装置、画像符号化装置、およびデータ構造
WO2013046990A1 (ja) オフセット復号装置、オフセット符号化装置、画像フィルタ装置、および、データ構造
JP2013223050A (ja) フィルタ装置、復号装置、および符号化装置
JP2013141094A (ja) 画像復号装置、画像符号化装置、画像フィルタ装置、および符号化データのデータ構造
WO2012137890A1 (ja) 画像フィルタ装置、復号装置、符号化装置、および、データ構造
JP2013187868A (ja) 画像復号装置、画像符号化装置、およびデータ構造
WO2012090962A1 (ja) 画像復号装置、画像符号化装置、および符号化データのデータ構造、ならびに、算術復号装置、算術符号化装置
WO2013018737A1 (ja) 画像フィルタ装置、復号装置、符号化装置、および、データ構造
JP2014176039A (ja) 画像復号装置、および画像符号化装置
JP2013223051A (ja) 算術復号装置、画像復号装置、算術符号化装置、および画像符号化装置
WO2012081706A1 (ja) 画像フィルタ装置、フィルタ装置、復号装置、符号化装置、および、データ構造
JP2013251827A (ja) 画像フィルタ装置、画像復号装置、画像符号化装置、およびデータ構造
WO2012043676A1 (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: 12820366

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP