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

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

Info

Publication number
WO2012137890A1
WO2012137890A1 PCT/JP2012/059418 JP2012059418W WO2012137890A1 WO 2012137890 A1 WO2012137890 A1 WO 2012137890A1 JP 2012059418 W JP2012059418 W JP 2012059418W WO 2012137890 A1 WO2012137890 A1 WO 2012137890A1
Authority
WO
WIPO (PCT)
Prior art keywords
characteristic value
alf
image
unit
filter
Prior art date
Application number
PCT/JP2012/059418
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 WO2012137890A1 publication Critical patent/WO2012137890A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • 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/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component

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 is used.
  • As a specific moving picture encoding method for example, H.264 is used. H.264 / MPEG-4.
  • a method used in AVC a method used in KTA software, which is a codec for joint development in VCEG (Video Coding Expert Group), and a method used in TMuC (Test Model Under Conception) software, which is the successor codec And a method employed in HM (HEVC Test Model) 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).
  • each pixel constituting a decoded image is classified into one of a plurality of groups according to the two-dimensional characteristics of the pixel, and the plurality of groups are appropriately integrated ( And an adaptive loop filter (hereinafter also simply referred to as “adaptive filter”) that filters a decoded image using filter coefficients set for each group after merging.
  • an adaptive loop filter hereinafter also simply referred to as “adaptive filter” that filters a decoded image using filter coefficients set for each group after merging.
  • the same document discloses a method of dividing a decoded image into a plurality of regions according to horizontal and vertical coordinates and using a filter coefficient set for each region, and is called an RA mode.
  • Non-Patent Document 2 discloses a method in which a decoded image is divided into a plurality of regions according to the degree of activity and directionality calculated from the region and pixels around the region, and a filter coefficient set for each region is used. Called mode.
  • Non-Patent Document 3 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.
  • Non-Patent Document 4 discloses a method for reducing the amount of calculation required for calculating characteristics by calculating the degree of activity and directionality from pixels obtained by thinning out a decoded image in a unit area.
  • JCT-VC Joint Collaborative Team Video Coding
  • ISO / IEC JTC1 / SC29 / WG11 5th Meeting: Geneva, CH, 03/2011 (released in March 2011)
  • JCT-VC Joint Collaborative Team Video Coding
  • JCT-VC Joint Collaborative Team Video Coding
  • ISO / IEC JTC1 / SC29 / WG11 5th Meeting: Geneva, CH, 03/2011 (released in March 2011)
  • JCT-E603 Joint Collaborative Team Video Coding
  • JCT-VC Joint Collaborative Team Video Coding
  • ISO / IEC JTC1 / SC29 / WG11 5th Meeting: Geneva, CH, 16-23 March, 2011 (March 2011 Release)
  • JCT-F301-v2 Joint Collaborative Team Video Coding
  • Non-Patent Document 1 and Non-Patent Document 2 since the merging method is one-dimensional, the degree of freedom of two-dimensional grouping cannot be fully utilized, and the encoding efficiency is reduced. Is not improved, or the encoding efficiency is not improved as expected. This point will be described more specifically with reference to FIG.
  • FIG. 39 is a diagram schematically showing the methods disclosed in Non-Patent Document 1 and Non-Patent Document 2.
  • the region spanned by the two feature amounts X and Y is divided into a plurality of sub-regions, and each sub-region is indexed in a predetermined order (raster scan order). Is done.
  • a predetermined order raster scan order
  • Non-Patent Document 3 the RA mode of Non-Patent Document 1 and the BA mode of Non-Patent Document 2 are switched and grouping is performed using appropriate characteristic values for each picture in order to improve coding efficiency.
  • merge targets are limited to those adjacent to each other, and thus the two-dimensional grouping freedom cannot be fully utilized.
  • the present invention has been made in view of the above problems, and can improve encoding efficiency by making use of a multidimensional degree of freedom for a feature amount while suppressing an increase in the amount of code and processing amount. It is to realize a possible adaptive filter.
  • an image filter device includes a filter unit that operates on an input image composed of a plurality of unit areas, and image characteristics of the input image in each unit area or in the input image.
  • a characteristic value indicating the position of each unit area
  • a characteristic value calculating means for calculating first and second characteristic values having different derivation methods, and a characteristic value area stretched by the first and second characteristic values
  • Filter coefficient assigning means for assigning a filter coefficient group to each partial area according to the index, Is characterized in that each pixel value of the output image in each unit area is calculated using a filter coefficient group set for the partial area to which the first and second characteristic values calculated for the unit area belong.
  • the number of region classifications can be controlled by the new filter coefficient flag, and the first characteristic value is equal according to the candidate selection index, or The partial region having the same second characteristic value and the same filter coefficient group can be used.
  • the adjacent partial areas in the processing order can be merged, and can be merged on the axis of the first characteristic value and the second characteristic value.
  • the dimensional freedom can be effectively utilized as compared with the conventional technology.
  • the filter coefficient group can be more appropriately assigned to each partial region, so that the encoding efficiency can be improved while suppressing an increase in the code amount and the processing amount.
  • the unit area represents each of a plurality of non-overlapping areas constituting the input image.
  • the unit region is a prediction that is a unit for generating a predicted image, for example. It may be a unit (partition), may be a conversion unit that is a unit of frequency conversion, or may be other than those.
  • the unit area may be composed of one pixel.
  • a decoding device is a decoding device that decodes encoded data and generates a decoded image after filtering, wherein the image filter device generates a predicted image in each unit region.
  • a prediction image generation unit that generates an image by referring to the output image, and the image filter device adds the prediction image generated by the prediction image generation unit and the residual image decoded from the encoded data. The decoded image obtained by doing this is used as an input image, and the decoded image after filtering is generated as an 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 predicted image, and includes the image filter device and each unit region Prediction image generation means for generating the prediction image with reference to an output image generated by the image filter device, the image filter device including the prediction image generated by the prediction image generation means and the residual A decoded image obtained by adding the 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 includes filter means that operates on an input image composed of a plurality of unit areas, and image characteristics of the input image in each unit area or positions of the unit areas in the input image.
  • Characteristic value calculating means for calculating first and second characteristic values having different derivation methods, and a plurality of portions constituting a characteristic value region spanned by the first and second characteristic values For each of the regions, refer to the new filter coefficient flag indicating whether or not to use the new filter coefficient group, and the candidate selection index for selecting the filter coefficient group, and each partial area according to the new filter coefficient flag and the candidate selection index
  • Filter coefficient assigning means for assigning a filter coefficient group to each unit area by the filter means.
  • Encoded data referred to by an image filter device that calculates each pixel value of the output image in the image using a filter coefficient group set for the partial region to which the first and second characteristic values calculated for the unit region belong
  • the data structure includes a residual between the filter coefficient group and its predicted value, and the new filter coefficient flag and the candidate selection index.
  • the image filter device that decodes the encoded data can perform an appropriate filter process that makes use of the two-dimensional degree of freedom of the characteristic value region by referring to the region classification information and the allocation designation information. .
  • the image filter device includes a filter unit that operates on an input image composed of a plurality of unit regions, and the image characteristics of the input image in each unit region or each unit region in the input image.
  • a plurality of characteristic value calculation means for calculating a first characteristic value and a second characteristic value that are different from each other, and a characteristic value region spanned by the first and second characteristic values; For each of the partial regions, a new filter coefficient flag indicating whether or not to use a new filter coefficient group, and a candidate selection index for selecting the filter coefficient group, and according to the new filter coefficient flag and the candidate selection index, Filter coefficient assigning means for assigning a filter coefficient group to the partial area, and the filter means includes each unit area. Output each pixel value of the image, is calculated using the unit regions first and filter coefficient group that is set for the partial area belongs the second characteristic value calculated for, is characterized in that in the.
  • the image filter device configured as described above, it is possible to improve the encoding efficiency while suppressing an increase in the code amount and the processing amount.
  • segmentation of the 2nd step designated by alf_second_split_type 1, (c) is a figure of an image as a 2nd characteristic value.
  • segmentation of the 1st step is according to each value of syntax alf_second_split_flag [i0] and alf_second_split_type It is a figure which shows specifically how it is divided
  • FIG. 1 It is a block diagram which shows the structure of the adaptive filter with which the moving image decoding apparatus which concerns on 1st Embodiment is provided. It is a figure for demonstrating the filter process by the adaptive filter which concerns on 1st Embodiment, Comprising: (a) is the characteristic comprised from the pixel contained in the object unit area
  • (a) is a table
  • (B) is a table showing specific examples of the subdivision points PY1 to PY3 set for each value of the syntax alf_select_split_char
  • (c) is a table indicating the re-set set according to the value of the syntax alf_second_split_val [k].
  • 10 is a table showing specific examples of dividing points PY1 to PY3.
  • FIG. 10 is a diagram for describing encoded data according to the third embodiment, in which (a) shows each syntax included in a filter parameter, and (b) shows a syntax included in alf_coeff_set_luma. (C) shows alf_coeff_copy_luma.
  • alf_coeff_dec_luma It is a figure for demonstrating the coding data which concern on 4th Embodiment, Comprising: alf_coeff_dec_luma is shown. It is a block diagram which shows the structure of the adaptive filter which concerns on 5th Embodiment. It is a block diagram which shows the structure of the adaptive filter which concerns on 5th Embodiment. It is a block diagram which shows the structure of the area
  • FIG. It is a block diagram which shows the structure of the BA mode area
  • FIG. 16 is a diagram expressing the operation of a BA mode area index calculation unit according to a modification of the fifth embodiment in a format similar to the programming language C.
  • FIG. 10 is a diagram for explaining a modification of the fifth embodiment, and (a) to (d) show an example in which the size of a unit area is 4 ⁇ 4 and thinning is performed both horizontally and vertically.
  • (E) show reference parameters for characteristic value calculation.
  • FIG. 10 is a diagram for explaining a modification of the fifth embodiment, and (a) to (b) show other examples in which the size of a unit area is 4 ⁇ 4 and thinning is performed in both horizontal and vertical directions.
  • C) shows reference parameters for calculating characteristic values.
  • FIG. 10 is a diagram for explaining a modification of the fifth embodiment, in which (a) to (b) show examples in which horizontal thinning is performed, and (c) to (d) show vertical thinning. An example is shown, and (e) to (f) show a case where thinning is performed alternately in the horizontal and vertical directions, and (g) shows a reference parameter for calculating the characteristic value. .
  • FIG. 10 is a diagram for explaining a modification of the fifth embodiment, and (a) to (b) show another example of a pixel for calculating an intermediate value for calculating a characteristic value. ) Indicates reference parameters for calculating characteristic values.
  • FIG. 10 is a diagram for explaining a modification of the fifth embodiment, and (a) to (b) show another example of a pixel for calculating an intermediate value for calculating a characteristic value. ) Indicates reference parameters for calculating characteristic values.
  • FIG. 10 is a diagram for explaining a modification of the fifth embodiment, and (a) to (f) show other examples of pixels for calculating an intermediate value for calculating a characteristic value. It is the figure shown about the structure of the transmitter which mounts the moving image encoder which concerns on embodiment, and the receiver which mounts the moving image decoder which concerns on embodiment.
  • (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 carrying the moving image encoder which concerns on embodiment, 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.
  • 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.
  • a characteristic value having a higher priority that is, a characteristic value for which more effective classification can be expected
  • the other characteristic value is a second characteristic value. Is called the characteristic value Y.
  • the two-dimensional area spanned by the two characteristic values is also referred to as a characteristic value area
  • each partial area set on the characteristic value area is also referred to as 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, but 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.
  • coordinates in the unit region in addition to coordinates in pixel units, coordinates in tree block (CTB, Coding Tree Block, LCU) units, coordinates in CU units, and the like may be used. The same applies to each embodiment other than the present embodiment.
  • 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.
  • the adaptive filter according to the present embodiment divides the characteristic value region into the partial regions hierarchically by the first-stage division and the second-stage division.
  • the division in the first stage is a division relating to the first characteristic value X
  • the division in the second stage is a division relating to at least one of the first characteristic value X and the second characteristic value Y.
  • the division of the characteristic value area into the partial areas is performed in units of division units. Therefore, each partial region is composed of one or a plurality of division units DU. Further, the boundary of each division unit is determined using a division point (also referred to as a characteristic value division point) set for each characteristic value.
  • the first stage division is also referred to as initial division
  • the second stage division is also referred to as subdivision.
  • FIG. 1 shows a characteristic value region CR and a division unit DU [i] [j] (i is an integer satisfying 0 ⁇ i ⁇ NX ⁇ 1, j is 0 ⁇ i ⁇ NY ⁇ ) set on the characteristic value region CR.
  • 1 is an integer that satisfies 1
  • NX is the total number of division units along the first characteristic value X
  • NY is the total number of division units along the second characteristic value Y).
  • the solid line indicates the boundary between the characteristic value partial region and the division unit
  • the broken line indicates the boundary between the division units.
  • the division units DU [0] [0] and DU [0] [1] constitute one characteristic value partial region
  • DU [1] [0] and DU [ [2] [0] constitutes another characteristic value partial region
  • DU [1] [1] alone constitutes a characteristic value partial region.
  • each division unit DU is characteristic value division points PX1 to PX_NX-1 for the first characteristic value X and characteristic value division points PY1 to PY_NY for the second characteristic value Y. Specified by -1.
  • the first characteristic value X is also simply referred to as the characteristic value X
  • the second characteristic value Y is also simply referred to as the characteristic value Y.
  • the index [i] [j] that designates each division unit is also called a characteristic index.
  • an index related to the characteristic value X ([i] in the above example) is also referred to as a characteristic X index
  • an index related to the characteristic value Y ([j] in the above example) is also referred to as a characteristic Y index.
  • the characteristic index is a two-dimensional index that uniquely designates each division unit.
  • 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 illustratively 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 node at the root of a prediction tree (PT) and a transformation tree (TT).
  • PT prediction tree
  • TT transformation 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 of the target CU into each transform block, and quantized prediction residuals QD1 to QDNT (N T includes the total number of blocks included in the target CU).
  • 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 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.
  • FIG. 3 is a diagram showing syntaxes included in the filter parameter FP (denoted as alf_param () in FIG. 3) of the encoded data # 1 according to the present embodiment.
  • adaptive_loop_filter_flag is a flag that specifies on / off of adaptive filter processing by the adaptive filter 50 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.
  • alf_enable_region_filter is a flag that specifies on / off of filter processing for each characteristic value partial region by the adaptive filter 50. When alf_enable_region_filter is 0, filter processing for each characteristic value partial region is specified to be off. When alf_enable_region_filter is 1, The filter processing for each characteristic value partial area is designated to be on.
  • alf_num_first_split_minus1 alf_first_split_val_shift
  • alf_second_split_type alf_second_split_flag [i0]
  • alf_length_luma_minus5_div2 alf_region_pred_luma [i] a___
  • Alf_num_first_split_minus1, alf_first_split_val_shift, alf_second_split_type, and alf_second_split_flag [i0] constitute characteristic value division information that specifies how to divide the characteristic value region CR into each characteristic value partial region CPR.
  • the characteristic value division information is information for designating how to divide the characteristic value region CR, information for designating the number of divisions and the shape (here, alf_num_first_split_minus1), and the characteristic values obtained in the first division.
  • alf_second_split_flag [i0] information for specifying the number of divisions and the shape of the second stage for the partial area
  • information (alf_second_split_type) for specifying the boundary of the characteristic value used for division.
  • alf_second_split_type information for designating a division method can also be designated, which is also a kind of characteristic value division information.
  • the characteristic value division information is information that hierarchically specifies how to divide the characteristic value region CR.
  • hierarchically it is possible to prevent an increase in the code amount for designating the division that occurs when the degree of division freedom is increased while having a high degree of division freedom.
  • a plurality of areas having the same type of characteristics can be expressed as a single unit, and the same filter coefficient can be assigned to the plurality of collected areas. Therefore, the code amount of the filter coefficient can be reduced as compared with the case where the filter coefficient is simply assigned for each characteristic value or for each combination of characteristic values.
  • the hierarchical expression can also be used when the same characteristic value (for example, activity) is used in the first stage division and the second stage division.
  • a plurality of areas having close characteristic values are expressed as one unit, and the same filter coefficient is assigned to the plurality of collected areas, thereby encoding the filter coefficient with a small code amount. it can.
  • division is performed preferentially using characteristic values having a large noise reduction effect, and even if the division is performed, a region having a small effect is handled as one unit without being divided.
  • the code amount of the filter coefficient can be made relatively small.
  • alf_num_first_split_minus1 alf_num_first_split_minus1 + 1 Determined by.
  • FIG. 4B illustrates a case where the boundary between these three characteristic value partial areas is designated by characteristic value division points PX2 and PX4.
  • FIG. 4C is a diagram showing re-division points PX1, PX3, and PX5 used in the second division in addition to the initial division points PX2 and PX4.
  • Each characteristic value partial region obtained by the first division is identified by the initial division index [i0] (0 ⁇ i0 ⁇ AlfNumFirstSplit ⁇ 1).
  • the correspondence between the initial split index [i0] and the characteristic X index [i] is given as follows according to the value of alf_second_split_type described later.
  • alf_first_split_val_shift is a flag referred to for changing the characteristic value dividing point PXn (1 ⁇ n ⁇ NX ⁇ 1).
  • the characteristic value dividing point PXn is changed according to the value of alf_first_split_val_shift.
  • alf_second_split_type is a flag for designating the type of division in the second stage. If alf_second_split_type is 0, each characteristic value partial area is further divided into one or more characteristic value partial areas based on characteristic value X and characteristic value Y. If alf_second_split_type is 1, each characteristic value partial area is Based on the characteristic value Y, it is further divided into one or more characteristic value partial areas.
  • (D) of FIG. 4 is a table illustrating characteristic value division points PX1 to PX5 set according to the values of alf_first_split_val_shift and alf_second_split_type when the activity is used as the characteristic value X.
  • alf_second_split_type 1
  • each value of the initial division points PX2 and PX4 is specified
  • alf_second_split_type 0, all the characteristic value division points including the initial division point
  • Each value of PX1 to PX5 is designated.
  • each value of the characteristic value dividing point PXn is changed according to the value of alf_first_split_val_shift.
  • the larger the characteristic value X the larger the interval between the initial division points. This is because many of the unit areas included in the processing target frame (or slice) have a small activity. As shown in FIG. 4D, by dividing the small range of the characteristic value X more finely, the number of unit areas classified into the characteristic value partial areas can be made closer to a constant. Not only the initial division point but also the re-division, it is appropriate that the interval between the division points is other than equal intervals in consideration of the frequency of the characteristic value.
  • the frequency tends to concentrate in many cases, it is preferable to make the interval finer in the portion where the frequency is concentrated and increase the interval in the portion where the frequency is small.
  • the degree of activity the frequency tends to concentrate on a portion having a small value, and the directionality tends to concentrate on the horizontal direction and the vertical direction.
  • Alf_first_split_val_shift constitutes information (first division point designation information) for designating a division point in the initial division (first stage division).
  • alf_second_split_flag alf_second_split_flag [i0] is a syntax for designating a specific mode of the second-stage division for each characteristic value partial region obtained by the first-stage division.
  • the above-described alf_second_split_type and alf_second_split_flag [i0] specifically specify the second-stage division for each characteristic value partial region obtained by the first-stage division.
  • alf_second_split_flag [i0] specifies the number of divisions and the division shape in the second division.
  • FIG. 5C shows characteristic value division points PY1 to PY3 when the directionality of the image is used as the characteristic value Y, and characteristic value division points PY1 to PY3 when the average pixel value is used as the characteristic value Y. Show.
  • Alf_second_split_type constitutes information (second division point designation information) for designating a division point in subdivision (second stage division).
  • alf_second_split_type 1
  • the subdivision index [j0] is an index for designating each characteristic value partial region included in the characteristic value partial region CPR [i0].
  • the characteristic value partial region designated by the characteristic value region internal index (i0, j0) is also expressed as a characteristic value partial region CPR (i0, j0).
  • the characteristic value partial region CPR [i0] obtained by the first stage division includes the following characteristic value partial region CPR: (I0, j0) is included.
  • the division unit DU [i] [j] included in each characteristic value partial region CPR (i0, j0) is as follows.
  • FIG. 7 is a diagram illustrating reference regions R0, R1, and R2 set by the adaptive filter according to the present embodiment when the value of alf_length_luma_minus5_div2 [i0] is 1, 2, and 3, respectively.
  • a diamond-shaped reference region is illustrated, but the reference region in the present embodiment is not limited to these examples, and a rectangular reference in which the number of taps is specified by alf_length_luma_minus5_div2 [i0] An area may be used.
  • alf_length_luma_minus5_div2 [i0] is transmitted in a higher layer than a syntax alf_coeff_luma [i] [j] for specifying a filter coefficient described later.
  • a syntax for designating the number of taps of the filter for each characteristic value partial region obtained by the second stage division may be encoded.
  • the syntax alf_length_luma_minus5_div2 [i] [j] for designating the number of filter taps for each characteristic value partial region obtained in the second division is the same as that of alf_coeff_luma [i] [j]. Encoded.
  • adaptive filter processing can be performed using filter coefficients having different tap numbers for each region. Since the appropriate number of taps differs depending on the activity of the region and the effect of each region, the above configuration that can adaptively select the number of taps can improve the coding efficiency. For example, when the activity of the region is small, it is appropriate to take a larger number of taps than when the activity is large, and in the characteristic value partial region where the effect of the adaptive filter is large, the characteristic value partial region where the effect is small It is appropriate to use a larger number of taps.
  • the number of taps is encoded with the filter coefficients of the filters acting on a plurality of characteristic value partial areas as one unit instead of the filter coefficients of the filters acting on one characteristic value partial area.
  • alf_coeff_luma [i] [j] is more accurately an index [k] (0 ⁇ k ⁇ Ncomp ⁇ 1, where Ncomp is a filter coefficient component) for designating each component of the filter coefficient or filter coefficient residual. In this case, such index notation is omitted.
  • the offset component included in alf_coeff_luma [i] [j] may be transmitted in a higher layer than components other than the offset.
  • the offset component included in alf_coeff_luma [i] [j] is transmitted in the same layer as alf_length_luma_minus5_div2 [i0], and the components other than the offset are transmitted in a layer lower than alf_length_luma_minus5_div2 [i0]. It is good also as a structure which transmits.
  • alf_coeff_luma [i] [j] assigned to the characteristic value partial region CPR (i0, j0) is also expressed as alf_coeff_luma (i0, j0).
  • alf_region_pred_luma [i] [j] is a characteristic value partial region in which a plurality of characteristic value partial regions that can be referred to when deriving the predicted value of the filter coefficient are adjacent to each other among the characteristic value partial regions CPR (i0, j0) Encoded for CPR.
  • the decoding of the filter coefficient for each characteristic value partial region included in the characteristic value region CR is performed in the reverse order of the raster scan, the characteristic value in which the characteristic value partial region is adjacent to both the right side and the lower side Alf_region_pred_luma is encoded for the partial region.
  • FIG. 8 is a diagram illustrating a prediction direction assigned to each characteristic value partial region CPR (i0, j0) obtained by performing the second stage division on the characteristic value partial region CPR [i0].
  • alf_region_pred_luma As the prediction direction, (1) the characteristic value partial region whose characteristic value Y is the same as the characteristic value partial region to be processed, or the value of characteristic value Y is closer to the characteristic value partial region to be processed A prediction direction (upward) using a filter coefficient that has already been decoded for the characteristic value partial region as a predicted value, and (2) a characteristic value partial region having the same characteristic value X as the processing target characteristic value partial region, or a characteristic It is possible to select a prediction direction (horizontal direction) in which a filter coefficient already decoded for a characteristic value partial region whose value X is closer to the processing target characteristic value partial region is a predicted value.
  • whether or not the characteristic value is close is determined according to the type of the characteristic value. For example, for a characteristic value expressed by a simple scalar quantity such as the degree of activity, a characteristic value having a smaller value difference is closer. On the other hand, the characteristic value expressed by assigning an index to a vector quantity (here, direction) such as directionality is closer to the one with the smaller angle formed by the original vector.
  • each characteristic value partial region CPR (i0, j0) when alf_second_split_type 1 and alf_region_pred_luma [ The correspondence with i] [j] is as follows.
  • the filter parameter FP may be configured not to include alf_region_pred_luma [i] [j].
  • the upward direction may be fixedly used as shown in FIG.
  • the syntax alf_length_luma_minus5_div2 and alf_coeff_luma [0] [0] shown at the end of FIG. 3 are used when the syntax alf_enable_region_filter is 0, that is, when the filter processing for each characteristic value partial region is specified to be off. Included in The number of taps is specified by alf_length_luma_minus5_div2, and the filter coefficient is specified by alf_coeff_luma [0] [0].
  • Descriptor (descriptor) u (1) shown in FIG. 3 indicates that the syntax associated with these descriptors is fixed-length encoded with 1 bit
  • u (2) is Indicates that the syntax associated with this descriptor is fixed-length encoded with 2 bits
  • ue (v) indicates that the syntax associated with this descriptor is variable-length encoded.
  • the value of the syntax alf_second_split_flag [i0] is one of 0 to 3, but this does not limit the present embodiment.
  • the syntax alf_second_split_flag [i0] may take any value from 0 to 7.
  • An example of subdivision specified by the syntax alf_second_split_flag [i0] is shown in FIG.
  • the characteristic value partial region CPR [i0] obtained by the initial division is divided into two at the maximum with respect to the characteristic value X and the maximum at the characteristic value Y according to each value of alf_second_split_flag [i0] Divided into three.
  • the moving picture decoding apparatus 1 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 Test Model) software.
  • FIG. 11 is a block diagram showing a configuration of the moving picture decoding apparatus 1.
  • the moving image 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 50.
  • 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. Further, 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 50.
  • 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 50 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 50 with intra coding mode information IEM, which 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 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 50 as a deblocked decoded image P_DB.
  • the adaptive filter 50 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 that has been filtered by the adaptive filter 50 is output to the outside as a 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 50 will be described later, description thereof is omitted here.
  • Adaptive filter 50 When the syntax adaptive_loop_filter_flag is 1, the adaptive filter 50 generates a filtered decoded image P_FL by performing an adaptive filter process on the deblocked decoded image P_DB.
  • the adaptive filter 50 associates the target unit region with any 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.
  • FIG. 12 is a block diagram showing the configuration of the adaptive filter 50.
  • the adaptive filter 50 includes an adaptive filter information decoding unit 51 and an adaptive filter unit 52.
  • the adaptive filter 50 includes an upper syntax decoding unit that decodes the syntax alf_enable_region_filter and the syntax alf_num_first_split_minus1.
  • the adaptive filter 50 performs filter processing for each characteristic value partial region.
  • the adaptive filter information decoding unit 51 derives the characteristic value division points PXn and PYm and the filter coefficient RegionFilterLuma [i0] [j0] by decoding the filter parameter FP included in the encoded data # 1. It is the composition.
  • Each derived characteristic value division point and filter coefficient RegionFilterLuma [i0] [j0] are supplied to the adaptive filter unit 52.
  • the derivation of the filter coefficient RegionFilterLuma [i0] [j0] by the adaptive filter information decoding unit 51 is performed in the raster scan order for each characteristic value partial region constituting the characteristic value region CR.
  • the adaptive filter information decoding unit 51 includes an area-specific tap number decoding unit 511, a region structure decoding unit 512, a filter coefficient residual decoding unit 513, a two-dimensional prediction flag decoding unit 514, and a filter coefficient prediction unit 515.
  • the area-specific tap number decoding unit 511 decodes the syntax alf_length_luma_minus5_div2 [i0] (0 ⁇ i0 ⁇ AlfNumFirstSplit) included in the filter parameter FP.
  • the decoded syntax alf_length_luma_minus5_div2 [i0] is allocated to the characteristic value partial region CPR [i0] and supplied to the filter coefficient residual decoding unit 513.
  • the syntax alf_length_luma_minus5_div2 [i0] is also supplied to the filter coefficient prediction unit 515, the filter coefficient decoding unit 516, the filter coefficient storage unit 517 for each region, the filter coefficient allocation unit 524, and the filter unit 525 (in FIG. 12). Arrow not shown).
  • the region structure decoding unit 512 decodes the syntax alf_second_split_type and alf_second_split_flag [i0] included in the filter parameter FP.
  • the decoded syntax alf_second_split_type is assigned to the entire characteristic value region CR and is supplied to the filter coefficient residual decoding unit 513, the two-dimensional prediction flag decoding unit 514, and the characteristic value division point setting unit 519.
  • the decoded syntax alf_second_split_flag [i0] is assigned to the characteristic value partial region CPR [i0], and the filter coefficient residual decoding unit 513, the two-dimensional prediction flag decoding unit 514, and the characteristic value division point setting unit 519.
  • the filter coefficient residual decoding unit 513 refers to alf_length_luma_minus5_div2 [i0], alf_second_split_type, and alf_second_split_flag [i0], decodes the syntax alf_coeff_luma [i] [j] included in the filter parameter FP, and each syntax alf_coeff_lum [i] [j] are assigned to the corresponding characteristic value partial regions CPR (i0, j0). Since the correspondence between alf_coeff_luma [i] [j] and the characteristic value partial region CPR (i0, j0) has already been described in the description of the encoded data # 1, the description thereof is omitted here. Also, the decoded syntax alf_coeff_luma [i] [j] is supplied to the filter coefficient decoding unit 516.
  • the two-dimensional prediction flag decoding unit 514 refers to alf_second_split_type and alf_second_split_flag [i0], decodes the syntax alf_region_pred_luma [i] [j] included in the filter parameter FP, and each syntax alf_region_pred_luma [i] [j ] Are assigned to the characteristic value partial areas CPR (i0, j0) corresponding thereto. Since the correspondence between alf_region_pred_luma [i] [j] and the characteristic value partial region CPR (i0, j0) has already been described in the description of the encoded data # 1, the description thereof is omitted here. Also, the decoded syntax alf_region_pred_luma is supplied to the filter coefficient prediction unit 515.
  • the filter coefficient prediction unit 515 refers to the syntax alf_region_pred_luma, and uses the decoded filter coefficient RegionFilterLuma [i0 ′] [j0 ′] stored in the region-specific filter coefficient storage unit 517 to predict the prediction filter coefficient PredRegionFilterLuma [i0] [j0]. ] Is derived for each characteristic value partial region.
  • the derived prediction filter coefficient PredRegionFilterLuma [i0] [j0] is supplied to the filter coefficient decoding unit 516.
  • the filter coefficient predicting unit 515 determines that the syntax alf_region_pred_luma is set for the target characteristic value partial region.
  • the decoded filter coefficient RegionFilterLuma [i0 ′] [j0 ′] for the characteristic value partial region adjacent to the indicated direction is set to the prediction filter coefficient PredRegionFilterLuma [i0] [j0] for the target characteristic value partial region.
  • the filter coefficient prediction unit 515 decodes the filtered filter coefficient RegionFilterLuma [for the characteristic value partial region adjacent to the upper side of the target characteristic value partial region.
  • i0 ′] [j0 ′] is set to the prediction filter coefficient PredRegionFilterLuma [i0] [j0] for the target characteristic value partial region.
  • the filter coefficient decoding unit 516 adds the filter coefficient residual alf_coeff_luma (i0, j0) and the prediction filter coefficient PredRegionFilterLuma [i0] [j0] for each characteristic value partial region, thereby adding the filter coefficient RegionFilterLuma [i0] [j0]. ] Is assigned to each characteristic value sub-region.
  • the generated filter coefficient RegionFilterLuma [i0] [j0] is stored in the filter coefficient storage unit 517 for each region.
  • the characteristic value dividing point change flag decoding unit 518 decodes the syntax alf_first_split_val_shift included in the filter parameter FP.
  • the decoded syntax alf_first_split_val_shift is supplied to the characteristic value division point setting unit 519.
  • the characteristic value dividing point setting unit 519 derives characteristic value dividing points PXn (1 ⁇ n ⁇ NX ⁇ 1) and PYm (1 ⁇ m ⁇ NX ⁇ 1) based on alf_first_split_val_shift and alf_second_split_type.
  • the derived characteristic value division points PXn and PYm are supplied to the characteristic index calculation unit 523 included in the adaptive filter unit 52.
  • the characteristic value division point setting unit 519 refers to the characteristic value division point PXn (1 ⁇ n ⁇ NX ⁇ ) according to the characteristic value division information stored in advance in its own memory without referring to both alf_first_split_val_shift and alf_second_split_type. 1) and PYm (1 ⁇ m ⁇ NX-1) may be derived. In such a configuration, it is preferable to use the characteristic value division information common to the moving picture decoding apparatus 1 and the moving picture encoding apparatus 2.
  • the adaptive filter unit 52 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 filter processing of each unit area is based on the characteristic value X of the deblocked decoded image P_DB in the unit area from the filter coefficient RegionFilterLuma [i0] [j0] decoded from the filter parameter FP. Or according to the characteristic value X and characteristic value Y of the deblocked decoded image P_DB in the unit area.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15.
  • the adaptive filter unit 52 includes a first characteristic value calculation unit 521, a second characteristic value calculation unit 522, a characteristic index calculation unit 523, a filter coefficient allocation unit 524, and a filter unit 525. .
  • the image input to the adaptive filter unit 52 is not limited to the deblocked decoded image P_DB, and a plurality of input images can be input.
  • the adaptive filter unit 52 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.
  • a first characteristic value calculation unit 521 and a second characteristic value calculation unit 522 which will be described later, 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.
  • Each characteristic value may be calculated, and the filter unit 525 may perform an adaptive filter process on each input image, add the filtered images, and output the result.
  • the filter parameter FP may include a filter coefficient for each input image and a filter coefficient corresponding to each characteristic value partial region.
  • the first characteristic value calculation unit 521 calculates a characteristic value X for the deblocked decoded image P_DB in the target unit area that is the unit area to be processed.
  • a calculation process for calculating the activity level as the characteristic value X (characteristic value X calculation process example 1) and a calculation process for calculating the variance of the pixel values as the characteristic value X (characteristic value X calculation process example 2) will be described. I do. However, specific examples of the characteristic value X are not limited to these.
  • the first characteristic value calculation unit 521 calculates the activity ACT of the deblocked decoded image P_DB in the target unit region as the characteristic value X.
  • the activity is an index indicating the randomness of the image, and is there a large high-frequency component in the conversion coefficient obtained when DCT conversion is performed on the region including the target unit region?
  • the calculation is based on the pixel values of adjacent pixels. The greater the difference in pixel value between adjacent pixels, the greater the activity.
  • the calculated activity ACT is supplied to the characteristic index calculation unit 523 as the characteristic value X.
  • the target unit area is a rectangle of Bx pixels ⁇ By pixels
  • the coordinates of each pixel in the target unit area are (u, v) (u and v are 0 ⁇ u ⁇ Bx ⁇ 1 and 0 ⁇ v ⁇ By ⁇ , respectively. 1)
  • the pixel value of the deblocked decoded image P_DB at the coordinates is represented by S (u, v)
  • the first characteristic value calculation unit 521 for example, By using 1a
  • the activity ACT can be calculated.
  • Formula (1-1a) corresponds to evaluating the activity using the sum of absolute values (Sum ⁇ of Absolute Difference, SAD) of adjacent pixel values as an index.
  • the first characteristic value calculation unit 521 may be configured to calculate the activity ACT by using the following formula (1-1b).
  • Formula (1-1b) corresponds to evaluating the activity using the sum of modified Laplacians (Sum-Modified Laplacian, SML) of pixel values of adjacent pixels as an index.
  • the first characteristic value calculation unit 521 can calculate only the pixel S (i, j) in the target unit region.
  • the pixel value of the deblocked decoded image P_DB may not be referred to for some pixels in the characteristic value calculation reference region.
  • the first characteristic value calculation unit 521 calculates the activity ACT without referring to those pixel values that cannot be referred to.
  • the first characteristic value calculation unit 521 partially limits the range of the sum of u and v in Equation (1-1a).
  • the activity ACT may be calculated using the following formula (1-1a ′) obtained.
  • the first characteristic value calculation unit 521 refers to only the pixel value in the target unit region for the activity of the target unit region regardless of whether the target unit region is in contact with the slice boundary or the CU boundary. It can also be set as the structure calculated by this. For example, the first characteristic value calculation unit 521 can also calculate the activity ACT by using the following formula (1-1c).
  • the mathematical expression (1-1c) corresponds to the evaluation of the activity of the pixel value of the adjacent pixel by using the SAD of the pixel value of the adjacent pixel as an index, like the mathematical expression (1-1a). Unlike (2-1a), the degree of activity is calculated by referring to only the pixels included in the target unit area.
  • the first characteristic value calculation unit 521 may be configured to calculate the activity ACT by using the following formula (1-1d).
  • Equation (1-1d) corresponds to evaluating the degree of activity using the SML of the pixel value of an adjacent pixel as an index, but Equation (1-1d) and Differently, the degree of activity is calculated by referring to only the pixels included in the target unit area.
  • the first characteristic value calculation unit 521 calculates the activity for the target unit region by referring only to the pixel values in the target unit region, as shown in FIG.
  • the calculated reference area CRR is the same area as the target unit area UR.
  • a variance VP which will be described later, is also an example of the degree of activity that can be calculated with reference to only pixel values in the target unit region.
  • the first characteristic value calculation unit 521 calculates the activity for the target unit region by referring only to the pixel values in the target unit region, the first characteristic value calculation unit 521 also refers to the pixel values other than the target unit region.
  • the number of pixels read from the buffer memory 15 is reduced, and the data transmission amount from the buffer memory 15 to the adaptive filter 50 is reduced. Further, since the number of pixels referred to calculate the activity level is small and exception processing is unnecessary, the processing amount for calculating the activity level is reduced.
  • the first characteristic value calculation unit 521 that calculates the activity ACT by using the mathematical expression (1-1c) can also be expressed as follows. That is, the first characteristic value calculation unit 521 determines the activity ACT (u, v) for the pixel (u, v) in the vicinity of the coordinates (u, v) ⁇ (u, v), (u + 1, v), (U, v + 1) ⁇ is calculated with reference to the pixel value of each pixel, and the ACT in the inner region ⁇ (u, v)
  • the ACT for the target unit area is calculated using the sum of (u, v).
  • the first characteristic value calculation unit 521 that calculates the activity ACT by using the mathematical expression (1-1d) can be expressed as follows. That is, the first characteristic value calculation unit 521 determines the activity ACT (u, v) for the pixel (u, v) in the vicinity of the coordinates (u, v) ⁇ (u, v), (u + 1, v), (U, v + 1), (u ⁇ 1, v), (u, v ⁇ 1) ⁇ is calculated with reference to the pixel value of each pixel, and the inner region ⁇ (u, v)
  • the ACT for the target unit region is calculated using the sum of ACT (u, v) in u ⁇ Bx ⁇ 2, 1 ⁇ v ⁇ By ⁇ 2 ⁇ .
  • the first characteristic value calculation unit 521 that calculates the activity by referring only to the pixels included in the target unit region is an internal region in which the entire neighborhood of the target unit region includes pixels included in the target unit region. After deriving the activity of each pixel belonging to the area by referring to the pixel values of the pixels included in the vicinity of the pixel, the activity of the target unit area is determined from the activity of each pixel belonging to the internal area. It can also be expressed as something to be calculated.
  • the configuration for calculating the degree of activity with reference to only the pixels included in the target unit region is not limited to the above example, and the target unit region is a pixel whose entire neighborhood is included in the target unit region. Is divided into a peripheral region consisting of pixels that are not included in the target unit region, and the activity of each pixel belonging to the internal region is referred to the pixel value of the pixel in the vicinity of the pixel. And the activity of each pixel belonging to the peripheral region is derived by referring to the pixel value of the pixel in the vicinity of the pixel and in the unit region, and then belonging to the unit region A configuration may be employed in which the degree of activity for the unit region is calculated from the degree of activity of each pixel.
  • the first characteristic value calculation unit 521 calculates the variance VP of the pixel values of the deblocked decoded image P_DB in the target unit region as the characteristic value X.
  • the calculated variance VP is supplied to the characteristic index calculation unit 523 as the characteristic value X.
  • the target unit region is a rectangle of Bx pixels ⁇ By pixels, the coordinates of each pixel in the target unit region are (u, v) (u and v are 0 ⁇ u ⁇ Bx ⁇ 1 and 0 ⁇ v, respectively). ⁇ By ⁇ 1), and the pixel value of the deblocked decoded image P_DB at the coordinates is represented by S (u, v), the first characteristic value calculation unit 521 may, for example, The variance VP is calculated using (1-2).
  • the variance VP calculated by the first characteristic value calculation unit 521 functions as an index indicating the randomness of the deblocked decoded image P_DB in the target unit region, similar to the activity ACT described above.
  • the second characteristic value calculation unit 522 calculates a characteristic value Y for the deblocked decoded image P_DB in the target unit region.
  • calculation processing for calculating the directionality of an image as the characteristic value Y (characteristic value Y calculation processing example 1) and (characteristic value Y calculation processing example 2), and calculation processing for calculating an average pixel value as the characteristic value X (Calculation process example 2 of characteristic value Y) and calculation process (calculation process example 3 of characteristic value Y) of calculating the coordinate value of the target unit region as the characteristic value X
  • specific examples of the characteristic value Y are not limited to these.
  • the second characteristic value calculation unit 522 calculates the directionality of the deblocked decoded image in the target unit region as the characteristic value Y.
  • An index indicating the calculated directionality (direction index) is supplied as a characteristic value Y to the characteristic index calculation unit 523.
  • the second characteristic value calculation unit 522 first calculates the vertical activity ACT_V and the horizontal activity ACT_H of the deblocked decoded image P_DB in the target unit region.
  • the horizontal direction activity ACT_H and the vertical direction activity ACT_V can be calculated by, for example, the first term and the second term of the above-described equation (1-1a), respectively.
  • the horizontal direction activity ACT_H and the vertical direction activity ACT_V are respectively determined by the first term and the second term of any one of the above formulas (1-1b) to (1-1d). It can also be calculated.
  • the second characteristic value calculation unit 522 supplies the direction index listed below as the characteristic value Y to the characteristic index calculation unit 523 according to the magnitudes of the vertical activity ACT_V and the horizontal activity ACT_H. To do.
  • the second characteristic value calculation unit 522 classifies the directionality of the deblocked decoded image in the target unit region into three according to the sizes of the vertical direction activity ACT_V and the horizontal direction activity ACT_H, It is good also as a structure which outputs the direction index which shows those directions, and classifies the directionality of the deblocked decoded image in an object unit area into two, and also the structure which outputs the direction index which shows those directions Good. Further, the directionality of the deblocked decoded image in the target unit region may be classified into five or more according to the size of each of the vertical activity ACT_V and the horizontal activity ACT_H.
  • the second characteristic value calculation unit 522 determines the directionality of the deblocked decoded image in the target unit region according to the size of each of the vertical activity ACT_V and the horizontal activity ACT_H as follows. Can be classified.
  • the second characteristic value calculation unit 522 for example, as described below, the directionality of the deblocked decoded image in the target unit region according to the sizes of the vertical activity ACT_V and the horizontal activity ACT_H. Can be classified into two.
  • the characteristic value partial region CPR [i0] obtained by the initial division is related to the characteristic value Y.
  • the second characteristic value calculation unit 522 calculates the directionality of the deblocked decoded image in the target unit region as the characteristic value Y.
  • the edge direction of the deblocked decoded image in the target unit region is detected, and the direction index is determined according to the detected edge direction. Is supplied to the characteristic index calculation unit 523 as the characteristic value Y.
  • the second characteristic value calculation unit 522 sets a reference region of 3 ⁇ 3 pixels centered on the target pixel, and for each pixel of the reference region Then, the Sobel filter matrix SFM_x and SFM_y defined by the following mathematical formulas (1a) and (1b) are operated to calculate the pixel values Sobel_x and Sobel_y after the Sobel filter.
  • the second characteristic value calculation unit 522 calculates an angle (hereinafter, also referred to as “edge angle”) Theta indicating the edge direction by the following mathematical formula (3).
  • Theta arctan (Sobel_x / Sobel_y) (3)
  • arctan represents an inverse function of the trigonometric function tan.
  • the angle Theta increases clockwise and is expressed in a range from 0 degrees to 180 degrees (0 ° ⁇ Theta ⁇ 180 °).
  • the second characteristic value calculation unit 522 first sets a 3 ⁇ 3 pixel reference region for each pixel included in the target divided region, and performs the above-described method for each pixel.
  • the pixel values Sobel_x and Sobel_y after the Sobel filter are calculated.
  • the second characteristic value calculation unit 522 calculates the edge strength ES for each pixel by the following mathematical formula (4), and the pixel values Sobel_x and Sobel_y after the Sobel filter for the pixel having the largest edge strength ES. Is used to calculate the edge angle Theta by the above equation (3).
  • the second characteristic value calculation unit 522 determines that there is no edge for the target divided region when the edge strength ES for all the pixels included in the target divided region is equal to or less than a predetermined threshold. .
  • the second characteristic value calculation unit 522 may output a number (direction index) corresponding to the edge direction without calculating the edge angle.
  • the direction index can be generated as follows by dividing the case according to the magnitude relationship between Sobel_y and Sobel_x.
  • the characteristic value partial region CPR [i0] obtained by the initial division has the maximum number of direction indexes with respect to the characteristic value Y. Subdivided into the same number of characteristic value sub-regions.
  • the second characteristic value calculation unit 522 calculates, as the characteristic value Y, the average (also referred to as average pixel value) of the pixel values of the deblocked decoded image in the target unit region, and calculates the calculated average pixel value. , And supplied to the characteristic index calculation unit 523 as the characteristic value Y.
  • the second characteristic value calculation unit 522 calculates the average pixel value MP by reading each pixel value of the deblocked decoded image P_DB in the target unit region to be processed from the buffer memory 15 and averaging the pixel values. To do.
  • the target unit area is a rectangle of Bx pixels ⁇ By pixels
  • the coordinates of each pixel in the target unit area are (u, v) (u and v are 0 ⁇ u ⁇ Bx ⁇ 1 and 0 ⁇ v ⁇ By ⁇ , respectively. 2)
  • the pixel value of the deblocked decoded image P_DB at the coordinates is represented by S (u, v)
  • the second characteristic value calculation unit 522 for example,
  • the average pixel value MP can be calculated by taking a simple average of the pixel values using 3).
  • the second characteristic value calculation unit 522 calculates the average pixel value MP by taking a weighted average using a predetermined weighting factor for each pixel value instead of taking a simple average of each pixel value. Also good.
  • the characteristic value partial region CPR [i0] obtained by the initial division is subdivided into four characteristic value partial regions with respect to the characteristic value Y is taken as an example.
  • the present embodiment is not limited to this.
  • the second characteristic value calculation unit 522 calculates the coordinates of the target unit region in the processing target frame (or processing target slice). The calculated coordinates are supplied to the characteristic index calculation unit 523 as the characteristic value Y.
  • the coordinates of the target unit region are more accurately the coordinates of the representative pixels of the target unit region.
  • the representative pixel for example, a pixel in the target unit region and the upper left pixel of the target unit region can be used.
  • the specific position of the representative pixel in the target unit region is not limited to the present embodiment.
  • the coordinates of the target unit area in the processing target frame can be calculated by referring to the following information decoded from the encoded data # 1.
  • the adaptive filter 50 refers to information indicating the position of the set unit area, The coordinates of the target unit area can be specified.
  • the characteristic index calculation unit 523 sets the characteristic value X supplied from the first characteristic value calculation unit 521 and the characteristic value Y supplied from the second characteristic value calculation unit 522 for the target unit region, respectively, as characteristic value division points PXn. And by comparing with PYm, the index (i0, j0) in the characteristic value area is assigned to the target unit area. Further, the characteristic value region index (i0, j0) assigned to the target unit region is supplied to the filter coefficient assigning unit 524.
  • the characteristic index calculation unit 523 first compares the characteristic value X for the target unit region with the initial division point used for the first stage division among the characteristic value division points PX1 to PX_NX ⁇ 1 to thereby obtain the initial division index. [I0] is calculated, and the calculated initial division index [i0] is assigned to the target unit area. When PX2 and PX4 are used as initial division points as shown in FIG. 4B, the initial division index [i0] is calculated as follows.
  • the characteristic index calculation unit 523 refers to alf_second_split_type and alf_second_split_flag [i0]
  • the re-division index [j0] is calculated by comparing the characteristic value X and the characteristic value Y with the re-division point used for the second-stage division.
  • the calculated subdivision index [j0] is assigned to the target unit area.
  • the calculation process of the subdivision index [j0] for the assigned target unit area may be read as PX1 in the following description.
  • alf_second_split_type 1, the characteristic index calculation unit 523 calculates the re-division index [j0] for the target unit
  • the filter coefficient assigning unit 524 reads the filter coefficient RegionFilterLuma [i0] [j0] corresponding to the index (i0, j0) in the characteristic value area assigned to the target unit area from the filter coefficient RegionFilterLuma [i0] [j0] corresponding to the index (i0, j0) in the characteristic value area assigned to the target unit area from the filter coefficient RegionFilterLuma [i0] [j0] corresponding to the index (i0, j0) in the characteristic value area assigned to the target unit area from the
  • the filter unit 525 generates a filtered decoded image P_FL in the target unit region by performing a filtering process using the filter coefficient RegionFilterLuma [i0] [j0] on the target unit region.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15.
  • the pixel value of the pixel to be filtered 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_DB (“prefiltered”). If the pixel value in the “image” is also expressed as S (x, y), the filter unit 525 calculates the pixel value SF (x ′, y ′) by the following equation (1-4). .
  • the coordinates (x, y) may be the same coordinates as the coordinates (x ′, y ′), or may be different coordinates as long as they have a one-to-one correspondence.
  • a (u, v) represents a filter coefficient to be multiplied by the pixel value S (x + u, y + v) of the pre-filter image, and the filter coefficient RegionFilterLuma [i0] [j0] supplied from the filter coefficient assigning unit 524 Corresponds to each component of.
  • o represents an offset component included in the filter coefficient RegionFilterLuma [i0] [j0].
  • R in Expression (1-4) represents an area referred to in the filter process (also referred to as “filter reference area R”).
  • the number of taps in the reference region R is specified by alf_length_luma_minus5_div2 [i0].
  • the reference region R for example, as shown in FIG. 7, any one of the reference regions R0, R1, and R2 set according to each value of alf_length_luma_minus5_div2 [i0] may be used. Note that.
  • a diamond-shaped reference region is illustrated, but the reference region R in the present embodiment is not limited to these examples, and is a rectangular shape in which the number of taps is specified by alf_length_luma_minus5_div2 [i0].
  • a reference area may be used.
  • the moving picture encoding 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. 15 is a block diagram showing a configuration of the video encoding device 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 method control unit 28, a motion vector redundancy deletion unit 29, an adder 31, a subtractor 32, a deblocking filter 33, and an adaptive filter 60 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 60 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 60 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 60 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 ′ specified 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 60, is then stored in the buffer memory 24 as a filtered decoded image P_FL, and is 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 60 as a deblocked decoded image P_DB.
  • the adaptive filter 60 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 60 is stored in the buffer memory 24. Since a specific configuration of the adaptive filter 60 will be described later, description thereof is omitted here.
  • the adaptive filter 60 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 60 also supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as filter parameters FP.
  • the variable length code encoding unit 22 encodes the filter parameter FP as a part of the encoded data # 1.
  • FIG. 16 is a block diagram showing the configuration of the adaptive filter 60.
  • the adaptive filter 60 includes an adaptive filter information setting unit 61 and an adaptive filter unit 62.
  • the adaptive filter information setting unit 61 includes a region-specific tap number setting unit 611, a region structure setting unit 612, a filter parameter generation unit 613, a two-dimensional prediction flag setting unit 614, a filter coefficient prediction unit 515, a filter A coefficient residual generation unit 616, a characteristic-specific filter coefficient storage unit 617, a characteristic value division point change flag setting unit 618, and a characteristic value division point setting unit 519 are provided.
  • the area-specific tap number setting unit 611 sets a syntax alf_length_luma_minus5_div2 [i0] for designating the number of taps for the characteristic value partial area CPR [i0] obtained by the initial division.
  • the set syntax alf_length_luma_minus5_div2 [i0] is supplied to the filter parameter generation unit 613.
  • the syntax alf_length_luma_minus5_div2 [i0] is also supplied to the filter coefficient prediction unit 515, the filter coefficient residual generation unit 616, the filter coefficient storage unit 617 for each region, the filter coefficient derivation unit 624, and the filter unit 525 (FIG. 16 (not shown).
  • alf_length_luma_minus5_div2 [i0] Since the specific value that alf_length_luma_minus5_div2 [i0] can take and the correspondence between the specific value of alf_length_luma_minus5_div2 [i0] and the number of taps AlfLengthLuma of the reference region R have already been described, the description thereof is omitted here.
  • alf_length_luma_minus5_div2 [i0] a specific value of alf_length_luma_minus5_div2 [i0] is determined so that the encoding efficiency is further improved.
  • the region structure setting unit 612 uses a flag alf_second_split_type for designating the type of subdivision, and a syntax alf_second_split_flag [i0 for designating a specific mode of subdivision for each characteristic value partial region obtained by the initial division. ] Is set.
  • the set flag alf_second_split_type and syntax alf_second_split_flag [i0] are supplied to the characteristic value division point setting unit 519, the two-dimensional prediction flag setting unit 614, and the filter parameter generation unit 613.
  • alf_second_split_type and alf_second_split_flag [i0] are determined so that the encoding efficiency is further improved.
  • the two-dimensional prediction flag setting unit 614 refers to alf_second_split_type and alf_second_split_flag [i0], and flags alf_region_pred_luma [i] [i] for designating a prediction direction when deriving a prediction value of a filter coefficient for each characteristic value partial region j] is set.
  • the set flag alf_region_pred_luma [i] [j] is supplied to the filter coefficient prediction unit 515.
  • alf_region_pred_luma [i] [j] Since the possible values of alf_region_pred_luma [i] [j] and the correspondence between the specific values of alf_region_pred_luma [i] [j] and the prediction direction have already been described, the description thereof is omitted here. Note that the specific value of alf_region_pred_luma [i] [j] is determined so that the coding efficiency is further improved.
  • the filter coefficient residual 616 is the difference between the prediction filter coefficient PredRegionFilterLuma supplied from the filter coefficient prediction unit 515 and the filter coefficient RegionFilterLuma read from the characteristic-specific filter coefficient storage unit 617 for each characteristic value partial region CPR (i0, j0).
  • the generated filter coefficient residual alf_coeff_luma [i] [j] is supplied to the filter parameter generation unit 613.
  • the characteristic value dividing point change flag setting unit 618 sets a flag alf_first_split_val_shift referred to for changing the characteristic value dividing point PXn (1 ⁇ n ⁇ NX ⁇ 1).
  • the set flag alf_first_split_val_shift is supplied to the characteristic value division point setting unit 519.
  • alf_first_split_val_shift is determined so that the encoding efficiency is further improved.
  • the filter parameter generation unit 613 generates a filter parameter FP from the syntax alf_length_luma_minus5_div2 [i0], alf_second_split_type, alf_second_split_flag [i0], alf_first_split_val_shift, and alf_coeff_luma [i] [j].
  • the generated filter parameter FP is supplied to the variable length code encoder 22.
  • the filter parameter FP includes a syntax alf_enable_region_filter for specifying whether or not to perform filtering for each characteristic value partial region, and a syntax alf_num_first_split_minus1 for specifying the initial division number AlfNumFirstSplit. Specific values of these syntaxes are determined so that the encoding efficiency is further improved.
  • the filter coefficient storage unit 617 for each characteristic stores the filter coefficient RegionFilterLuma [i0] [j0] derived by the filter coefficient deriving unit 624 described later.
  • the adaptive filter unit 62 includes a first characteristic value calculation unit 521, a second characteristic value calculation unit 522, a characteristic index calculation unit 523, a filter coefficient derivation unit 624, and a filter unit 525.
  • the filter coefficient deriving unit 624 derives a filter coefficient RegionFilterLuma [i0] [j0] such that an error between the filtered decoded image P_FL and the encoding target image in the target unit region becomes smaller.
  • the derived filter coefficient RegionFilterLuma [i0] [j0] is supplied to the filter unit 525 and stored in the characteristic-specific filter coefficient storage unit 617.
  • a filter coefficient is derived.
  • the unit 624 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 each component of RegionFilterLuma [i0] [j0].
  • FIG. 17 is a diagram illustrating each syntax included in the filter parameter FP (indicated as alf_param () in FIG. 17) according to the present modification.
  • the characteristic value dividing points PX1 to PX_NX-1 for the first characteristic value X that is, the dividing points in the initial division are set according to the value of the syntax alf_num_first_split_minus1 that specifies the number of divisions of the initial division. Is done.
  • FIG. 18 is a table illustrating characteristic value division points PX1 to PX5 set according to each value of alf_num_first_split_minus1 in the present modification.
  • the division points are set according to the number of divisions of the initial division, so that the number of unit areas classified into each characteristic value partial area can be made closer to a certain value. For this reason, high encoding efficiency is realizable.
  • 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 a diagram showing each syntax included in the filter parameter FP (denoted as alf_param () in FIG. 19) of the encoded data # 3 according to the present embodiment.
  • alf_filter_pattern (1 ⁇ i ⁇ AlfMaxNumFilters, AlfMaxNumFilters is the maximum value of the initial division points) is a flag for determining the initial division points in the initial division (first stage division). Regardless of whether or not subdivision (second stage division) is performed, the initial division point is determined by alf_filter_pattern [i].
  • alf_filter_pattern is a flag that designates whether or not the same filter coefficient group is used between adjacent partial regions with respect to the characteristic value. It is assumed that the division unit when dividing by the maximum initial division number AlfMaxNumFilters is expressed by DU [i] [j].
  • alf_filter_pattern [i] is the division unit DU [i-1] [j] specified by the index [i-1] with respect to the division unit DU [i] [j] specified by the index [i]. ] Is a flag that specifies whether or not to apply the same filter coefficient group.
  • alf_filter_pattern [i] is 0, the boundary between the division unit DU [i] [j] and the division unit DU [i-1] [j] is a division point, and alf_filter_pattern [i] is 1
  • the boundary between the division unit DU [i] [j] and the division unit DU [i-1] [j] is not a division point. In this way, it is possible to determine points (division points) for dividing characteristic values using different filter coefficient groups.
  • encoding efficiency may be improved by reducing the code amount by not performing re-division.
  • Encoding efficiency can be improved by including alf_enable_second_split in the encoded data # 5.
  • alf_select_split_char is a syntax that specifies which of the plurality of candidates is used as the characteristic value Y. As shown in FIG. 20A, alf_select_split_char specifies the characteristic value X and the characteristic value Y as follows.
  • the y coordinate refers to the in-frame y coordinate of the target unit region in the processing target frame
  • the x coordinate refers to the target unit region in the processing target frame. The x coordinate in the frame.
  • the characteristic value Y is calculated using, for example, the vertical direction activity ACT_V and the horizontal direction activity ACT_H.
  • FIG. 20B shows a specific example of subdivision points PY1 to PY3 set for each value of alf_select_split_char.
  • “height” refers to the number of pixels in the y direction of the frame
  • “width” refers to the number of pixels in the x direction of the frame.
  • FIG. 20C shows the relationship between alf_second_split_val [k] and the subdivision points PY1 to PY3. As shown in FIG. 20 (c), each value of the subdivision points PY1 to PY3 is determined according to each value of alf_second_split_val [k].
  • Alf_secocond_split_flag and the above alf_filter_pattern, alf_enable_second_split, alf_select_split_char, alf_enable_second_split_val, and alf_second_split_val constitute characteristic value division information that specifies how to divide the characteristic value region CR into each characteristic value partial region CPR.
  • alf_region_disable_idc is a flag (on / off designation information) for designating a region where the filtering process is turned off among the characteristic value partial regions obtained by the subdivision.
  • alf_second_split_flag [i0] is 0, that is, when subdivision is not performed, alf_region_disable_idc [i0] takes one of values ⁇ 1 and 0, and the value of alf_second_split_flag [i0] is 1 or 2.
  • alf_region_disable_idc [i0] takes any value of -1, 0, 1 and when the value of alf_second_split_flag [i0] is 3, ie, the subdivision is 4 In the case of division, alf_region_disable_idc [i0] takes a value of -1, 0, 1, 2, or 3.
  • the filter coefficient (or filter coefficient residual) alf_coeff_luma is not encoded for the characteristic value partial region for which the filter processing is specified to be off.
  • FIG. 19 illustrates a configuration that does not include the syntax alf_region_pred_luma that specifies the prediction direction when deriving the prediction filter coefficient, but this does not limit the present embodiment, and has been described in the second embodiment.
  • the filter parameter FP may include the syntax alf_region_pred_luma.
  • the video decoding device includes an adaptive filter 70 instead of the adaptive filter 50 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. 21 is a block diagram showing the configuration of the adaptive filter 70.
  • the adaptive filter 70 includes a region structure decoding unit 512, a filter coefficient residual decoding unit 513, a characteristic value division point change flag decoding unit 518, a characteristic value division point setting unit 519, and Instead of the second characteristic value calculation unit 522, a region structure decoding unit 712, a filter coefficient residual decoding unit 713, a characteristic value division point change flag decoding unit 718, a characteristic value division point setting unit 719, and a second A characteristic value calculation unit 722 is provided.
  • the adaptive filter 70 includes an adaptive filter-off decoding unit 731 and a characteristic selection flag decoding unit 732. Other configurations of the adaptive filter 70 are the same as those of the adaptive filter 50.
  • FIG. 21 illustrates a configuration that does not include the two-dimensional prediction flag decoding unit 514 included in the adaptive filter 50, but this does not limit the present embodiment, and the adaptive filter 70 includes the two-dimensional prediction flag. It is good also as a structure provided with the decoding part 514, and a structure which includes alf_region_pred_luma in coding data # 5.
  • the adaptive filter-off decoding unit 731 decodes the syntax alf_disable_region_idc [i0] included in the filter parameter FP.
  • the decoded syntax alf_disable_region_idc [i0] is supplied to the filter coefficient residual decoding unit 713 and the filter unit 525.
  • alf_disable_region_idc [i0] specifies that the filtering process is turned off, the filter unit 525 does not perform the filtering process.
  • the region structure decoding unit 712 decodes the syntax alf_second_split_flag [i0] included in the filter parameter FP.
  • the decoded syntax alf_second_split_flag [i0] is allocated to the characteristic value partial region CPR [i0] and is supplied to the filter coefficient residual decoding unit 713 and the characteristic value division point setting unit 719.
  • the filter coefficient residual decoding unit 713 refers to alf_length_luma_minus5_div2 [i0], alf_disable_region_idc [i0], and alf_second_split_flag [i0], and decodes the syntax alf_coeff_luma [i] [j] included in the filter parameter FP.
  • the tax alf_coeff_luma [i] [j] is assigned to the corresponding characteristic value partial region CPR (i0, j0).
  • alf_coeff_luma [i] [j] Since the correspondence between alf_coeff_luma [i] [j] and the characteristic value partial region CPR (i0, j0) is the same as the correspondence already described in the description of the encoded data # 1 according to the first embodiment, here, Description is omitted. Also, the decoded syntax alf_coeff_luma [i] [j] is supplied to the filter coefficient decoding unit 516.
  • filter coefficient residual decoding unit 713 does not decode the filter coefficient residual alf_coeff_luma [i] [j] for the characteristic value partial region for which the filter processing is specified to be off by alf_disable_region_idc [i0].
  • the decoded syntax alf_second_split_val [k] is supplied to the characteristic value division point setting unit 719.
  • the characteristic value selection flag decoding unit 732 decodes the syntax alf_second_split_char included in the filter parameter FP.
  • the decoded syntax alf_second_split_char is supplied to the characteristic value division point setting unit 719 and the second characteristic value calculation unit 722.
  • the characteristic value dividing point setting unit 719 Based on alf_second_split_flag [i0], alf_second_split_val [k], and alf_second_split_char, the characteristic value dividing point setting unit 719 performs characteristic value dividing points PXn (1 ⁇ n ⁇ NX ⁇ 1) and PYm (1 ⁇ m ⁇ NX ⁇ 1). ) Is derived. The derived characteristic value division points PXn and PYm are supplied to the characteristic index calculation unit 523.
  • the second characteristic value calculation unit 722 calculates a characteristic value specified by alf_second_split_char for the deblocked decoded image P_DB in the target unit region.
  • the calculated characteristic value is supplied as the characteristic value Y to the characteristic index calculation unit 523.
  • the moving picture encoding apparatus includes an adaptive filter 80 instead of the adaptive filter 60 included in the moving picture encoding apparatus 2 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 encoding device 2 according to the first embodiment, and thus the description thereof is omitted.
  • the adaptive filter 80 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 80 supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as filter parameters FP.
  • the variable length code encoding unit 22 encodes the filter parameter FP as a part of the encoded data # 5.
  • FIG. 22 is a block diagram showing the configuration of the adaptive filter 80. As shown in FIG. 22, the adaptive filter 80 includes an adaptive filter information setting unit 81 and an adaptive filter unit 82.
  • the adaptive filter information setting unit 81 includes an area-specific tap number setting unit 611, an adaptive on / off setting unit 831, an area structure setting unit 812, a characteristic value division point change flag setting unit 818, and a characteristic selection flag setting.
  • the adaptive filter off setting unit 831 sets a flag alf_region_disable_idc [i0] for designating a region where the filter processing is turned off among the characteristic value partial regions obtained by the re-division.
  • the set flag alf_region_disable_idc [i0] is supplied to the filter parameter generation unit 813 and the filter unit 525.
  • alf_region_disable_idc [i0] specifies that the filtering process is turned off, the filter unit 525 does not perform the filtering process.
  • alf_region_disable_idc [i0] the specific value of alf_region_disable_idc [i0] is determined so that the coding efficiency is further improved.
  • the region structure setting unit 812 sets a syntax alf_second_split_flag [i0] for designating a specific mode of subdivision for each characteristic value partial region obtained by the initial division.
  • the set syntax alf_second_split_flag [i0] is supplied to the characteristic value division point setting unit 719 and the filter parameter generation unit 813.
  • alf_second_split_flag [i0] the specific value of alf_second_split_flag [i0] is determined so that the coding efficiency is further improved.
  • the set syntax alf_second_split_val [k] is supplied to the characteristic value division point setting unit 719 and the filter parameter generation unit 813.
  • alf_second_split_val [k] the specific value of alf_second_split_val [k] is determined so that the coding efficiency is further improved.
  • the characteristic selection flag setting unit 832 sets a syntax alf_select_split_char that specifies which characteristic value of a plurality of candidates is used as the characteristic value Y.
  • the set syntax alf_select_split_char is supplied to the characteristic value division point setting unit 719, the filter parameter generation unit 813, and the second characteristic value calculation unit 722.
  • alf_select_split_char a specific value of alf_select_split_char is determined so that the encoding efficiency is further improved.
  • the filter parameter generation unit 813 generates a parameter F from the syntax alf_length_luma_minus5_div2 [i0], alf_disable_region_idc [i0], alf_second_split_flag [i0], alf_second_split_val, alf_second_split_char, and alf_coeff_luma [i] [j].
  • the generated filter parameter FP is supplied to the variable length code encoder 22.
  • the filter parameter FP includes a syntax alf_enable_region_filter for specifying whether or not to perform filter processing for each characteristic value partial region, flags alf_filter_pattern and alf_second_split_val [k] for determining an initial division point in the initial division.
  • a flag alf_enable_second_split_val indicating whether or not included in the FP and a syntax alf_num_first_split_minus1 for specifying the division number AlfNumFirstSplit of the initial division are included. Specific values of these syntaxes are determined so that the encoding efficiency is further improved.
  • the adaptive filter unit 82 includes a first characteristic value calculation unit 521, a second characteristic value calculation unit 722, a characteristic index calculation unit 523, a filter coefficient derivation unit 624, and a filter 525. Since these parts have already been described, description thereof will be omitted.
  • Embodiment 1 and Embodiment 2 Of the syntaxes included in the filter parameter FP of the encoded data # 1 in the first embodiment, at least one of the syntaxes included in the filter parameter FP of the encoded data # 1 in the embodiment 1, and among the syntaxes included in the filter parameter FP of the encoded data # 3 in the second embodiment, A filter parameter FP ′ including at least one syntax is also included in the scope of the present invention.
  • Such a moving picture decoding apparatus that decodes the filter parameter FP ′ includes each part necessary for decoding the syntax included in the filter parameter FP ′ among the parts already described in the first and second embodiments. What is necessary is just composition.
  • the filter parameter FP of the encoded data # 1 in the first embodiment may include a syntax alf_second_split_char, alf_enable_second_split_val, and alf_second_split_val included in the filter parameter FP of the encoded data # 3.
  • the adaptive filter 50 included in the video decoding device 1 may be configured to include the characteristic selection flag decoding unit 732 and the characteristic value division point change flag decoding unit 718.
  • the filter parameter FP of the encoded data # 3 in the second embodiment may be configured not to include the syntax alf_region_disable_idc [i0].
  • the video decoding device 3 that decodes the encoded data # 3 is configured to perform adaptive filter processing on all unit regions.
  • the adaptive filter according to the present embodiment derives two characteristic values having different derivation methods for each unit region constituting the pre-filter image (for example, the deblocked decoded image P_DB). Then, each unit area is classified into one or a plurality of groups according to the two derived characteristic values. 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 spanned 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 of the two derived characteristic values is referred to as a first characteristic value X, and 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 referred to as a characteristic value area
  • each partial area set on the characteristic value area is also referred to as a characteristic value partial area.
  • the following combinations are possible as the first characteristic value X and the second characteristic value Y.
  • First characteristic value X image directionality
  • second characteristic value Y image activity level
  • First characteristic value X prediction mode and image directionality
  • second characteristic value Y image activity level
  • First characteristic value X Prediction mode
  • second characteristic value Y Image activity.
  • First characteristic value X Image specific direction activity
  • second characteristic value Y Image specific direction activity.
  • First characteristic value X y coordinate of unit area
  • second characteristic value Y x coordinate of unit area
  • First characteristic value X x coordinate of unit area
  • second characteristic value Y unit area Y-coordinate
  • 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
  • second characteristic value Y Image activity Characteristic value of 1 X: slice number
  • second characteristic value Y image activity level • first characteristic value X: average pixel value
  • second characteristic value Y image activity level
  • 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.
  • the adaptive filter according to the present embodiment divides the characteristic value region into the partial regions hierarchically by the first-stage division and the second-stage division.
  • the division at the first stage is, for example, a division for the first characteristic value X
  • the division at the second stage is a division for the second characteristic value Y.
  • a configuration in which both the first stage division and the second stage division are divisions related to the characteristic values X and Y is also possible.
  • each partial region is composed of one or a plurality of division units DU.
  • the boundary of each division unit is determined using a division point (also referred to as a characteristic value division point) set for each characteristic value.
  • Each division unit DU is specified using an index [i] [j] as described in the first embodiment with reference to FIG.
  • the first division is also referred to as initial division
  • the second division is also referred to as subdivision.
  • Encoded data # 5 The data structure of encoded data # 5 generated by the video encoding device 6 according to the present embodiment and decoded by the video decoding device 5 is substantially the same as the data structure of the encoded data # 1 according to the first embodiment. However, the configuration of the filter parameter FP is different. The configuration of the filter parameter FP will be described in detail in the following configuration example. Note that, among the syntaxes included in the filter parameter FP, descriptions of the syntaxes already described in the first and second embodiments are omitted.
  • FIG. 23A is a syntax table showing each syntax included in the filter parameter FP (denoted as alf_param () in FIG. 23A) according to this configuration example.
  • the filter parameter FP includes adaptive_loop_filter_flag, alf_feature_mode, alf_first_split_type, and alf_filter_pattern [j].
  • Alf_feature_mode is a syntax for specifying the characteristic values X and Y.
  • Alf_first_split_type is a syntax that specifies the mode of division in the first stage. For example, alf_first_split_type specifies the number of divisions in the first stage.
  • alf_filter_pattern [j] is a flag that specifies whether or not the same filter coefficient group is used between adjacent partial regions with respect to the characteristic value, and is a division unit DU [i] [j specified by the index [i] [j]. ] Specifies whether to apply the same filter coefficient group as the division unit DU [i] [j-1] specified by the index [i] [j-1].
  • index [i] [j] may be expressed as the index [X] [Y].
  • alf_filter_pattern When alf_filter_pattern is 1, as indicated by alf_coeff_set_luma (i, j), which will be described later, the moving picture decoding apparatus 5 determines the filter coefficient group of the division unit DU [i] [j] from the encoded data # 5. Decrypt. When alf_filter_pattern is 0, the video decoding device 5 does not decode the filter coefficient group from the encoded data # 5, and the process indicated by alf_coeff_copy_luma (i, j, i, j-1) described later I do.
  • the characteristic value X and characteristic value Y are calculated using the vertical activity (or vertical gradient) and the horizontal activity (or horizontal gradient). To do.
  • the characteristic value X is an angle (direction) and has three levels.
  • the characteristic value Y is the activity and has five levels.
  • ACT_H and ACT_V are the activity in the horizontal direction and the activity in the vertical direction, respectively, and are calculated by the video decoding device 5 based on the following equations.
  • xx and yy represent the x coordinate and y coordinate of each pixel in the target unit area, respectively, and s ′ [xx, yy] represents the pixel value of the pixel at coordinates [xx, yy].
  • s ′ [xx, yy] represents, for example, the pixel value of the deblocked decoded image P_DB at the coordinates [xx, yy] (the same applies hereinafter).
  • M and N represent the number of pixels in the x direction and the number of pixels in the y direction, respectively, and BitDepthY represents the bit depth for the characteristic value Y.
  • ActIdx is an index indicating the level of activity and is determined as follows.
  • alf_feature_mode 1
  • the characteristic value is calculated by using two oblique direction activities.
  • the characteristic value X is an angle and has three levels.
  • the characteristic value Y is the activity and has five levels.
  • ACT_D0 and ACT_D1 are the degrees of activity in oblique directions substantially orthogonal to each other, and are calculated by the video decoding device 5 based on the following formula.
  • ActIdx is an index indicating the magnitude of the activity, and can be obtained as described above.
  • alf_feature_mode 2
  • alf_feature_mode 2
  • the characteristic value is calculated using both the vertical activity, the horizontal activity, and the two diagonal activities.
  • the characteristic value X is an angle and has four levels.
  • the characteristic value Y is activity and has four levels.
  • Y ActIdx (4 steps)
  • ACT_H the case where ACT_H is minimum means the case where ACT_H is the minimum among ACT_H, ACT_V, ACT_D0, and ACT_D1 (the same applies to others). More specifically, the characteristic value X can also be expressed as follows.
  • min (A, B, C, D) is a function that returns the smallest value among the arguments A, B, C, D.
  • alf_feature_mode 3
  • vertical activity and horizontal activity are used.
  • Idx_ACT_V Idx_ACT_V (4 levels)
  • Y Idx_ACT_H (4 levels)
  • Idx_ACT_V and Idx_ACT_H are indices of vertical activity and horizontal activity, respectively, given by the following equations.
  • alf_feature_mode 4
  • the characteristic value X is determined using whether or not the prediction mode for the target unit region is the intra prediction mode and the angle.
  • Y ActIdx (4 steps)
  • alf_feature_mode 5 When alf_feature_mode is 5, when the characteristic value X is set, whether the prediction mode for the target unit region is the intra prediction mode (I block) or the inter prediction mode Is determined by whether it is a unidirectional prediction (P block) or a bidirectional prediction B block.
  • the width and height of the image (frame) are width and height
  • the width RW and height RH of the divided area are obtained by the following formula so as to be a multiple of the LCU size (tree block size).
  • RW INT (width / NH / LCU_WIDTH) * LCU_WIDTH
  • RH INT (height / NV / LCU_HEIGHT) * LCU_ HEIGHT
  • LCU_WIDTH and LCU_HEIGHT indicate the width and height of the LCU, respectively
  • NH and NV indicate the number of horizontal divisions and the number of vertical divisions, respectively
  • INT (x) represents a function for converting x into an integer. In the following calculation, although not explicitly shown as INT, the result of division between integers is treated as an integer.
  • alf_feature_mode 6
  • alf_feature_mode 6
  • the x coordinate and y coordinate in the image (frame) of the target unit region are used.
  • X y coordinate / RH (NV stage)
  • Y x coordinate / RW (NH stage)
  • the division using the in-image (frame) coordinates of the target unit region as the characteristic values X and Y may be referred to as coordinate space division.
  • the alf_feature_mode can take a value from 0 to 7, and the characteristic values X and Y can be specifically specified by each value of the alf_feature_mode. Further, for example, a configuration in which 0 to 3 is set as alf_feature_mode, or a configuration in which 0 to 5 is set as alf_feature_mode may be used.
  • the alf_feature_mode may take a value from 0 to 1, and the alf_feature_mode may be expressed by 1 bit.
  • each value of alf_feature_mode and the corresponding characteristic values X and Y is not limited to the above example.
  • the method described in the first and second embodiments can be used as the method for calculating the characteristic value X and the characteristic value Y. That is, an average pixel value, a slice number, or the like can be used.
  • alf_first_split_type is a syntax that specifies the mode of the initial split.
  • AlfMaxFirstSplit shown in FIG. 23A is a syntax that specifies the maximum number of divisions for initial division
  • AlfMaxSecondSplit is a syntax that specifies the maximum number of divisions for re-division.
  • AlfMaxFirstSplit NX
  • AlfMaxSecondSplit NY. The correspondence between the values that NX and NY can take and each value of alf_feature_mode is as shown in FIG.
  • FIG. 25 is a schematic diagram illustrating the division of the characteristic value area when alf_feature_mode is 0 or 1.
  • each partial area is constituted by one division unit.
  • the dotted line in FIG. 25 has shown the boundary of each division unit.
  • FIG. 25 shows that the characteristic value area is initially divided according to the characteristic value X and further subdivided according to the characteristic value Y.
  • the moving image decoding device 5 decodes a filter coefficient group for each of the characteristic value partial regions obtained by the division, and uses it for the filter processing by the adaptive filter.
  • the characteristic value area is divided into two partial areas with respect to the characteristic value X.
  • the characteristic value area is divided into three partial areas with respect to the characteristic value X.
  • each partial area obtained by the initial division is further divided into a maximum of five partial areas with respect to the characteristic value Y as shown in FIG.
  • FIG. 26 is a schematic diagram showing the division of the characteristic value area when alf_feature_mode is 2 or 3.
  • each partial area is composed of one division unit.
  • the dotted line in FIG. 26 has shown the boundary of each division unit.
  • the characteristic value area is divided into two partial areas with respect to the characteristic value X.
  • the characteristic value area is divided into four partial areas with respect to the characteristic value X.
  • each partial area obtained by the initial division is further divided into a maximum of four partial areas with respect to the characteristic value Y as shown in FIG.
  • alf_filter_pattern [j] takes 0 or 1, as described above, and indicates whether each corresponding partial region uses the same filter coefficient as the previous partial region.
  • the video decoding device 5 uses the same filter coefficient as that of the previous partial region specified by [j-1]. In the case of 1, the moving picture decoding apparatus 5 uses a filter coefficient different from the previous partial area specified by [j-1] by decoding it from the filter parameter.
  • Alf_coeff_set_luma (i, j) shown in FIG. 23 (b) uses [i] [j] specifying the target division unit DU as an argument, and the filter coefficient alf_coeff_luma [i] [j] [k] for the target division unit. Is a process that returns.
  • the moving picture decoding apparatus 5 processes a loop from 0 to NX-1 with respect to the loop index i.
  • the merge designation table merged referred to using NX, alf_first_split_type, and loop index i is referenced.
  • the value merge [AlfMaxFirstSplit] [alf_first_split_type] [i] on the merge specification table indicates whether or not the partial area corresponding to the index i is merged with the partial area corresponding to the index i-1 in the initial division.
  • Flag merge designation flag. The merge designation flag is 1 when the merge is designated, and 0 when the merge is not designated.
  • FIG. 24B shows a table showing the correspondence between each value of the merge specification flag merged [AlfMaxFirstSplit] [alf_first_split_type] [i] and each value of AlfMaxFirstSplit, alf_first_split_type, and i.
  • the index [i] [j] is also expressed as (i, j).
  • the moving picture decoding apparatus 5 decodes alf_filter_pattern. Specifically, the loop from 1 to NY-1 is processed for the loop index j. In the loop, alf_filter_pattern is decoded for each j.
  • alf_filter_pattern When alf_filter_pattern is 1, it means that different filter coefficients are assigned to the division unit (i, j-1) and the division unit (i, j). At this time, the moving picture decoding apparatus 5 decodes the filter coefficient group of the partial area (i, j) from the encoded data, as indicated by alf_coeff_set_luma (i, j).
  • the video decoding device 5 does not decode the filter coefficient group from the encoded data # 5 for the division unit (i, j), and the process indicated by alf_coeff_copy_luma (i, j, i, j-1) I do.
  • alf_coeff_copy_luma (di, dj, ⁇ si, sj) represents a filter coefficient group decoded for the division unit (si, sj) as a filter of the division unit (di, dj). This means the process of copying to the coefficient group.
  • the filter coefficient group of the division unit (i, j ⁇ 1) whose characteristic value Y is one smaller than the division unit (i, j) is copied to the filter coefficient group of the division unit (i, j).
  • N represents the total number of filter coefficients included in the filter coefficient group.
  • a loop from 0 to NY-1 is processed for the loop index j.
  • the filter coefficient group AlfRegionFilterCoeff is calculated by the following formula.
  • AlfRegionFilterCoeff [X] [Y] [k] alf_coeff_luma [X] [Y] [k]
  • k is a value from 0 to N-1.
  • the filter coefficient group alf_coeff_luma in the encoded data can be obtained by predictively encoding the filter coefficient group AlfRegionFilterCoeff used for the filter processing.
  • alf_coeff_luma can be encoded as a prediction difference (difference value) between adjacent filter coefficient groups.
  • alf_coeff_set_luma and alf_coeff_copy_luma shown in FIGS. 23 (b) and 23 (c) are replaced with those shown in FIGS. 40 (a) and 40 (b), respectively.
  • the filter coefficient group AlfRegionFilterCoeff [si] [sj] [k] decoded for the division unit (si, sj) is changed to the filter coefficient group AlfRegionFilterCoeff [di] [dj] [k] of the division unit (di, dj). make a copy.
  • the direction in which the filter coefficient group alf_coeff_luma is predicted can be switched as in the first embodiment.
  • alf_coeff_set_luma shown in FIG. 23B is replaced with the one shown in FIG.
  • AlfRegionFilterCoeff [i-1] [j] [k] the predicted value of the filter coefficient of AlfRegionFilterCoeff [i] [j] [k]
  • the difference (or sum) between the predicted value and the difference value is used.
  • the prediction direction selection flag alf_region_pred_luma may be used as a flag indicating that prediction is not performed when alf_region_pred_luma is 0 and prediction is performed when it is 1.
  • AlfRegionFilterCoeff [i] [j] [k] alf_coeff_luna [i] [j] [k], otherwise AlfRegionFilterCoeff [i] [j] AlfRegionFilterCoeff [i-1] [j] [k] is used as the predicted value of the filter coefficient of [k].
  • FIG. 27 and FIG. 28 are schematic views showing the division of the characteristic value area in this modification.
  • this modification when the characteristic value Y is 0, no division is performed on the characteristic value X.
  • FIG. 27 is a schematic diagram showing division of the characteristic value area when alf_feature_mode is 0 or 1 in the present modification.
  • the characteristic value X can be divided into six steps and the characteristic value Y can be divided into three steps, which are divided into a maximum of 16 partial areas.
  • splitting is performed when the characteristic value Y is 0 and other than 0.
  • FIG. 28 is a schematic diagram showing division of the characteristic value area when alf_feature_mode is 2 or 3.
  • the characteristic value X can be divided into five stages and the characteristic value Y can be divided into four stages, which are divided into a maximum of 17 partial areas.
  • splitting is performed when the characteristic value Y is 0 and other than 0.
  • FIG. 29 shows a syntax table of the filter parameter FP according to this modification.
  • the video decoding device 5 always performs decoding of alf_coeff_set_luma (0, 0).
  • a loop from 0 to AlfMaxFirstSplit ⁇ 1 is processed for the loop index i.
  • alf_filter_pattern is decoded.
  • a loop from 2 to AlfMaxSecondSplit-1 is processed for the loop index j.
  • alf_filter_pattern is decoded for each j.
  • the video decoding device 5 decodes the filter coefficient group for the division unit (i, j) from the encoded data # 5, as indicated by the above-described alf_coeff_set_luma (i, j). To do.
  • alf_filter_pattern when alf_filter_pattern is 0, the video decoding device 5 does not decode the filter coefficient group from the encoded data # 5, and is represented by alf_coeff_copy_luma (i, j, i, j-1). Process.
  • the loop from 1 to AlfMaxSecondSplit-1 is processed for the loop index j.
  • the partial area (i-1, j) with the smaller characteristic value X is the filter coefficient group and the filter coefficient of the partial area (i, j) By copying to the group, the same filter coefficient group is copied to all the partial areas merged in the initial division.
  • alf_coeff_luma may be a difference value from the predicted value.
  • the filter coefficient group AlfRegionFilterCoeff used for the filter processing is calculated by the method shown in FIG.
  • the moving picture decoding apparatus 5 decodes the filter coefficient group AlfRegionFilterCoeff [X] [Y] [k] corresponding to the characteristic value X and the characteristic value Y from the encoded data # 5 by the above processing.
  • FIG. 30 is a syntax table showing each syntax included in the filter parameter FP (indicated as alf_param () in FIG. 30) according to this configuration example.
  • the filter parameter FP includes adaptive_loop_filter_flag, alf_feature_mode2, alf_horiz_split_num_minus1, alf_vert_split_num_minus1, alf_first_split_type, and alf_filter_pattern [j].
  • Alf_feature_mode2 is a syntax for specifying the characteristic values X and Y.
  • alf_horiz_split_num_minus1 is a syntax for specifying the horizontal division number NH
  • alf_vert_split_num_minus1 is a syntax for specifying the vertical division number NV.
  • NH alf_horiz_split_num_minus1 + 1
  • NV alf_vert_split_num_minus1 + 1.
  • the width RW and height RH of the divided area can be obtained from the NW, NH, and LCU size by the following formula.
  • RW INT (width / NH / LCU_WIDTH) * LCU_WIDTH
  • RH INT (height / NV / LCU_HEIGHT) * LCU_ HEIGHT
  • LCU_WIDTH and LCU_HIGHT are the width and height of the LCU, and RW and RH are a constant multiple of the LCU size according to the above formula.
  • initial division is performed according to the characteristic value X, and re-division is performed according to the characteristic value Y.
  • FIG. 31 is a schematic diagram of division when alf_feature_mode2 is 0.
  • the characteristic value X and characteristic value Y are as follows.
  • X y coordinate / RH (NV stage)
  • Y x coordinate / RW (NH stage)
  • AlfMaxFirstSplit NV
  • AlfMaxSecondSplit NH.
  • the vertical partial area is divided into two.
  • each partial area obtained by the initial division is subdivided into a maximum of NH area areas in the horizontal direction.
  • FIG. 32 is a schematic diagram of division when alf_feature_mode2 is 1.
  • the characteristic value X and characteristic value Y are as follows.
  • alf_feature_mode2 1
  • initial division is performed according to the x coordinate
  • re-division is performed according to the y coordinate.
  • AlfMaxSecondSplit NV.
  • alf_first_split_type When alf_first_split_type is 2, the horizontal partial area is divided into NH areas.
  • each initial divided region is subdivided into a maximum of NH regions in the vertical direction.
  • the configuration is the same as that of the configuration example 1, and thus the description thereof is omitted.
  • FIG. 33 shows the syntax of the filter parameter FP according to this configuration example.
  • the filter parameter FP includes adaptive_loop_filter_flag, alf_feature_mode3, alf_first_split_type, and alf_filter_pattern [j].
  • Alf_feature_mode3 indicates the characteristic value calculation mode and takes a value of 0, 1.
  • the division / merge on the characteristic value X axis or the characteristic value Y axis on the characteristic value (X, Y) is merged on the x axis and the y axis on the original characteristic value. It corresponded. That is, if a two-dimensional space composed of original characteristic values is called an original characteristic value space, and a two-dimensional space composed of characteristic values (X, Y) is called a characteristic value space, the division of both spaces has the same structure. Yes.
  • This configuration example is different from configuration example 1 and configuration example 2 in the following points.
  • each of the characteristic value X and the characteristic value Y is calculated from one of the original characteristic value x or the original characteristic value y.
  • each of the characteristic values X and Y has a 1: 1 correspondence with each of the original characteristic values x and y, but in this configuration example, the original characteristic values (x, y ) And the characteristic value (X, Y) can correspond to M: N (where M ⁇ N).
  • the characteristic value (X, Y) calculation function merging is possible in the characteristic value (X, Y) calculation function, and therefore, the number of filter coefficients determined by AlfNumFirstSplit and AlfNumSecondSplit may be decoded and stored.
  • the characteristic value calculation can be merged with respect to the characteristic value X and the characteristic value Y, but the characteristic Y to be re-divided is also merged by copying at the time of decoding of the already decoded filter coefficient group.
  • alf_feature_mode3 indicates the characteristic value calculation mode and takes a value of 0, 1.
  • x DirIdx (4 levels)
  • y ActIdx (4 steps)
  • FIG. 34 is a schematic diagram showing division in this configuration example.
  • alf_first_split_type 0
  • the filter coefficient groups alf_coeff_luma [0] [0] and AlfRegionFilterCoeff [0] [0] whose characteristic value X and characteristic value Y are both 0 are set. Decrypt.
  • the table tbl_type1 [k] is a function for obtaining the characteristic value Y from the address k determined in the raster order in the original characteristic space, and has the following values.
  • tbl_type1 [] ⁇ 0, 3, 4, 7, 1, 2, 5, 6 ⁇
  • alf_first_split_type 1
  • the original characteristic space is divided into two regions in the vertical direction, and the partial region obtained by the initial division is divided by one-dimensional division.
  • the one-dimensional division means “for the target partial area [j], the partial area immediately before the target partial area in the processing order according to the allocation designation information (alf_filter_pattern [j]) associated with the target partial area [ j-1], or a filter coefficient different from the filter coefficient assigned to the immediately preceding partial region is assigned.
  • the re-division index defined in the table tbl_type1 [k] is defined such that the difference between the index values of adjacent areas (division units) is 1 in the original characteristic space. In order to make neighboring regions in the original characteristic space have close values, it is preferable to assign indexes in the order of one stroke in the original characteristic space. In this way, by calculating the characteristic value Y as a function of the original characteristic value (x, y), the two-dimensional characteristic value (x, y) in the original characteristic space (x, y) can be obtained in the one-dimensional characteristic value Y.
  • the adjacency relationship can be expressed to some extent.
  • tbl_type2 [k] is a function for obtaining the characteristic value X or characteristic value Y from the address k determined in raster order in the original characteristic space, and has the following values.
  • the original characteristic space is divided into a square shape in the initial division, and the partial area obtained by the initial division is further divided in the subdivision.
  • the characteristic value X as a function of the original characteristic value (x, y)
  • the two-dimensional characteristic value (x, y) in the original characteristic space (x, y) can be obtained in the one-dimensional characteristic value X.
  • An initial division expressing the adjacency relationship can be performed.
  • the table tbl_type3 [k] is a function for obtaining the characteristic value X or characteristic value Y from the address k determined in raster order in the original characteristic space, and has the following values.
  • FIG. 42 is a schematic diagram illustrating division in another configuration example of configuration example 3.
  • alf_first_split_type 0
  • the filter coefficient groups alf_coeff_luma [0] [0] and AlfRegionFilterCoeff [0] [0] whose characteristic value X and characteristic value Y are both 0 are set. Decrypt.
  • the table tbl_type1 [k] is a function for obtaining the characteristic value Y from the address k determined in the raster order in the original characteristic space, and has the following values.
  • tbl_type1 [] ⁇ 0, 3, 4, 7, 1, 2, 5, 6 ⁇
  • the table tbl_type1b [k] is a function for obtaining the characteristic value Y from the address k determined in raster order in the original characteristic space, and has the following values.
  • tbl_type1b [] ⁇ 0, 1, 3, 2, 4, 5, 7, 6 ⁇
  • max3 (x, y, z) is a function that clips z to be greater than x and less than y.
  • a mode that uses only one dimension among the two-dimensional original characteristic values may be provided.
  • the activity is preferable as the characteristic value used in the one-dimensional division, and in the coordinate space division, the y coordinate is preferable.
  • the initial division is performed on the axis of the characteristic value X and the one-dimensional division is performed on the axis of the characteristic value Y, as in the configuration examples 1 and 2.
  • division with a high degree of freedom can be performed in the original characteristic value space.
  • the degree of freedom of the initial division in the original characteristic value space can be increased, and the degree of freedom of the scanning order in the one-dimensional division can be increased.
  • the function for calculating the characteristic value (X, Y) from the original characteristic value (x, y) is a function corresponding to N to M (where N ⁇ M)
  • the regions in the original characteristic value can be easily merged. Is possible. These can be applied in the same manner without changing the filter coefficient decoding process when the original characteristic values are calculated not only from the values calculated from the decoded image such as the degree of activity and the angle but also from the coordinates.
  • FIG. 43 shows the syntax of the filter parameter FP according to this configuration example.
  • the filter parameter FP includes adaptive_loop_filter_flag, alf_feature_mode, alf_merge_type, and alf_filter_pattern [j].
  • FIG. 44 is a schematic diagram showing division in this configuration example.
  • AlfNumSplit 16.
  • the filter coefficient decoding unit decodes alf_merge_type.
  • alf_merge_type corresponds to alf_first_split_type in Configuration Example 3.
  • alf_first_split_type has a syntax that affects both initial division and subdivision, but in configuration example 4, since initial division is not performed, only the latter division (corresponding to subdivision in configuration example 3) is used. This is an influencing syntax.
  • the table tbl_type40 [k] is a function for obtaining the characteristic value Y from the address k determined in raster order in the original characteristic space, and has the following values.
  • tbl_type40 [] ⁇ 0, 1, 2, 3, 7, 6, 5, 4, 8, 9, 10, 11, 15, 14, 13, 12 ⁇
  • the table tbl_type41 [k] is a function for obtaining the characteristic value Y from the address k determined in the raster order in the original characteristic space, and has the following values.
  • tbl_type41 [] ⁇ 0, 1, 2, 3, 15, 10, 9, 4, 14, 11, 8, 5, 13, 12, 7, 6 ⁇
  • the table tbl_type42 [k] is a function for obtaining the characteristic value Y from the address k determined in the raster order in the original characteristic space, and has the following values.
  • tbl_type42 [] ⁇ 0, 15, 14, 13, 1, 2, 11, 12, 4, 3, 10, 9, 5, 6, 7, 8 ⁇
  • the table tbl_type43 [k] is a function for obtaining the characteristic value Y from the address k determined in the raster order in the original characteristic space, and has the following values.
  • tbl_type43 [] ⁇ 0, 1, 4, 5, 15, 2, 3, 6, 14, 11, 10, 7, 13, 12, 9, 8 ⁇
  • the characteristic value is obtained.
  • the function that calculates the characteristic value from the original characteristic value is changed by alf_merge_type that defines the division method. Even when the initial division is not performed, it is possible to perform division that enables merging in various directions in the original characteristic value space.
  • the characteristic value X-axis is not divided (characteristic value X is always 0), and the characteristic value Y-axis is divided from the original characteristic value (x, y) to the characteristic value Y.
  • merging is performed by utilizing the characteristics of the two-dimensional space in the original characteristic values.
  • FIG. 35 shows the syntax of the filter parameter FP according to this configuration example.
  • the filter parameter FP includes adaptive_loop_filter_flag, alf_block_mode_flag, alf_feature_mode, alf_feature_mode2, alf_first_split_num_minus1, and alf_filter_pattern [j].
  • Alf_block_mode_flag is a syntax that specifies whether to perform feature space division or coordinate space division.
  • alf_block_mode_flag 0
  • alf_feature_mode decoded. Thereafter, the processing is performed according to the configuration example 1 described above.
  • alf_block_mode_flag 1 since it is coordinate space division, alf_feature_mode2 is decoded. Thereafter, the processing is performed according to the configuration example 2.
  • the syntax alf_block_mode_flag in the encoded data is used to identify the type of the original characteristic space, in this example, whether to perform feature space division or coordinate space division, and After the feature space types are distinguished, the final characteristic value calculation method may be determined using the syntax (alf_feature_mode or alf_feature_mode2) in the encoded data, which is determined for each type of the original characteristic space.
  • FIG. 38 is a diagram illustrating a manner of dividing the characteristic value region when the filter parameter FP according to the present configuration example is decoded.
  • the characteristic value region is divided into quadtrees in both initial division and subdivision.
  • Video decoding device 5 The video decoding device 5 according to the present embodiment includes an adaptive filter 90 instead of the adaptive filter 50 provided in the video decoding device 1 according to the first embodiment.
  • Other configurations of the video decoding device 5 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. 36 is a block diagram showing the configuration of the adaptive filter 90. As shown in FIG. 36, the adaptive filter 90 includes an adaptive filter information decoding unit 91 and an adaptive filter unit 92.
  • the adaptive filter information decoding unit 91 includes a region-specific tap number decoding unit 911, a region structure decoding unit 912, a feature amount mode decoding unit 913, a filter coefficient decoding unit 914, and a characteristic-specific filter coefficient storage unit 915. I have.
  • the area-specific tap number decoding unit 911 decodes the syntax alf_length_luma_minus5_div2 [i] (0 ⁇ i ⁇ AlfNumFirstSplit) included in the filter parameter FP.
  • the decoded syntax alf_length_luma_minus5_div2 [i] is allocated to the characteristic value partial region CPR [i] and supplied to the filter coefficient decoding unit 914.
  • the region structure decoding unit 912 decodes the syntax alf_first_split_type and alf_filter_pattern [j] included in the filter parameter FP.
  • the decoded syntax alf_first_split_type and alf_filter_pattern [j] are supplied to the filter coefficient decoding unit 914.
  • the decoded syntax alf_first_split_type has the first characteristic value calculation unit 921 and the second characteristic, respectively. It is supplied to the value calculation unit 922 (arrow not shown).
  • the feature amount mode decoding unit 913 decodes the syntax alf_feature_mode.
  • the decoded syntax alf_feature_mode is supplied to the filter coefficient decoding unit 914.
  • the filter coefficient decoding unit 914 decodes the syntax alf_coeff_luma [i] [j] [k] with reference to alf_length_luma_minus5_div2 [i], alf_filter_pattern [j], and alf_first_split_type. Further, the filter coefficient decoding unit 914 calculates a filter coefficient group AlfRegionFilterCoeff used for the filter processing using the following equation.
  • the filter coefficient decoding unit 914 uses the decoded filter coefficient group AlfRegionFilterCoeff [i] [j-1] [k] for the division unit DU [i] [j-1] as a predicted value.
  • the division unit DU [i] [ The filter coefficient group AlfRegionFilterCoeff [i] [j] [k] for j] is decoded.
  • the filter coefficient group RegionFilterLuma [i] [j] [k] decoded by the filter coefficient decoding unit 914 is stored.
  • the adaptive filter unit 92 includes a first characteristic value calculation unit 921, a second characteristic value calculation unit 922, a filter coefficient allocation unit 923, and a filter unit 924.
  • the first characteristic value calculation unit 921 and the second characteristic value calculation unit 922 calculate the characteristic value X and the characteristic value Y for the target unit region, respectively.
  • the calculated characteristic values X and Y are supplied to the filter coefficient assigning unit 923. Since the calculation method of the characteristic value X and the characteristic value Y has been described in the configuration example of the filter parameter FP, description thereof is omitted here.
  • the filter coefficient allocating unit 923 reads the filter coefficient RegionFilterLuma [i] [j] corresponding to the index (i, j) in the characteristic value area allocated to the target unit area from the filter coefficient storage unit 915 for each characteristic and reads it out.
  • the filter coefficient RegionFilterLuma [i] [j] is assigned to the target unit area.
  • the filter coefficient RegionFilterLuma [i] [j] assigned to the target unit region is supplied to the filter unit 924.
  • the filter unit 924 generates a filtered decoded image P_FL in the target unit region by performing a filtering process using the filter coefficient RegionFilterLuma [i] [j] on the target unit region.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15. Since specific processing by the filter unit 924 is the same as that of the filter unit 525 in the first embodiment, the description thereof is omitted here.
  • the moving image encoding device 6 according to the present embodiment includes an adaptive filter 100 instead of the adaptive filter 60 included in the moving image encoding device 2 according to the first embodiment.
  • Other configurations of the video encoding device 6 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 100 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 100 also supplies various types of adaptive filter information used for the filter processing to the variable length code encoding unit 22 as filter parameters FP.
  • the variable length code encoding unit 22 encodes the filter parameter FP as a part of the encoded data # 5.
  • FIG. 37 is a block diagram showing the configuration of the adaptive filter 100. As shown in FIG. As shown in FIG. 37, the adaptive filter 100 includes an adaptive filter information setting unit 101 and an adaptive filter unit 102.
  • the adaptive filter information setting unit 101 includes a region-specific tap number setting unit 1011, a region structure setting unit 1012, a feature amount mode setting unit 1013, a filter coefficient residual generation unit 1014, and a characteristic-specific filter coefficient storage unit. 1015 and a filter parameter generation unit 1016.
  • the area-specific tap number setting unit 1011 sets the syntax alf_length_luma_minus5_div2 [i] for designating the number of taps for the characteristic value partial area CPR [i] obtained by the initial division.
  • the set syntax alf_length_luma_minus5_div2 [i] is supplied to the filter parameter generation unit 1016.
  • the area structure setting unit 1012 sets alf_first_split_type and alf_filter_pattern [j].
  • the set syntax alf_first_split_type and alf_filter_pattern [j] are supplied to the filter coefficient residual generation unit 1014.
  • the set syntax alf_first_split_type has the first characteristic value calculation unit 921 and the second characteristic, respectively. It is supplied to the value calculation unit 922 (arrow not shown).
  • the feature amount mode setting unit 1013 sets the syntax alf_feature_mode.
  • the set syntax alf_feature_mode is supplied to the filter parameter generation unit 1016.
  • alf_length_luma_minus5_div2 [i] alf_first_split_type, and alf_filter_pattern [j] are set so that the coding efficiency is further improved.
  • the filter coefficient residual generation unit 1014 generates the syntax alf_coeff_luma [i] [j] [k] by the following equation.
  • the generated filter coefficient residual alf_coeff_luma [i] [j] [k] is supplied to the filter parameter generation unit 1016.
  • the characteristic-specific filter coefficient storage unit 1015 stores a filter coefficient group AlfRegionFilterCoeff [i] [j] [k] supplied from a filter coefficient deriving unit 1023 described later.
  • the filter parameter generation unit 1016 generates a filter parameter FP from the syntax alf_length_luma_minus5_div2 [i0], alf_filter_pattern [j], alf_first_split_type, and alf_coeff_luma [i] [j] [k].
  • the generated filter parameter FP is supplied to the variable length code encoder 22.
  • the adaptive filter unit 102 includes a first characteristic value calculation unit 921, a second characteristic value calculation unit 922, a filter coefficient derivation unit 923, and a filter unit 924.
  • the filter coefficient deriving unit 1023 derives a filter coefficient RegionFilterLuma [i] [j] such that an error between the filtered decoded image P_FL and the encoding target image in the target unit region becomes smaller.
  • the derived filter coefficient RegionFilterLuma [i] [j] is supplied to the filter unit 924 and stored in the characteristic-specific filter coefficient storage unit 1015.
  • the adaptive filter according to the present embodiment derives two characteristic values having different derivation methods for each unit region constituting the pre-filter image (for example, the deblocked decoded image P_DB). Then, each unit area is classified into one or a plurality of groups according to the two derived characteristic values. 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 of the two derived characteristic values is referred to as a first characteristic value X, and 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 referred to as a characteristic value area
  • each partial area set on the characteristic value area is also referred to as a characteristic value partial area.
  • the following combinations are possible as the first characteristic value X and the second characteristic value Y.
  • First characteristic value X image directionality
  • second characteristic value Y image activity level
  • First characteristic value X prediction mode and image directionality
  • second characteristic value Y image activity level
  • First characteristic value X Prediction mode
  • second characteristic value Y Image activity.
  • First characteristic value X Image specific direction activity
  • second characteristic value Y Image specific direction activity.
  • First characteristic value X y coordinate of unit area
  • second characteristic value Y x coordinate of unit area
  • First characteristic value X x coordinate of unit area
  • second characteristic value Y unit area Y-coordinate
  • 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
  • second characteristic value Y Image activity Characteristic value of 1 X: slice number
  • second characteristic value Y image activity level • first characteristic value X: average pixel value
  • second characteristic value Y image activity level
  • 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.
  • First characteristic value X Image activity level
  • second characteristic value Y In the case of directional coordinate space division of an image, the following characteristic values are used.
  • First characteristic value X x-coordinate of unit area
  • second characteristic value Y y-coordinate of unit area
  • characteristic space division there are five levels for characteristic value X and for characteristic value Y. And divide it into three stages.
  • the characteristic value X is divided into four stages and the characteristic value Y is divided into four stages.
  • a moving picture decoding apparatus that adjusts the code amount of the filter coefficient group and the degree of freedom of area division is realized by merging the partial areas.
  • 47 to 51 are diagrams showing examples of merging of partial areas.
  • FIG. 47 is an example of coordinate space division. Assume that a region surrounded by a thick line in the figure is a partial region generated by merging. In the figure, when each partial area is processed (scanned) in order by raster scanning, when merging with a partial area adjacent to the left (partial area having the same characteristic value X), an arrow pointing to the left, and a partial area adjacent above When merging with (partial region having the same characteristic value Y), an upward arrow is shown.
  • the numbers in the figure are filter coefficient indexes assigned to each partial area, and are shown in the partial area to which a new filter coefficient group is assigned when each partial area is scanned by raster scan in order.
  • FIG. 47 is an example of coordinate space division. Assume that a region surrounded by a thick line in the figure is a partial region generated by merging. In the figure, when each partial area is processed (scanned) in order by raster scanning, when merging with a partial area adjacent to the left (partial area having the same characteristic
  • FIG. 48 is an example of feature space division. This example also encodes / decodes whether or not each partial area is merged in raster order, and in the case of further merging, encodes / decodes a flag that distinguishes between merging with the left and merging with the right. It can be expressed by a device.
  • FIG. 49 is another example of coordinate space division.
  • the example of FIG. 49 is the same as general slice division.
  • This division method cannot be expressed by the apparatus and method of Example 1 in the candidate derivation process, and is located in the leftmost column in the raster scan order, that is, at the left end, one level higher in the raster scan order. It is necessary to merge with the rightmost area of the line.
  • Such an apparatus and method are described in Example 2 in the candidate derivation process.
  • FIG. 50 is still another example of coordinate space division.
  • the numbers shown in FIG. 50G are examples of the partial region scan order.
  • a partial area is defined by encoding whether or not it can be merged with the partial area scanned immediately before in a one-dimensional manner, as shown in FIG. It is appropriate to use a writing scan method. In order to express such a case, it is only necessary to express combinations of adjacent relationships shown in FIGS. 50 (a) to 50 (f).
  • the method of performing the merge selection of the left and top in the raster scan order can express FIG. 50A to FIG. 50E, but cannot express FIG. 50F.
  • a method of using the merge indicated by the thick arrow in FIG. 50F as an option will be described in Example 3 in the candidate derivation process. In the example 3 of the candidate derivation process, a one-stroke letter can be merged.
  • FIG. 51 shows still another example of coordinate space division.
  • the numbers shown in FIG. 51 are filter coefficient indexes of partial areas.
  • the partial areas indicated by bold letters correspond to blocks for decoding new coefficients when decoding in raster scan order
  • the partial areas indicated by non-bold numbers are areas that have already been decoded without decoding new coefficients. This block performs merging.
  • FIGS. 51 show still another example of coordinate space division.
  • the numbers shown in FIG. 51 are filter coefficient indexes of partial areas.
  • the partial areas indicated by bold letters correspond to blocks for decoding new coefficients when decoding in raster scan order
  • the partial areas indicated by non-bold numbers are areas that have already been decoded without decoding new coefficients. This block performs merging.
  • an adjacent partial area having the same characteristic value X left partial area in the raster scan order
  • an adjacent partial area having the same characteristic value Y raster scan order
  • the upper partial area), the previous partial area in the scan order (processing order), or the partial area in which the characteristic value X and the characteristic value Y differ by one (upper right area in the raster scan order) are to be merged.
  • filter coefficient groups in other partial areas can also be selected. For example, in FIG. 51, it is possible to select an enclave area, such as an area having a filter coefficient index of 1.
  • This merging method will be described in Example 4 of map parameter filter parameter configuration and decoding processing, and candidate derivation processing. In the map configuration, quad-tree merges, slice merges, and single stroke merges can all be expressed.
  • FIGS. 49 to 51 are applied to coordinate space division, but can also be applied to feature space division.
  • Encoded data # 5 The data structure of encoded data # 5 generated by the video encoding device 6 according to the present embodiment and decoded by the video decoding device 5 is substantially the same as the data structure of the encoded data # 1 according to the first embodiment. However, the configuration of the filter parameter FP is different. The configuration of the filter parameter FP will be described in detail in the following example. Of the syntaxes included in the filter parameter FP, descriptions of the syntaxes already described in the first to third embodiments are omitted.
  • FIG. 52 is a syntax table showing each syntax included in the filter parameter FP (denoted as alf_param () in FIG. 52) according to the present embodiment.
  • the filter parameter FP includes adaptive_loop_filter_flag, alf_feature_mode, and alf_num_filters_minus1.
  • the number of steps of the characteristic value X is NX, and the number of steps of the characteristic value Y is NY. As shown in FIG.
  • the characteristic value X and the characteristic value Y are obtained.
  • the filter coefficients AlfRegionFilterCoeff [X] [Y] [k] are sequentially decoded.
  • FIG. 53 is a syntax table showing the syntax of the first configuration in the filter parameter FP (denoted as alf_coeff_param () in FIG. 52).
  • the first configuration is called a merge configuration.
  • the syntax table includes alf_new_filter and alf_merge_idx.
  • Alf_new_filter is a syntax indicating whether or not to decode a new filter.
  • Alf_merge_idx is a candidate selection syntax for selecting a merge target to be used from merge candidates when there are a plurality of merge candidates.
  • Whether or not to decode the new filter coefficient flag is determined by comparing the number of filter coefficient groups with a counter that adds 1 each time a new filter coefficient group is decoded, in addition to the method using the remaining filter number remain. Can also be done. Since a current value of a filter coefficient index idx described later corresponds to a counter, it can be determined using this idx. Specifically, when idx is smaller than alf_num_filters_minus1, the new filter coefficient flag is decoded, and when it is not smaller, the new filter coefficient flag is not decoded. This determination can also be applied to the second to fourth configurations of the syntax table alf_coeff_param shown in FIGS. 53, 54, 55, and 56, which will be described later, and FIG.
  • the indexes si and sj of the merged partial area are calculated by DeriveAlfMergeIdx (i, j, si, sj). Subsequently, by performing the process of alf_coeff_copy_luma (i, j, si, sj), the filter coefficients of the partial areas i and j to be decoded are copied from the merged partial areas si and sj.
  • the syntax alf_new_filter indicating whether or not to decode a new filter can be replaced with the syntax alf_merge_flag indicating whether or not to perform merging.
  • alf_new_filter is 1 or the index i and the index j are both 0 is replaced by the case where alf_merge_flag is 0 or the index i and the index j are both 0.
  • This replacement can also be applied to the second to fourth configurations of the syntax table alf_coeff_param shown in FIGS. 53, 54, 55, and 56, which will be described later, and FIG. 67.
  • the filter coefficient group alf_coeff_luma in the encoded data can be obtained by predictively encoding the filter coefficient group AlfRegionFilterCoeff used for the filter processing.
  • alf_coeff_luma can be encoded as a prediction difference (difference value) between adjacent filter coefficient groups.
  • the one shown in FIG. 65 is used.
  • step S100 the number of filter coefficients is decoded. Further, the number of filter coefficients ⁇ 1 is set to the remaining filter number “remain”.
  • the loop S101 is a loop related to the two-dimensional indexes i and j of the partial area.
  • the loop processing of steps S102 to S109 is performed on 0 to NY-1 with respect to the index i and 0 to NX-1 with respect to the index j.
  • the filter coefficient group AlfRegionFilterCoeff of the partial areas i and j is decoded.
  • step S102 it is determined whether or not the remaining filter number “remain” is greater than zero. If the remaining filter number remains is greater than 0, the process proceeds to step S103.
  • step S103 the new filter flag alf_new_filter is decoded.
  • step S104 it is determined whether or not a new filter exists. The case where a new filter exists is a case where alf_new_filter is 1 and a case where the first partial area is decoded (when index i and index j are both 0). At this time, the process proceeds to S105. In S105, the filter coefficient group is decoded from the encoded data. In S106, 1 is subtracted (decremented) from the remaining filter number remain. If there is no new filter, the process proceeds to step S107.
  • step S107 it is determined whether or not the number of merge candidates is larger than one. If the number of merge candidates is greater than one, the process proceeds to S108.
  • the merge candidate index alf_merge_idx is decoded.
  • step S109 the filter coefficient group determined by i and j in the partial area or designated by the merge candidate index is copied to the filter coefficient group in the partial areas i and j.
  • the amount of code of the new filter flag can be suppressed by decoding the number of filter coefficients and controlling the decoding of the new filter flag.
  • the number of filter coefficient groups can be explicitly limited by designating the number of filter coefficients by syntax. When the number of filter coefficient groups is limited, the number of filter coefficient buffers used in the decoding apparatus can be suppressed, and thus the complexity of the decoding apparatus can be reduced. This is a feature common to the second to fourth configurations of FIG. 53, FIG. 54, FIG. 55, and FIG.
  • FIG. 54 shows a second configuration of the filter parameter FP (denoted as alf_coeff_param () in FIG. 52).
  • the syntax table includes alf_pred_merge_idx instead of alf_merge_idx.
  • the second configuration is called a prediction / merge configuration.
  • Alf_pred_merge_idx is a candidate selection syntax for selecting a prediction / merging target to be used from prediction / merging candidates when there are a plurality of prediction / merging candidates.
  • the prediction / merge candidate identification index alf_pred_merge_idx [i] [j] is decoded from the encoded data. Details of the processing of NumAlfPredMergeCand (i, j) will be described later. Furthermore, after the prediction / merge candidate identification index is decoded, the indexes si and sj of the partial area of the prediction source / merging source are calculated with DerivePredMergeIdx (i, j, si, sj).
  • the filter coefficient group is not decoded from the encoded data and has already been decoded.
  • the filter coefficient group is calculated by copying from the filter coefficient group.
  • step S200 the number of filter coefficients is decoded. Further, the number of filter coefficients ⁇ 1 is set to the remaining filter number “remain”.
  • the loop S201 is a loop related to the two-dimensional indexes i and j of the partial area, and loop processing of steps S202 to S209 is performed on 0 to NX-1 with respect to the index i and 0 to NX-1 with respect to the index j.
  • the filter coefficient group AlfRegionFilterCoeff of the partial areas i and j is decoded.
  • step S207 it is determined whether or not the number of prediction / merge candidates is larger than one. If the number of prediction / merge candidates is larger than one, the prediction / merge candidate index alf_pred_merge_idx is decoded in S208.
  • step S202 it is determined whether the remaining filter number “remain” is greater than zero. If the remaining filter number remains is greater than 0, the process proceeds to step S203. In step S203, the new filter flag alf_new_filter is decoded. In S204, it is determined whether or not a new filter exists. When a new filter exists, when alf_new_filter is 1 and when the first partial area is decoded (when index i and index j are both 0), the process proceeds to S205. In S205, the filter coefficient is decoded from the encoded data. In subsequent S206, 1 is subtracted (decremented) from the remaining filter number remain. If it is determined in S204 that there is no new filter, the process proceeds to step S209. In S209, the merge source filter coefficient group determined by the prediction / merge candidate index alf_pred_merge_idx is copied to the filter coefficient group of the partial areas i and j.
  • the partial areas can be merged with a high degree of freedom. Also in the prediction, since it is possible to select a partial region that is a prediction value that reduces the code amount of the filter prediction residual, the code amount of the filter coefficient can be reduced.
  • the amount of code of the filter coefficient is reduced by decoding the prediction source used when decoding the filter coefficient from the encoded data. By using the same syntax for the prediction source and the merge source, the decoding process can be simplified.
  • FIG. 55 shows a third configuration of the filter parameter FP (denoted as alf_coeff_param () in FIG. 52).
  • the third configuration is called a map configuration.
  • the syntax table includes alf_pred_idx and alf_merge_idx.
  • Alf_pred_idx is a candidate selection syntax for selecting a prediction target to be used from prediction candidates when there are a plurality of prediction candidates. This syntax uses any one of the example 1 to example 3 of candidate derivation processing.
  • Alf_merge_idx is a candidate selection syntax for selecting a merge target to be used from merge candidates when there are a plurality of prediction candidates. This syntax uses Example 4 of candidate derivation processing.
  • the filter coefficient group used as a merge source when merging filter coefficients and the filter coefficient group used as a predicted value when decoding filter coefficients are set using a filter coefficient index sidx.
  • the filter coefficient group index idx decoded immediately before is used.
  • the processing shown by the syntax table alf_coeff_set_luma (i, j, si, sj) is performed to decode the filter coefficient group from the encoded data.
  • the prediction source calculated by DeriveAlfPredIdx (i, j, si, sj) is used.
  • the filter coefficient index alf_coeff_luma_id [i] [j] for each partial region is set.
  • the filter coefficient group is not decoded from the encoded data and is already decoded.
  • the filter coefficient group is calculated by copying from the filter coefficient group.
  • the number of merge candidates NumAlfMergeCand (i, j) is obtained.
  • the candidate selection syntax alf_merge_idx [i] [j] is decoded.
  • a decoding method that matches the number of prediction candidates NumAlfPredCand (i, j) and the number of merge candidates NumAlfMergeCand (i, j) may be used. That is, if the number of candidates is 2, 1 bit is decoded, and if it is 3, the value 0 is decoded with 1 bit, the value 1 and the value 2 are decoded with 2 bits. In general, m bits may be decoded if the number of candidates is larger than 2 ⁇ (m-1) and not larger than 2 ⁇ m.
  • various truncated encodings for example, truncated unary encoding in which the number of candidates is the maximum value cMax can be used.
  • the number of candidates the number of bits is variable
  • the smaller the number of candidates the smaller the code amount.
  • syntax alf_new_filter that indicates whether or not to decode a new filter can be replaced with the syntax alf_merge_flag that indicates whether or not to perform merging even in the map configuration.
  • AlfRegionFilterCoeff2 is a filter coefficient group in the filter coefficient index sidx.
  • the filter coefficient group in the filter index didx is stored by the following formula.
  • AlfRegionCoeffLuma2 [didx] [k] AlfRegionCoeffLuma [i] [j] [k]
  • the prediction candidate selection index and the merge candidate selection index are decoded by different methods, and the selection of the prediction candidate selection index is smaller than the selection of the merge candidate selection index. This enables an efficient configuration in terms of encoding efficiency.
  • merge candidate selection index it is possible to select a group of filter coefficients that have already been decoded without being limited to adjacent partial areas, so that a configuration with a high degree of freedom such as an enclave is possible. Further, in decoding of the candidate selection index, the code amount can be reduced even in a high degree of freedom by changing the encoding method of the candidate selection index according to the number of filter coefficient groups decoded previously. .
  • FIG. 56 is a syntax table showing the syntax of the fourth configuration of the filter parameter FP (denoted as alf_coeff_param () in FIG. 52).
  • the fourth configuration is called a one-dimensional merge configuration.
  • the syntax table includes alf_new_filter.
  • Alf_new_filter is a syntax indicating whether or not to decode a new filter.
  • the filter coefficient group is not decoded from the encoded data and has already been decoded.
  • the filter coefficient group is calculated by copying from the filter coefficient group. In this case, since a certain partial area uses the same filter coefficient as another partial area, the partial areas are merged.
  • the filter coefficients of the partial areas i and j to be decoded are copied from the filter coefficients of the filter coefficient index sidx.
  • syntax alf_new_filter that indicates whether or not to decode a new filter can be replaced with the syntax alf_merge_flag that indicates whether or not to perform merging even in a one-dimensional merge configuration.
  • FIG. 67 is a diagram showing a syntax table in the map configuration. As shown in FIG. 67, the filter coefficient group alf_coeff_luma2 having the number of filter coefficient groups indicated by alf_num_filters_minus1 + 1 is first decoded.
  • alf_coeff_luma2 is used, but it is substantially the same filter coefficient group as alf_coeff_luma.
  • the processing in the two-dimensional loop is the same as the case where other new filter coefficient groups are decoded from the encoded data in the two-dimensional loop, but encoding is performed instead of the function alf_coeff_set_luma for decoding from the encoded data. Replace with alf_coeff_dec_luma processing to assign data.
  • the filter coefficient group alf_coeff_luma2 [idx] [k] which has already been decoded, is used for the filter process by taking the difference from the predicted value from the following equation.
  • a filter coefficient group AlfRegionFilterCoeff is calculated.
  • the present invention can be applied to other configurations.
  • the number of filter coefficient groups of the number of filter coefficient groups is decoded first, it corresponds to alf_coeff_param () in the two-dimensional loop of the partial area index and is assigned to the partial space.
  • a process of decoding the filter coefficient group is performed.
  • a merge candidate derivation process used in the map configuration, a prediction / merge candidate derivation process used in the prediction / merge configuration, and a prediction candidate derivation process used in the map configuration will be described.
  • These candidate derivation processes are processes for determining an index for designating a partial area to be referred to in a certain partial area.
  • the derivation process is divided into a process for calculating the number of candidates and a process for calculating a reference partial area index from the candidate selection index.
  • the former process is represented by NumAlfXXXXCand
  • the latter process is represented by DeriveAlfXXXXIdx.
  • the portion of XXXX is replaced with Merge in the merge candidate derivation process, PredMerge in the prediction / merge candidate derivation process, and Pred in the prediction candidate derivation process.
  • the syntax of the corresponding candidate selection index is expressed by alf_xxxx_idx.
  • the part of xxxx is replaced with merge for the merge candidate selection index, pred_merge for prediction / merge candidate selection, and pred for prediction candidate derivation processing.
  • the merge candidate derivation process obtains an index for merging
  • the prediction / merge candidate derivation process obtains an index for prediction / merge
  • the prediction candidate derivation process obtains an index for prediction. It is.
  • alf_merge_idx is replaced with alf_pred_merge_idx
  • NumAlfMergeCand is replaced with NumAlfPredMergeCand
  • DeriveAlfMergeIdx is replaced with DeriveAlfPredMergeIdx.
  • alf_merge_idx is replaced with alf_pred_idx
  • NumAlfMergeCand is replaced with NumAlfPredCand
  • DeriveAlfMergeIdx is replaced with DeriveAlfPredIdx.
  • FIG. 57 shows an example of the simplest two-choice candidate derivation process.
  • partial areas having the same characteristic value X (partial areas adjacent to the left) and partial areas having the same characteristic value Y (partial areas adjacent to the top) are candidates.
  • alf_merge_idx [i] [j] is 0, and the adjacent partial region is a candidate.
  • Alf_merge_idx [i] [j] is 1 when selecting the top.
  • NumAlfMergeCand1 returns 2 because there are two choices on the left and top.
  • the candidate selection index in this case is obtained by decoding alf_merge_idx [i] [j] from the encoded data.
  • NumAlfMergeCand1 is used by replacing NumAlfMergeCand1.
  • DeriveAlfMergeIdx1 is used by replacing DeriveAlfMergeIdx.
  • NumAlfMergeCand2 and DeriveAlfMergeIdx2, which will be described later, are also used as appropriate.
  • FIG. 58 is an example of candidate derivation processing for performing exception processing at the left end. Also in FIG. 58, basically, a partial region having the same characteristic value X (a partial region adjacent to the left) and a partial region having the same characteristic value Y (a partial region adjacent to the top) are candidates.
  • a partial region having the same characteristic value X a partial region adjacent to the left
  • a partial region having the same characteristic value Y a partial region adjacent to the top
  • FIG. 58 when processing the partial area located in the leftmost column in the raster scan order, the partial area immediately preceding in the processing order (up one in the raster scan order) is replaced with the partial area adjacent to the left.
  • the partial region at the right end of the row is a candidate. As a result, the number of options at the left end is two. Details will be described below.
  • DeriveAlfMergeIdx2 is a function for obtaining two-dimensional indexes si and sj for specifying a partial region from the candidate selection index alf_merge_idx [i] [j].
  • slice processing can be performed by adding another process to the left end process in the raster scan order in addition to the characteristic value X direction and the characteristic value Y direction.
  • FIG. 59 shows an example of candidate derivation processing when three options are used.
  • partial areas having the same characteristic value X partial areas adjacent to the left
  • partial areas having the same characteristic value Y partial areas adjacent to the top
  • partial areas having different characteristic values X and Y one by one.
  • a group of filter coefficients (a partial region located in the upper right on the raster scan) is a candidate. Details will be described below.
  • DeriveAlfMergeIdx3 is a function for obtaining indexes si and sj for specifying a partial region from the candidate selection index alf_merge_idx [i] [j].
  • alf_merge_idx is 2
  • FIG. 60 shows a combination of Example 2 and Example 3.
  • the partial area where the characteristic value X is 0 (other than the left end)
  • the partial area where the characteristic value X is equal (left direction)
  • the partial area where the characteristic value Y is equal (upward direction)
  • the characteristic value X And three options of already processed partial areas (upper right direction in raster scan order), which have different characteristic values Y one by one.
  • the characteristic value X and the characteristic value Y are already different one by one.
  • FIG. 60 shows an example of merge candidates, but as described above, the merge candidates can also be used for prediction / merge candidates and prediction candidates.
  • NumAlfMergeCand23 is used as NumAlfMergeCand
  • DeriveAlfMergeIdx23 is used as DeriveAlfMergeIdx.
  • FIG. 61 shows an example of candidate derivation processing when map selection is used.
  • map selection filter coefficient groups used in the previous partial space (partial region) in the processing order (already decoded) are candidates.
  • the function NumAlfMergeCand4 calculates the number of filter coefficient candidates.
  • the filter coefficient groups decoded so far, that is, idx + 1 filter coefficient groups from 0 to the filter coefficient index idx are candidates. Therefore, the value of NumAlfMergeCand4 is idx + 1. Details will be described below.
  • FIG. 62 is a diagram for switching candidate derivation processing according to the feature amount mode alf_feature_mode.
  • the three candidate selection derivation process NumAlfMergeCand3 is used as the candidate derivation process, and when alf_feature_mode indicates feature space division, 2 as the candidate derivation process.
  • a method using the candidate selection derivation process NumAlfMergeCand is suitable.
  • DeriveAlfMergeIdx is also changed according to the feature amount mode alf_feature_mode.
  • slice candidate derivation processing NumAlfMergeCand2 is used as candidate derivation processing.
  • two candidate selection derivation processing NumAlfMergeCand is performed as candidate derivation processing.
  • a method using is also suitable.
  • slice candidate derivation processing NumAlfMergeCand23 is used as candidate derivation processing.
  • two candidate selection derivation processing NumAlfMergeCand is performed as candidate derivation processing.
  • a method using is also suitable.
  • the code amount used for option selection can be reduced in the case of two options (three candidate selection derivation process) than in the case where the number of options is three (three candidate selection derivation process).
  • the amount of codes used for option selection can be reduced in the two-candidate selection derivation process than in the slice candidate derivation process.
  • Coordinate space division is expected to improve coding efficiency by supporting one-stroke-shaped division and slice-like division, but feature space division is not expected to improve coding efficiency as much as coordinate space division. Therefore, in the feature space division, it is better to reduce the number of options for prediction and merging and reduce the code amount used for the candidate selection index than the coordinate space division.
  • the slice-like division is not appropriate because the characteristic value is greatly different between the leftmost partial region of the characteristic value X and the rightmost partial region of the characteristic value X. This is because the group values are often different, and the filter coefficient group values obtained when the two values are merged are not necessarily good values in terms of coding efficiency.
  • the above-described decoding device has the following characteristics. By controlling whether the filter coefficient group is decoded or merged using the number of filter coefficients decoded first, it is possible to suppress an increase in code amount even when the degree of freedom increases. Moreover, since decoding accuracy can be improved by decoding the candidate selection index of a prediction candidate, the code amount of a filter coefficient group can be suppressed.
  • the configuration that refers to the left and the top corresponds to a quadtree-shaped division
  • the configuration that refers to the partial area processed immediately before at the left end, the slice-shaped division, and the configuration that refers to the upper right partial region corresponds to a one-stroke-shaped division Therefore, the degree of freedom of the encoder can be increased. Also called map configuration.
  • any one of the filter coefficient indexes decoded so far is referred to, a degree of freedom including all of them can be provided.
  • a configuration with a high degree of freedom such as an enclave is possible.
  • the encoder supports a division method with a high degree of freedom according to software and hardware constraints, designer orientation, and the like.
  • quad-tree-shaped division, slice-shaped division, and single-stroke-shaped division are preferably applied to coordinate space division.
  • the feature space division maintains a high degree of freedom for the coordinate space division while maintaining a high degree of freedom for the coordinate space division.
  • the amount of codes in the division can be reduced.
  • the complexity of the decoding apparatus can be reduced.
  • the selection of prediction candidates is reduced compared to the selection of merge candidates, the amount of codes necessary for selection of prediction can be reduced.
  • the video decoding device 7 according to the present embodiment includes an adaptive filter 90 instead of the adaptive filter 50 included in the video decoding device 1 according to the first embodiment. Since the other configuration of the video decoding device 7 according to the present embodiment is the same as the configuration of the video decoding device 1 according to the first embodiment, description thereof will be omitted.
  • FIG. 45 is a block diagram showing the configuration of the adaptive filter 110. As shown in FIG. 45, the adaptive filter 110 includes an adaptive filter information decoding unit 111 and an adaptive filter unit 112.
  • the adaptive filter information decoding unit 111 includes a region-specific tap number decoding unit 1111, a region structure decoding unit 1112, a feature amount mode decoding unit 1113, a filter coefficient decoding unit 1114, and a characteristic-specific filter coefficient storage unit 1115. I have.
  • the area-specific tap number decoding unit 1111 decodes the syntax alf_length_luma_minus5_div2 included in the filter parameter FP.
  • the decoded syntax alf_length_luma_minus5_div2 is supplied to the filter coefficient decoding unit 1114.
  • the region structure decoding unit 1112 decodes the syntax alf_new_filter [i] [j] and alf_merge_idx [i] [j] included in the filter parameter FP.
  • the decoded syntax alf_new_filter and alf_merge_idx [i] [j] are supplied to the filter coefficient decoding unit 1114. .
  • the feature amount mode decoding unit 1113 decodes the syntax alf_feature_mode.
  • the decoded syntax alf_feature_mode is supplied to the filter coefficient decoding unit 1114.
  • the filter coefficient decoding unit 1114 decodes the syntax alf_coeff_luma [i] [j] [k] with reference to alf_length_luma_minus5_div2, alf_merge_idx [i] [j], and alf_new_filter. Further, the filter coefficient decoding unit 1114 calculates a filter coefficient group AlfRegionFilterCoeff used for the filter processing using the following equation.
  • the filter coefficient decoding unit 1114 uses the decoded filter coefficient group AlfRegionFilterCoeff [i] [j-1] [k] for the division unit DU [i] [j-1] as a predicted value.
  • the division unit DU [i] [ The filter coefficient group AlfRegionFilterCoeff [i] [j] [k] for j] is decoded.
  • the filter coefficient storage unit 1115 for each characteristic stores the filter coefficient group RegionFilterLuma [i] [j] [k] decoded by the filter coefficient decoding unit 1114.
  • the adaptive filter unit 112 includes a first characteristic value calculation unit 1121, a second characteristic value calculation unit 1122, a filter coefficient allocation unit 1123, and a filter unit 1124, as shown in FIG.
  • the first characteristic value calculation unit 1121 and the second characteristic value calculation unit 1122 calculate the characteristic value X and the characteristic value Y for the target unit region, respectively.
  • the calculated characteristic values X and Y are supplied to the filter coefficient assigning unit 1123. Since the calculation method of the characteristic value X and the characteristic value Y has been described in the configuration example of the filter parameter FP, description thereof is omitted here.
  • the filter coefficient allocating unit 1123 reads out the filter coefficient RegionFilterLuma [i] [j] corresponding to the index (i, j) in the characteristic value area allocated to the target unit area from the filter coefficient storage unit 1115 for each characteristic and reads it out.
  • the filter coefficient RegionFilterLuma [i] [j] is assigned to the target unit area.
  • the filter coefficient RegionFilterLuma [i] [j] assigned to the target unit region is supplied to the filter unit 1124.
  • the filter unit 1124 generates a filtered decoded image P_FL in the target unit region by performing filter processing using the filter coefficient RegionFilterLuma [i] [j] on the target unit region.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15.
  • the specific processing by the filter unit 1124 is the same as that of the filter unit 525 in the first embodiment, and thus description thereof is omitted here.
  • Moving picture encoding apparatus 8 that generates the encoded data # 5 by encoding the encoding target picture will be described with reference to FIG.
  • 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 includes an adaptive filter 120 instead of the adaptive filter 60 included in the moving picture encoding apparatus 2 according to the first embodiment.
  • Other configurations of the video encoding device 6 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 120 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 120 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.
  • the variable length code encoding unit 22 encodes the filter parameter FP as a part of the encoded data # 5.
  • FIG. 46 is a block diagram showing the configuration of the adaptive filter 120. As shown in FIG. As shown in FIG. 46, the adaptive filter 120 includes an adaptive filter information setting unit 121 and an adaptive filter unit 122.
  • the adaptive filter information setting unit 121 includes a region-specific tap number setting unit 1211, a region structure setting unit 1212, a feature amount mode setting unit 1213, a filter coefficient residual generation unit 1214, and a characteristic-specific filter coefficient storage unit. 1215 and a filter parameter generation unit 1216.
  • the region-specific tap number setting unit 1211 sets the syntax alf_length_luma_minus5_div2 for designating the number of taps for the characteristic value partial region CPR [i] obtained by the initial division.
  • the set syntax alf_length_luma_minus5_div2 is supplied to the filter parameter generation unit 1216.
  • the area structure setting unit 1212 sets alf_new_filter and alf_merge_idx [i] [j].
  • the set syntax alf_new_filter and alf_merge_idx [i] [j] are supplied to the filter coefficient residual generation unit 1214.
  • the feature amount mode setting unit 1213 sets the syntax alf_feature_mode.
  • the set syntax alf_feature_mode is supplied to the filter parameter generation unit 1216.
  • alf_length_luma_minus5_div2, alf_new_filter, and alf_merge_idx [i] [j] are set so that the encoding efficiency is further improved.
  • the filter coefficient residual generation unit 1214 generates the syntax alf_coeff_luma [i] [j] [k] by the following equation.
  • the generated filter coefficient residual alf_coeff_luma [i] [j] [k] is supplied to the filter parameter generation unit 1216.
  • the characteristic-specific filter coefficient storage unit 1215 stores a filter coefficient group AlfRegionFilterCoeff [i] [j] [k] supplied from a filter coefficient deriving unit 1223 described later.
  • the filter parameter generation unit 1216 generates a filter parameter FP from the syntax alf_length_luma_minus5_div2, alf_merge_idx [i] [j], alf_new_filter, and alf_coeff_luma [i] [j] [k].
  • the generated filter parameter FP is supplied to the variable length code encoder 22.
  • the adaptive filter unit 122 includes a first characteristic value calculation unit 1121, a second characteristic value calculation unit 1122, a filter coefficient derivation unit 1123, and a filter unit 1124.
  • the filter coefficient deriving unit 1223 derives a filter coefficient RegionFilterLuma [i] [j] such that an error between the filtered decoded image P_FL and the encoding target image in the target unit region becomes smaller.
  • the derived filter coefficient RegionFilterLuma [i] [j] is supplied to the filter unit 1124 and stored in the characteristic-specific filter coefficient storage unit 1215.
  • the adaptive filter according to the present embodiment derives a plurality of characteristic values having different derivation methods for each unit region constituting the pre-filter image (for example, the deblocked decoded image P_DB). Then, each unit area is classified into one or a plurality of groups according to the derived characteristic values. 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 region set on a multidimensional region 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
  • 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.
  • a one-dimensional index can be used instead of the two-dimensional index.
  • An index that designates each characteristic value partial region is referred to as a region 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.
  • a characteristic value partial area of a certain area index ridx is simply referred to as an 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 absolute value difference sum may be used for calculating the activity, 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. However, if a part of the reference image of the characteristic value is located outside the slice, 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 better 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. 74 is an example of the syntax table of the filter parameter FP according to the present embodiment.
  • the filter parameters FP include adaptive_loop_filter_flag, alf_region_adaptation_flag, alf_length_luma_minus5_div2, alf_num_filters_minus1, alf_region_idx [], alf_pred_method, alf_min_kstart_minus1, alf_goco_j
  • alf_region_adaptation_flag is a syntax indicating the feature amount mode, and corresponds to alf_feature_mode of the fourth embodiment.
  • alf_region_adaptation_flag 0, 1, 2, and 3 correspond to RA mode, BA1 mode, BA2 mode, and 3D mode, which will be described later.
  • the RA mode is a division using the coordinates in the image (frame) of the target unit region, and is one of the coordinate space divisions.
  • the BA1 and BA2 modes are divisions using pixel values or encoding parameters in the target unit region, and are one of feature space divisions.
  • alf_region_idx [i] (1 ⁇ i ⁇ AlfNumFilters) is a syntax that specifies a filter index for each partial region.
  • FIG. 74 is a syntax table when filter index estimation is not used, and
  • FIG. 75 is a syntax table when filter index estimation is used.
  • FIG. 75 is an example of the syntax table of the filter parameter FP according to the present embodiment.
  • prev_alf_region_flag [i] and rem_alf_region_flag [i] (1 ⁇ i ⁇ AlfNumFilters) are syntaxes for specifying a filter index for each partial region.
  • a syntax that specifies a region structure such as alf_region_idx [i], prev_alf_region_flag [i], and rem_alf_region_flag [i] is referred to as a region structure syntax.
  • the region structure is a structure representing a filter coefficient group to be referred to with each partial space, and is decoded by determining a filter coefficient group to be referred to in each partial region.
  • alf_region_idx [i], prev_alf_region_flag [i], and rem_alf_region_flag [i] have a range of values due to a filter index constraint described later. Therefore, the code amount of the region structure index can be reduced by using encoded data according to the range of possible values.
  • m bits may be encoded if the number of candidates is generally larger than 2 ⁇ (m-1) and 2 ⁇ m or less.
  • Truncated encodings for example, Truncated unary encoding
  • the number of candidates is the maximum value cMax
  • the region structure syntax is encoded using the new filter flag alf_new_filter and the merge candidate index alf_merge_idx.
  • the region structure is encoded using the one-dimensional merge syntax alf_filter_pattern.
  • the region structure may be encoded using a syntax for decoding the filter index of each partial region shown.
  • FIG. 76 is also an example of the syntax table of the filter parameter FP according to the present embodiment.
  • the difference from FIG. 75 is that the syntax alf_disable_region_idx [i] for turning off the filter processing is included for each partial region.
  • This syntax corresponds to alf_disable_region_idc [i0] of the second embodiment, and when this syntax specifies that the filtering process is turned off for the partial area, the filtering process is not performed.
  • FIG. 69 is a block diagram of the adaptive filter 130.
  • the adaptive filter 130 includes an adaptive filter information decoding unit 131 and an adaptive filter 132.
  • the adaptive filter information decoding unit 131 includes a tap number decoding unit 1311, a region structure decoding unit 1312, a feature amount mode decoding unit 1313, a filter coefficient decoding unit 1314, and a filter coefficient storage unit 1315.
  • An index calculation unit 1322, a filter coefficient allocation unit 1323, and a filter unit 1324 are provided.
  • the tap number decoding unit 1311 decodes the syntax alf_length_luma_minus5_div2 included in the filter parameter FP.
  • the region structure decoding unit 1312 decodes the region structure from the syntax alf_region_idx [i] included in the filter parameter FP shown in FIG. Further, the region structure decoding unit 1312 decodes the syntaxes prev_alf_region_flag [i] and rem_alf_region_flag [i] (0 ⁇ i ⁇ AlfNumFilters) included in the filter parameter FP illustrated in FIGS. 75 and 76.
  • the feature amount mode decoding unit 1313 decodes the syntax alf_region_adaptation_flag.
  • the decoded syntax alf_region_adaptation_flag is supplied to the region index calculation unit 1322.
  • the filter coefficient decoding unit 1314 uses the syntax alf_coeff_luma [i] [k] as a filter coefficient group AlfRegionFilterCoeff [i] [k] total (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 1314 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 1315 stores the filter coefficient group RegionFilterLuma [i] [k] decoded by the filter coefficient decoding unit 1314.
  • i is an index for referring to the filter coefficient group, and is hereinafter also referred to as a filter index fidx. 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 # 7 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. Further, not only a header and a picture parameter set corresponding to a picture and a slice to be processed, but also a filter coefficient group encoded by a specific picture or slice before that may be referred to.
  • the region structure decoding unit 1312 decodes the region structure syntax from the filter parameter FP, and assigns a filter index for referring to the filter coefficient group to each of the partial regions grouped by the region 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 1312 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 1323.
  • 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 filter index table is the following FilterIdxTblB
  • the same filter index value 0
  • the total number of filter indexes AlfNumFilters is 1.
  • FilterIdxTblB [] ⁇ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ⁇
  • the filter index table is the following FilterIdxTblC
  • the partial areas are merged into five areas, and filter indexes 0 to 4 are assigned to the partial areas.
  • FilterIdxTblC [] ⁇ 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 2, 2, 1, 1 ⁇
  • the filter index is specified for each area of the area index ridx by the filter index table FilterIdxTbl.
  • the partial areas are grouped by the filter index table FilterIdxTbl. That is, the partial areas ridx to which the same filter index fidx is assigned are classified into the same group (group of filter indexes fidx). Since the characteristic value of the characteristic value partial area is calculated for each unit area, each unit area is eventually grouped by the area index calculated for the unit area and the filter index table FilterIdxTbl.
  • the filter index in the filter index table FilterIdxTbl is encoded as a value in a range where 0 is the minimum value and AlfNumFilters-1 is the maximum value.
  • This constraint (also referred to as index constraint 1) is defined by the following consideration.
  • the filter index table FilterIdxTblC that is, the same grouping as when using the filter index table FilterIdxTblC
  • FilterIdxTblC ′ the following FilterIdxTblC ′ It can be expressed.
  • FilterIdxTblC ⁇ [] ⁇ 0, 0, 0, 7, 7, 7, 2, 2, 2, 3, 3, 3, 9, 9, 7, 7 ⁇
  • the values of the indexes that appear are 0, 2, 3, 7, and 9, and the filter index values are missing.
  • the maximum value of the filter index is unknown and there is a missing value, it is difficult to determine which filter index corresponds to which coefficient group of AlfNumFilters filter coefficients.
  • the code value can be reduced because the index value can be reduced). it can.
  • the filter index and the filter coefficient group can be easily made to correspond one-to-one.
  • the filter coefficient group can refer to a value from 0 to AlfNumFilters ⁇ 1 assigned in the decoding order as a filter index.
  • the restriction on the filter index value range is set on the condition that the one-to-one correspondence between the filter index and the filter coefficient group is easy.
  • the following FilterIdxTblC ′′ means the same grouping as FilterIdxTblC.
  • FilterIdxTblD [] ⁇ 0, 1, 2,... ⁇
  • FilterIdxTblE [] ⁇ 0, 1, 3,... ⁇
  • the area to be turned off is distinguished as -1.
  • FilterIdxTblE [] ⁇ 0, 1, -1,... ⁇
  • a region having a negative value can be distinguished as a region to which no filter coefficient group is assigned.
  • the filtering process is turned off by determining the value of a predetermined filter index decoded for each region without decoding the value of alf_disable_region_idx [].
  • the range of the filter index in a certain region can be set from 0 to the maximum value +2, and the value of the maximum value +2 can be determined to be off.
  • FIG. 71 is a block diagram of the region structure decoding unit 1312.
  • the area structure decoding unit 1312 includes an index total number decoding unit 1331, an index decoding control unit 1332, an estimated filter index calculation unit 1333, an index decoding unit 1334, a remaining number management unit 1336, and a new number identification processing unit 1335.
  • a configuration including an adaptive filter-off decoding unit may be used.
  • the adaptive filter-off decoding unit sets a flag alf_disable_region_idx [i] (0 ⁇ i ⁇ AlfNumRegions). Information on the decoded flag alf_disable_region_idx [i] is output to the filter coefficient assigning unit 1323.
  • the index decoding control unit 1332 first sets the region index ridx in order from 0 to AlfNumRegions ⁇ 1, and outputs it to the estimated filter index 1333 and the index decoding unit 1334.
  • the estimated filter index 1333 calculates an estimated value (estimated filter index) of the filter index for the region index ridx and outputs the calculated value to the index decoding unit 1334.
  • the index decoding unit 1334 decodes the filter index fidx corresponding to the region index ridx from the filter parameter FP and stores it in the filter index table FilterIdxTbl.
  • the encoded data of the filter index fidx may be encoded using the estimated filter index or may be encoded without using the estimated filter index.
  • the classification of application methods is not limited to this, and a method that does not always use an estimated index may be applied.
  • Nfilter Nfilter is an arbitrary natural number
  • the estimated filter A configuration in which a method that does not use an index may be applied.
  • the filter index is applied only to the area where the filtering process is turned on. Is decrypted. This also applies to the method using the following estimated filter index.
  • FIG. 74 shows the filter parameter FP when the estimated filter index is not used.
  • the region structure decoding unit 1312 sequentially decodes alf_region_idx [i], and FilterIdxTbl [
  • the range that the filter index can take when decoding a certain area index i is a value between 0 and nidx-1. Therefore, it is possible to encode the region filter index alf_region_idx [i] by associating the values of 0 to nidx with respect to the case where the filter index is nidx to 0.
  • a method of encoding a value obtained by subtracting a value to be encoded from a maximum value that can be taken is called an index encoding method in reverse order.
  • the filter index value of a certain area index i is the same as the filter index value of the area i-1 decoded immediately before. Also, since the filter index of the area decoded immediately before is likely to be the new filter index nidx-1, it is appropriate to encode nidx-1 with a short codeword. In this case, it is also preferable that the filter parameter fidx is decoded as the following equation, with the difference ⁇ 1 between the region filter index alf_region_idx [i] and the new filter index nidx.
  • fidx nidx-alf_region_idx [i] Since the value of the region filter index alf_region_idx [i] is 0 to nidx, it is possible to apply various truncated encodings (for example, truncated unary encoding) in which nidx is the maximum value cMax. Can be reduced. Further, since the maximum range of the region filter index is 0 to AlfNumFilters-1, the above encoding with AlfNumFilters-1 as the maximum value cMax is also effective. Even when encoding with a maximum value is not applied, a shorter codeword may be assigned as it approaches 0. In this case, the reverse setting is effective.
  • the filter index fidx for the region ridx is directly decoded from the filter parameter FP.
  • ⁇ Method using estimated filter index> the filter index for each partial region is decoded as in the method not using the estimated index.
  • each filter index is decoded from one type of syntax alf_region_idx, whereas in the method that uses the estimated filter index, two types of syntax, a region filter index estimation flag prev_alf_region_flag [] and Decoding is performed from the region filter index residual flag rem_alf_region_flag [].
  • FIG. 75 shows filter parameters FP in the method using the estimated filter index.
  • the region filter index alf_region_idx [i] is encoded, and when the total index AlfNumFilters is larger than 2 (alf_num_filters_minus1 > 1), the region filter index estimation flag prev_alf_region_flag [] and the region filter index residual index rem_alf_region_flag [] are encoded.
  • the region filter index alf_region_idx [i] is encoded, the estimated filter index is not used, and the description has been omitted because it has already been described.
  • an estimated filter index is used will be described.
  • the index decoding control unit 1332 decodes the filter index idx for the region index from 1 to the total number of indexes AlfNumRegions-1 by the following iterative process.
  • the loop variable is i
  • the filter index fidx is decoded by decoding the filter parameter FP
  • the filter parameter FP is not decoded and the filter index Determine fidx.
  • the region filter index estimation flag prev_alf_region_flag [i] is decoded from the filter parameter FP.
  • prev_alf_region_flag [i] is other than 0
  • the region filter index residual index rem_alf_region_idx [i] is decoded.
  • the number of estimated filter indexes MPM is 1, prev_alf_region_flag [i] can be encoded with 1 bit.
  • the number of estimated filter indexes MPM is not limited to one, and a plurality of estimated filter indexes MPM can be used. In this case, encoding can be performed with a number of bits that can identify the number of MPMs.
  • the MPM calculated by the basic estimated value calculating unit 1341 and the MPM calculated by the region position estimated value calculating unit 1342 are appropriate.
  • a new number estimated value calculating unit 1343 is used.
  • the MPM calculated by the basic estimated value calculating unit 1341 and the region position estimated value calculating unit 1342 are calculated. An MPM is also appropriate.
  • a filter index table such as the filter index table FilterIdxTblA is uniquely determined from the index constraint 2.
  • the case where the number of remaining confirmed regions remain_fixed_regions is 0 corresponds to generalization in such a case.
  • the merge of the partial areas can be expressed by the decoded filter index.
  • the restriction on the merge of the partial areas corresponds to the restriction on the value of the filter index.
  • the index constraint 1 and the index constraint 2 are limited.
  • a partial area can have the same filter index as all the partial areas other than the partial area. All partial areas can share the same filter coefficients, i.e. all partial areas can be merged with each other.
  • the possible filter index values can be limited according to the already processed filter index values.
  • the filter index of the already processed partial region having the value of the characteristic value X or the same characteristic value Y can be selected.
  • This constraint is called index constraint 3.
  • the value of the filter index can be determined by decoding the ternary flag. Since classification with a high degree of freedom is particularly appropriate in the RA mode, it is also preferable to use index constraints 1 to 3 for the BA mode and index constraints 1 to 2 for the RA mode.
  • index constraints 1 to 3 means that a range of index values (selection candidate list) to be decoded is determined using a product set (AND) of the range of values of the index constraints 1 to 3.
  • BA mode includes a 5 ⁇ 3 characteristic value area as described below, and an index of the subspace X is decoded as follows.
  • a new number may be reassigned to the selection candidate list as a selection index of 0 to the number of selection candidates-1 and the selection index may be decoded.
  • the map configuration corresponds to the index constraint 2.
  • a flag indicating whether or not the filter is a new filter is explicitly encoded.
  • a flag indicating whether or not the filter is a new filter (new filter coefficient flag, alf_new_filter in FIG. 56) and a region index value (corresponding to alf_merge_idx [i] [j] in FIG.
  • the new filter coefficient flag is new, set the new filter index nidx as the area index value, and indicate that the new filter coefficient flag is not new (when merging with an already decoded partial area ) Decodes the value of the region index.
  • the range of index values that can be taken is the case where a new filter index is excluded, and is the maximum value of the filter index that appears before 0 from the partial area to be decoded. Also in this case, when the number of remaining confirmed regions remain_fixed_regions is 0, a configuration in which alf_new_filter is not decoded is possible.
  • the new number identification processing unit 1335 determines whether or not a new filter index has been decoded in each iterative process of the region index i, and further determines a new filter index nidx.
  • the new filter index is a filter index having a value that does not appear in the immediately preceding process (decoding process of the filter index corresponding to the partial area from area index 0 to i-1). If the value decoded as the filter index of a certain partial area is one of the values already used up to the previous process, the target partial area is the same filter index as any of the already processed partial areas. It means having. That is, this partial area is a partial area to be merged.
  • the processed filter index is different from any of the already processed values, it means that the partial area is not merged.
  • the value of the filter index of the partial area that is not merged is the maximum value +1 of the already processed filter index. This value is set as the new filter index nidx.
  • the algorithm for setting the new filter index nidx is summarized below.
  • the processed filter index (decoded index) is compared with the value of the new filter index at that time. If the filter index matches the new filter index nidx, the new filter index nidx is incremented by one. If they do not match, do nothing.
  • the remaining number management unit 1336 calculates the remaining region number “remain_regions” and the remaining filter number “remain_filters” in each iterative process of the region index i, and outputs them to the estimated value selection unit 1344.
  • the number of remaining confirmed regions, remaining_fixed_regions is calculated from the number of remaining regions remain_regions and the number of remaining filters remain_filters, and is output to the index decoding unit 1334.
  • the remaining region number remain_regions is the number of partial regions for which a filter index has not been determined including the current partial region at the time of processing a certain region index i.
  • the remaining filter number remain_filters (i) is the number of filter indexes that have not appeared (not decoded) at the time of decoding a certain region index i.
  • remain_fixed_regions remain_regions (i)-remain_filters (i)
  • a value of 0 or more of the number of remaining confirmed regions remain_fixed_regions can be taken.
  • the filter index of a certain region index i is processed (when the filter index processing of the partial region i-1 is finished), if the remaining determined region number remain_fixed_regions is 0, the remaining from the region index i to AlfNumRegions-1
  • the filter index of the partial area is uniquely determined.
  • the decoding apparatus has an adaptive filter-off decoding unit and decodes a flag for turning off the filter processing in units of characteristic value partial areas
  • the number of remaining regions is obtained by the following equation using AlfOffRegionNum (i).
  • the estimated filter index calculating unit 1333 includes a basic estimated value calculating unit 1341, a region position estimated value calculating unit 1342, a new number estimated value calculating unit 1343, and an estimated value selecting unit 1344.
  • a configuration using any one of the basic estimated value calculating unit 1341, the region position estimated value calculating unit 1342, and the new number estimated value calculating unit 1343, or a combination of any two is also possible.
  • a configuration having only the basic estimated value calculation unit 1341 has a very simple configuration and a simple apparatus.
  • the configuration having only the region position estimated value calculation unit 1342 has a simple configuration and suitable encoding efficiency.
  • the decoding apparatus has an adaptive filter-off decoding unit and decodes a flag for turning off the filter processing in units of characteristic value partial areas
  • the partial area decoded immediately before is filtered off. Is the estimated value mpm of the filter index of the partial area where the filter processing is turned on last in the processing order.
  • the region position estimated value calculation unit 1342 obtains the filter index of the partial region according to the multidimensional position of the region.
  • the area index i corresponds to one of the characteristic value partial areas in the characteristic value area of the multidimensional space.
  • the characteristic value region has two axes (X axis and Y axis), and each partial space has a characteristic value X on the X axis and a characteristic value Y on the Y axis. It can be expressed as a point on dimensional coordinates.
  • a certain partial area in the two-dimensional space includes a partial area having the same characteristic value X and a partial area having the same characteristic value Y as adjacent partial areas.
  • the region position estimated value calculation unit 1342 obtains an estimated value using this fact.
  • the new number estimated value calculation unit 1343 calculates and outputs the new filter index nidx as mpm. In particular, when the number of remaining filters is relatively large compared to the number of remaining areas, and when it is predicted that the appearance probability of the new filter index nidx is high, nidx is a good estimated value.
  • the estimated value selection unit 1344 selects an optimal estimated value mpm from the estimated values mpm obtained from the basic estimated value calculating unit 1341, the region position estimated value calculating unit 1342, and the new number estimated value calculating unit 1343. Specifically, when it is determined that the number of remaining filters remain_filters is larger than the number of remaining regions remain_regions, the estimated value mpm of the new number estimated value calculation unit 1343 is used. For example, remain_regions-remain_filters / 2> 0 In this case, the estimated value mpm of the new number estimated value calculation unit 1343 is used.
  • an area index other than the area index calculation by the raster scan it can be obtained by using a table ridx_to_x_tbl [] for obtaining the X coordinate from the area index.
  • a method that does not use the estimated value mpm of the area position estimated value calculation unit 1341 is also preferable.
  • the estimated value mpm of the basic estimated value calculation unit 1341 is used.
  • FIG. 73 is a flowchart showing a filter index decoding procedure by the region structure decoding unit 1312. The filter index is decoded by SE01 to SE14.
  • the index total number decoding unit 1331 decodes the number of filter coefficients AlfNumFilters from alf_num_filters_minus1 encoded in the filter parameter FP.
  • the filter index fidx for the region index 0 is set to 0.
  • the initial value of the new index number nidx is set to 1.
  • SE02 represents a loop from SE03 to SE14.
  • the index decoding control unit 1332 repeatedly performs processing with values from 1 to AlfNumRegions-1 using the region index ridx as a loop variable.
  • the remaining number management unit 1336 calculates the remaining filter number and the remaining area number.
  • the estimated value selection unit 1344 determines whether the number of remaining filters is larger than the number of remaining areas.
  • the number of remaining filters is larger than 1/2 of the number of remaining areas, it is determined that the number is large.
  • the determination method is not limited to this, and a method using a value other than 1/2 may be used. A value obtained by adding a constant N may be used.
  • the new number estimated value calculation unit 1343 sets a new index number in the filter index estimated value mpm.
  • the region position estimated value calculation unit 1342 sets an estimated value corresponding to the position of the partial region in the filter index estimated value mpm. Specifically, when the position of the partial area is the left end on the two-dimensional characteristic value area (characteristic value X is 0), the filter index estimated value mpm has already been processed with the same characteristic value X. The filter index of the completed region is set as the same characteristic X estimation number. Otherwise, the filter index number of the partial region processed immediately before is set as the basic estimation value in the filter index estimation value mpm.
  • the symbol xxx? Yyy: zzz is assigned yyy if xxx is true and zzz if it is false. It is a term operator.
  • the index decoding unit 1334 decodes the MPM flag.
  • the index decoding unit 1334 determines whether the MPM flag is 0 or not. If the MPM flag is 0, the process proceeds to SE10, and otherwise, the process proceeds to SE11.
  • the index decoding unit 1334 assigns the filter index estimated value mpm to the filter index in the area indicated by the loop index ridx.
  • the index decoding unit 1334 decodes rem_idx.
  • the index decoding unit 1334 assigns a value obtained by subtracting 1 from rem_idx to the filter index of the area indicated by the loop index ridx, and otherwise rem_idx Assign.
  • the index decoding unit 1334 determines whether or not the decoded index is equal to or greater than the new index number. If it is equal to or greater than the new index number, the process proceeds to SE14, and if not, the process returns to the loop.
  • the new number identification processing unit 1335 increments the new index number by 1.
  • the region structure decoding unit 1313 decodes the filter index.
  • the region index calculation unit 1322 obtains a region index ridx of the filter target pixel having a certain coordinate (x, y).
  • the region index calculation method differs depending on the feature amount mode alf_region_adaptation_flag.
  • FIG. 72 is a block diagram showing a configuration of the area index calculation unit 1322.
  • the region index calculation unit 1322 includes an RA mode region index calculation unit 1350, an RA first characteristic value calculation unit 1351, an RA second characteristic value calculation unit 1352, an RA filter index calculation unit 1355, a BA1 mode region index calculation unit 1360, and a BA1 first.
  • the area index calculation unit 1322 performs 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 region index selection unit 1325 switches the region index calculation method according to the value of the feature amount mode alf_region_adaptation_flag. Specifically, the RA mode area index calculation unit 1350, the BA1 mode area index calculation unit 1360, and the BA2 mode area index calculation depending on whether the feature amount mode is RA mode, BA1 mode, BA2 mode, or 3D mode. Section 1370 selects the area index output from 3D mode area index calculation section 1380, respectively.
  • the region index selection unit 1325 includes a plurality of region index calculation methods having multidimensional characteristics.
  • the region index selection unit 1325 can include any one of RA mode, BA1 mode, BA2 mode, and 3D mode, any two, or any combination of three.
  • RA mode coordinate space division mode
  • feature space division mode here, at least one of BA1 mode, BA2 mode, and 3D mode
  • the region classification based on the feature amount is not appropriate, the other region classification can be supplemented, which is appropriate in terms of coding 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 1350 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 1351 outputs a value xIdx obtained by quantizing the X coordinate xC
  • the RA second characteristic value calculation unit 1352 outputs a value yIdx obtained by quantizing the Y coordinate yC
  • an RA filter index calculation unit 1355 The region index ridx 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 1360 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 1361 outputs the activity act as the characteristic value X of the unit block
  • the BA1 second characteristic value calculation unit 1362 outputs the activity direction as the characteristic value Y of the unit block, and calculates the BA1 filter 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 1370 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 1371 outputs the activity act as the characteristic value X of the unit block
  • the BA2 second characteristic value calculation unit 1372 outputs the activity direction of the unit block
  • the BA2 filter index calculation unit 1375 act
  • 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 filter index calculation unit 1375 also obtains ridx from the act and direction as in BA1.
  • 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 BA1 mode it is appropriate to provide both the BA1 mode and the BA2 mode in that two orthogonal characteristic value calculation methods having complementary discrimination capabilities are used.
  • a 45-degree oblique edge that cannot be identified by the BA1 mode and an oblique 135-degree direction edge perpendicular thereto can be identified, and the BA1 mode can identify a horizontal edge and a vertical edge that cannot be identified in the BA2 mode.
  • the two modes have a complementary relationship to each other.
  • the two activities used by the BA1 mode and the two activities used by the BA2 mode have an angle of 45 degrees.
  • the two modes in which the angle of 45 degrees is shifted are characteristic value calculation methods that are orthogonal to each other in terms of effect.
  • a characteristic value calculation method in which the angle is changed by 30 degrees that is, 0 degrees (0 degrees + 90 degrees), 30 degrees (30 degrees + 120 degrees), 60 degrees (60 degrees + 150 degrees).
  • BA1 mode, BA2 mode, and BA3 mode as the activity is also appropriate in the sense of three orthogonal characteristic value calculation methods having mutually complementary identification methods.
  • 0 degrees and 90 degrees mean the direction of activity used in each mode, and it is appropriate to use directions orthogonal to each other in the mode.
  • the part other than the direction for obtaining the activity that is, the calculation for obtaining the two activities, the calculation for adding the two activities to obtain the activity of the unit area, the activity value is quantized, and the characteristic value X
  • the same configuration as that of the BA1 mode can be used for the calculation for determining the characteristic value Y by comparing the activity, the calculation for determining the region index from the characteristic value X and the characteristic value Y, and a plurality of feature amount modes.
  • the BA1 mode and the BA2 mode or more have direction discrimination. It is also possible to provide a mode.
  • the direction of the original characteristic value is increased, the amount of calculation of the decoding device is particularly increased, which is not suitable in an environment where importance is placed on a small amount of calculation.
  • the number of dominant edge directions in a single image is limited, and if the adaptive filter can identify the limited dominant edge directions, the effect can be increased. If either one of the BA1 mode and the BA2 mode for discriminating the sex can be selectively used, a sufficient effect can be exhibited for most images.
  • the 3D mode region index calculation unit 1380 calculates a region index with reference to the coordinate values for the unit region specified by the coordinate values (xC, yC).
  • the 3D first characteristic value calculation unit 1381 calculates the characteristic value X of the unit region
  • the 3D second characteristic value calculation unit 1382 calculates the characteristic value Y of the unit region
  • the 3D second characteristic value calculation unit 1383 The characteristic value Z is calculated.
  • the calculation method of the characteristic value X and the characteristic value Y is omitted because the calculation method and the calculation method of the characteristic value Xact and the characteristic value Zdirection in the BA1 mode are the same.
  • As the third characteristic value Z a value val obtained by quantizing the average value avgVal of the pixel values in the unit region is used according to the following equation.
  • valTemp [x] [y] ⁇ i ⁇ j s' [xC + i] [yC + j] >> (BitDepthY)
  • i, j 0..3.
  • the 3D filter index calculation unit 1385 obtains the region index ridx using the following equation.
  • ridx (act + direction * w) * h + val
  • the characteristic value Z may be calculated using a coordinate value instead of the average pixel value avgVal.
  • the filter coefficient assigning unit 1323 assigns filter coefficients to the areas.
  • fix FilterIdxTbl [ridx].
  • the filter coefficient RegionFilterLuma [ridx] corresponding to the obtained filter index fix is read from the filter coefficient storage unit 1315 and output to the filter unit 1324.
  • the region index calculation unit 1322 and the filter coefficient assigning unit 1323 assign a filter coefficient group to each unit region. That is, the region index calculation unit 1322 calculates a region index ridx for each unit region, and the filter coefficient allocation unit 1323 allocates a filter coefficient group from the region index ridx.
  • the filter coefficient assigning unit 1323 does not assign a filter coefficient for that region, and outputs a signal to turn off the filter to the filter unit 1324.
  • 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.
  • the filter unit 1324 performs a filtering process using the filter coefficient RegionFilterLuma [fidx] on the target unit region, thereby generating a filtered decoded image P_FL in the target unit region.
  • the generated filtered decoded image P_FL is stored in the buffer memory 15.
  • the pixel value of the pixel to be filtered 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_DB (“prefiltered”). If the pixel value in the “image” is also expressed as S (x, y), the filter unit 1324 calculates the pixel value SF (x ′, y ′) by the above-described equation (1-4). .
  • the coordinates (x, y) may be the same coordinates as the coordinates (x ′, y ′) or have a one-to-one correspondence. If so, different coordinates may be used.
  • a (u, v) represents a filter coefficient to be 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 1323
  • o represents an offset component included in the filter coefficient RegionFilterLuma [fidx].
  • R in Expression (1-4) represents an area referred to in the filter process (also referred to as “filter reference area R”).
  • the number of taps in the reference region R is specified by alf_length_luma_minus5_div2.
  • the reference region R for example, as shown in FIG. 7, any one of the reference regions R0, R1, and R2 set according to each value of alf_length_luma_minus5_div2 may be used. Note that. In FIG. 7, a diamond-shaped reference region is illustrated, but the reference region R in the present embodiment is not limited to these examples, and a rectangular reference region in which the number of taps is specified by alf_length_luma_minus5_div2 It may be used.
  • 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 decoding apparatus can combine the RA mode for determining an area by coordinates and index decoding for each area.
  • the region index calculation unit 1322 divides the image using the filter target pixel and the coordinates of the block including the pixel.
  • the area structure decoding unit 1312 decodes the filter index for each area for each divided area. Thereby, a certain target area can have the same filter index as all the areas other than the target area, and all the areas can be merged with each other.
  • Each area of the image may have a good top and bottom classification, such as an example where there is a sky on the upper side and a city on the lower side.
  • the left and right backgrounds that are not adjacent to each other may have the same characteristics after being classified into left and right.
  • the RA mode that classifies regions (unit regions) based on coordinates
  • the partial areas can be merged regardless of the adjacent relationship as in the latter example, it is possible in many cases to share the same filter coefficient between the partial areas having the same characteristics. Therefore, a method that combines the RA mode in which the partial area is defined by coordinates and the filter index decoding for each partial area is suitable.
  • the moving picture decoding apparatus can switch between the RA mode for determining the partial area from the coordinates of the unit area and the BA1 mode for determining the partial area from the pixel value of the unit area.
  • the region index calculation unit 1322 determines the region index of the unit region from two or more different characteristic values (two-dimensional characteristic values of the unit region). In the case of region division using a two-dimensional characteristic value, subspaces having the same characteristic value have similar characteristics, and thus suitable filtering can be performed using the same filter coefficient group. Compared with the case of encoding different filter coefficient groups for each partial space, the code amount of the filter coefficients can be reduced.
  • the partial regions when using the two-dimensional characteristic value, it is important that the partial regions can be merged two-dimensionally in accordance with the adjacency relationship in the Y-axis direction and the adjacency relationship in the X-axis direction. Further, depending on the feature amount mode, it may be preferable that merging between partial regions is possible regardless of the adjacency relationship as in the RA mode. For example, even in the BA1 mode, a partial region having a characteristic value Y of 0 is similar to a partial region having a characteristic value Y of 2 that is not adjacent to the partial region, and merging may be preferable.
  • the method of decoding the filter index for each part can be merged by adjacency regardless of the axis of the multi-dimensional characteristic value (up and down, left and right in the case of two dimensions), and This is suitable because merging is possible regardless of the adjacency relationship. That is, a plurality of feature amount modes can be switched, and when each of the feature amount modes has a two-dimensional characteristic, a configuration in which a filter index for each partial region is decoded is effective.
  • the video decoding device has a 3D mode in which a region index is calculated using a three-dimensional characteristic value.
  • the subspaces have X axis and Y axis as well as Z axis adjacency, so the combination with the configuration that decodes the filter index for each partial area that can be merged with all the partial areas is effective It is.
  • the estimation filter index calculation unit 1333 includes the region position estimation value calculation unit 1342, and when adjacent to the X-axis direction, already encoded adjacent to the Y-axis direction.
  • the region index as an estimated value
  • a short codeword is allocated when adjacent regions having a relatively high appearance probability are merged.
  • the remaining number management unit 1336 manages the number of remaining filters and the number of remaining areas, and when the number of remaining filters is relatively large compared to the number of remaining areas, a new number estimation using an estimated value as an index of the new filter.
  • the value calculation unit 1343 can reduce the amount of code necessary for region structure coding.
  • the range of filter parameters assigned to the region index is limited to 0 or more and the number of filter coefficients AlfNumFilters minus one. Since a filter index from 0 to the number of filter coefficients AlfNumFilters minus 1 is assigned to the filter coefficient that can be referred to, and the filter coefficient is stored according to the filter index, this restriction allows the use of the decoded filter index.
  • the filter index can be obtained from the region index by simple processing and the filter coefficient can be assigned.
  • the range of the filter index to be decoded is 0 or more, the maximum value of the filter index of the already processed region + 1 It shall be limited to the following.
  • merged it is 0 or more and the maximum value or less.
  • the filter index is fixed, such as when the number of remaining filters matches the number of remaining areas, encoding of the filter index can be skipped, and the code amount of the filter index can be reduced. It is easy to set the filter index when the filter index is fixed.
  • Moving picture coding apparatus 8 that generates the coded data # 7 by coding the coding target picture will be described with reference to FIG.
  • 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 140 instead of the adaptive filter 60 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 140 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 140 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.
  • the variable length code encoding unit 22 encodes the filter parameter FP as part of the encoded data # 7.
  • FIG. 70 is a block diagram showing the configuration of the adaptive filter 140.
  • the adaptive filter 140 includes an adaptive filter information setting unit 141 and an adaptive filter unit 142.
  • the adaptive filter information setting unit 141 includes a tap number setting unit 1411, a region structure setting unit 1412, a feature amount mode setting unit 1413, a filter coefficient residual generation unit 1414, a filter coefficient storage unit 1415, and A filter parameter generation unit 1416 is provided.
  • the tap number setting unit 1411 sets the syntax alf_length_luma_minus5_div2 for designating the number of taps of the filter coefficient.
  • the set syntax alf_length_luma_minus5_div2 is supplied to the filter parameter generation unit 1416.
  • the area structure setting unit 1412 sets the filter index table FilterIndexTbl.
  • the feature amount mode setting unit 1413 sets the syntax alf_region_adaptation_flag.
  • the set syntax alf_region_adaptation_flag is supplied to the adaptive filter unit 142.
  • alf_length_luma_minus5_div2, FilterIndexTbl, and alf_region_adaptation_flag are set so that the encoding efficiency is further improved.
  • the filter coefficient residual generation unit 1414 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 1416.
  • the filter coefficient storage unit 1415 stores a filter coefficient group AlfRegionFilterCoeff [i] [k] supplied from a filter coefficient deriving unit 1423 described later.
  • the filter parameter generation unit 1416 generates a filter parameter FP from the syntax alf_length_luma_minus5_div2, alf_region_adaptation_flag, filter index FilterIndexTbl, and alf_coeff_luma [i] [k].
  • the filter index is optionally encoded using a filter index estimate.
  • the generated filter parameter FP is supplied to the variable length code encoder 22.
  • the adaptive filter unit 142 includes a region index calculation unit 1322, a filter coefficient derivation unit 1423, and a filter unit 1324.
  • the filter coefficient deriving unit 1423 derives a filter coefficient RegionFilterLuma [i] [j] such that an error between the filtered decoded image P_FL and the encoding target image in the target unit region becomes smaller.
  • the derived filter coefficient RegionFilterLuma [i] [j] is supplied to the filter unit 1324 and stored in the filter coefficient storage unit 1415.
  • Non-Patent Document 4 simply performs thinning out in the vertical direction and the horizontal direction. Therefore, when the unit area is small, there is insufficient information for calculating the characteristic value, and the unit area is appropriately set. There was a problem that classification was not possible. When the classification accuracy of the unit region is lowered, the effect of the adaptive filter that changes the filter coefficient group for each region is lowered, so that the coding efficiency is lowered.
  • Non-Patent Document 4 in the case of a unit area of 4 ⁇ 4 pixels, the characteristic value is calculated using the Laplacian values of four points in the unit area indicated by a black circle. However, the encoding efficiency is lower than when no decimation is performed.
  • the configuration of the area index calculation unit 1322 is different from the configuration described above.
  • Other configurations are the same as those described above.
  • the region index calculation unit 1322 is a configuration for obtaining the region index ridx of the pixel to be filtered while reducing the amount of calculation of the characteristic value calculation in the BA mode.
  • FIG. 78 is a block diagram showing a configuration of a BA mode area index calculation unit 1360 ′ included in the area index calculation unit 1322 according to this modification.
  • the BA mode area index calculation unit 1360 ′ is used in place of at least one of the BA1 mode area index calculation unit 1360 and the BA2 mode area index calculation unit 1370 described above.
  • the BA mode area index calculation unit 1360 ′ includes an original characteristic value calculation unit 1363, a first characteristic value calculation unit 1361 ′, a second characteristic value calculation unit 1362 ′, and a filter index calculation unit 1365.
  • the original characteristic value calculation unit 1363 calculates an intermediate value used to calculate the characteristic value X and the characteristic value Y in the first characteristic value calculation unit 1361 ′ and the second characteristic value calculation unit 1362 ′, respectively.
  • the original characteristic value calculating unit 1363 includes a pixel characteristic value calculating unit 13631, a block characteristic value adding unit 13632, and a characteristic value calculating attribute setting unit 13633.
  • the characteristic value attribute setting unit 13633 includes a step size setting unit 13634, a window size setting unit 13635, and a step method setting unit 13636.
  • FIG. 80 is a diagram for explaining a window and an extended unit area.
  • the window refers to an area set around the unit area.
  • a region indicated by a bold line is a unit region, and the unit region is indicated by a rectangle of upper left coordinates (sx, sy), horizontal BlkSizeX pixels, and vertical BlkSize pixels.
  • the extended unit area is an area expanded by adding a window to the unit area. As shown in FIG. 80, assuming that the window size is expressed using dx0, dx1, dy0, and dy1, the expansion unit area is a rectangle of horizontal BlkSizeX + dx0 + dx1 and vertical BlkSizeY + dy0 + dy1.
  • the BA mode area index calculation unit 1360 ′ calculates the characteristic value of the unit area by calculating an intermediate value for one or a plurality of pixels in the extended unit area larger than the unit area.
  • FIG. 79 describes and expresses the operation of the BA mode area index calculation unit 1360 ′ in a format similar to the programming language C, and shows an area characteristic calculation function. The operation of each unit of the BA mode area index calculation unit 1360 ′ will be described with reference to FIG.
  • the BA mode area index calculation unit 1360 ′ calculates the area index of the unit area specified by the coordinates (sx, sy).
  • the area characteristic calculation function simultaneously calculates area indexes of a plurality of unit areas in order to reduce the amount of calculation.
  • the size of the unit area is (BlkSizeX, BlkSizeY), and the number of unit areas to be calculated is indicated by (numBlkX, numBlkY).
  • the BA mode area index calculation unit 1360 ′ does not calculate an intermediate characteristic value every other pixel, but uses step sizes (stepX, stepY), which will be described later, every stepX in the X direction and every stepY in the Y direction.
  • the amount of calculation is reduced by a thinning calculation for calculating an intermediate characteristic value.
  • the thinning operation is also called sub-sampling.
  • the thinning calculation can be expressed as performing a thinning of pixels in a predetermined area and calculating an intermediate characteristic value only for pixels that are not thinned.
  • the characteristic value calculation attribute setting unit 13633 uses the step size setting unit 13634, the window size setting unit 13635, and the step method setting unit 13636 to set various parameters for the thinning calculation.
  • the step size setting unit 13634 calculates the step size in the X direction and the step size in the Y direction as stepX and stepY, respectively.
  • the window size setting unit 13635 is a means for setting a parameter (window size) used for calculating a characteristic value using a pixel value of an area larger than the unit area.
  • the X-direction start coordinate extension amount dx0, the X-direction end A coordinate extension amount dx1, a Y direction start coordinate extension amount dy0, and a Y direction end coordinate extension amount dy1 are set.
  • dx0, dx1, dy0, and dy1 are integers of 0 or more.
  • the step method setting unit 13636 sets a thinning mode mode that defines a step method.
  • the pixel characteristic value calculation unit 13631 obtains a characteristic value for each pixel used as an intermediate value using the set step size (stepX, stepY), window size, and step method mode. As shown by S7900 and S7901 in FIG. 79, the pixel characteristic value calculation unit 13631 converts an area larger by the window size (dx0, dx1, dy0, dy1) than the coordinates (sx, sy) of the unit area to a step size (stepX , StepY) is repeated while thinning out.
  • the start coordinate of the area to be calculated is set small by the X-direction start coordinate extension amount dx0 and the Y-direction start coordinate extension amount dy0, and the end coordinate of the area to be calculated is set as the X-direction end coordinate extension amount dx1,
  • the Y-direction end coordinate extension amount dy1 is set larger.
  • the pixel characteristic value calculation unit 13631 executes the process of the thinning mode mode by correcting the coordinates used for calculating the intermediate value, here (x, y), and obtaining (xx, y).
  • the coordinate used for calculating the intermediate value is shifted (displaced) by +1 in the X direction.
  • a method of shifting by ⁇ 1 instead of shifting by +1 in the X direction, a method of shifting by +3, or the like can be used.
  • Intermediate value calculation by the pixel characteristic value calculation unit 13631 is performed in S7903 and S7904.
  • Laplacian calculation is performed, but not limited to Laplacian, an intermediate value is obtained by obtaining a difference, an absolute difference value, an inner product, an arbitrary filter, a difference between the product, a square value, and a square value. Can also be calculated.
  • the intermediate value corresponding to the first BA mode is calculated here, it is also possible to calculate the intermediate value corresponding to the second BA mode using the following equation.
  • the intermediate value calculation process is performed simultaneously on a plurality of unit areas indicated by numBlkX and numBlkY. When the intermediate value is calculated using the extended unit area, the intermediate value related to the window size overlaps between adjacent unit areas.
  • the calculation amount is reduced because redundant intermediate values need not be calculated. Note that, when the area indexes of a sufficient number of unit areas are calculated all at once, the increase in the calculation amount due to the window size is negligible.
  • the block characteristic value adding unit 13632 repeats S7907 and S7908, and the block intermediate value varTempBlk1 [bx] [bx] [bx] [bx] [bx] [bx] [bx] [bx] [ by], varTempBlk2 [bx] [by] is calculated.
  • the block characteristic value adding unit 13632 adds the calculated intermediate values varTemp1 and varTemp2 in a size range corresponding to each unit area, and calculates a block intermediate value for the unit area.
  • the range to be added is an extended unit area.
  • the start coordinate is expanded by the X-direction start coordinate extension amount dx0 and the Y-direction start coordinate extension amount dy0
  • the end coordinate is expanded by the X-direction end coordinate extension amount dx1 and the Y-direction end coordinate extension amount dy1.
  • the intermediate values in the pixels that are not thinned out in the extended unit area are added.
  • step sizes stepX and stepY are 1, the intermediate value of each pixel is added.
  • step sizes stepX and stepY are 2, the intermediate value of every other pixel is added.
  • the amount of calculation is reduced by thinning.
  • the addition processing is performed by the block characteristic value adding unit 13632 in S7909 and S7910.
  • weighted addition linear sum
  • requires a block intermediate value can also use the other process which determines the representative value of a block from an intermediate value.
  • a method using a median of rank statistics, or a method using a sum or average without using outliers may be used.
  • An example of the outlier is a method of removing the maximum or minimum intermediate value calculated in the extended unit area.
  • a square sum, a square average, a geometric average, or the like can be used.
  • the process for obtaining the block intermediate value may use another process regardless of the representative value. For example, an average of ratios between intermediate values or an average of values obtained by referring to a predetermined table from the intermediate values may be used. As described above, it is preferable to use the intermediate value in a plurality of pixels to suppress the fluctuation of the intermediate value. Further, the characteristic value of the unit area may be directly calculated from the intermediate value without obtaining the block intermediate value.
  • the first characteristic value calculation unit 1361 ′ and the second characteristic value calculation unit 1362 ′ perform the following process using the block intermediate values varTempBlk1 and varTempBlk2 for the unit area obtained by the addition process, thereby performing the characteristic value X Activity and characteristic direction Y are calculated.
  • the size extblkSize of the extension unit area is obtained.
  • the number of pixels used for intermediate value calculation in the extended unit area is obtained. This can be calculated by dividing the area of the expansion unit region by the step size.
  • the block intermediate values varTempBlk1 and varTempBlk2 are divided by the size of the extension unit area extblkSize to normalize the size of the values to obtain block characteristic values avgTemp1 and avgTemp2. Note that this normalization process is required when the size of the block intermediate value is used as the characteristic value. However, when the characteristic value is calculated from the ratio of the block intermediate value or the code of the block intermediate value, the normal value is used. There is no need to perform the conversion process. In the normalization process, the value used for normalization does not necessarily have to be the area of the extended unit region, and may be a value that is substantially proportional to the area of the extended unit region.
  • the direction as the characteristic value Y is calculated by comparing the magnitudes of the two characteristic values avgTemp1 and avgTemp2.
  • the pixel bit depth is 8 bits by further shifting to the right in consideration of the internal pixel bit precision (InternalBitDepth).
  • the intermediate value avgTemp3 converted in this case is calculated.
  • the clip is clipped between 0 and 15 by the clip function Clip3.
  • the intermediate value avgTemp3 is quantized using a table to obtain the activity that is the characteristic value X.
  • the filter index calculation unit 1365 calculates an area index rindex (bx, by) of block coordinates (bx, by) from the activity that is the characteristic value X and the direction that is the characteristic value Y in S7919.
  • the intermediate value is calculated using the Laplacian of the pixel. Since the Laplacian uses pixels around the target pixel, the range of pixels actually used for calculating characteristic values is larger than the extended unit area.
  • two characteristic values are calculated using comparison of block intermediate values or quantization of block intermediate values, but other methods may be used.
  • the difference between the product of the gradient values and the square of the gradient value is obtained as the intermediate value
  • the ratio of the block intermediate values and the sign of the block intermediate value can be used.
  • pixels for calculating intermediate values used for calculating characteristic values can be controlled by the window sizes dx0, dx1, dy1, dy2, step sizes stepX, stepY, and thinning mode mode.
  • Such parameters are hereinafter referred to as characteristic value reference parameters.
  • the characteristic value parameter may be changeable according to the value in the encoded data, or a fixed value may be used in the decoding device and the encoding device.
  • the BA mode region index calculation unit 1360 ′ by the above processing calculates the intermediate value by thinning out the step sizes stepX and stepY, and calculates each characteristic value of the unit region by using the thinned intermediate value. Reduce the amount.
  • the amount of information used in the unit area is reduced, so that the calculated characteristic value does not sufficiently reflect the characteristic of the unit area (the accuracy of the characteristic value is low). It is likely to occur.
  • the classification accuracy of the unit region by assigning the region index is improved, and the encoding efficiency is improved by performing an appropriate filtering process.
  • Even when the unit area is enlarged by the window size it is possible to minimize the increase in the amount of calculation by simultaneously calculating the characteristic values of the plurality of unit areas. Thereby, it is possible to achieve both a low calculation amount in the characteristic value calculation and a high coding efficiency by the high-precision characteristic value calculation.
  • the characteristic value reference parameter has a window size of one of dx0, dx1, dy0, and dy1, which is 1 or more, and stepX, stepY It is necessary that one of the step sizes is 2 or more.
  • the characteristic value calculation means uses a process of changing or shifting the selection of pixels that are not thinned out according to the Y coordinate of the image.
  • a process of changing or shifting the selection of pixels that are not thinned out according to the Y coordinate of the image In a configuration where regular thinning is performed in the horizontal and vertical directions, there are edges concentrated at specific positions in the unit area, such as when there is an edge in a specific direction or when a certain pattern is repeated. In some cases, a secondary problem that the classification accuracy is lowered may occur. However, such a problem can be avoided to some extent by using a shift.
  • the characteristic value calculating means includes thinned pixel coordinate displacing means for displacing the coordinates of the pixels to be thinned along the X axis or the Y axis, so that the unit region classification accuracy is improved. Can do. Therefore, according to the above configuration, higher encoding efficiency can be realized with a small amount of calculation.
  • FIGS. 81 to 84 are diagrams showing pixels used for intermediate value calculation when calculating characteristic values with relatively low calculation amount and comparatively high accuracy by thinning and enlargement of the unit area. Similar to FIG. 77, black circles indicate pixels for which intermediate values are calculated. A region indicated by a thick solid line is a unit region. In FIGS. 81 to 84, the pixels for calculating the intermediate value are thinned out, and the calculation is performed using the pixels in the region outside the unit region so that the black circle pixels are outside the unit region.
  • FIG. 81 is an example in which the size of the unit area is 4 ⁇ 4 and the thinning is performed both horizontally and vertically.
  • FIG. 81E shows reference parameters for calculating characteristic values.
  • BlkSizeX + dx0 + dx1 and BlkSizeY + dy0 + dy1 are 5 in the examples of FIGS. 81A to 81D, and the expansion unit area is 5 ⁇ 5.
  • the pixel necessary for calculating the characteristic value of the unit region is a 7 ⁇ 7 region.
  • 81A to 81D are different in the position of the start point and end point of the window size.
  • FIG. 82 is another diagram showing a pixel for calculating an intermediate value for calculating a characteristic value.
  • a method using a window only in the X-axis direction or the Y-axis direction is also applicable.
  • the size of the extended unit area calculated from the window size is BlkSizeX + dx0 + dx1 ⁇ BlkSizeY + dy0 + dy1, that is, 5 ⁇ 4, which is larger than the size of the unit area 4 ⁇ 4.
  • the size of the extended unit area as the range of pixels after thinning is 5 ⁇ 3 as the range of pixels after thinning indicated by black circles. In this case, the size in the Y-axis direction is smaller than the size of the unit area.
  • the pixel range of the thinning value is 3 ⁇ 5, and the size in the X-axis direction is smaller than the size of the unit region. This discrepancy depends on whether or not the thinned portion is included in the extension unit area.
  • the processing by the BA mode area index calculation unit 1360 ′ of this embodiment is partly smaller than the unit area when the thinned part is not included, as in the example of FIGS. 82 (a) and (b). This process is included.
  • FIG. 83 is another diagram showing a pixel for calculating an intermediate value for calculating a characteristic value.
  • the vertical direction is processed as a method in which each line is processed. What is staggered is that the X coordinate is incremented by 1 in FIG.
  • FIG. 83E when the Y coordinate is an odd number. Or, in FIG. 83 (f), the process is performed by -1. Specifically, this corresponds to the processing of S7902 already described.
  • FIG. 83 (g) shows reference parameters for calculating characteristic values. Also, when thinning horizontally, depending on the hardware configuration, there is a case where the amount of calculation does not decrease, or pre-processing and post-processing of thinning processing may be required, so if it is horizontal thinning and vertical thinning, It is preferable to prioritize vertical thinning. Therefore, FIGS. 83C and 83D are preferable examples.
  • FIG. 84 is another diagram showing a pixel for calculating an intermediate value for calculating a characteristic value.
  • the examples of FIGS. 84B and 84C each have a unit area size of 4 ⁇ 2 example, 2 ⁇ 4 example.
  • a method using thinning and a window can be applied regardless of the size of the unit area.
  • FIG. 85 is another diagram showing a pixel for calculating an intermediate value for calculating a characteristic value.
  • (A) to (f) are examples in which the decimation rate is 1/4.
  • the number of pixels for calculating the intermediate value differs according to the Y coordinate.
  • This processing can be performed by adding the following processing to the processing in FIG. That is, also in the processing of the block characteristic addition unit, the shifted X coordinate (“xx” shown in FIG. 79) is calculated, and the value xx is the range of the extended unit region (BlkSizeX * (bx + 1) in the X coordinate). If it exceeds + dx1-1), the process of skipping the addition of S7909 and S7910 can also be performed.
  • the processing for obtaining the size of the expansion unit region in S7911 also performs a response according to the displacement amount.

Landscapes

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

Abstract

 適応フィルタ(110)は、入力画像を構成する各単位領域に関する第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々に対して、新規フィルタ係数を用いるか否かを示す新規フィルタ係数フラグを復号する領域構造復号部(1112)と、処理順で該対象部分領域の前に割りつけられたフィルタ係数を指定する候補選択インデックスを復号する領域構造復号部(1112)を備えている。

Description

画像フィルタ装置、復号装置、符号化装置、および、データ構造
 本発明は、画像のフィルタリングを行う画像フィルタ装置に関する。また、そのような画像フィルタを備えている符号化装置、および、復号装置に関する。また、そのような復号装置によって復号される符号化データのデータ構造に関する。
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置(符号化装置)、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置(復号装置)が用いられている。具体的な動画像符号化方式としては、例えば、H.264/MPEG-4.AVCに採用されている方式、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式、及び、HM(HEVCTestModel)ソフトウェアに採用されている方式などが挙げられる。
 このような符号化方式において、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる最大符号化単位(LCU:Largest Coding Unit、ツリーブロックとも呼ばれる)、最大符号化単位を分割することにより得られる符号化単位(CU:Coding Unit、符号化ノードとも呼ばれる)、及び、符号化単位を分割することより得られるブロックおよびパーティションからなる階層構造により管理され、多くの場合、ブロックを最小単位として符号化される。
 また、このような符号化方式においては、通常、入力画像を符号化/復号化することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像と入力画像との差分データが符号化される。また、予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)と呼ばれる方法が知られている。
 イントラ予測においては、同一フレーム内の局所復号画像に基づいて、当該フレームにおける予測画像が順次生成される。具体的には、イントラ予測においては、通常、予測単位(例えば、ブロック)毎に、予め定められた予測方向(予測モード)群に含まれる予測方向から何れかの予測方向が選択されると共に、局所復号画像における参照画素の画素値を、選択された予測方向に外挿することによって、予測対象領域上の予測画素値が生成される。また、インター予測においては、フレーム全体が復号された参照フレーム(復号画像)内の参照画像に対し、動きベクトルを用いた動き補償を適用することによって、予測対象フレーム内の予測画像が予測単位(例えば、ブロック)毎に生成される。
 非特許文献1及び非特許文献2には、復号画像を構成する各画素を、該画素の2次元的な特性に応じて複数のグループの何れかに分類し、それら複数のグループを適宜統合(マージ)すると共に、マージ後のグループ毎に設定されたフィルタ係数を用いて復号画像をフィルタする適応的ループフィルタ(Adaptive Loop Filter)(以下、単に「適応フィルタ」とも呼ぶ)が開示されている。また、同文献には、水平方向及び垂直方向の座標に応じて、復号画像を複数の領域に分割し、領域毎に設定されたフィルタ係数を用いる手法が開示されRAモードと呼ばれる。非特許文献2では、領域および領域周辺の画素から算出される活性度及び方向性に応じて、復号画像を複数の領域に分割し、領域毎に設定されたフィルタ係数を用いる方法が開示されBAモードと呼ばれる。非特許文献3では、RAモードとBAモードを符号化データ中のフラグ(特徴量モード)により切り替える方法が開示されている。
 このような適応フィルタを備えた符号化装置および復号装置は、復号画像に対して当該適応フィルタによりフィルタ処理を施して得られるフィルタ済みの復号画像を参照して予測画像を生成することにより、予測精度の向上および符号化効率の向上を図ることができる。
 また、非特許文献4には、活性度及び方向性を、復号画像を単位領域内の間引いた画素から算出することにより、特性の算出に必要な演算量を低減する方法が開示されている。
「JCTVC-E046」,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 5th Meeting: Geneva, CH, 03/2011(2011年3月公開) 「JCTVC-E323」,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 5th Meeting: Geneva, CH, 03/2011(2011年3月公開) 「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(2011年3月公開) 「JCTVC-F301-v2」,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 6th Meeting: Torino, Italy,07/2011,[online][2011年7月8日検索] (URL: http://phenix.int-evry.fr/jct/index.php 2011年7月3日01:44:01 更新版)
 しかしながら、非特許文献1及び非特許文献2に開示された方法では、マージの仕方が1次元的であるため、2次元的なグループ分けの自由度を十分に生かすことができず、符号化効率が向上しない、若しくは、符号化効率が期待されるほど向上しないという問題を有していた。この点について、図39を参照して、より具体的に説明する。
 図39は、非特許文献1及び非特許文献2に開示された方法を模式的に示す図である。同文献に開示された方法では、2つの特徴量X及びYによって張られる領域が複数のサブ領域に分割されると共に、各サブ領域に対して、所定の順序(ラスタスキャン順)でインデックスが付される。ここで、隣り合うインデックスが付されたサブ領域同士のみがマージ可能である。すなわち、所定の順序に沿って隣り合うサブ領域同士のみがマージ可能である。
 このように、上記文献に開示された方法では、マージ可能なサブ領域が所定の順序に沿って隣り合うものに限られるため、2次元的なグループ分けの自由度を十分に活かすことができない。
 また、非特許文献3では、非特許文献1のRAモードと非特許文献2のBAモードを切り替え、ピクチャ毎に適当な特性値を用いてグループ分けを行うことで符号化効率の向上を図っているが、この場合も、マージ対象は隣り合うものに限られるため、2次元的なグループ分けの自由度を十分に活かすことができない。
 さらに、水平方向及び垂直方向の座標に応じて領域を分割するRAモードにおいては、水平方向、垂直方向の隣接する領域だけではなく、隣接しない領域ともマージ可能とすることが重要であるが、このようなマージも可能ではない。
 本発明は、上記の問題に鑑みてなされたものであり、符号量及び処理量の増大を抑えつつ、特徴量についての多次元的な自由度を生かすことによって、符号化効率を向上させることのできる適応フィルタを実現することにある。
 上記の問題を解決するために、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、を備え、上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する、ことを特徴としている。
 上記のように構成された本発明に係る画像フィルタ装置によれば、新規フィルタ係数フラグによって、領域分類の数を制御することができ、候補選択インデックスに従って、第1の特性値が等しい、もしくは、第2の特性値が等しい部分領域と、同じフィルタ係数群を用いることができる。
 したがって、上記の構成によれば、処理順で隣り合う部分領域がマージ可能であることに加え、第1の特性値と第2の特性値の軸でマージ可能であるので、特性値領域の2次元的な自由度を、従来の技術に比べて効果的に生かすことができる。これにより、各部分領域に対して、フィルタ係数群をより適切に割り付けることができるので、符号量及び処理量の増大を抑制しつつ符号化効率を向上させることができる。
 なお、上記単位領域とは、上記入力画像を構成する複数の重複しない領域の各々ことを表すものとする。上記画像フィルタ装置が、画像を符号化する符号化装置、および、符号化データから画像を復号する復号装置において用いられる場合には、上記単位領域を、例えば、予測画像を生成する単位である予測単位(パーティション)としてもよいし、周波数変換の単位である変換単位としてもよいし、それら以外のものとしてもよい。例えば、上記単位領域は、1画素から構成されるものであってもよい。
 本発明に係る復号装置は、符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、上記画像フィルタ装置と、各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、ことを特徴としている。
 本発明に係る符号化装置は、符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、上記画像フィルタ装置と、各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、ことを特徴としている。
 本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、を備え、上記フィルタ手段によって、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタ係数群とその予測値との残差、及び上記新規フィルタ係数フラグと上記候補選択インデックス、を含んでいる。
 上記符号化データを復号する画像フィルタ装置は、上記領域分類情報と、上記割り付け指定情報を参照することによって、特性値領域の2次元的な自由度を生かした適切なフィルタ処理を行うことができる。
 以上のように、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、を備え、上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する、ことを特徴としている。
 上記のように構成された本発明に係る画像フィルタ装置によれば、符号量及び処理量の増大を抑制しつつ符号化効率を向上させることができる。
第1の実施形態に係る適応フィルタについて説明するための図であって、特性値領域CRと、特性値領域CR上に設定される分割単位DU[i][j]とを示す図である。 第1の実施形態に係る符号化データの構成を説明するための図であって、(a)は、ピクチャPICTを規定するピクチャレイヤを示しており、(b)は、スライスSを規定するスライスレイヤを示しており、(c)は、ツリーブロック(Tree block)TBLKを規定するツリーブロックレイヤを示しており、(d)は、ツリーブロックTBLKに含まれる符号化単位(Coding Unit;CU)を規定するCUレイヤを示している。 第1の実施形態に係る符号化データのフィルタパラメータに含まれる各シンタックスを示す図である。 第1の実施形態に係る適応フィルタについて説明するための図であって、(a)は、分割されていない特性値領域を示す図であり、(b)は、第1段階の分割が行われた特性値領域を示す図であり、(c)は、第1段階の分割において用いられる特性値分割点と、第2段階の分割において用いられる特性値分割点とを示す図であり、(d)は、第1の特性値として活性度を用いる場合に、シンタックスalf_first_split_val_shiftおよびalf_second_split_typeの値に応じて設定される特性値分割点を例示する表である。 第1の実施形態に係る適応フィルタについて説明するための図であって、(a)は、第1段階の分割によって得られた特性値部分領域が、シンタックスalf_second_split_type=0によって指定される第2段階の分割によって、第2の特性値に関して2つの特性値部分領域に分割される場合を示す図であり、(b)は、第1段階の分割によって得られた特性値部分領域が、シンタックスalf_second_split_type=1によって指定される第2段階の分割によって、第2の特性値に関して4つの特性値部分領域に分割される場合を示す図であり、(c)は、第2の特性値として画像の方向性を用いた場合の特性値分割点と、第2の特性値として平均画素値を用いた場合の特性値分割点とを例示する表である。 第1の実施形態に係る適応フィルタについて説明するための図であって、第1段階の分割によって得られた特性値部分領域が、シンタックスalf_second_split_flag[i0]、および、alf_second_split_typeの各値に応じて、第2段階の分割によってどのように分割されるのかを具体的に示す図である。 第1の実施形態に係る適応フィルタについて説明するための図であって、シンタックスalf_length_luma_minus5_div2[i0]の値に応じて設定される参照領域を例示する図である。 第1の実施形態に係る適応フィルタについて説明するための図であって、特性値部分領域に対して第2段階の分割を行うことによって得られた各特性値部分領域について適応的に割り付けられる予測方向を示す図である。 第1の実施形態に係る適応フィルタについて説明するための図であって、特性値部分領域に対して第2段階の分割を行うことによって得られた各特性値部分領域について固定的に割り付けられる予測方向を示す図である。 第1の実施形態に係る適応フィルタについて説明するための図であって、第1段階の分割によって得られた特性値部分領域が、第1の特性値について最大で2分割され、第2の特性値について最大で3分割される例を示す図である。 第1の実施形態に係る動画像復号装置の構成を示すブロック図である。 第1の実施形態に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。 第1の実施形態に係る適応フィルタによるフィルタ処理を説明するための図であって、(a)は、対象単位領域URに含まれる画素と対象単位領域URに隣接する画素とから構成される特性値算出参照領域CRRを示しており、(b)は、対象単位領域URに含まれる画素から構成される特性値算出参照領域CRRを示している。 第1の実施形態に係る適応フィルタが備えるエッジ検出部によるエッジ検出処理を説明するための図であって、(a)は、対象画素を含む参照領域に属する画素を示す図であり、(b)は、実施形態における角度の規定の仕方を示す図である。 第1の実施形態に係る動画像符号化装置の構成を示すブロック図である。 第1の実施形態に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。 第1の実施形態の変形例に係るフィルタパラメータに含まれる各シンタックスを示す図である。 第1の実施形態の変形例に係るフィルタパラメータに含まれるシンタックスalf_num_first_split_minus1によって指定される特性値分割点を例示する表である。 第2の実施形態に係る符号化データのフィルタパラメータに含まれる各シンタックスを示す図である。 第2の実施形態に係る適応フィルタについて説明するための図であって、(a)は、シンタックスalf_select_split_charによって指定される第1の特性値Xおよび第2の特性値Yを示す表であり、(b)は、シンタックスalf_select_split_charの各値について設定される再分割点PY1~PY3の具体例を示す表であり、(c)は、シンタックスalf_second_split_val[k]の値に応じて設定される再分割点PY1~PY3の具体例を示す表である。 第2の実施形態に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。 第2の実施形態に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。 第3の実施形態に係る符号化データを説明するための図であって、(a)は、フィルタパラメータに含まれる各シンタックスを示しており、(b)は、alf_coeff_set_lumaに含まれるシンタックスを示しており、(c)は、alf_coeff_copy_lumaを示している。 第3の実施形態に係る符号化データを説明するための図であって、(a)は、NX及びNYのとり得る値と、alf_feature_modeの各値との対応関係を示しており、(b)は、マージ指定テーブルを示している。 alf_feature_modeが0もしくは1である場合の特性値領域の分割を示す模式図である。 alf_feature_modeが2もしくは3である場合の特性値領域の分割を示す模式図である。 第3の実施形態の構成例1の変形例における特性値領域の分割を示す模式図である。 第3の実施形態の構成例1の変形例における特性値領域の分割を示す模式図である。 第3の実施形態の構成例1の変形例に係るフィルタパラメータFPのシンタックステーブルを示す。 第3の実施形態の構成例2に係るフィルタパラメータのシンタックステーブルである。 第3の実施形態の構成例2において、alf_feature_mode2が0である場合の特性値領域の分割を示す模式図である。 第3の実施形態の構成例2において、alf_feature_mode2が1である場合の特性値領域の分割を示す模式図である。 第3の実施形態の構成例3に係るフィルタパラメータのシンタックステーブルである。 第3の実施形態の構成例3における特性値領域の分割を示す模式図である。 第3の実施形態の構成例5に係るフィルタパラメータのシンタックステーブルである。 第3の実施形態に係る適応フィルタの構成を示すブロック図である。 第3の実施形態に係る適応フィルタの構成を示すブロック図である。 第3の実施形態の構成例6に係るフィルタパラメータを復号する際の特性値領域の分割の態様を示す図である。 従来技術を説明するための図であって、各サブ領域をインデックスと共に示す図である。 第3の実施形態に係る符号化データを説明するための図であって、(a)は、alf_coeff_set_lumaの他の例を示しており、(b)は、alf_coeff_copy_lumaの他の例を示している。 第3の実施形態に係る符号化データを説明するための図であって、alf_coeff_set_lumaの他の例を示している。 第3の実施形態における構成例3の別の構成例における分割を示す模式図である。 第3の実施形態における構成例4に係るフィルタパラメータFPのシンタックステーブルである。 第3の実施形態における構成例4における分割を示す模式図である。 第4の実施形態に係る適応フィルタの構成を示すブロック図である。 第4の実施形態に係る適応フィルタの構成を示すブロック図である。 第4の実施形態に係る座標空間分割における分割を示す模式図である。 第4の実施形態に係る特徴空間分割における分割を示す模式図である。 第4の実施形態に係るスライス状マージにおける分割を示す模式図である。 第4の実施形態に係る3選択肢マージにおける分割を示す模式図である。 第4の実施形態に係るマップマージにおける分割を示す模式図である。 第4の実施形態に係るフィルタパラメータFPのシンタックステーブルである。 第4の実施形態に係るマージ構成の場合のシンタックステーブルである。 第4の実施形態に係る予測/マージ構成のシンタックステーブルである。 第4の実施形態に係るマップ構成のシンタックステーブルである。 第4の実施形態に係る1次元マージ構成のシンタックステーブルである。 第4の実施形態に係る2選択肢の候補導出シンタックステーブルである。 第4の実施形態に係るスライス状選択肢の候補導出シンタックステーブルである。 第4の実施形態に係る3選択肢の候補導出シンタックステーブルである。 第4の実施形態に係る3選択肢かつスライス状選択肢の候補導出シンタックステーブルである。 第4の実施形態に係るマップ構成の候補導出シンタックステーブルである。 第4の実施形態に係る特徴量モードに依存の候補導出シンタックステーブルである。 第4の実施形態に係るマージ構成のフローチャートである。 第4の実施形態に係る予測/マージ構成のフローチャートである。 第4の実施形態に係る符号化データを説明するための図であって、alf_coeff_set_lumaの例を示している。 第4の実施形態に係る符号化データを説明するための図であって、(a)は、alf_coeff_set_lumaの他の例を示しており、(b)は、alf_coeff_copy_lumaの他の例を示している。 第4の実施形態に係るフィルタパラメータFPのシンタックステーブルである。 第4の実施形態に係る符号化データを説明するための図であって、alf_coeff_dec_lumaを示している。 第5の実施形態に係る適応フィルタの構成を示すブロック図である。 第5の実施形態に係る適応フィルタの構成を示すブロック図である。 第5の実施形態に係る領域構造復号部1312の構成を示すブロック図である。 第5の実施形態に係る領域インデックス算出部1325の構成を示すブロック図である。 第5の実施形態に係る領域構造復号処理を示すフローチャートである。 第5の実施形態に係るフィルタパラメータFPのシンタックステーブルである。 第5の実施形態に係るフィルタパラメータFPのシンタックステーブルである。 第5の実施形態に係るフィルタパラメータFPのシンタックステーブルである。 非特許文献4に記載された技術を説明するための図である。 第5の実施形態の変形例に係る領域インデックス算出部が備えるBAモード領域インデックス算出部の構成を示すブロック図である。 第5の実施形態の変形例に係るBAモード領域インデックス算出部の動作をプログラミング言語Cに似た形式で表現した図である。 第5の実施形態の変形例を説明するための図であって、ウィンドウと拡張単位領域を説明するための図である。 第5の実施形態の変形例を説明するための図であって、(a)~(d)は、単位領域のサイズが4×4であり、水平垂直ともに間引きが行われる例を示しており、(e)は、特性値算出の参照パラメータを示している。 第5の実施形態の変形例を説明するための図であって、(a)~(b)は、単位領域のサイズが4×4であり、水平垂直ともに間引きが行われる他の例を示しており、(c)は、特性値算出の参照パラメータを示している。 第5の実施形態の変形例を説明するための図であって、(a)~(b)は、水平間引きが行われる例を示しており、(c)~(d)は、垂直間引きが行われる例を示して降り、(e)~(f)は、水平、垂直を合わせて互い違いに間引きが行われる場合を示しており、(g)は、特性値算出の参照パラメータを示している。 第5の実施形態の変形例を説明するための図であって、(a)~(b)は、特性値算出のための中間値を算出する画素の他の例を示しており、(c)は、特性値算出の参照パラメータを示している。 第5の実施形態の変形例を説明するための図であって、(a)~(f)は、特性値算出のための中間値を算出する画素の他の例を示している。 実施形態に係る動画像符号化装置を搭載した送信装置、および、実施形態に係る動画像復号装置を搭載した受信装置の構成について示した図である。(a)は、動画像符号化装置を搭載した送信装置を示しており、(b)は、動画像復号装置を搭載した受信装置を示している。 実施形態に係る動画像符号化装置を搭載した記録装置、および、実施形態に係る動画像復号装置を搭載した再生装置の構成について示した図である。(a)は、動画像符号化装置を搭載した記録装置を示しており、(b)は、動画像復号装置を搭載した再生装置を示している。
 〔実施形態1〕
 以下では、本発明の第1の実施形態について図1~図18を参照して説明する。
 本実施形態に係る適応フィルタは、フィルタ前画像(例えば、後述するデブロック済復号画像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の分割のみで分割を終了させるような適用方法が可能であり、小さな複雑性で領域別フィルタの効果を得ることができる。なお、本実施形態において、単位領域の座標としては、画素単位の座標の他、ツリーブロック(CTB、Coding Tree Block、LCU)単位の座標、CU単位の座標などを用いても良い。本実施形態以外の各実施形態についても同様である。
 ここで、画像の活性度に代えて、画素値の分散を用いてもよい。また、各単位領域について導出される各特性値は、導出方法如何によって、単位領域のサイズに依存する場合がある。このような場合には、各特性値として、単位領域のサイズへの依存性を取り除くことによって得られる正規化された特性値を用いることができる。
 本実施形態に係る適応フィルタは、特性値領域を第1段階の分割および第2段階の分割によって階層的に各部分領域へと分割する。ここで、第1段階の分割は、第1の特性値Xに関する分割であり、第2段階の分割は、第1の特性値Xおよび第2の特性値Yの少なくとも何れかに関する分割である。また、特性値領域の各部分領域への分割は、分割単位を単位として行われる。したがって、各部分領域は、1または複数の分割単位DUから構成される。また、各分割単位の境界は、各特性値について設定される分割点(特性値分割点とも呼称する)を用いて定められる。なお、第1段階の分割を初期分割とも呼称し、第2段階の分割を再分割とも呼称する。
 図1は、特性値領域CRと、特性値領域CR上に設定される分割単位DU[i][j](iは0≦i≦NX-1を満たす整数、jは0≦i≦NY-1を満たす整数、NXは第1の特性値Xに沿った分割単位の総数、NYは第2の特性値Yに沿った分割単位の総数)とを示す図である。
 図1に示す例において、実線は、特性値部分領域および分割単位の境界を示しており、破線は、分割単位の境界を示している。また、図1に示す例において、分割単位DU[0][0]およびDU[0][1]は、1つの特性値部分領域を構成しており、DU[1][0]およびDU[2][0]は、他の1つの特性値部分領域を構成している。また、DU[1][1]は、単独で特性値部分領域を構成している。
 図1に示すように、各分割単位DUの境界は、第1の特性値Xについての特性値分割点PX1~PX_NX-1、および、第2の特性値Yについての特性値分割点PY1~PY_NY-1によって指定される。
 なお、以下では、第1の特性値Xのことを、単に特性値Xとも呼び、第2の特性値Yのことを単に特性値Yとも呼ぶ。
 また、各分割単位を指定するインデックス[i][j]のことを特性インデックスとも呼ぶ。特に、特性値Xに関するインデックス(上記の例では[i])を特性Xインデックスとも呼び、特性値Yに関するインデックス(上記の例では[j])を特性Yインデックスとも呼ぶ。特性インデックスは、各分割単位を一意に指定する2次元のインデックスである。
 (符号化データ#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(N
Tは、対象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についてのイントラ予測方法(予測モード)を指定するためのパラメータである。
 (フィルタパラメータFP)
 図3は、本実施形態に係る符号化データ#1のフィルタパラメータFP(図3においてalf_param()と表記)に含まれる各シンタックスを示す図である。
 (adaptive_loop_filter_flag)
 adaptive_loop_filter_flagは、後述する適応フィルタ50による適応的フィルタ処理のオンオフを指定するフラグであり、adaptive_loop_filter_flagが0の場合、適応的フィルタ処理がオフに指定され、adaptive_loop_filter_flagが1の場合、適応的フィルタ処理がオンに指定される。
 (alf_enable_region_filter)
 alf_enable_region_filterは、適応フィルタ50による特性値部分領域毎のフィルタ処理のオンオフを指定するフラグであり、alf_enable_region_filterが0の場合、特性値部分領域毎のフィルタ処理がオフに指定され、alf_enable_region_filterが1の場合、特性値部分領域毎のフィルタ処理がオンに指定される。後述する各種のシンタックスalf_num_first_split_minus1、alf_first_split_val_shift、alf_second_split_type、alf_second_split_flag[i0]、alf_length_luma_minus5_div2[i0]、alf_region_pred_luma[i][j]、およびalf_coeff_luma[i][j]は、alf_enable_region_filterが1の場合にのみ符号化される。
 alf_num_first_split_minus1、alf_first_split_val_shift、alf_second_split_type、および、alf_second_split_flag[i0]は、特性値領域CRを各特性値部分領域CPRに分割する分割の仕方を指定する特性値分割情報を構成する。特性値分割情報は、特性値領域CRの分割の仕方を指定する情報であり、第1段階の分割数及び形状(ここではalf_num_first_split_minus1)を指定する情報と、第1の分割で得られた特性値部分領域に対して第2段階の分割数及び形状を指定する情報(ここではalf_second_split_flag[i0])と、分割に用いる特性値の境界を指定するための情報(alf_second_split_type)から構成される。また、分割数及び形状とは別に、分割の仕方を指定する情報(ここではalf_second_split_type)も指定可能であり、これも特性値分割情報の一種である。
 本実施形態では、特性値分割情報は、特性値領域CRの分割の仕方を階層的に指定する情報である。階層的に指定することによって、高い分割の自由度を有しながら、分割の自由度を増やした場合に生じる分割を指定するための符号量の増加を防ぐことができる。また、階層的な表現では、同種の特性を有する複数の領域を、1つのまとまりとして表現することが可能であり、まとめられた該複数の領域に対して同じフィルタ係数を割り当てることが可能であるため、単純に特性値毎、もしくは、特性値の組み合わせ毎にフィルタ係数を割り当てる場合に比べて、フィルタ係数の符号量を低減することができる。実施形態には図示していないが、階層的な表現は、第1段階の分割と第2段階の分割で同じ特性値(例えば活性度)を用いる場合にも用いることが可能である。この場合も、近い特性値を有する複数の領域を1つのまとまりとして表現し、まとめられた該複数の領域に対して同じフィルタ係数を割り当てることにより、小さな符号量でフィルタ係数を符号化することができる。また、複数の特性値を用いる場合においては、ノイズ低減効果が大きい特性値を用いて優先的に分割を行い、分割したとしても効果の小さい領域については分割せずに1つのまとまりとして取り扱うことによって、フィルタ係数の符号量を相対的に小さくすることができる。
 (alf_num_first_split_minus1)
 alf_num_first_split_minus1は、特性値領域の第1段階の分割の分割数AlfNumFirstSplitを指定するシンタックスであり、このシンタックスより、分割数AlfNumFirstSplitが、
  AlfNumFirstSplit=alf_num_first_split_minus1+1
によって決定される。
 図4の(a)は、alf_enable_region_filter=0の場合の特性値領域CR、すなわち分割されていない特性値領域CRを示す図であり、図4の(b)は、alf_enable_region_filter=1、かつAlfNumFirstSplit=3の場合について、第1段階の分割が行われた特性値領域CRを示す図である。図4の(b)に示すように、AlfNumFirstSplit=3の場合、特性値領域CRは、第1段階の分割によって、特性値Xに関して3つの特性値部分領域に分割される。図4の(b)では、これら3つの特性値部分領域の境界が、特性値分割点PX2およびPX4によって指定される場合を例示している。このように第1段階の分割において用いられる特性値分割点のことを初期分割点とも呼ぶ。また、第2段階の分割において用いられる特性値分割点のことを再分割点とも呼ぶ。図4の(c)は、初期分割点PX2およびPX4に加えて、第2段階の分割において用いられる再分割点PX1、PX3およびPX5を示す図である。
 なお、第1の分割によって得られた各特性値部分領域は、初期分割インデックス[i0](0≦i0≦AlfNumFirstSplit-1)によって識別される。初期分割インデックス[i0]と特性Xインデックス[i]との対応は、後述するalf_second_split_typeの値に応じて以下のように与えられる。
 ・alf_second_split_type=0の場合
  i=2×i0、または2×i0+1
 ・alf_second_split_type=1の場合
  i=i0
 第1の分割によって得られた特性値部分領域であって、初期分割インデックス[i0]によって指定される特性値部分領域のことを特性値部分領域CPR[i0]とも表記する。
 (alf_first_split_val_shift)
 alf_first_split_val_shiftは、特性値分割点PXn(1≦n≦NX-1)を変更するために参照されるフラグである。特性値分割点PXnは、alf_first_split_val_shiftの値に応じて変更される。
 (alf_second_split_type)
 alf_second_split_typeは、第2段階の分割の種別を指定するためのフラグである。alf_second_split_typeが0であれば、各特性値部分領域は、特性値Xおよび特性値Yに基づいて1または複数の特性値部分領域に更に分割され、alf_second_split_typeが1であれば、各特性値部分領域は、特性値Yに基づいて1または複数の特性値部分領域に更に分割される。
 図4の(d)は、特性値Xとして活性度を用いる場合に、alf_first_split_val_shiftおよびalf_second_split_typeの値に応じて設定される特性値分割点PX1~PX5を例示する表である。図4の(d)に示す例においては、alf_second_split_type=1の場合に、初期分割点PX2およびPX4の各値が指定され、alf_second_split_type=0の場合に、初期分割点を含む全ての特性値分割点PX1~PX5の各値が指定される。図4の(d)に示す例においては、alf_first_split_val_shift=1の場合のPX1~PX5の各値が、alf_first_split_val_shift=0の場合の各値の1/2に設定されている。このように、特性値分割点PXnの各値は、alf_first_split_val_shiftの値に応じて変更される。
 また、図4の(d)に示すように、特性値Xとして活性度を用いる場合、特性値Xの値が大きい程、初期分割点の間隔が大きく設定される。これは、処理対象フレーム(またはスライス)に含まれる単位領域の多くは、小さな活性度を有しているためである。図4の(d)に示すように、特性値Xの小さい範囲をより細かく分割することによって、各特性値部分領域に分類される単位領域の数を一定に近づけることができる。初期分割点に限らず、再分割においても、特性値の度数を考慮して、分割点の間隔を等間隔以外とすることが適当である。すなわち、特性値のヒストグラムを作成した場合において、多くの場合に度数が集中しやすい部分があれば、その度数が集中する部分ほど間隔を細かくし、度数が小さい部分では間隔を大きくすると良い。例えば、活性度に関しては、値が小さい部分に度数が集中しやすい傾向があり、方向性に関しては、水平方向と垂直方向に度数が集中しやすい傾向にある。
 alf_first_split_val_shiftは、初期分割(第1段階の分割)における分割点を指定するための情報(第1分割点指定情報)を構成する。
 (alf_second_split_flag)
 alf_second_split_flag[i0]は、第1段階の分割によって得られた各特性値部分領域について、第2段階の分割の具体的な態様を指定するシンタックスである。上述のalf_second_split_type、およびalf_second_split_flag[i0]によって、第1段階の分割によって得られた各特性値部分領域についての、第2段階の分割が具体的に指定される。
 図5の(a)は、第1段階の分割によって得られた特性値部分領域が、alf_second_split_type=0によって指定される第2段階の分割によって、特性値Yに関して2つの特性値部分領域に分割される場合を示しており、図5の(b)は、第1段階の分割によって得られた特性値部分領域が、alf_second_split_type=1によって指定される第2段階の分割によって、特性値Yに関して4つの特性値部分領域に分割される場合を示している。このように、alf_second_split_flag[i0]は、第2段階の分割において分割数と分割形状を指定する。
 図5の(c)は、特性値Yとして画像の方向性を用いた場合の特性値分割点PY1~PY3と、特性値Yとして平均画素値を用いた場合の特性値分割点PY1~PY3を示している。
 alf_second_split_typeは、再分割(第2段階の分割)における分割点を指定するための情報(第2分割点指定情報)を構成する。
 図6は、第1段階の分割によって得られた特性値部分領域CPR[i0=0]が、alf_second_split_flag[i0]、および、alf_second_split_typeの各値に応じて、第2段階の分割によってどのように分割されるのかを具体的に示す図である。[i0=0]以外の初期分割インデックスによって指定される特性値部分領域CPR[i0]の第2段階の分割も同様である。
 図6に示すように、alf_second_split_type=0の場合、第1段階の分割によって得られた特性値部分領域CPR[i0=0]は以下のように分割される。
 ・alf_second_split_flag[i0]=0:分割なし
 ・alf_second_split_flag[i0]=1:特性値Xに関して2分割(特性値分割点:PX1)
 ・alf_second_split_flag[i0]=2:特性値Yに関して2分割(特性値分割点:PY2)
 ・alf_second_split_flag[i0]=3:特性値Xおよび特性値Yのそれぞれに関して2分割の合計4分割(特性値分割点:PX1,PY2)
 また、alf_second_split_type=1の場合、第1段階の分割によって得られた特性値部分領域CPR[i0=0]は以下のように分割される。
 ・alf_second_split_flag[i0]=0:分割なし
 ・alf_second_split_flag[i0]=1:特性値Yに関して2分割(特性値分割点:PY2)
 ・alf_second_split_flag[i0]=2:特性値Yに関して2分割(特性値分割点:PY1)
 ・alf_second_split_flag[i0]=3:特性値Yに関して4分割(特性値分割点:PY1,PY2,PY3)
 また、第1段階の分割によって得られた特性値部分領域CPR[i0=0]に対して第2段階の分割を行うことによって得られた各特性値部分領域は、初期分割インデックス[i0]と再分割インデックス[j0]とを組み合わせて得られる特性値領域内インデックス(i0、j0)によって指定される。ここで、再分割インデックス[j0]は、特性値部分領域CPR[i0]に含まれる各特性値部分領域を指定するインデックスである。特性値領域内インデックス(i0、j0)によって指定される特性値部分領域を特性値部分領域CPR(i0、j0)とも表記する。
 図6に示すように、alf_second_split_type=0、および、alf_second_split_type=1の何れの場合にも、第1段階の分割によって得られた特性値部分領域CPR[i0]には、以下の特性値部分領域CPR(i0、j0)が含まれる。
  ・alf_second_split_flag[i0]=0:CPR(i0、0)
  ・alf_second_split_flag[i0]=1:CPR(i0、0)、およびCPR(i0、1)
  ・alf_second_split_flag[i0]=2:CPR(i0、0)、およびCPR(i0、1)
  ・alf_second_split_flag[i0]=3:CPR(i0、0)、CPR(i0、1)、CPR(i0、2)、およびCPR(i0、3)
 また、alf_second_split_type=0の場合、各特性値部分領域CPR(i0、j0)に含まれている分割単位DU[i][j]は以下の通りである。
  ・alf_second_split_flag=0の場合:
   CPR(i0、0):DU[2×i0][0],DU[2×i0][1],DU[2×i0+1][0],DU[2×i0+1][1]
  ・alf_second_split_flag=1の場合:
   CPR(i0、0):DU[2×i0][0],DU[2×i0][1]
   CPR(i0、1):DU[2×i0+1][0],DU[2×i0+1][1]
  ・alf_second_split_flag=2の場合:
   CPR(i0、0):DU[2×i0][0],DU[2×i0+1][0]
   CPR(i0、1):DU[2×i0][1],DU[2×i0+1][1]
  ・alf_second_split_flag=3の場合:
   CPR(i0、0):DU[2×i0][0]
   CPR(i0、1):DU[2×i0][1]
   CPR(i0、2):DU[2×i0+1][0]
   CPR(i0、3):DU[2×i0+1][1]
 また、alf_second_split_type=1の場合、各特性値部分領域CPR(i0、j0)に含まれている分割単位DU[i][j]は以下の通りである。
  ・alf_second_split_flag=0の場合:
   CPR(i0、0):DU[i0][0],DU[i0][1],DU[i0][2],DU[i0][3]
  ・alf_second_split_flag=1の場合:
   CPR(i0、0):DU[i0][0],DU[i0][1]
   CPR(i0、1):DU[i0][2],DU[i0][3]
  ・alf_second_split_flag=2の場合:
   CPR(i0、0):DU[i0][0]
   CPR(i0、1):DU[i0][1],DU[i0][2],DU[i0][3]
  ・alf_second_split_flag=3の場合:
   CPR(i0、0):DU[i0][0]
   CPR(i0、1):DU[i0][1]
   CPR(i0、2):DU[i0][2]
   CPR(i0、3):DU[i0][3]
 (alf_length_luma_minus5_div2)
 alf_length_luma_minus5_div2[i0]は、第1段階の分割によって得られた各特性値部分領域についてのフィルタのタップ数を指定するためのシンタックス(タップ数指定情報)である。このシンタックスより、タップ数AlfLengthLumaが、
  AlfLengthLuma=alf_length_luma_minus5_div2×2+5
によって決定される。
 図7は、alf_length_luma_minus5_div2[i0]の値が、1、2、および3である場合に、本実施形態に係る適応フィルタによってそれぞれ設定される参照領域R0、R1、R2を例示する図である。図7においては、菱形の参照領域を例示しているが、本実施形態における参照領域は、これらの例に限定されるものではなく、alf_length_luma_minus5_div2[i0]によってタップ数が指定される矩形状の参照領域を用いてもよい。
 また、図3に示すように、フィルタパラメータFPにおいて、alf_length_luma_minus5_div2[i0]は、後述するフィルタ係数を指定するためのシンタックスalf_coeff_luma[i][j]よりも上位の階層にて伝送される。また、図示しないが、第2段階の分割で得られた各特性値部分領域についてのフィルタのタップ数を指定するためのシンタックスを符号化しても良い。この場合、第2段階の分割で得られた各特性値部分領域についてのフィルタのタップ数を指定するためのシンタックスalf_length_luma_minus5_div2[i][j]が、alf_coeff_luma[i][j]と同じ階層において符号化される。上記の構成により、領域毎に異なるタップ数のフィルタ係数を用いて適応フィルタ処理を行うことが可能になる。領域の活性度及び領域毎の効果の違いに応じて適したタップ数が異なるため、適応的にタップ数を選択できる上記の構成は符号化効率を向上させることができる。例えば、領域の活性度が小さい場合には活性度が大きい場合よりもタップ数を大きくとることが適当であり、適応フィルタの効果が大きい特性値部分領域には、効果が小さい特性値部分領域よりも大きいタップ数を用いることが適当である。
 また、図示した構成では、1つの特性値部分領域に作用するフィルタのフィルタ係数ではなく、複数の特性値部分領域にそれぞれ作用するフィルタのフィルタ係数を1つのまとまりとしてタップ数を符号化する。これにより、多くのフィルタ係数を符号化する場合においてもタップ数の符号量を低減させることができる。
 (alf_coeff_luma)
 alf_coeff_luma[i][j](i=i0,2×i0,2×i0+1、j=0,1,2,3)は、各特性値部分領域についてのフィルタ係数(オフセットを含む、以下同様)を指定するためのシンタックスである。
 alf_second_split_type=0の場合について、各特性値部分領域CPR(i0、j0)と、それらに割り付けられるalf_coeff_luma[i][j]との対応関係、すなわち、特性値領域内インデックス(i0、j0)とalf_coeff_luma[i][j]との対応関係は以下の通りである。なお、以下の表記において、「*」は積を表す演算記号である。
  ・alf_second_split_flag=0の場合:
   CPR(i0、0):alf_coeff_luma[i0*2][0]
  ・alf_second_split_flag=1の場合:
   CPR(i0、0):alf_coeff_luma[i0*2][0]
   CPR(i0、1):alf_coeff_luma[i0*2][1]
  ・alf_second_split_flag=2の場合:
   CPR(i0、0):alf_coeff_luma[i0*2][0]
   CPR(i0、1):alf_coeff_luma[i0*2][1]
  ・alf_second_split_flag=3の場合:
   CPR(i0、0):alf_coeff_luma[i0*2][0]
   CPR(i0、1):alf_coeff_luma[i0*2][1]
   CPR(i0、2):alf_coeff_luma[i0*2+1][0]
   CPR(i0、3):alf_coeff_luma[i0*2+1][1]
 また、alf_second_split_type=1の場合について、各特性値部分領域CPR(i0、j0)と、それらに割り付けられるalf_coeff_luma[i][j]との対応関係、すなわち、特性値領域内インデックス(i0、j0)とalf_coeff_luma[i][j]との対応関係は以下の通りである。
  ・alf_second_split_flag=0の場合:
   CPR(i0、0):alf_coeff_luma[i0][0]
  ・alf_second_split_flag=1の場合:
   CPR(i0、0):alf_coeff_luma[i0][0]
   CPR(i0、1):alf_coeff_luma[i0][2]
  ・alf_second_split_flag=2の場合:
   CPR(i0、0):alf_coeff_luma[i0][0]
   CPR(i0、1):alf_coeff_luma[i0][1]
  ・alf_second_split_flag=3の場合:
   CPR(i0、0):alf_coeff_luma[i0][0]
   CPR(i0、1):alf_coeff_luma[i0][1]
   CPR(i0、2):alf_coeff_luma[i0][2]
   CPR(i0、3):alf_coeff_luma[i0][3]
 なお、alf_coeff_luma[i][j]のうち、最初に符号化/復号されるフィルタ係数alf_coeff_luma[0][0]は、特性値部分領域CPR(0、0)についてのフィルタ係数そのものであり、alf_coeff_luma[i][j](i≠0、j≠0)は、対象となる特性値部分領域についてのフィルタ係数の予測値(予測フィルタ係数とも呼ぶ)と、実際に用いられるフィルタ係数との残差(フィルタ係数残差とも呼ぶ)である。alf_coeff_luma[i][j]は、より正確には、フィルタ係数又はフィルタ係数残差の各成分を指定するためのインデックス[k](0≦k≦Ncomp-1、Ncompは、フィルタ係数の成分の総数)を有しているが、ここではそのようなインデックスの表記を省略している。
 また、例えば、alf_coeff_luma[i][j]に含まれるオフセット成分を、オフセット以外の成分よりも上位の階層にて伝送する構成としてもよい。具体的には、alf_coeff_luma[i][j]に含まれるオフセット成分を、alf_length_luma_minus5_div2[i0]と同じ階層にて伝送しておき、オフセット以外の成分を、alf_length_luma_minus5_div2[i0]よりも下位の階層にて伝送する構成としてもよい。
 また、以下では、特性値部分領域CPR(i0、j0)に割り付けられたalf_coeff_luma[i][j]を、alf_coeff_luma(i0,j0)とも表記する。
 (alf_region_pred_luma)
 alf_region_pred_luma[i][j](i=i0,2×i0,2×i0+1、j=1,2,3)は、各特性値部分領域についてのフィルタ係数の予測値を導出する際の予測方向を指定するためのフラグである。alf_region_pred_luma[i][j]は、各特性値部分領域CPR(i0、j0)のうち、フィルタ係数の予測値を導出する際に参照可能な特性値部分領域が複数隣接している特性値部分領域CPRについて符号化される。例えば、特性値領域CRに含まれる各特性値部分領域についてのフィルタ係数の復号がラスタスキャン順に行われる場合には、左辺および上辺の双方に特性値部分領域が隣接している特性値部分領域についてalf_region_pred_lumaが符号化される。例えば、alf_region_pred_luma=0であれば、上辺に隣接する特性値部分領域が参照され、alf_region_pred_luma=1であれば、左辺に隣接する特性値部分領域が参照される。
 一方で、特性値領域CRに含まれる各特性値部分領域についてのフィルタ係数の復号がラスタスキャンの逆順に行われる場合には、右辺および下辺の双方に特性値部分領域が隣接している特性値部分領域についてalf_region_pred_lumaが符号化される。
 図8は、特性値部分領域CPR[i0]に対して第2段階の分割を行うことによって得られた各特性値部分領域CPR(i0、j0)について割り付けられる予測方向を示す図である。
 各特性値部分領域についてのフィルタ係数の復号がラスタスキャン順に行われる場合であって、alf_second_split_type=0の場合における、各特性値部分領域CPR(i0、j0)と、それらに割り付けられるalf_region_pred_luma[i][j]との対応関係は以下の通りである。
  ・alf_second_split_flag=2の場合:
   CPR(i0、1):alf_region_pred_luma[i0*2][1]
  ・alf_second_split_flag=3の場合:
   CPR(i0、1):alf_region_pred_luma[i0*2][1]
   CPR(i0、3):alf_region_pred_luma[i0*2+1][1]
 図8に示すように、これらの特性値部分領域については、alf_region_pred_lumaの値に応じて、予測方向として、上方向および左方向のうち何れかが割り付けられる。
 alf_region_pred_lumaを用いることにより、予測方向として、(1)特性値Yの値が処理対象の特性値部分領域と同じ特性値部分領域、または、特性値Yの値が処理対象の特性値部分領域により近い特性値部分領域について既に復号されたフィルタ係数を予測値とする予測方向(上方向)と、(2)特性値Xの値が処理対象の特性値部分領域と同じ特性値部分領域、または、特性値Xの値が処理対象の特性値部分領域により近い特性値部分領域について既に復号されたフィルタ係数を予測値とする予測方向(横方向)との選択が可能になる。
 ここで、特性値が近いか否かは、特性値の種類に応じて定まるものである。例えば、活性度などの単純なスカラー量によって表現される特性値については、値の差がより小さいものがより近いものとなる。一方で、方向性などのベクトル量(ここでは方向)に対してインデックスを割り当てることによって表現される特性値については、元のベクトルのなす角がより小さいものがより近いものとなる。
 また、各特性値部分領域についてのフィルタ係数の復号がラスタスキャン順に行われる場合であって、alf_second_split_type=1の場合における、各特性値部分領域CPR(i0、j0)と、それらに割り付けられるalf_region_pred_luma[i][j]との対応関係は以下の通りである。
  ・alf_second_split_flag=1の場合:
   CPR(i0、1):alf_region_pred_luma[i0][2]
  ・alf_second_split_flag=2の場合:
   CPR(i0、1):alf_region_pred_luma[i0][1]
  ・alf_second_split_flag=3の場合:
   CPR(i0、1):alf_region_pred_luma[i0][1]
   CPR(i0、2):alf_region_pred_luma[i0][2]
   CPR(i0、3):alf_region_pred_luma[i0][3]
 図8に示すように、これらの特性値部分領域については、alf_region_pred_lumaの値に応じて、予測方向として、上方向および左方向のうち何れかが割り付けられる。
 一方で、図8に示すように、以下に列挙する特性値部分領域については、上辺に隣接した特性値部分領域のみ参照可能であるため、予測方向として上方向のみが割り付けられる。
 ・alf_second_split_type=0の場合:
  ・alf_second_split_flag=0の場合:
   CPR(i0、0)
  ・alf_second_split_flag=1の場合:
   CPR(i0、0)
   CPR(i0、1)
  ・alf_second_split_flag=2の場合:
   CPR(i0、0)
  ・alf_second_split_flag=3の場合:
   CPR(i0、0)
   CPR(i0、2)
 ・alf_second_split_type=1の場合:
  ・alf_second_split_flag=0の場合:
   CPR(i0、0)
  ・alf_second_split_flag=1の場合:
   CPR(i0、0)
  ・alf_second_split_flag=2の場合:
   CPR(i0、0)
  ・alf_second_split_flag=3の場合:
   CPR(i0、0)
 なお、以下では、特性値部分領域CPR(i0、j0)に割り付けられたalf_region_pred_luma[i][j]を、alf_region_pred_luma(i0,j0)とも表記する。
 また、フィルタパラメータFPは、alf_region_pred_luma[i][j]を含まない構成としてもよい。この場合には、各特性値部分領域についての予測方向は、図9に示すように、固定的に上方向を用いればよい。
 図3の末尾に示すシンタックスalf_length_luma_minus5_div2、およびalf_coeff_luma[0][0]は、シンタックスalf_enable_region_filterが0である場合、すなわち、特性値部分領域毎のフィルタ処理がオフに指定される場合にフィルタパラメータFPに含められる。alf_length_luma_minus5_div2によってタップ数が指定され、alf_coeff_luma[0][0]によってフィルタ係数が指定される。
 なお、図3に示したDescriptor(記述子)u(1)は、これらの記述子に関連付けられたシンタックスが1ビットで固定長符号化されることを示しており、u(2)は、この記述子に関連付けられたシンタックスが2ビットで固定長符号化されることを示しており、ue(v)は、この記述子に関連付けられたシンタックスが可変長符号化されることを示している。
 また、上記の例では、シンタックスalf_second_split_flag[i0]の値は、0~3のうち何れかの値をとるものとしたが、これは本実施形態を限定するものではない。例えば、シンタックスalf_second_split_flag[i0]が、0~7のうち何れかの値をとる構成としてもよい。このようなシンタックスalf_second_split_flag[i0]によって指定される再分割の例を図10に示す。図10に示す例では、alf_second_split_flag[i0]の各値に応じて、初期分割によって得られた特性値部分領域CPR[i0]が、特性値Xについて最大で2分割され、特性値Yについて最大で3分割される。
 (動画像復号装置1)
 以下では、本実施形態に係る動画像復号装置1について図11~図14を参照して説明する。動画像復号装置1は、その一部に、H.264/MPEG-4.AVCに採用されている方式、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式、及び、HM(HEVCTestModel)ソフトウェアに採用されている技術を含んでいる。
 図11は、動画像復号装置1の構成を示すブロック図である。図11に示すように、動画像復号装置1は、可変長符号復号部13、動きベクトル復元部14、バッファメモリ15、インター予測画像生成部16、イントラ予測画像生成部17、予測方式決定部18、逆量子化・逆変換部19、加算器20、デブロッキングフィルタ41、および、適応フィルタ50を備えている。動画像復号装置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からフィルタオンオフ情報、フィルタセット番号、および、フィルタ係数群を復号し、それらを適応フィルタ50に供給する。
 動きベクトル復元部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によるデブロック処理、および、適応フィルタ50による適応的フィルタ処理を施すことによって得られる画像であり、インター予測画像生成部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を適応フィルタ50に供給する。なお、イントラ予測画像生成部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として、適応フィルタ50に出力される。
 適応フィルタ50は、デブロッキングフィルタ41から供給されるデブロック済復号画像P_DBに対して、符号化データ#1から復号されたフィルタパラメータFPを用いたフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ50によりフィルタ処理が施された画像は、フィルタ済復号画像P_FLとして外部に出力されると共に、可変長符号復号部13によって符号化データから復号されたPOC指定情報と関連付けてバッファメモリ15に格納される。適応フィルタ50の具体的な構成については、後述するため、ここでは説明を省略する。
 (適応フィルタ50)
 適応フィルタ50は、シンタックスadaptive_loop_filter_flagが1である場合に、デブロック済復号画像P_DBに対して適応的フィルタ処理を施すことによってフィルタ済復号画像P_FLを生成する。
 適応フィルタ50は、対象単位領域におけるデブロック済復号画像P_DBの特性値に応じて、該対象単位領域を、上述した各特性値部分領域の何れかと関連付け、該単位領域が関連付けられた特性値部分領域について復号されたフィルタ係数を用いて、該単位領域に対するフィルタ処理を施す。
 図12は、適応フィルタ50の構成を示すブロック図である。図12に示すように、適応フィルタ50は、適応フィルタ情報復号部51および適応フィルタ部52を備えている。なお、図12には図示していないが、適応フィルタ50は、シンタックスalf_enable_region_filterおよびシンタックスalf_num_first_split_minus1を復号する上位シンタックス復号部を備えている。
 適応フィルタ50は、シンタックスalf_enable_region_filterが1である場合に、特性値部分領域毎のフィルタ処理を行う。また、適応フィルタ50は、alf_num_first_split_minus1の値を用いて、分割数AlfNumFirstSplitを、
  AlfNumFirstSplit=alf_num_first_split_minus1+1
に設定する。
 (適応フィルタ情報復号部51)
 適応フィルタ情報復号部51は、符号化データ#1に含まれているフィルタパラメータFPを復号することによって、特性値分割点PXnおよびPYm、並びに、フィルタ係数RegionFilterLuma[i0][j0]を導出するための構成である。導出された各特性値分割点およびフィルタ係数RegionFilterLuma[i0][j0]は、適応フィルタ部52に供給される。なお、以下の説明では、適応フィルタ情報復号部51によるフィルタ係数RegionFilterLuma[i0][j0]の導出は、特性値領域CRを構成する各特性値部分領域についてラスタスキャン順に行われるものとするが、これは本実施形態を限定するものではなく、フィルタ係数RegionFilterLuma[i0][j0]の導出がラスタスキャンの逆順に行われる場合であっても適用することができる。その場合には、以下の説明における「左辺」を「右辺」と読み替え、「上辺」を「下辺」と読み替えればよい。
 図12に示すように、適応フィルタ情報復号部51は、領域別タップ数復号部511、領域構造復号部512、フィルタ係数残差復号部513、2次元予測フラグ復号部514、フィルタ係数予測部515、フィルタ係数復号部516、領域別フィルタ係数格納部517、特性値分割点変更フラグ復号部518、および、特性値分割点設定部519を備えている。
 領域別タップ数復号部511は、フィルタパラメータFPに含まれるシンタックスalf_length_luma_minus5_div2[i0](0≦i0<AlfNumFirstSplit)を復号する。復号されたシンタックスalf_length_luma_minus5_div2[i0]は、特性値部分領域CPR[i0]に割り付けられると共に、フィルタ係数残差復号部513に供給される。また、シンタックスalf_length_luma_minus5_div2[i0]は、フィルタ係数予測部515、フィルタ係数復号部516、領域別フィルタ係数格納部517、フィルタ係数割り付け部524、および、フィルタ部525にも供給される(図12において矢印不図示)。
 領域構造復号部512は、フィルタパラメータFPに含まれるシンタックスalf_second_split_typeおよびalf_second_split_flag[i0]を復号する。復号されたシンタックスalf_second_split_typeは、特性値領域CR全体に割り付けられると共に、フィルタ係数残差復号部513、2次元予測フラグ復号部514、および、特性値分割点設定部519に供給される。また、復号されたシンタックスalf_second_split_flag[i0]は、特性値部分領域CPR[i0]に割り付けられると共に、フィルタ係数残差復号部513、2次元予測フラグ復号部514、および、特性値分割点設定部519に供給される。
 フィルタ係数残差復号部513は、alf_length_luma_minus5_div2[i0]、alf_second_split_type、およびalf_second_split_flag[i0]を参照して、フィルタパラメータFPに含まれるシンタックスalf_coeff_luma[i][j]を復号すると共に、各シンタックスalf_coeff_luma[i][j]を、それぞれに対応する特性値部分領域CPR(i0、j0)に割り付ける。alf_coeff_luma[i][j]と特性値部分領域CPR(i0、j0)との対応関係については、符号化データ#1の説明において既に述べたため、ここでは説明を省略する。また、復号されたシンタックスalf_coeff_luma[i][j]は、フィルタ係数復号部516に供給される。
 2次元予測フラグ復号部514は、alf_second_split_type、およびalf_second_split_flag[i0]を参照して、フィルタパラメータFPに含まれるシンタックスalf_region_pred_luma[i][j]を復号すると共に、各シンタックスalf_region_pred_luma[i][j]を、それぞれに対応する特性値部分領域CPR(i0、j0)に割り付ける。alf_region_pred_luma[i][j]と特性値部分領域CPR(i0、j0)との対応関係については、符号化データ#1の説明において既に述べたため、ここでは説明を省略する。また、復号されたシンタックスalf_region_pred_lumaは、フィルタ係数予測部515に供給される。
 フィルタ係数予測部515は、シンタックスalf_region_pred_lumaを参照し、領域別フィルタ係数格納部517に格納された復号済みのフィルタ係数RegionFilterLuma[i0'][j0']から、予測フィルタ係数PredRegionFilterLuma[i0][j0]を特性値部分領域毎に導出する。導出された予測フィルタ係数PredRegionFilterLuma[i0][j0]は、フィルタ係数復号部516に供給される。
 ここで、処理対象の特性値部分領域である対象特性値部分領域にシンタックスalf_region_pred_lumaが割り付けられている場合には、フィルタ係数予測部515は、対象特性値部分領域に対して当該シンタックスalf_region_pred_lumaが示す方向に隣接する特性値部分領域について復号済みのフィルタ係数RegionFilterLuma[i0'][j0']を、対象特性値部分領域についての予測フィルタ係数PredRegionFilterLuma[i0][j0]に設定する。一方で、対象特性値部分領域にシンタックスalf_region_pred_lumaが割り付けられていない場合には、フィルタ係数予測部515は、対象特性値部分領域の上辺に隣接する特性値部分領域について復号済みのフィルタ係数RegionFilterLuma[i0'][j0']を、対象特性値部分領域についての予測フィルタ係数PredRegionFilterLuma[i0][j0]に設定する。
 フィルタ係数復号部516は、各特性値部分領域について、フィルタ係数残差alf_coeff_luma(i0,j0)と予測フィルタ係数PredRegionFilterLuma[i0][j0]とを加算することによって、フィルタ係数RegionFilterLuma[i0][j0]を生成し、各特性値部分領域に割り付ける。生成されたフィルタ係数RegionFilterLuma[i0][j0]は、領域別フィルタ係数格納部517に格納される。
 特性値分割点変更フラグ復号部518は、フィルタパラメータFPに含まれるシンタックスalf_first_split_val_shiftを復号する。復号されたシンタックスalf_first_split_val_shiftは、特性値分割点設定部519に供給される。
 特性値分割点設定部519は、alf_first_split_val_shiftおよびalf_second_split_typeに基づいて、特性値分割点PXn(1≦n≦NX-1)およびPYm(1≦m≦NX-1)を導出する。導出された特性値分割点PXnおよびPYmは、適応フィルタ部52の備える特性インデックス算出部523に供給される。
 シンタックスalf_first_split_val_shiftおよびalf_second_split_typeの各値に対する特性値分割点PXnおよびPYmの具体例については、符号化データ#1の説明において既に述べたため、ここでは説明を省略する。
 なお、特性値分割点設定部519は、alf_first_split_val_shiftおよびalf_second_split_typeの何れをも参照することなく、自身の備えるメモリに予め格納された特性値分割情報に従って、特性値分割点PXn(1≦n≦NX-1)およびPYm(1≦m≦NX-1)を導出する構成としてもよい。このような構成の場合、上記特性値分割情報は、動画像復号装置1および動画像符号化装置2において共通のものを用いることが好ましい。
 (適応フィルタ部52)
 適応フィルタ部52は、デブロック済復号画像P_DBを構成する各単位領域に対して、適応的フィルタ処理を行うことによってフィルタ済復号画像P_FLを生成するための構成である。ここで、各単位領域のフィルタ処理に用いられるフィルタ係数は、フィルタパラメータFPから復号されたフィルタ係数RegionFilterLuma[i0][j0]から、該単位領域におけるデブロック済復号画像P_DBの特性値Xに応じて、または、該単位領域におけるデブロック済復号画像P_DBの特性値Xおよび特性値Yに応じて選択される。また、生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。
 図12に示すように、適応フィルタ部52は、第1特性値算出部521、第2特性値算出部522、特性インデックス算出部523、フィルタ係数割り当て部524、および、フィルタ部525を備えている。
 なお、適応フィルタ部52に入力される画像は、デブロック済復号画像P_DBに限定されるものではなく、複数の入力画像を入力することもできる。例えば、適応フィルタ部52には、デブロック済復号画像P_DBに加えて、復号画像Pおよび予測残差Dの少なくとも何れかを入力する構成としてもよい。このような構成の場合、後述する第1特性値算出部521および第2特性値算出部522は、デブロック済復号画像P_DBのみならず、復号画像Pおよび予測残差Dの少なくとも何れかについても各特性値を算出する構成とし、フィルタ部525は、それぞれの入力画像に対して、適応的フィルタ処理を行い、フィルタ後の画像を加算した後に出力する構成としてもよい。このような場合、フィルタパラメータFPには、各入力画像に対するフィルタ係数であって、各特性値部分領域に対応するフィルタ係数を含めておく構成とすればよい。
 (第1特性値算出部521)
 第1特性値算出部521は、処理対象の単位領域である対象単位領域におけるデブロック済復号画像P_DBについての特性値Xを算出する。以下では、特性値Xとして活性度を算出する算出処理(特性値Xの算出処理例1)および特性値Xとして画素値の分散を算出する算出処理(特性値Xの算出処理例2)について説明を行う。ただし、特性値Xの具体例はこれらに限定されるものではない。
 (特性値Xの算出処理例1)
 本処理例では、第1特性値算出部521は、特性値Xとして、対象単位領域におけるデブロック済復号画像P_DBの活性度ACTを算出する。ここで、活性度とは、概略的に言えば、画像の乱雑さを示す指標であり、対象単位領域を含む領域にDCT変換を施した場合に得られる変換係数において大きな高周波成分が存在するかなどに基づいても算出可能であるが、ここでは隣接する画素の画素値に基づいて算出するものとする。隣接する画素の画素値の差が大きいほど、活性度が大きくなる。算出された活性度ACTは、特性値Xとして特性インデックス算出部523に供給される。
 対象単位領域がBx画素×By画素の矩形状である場合、対象単位領域における各画素の座標を(u、v)(u、vはそれぞれ0≦u≦Bx-1、0≦v≦By-1を満たす整数)と表し、その座標におけるデブロック済復号画像P_DBの画素値をS(u、v)と表すことにすると、第1特性値算出部521は、例えば、以下の数式(1-1a)を用いることによって、活性度ACTを算出することができる。
Figure JPOXMLDOC01-appb-M000001
数式(1-1a)は、隣接する画素の画素値の絶対値の総和(Sum of Absolute Difference, SAD)を指標として、活性度を評価することに対応している。
 また、第1特性値算出部521は、以下の数式(1-1b)を用いることによって、活性度ACTを算出する構成としてもよい。
Figure JPOXMLDOC01-appb-M000002
数式(1-1b)は、隣接する画素の画素値の変形ラプラシアンの総和(Sum-Modified Laplacian, SML)を指標として、活性度を評価することに対応している。
 対象単位領域についての活性度を数式(1-1a)または(1-1b)を用いて算出する場合、第1特性値算出部521は、対象単位領域内の画素S(i、j)のみならず、対象単位領域に隣接する画素S(-1、v)、S(Bx、v)、S(u、-1)、および、S(u、By)をも参照する。すなわち、数式(1-1a)または(1-1b)を用いる場合の特性値算出参照領域は、対象単位領域内の画素S(u、v)、および、対象単位領域に隣接する画素S(-1、v)、S(Bx、v)、S(u、-1)、および、S(u、By)から構成される。第1特性値算出部521が、4×4画素の対象単位領域URについての活性度ACTを、数式(1-1a)または(1-1b)を用いて算出する場合の特性値算出参照領域CRRを図13(a)に示す。
 なお、対象単位領域がスライス境界またはCU境界に接している場合、特性値算出参照領域内の一部の画素について、デブロック済復号画像P_DBの画素値が参照不能である場合が生じ得る。例えば、対象単位領域が、未復号のCUに隣接している場合、この未復号のCUの画素値を参照することはできない。このような場合、例外処理として、第1特性値算出部521は、それらの参照不能な画素値を参照することなく活性度ACTの算出を行う。例えば、対象単位領域の右辺および下辺が未復号のCUに隣接している場合、第1特性値算出部521は、数式(1-1a)においてu、vの和の範囲を一部制限して得られる以下の数式(1-1a’)を用いて活性度ACTを算出すればよい。
Figure JPOXMLDOC01-appb-M000003
数式(1-1b)についても同様である。
 一方で、第1特性値算出部521は、対象単位領域がスライス境界またはCU境界に接しているか否かに関わらず、対象単位領域についての活性度を対象単位領域内の画素値のみを参照することによって算出する構成とすることもできる。例えば、第1特性値算出部521は、以下の数式(1-1c)を用いることによって、活性度ACTを算出することもできる。
Figure JPOXMLDOC01-appb-M000004
数式(1-1c)は、数式(1-1a)と同様に、隣接する画素の画素値のSADを指標として隣接する画素の画素値の活性度を評価することに対応しているが、数式(2-1a)と異なり、対象単位領域に含まれる画素のみを参照して活性度を算出することを表している。
 また、第1特性値算出部521は、以下の数式(1-1d)を用いることによって、活性度ACTを算出する構成としてもよい。
Figure JPOXMLDOC01-appb-M000005
 数式(1-1d)は、数式(1-1b)と同様に、隣接する画素の画素値のSMLを指標として、活性度を評価することに対応しているが、数式(1-1d)と異なり、対象単位領域に含まれる画素のみを参照して活性度を算出することを表している。
 このように、第1特性値算出部521が、対象単位領域についての活性度を対象単位領域内の画素値のみを参照することによって算出する場合、図13(b)に示すように、特性値算出参照領域CRRは、対象単位領域URと同一の領域となる。後述する分散VPも、対象単位領域内の画素値のみを参照して算出可能な活性度の一例である。
 したがって、第1特性値算出部521が、対象単位領域についての活性度を対象単位領域内の画素値のみを参照することによって算出する場合には、対象単位領域以外の画素値をも参照する場合に比べて、バッファメモリ15から読み出す画素数が削減され、バッファメモリ15から適応フィルタ50へのデータ伝送量が削減される。また、活性度を算出するために参照される画素の数が少なく、例外処理も不要であるため、活性度を算出するための処理量が削減される。
 なお、数式(1-1c)を用いることによって活性度ACTを算出する第1特性値算出部521を以下のように表現することもできる。すなわち、第1特性値算出部521は、画素(u、v)についての活性度ACT(u、v)を、座標(u、v)の近傍{(u、v),(u+1、v),(u、v+1)}における各画素の画素値を参照して算出し、対象単位領域の内部領域{(u、v)|0≦u≦Bx-2,0≦v≦By-2}におけるACT(u、v)の総和を用いて、対象単位領域についてのACTを算出する。
 また、数式(1-1d)を用いることによって活性度ACTを算出する第1特性値算出部521を以下のように表現することもできる。すなわち、第1特性値算出部521は、画素(u、v)についての活性度ACT(u、v)を、座標(u、v)の近傍{(u、v),(u+1、v),(u、v+1),(u-1、v),(u、v-1)}における各画素の画素値を参照して算出し、対象単位領域の内部領域{(u、v)|1≦u≦Bx-2,1≦v≦By-2}におけるACT(u、v)の総和を用いて、対象単位領域についてのACTを算出する。
 このように、対象単位領域に含まれる画素のみを参照して活性度を算出する第1特性値算出部521は、対象単位領域において、その近傍全体が該対象単位領域に含まれる画素からなる内部領域に属する各画素の活性度を、該画素の上記近傍に含まれる画素の画素値を参照して導出したうえで、内部領域に属する各画素の活性度から該対象単位領域についての活性度を算出するものであると表現することもできる。
 なお、対象単位領域に含まれる画素のみを参照して活性度を算出する構成は、上記の例に限定されるものではなく、対象単位領域を、その近傍全体が該対象単位領域に含まれる画素からなる内部領域と、その近傍全体が該対象単位領域に含まれない画素からなる周辺領域とに分け、内部領域に属する各画素の活性度を該画素の近傍内の画素の画素値を参照して導出し、かつ、周辺領域に属する各画素の活性度を該画素の上記近傍内の画素であって該単位領域内の画素の画素値を参照して導出したうえで、該単位領域に属する各画素の活性度から該単位領域についての活性度を算出する構成としてもよい。
 (特性値Xの算出処理例2)
 本処理例では、第1特性値算出部521は、特性値Xとして、対象単位領域におけるデブロック済復号画像P_DBの画素値の分散VPを算出する。算出された分散VPは、特性値Xとして特性インデックス算出部523に供給される。
 ここで、対象単位領域がBx画素×By画素の矩形状である場合、対象単位領域における各画素の座標を(u、v)(u、vはそれぞれ0≦u≦Bx-1、0≦v≦By-1を満たす整数)と表し、その座標におけるデブロック済復号画像P_DBの画素値をS(u、v)と表すことにすると、第1特性値算出部521は、例えば、以下の数式(1-2)を用いて分散VPを算出する。
Figure JPOXMLDOC01-appb-M000006
 なお、第1特性値算出部521によって算出される分散VPは、上述した活性度ACTと同様に、対象単位領域におけるデブロック済復号画像P_DBの乱雑さを示す指標として機能する。
 (第2特性値算出部522)
 第2特性値算出部522は、対象単位領域におけるデブロック済復号画像P_DBについての特性値Yを算出する。以下では、特性値Yとして画像の方向性を算出する算出処理(特性値Yの算出処理例1)および(特性値Yの算出処理例2)、特性値Xとして平均画素値を算出する算出処理(特性値Yの算出処理例2)、並びに、特性値Xとして対象単位領域の座標値を算出する算出処理(特性値Yの算出処理例3)について説明を行う。ただし、特性値Yの具体例はこれらに限定されるものではない。
 (特性値Yの算出処理例1)
 本処理例では、第2特性値算出部522は、特性値Yとして、対象単位領域におけるデブロック済復号画像の方向性を算出する。算出された方向性を示すインデックス(方向インデックス)は、特性値Yとして特性インデックス算出部523に供給される。
 第2特性値算出部522は、まず、対象単位領域におけるデブロック済復号画像P_DBの垂直方向活性度ACT_V、および、水平方向活性度ACT_Hを算出する。ここで、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vは、例えば、上述した数式(1-1a)の第1項、および、第2項によってそれぞれ算出することができる。また、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vは、上述した数式(1-1b)~(1-1d)のうち、何れかの数式の第1項、および、第2項によってそれぞれ算出することもできる。
 続いて、第2特性値算出部522は、垂直方向活性度ACT_Vおよび水平方向活性度ACT_Hの各々の大きさに応じて、以下に列挙する方向インデックスを特性値Yとして特性インデックス算出部523に供給する。
 ・方向インデックス=0:ACT_H>2×ACT_Vの場合
 ・方向インデックス=1:ACT_H≦2×ACT_VかつACT_V≦ACT_Hの場合
 ・方向インデックス=2:ACT_H<ACT_VかつACT_V≦2×ACT_Hの場合
 ・方向インデックス=3:2×ACT_H<ACT_Vの場合
 なお、本処理例における方向インデックスの導出方向は上記の例に限られるものではない。例えば、第2特性値算出部522は、垂直方向活性度ACT_Vおよび水平方向活性度ACT_Hの各々の大きさに応じて、対象単位領域におけるデブロック済復号画像の方向性を3つに分類し、それらの方向性を示す方向インデックスを出力する構成としてもよいし、対象単位領域におけるデブロック済復号画像の方向性を2つに分類し、それらの方向性を示す方向インデックスを出力する構成としてもよい。また、垂直方向活性度ACT_Vおよび水平方向活性度ACT_Hの各々の大きさに応じて、対象単位領域におけるデブロック済復号画像の方向性を5つ以上に分類してもよい。
 第2特性値算出部522は、例えば、以下のように、垂直方向活性度ACT_Vおよび水平方向活性度ACT_Hの各々の大きさに応じて、対象単位領域におけるデブロック済復号画像の方向性を3つに分類することができる。
 ・方向インデックス=0:ACT_H>2×ACT_Vの場合
 ・方向インデックス=1:ACT_H≦2×ACT_Vかつ2×ACT_H≧ACT_Vの場合
 ・方向インデックス=2:2×ACT_H<ACT_Vの場合
 このような構成とする場合、初期分割によって得られた特性値部分領域CPR[i0]は、特性値Yに関して、最大で3つの特性値部分領域CPR(i0、j0)(j0=0、1、2)に再分割される。ここで、j0=0、1、2は、それぞれ、方向インデックス=0、1、2に対応する。
 また、第2特性値算出部522は、例えば、以下のように、垂直方向活性度ACT_Vおよび水平方向活性度ACT_Hの各々の大きさに応じて、対象単位領域におけるデブロック済復号画像の方向性を2つに分類することができる。
 ・方向インデックス=0:ACT_H>ACT_Vの場合
 ・方向インデックス=1:ACT_H<ACT_Vの場合
 このような構成とする場合、初期分割によって得られた特性値部分領域CPR[i0]は、特性値Yに関して、最大で2つの特性値部分領域CPR(i0、j0)(j0=0、1)に再分割される。ここで、j0=0、1は、それぞれ、方向インデックス=0、1、に対応する。
 (特性値Yの算出処理例2)
 本処理例では、第2特性値算出部522は、特性値Yとして、対象単位領域におけるデブロック済復号画像の方向性を算出する。ただし、本処理例では、上述の(特性値Yの算出処理例1)とは異なり、対象単位領域におけるデブロック済復号画像のエッジ方向を検出し、検出されたエッジ方向に応じて、方向インデックスを特性値Yとして特性インデックス算出部523に供給する。
 以下では、エッジ方向検出処理について、図14(a)~(b)を参照して説明する。
 (対象分割領域が1つの画素のみを含む場合のThetaの算出処理)
 対象分割領域が1つの画素(対象画素)のみを含む場合、第2特性値算出部522は、対象画素を中心とする3×3画素の参照領域を設定し、当該参照領域の各画素に対して、以下の数式(1a)および(1b)によって定義されるソーベルフィルタ行列SFM_x、およびSFM_yを作用させることによって、ソーベルフィルタ後の画素値Sobel_xおよびSobel_yを算出する。
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000008
 より具体的には、例えば、3×3画素の参照領域に含まれる各画素の画素値を、図14(a)に示すように、a~hと表すことにすると、第2特性値算出部522は、ソーベルフィルタ後の画素値Sobel_xおよびSobel_yを、それぞれ、以下の数式(2a)および(2b)によって算出する。
 Sobel_x=-a+c-2×d+2×e-f+h   (2a)
 Sobel_y=-a-2×b-c+f+2×g+h   (2b)
 続いて、第2特性値算出部522は、以下の数式(3)によって、エッジ方向を示す角度(以下、「エッジ角度」とも呼称する)Thetaを算出する。
 Theta=arctan(Sobel_x/Sobel_y) (3)
ここで、arctanは、三角関数tanの逆関数を表す。また、角度Thetaは、図14(b)に示すように、時計周りに増加するものとし、0度から180度までの範囲(0°≦Theta<180°)で表現されるものとする。
 (対象分割領域が複数の画素を含む場合のThetaの算出処理)
 対象分割領域が複数の画素を含む場合、第2特性値算出部522は、まず、対象分割領域に含まれる各画素について、3×3画素の参照領域を設定し、上述した方法によって各画素についてのソーベルフィルタ後の画素値Sobel_xおよびSobel_yを算出する。
 続いて、第2特性値算出部522は、以下の数式(4)によって、各画素についてのエッジ強度ESを算出し、最もエッジ強度ESの大きい画素についてのソーベルフィルタ後の画素値Sobel_xおよびSobel_yを用いて、上記数式(3)によってエッジ角度Thetaを算出する。
 ES=(Sobel_x)2+(Sobel_y)2   (4)
 なお、第2特性値算出部522は、対象分割領域に含まれる全ての画素についてのエッジ強度ESが予め定められた閾値以下である場合には、当該対象分割領域については、エッジなしと判定する。
 なお、第2特性値算出部522は、エッジの角度を算出することなく、エッジ方向に対応する番号(方向インデックス)を出力する構成としても良い。
 例えば、三角関数tanの逆関数を用いるのではなく、Sobel_yとSobel_xの大小関係に応じて場合分けをすることによって、以下のように方向インデックスを生成可能である。
 方向インデックス=0  |Sobel_y|<a×|Sobel_x|の場合
 方向インデックス=1  |Sobel_y|≧a×|Sobel_x|かつ
             |Sobel_y|≦b×|Sobel_x|かつ
             Sobel_yとSobel_xの符号が等しい場合
 方向インデックス=2  |Sobel_y|>b×|Sobel_x|の場合
 方向インデックス=3  |Sobel_y|≧a×|Sobel_x|かつ
             |Sobel_y|≦b×|Sobel_x|かつ
             Sobel_yとSobel_xの符号が反対の場合
但し、a=tan(22.5°)=0.414・・・、b=tan(67.5°)=2.414・・・である。なお、この例では4つの方向インデックスを算出したが、2個の方向インデックスの算出や8個の方向インデックスを算出する構成としてもよい。このような構成の場合、特性値Yの算出処理例1において説明したように、初期分割によって得られた特性値部分領域CPR[i0]は、特性値Yに関して、最大で、方向インデックスの総数と同数の特性値部分領域に再分割される。
 (特性値Yの算出処理例3)
 本処理例では、第2特性値算出部522は、特性値Yとして、対象単位領域におけるデブロック済復号画像の画素値の平均(平均画素値とも呼ぶ)を算出し、算出した平均画素値を、特性値Yとして特性インデックス算出部523に供給する。
 第2特性値算出部522は、処理対象となる対象単位領域におけるデブロック済復号画像P_DBの各画素値をバッファメモリ15から読み出し、それらの画素値の平均をとることによって平均画素値MPを算出する。
 対象単位領域がBx画素×By画素の矩形状である場合、対象単位領域における各画素の座標を(u、v)(u、vはそれぞれ0≦u≦Bx-1、0≦v≦By-1を満たす整数)と表し、その座標におけるデブロック済復号画像P_DBの画素値をS(u、v)と表すことにすると、第2特性値算出部522は、例えば、以下の数式(1-3)を用いて、各画素値の単純平均をとることによって、平均画素値MPを算出することができる。
Figure JPOXMLDOC01-appb-M000009
 なお、第2特性値算出部522は、各画素値の単純平均をとることに代えて、各画素値について所定の重み係数を用いた加重平均をとることによって平均画素値MPを算出する構成としてもよい。
 また、符号化データ#1の説明において、初期分割によって得られた特性値部分領域CPR[i0]が、特性値Yに関して、最大で4つの特性値部分領域に再分割される場合を例に挙げたが、本実施形態は、これに限定されるものではない。例えば、初期分割によって得られた特性値部分領域CPR[i0]が、特性値Yに関して、以下のように、最大で3つの特性値部分領域CPR(i0、j0)(j0=0、1、2)に分割される構成としてもよい。
 CPR(i0、0):MP≦64
 CPR(i0、1):64<MPかつMP≦160
 CPR(i0、2):160<MP
 また、初期分割によって得られた特性値部分領域CPR[i0]が、特性値Yに関して、以下のように、最大で2つの特性値部分領域CPR(i0、j0)(j0=0、1)に分割される構成としてもよい。
 CPR(i0、0):MP≦128
 CPR(i0、1):128<MP
 (特性値Yの算出処理例4)
 本処理例では、第2特性値算出部522は、処理対象フレーム(または処理対象スライス)における対象単位領域の座標を算出する。算出された座標は、特性値Yとして特性インデックス算出部523に供給される。ここで、対象単位領域の座標とは、より正確には、対象単位領域の代表画素の座標である。代表画素としては、例えば、対象単位領域内の画素であって、該対象単位領域の左上端の画素を用いることができる。ただし、対象単位領域における代表画素の具体的な位置は本実施形態を限定するものではない。
 対象単位領域が、ブロックまたはパーティションである場合には、処理対象フレームにおける当該対象単位領域の座標は、符号化データ#1から復号された以下の情報を参照することによって算出することができる。
 ・符号化ブロックパターンを指定するCBP(coded_block_pattern)
 ・予測単位指定情報PT
 ・変換単位指定情報TT
 また対象単位領域が、ブロックまたはパーティションの何れでもなく、適応フィルタ部50によって設定される領域である場合には、適応フィルタ50は、設定された単位領域の位置を示す情報を参照することによって、対象単位領域の座標を特定することができる。
 (特性インデックス算出部523)
 特性インデックス算出部523は、対象単位領域について、第1特性値算出部521から供給される特性値Xおよび第2特性値算出部522から供給される特性値Yを、それぞれ、特性値分割点PXnおよびPYmと比較することによって、当該対象単位領域に対して、特性値領域内インデックス(i0、j0)を割り付ける。また、対象単位領域に対して割り付けた特性値領域内インデックス(i0、j0)をフィルタ係数割り付け部524に供給する。
 特性インデックス算出部523は、まず、対象単位領域についての特性値Xを、特性値分割点PX1~PX_NX-1のうち第1段階の分割に用いられる初期分割点と比較することによって、初期分割インデックス[i0]を算出し、算出された初期分割インデックス[i0]を対象単位領域に割り付ける。図4(b)に示すように初期分割点としてPX2およびPX4が用いられる場合、初期分割インデックス[i0]は以下のように算出される。
 ・i0=0:X<PX2の場合
 ・i0=1:PX2≦X<PX4の場合
 ・i0=2:PX4≦Xの場合
 続いて、特性インデックス算出部523は、alf_second_split_typeおよびalf_second_split_flag[i0]を参照し、特性値Xおよび特性値Yを、第2段階の分割に用いられる再分割点と比較することによって、再分割インデックス[j0]を算出する。算出された再分割インデックス[j0]は、対象単位領域に割り付けられる。
 図4(c)に示すように、特性値Xについての再分割点としてPX1、PX3、PX5が用いられる場合、再分割点PX1は、初期分割インデックス[i0=0]が割り付けられた対象単位領域に対して用いられ、再分割点PX3は、初期分割インデックス[i0=1]が割り付けられた対象単位領域に対して用いられ、再分割点PX5は、初期分割インデックス[i0=2]が割り付けられた対象単位領域に対して用いられる。
 以下では、初期分割インデックス[i0=0]が割り付けられた対象単位領域についての再分割インデックス[j0]の算出処理について、より具体的に説明を行う。初期分割インデックス[i0=1]が割り付けられた対象単位領域についての再分割インデックス[j0]の算出処理は、以下の説明におけるPX1をPX3と読み替えればよく、初期分割インデックス[i0=2]が割り付けられた対象単位領域についての再分割インデックス[j0]の算出処理は、以下の説明におけるPX1をPX5と読み替えればよい。
 特性インデックス算出部523は、alf_second_split_type=0の場合、初期分割インデックス[i0=0]が割り付けられた対象単位領域について、再分割インデックス[j0]を以下のように算出する。
 ・alf_second_split_flag=0の場合:
   j0=0
 ・alf_second_split_flag=1の場合:
   j0=0:X<PX1のとき
   j0=1:PX1≦Xのとき
 ・alf_second_split_flag=2の場合:
   j0=0:Y<PY2のとき
   j0=1:PY2≦Yのとき
 ・alf_second_split_flag=3の場合:
   j0=0:X<PX1かつY<PY2のとき
   j0=1:X<PX1かつPY2≦Yのとき
   j0=2:PX1≦XかつY<PY2のとき
   j0=3:PX1≦XかつPY2≦Yのとき
 また、特性インデックス算出部523は、alf_second_split_type=1の場合、初期分割インデックス[i0=0]が割り付けられた対象単位領域について、再分割インデックス[j0]を以下のように算出する。
 ・alf_second_split_flag=0の場合:
   j0=0
 ・alf_second_split_flag=1の場合:
   j0=0:Y<PY2のとき
   j0=1:PY2≦Yのとき
 ・alf_second_split_flag=2の場合:
   j0=0:Y<PY1のとき
   j0=1:PY1≦Yのとき
 ・alf_second_split_flag=3の場合:
   j0=0:Y<PY1のとき
   j0=1:PY1≦Y<PY2のとき
   j0=2:PY2≦Y<PY3のとき
   j0=3:PY3≦Yのとき
 (フィルタ係数割り付け部524)
 フィルタ係数割り付け部524は、対象単位領域に割り付けられた特性値領域内インデックス(i0、j0)に対応するフィルタ係数RegionFilterLuma[i0][j0]を、特性別フィルタ係数格納部517から読み出し、読み出したフィルタ係数RegionFilterLuma[i0][j0]を、当該対象単位領域に割り付ける。対象単位領域に割り付けられたフィルタ係数RegionFilterLuma[i0][j0]は、フィルタ部525に供給される。
 (フィルタ部525)
 フィルタ部525は、対象単位領域に対して、フィルタ係数RegionFilterLuma[i0][j0]を用いたフィルタ処理を施すことによって、該対象単位領域におけるフィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。
 より具体的には、フィルタ済復号画像P_FL(「フィルタ後画像」とも呼称する)におけるフィルタ対象画素の画素値をSF(x’、y’)と表し、デブロック済復号画像P_DB(「フィルタ前画像」とも呼称する)における画素値をS(x、y)と表すことにすると、フィルタ部525は、画素値SF(x’、y’)を、以下の数式(1-4)によって算出する。
Figure JPOXMLDOC01-appb-M000010
ここで、座標(x、y)は座標(x’、y’)と同一の座標としてもよいし、1対1の対応を有していれば、異なった座標としてもよい。また、a(u、v)は、フィルタ前画像の画素値S(x+u、y+v)に乗ぜられるフィルタ係数を表しており、フィルタ係数割り付け部524から供給されたフィルタ係数RegionFilterLuma[i0][j0]の各成分に対応する。また、oは、フィルタ係数RegionFilterLuma[i0][j0]に含まれるオフセット成分を表している。
 また、数式(1-4)におけるRは、フィルタ処理において参照される領域(「フィルタ参照領域R」とも呼称する)を表している。参照領域Rのタップ数は、alf_length_luma_minus5_div2[i0]によって指定される。参照領域Rとしては、例えば、図7に示したように、alf_length_luma_minus5_div2[i0]の各値に応じて設定される参照領域R0、R1、およびR2の何れかを用いればよい。なお。図7においては、菱形の参照領域を例示しているが、本実施形態における参照領域Rは、これらの例に限定されるものではなく、alf_length_luma_minus5_div2[i0]によってタップ数が指定される矩形状の参照領域を用いてもよい。
 また、各フィルタ係数は、180度の回転対称性を有するように、フィルタ参照領域Rに含まれる各画素に対して割り付けられる構成とすることができる。すなわち、a(u、v)=a(-u、-v)を満たすように設定される構成とすることができる。このような構成とすることによって、alf_coeff_luma[i][j]に含まれる各成分の数を削減することができる。
 (動画像符号化装置2)
 以下では、符号化対象画像を符号化することによって符号化データ#1を生成する動画像符号化装置2について、図15~図16を参照して説明する。動画像符号化装置2は、その一部に、H.264/MPEG-4.AVCに採用されている方式、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採
用されている方式、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式、及び、HM(HEVC TestModel)ソフトウェアに採用されている技術を含んでいる。
 図15は、本実施形態に係る動画像符号化装置2の構成を示すブロック図である。図15に示すように、動画像符号化装置2は、変換・量子化部21、可変長符号符号化部22、逆量子化・逆変換部23、バッファメモリ24、イントラ予測画像生成部25、インター予測画像生成部26、動きベクトル検出部27、予測方式制御部28、動きベクトル冗長性削除部29、加算器31、減算器32、デブロッキングフィルタ33、および、適応フィルタ60を備えている。動画像符号化装置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)後述する適応フィルタ60から供給されたフィルタセット番号、フィルタ係数群、領域指定情報、並びにオンオフ情報を可変長符号化することによって、符号化データ#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を適応フィルタ60に供給する。
 動きベクトル検出部27は、各パーティションに関する動きベクトルmvを検出する。具体的には、(1)参照画像として利用するフィルタ済復号画像P_FL’を選択し、(2)選択したフィルタ済復号画像P_FL’において対象パーティションを最良近似する領域を探索することによって、対象パーティションに関する動きベクトルmvを検出する。ここで、フィルタ済復号画像P_FL’は、既に復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ33によるデブロック処理、および、適応フィルタ60による適応的フィルタ処理を施すことによって得られる画像であり、動きベクトル検出部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および適応フィルタ60を経由したのち、フィルタ済復号画像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として、適応フィルタ60に出力される。
 適応フィルタ60は、デブロッキングフィルタ33から供給されるデブロック済復号画像P_DBに対して、適応的なフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ60によりフィルタ処理が施されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。適応フィルタ60の具体的な構成については、後述するため、ここでは説明を省略する。
 (適応フィルタ60)
 適応フィルタ60は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ60は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFPとして可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFPを符号化データ#1の一部として符号化する。
 図16は、適応フィルタ60の構成を示すブロック図である。図16に示すように、適応フィルタ60は、適応フィルタ情報設定部61、および、適応フィルタ部62を備えている。
 (適応フィルタ情報設定部61)
 適応フィルタ情報設定部61は、図16に示すように、領域別タップ数設定部611、領域構造設定部612、フィルタパラメータ生成部613、2次元予測フラグ設定部614、フィルタ係数予測部515、フィルタ係数残差生成部616、特性別フィルタ係数格納部617、特性値分割点変更フラグ設定部618、特性値分割点設定部519を備えている。
 フィルタ係数予測部515、および特性値分割点設定部519については既に述べたためここでは説明を省略する。
 (領域別タップ数設定部611)
 領域別タップ数設定部611は、初期分割によって得られた特性値部分領域CPR[i0]についてのタップ数を指定するためのシンタックスalf_length_luma_minus5_div2[i0]を設定する。設定されたシンタックスalf_length_luma_minus5_div2[i0]は、フィルタパラメータ生成部613に供給される。また、シンタックスalf_length_luma_minus5_div2[i0]は、フィルタ係数予測部515、フィルタ係数残差生成部616、領域別フィルタ係数格納部617、フィルタ係数導出部624、および、フィルタ部525にも供給される(図16において矢印不図示)。
 alf_length_luma_minus5_div2[i0]の取り得る具体的な値、および、alf_length_luma_minus5_div2[i0]の具体的な値と参照領域Rのタップ数AlfLengthLumaとの対応関係については、既に述べたためここでは説明を省略する。
 なお、alf_length_luma_minus5_div2[i0]の具体的な値は、符号化効率がより向上するように定められる。
 (領域構造設定部612)
 領域構造設定部612は、再分割の種別を指定するためのフラグalf_second_split_type、および、初期分割によって得られた各特性値部分領域について再分割の具体的な態様を指定するためのシンタックスalf_second_split_flag[i0]を設定する。設定されたフラグalf_second_split_typeおよびシンタックスalf_second_split_flag[i0]は、特性値分割点設定部519、2次元予測フラグ設定部614、および、フィルタパラメータ生成部613に供給される。
 alf_second_split_typeおよびalf_second_split_flag[i0]の取り得る値、並びに、alf_second_split_typeおよびalf_second_split_flag[i0]の具体的な値と再分割の態様との対応関係については、既に述べたためここでは説明を省略する。
 なお、alf_second_split_typeおよびalf_second_split_flag[i0]の具体的な値は、符号化効率がより向上するように定められる。
 (2次元予測フラグ設定部614)
 2次元予測フラグ設定部614は、alf_second_split_typeおよびalf_second_split_flag[i0]を参照して、各特性値部分領域についてのフィルタ係数の予測値を導出する際の予測方向を指定するためのフラグalf_region_pred_luma[i][j]を設定する。設定されたフラグalf_region_pred_luma[i][j]は、フィルタ係数予測部515に供給される。
 alf_region_pred_luma[i][j]の取り得る値、およびalf_region_pred_luma[i][j]の具体的な値と予測方向との対応関係については既に述べたため、ここでは説明を省略する。なお、alf_region_pred_luma[i][j]の具体的な値は、符号化効率がより向上するように定められる。
 (フィルタ係数残差生成部616)
 フィルタ係数残差616は、各特性値部分領域CPR(i0、j0)について、フィルタ係数予測部515より供給される予測フィルタ係数PredRegionFilterLumaと特性別フィルタ係数格納部617から読み出したフィルタ係数RegionFilterLumaとの差分をとることによって、フィルタ係数残差alf_coeff_luma[i][j]を生成する。生成されたフィルタ係数残差alf_coeff_luma[i][j]はフィルタパラメータ生成部613に供給される。
 (特性値分割点変更フラグ設定部618)
 特性値分割点変更フラグ設定部618は、特性値分割点PXn(1≦n≦NX-1)を変更するために参照されるフラグalf_first_split_val_shiftを設定する。設定されたフラグalf_first_split_val_shiftは、特性値分割点設定部519に供給される。
 alf_first_split_val_shiftの取り得る値、および、alf_first_split_val_shiftの具体的な値と特性値分割点PXnとの対応関係については既に述べたため、ここでは説明を省略する。
 なお、alf_first_split_val_shiftの具体的な値は、符号化効率がより向上するように定められる。
 (フィルタパラメータ生成部613)
 フィルタパラメータ生成部613は、シンタックスalf_length_luma_minus5_div2[i0]、alf_second_split_type、alf_second_split_flag[i0]、alf_first_split_val_shift、および、alf_coeff_luma[i][j]からフィルタパラメータFPを生成する。生成されたフィルタパラメータFPは、可変長符号符号化部22に供給される。
 なお、フィルタパラメータFPには、特性値部分領域毎のフィルタ処理を行うのか否かを指定するためのシンタックスalf_enable_region_filter、および、初期分割の分割数AlfNumFirstSplitを指定するためのシンタックスalf_num_first_split_minus1が含まれる。これらのシンタックスの具体的な値は、符号化効率がより向上するように定められる。
 (特性別フィルタ係数格納部617)
 特性別フィルタ係数格納部617は、後述するフィルタ係数導出部624によって導出されたフィルタ係数RegionFilterLuma[i0][j0]が格納される。
 (適応フィルタ部62)
 適応フィルタ部62は、図16に示すように、第1特性値算出部521、第2特性値算出部522、特性インデックス算出部523、フィルタ係数導出部624、およびフィルタ部525を備えている。
 第1特性値算出部521、第2特性値算出部522、特性インデックス算出部523、およびフィルタ部525については、既に述べたため、ここでは説明を省略する。
 (フィルタ係数導出部624)
 フィルタ係数導出部624は、対象単位領域におけるフィルタ済復号画像P_FLと符号化対象画像との誤差がより小さくなるようなフィルタ係数RegionFilterLuma[i0][j0]を導出する。導出されたフィルタ係数RegionFilterLuma[i0][j0]は、フィルタ部525に供給されると共に、特性別フィルタ係数格納部617に格納される。
 対象単位領域におけるデブロック済復号画像P_DBの画素値をS(x、y)と表し、対象単位領域における符号化対象画像の画素値をST(x、y)と表すことにすると、フィルタ係数導出部624は、例えば、以下の数式(1-5)によって与えられる二乗誤差Eを最小にするようなフィルタ係数a(u、v)およびオフセットoを導出する。ここで、フィルタ係数a(u、v)およびオフセットoは、RegionFilterLuma[i0][j0]の各成分である。
Figure JPOXMLDOC01-appb-M000011
 <実施形態1の変形例>
 以下では、実施形態1の変形例について、図17~図18を参照して説明する。図17は、本変形例に係るフィルタパラメータFP(図17においてalf_param()と表記)に含まれる各シンタックスを示す図である。図17に示すように、本変形例に係るフィルタパラメータFPには、図3に示したフィルタパラメータFPとは異なり、シンタックスalf_first_split_val_shift、および、alf_second_split_typeは含まれておらず、alf_second_split_typeの値としては、alf_second_split_type=0の固定値が用いられる。
 本変形例においては、第1の特性値Xについての特性値分割点PX1~PX_NX-1、すなわち、初期分割における分割点が、初期分割の分割数を指定するシンタックスalf_num_first_split_minus1の値に応じて設定される。図18は、本変形例におけるalf_num_first_split_minus1の各値に応じて設定される特性値分割点PX1~PX5を例示する表である。
 図18に示すように、本変形例においては、初期分割の分割数に応じて分割点が設定されるので、各特性値部分領域に分類される単位領域の数を一定に近づけることができる。このため、高い符号化効率を実現することができる。
 また、図18に示すように、alf_num_first_split_minus1=0または1の場合に設定される特性値分割点の値は、alf_num_first_split_minus1=2の場合に設定される特性値分割点の何れかが用いられる。例えば、alf_num_first_split_minus1=0の場合に設定される特性値分割点PX1の値には、alf_num_first_split_minus1=2の場合に設定される特性値分割点PX3の値64が用いられる。このように、本変形例では、最大分割以外の分割(図18に示す例では、alf_num_first_split_minus1=0または1)に用いられる分割点の値が、最大分割(図18に示す例では、alf_num_first_split_minus1=2)に用いられる分割点の値の集合の要素となっている。
 このような構成とすることによって、動画像符号化装置において初期分割点の最適化を行う際に、各特性値部分領域についての特性値の算出をやり直す必要がなくなるため、処理量が削減される。
 〔実施形態2〕
 以下では、本発明の第2の実施形態について、図19~図22を参照して説明する。なお、以下では、実施形態1において既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 (符号化データ#3)
 本実施形態に係る動画像符号化装置4及び動画像復号装置3の詳細な説明に先立って、動画像符号化装置4によって生成され、動画像復号装置3によって復号される符号化データ#3のデータ構造について説明を行う。
 符号化データ#3のデータ構造は、実施形態1に係る符号化データ#1のデータ構造と略同じであるが、フィルタパラメータFPの構成が異なる。図19は、本実施形態に係る符号化データ#3のフィルタパラメータFP(図19においてalf_param()と表記)に含
まれる各シンタックスを示す図である。
 (alf_filter_pattern)
 alf_filter_pattern[i](1≦i<AlfMaxNumFilters、AlfMaxNumFiltersは、初期分割点の最大値)は、初期分割(第1段階の分割)における初期分割点を定めるためのフラグである。再分割(第2段階の分割)を行うか否かに関わらず、alf_filter_pattern[i]によって初期分割点が定まる。alf_filter_patternは特性値に関して隣接する部分領域間で同じフィルタ係数群を用いるか否かを指定するフラグである。最大初期分割数AlfMaxNumFiltersで分割した場合の分割単位をDU[i][j]で表現するとする。初期分割に関わる特性値を示すインデックスをiとする。この場合、alf_filter_pattern[i]は、インデックス[i]によって指定される分割単位DU[i][j]に対して、インデックス[i-1]によって指定される分割単位DU[i-1][j]と同じフィルタ係数群を適用するか否かを指定するフラグである。alf_filter_pattern[i]が0である場合には、分割単位DU[i][j]と分割単位DU[i-1][j]との境界は分割点となり、alf_filter_pattern[i]が1である場合には、分割単位DU[i][j]と分割単位DU[i-1][j]との境界は分割点とはならない。このようにして、異なるフィルタ係数群を用いる特性値を分割する点(分割点)を定めることができる。
 (alf_enable_second_split)
 alf_enable_second_splitは、再分割を行うのか否かを指定するフラグである。alf_enable_second_split=0の場合には、再分割が行われず、alf_enable_second_split=1の場合には、再分割が行われる。
 符号化対象画像の画像特性如何によっては、再分割を行わないことによって符号量を削減したほうが、符号化効率が向上する場合がある。符号化データ#5に、alf_enable_second_splitを含めておくことによって、符号化効率の向上を図ることができる。
 (alf_select_split_char)
 alf_select_split_charは、特性値Yとして、複数の候補のうち何れの特性値を用いるのかを指定するシンタックスである。図20(a)に示すように、alf_select_split_charは、特性値Xおよび特性値Yを以下のように指定する。
  alf_select_split_char=0のとき:
    特性値X=活性度、特性値Y=方向性
  alf_select_split_char=1のとき:
    特性値X=活性度、特性値Y=平均画素値
  alf_select_split_char=2のとき:
    特性値X=活性度、特性値Y=y座標
  alf_select_split_char=3のとき:
    特性値X=活性度、特性値Y=x座標
 ここで、y座標とは、処理対象フレームにおける対象単位領域のフレーム内y座標のことを指し、x座標とは、処理対象フレームにおける対象単位領域のフレーム内x座標のことを指す。
 また、特性値Yとして方向性が指定される場合、当該特性値Yは、例えば、垂直方向活性度ACT_Vおよび水平方向活性度ACT_Hを用いて、
  Y=(ACT_H+k)/(ACT_V+k)×4
  k=(ACT_H+ACT_V)/16+1
によって算出される。
 図20(b)は、alf_select_split_charの各値について設定される再分割点PY1~PY3の具体例を示している。図20(b)において、「height」とは、フレームのy方向の画素数のことを指し、「width」とは、フレームのx方向の画素数のことを指す。
 (alf_enable_second_split_val)
 alf_enable_second_split_valは、後述するalf_second_split_val[k](k=0、1、2)がフィルタパラメータFPに含まれるか否かを示すフラグである。alf_enable_second_split_val=1であれば、alf_second_split_val[k]がフィルタパラメータFPに含まれる。alf_enable_second_split_valは、再分割が行われる場合に符号化される。
 (alf_second_split_val)
 alf_second_split_val[k](k=0、1、2)は、特性値Yについての再分割における再分割点を決定するために参照されるシンタックスである。
 alf_second_split_val[k]と、再分割点PY1~PY3との関係を図20(c)に示す。図20(c)に示すように、再分割点PY1~PY3の各値は、alf_second_split_val[k]の各値に応じて決定される。
 alf_secocond_split_flag、並びに、上記のalf_filter_pattern、alf_enable_second_split、alf_select_split_char、alf_enable_second_split_val、及びalf_second_split_valは、特性値領域CRを各特性値部分領域CPRに分割する分割の仕方を指定する特性値分割情報を構成する。
 (alf_region_disable_idc)
 alf_region_disable_idc[i0]は、再分割によって得られた特性値部分領域のうち、フィルタ処理をオフとする領域を指定するためのフラグ(オンオフ指定情報)である。alf_second_split_flag[i0]の値が0のとき、すなわち、再分割が行われないとき、alf_region_disable_idc[i0]は、-1、0の何れかの値をとり、alf_second_split_flag[i0]の値が1または2のとき、すなわち、再分割が2分割であるとき、alf_region_disable_idc[i0]は、-1、0、1の何れかの値をとり、alf_second_split_flag[i0]の値が3のとき、すなわち、再分割が4分割であるとき、alf_region_disable_idc[i0]は、-1、0、1、2、3の何れかの値をとる。
 alf_region_disable_idc[i0]が-1のとき、再分割によって得られた特性値部分領域についてのフィルタ処理がオンに指定される。
 alf_region_disable_idc[i0]が-1以外の値であるとき、再分割によって得られた特性値部分領域のうち、再分割インデックス[j0](j0=alf_region_disable_idc[i0])によって指定される特性値部分領域についてのフィルタ処理がオフに指定される。フィルタ処理がオフに指定された特性値部分領域についてのフィルタ係数(またはフィルタ係数残差)alf_coeff_lumaの符号化は行われない。
 なお、図19には、予測フィルタ係数を導出する際の予測方向を指定するシンタックスalf_region_pred_lumaを含まない構成を例示したが、これは本実施形態を限定するものではなく、実施形態2において説明したように、本実施形態においても、フィルタパラメータFPにシンタックスalf_region_pred_lumaを含める構成としてもよい。
 また、図19には、実施形態1において説明したシンタックスalf_second_split_typeを含まずに、実施形態1において説明したalf_second_split_type=1の場合の再分割に関するフィルタ係数(またはフィルタ係数残差)alf_coeff_lumaを含む構成を例示したが、これは本実施形態を限定するものではない。本実施形態においても、フィルタパラメータFPに、alf_second_split_type、および、alf_second_split_typeの各値に対するフィルタ係数(またはフィルタ係数残差)alf_coeff_lumaを含める構成としてもよい。
 (適応フィルタ70)
 本実施形態に係る動画像復号装置は、実施形態1に係る動画像復号装置1の備える適応フィルタ50に代えて、適応フィルタ70を備えている。本実施形態に係る動画像復号装置のその他の構成は、実施形態1に係る動画像復号装置1の構成と同様であるので、説明を省略する。
 図21は、適応フィルタ70の構成を示すブロック図である。図21に示すように、適応フィルタ70は、適応フィルタ50の備える領域構造復号部512、フィルタ係数残差復号部513、特性値分割点変更フラグ復号部518、特性値分割点設定部519、および、第2特性値算出部522に代えて、それぞれ、領域構造復号部712、フィルタ係数残差復号部713、特性値分割点変更フラグ復号部718、特性値分割点設定部719、および、第2特性値算出部722を備えている。また、適応フィルタ70は、適応的フィルタオフ復号部731、特性選択フラグ復号部732を備えている。適応フィルタ70のその他の構成は、適応フィルタ50と同様である。
 なお、図21には、適応フィルタ50の備える2次元予測フラグ復号部514を備えない構成を例示しているが、これは本実施形態を限定するものではなく、適応フィルタ70が2次元予測フラグ復号部514を備える構成とし、符号化データ#5に、alf_region_pred_lumaを含めておく構成としてもよい。
 適応的フィルタオフ復号部731は、フィルタパラメータFPに含まれるシンタックスalf_disable_region_idc[i0]を復号する。復号されたシンタックスalf_disable_region_idc[i0]は、フィルタ係数残差復号部713、および、フィルタ部525に供給される。alf_disable_region_idc[i0]がフィルタ処理のオフを指定している場合、フィルタ部525は、フィルタ処理を行わない。
 領域構造復号部712は、フィルタパラメータFPに含まれるシンタックスalf_second_split_flag[i0]を復号する。復号されたシンタックスalf_second_split_flag[i0]は、特性値部分領域CPR[i0]に割り付けられると共に、フィルタ係数残差復号部713、および、特性値分割点設定部719に供給される。
 フィルタ係数残差復号部713はalf_length_luma_minus5_div2[i0]、alf_disable_region_idc[i0]、およびalf_second_split_flag[i0]を参照して、フィルタパラメータFPに含まれるシンタックスalf_coeff_luma[i][j]を復号すると共に、各シンタックスalf_coeff_luma[i][j]を、それぞれに対応する特性値部分領域CPR(i0、j0)に割り付ける。alf_coeff_luma[i][j]と特性値部分領域CPR(i0、j0)との対応関係は、実施形態1に係る符号化データ#1の説明において既に述べた対応関係と同様であるため、ここでは説明を省略する。また、復号されたシンタックスalf_coeff_luma[i][j]は、フィルタ係数復号部516に供給される。
 なお、フィルタ係数残差復号部713は、alf_disable_region_idc[i0]によってフィルタ処理がオフに指定された特性値部分領域については、フィルタ係数残差alf_coeff_luma[i][j]の復号を行わない。
 特性値分割点変更フラグ復号部718は、フィルタパラメータFPに含まれるシンタックスalf_second_split_val[k](k=0、1、2)を復号する。復号されたシンタックスalf_second_split_val[k]は、特性値分割点設定部719に供給される。
 特性値選択フラグ復号部732は、フィルタパラメータFPに含まれるシンタックスalf_second_split_charを復号する。復号されたシンタックスalf_second_split_charは、特性値分割点設定部719、および、第2特性値算出部722に供給される。
 特性値分割点設定部719は、alf_second_split_flag[i0]、alf_second_split_val[k]、および、alf_second_split_charに基づいて、特性値分割点PXn(1≦n≦NX-1)およびPYm(1≦m≦NX-1)を導出する。導出された特性値分割点PXnおよびPYmは、特性インデックス算出部523に供給される。
 シンタックスalf_second_split_val[k]およびalf_second_split_charの各値に対する特性値分割点PXnおよびPYmの具体例については、符号化データ#5の説明において既に述べたため、ここでは説明を省略する。
 第2特性値算出部722は、対象単位領域におけるデブロック済復号画像P_DBについて、alf_second_split_charによって指定される特性値を算出する。算出された特性値は、特性値Yとして、特性インデックス算出部523に供給される。
 (動画像符号化装置4)
 以下では、符号化対象画像を符号化することによって符号化データ#3を生成する動画像符号化装置4について、図22を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置は、実施形態1に係る動画像符号化装置2の備える適応フィルタ60に代えて、適応フィルタ80を備えている。本実施形態に係る動画像復号装置のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 適応フィルタ80は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ80は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFPとして可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFPを符号化データ#5の一部として符号化する。
 図22は、適応フィルタ80の構成を示すブロック図である。図22に示すように、適応フィルタ80は、適応フィルタ情報設定部81、および、適応フィルタ部82を備えている。
 (適応フィルタ情報設定部81)
 適応フィルタ情報設定部81は、図22に示すように、領域別タップ数設定部611、適応的オンオフ設定部831、領域構造設定部812、特性値分割点変更フラグ設定部818、特性選択フラグ設定部832、特性値分割点設定部719、フィルタ係数残差生成部616、フィルタ係数予測部515、フィルタパラメータ生成部813、および、特性別フィルタ係数格納部617を備えている。
 領域別タップ数設定部611、特性値分割点設定部719、フィルタ係数残差生成部616、フィルタ係数予測部515、および、特性別フィルタ係数格納部617については既に述べたため、ここでは説明を省略する。
 (適応的フィルタオフ設定部831)
 適応的フィルタオフ設定部831は、再分割によって得られた特性値部分領域のうちフィルタ処理をオフとする領域を指定するためのフラグalf_region_disable_idc[i0]を設定する。設定されたフラグalf_region_disable_idc[i0]は、フィルタパラメータ生成部813、およびフィルタ部525に供給される。alf_region_disable_idc[i0]がフィルタ処理のオフを指定している場合、フィルタ部525は、フィルタ処理を行わない。
 alf_region_disable_idc[i0]の取り得る値とフィルタ処理のオンオフとの対応関係については既に述べたためここでは説明を省略する。
 なお、alf_region_disable_idc[i0]の具体的な値は、符号化効率がより向上するように定められる。
 (領域構造設定部812)
 領域構造設定部812は、初期分割によって得られた各特性値部分領域について再分割の具体的な態様を指定するためのシンタックスalf_second_split_flag[i0]を設定する。設定されたシンタックスalf_second_split_flag[i0]は、特性値分割点設定部719、および、フィルタパラメータ生成部813に供給される。
 alf_second_split_flag[i0]の取り得る値、並びに、alf_second_split_flag[i0]の具体的な値と再分割の態様との対応関係については、既に述べたためここでは説明を省略する。
 なお、alf_second_split_flag[i0]の具体的な値は、符号化効率がより向上するように定められる。
 (特性値分割点変更フラグ設定部818)
 特性値分割点変更フラグ設定部818は、特性値Yについての再分割における再分割点を決定するために参照されるシンタックスalf_second_split_val[k](k=0、1、2)を設定する。設定されたシンタックスalf_second_split_val[k]は、特性値分割点設定部719、および、フィルタパラメータ生成部813に供給される。
 alf_second_split_val[k]の取り得る値、および、alf_second_split_val[k]の各値と、特性値Yについての再分割における再分割点との対応関係については既に述べたためここでは説明を省略する。
 なお、alf_second_split_val[k]の具体的な値は、符号化効率がより向上するように定められる。
 (特性選択フラグ設定部832)
 特性選択フラグ設定部832は、特性値Yとして複数の候補のうち何れの特性値を用いるのかを指定するシンタックスalf_select_split_charを設定する。設定されたシンタックスalf_select_split_charは、特性値分割点設定部719、フィルタパラメータ生成部813、および、第2特性値算出部722に供給される。
 alf_select_split_charの取り得る値、および、alf_select_split_charの各値と、特性値Yとの対応関係については既に述べたため、ここでは説明を省略する。
 なお、alf_select_split_charの具体的な値は、符号化効率がより向上するように定められる。
 (フィルタパラメータ生成部813)
 フィルタパラメータ生成部813は、シンタックスalf_length_luma_minus5_div2[i0]、alf_disable_region_idc[i0]、alf_second_split_flag[i0]、alf_second_split_val、alf_second_split_char、および、alf_coeff_luma[i][j]からフィルタパラメータFPを生成する。生成されたフィルタパラメータFPは、可変長符号符号化部22に供給される。
 なお、フィルタパラメータFPには、特性値部分領域毎のフィルタ処理を行うのか否かを指定するためのシンタックスalf_enable_region_filter、初期分割における初期分割点を定めるためのフラグalf_filter_pattern、alf_second_split_val[k]がフィルタパラメータFPに含まれるか否かを示すフラグalf_enable_second_split_val、および、初期分割の分割数AlfNumFirstSplitを指定するためのシンタックスalf_num_first_split_minus1が含まれる。これらのシンタックスの具体的な値は、符号化効率がより向上するように定められる。
 (適応フィルタ部82)
 適応フィルタ部82は、図22に示すように、第1特性値算出部521、第2特性値算出部722、特性インデックス算出部523、フィルタ係数導出部624、および、フィルタ525を備えている。これらの各部については、既に述べたため説明を省略する。
 <実施形態1および実施形態2についての付記事項>
 実施形態1における符号化データ#1のフィルタパラメータFPに含まれるシンタックスのうち、少なくとも何れかのシンタックスと、実施形態2における符号化データ#3のフィルタパラメータFPに含まれるシンタックスのうち、少なくとも何れかのシンタックスとを含むフィルタパラメータFP’も本発明の範疇に含まれる。そのようなフィルタパラメータFP’を復号する動画像復号装置は、実施形態1および実施形態2において既に説明した部分のうち、フィルタパラメータFP’に含まれるシンタックスを復号するために必要な各部を備える構成とすればよい。
 例えば、実施形態1における符号化データ#1のフィルタパラメータFPは、符号化データ#3のフィルタパラメータFPに含まれるシンタックスalf_second_split_char、alf_enable_second_split_val、および、alf_second_split_valを含む構成としてもよい。このような構成の場合、動画像復号装置1の備える適応フィルタ50は、特性選択フラグ復号部732、特性値分割点変更フラグ復号部718を備える構成とすればよい。
 また、実施形態2における符号化データ#3のフィルタパラメータFPは、シンタックスalf_region_disable_idc[i0]を含まない構成としてもよい。このような構成の場合、符号化データ#3を復号する動画像復号装置3は、全ての単位領域に対して適応的フィルタ処理を行う構成となる。
 〔実施形態3〕
 以下では、本発明の第3の実施形態について図23~図38を参照して説明する。
 本実施形態に係る適応フィルタは、実施形態1及び2と同様に、フィルタ前画像(例えば、デブロック済復号画像P_DB)を構成する各単位領域について、互いに導出方法の異なる2つの特性値を導出し、導出された2つの特性値に応じて、各単位領域を1または複数のグループの何れかに分類する。また、本実施形態に係る適応フィルタは、単位領域毎に定められたフィルタ係数を用いて、フィルタ前画像に対して単位領域毎に作用する。
 ここで単位領域とは、後述するDCT変換(より一般には周波数変換)の単位であるブロックであってもよいし、後述する予測画像を生成する単位であるパーティションであってもよいし、ブロックまたはパーティションの何れでもなく、本実施形態に係る適応フィルタによってサイズおよび位置が設定された領域であってもよい。また、単位領域は、1画素から構成されるものであってもよい。
 また、実施形態1及び2と同様に、各グループは、2つの特性値によって張られる2次元領域上に設定される各部分領域と1対1の対応を有する。したがって、上記2次元領域をどのように各部分領域へ分割するのかを指定することにより、1または複数のグループをどのように設定するかが定まることになる。また、導出された2つの特性値のうち、一方を第1の特性値Xと呼び、もう一方の特性値を第2の特性値Yと呼ぶ。なお、実施形態1及び2と同様に、上記2つの特性値によって張られる2次元領域を特性値領域とも呼称し、特性値領域上に設定される各部分領域を特性値部分領域とも呼称する。
 本実施形態においては、第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:画像の活性度、第2の特性値Y:画像の方向性
 ・第1の特性値X:画像の活性度、第2の特性値Y:平均画素値
 ・第1の特性値X:画像の活性度、第2の特性値Y:単位領域の座標
 ・第1の特性値X:単位領域の座標、第2の特性値Y:画像の活性度
 ・第1の特性値X:スライス番号、第2の特性値Y:画像の活性度
 ・第1の特性値X:平均画素値、第2の特性値Y:画像の活性度
 なお、画像の活性度に代えて、画素値の分散を用いてもよい。また、各単位領域について導出される各特性値は、導出方法如何によって、単位領域のサイズに依存する場合がある。このような場合には、各特性値として、単位領域のサイズへの依存性を取り除くことによって得られる正規化された特性値を用いることができる。
 本実施形態に係る適応フィルタは、特性値領域を第1段階の分割および第2段階の分割によって階層的に各部分領域へと分割する。ここで、第1段階の分割は、例えば、第1の特性値Xに関する分割であり、第2段階の分割は、第2の特性値Yに関する分割である。また、第1段階及び第2段階の分割の双方を、特性値X及びYに関する分割とする構成も可能である。
 また、特性値領域の各部分領域への分割は、分割単位を単位として行われる。したがって、各部分領域は、1または複数の分割単位DUから構成される。また、各分割単位の境界は、各特性値について設定される分割点(特性値分割点とも呼称する)を用いて定められる。各分割単位DUは、実施形態1において図1を用いて説明したように、インデックス[i][j]を用いて指定される。なお、実施形態1及び2と同様に、第1段階の分割を初期分割とも呼称し、第2段階の分割を再分割とも呼称する。
 (符号化データ#5)
 本実施形態に係る動画像符号化装置6によって生成され、動画像復号装置5によって復号される符号化データ#5のデータ構造は、実施形態1に係る符号化データ#1のデータ構造と略同じであるが、フィルタパラメータFPの構成が異なる。フィルタパラメータFPの構成については、以下の構成例にて詳述する。なお、フィルタパラメータFPに含まれるシンタックスのうち、実施形態1及び2において既に説明したシンタックスについては説明を省略する。
 <構成例1>
 まず、フィルタパラメータFPの第1の構成例について説明する。
 図23(a)は、本構成例に係るフィルタパラメータFP(図23(a)においてalf_param()と表記)に含まれる各シンタックスを示すシンタックステーブルである。図23(a)に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_feature_mode、alf_first_split_type、及び、alf_filter_pattern[j]が含まれている。
 alf_feature_modeは、特性値X及びYを指定するシンタックスである。
 alf_first_split_typeは、第1段階の分割の態様を指定するシンタックスである。alf_first_split_typeは、例えば、第1段階の分割の分割数を指定する。
 alf_filter_pattern[j]は、特性値に関して隣接する部分領域間で同じフィルタ係数群を用いるか否かを指定するフラグであり、インデックス[i][j]によって指定される分割単位DU[i][j]に対して、インデックス[i][j-1]によって指定される分割単位DU[i][j-1]と同じフィルタ係数群を適用するか否かを指定する。
 なお、i及びjは、それぞれ、特性値X及び特性値Yの各値を表している。従って、以下では、インデックス[i][j]をインデックス[X][Y]と表すこともある。
 alf_filter_patternが1である場合には、後述するalf_coeff_set_luma(i,j)で示されるように、動画像復号装置5は、符号化データ#5から分割単位DU[i][j]のフィルタ係数群を復号する。alf_filter_patternが0である場合には、動画像復号装置5は、符号化データ#5からフィルタ係数群を復号することはなく、後述するalf_coeff_copy_luma(i,j,i,j-1)で示される処理を行う。
 (alf_feature_modeの各値についての詳細)
 以下では、alf_feature_modeの各値と、特性値X及び特性値Yとの対応について説明する。
 (1)alf_feature_mode=0のとき
 alf_feature_modeが0である場合には、垂直方向活性度(または垂直方向勾配)と水平方向活性度(または水平方向勾配)を用いて特性値Xと特性値Yを算出する。特性値Xは角度(方向性)であり3段階の値をもつ。特性値Yは、活性度であり5段階の値を持つ。
 X = 1 (ACT_H > 2*ACT_Vの場合)
  = 2 (ACT_V > 2*ACT_Hの場合)
  = 0 (それ以外の場合)
 Y = ActIdx (5段階)
 ここで、ACT_H、及びACT_Vは、それぞれ、水平方向の活性度及び垂直方向の活性度であり、動画像復号装置5によって、以下の式に基づいて算出される。
Figure JPOXMLDOC01-appb-M000012
Figure JPOXMLDOC01-appb-M000013
 ここで、xx及びyyは、それぞれ、対象単位領域における各画素のx座標及びy座標を表しており、s'[xx,yy]は、座標[xx,yy]における画素の画素値を表している。より具体的には、s'[xx,yy]は、例えば、座標[xx,yy]におけるデブロック済復号画像P_DBの画素値を表している(以下同様)。また、M及びNは、それぞれ、対象単位領域のx方向の画素数及びy方向の画素数を表しており、BitDepthYは、特性値Yについてのビット深度を表している。
 また、ActIdxは、活性度の大きさを示すインデックスであり、以下のように定まる。
Figure JPOXMLDOC01-appb-M000014
 ここで、活性度ACTは、
 ACT = ACT_H + ACT_V
によって定めることができる。
 なお、活性度を求める際には、M×Nの領域において、上記の計算では、(M+2)×(N+2)の全画素を用いているが、1画素おきに計算することも可能である(実施形態1~3について同様)。例えば水平方向もしくは垂直方向に1画素おきとすれば演算量は約半分になり、水平方向かつ垂直方向に1画素おきとすれば演算量は約4分の1となる。但し、間引きを行った際には、活性度の量子化に用いる閾値も1/2もしくは1/4とすることが必要になる。なお、ソフトウェアにおいてもハードウェアにおいても水平方向に連続した画素値を利用した演算は高速であるのに対して、垂直方向の画素値を使用する場合には低速になる。そのため、水平方向には間引かず、垂直方向に1画素おきに間引いて計算することが好適である。また、垂直方向活性度ACT_Vの場合には、水平方向で間引きを行い、垂直方向活性度ACT_Hの場合には、垂直方向で間引きを行うことも好適である。
 (2)alf_feature_mode=1のとき
 alf_feature_modeが1である場合には、2つの斜め方向活性度を用いて特性値を算出する。特性値Xは角度であり3段階の値をもつ。特性値Yは、活性度であり5段階の値を持つ。
 X = 1 (ACT_D0 > 2*ACT_D1の場合)
  = 2 (ACT_D1 > 2*ACT_D0の場合)
  = 0 (それ以外の場合)
 Y = ActIdx (5段階)
 ここで、ACT_D0、及びACT_D1は、互いに略直交する斜め方向の活性度であり、動画像復号装置5によって、以下の式に基づいて算出される。
Figure JPOXMLDOC01-appb-M000015
Figure JPOXMLDOC01-appb-M000016
 また、ActIdxは、活性度の大きさを示すインデックスであり、上述のように求めることができるが、その計算の際に用いられる活性度ACTは、
 ACT = ACT_D0 + ACT_D1
によって求めることができる。
 (3)alf_feature_mode=2のとき
 alf_feature_modeが2である場合には、垂直方向活性度、水平方向活性度、2つの斜め活性度の両者を用いて特性値を算出する。特性値Xは角度であり4段階の値をもつ。特性値Yは、活性度であり4段階の値を持つ。
 X = 0 (ACT_Hが最小の場合)
  = 1 (ACT_D0が最小の場合)
  = 2 (ACT_Vが最小の場合)
  = 3 (ACT_D1が最小の場合)
 Y = ActIdx (4段階)
 ここで、ACT_Hが最小の場合とは、ACT_Hが、ACT_H、ACT_V、ACT_D0、及びACT_D1の中で最小である場合を意味する(他も同様)。より具体的には、特性値Xを以下のように表現することもできる。
 X = DirIdx
 ここで、DirIdxは、
Figure JPOXMLDOC01-appb-M000017
によって定義される。ここで、min(A,B,C,D)は、引数A,B,C,Dの中で、最小の値を返す関数である。
 (4)alf_feature_mode=3のとき
 alf_feature_modeが3である場合には、垂直方向活性度と水平方向活性度を用いる。
 X = Idx_ACT_V (4段階)
 Y = Idx_ACT_H (4段階)
ここで、Idx_ACT_V及びIdx_ACT_Hは、それぞれ、以下の式によって与えられる垂直方向活性度及び水平方向活性度のインデックスである。
Figure JPOXMLDOC01-appb-M000018
Figure JPOXMLDOC01-appb-M000019
 (5)alf_feature_mode=4のとき
 alf_feature_modeが4である場合には、特性値Xを、対象単位領域についての予測モードがイントラ予測モードであるか否か、及び、角度を用いて定める。
 X = 0 イントラの場合
  = 1 (イントラ以外の場合であって、ACT_H > 2*ACT_Vの場合)
  = 2 (イントラ以外の場合であって、ACT_V > 2*ACT_Hの場合)
  = 3 (イントラ以外の場合であって、それ以外の場合)    (4段階)
 Y = ActIdx (4段階)
 なお、alf_feature_mode=4のときには、特性値Xを以下のように定めてもよい。
 X = 0 (イントラの場合であって、ACT_H < ACT_Vの場合)
  = 0 (イントラの場合であって、ACT_H > ACT_Vの場合)
  = 0 (インターの場合であって、ACT_H < ACT_Vの場合)
  = 0 (インターの場合であって、ACT_H < ACT_Vの場合)
 (6)alf_feature_mode=5のとき
 alf_feature_modeが5である場合には、特性値Xを、対象単位領域についての予測モードがイントラ予測モード(Iブロック)であるか否か、インター予測モードである場合には単方向予測(Pブロック)であるか双方向予測Bブロックであるか、によって定める。
 X = 0 (Iブロックの場合)
  =1 (Pブロックの場合)
  = 2 (Bブロックの場合)    (3段階)
 Y = ActIdx (5段階)
 またalf_feature_modeとして次の(7)と(8)の場合をさらに用いても良い。
 この場合には、領域ごとの特性値として、座標が用いられる。画像(フレーム)の幅と高さがwidth, heightである場合には、分割領域の幅RWと高さRHは、LCUサイズ(ツリーブロックのサイズ)の倍数になるように以下の式により求められる。
RW = INT(width / NH / LCU_WIDTH) * LCU_WIDTH
RH = INT(height / NV / LCU_HEIGHT) * LCU_ HEIGHT
ここでLCU_WIDTH及びLCU_HEIGHTは、それぞれ、LCUの幅及び高さ、NH及びNVは、それぞれ、画像の水平方向分割数及び垂直方向分割数を示す。なおINT(x)は、xを整数化する関数を表す。なお、以降の演算ではINTとして明示的に示さないが、整数間の除算の結果は整数化して扱うこととする。
 (7)alf_feature_mode=6のとき
 alf_feature_modeが6である場合には、対象単位領域の画像(フレーム)内x座標とy座標を用いる。
 X = y座標 / RH (NV段階)
 Y = x座標 / RW (NH段階)
 なお、特性値X、Yとして、対象単位領域の画像(フレーム)内座標を用いる分割を、座標空間分割と呼ぶこともある。
 (8)alf_feature_mode=7のとき
 alf_feature_modeが7である場合には、対象単位領域の画像(フレーム)内y座標とx座標を用いる。
 X = x座標 / RW (NH段階)
 Y = y座標 / RH (NV段階)
 以上のように、alf_feature_modeとして0~7の値をとる構成とし、alf_feature_modeの各値によって特性値X及びYを具体的に指定する構成とすることができる。また、例えば、alf_feature_modeとして0~3の値をとる構成としてもよいし、alf_feature_modeとして0~5の値をとる構成としてもよい。
 また、alf_feature_modeとして、0~1の値をとる構成とし、alf_feature_modeを1ビットで表現する構成としてもよい。
 また、alf_feature_modeの各値と、それに対応する特性値X及びYとの組み合わせは、上記の例に限定されるものではない。例えば、alf_feature_mode=2、3によって、上述したalf_feature_mode=6、7に対応する特性値X及びYが指定される構成としてもよい。
 なお、特性値X,特性値Yの算出方法は、上記方法以外にも、例えば、実施形態1および実施形態2で説明した方法を用いることができる。すなわち、平均画素値やスライス番号などを用いることもできる。
 (初期分割と再分割)
 以下では、初期分割と再分割について、図23(a)を参照しつつ説明する。
 まず、上述のように、alf_first_split_typeは初期分割の態様を指定するシンタックスである。
 図23(a)に示したAlfMaxFirstSplitは、初期分割の最大分割数を指定するシンタックスであり、AlfMaxSecondSplitは、再分割の最大分割数を指定するシンタックスである。本構成例では、AlfMaxFirstSplit=NX、AlfMaxSecondSplit=NYである。NX及びNYのとり得る値と、alf_feature_modeの各値との対応関係は、図24(a)に示す通りである。
 (alf_feature_mode=0又は1のときの初期分割と再分割)
 図25は、alf_feature_modeが0もしくは1である場合の特性値領域の分割を示す模式図である。alf_feature_modeが0もしくは1である場合には、特性値Xに関して3段階、特性値Yに関して5段階の分割が可能であり、特性値領域は、最大で15個の部分領域に分割される。すなわち、AlfMaxFirstSplit=NX=3、AlfMaxSecondSplit=NY=5である。特性値領域が15個の部分領域に分割される場合、各部分領域は、1つの分割単位より構成される。なお、図25における点線は、各分割単位の境界を示している。
 図25は、特性値領域が特性値Xに応じて初期分割され、さらに特性値Yに応じて再分割されることを示している。動画像復号装置5は、分割によって得られた特性値部分領域の各々に対して、フィルタ係数群を復号し、適応フィルタによるフィルタ処理に用いる。
 図25に示すように、alf_first_split_typeが0である場合には、特性値Xの方向の分割単位がマージされており、特性値領域に対して、特性値Xに関する分割は行われない。
 また、alf_first_split_typeが1である場合には、特性値領域は、特性値Xに関して、2つの部分領域に分割される。
 また、alf_first_split_typeが2である場合には、特性値領域は、特性値Xに関して、3つの部分領域に分割される。
 続いて、初期分割によって得られた各部分領域は、図25に示すように、特性値Yに関して最大で5つの部分領域に更に分割される。
 (alf_feature_mode=2又は3のときの初期分割と再分割)
 図26は、alf_feature_modeが2もしくは3である場合の特性値領域の分割を示す模式図である。alf_feature_modeが2もしくは3である場合には、特性値Xに関して4段階、特性値Yに関して4段階の分割が可能であり、特性値領域は、最大で16個の部分領域に分割される。すなわち、AlfMaxFirstSplit=NX=4、AlfMaxSecondSplit=NY=4である。特性値領域が16個の部分領域に分割される場合、各部分領域は、1つの分割単位より構成される。なお、図26における点線は、各分割単位の境界を示している。
 図26に示すように、alf_first_split_typeが0である場合には、特性値Xの方向の部分領域がマージされており、特性値領域に対して、特性値Xに関する分割は行われない。
 また、alf_first_split_typeが1である場合には、特性値領域は、特性値Xに関して、2つの部分領域に分割される。
 また、alf_first_split_typeが2である場合には、特性値領域は、特性値Xに関して、4つの部分領域に分割される。
 続いて、初期分割によって得られた各部分領域は、図26に示すように、特性値Yに関して最大で4つの部分領域に更に分割される。
 alf_feature_modeが何れの値をとる場合であっても、再分割の方法は、図23に示すAlfMaxSecondSplit -1個のalf_filter_pattern[j]を復号することにより定められる。alf_filter_pattern[j]は、上述のように、0もしくは1をとり、各々対応する部分領域が、一つ前の部分領域と同じフィルタ係数を用いるか否かを示す。
 alf_filter_pattern[j]が0である場合には、動画像復号装置5は、[j-1]によって指定される1つ前の部分領域と同じフィルタ係数を用いる。1である場合には、動画像復号装置5は、[j-1]によって指定される1つ前の部分領域と異なるフィルタ係数を、フィルタパラメータから復号して用いる。
 (フィルタ係数群の復号処理)
 以下では、動画像復号装置5によるフィルタ係数群の復号処理について、図23(a)~(c)を参照しつつ説明する。
 図23(b)に示すalf_coeff_set_luma(i,j)は、対象分割単位DUを指定する[i][j]を引数として、当該対象分割単位についてのフィルタ係数alf_coeff_luma[i][j][k]を返す処理である。ここで、kは、各フィルタ係数成分を指定するインデックスであり、k=0~N-1の各値をとる(ここでNは、対象分割単位DU[i][j]について復号されるフィルタ係数成分の総数を表す)。
 まず、動画像復号装置5は、図23(a)に示すように、alf_coeff_set_luma(0,0)で示される特性値X=0、特性値Y=0のフィルタ係数群を復号する。次に、動画像復号装置5は、ループインデックスiについて0からNX-1のループを処理する。各ループインデックスiについて、NX、alf_first_split_type、ループインデックスiを用いて参照されるマージ指定テーブルmergedを参照する。ここで、マージ指定テーブル上の値merged[AlfMaxFirstSplit][alf_first_split_type][i]は、初期分割においてインデックスiに対応する部分領域が、インデックスi-1に対応する部分領域にマージされているか否かを示すフラグ(マージ指定フラグ)である。マージ指定フラグは、マージを指定する場合に1、マージを指定しない場合には0をとる。
 マージ指定フラグmerged[AlfMaxFirstSplit][alf_first_split_type][i]の各値と、AlfMaxFirstSplit、alf_first_split_type、及びiの各値との対応関係を示す表を図24(b)に示す。
 図24(b)に示すように、例えば、AlfMaxFirstSplit=3、alf_first_split_type=0である場合には、merged[AlfMaxFirstSplit][alf_first_split_type][i]は、i=0のとき0をとり、i=1のとき1をとり、i=1のとき1をとる。
 なお、特性値X=i、特性値Y=jのフィルタ係数群を分割単位DU[i][j]についてのフィルタ係数群とも呼ぶ。また、インデックス[i][j]を(i,j)とも表記する。
 図23(a)に示すように、初期分割において特徴値X=iの部分領域がマージされていない場合には、動画像復号装置5は、alf_filter_patternを復号する。具体的には、ループインデックスjについて1からNY-1のループを処理する。ループ内では個々のjについてalf_filter_patternを復号する。
 alf_filter_patternが1である場合には、分割単位(i、j-1)と分割単位(i、j)とに対して異なるフィルタ係数が割り当てられることを意味する。このとき、動画像復号装置5は、alf_coeff_set_luma(i,j)で示されるように、符号化データから部分領域(i、j)のフィルタ係数群を復号する。
 一方で、alf_filter_patternが0である場合には、部分領域(i、j-1)と部分領域(i
、j)は同じフィルタ係数が割り当てられることを意味する。そのため、動画像復号装置5は、分割単位(i、j)について、符号化データ#5からフィルタ係数群を復号することはなく、alf_coeff_copy_luma(i, j, i, j-1)で示される処理を行う。
 ここで、alf_coeff_copy_luma(di, dj, si, sj)は、図23(c)に示すように、分割単位(si、sj)について復号されたフィルタ係数群を、分割単位(di、dj)のフィルタ係数群にコピーする処理を意味する。ここでは、当該分割単位(i,j)よりも特性値Yが1つ小さい分割単位(i ,j-1)のフィルタ係数群を当該分割単位(i,j)のフィルタ係数群にコピーする。なお、図23(c)に示すalf_coeff_copy_lumaにおいて、Nは、フィルタ係数群に含まれるフィルタ係数の総数を表している。
 特徴値X=iの部分領域が、初期分割において特徴値X=i-1の部分領域とマージされている場合には、ループインデックスjについて0からNY-1のループを処理する。ループ内ではalf_coeff_copy_luma(i, j, i-1,j)のように、当該分割単位(i,j)よりも特性値Xが1つ小さい分割単位(i-1,j)のフィルタ係数群を当該分割単位(i,j)のフィルタ係数群にコピーする。これにより、初期分割においてマージされている部分領域全てに対して同じフィルタ係数群をコピーする。
 フィルタ係数群AlfRegionFilterCoeffは以下の式によって算出する。
AlfRegionFilterCoeff[X][Y][k] = alf_coeff_luma[X][Y][k]
但し、kは0からN-1の値である。
 (予測符号化)
 符号化データ中のフィルタ係数群alf_coeff_lumaは、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを予測符号化して得られるものであることが可能である。例えば、alf_coeff_lumaは、隣接するフィルタ係数群間の予測差分(差分値)として符号化することができる。この場合、図23(b)、(c)に示すalf_coeff_set_luma 及びalf_coeff_copy_lumaを、それぞれ、図40(a)、(b)に示すものに置き換える。
 図40(a)に示す処理alf_coeff_set_lumaでは、符号化データより、差分値であるフィルタ係数群alf_coeff_luma[X][Y][k]を復号した後、以下の式から、予測値との差分をとることによってフィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを算出する。
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma[i][j][k]; (i=0かつj=0の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[i][j][k] - alf_coeff_luma[i-1][j][k] (j=0以外の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[i][j][k] - alf_coeff_luma[i][j-1][k] (j=0以外の場合)
 なお、差分値の求め方としては、差分値=予測値-復号対象値とする方法の他、差分値=復号対象値-予測値とする方法もある。後者の場合には、以下の式から、予測値との和をとることによってフィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを算出する。
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma[i][j][k]; (i=0かつj=0の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[i][j][k] + alf_coeff_luma[i-1][j][k] (j=0以外の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[i][j][k] + alf_coeff_luma[i][j-1][k] (j=0以外の場合)
 alf_coeff_lumaが予測符号化における予測差分である場合、alf_coeff_copy_luma(di, dj, si, sj)は、図40(b)に示すように、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffのコピーを行う処理を意味する。すなわち、分割単位(si、sj)について復号されたフィルタ係数群AlfRegionFilterCoeff[si][sj][k]を、分割単位(di、dj)のフィルタ係数群AlfRegionFilterCoeff[di][dj][k]にコピーする。なお差分値はalf_coeff_luma[di][dj][k] = 0となる。
 また、2次元の特性値空間では、ある部分領域に隣接する部分領域には特性値X方向に近い方向と特性値Y方向に近い方向の2つがある。実施形態3においても、実施形態1と同様に、フィルタ係数群alf_coeff_lumaを予測する方向を切り替えることもできる。この場合、図23(b)に示すalf_coeff_set_lumaを、図41に示すものに置き換える。図41に示すように、予測符号化を行わない起点となるフィルタ係数群であるi=0、j=0以外のフィルタ係数群の復号において、予測方向選択フラグalf_region_pred_lumaを復号する。それ以外、i = 0の場合には、予測方向選択フラグalf_region_pred_lumaを0に設定し、それ以外(j = 0の場合)には、予測方向選択フラグalf_region_pred_lumaを1に設定する。そして、alf_region_pred _lumaが0である場合には、AlfRegionFilterCoeff[i][j][k]のフィルタ係数の予測値として、AlfRegionFilterCoeff[i1][j-1][k]を用い、alf_region_pred _lumaが1である場合には、AlfRegionFilterCoeff[i][j][k]のフィルタ係数の予測値として、AlfRegionFilterCoeff[i-1][j][k]を用いて、予測値と差分値との差分(もしくは和)により、フィルタ係数群AlfRegionFilterCoeff[i][j][k]を復号する。
 また、予測方向選択フラグalf_region_pred_lumaを、alf_region_pred_lumaが0である場合には、予測を行わず、1である場合には予測を行うことを示すフラグとして用いてもよい。この場合、alf_region_pred_lumaが0である場合には、AlfRegionFilterCoeff[i][j][k]=alf_coeff_luna[i][j][k]により求め、それ以外の場合には、AlfRegionFilterCoeff[i][j][k]のフィルタ係数の予測値として、AlfRegionFilterCoeff[i-1][j][k]を用いる。
 <構成例1の変形例>
 続いて、本構成例の変形例について説明する。
 図27、図28は、本変形例における特性値領域の分割を示す模式図である。図27及び図28に示すように、本変形例では、特性値Yが0である場合に、特性値Xに関する分割を行わない。このような構成は、特性値Yを活性度、特性値Xを角度(方向性)ととった場合に好適な構成である。これは、活性度(特性値Y)が低い場合には、角度(特性値X)で分割する意味は小さいことから、活性度が0における角度による分割は必ずしも必要ではないからである。そこで、本変形例のように、特性値Y=活性度、特性値X=角度の場合では、特性値Yの値に応じて特性値Xの分割を制限することが適当である。
 図27は、本変形例において、alf_feature_modeが0もしくは1である場合の特性値領域の分割を示す模式図である。特性値Xに関して6段階、特性値Yに関して3段階の分割が可能であり、最大16個の部分領域に分割される。AlfMaxFirstSplit=3、AlfMaxSecondSplit=5とする。
 ・alf_first_split_typeが0である場合には、空間の分割は行われない。
 ・alf_first_split_typeが1である場合には、特性値Yが0である場合と0以外である場合に分割を行う。
 ・alf_first_split_typeが2である場合には、特性値Yが0である場合と0以外である場合に分割を行った上で、0以外の領域はさらに特性値Xの方向の部分領域が2つに分割される。
 ・alf_first_split_typeが3である場合には、特性値Yが0である場合と0以外である場合に分割を行った上で、0以外の領域はさらに特性値Xの方向の部分領域が3つに分割される。
 図28は、alf_feature_modeが2もしくは3である場合の特性値領域の分割を示す模式図である。特性値Xに関して5段階、特性値Yに関して4段階の分割が可能であり、最大17個の部分領域に分割される。AlfMaxFirstSplit=4、AlfMaxSecondSplit=4とする。
 ・alf_first_split_typeが0である場合には、空間の分割は行われない。
 ・alf_first_split_typeが1である場合には、特性値Yが0である場合と0以外である場合に分割を行う。
 ・alf_first_split_typeが2である場合には、特性値Yが0である場合と0以外である場合に分割を行った上で、0以外の領域はさらに特性値Xの方向の部分領域が2つに分割される。
 ・alf_first_split_typeが3である場合には、特性値Yが0である場合と0以外である場合に分割を行った上で、0以外の領域はさらに特性値Xの方向の部分領域が4つに分割される。
 図29は、本変形例に係るフィルタパラメータFPのシンタックステーブルを示す。図29に示すように、本変形例では、動画像復号装置5は、常にalf_coeff_set_luma(0, 0)の復号を行う。次に、ループインデックスiについて0からAlfMaxFirstSplit-1のループを処理する。各ループインデックスiについて、AlfMaxFirstSplit、alf_first_split_type、ループインデックスiで定められるマージ指定フラグを参照する。
 マージ指定フラグの値がマージでないことを指定する0である場合、alf_filter_patternを復号する。ループインデックスjについて2からAlfMaxSecondSplit-1のループを処理する。ループ内では個々のjについてalf_filter_patternを復号する。
 alf_filter_patternが1である場合には、動画像復号装置5は、上述のalf_coeff_set_luma(i, j)で示されるように、符号化データ#5から分割単位(i、j)についてのフィルタ係数群を復号する。
 一方で、alf_filter_patternが0である場合には、動画像復号装置5は、符号化データ#5からフィルタ係数群を復号することはなく、alf_coeff_copy_luma(i, j, i, j-1)で示される処理を行う。
 マージ指定フラグの値が1、すなわち、特徴値X=iの部分領域が初期分割においてマージされていることを示す場合には、ループインデックスjについて1からAlfMaxSecondSplit-1のループを処理する。ループ内ではalf_coeff_copy_luma(i, j, i-1,j)のように、一つ小さい特性値Xの部分領域(i-1、j)をフィルタ係数群を部分領域(i、j)のフィルタ係数群にコピーすることにより、初期分割においてマージされている部分領域全てに対して同じフィルタ係数群をコピーする。
 なお、alf_coeff_lumaは予測値との差分値であっても良い。差分値である場合には、図40に示す方法により、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを算出する。
 動画像復号装置5は、以上の処理によって、特性値X、特性値Yに対応するフィルタ係数群AlfRegionFilterCoeff[X][Y][k]を符号化データ#5から復号する。
 <構成例2>
 続いて、フィルタパラメータFPの第2の構成例について説明する。本構成例では、特性値として、対象単位領域の画像(フレーム)内座標が用いられる。
 図30は、本構成例に係るフィルタパラメータFP(図30においてalf_param()と表記)に含まれる各シンタックスを示すシンタックステーブルである。図30に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_feature_mode2、alf_horiz_split_num_minus1、alf_vert_split_num_minus1、alf_first_split_type、及び、alf_filter_pattern[j]が含まれている。
 alf_feature_mode2は、特性値X及びYを指定するシンタックスである。
 alf_horiz_split_num_minus1は、水平方向の分割数NHを指定するシンタックスであり、alf_vert_split_num_minus1は、垂直方向の分割数NVを指定するシンタックスである。水平方向の分割数NH及び垂直方向の分割数NVは、
 NH = alf_horiz_split_num_minus1+1
 NV = alf_vert_split_num_minus1+1
によって定まる。
 (分割数の符号化)
 本構成例では、画像(フレーム)を水平方向にNH個に分割し、垂直方向にNV個に分割する。動画像復号装置5は、alf_horiz_split_num_minus1より水平方向の分割数NHを復号し、alf_vert_split_num_minus1より垂直方向の分割数HVを復号する。また、動画像復号装置5は、NH及びNVを、NH= alf_horiz_split_num_minus1+1、NV=alf_vert_split_num_minus1+1によって求める。
 画像(フレーム)の幅と高さがwidth, heightである場合には、分割領域の幅RWと高さRHは、NW、NHと、LCU サイズより、以下の式により求められる。
 RW = INT(width / NH / LCU_WIDTH) * LCU_WIDTH
 RH = INT(height / NV / LCU_HEIGHT) * LCU_ HEIGHT
なお、LCU_WIDTHと、LCU_HIGHTは、LCUの幅と高さであり、上記式により、RWとRHはLCUサイズの定数倍となる。
 (初期分割)
 構成例1と同様に、特性値Xに応じて初期分割が行われ、特性値Yに応じて再分割が行われる。
 図31は、alf_feature_mode2が0である場合の分割の模式図である。特性値X、特性値Yは以下を用いる。
 X = y座標 / RH (NV段階)
 Y = x座標 / RW (NH段階)
 初期分割数の最大数は、AlfMaxFirstSplit=NVであり、再分割数の最大数は、AlfMaxSecondSplit=NHである。
 alf_first_split_typeが0である場合には、垂直方向の部分領域がマージされており、空間の分割は行われない。
 alf_first_split_typeが1である場合には、垂直方向の部分領域が2つに分割される。
 alf_first_split_typeが2である場合には、垂直方向の部分領域がNV個の領域に分割される。
 続いて、初期分割によって得られた各部分領域は、水平方向に、最大でNH個の領域の領域に再分割される。
 図32は、alf_feature_mode2が1である場合の分割の模式図である。特性値X、特性値Yは以下を用いる。
 X = x座標 / RW (NH段階)
 Y = y座標 / RH (NV段階)
 alf_feature_mode2=1では、x座標に応じて初期分割が行われ、y座標に応じて再分割が行われる。初期分割数の最大数は、AlfMaxFirstSplit=NHであり、再分割数の最大数は、AlfMaxSecondSplit=NVである。
 alf_first_split_typeが0である場合には、水平方向の部分領域がマージされており、空間の分割は行われない。
 alf_first_split_typeが1である場合には、水平方向の部分領域が2つに分割される。
 alf_first_split_typeが2である場合には、水平方向の部分領域がNH個の領域に分割される。
 続いて、個々の初期分割領域は、垂直方向に、最大でNH個の領域の領域に再分割される。
 分割数の符号化および分割方法以外は、構成例1と同じであるので、説明を省略する。
 <構成例3>
 続いて、フィルタパラメータFPの第3の構成例について説明する。本構成例では、特性値として、対象単位領域の画像(フレーム)内座標の関数が用いられる。
 図33は、本構成例に係るフィルタパラメータFPのシンタックスである。図33に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_feature_mode3、alf_first_split_type、及び、alf_filter_pattern[j]が含まれている。
 alf_feature_mode3は、特性値算出モードを示しており、0, 1の値をとる。
 構成例1、構成例2では、x座標とy座標から構成される2次元空間、もしくは、活性度ActIdxと角度DirIdxなどから構成される2次元空間である特性値領域を分割する例を説明した。これら、x座標とy座標、もしくは、活性度Actと角度Dirなどを原特性値と呼び(x、y)で表現する。
 構成例1、構成例2では、特性値(X、Y)上での特性値X軸、もしくは特性値Y軸での分割/マージは、原特性値でのx軸、y軸でのマージに対応していた。すなわち、原特性値から構成される2次元空間を原特性値空間、特性値(X、Y)から構成される2次元空間を特性値空間と呼ぶと、両空間の分割は同じ構成をしている。
 本構成例は、構成例1、構成例2と以下の点で異なる。
 (相違点1)
 原特性値(x、y)から特性値(X、Y)を求める方法が、alf_first_split_typeにより変化する。
 (相違点2)
 構成例1、2では、特性値X、特性値Yの各々は、原特性値xもしくは原特性値yの1つから算出されていた。それに対して本構成例では、特性値X、特性値Yは、2次元の原特性値(x、y)の関数として算出する。すなわちX=f(x、y)、Y=g(x、y)、f、gは所定の関数、により算出を行う。相違点1を考慮すれば、これらの関数は、
 X=f(x、y、alf_first_split_type)
 Y=g(x、y、alf_first_split_type)と表現することもできる。
 (相違点3)
 構成例1、構成例2では、特性値X、Yの各々は、原特性値の各々x、yと1:1対応をしていたが、本構成例では、原特性値の(x、y)と特性値の(X、Y)はM:N(但しM<N)対応とすることができる。
 (相違点4)
 構成例1、構成例2では、最大分割数AlfMaxFirstSplit、AlfMaxSecondSplit分のフィルタ係数群の復号を行った上で、マージが行われる場合には、符号化データからのフィルタ係数群の復号は行わず、既に復号したフィルタ係数群の復号時にコピーを行っていた。
 それに対して本構成例では、特性値(X、Y)算出関数におけるマージが可能であるため、AlfNumFirstSplit、AlfNumSecondSplitで定まる数のフィルタ係数を復号及び格納すればよい。なお、特性値算出のマージは、特性値X、特性値Yについても可能であるが、再分割を行う特性Yについては、既に復号したフィルタ係数群の復号時コピーによるマージも行われる。
 上述のように、alf_feature_mode3は、特性値算出モードを示しており、0, 1の値をとる。
 alf_feature_mode3が0である場合には、原特性値(x, y)は以下を用いる。
 x = DirIdx(4段階)
 y = ActIdx(4段階)
 ここで、DirIdxは、
 DirIdx = 1 (ACT_H > 2*ACT_Vの場合)
     = 2 (ACT_V > 2*ACT_Hの場合)
     = 0 (それ以外の場合)
または、
 DirIdx = 1 (ACT_D0 > 2*ACT_D1の場合)
     = 2 (ACT_D1 > 2*ACT_D0の場合)
     = 0 (それ以外の場合)
によって定めればよい。
 一方で、alf_feature_mode3が1である場合には、原特性値(x, y)は以下を用いる。
 x = x座標 / RH (4段階)
 y = y座標 / RW (4段階)
 (初期分割)
 図34は、本構成例における分割を示す模式図である。
 alf_first_split_type=0の場合には、AlfNumFirstSplit=1かつAlfNumSecondSplit=1であり、特性値X、特性値Yの双方が0であるフィルタ係数群alf_coeff_luma[0][0]、AlfRegionFilterCoeff[0][0]を復号する。
 alf_first_split_type=1の場合には、AlfNumFirstSplit=2かつAlfNumSecondSplit=8であり、以下の式
 X = y/(RY*2) 
 Y = tbl_type1[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 ここで、テーブルtbl_type1[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type1[]={0, 3, 4, 7, 1, 2, 5, 6}
 動画像復号装置の備えるフィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0~3、Y=0~3が復号される。
 alf_first_split_type=1の場合には、初期分割において、原特性空間において垂直方向に2つの領域に分割し、初期分割で得られる部分領域を、1次元分割によって分割する。
 ここで1次元分割とは「対象部分領域[j]に対して、該対象部分領域に関連付けられた割り付け指定情報(alf_filter_pattern[j])に従って、処理順で該対象部分領域の直前の部分領域[j-1]に割り付けられたフィルタ係数、または、該直前の部分領域に割り付けられたフィルタ係数とは異なるフィルタ係数を割り付ける」ような分割を示す。
 テーブルtbl_type1[k]で定められる再分割のインデックスは、原特性空間で隣接領域(分割単位)のインデックスの値の差が1であるように定められている。原特性空間での近傍領域同士が近い値をもつようにするために、原特性空間で一筆書きの順でインデックスを割り振ると良い。このように、特性値Yの算出方法を、原特性値(x、y)の関数とすることにより、1次元的な特性値Yにおいて、原特性空間(x、y)での2次元的な隣接関係をある程度表現することができる。
 alf_first_split_type=2の場合には、AlfNumFirstSplit=4かつAlfNumSecondSplit=4であり、
 X = tbl_type2 [(x/(RX*2))+ (y/(RY*2))*2] 
 Y = tbl_type2 [(x%RW)+ (y%RH)*2] 
により、特性値を求める。
ここで、テーブルtbl_type2[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Xもしくは特性値Yを求めるための関数であり、以下の値を持つ。
 tbl_type2[]={0, 1, 3, 2}
 続いて、フィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0~3、Y=0~3が復号される。
 alf_first_split_type=2の場合には、初期分割では原特性空間を田の字型に分割し、初期分割で得られる部分領域を、さらに再分割において分割する。このように、特性値Xの算出方法を、原特性値(x、y)の関数とすることにより、1次元的な特性値Xにおいて、原特性空間(x、y)での2次元的な隣接関係を表現した初期分割を行うことができる。
 alf_first_split_type=3の場合には、AlfNumFirstSplit=3かつAlfNumSecondSplit=3であり、
 X = tbl_type3[y/RH]
 Y = tbl_type3[x/RW]
により、特性値を求める。
 ここで、テーブルtbl_type3[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Xもしくは特性値Yを求めるための関数であり、以下の値を持つ。
 tbl_type3[]={0, 1, 1, 2}
 続いて、フィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0~2、Y=0~2が復号される。
 alf_first_split_type=3の場合には、原特性値(x, y)の分割数よりも少ない数の分割数である特性値(X, Y)にまとめるテーブルtbl_type3[]を用いることにより、画面の中央部分をマージすることができる。
 なお、
 AlfNumFirstSplit=4
 AlfNumSecondSplit=4
 特性値X= y/RH 
 特性値Y= x/RW 
とすれば、構成例2のalf_first_split_type=2と同じ分割方法を実現することが可能である。すなわち、構成例3においても、構成例2で実現可能な手法と同じ手法を実現することができる。
(構成例3の別の構成例)
 図42は、構成例3の別の構成例における分割を示す模式図である。構成例3の別の構成例では、構成例3と同じく図33に示すフィルタパラメータFPのシンタックスを用いる。
 alf_first_split_type=3の場合には、AlfNumFirstSplit=3かつAlfNumSecondSplit=3であり、
 X = tbl_type3[y/RH]
 Y = tbl_type3[x/RW]
により、特性値を求める。
 alf_first_split_type=0の場合には、AlfNumFirstSplit=1かつAlfNumSecondSplit=1であり、特性値X、特性値Yの双方が0であるフィルタ係数群alf_coeff_luma[0][0]、AlfRegionFilterCoeff[0][0]を復号する。
 alf_first_split_type=1の場合には、AlfNumFirstSplit=2かつAlfNumSecondSplit=8であり、以下の式
 X = y/(RY*2) 
 Y = tbl_type1[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 ここで、テーブルtbl_type1[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type1[]={0, 3, 4, 7, 1, 2, 5, 6}
 動画像復号装置の備えるフィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0~1、Y=0~7が復号される。
 alf_first_split_type=2の場合には、AlfNumFirstSplit=2かつAlfNumSecondSplit=8であり、以下の式
 X = x/(RW*2) 
 Y = tbl_type1b[(x%RW)+ (y%RH)*2] 
により、特性値を求める。
 ここで、テーブルtbl_type1b[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type1b[]={0, 1, 3, 2, 4, 5, 7, 6}
 動画像復号装置の備えるフィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0~1、Y=0~7が復号される。
 alf_first_split_type=3の場合には、AlfNumFirstSplit=2かつAlfNumSecondSplit=8であり、以下の式
 X = {(y + RY) /(RY*2)} % 2
 Y = tbl_type1[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 動画像復号装置の備えるフィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0~1、Y=0~7が復号される。
 また、さらにalf_first_split_type=4の場合を備えていても良い。alf_first_split_type=4の場合には、alf_first_split_type=4の場合には、AlfNumFirstSplit=1かつAlfNumSecondSplit=16であり、以下のように原特性値(x, y)を求めた後、特性値(X, Y)を求める。
 alf_feature_mode3が0である場合には、原特性値(x, y)は以下を用いる。
 x = 0
 y = ActIdx(16段階)
なお、16段階のActIdxは、ActIdx = max3(0, 15, ACT / (M*N*16))により求める。ここで、max3(x, y, z)はzをx以上、y以下にクリップする関数である。
 alf_feature_mode3が1である場合には、原特性値(x, y)は以下を用いる。
 x = 0
 y = y座標 / RH (16段階)
 このように求めた原特性値を用いて、以下の式
 X = 0
 Y = y
により特性値を求める。
 動画像復号装置の備えるフィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0、Y=0~15が復号される。
 alf_first_split_type=4の場合のように、2次元である原特性値のうち、1次元のみを用いるモードを備えても良い。特徴空間分割では1次元の分割で用いる特性値として活性度が好ましく、座標空間分割ではy座標が好ましい。
 以上の構成例3では、特性値算出方法をalf_first_split_type依存とすることにより、構成例1、構成例2と同様に、特性値Xの軸において初期分割を行い、特性値Yの軸において1次元分割を行うという単純な分割方法を保ったまま、原特性値空間において自由度の高い分割ができる。具体的には、原特性値空間での初期分割の自由度をあげることができ、さらに、1次元分割におけるスキャン順の自由度をあげることができる。
 すなわち、2次元的な原特性値(x、y)から、2次元的な特性値(X、Y)を求め、その関係を初期分割alf_first_split_type依存とすることにより、特性値Y、特性値Xの順に1次元的に復号するような簡便なフィルタ係数復号処理によって、田の字分割に代表されるような原特徴空間上での自由度の高い初期分割を行うことができる。また、1次元分割において、原特徴空間上の近傍関係をある程度保存した一筆書き状のスキャン順を実現することができる。また、原特性値(x、y)から特性値(X、Y)を算出する関数をN対M(但しN<M)対応の関数とすれば、容易に原特性値中の領域のマージが可能である。また、これらは原特性値が、活性度や角度など復号画像から算出した値だけでなく、座標から算出した場合にも、フィルタ係数復号処理を変更することなく、同様に適用することができる。
 <構成例4>
 続いて、フィルタパラメータFPの第4の構成例について説明する。本構成例は、初期分割は行わず、分割方法のみを符号化する方法である。図43は、本構成例に係るフィルタパラメータFPのシンタックスである。図43に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_feature_mode、alf_merge_type、及び、alf_filter_pattern[j]が含まれている。図44は、本構成例における分割を示す模式図である。またAlfNumSplit=16とする。フィルタ係数復号部ではalf_merge_typeを復号する。alf_merge_typeは、構成例3におけるalf_first_split_typeに相当する。構成例3ではalf_first_split_typeは初期分割と再分割の両者に影響を与えるシンタックスであったが、構成例4では初期分割を行わないため、後者の分割(構成例3の再分割に相当)のみに影響を与えるシンタックスである。
 alf_merge_type=0の場合には、以下の式
 X = 0
 Y = tbl_type40[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 ここで、テーブルtbl_type40[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type40[]={0, 1, 2, 3, 7, 6, 5, 4, 8, 9, 10, 11, 15, 14, 13, 12}
 続いて、フィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0、Y=0~15が復号される。
 alf_merge_type=1の場合には、以下の式
 X = 0
 Y = tbl_type41[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 ここで、テーブルtbl_type41[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type41[]={0, 1, 2, 3, 15, 10, 9, 4, 14, 11, 8, 5, 13, 12, 7, 6}
 続いて、フィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0、Y=0~15が復号される。
 alf_merge_type=2の場合には、以下の式
 X = 0
 Y = tbl_type42[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 ここで、テーブルtbl_type42[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type42[]={0, 15, 14, 13, 1, 2, 11, 12, 4, 3, 10, 9, 5, 6, 7, 8}
 続いて、フィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0、Y=0~15が復号される。
 alf_merge_type=3の場合には、以下の式
 X = 0
 Y = tbl_type43[(x%RW)+ (y%RH)*4] 
により、特性値を求める。
 ここで、テーブルtbl_type43[k]は、原特性空間でのラスタ順に定められたアドレスkから特性値Yを求める関数であり、以下の値をもつ。
 tbl_type43[]={0, 1, 4, 5, 15, 2, 3, 6, 14, 11, 10, 7, 13, 12, 9, 8}
により、特性値を求める。
 続いて、フィルタ係数復号部では、AlfRegionFilterCoeff[X][Y]、X=0、Y=0~15が復号される。
 以上の構成においては、分割方法を定めるalf_merge_typeによって、原特性値から特性値を算出する関数を変更する。初期分割を行わない場合においても、原特性値空間において様々な方向へのマージを可能とする分割を行うことができる。また、構成例4は、特性値X軸への分割を行わず(特性値Xは常に0)、特性値Y軸による分割を行う構成において、原特性値(x,y)から特性値Yへの関数を複数備えることによって、原特性値における2次元空間の特徴を活かしたマージを行う。また、この例では、alf_merge_typeによらず特性値Yは16段階としているが、alf_merge_typeに応じて特性値Yの段階数(=AlfNumSplitの数)を変更する構成としても良い。
 <構成例5>
 続いて、フィルタパラメータFPの第5の構成例について説明する。本構成例では、座標空間分割及び特徴空間分割が行なわれる。
 図35は、本構成例に係るフィルタパラメータFPのシンタックスである。図35に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_block_mode_flag、alf_feature_mode、alf_feature_mode2、alf_first_split_num_minus1、及び、alf_filter_pattern[j]が含まれている。
 alf_block_mode_flagは、特徴空間分割を行なうのか、座標空間分割を行なうのかを指定するシンタックスである。
 alf_block_mode_flag=0である場合には、特徴空間分割であるので、alf_feature_modeを復号する。その後、上述した構成例1に従って処理を行う。
 alf_block_mode_flag=1である場合には、座標空間分割であるので、alf_feature_mode2を復号する。その後、構成例2に従って処理を行う。
 なお、ここではalf_horiz_split_num_minus1、alf_vert_split_num_minus1を復号せず、NH=NV=4であるものとしたが、上述の構成例のように、最大分割数を明示的に符号化してもかまわない。
 本実施形態に示すように、符号化データ中のシンタックスalf_block_mode_flagを用いて、原特性空間のタイプ、この例では、特徴空間分割を行うのか、座標空間分割を行うのかを識別し、さらに、原特徴空間のタイプが区別された上で、さらに原特性空間のタイプ別に定まる、符号化データ中のシンタックス(alf_feature_modeもしくはalf_feature_mode2)を用いて最終的な特性値の算出方法を定めても良い。
 <構成例6>
 図38は、本構成例に係るフィルタパラメータFPを復号する際の特性値領域の分割の態様を示す図である。本構成例においては、特性値領域は、初期分割及び再分割の双方において四分木分割される。
 (動画像復号装置5)
 本実施形態に係る動画像復号装置5は、実施形態1に係る動画像復号装置1の備える適応フィルタ50に代えて、適応フィルタ90を備えている。本実施形態に係る動画像復号装置5のその他の構成は、実施形態1に係る動画像復号装置1の構成と同様であるので、説明を省略する。
 (適応フィルタ90)
 図36は、適応フィルタ90の構成を示すブロック図である。図36に示すように、適応フィルタ90は、適応フィルタ情報復号部91及び適応フィルタ部92を備えている。
 適応フィルタ情報復号部91は、図36に示すように、領域別タップ数復号部911、領域構造復号部912、特徴量モード復号部913、フィルタ係数復号部914、特性別フィルタ係数格納部915を備えている。
 領域別タップ数復号部911は、フィルタパラメータFPに含まれるシンタックスalf_length_luma_minus5_div2[i](0≦i<AlfNumFirstSplit)を復号する。復号されたシンタックスalf_length_luma_minus5_div2[i]は、特性値部分領域CPR[i]に割り付けられると共に、フィルタ係数復号部914に供給される。
 領域構造復号部912は、フィルタパラメータFPに含まれるシンタックスalf_first_split_type及びalf_filter_pattern[j]を復号する。復号されたシンタックスalf_first_split_type及びalf_filter_pattern[j]は、フィルタ係数復号部914に供給される。また、適応フィルタ90が、本実施形態の<構成例2>で示したフィルタパラメータFPを復号する場合には、復号されたシンタックスalf_first_split_typeは、それぞれ、第1特性値算出部921及び第2特性値算出部922に供給される(矢印不図示)。
 特徴量モード復号部913は、シンタックスalf_feature_modeを復号する。復号されたシンタックスalf_feature_modeは、フィルタ係数復号部914に供給される。
 フィルタ係数復号部914は、alf_length_luma_minus5_div2[i]、alf_filter_pattern[j]、及びalf_first_split_typeを参照して、シンタックスalf_coeff_luma[i][j][k]を復号する。また、フィルタ係数復号部914は、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを、以下の式を用いて算出する。
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[i][j-1][k] + alf_coeff_luma[i][j][k] (j=0以外の場合)
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma[i][0][k] (j=0の場合)
上記の式から明らかなように、フィルタ係数復号部914は、分割単位DU[i][j-1]について復号済みのフィルタ係数群AlfRegionFilterCoeff[i][j-1][k]を予測値に設定し、当該予測値に対して、alf_coeff_luma[i][j][k]を加算(又は減算(上式の符号を反転させたものに対応))することによって、分割単位DU[i][j]についてのフィルタ係数群AlfRegionFilterCoeff[i][j][k]を復号する。
 特性別フィルタ係数格納部915には、フィルタ係数復号部914によって復号されたフィルタ係数群RegionFilterLuma[i][j][k]が格納される。
 一方で、適応フィルタ部92は、図36に示すように、第1特性値算出部921、第2特性値算出部922、フィルタ係数割り付け部923、及びフィルタ部924を備えている。
 第1特性値算出部921及び第2特性値算出部922は、それぞれ、対象単位領域についての特性値X及び特性値Yを算出する。算出された特性値X及びYは、フィルタ係数割り付け部923に供給される。特性値X及び特性値Yの算出方法については、フィルタパラメータFPの構成例において説明を行なったので、ここでは説明を省略する。
 フィルタ係数割り付け部923は、対象単位領域に割り付けられた特性値領域内インデックス(i、j)に対応するフィルタ係数RegionFilterLuma[i][j]を、特性別フィルタ係数格納部915から読み出し、読み出したフィルタ係数RegionFilterLuma[i][j]を、当該対象単位領域に割り付ける。対象単位領域に割り付けられたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部924に供給される。
 フィルタ部924は、対象単位領域に対して、フィルタ係数RegionFilterLuma[i][j]を用いたフィルタ処理を施すことによって、該対象単位領域におけるフィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。フィルタ部924による具体的な処理は、実施形態1におけるフィルタ部525と同様であるためここでは説明を省略する。
 (動画像符号化装置6)
 以下では、符号化対象画像を符号化することによって符号化データ#5を生成する動画像符号化装置6について、図37を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置6は、実施形態1に係る動画像符号化装置2の備える適応フィルタ60に代えて、適応フィルタ100を備えている。本実施形態に係る動画像符号化装置6のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 適応フィルタ100は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ100は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFPとして可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFPを符号化データ#5の一部として符号化する。
 図37は、適応フィルタ100の構成を示すブロック図である。図37に示すように、適応フィルタ100は、適応フィルタ情報設定部101、および、適応フィルタ部102を備えている。
 適応フィルタ情報設定部101は、図37に示すように、領域別タップ数設定部1011、領域構造設定部1012、特徴量モード設定部1013、フィルタ係数残差生成部1014、特性別フィルタ係数格納部1015、及び、フィルタパラメータ生成部1016を備えている。
 領域別タップ数設定部1011は、初期分割によって得られた特性値部分領域CPR[i]についてのタップ数を指定するためのシンタックスalf_length_luma_minus5_div2[i]を設定する。設定されたシンタックスalf_length_luma_minus5_div2[i]は、フィルタパラメータ生成部1016に供給される。
 領域構造設定部1012は、alf_first_split_type及びalf_filter_pattern[j]を設定する。設定されたシンタックスalf_first_split_type及びalf_filter_pattern[j]は、フィルタ係数残差生成部1014に供給される。また、適応フィルタ100が、本実施形態の<構成例2>で示したフィルタパラメータFPを生成する場合には、設定されたシンタックスalf_first_split_typeは、それぞれ、第1特性値算出部921及び第2特性値算出部922に供給される(矢印不図示)。
 特徴量モード設定部1013は、シンタックスalf_feature_modeを設定する。設定されたシンタックスalf_feature_modeは、フィルタパラメータ生成部1016に供給される。
 なお、alf_length_luma_minus5_div2[i]、alf_first_split_type、及び、alf_filter_pattern[j]、は、符号化効率がより向上するように設定される。
 フィルタ係数残差生成部1014は、以下の式によってシンタックスalf_coeff_luma[i][j][k]を生成する。
 alf_coeff_luma[i][j][k] = AlfRegionFilterCoeff[i][j-1][k] - AlfRegionFilterCoeff[i][j][k] (j=0以外の場合)
 alf_coeff_luma[i][0][k] = AlfRegionFilterCoeff[i][j][k] (j=0の場合)
 生成されたフィルタ係数残差alf_coeff_luma[i][j][k]はフィルタパラメータ生成部1016に供給される。
 特性別フィルタ係数格納部1015には、後述するフィルタ係数導出部1023から供給されるフィルタ係数群AlfRegionFilterCoeff[i][j][k]が格納される。
 フィルタパラメータ生成部1016は、シンタックスalf_length_luma_minus5_div2[i0]、alf_filter_pattern[j]、alf_first_split_type、および、alf_coeff_luma[i][j][k]からフィルタパラメータFPを生成する。生成されたフィルタパラメータFPは、可変長符号符号化部22に供給される。
 一方で、適応フィルタ部102は、第1特性値算出部921、第2特性値算出部922、フィルタ係数導出部923、及び、フィルタ部924を備えている。
 フィルタ係数導出部1023は、対象単位領域におけるフィルタ済復号画像P_FLと符号化対象画像との誤差がより小さくなるようなフィルタ係数RegionFilterLuma[i][j]を導出する。導出されたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部924に供給されると共に、特性別フィルタ係数格納部1015に格納される。
 フィルタ係数導出部1023によるフィルタ係数群RegionFilterLuma[i][j]の導出処理は、実施形態1におけるフィルタ係数導出部624と同様であるので、ここでは説明を省略する。
 〔実施形態4〕
 以下では、本発明の第4の実施形態について図45~図68を参照して説明する。
 本実施形態に係る適応フィルタは、実施形態1~3と同様に、フィルタ前画像(例えば、デブロック済復号画像P_DB)を構成する各単位領域について、互いに導出方法の異なる2つの特性値を導出し、導出された2つの特性値に応じて、各単位領域を1または複数のグループの何れかに分類する。また、本実施形態に係る適応フィルタは、単位領域毎に定められたフィルタ係数を用いて、フィルタ前画像に対して単位領域毎に作用する。
 ここで単位領域とは、後述するDCT変換(より一般には周波数変換)の単位であるブロックであってもよいし、後述する予測画像を生成する単位であるパーティションであってもよいし、ブロックまたはパーティションの何れでもなく、本実施形態に係る適応フィルタによってサイズおよび位置が設定された領域であってもよい。また、単位領域は、1画素から構成されるものであってもよい。
 また、実施形態1~3と同様に、各グループは、2つの特性値によって張られる2次元領域上に設定される各部分領域と1対1の対応を有する。したがって、上記2次元領域をどのように各部分領域へ分割するのかを指定することにより、1または複数のグループをどのように設定するかが定まることになる。また、導出された2つの特性値のうち、一方を第1の特性値Xと呼び、もう一方の特性値を第2の特性値Yと呼ぶ。なお、実施形態1~3と同様に、上記2つの特性値によって張られる2次元領域を特性値領域とも呼称し、特性値領域上に設定される各部分領域を特性値部分領域とも呼称する。
 本実施形態においては、第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:画像の活性度、第2の特性値Y:画像の方向性
 ・第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:単位領域のx座標、第2の特性値Y:単位領域のy座標
なお、特性空間分割の場合には、特性値Xに対して5段階、特性値Yに対して3段階に分割する。座標空間分割の場合には、特性値Xに対して4段階、特性値Yに対して4段階に分割する。
 本実施形態では、部分領域をマージすることによって、フィルタ係数群の符号量と、領域分割の自由度を調整するような、動画像復号装置を実現する。図47~図51は、部分領域のマージ例を示す図である。
 図47は、座標空間分割の一例である。図の太線で囲まれた領域がマージによって生成される部分領域であるとする。図では、各部分領域を順にラスタスキャンで処理(スキャン)する場合において、左に隣接する部分領域(特性値Xが等しい部分領域)とマージする場合には左向きの矢印、上に隣接する部分領域(特性値Yが等しい部分領域)とマージする場合には上向きの矢印を示している。また図中の番号は、各部分領域に割り当てられたフィルタ係数インデックスであり、各部分領域を順にラスタスキャンでスキャンする場合において、新しいフィルタ係数群が割り当てられる部分領域において図示されている。図47(b)は、トップレベルから順にクアッドツリー(4分木)により分割する場合を想定している。図47(b)に示すように、各部分領域に対してラスタ順にマージするか否かを符号化/復号し、さらにマージする場合には、左に隣接する部分領域とのマージと右に隣接する部分領域とのマージを区別するフラグを符号化/復号する装置は、クアッドツリーで表現できる部分領域を取り扱うことが可能である。この例は、候補導出処理における例1において装置および方法を説明する。
 図48は、特徴空間分割の一例である。この例も、各部分領域に対してラスタ順にマージするか否かを符号化/復号し、さらにマージする場合には、左とのマージと右とのマージを区別するフラグを符号化/復号する装置で表現可能である。
 図49は、座標空間分割の別の例である。図49の例では、一般のスライス分割と同様である。ラスタスキャン順に各部分領域を処理する場合において、直前に処理した部分領域とマージすることが可能であるという条件で、分割を表現する場合を想定している。この分割方法は、候補導出処理における例1の装置および方法では、表現することができず、ラスタスキャン順で一番左の列に位置する場合、すなわち左端において、ラスタスキャン順で一つ上の行の右端の領域とマージすることが必要になる。このような装置および方法は、候補導出処理における例2で説明する。
 図50は、座標空間分割のさらに別の例である。図50(g)の図中に示した番号は、部分領域のスキャン順の一例である。1次元的に、直前にスキャンした部分領域とマージが可能であるか否かを符号化することによって、部分領域を定める場合においては、ラスタスキャンではなく図50(g)に示すように、一筆書き状のスキャン方法を用いることが適当である。このような場合の表現を行うためには、図50(a)から(f)に示す、隣接関係の組み合わせが表現できれば良い。ラスタスキャン順に左と上とのマージ選択を行う方法は、図50(a)~図50(e)は表現できるけれども、図50(f)は表現できない。図50(f)の太線の矢印で示すマージを選択肢として用いる方法を、候補導出処理における例3で説明する。候補導出処理における例3の例では一筆書き状のマージが可能である。
 図51は、座標空間分割のさらに別の例である。図51の図中に示した番号は、部分領域のフィルタ係数インデックスである。特に太字で示す番号の部分領域は、ラスタスキャン順に復号する際に新しい係数を復号するブロックに対応し、太字でない番号で示す部分領域は、新しい係数を復号することなく、既に復号された領域とマージを行うブロックである。図47~図50の例では、マージを行う部分領域においては、特性値Xが等しい隣接する部分領域(ラスタスキャン順で左側の部分領域)、特性値Yが等しい隣接する部分領域(ラスタスキャン順で上側の部分領域)、もしくは、スキャン順(処理順)で直前の部分領域、もしくは、特性値Xと特性値Yが1つだけ異なる部分領域(ラスタスキャン順で右上領域)を、マージ対象としていたが、候補選択インデックスがマップ構成の場合には他の部分領域のフィルタ係数群も選択することができる。例えば、図51において、フィルタ係数インデックスが1の領域のように、飛び地の領域を選択することが可能である。このマージ方法は、マップ構成のフィルタパラメータの構成と復号処理、および、候補導出処理の例4で説明する。マップ構成では、クアッドツリー状のマージ、スライス状のマージ、一筆書き状のマージの全てが表現可能である。
 なお、図49~図51の例は座標空間分割に適用しているが、特徴空間分割にも適用可能である。
 (符号化データ#5)
 本実施形態に係る動画像符号化装置6によって生成され、動画像復号装置5によって復号される符号化データ#5のデータ構造は、実施形態1に係る符号化データ#1のデータ構造と略同じであるが、フィルタパラメータFPの構成が異なる。フィルタパラメータFPの構成については、以下の例にて詳述する。なお、フィルタパラメータFPに含まれるシンタックスのうち、実施形態1~3において既に説明したシンタックスについては説明を省略する。
 <フィルタパラメータの基本構成>
 図52は、本実施形態に係るフィルタパラメータFP(図52においてalf_param()と表記)に含まれる各シンタックスを示すシンタックステーブルである。図52に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_feature_mode、alf_num_filters_minus1が含まれている。第4の実施形態では、alf_feature_mode=0が座標空間分割、alf_feature_mode=1が特徴空間分割である。特性値Xの段階数がNX、特性値Yの段階数がNYである。図52に示すように、特性値Xと特性値Yに対してラスタスキャン順にシンタックステーブルalf_coeff_param(i, j)で示す処理を繰り返すことによって、符号化データから、特性値X、特性値Yに対するフィルタ係数AlfRegionFilterCoeff[X][Y][k]を順に復号する。なお、alf_coeff_param(i, j)で示す処理に関しては、マージ構成、予測/マージ構成、マップ構成、1次元マージ構成の4つを説明する。
 <マージ構成のフィルタパラメータの構成と復号処理>
 まず、シンタックステーブルalf_coeff_paramの第1の構成とその復号処理を説明する。
 図53は、フィルタパラメータFP(図52においてalf_coeff_param()と表記)における第1の構成のシンタックスを示すシンタックステーブルである。第1の構成をマージ構成と呼ぶ。図53に示すように、シンタックステーブルには、alf_new_filter、alf_merge_idxが含まれている。
 alf_new_filterは、新規フィルタを復号するか否かを示すシンタックスである。
 alf_merge_idxは、マージ候補が複数個ある場合において、マージ候補から使用するマージ対象を選択する候補選択シンタックスである。
 以下、図53のシンタックステーブルを参照して、復号処理を説明する。
 図53に示すように、新規フィルタ係数フラグを復号する場合、すなわち、残りフィルタ数remainが0以上である場合には、alf_new_filterの復号を行うと共に、残りフィルタ数remainを1だけ減算(デクリメント)する。
 なお、新規フィルタ係数フラグを復号するか否かの判定は、残りフィルタ数remainを用いる方法の他、新規フィルタ係数群を復号する度に1だけ加算するカウンタと、フィルタ係数群の数を比較することによっても行うことができる。後述のフィルタ係数インデックスidxの現在値はカウンタに相当するため、このidxを用いて判定することができる。具体的にはidxがalf_num_filters_minus1よりも小さい場合には、新規フィルタ係数フラグを復号し、小さくない場合には、新規フィルタ係数フラグを復号しない。この判定は、後述の図53、図54、図55、図56に示すシンタックステーブルalf_coeff_paramの第2~第4の構成、図67にも適用することができる。
 新規フィルタ係数を復号する場合、すなわち、alf_new_filterが1である場合もしくは、インデックスi、インデックスjが共に0である場合には、シンタックステーブルalf_coeff_set_luma(i, j, si , sj) で示す処理を行い、フィルタ係数群を符号化データから復号する。alf_coeff_set_lumaの処理は、実施形態3で説明済みであるので説明を省略する。フィルタ係数を復号した時点で、各部分領域に対するフィルタ係数インデックスalf_coeff_luma_id[i][j]を設定する。フィルタ係数インデックスは、各部分領域のフィルタ係数群を識別するためのインデックスであり、同じフィルタ係数群には同じ値のインデックスが割り振られる。復号する度に、idx = idx + 1の式で示すように、インデックスは1だけ加算(インクリメント)する。
 逆に、新規フィルタ係数を復号しない場合、すなわち、alf_new_filterが0であり、かつ、インデックスi、インデックスjが共に0ではない場合には、フィルタ係数群を符号化データから復号せず、既に復号されたフィルタ係数群からコピーすることによって、フィルタ係数群を算出する。この場合、ある部分領域が別の部分領域と同じフィルタ係数を用いることになるため、部分領域同士がマージされている。ここで、マージ候補数NumAlfMergeCand(i, j)が1より大きい場合には、マージ候補識別インデックスalf_merge_idx[i][j]を符号化データから復号する。NumAlfMergeCand(i, j)の処理の詳細は後述する。さらに、マージ候補識別インデックスが復号された後に、DeriveAlfMergeIdx(i, j, si, sj)で、マージ元の部分領域のインデックスsi, sjを算出する。続いて、alf_coeff_copy_luma(i, j, si, sj)の処理を行うことで、マージ元の部分領域si, sjから、復号対象である部分領域i,jのフィルタ係数のコピーを行う。
 なお、新規フィルタを復号するか否かを示すシンタックスalf_new_filterを、マージを行うか否かを示すシンタックスalf_merge_flagに置き換えることができる。新規フィルタを復号する場合は、対象部分領域がマージされないことを意味し、新規フィルタを復号しない場合とは、対象部分領域がマージされることを意味する。よって、alf_new_filterが1である場合もしくは、インデックスi、インデックスjが共に0である場合とは、alf_merge_flagが0である場合、もしくは、インデックスi、インデックスjが共に0である場合に置き換えられる。この場合、シンタックステーブルの
  if (alf_new_filter || (i == 0 && j == 0)) {
の行は
  if (alf_merge_flag == 0 || (i == 0 && j == 0)) {
とする。
 この置き替えは、後述の図53、図54、図55、図56に示すシンタックステーブルalf_coeff_paramの第2~第4の構成、図67にも適用することができる。
 なお、符号化データ中のフィルタ係数群alf_coeff_lumaは、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを予測符号化して得られるものであることが可能である。例えば、alf_coeff_lumaは、隣接するフィルタ係数群間の予測差分(差分値)として符号化することができる。実施形態4では、図65に示すものを用いる。
 図65に示す処理alf_coeff_set_lumaでは、符号化データより、差分値であるフィルタ係数群alf_coeff_luma[X][Y][k]を復号した後、以下の式から、予測値との差分をとることによってフィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを算出する。
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma[i][j][k]; (i=0かつj=0の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[si][sj][k] - alf_coeff_luma[i-1][j][k] (それ以外)
 上記処理を、図63のフローチャートを用いて説明する。ステップS100ではフィルタ係数の数を復号する。さらにフィルタ係数の数-1を、残りフィルタ数remainに設定する。
ループS101は、部分領域の2次元インデックスi、jに関するループで有り、インデックスiに関して0からNY-1、インデックスjに関して0からNX-1に対してS102からS109のステップのループ処理を行う。このループ処理により、部分領域i、jのフィルタ係数群AlfRegionFilterCoeffが復号される。
 ステップS102では、残りフィルタ数remainが0より大きいか否かを判定する。残りフィルタ数remainが0より大きい場合にはステップS103に遷移する。ステップS103では、新規フィルタフラグalf_new_filterを復号する。続く、S104では新規フィルタが存在するか否かの判定を行う。新規フィルタが存在する場合とは、alf_new_filterが1である場合と、最初の部分領域を復号する場合(インデックスi、インデックスjが共に0である場合)であり、この時、S105に遷移する。S105では、フィルタ係数群を符号化データから復号する。続く、S106では、残りフィルタ数remainから1だけ減算(デクリメント)する。新規フィルタが存在しない場合には、ステップS107に遷移する。S107では、マージ候補が1個より大きいか否かを判定する。マージ候補が1個よりも大きい場合にはS108に遷移する。S108では、マージ候補インデックスalf_merge_idxを復号する。続いてステップS109において、部分領域のi、jによって定まる、もしくは、マージ候補インデックスで指定されたマージ元のフィルタ係数群を、部分領域i、jのフィルタ係数群にコピーする。
 なお、新規フィルタを復号するか否かを示すシンタックスalf_new_filterを、マージを行うか否かを示すシンタックスalf_merge_flagに置き換える場合には、以下の置き換えを行う。
・S102において、「新規フィルタを復号する?」を、「マージフラグを復号するか否か?」に置き換える。
・S103において、新規フィルタフラグ復号を、マージフラグ復号に置き換える。
・S104において、「新規フィルタ?」を、「マージフラグが0であるか否か?」に置き換える。
 以上の構成によって、フィルタ係数の数を復号し、新規フィルタフラグの復号を制御することにより、新規フィルタフラグの符号量を抑えることができる。また、フィルタ係数の数をシンタックスによって指定することによって、明示的にフィルタ係数群の数を制限することができる。フィルタ係数群の数を制限すると、復号装置で用いるフィルタ係数バッファの数を抑えることができるため、復号装置の複雑度を低減することができる。これは、後述の図53、図54、図55、図56に示すシンタックステーブルalf_coeff_paramの第2~第4の構成、図67に共通する特徴である。
 特性値の種類が座標空間分割であるか特徴空間分割によらず、特性値Xに対するマージ(左に隣接する部分領域とマージ)、特性値Yに対するマージ(上に隣接する部分領域とマージ)を切り替えることによって、部分領域を高い自由度でマージすることができる。
 <予測/マージ構成のフィルタパラメータの構成と復号処理>
 図54は、フィルタパラメータFP(図52においてalf_coeff_param()と表記)の第2の構成を示す。第2の構成では、第1の構成と異なり、シンタックステーブルにはalf_merge_idxの代わりにalf_pred_merge_idxが含まれている。第2の構成を予測/マージ構成と呼ぶ。
 alf_pred_merge_idxは、予測/マージ候補が複数個ある場合において、予測/マージ候補から使用する予測/マージ対象を選択する候補選択シンタックスである。
 以下、図54のシンタックステーブルを参照して、復号処理を説明する。図54に示すように、残りフィルタ数remainが0以上である場合には、alf_new_filterの復号を行うと共に、残りフィルタ数remainを1だけ減算(デクリメント)する。
 続いて、予測/マージ候補数NumAlfPredMergeCand(i, j)が1より大きい場合には、予測/マージ候補識別インデックスalf_pred_merge_idx[i][j]を符号化データから復号する。NumAlfPredMergeCand(i, j)の処理の詳細は後述する。さらに、予測/マージ候補識別インデックスが復号された後に、DerivePredMergeIdx(i, j, si, sj)で、予測元/マージ元の部分領域のインデックスsi, sjを算出する。
 新規フィルタ係数を復号する場合、すなわち、alf_new_filterが1である場合もしくは、インデックスi、インデックスjが共に0である場合には、シンタックステーブルalf_coeff_set_luma(i, j, si , sj) で示す処理を行い、フィルタ係数群を符号化データから復号する。復号では、DerivePredMergeIdx(i, j, si, sj)で算出された予測元を用いる。フィルタ係数を復号した時点で、各部分領域に対するフィルタ係数インデックスalf_coeff_luma_id[i][j]を設定する。
 逆に、新規フィルタ係数を復号しない場合、すなわち、alf_new_filterが0であり、かつ、インデックスi、インデックスjが共に0ではない場合には、フィルタ係数群を符号化データから復号せず、既に復号されたフィルタ係数群からコピーすることによって、フィルタ係数群を算出する。alf_coeff_copy_luma(i, j, si, sj)の処理を行うことで、マージ元の部分領域si, sjから、復号対象である部分領域i,jのフィルタ係数群のコピーを行う。
 なお、新規フィルタを復号するか否かを示すシンタックスalf_new_filterを、マージを行うか否かを示すシンタックスalf_merge_flagに置き換えることができる。この場合、シンタックステーブルの
  if (alf_new_filter || (i == 0 && j == 0)) {
の行は
  if (alf_merge_flag == 0 || (i == 0 && j == 0)) {
とする。
 上記処理を、図64のフローチャートを用いて説明する。ステップS200ではフィルタ係数の数を復号する。さらにフィルタ係数の数-1を、残りフィルタ数remainに設定する。ループS201は、部分領域の2次元インデックスi、jに関するループで有り、インデックスiに関して0からNY-1、インデックスjに関して0からNX-1に対してS202からS209のステップのループ処理を行う。このループ処理により、部分領域i、jのフィルタ係数群AlfRegionFilterCoeffが復号される。
 ステップS207では、予測/マージ候補が1個より大きいか否かの判定を行い、予測/マージ1個より大きい場合には、S208において、予測/マージ候補インデックスalf_pred_merge_idxを復号する。
 ステップS202では、残りフィルタ数remainが0より大きいか否かを判定する。残りフィルタ数remainが0より大きい場合にはステップS203に遷移する。ステップS203では、新規フィルタフラグalf_new_filterを復号する。続く、S204では新規フィルタが存在するか否かの判定を行う。新規フィルタが存在する場合とは、alf_new_filterが1である場合と、最初の部分領域を復号する場合(インデックスi、インデックスjが共に0である場合)には、S205に遷移する。S205では、フィルタ係数を符号化データから復号する。続くS206では、残りフィルタ数remainから1だけ減算(デクリメント)する。S204の判定において、新規フィルタが存在しない場合には、ステップS209に遷移する。S209では、予測/マージ候補インデックスalf_pred_merge_idxで定まるマージ元のフィルタ係数群を、部分領域i、jのフィルタ係数群にコピーする。
 なお、新規フィルタを復号するか否かを示すシンタックスalf_new_filterを、マージを行うか否かを示すシンタックスalf_merge_flagに置き換える場合には、以下の置き換えを行う。
・S202において、「新規フィルタを復号する?」を、「マージフラグを復号するか否か?」に置き換える。
・S203において、新規フィルタフラグ復号を、マージフラグ復号に置き換える。
・S204において、「新規フィルタ?」を、「マージフラグが0であるか否か?」に置き換える。
 以上の構成によって、特性値X方向および特性値Y方向を選択肢に含む、候補選択インデックスを復号することによって、マージにおいては、部分領域を高い自由度でマージすることができる。予測においても、フィルタ予測残差の符号量が小さくなる予測値となる部分領域を選択することが可能であるため、フィルタ係数の符号量を低減することができる。第1の構成では、フィルタ係数を復号する際に用いる予測元を符号化データから復号することによって、フィルタ係数の符号量を低減する。予測元とマージ元を同一のシンタックスを用いることによって、復号処理を簡略化することができる。
 <マップ構成のフィルタパラメータの構成と復号処理>
 図55は、フィルタパラメータFP(図52においてalf_coeff_param()と表記)の第3の構成を示す。第3の構成をマップ構成と呼ぶ。第3の構成では、シンタックステーブルにはalf_pred_idxとalf_merge_idxが含まれている。
 alf_pred_idxは、予測候補が複数個ある場合において、予測候補から使用する予測対象を選択する候補選択シンタックスである。このシンタックスは、候補導出処理の例1~例3の何れかを使用する。
 alf_merge_idxは、予測候補が複数個ある場合において、マージ候補から、使用するマージ対象を選択する候補選択シンタックスである。このシンタックスは、候補導出処理の例4を使用する。
 以下、図55のシンタックステーブルを参照して、復号処理を説明する。図55に示すように、残りフィルタ数remainが0以上である場合には、alf_new_filterの復号を行うと共に、残りフィルタ数remainを1だけ減算(デクリメント)する。
 フィルタ係数をマージする場合のマージ元として用いるフィルタ係数群、及び、フィルタ係数を復号する場合の予測値として用いるフィルタ係数群は、フィルタ係数インデックスsidxを用いて設定する。ここでは直前に復号したフィルタ係数群インデックスidxを用いる。
 新規フィルタ係数を復号する場合、すなわち、alf_new_filterが1である場合もしくは、インデックスi、インデックスjが共に0である場合には、まず、予測候補インデックスの数NumAlfPredCand(i, j)を求める。予測候補数が1より大きい場合には、候補選択シンタックスalf_pred_idx[i][j]を復号する。
 次にシンタックステーブルalf_coeff_set_luma(i, j, si, sj) で示す処理を行い、フィルタ係数群を符号化データから復号する。復号では、DeriveAlfPredIdx(i, j, si, sj)で算出された予測元を用いる。フィルタ係数を復号した時点で、各部分領域に対するフィルタ係数インデックスalf_coeff_luma_id[i][j]を設定する。
 逆に、新規フィルタ係数を復号しない場合、すなわち、alf_new_filterが0であり、かつ、インデックスi、インデックスjが共に0ではない場合には、フィルタ係数群を符号化データから復号せず、既に復号されたフィルタ係数群からコピーすることによって、フィルタ係数群を算出する。ここでは、まず、マージ候補の数NumAlfMergeCand(i, j)を求める。マージ候補数が1より大きい場合には、候補選択シンタックスalf_merge_idx[i][j]を復号する。続いて、候補選択インデックスの値をsidxとして、alf_coeff_copy_luma(i, j, sidx)の処理を行うことで、フィルタ係数インデックスがsidxであるフィルタ係数群から、復号対象である部分領域i,jのフィルタ係数のコピーを行う。
 なお、候補選択インデックスalf_pred_idxおよびalf_merge_idxの復号においては、予測候補の数NumAlfPredCand(i, j)、マージ候補の数NumAlfMergeCand(i, j)に合わせた復号方法を用いても良い。すなわち、候補数が2個であれば1ビット、3個であれば、値0を1ビット、値1、値2を2ビットで復号する。また、一般に候補数が2^(m-1)より大
きく、2^m以下であれば、mビットを復号するようにしても良い。このような符号化には、例えば、候補数を最大値cMaxとする各種Truncated符号化(例えばTruncated unary符号化)を用いることができる。候補数に応じて符号化方法を切り替える(ビット数を可変とする)ことによって、候補数が少ないほど符号量を小さくすることができる。
 これまで説明した通り、マップ構成においても新規フィルタを復号するか否かを示すシンタックスalf_new_filterを、マージを行うか否かを示すシンタックスalf_merge_flagに置き換えることができる。
 なお、実施形態4のマップ構成では、alf_coeff_set_lumaとalf_coeff_copy_lumaとして図66(a)、(b)に示すものを用いる。
 図66(a)に示す処理alf_coeff_set_lumaでは、符号化データより、差分値であるフィルタ係数群alf_coeff_luma[X][Y][k]を復号した後、以下の式から、予測値との差分をとることによってフィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを算出する。
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma[i][j][k]; (i=0かつj=0の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff2[sidx][k] - alf_coeff_luma[i-1][j][k] (それ以外)
 ここで、AlfRegionFilterCoeff2は、フィルタ係数インデックスsidxにおけるフィルタ係数群である。
 次の式により、フィルタインデックスdidxにおけるフィルタ係数群を格納する。
 AlfRegionCoeffLuma2[didx][k] = AlfRegionCoeffLuma[i][j][k]
 また、図66(b)に示す処理alf_coeff__lumaでは、以下の式により、フィルタ係数インデックスsidxにおけるフィルタ係数群をコピーする。
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff2[sidx][k]
 また、次の式により、フィルタインデックスdidxにおけるフィルタ係数群を格納する。
 AlfRegionCoeffLuma2[didx][k] = AlfRegionCoeffLuma[i][j][k]
 以上の構成によって、候補選択インデックスを復号することによって、マージにおいては、部分領域を高い自由度でマージすることができる。予測においても、フィルタ予測残差の符号量が小さくなる予測値となる部分領域を選択することが可能であるため、フィルタ係数の符号量を低減することができる。この構成では、予測の候補選択インデックスと、マージの候補選択インデックスを別の方法で復号し、さらに、予測の候補選択インデックスの選択肢の方が、マージの候補選択インデックスの選択肢よりも小さい構成とすることで、符号化効率上で効率的な構成を可能としている。マージの候補選択インデックスの選択肢では、隣接する部分領域に限らず、既に復号されたフィルタ係数群を選択することができるため、飛び地などの自由度の高い構成が可能である。また、候補選択インデックスの復号において、先に復号されたフィルタ係数群の数に応じて、候補選択インデックスの符号化方法を変更することによって、高い自由度においても、符号量を低減することができる。
 <1次元マージ構成のフィルタパラメータの構成と復号処理>
 図56は、フィルタパラメータFP(図52においてalf_coeff_param()と表記)の第4の構成のシンタックスを示すシンタックステーブルである。第4の構成を1次元マージ構成と呼ぶ。図56に示すように、シンタックステーブルには、alf_new_filterが含まれている。
 alf_new_filterは、新規フィルタを復号するか否かを示すシンタックスである。
 以下、図56のシンタックステーブルを参照して、復号処理を説明する。図56に示すように、残りフィルタ数remainが0以上である場合には、alf_new_filterの復号を行うと共に、残りフィルタ数remainを1だけ減算(デクリメント)する。
 新規フィルタ係数を復号する場合、すなわち、alf_new_filterが1である場合もしくは、インデックスi、インデックスjが共に0である場合には、シンタックステーブルalf_coeff_set_luma(i, j, sidx) で示す処理を行うことで、フィルタ係数インデックスsidxのフィルタ係数を予測値として、部分領域i、jのフィルタ係数群を符号化データから復号する。フィルタ係数を復号した時点で、各部分領域に対するフィルタ係数インデックスalf_coeff_luma_id[i][j]を設定する。
 逆に、新規フィルタ係数を復号しない場合、すなわちalf_new_filterが0であり、かつ、インデックスi、インデックスjが共に0ではない場合には、フィルタ係数群を符号化データから復号せず、既に復号されたフィルタ係数群からコピーすることによって、フィルタ係数群を算出する。この場合、ある部分領域が別の部分領域と同じフィルタ係数を用いることになるため、部分領域同士がマージされている。alf_coeff_copy_luma(i, j, sidx)の処理を行うことで、フィルタ係数インデックスsidxのフィルタ係数から、復号対象である部分領域i,jのフィルタ係数のコピーを行う。
 これまで説明した通り、1次元マージ構成においても新規フィルタを復号するか否かを示すシンタックスalf_new_filterを、マージを行うか否かを示すシンタックスalf_merge_flagに置き換えることができる。
 <フィルタ係数群を先に符号化する場合のフィルタパラメータの構成と復号処理>
 以上の説明では、新規のフィルタ係数群を特性値X、特性値Yに関する2次元のループ内で、alf_coef_set_lumaに従って符号化データから復号していたが、2次元のループの前に復号することが可能である。図67は、マップ構成におけるシンタックステーブルを示す図である。図67に示すように、alf_num_filters_minus1 + 1で示されるフィルタ係数群の数の、フィルタ係数群alf_coeff_luma2を先に復号する。ここでは1次元インデックスであるためalf_coeff_luma2としているが、実質的にはalf_coeff_lumaと同じフィルタ係数群である。2次元のループ内での処理は、他の、新規のフィルタ係数群を2次元ループ内で符号化データから復号する場合と同様であるが、符号化データから復号する関数alf_coeff_set_lumaではなく、符号化データの割り当てを行うalf_coeff_dec_luma処理に置き換える。
 図68(a)に示す処理alf_coeff_dec_lumaでは、既に復号した差分値であるフィルタ係数群alf_coeff_luma2[idx][k]を用いて、以下の式から、予測値との差分をとることによってフィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを算出する。
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma2[sidx][k]; (i=0かつj=0の場合)
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff2[sidx][k] - alf_coeff_luma[didx][k] (それ以外)
 なお、sidxは参照するフィルタ係数群のフィルタ係数インデックス、didxは、対象の部分領域のフィルタ係数インデックスである。
 なお、フィルタ係数群を先に符号化する場合の例として、マップ構成の例を説明したが、他の構成にも適応可能である。この場合には、上記説明のように、フィルタ係数群の数の、数のフィルタ係数群を先に復号した後に、部分領域インデックスの2次元ループ内のalf_coeff_param()に相当で、部分空間に割り当てるフィルタ係数群を復号する処理を行う。
 <候補導出処理>
 マップ構成で用いるマージ候補導出処理、予測/マージ構成で用いる予測/マージ候補導出処理、マップ構成で用いる予測候補導出処理を説明する。これら候補導出処理とは、ある部分領域で参照する部分領域を指定するためのインデックスを決定するための処理である。導出処理は、候補数を算出する処理と、候補選択インデックスから、参照する部分領域インデックスを算出する処理に分けられる。以下、前者の処理を、NumAlfXXXXCandで表し、後者の処理をDeriveAlfXXXXIdxで表す。XXXXの部分は、マージ候補導出処理ではMerge、予測/マージ候補導出処理ではPredMerge、予測候補導出処理ではPredに置き換える。対応する候補選択インデックスのシンタックスはalf_xxxx_idxで表現される。xxxxの部分は、マージ候補選択インデックスではmerge、予測/マージ候補選択ではpred_merge、予測候補導出処理ではpredに置き換える。マージ候補導出処理がマージのためのインデックス、予測/マージ候補導出処理は、予測/マージのためのインデックス、予測候補導出処理は、予測のためのインデックス、を求めるという違いはあるが、全て同じ処理である。すなわち、NumAlfXXXXCand、DeriveXXXXIdxは、XXXXの種類によらず、同じ動作を行う。そのため、以下の図57~図62では、XXXXにMergeの場合、すなわちマージ候補導出処理を説明するが、全て、予測/マージ候補導出処理、予測候補導出処理でも用いることができる。予測/マージ候補導出処理の場合には、alf_merge_idxをalf_pred_merge_idxに、NumAlfMergeCandをNumAlfPredMergeCandに、DeriveAlfMergeIdxをDeriveAlfPredMergeIdxに置き換える。また、予測候補導出処理の場合には、alf_merge_idxをalf_pred_idxに、NumAlfMergeCandをNumAlfPredCandに、DeriveAlfMergeIdxをDeriveAlfPredIdxに置き換える。
 <候補導出処理の例1>
 図57は、最もシンプルな2選択肢の候補導出処理の例である。図57では、特性値Xが等しい部分領域(左に隣接する部分領域)、及び、特性値Yが等しい部分領域(上に隣接する部分領域)が候補となる。左を選択する場合にalf_merge_idx[i][j]が0であり、上に隣接する部分領域が候補となる。上を選択する場合にalf_merge_idx[i][j]が1である。
 対象の部分領域が、特性値Yが0の部分領域(ラスタスキャン順で一番上の行に位置する部分領域の場合)、すなわちiが0の場合には、選択肢の数は1であるため、NumAlfMergeCand1は1を返す、この時、候補選択インデックスは左を示すalf_merge_idx[i][j]=0とする。
 それ以外、対象の部分領域が、特性値Xが0の部分領域(ラスタスキャン順で一番左の列に位置する部分領域)の場合、すなわちjが0の場合には、選択肢の数は1であるため、NumAlfMergeCand1は1を返す、この時、候補選択インデックスは上を示すalf_merge_idx[i][j]=1である。
 それ以外、左に隣接する部分領域のフィルタ係数群と、上に隣接する部分領域のフィルタ係数群が一致している場合は、選択肢の数は1であるため、NumAlfMergeCand1は1を返す。この時、候補選択インデックスは左としても、上としても同じ結果となるが、ここでは、左を示すalf_merge_idx[i][j]=0とする。なお、フィルタ係数群が一致するか否かは、各部分領域に割り当てられたフィルタ係数インデックスが一致するか否かによって判定する。
 それ以外では、左と上の2つの選択肢があるため、NumAlfMergeCand1は2を返す。この場合の候補選択インデックスは、符号化データからalf_merge_idx[i][j]を復号することによって得る。
 DeriveAlfMergeIdx1は、alf_merge_idx[i][j]から部分領域を特定する2次元インデックスsi、sjを求める関数である。図57に示すように、alf_merge_idxが0の場合には、左を示すsi = i, sj = j - 1が得られ、alf_merge_idxが1の場合には、上を示すsi = i-1,sj = jが得られる。
 なお、前述のNumAlfMergeCand1は、NumAlfMergeCandを置き替えて用いられる。DeriveAlfMergeIdx1は、DeriveAlfMergeIdxを置き替えて用いられる。後述の、NumAlfMergeCand2、DeriveAlfMergeIdx2も適宜、置き替えて用いられる。
 以上の候補導出処理の例1によって、特性値X方向および特性値Y方向を選択肢に含む、候補選択インデックスを復号することによって、自由度の高い、マージ選択肢および予測選択肢を提供することができる。
 <候補導出処理の例2>
 図58は、左端において例外処理を行う候補導出処理の例である。図58においても、基本的には、特性値Xが等しい部分領域(左に隣接する部分領域)、及び、特性値Yが等しい部分領域(上に隣接する部分領域)が候補となる。図58では、ラスタスキャン順で一番左の列に位置する部分領域を処理する場合には、左に隣接する部分領域に換えて、処理順で直前の部分領域(ラスタスキャン順で一つ上の行の右端の部分領域)を候補とする。これにより左端においても選択肢の数は2個となる。以下、詳細を説明する。
 対象の部分領域が、ラスタスキャン順で一番上の行に位置する場合、すなわちiが0の場合には、選択肢の数は1であるため、NumAlfMergeCand2は1を返す、この時候補選択インデックスは左を示すalf_merge_idx[i][j]=0である。
 それ以外、対象の部分領域が、ラスタスキャン順で一番左の列に位置する場合、すなわちjが0の場合には、上に隣接する部分領域のフィルタ係数群と、ラスタスキャン順で一つ上の行の右端の部分領域のフィルタ係数群が一致するか否かを判定する。一致する場合には、選択肢の数は1であるため、NumAlfMergeCand2は1を返す、この時候補選択インデックスは上を示すalf_merge_idx[i][j]=1である。一致しない場合には、選択肢の数は2となる。
 それ以外、左のマージ候補のフィルタ係数群と、上のマージ候補のフィルタ係数群が一致している場合は、選択肢の数は1であるため、NumAlfMergeCand2は1を返す。それ以外では、左と上の2つの選択肢があるため、NumAlfMergeCand2は2を返す。
 DeriveAlfMergeIdx2は、候補選択インデックスalf_merge_idx[i][j]から部分領域を特定する2次元インデックスsi、sjを求める関数である。図58に示すように、alf_merge_idxが0の場合では、左端であるか否かによって結果が変化する。左端の場合には、ラスタスキャン順で一つ上の行の右端の領域を示すsi = i - 1; sj = NX-1が得られ、それ以外では左を示すsi = i, sj = j - 1が得られる。alf_merge_idxが1の場合には、上を示すsi = i-1, sj = jが得られる。
 以上の候補導出処理の例2によって、特性値X方向および特性値Y方向に加え、ラスタスキャン順で左端の処理に別処理を加えることによって、スライス状分割を行うことができる。
 <候補導出処理の例3>
 図59は、3つの選択肢を用いる場合の候補導出処理の例である。図3cでは、特性値Xが等しい部分領域(左に隣接する部分領域)、特性値Yが等しい部分領域(上に隣接する部分領域)、特性値X、特性値Yが1つづつ異なる部分領域(ラスタスキャン上で右上に位置する部分領域)のフィルタ係数群が、候補となる。以下、詳細を説明する。
 対象の部分領域が、ラスタスキャン順で一番上の行に位置する場合、すなわちiが0の場合には、選択肢の数は1であるため、NumAlfMergeCand3は1を返す、この時候補選択インデックスは左を示すalf_merge_idx[i][j]=0である。
 それ以外、対象の部分領域が、ラスタスキャン順で一番左の列に位置する場合、すなわちjが0の場合には、選択肢の数は1であるため、NumAlfMergeCand3は1を返す、この時候補選択インデックスは上を示すalf_merge_idx[i][j]=1である。
 それ以外では、左に隣接する部分領域のフィルタ係数群A、上に隣接する部分領域のフィルタ係数群B、右上の領域のフィルタ係数群Cが互いに一致するか否かに応じて、マージ候補数を得る。A=B=Cの場合には、選択肢の数は1であるため、NumAlfMergeCand3は1を返す、
 それ以外、A=Bの場合には、選択肢の数は2であるため、NumAlfMergeCand3は2を返す、
 それ以外、A=Cの場合には、選択肢の数は2であるため、NumAlfMergeCand3は2を返す、
 それ以外、B=Cの場合には、選択肢の数は2であるため、NumAlfMergeCand3は2を返す、
 それ以外の場合には、選択肢の数は3であるため、NumAlfMergeCand3は3を返す、
 DeriveAlfMergeIdx3は、候補選択インデックスalf_merge_idx[i][j]から部分領域を特定するインデックスsi、sjを求める関数である。図59に示すように、alf_merge_idxが0の場合には、左を示すsi = i, sj = j - 1が得られ、alf_merge_idxが1の場合で、A=Bの場合には、右上を示すsi = i-1, sj =j-1が得られる。それ以外のalf_merge_idxが1の場合では、上を示すsi = i-1, sj = jが得られる。それ以外alf_merge_idxが2の場合では、右上を示すsi = i-1, sj = j-1が得られる。
 以上の候補導出処理の例3は、候補選択インデックスで選択される選択肢として、特性値Xが等しい部分領域(左方向)、特性値Yが等しい部分領域(上方向)、および、特性値Xと特性値Yが1つづつ異なる既に処理した部分領域(ラスタスキャン順で右上方向)の3つの選択肢を用いることにより、一筆書き状分割など自由度の高い分割を行うことができる。
 <候補導出処理の例2+3>
 図60は、例2と例3の組み合わせである。この組み合わせでは、特性値Xが0である部分領域(左端以外)の処理では、特性値Xが等しい部分領域(左方向)、特性値Yが等しい部分領域(上方向)、および、特性値Xと特性値Yが1つづつ異なる既に処理した部分領域(ラスタスキャン順で右上方向)の3つの選択肢を用いる。逆に、特性値Xが0である部分領域の処理では、直前に処理した部分領域および特性値Yが等しい部分領域(上方向)、特性値Xと特性値Yが1つづつ異なる既に処理した部分領域(ラスタスキャン順で右上方向)の3つの選択肢を用いる。図60では、マージ候補の例であるが、既に説明したように、予測/マージ候補や、予測候補にも用いることができる。例2と例3の組み合わせでは、NumAlfMergeCandとしてNumAlfMergeCand23、DeriveAlfMergeIdxとしてDeriveAlfMergeIdx23を用いる。
 詳細については、例2と例3においてすでに説明済みの方法の組み合わせであるので説明を省略する。
<候補導出処理の例4>
 図61は、マップ選択を用いる場合の候補導出処理例である。マップ選択では、処理順で前の部分空間(部分領域)で用いられた(既に復号された)フィルタ係数群が候補となる。関数NumAlfMergeCand4は、フィルタ係数候補の数を算出する。これまでに復号されたフィルタ係数群、すなわち、0~フィルタ係数インデックスidxまでのidx+1個のフィルタ係数群が候補となる。従って、NumAlfMergeCand4の値はidx+1個である。以下、詳細を説明する。
 対象の部分領域が、ラスタスキャン順で一番上の行に位置する場合、すなわちiが0の場合には、選択肢の数は1であるため、NumAlfMergeCand3は1を返す、この時候補選択インデックスは左を示すalf_merge_idx[i][j]=0である。
 それ以外、対象の部分領域が、ラスタスキャン順で一番左の列に位置する場合、すなわちjが0の場合には、選択肢の数は1であるため、NumAlfMergeCand3は1を返す、この時候補選択インデックスは上を示すalf_merge_idx[i][j]=1である。
 予測の候補選択インデックスと、マージの候補選択インデックスを別の方法で復号し、さらに、予測の候補選択インデックスの選択肢と、マージの候補選択インデックスの選択肢の数を異なるものにする構成では、マージの候補導出処理をNumAlfMergeCand2やNumAlfMergeCand3とし、予測の候補導出処理をNumAlfMergeCandとする方法も好適である。
<特徴量モードに応じた候補導出処理>
 候補導出処理は、特徴量モードalf_feature_modeに応じて切り替えることも可能である。図62は、特徴量モードalf_feature_modeに応じて、候補導出処理を切り替える図である。
 図62(a)に示すように、alf_feature_modeが座標空間分割を示す場合には、候補導出処理として3候補選択導出処理NumAlfMergeCand3を用い、alf_feature_modeが特徴空間分割を示す場合には、候補導出処理として2候補選択導出処理NumAlfMergeCandを用いる方法が好適である。図62(b)に示すようにDeriveAlfMergeIdxも、特徴量モードalf_feature_modeに応じて変更する。
 また、図示しないが、alf_feature_modeが座標空間分割を示す場合には、候補導出処理としてスライス候補導出処理NumAlfMergeCand2を用い、alf_feature_modeが特徴空間分割を示す場合には、候補導出処理として2候補選択導出処理NumAlfMergeCandを用いる方法も好適である。また、図示しないが、alf_feature_modeが座標空間分割を示す場合には、候補導出処理としてスライス候補導出処理NumAlfMergeCand23を用い、alf_feature_modeが特徴空間分割を示す場合には、候補導出処理として2候補選択導出処理NumAlfMergeCandを用いる方法も好適である。
 選択肢の数が3個の場合(3候補選択導出処理)よりも2個の場合(3候補選択導出処理)の方が選択肢選択に用いる符号量を低減することができる。また、スライス候補導出処理よりも2候補選択導出処理の方が選択肢選択に用いる符号量を低減することができる。座標空間分割では、一筆書き状の分割や、スライス状分割をサポートすることで符号化効率の向上が見込まれるが、特徴空間分割では、座標空間分割ほどの符号化効率の向上は見込まれない。そのため、特徴空間分割では、座標空間分割よりも予測やマージの選択肢を少なくし、候補選択インデックスに用いる符号量を低減した方が良い。なお、特徴空間分割では、スライス状分割が適当ではないのは、特性値Xの左端の部分領域と、特性値Xの右端の部分領域では、特性値の値が大きく異なるため、適当なフィルタ係数群の値も異なることが多く、この2つをマージした場合に得られるフィルタ係数群の値は必ずしも符号化効率上、良い値とはならないからである。
 以上、説明した復号装置では、以下の特徴を有する。最初に復号したフィルタ係数の数を用いて、フィルタ係数群を復号するかマージを行うかを制御することにより、自由度が増加した場合においても、符号量の増加を抑えることができる。また、予測候補の候補選択インデックスを復号することによって、予測精度を高めることができるので、フィルタ係数群の符号量を抑えることができる。また、左と上を参照する構成ではクアッドツリー状の分割、左端では直前に処理した部分領域を参照する構成ではスライス状の分割、右上の部分領域を参照する構成では一筆書き状の分割に対応することができるため、エンコーダの自由度を高めることができる。また、マップ構成と呼ばれる。これまで復号されたフィルタ係数インデックスの何れかを参照する構成では、それら全てを含む自由度を備えることもできる。また、隣接する部分領域に限らず、既に復号されたフィルタ係数群を選択することができるため、飛び地などの自由度の高い構成が可能である。エンコーダは、ソフトウェアやハードウェアの制約、設計者の指向などに応じて自由度の高い分割方法をサポートすることが望ましい。特に、クアッドツリー状の分割、スライス状の分割、一筆書き状の分割は、座標空間分割に適応すると好適である。また、alf_feature_modeが座標空間分割であるか、特徴空間分割であるかに応じて、予測/マージ方法を切り替えることによって、特徴空間分割においては、座標空間分割用に高い自由度を保ちながら、特徴空間分割における符号量を低減することができる。また、マージの候補選択と、予測の候補選択を同一の算出方法とする構成によれば、復号装置の複雑度を低減することができる。また、マージの候補選択に比べ、予測の候補選択を少なくする構成においては、予測の選択に必要な符号量を低減することができる。
 (動画像復号装置7)
 本実施形態に係る動画像復号装置7は、実施形態1に係る動画像復号装置1の備える適応フィルタ50に代えて、適応フィルタ90を備えている。本実施形態に係る動画像復号装置7のその他の構成は、実施形態1に係る動画像復号装置1の構成と同様であるので、説明を省略する。
 (適応フィルタ90)
 図45は、適応フィルタ110の構成を示すブロック図である。図45に示すように、適応フィルタ110は、適応フィルタ情報復号部111及び適応フィルタ部112を備えている。
 適応フィルタ情報復号部111は、図45に示すように、領域別タップ数復号部1111、領域構造復号部1112、特徴量モード復号部1113、フィルタ係数復号部1114、特性別フィルタ係数格納部1115を備えている。
 領域別タップ数復号部1111は、フィルタパラメータFPに含まれるシンタックスalf_length_luma_minus5_div2を復号する。復号されたシンタックスalf_length_luma_minus5_div2は、フィルタ係数復号部1114に供給される。
 領域構造復号部1112は、フィルタパラメータFPに含まれるシンタックスalf_new_filter[i][j]及びalf_merge_idx[i] [j]を復号する。復号されたシンタックスalf_new_filter及びalf_merge_idx[i][j]は、フィルタ係数復号部1114に供給される。。
 特徴量モード復号部1113は、シンタックスalf_feature_modeを復号する。復号されたシンタックスalf_feature_modeは、フィルタ係数復号部1114に供給される。
 フィルタ係数復号部1114は、alf_length_luma_minus5_div2、alf_merge_idx[i][j]、及びalf_new_filterを参照して、シンタックスalf_coeff_luma[i][j][k]を復号する。また、フィルタ係数復号部1114は、フィルタ処理に用いられるフィルタ係数群AlfRegionFilterCoeffを、以下の式を用いて算出する。
 AlfRegionFilterCoeff[i][j][k] = AlfRegionFilterCoeff[i][j-1][k] + alf_coeff_luma[i][j][k] (j=0以外の場合)
 AlfRegionFilterCoeff[i][j][k] = alf_coeff_luma[i][0][k] (j=0の場合)
上記の式から明らかなように、フィルタ係数復号部1114は、分割単位DU[i][j-1]について復号済みのフィルタ係数群AlfRegionFilterCoeff[i][j-1][k]を予測値に設定し、当該予測値に対して、alf_coeff_luma[i][j][k]を加算(又は減算(上式の符号を反転させたものに対応))することによって、分割単位DU[i][j]についてのフィルタ係数群AlfRegionFilterCoeff[i][j][k]を復号する。
 特性別フィルタ係数格納部1115には、フィルタ係数復号部1114によって復号されたフィルタ係数群RegionFilterLuma[i][j][k]が格納される。
 一方で、適応フィルタ部112は、図45に示すように、第1特性値算出部1121、第2特性値算出部1122、フィルタ係数割り付け部1123、及びフィルタ部1124を備えている。
 第1特性値算出部1121及び第2特性値算出部1122は、それぞれ、対象単位領域についての特性値X及び特性値Yを算出する。算出された特性値X及びYは、フィルタ係数割り付け部1123に供給される。特性値X及び特性値Yの算出方法については、フィルタパラメータFPの構成例において説明を行なったので、ここでは説明を省略する。
 フィルタ係数割り付け部1123は、対象単位領域に割り付けられた特性値領域内インデックス(i、j)に対応するフィルタ係数RegionFilterLuma[i][j]を、特性別フィルタ係数格納部1115から読み出し、読み出したフィルタ係数RegionFilterLuma[i][j]を、当該対象単位領域に割り付ける。対象単位領域に割り付けられたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部1124に供給される。
 フィルタ部1124は、対象単位領域に対して、フィルタ係数RegionFilterLuma[i][j]を用いたフィルタ処理を施すことによって、該対象単位領域におけるフィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。フィルタ部1124による具体的な処理は、実施形態1におけるフィルタ部525と同様であるためここでは説明を省略する。
 (動画像符号化装置8)
 以下では、符号化対象画像を符号化することによって符号化データ#5を生成する動画像符号化装置8について、図46を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置8は、実施形態1に係る動画像符号化装置2の備える適応フィルタ60に代えて、適応フィルタ120を備えている。本実施形態に係る動画像符号化装置6のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 適応フィルタ120は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ120は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFPとして可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFPを符号化データ#5の一部として符号化する。
 図46は、適応フィルタ120の構成を示すブロック図である。図46に示すように、適応フィルタ120は、適応フィルタ情報設定部121、および、適応フィルタ部122を備えている。
 適応フィルタ情報設定部121は、図46に示すように、領域別タップ数設定部1211、領域構造設定部1212、特徴量モード設定部1213、フィルタ係数残差生成部1214、特性別フィルタ係数格納部1215、及び、フィルタパラメータ生成部1216を備えている。
 領域別タップ数設定部1211は、初期分割によって得られた特性値部分領域CPR[i]についてのタップ数を指定するためのシンタックスalf_length_luma_minus5_div2を設定する。設定されたシンタックスalf_length_luma_minus5_div2は、フィルタパラメータ生成部1216に供給される。
 領域構造設定部1212は、alf_new_filter及びalf_merge_idx[i][j]を設定する。設定されたシンタックスalf_new_filter及びalf_merge_idx[i][j]は、フィルタ係数残差生成部1214に供給される。
 特徴量モード設定部1213は、シンタックスalf_feature_modeを設定する。設定されたシンタックスalf_feature_modeは、フィルタパラメータ生成部1216に供給される。
 なお、alf_length_luma_minus5_div2、alf_new_filter、及び、alf_merge_idx[i][j]、は、符号化効率がより向上するように設定される。
 フィルタ係数残差生成部1214は、以下の式によってシンタックスalf_coeff_luma[i][j][k]を生成する。
 alf_coeff_luma[i][j][k] = AlfRegionFilterCoeff[i][j-1][k] - AlfRegionFilterCoeff[i][j][k] (j=0以外の場合)
 alf_coeff_luma[i][0][k] = AlfRegionFilterCoeff[i][j][k] (j=0の場合)
 生成されたフィルタ係数残差alf_coeff_luma[i][j][k]はフィルタパラメータ生成部1216に供給される。
 特性別フィルタ係数格納部1215には、後述するフィルタ係数導出部1223から供給されるフィルタ係数群AlfRegionFilterCoeff[i][j][k]が格納される。
 フィルタパラメータ生成部1216は、シンタックスalf_length_luma_minus5_div2、alf_merge_idx[i][j]、alf_new_filter、および、alf_coeff_luma[i][j][k]からフィルタパラメータFPを生成する。生成されたフィルタパラメータFPは、可変長符号符号化部22に供給される。
 一方で、適応フィルタ部122は、第1特性値算出部1121、第2特性値算出部1122、フィルタ係数導出部1123、及び、フィルタ部1124を備えている。
 フィルタ係数導出部1223は、対象単位領域におけるフィルタ済復号画像P_FLと符号化対象画像との誤差がより小さくなるようなフィルタ係数RegionFilterLuma[i][j]を導出する。導出されたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部1124に供給されると共に、特性別フィルタ係数格納部1215に格納される。
 フィルタ係数導出部1223によるフィルタ係数群RegionFilterLuma[i][j]の導出処理は、実施形態1におけるフィルタ係数導出部624と同様であるので、ここでは説明を省略する。
 〔実施形態5〕
 以下では、本発明の第5の実施形態について図69~図76を参照して説明する。
 本実施形態に係る適応フィルタは、実施形態1~4と同様に、フィルタ前画像(例えば、デブロック済復号画像P_DB)を構成する各単位領域について、互いに導出方法の異なる複数の特性値を導出し、導出された複数の特性値に応じて、各単位領域を1または複数のグループの何れかに分類する。また、本実施形態に係る適応フィルタは、単位領域毎に定められたフィルタ係数を用いて、フィルタ前画像に対して単位領域毎に作用する。
 ここで単位領域とは、後述するDCT変換(より一般には周波数変換)の単位であるブロックであってもよいし、後述する予測画像を生成する単位であるパーティションであってもよいし、ブロックまたはパーティションの何れでもなく、本実施形態に係る適応フィルタによってサイズおよび位置が設定された領域であってもよい。また、単位領域は、1画素から構成されるものであってもよい。本実施形態では4×4のブロックを単位領域として説明する。
 また、実施形態1~4と同様に、各グループは、複数の特性値によって張られる多次元領域上に設定される各部分領域と1対1の対応を有する。したがって、上記多次元領域をどのように各部分領域へ分割するのかを指定することにより、1または複数のグループをどのように設定するかが定まることになる。また、導出された複数の特性値は各々、第1の特性値X、第2の特性値Y、第3の特性値Zと呼ぶ。なお、実施形態1~4と同様に、上記複数の特性値によって張られる多次元領域を特性値領域とも呼称し、特性値領域上に設定される各部分領域を特性値部分領域とも呼称する。
 なお、実施形態1~4と異なり、各部分領域を指定するインデックスとして1次元のインデックスを用いる。なお、実施形態1~4においても2次元インデックスの代わりに1次元インデックスを用いることは可能である。なお、各特性値部分領域を指定するインデックスを、領域インデックスridxと呼ぶ。各単位領域は、領域インデックスridxを割り付けることでグループ化(分類)が行われる。すなわち、同じ値の領域インデックスridxが割り当てられる単位領域は同じ特性の領域であるとしてグループ化される。ある領域インデックスridxの特性値部分領域を、単に領域インデックスridxの領域と呼ぶ。
 本実施形態においては、第1の特性値X、第2の特性値Y、第3の特性値Zとして、例えば以下のような値が使用可能である。
 画像の方向性、画像の活性度、画像の特定方向活性度、予測モード、予測モード及び画像の方向性、平均画素値、単位領域の座標、スライス番号。
 なお、活性度の算出には、絶対値差分和を用いても良いし、ラプラシアンや分散を用いても良い。また、活性度を含む特性値の算出には、画素の間引きを用いても良い。単位領域の特性値の算出には、単位領域外の画素値を用いても良い。但し、特性値の参照画像の一部がスライス外に位置する場合には、スライス内の画素値のみを用いて特性値を算出可能なように、スライス内の画素値を用いてスライス外の画素値を導出し特性値を算出すると良い。
 また、各単位領域について導出される各特性値は、導出方法如何によって、単位領域のサイズに依存する場合がある。このような場合には、各特性値として、単位領域のサイズへの依存性を取り除くことによって得られる正規化された特性値を用いることができる。
 (符号化データ#7)
 本実施形態に係る動画像符号化装置8によって生成され、動画像復号装置7によって復号される符号化データ#7のデータ構造の内、フィルタパラメータFPの構成を詳述する。
 <フィルタパラメータの基本構成>
 図74は、本実施形態に係るフィルタパラメータFPのシンタックステーブルの一例である。図74に示すように、フィルタパラメータFPには、adaptive_loop_filter_flag、alf_region_adaptation_flag、alf_length_luma_minus5_div2、alf_num_filters_minus1、alf_region_idx[]、alf_pred_method、alf_min_kstart_minus1、alf_golomb_index_bit[i]、alf_coeff_luma[i][j]が含まれている。
 alf_num_filters_minus1は本実施形態に係る適応フィルタで用いるフィルタ数AlfNumFiltersを示すシンタックスであり、AlfNumFilters = alf_num_filters_minus1 + 1により求めることができる。alf_region_adaptation_flagは、特徴量モードを示すシンタックスであり、第4の実施形態のalf_feature_modeに相当する。alf_region_adaptation_flag=0、1、2、3は各々、後述するRAモード、BA1モード、BA2モード、3Dモードに対応する。なおRAモードは、対象単位領域の画像(フレーム)内座標を用いる分割であり座標空間分割の一つである。BA1、BA2モードは、対象単位領域における画素値もしくは符号化パラメータを用いる分割であり、特徴空間分割の一つである。alf_region_idx[i] (1≦i<AlfNumFilters)は、各部分領域に対するフィルタインデックスを指定するシンタックスである。図74は、フィルタインデックスの推定を用いない場合のシンタックステーブルであり、図75は、フィルタインデックスの推定を用いる場合のシンタックステーブルである。
 図75は、本実施形態に係るフィルタパラメータFPのシンタックステーブルの一例である。prev_alf_region_flag[i]とrem_alf_region_flag[i] (1≦i<AlfNumFilters)は、各部分領域に対するフィルタインデックスを指定するシンタックスである。alf_region_idx[i]、prev_alf_region_flag[i]とrem_alf_region_flag[i]など領域構造を指定するシンタックスを領域構造シンタックスと呼ぶ。ここで領域構造とは、各部分空間と参照するフィルタ係数群を表す構造であり、各部分領域で参照するフィルタ係数群を定めることで復号される。なお、alf_region_idx[i] 、prev_alf_region_flag[i]、rem_alf_region_flag[i]は、後述するフィルタインデックス制約により値の範囲がある。従って、取り得る値の範囲に応じて符号化データとすることにより、領域構造インデックスの符号量を削減できる。なお、値の範囲に応じた符号化では、一般に候補数が2^(m-1)より大きく、2^m以下であれば、mビットを符号化するようにしても良い。このような符号化には、例えば、候補数を最大値cMaxとする各種Truncated符号化(例えばTruncated unary符号化)を用いることができる。
 また、図55に示す第3の実施形態のマップ構成では、領域構造シンタックスを新規フィルタフラグalf_new_filterと、マージ候補インデックスalf_merge_idxを用いて符号化する。
 また、図示しないが、特徴量モードの示す特性値算出方法が1次元の場合には、1次元マージのシンタックスalf_filter_patternを用いて領域構造を符号化し、多次元の場合には、本実施形態に示す各部分領域のフィルタインデックスを復号するシンタックスを用いて領域構造を符号化しても構わない。
 図76も、本実施形態に係るフィルタパラメータFPのシンタックステーブルの一例である。図75との違いは、各部分領域毎に、フィルタ処理をオフにするシンタックスalf_disable_region_idx[i]を含むことである。このシンタックスは、実施形態2のalf_disable_region_idc[i0]に相当するものであり、このシンタックスが当該部分領域に対し、フィルタ処理のオフを指定している場合、フィルタ処理は行わない。
 (適応フィルタ130)
 図69は、適応フィルタ130のブロック図である。適応フィルタ130は、適応フィルタ情報復号部131、適応フィルタ132を備えている。適応フィルタ情報復号部131は、タップ数復号部1311、領域構造復号部1312、特徴量モード復号部1313、フィルタ係数復号部1314、フィルタ係数格納部1315を備えており、適応フィルタ部132は、領域インデックス算出部1322、フィルタ係数割り付け部1323、フィルタ部1324を備えている。
 タップ数復号部1311は、フィルタパラメータFPに含まれるシンタックスalf_length_luma_minus5_div2を復号する。
 領域構造復号部1312は、概略的に言えば、図74に示すフィルタパラメータFPに含まれるシンタックスalf_region_idx[i]から領域構造を復号する。また、領域構造復号部1312は、図75及び図76に示すフィルタパラメータFPに含まれるシンタックスprev_alf_region_flag[i]、rem_alf_region_flag[i] (0≦i<AlfNumFilters)を復号する。
 特徴量モード復号部1313は、シンタックスalf_region_adaptation_flagを復号する。復号されたシンタックスalf_region_adaptation_flagは、領域インデックス算出部1322に供給される。
 フィルタ係数復号部1314は、シンタックスalf_coeff_luma[i][k]よりフィルタ係数群AlfRegionFilterCoeff[i][k] (0≦i<AlfNumFilters、0≦k<Ntotal:Ntotalは、1つのフィルタ係数群に含まれるフィルタ係数の数)を復号する。フィルタ係数群AlfRegionFilterCoeff[i][k]の総数は、AlfNumFiltersである。
 また、フィルタ係数復号部1314は、フィルタ処理に用いられるフィルタ係数群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の各値について)上記式により算出される。
 フィルタ係数格納部1315には、フィルタ係数復号部1314によって復号されたフィルタ係数群RegionFilterLuma[i][k]が格納される。なおiは、フィルタ係数群を参照するためのインデックスであり、以下フィルタインデックスfidxとも呼ぶ。フィルタ係数群の数はAlfNumFiltersであるから、フィルタインデックスは0からAlfNumFilters-1までの値で指定される。なお、本実施形態では、フィルタ処理で用いられるフィルタ係数群として、符号化データ#7から復号されるフィルタ係数群を用いるが、復号装置に予め備わっているフィルタ係数群を参照可能なフィルタ係数として用いても良い。また、処理対象のピクチャおよびスライスに対応するヘッダ及びピクチャパラメータセットだけではなく、それ以前の特定のピクチャやスライスで符号化されるフィルタ係数群を参照しても良い。
 (領域構造復号部1312)
 領域構造復号部1312は、フィルタパラメータFPから領域構造シンタックスを復号し、領域インデックスでグループ化される部分領域の各々に対して、フィルタ係数群を参照するためのフィルタインデックスを割り当てる。具体的には、部分領域を指定する各領域インデックスridx(0≦ridx<AlfNumRegions)に対して、1つのフィルタインデックスfidxを割り当てる。
 領域構造復号部1312は、各領域インデックスridxに対するフィルタインデックスfidxを復号し、領域インデックスridxとフィルタインデックスfidxの関係を示すフィルタインデックステーブルFilterIdxTbl[ridx](0≦ridx<AlfNumRegions)を導出する。導出されたフィルタインデックステーブルFilterIdxTbl[]はフィルタ係数割り付け部1323に出力する。フィルタインデックステーブル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である。
 さらに例えば、フィルタインデックステーブルが下記のFilterIdxTblBの場合には、全ての部分領域に対して同じフィルタインデックス(値0)が割り当てられる。すなわち、全ての部分領域がマージされる。この時、フィルタインデックスの総数AlfNumFiltersは1である。
 FilterIdxTblB[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 さらに例えば、フィルタインデックステーブルが下記のFilterIdxTblCの場合には、部分領域は、5つの領域にマージされ、各々の部分領域にフィルタインデックス0~4が割り当てられる。
 FilterIdxTblC[] = {0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 2, 2, 1, 1}
 このように、フィルタインデックステーブルFilterIdxTblによって、領域インデックスridxの各領域にフィルタインデックスが指定される。逆に、フィルタインデックステーブルFilterIdxTblによって、各部分領域はグループされる。すなわち、同じフィルタインデックスfidxが割り当てられる部分領域ridxは、同じグループ(フィルタインデックスfidxのグループ)に分類される。特性値部分領域の特性値は、単位領域毎に算出されるから、結局、各単位領域は、単位領域に対して算出される領域インデックスとフィルタインデックステーブルFilterIdxTblによってグループ化される。
(フィルタインデックスの制約)
 フィルタインデックステーブルFilterIdxTbl中のフィルタインデックスは、0を最小値、AlfNumFilters-1を最大値とする範囲の値として符号化される。この制約(インデックス制約1とも呼ぶ)は、以下の考察により規定されるものである。
 仮に、フィルタインデックスの最大値を制限しない場合を想定してみると、フィルタインデックステーブルFilterIdxTblCと同じ構成(すなわち、フィルタインデックステーブルFilterIdxTblCを用いた場合と同じグループ分け)を、例えば、以下のFilterIdxTblC´でも表現可能である。
 FilterIdxTblC´[] = {0, 0, 0, 7, 7, 7, 2, 2, 2, 3, 3, 3, 9, 9, 7, 7}
この場合、出現するインデックスの総数は5個であるのに、出現するインデックスの値は、0, 2, 3, 7, 9となり、フィルタインデックスの値に抜けが生じる。フィルタインデックスの値の最大値が不明であり、また値に抜けがある場合には、AlfNumFilters個のフィルタ係数のどの係数群にどのフィルタインデックスが対応するのかを定めることが困難である。逆に、フィルタインデックスの値を0からAlfNumFilters-1に制限することで、少ない数のインデックス(インデックスの値を小さくできるため符号量を小さくできる)でも十分フィルタインデックスをフィルタ係数群に対応づけることができる。また、フィルタインデックスとフィルタ係数群を容易に1対1に対応させることができる。例えばフィルタ係数群は、復号される順番に割りつけられる0からAlfNumFilters-1の値をフィルタインデックスとして参照することができる。上記、フィルタインデックスの値の範囲の制約は、フィルタインデックスとフィルタ係数群との1対1対応が容易であるという条件から設定される。但し、この条件が存在する場合にも、同じグループ分けに対して異なるフィルタインデックスが割り付け得るという自由度が存在する。例えば、以下のFilterIdxTblC´´は、FilterIdxTblCと同じグループ分けを意味する。
 FilterIdxTblC´´[] = {0, 0, 0, 2, 2, 2, 1, 1, 1, 3, 3, 3, 1, 1, 2, 2}
 このような自由度をなくす制約として、以下のインデックス制約2が考えられる。
 (インデックス制約2):領域インデックスridxであるフィルタインデックスfidxの値の範囲を、0から領域インデックスの値がi=0からi=ridx-1の部分領域のフィルタインデックス(FilterIdxTbl[i])の最大値+1までに制限する。
 例えば、この制約のもとでは、以下のFilterIdxTblDは可能であるが、FilterIdxTblEは可能ではない。
 FilterIdxTblD[] = {0, 1, 2, …}
 FilterIdxTblE[] = {0, 1, 3, …}
いずれの例でもridx=2の復号時点で出現しているフィルタインデックスは0と1であるから、この時点でのフィルタインデックスの最大値は1である。ある時点のフィルタインデックスの範囲は0から最大値+1であるから可能なフィルタインデックスは0~2である。従って、復号したフィルタインデックスの最大値+1を超える値である3となるFilterIdxTblEは可能ではない。
 なお、適応的フィルタオフ復号部を備え、領域でのフィルタ処理をオフとする場合には、オフとなる領域に-1として区別する。
 FilterIdxTblE[] = {0, 1, -1, …}
 値がマイナスとなる領域は、フィルタ係数群を割り当てない領域として区別することができる。
 また、alf_disable_region_idx[]の値を復号せずに、領域毎に復号される所定のフィルタインデックスの値を判定することによって、フィルタ処理のオフを決定することもできる。この場合には、上記制約と異なり、ある領域のフィルタインデックスの範囲を0から最大値+2とし、最大値+2の値をフィルタ処理のオフと定めることができる。
 なお、この制約のもとでは、領域インデックスridx=0のフィルタインデックスは0であるので、領域インデックスridx=0のフィルタインデックス復号を省略することができる。
 (領域構造復号部1312の詳細)
 図71は、領域構造復号部1312のブロック図である。領域構造復号部1312は、インデックス総数復号部1331、インデックス復号制御部1332、推定フィルタインデックス算出部1333、インデックス復号部1334、残数管理部1336、新番号識別処理部1335を備える。また、領域単位でフィルタオフとする場合には図示しない適応的フィルタオフ復号部を備える構成としても良い。
 インデックス総数復号部1331は、フィルタパラメータFPからシンタックスalf_num_filters_minus1を復号し、インデックス(フィルタインデックス)の総数AlfNumFiltersを、AlfNumFilters=alf_num_filters_minus1+1によって決定する。
 領域構造復号部1312が、適応的フィルタオフ復号部を備える構成の場合には、該適応的フィルタオフ復号部は、各領域に対してフィルタオフとするか否かのフラグalf_disable_region_idx[i] (0≦i<AlfNumRegions)を復号する。復号したフラグalf_disable_region_idx[i]の情報は、フィルタ係数割り付け部1323に出力される。
 インデックス復号制御部1332は、推定フィルタインデックス算出部1333、インデックス復号部1334、残数管理部1336、新番号識別処理部1335を制御し、ridx=0~AlfNumRegions-1の各領域インデックスridxに対するフィルタインデックスfidxの復号を行う。
 インデックス復号制御部1332は、まず、領域インデックスridxを0からAlfNumRegions-1までの値に順に設定し、推定フィルタインデックス1333とインデックス復号部1334に出力する。次いで、推定フィルタインデックス1333は、領域インデックスridxに対するフィルタインデックスの推定値(推定フィルタインデックス)を算出し、インデックス復号部1334に出力する。インデックス復号部1334は、領域インデックスridxに対応するフィルタインデックスfidxをフィルタパラメータFPから復号し、フィルタインデックステーブルFilterIdxTblに格納する。フィルタインデックスfidxの符号化データには、推定フィルタインデックスを用いて符号化される場合と、推定フィルタインデックスを用いずに符号化される場合とがある。
 本実施形態の例では、フィルタ数AlfNumFiltersが2個である場合には、推定フィルタインデックスを用いる方法を適用し、フィルタ数AlfNumFiltersが2個よりも大きい場合には、推定フィルタインデックスを用いない方法を適用する。但し、適用方法の区分けは、この限りではなく、常に、推定インデックスを用いない方法を適用しても良い。また、より一般に、フィルタ数AlfNumFiltersがNfilter(Nfilterは任意の自然数)個以下である場合には、推定フィルタインデックスを用いる方法を適用し、フィルタ数AlfNumFiltersがNfilter個よりも大きい場合には、推定フィルタインデックスを用いない方法を適用する構成としてもよい。
 なお、復号装置が、適応的フィルタオフ復号部を有し、特性値部分領域単位でフィルタ処理をオフとするフラグを復号する場合には、フィルタ処理がオンとなる領域に対してのみ、フィルタインデックスを復号する。これは、下記の推定フィルタインデックスを用いる方法においても同様である。
 <推定フィルタインデックスを用いない方法>
 図74は、推定フィルタインデックスを用いない場合におけるフィルタパラメータFPを示す。この符号化データでは、領域インデックスiが1からAlfNumRegions-1までのフィルタインデックスalf_region_idx[i]が順に符号化されているので、領域構造復号部1312は、alf_region_idx[i]を順に復号し、FilterIdxTbl[0]=0、FilterIdxTbl[i] = alf_region_idx[i]から、フィルタパラメータテーブルFilterIdxTblを復号する。
 また、フィルタパラメータテーブルの制約から、ある領域インデックスiを復号する時点のフィルタインデックスの取り得る範囲は0~nidx-1の間の値である。そのため、フィルタインデックスがnidx~0である場合に対し、0~nidxの値を対応させ、領域フィルタインデックスalf_region_idx[i]を符号化する方法も可能である。取り得る最大値から符号化対象の値を差し引いた値を符号化する方法を、逆順のインデックス符号化方法と呼ぶ。
 一般に隣接する領域は似た特性を有し、マージされる可能性が高い。マージされる場合には、ある領域インデックスiのフィルタインデックスの値は、直前に復号された領域i-1のフィルタインデックスの値と同じとなる。また、直前に復号された領域のフィルタインデックスは、新規フィルタインデックスnidx-1である可能性が高いことから、nidx-1に対して短い符号語で符号化すると適当である。この場合、フィルタパラメータfidxは、領域フィルタインデックスalf_region_idx[i]と新規フィルタインデックスnidxの差分-1として、以下の式のようにフィルタパラメータfidxを復号することも好適である。
 fidx = nidx - alf_region_idx[i]
 領域フィルタインデックスalf_region_idx[i]の値は、0~nidxであるから、nidxを最大値cMaxとする各種Truncated符号化(例えばTruncated unary符号化)を適応することが可能であり、この場合に符号量を低減させることができる。また、領域フィルタインデックスの最大限の範囲は0~AlfNumFilters-1が最大限の範囲であるから、AlfNumFilters-1を最大値cMaxとする上記符号化も有効である。また、最大値付き符号化を適用しない場合においても、0に近いほど短い符号語を割り当てる場合がある。この場合には、上記逆順の設定が有効である。
 このように推定インデックスを用いない方法では、領域ridxに対するフィルタインデックスfidxを直接、フィルタパラメータFPから復号する。
 <推定フィルタインデックスを用いる方法>
 推定インデックスを用いる方法においても、推定インデックスを用いない方法と同様、各部分領域に対するフィルタインデックスを復号する。推定フィルタインデックスを用いない方法では、各フィルタインデックスを、1種類のシンタックスalf_region_idxから復号するのに対し、推定フィルタインデックスを用いる方法では、2種類のシンタックス、領域フィルタインデックス推定フラグprev_alf_region_flag[]と、領域フィルタインデックス残差フラグrem_alf_region_flag[]から復号を行う。
 図75は、推定フィルタインデックスを用いる方法におけるフィルタパラメータFPを示す。図75のフィルタパラメータFPでは、インデックス総数AlfNumFiltersが2個の場合(alf_num_filters_minus1==1の場合)には、領域フィルタインデックスalf_region_idx[i]が符号化され、インデックス総数AlfNumFiltersが2個より大きい場合(alf_num_filters_minus1>1の場合)には、領域フィルタインデックス推定フラグprev_alf_region_flag[]と、領域フィルタインデックス残差インデックスrem_alf_region_flag[]が符号化される。領域フィルタインデックスalf_region_idx[i]が符号化される場合は推定フィルタインデックスを用いない場合であり、既に説明済みであるので説明を省略する。以下、推定フィルタインデックスを用いる場合の説明を行う。
 インデックス復号制御部1332は、領域インデックスが1からインデックス総数AlfNumRegions-1までについて、以下の繰り返し処理によりフィルタインデックスidxを復号する。
 各繰り返し処理(ループ変数はi)では、まず、残確定領域数remain_fixed_regions(後述)が0より大きいか否かを判定する。残確定領域数remain_fixed_regionsが0より大きい場合にはフィルタパラメータFPの復号によって、フィルタインデックスfidxを復号し、残確定領域数remain_fixed_regionsが0である場合には、フィルタパラメータFPの復号を行わず、フィルタインデックスfidxを決定する。
 残確定領域数remain_fixed_regionsが0より大きい場合には、まず、フィルタパラメータFPから領域フィルタインデックス推定フラグprev_alf_region_flag[i]を復号する。prev_alf_region_flag[i]が0の場合には、推定フィルタインデックスMPM(後述)をフィルタインデックスfidxとして設定する。すなわちfidx=MPMと設定する。prev_alf_region_flag[i]が0以外の場合には、領域フィルタインデックス残差インデックスrem_alf_region_idx[i]を復号する。rem_alf_region_idx[i]の値remが推定フィルタインデックスMPM未満である場合には、フィルタインデックスfidx=remが設定される。それ以外の場合には、フィルタインデックスfix=rem-1が設定される。
 なお、上記説明では、推定フィルタインデックスMPMの数は1個であるからprev_alf_region_flag[i]は1ビットで符号化が可能である。また、推定フィルタインデックスMPMの数は1個に限定せず、複数個を用いることとすることができる。この場合、MPMの数を識別できるだけのビット数で符号化が可能である。なお、複数のMPMを用いる場合には、基本推定値算出部1341で算出されるMPMと領域位置推定値算出部1342で算出されるMPMが適当である。残フィルタ数が相対的に大きい場合には、新番号推定値算出部1343とし、それ以外の場合に、基本推定値算出部1341で算出されるMPMと領域位置推定値算出部1342で算出されるMPMとすることも適当である。
 領域フィルタインデックスalf_region_idx[i]の値は、0~nidxであるから、nidxを最大値cMaxとする各種Truncated符号化(例えばTruncated unary符号化)を適応することが可能であり、この場合に符号量を低減させることができる。また、領域フィルタインデックスの最大限の範囲は0~AlfNumFilters-1が最大限の範囲であるから、AlfNumFilters-1を最大値cMaxとする上記符号化も有効である。
 次に残確定領域数remain_fixed_regionsが0の場合について説明する。残確定領域数remain_fixed_regionsが0の場合には、フィルタパラメータFPを復号することなく領域インデックスiのフィルタインデックスfidxを後述の新規フィルタインデックスnidxに定める。すなわち、fidx=nidxが設定される。なお、残確定領域数remain_fixed_regionsとは、ある領域フィルタインデックスのフィルタインデックスを復号する時点における未確定の領域が存在するか否かを示す値である。領域数AlfNumRegionsとフィルタ数AlfNumFiltersが一致する場合には、例えば、領域数AlfNumRegionsとフィルタ係数の総数AlfNumFiltersがともに16個である場合では、各々の部分領域には、異なるフィルタインデックスが割り当てられることは自明である。
この場合、インデックス制約2から、フィルタインデックステーブルFilterIdxTblAのようなフィルタインデックステーブルが一意に定まる。残確定領域数remain_fixed_regionsが0である場合とは、このような場合の一般化に当たる。この場合、インデックス制約2からフィルタパラメータFPからデータを読み出すことなく前述のfidx=nidxによりフィルタインデックスを定める。
 以上の説明した各部分領域のフィルタインデックスを復号する方法では、復号されるフィルタインデックスにより部分領域のマージを表現することができる。この場合、部分領域のマージの制限は、フィルタインデックスの値の制限に対応する。本実施例では、インデックス制約1とインデックス制約2を制限とする。この場合、実質的に制限はなく、ある部分領域は、その部分領域以外の全ての部分領域と同じフィルタインデックスを有することができる。全ての部分領域は同じフィルタ係数を共有することができる、すなわち、全ての部分領域は互いにマージ可能である。
 但し、インデックス制約1とインデックス制約2の他、既に処理されたフィルタインデックスの値に応じて、取り得るフィルタインデックスの値を制限することができる。例えば、領域インデックスの算出において用いられる多次元特性値において、特性値Xの値、もしくは、同じ特性値Yの値を有する既に処理された部分領域のフィルタインデックスを選択候補とすることもできる。この制約をインデックス制約3と呼ぶ。2次元インデックスの場合には、2つの選択候補と、新規フィルタか否かを識別することができるため、3値のフラグを復号することで、フィルタインデックスの値を決定することができる。なお、自由度の高い分類は、特にRAモードで適当であるので、BAモードにはインデックス制約1~3を用い、RAモードには、インデックス制約1~2を用いることも好適である。
 なお、インデックス制約1~3を用いるとは、インデックス制約1~3の値の範囲の積集合(AND)を用いて、復号するインデックスの値の範囲(選択候補リスト)を定めることを意味する。例えば、BAモードが下記のように5×3の特性値領域を備え、下記のように部分空間Xのインデックスを復号する場合を説明する。
 0 0 1 1 2
 0 3 3 X ?
 ? ? ? ? ?
この時、フィルタ係数の数は5である場合には、インデックス制約1とインデックス制約2で定まる値の範囲は、下記の通りである。
インデックス制約1の値の範囲={0、1、2、3、4}
インデックス制約2の値の範囲={0、1、2、3、4}
部分空間Xの左及び上に隣接する部分空間のインデックスは各々3と1であるから、インデックス制約3で定まる値の範囲は、下記の通りである。
インデックス制約3の値の範囲={1、3}
この時、インデックス制約1~インデックス制約3から定まるインデックスの範囲は{1、3}となる。なお、選択候補リストに対して新たに番号を0~選択候補数-1の選択インデックスとして振り直し、その選択インデックスを復号しても構わない。このような符号化方法は、実施形態3と4で説明済みである。例えば、インデックス制約3に対しては、マージ構成のため、詳細の説明は省略する。なお、インデックス制約2に対しては、マップ構成が対応する。実施形態3におけるマップ構成では、新フィルタであるか否かを示すフラグを明示的に符号化する。マップ構成では、新規フィルタであるか否かを示すフラグ(新規フィルタ係数フラグ、図56ではalf_new_filter)と、領域インデックスの値(図56ではalf_merge_idx[i][j]に相当)を分けて符号化し、新規フィルタ係数フラグが新規であることを示す場合には領域インデックスの値として、新規フィルタインデックスnidxを設定し、新規フィルタ係数フラグが新規でないことを示す場合(既に復号した部分領域とマージする場合)には、領域インデックスの値を復号する。このとき、取り得るインデックスの値の範囲は、新規フィルタインデックスを除く場合であるから、0から復号対象の部分領域の前に出現したフィルタインデックスの最大値となる。この場合も、残確定領域数remain_fixed_regionsが0の場合には、alf_new_filterを復号しない構成が可能である。
 (新番号識別処理部1335)
 新番号識別処理部1335は、領域インデックスiの各繰り返し処理において、新規のフィルタインデックスが復号されたか否かを判定し、さらに新規フィルタインデックスnidxを定める。新規のフィルタインデックスとは、直前の処理(領域インデックス0からi-1までの部分領域に対応するフィルタインデックスの復号処理)において出現していない値のフィルタインデックスのことである。ある部分領域のフィルタインデックスとして復号された値が、直前の処理までに既に用いられた値の何れかであるということは、対象の部分領域は、既に処理された部分領域の何れかと同じフィルタインデックスを有することを意味する。すなわちこの部分領域はマージされる部分領域であることを意味する。逆に、処理されたフィルタインデックスが、既に処理されたどの値とも異なること場合には、マージされない部分領域であることを意味する。なお、インデックス制約2から、マージされない部分領域のフィルタインデックスの値は、既に処理したフィルタインデックスの最大値+1である。この値を新規フィルタインデックスnidxに定める。新規フィルタインデックスnidxの設定アルゴリズムは以下にまとめられる。
 最初に(領域インデックスi=0の時点で)、新規フィルタインデックスnidxを1に初期化する。領域インデックスiの繰り返し処理において、フィルタインデックスの復号がなされた後で、処理したフィルタインデックス(復号インデックス)とその時点の新規フィルタインデックスの値を比較する。フィルタインデックスと新規フィルタインデックスnidxが一致していた場合には、新規フィルタインデックスnidxを1だけインクリメントする。一致していない場合には、何もしない。
 (残数管理部1336)
 残数管理部1336は、領域インデックスiの各繰り返し処理において、残領域数remain_regionsと残フィルタ数remain_filtersとを算出し、推定値選択部1344に出力する。また、残領域数remain_regionsと残フィルタ数remain_filtersから、残確定領域数remain_fixed_regionsを算出し、インデックス復号部1334に出力する。
 残領域数remain_regionsは、ある領域インデックスiを処理する時点で、現在の部分領域を含めて、フィルタインデックスが確定していない部分領域の数である。確定していないフィルタインデックスの数は、i=0の段階で、部分領域の総数AlfNumRegionsであり、この値は、部分領域に対するフィルタインデックスが確定する度に減少する。よって、残領域数remain_regionsは、領域の総数AlfNumRegionsと領域インデックスの現在値iの差分から以下の式で算出できる。
 remain_regions(i) = AlfNumRegions-i
 残フィルタ数remain_filters(i)は、ある領域インデックスiを復号する時点で、出現していない(復号されていない)フィルタインデックスの数である。出現していないフィルタインデックスの数は、i=0の段階で、フィルタの総数AlfNumFiltersであり、新規のフィルタインデックスが復号される度に減少する。既に出現したフィルタ係数群の数は、新規フィルタインデックスnidxと一致するため、残フィルタ数remain_filtersは、フィルタ数の総数AlfNumFiltersと、既に出現した(既に復号した)フィルタ係数の最大値+1である新規フィルタインデックスnidxから以下の式で算出できる。
 remain_filters(i) = AlfNumFilters-nidx
 続いて、残確定領域数remain_fixed_regions(i)は、以下の計算で計算される。
 remain_fixed_regions(i)=remain_regions(i) - remain_filters(i)
 残確定領域数remain_fixed_regionsの0以上の値が取り得る。ある領域インデックスiのフィルタインデックスを処理する時点(部分領域i-1のフィルタインデックスの処理が終了した時点)で、残確定領域数remain_fixed_regionsが0であれば、領域インデックスiからAlfNumRegions-1までの残りの部分領域のフィルタインデックスが一意に確定する。
 また、復号装置が、適応的フィルタオフ復号部を有し、特性値部分領域単位でフィルタ処理のオフとするフラグを復号する場合には、部分領域0から部分領域iまでの領域において、オフとなる部分領域の数AlfOffRegionNum(i)を用いて、残領域数を下記の式で求める。
 remain_regions(i) = AlfNumRegions-i-AlfOffRegionNum(i)
 (推定フィルタインデックス算出部1333)
 推定フィルタインデックス算出部1333は、基本推定値算出部1341、領域位置推定値算出部1342、新番号推定値算出部1343、推定値選択部1344を備える。なお、基本推定値算出部1341、領域位置推定値算出部1342、新番号推定値算出部1343の任意の1つ、もしくは、任意の2つの組み合わせを用いる構成も可能である。例えば、基本推定値算出部1341のみを有する構成は、非常に簡便な構成になり装置が簡単になる。また、領域位置推定値算出部1342のみを有する構成も簡単な構成で好適な符号化効率を有する。
 基本推定値算出部1341は、直前に復号された領域のフィルタインデックスを、推定値とするものであり、推定値mpm=FilterIdxTbl[i-1]により推定値mpmを算出する。なお、復号装置が、適応的フィルタオフ復号部を有し、特性値部分領域単位でフィルタ処理をオフとするフラグを復号する場合において、直前に復号された部分領域がフィルタオフとされる場合には、処理順で最後にフィルタ処理がオンとなる部分領域のフィルタインデックスを推定値mpmとする。
 領域位置推定値算出部1342は、領域の多次元位置に応じて部分領域のフィルタインデックスを求める。領域インデックスiは、多次元空間の特性値領域におけるいずれかの特性値部分領域に対応する。多次元空間が2次元の場合、特性値領域は2つの軸(X軸とY軸)を有し、各部分空間は、X軸上の特性値X、Y軸上の特性値Yによって、2次元座標上の点として表すことができる。2次元空間上のある部分領域には、隣接する部分領域として、同じ特性値Xを有する部分領域と、同じ特性値Yを有する部分領域がある。隣接する部分領域は似た画像特性を有するため、同じフィルタインデックスが割り当てられる確率が高い。領域位置推定値算出部1342は、このことを利用して推定値を求める。領域インデックスridxが特性値Xと特性値Yからラスタスキャンによるインデックス計算によって求められる場合、すなわち、ridx = x × w + yの場合、以下の方法でmpmを算出することができる。
 同じ特性値Xを有する部分領域のフィルタインデックスを用いて推定値は、mpm = FilterIdxTbl[i - w]により算出する。また、同じ特性値Xを有する部分領域には、FilterIdxTbl[i - w×2]、FilterIdxTbl[i - w×3]、・・・、FilterIdxTbl[0]も候補となる。そのため、mpm = FilterIdxTbl[0]を用いることも好適である。特に、特徴量モードがBA1モードもしくはBA2モードなど、単位領域のエッジ方向と活性度から算出される場合で、特性値Yがエッジ方向である場合には、特性値Y=2と特性性Y=0の部分領域が類似している場合もあり、統制値Y=0の値を用いるFilterIdxTbl[0]が好適となる。
 同じ特性値Yを有する部分領域のフィルタインデックスを用いて推定値は、mpm = FilterIdxTbl[i - 1]により算出する。この値は、基本推定値算出部1341の推定値と同一であるため、説明の構成では、同じ特性値Xを有する部分領域のフィルタインデックスを優先し、領域位置推定値算出部1342では、推定値としてmpm = FilterIdxTbl[i - w]を算出し出力する。
 新番号推定値算出部1343は、新規フィルタインデックスnidxをmpmとして算出し出力する。特に残フィルタ数が、残領域数と比べて、比較的大きい場合など、新規フィルタインデックスnidxの出現確率が高いと予測される場合には、nidxは良い推定値となる。
 推定値選択部1344は、基本推定値算出部1341、領域位置推定値算出部1342、新番号推定値算出部1343から得られる各推定値mpmから最適な推定値mpmを選択する。具体的には、残領域数remain_regionsと比較して残フィルタ数remain_filtersが大きいと判定される場合には、新番号推定値算出部1343の推定値mpmを用いる。例えば、
 remain_regions - remain_filters / 2 > 0
の場合に、新番号推定値算出部1343の推定値mpmを用いる。
 それ以外で、領域特性モードalf_region_adaptation_flagが2次元特性を有する特性値であり、その2次元特性において、領域インデックスに対応する部分領域のX座標が0であると算出される場合には、領域位置推定値算出部1341の推定値mpmを用いる。具体的には、ラスタスキャンによる領域インデックス計算がなされる場合には、X座標はridx % w、但し%は剰余演算を示す、で求められるため、ridx % w == 0である場合に、領域位置推定値算出部1341の推定値mpmを用いる。なお、wは特性値領域のX軸方向の長さ(幅)である。ラスタスキャンによる領域インデックス計算以外の領域インデックスが用いられる場合には、領域インデックスからX座標を求めるテーブルridx_to_x_tbl[]などを用いて求めることができる。また、ラスタスキャンによる領域インデックス計算以外の領域インデックスが用いられる場合には、領域位置推定値算出部1341の推定値mpmを用いない方法も好適である。
 それ以外の場合には、基本推定値算出部1341の推定値mpmを用いる。
 (フィルタインデックス復号手順)
 図73は、領域構造復号部1312によるフィルタインデックス復号手順を示すフローチャートである。フィルタインデックスはSE01~SE14によって復号される。
 まず、SE01では、インデックス総数復号部1331により、フィルタパラメータFP中に符号化されたalf_num_filters_minus1からフィルタ係数の数AlfNumFiltersを復号する。領域インデックス0に対するフィルタインデックスfidxは0に定める。ここで新インデックス番号nidxの初期値を1に設定する。
 続いて、SE02は、SE03~SE14までのループを表す。インデックス復号制御部1332は、領域インデックスridxをループ変数とし1~AlfNumRegions-1までの値で繰り返し処理を行う。
 続いて、SE03の残数計算では、残数管理部1336により、残フィルタ数と残領域数を計算する。
 続いて、SE04では、残数管理部1336により、残領域においてフィルタが確定しているか否かを判定する。残フィルタ数=残領域数の場合にはフィルタが確定していると判定される。フィルタが確定している場合には、フィルタインデックス推定値mpm=新インデックス番号とした上で、SE10に遷移する。フィルタが確定でない場合にはSE05に遷移する。
 SE05では、推定値選択部1344により、残フィルタ数が、残領域数に対して多いか否かの判定が行われる。ここでは残フィルタ数が残領域数の1/2よりも大きい場合に多いと判定するが、判定方法はこの限りではなく1/2以外の値を用いる方法でも良いし、1/2に所定の定数Nを加えた値としても良い。残フィルタ数が多いと判定された場合にはSE06に遷移する。そうではない場合にはSE07に遷移する。
 SE06では、新番号推定値算出部1343により、フィルタインデックス推定値mpmに新インデックス番号を設定する。
 SE07では、領域位置推定値算出部1342により、フィルタインデックス推定値mpmに部分領域の位置に応じた推定値を設定する。具体的には、部分領域の位置が2次元の特性値領域上の左端の場合(特性値Xが0の場合)には、フィルタインデックス推定値mpmに、同じ特性値Xの値を有する既に処理済みの領域のフィルタインデックスを同一特性X推定番号として設定し、そうではない場合には、直前に処理した部分領域のフィルタインデックス番号を基本推定値としてフィルタインデックス推定値mpmに設定する。なおxxx ?yyy : zzzの記号は、xxxが真である場合にはyyy、偽である場合にはzzzを割り当てる3
項演算子である。 
 SE08では、インデックス復号部1334により、MPMフラグを復号する。
 SE09では、インデックス復号部1334により、MPMフラグが0であるか否かの判定を行う。MPMフラグが0の場合にはSE10に、それ以外の場合にはSE11に遷移する。
 SE10では、インデックス復号部1334により、ループインデックスridxで示される領域のフィルタインデックスにフィルタインデックス推定値mpmを割り当てる。
 SE11では、インデックス復号部1334により、rem_idxを復号する。
 SE12では、インデックス復号部1334により、rem_idxの値がMPM以上である場合には、rem_idxから1を減じた値をループインデックスridxで示される領域のフィルタインデックスに割り当て、それ以外の場合には、rem_idxを割り当てる。
 SE13では、インデックス復号部1334により、復号したインデックスが、新インデックス番号以上であるか否かを判定する。新インデックス番号以上であればSE14に遷移し、そうではない場合には、ループに戻る。
 SE14では、新番号識別処理部1335により、新インデックス番号を1だけ増加(インクリメント)させる。
 以上のフィルタインデックス復号手順を用いて、領域構造復号部1313は、フィルタインデックスを復号する。
 (領域インデックス算出部1322)
 領域インデックス算出部1322は、ある座標(x, y)を有するフィルタ対象画素の領域インデックスridxを求める。領域インデックスの算出方法は、特徴量モードalf_region_adaptation_flagにより異なる。
 図72は、領域インデックス算出部1322の構成を示すブロック図である。領域インデックス算出部1322は、RAモード領域インデックス算出部1350、RA第1特性値算出部1351、RA第2特性値算出部1352、RAフィルタインデックス算出部1355、BA1モード領域インデックス算出部1360、BA1第1特性値算出部1361、BA1第2特性値算出部1362、BA1フィルタインデックス算出部1365、BA2モード領域インデックス算出部1370、BA2第1特性値算出部1371、BA2第2特性値算出部1372、BA2フィルタインデックス算出部1375、3Dモード領域インデックス算出部1380、3D第1特性値算出部1381、3D第2特性値算出部1382、3Dフィルタインデックス算出部1385、領域インデックス選択部1325を備える。
 領域インデックス算出部1322は、座標値(xC、yC)で指定される単位領域に対して、座標値、単位領域及びその周辺の画素値、単位領域及びその周辺の符号化パラメータから2つ以上の軸の特性値を算出して領域インデックスを算出する。
 領域インデックス選択部1325は、特徴量モードalf_region_adaptation_flagの値に応じて、領域インデックスの算出方法を切り替える。具体的には、特徴量モードがRAモード、BA1モード、BA2モード、3Dモードの何れであるかに応じて、RAモード領域インデックス算出部1350、BA1モード領域インデックス算出部1360、BA2モード領域インデックス算出部1370、3Dモード領域インデックス算出部1380から出力される領域インデックスをそれぞれ選択する。
 本実施形態では、領域インデックス選択部1325は、多次元特性を有する複数の領域インデックス算出方法を備えている。領域インデックス選択部1325は、上記構成の他、RAモード、BA1モード、BA2モード、3Dモードの内の任意の1つ、もしくは任意の2つ、もしくは任意の3つの組み合わせを備えることができる。この場合、少なくとも1つの座標空間分割モード(ここではRAモード)と、少なくとも1つの特徴空間分割モード(ここではBA1モード、BA2モード、3Dモードのうち少なくとも1つ)とを備えれば、一方の特徴量による領域分類が適当ではない場合に、他方の領域分類で補うことができるため、符号化効率上適当である。また、さらに、互いに異なる複数の特徴空間分割モードを備えることも同様の理由で適当である。
 RAモード領域インデックス算出部1350では、座標値(xC、yC)で指定される単位領域に対して、座標値を参照して領域インデックスを算出する。RA第1特性値算出部1351がX座標xCを量子化した値xIdxを出力し、RA第2特性値算出部1352がY座標yCを量子化した値yIdxを出力し、RAフィルタインデックス算出部1355において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モード領域インデックス算出部1360では、座標値(xC、yC)で指定される単位領域に対して、単位領域もしくは単位領域周辺の画素値を参照して領域インデックスを算出する。BA1第1特性値算出部1361は単位ブロックの特性値Xとして活性度actを出力し、BA1第2特性値算出部1362は単位ブロックの特性値Yとして活性度directionを出力し、BA1フィルタインデックス算出部1365において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フィルタインデックス算出部1365は、以下の式により、
ridx = act + w * direction
を求める。但しここではw=5である。
 以上のBA1モードでは、互いに直交する方向の活性度を用いて、2次元特性値を求めることにより、比較的少ない演算量で互いに直交する2つの方向のエッジを識別し、異なる領域として分類することができる。ここでは水平方向活性度と垂直方向活性度を用いることによって水平方向エッジと垂直方向エッジを識別することができる。2次元特性値を活性度と方向性という2軸にする場合に、活性度の算出に方向性の算出に用いる水平方向活性度と垂直方向活性度を使用することができるため、活性度の算出と方向性の算出に別の中間値を用いる場合に比べて演算量を削減することができる。また、方向性の算出は、水平方向活性度と垂直方向活性度の比較によって行うため比較的小さな演算量で実現可能である。
 BA2モード領域インデックス算出部1370では、座標値(xC、yC)で指定される単位領域に対して、座標値を参照して領域インデックスを算出する。BA2第1特性値算出部1371は単位ブロックの特性値Xとして活性度actを出力し、BA2第2特性値算出部1372は単位ブロックの活性度directionを出力し、BA2フィルタインデックス算出部1375において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フィルタインデックス算出部1375も、BA1と同様actとdirectionからridxを求める。
 以上のBA2モードは、BA1モードと同様、互いに直交する方向の活性度を用いて、2次元特性値を求めることにより、比較的少ない演算量で互いに直交する2つの方向のエッジを識別し、異なる領域として分類することができる。ここでは2つの互いに直交する斜め方向活性度を用いることによって斜め45度エッジとそれと直交する斜め135度方向エッジを識別することができる。なお上記角度は、水平方向を0度とした場合のエッジのなす角で説明している。
 BA1モードとBA2モードは両者を備えることは互いに相補的な識別能力を有する2つの直交した特性値算出方法を用いるという点で適当である。
BA2モードは、BA1モードが識別できない斜め45度エッジとそれと直交する斜め135度方向エッジを識別することができ、BA1モードはBA2モードでは識別できない水平方向エッジと垂直方向エッジを識別できることから、2つのモードは互いに相補的な関係を有する。BA1モードが用いる2つの活性度と、BA2モードが用いる2つの活性度は、45度の角度を有する。エッジの角度は180度点対称性を有することから、45度の角度をずらした2つのモードは、効果の上では互いに直交する特性値算出方法と言える。なお、3つのBAモードを有する場合は、互いに30度角度を変更した特性値算出方法、すなわち、0度(0度+90度)、30度(30度+120度)、60度(60度+150度)を活性度として用いるBA1モード、BA2モード、BA3モードを用いる例も、互いに相補的な識別方法を有する3つの直交した特性値算出方法という意味で適当である。なお、括弧内、例えば0度と90度は、各モードで用いる活性度の方向を意味し、モード内では互いに直交する方向を用いることが適当である。さらに、BA2モードは、活性度を求める方向以外の部分、すなわち、2つの活性度を求める計算、2つの活性度を加算し、単位領域の活性度を求める計算、活性度を量子化し特性値Xを求める計算、活性度の比較により特性値Yを求める計算、特性値Xと特性値Yから領域インデックスを求める計算に関して、BA1モードと同じ構成を用いることが可能であり、複数の特徴量モードを備える構成でありながら、装置の複雑度増加を最小限度に抑えることができる。
 また、2つ以上の方向の原特性値(例えば、2つ以上の方向の活性度、もしくは、2つ以上の方向への差分値)を用いてBA1モード及びBA2モード以上の方向識別性を有するモードを備えることも可能である。しかし、原特性値の方向を増やす場合には、特に復号装置の演算量を増加させることになるため、演算量が小さいことを重視する環境では好適ではない。一般に1枚の画像のドミナントなエッジ方向の数は限られており、適応フィルタは限られたドミナントなエッジ方向を識別することができれば、効果の増大が行えるため、2つの方向の活性度から方向性を識別するBA1モード、BA2モードのいずれか一方を選択的に用いることができれば、殆どの画像に十分な効果を発揮することができる。
 3Dモード領域インデックス算出部1380は、座標値(xC、yC)で指定される単位領域に対して、座標値を参照して領域インデックスを算出する。3D第1特性値算出部1381は単位領域の特性値Xを算出し、3D第2特性値算出部1382は単位領域の特性値Yを算出し、3D第2特性値算出部1383は単位領域の特性値Zを算出する。特性値Xと特性値Yの算出方法は、BA1モードの特性値Xactと特性値Zdirectionの算出方法と算出方法が等しいの説明を省略する。第3の特性値Zは、以下の式により、単位領域の画素値の平均値avgValを量子化した値valを用いる。
valTemp[x][y] =ΣiΣj s’[ xC + i ][ yC + j ] >> (BitDepthY)
但し、i, j = 0..3である。
valTab[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }
act = Clip3( 0, 1, valTab[valTemp[x][y]])
 続いて、3Dフィルタインデックス算出部1385は、以下の式で領域インデックスridxを求める。
 ridx = (act + direction * w) * h + val
但し、ここではw = 5、h = 2である。また、平均画素値avgValの代わりに、座標値を用いて特性値Zを算出しても良い。
 (フィルタ係数割り付け部1323)
 フィルタ係数割り付け部1323は、領域にフィルタ係数を割り当てる。まず、領域インデックス算出部1322で算出された領域インデックスridxと、領域構造復号部1312で復号されたフィルタインデックステーブルFilterIdxTbl[]から、フィルタインデックスfidxを、fix = FilterIdxTbl[ridx]により算出する。続いて、得られたフィルタインデックスfixに対応するフィルタ係数RegionFilterLuma[ridx]をフィルタ係数格納部1315から読み出し、フィルタ部1324に出力する。
 領域インデックス算出部1322とフィルタ係数割り付け部1323は全体として、各単位領域に対してフィルタ係数群の割り付けが行われる。すなわち、領域インデックス算出部1322において各単位領域に対して領域インデックスridxが算出され、フィルタ係数割り付け部1323において領域インデックスridxからフィルタ係数群の割り付けが行われる。
 なお、対象の部分領域がフィルタオフとなる場合には、フィルタ係数割り付け部1323は、その領域に対するフィルタ係数を割り付けず、フィルタ部1324に対してフィルタオフとする信号を出力する。例えば、適応的フィルタオフ復号部において、各領域に対するフィルタオフが指定されている場合や、CU単位などの単位領域毎にフィルタオフが指定されている場合がこれに該当する。
 (フィルタ部1324)
 フィルタ部1324は、対象単位領域に対して、フィルタ係数RegionFilterLuma[fidx]を用いたフィルタ処理を施すことによって、該対象単位領域におけるフィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ15に格納される。
 より具体的には、フィルタ済復号画像P_FL(「フィルタ後画像」とも呼称する)におけるフィルタ対象画素の画素値をSF(x’、y’)と表し、デブロック済復号画像P_DB(「フィルタ前画像」とも呼称する)における画素値をS(x、y)と表すことにすると、フィルタ部1324は、画素値SF(x’、y’)を、上述の数式(1-4)によって算出する。
 なお、数式(1-4)においては、すでに説明したように、座標(x、y)は座標(x’、y’)と同一の座標としてもよいし、1対1の対応を有していれば、異なった座標としてもよい。また、a(u、v)は、フィルタ前画像の画素値S(x+u、y+v)に乗ぜられるフィルタ係数を表しており、フィルタ係数割り付け部1323から供給されたフィルタ係数RegionFilterLuma[fidx]の各成分に対応する。また、oは、フィルタ係数RegionFilterLuma[fidx]に含まれるオフセット成分を表している。
 また、数式(1-4)におけるRは、フィルタ処理において参照される領域(「フィルタ参照領域R」とも呼称する)を表している。参照領域Rのタップ数は、alf_length_luma_minus5_div2によって指定される。参照領域Rとしては、例えば、図7に示したように、alf_length_luma_minus5_div2の各値に応じて設定される参照領域R0、R1、およびR2の何れかを用いればよい。なお。図7においては、菱形の参照領域を例示しているが、本実施形態における参照領域Rは、これらの例に限定されるものではなく、alf_length_luma_minus5_div2によってタップ数が指定される矩形状の参照領域を用いてもよい。
 また、各フィルタ係数は、180度の回転対称性を有するように、フィルタ参照領域Rに含まれる各画素に対して割り付けられる構成とすることができる。すなわち、a(u、v)=a(-u、-v)を満たすように設定される構成とすることができる。このような構成とすることによって、alf_coeff_luma[i][j]に含まれる各成分の数を削減することができる。
 なお、復号装置が、適応的フィルタオフ復号部を有する場合で、フィルタ係数の割り付けがない場合には、フィルタ処理は行わない。
 以上、説明した構成によれば、動画像復号装置は、座標で領域を定めるRAモードと領域単位のインデックス復号を組み合わせることができる。RAモードでは、領域インデックス算出部1322において、フィルタ対象画素及び画素を含むブロックの座標を用いて画像を分割する。また、領域構造復号部1312では、分割した領域各々に対して、各領域に対するフィルタインデックスを復号する。これによって、ある対象領域は、対象領域以外の全ての領域と同じフィルタインデックスを有することができ、全ての領域は互いにマージ可能である。画像の各領域は、上側に空があり、下側に都市がある例、などのように上下の分類が良いこともある。また、中心に人物があり、左右に背景があるなどの例では、左右に分類した上で、隣接していない左右の背景が同じ特徴を有する場合もある。このように、座標をベースに領域(各単位領域)を分類するRAモードにおいては、Y軸方向隣接関係、X軸方向隣接関係に応じて2次元的に部分領域がマージできることが重要である。さらに後者の例のように隣接関係に関わらず部分領域のマージが可能であれば同じ特徴を有する部分領域間で同じフィルタ係数を共有することが、より多くの場合で可能になる。よって、座標で部分領域を定めるRAモードと、各部分領域に対するフィルタインデックス復号を組み合わせる方法が好適である。
 さらに、説明した構成によれば、動画像復号装置は、単位領域の座標から部分領域を定めるRAモードと単位領域の画素値から部分領域を定めるBA1モードとを切り替えることができる。各々の特徴量は共に、領域インデックス算出部1322において、2つ以上の異なる特性値(単位領域の2次元特性値)から単位領域の領域インデックスを定める。2次元特性値を用いる領域分割の場合は、同じ特性値を有する部分空間同士は似た特徴を有するため、同一のフィルタ係数群を用いて好適なフィルタ処理が可能である。部分空間毎に異なるフィルタ係数群を符号化する場合に比べてフィルタ係数の符号量を低減することができる。このように、2次元特性値を用いる場合には、Y軸方向の隣接関係、X軸方向の隣接関係に応じて2次元的に部分領域がマージできることが重要である。さらに、特徴量モードによってはRAモードと同様、隣接関係に関わらず部分領域間のマージが可能であることが好適である場合もある。例えば、BA1モードにおいても、特性値Yが0の部分領域と、それとは隣接関係にない特性値Yが2の部分領域が類似しており、マージすることが好適である場合がある。具体的には、エッジ以外の領域(特性値Yのdirection=0)とエッジの領域(特性値Yのdirection=2)は類似している。2次元特性を有する場合には、各部分に対するフィルタインデックスを復号する方法は、多次元の特性値の軸(2次元であれば上下、左右)を問わない隣接関係によるマージが可能であり、及び、隣接関係によらないマージも可能であるため適当である。すなわち、複数の特徴量モードを切り替えることが可能で、その特徴量モードの各々が、2次元特性を有する場合には、各部分領域に対するフィルタインデックスを復号する構成が有効である。
 さらに、説明した構成によれば、動画像復号装置は、3次元の特性値を用いて領域インデックスを算出する3Dモードを有する。3Dモードは部分空間同士がX軸、Y軸の他、Z軸の隣接関係を有するため、その全ての部分領域とのマージが可能な各部分領域に対するフィルタインデックスを復号する構成との組み合わせが有効である。
 また、説明した構成によれば、推定フィルタインデックス算出部1333は、領域位置推定値算出部1342を有し、X軸方向に隣接する場合、Y軸方向に隣接する場合の既に符号化された隣接領域のインデックスを推定値とすることにより、比較的出現確率の高い隣接領域がマージされる場合に短い符号語を割り振る。これにより、自由度の高いマージを可能としながら、領域構造符号化に必要な符号量を低減することができる。また、残フィルタ数と残領域数を残数管理部1336で管理し、残領域数に比べて残フィルタ数が比較的多い場合に、インデックスのを推定値を新フィルタのインデックスとする新番号推定値算出部1343により、領域構造符号化に必要な符号量を低減することができる。
 また、説明した構成によれば、領域インデックスに対してつけられるフィルタパラメータの範囲を0以上、フィルタ係数AlfNumFiltersの数-1に制限する。参照可能なフィルタ係数に対して0からフィルタ係数AlfNumFiltersの数-1のフィルタインデックスが割り当てられ、フィルタインデックスに応じてフィルタ係数が格納されていることから、この制限によって、復号したフィルタインデックスを用いて容易な処理で領域インデックスからフィルタインデックスを求めフィルタ係数を割り付けることができる。
 また、説明した構成によれば、フィルタパラメータの範囲をさらに、領域インデックス順にフィルタインデックスを復号する場合において、復号されるフィルタインデックスの範囲は、0以上、既に処理した領域のフィルタインデックスの最大値+1以下に制限されるものとする。マージされる場合が、0以上最大値以下。マージされない新フィルタの場合が最大値というように値を振ることにより、新フィルタである場合(マージしない場合)も、既に処理した領域とマージする場合も、同一の方法で扱うことができるため処理が容易になる。また、最大値を管理するだけで、容易に新規フィルタの出現を判定することができる。さらに残フィルタ数と残領域数が一致する場合など、フィルタインデックスが確定する場合に、フィルタインデックスの符号化をスキップすることができ、フィルタインデックスの符号量を低減することができる。フィルタインデックスが確定する場合の、フィルタインデックスの設定も容易である。
 (動画像符号化装置8)
 以下では、符号化対象画像を符号化することによって符号化データ#7を生成する動画像符号化装置8について、図70を参照して説明する。なお、以下では、既に説明した部分については、同じ文言および同じ符号を用い、その説明を省略する。
 本実施形態に係る動画像符号化装置8は、実施形態1に係る動画像符号化装置2の備える適応フィルタ60に代えて、適応フィルタ140を備えている。本実施形態に係る動画像符号化装置8のその他の構成は、実施形態1に係る動画像符号化装置2の構成と同様であるので、説明を省略する。
 適応フィルタ140は、デブロック済復号画像P_DBに対して、適応的フィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。生成されたフィルタ済復号画像P_FLは、バッファメモリ24に格納される。また、適応フィルタ140は、フィルタ処理に用いた各種の適応フィルタ情報をフィルタパラメータFPとして可変長符号符号化部22に供給する。可変長符号符号化部22は、フィルタパラメータFPを符号化データ#7の一部として符号化する。
 図70は、適応フィルタ140の構成を示すブロック図である。図70に示すように、適応フィルタ140は、適応フィルタ情報設定部141、および、適応フィルタ部142を備えている。
 適応フィルタ情報設定部141は、図70に示すように、タップ数設定部1411、領域構造設定部1412、特徴量モード設定部1413、フィルタ係数残差生成部1414、フィルタ係数格納部1415、及び、フィルタパラメータ生成部1416を備えている。
 タップ数設定部1411は、フィルタ係数のタップ数を指定するためのシンタックスalf_length_luma_minus5_div2を設定する。設定されたシンタックスalf_length_luma_minus5_div2は、フィルタパラメータ生成部1416に供給される。
 領域構造設定部1412は、フィルタインデックステーブルFilterIndexTblを設定する。
 特徴量モード設定部1413は、シンタックスalf_region_adaptation_flag を設定する。設定されたシンタックスalf_region_adaptation_flagは、適応フィルタ部142に供給される。
 なお、alf_length_luma_minus5_div2、FilterIndexTbl、及び、alf_region_adaptation_flag、は、符号化効率がより向上するように設定される。
 フィルタ係数残差生成部1414は、以下の式によってシンタックスalf_coeff_luma[i][k]を生成する。
 alf_coeff_luma[i][k] = AlfRegionFilterCoeff[i-1][k] - AlfRegionFilterCoeff[i][k] (j=0以外の場合)
 alf_coeff_luma[0][k] = AlfRegionFilterCoeff[i][k] (i=0の場合)
 生成されたフィルタ係数残差alf_coeff_luma[i][k]はフィルタパラメータ生成部1416に供給される。
 フィルタ係数格納部1415には、後述するフィルタ係数導出部1423から供給されるフィルタ係数群AlfRegionFilterCoeff[i][k]が格納される。
 フィルタパラメータ生成部1416は、シンタックスalf_length_luma_minus5_div2とalf_region_adaptation_flag、フィルタインデックスFilterIndexTbl、、および、alf_coeff_luma[i][k]からフィルタパラメータFPを生成する。ここで、フィルタインデックスFilterIndexTblの符号化においては、i=1からAlfNumRegion-1までの各領域において、0から参照可能なフィルタインデックスの数―1までのフィルタインデックスを符号化することによって行われる。フィルタインデックスは、場合により、フィルタインデックス推定値を用いて符号化がなされる。生成されたフィルタパラメータFPは、可変長符号符号化部22に供給される。
 一方で、適応フィルタ部142は、領域インデックス算出部1322、フィルタ係数導出部1423、及びフィルタ部1324を備えている。
 フィルタ係数導出部1423は、対象単位領域におけるフィルタ済復号画像P_FLと符号化対象画像との誤差がより小さくなるようなフィルタ係数RegionFilterLuma[i][j]を導出する。導出されたフィルタ係数RegionFilterLuma[i][j]は、フィルタ部1324に供給されると共に、フィルタ係数格納部1415に格納される。
 フィルタ係数導出部1423によるフィルタ係数群RegionFilterLuma[i][k]の導出処理は、実施形態1におけるフィルタ係数導出部624と同様であるので、ここでは説明を省略する。
 <実施形態5の変形例>
 以下では、実施形態5の変形例について、図77から図85(a)~(f)までを参照して説明する。
 本変形例の具体的な説明に先立ち、非特許文献4に開示された技術の課題について図77を参照して説明する。
 非特許文献4に開示された技術では、単純に縦方向及び横方向に関する間引きを行うことから、単位領域が小さい場合において、特性値を算出するための情報が不足して、単位領域を適切に分類できないという課題があった。単位領域の分類精度が低下すると、領域単位にフィルタ係数群を変更するような適応フィルタの効果が低下するために、符号化効率が低下する。
 具体的には、非特許文献4では、図77に示すように、4×4画素の単位領域の場合において、黒丸で示す単位領域内の4点のラプラシアンの値を用いて、特性値を計算するが、間引きを行わない場合に比べ符号化効率が低下していた。
 本変形例では、非特許文献4の上記課題を解決するための構成について説明する。
 本変形例では、上述の構成に比べて、領域インデックス算出部1322の構成が異なる。その他の構成は、上述したものと同じである。
 本変形例に係る領域インデックス算出部1322は、BAモードにおける特性値算出の演算量を削減しつつ、フィルタ対象画素の領域インデックスridxを求めるための構成である。
 図78は、本変形例に係る領域インデックス算出部1322が備えるBAモード領域インデックス算出部1360´の構成を示すブロック図である。本変形例において、BAモード領域インデックス算出部1360´は、上述したBA1モード領域インデックス算出部1360及びBA2モード領域インデックス算出部1370の少なくとも何れかの代わりに用いられる。
 BAモード領域インデックス算出部1360´は、原特性値算出部1363及び第1特性値算出部1361´、第2特性値算出部1362´、フィルタインデックス算出部1365を備える。
 原特性値算出部1363は、第1特性値算出部1361´及び第2特性値算出部1362´において、特性値X及び特性値Yをそれぞれ算出するために用いられる中間値を算出する。
 図78に示すように、原特性値算出部1363は、画素特性値算出部13631、ブロック特性値加算部13632、特性値算出属性設定部13633を備えている。また、特性値属性設定部13633は、ステップサイズ設定部13634、ウィンドウサイズ設定部13635、及び、ステップ方法設定部13636を備えている。
 図80は、ウィンドウと拡張単位領域を説明するための図である。ここで、ウィンドウとは、単位領域の周辺に設定される領域のことを指す。
 図80において、太線で示す領域が単位領域であり、該単位領域は、左上座標(sx, sy)、横BlkSizeX画素、及び縦BlkSize画素の矩形で示されている。拡張単位領域とは、単位領域にウィンドウを付加して拡張した領域である。図80に示すように、ウィンドウのサイズをdx0、dx1、dy0、dy1を用いて表現したとすると、拡張単位領域は、横BlkSizeX+dx0+dx1、縦BlkSizeY+dy0+dy1の矩形になる。BAモード領域インデックス算出部1360´は、単位領域の特性値を、単位領域より大きい拡張単位領域における1または複数の画素に対して中間値を算出することにより特性値を算出する。
 図79は、BAモード領域インデックス算出部1360´の動作をプログラミング言語Cに似た形式で記述及び表現したものであり、領域特性算出関数を示している。図79を参照しながら、BAモード領域インデックス算出部1360´の各部の動作を説明する。
 BAモード領域インデックス算出部1360´は、座標(sx, sy)で指定される単位領域の領域インデックスを算出する。領域特性算出関数は、演算量削減のため、複数の単位領域の領域インデックスを同時に算出する。この時、単位領域のサイズが(BlkSizeX、BlkSizeY)であり、算出対象となる単位領域の数は(numBlkX、numBlkY)で示される。BAモード領域インデックス算出部1360´では、1画素おきに中間的な特性値を算出するのではなく、後述するステップサイズ(stepX、stepY)を用いて、X方向にstepXおき、Y方向にstepYおきに中間的な特性値を算出する間引き演算により演算量を削減する。間引き演算は、サブサンプリングとも呼ばれる。
 また、間引き演算とは、所定の領域において、画素の間引きを行い、間引かない画素に対してのみ中間的な特性値を算出するものであると表現することもできる。
 特性値算出属性設定部13633は、ステップサイズ設定部13634、ウィンドウサイズ設定部13635、ステップ方法設定部13636を用いて、間引き演算のための各種のパラメータを設定する。
 ステップサイズ設定部13634は、X方向のステップサイズとY方向のステップサイズを各々、stepX、stepYとして算出する。ウィンドウサイズ設定部13635は、単位領域よりも大きな領域の画素値を用いて特性値を算出するために用いるパラメータ(ウィンドウサイズ)を設定する手段であり、X方向開始座標拡張量dx0、X方向終了座標拡張量dx1、Y方向開始座標拡張量dy0、Y方向終了座標拡張量dy1を設定する。ここで、dx0、dx1、dy0、dy1は、0以上の整数である。ステップ方法設定部13636は、ステップ方法を定める間引きモードmodeを設定する。
 画素特性値算出部13631は、設定されたステップサイズ(stepX、stepY)、ウィンドウサイズ、ステップ方法modeを用いて、中間値として用いられる画素単位の特性値を求める。画素特性値算出部13631は、図79のS7900、S7901で示すように、単位領域の座標(sx、sy)よりもウィンドウサイズ(dx0、dx1、dy0、dy1)だけ大きい領域を、ステップサイズ(stepX、stepY)を用いた間引きを行いながら繰り返し処理を行う。より具体的には、算出する領域の開始座標を、X方向開始座標拡張量dx0、Y方向開始座標拡張量dy0だけ小さく設定し、算出する領域の終了座標を、X方向終了座標拡張量dx1、Y方向終了座標拡張量dy1だけ大きく設定する。ステップサイズstepX、stepYが1のときは毎画素に計算し、2のときは1画素置きに計算する。これによって、中間値算出の演算量がstep1×step2の大きさに比例して小さくなる。S7902にて、画素特性値算出部13631は、中間値算出に用いる座標、ここでは(x、y)を修正し(xx, y)を求めることにより、間引きモードmodeの処理を実行する。ここではY座標が奇数で、あり、modeが1である場合に、中間値算出に用いる座標をX方向に+1だけずらす(変位させる)処理を行う。また、S7902の処理では、X方向に+1だけずらす代わりに、-1だけずらす方法や+3だけずらす方法などをとることができる。また、Y座標が奇数の場合ではなく、Y座標が偶数の場合にずらすことも可能である。また、一般にY座標と所定の整数Mの剰余を計算し、剰余の値に応じてX座標をずらすことも適当である。このような例は図85で説明する。M=3の場合、剰余が0で+0、剰余が1で+1、剰余が2で+2とする方法などがある。また、上記の説明に置いてX座標とY座標を逆転させた場合、X座標と所定の整数の剰余を計算し、剰余の値に応じてY座標をずらすことも適当である。なお、この変位を加える処理は、繰り返し処理内において、変位を加えるのではなく、繰り返しの始点に変位を加える処理においても実現可能である。
 画素特性値算出部13631による中間値算出はS7903、S7904にて行われる。ここではラプラシアン演算を行っているが、ラプラシアンに限らず、差分、差分絶対値や、内積、任意のフィルタ、および、それらの積、2乗値、2乗値の差などを求めることによって中間値を算出することも可能である。また、ここでは第1BAモードに対応する中間値を算出しているが、以下の式を用いれば、第2BAモードに対応する中間値を算出することも可能である。
    varTemp1[x/stepX][y/stepY] = abs (s´[xx][y] * 2 - s´[xx-1][y-1] - s´[xx+1][y+1] );
     varTemp2[x/stepX][y/stepY] = abs (s´[xx][y] * 2 - s´[xx+1][y-1] - s´[xx-1][y+1] ) ;
 上記中間値算出の処理はnumBlkX、numBlkYで示される複数の単位領域に対して一斉に行われる。拡張単位領域を用いて中間値を算出する場合には、隣接する単位領域間で、ウィンドウサイズにかかる中間値が重複する。従って、複数の単位領域を一斉に処理する場合には冗長な中間値の算出が不要になるため演算量が低減する。なお、十分な数の単位領域の領域インデックスを一斉に計算する場合には、ウィンドウサイズによる演算量の増加は無視できる程度となる。
 続いて、算出された中間値varTemp1とvarTemp2とを用いて、ブロック特性値加算部13632は、S7907、S7908の繰り返し処理によって、各単位領域(bx, by)についてのブロック中間値varTempBlk1[bx][by]、varTempBlk2[bx][by]を計算する。なお、bx、byは単位領域のブロック座標であり、単位領域の座標(x, y)をそれぞれ単位領域のサイズ(stepX、stepY)で除算して定まる座標である。すなわちbx = x / stepX, by = y / stepYである。
 ブロック特性値加算部13632では、計算された中間値varTemp1とvarTemp2とを、各単位領域に対応するサイズの範囲において加算して、単位領域についてのブロック中間値を算出する。ここでは加算する範囲は、拡張単位領域である。S7907、S7908の繰り返し処理では、開始座標をX方向開始座標拡張量dx0、Y方向開始座標拡張量dy0だけ拡張し、終了座標をX方向終了座標拡張量dx1、Y方向終了座標拡張量dy1だけ拡張して定めることによって、拡張単位領域内の間引かない画素における中間値の加算を行う。また、ステップサイズstepX、stepYが1のときは毎画素の中間値を加算し、2のときは1画素置きの中間値を加算する。このように中間値の加算処理においても、間引きによる演算量の低減が行われる。加算処理はブロック特性値加算部13632によって、S7909、S7910で行われる。なお、上記加算処理では重み付け加算(線形和)を用いても構わない。例えば、単位領域の中心に近いほど重みが大きくなるように設定した重みを用いることが適当である。なお、ブロック中間値を求める処理は、中間値からブロックの代表値を定める他の処理を用いることもできる。例えば、順位統計量のメディアンを用いる方法や、外れ値を用いない和や平均値を用いる方法でも良い。外れ値は、拡張単位領域で算出された中間値の最大値や最小値を除く方法が一例である。また、2乗和や2乗平均、幾何平均などを用いることもできる。また、ブロック中間値を求める処理は、代表値によらず別の処理を用いても構わない。例えば、中間値間の比の平均や、中間値から所定のテーブルを参照して得られる値の平均でも構わない。上記のように複数の画素における中間値を用いて、中間値の変動を抑える処理であることが好ましい。また、ブロック中間値を求めず、直接、中間値から単位領域の特性値を算出しても構わない。
 第1特性値算出部1361´及び第2特性値算出部1362´では、上記加算処理により得られた単位領域に対するブロック中間値varTempBlk1、varTempBlk2を用いて、以下の処理を行うことにより、特性値Xであるactivity、特性値Yであるdirectionを算出する。
 S7911では、拡張単位領域のサイズextblkSizeを求める。拡張単位領域で中間値算出に用いられる画素数を求める。これは拡張単位領域の面積をステップサイズで除算して算出することができる。
 S7912とS7913では、拡張単位領域のサイズextblkSizeでブロック中間値varTempBlk1、varTempBlk2を除算することにより、値の大きさを正規化し、ブロック特性値avgTemp1、avgTemp2を求める。なお、特性値としてブロック中間値の大きさを用いる場合には、この正規化処理が必要であるが、ブロック中間値の比や、ブロック中間値の符号から特性値を算出する場合には、正規化処理はなくとも構わない。また、正規化処理は、必ずしも、正規化に用いる値は、拡張単位領域の面積でなくても良く、拡張単位領域の面積にほぼ比例する値で構わない。
 さらに、S7914~S7915では、2つの特性値avgTemp1、avgTemp2の大きさを比較することにより、特性値Yであるdirectionを算出する。
 S7917では、2つの特性値の和を用いて、単位領域の活性度を算出した後、さらに、内部画素ビット精度(InternalBitDepth)を考慮して、右シフトすることにより、画素ビット深度が8ビットの場合に換算される中間値avgTemp3を算出する。ここではクリップ関数Clip3により、0から15の間にクリップされる。S7918では、テーブルを用いて中間値avgTemp3を量子化することにより、特性値Xであるactivityを求める。
 フィルタインデックス算出部1365は、S7919で、特性値Xであるactivityと特性値Yであるdirectionとから、ブロック座標(bx、by)の領域インデックスrindex(bx, by)を算出する。
 なお、上記処理では、中間値は画素のラプラシアンを用いて算出する。ラプラシアンは対象画素の周囲の画素を用いることから、実際に特性値算出に用いられる画素の範囲は、拡張単位領域よりも大きい範囲となる。
 なお、上記処理では、ブロック中間値の比較、もしくは、ブロック中間値の量子化を用いて、2つの特性値の算出を行っているが、他の方法を用いても構わない。例えば、中間値として、勾配値の積、及び、勾配値の2乗の差を求める場合において、ブロック中間値の比と、ブロック中間値の符号を用いることも可能である。
 上記処理では、ウィンドウサイズdx0、dx1、dy1、dy2、ステップサイズstepX、stepY、間引きモードmodeによって、特性値の算出に用いる中間値を算出する画素を制御することができる。このようなパラメータを以降、特性値参照パラメータと呼ぶ。なお、特性値パラメータは、符号化データ中の値に応じて変更可能であっても良いし、復号装置、符号化装置で固定の値を用いても良い。
 以上の処理による、BAモード領域インデックス算出部1360´では、ステップサイズstepX、stepYだけ間引きして中間値を算出し、間引きされた中間値を用いて単位領域の各特性値を求めることにより、演算量の削減を行う。
 一方で、単位領域の間引きを行う場合、単位領域において用いられる情報量が低下することから、算出される特性値が単位領域の特性を十分に反映しない(特性値の精度が低い)という問題が生じ易い。
 しかしながら、本構成では、ウィンドウサイズ分だけ単位領域を拡大した拡張単位領域を用いることによって、間引きによる精度の低下を補い、特性値の精度を高めることができる。
 すなわち、本構成では、座標とサイズで指定された対象単位領域において、
 (手順1)指定されたウィンドウサイズだけ対象単位領域を拡張した拡張単位領域を設定し、
 (手順2)設定された拡張単位領域において画素の間引きを行って画素単位の中間値を求め、
 (手順3)拡張単位領域内で上記画素単位の中間値の和などによって、対象単位領域のブロック中間値を求め、
 (手順4)対象単位領域のブロック中間値から、該対象単位領域の特性値を算出する。
 以上の処理を行うことによって、領域インデックスの割り当てによる単位領域の分類精度が高まり、適当なフィルタ処理がなされることにより、符号化効率が向上する。なお、ウィンドウサイズだけ単位領域を拡大する場合においても、複数の単位領域の特性値を同時に計算することによって、演算量の増加を最小限度に抑えることが可能である。これにより、特性値算出における低い演算量と、高精度の特性値算出による高い符号化効率を両立させることが可能である。なお、比較的低い演算量と、比較的高い符号化効率を両立させるためには、特性値参照パラメータは、dx0、dx1、dy0, dy1のいずれかのウィンドウサイズが1以上であり、stepX、stepYのいずれかのステップサイズが2以上であることが必要である。
 上記の構成によれば、上記特性値算出手段は、間引かない画素の選択を、画像のY座標に応じて変更する、あるいは、ずらす処理を用いる。水平方向、垂直方向に規則的な間引きを行う構成においては、特定方向のエッジや一定のパターンの繰り返しがある場合などのように、単位領域の中で特定の位置に集中してエッジが存在する場合において、分類精度が低下するという副次的な問題を生じることがあるが、ずらしを用いることでこのような問題をある程度回避することができる。
 すなわち、上記の構成によれば、確率的に分類精度を高めることができる。本実施形態では、上記特性値算出手段は、間引きを行う画素の座標を、X軸またはY軸に沿って変位させる間引き画素座標変位手段を備えているので、単位領域の分類精度を向上させることができる。したがって、上記の構成によれば、小さな演算量にて、より高い符号化効率を実現することができる。
 図81~図84は、間引きと単位領域の拡大により、比較的低い演算量で、比較的高い精度の特性値を算出する場合に中間値算出に用いる画素を示す図である。図77と同様、黒丸が中間値を算出する画素を示す。太い実線で示す領域が単位領域となる。図81~図84では、中間値を算出する画素の間引きが行われ、また黒丸の画素が単位領域の外にあるように、単位領域外の領域の画素を用いて算出が行われる。
 図81は、単位領域のサイズが4×4、水平垂直ともに間引きが行われる例である。図81(e)は、特性値算出の参照パラメータを示すものである。stepX =2が水平方向の間引きを示し、stepY=2が垂直方向の間引きを示す。BlkSizeX+dx0+dx1、および、BlkSizeY+dy0+dy1は図81(a)~(d)の例では5であり、拡張単位領域は5×5となる。また、ラプラシアンを求める際に必要な領域まで含めると、単位領域の特性値を算出するために必要な画素は、7×7の領域である。図81(a)から(d)は、ウィンドウサイズの開始点、終了点の位置が各々異なる。
 図82は、特性値算出のための中間値を算出する画素を示す別の図である。図82(a)では、dx1=1としてX軸方向、図82(b)ではdy1=1としてY軸方向にウィンドウを設定している。図82の例のように、X軸方向もしくはY軸方向のみにウィンドウを用いる方法も適用可能である。図82(a)では、ウィンドウサイズから計算される拡張単位領域のサイズは、BlkSizeX+dx0+dx1×BlkSizeY+dy0+dy1、すなわち、5×4であり、単位領域のサイズ4×4よりも大きい。但し、間引き後の画素の範囲としての拡張単位領域のサイズは、黒丸で示す間引き後の画素の範囲は5×3である。この場合、Y軸方向のサイズが単位領域のサイズよりも小さい。図82(b)も同様に間引き値の画素の範囲は3×5と、X軸方向のサイズは単位領域のサイズよりも小さい。この不一致は間引きを行った部分を拡張単位領域に含めるか否かによる。本実施形態のBAモード領域インデックス算出部1360´による処理には、図82(a)、(b)の例のように、間引きされた部分を含めない場合に単位領域よりも一部小さくなる場合の処理が含まれる。
 図83は、特性値算出のための中間値を算出する画素を示す別の図である。図83(a)、(b)は、水平間引きが行われる例であり、stepX =2、stepY=1である。図83(c)、(d)は、垂直間引きが行われる例であり、stepX =1、stepY=2である。図83(e)(f)は、水平、垂直を合わせて互い違いに間引きが行われる場合であるが、本実施形態では、stepX=2、stepY=1をパラメータとして、水平方向に1/2間引きが行われ、垂直方向は毎ライン処理がなされる方法として処理される。互い違いであることは、Y座標が奇数の場合に、図83(e)ではX座標を+1する。もしくは、図83(f)では-1する方法で処理される。これは、具体的には、既に説明したS7902の処理に対応する。図83(g)は、特性値算出の参照パラメータを示す。また、水平に間引く場合はハードの構成によっては演算量の低下が生じない場合や、間引き処理の前処理、後処理に処理が必要である場合があるため、水平間引きと垂直間引きであれば、垂直間引きを優先して用いることが良い。従って、図83(c)、(d)は好適な例である。
 図84は、特性値算出のための中間値を算出する画素を示す別の図である。図84(a)の例は、BlkSizeX=2、BlkSizeY=2、すなわち、単位領域のサイズが2×2の例、図84(b)、(c)の例は、各々、単位領域のサイズが4×2の例、2×4の例である。このように、単位領域の大きさによらず、間引き及びウィンドウを用いる方法が適用可能である。
 図85は、特性値算出のための中間値を算出する画素を示す別の図である。(a)から(f)は、いずれも間引き率は1/4になる例である。(a)、(b)、(e)、(f)は、水平間引きstepX=4、垂直間引きstepY=1として、S7902で間引きモードが1の場合で示すように、Y座標の剰余の値に応じて、X座標をずらすことによって行われる 。図85(a)は、ウィンドウサイズをdx0=0、dx1=1、dx0=1、dy1=1に設定して、Y座標の2の剰余が0の場合(Y座標が偶数の場合)に+2ずらし、それ以外は0ずらしを行う例を示している。(b)は(a)と同じウィンドウサイズで、Y座標の2の剰余が1の場合(Y座標が奇数の場合)に+2ずらし、それ以外は0ずらしを行う例を示している。(e)は、ウィンドウサイズをdx0=0、dx1=1、dy0=1、dy1=1に設定して、Y座標の4の剰余が0、1、2、3の場合の各々、ずらしなし、+2ずらし、+3ずらし、+1ずらしを行う例を示している。(f)は、(e)と同じウィンドウサイズで、Y座標の4の剰余が0、1、2、3の場合の各々、+1ずらし、+3ずらし、+2ずらし、ずらしなしを行う例を示している。
 図85の(a)から(f)では、Y座標に応じて中間値を算出する画素の数が異なる。(a)の例では、上から2個、1個、2個、1個、2個、1個のようになる。この処理は、図79の処理に以下の処理を追加することで可能である。すなわち、ブロック特性加算部の処理においても、ずらした後のX座標(図79に示す「xx」)を計算し、その値xxが拡張単位領域の範囲(X座標でBlkSizeX*(bx+1)+dx1-1)を超える場合には、S7909、S7910の加算をスキップする処理をで行うこともできる。また、Y座標の剰余の数に応じて、S7908のX座標の繰り返し処理における、繰り返しの回数を変更することで行うこともできる。これらの例のように変位量(変位量)が大きい場合には、中間値を算出する画素の範囲である拡張単位領域は、本明細書定義のウィンドウサイズだけでなく、変位量によっても定まることになる。変位量に応じて拡張単位領域が定まる場合には、S7911の拡張単位領域のサイズを求める処理も、変位量に応じた対応を行う。予め取り得るウィンドウサイズと変位量が定まっている場合には、(a)の例では、2+1+2+1+2+1=9となるように、特定の特性値算出の参照パラメータ毎に、拡張単位領域のサイズも定まるものであるので、予め取りうる特性値算出の参照パラメータ毎に、拡張単位領域のサイズを計算しておき、拡張単位領域サイズ格納領域などに格納しておき、特性値を算出する時点で、拡張単位領域サイズ格納領域を参照することで定めればよい。そうではない場合には、S7909、S7910で行われるカウントの回数をカウントし、そのカウントの回数を拡張単位領域サイズとして用いる。なお、このサイズが2の指数乗でない場合には、シフト演算では除算を実行することができないが、所定の定数Nに対して、k=2のN条/拡張単位領域サイズを計算し、kを乗算した後で、Nビットだけ右シフトすることによって、整数演算による除算を適用することができる。
 図85(c)、(d)は、水平間引きstepX=2、垂直間引きstepY=2として、S7902で間引きモードが1の場合で示すように、Y座標の剰余の値に応じて、X座標をずらすことによって行われる。(c)は、ウィンドウサイズをdx1=1、dx1=1、dy0=0、dy1=1に設定して、Y座標の4の剰余が0である場合に+1ずらしを行う例であり、(d)は同じウィンドウサイズで、Y座標の4の剰余が2である場合に+1ずらしを行う例である。
 図85の例のように間引き率が1/4の場合のように、大きな間引きを行う場合には、ウィンドウサイズを1以上にするとともに、中間値を算出する位置をずらすことが適当である。
 <付記事項1>
 上述した動画像符号化装置2、4、6、8及び動画像復号装置1、3、5、7は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
 まず、上述した動画像符号化装置2及び動画像復号装置1を、動画像の送信及び受信に利用できることを、図86を参照して説明する。動画像符号化装置4、6、8及び動画像復号装置3、5、7についても同様である。
 図86の(a)は、動画像符号化装置2を搭載した送信装置PROD_Aの構成を示したブロック図である。図86の(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を更に備えていてもよい。図86の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。
 図86の(b)は、動画像復号装置1を搭載した受信装置PROD_Bの構成を示したブロック図である。図86の(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を更に備えていてもよい。図86の(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の双方として機能する。
 次に、上述した動画像符号化装置2及び動画像復号装置1を、動画像の記録及び再生に利用できることを、図87を参照して説明する。動画像符号化装置4、6、8及び動画像復号装置3、5、7についても同様である。
 図87の(a)は、上述した動画像符号化装置2を搭載した記録装置PROD_Cの構成を示したブロック図である。図87の(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を更に備えていてもよい。図87の(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の一例である。
 図87の(b)は、上述した動画像復号装置1を搭載した再生装置PROD_Dの構成を示したブロックである。図87の(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を更に備えていてもよい。図87の(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の一例である。
 <付記事項2>
 上述した動画像復号装置1、3、5、7および動画像符号化装置2、4、6、8の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(Random Access Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM/MO/MD/DVD/CD-R等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。
 <付記事項3>
 上記の問題を解決するために、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、を備え、上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する、ことを特徴としている。
 上記のように構成された本発明に係る画像フィルタ装置によれば、新規フィルタ係数フラグによって、領域分類の数を制御することができ、候補選択インデックスに従って、第1の特性値が等しい、もしくは、第2の特性値が等しい部分領域と、同じフィルタ係数群を用いることができる。
 したがって、上記の構成によれば、処理順で隣り合う部分領域がマージ可能であることに加え、第1の特性値と第2の特性値の軸でマージ可能であるので、特性値領域の2次元的な自由度を、従来の技術に比べて効果的に生かすことができる。これにより、各部分領域に対して、フィルタ係数群をより適切に割り付けることができるので、符号量及び処理量の増大を抑制しつつ符号化効率を向上させることができる。
 なお、上記単位領域とは、上記入力画像を構成する複数の重複しない領域の各々ことを表すものとする。上記画像フィルタ装置が、画像を符号化する符号化装置、および、符号化データから画像を復号する復号装置において用いられる場合には、上記単位領域を、例えば、予測画像を生成する単位である予測単位(パーティション)としてもよいし、周波数変換の単位である変換単位としてもよいし、それら以外のものとしてもよい。例えば、上記単位領域は、1画素から構成されるものであってもよい。
 また、候補選択インデックスは、対象部分領域に対し第1特性値に関して隣接する部分領域と、対象部分領域に対し第2特性値に関して隣接する部分領域とを候補選択として含むことが好ましい。
 また、候補選択インデックスは、対象部分領域の直前に処理した部分領域を候補選択として含むことが好ましい。
 また、候補選択インデックスは、第1特性値と第2特性値とが1つづつ異なる既に処理した部分領域を候補選択として含むことが好ましい。
 また、候補選択インデックスは、既に処理した部分領域のフィルタ係数群を示すインデックスであることが好ましい。
 また、候補選択インデックスは、マージ用のインデックスであり、新規フィルタ係数群を用いない部分領域に対して用いられるフィルタ係数群を選択することが好ましい。
 また、候補選択インデックスは、予測用のインデックスであり、新規フィルタ係数群を用いる部分領域に対して、予測値として用いられるフィルタ係数群を選択することが好ましい。
 また、候補選択インデックスは、新規フィルタ係数群を用いる部分領域では予測値として用いられるフィルタ係数群の選択に用いられれ、新規フィルタ係数群を用いない部分領域では用いるフィルタ係数群の選択に用いられることを特徴とすることが好ましい。
 また、上記画像フィルタ装置で用いる前記第1及び第2の特性値は、各単位領域の座標であることが好ましい。
 本発明に係る復号装置は、符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、上記画像フィルタ装置と、各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、ことを特徴としている。
 本発明に係る符号化装置は、符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、上記画像フィルタ装置と、各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、ことを特徴としている。
 また、上記フィルタ手段によって用いられるフィルタ係数群は、単位領域毎に、上記符号化対象画像と上記出力画像との相違がより小さくなるように定められたものである、ことが好ましい。
 上記の構成によれば、上記フィルタ手段によって用いられるフィルタ係数は、単位領域毎に、上記符号化対象画像と上記出力画像との相違がより小さくなるように定められたものであるので、符号化効率が向上する。
 本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、を備え、上記フィルタ手段によって、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタ係数群とその予測値との残差、及び上記新規フィルタ係数フラグと上記候補選択インデックス、を含んでいる。
 上記符号化データを復号する画像フィルタ装置は、上記領域分類情報と、上記割り付け指定情報を参照することによって、特性値領域の2次元的な自由度を生かした適切なフィルタ処理を行うことができる。
 また、フィルタ係数群の数を更に含んでいることが好ましい。
 上記符号化データを復号する画像フィルタ装置は、フィルタ係数群の数を用いて、新規フィルタ係数群を用いるか否かのフラグの符号化/復号を制御することができるので、符号化データの符号量を低減することができる。
 <付記事項4>
 本明細書中(特に実施形態1及び2)に記載された発明は、以下のように表現することができる。
 1.
 複数の単位領域から構成される入力画像に作用するフィルタ手段と、
 各単位領域における上記入力画像の画像特性を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、
 上記第1及び第2の特性値によって張られる特性値領域を、特性値分割情報に従って複数の特性値部分領域に分割する特性値分割手段と、
を備え、
 上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する特性値部分領域について設定されたフィルタ係数を用いて算出する、
ことを特徴とする画像フィルタ装置。
 2.
 上記特性値分割手段は、上記特性値領域を、第1の分割によって1または複数の特性値部分領域に分割したうえで、当該第1の分割によって得られた各特性値部分領域を、第2の分割によって1または複数の特性値部分領域に更に分割するものである、
ことを特徴とする1.に記載の画像フィルタ装置。
 3.
 上記第1の分割は、上記第1の特性値に関するものであり、上記第2の分割は、上記第2の特性値に関するものである、
ことを特徴とする2.に記載の画像フィルタ装置。
 4.
 上記第1の分割は、上記第1の特性値に関するものであり、上記第2の分割は、上記第1の特性値及び上記第2の特性値に関するものである、
ことを特徴とする2.に記載の画像フィルタ装置。
 5.
 外部から取得したタップ数指定情報に従って、上記フィルタ手段のタップ数を、上記第1の分割によって得られた特性値部分領域毎に設定するタップ数設定手段を更に備えている、
ことを特徴とする2.から4.の何れか1項に記載の画像フィルタ装置。
 6.
 外部から取得したオンオフ指定情報に従って、上記フィルタ手段のオンオフを、上記第2の分割によって得られた特性値部分領域毎に制御するオンオフ制御手段を更に備えている、
ことを特徴とする2.から5.の何れか1項に記載の画像フィルタ装置。
 7.
 上記第1の特性値は、各単位領域における上記入力画像の乱雑さを示すものである、
ことを特徴とする1.から6.の何れか1項に記載の画像フィルタ装置。
 8.
 符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
 1.から7.の何れか1項に記載の画像フィルタ装置と、
 各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
ことを特徴とする復号装置。
 9.
 復号対象の特性値部分領域である対象特性値部分領域について設定されるフィルタ係数を、上記符号化データに含まれるフィルタ係数残差のうち、当該対象特性値部分領域についてのフィルタ係数残差と、当該対象特性値部分領域の周辺の特性値部分領域について復号済みのフィルタ係数とを加算することによって復号するフィルタ係数復号手段を更に備えている、
ことを特徴とする8.に記載の復号装置。
 10.
 符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
 1.から7.の何れか1項に記載の画像フィルタ装置と、
 各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
ことを特徴とする符号化装置。
 11.
 上記フィルタ手段によって用いられるフィルタ係数は、単位領域毎に、上記符号化対象画像と上記出力画像との相違がより小さくなるように定められたものである、
ことを特徴とする10.に記載の符号化装置。
 12.
 複数の単位領域から構成される入力画像の各単位領域における画像特性を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、当該第1及び第2の特性値によって張られる特性値領域を複数の特性値部分領域に分割する特性値分割手段と、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する特性値部分領域について設定されたフィルタ係数群を用いて算出するフィルタ手段と、を備えている画像フィルタ装置によって参照される符号化データのデータ構造において、
 上記特性値分割手段によって参照される特性値分割情報であって、上記特性値領域の分割の仕方を指定する特性値分割情報と、
 上記フィルタ手段によって用いられるフィルタ係数であって、上記特性値部分領域の各々についてのフィルタ係数と、
を含んでいることを特徴とする符号化データのデータ構造。
 13.
 上記特性値分割手段は、上記特性値領域を、第1の分割によって複数の特性値部分領域に分割したうえで、当該第1の分割によって得られた各特性値部分領域を、第2の分割によって複数の特性値部分領域に更に分割するものであり、
 上記特性値分割情報は、
 上記第1の分割における分割点を指定する第1分割点指定情報と、
 上記第2の分割における分割点を指定する第2分割点指定情報と、
を含んでいることを特徴とする12.に記載の符号化データのデータ構造。
 14.
 上記フィルタ手段のタップ数を、上記第1の分割によって得られた特性値部分領域毎に指定するするタップ数指定情報を更に含んでいる、
ことを特徴とする13.に記載の符号化データのデータ構造。
 15.
 上記フィルタ手段のオンオフを、上記第2の分割によって得られた特性値部分領域毎に指定するオンオフ指定情報を更に含んでいる、
ことを特徴とする13.または14.に記載の符号化データのデータ構造。
 <付記事項5>
 本明細書中(特に実施形態3)に記載された発明は、以下のように表現することができる。
 A1.
 複数の単位領域から構成される入力画像に作用するフィルタ手段と、
 各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、
 上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々を、領域分類情報に従って1又は複数のグループの何れかに分類する領域分類手段と、
 処理対象の部分領域である対象部分領域に対して、該対象部分領域に関連付けられた割り付け指定情報に従って、処理順で該対象部分領域の直前の部分領域に割り付けられたフィルタ係数、または、該直前の部分領域に割り付けられたフィルタ係数とは異なるフィルタ係数を割り付けるフィルタ係数割り付け手段と、
を備え、
 上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数を用いて算出する、
ことを特徴とする画像フィルタ装置。
 A2.
 上記領域分類手段は、各部分領域を、上記第1の特性値に基づいて1又は複数のグループの何れかに分類するものであり、
 上記処理順は、上記第2の特性値に基づいて定められるものである、
ことを特徴とするA1に記載の画像フィルタ装置。
 A3.
 上記領域分類手段は、各部分領域を、上記第1の特性値に基づいて1又は複数のグループの何れかに分類するものであり、
 上記処理順は、上記第1及び第2の特性値に基づいて定められるものである、
ことを特徴とするA1に記載の画像フィルタ装置。
 A4.
 上記領域分類手段は、各部分領域を、上記第1及び第2の特性値に基づいて1又は複数のグループの何れかに分類するものであり、
 上記処理順は、上記第1及び第2の特性値に基づいて定められるものである、
ことを特徴とするA1に記載の画像フィルタ装置。
 A5.
 上記第1の特性値は、各単位領域における上記入力画像の方向性によって定まるものであり、上記第2の特性値は、各単位領域における上記入力画像の乱雑さによって定まるものである、
ことを特徴とするA1からA4の何れか1項に記載の画像フィルタ装置。
 A6.
 上記入力画像の方向性は、上記入力画像の水平方向及び垂直方向の乱雑さによって定められるものである、
ことを特徴とするA5に記載の画像フィルタ装置。
 A7.
 上記入力画像の方向性は、上記入力画像の互いに異なる2つの斜め方向の乱雑さによって定められるものである、
ことを特徴とするA5に記載の画像フィルタ装置。
 A8.
 上記第1の特性値は、上記入力画像における各単位領域の垂直方向の座標によって定まるものであり、上記第2の特性値は、上記入力画像における各単位領域の水平方向の座標によって定まるものである、
ことを特徴とするA1からA4の何れか1項に記載の画像フィルタ装置。
 A9.
 上記第1の特性値は、上記入力画像における各単位領域の水平方向の座標によって定まるものであり、上記第2の特性値は、上記入力画像における各単位領域の垂直方向の座標によって定まるものである、
ことを特徴とするA1からA4の何れか1項に記載の画像フィルタ装置。
 A10.
 符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
 A1からA9の何れか1項に記載の画像フィルタ装置と、
 各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
ことを特徴とする復号装置。
 A11.
 符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
 A1からA9の何れか1項に記載の画像フィルタ装置と、
 各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
ことを特徴とする符号化装置。
 A12.
 上記フィルタ手段によって用いられるフィルタ係数は、単位領域毎に、上記符号化対象画像と上記出力画像との相違がより小さくなるように定められたものである、
ことを特徴とするA11に記載の符号化装置。
 A13.
 入力画像を構成する各単位領域における当該入力画像の画像特性又は当該入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々を、領域分類情報に従って1又は複数のグループの何れかに分類する領域分類手段と、処理対象の部分領域である対象部分領域に対して、該対象部分領域に関連付けられた割り付け指定情報に従って、処理順で該対象部分領域の直前の部分領域に割り付けられたフィルタ係数、または、該直前の部分領域に割り付けられたフィルタ係数とは異なるフィルタ係数を割り付けるフィルタ係数割り付け手段と、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数を用いて算出するフィルタ手段と、を備えている画像フィルタ装置によって参照される符号化データのデータ構造であって、
 上記フィルタ係数とその予測値との残差、
 上記領域分類情報、及び、
 上記割り付け指定情報、
を含んでいることを特徴とする符号化データのデータ構造。
 A14.
 上記特性値算出手段によって参照される特性値指定情報であって、上記第1及び第2の特性値の導出方法を指定する特性値指定情報を更に含んでいる、
ことを特徴とするA13に記載の符号化データのデータ構造。
 <付記事項6>
 本明細書中(特に実施形態4)に記載された発明は、以下のように表現することができる。
 B1.
 複数の単位領域から構成される入力画像に作用するフィルタ手段と、
 各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、
 上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域を1又は複数のグループの何れかに分類する領域分類手段と、
 処理対象の部分領域である対象部分領域に対して、フィルタ係数を割り付けるフィルタ係数割り付け手段と、
を備え、
 上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数を用いて算出する、
ことを特徴とする画像フィルタ装置。
 B2.
 候補選択インデックスは、対象部分領域に対し第1特性値に関して隣接する部分領域と、対象部分領域に対し第2特性値に関して隣接する部分領域とを候補選択として含むことを特徴とするB1.に記載の画像フィルタ装置。
 B3.
 候補選択インデックスは、対象部分領域の直前に処理した部分領域を候補選択として含むことを特徴とするB1.に記載の画像フィルタ装置。
 B4.
 候補選択インデックスは、第1特性値と第2特性値とが1つづつ異なる既に処理した部分領域を候補選択として含むことを特徴とするB1.に記載の画像フィルタ装置。
 B5.
 候補選択インデックスは、既に処理したフィルタ係数群の全てを候補選択として含むことを特徴とするB1.に記載の画像フィルタ装置。
 B6.
 候補選択インデックスは、マージ用のインデックスであり、新規フィルタ係数群を用いない部分領域に対して用いられるフィルタ係数群を選択することを特徴とするB1.からB5.の何れか1項に記載の画像フィルタ装置。
 B7.
 候補選択インデックスは、予測用のインデックスであり、新規フィルタ係数群を用いる部分領域に対して、予測値として用いられるフィルタ係数群を選択することを特徴とするB1.からB5.の何れか1項に記載の画像フィルタ装置。
 B8.
 候補選択インデックスは、新規フィルタ係数群を用いる部分領域では予測値として用いられるフィルタ係数群の選択に用いられ、新規フィルタ係数群を用いない部分領域では用いるフィルタ係数群の選択に用いられることを特徴とするB1.からB5.の何れか1項に記載の画像フィルタ装置。
 B9.
 上記画像フィルタ装置は、さらに特性値を選択する特徴量モードを入力とし、特徴量モードに応じて、候補選択インデックスの決定方法を切り替えることを特徴とするB1.からB8.の何れか1項に記載の画像フィルタ装置。
 B10.
 上記画像フィルタ装置は、特徴量モードが座標空間分割である場合と、特徴量が座標空間分割以外である場合とに応じて、候補選択インデックスの選択肢の数を変更することを特徴とするB9.に記載の画像フィルタ装置。
 B11.
 上記画像フィルタ装置は、さらにフィルタ係数群の数を入力とし、既に復号されたフィルタ係数群の数が、入力されたフィルタ係数群の数よりも小さい場合に、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグを入力することを特徴とするB1.からB10.の何れか1項に記載の画像フィルタ装置。
 B12.
 符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
 B1.からB11.の何れか1項に記載の画像フィルタ装置と、
 各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
ことを特徴とする復号装置。
 B13.
 符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
 B1.からB11.の何れか1項に記載の画像フィルタ装置と、
 各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
ことを特徴とする符号化装置。
 B14.
 上記フィルタ手段によって用いられるフィルタ係数は、単位領域毎に、上記符号化対象画像と上記出力画像との相違がより小さくなるように定められたものである、
ことを特徴とするB13.に記載の符号化装置。
 B15.
 複数の単位領域から構成される入力画像に作用するフィルタ手段と、
 各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、
 上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域を1又は複数のグループの何れかに分類する領域分類手段と、
 処理対象の部分領域である対象部分領域に対して、フィルタ係数を割り付けるフィルタ係数割り付け手段と、
を備え、
 上記フィルタ手段によって、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数を用いて算出する画像フィルタ装置によって参照される符号化データのデータ構造であって、
 上記フィルタ係数とその予測値との残差、及び
 上記新規フィルタ係数フラグと上記候補選択インデックス、
を含んでいることを特徴とする符号化データのデータ構造。
 B16.
 フィルタ係数群の数を更に含んでいる、
ことを特徴とするB15.に記載の符号化データのデータ構造。
 <付記事項7>
 本明細書中(特に実施形態5)に記載された発明は、以下のように表現することができる。
 C.1
 複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、該単位領域について割り付けられたフィルタ係数を用いて算出するフィルタ手段と、
 各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、
 各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、
 処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段と
を備えていることを特徴とする画像フィルタ装置。
 C.2
 前記領域インデックス算出手段による処理モードには、各単位領域を分類するための領域インデックスを、少なくとも該単位領域のX座標値とY座標値とから算出するRAモードが含まれている
ことを特徴とするC.1に記載の画像フィルタ装置。
 C.3
 各領域インデックスの算出方法を指定する特徴量モードを復号する特徴量モード復号手段を更に備え、
 前記領域インデックス算出手段は、前記特徴量モード復号手段によって復号された特徴量モードに応じて、各領域インデックスを算出するための、多次元の特性値を切り替えることを特徴とするC.1に記載の画像フィルタ装置。
 C.4
 前記領域インデックス算出手段による処理モードには、
  各単位領域を分類するための領域インデックスを、少なくとも該単位領域のX座標値とY座標値とから算出するRAモードと、
  各単位領域を分類するための領域インデックスを、該単位領域の画素値から算出される2次元の特性値X及び特性値Yから算出するBAモードと
が含まれていることを特徴とするC.1またはC.3に記載の画像フィルタ装置。
 C.5
 前記領域インデックス算出手段による処理モードには、
  各単位領域を分類するための領域インデックスを、該単位領域における水平方向活性度と垂直方向活性度を用いて算出する第1のBAモードと、
  各単位領域を分類するための領域インデックスを、該単位領域における2つの斜め方向活性度を用いて算出する第2のBAモードと
が含まれていることを特徴とするC.1に記載の画像フィルタ装置。
 C.6
 前記領域構造復号手段において復号されるフィルタインデックスの値は、復号済みのフィルタインデックスの値を全て含むインデックス群の要素であることを特徴とするC.1からC.5の何れか1項に記載の画像フィルタ装置。
 C.7
 前記領域構造復号手段において復号されるフィルタインデックスの値は、0を最小値とし復号済みのフィルタインデックスの最大値に1を加えたものを最大値とする範囲に含まれている、
ことを特徴とするC.1からC.6の何れか1項に記載の画像フィルタ装置。
 C.8
 前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、
 前記領域構造復号手段は、前記領域インデックスが算出されていない部分領域の数である残領域数と、未復号のフィルタインデックスの数である残フィルタ数とが一致する場合には、フィルタインデックスを復号することなくフィルタインデックステーブルを生成することを特徴とするC.1からC.7の何れか1項に記載の画像フィルタ装置。
 C.9
 前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、
 前記領域構造復号手段は、処理対象の部分領域である対象部分領域のフィルタインデックスの推定値を算出する推定フィルタインデックス算出手段を備え、
 前記推定フィルタインデックス算出手段は、未復号のフィルタインデックスの数である残フィルタ数を用いて、対象部分領域のフィルタインデックスの推定値を算出することを特徴とするC.1からC.8の何れか1項に記載の画像フィルタ装置。
 C.10
 前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、
 前記領域構造復号手段は、処理対象の部分領域である対象部分領域のフィルタインデックスの推定値を算出する推定フィルタインデックス算出手段を備え、
 前記推定フィルタインデックス算出手段は、直前に処理された部分領域のフィルタインデックスの値を用いて、対象部分領域のフィルタインデックスの推定値を算出することを特徴とするC.1からC.8の何れか1項に記載の画像フィルタ装置。
 C.11
 前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、
 前記領域構造復号手段は、処理対象の部分領域である対象部分領域のフィルタインデックスの推定値を算出する推定フィルタインデックス算出手段を備え、
 前記推定フィルタインデックス算出手段は、前記領域インデックス算出手段によって対象部分領域の領域インデックスを算出する際に参照された複数の特性値の軸のうち、特定の軸に沿った部分領域についての復号済フィルタインデックスの値を用いて、対象部分領域のフィルタインデックスの推定値を算出することを特徴とするC.1からC.8の何れか1項に記載の画像フィルタ装置。
 C.12
 各単位領域における上記特性値を算出する特性値算出手段を更に備え、
 上記特性値算出手段は、
  対象単位領域を所定のウィンドウサイズだけ拡張して得られる拡張単位領域において、画素の間引きを行うと共に、間引かない画素に対してのみ画素単位の特性値である中間値を算出し、
  上記拡張単位領域内での上記中間値の線形和をとることによって、上記対象単位領域におけるブロック中間値を算出し、
  上記ブロック中間値を用いて、上記対象単位領域の特性値を算出する、
ことを特徴とするC.1からC.11の何れか1項に記載の画像フィルタ装置。
 C.13
 上記特性値算出手段は、間引きを行う画素の座標を、X軸またはY軸に沿って変位させる間引き画素座標変位手段を備えている、
ことを特徴とするC.12に記載の画像フィルタ装置。
 C.14
 符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
 C.1からC.13の何れか1項に記載の画像フィルタ装置と、
 各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
ことを特徴とする復号装置。
 C.15
 符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
 C.1からC.13の何れか1項に記載の画像フィルタ装置と、
 各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
を備え、
 上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
ことを特徴とする符号化装置。
 C.16
 複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、該単位領域について割り付けられたフィルタ係数を用いて算出するフィルタ手段と、各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段とを備えている画像フィルタ装置によって参照される符号化データのデータ構造であって、
 上記フィルタインデックステーブルと、
 上記フィルタ係数と
を含んでいることを特徴とする符号化データのデータ構造。
 <付記事項8>
 上述のC.1~C.16の各構成、及び各構成による作用効果は以下の通りである。
 すなわち、上記画像フィルタ装置は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、該単位領域について割り付けられたフィルタ係数を用いて算出するフィルタ手段と、各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段とを備えていることを特徴としている。
 上記のように構成された本発明に係る画像フィルタ装置によれば、各領域インデックスに対して復号されたフィルタパラメータを用いて直接、各領域に対して割りつけられるフィルタ係数群を参照するため、容易な処理で各単位領域にフィルタ係数を割り付けることができる。また、領域インデックスの各々に対するフィルタインデックスが同一であることを用いて領域のグループ分けを行うため、自由度の高いグループ分けが可能になり、画像の領域特性に合わせたフィルタ処理ができる。そのため、符号化効率が向上する。
 なお、上記単位領域とは、上記入力画像を構成する複数の重複しない領域の各々ことを表すものとする。上記画像フィルタ装置が、画像を符号化する符号化装置、および、符号化データから画像を復号する復号装置において用いられる場合には、上記単位領域を、例えば、予測画像を生成する単位である予測単位(パーティション)としてもよいし、周波数変換の単位である変換単位としてもよいし、それら以外のものとしてもよい。例えば、上記単位領域は、1画素から構成されるものであってもよい。
 また、前記領域インデックス算出手段による処理モードには、各単位領域を分類するための領域インデックスを、少なくとも該単位領域のX座標値とY座標値とから算出するRAモードが含まれていることが好ましい。
 上記構成によれば、RAモードにおいて、自由度の高いグループ分けが可能になり、画像の領域特性に合わせたフィルタ処理ができる。そのため、符号化効率が向上する。
 なお、上記RAモードでは、X座標軸もしくはY座標軸において隣接する単位領域以外にも、同種の特性を有する領域が存在する。
 また、上記画像フィルタ装置は、各領域インデックスの算出方法を指定する特徴量モードを復号する特徴量モード復号手段を更に備え、前記領域インデックス算出手段は、前記特徴量モード復号手段によって復号された特徴量モードに応じて、各領域インデックスを算出するための、多次元の特性値を切り替えることが好ましい。
 上記構成によれば、多次元の特性値から領域インデックスを算出する領域分類方法を複数備える場合において、領域分類方法(特徴量モード)によらず、適した領域分類を行うことができるため、少ないフィルタ係数群を用いて画像の領域特性に合わせたフィルタ処理ができる。そのため、符号化効率が向上する。
 また、前記領域インデックス算出手段による処理モードには、各単位領域を分類するための領域インデックスを、少なくとも該単位領域のX座標値とY座標値とから算出するRAモードと、各単位領域を分類するための領域インデックスを、該単位領域の画素値から算出される2次元の特性値X及び特性値Yから算出するBAモードとが含まれていることが好ましい。
 上記構成によれば、多次元の特性値としてBAモードとRAモードとを備える場合において、領域分類方法(特徴量モード)によらず、適した領域分類を行うことができるため、少ないフィルタ係数群を用いて画像の領域特性に合わせたフィルタ処理ができる。そのため、符号化効率が向上する。
 また、前記領域インデックス算出手段による処理モードには、各単位領域を分類するための領域インデックスを、該単位領域における水平方向活性度と垂直方向活性度を用いて算出する第1のBAモードと、各単位領域を分類するための領域インデックスを、該単位領域における2つの斜め方向活性度を用いて算出する第2のBAモードとが含まれていることが好ましい。
 上記構成によれば、BA1モード、BA2モードともに2つの異なる方向の活性度を用いて、異なる領域のエッジ方向を識別することができる。またBA1モード、BA2モードは2つの活性度を用いるという点は同一であるため小さな複雑度となる。2つのモードは識別可能なエッジ方向が異なることから、互いに相補的なエッジ分類効果を有する。これにより小さな複雑度において多くの種類の画像を効果的に分類することが可能になり、画像の領域特性に応じて適したフィルタ係数を割り当てることができる。そのため、符号化効率が向上する。
 また、 前記領域構造復号手段において復号されるフィルタインデックスの値は、復号済みのフィルタインデックスの値を全て含むインデックス群の要素であることが好ましい。
 上記構成によれば、ある対象領域は、該対象領域以外の全ての領域と同じフィルタインデックスを有することが可能となる。また、全ての領域は互いにマージ可能であるため、画像を領域特性に応じて無駄なく分類することができ、少ないフィルタ係数群を用いて画像の領域特性に合わせたフィルタ処理ができる。そのため、符号化効率が向上する。
 また、前記領域構造復号手段において復号されるフィルタインデックスの値が、0以上、先頭領域から処理対象領域の直前までの領域に対して出現したフィルタインデックスの最大値+1以下の値をであることが好ましい。
 上記の構成によれば、対象領域が、既に処理された領域とマージされる場合と、マージされない場合を同一の方法で扱うことができるため処理が容易になる。
 また、前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、前記領域構造復号手段は、前記領域インデックスが算出されていない部分領域の数である残領域数と、未復号のフィルタインデックスの数である残フィルタ数とが一致する場合には、フィルタインデックスを復号することなくフィルタインデックステーブルを生成することが好ましい。
 上記の構成によれば、フィルタインデックスを復号せずに一部もしくは全てのフィルタインデックステーブルを生成することができるため、領域構造を符号化する符号量が低減し符号化効率が向上する。
 また、前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、前記領域構造復号手段は、処理対象の部分領域である対象部分領域のフィルタインデックスの推定値を算出する推定フィルタインデックス算出手段を備え、前記推定フィルタインデックス算出手段は、未復号のフィルタインデックスの数である残フィルタ数を用いて、対象部分領域のフィルタインデックスの推定値を算出することが好ましい。
 上記の構成によれば、残フィルタ数が比較的多い場合の符号量を減らすことができるため、領域構造を符号化する符号量が低減し符号化効率が向上する。
 また、前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、前記領域構造復号手段は、処理対象の部分領域である対象部分領域のフィルタインデックスの推定値を算出する推定フィルタインデックス算出手段を備え、前記推定フィルタインデックス算出手段は、直前に処理された部分領域のフィルタインデックスの値を用いて、対象部分領域のフィルタインデックスの推定値を算出することが好ましい。
 上記の構成によれば、直前に隣接する領域とマージした場合の符号量を減らすことができるため、領域構造を符号化する符号量が低減し符号化効率が向上する。
 また、前記領域インデックス算出手段は、前記多次元の特性値によって張られる特性値領域を構成する部分領域の各々に対して順次前記領域インデックスを算出するものであり、前記領域構造復号手段は、処理対象の部分領域である対象部分領域のフィルタインデックスの推定値を算出する推定フィルタインデックス算出手段を備え、前記推定フィルタインデックス算出手段は、前記領域インデックス算出手段によって対象部分領域の領域インデックスを算出する際に参照された複数の特性値の軸のうち、特定の軸に沿った部分領域についての復号済フィルタインデックスの値を用いて、対象部分領域のフィルタインデックスの推定値を算出することが好ましい。
 上記の構成によれば、上記多次元空間において隣接する領域とマージした場合の符号量を減らすことができるため、領域構造を符号化する符号量が低減し符号化効率が向上する。
 上記の構成によれば、本発明に係る画像フィルタ装置によれば、新規フィルタ係数フラグによって、領域分類の数を制御することができ、候補選択インデックスに従って、第1の特性値が等しい、もしくは、第2の特性値が等しい部分領域と、同じフィルタ係数群を用いることができる。これにより、各部分領域に対して、フィルタ係数をより適切に割り付けることができるので、符号化効率が向上する。
 また、本発明に係る上記画像フィルタ装置は、各単位領域における上記特性値を算出する特性値算出手段を更に備え、上記特性値算出手段は、対象単位領域を所定のウィンドウサイズだけ拡張して得られる拡張単位領域において、画素の間引きを行うと共に、間引かない画素に対してのみ画素単位の特性値である中間値を算出し、上記拡張単位領域内での上記中間値の和をとることによって、上記対象単位領域におけるブロック中間値を算出し、上記ブロック中間値を用いて、上記対象単位領域の特性値を算出する、ことが好ましい。
 非特許文献4に開示された技術では、単純に縦方向及び横方向に関する間引きを行うことから、単位領域が小さい場合において、特性値を算出するための情報が不足して、単位領域を適切に分類できないという課題があった。単位領域の分類精度が低下すると、領域単位にフィルタ係数群を変更するような適応フィルタの効果が低下するために、符号化効率が低下する。
 具体的には、非特許文献4では、図77に示すように、4×4画素の単位領域の場合において、黒丸で示す単位領域内の4点のラプラシアンの値を用いて、特性値を計算するが、間引きを行わない場合に比べ符号化効率が低下していた。
 本発明に係る上記の構成によれば、対象単位領域を所定のウィンドウサイズだけ拡張して得られる拡張単位領域において、画素の間引きを行うと共に、間引かない画素に対してのみ画素単位の特性値である中間値を算出するので、特性値を算出するための演算量を低減させることができる。また、上記の構成によれば、上記拡張単位領域内での上記中間値の和をとることによって、上記対象単位領域におけるブロック中間値を算出し、上記ブロック中間値を用いて、上記対象単位領域の特性値を算出するので、拡張単位領域を用いない非特許文献4に記載の構成に比べて、単位領域の分類精度を向上させることができる。
 したがって、上記の構成によれば、演算量を低減させつつ、単位領域の分類精度を向上させることができるので、小さな演算量にて、高い符号化効率を実現することができる。
 また、上記特性値算出手段は、間引きを行う画素の座標を、X軸またはY軸に沿って変位させる間引き画素座標変位手段を備えている、ことが好ましい。
 上記の構成によれば、上記特性値算出手段は、間引きを行う画素の座標を、X軸またはY軸に沿って変位させる間引き画素座標変位手段を備えているので、単位領域の分類精度を向上させることができる。したがって、上記の構成によれば、小さな演算量にて、より高い符号化効率を実現することができる。
 また、本発明に係る復号装置は、符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、上記画像フィルタ装置と、各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、ことを特徴としている。
 また、本発明に係る符号化装置は、符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、上記画像フィルタ装置と、各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、ことを特徴としている。
 また、本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用し、各単位領域における出力画像の各画素値を、該単位領域について割り付けられたフィルタ係数を用いて算出するフィルタ手段と、各単位領域を分類するための領域インデックスを、該単位領域の属性から算出される多次元の特性値から算出する領域インデックス算出手段と、各領域インデックスと各フィルタインデックスとの対応関係を表すフィルタインデックステーブルを復号する領域構造復号手段と、処理対象の単位領域である対象単位領域の領域インデックスと前記フィルタインデックステーブルとから該対象単位領域についてのフィルタインデックスを求めると共に、該対象単位領域に対して、該フィルタインデックスにより指定されるフィルタ係数を割り付けるフィルタ係数割り付け手段とを備えている画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタインデックステーブルと、上記フィルタ係数とを含んでいることを特徴としている。
 上記のように構成された符号化データを復号する画像フィルタ装置は、各領域インデックスに対して復号されたフィルタパラメータを用いて直接、各領域に対して割りつけられるフィルタ係数群を参照するため、容易な処理で各単位領域にフィルタ係数を割り付けることができる。また、領域インデックスの各々に対するフィルタインデックスが同一であることを用いて領域のグループ分けを行うため、自由度の高いグループ分けが可能になり、画像の領域特性に合わせたフィルタ処理ができる。そのため、符号化効率が向上する。
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
 本発明は、画像データにフィルタリングを行う画像フィルタに好適に用いることができる。また、符号化データを復号する復号装置、および、符号化データを符号化する符号化装置に好適に適用することができる。
1,3,5,7,9     動画像復号装置(復号装置)
16       インター予測画像生成部(予測画像生成手段)
17       イントラ予測画像生成部(予測画像生成手段)
2,4,6,8,10    動画像符号化装置(符号化装置)
25       イントラ予測画像生成部(予測画像生成手段)
26       インター予測画像生成部(予測画像生成手段)
50,60,70,80,90,100,110,120,130,140  適応フィルタ(画像フィルタ装置)
91、111         適応フィルタ情報復号部
911            領域別タップ数復号部
1111,1311      タップ数復号部
912、1112,1312  領域構造復号部(領域構造復号手段)
913、1113,1313  特徴量モード復号部(特徴量モード復号手段)
914、1114,1314  フィルタ係数復号部(領域分類手段)
915、1115       特性別フィルタ係数格納部
1315           フィルタ係数格納部
92、112,142     適応フィルタ部
921、1121,1361´ 第1特性値算出部(特性値算出手段)
922、1122,1362´ 第2特性値算出部(特性値算出手段)
923、1123、1323  フィルタ係数割り付け部(フィルタ係数割り付け手段)1322           領域インデックス算出部(領域インデックス算出手段)924、1124,1324  フィルタ部(フィルタ手段)
101、121,141    適応フィルタ情報設定部
1011           領域別タップ数設定部
1211,1411      タップ数設定部
1012、1212,1412 領域構造設定部
1013、1213,1413 特徴量モード設定部
1014、1214,1414 フィルタ係数残差生成部
1015、1215      特性別フィルタ係数格納部
1415           フィルタ係数格納部
1016、1216,1416 フィルタパラメータ設定部
102、122、142    適応フィルタ部
1023、1223、1423 フィルタ係数導出部
1331           インデックス総数復号部
1332           インデックス復号制御部
1333           推定フィルタインデックス算出部
1334           インデックス復号部
1335           新番号識別処理部
1336           残数管理部
1341           基本推定値算出部
1342           領域位置推定値算出部
1343           新番号推定値算出部
1344           推定値選択部
1360´          BAモード領域インデックス算出部
1363           原特性値算出部
13631          画素特性値算出部
13632          ブロック特性値加算部
13633          特性値算出属性設定部
13634          ステップサイズ設定部
13635          ウィンドウサイズ設定部
13636          ステップ方法設定部
1365           フィルタインデックス算出部

Claims (17)

  1.  複数の単位領域から構成される入力画像に作用するフィルタ手段と、
     各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、
     上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、
    を備え、
     上記フィルタ手段は、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する、
    ことを特徴とする画像フィルタ装置。
  2.  候補選択インデックスは、対象部分領域に対し第1特性値に関して隣接する部分領域と、対象部分領域に対し第2特性値に関して隣接する部分領域とを候補選択として含むことを特徴とする請求項1に記載の画像フィルタ装置。
  3.  候補選択インデックスは、対象部分領域の直前に処理した部分領域を候補選択として含むことを特徴とする請求項1に記載の画像フィルタ装置。
  4.  候補選択インデックスは、第1特性値と第2特性値とが1つづつ異なる既に処理した部分領域を候補選択として含むことを特徴とする請求項1に記載の画像フィルタ装置。
  5.  候補選択インデックスは、既に処理した部分領域のフィルタ係数群を示すインデックスであることを特徴とする請求項1に記載の画像フィルタ装置。
  6.  候補選択インデックスは、マージ用のインデックスであり、新規フィルタ係数群を用いない部分領域に対して用いられるフィルタ係数群を選択することを特徴とする請求項1から5の何れか1項に記載の画像フィルタ装置。
  7.  候補選択インデックスは、予測用のインデックスであり、新規フィルタ係数群を用いる部分領域に対して、予測値として用いられるフィルタ係数群を選択することを特徴とする請求項1から5の何れか1項に記載の画像フィルタ装置。
  8.  候補選択インデックスは、新規フィルタ係数群を用いる部分領域では予測値として用いられるフィルタ係数群の選択に用いられ、新規フィルタ係数群を用いない部分領域では用いるフィルタ係数群の選択に用いられることを特徴とする請求項1から5の何れか1項に記載の画像フィルタ装置。
  9.  上記画像フィルタ装置で用いる前記第1及び第2の特性値は、各単位領域の座標であることを特徴とする請求項1から8の何れか1項に記載の画像フィルタ装置。
  10.  上記画像フィルタ装置は、さらに特性値を選択する特徴量モードを入力とし、特徴量モードに応じて、候補選択インデックスの決定方法を切り替えることを特徴とする請求項1から9の何れか1項に記載の画像フィルタ装置。
  11.  上記画像フィルタ装置は、特徴量モードが座標空間分割である場合と、特徴量が座標空間分割以外である場合とに応じて、候補選択インデックスの選択肢の数を変更することを特徴とする請求項10に記載の画像フィルタ装置。
  12.  上記画像フィルタ装置は、さらにフィルタ係数群の数を入力とし、既に復号されたフィルタ係数群の数が、入力されたフィルタ係数群の数よりも小さい場合に、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグを入力することを特徴とする請求項1から11の何れか1項に記載の画像フィルタ装置。
  13.  符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
     請求項1から12の何れか1項に記載の画像フィルタ装置と、
     各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
    を備え、
     上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
    ことを特徴とする復号装置。
  14.  符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
     請求項1から12の何れか1項に記載の画像フィルタ装置と、
     各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
    を備え、
     上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
    ことを特徴とする符号化装置。
  15.  上記フィルタ手段によって用いられるフィルタ係数群は、単位領域毎に、上記符号化対象画像と上記出力画像との相違がより小さくなるように定められたものである、
    ことを特徴とする請求項14に記載の符号化装置。
  16.  複数の単位領域から構成される入力画像に作用するフィルタ手段と、
     各単位領域における上記入力画像の画像特性又は上記入力画像における各単位領域の位置を示す特性値であって、互いに導出方法の異なる第1及び第2の特性値を算出する特性値算出手段と、
     上記第1及び第2の特性値によって張られる特性値領域を構成する複数の部分領域の各々について、新規フィルタ係数群を用いるか否かを示す新規フィルタ係数フラグ、及びフィルタ係数群を選択する候補選択インデックスを参照し、当該新規フィルタ係数フラグ及び当該候補選択インデックスに従って、各部分領域に対して、フィルタ係数群を割り付けるフィルタ係数割り付け手段と、
    を備え、
     上記フィルタ手段によって、各単位領域における出力画像の各画素値を、該単位領域について算出された第1及び第2の特性値の属する部分領域について設定されたフィルタ係数群を用いて算出する画像フィルタ装置によって参照される符号化データのデータ構造であって、
     上記フィルタ係数群とその予測値との残差、及び
     上記新規フィルタ係数フラグと上記候補選択インデックス、
    を含んでいることを特徴とする符号化データのデータ構造。
  17.  上記フィルタ係数群の数を更に含んでいる、
    ことを特徴とする請求項16に記載の符号化データのデータ構造。
     
PCT/JP2012/059418 2011-04-05 2012-04-05 画像フィルタ装置、復号装置、符号化装置、および、データ構造 WO2012137890A1 (ja)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
JP2011-084050 2011-04-05
JP2011084050 2011-04-05
JP2011-094549 2011-04-20
JP2011094549 2011-04-20
JP2011-144983 2011-06-29
JP2011144983 2011-06-29
JP2011154351 2011-07-12
JP2011-154351 2011-07-12

Publications (1)

Publication Number Publication Date
WO2012137890A1 true WO2012137890A1 (ja) 2012-10-11

Family

ID=46969280

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/059418 WO2012137890A1 (ja) 2011-04-05 2012-04-05 画像フィルタ装置、復号装置、符号化装置、および、データ構造

Country Status (1)

Country Link
WO (1) WO2012137890A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017002283A1 (ja) * 2015-07-01 2017-01-05 パナソニックIpマネジメント株式会社 符号化方法、復号方法、符号化装置、復号装置および符号化復号装置
WO2017195532A1 (ja) * 2016-05-13 2017-11-16 シャープ株式会社 画像復号装置及び画像符号化装置
JP2018509074A (ja) * 2015-02-11 2018-03-29 クアルコム,インコーポレイテッド コーディングツリーユニット(ctu)レベル適応ループフィルタ(alf)
EP4256787A4 (en) * 2020-12-03 2024-01-17 Alibaba Group Holding Ltd METHOD FOR USING AN ADAPTIVE LOOP FILTER AND SYSTEM THEREOF

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009089373A2 (en) * 2008-01-08 2009-07-16 Qualcomm Incorporated Video coding of filter coefficients based on horizontal and vertical symmetry
WO2010143427A1 (ja) * 2009-06-10 2010-12-16 パナソニック株式会社 画像符号化方法、画像復号方法、およびそれらの装置
JP2011034226A (ja) * 2009-07-30 2011-02-17 Toshiba Corp 画像処理装置
WO2011105231A1 (ja) * 2010-02-26 2011-09-01 シャープ株式会社 フィルタ係数符号化装置、フィルタ係数復号装置、動画像符号化装置、動画像復号装置、および、データ構造
WO2011105230A1 (ja) * 2010-02-26 2011-09-01 シャープ株式会社 フィルタ係数符号化装置、フィルタ係数復号装置、動画像符号化装置、動画像復号装置、および、データ構造
WO2011111341A1 (ja) * 2010-03-09 2011-09-15 パナソニック株式会社 動画像復号装置、動画像符号化装置、動画像復号回路及び動画像復号方法
WO2011158657A1 (ja) * 2010-06-17 2011-12-22 シャープ株式会社 画像フィルタ装置、復号装置、符号化装置、および、データ構造

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009089373A2 (en) * 2008-01-08 2009-07-16 Qualcomm Incorporated Video coding of filter coefficients based on horizontal and vertical symmetry
WO2010143427A1 (ja) * 2009-06-10 2010-12-16 パナソニック株式会社 画像符号化方法、画像復号方法、およびそれらの装置
JP2011034226A (ja) * 2009-07-30 2011-02-17 Toshiba Corp 画像処理装置
WO2011105231A1 (ja) * 2010-02-26 2011-09-01 シャープ株式会社 フィルタ係数符号化装置、フィルタ係数復号装置、動画像符号化装置、動画像復号装置、および、データ構造
WO2011105230A1 (ja) * 2010-02-26 2011-09-01 シャープ株式会社 フィルタ係数符号化装置、フィルタ係数復号装置、動画像符号化装置、動画像復号装置、および、データ構造
WO2011111341A1 (ja) * 2010-03-09 2011-09-15 パナソニック株式会社 動画像復号装置、動画像符号化装置、動画像復号回路及び動画像復号方法
WO2011158657A1 (ja) * 2010-06-17 2011-12-22 シャープ株式会社 画像フィルタ装置、復号装置、符号化装置、および、データ構造

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018509074A (ja) * 2015-02-11 2018-03-29 クアルコム,インコーポレイテッド コーディングツリーユニット(ctu)レベル適応ループフィルタ(alf)
WO2017002283A1 (ja) * 2015-07-01 2017-01-05 パナソニックIpマネジメント株式会社 符号化方法、復号方法、符号化装置、復号装置および符号化復号装置
JPWO2017002283A1 (ja) * 2015-07-01 2018-04-19 パナソニックIpマネジメント株式会社 符号化方法、復号方法、符号化装置、復号装置および符号化復号装置
US10764574B2 (en) 2015-07-01 2020-09-01 Panasonic Intellectual Property Management Co., Ltd. Encoding method, decoding method, encoding apparatus, decoding apparatus, and encoding and decoding apparatus
US11233987B2 (en) 2015-07-01 2022-01-25 Panasonic Intellectual Property Management Co., Ltd. Encoding method, decoding method, encoding apparatus, decoding apparatus, and encoding and decoding apparatus
WO2017195532A1 (ja) * 2016-05-13 2017-11-16 シャープ株式会社 画像復号装置及び画像符号化装置
EP4256787A4 (en) * 2020-12-03 2024-01-17 Alibaba Group Holding Ltd METHOD FOR USING AN ADAPTIVE LOOP FILTER AND SYSTEM THEREOF

Similar Documents

Publication Publication Date Title
JP7200320B2 (ja) 画像フィルタ装置、フィルタ方法および動画像復号装置
US11627337B2 (en) Image decoding device
CN111373752B (zh) 译码视频数据的方法和设备以及非暂时性计算机可读介质
JP6560702B2 (ja) 算術復号装置、算術符号化装置、算術復号方法、および、算術符号化方法
KR102443959B1 (ko) 적응적인 화소 분류 기준에 따른 인루프 필터링 방법
JP6134651B2 (ja) 算術復号装置、算術符号化装置および算術復号方法
WO2011158657A1 (ja) 画像フィルタ装置、復号装置、符号化装置、および、データ構造
WO2016203881A1 (ja) 算術復号装置及び算術符号化装置
JPWO2017068856A1 (ja) 予測画像生成装置、画像復号装置および画像符号化装置
WO2012081609A1 (ja) 画像フィルタ装置、復号装置、符号化装置、および、データ構造
JP2013236358A (ja) 画像フィルタ装置、画像復号装置、画像符号化装置、およびデータ構造
WO2013046990A1 (ja) オフセット復号装置、オフセット符号化装置、画像フィルタ装置、および、データ構造
WO2012137890A1 (ja) 画像フィルタ装置、復号装置、符号化装置、および、データ構造
JP2013223050A (ja) フィルタ装置、復号装置、および符号化装置
RU2609096C2 (ru) Устройство декодирования изображений, устройство кодирования изображений и структура данных кодированных данных
JP2013141094A (ja) 画像復号装置、画像符号化装置、画像フィルタ装置、および符号化データのデータ構造
WO2012121352A1 (ja) 動画像復号装置、動画像符号化装置、および、データ構造
WO2012090962A1 (ja) 画像復号装置、画像符号化装置、および符号化データのデータ構造、ならびに、算術復号装置、算術符号化装置
WO2013018737A1 (ja) 画像フィルタ装置、復号装置、符号化装置、および、データ構造
WO2012081706A1 (ja) 画像フィルタ装置、フィルタ装置、復号装置、符号化装置、および、データ構造
JP2013223051A (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: 12767431

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP