WO2012081706A1 - Image filter device, filter device, decoder, encoder, and data structure - Google Patents

Image filter device, filter device, decoder, encoder, and data structure Download PDF

Info

Publication number
WO2012081706A1
WO2012081706A1 PCT/JP2011/079232 JP2011079232W WO2012081706A1 WO 2012081706 A1 WO2012081706 A1 WO 2012081706A1 JP 2011079232 W JP2011079232 W JP 2011079232W WO 2012081706 A1 WO2012081706 A1 WO 2012081706A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
unit
image
region
characteristic
Prior art date
Application number
PCT/JP2011/079232
Other languages
French (fr)
Japanese (ja)
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 WO2012081706A1 publication Critical patent/WO2012081706A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • 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

Definitions

  • the present invention relates to an image filter device and a filter device that perform image filtering.
  • the present invention also relates to an image filter device and an encoding device and a decoding device including the filter device.
  • 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.
  • AVC Non-Patent Document 1
  • VCEG Video Coding Expert Group
  • KTA Key Integrity Expert Group
  • TMuC Test Model Under Consideration
  • an image (picture) that constitutes a moving image is a slice obtained by dividing the image, a maximum coding unit (LCU: Largegest Coding Unit) obtained by dividing the slice, It is managed by a coding unit (CU: Coding Unit) obtained by dividing the coding unit and a hierarchical structure consisting of blocks and partitions obtained by dividing the coding unit. In many cases, the block is minimized. Encoded as a unit.
  • a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and a difference image (“residual” between the predicted image and the input image is generated.
  • difference image or “prediction residual”.
  • inter prediction inter-screen prediction
  • intra-screen prediction intra-screen prediction
  • inter prediction a prediction image in a prediction target frame is generated for each prediction unit by applying motion compensation using a motion vector to a reference image in a reference frame (decoded image) obtained by decoding the entire frame. Is done.
  • intra prediction based on locally decoded images in the same frame, predicted images in the frame are sequentially generated.
  • Patent Document 1 for each pixel value of a decoded image, the decoded image is classified into a plurality of regions based on the degree of activity (Activity) indicating the randomness of the image around the pixel.
  • An adaptive loop filter (hereinafter also simply referred to as “adaptive filter”) that generates a filtered decoded image by performing filter processing while switching a filter coefficient group for each region is disclosed.
  • the filter coefficient group used for the adaptive filter is adaptively determined so as to minimize an error between the encoding target image and the filtered decoded image obtained by applying the adaptive filter to the decoded image. It has been done.
  • the encoding device and decoding device provided with such an adaptive filter can improve prediction accuracy and encoding efficiency by generating a prediction image with reference to the filtered decoded image.
  • Non-Patent Document 3 divides a (local) decoded image into a plurality of regions, and according to the degree of activity (Activity) indicating local randomness of the (local) decoded image in each region,
  • An adaptive loop filter (Adaptive Loop ⁇ ⁇ Filter) that performs filter processing while switching filter coefficient groups for each region is disclosed.
  • the filter coefficient group for each region is determined by the encoding device so as to minimize the error between the filtered image in the region and the encoding target image.
  • 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 (local) decoded image using the adaptive filter. As a result, it is possible to improve the prediction accuracy and the encoding efficiency.
  • the inventor has obtained an experimental result that, for an area having a certain range of activity, the coding efficiency is rather lowered by applying an adaptive filter.
  • a method of switching the filter coefficient group for each region based on region characteristics other than the activity in addition to the activity may be considered.
  • the filter coefficient group is switched for each region based on the two region characteristics, there is a problem that the calculation cost on the encoding device side and the decoding device side becomes high.
  • the present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image filter device capable of improving encoding efficiency as compared with the prior art, and a decoding device including such an image filter device, and It is to realize an encoding device.
  • the inventor has obtained knowledge that encoding efficiency can be improved by switching on / off of filter processing according to local image characteristics in a decoded image.
  • an image filter device includes a filter unit that operates on an input image composed of a plurality of unit regions, and an image characteristic of the input image for each of the plurality of unit regions.
  • a characteristic value calculating means for calculating a characteristic value representing a filter on area in which each of the unit areas is made to act on the filter means in accordance with the value of the characteristic value for the unit area calculated by the characteristic value calculating means,
  • a classification unit that classifies the filter unit into any one of the filter-off regions where the filter unit does not act is provided.
  • the classification means determines each unit area constituting the input image according to the value of the characteristic value representing the image characteristic of the input image in the unit area, and Classify into any of the filter-off areas.
  • the filter means acts on the input image in the unit area belonging to the filter-on area, but does not act on the input image in the unit area belonging to the filter-off area.
  • the image filter device configured as described above, it is possible to switch on / off of the filter process according to the local image characteristics of the input image. Therefore, by using the output image obtained by the image filter device acting on the decoded image while switching on / off of the filtering process as a reference image for generating the predicted image, the prediction accuracy and the coding efficiency are improved as compared with the conventional case. Can be improved.
  • the unit region is, for example, a unit for generating a predicted image. It may be a certain prediction 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 a unit composed of only one pixel.
  • the data structure of the encoded data according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas.
  • the characteristic value calculation means for calculating, and the filter-on region in which the filter means is activated or the filter means is not activated in accordance with the value of the characteristic value for each unit area calculated by the characteristic value calculation means.
  • a data structure of encoded data that is referred to by an image filter device including classification means for classifying into any of the filter-off regions, and includes a filter coefficient group used by the filter means It is a feature.
  • the decoding apparatus that refers to the encoded data configured as described above represents filter means that operates on an input image composed of a plurality of unit regions, and represents the image characteristics of the input image for each of the plurality of unit regions.
  • a characteristic value calculating means for calculating a characteristic value, and a filter-on area or the filter means for causing the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculating means.
  • classifying means for classifying it into any one of the filter-off regions that do not act on the filter.
  • the filter means performs filter processing using a filter coefficient group included in the encoded data. Therefore, such a decoding apparatus can generate a prediction image with high prediction accuracy.
  • the encoded data referred to by such a decoding apparatus does not need to include a flag for switching on / off of the filtering process, the code amount of the encoded data is reduced. Therefore, the encoded data is encoded data with high encoding efficiency.
  • a calculation unit that calculates an average of pixel values of the input image, and each unit region is calculated by the calculation unit.
  • the classification means for classifying into any of a plurality of types, and the pixel value of each pixel in each unit area are set for the type including the pixel And filtering means for calculating using a filter coefficient group.
  • each unit area is classified into one of a plurality of types according to the average of the pixel values for the unit area calculated by the calculation unit,
  • the pixel value of each pixel in the unit area is calculated using the filter coefficient group set for the type including the pixel. Therefore, according to the above configuration, the filter processing can be performed using the filter coefficient group set for each type, so that the encoding efficiency is improved. Further, according to the above configuration, each unit area is classified according to a characteristic value with a small calculation processing amount, ie, an average of pixel values, so that the processing amount can be reduced.
  • a filter device includes a region characteristic for calculating a region characteristic value of each unit region in a filter device including a linear filter in which filter coefficients are adaptively set.
  • the linear filter includes an offset that depends on the region characteristic for performing a filter operation on each pixel belonging to each unit region, and the region characteristic of the unit region calculated by the region characteristic calculating unit This is performed by using an offset corresponding to the value of and a filter coefficient group that does not depend on the region characteristics.
  • a filter device includes a linear filter in which filter coefficient groups are adaptively set, and includes a target pixel in an output image of the linear filter. Truncation means is provided for truncating the change amount, which is the difference between the pixel value and the pixel value of the target pixel in the input image of the linear filter.
  • a filter device including a linear filter in which filter coefficients are adaptively set
  • at least one first filter coefficient group depending on the first region characteristic is associated.
  • the first filter coefficient table recorded in association with the value of the first area characteristic and the second filter coefficient group depending on the second area characteristic are recorded in association with the value of the corresponding second area characteristic.
  • Decoding means for decoding the second filter coefficient table, and area characteristic calculation means for calculating the values of the first area characteristic and the second area characteristic of each unit area, and the linear filter includes each of the unit areas belonging to each unit area.
  • a filter operation using the second filter coefficient group corresponding to the value of the region characteristic is executed.
  • each unit area can be obtained without decoding a filter coefficient table in which a plurality of filter coefficient groups depending on both the first area characteristic and the second area characteristic are recorded in association with the corresponding area characteristic pair.
  • the filter operation according to both the first region characteristic and the second region characteristic can be performed. That is, according to the above configuration, a decoded image close to the original image can be generated with high accuracy without causing a significant increase in the code amount. As a result, higher encoding efficiency than conventional can be realized.
  • the decoding device and the encoding device provided with the filter device are also included in the scope of the present invention.
  • the image filter device includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas.
  • a characteristic value calculation means for calculating the filter area, and a filter-on area that causes the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculation means, or the filter Classification means for classifying the filter into any one of the filter-off regions in which the means is not operated.
  • the encoding efficiency is improved as compared with the conventional case.
  • 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 the 1st Embodiment of this invention is provided. It is a figure which shows the data structure of the encoding data which are produced
  • (A) shows the configuration of the picture layer of the encoded data
  • (D) shows the configuration of the leaf CU included in the CU layer
  • (e) shows the configuration of the inter prediction information for the leaf CU
  • ( f) shows the configuration of the intra prediction information for the leaf CU
  • (g) shows the configuration of the filter parameter included in the slice header.
  • (A) shows a characteristic value calculation reference region CRR composed of pixels included in the target unit region UR and pixels adjacent to the target unit region UR, and (b) is included in the target unit region UR.
  • a characteristic value calculation reference region CRR composed of pixels is shown. It is a graph which shows the experimental data obtained by the inventor. (A) shows the square error reduction amount with respect to the activity for each region for a plurality of sequences, and (b) shows the average (“average” for the plurality of sequences for the square error reduction amount at each activity. )) And the total number of unit areas (“count”) having each degree of activity. It is a table
  • surface which shows the example of a classification process by the adaptive filter which concerns on the 1st Embodiment of this invention.
  • FIG. 6A is a diagram illustrating unit areas set by the adaptive filter according to the first embodiment of the present invention, and FIG.
  • FIG. 6A shows the position and size of a unit area included in a target coding unit according to a CU partition flag.
  • (B) is a diagram showing a case where a unit area included in the target unit area has a predetermined size. It is a figure for demonstrating the filter process by the adaptive filter which concerns on the 1st Embodiment of this invention, Comprising: (a) calculates the pixel value of the filter object pixel in the object unit area
  • FIG. 8 is a diagram illustrating a filter reference region R that is a set of pixels referred to for the purpose and a filter reference range RA that is defined as a union of the filter reference regions R for each filter target pixel.
  • FIG. 4 is a diagram showing filter coefficients assigned to each pixel included in a reference region R. It is a table
  • surface which shows the example of a classification process by the adaptive filter which concerns on the 1st modification of the 1st Embodiment of this invention. It is a block diagram which shows the structure of the adaptive filter which concerns on the 2nd modification of the 1st Embodiment of this invention. It is a graph which shows the experimental data obtained by the inventor. (A) shows a square error reduction amount with respect to an average pixel value for each region for a plurality of sequences, and (b) shows an average (for a plurality of sequences) for a square error reduction amount at each average pixel value.
  • (A) to (d) show each coding unit to be subjected to on / off control in the maximum coding unit when the value of the syntax alf_cu_control_max_depth is 0 to 3, together with a branch diagram representing a hierarchical structure. ing. It is a figure for demonstrating the classification process by the adaptive filter which concerns on the 4th modification of the 1st Embodiment of this invention.
  • (A) shows an example of classification processing by the adaptive filter, and (b) shows the position and size of the unit area included in the maximum coding unit target coding unit hierarchically specified by the CU partitioning flag.
  • (C) shows a case where the unit area included in the target unit area has a predetermined size.
  • FIG. 1 It is a block diagram which shows the structure of the adaptive filter with which the moving image encoder which concerns on the 1st Embodiment of this invention is provided. It is a block diagram which shows the structure of the adaptive filter which concerns on the 2nd modification of the 1st Embodiment of this invention. It is a block diagram which shows the structure of the adaptive filter which concerns on the 5th modification of the 1st Embodiment of this invention. It is a block diagram which shows the structure of the adaptive filter which concerns on the 6th modification of the 1st Embodiment of this invention. It is a block diagram which shows the 1st structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention.
  • FIG. 27 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of FIG. 26 is mounted on a decoding device. It is a block diagram which shows the 2nd structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention. It is a block diagram which shows the structural example of the adaptive filter suitable for mounting in an encoding apparatus, when mounting the adaptive filter of FIG. 28 in a decoding apparatus. It is a block diagram which shows the 3rd structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention. [Fig. 31] Fig. 31 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of Fig.
  • Fig. 30 is mounted on a decoding device. It is a block diagram which shows the 4th structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention.
  • Fig. 30 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of Fig. 29 is mounted on a decoding device. It is a block diagram which shows the 1st structural example of the adaptive filter which concerns on the 3rd Embodiment of this invention. It is a figure which shows the reference area of the 1st spatial filter with which the adaptive filter of FIG. 34 is provided. It is a figure which shows the reference area of the 2nd spatial filter with which the adaptive filter of FIG. 34 is provided.
  • FIG. 43 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of FIGS. 34 and 42 is mounted on a decoding device. It is a block diagram which shows the 2nd structural example of the adaptive filter which concerns on the 3rd Embodiment of this invention.
  • Fig. 41 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of Fig. 40 is mounted on a decoding device.
  • FIG. 43 is a diagram illustrating a reference region of an enlarged linear filter included in the adaptive filter of FIG. 42.
  • FIG. 43 is a diagram illustrating another reference region of the enlarged linear filter included in the adaptive filter of FIG. 42.
  • FIG. 46 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of FIG. 45 is mounted on a decoding device. It is a figure which shows the data structure of the coding data produced
  • FIG. 49 shows the structure for the moving image decoding apparatus suitable for mounting of the adaptive filter which concerns on each embodiment. It is the block diagram which showed the structure of the moving image encoder suitable for mounting of the adaptive filter which concerns on each embodiment. It is a figure which shows the modification of the coding data shown in FIG. It is the figure shown about the structure of the transmitter which mounts the said moving image encoder, and the receiver which mounts the said moving image decoder.
  • A shows a transmitting apparatus equipped with a moving picture coding apparatus
  • (b) shows a receiving apparatus equipped with a moving picture decoding apparatus.
  • Embodiment 1 A first embodiment of a decoding device and an encoding device according to the present invention will be described below with reference to the drawings.
  • the decoding apparatus according to the present embodiment decodes a moving image from encoded data. Therefore, hereinafter, this is referred to as “moving image decoding apparatus”.
  • the encoding device according to the present embodiment generates encoded data by encoding a moving image. Therefore, in the following, this is referred to as a “video encoding device”.
  • the scope of application of the present invention is not limited to this. That is, as will be apparent from the following description, the features of the present invention can be realized without assuming a plurality of frames. That is, the present invention can be applied to a general decoding apparatus and a general encoding apparatus regardless of whether the target is a moving image or a still image.
  • the encoded data # 1 has a hierarchical structure including a sequence layer, a GOP (Group Of Pictures) layer, a picture layer, a slice layer, and a maximum coding unit (LCU: Large Coding Unit) layer.
  • GOP Group Of Pictures
  • LCU Large Coding Unit
  • FIG. 2 shows the hierarchical structure below the picture layer in the encoded data # 1.
  • FIGS. 2A to 2F are a picture layer P, a slice layer S, an LCU layer LCU, a leaf CU included in the LCU (denoted as CUL in FIG. 2D), and inter prediction (inter-screen prediction), respectively. It is a figure which shows the structure of inter prediction information PI_Inter which is the prediction information PI about a partition, and intra prediction information PI_Intra which is the prediction information PI about an intra prediction (prediction in a screen) partition.
  • PI_Inter is the prediction information PI about a partition
  • intra prediction information PI_Intra which is the prediction information PI about an intra prediction (prediction in a screen) partition.
  • the picture layer P is a set of data that is referenced by the video decoding device 1 in order to decode a target picture that is a processing target picture. As shown in FIG. 2A, the picture layer P includes a picture header PH and slice layers S1 to SNs (Ns is the total number of slice layers included in the picture layer P).
  • 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.
  • Each slice layer S included in the picture layer P is a set of data referred to by the video decoding device 1 in order to decode a target slice that is a slice to be processed.
  • the slice layer S includes a slice header SH and LCU layers LCU1 to LCUn (Nc is the total number of LCUs 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 included in the video decoding device 1.
  • the configuration of the filter parameter FP will be described later and will not be described here.
  • Each LCU layer LCU included in the slice layer S is a set of data that the video decoding device 1 refers to in order to decode the target LCU that is the processing target LCU.
  • the LCU layer LCU is composed of a plurality of coding units (CU: Coding Units) obtained by hierarchically dividing the LCU into a quadtree.
  • the LCU layer LCU is a coding unit corresponding to the highest level in a hierarchical structure that recursively includes a plurality of CUs.
  • each CU included in the LCU layer LCU has a hierarchical structure that recursively includes a CU header CUH and a plurality of CUs obtained by dividing the CU into quadtrees. is doing.
  • each CU excluding the LCU is half the size of the CU to which the CU directly belongs (that is, the CU one layer higher than the CU), and the size that each CU can take is encoded data # 1.
  • a CU that is not further divided is called a leaf CU.
  • the CU header CUH includes a coding parameter referred to by the video decoding device 1 in order to determine a decoding method of the target CU. Specifically, as shown in FIG. 2C, a CU division flag SP_CU that specifies whether or not the target CU is further divided into four subordinate CUs is included. When the CU division flag SP_CU is 0, that is, when the CU is not further divided, the CU is a leaf CU.
  • CU leaf A CU (CU leaf) that is not further divided is handled as a prediction unit (PU: Prediction Unit) and a transform unit (TU: Transform Unit).
  • PU Prediction Unit
  • TU Transform Unit
  • the leaf CU (denoted as CUL in FIG. 2 (d)) includes (1) PU information PUI that is referred to when the moving image decoding apparatus 1 generates a predicted image, and (2) The TU information TUI that is referred to when the residual data is decoded by the moving picture decoding apparatus 1 is included.
  • 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 leaf, PU information PUI and TU information TUI in the leaf CU are omitted. Note that the skip flag SKIP is omitted for the I slice.
  • the PU information PUI includes a skip flag SKIP, prediction type information PT, and prediction information PI as shown in FIG.
  • the prediction type information PT is information that specifies whether intra prediction or inter prediction is used as a predicted image generation method for the target leaf CU (target PU).
  • the prediction information PI includes intra prediction information PI_Intra or inter prediction information PI_Inter depending on which prediction method is specified by the prediction type information PT.
  • 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 PU information PUI includes information specifying the shape and size of each partition included in the target PU and the position in the target PU.
  • the partition is one or a plurality of non-overlapping areas constituting the target leaf CU, and the generation of the predicted image is performed in units of partitions.
  • the TU information TUI specifies a quantization parameter difference ⁇ qp (tu_qp_delta) that specifies the magnitude of the quantization step, and a division pattern for each block of the target leaf CU (target TU).
  • TU partition information SP_TU and quantized prediction residuals QD1 to QDNT are included.
  • the quantization parameter difference ⁇ qp is a difference qp ⁇ qp ′ between the quantization parameter qp in the target TU and the quantization parameter qp ′ in the TU encoded immediately before the TU.
  • TU partition information SP_TU is information that specifies the shape and size of each block included in the target TU and the position in the target TU.
  • Each TU can be, for example, a size from 64 ⁇ 64 pixels to 2 ⁇ 2 pixels.
  • the block is one or a plurality of non-overlapping areas constituting the target leaf CU, and encoding / decoding of the prediction residual is performed in units of blocks.
  • Each quantized 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) is performed on the prediction residual obtained by subtracting the prediction image from the encoding target image.
  • Process 2 The DCT coefficient obtained in Process 1 is quantized.
  • Process 3 The DCT coefficient quantized in Process 2 is variable length encoded.
  • the inter prediction information PI_Inter includes a coding parameter that is referred to when the video decoding device 1 generates an inter prediction image by inter prediction. As shown in FIG. 2 (e), the inter prediction information PI_Inter includes inter PU partition information SP_Inter that specifies a partition pattern for each partition of the target PU, and inter prediction parameters PP_Inter1 to PP_InterNe (Ne for each partition). The total number of inter prediction partitions included in the target PU).
  • the inter-PU partition information SP_Inter is information for designating the shape and size of each inter prediction partition included in the target PU (inter PU) and the position in the target PU.
  • the inter PU is composed of four symmetric splittings of 2N ⁇ 2N pixels, 2N ⁇ N pixels, N ⁇ 2N pixels, and N ⁇ N pixels, and 2N ⁇ nU pixels, 2N ⁇ nD pixels, and nL ⁇ 2N. It is possible to divide into 8 types of partitions in total by four asymmetric splits of pixels and nR ⁇ 2N pixels.
  • the specific value of N is defined by the size of the CU to which the PU belongs, and the specific values of nU, nD, nL, and nR are determined according to the value of N.
  • an inter PU of 128 ⁇ 128 pixels is 128 ⁇ 128 pixels, 128 ⁇ 64 pixels, 64 ⁇ 128 pixels, 64 ⁇ 64 pixels, 128 ⁇ 32 pixels, 128 ⁇ 96 pixels, 32 ⁇ 128 pixels, and 96 ⁇ It is possible to divide into 128-pixel inter prediction partitions.
  • the inter prediction parameter PP_Inter includes a reference image index RI, an estimated motion vector index PMVI, and a motion vector residual MVD.
  • the motion vector residual MVD is encoded data generated by the moving image encoding device 2 executing the following processes 4 to 6.
  • Process 4 Select an encoded / decoded locally decoded image (more precisely, an image obtained by performing deblocking processing and adaptive filtering on the encoded / decoded local decoded image)
  • the motion vector mv for the target partition is derived with reference to the selected encoded / decoded local decoded image (hereinafter also referred to as “reference image”).
  • Process 5 An estimation method is selected, and an estimated value (hereinafter also referred to as “estimated motion vector”) pmv of the motion vector mv assigned to the target partition is derived using the selected estimation method.
  • Process 6 The motion vector residual MVD obtained by subtracting the estimated motion vector pmv derived in Process 5 from the motion vector mv derived in Process 4 is encoded.
  • the reference image index RI designates the locally decoded image (reference image) that has been encoded / decoded selected in the process 4.
  • the estimated motion vector index PMVI described above is the estimation method selected in the process 5. Is specified.
  • the estimation methods that can be selected in the processing 5 include: (1) a locally decoded image being encoded / decoded (more precisely, a region that has already been decoded in a locally decoded image being encoded / decoded).
  • a median of a motion vector allocated to a partition adjacent to the target partition hereinafter also referred to as “adjacent partition” is used as an estimated motion vector pmv.
  • a motion vector assigned to a partition (often referred to as a “collocated partition”) occupying the same position as the target partition is used as an estimated motion vector pmv, etc. Is mentioned.
  • the prediction parameter PP related to the partition for which unidirectional prediction is performed includes one reference image index RI, one estimated motion vector index PMVI, and one motion vector residual MVD.
  • the prediction parameters PP for a partition that performs bi-directional prediction include two reference image indexes RI1 and RI2, two estimated motion vector indexes PMVI1 and PMVI2, and two motion vector residuals MVD1. And MVD2.
  • the intra prediction information PI_Intra includes an encoding parameter that is referred to when the video decoding device 1 generates an intra predicted image by intra prediction.
  • the intra prediction information PI_Intra includes intra PU partition information SP_Intra that specifies a partition pattern of the target PU (intra PU) into each partition, and intra prediction parameters PP_Intra1 to PP_IntraNa for each partition. (Na is the total number of intra prediction partitions included in the target PU).
  • the intra-PU partition information SP_Intra is information that specifies the shape and size of each intra-predicted partition included in the target PU, and the position in the target PU.
  • the intra PU split information SP_Intra includes an intra split flag (intra_split_flag) that specifies whether or not the target PU is split into partitions. If the intra partition flag is 1, the target PU is divided symmetrically into four partitions. If the intra partition flag is 0, the target PU is not divided and the target PU itself is one partition.
  • N 2 n , n is an arbitrary integer of 1 or more.
  • a 128 ⁇ 128 pixel intra PU can be divided into 128 ⁇ 128 pixel and 64 ⁇ 64 pixel intra prediction partitions.
  • the intra prediction parameter PP_Intra includes an estimation flag MPM and a residual prediction mode index RIPM.
  • the intra prediction parameter PP_Intra is a parameter for designating an intra prediction method (prediction mode) for each partition.
  • the estimation flag MPM is a flag indicating whether or not the prediction mode estimated based on the prediction mode allocated to the peripheral partition of the target partition that is the processing target is the same as the prediction mode for the target partition.
  • examples of partitions around the target partition include a partition adjacent to the upper side of the target partition and a partition adjacent to the left side of the target partition.
  • the residual prediction mode index RIPM is an index included in the intra prediction parameter PP_Intra when the estimated prediction mode and the prediction mode for the target partition are different, and is an index for designating a prediction mode assigned to the target partition. It is.
  • the slice header SH includes the filter parameter FP that is referred to by the adaptive filter included in the video decoding device 1.
  • the adaptive filter included in the video decoding device 1 classifies each of one or a plurality of unit areas included in the target slice or the target LCU into one of a plurality of types, and the unit area Is switched according to the type to which the unit area belongs. Further, the adaptive filter process is performed on the unit area for which the adaptive filter process is set to ON using the filter coefficient group selected according to the type to which the unit area belongs.
  • the unit region is any of a slice, an LCU, a CU (other than a leaf CU), a leaf CU (a prediction unit PU, a transform unit TU), a partition that configures a prediction unit PU, and a block that configures a transform unit TU. It may be a block of 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, etc. different from the CU, etc., or may be an area composed of only one pixel, or other than those. May be.
  • Fig. 2 (g) shows the data structure of the filter parameter FP.
  • the filter parameter FP can be configured to include area designation information for designating the position and size of each unit area in the target slice or the target LCU.
  • the adaptive filter included in the moving image decoding apparatus 1 can specify the position and size of each unit region by referring to the region designation information.
  • the filter parameter FP may be configured not to include such region designation information, and the moving image encoding device 2 and the moving image decoding device 1 may use a unit region having a predetermined size.
  • the unit area described above includes a slice, an LCU, a CU (other than a leaf CU), a leaf CU (a prediction unit PU, a transform unit TU), a partition constituting the prediction unit PU, and a block constituting the transform unit TU.
  • the adaptive filter included in the video decoding device 1 refers to the CU partition flag SP_CU, inter-PU partition information SP_Inter, intra-PU partition information SP_Intra, TU partition information SP_TU, etc.
  • the position and size of the unit area can be specified hierarchically.
  • NT-1 (NT is the total number of filter coefficients included in the filter coefficient group I) and (3) an offset oI.
  • filter coefficient groups with different filter numbers are used for the filter processing of unit areas classified into different types.
  • the filter coefficient group 0 and the filter coefficient group 1 are used for the filter processing of the unit area classified into type 1 and the unit area classified into type 2 different from type 1, respectively.
  • the moving picture decoding apparatus 1 includes H.264 as a part thereof.
  • Decoding device including technology adopted in KTA software which is a codec for joint development in AVC and VCEG (Video Coding Expert Group) and technology adopted in TMuC (Test Model Under Consistration) software which is the successor codec It is.
  • FIG. 3 is a block diagram showing a configuration of the moving picture decoding apparatus 1.
  • the moving picture decoding apparatus 1 includes a variable length code decoding unit 11, a predicted image generation unit 12, an inverse quantization / inverse conversion unit 13, an adder 14, a frame memory 15, a deblocking filter 16, and The adaptive filter 17 is provided.
  • the predicted image generation unit 12 includes a motion vector restoration unit 12a, an inter predicted image generation unit 12b, an intra predicted image generation unit 12c, and a prediction method determination unit 12d.
  • the moving picture decoding apparatus 1 is an apparatus for generating moving picture # 2 by decoding encoded data # 1.
  • variable-length code decoding unit 11 decodes the prediction parameter PP related to each partition from the encoded data # 1, and supplies the decoded prediction parameter PP to the predicted image generation unit 12. Specifically, for the inter prediction partition, the variable length code decoding unit 11 receives the inter prediction parameter PP_Inter including the reference image index RI, the estimated motion vector index PMVI, and the motion vector residual MVD from the encoded data # 1. These are decoded and supplied to the motion vector restoration unit 12a.
  • the intra prediction parameter PP_Intra including the estimation flag MPM, the residual index RIPM, and the additional index AI is decoded from the encoded data # 1, and these are supplied to the intra prediction image generation unit 12c.
  • variable length code decoding unit 11 decodes the prediction type information PT for each partition from the encoded data # 1, and supplies this to the prediction method determination unit 12d. Further, the variable length code decoding unit 11 decodes the quantization prediction residual QD for each block and the quantization parameter difference ⁇ qp for the TU including the block from the encoded data # 1, and performs inverse quantization / inverse This is supplied to the conversion unit 13. Further, the variable length code decoding unit 11 decodes the filter parameter FP from the encoded data # 1 and supplies this to the adaptive filter 17.
  • the predicted image generation unit 12 identifies whether each partition is an inter prediction partition for performing inter prediction or an intra prediction partition for performing intra prediction based on the prediction type information PT for each partition. In the former case, the inter prediction image Pred_Inter is generated, and the generated inter prediction image Pred_Inter is supplied to the adder 14 as the prediction image Pred. In the latter case, the intra prediction image Pred_Intra is generated, The generated intra predicted image Pred_Intra is supplied to the adder 14. Note that, when the skip mode is applied to the processing target PU, the predicted image generation unit 12 omits decoding of other parameters belonging to the PU.
  • the motion vector restoration unit 12a 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 frame memory 15. The motion vector restoration unit 12a supplies the restored motion vector mv to the inter predicted image generation unit 12b together with the corresponding reference image index RI.
  • the inter prediction image generation unit 12b generates a motion compensated image mc related to each inter prediction partition by inter-screen prediction. Specifically, using the motion vector mv supplied from the motion vector restoration unit 12a, the motion compensation image mc from the filtered decoded image P_ALF ′ designated by the reference image index RI supplied from the motion vector restoration unit 12a. Is generated.
  • the filtered decoded image P_ALF ′ is an image obtained by performing deblocking processing by the deblocking filter 16 and filtering processing by the adaptive filter 17 on the decoded image that has already been decoded for the entire frame.
  • the inter-predicted image generation unit 12b can read out the pixel value of each pixel constituting the filtered decoded image P_ALF ′ from the frame memory 15.
  • the motion compensated image mc generated by the inter predicted image generation unit 12b is supplied to the prediction method determination unit 12d as an inter predicted image Pred_Inter.
  • the intra predicted image generation unit 12c generates a predicted image Pred_Intra related to each intra prediction partition. Specifically, first, a prediction mode is specified based on the intra prediction parameter PP_Intra supplied from the variable length code decoding unit 11, and the specified prediction mode is assigned to the target partition in, for example, raster scan order.
  • the estimation flag MPM is decoded, and the estimation flag MPM indicates that the prediction mode for the target partition to be processed is the same as the prediction mode assigned to the peripheral partition of the target partition. If it is, the prediction mode assigned to the partition around the target partition is assigned to the target partition.
  • the estimation flag MPM indicates that the prediction mode for the target partition to be processed is not the same as the prediction mode assigned to a partition around the target partition, the remaining The prediction mode index RIPM is decoded, and the prediction mode indicated by the residual prediction mode index RIPM is assigned to the target partition.
  • the intra predicted image generation unit 12c generates a predicted image Pred_Intra from the (local) decoded image P by intra prediction according to the prediction method indicated by the prediction mode assigned to the target partition.
  • the intra predicted image Pred_Intra generated by the intra predicted image generation unit 12c is supplied to the prediction method determination unit 12d.
  • the intra predicted image generation unit 12c may be configured to generate the predicted image Pred_Intra from the filtered decoded image P_ALF by intra prediction.
  • the prediction method determination unit 12d determines whether each partition is an inter prediction partition that should perform inter prediction or an intra prediction partition that should perform intra prediction based on the prediction type information PT about the PU to which each partition belongs. To do. In the former case, the inter prediction image Pred_Inter generated by the inter prediction image generation unit 12b is supplied to the adder 14 as the prediction image Pred. In the latter case, the inter prediction image generation unit 12c generates the inter prediction image Pred_Inter. The intra predicted image Pred_Intra that has been processed is supplied to the adder 14 as the predicted image Pred.
  • the inverse quantization / inverse transform unit 13 (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 14.
  • the inverse quantization / inverse transform unit 13 derives the quantization step QP from the quantization parameter difference ⁇ qp supplied from the variable length code decoding unit 11.
  • the generation of the prediction residual D by the inverse quantization / inverse transform unit 13 is performed in units of blocks obtained by dividing TUs or TUs.
  • the adder 14 generates the decoded image P by adding the prediction image Pred supplied from the prediction image generation unit 12 and the prediction residual D supplied from the inverse quantization / inverse conversion unit 13.
  • the generated decoded image P is stored in the frame memory 15.
  • the deblocking filter 16 determines 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 or the partition boundary in the decoded image P is smaller than a predetermined threshold value. By performing a deblocking process on the partition boundary, the block boundary or an image near the partition boundary is smoothed.
  • the image subjected to the deblocking process by the deblocking filter 16 is stored in the frame memory 15 as a deblocked decoded image P_DB.
  • the adaptive filter 17 (1) sets one or a plurality of unit areas constituting the deblocked decoded image P_DB to any of a plurality of types according to the image characteristics of the deblocked decoded image P_DB in the unit area. (2) ON / OFF of adaptive filter processing for the unit area is switched according to the type to which the unit area belongs. Further, (3) adaptive filter processing is performed on the deblocked decoded image P_DB in the unit region for which the adaptive filter processing is turned on using a filter coefficient group selected according to the type to which the unit region belongs. .
  • FIG. 1 is a block diagram showing the configuration of the adaptive filter 17.
  • the adaptive filter 17 includes a region characteristic value calculation unit 171, a region classification unit 172, and a filter processing unit 173.
  • the region characteristic value calculation unit 171 reads each pixel value of the deblocked decoded image P_DB in the characteristic value calculation reference region including the target unit region to be processed from the frame memory 15, and based on these pixel values, the target unit A characteristic value (also referred to as an area characteristic value) representing the image characteristic of the deblocked decoded image P_DB in the area is calculated.
  • the characteristic value calculation reference region refers to a region formed of pixels referred to for calculating the characteristic value of the deblocked decoded image P_DB in the target unit region.
  • the characteristic value calculation reference area is composed of only the target unit area, or is composed of the target unit area and an area around the target unit area.
  • the region characteristic value calculation unit 171 is a configuration for calculating a characteristic value related to the target unit region, and can also calculate the characteristic value using another image having a correlation with the target unit region. Therefore, the region characteristic value calculation unit 171 is not limited to the deblocked decoded image P_DB, and may calculate the characteristic value with reference to another image, for example, the decoded image P. Also in this case, the pixel value located in the coordinate area corresponding to the target unit area is used.
  • the adaptive filter 17 having the deblocked decoded image P_DB as an input is described. However, the adaptive filter 17 may be configured to have a plurality of inputs. In this way, when the adaptive filter 17 has a plurality of different input images, the characteristic value may be calculated using one of these input images.
  • the region characteristic value calculation unit 171 includes an activity calculation unit 171a.
  • the activity calculation unit 171a calculates an activity ACT as the characteristic value of the deblocked decoded image P_DB in the target unit region.
  • the activity is an index indicating the randomness of the image, and whether there is a large high-frequency component in the conversion coefficient obtained when the DCT conversion is performed on the region including the divided 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 for each divided region is supplied to the region classification unit 172.
  • the activity calculation unit 171a uses, for example, the following formula (1a): Thus, the activity ACT can be calculated.
  • Formula (1a) corresponds to evaluating the activity using the sum of absolute values of adjacent pixel values (Sum of Absolute Difference, SAD) as an index.
  • the activity calculation unit 171a may be configured to calculate the activity ACT by using the following mathematical formula (1b).
  • Formula (1b) corresponds to the evaluation of activity using the sum of modified Laplacians (Sum-ModifiedModLaplacian, SML) of the pixel values of adjacent pixels as an index.
  • the activity calculation unit 171a applies not only to the pixel S (i, j) in the target unit region, but also to the target unit region. Reference is also made to adjacent pixels S ( ⁇ 1, j), S (Bx, j), S (i, ⁇ 1), and S (i, By). That is, the characteristic value calculation reference region when using the formula (1a) or (1b) is the pixel S (i, j) in the target unit region and the pixel S ( ⁇ 1, j) adjacent to the target unit region. , S (Bx, j), S (i, ⁇ 1), and S (i, By).
  • FIG. 4A shows the characteristic value calculation reference region CRR when the activity calculation unit 171a calculates the activity ACT for the target unit region UR of 4 ⁇ 4 pixels using the formula (1a) or (1b). Shown in
  • the pixel value of the deblocked decoded image P_DB may not be referred to for some pixels in the characteristic value calculation reference area.
  • the pixel value of the undecoded LCU cannot be referred to.
  • the activity calculation unit 171a calculates the activity ACT without referring to those pixel values that cannot be referred to.
  • the activity calculation unit 171a obtains the following obtained by partially limiting the range of the sum of i and j in Equation (1a) What is necessary is just to calculate activity ACT using Numerical formula (1a ').
  • the activity calculation unit 171a 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 LCU boundary. It can also be configured to calculate. For example, the activity calculation unit 171a can also calculate the activity ACT by using the following formula (1c).
  • Equation (1c) corresponds to evaluating the activity of the pixel value of the adjacent pixel using the SAD of the pixel value of the adjacent pixel as an index, as in Equation (1a). Differently, the degree of activity is calculated by referring to only the pixels included in the target unit area.
  • the activity calculation unit 171a may be configured to calculate the activity ACT by using the following formula (1d).
  • Equation (1d) corresponds to the evaluation of the activity using the SML of the pixel value of the adjacent pixel as an index, but unlike Equation (1d), In other words, the degree of activity is calculated by referring only to the included pixels.
  • the characteristic value calculation reference is made.
  • the region CRR is the same region as the target unit region 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 activity level calculation unit 171a calculates the activity level for the target unit area by referring only to the pixel values in the target unit area
  • the activity level calculation unit 171a compares the pixel value other than the target unit area with reference to the pixel value.
  • the number of pixels read from the frame memory 15 is reduced, and the data transmission amount from the frame memory 15 to the adaptive filter 16 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 activity calculation part 171a which calculates activity ACT by using Formula (1c) can also be expressed as follows. That is, the activity calculation unit 171a determines the activity ACT (i, j) for the pixel (i, j) in the vicinity of the coordinates (i, j) ⁇ (i, j), (i + 1, j), (i , J + 1) ⁇ with reference to the pixel value of each pixel, and ACT (i in the inner region ⁇ (i, j)
  • the activity calculation unit 171a that calculates the activity ACT by using the mathematical formula (1d) can be expressed as follows. That is, the activity calculation unit 171a determines the activity ACT (i, j) for the pixel (i, j) in the vicinity of the coordinates (i, j) ⁇ (i, j), (i + 1, j), (i , J + 1), (i ⁇ 1, j), (i, j ⁇ 1) ⁇ with reference to the pixel value of each pixel, the inner region ⁇ (i, j)
  • the ACT for the target unit region is calculated using the sum of ACT (i, j) in Bx-2, 1 ⁇ j ⁇ By-2 ⁇ .
  • the activity calculation unit 171a that calculates the activity with reference to only the pixels included in the target unit region has the entire vicinity of the target unit region as an internal region including pixels included in the target unit region.
  • the degree of activity of each target pixel region is calculated from the degree of activity of each pixel belonging to the internal area after deriving the degree of activity of each pixel belonging with reference to the pixel values of the pixels included in the vicinity of the pixel. It can also be expressed as a thing.
  • 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 region classification unit 172 classifies the target unit region into one of a plurality of types based on the activity ACT calculated by the region characteristic value calculation unit 171 as the characteristic value for the target unit region. Subsequently, according to the type, the target region is classified into either a region where the filter process is off (filter off region) or a region where the filter process is on (filter on region). As will be described later, the relationship between the type and the region may be fixed in advance, or a flag indicating which type is classified into which region may be encoded.
  • a type classified into the filter-on region is referred to as a filter-on type
  • a type classified into the filter-off region is referred to as a filter-off type.
  • the target unit area may be classified into the filter-on area and the filter-off area from the direct characteristic value (activity ACT) without classifying the target unit area into a type.
  • the region classification unit 172 is a filter coefficient group included in the filter parameter FP supplied from the variable length code decoding unit 11, and includes a type to which the target unit region belongs. Are assigned to the target unit area. On the other hand, when the target unit region is classified as the filter-off region, the region classification unit 172 does not assign a filter coefficient group to the target unit region.
  • the area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on area or a filter off area, and (2) the target unit area is a filter on area.
  • the filter coefficient group allocated to the target unit area is supplied to the filter processing unit 173.
  • the on / off information U indicates on / off of the filter processing for the target unit region, and can therefore be expressed by 1 bit. Since the classification of the target unit area into the filter-on area / filter-off area is equivalent to the classification of the target unit area into the filter-on type / filter-off type, in the following description, the filter-on area / filter-off area is the same value. Handles the OFF area and the filter ON type / filter OFF type without distinction.
  • FIG. 5A is a graph showing experimental data obtained by the inventor, and a plurality of sequences (“BasketballDrill_q32”, “PartyScene_q32”, “RaceHorses_q32”, “BQSquare_q32”) whose quantization parameter value is 32. ) For each unit region, and a square error reduction amount obtained when adaptive filter processing is performed for each unit region.
  • the square error reduction amount has a positive correlation with the coding efficiency, and indicates that the larger the square error reduction amount, the better the coding efficiency.
  • the unit area in which the square error reduction amount is negative has a negative contribution to the coding efficiency, that is, a contribution to reduce the coding efficiency.
  • the square error reduction amount is negative for any sequence.
  • For the sequence “BasketballDrill_q32”, the range of activity is about 5 or less ⁇
  • the range of activity is about 8 or less ⁇
  • the range of activity is about 3 or less ⁇
  • Sequence Regarding “BQSquare_q32” the square error reduction amount is negative in the range where the activity is approximately 5 or more and approximately 20 or less and in each range where the activity is approximately 3 or less.
  • FIG. 5B is a graph showing the average (“average”) for a plurality of sequences and the total number of unit areas (“count”) having each activity, with respect to the square error reduction amount at each activity. .
  • the value of the graph indicating the average of a plurality of sequences is negative in the range where the activity is approximately 8 or less.
  • the area classification unit 172 can be configured to perform any of the classification processes among the following (classification process example 1-1) to (classification process example 1-7). Further, among the following (Classification Processing Example 1-1) to (Classification Processing Example 1-7), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 1-1) to (Classification process example 1-7).
  • type 0 is a filter-off type
  • types 1 to Non are filter-on types.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Th1 represents a predetermined threshold value.
  • Th1 5 for the sequence “BasketballDrill_q32” -For the sequence "PartyScene_q32”
  • Th1 8
  • Th1 3 for the sequence “RaceHorses_q32” -For the sequence "BQSquare_q32”
  • Th1 20 May be used.
  • a unit region whose activity is equal to or less than a predetermined threshold as a type region 0, that is, a unit region that is not subjected to adaptive filter processing, the negative contribution to the coding efficiency can be reduced. Therefore, the encoding efficiency is improved.
  • the value of the threshold Th1 is preferably set according to a specific calculation formula for calculating the activity.
  • the value of the threshold Th1 that is preferably used in the configuration that calculates the activity ACT using the formula (1b) may be different from the value of the threshold Th1 that is used in the configuration that uses the formula (1a).
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Th2 indicates a predetermined threshold value, and it is assumed that Th1 ⁇ Th2.
  • a specific value of the threshold Th2 may be determined in advance so that the encoding efficiency is improved.
  • a unit area whose activity is equal to or less than a predetermined threshold is set to type 0, that is, a unit area for which adaptive filter processing is not performed. Therefore, the negative contribution to the coding efficiency can be reduced, so that the coding efficiency is improved.
  • a predetermined value as the specific value of the threshold Th2 in this processing example so that the coding efficiency is improved.
  • the area classification unit 172 classifies the target unit area as follows as shown in FIG.
  • the value of the threshold Th2 may be determined in advance by experiments or the like so that the processing amount is further reduced while maintaining high coding efficiency.
  • the experimental data shown in FIG. 5 indicates that when the activity value is approximately 90 or more, even if adaptive filter processing is performed, the coding efficiency is hardly improved. Therefore, if the threshold value Th2 is set to about 90, the processing amount can be reduced while maintaining high coding efficiency.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • the specific value of the threshold Th2 in this processing example is set to a value of about 90 so that the processing amount is further reduced while maintaining high coding efficiency, as in the classification processing example 1-3. You just have to.
  • the encoding efficiency can be effectively improved by using such threshold values Th1 and Th2.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th1 or Th2 ⁇ ACT ⁇
  • Type 2 Th1 ⁇ ACT ⁇ Th2
  • the specific value of the threshold value Th1 in the present processing example may be determined in the same manner as in the classification processing example 1-1.
  • the specific value of the threshold value Th2 in this processing example may be determined in the same manner as in the classification processing example 1-3.
  • the encoding efficiency can be effectively improved by using such threshold values Th1 and Th2.
  • the region classification unit 172 classifies the target unit region as follows, as illustrated in FIG.
  • Type 1 ACT ⁇ Th1 ⁇
  • Type 2 Th1 ⁇ ACT ⁇ Th2 ⁇
  • Type 3 Th2 ⁇ ACT
  • the specific values of the threshold values Th1 and Th2 in this processing example may be determined in advance so as to improve the encoding efficiency.
  • the region characteristic value calculation unit 171 refers to only the pixel value in the target unit region when calculating the activity ACT for the target unit region.
  • the number of pixels read from the frame memory 15 is reduced and the amount of data transmission from the frame memory 15 to the adaptive filter 16 is reduced compared to a configuration that also refers to pixel values other than the target unit region.
  • the processing amount for calculating the activity level is reduced.
  • the filter parameter FP includes on / off designation information V for designating the on / off of the filter processing for each type
  • the area classification unit 172 refers to the on / off designation information V, thereby performing the filter processing for each type.
  • On / off may be determined.
  • the on / off designation information V is information for designating the on / off of the filtering process for each type, and therefore the bit length depends on the total number of types.
  • the filter parameter FP includes 4-bit on / off designation information V as information for designating on / off of the filter processing for each type.
  • the present processing example is not limited to this, and is generally applicable when the total number of types is Ntp and the filter parameter FP includes Ntp bit on / off designation information V.
  • FIG. 6G is a table showing the classification processing in this processing example.
  • the region classification unit 172 classifies the target unit region as follows.
  • Type C 2 ⁇ Th ⁇ ACT ⁇ 3 ⁇ Th ⁇
  • Type D 3 ⁇ Th ⁇ ACT
  • the region classification unit 172 refers to the on / off designation information V included in the filter parameter FP, and determines the on / off of the filter processing for each type. For example, when the on / off designation information V is “0101” in binary expression, type A and type C are set to the filter off type, and type B and type D are set to the filter on type.
  • a specific value of the threshold Th is preferably a predetermined value so that the encoding efficiency is improved.
  • the region classification unit 172 assigns a filter coefficient group included in the filter parameter FP to the target unit region when the target unit region is classified into the filter on type.
  • a filter coefficient group included in the filter parameter FP when a plurality of filter coefficient groups are included in the filter parameter FP, the same selection rule as the selection rule used in the moving image encoding device 2 that generates the encoded data # 1 is used. Any one of the plurality of filter coefficient groups may be selected and assigned to the target unit area.
  • the region classification unit 172 does not assign a filter coefficient group to the target unit region.
  • the area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is classified as a filter on type. If it is, the filter coefficient group assigned to the target unit area is supplied to the filter processing unit 173.
  • the region classification unit 172 sets each unit region as a CU partition flag SP_CU, inter-PU partition information SP_Inter, intra-PU partition information SP_Intra, TU partition information SP_TU, and the like included in the encoded data # 1. May be set so as to have a size and position specified hierarchically, or may be set to have a size and position specified by the area specifying information included in the encoded data # 1, It may be set to have a predetermined size (the same applies hereinafter).
  • FIG. 7A shows an example of a unit area that is hierarchically specified by the CU division flag SP_CU included in the encoded data # 1.
  • the maximum hierarchical depth for the target LCU is 2, and the positions and sizes of the unit areas UR0 to UR6 included in the target LCU are hierarchically specified by the CU division flag SP_CU. .
  • FIG. 7B an example of a unit area having a predetermined size is shown in FIG. 7B.
  • the target LCU for example, 16 ⁇ 16 pixels
  • unit areas UR0 to UR15 having a predetermined size (for example, 4 ⁇ 4 pixels).
  • Each unit area can be identified from each other by an index assigned in the raster scan order as shown in FIG. 7B, for example.
  • the CU partition flag SP_CU, inter-PU partition information SP_Inter, intra-PU partition information SP_Intra, and TU partition information SP_TU included in the encoded data # 1 The processing amount can be reduced as compared with the case of referring to the above.
  • the filter processing unit 173 When the on / off information U supplied from the region classification unit 172 indicates the filter on type, the filter processing unit 173 (1) each pixel value of the deblocked decoded image P_DB in the filter reference range including the target unit region (2) A filtered decoded image P_ALF in the target unit region is generated by performing filter processing using the filter coefficient group supplied from the region classification unit 172 on these pixels. To do.
  • the generated filtered decoded image P_ALF is stored in the frame memory 15.
  • the filter reference range refers to a range that is referred to in order to generate the filtered decoded image P_ALF in the target unit region, and includes a target unit region and a region around the target unit region.
  • the filter processing unit 173 does not perform the filtering process on the target unit region.
  • the filter coefficient group supplied from the region classification unit 172 is the filter coefficient group I (I is any integer satisfying 1 ⁇ I ⁇ Nf, and Nf is the total number of filter coefficient groups included in the filter parameter FP) ).
  • the pixel value of the filter target pixel in the filtered decoded image P_ALF (also referred to as “filtered image”) in the target unit region is represented as SF (x ′, y ′), and the deblocked decoded image in the filter reference range.
  • the pixel value of P_DB (also referred to as “pre-filter image”) is represented as S (x, y).
  • the filter processing unit 173 calculates the pixel value SF (x ′, y ′) by the following formula (2).
  • 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.
  • AI (i, j) represents a filter coefficient to be multiplied by the pixel value S (x + i, y + j) of the pre-filter image among the filter coefficients included in the filter coefficient group I, and oI represents the filter coefficient group.
  • I represents an offset included in I.
  • filter reference region R represents a region (also referred to as “filter reference region R”) that is referred to in order to calculate the pixel value of the filter target pixel, and is set according to the position of the filter target pixel.
  • filter reference range RA also referred to as “filter reference range RA”
  • the filter reference range RA can also be expressed as a set of pixels required for calculating all pixel values of the filtered image in the target unit region.
  • FIG. 8A shows a filter reference region R and a filter reference range RA when the target unit region UR is 8 ⁇ 8 pixels and the filter reference region is 5 ⁇ 5 taps.
  • the hatched pixels indicate the filter target pixels S (x ′, y ′).
  • FIG. 8B shows an example of how to assign filter coefficients to each pixel included in the filter reference region R.
  • the hatched pixels indicate the filter target pixels S (x ′, y ′).
  • each filter coefficient can be assigned to each pixel included in the filter reference region R so as to have a rotational symmetry of 180 degrees.
  • the present embodiment is not limited to this, and the assignment of each filter coefficient to each pixel value may not have rotational symmetry.
  • the filter reference region R may be a rhombus region composed of pixels having a city area distance from the filter target pixel of Ncb or less in units of pixels, or regions having other shapes. Good.
  • the method of assigning the filter coefficient to each pixel included in the filter reference region R and the shape of the filter reference region R may be appropriately set according to the configuration of the moving picture encoding device that generates the encoded data # 1. Good.
  • the activity calculation unit 171a included in the region characteristic value calculation unit 171 uses the vertical activity ACT_V and the horizontal activity as the characteristic value of the deblocked decoded image P_DB in the target unit region instead of the activity ACT described above.
  • the degree ACT_H may be calculated, and the region classification unit 172 may classify the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V.
  • 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 mathematical formula (1a) described above.
  • the horizontal direction activity ACT_H and the vertical direction activity ACT_V may be calculated by the first term and the second term of any one of the above formulas (1b) to (1d), respectively. it can.
  • the region classification unit 172 classifies the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V calculated by the activity calculation unit 171a.
  • the region classification unit 172 may be configured to perform any of the classification processes from the following (Classification process example 2-1) to (Classification process example 2-5). Also, among the following (Classification Processing Example 2-1) to (Classification Processing Example 2-5), classification processing designation information for designating which classification processing is performed is included in the encoded data # 1, The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 2-1) to (Classification process example 2-5).
  • type 0 is a filter-off type
  • types 1 to Non are filter-on types.
  • the area classification unit 172 classifies the target unit area as follows as shown in FIG.
  • Type 0 ACT_H ⁇ ThHor1 and ACT_V ⁇ ThVer1
  • Type 1 ThHor1 ⁇ ACT_H and ACT_V ⁇ ThVer1
  • Type 2 ACT_H ⁇ ThHor1 and ThVer1 ⁇ ACT_V
  • Type 3 ThHor1 ⁇ ACT_H and ThVer1 ⁇ ACT_V
  • values of the thresholds ThHor1 and ThVer1 values that are set in advance so as to improve the encoding efficiency may be used.
  • the target unit area is classified into one of a plurality of types including type 0 according to each value of the horizontal direction activity ACT_H and the vertical direction activity ACT_V, so that the deblocked decoded image P_DB
  • the classification process can be performed more appropriately according to the image characteristics along the horizontal and vertical directions of the image. Therefore, according to this processing example, encoding efficiency can be improved more effectively.
  • the region classification unit 172 classifies the target unit region as follows as shown in FIG. 9B.
  • Type 1 ACT_H ⁇ ThHor1 and ACT_V ⁇ ThVer1
  • Type 2 ACT_H ⁇ ThHor1 and ThVer1 ⁇ ACT_V
  • Type 3 ThHor1 ⁇ ACT_H and ACT_V ⁇ ThVer1
  • Type 4 ThHor1 ⁇ ACT_H and ThVer1 ⁇ ACT_V
  • values of the thresholds ThHor1 and ThVer1 values that are set in advance so as to improve the coding efficiency may be used, as in the classification processing example 2-2.
  • the target unit area is classified into one of a plurality of types not including type 0 according to each value of the horizontal activity ACT_H and the vertical activity ACT_V.
  • the region characteristic value calculation unit 171 refers to only the pixel value in the target unit region when calculating the activity ACT for the target unit region.
  • the number of pixels read from the frame memory 15 is reduced and the amount of data transmission from the frame memory 15 to the adaptive filter 16 is reduced compared to a configuration that also refers to pixel values other than the target unit region.
  • the processing amount for calculating the activity is reduced.
  • the area classification unit 172 classifies the target unit area as follows as illustrated in FIG.
  • Type 0 (ACT_H ⁇ ThHor1 and ACT_V ⁇ ThVer1), or ThHor2 ⁇ ACT_H, or ThVer2 ⁇ ACT_V Type 1: ThHor1 ⁇ ACT_H ⁇ ThHor2 and ACT_V ⁇ ThVer1 Type 2: ACT_H ⁇ ThHor1 and ThVer1 ⁇ ACT_V ⁇ ThVer2 Type 3: ThHor1 ⁇ ACT_H ⁇ ThHor2 and ThVer1 ⁇ ACT_V ⁇ ThVer2
  • values of the thresholds ThHor1, ThVer1, ThHor2, and ThVer2 values that are set in advance so as to improve the encoding efficiency may be used.
  • the threshold values ThHor1 and ThVer1 are used to perform a finer classification process, thereby further improving the encoding efficiency.
  • one configuration of the present invention is a combination of a plurality of characteristic values (here, the horizontal activity ACT_H and the vertical activity) as the characteristic values used for the classification of the filter-on region and the filter-off region. This includes the case of using ACT_V).
  • one configuration of the present invention includes a case where a combination of a plurality of characteristic values is used as a characteristic value used for assigning a filter coefficient group to the filter-on region.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th1 or Th2 ⁇ ACT Type 1: Th1 ⁇ ACT ⁇ Th2 and ACT_H ⁇ ACT_V Type 2: Th1 ⁇ ACT ⁇ Th2 and ACT_V ⁇ ACT_H
  • ACT indicates the above-described activity ACT
  • the activity calculation unit 171a is configured to individually calculate the horizontal activity ACT_H and the vertical activity ACT_V as in the present modification.
  • ACT ACT_H + ACT_V Can be obtained.
  • the filter coefficient group is switched according to the magnitude of the horizontal direction activity level ACT_H and the vertical direction activity level ACT_V.
  • ACT_H ⁇ ACT_V that is, when the vertical activity ACT_V is equal to or higher than the horizontal activity ACT_H, there is a high possibility that a vertical component change such as a horizontal edge exists, and when ACT_H> ACT_V, the vertical edge, etc. There is a high probability that there will be horizontal changes.
  • the directionality of the image in the target unit region is calculated according to the magnitudes of the characteristic values ACT_H and ACT_V, and a filter is selected according to the directionality.
  • ACT_H ⁇ ACT_V that is, the directionality when the change in the vertical direction is larger
  • ACT_V ⁇ ACT_H that is, the directionality when the change in the horizontal direction is larger.
  • 0 and 1 are indexes (also referred to as directionality indexes) for distinguishing the directionality of images from each other.
  • the region classification unit 172 selects a filter type according to a direction index that is a value indicating the direction in the target unit region.
  • the characteristic value used for the classification of the filter-on region and the filter-off region (here, the activity ACT), and the characteristic value used for assigning the filter coefficient group to the filter-on region (here, the horizontal direction activity) ACT_H and vertical activity ACT_V) may be different. That is, the present invention has, as one configuration, a means for classifying the filter on area and the filter off area based on a certain characteristic value, and a means for assigning a filter coefficient group to the filter on area based on a characteristic value different from the certain characteristic value.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th1, or (Th2 ⁇ ACT and 2 ⁇ ACT_H ⁇ ACH_H), or (Th1 ⁇ ACT ⁇ Th2 and 2 ⁇ ACT_H ⁇ ACT_V and 2 ⁇ ACT_V ⁇ ACT_H)
  • Type 1 Th1 ⁇ ACT ⁇ Th2 and 2 ⁇ ACT_H ⁇ ACT_V
  • Type 2 Th1 ⁇ ACT ⁇ Th2 and 2 ⁇ ACT_V ⁇ ACT_H
  • Type 3 (Th2 ⁇ ACT and 2 ⁇ ACT_H ⁇ ACT_V), or (Th2 ⁇ ACT and 2 ⁇ ACT_H ⁇ ACT_V and 2 ⁇ ACT_V ⁇ ACT_H)
  • ACT represents the above-described activity ACT.
  • the directionality in the case of 2 ⁇ ACT_H ⁇ ACT_V is expressed as directionality 0 using the directionality indexes 0 to 2, and the directionality in the case of 2 ⁇ ACT_V ⁇ ACT_H is set to the direction.
  • the directionality in the case of 2 ⁇ ACT_H ⁇ ACT_V and 2 ⁇ act_v ⁇ act_h is expressed as directionality 2.
  • Directionality 0, 1, and 2 correspond to the cases where there are horizontal edges, vertical edges, and diagonal edges, respectively.
  • the region classifying unit 172 selects the filter type for the target unit region in accordance with the directionality index that is a value indicating the directionality of the image in the target unit region.
  • the filter is turned off when the activity is low.
  • the degree of activity is medium
  • the diagonal filter is turned off, and the filters 1 and 2 are assigned to the vertical and horizontal directions.
  • the horizontal filter is turned off and the filter 3 is assigned in a direction other than the horizontal direction.
  • the filter 0 is set when the activity is medium and the directionality is oblique. In the sequence to which this case is applied, there are few oblique lines in the region of activity, and encoding is performed by assigning filters in the oblique direction. This is because the efficiency is not improved. Note that this example is an example, and appropriate allocation differs depending on sequence dependency.
  • the adaptive filter 17 causes the region characteristic value calculation unit 171 to use the activity ACT (or the horizontal activity ACT_H and the vertical activity ACT_V as the characteristic value of the deblocked decoded image P_DB in the target unit region. ) And the region classification unit 172 classifies the target unit region into one of a plurality of types based on the activity ACT (or horizontal activity ACT_H and vertical activity ACT_V). Although mentioned, this embodiment is not limited to this.
  • an average of pixel values (also referred to as an average pixel value) is calculated as the characteristic value of the deblocked decoded image P_DB in the target unit region, and the target unit region is selected from a plurality of types based on the calculated average pixel value. A configuration to be classified will be described.
  • FIG. 10 is a block diagram showing the configuration of the adaptive filter 17 according to this modification.
  • the region characteristic value calculation unit 171 in the adaptive filter 17 according to this modification includes a pixel value reference unit 171 b.
  • the pixel value reference unit 171b 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 frame memory 15 and taking the average of the pixel values.
  • the pixel value reference unit 171b uses, for example, the following formula (3):
  • the average pixel value MP can be calculated by taking a simple average of the pixel values.
  • the pixel value reference unit 171b may be configured to calculate the average pixel value MP by taking a weighted average using a predetermined weight coefficient for each pixel value instead of taking a simple average of each pixel value. .
  • the region classification unit 172 classifies the target unit region into one of a plurality of types based on the average pixel value MP calculated by the region characteristic value calculation unit 171 as the characteristic value for the target unit region.
  • the target unit area is further classified into a filter-on area or a filter-off area depending on the type.
  • the region classification unit 172 is a filter coefficient group included in the filter parameter FP supplied from the variable length code decoding unit 11, and includes a type to which the target unit region belongs. Are assigned to the target unit area.
  • the region classification unit 172 does not assign a filter coefficient group to the target unit region.
  • the area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is a filter on type. In the case of the classification, the filter coefficient group allocated to the target unit area is supplied to the filter processing unit 173.
  • FIG. 11A is a graph showing experimental data obtained by the inventor, and is for a plurality of sequences (“PartyScene_q32”, “RaceHorses_q32”, “BQSquare_q32”) having a quantization parameter value of 32. It is a graph which shows the average pixel value for every unit area
  • the square error reduction amount has a positive correlation with the coding efficiency, and indicates that the larger the square error reduction amount, the better the coding efficiency. Further, it is indicated that the unit area in which the square error reduction amount is negative has a negative contribution to the coding efficiency, that is, a contribution to reduce the coding efficiency.
  • the square error reduction amount is negative for any sequence.
  • the sequence “PartyScene_q32” a range in which the average pixel value is approximately 30 or less, and a range in which the average pixel value is 230 or more.
  • the sequence “RaceHorses_q32” a range in which the average pixel value is approximately 40 to 50, and
  • the square error reduction amount is negative in the range where the average pixel value is about 30 or less and the range where the average pixel value is about 235 or more. ing.
  • FIG. 11B is a graph showing the average (“average”) for a plurality of sequences and the total number of unit areas (“count”) having each average pixel value for the square error reduction amount at each average pixel value. It is.
  • the value of the graph indicating the average of a plurality of sequences is negative in the range where the average pixel value is about 30 or less and in the range where the average pixel value is about 230 or more.
  • the region classification unit 172 can be configured to perform any of the classification processes among the following (classification process examples 3-1) to (classification process examples 3-7).
  • classification processing designation information for designating which classification processing is performed is included in the encoded data # 1, and the region
  • the classification unit 172 may be configured to selectively perform a classification process designated by the classification process designation information among (Classification process examples 3-1) to (Classification process examples 3-7).
  • type 0 is a filter-off type
  • types 1 to Non are filter-on types.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • ThM1 indicates a predetermined threshold value.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • ThM2 indicates a predetermined threshold value, and it is assumed that ThM1 ⁇ ThM2.
  • a specific value of the threshold ThM2 may be determined in advance so that encoding efficiency is improved.
  • a unit area whose average pixel value is equal to or less than a predetermined threshold is set to type 0, that is, a unit area for which no adaptive filter processing is performed. Therefore, the negative contribution to the coding efficiency can be reduced, so that the coding efficiency is improved.
  • the encoding efficiency can be further improved.
  • a specific value of the threshold value ThM2 in the present processing example is preferably a value determined in advance so that the encoding efficiency is improved.
  • the area classification unit 172 classifies the target unit area as follows as shown in FIG.
  • ThM2 indicates a predetermined threshold value.
  • ThM2 a value predetermined for each sequence may be used in view of the experimental data shown in FIG.
  • Th2M 230 -For the sequence “RaceHorses_q32”
  • Th2M 225 -For the sequence “BQSquare_q32”
  • Th2M 235 May be used.
  • ThM2 230 may be used when the threshold Th2M is determined without depending on the sequence.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • a specific value of the threshold ThM2 may be determined in the same manner as in the classification processing example 3-3.
  • a specific value of the threshold ThM1 may be determined in advance so that encoding efficiency is improved. By using such threshold values ThM1 and ThM2, the encoding efficiency can be effectively improved.
  • the area classification unit 172 classifies the target unit area as follows as shown in FIG.
  • Type 0 MP ⁇ ThM1 or ThM2 ⁇ MP ⁇
  • Type 2 ThM1 ⁇ MP ⁇ ThM2
  • the specific value of the threshold ThM1 in this processing example may be determined in the same manner as in the classification processing example 3-1.
  • the specific value of the threshold ThM2 in this processing example may be determined in the same manner as in the classification processing example 3-3.
  • the encoding efficiency can be effectively improved by using such threshold values ThM1 and ThM2.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 1 ACT ⁇ ThM1 ⁇
  • Type 2 ThM1 ⁇ ACT ⁇ ThM2 ⁇
  • Type 3 ThM2 ⁇ ACT
  • the specific values of the threshold values ThM1 and ThM2 in this processing example may be determined in advance so as to improve the encoding efficiency.
  • the filter coefficient group can be switched according to the value of the average pixel value in the target unit region, so that the encoding efficiency is improved.
  • the filter parameter FP includes on / off designation information V for designating the on / off of the filter processing for each type
  • the area classification unit 172 refers to the on / off designation information V, thereby performing the filter processing for each type.
  • On / off may be determined.
  • the on / off designation information V is information for designating the on / off of the filtering process for each type, and therefore the bit length depends on the total number of types.
  • the filter parameter FP includes 4-bit on / off designation information V as information for designating on / off of the filter processing for each type.
  • the present processing example is not limited to this, and is generally applicable when the total number of types is Ntp and the filter parameter FP includes Ntp bit on / off designation information V.
  • FIG. 12G is a diagram illustrating a classification process in this process example.
  • the region classification unit 172 classifies the target unit region as follows.
  • Type C 2 ⁇ ThM ⁇ MP ⁇ 3 ⁇ ThM ⁇
  • Type D 3 ⁇ ThM ⁇ MP
  • the region classification unit 172 refers to the on / off designation information V included in the filter parameter FP, and determines the on / off of the filter processing for each type. For example, when the on / off designation information V is “0101” in binary expression, type A and type C are set to the filter off type, and type B and type D are set to the filter on type.
  • the region classification unit 172 assigns a filter coefficient group included in the filter parameter FP to the target unit region.
  • the same selection rule as the selection rule used in the moving image encoding device 2 that generates the encoded data # 1 is used. Any one of the plurality of filter coefficient groups may be selected and assigned to the target unit area.
  • the region classification unit 172 does not assign a filter coefficient group to the target unit region.
  • the area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is classified as a filter on type. If it is, the filter coefficient group assigned to the target unit area is supplied to the filter processing unit 173.
  • the filter processing can be switched on and off for each range of the average pixel value, the encoding efficiency is improved.
  • the pixel value reference unit 171b included in the region characteristic value calculation unit 171 takes the average of the pixel values as the characteristic value of the deblocked decoded image P_DB in the target unit region to be processed.
  • the average pixel value MP is calculated, and the region classification unit 172 classifies the target unit region into one of a plurality of types based on the average pixel value MP. It is not limited to this.
  • the pixel value reference unit 171b included in the region characteristic value calculation unit 171 calculates the average pixel value MP and the variance VP of each pixel value as the characteristic value of the deblocked decoded image P_DB in the target unit region.
  • the area classification unit 172 classifies the target unit area into one of a plurality of types based on the average pixel value MP and the variance VP.
  • the target unit area is a rectangle of Bx pixels ⁇ By pixels
  • the coordinates of each pixel in the target unit area are (i, j) (i and j are 0 ⁇ i ⁇ Bx ⁇ 1 and 0 ⁇ j, respectively).
  • ⁇ By ⁇ 1 the pixel value of the deblocked decoded image P_DB at the coordinates is represented by S (i, j)
  • the pixel value reference unit 171b may, for example, ) Can be used to calculate the variance VP.
  • variance VP calculated by the pixel value reference unit 171b functions as an index indicating the randomness of the deblocked decoded image P_DB in the target unit region, similarly to the activity ACT described above.
  • the pixel value reference unit 171b calculates the average pixel value MP using, for example, Equation (3).
  • the area classification unit 172 sets the target unit area to one of a plurality of types based on the average pixel value MP and the variance VP calculated by the area characteristic value calculation unit 171 as the characteristic values for the target unit area.
  • the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type).
  • the region classification unit 172 is a filter coefficient group included in the filter parameter FP supplied from the variable length code decoding unit 11, and corresponds to the type to which the target unit region belongs.
  • the assigned filter coefficient group is assigned to the target unit area.
  • the region classification unit 172 does not assign a filter coefficient group to the target unit region.
  • the area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is a filter on type. In the case of the classification, the filter coefficient group allocated to the target unit area is supplied to the filter processing unit 173.
  • the region classification unit 172 may be configured to perform any of the classification processes from the following (Classification process example 4-1) to (Classification process example 4-2). Further, among the following (Classification Processing Example 4-1) to (Classification Processing Example 4-2), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 4-1) to (Classification process example 4-2).
  • type 0 is a filter-off type
  • types 1 to Non are filter-on types.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 VP ⁇ ThV1 Type 1: ThV1 ⁇ VP and MP ⁇ ThM1 Type 2: ThV1 ⁇ VP and ThM1 ⁇ MP
  • the threshold values ThM1 and ThV1 may be determined so that the coding efficiency is improved.
  • the distribution unit VP that is, the target unit region in which the randomness of the image is equal to or less than the threshold value ThV1 is set as a unit region that is not subjected to the filtering process. Therefore, the encoding efficiency is improved as in the configuration in which the unit area whose activity ACT is equal to or less than the predetermined threshold is set as a unit area that is not subjected to the filtering process.
  • the filter coefficient group is switched according to the magnitude of the average pixel value, so that the coding efficiency can be improved more effectively.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 VP ⁇ ThV1, or Th2 ⁇ VP, or ThM2 ⁇ MP
  • Type 1 ThV1 ⁇ VP ⁇ ThV2 and MP ⁇ ThM1
  • Type 2 ThV1 ⁇ VP ⁇ ThV2 and ThM1 ⁇ MP ⁇ ThM1
  • the threshold values ThM1, ThV1, and ThM2 may be determined so that the coding efficiency is improved. Further, the value of the threshold ThV2 may be determined so as to reduce the processing amount while maintaining high coding efficiency.
  • the unit region where the variance VP is equal to or less than the threshold value ThV1 and the unit region where the variance VP is greater than the threshold value ThV2 are set as the unit region where the filter process is not performed. Further, since the filter coefficient group is switched according to the average pixel value for the unit area to be subjected to the filter process, the encoding efficiency can be effectively improved.
  • ⁇ Modification 4> As described above, the characteristic value of the deblocked decoded image P_DB in the target unit area is calculated, and the adaptive filter that switches on / off the filter process for the target unit area based on the calculated characteristic value has been described.
  • the form is not limited to this.
  • FIG. 14 is a diagram illustrating a part of syntax included in the filter parameter FP (denoted as alf_param in FIG. 14) of the encoded data # 1 according to the present modification.
  • the configuration of the encoded data # 1 according to this modification is substantially the same as the configuration of the encoded data # 1 described above, but differs in the following points. That is, as shown in FIG. 14, in the filter parameter FP of the encoded data # 1 according to the present modification, (1) syntax adaptive_loop_filter_flag that specifies whether or not to perform adaptive filter processing on the target slice, (2) Syntax alf_cu_control_flag that specifies whether or not to turn on / off the adaptive filter processing for each coding unit, (3) Maximum division depth (maximum split) from the maximum coding unit for the coding unit that is the target of on / off control (depth) specifying syntax (hierarchy specifying information) alf_cu_control_max_depth, (4) syntax alf_length_cu_control_info specifying the number of coding units to be on / off controlled, and (5) coding unit to be on / off controlled Syntax (on / off flag) alf_cu_flag [i] that specifies on / off of adaptive filter
  • FIGS. 15 (a) to 15 (d) show respective coding units to be subjected to on / off control in the maximum coding unit LCU when the value of alf_cu_control_max_depth is 0 to 3, together with a branch diagram showing a hierarchical structure. Show.
  • the filter parameter FP includes an on / off flag alf_cu_flag [0] for the entire maximum coding unit LCU.
  • the filter parameter FP includes on / off flags alf_cu_flag [0] to alf_cu_flag for each of the encoding units 0 to 3 one layer lower than the maximum encoding unit LCU. [3] is included.
  • the filter parameter FP includes encoding unit 0 and encoding unit 7 that are one layer lower than the maximum encoding unit LCU, and maximum encoding unit LCU.
  • On / off flags alf_cu_flag [0] to alf_cu_flag [7] for each of the encoding units 1 to 6 in the lower hierarchy are included.
  • the filter parameter FP includes coding unit 0 and coding unit 10 that are one layer lower than the maximum coding unit LCU, and two layers from the maximum coding unit LCU.
  • On-off flags alf_cu_flag [0] to alf_cu_flag [10] are included for each of the lower encoding units 1 to 4, the encoding unit 9, and the encoding units 5 to 8 that are three layers lower than the maximum encoding unit LCU. .
  • FIG. 16A shows an activity ACT as a characteristic value for the target unit region and an on / off flag decoded from the encoded data # 1 by the region classification unit 172 included in the adaptive filter 17 according to this modification.
  • An example of processing for classifying the target unit region into either type 0 or type 1 with reference to the on / off flag alf_cu_flag_ [i] for the coding unit including the target unit region is shown.
  • the on / off flag alf_cu_flag_ [i] for the coding unit including the target unit region is 0, that is, the on / off flag alf_cu_flag [i] performs the filtering process on the coding unit.
  • the area classification unit 172 classifies the target unit area as type 0 regardless of the magnitude of the characteristic value. Therefore, the filter processing unit 173 included in the adaptive filter 17 does not perform filter processing on such a target unit region.
  • the filter processing unit 173 included in the adaptive filter 17 performs the filter process only on the target unit region whose on / off flag alf_cu_flag_ [i] is 1 and classified into a type other than type 0.
  • the activity is exemplified as the characteristic value.
  • the present modification is not limited to this, and an average pixel value or directionality may be used as the characteristic value.
  • the present modification is classified based on the characteristic values described in the classification processing examples 1-1 to 1-7, 2-1 to 2-4, 3-1 to 3-7, and 4-1 to 4-2. Can be widely applied to a classification method obtained by combining any of the above and classification based on the on / off flag alf_cu_flag [i].
  • unit areas classified into types other than type 0, that is, unit areas that are actually subjected to filter processing by the filter processing unit 173 are hatched.
  • FIG. 16B illustrates a case where each unit area has a size and a position that are hierarchically specified by the CU division flag SP_CU included in the encoded data # 1.
  • the present modification is not limited to this, and each unit area may have a predetermined size.
  • the unit area for calculating characteristics is equal to or less than the minimum CU (minimum coding unit).
  • the minimum CU minimum coding unit
  • the unit area for calculating the characteristics is preferably a unit area composed of four or more pixels (2 ⁇ 2 pixels, 1 ⁇ 4 pixels, 4 ⁇ 1 pixels).
  • the processing amount can be reduced.
  • the unit area for calculating the characteristic is small, the memory size for temporarily storing the calculated characteristic value until the filtering process is increased.
  • the memory size can be reduced by using four or more pixels. Can be reduced.
  • each unit area includes the CU partitioning flag SP_CU included in the encoded data # 1 as in the example illustrated in FIG. It is also possible to have a size and position specified hierarchically by.
  • the adaptive filter 17 switches on / off of the filter process in units smaller than the encoding unit corresponding to the maximum division depth specified by alf_cu_control_max_depth. be able to. That is, by setting the unit area for calculating the characteristics to a small unit that does not depend on the hierarchy designation information, even when the control area designated by the hierarchy designation information is large, the on / off control can be performed in a smaller unit. Therefore, since it is possible to perform fine on / off control while suppressing the code amount of the on / off flag, encoding efficiency is improved.
  • the target unit area for performing characteristic calculation is determined according to the control unit determined by the hierarchy designation information, it is necessary to perform characteristic calculation processing according to the structure of the control unit. In this case, the processing becomes complicated with many branches, and the amount of calculation increases, and the scale of software and circuits increases. As described above, when the target unit area for performing characteristic calculation is determined without depending on the hierarchy designation information, the complexity of characteristic value calculation is reduced.
  • the area characteristic value calculation unit 171 in the present modification includes a directionality calculation unit 171c in addition to the activity calculation unit 171a.
  • the directionality calculation unit 171c calculates the edge angle Theta as the directionality of the deblocked decoded image P_DB in the target unit region.
  • the directionality calculation unit 171c supplies the calculated edge angle Theta to the region classification unit 172.
  • the region classification unit 172 selects a filter type according to the activity ACT and the edge angle Theta.
  • the directionality calculation unit 171c calculates the edge angle Theta of the deblocked decoded image P_DB in the target unit region.
  • the directionality calculation processing by the directionality calculation unit 171c will be described for each of the case where the target unit region includes only one pixel and the case where the target unit region includes a plurality of pixels.
  • the directionality calculation unit 171c sets a 3 ⁇ 3 pixel reference region centered on the target pixel, and for each pixel in the reference region,
  • the pixel values Sobel_x and Sobel_y after the Sobel filter are calculated by applying the Sobel filter matrices SFM_x and SFM_y defined by the following equations.
  • the directionality calculating unit 171c calculates the edge angle Theta by the following mathematical formula.
  • Theta arctan (Sobel_x / Sobel_y)
  • 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 directionality calculation unit 171c first sets a reference region of 3 ⁇ 3 pixels for each pixel included in the target unit region, and performs a source search for each pixel by the method described above. Pixel values Sobel_x and Sobel_y after the bell filter are calculated.
  • the directionality calculation unit 171c calculates the edge strength ES for each pixel by the following mathematical formula, and uses the pixel values Sobel_x and Sobel_y after the Sobel filter for the pixel having the largest edge strength ES.
  • the obtained edge angle Theta is supplied to the region classification unit 172.
  • the directionality calculation unit 171c may be configured to output a number (direction index) corresponding to the edge direction without calculating the angle of the edge.
  • the direction index can be generated as follows by dividing the case according to the magnitude relation between Sobel_y and Sobel_x.
  • Direction index 0
  • Directionality index 1
  • and the signs of Sobel_y and Sobel_x are equal
  • index of index 2
  • Directionality index 3
  • four directional indexes are calculated. However, two directional indexes or eight directional indexes may be calculated.
  • the area classification unit 172 may be configured to perform any of the classification processes among the following (classification process example 5-1) to (classification process example 5-2). Further, among the following (Classification Processing Example 5-1) to (Classification Processing Example 5-2), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification Process Example 5-1) to (Classification Process Example 5-2).
  • type 0 is a filter-off type
  • types 1 to Non are filter-on types.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th
  • Type 1 ACT> Th and (0 ° ⁇ Theta ⁇ 45 ° or 135 ° ⁇ Theta ⁇ 180 °)
  • Type 2 ACT> Th and 45 ° ⁇ Theta ⁇ 135 °
  • a target unit region whose activity ACT is equal to or less than a predetermined threshold Th is set as a unit region that is not subjected to filter processing. Further, when the activity ACT is larger than the threshold Th, the target unit region is classified into one of two types according to the edge angle.
  • the region classification unit 172 classifies the target unit region as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th1
  • Type 1 Th1 ⁇ ACT ⁇ Th2 and (0 ° ⁇ Theta ⁇ 22.5 ° or 157.5 ° ⁇ Theta ⁇ 180 °)
  • Type 2 Th1 ⁇ ACT ⁇ Th2 and 22.5 ° ⁇ Theta ⁇ 67.5 °
  • Type 3 Th1 ⁇ ACT ⁇ Th2 and 67.5 ° ⁇ Theta ⁇ 112.5 °
  • Type 4 Th1 ⁇ ACT ⁇ Th2 and 112.5 ° ⁇ Theta ⁇ 157.5 ° ⁇
  • Type 5 ACT> Th2
  • the target unit area whose activity ACT is equal to or less than the predetermined threshold Th1 is set as a unit area that is not subjected to the filter process.
  • the target unit region is classified into one of four types (type 1 to type 4) according to the edge angle.
  • the target unit area is classified as type 5.
  • the classification process in the present modification is not limited to the above example.
  • the target unit region is selected from any of a plurality of types according to the edge angle. It is good also as a structure classified into these.
  • the region characteristic value calculation unit 171 in this modification includes both an activity calculation unit 171a and a pixel value reference unit 171b.
  • the region classification unit 172 selects a filter type according to the activity ACT and the average pixel value MP. Since the activity calculation processing by the activity calculation unit 171a and the average pixel value calculation processing by the pixel value reference unit 171b have already been described, description thereof will be omitted here.
  • the region classification unit 172 may be configured to perform any of the classification processes from the following (Classification process example 6-1) to (Classification process example 6-2). Further, among the following (Classification Processing Example 6-1) to (Classification Processing Example 6-2), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 6-1) to (Classification process example 6-2).
  • type 0 is a filter-off type
  • types 1 to Non are filter-on types.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th1, or ACT> Th2, or (Th1 ⁇ ACT ⁇ Th2 and MP ⁇ ThM1)
  • Type 1 Th1 ⁇ ACT ⁇ Th2 and ThM1 ⁇ MP ⁇ ThM2
  • Type 2 Th1 ⁇ ACT ⁇ Th2 and ThM2 ⁇ MP
  • the target unit area whose activity ACT is equal to or smaller than the predetermined threshold Th1 and the target unit area whose activity ACT is larger than the predetermined threshold Th2 are set as unit areas not subjected to the filter process.
  • the target unit area whose activity ACT is larger than the threshold Th1 and equal to or smaller than the threshold Th2 and whose average pixel value MP is equal to or smaller than the predetermined threshold ThM1 is also set as a unit area not subjected to the filtering process. Further, when the activity ACT is larger than the threshold Th1 and equal to or smaller than the threshold Th2, and the average pixel value MP is larger than the threshold ThM1, it is classified into either type 1 or type 2 according to the average pixel value MP. To do.
  • the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
  • Type 0 ACT ⁇ Th1, or (Th1 ⁇ ACT ⁇ Th2 and MP ⁇ ThM1), or (Th2 ⁇ ACT and MP ⁇ ThM1)
  • Type 1 Th1 ⁇ ACT ⁇ Th2 and ThM1 ⁇ MP ⁇ ThM2
  • Type 2 Th1 ⁇ ACT ⁇ Th2 and ThM2 ⁇ MP
  • Type 3 Th2 ⁇ ACT and ThM1 ⁇ MP
  • the target unit area whose activity ACT is equal to or less than the predetermined threshold Th1 is set as a unit area that is not subjected to the filter process.
  • the target unit region whose average pixel value MP is equal to or less than the predetermined threshold ThM1 is also set as a unit region that is not subjected to the filtering process.
  • the activity ACT is larger than the threshold Th1 and equal to or smaller than the threshold Th2, and the average pixel value MP is larger than the threshold ThM1, it is classified into either type 1 or type 2 according to the average pixel value MP. To do. Further, when the activity ACT is larger than the threshold value Th2 and the average pixel value MP is larger than the threshold value ThM1, it is classified as type 3.
  • the moving image encoding apparatus 2 includes H.264 as a part thereof.
  • FIG. 21 is a block diagram showing a configuration of the moving picture encoding apparatus 2.
  • the moving image encoding device 2 includes a predicted image generation unit 21, a transform / quantization unit 22, an inverse quantization / inverse transform unit 23, an adder 24, a frame memory 25, a deblocking filter 26, An adaptive filter 27, a variable length code encoding unit 28, and a subtractor 29 are provided.
  • the predicted image generation unit 21 includes an intra predicted image generation unit 21a, a motion vector detection unit 21b, an inter predicted image generation unit 21c, a prediction method control unit 21d, and a motion vector redundancy deletion unit. 21e.
  • the moving image encoding device 2 is a device that generates encoded data # 1 by encoding moving image # 10 (encoding target image).
  • the predicted image generation unit 21 recursively divides the processing target LCU into one or a plurality of lower-order CUs, further divides each leaf CU into one or a plurality of partitions, and uses an inter-screen prediction for each partition.
  • a predicted image Pred_Inter or an intra predicted image Pred_Intra using intra prediction is generated.
  • the generated inter prediction image Pred_Inter and intra prediction image Pred_Intra are supplied to the adder 24 and the subtractor 29 as the prediction image Pred.
  • the prediction image generation unit 21 omits encoding of other parameters belonging to the PU for the PU to which the skip mode is applied. Also, (1) the mode of division into lower CUs and partitions in the target LCU, (2) whether to apply the skip mode, and (3) which of the inter predicted image Pred_Inter and the intra predicted image Pred_Intra for each partition Whether to generate is determined so as to optimize the encoding efficiency.
  • the intra predicted image generation unit 21a generates a predicted image Pred_Intra for each partition by intra prediction. 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 21a supplies the generated intra predicted image Pred_Intra to the prediction method control unit 21d.
  • the intra predicted image generation unit 21a determines an estimated prediction mode for the target partition from the prediction modes assigned to the peripheral partitions of the target partition, and the estimated prediction mode and the prediction mode actually selected for the target partition Are supplied as a part of the intra prediction parameter PP_Intra to the variable length code encoding unit 27 via the prediction scheme control unit 21d, and the variable length code encoding unit 27
  • the flag MPM is included in the encoded data # 1.
  • the intra predicted image generation unit 21a sets the residual prediction mode index RIPM indicating the prediction mode for the target partition. Then, as a part of the intra prediction parameter PP_Intra, the variable length code encoding unit 27 supplies the residual prediction mode index RIPM to the encoded data # 1 via the prediction scheme control unit 21d. It is assumed to be included
  • the intra predicted image generation unit 21a may be configured to generate a predicted image Pred_Intra from the filtered decoded image P_ALF by intra-screen prediction.
  • the motion vector detection unit 21b detects a motion vector mv regarding each partition. Specifically, (1) the filtered decoded image P_ALF ′ used as the 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_ALF ′. Detects a motion vector mv.
  • the filtered decoded image P_ALF ′ is an image obtained by performing deblocking processing by the deblocking filter 26 and filtering processing by the adaptive filter 27 on the decoded image that has already been decoded for the entire frame.
  • the motion vector detection unit 21b can read out the pixel value of each pixel constituting the filtered decoded image P_ALF ′ from the frame memory 25.
  • the motion vector detection unit 21b supplies the detected motion vector mv to the inter predicted image generation unit 21c and the motion vector redundancy deletion unit 21e together with the reference image index RI that specifies the filtered decoded image P_ALF ′ used as the reference image. To do.
  • the inter prediction image generation unit 21c generates a motion compensated image mc related to each inter prediction partition by inter-screen prediction. Specifically, the motion compensation image mc is obtained from the filtered decoded image P_ALF ′ designated by the reference image index RI supplied from the motion vector detection unit 21b, using the motion vector mv supplied from the motion vector detection unit 21b. Generate. Similar to the motion vector detection unit 21b, the inter prediction image generation unit 21c can read out the pixel value of each pixel constituting the filtered decoded image P_ALF ′ from the frame memory 25. The inter prediction image generation unit 21c 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 21b to the prediction method control unit 21d.
  • inter prediction image Pred_Inter inter prediction image Pred_Inter
  • the prediction scheme control unit 21d 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 21d supplies the intra prediction image Pred_Intra as the prediction image Pred to the adder 24 and the subtractor 29, and also uses the intra prediction parameter PP_Intra supplied from the intra prediction image generation unit 21a. This is supplied to the variable length code encoder 28.
  • the prediction scheme control unit 21d supplies the inter prediction image Pred_Inter as the prediction image Pred to the adder 24 and the subtractor 29, and the reference image index RI and motion vector redundancy described later.
  • the estimated motion vector index PMVI and the motion vector residual MVD supplied from the deletion unit 21e are supplied to the variable length code encoding unit 27 as an inter prediction parameter PP_Inter.
  • the motion vector redundancy deletion unit 21e deletes redundancy in the motion vector mv detected by the motion vector detection unit 21b. 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 deleting unit 21e supplies the generated motion vector residual MVD to the prediction method control unit 21d together with the estimated motion vector index PMVI indicating the selected estimation method.
  • the transform / quantization unit 22 performs (1) DCT transform (Discrete Cosine Transform) for each block (transform unit) on the prediction residual D obtained by subtracting the predicted image Pred from the encoding target image, and (2) obtains the DCT transform.
  • the obtained DCT coefficients are quantized, and (3) the quantized prediction residual QD obtained by the quantization is supplied to the variable length code encoding unit 27 and the inverse quantization / inverse transform unit 23.
  • the transform / quantization unit 22 (1) selects a quantization step QP to be used for quantization for each TU, and (2) sets a quantization parameter difference ⁇ qp indicating the size of the selected quantization step QP.
  • 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 24.
  • the quantization prediction residual QD is inversely quantized, the quantization step QP supplied from the transform / quantization unit 22 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 22. Common names are used for this purpose.
  • the adder 24 adds the predicted image Pred selected by the prediction scheme control unit 21d to the prediction residual D generated by the inverse quantization / inverse transform unit 23, thereby obtaining the (local) decoded image P. Generate.
  • the (local) decoded image P generated by the adder 24 is supplied to the deblocking filter 27 and stored in the frame memory 25, and is used as a reference image in intra prediction.
  • variable-length code encoding unit 28 (Variable-length code encoding unit 28) The variable-length code encoding unit 28 (1) the quantization prediction residual QD and ⁇ qp supplied from the transform / quantization unit 22, and (2) the quantization parameter PP (inter prediction) supplied from the prediction scheme control unit 21d. The parameter PP_Inter and the intra prediction parameter PP_Intra) and (3) the filter parameter FP supplied from the adaptive filter 27 is variable-length-encoded to generate encoded data # 1.
  • CABAC Context-based Adaptive Binary Arithmetic Coding
  • CAVLC Context-based Adaptive VLC
  • the subtracter 29 generates the prediction residual D by subtracting the prediction image Pred selected by the prediction method control unit 21d from the encoding target image.
  • the prediction residual D generated by the subtractor 29 is DCT transformed / quantized by the transform / quantization unit 22.
  • Deblocking filter 26 When the difference between the pixel values of pixels adjacent to each other via a block boundary or partition boundary in the decoded image P is smaller than a predetermined threshold, the deblocking filter 26 By performing a deblocking process on the partition boundary, the block boundary or an image near the partition boundary is smoothed.
  • the image subjected to the deblocking process by the deblocking filter 26 is stored in the frame memory 25 as a deblocked decoded image P_DB.
  • the adaptive filter 27 (1) sets one or a plurality of unit areas constituting the deblocked decoded image P_DB to any of a plurality of types according to the image characteristics of the deblocked decoded image P_DB in the unit area. (2) ON / OFF of adaptive filter processing for the unit area is switched according to the type to which the unit area belongs. Also, (3) filter coefficients for each type so that the error between the deblocked decoded image P_DB and the encoding target image (moving image # 10) in the unit area where the adaptive filter processing is set to ON is minimized. (4) Using the determined filter coefficient group, adaptive filter processing is performed on the deblocked decoded image P_DB.
  • FIG. 22 is a block diagram showing the configuration of the adaptive filter 27. As illustrated in FIG. 22, the adaptive filter 27 includes a region characteristic value calculation unit 271, a region classification unit 272, and a filter processing unit 273.
  • the region characteristic value calculation unit 271 reads each pixel value of the deblocked decoded image P_DB in the characteristic value calculation reference region including the target unit region to be processed from the frame memory 15, and based on the pixel value, the target unit A characteristic value (also referred to as an area characteristic value) representing the image characteristic of the deblocked decoded image P_DB in the area is calculated.
  • the characteristic value calculation reference region refers to a region formed of pixels referred to for calculating the characteristic value of the deblocked decoded image P_DB in the target unit region.
  • the characteristic value calculation reference area is composed of only the target unit area, or is composed of the target unit area and an area around the target unit area.
  • the region characteristic value calculation unit 271 includes an activity calculation unit 271a.
  • the activity calculation unit 271a calculates an activity ACT as the characteristic value of the deblocked decoded image P_DB in the target unit region. Further, the calculated activity ACT for each divided region is supplied to the region classification unit 272.
  • the specific method for calculating the activity level by the activity level calculation unit 271a is the same as the method for calculating the activity level by the activity level calculation unit 171a included in the moving image decoding apparatus 1, and thus the description thereof is omitted here.
  • the region classification unit 272 classifies the target unit region into one of a plurality of types based on the activity ACT calculated by the region characteristic value calculation unit 271 as the characteristic value for the target unit region.
  • the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type).
  • the region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
  • the area classification unit 272 may be configured to perform any one of the following classification processing examples 1-1 ′ to (classification processing examples 1-6 ′).
  • the region classification unit 272 is configured to selectively perform any one of the following (classification processing example 1-1 ′) to (classification processing example 1-6 ′), It is good also as a structure which includes the classification process designation
  • type 0 is a filter-off type
  • (Classification example 1-7 ′) Substantially the same processing as (classification processing example 1-7) by the region classification unit 172 is performed. However, when the region classification unit 172 performs the main classification process, the filter processing unit 273 has higher encoding efficiency for on / off of the filter processing for each type (for example, types A to D in FIG. 6G). The on / off designation information V indicating the determined on / off is supplied to the region classification unit 172.
  • the filter processing unit 273 classifies each unit region included in the target slice or the target LCU based on the type information supplied from the region classifying unit 272, and outputs the deblocked decoded image P_DB and the encoding target image (moving image). A filter coefficient group is determined for each type so that the error from # 10) is minimized.
  • an image made up of unit regions classified as type I in the deblocked decoded image P_DB in the target slice or the target LCU is represented as an image I, and coordinates of pixels included in the image I are (x,
  • the pixel value of the pixel that is y) is expressed as SI (x, y)
  • the pixel value of the pixel whose coordinates are (x, y) among the pixels included in the encoding target image in the target slice or the target LCU is ST ( x, y)
  • the filter processing unit 273 derives, for example, a filter coefficient aI (i, j) and an offset oI that minimize the square error E given by the following equation (5). .
  • the filter processing unit 273 derives a filter coefficient group I including the filter coefficient aI (i, j) and the offset oI for all unit areas classified into types other than type 0 by the area classifying unit 272. For example, when the target slice or the target LCU is configured from unit areas classified into type 0, type 1, and type 2, the filter processing unit 273 performs processing for the unit areas classified into type 1.
  • a filter coefficient group 1 and a filter coefficient group 2 for a unit region classified as type 2 are derived.
  • the filter processing unit 273 performs filtering on the deblocked decoded image P_DB in each unit region included in the target slice or the target LCU by performing filter processing using the filter coefficient group derived for each type.
  • a decoded image P_ALF is generated. For example, when the target slice or the target LCU is composed of unit areas classified into type 0, type 1, and type 2, the filter processing unit 273 performs the deblocked decoding in the target slice or the target LCU.
  • a filter process using the filter coefficient group 1 is performed on a unit area classified as type 1 in the image P_DB, and a filter process using the filter coefficient group 2 is performed on a unit area classified as type 2.
  • the filter coefficient group for each type derived by the filter processing unit 273 is supplied to the variable length code encoding unit 28 as a part of the filter parameter FP.
  • the activity calculation unit 271a included in the region characteristic value calculation unit 271 uses, as the characteristic value of the deblocked decoded image P_DB in the target unit region, the vertical activity ACT_V and the horizontal activity instead of the activity ACT described above.
  • the degree ACT_H may be calculated, and the region classification unit 272 may classify the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V.
  • 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 mathematical formula (1a) described above.
  • the horizontal direction activity ACT_H and the vertical direction activity ACT_V may be calculated by the first term and the second term of any one of the above formulas (1b) to (1d), respectively. it can.
  • the region classification unit 272 classifies the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V calculated by the activity calculation unit 271a.
  • the region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
  • the classification processing by the region classification unit 272 according to the present modification is the same as the classification processing by the region classification unit 172 described in ⁇ Modification 1>, and thus description thereof is omitted here.
  • the adaptive filter 27 calculates an average of pixel values (also referred to as an average pixel value) as a characteristic value of the deblocked decoded image P_DB in the target unit region, and sets the target unit region to a plurality of types based on the calculated average pixel value. It is good also as a structure classified into either.
  • FIG. 23 is a block diagram showing a configuration of the adaptive filter 27 according to this modification.
  • the region characteristic value calculation unit 271 in the adaptive filter 27 according to this modification includes a pixel value reference unit 271b.
  • the pixel value reference unit 271b calculates the average pixel value MP by reading each pixel value of the deblocked decoded image P_DB in the target unit area to be processed from the frame memory 25 and taking the average of the pixel values.
  • the region classification unit 272 classifies the target unit region into one of a plurality of types based on the average pixel value MP calculated by the region characteristic value calculation unit 271 as the characteristic value for the target unit region.
  • the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type).
  • the region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
  • the area classification unit 272 can be configured to perform any of the following classification processing examples (classification processing example 3-1 ′) to (classification processing example 3-7 ′).
  • the region classification unit 272 is configured to selectively perform any one of the following (classification processing examples 3-1 ′) to (classification processing examples 3-7 ′). It is good also as a structure which includes the classification process designation
  • the pixel value reference unit 271b included in the region characteristic value calculation unit 271 calculates the average pixel value MP and the variance VP of each pixel value as the characteristic value of the deblocked decoded image P_DB in the target unit region, and the region classification unit 272
  • the target unit area may be classified into one of a plurality of types based on the average pixel value MP and the variance VP.
  • the calculation process of the variance VP by the pixel value reference unit 271b according to this modification is the same as the calculation process of the variance VP by the pixel value reference unit 171b described in ⁇ Modification 3>, and thus the description thereof is omitted here.
  • the region classification unit 272 sets the target unit region to one of a plurality of types based on the average pixel value MP and the variance VP calculated by the region characteristic value calculation unit 271 as the characteristic value for the target unit region.
  • the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type).
  • the region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
  • the classification processing by the region classification unit 272 according to the present modification is the same as the classification processing by the region classification unit 172 described in ⁇ Modification 3>, and thus description thereof is omitted here.
  • the adaptive filter 27 determines whether or not to perform adaptive filter processing on the target slice, and supplies a syntax adaptive_loop_filter_flag indicating the determined result to the variable-length code encoding unit 28; (2) a function for determining whether to control on / off of the adaptive filter processing for each coding unit, and supplying a syntax alf_cu_control_flag indicating the determined result to the variable-length code encoding unit 28; and (3) on / off control.
  • the maximum division depth (maximum split depth) from the maximum coding unit is determined for the coding unit to be processed, and the syntax (hierarchy designation information) alf_cu_control_max_depth indicating the determined result is input to the variable-length code encoding unit 28
  • the function to be supplied and (4) the number of coding units to be subjected to on / off control is determined, and the syntax alf_length_cu_control_info indicating the determined result is variable (5)
  • a syntax (on / off flag) alf_cu_flag [i] indicating the result of determining the on / off of the adaptive filter processing for each coding unit to be subjected to on / off control ] To the variable-length code encoding unit 28.
  • the adaptive filter 27 according to this modification can be configured to perform the determinations (1) to (5) so that the encoding efficiency is further improved.
  • the target unit area for performing characteristic calculation is determined according to the control unit determined by the hierarchy designation information, it is necessary to perform characteristic calculation processing according to the structure of the control unit. In this case, the processing becomes complicated with many branches, and the amount of calculation increases, and the scale of software and circuits increases. As described above, when the target unit area for performing characteristic calculation is determined without depending on the hierarchy designation information, the complexity of characteristic value calculation is reduced.
  • a video encoding device it is desirable to test encoding in a plurality of hierarchy designation information, and to perform optimization such as selecting and coding the optimum hierarchy.
  • characteristic calculation is performed depending on the hierarchy designation information. When the position and size of the unit area to be changed are changed, it is necessary to redo the characteristic calculation every time encoding in different hierarchy designation information is tested. Such recalculation is not appropriate because it increases the amount of calculation.
  • the region classification unit 272 refers to the characteristic value for the target unit region and the on / off flag alf_cu_flag [i] for the encoding unit including the target unit region, and sets the target unit region to a plurality of types. It classifies in either.
  • the classification processing by the region classification unit 272 according to the present modification is the same as the classification processing by the region classification unit 172 described in ⁇ Modification 4>, and thus description thereof is omitted here.
  • the region characteristic value calculation unit 271 includes a directionality calculation unit 271c in addition to the activity calculation unit 271a.
  • the directionality calculation unit 271c calculates the edge direction Theta in the same manner as the directionality calculation unit 171c described in ⁇ Modification 5>.
  • the classification process by the area classification unit 272 according to this modification is the same as the classification process by the area classification unit 172 described in ⁇ Modification 5>.
  • the region characteristic value calculation unit 271 according to the present modification includes a pixel value reference unit 271b in addition to the activity calculation unit 271a.
  • the classification process by the area classification unit 272 according to the present modification is the same as the classification process by the area classification unit 172 described in ⁇ Modification 6>.
  • the image filter device includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas.
  • a characteristic value calculation means for calculating the filter area, and a filter-on area that causes the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculation means, or the filter And classifying means for classifying the filter into any one of the filter-off regions in which the means is not operated.
  • the classification means determines each unit area constituting the input image according to the value of the characteristic value representing the image characteristic of the input image in the unit area, and Classify into any of the filter-off areas.
  • the filter means acts on the input image in the unit area belonging to the filter-on area, but does not act on the input image in the unit area belonging to the filter-off area.
  • the image filter device configured as described above, it is possible to switch on / off of the filter process according to the local image characteristics of the input image. Therefore, by using the output image obtained by the image filter device acting on the decoded image while switching on / off of the filtering process as a reference image for generating the predicted image, the prediction accuracy and the coding efficiency are improved as compared with the conventional case. Can be improved.
  • the unit region is, for example, a unit for generating a predicted image. It may be a certain prediction 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 a unit composed of only one pixel.
  • the classifying unit further classifies each unit region belonging to the filter-on region into one of a plurality of types according to the value of the characteristic value for the unit region calculated by the characteristic value calculating unit.
  • the filter means preferably calculates the pixel value of each pixel in each unit region belonging to the filter-on region using a filter coefficient group set for a type including the pixel.
  • the classification unit assigns each of the unit areas belonging to the filter-on area to any one of a plurality of types according to the value of the characteristic value for the unit area calculated by the characteristic value calculation unit.
  • the filter means calculates the pixel value of each pixel in each unit region belonging to the filter-on region using a filter coefficient group set for the type including the pixel. Therefore, according to the above configuration, even when the image characteristics of the input image are different for each unit region, it is possible to perform the filtering process using the filter coefficient group set for each type. That is, even when the image characteristics of the input image are different for each unit region, an output image that is more suitable for generating a predicted image can be generated. Therefore, prediction accuracy and encoding efficiency can be improved by using an output image generated by the image filter device according to the present invention configured as described above as a reference image for generating a predicted image.
  • the characteristic value calculation means calculates the activity of the input image in the unit area as a characteristic value for each unit area.
  • the characteristic value calculating means calculates the activity as a characteristic value representing the image characteristic of the input image in each unit area. Therefore, according to the above configuration, an output image that is more suitable for generating a predicted image can be generated even when the input image has a different degree of activity for each unit region.
  • the activity level can also be expressed as an index indicating the randomness of the image.
  • the characteristic value calculation means calculates the activity of each pixel belonging to the internal region, the entire neighborhood of which is composed of pixels included in the unit region, as the pixel value of the pixel included in the vicinity of the pixel. It is preferable to calculate the activity of the unit region from the activity of each pixel belonging to the inner region after being derived with reference to FIG.
  • the activity of each pixel belonging to the internal region whose entire neighborhood is composed of pixels included in the unit region is referred to the pixel value of the pixel included in the vicinity of the pixel. Then, the activity for the unit region is calculated from the activity of each pixel belonging to the internal region. Therefore, according to the above configuration, the degree of activity for each unit region can be calculated by referring to only the pixels in the unit region. In other words, the degree of activity for a certain unit area can be calculated without referring to pixels that are not included in the unit area.
  • the characteristic value calculation means calculates an average of pixel values of the input image in the unit area as a characteristic value for each unit area.
  • the characteristic value calculating means calculates an average of the pixel values in the unit area as a characteristic value representing the image characteristic of the input image in each unit area. Therefore, according to the above configuration, even when the input image has an average of different pixel values for each unit region, an output image that is more suitable for generating a predicted image can be generated.
  • the characteristic value calculation means calculates a plurality of characteristic values having different calculation methods for each unit region.
  • the characteristic value calculation means calculates a plurality of characteristic values having different calculation methods for each unit region. Therefore, according to the above configuration, each unit region can be classified more appropriately, so that the encoding efficiency can be further improved.
  • the characteristic value calculation means calculates an average of pixel values of the input image in the unit area and a variance of pixel values of the input image in the unit area as characteristic values for each unit area. Is preferred.
  • the characteristic value calculation means includes, as characteristic values for each unit region, an average of the pixel values of the input image in the unit region, and a variance of the pixel values of the input image in the unit region. Is calculated. Therefore, according to the above configuration, each unit region can be classified more appropriately, so that the encoding efficiency can be further improved.
  • the dispersion of pixel values can also be regarded as an index indicating the randomness of the image.
  • the variance of the pixel values is obtained by taking the difference between the square average of the pixel values and the square of the average of the pixel values.
  • the average of the pixel values used for calculating the variance of the pixel values the average value of the pixel values calculated as one of the characteristic values can be used as it is, while suppressing an increase in the processing amount. Thus, each unit area can be classified more appropriately.
  • the characteristic value calculation means calculates the vertical activity of the input image in the unit region and the horizontal activity of the input image in the unit region as the characteristic value for each unit region. Is preferable.
  • the characteristic value calculation means uses the vertical activity of the input image in the unit region and the horizontal activity of the input image in the unit region as the characteristic value for each unit region. Calculate the degree. Therefore, according to said structure, according to the directionality of the activity of an input image, each unit area
  • the classification unit obtains an on / off flag for designating on / off of the filtering process for each predetermined unit including one or more unit areas from outside, and the unit area included in the unit for which the on / off flag designates on Is preferably classified into either the filter-on region or the filter-off region.
  • the unit area included in the unit in which the on / off flag designates on is classified into either the filter on area or the filter off area. Therefore, according to the above configuration, the code amount of data to be referred to is reduced as compared with the configuration in which the on / off of the filtering process is switched only by the on / off flag.
  • the predetermined unit is, for example, an encoding / decoding unit.
  • a coding unit (CU: Coding Unit) can be used.
  • the predetermined unit related to the on / off flag is hierarchically specified by hierarchical specification information acquired from the outside, and the unit region is composed of pixels that are equal to or smaller than the minimum encoding unit and equal to or larger than four pixels. It is preferable that the area is determined regardless of the hierarchy designation information.
  • the predetermined unit is hierarchically specified by hierarchical designation information acquired from the outside, and the unit area is determined without depending on the hierarchical designation information. Therefore, according to the above configuration, it is possible to switch the filtering process on and off for each finer unit while reducing the code amount of the hierarchy designation information. In addition, the complexity of the characteristic value calculation is reduced as compared with the case of changing with the hierarchy designation information. In addition, in the encoding device, it is not necessary to recalculate the characteristic value when determining the optimum hierarchy designation information, so that the amount of calculation is reduced. Moreover, according to said structure, the said unit area
  • the decoding device is a decoding device that decodes encoded data and generates a decoded image after filtering, wherein the image filter device and the predicted image in each unit region are represented by the image filter device.
  • a prediction image generation unit that generates a reference image by referring to the generated output image, and the image filter device includes a prediction image generated by the prediction image generation unit, a residual image decoded from the encoded data, and It is characterized in that the decoded image obtained by adding is used as an input image, and the decoded image after filtering is generated as an output image.
  • the image filter device included in the decoding device includes the prediction image generated by the prediction image generation unit and the residual decoded from the encoded data. Since the decoded image obtained by adding the difference image is used as the input image, and the filtering process is switched on / off for each unit area according to the characteristic value representing the image characteristic of the input image (decoded image), the input image Even when the image characteristics are different for each unit region, an output image suitable as an image to be referred to for generating a predicted image can be generated. Therefore, according to the above configuration, the prediction accuracy of the predicted image is improved.
  • the encoding device having the configuration corresponding to the above configuration it is possible to improve the prediction accuracy of the predicted image even when the image characteristics of the encoding target image in each unit region are different for each unit region. Therefore, encoded data with high encoding efficiency can be generated. Moreover, according to the decoding apparatus having the above configuration, it is possible to appropriately decode such encoded data with high encoding efficiency.
  • An encoding apparatus is an encoding apparatus that generates encoded data by encoding a residual image between an encoding target image and a prediction image, the image filter device, and each unit Prediction image generation means for generating the prediction image in the region with reference to the output image generated by the image filter device, and the image filter device includes the prediction image generated by the prediction image generation means and the prediction image generation device.
  • a decoded image obtained by adding the residual image is used as an input image, and an output image is generated.
  • the image filter apparatus included in the encoding apparatus includes a prediction image generated by the prediction image generation unit, an encoding target image, and a prediction image. Since the decoded image obtained by adding the residual images is used as the input image, and the filtering process is switched on and off for each unit area according to the characteristic value representing the image characteristics of the input image (decoded image), the image of the input image Even when the characteristics are different for each unit region, it is possible to generate an output image suitable as an image to be referred to for generating a predicted image. Therefore, according to the above configuration, the prediction accuracy of the predicted image is improved. Since the prediction accuracy is improved, the encoding device can generate encoded data with high encoding efficiency.
  • the filter coefficient group used by the filter means minimizes the difference between the encoding target image and the output image in each unit region included in the filter-on region. It is preferable that it is determined to be.
  • the filter coefficient group used by the filter means minimizes the difference between the encoding target image and the output image in each unit area included in the filter-on area for the filter-on area. Therefore, the encoding device including the filter unit can generate a prediction image with high prediction accuracy. Thereby, encoded data with high encoding efficiency can be generated.
  • the filter coefficient group used by the filter unit is an encoding target image and the output image. It is determined to minimize the difference for each type.
  • the data structure of the encoded data according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas.
  • the characteristic value calculation means for calculating, and the filter-on region in which the filter means is activated or the filter means is not activated in accordance with the value of the characteristic value for each unit area calculated by the characteristic value calculation means.
  • a data structure of encoded data that is referred to by an image filter device including classification means for classifying into any of the filter-off regions, and includes a filter coefficient group used by the filter means It is a feature.
  • the decoding apparatus that refers to the encoded data configured as described above represents filter means that operates on an input image composed of a plurality of unit regions, and represents the image characteristics of the input image for each of the plurality of unit regions.
  • a characteristic value calculating means for calculating a characteristic value, and a filter-on area or the filter means for causing the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculating means.
  • classifying means for classifying it into any one of the filter-off regions that do not act on the filter.
  • the filter means performs filter processing using a filter coefficient group included in the encoded data. Therefore, such a decoding apparatus can generate a prediction image with high prediction accuracy.
  • the encoded data referred to by such a decoding apparatus does not need to include a flag for switching on / off of the filtering process, the code amount of the encoded data is reduced. Therefore, the encoded data is encoded data with high encoding efficiency.
  • a calculation unit that calculates an average of pixel values of the input image, and each unit region is calculated by the calculation unit.
  • the classification means for classifying into any of a plurality of types, and the pixel value of each pixel in each unit area are set for the type including the pixel And filtering means for calculating using a filter coefficient group.
  • each unit area is classified into one of a plurality of types according to the average of the pixel values for the unit area calculated by the calculation unit,
  • the pixel value of each pixel in the unit area is calculated using the filter coefficient group set for the type including the pixel. Therefore, according to the above configuration, the filter processing can be performed using the filter coefficient group set for each type, so that the encoding efficiency is improved. Further, according to the above configuration, each unit area is classified according to a characteristic value with a small calculation processing amount, ie, an average of pixel values, so that the processing amount can be reduced.
  • Each block of the moving picture decoding apparatus 1 and the moving picture encoding apparatus 2 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement
  • IC chip integrated circuit
  • CPU Central Processing Unit
  • each device includes a CPU that executes instructions of a program that realizes each function, a ROM (Read (Memory) that stores the program, a RAM (Random Memory) that expands the program, the program, and various types
  • a storage device such as a memory for storing data is provided.
  • An object of the present invention is to provide a recording medium in which a program code (execution format program, intermediate code program, source program) of a control program of each of the above devices, which is software that realizes the above-described functions, is recorded so as to be readable by a computer. This can also be achieved by supplying to each of the above devices and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and disks including optical disks such as CD-ROM / MO / MD / DVD / CD-R.
  • IC cards including memory cards
  • semiconductor memories such as mask ROM / EPROM / EEPROM / flash ROM, or PLD (Programmable logic device) or FPGA (Field Programmable Gate Array) Logic circuits can be used.
  • each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • the communication network is not particularly limited as long as it can transmit the program code.
  • the Internet intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, and the like can be used.
  • the transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • wired lines such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, infrared rays such as IrDA and remote control, Bluetooth (registered trademark), IEEE 802.11 wireless, HDR ( It can also be used by radio such as High Data Rate (NFC), Near Field Communication (NFC), Digital Living Network Alliance (DLNA), mobile phone network, satellite line, and digital terrestrial network.
  • wired lines such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, infrared rays such as IrDA and remote control, Bluetooth (registered trademark), IEEE 802.11 wireless, HDR ( It can also be used by radio such as High Data Rate (NFC), Near Field Communication (NFC), Digital Living Network Alliance (DLNA), mobile phone network, satellite line, and digital terrestrial network.
  • NFC High Data Rate
  • NFC Near Field Communication
  • DLNA Digital Living Network Alliance
  • 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
  • a specific moving picture encoding method for example, H.264 is used.
  • H.264 / MPEG-4. Examples thereof include a method adopted in KTA software which is a codec for joint development in AVC and VCEG (Video Coding Expert Group).
  • an image (picture) constituting a moving image is obtained by dividing a slice obtained by dividing an image, a macroblock obtained by dividing the slice, and a macroblock. It is managed by a hierarchical structure consisting of blocks to be encoded, and is usually encoded for each block.
  • a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and difference data between the predicted image and the input image is encoded. It becomes.
  • methods for generating a predicted image methods called inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction) are known.
  • intra prediction predicted images in a corresponding frame are sequentially generated based on a locally decoded image in the same frame.
  • one prediction direction is selected from prediction directions included in a predetermined prediction direction (prediction mode) group for each prediction unit (for example, block), and A prediction pixel value on the prediction target region is generated by extrapolating the pixel value of the reference pixel in the locally decoded image in the selected prediction direction.
  • inter prediction by applying motion compensation using a motion vector to a reference image in a reference frame (decoded image) in which the entire frame is decoded, a predicted image in a prediction target frame is converted into a prediction unit ( For example, it is generated for each block).
  • Non-Patent Document 3 divides a (local) decoded image into a plurality of regions, and determines each region according to the level of activity indicating the local randomness of the (local) decoded image in each region.
  • the filter coefficient group for each region is determined by the encoding device so as to minimize the error between the filtered image in the region and the encoding target image.
  • 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 (local) decoded image using the adaptive filter. As a result, it is possible to improve the prediction accuracy and the encoding efficiency. (Task) However, the conventional adaptive filter still has room for improving the encoding efficiency.
  • a method of switching the filter coefficient group for each region based on region characteristics other than the activity in addition to the activity may be considered.
  • the filter coefficient group is switched for each region based on the two region characteristics, there is a problem that the calculation cost on the encoding device side and the decoding device side becomes high.
  • a filter device includes a region characteristic calculation unit that calculates a value of a region characteristic of each unit region in a filter device including a linear filter in which filter coefficients are adaptively set.
  • the linear filter is an offset that depends on the region characteristic for performing a filter operation on each pixel belonging to each unit region, and the value of the region characteristic of the unit region calculated by the region characteristic calculating unit This is performed using an offset according to the above and a filter coefficient group that does not depend on the region characteristics.
  • the region characteristic has a value corresponding to a color difference component type, and the linear filter performs the filter operation using an offset corresponding to the color difference component type. preferable.
  • the optimum offset value (maximizing encoding efficiency) is different. Therefore, according to the above configuration, higher encoding efficiency can be achieved than when the filter operation is performed using an offset that does not depend on the type of the color difference signal.
  • a filter device is a filter device including a linear filter in which filter coefficient groups are adaptively set, and a pixel value of a target pixel in an output image of the linear filter And truncating means for truncating the change amount, which is the difference between the pixel value of the target pixel in the input image of the linear filter.
  • the filter device includes a flag decoding unit that decodes a flag indicating whether or not to truncate the change amount, and outputs an output image of the linear filter by truncating the change amount or outputting the change amount. It is desirable to further include a switch for switching whether to output without truncation according to the value of the flag decoded by the flag decoding means.
  • the filter device is used to truncate the change amount when executing a region characteristic calculation unit that calculates a region characteristic of each unit region and a filter process that uses a pixel belonging to each unit region as an output pixel. It is desirable that the apparatus further comprises threshold value determining means for determining the threshold value in the unit area according to the area characteristic calculated by the area characteristic calculating means.
  • the threshold value determination means may determine the threshold value based on a correspondence relationship between the predetermined region characteristic and the threshold value, or may determine the region characteristic determined on the encoding device side.
  • the threshold value may be determined based on a correspondence relationship with the region characteristic.
  • a configuration further including a threshold table decoding unit that decodes a threshold table recorded by associating the region characteristics with the threshold is employed.
  • a filter device including a linear filter in which filter coefficients are adaptively set
  • at least one first filter coefficient group depending on the first region characteristic corresponds to the first filter coefficient group.
  • the first filter coefficient table recorded in association with the value of the region characteristic and the second filter coefficient group depending on the second region characteristic are recorded in association with the corresponding second region characteristic value.
  • each unit area can be obtained without decoding a filter coefficient table in which a plurality of filter coefficient groups depending on both the first area characteristic and the second area characteristic are recorded in association with the corresponding area characteristic pair.
  • the filter operation according to both the first region characteristic and the second region characteristic can be performed. That is, according to the above configuration, a decoded image close to the original image can be generated with high accuracy without causing a significant increase in the code amount. As a result, higher encoding efficiency than conventional can be realized.
  • the filter device includes: a flag decoding unit that decodes a flag indicating whether or not to use the second filter coefficient group for a filter operation in the linear filter; the first filter coefficient group in the linear filter; Whether to output an output image obtained by a filter operation using the second filter coefficient group to the outside or to output an output image obtained by a filter operation using only the first filter coefficient group in the linear filter to the outside It is desirable to further include a switch that switches according to the value of the flag decoded by the flag decoding means.
  • a decoding device and an encoding device including the filter device are also included in the scope of the present invention. (Effect of the above configuration) According to the present invention, it is possible to realize an adaptive filter having higher encoding efficiency than the conventional one without causing a significant increase in calculation cost.
  • Embodiment 2 A second embodiment of the present invention will be described with reference to FIGS.
  • the adaptive filter 100 shown in FIG. 26 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 110 and a filter calculation unit 120.
  • the filter setting unit 110 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 111.
  • the filter coefficient group w decoded by the filter coefficient decoding unit 111 is supplied to the filter calculation unit 120.
  • the filter calculation unit 120 is a means for executing a filter calculation, and includes a linear filter 121, a change amount calculation unit 122, a change amount restriction unit 123, a pixel value change unit 124 (truncating means), and a threshold value determination unit 125. ing.
  • the linear filter 121 has pixel values s [1], s [2],..., S [N] of reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (A1). From this, the pixel value s ′ of the target pixel in the output image is calculated.
  • s ′ w [1] s [1] + w [2] s [2] +... + w [N] s [N] + c ... (A1)
  • w [1], w [2],..., W [N], c are elements of the filter coefficient group w decoded by the filter coefficient decoding unit 121.
  • the calculated pixel value s ′ is supplied to the subsequent change amount limiting unit 123.
  • the change amount calculation unit 122 subtracts the pixel value s ′ of the target pixel in the output image of the linear filter 121 from the pixel value s of the same pixel (a pixel occupying the same position as the target pixel) in the input image of the linear filter 121.
  • the calculated difference ⁇ s s ⁇ s ′ is supplied to the change amount limiting unit 123 at the subsequent stage. In the present specification, this difference ⁇ s is described as “amount of change”.
  • the change amount limiting unit 123 truncates the change amount ⁇ s according to the equation (A2).
  • the truncated change amount ⁇ s ′ is supplied to the subsequent pixel value changing unit 124.
  • the change amount limiting unit 123 may truncate the change amount ⁇ s according to the equation (A2 ′).
  • the pixel value changing unit 124 subtracts the truncated change amount ⁇ s ′ from the pixel value s in the input image of the linear filter 121.
  • the calculated difference s ′′ s ⁇ s ′ is output to the outside of the filter calculation unit 120.
  • the threshold determination unit 125 determines the threshold th used for truncating the change amount ⁇ s.
  • a predetermined threshold th0 is used as the threshold th used to truncate the change amount ⁇ s.
  • the threshold value determination unit 125 reads the threshold value th0 from a memory (not shown) and notifies the change amount restriction unit 123 described above.
  • the filter calculation part 120 should just obtain the same calculation result as the calculation result mentioned above, and does not need to follow the calculation procedure same as the calculation procedure mentioned above.
  • the difference is calculated by the change amount calculation unit 122.
  • the elements of the filter coefficient group w decoded by the filter coefficient decoding unit 121 may be quantized filter coefficients.
  • the linear filter 121 may be configured such that (a) the quantized filter coefficient is dequantized and then the filter operation using the dequantized filter coefficient is performed, and (b) A configuration in which the filter operation using the filter coefficient before inverse quantization is performed and then the result of the filter operation is shifted to the right may be employed.
  • the filter coefficient after quantization is 256 times the filter coefficient before quantization, so by shifting the filter operation result to the right by 8 bits
  • the same calculation result can be obtained except for calculation errors such as roundoff error and the case of performing filter calculation using filter coefficients before dequantization.
  • the coding apparatus may be equipped with the adaptive filter 100 'shown in FIG. As shown in FIG. 27, in the adaptive filter 100 ′ on the encoding device side, the filter coefficient decoding unit 111 in the adaptive filter 100 on the decoding device side is replaced with a filter coefficient determination unit 111a and a filter coefficient encoding unit 111b. Configuration is taken.
  • the filter coefficient determination unit 111a minimizes the square error with respect to the original image (encoding target image) of the output image of the linear filter 121 using the least square method.
  • the filter coefficient encoding unit 111b encodes the filter coefficient group w determined by the filter coefficient determination unit 111a.
  • the other configuration of the adaptive filter 100 ′ on the encoding device side is the same as that of the adaptive filter 100 on the decoding device side, and the description thereof is omitted here.
  • the adaptive filter 100 shown in FIG. 28 is an improvement of the adaptive filter 100 according to the first configuration example, and is suitable for mounting in a decoding device, like the adaptive filter 100 according to the first configuration example. .
  • the differences between the adaptive filter 100 according to this configuration example and the adaptive filter 100 according to the first configuration example are the following two points.
  • a restriction flag decoding unit 112 is added to the filter setting unit 110.
  • the restriction flag decoding unit 112 is means for decoding the restriction flag from the encoded data.
  • the restriction flag refers to a flag that specifies whether to output the pre-truncated pixel value s ′′ or the post-truncated pixel value s ′ as the pixel value of the target pixel in the output image.
  • a switch 126 is added to the filter calculation unit 120.
  • the switch 126 determines whether to output the post-truncated pixel value s ′′ or the pre-truncated pixel value s ′ as the pixel value of the target pixel in the output image. It is means for switching according to the value of the flag.
  • the encoding apparatus may be equipped with the adaptive filter 100 ′ shown in FIG. 29.
  • the restriction flag decoding unit 112 of the adaptive filter 100 on the decoding device side instead of the restriction flag decoding unit 112 of the adaptive filter 100 on the decoding device side, a restriction flag determining unit 112a and a restriction flag encoding unit 112b are provided. It is added to the filter setting unit 110.
  • the restriction flag determination unit 112a determines whether or not the change amount truncation is valid for each unit area, and then the value of the restriction flag according to the determination result.
  • the restriction flag encoding unit 112b encodes the value of the restriction flag determined by the restriction flag determination unit 112a. For example, in the unit area in which the truncation of the change amount is determined to be valid, the limit flag determination unit 112a sets the first value (eg, “1”) as the limit flag and determines that the truncation of the change amount is not valid. In the unit area, the restriction flag is set to a second value (for example, “0”) different from the first value.
  • Other configurations of the adaptive filter 100 ′ on the encoding device side are the same as those shown in the first configuration example.
  • an arbitrary area obtained by dividing a frame can be used as a determination unit for determining whether or not the change amount truncation is effective.
  • M ⁇ N block M represents the width of the block, for example, takes a value such as 1, 2, 4, or 8.
  • N represents the height of the block, for example 1, 2, 4 or the like. Or a value such as 8, etc.
  • the restriction flag encoding unit 112b encodes a restriction flag for each slice and embeds the code in each slice header.
  • the switch 126 is switched for each slice.
  • the change amount truncation As a method for determining whether or not the change amount truncation is valid, for example, (1) an error when truncating the change amount (error with respect to the original image of the output image of the pixel value changing unit 124), and the change amount And (2-1) error when truncating the change amount, error when not truncating the change amount, and calculating the error when the change amount is not truncated (error relative to the original image of the output image of the linear filter 121) If the change amount is smaller than that, it is determined that the change amount truncation is effective. (2-2) If not, the change amount truncation is determined not to be effective.
  • the encoding efficiency when the change amount is truncated and the encoding efficiency when the change amount is not truncated are calculated, and (2-1) the change amount is truncated.
  • the change amount truncation is effective.
  • An adaptive filter 100 shown in FIG. 30 is an improvement of the adaptive filter 100 according to the second configuration example, and is suitable for mounting in a decoding device, like the adaptive filter 100 according to the second configuration example. .
  • the differences between the adaptive filter 100 according to this configuration example and the adaptive filter 100 according to the second configuration example are the following two points.
  • a region characteristic calculation unit 127 is added to the filter calculation unit 120.
  • the area characteristic calculation unit 127 calculates the area characteristic k of each unit area based on the input image (decoded image or decoded image_DB after deblocking).
  • the threshold value determination unit 125 determines the value of the threshold value th used for the filter calculation for pixels belonging to each unit area. More specifically, the threshold value th (k) associated with the region characteristic k calculated by the region characteristic calculation unit 127 is specified in the threshold value table TH described later.
  • the calculation unit of the region characteristic k may be any of a slice, macroblock, block, LCU, CT, CU, PT, PU, TT, TU, or M ⁇ N block.
  • the threshold value determination unit 125 sets the region of the macro block as the threshold value th used for the filter calculation for pixels belonging to the macro block for each macro block.
  • the value th (k) corresponding to the characteristic k is specified.
  • the region characteristic k that can be used to determine the threshold th includes, for example, activity.
  • the activity is a publicly known index indicating the local randomness of the decoded image.
  • the region characteristic calculation unit 127 calculates, for example, the activity k of each unit region according to the equation (A3).
  • (i, j) represents coordinates with the upper left corner of the target unit region as the origin, and S (i, j) represents a pixel (i in the input image (decoded image or decoded image_DB after deblocking)). , J), and ⁇ represents the sum over all the pixels constituting the target unit region.
  • Expression (A3) corresponds to evaluating the degree of activity using the sum of absolute values of differences from adjacent pixel values (Sum of Absolute Difference, SAD) as an index.
  • the activity is not limited to the one defined by the equation (A3) as long as it is an index of local randomness of the decoded image.
  • a method for determining the threshold th according to the activity k for example, a method of referring to the threshold table TH can be mentioned.
  • the threshold table TH for example, a table in which the activity k and the threshold th (k) corresponding to the activity k are recorded in association with each other can be used.
  • the threshold determination unit 125 specifies the threshold th (k) associated with the activity k calculated by the activity calculation unit 127 in the threshold table TH.
  • An example of the threshold table TH is shown in Table 1.
  • the value of the threshold th is decreased as the activity decreases. This is to prevent linking that may occur when a filter process with a large change amount ⁇ s is applied to a flat portion with low activity.
  • the threshold table TH referred to for determining the threshold th may be (1) created in advance or (2) created on the encoding device side based on the original image. Alternatively, (3) it may be created on the decoding device side based on the decoded image, but in this configuration example, a threshold table TH created in advance is referred to. That is, the threshold value determination unit 125 reads out and uses a predetermined threshold value table TH from the memory.
  • the adaptive filter 100 ′ shown in FIG. 31 may be installed in the encoding apparatus.
  • a region characteristic calculation unit 127 is added to the filter calculation unit 120 as in the adaptive filter 100 on the decoding device side. Similar to the region characteristic calculation unit 127 in the adaptive filter 100 on the decoding device side, the region characteristic calculation unit 127 in the adaptive filter 100 ′ on the encoding device side applies an input image (local decoded image or local decoded image_DB after deblocking) to the input image. Based on this, the region characteristic k of each unit region is calculated.
  • Other configurations of the adaptive filter 100 ′ on the encoding device side are the same as those shown in the second configuration example.
  • the threshold value th was demonstrated based on the area
  • region characteristic k for example, activity
  • the adaptive filter 100 shown in FIG. 29A is an improvement of the adaptive filter 100 according to the third configuration example, and is suitable for mounting in a decoding device, like the adaptive filter 100 according to the third configuration example. Is.
  • the differences between the adaptive filter 100 according to this configuration example and the adaptive filter 100 according to the third configuration example are the following four points.
  • a threshold table decoding unit 113 is added to the filter setting unit 110.
  • the threshold table decoding unit 113 decodes the threshold table TH from the encoded data.
  • the threshold value table TH refers to a table in which the area characteristic k and the threshold value th (k) corresponding to the area characteristic k are recorded in association with each other.
  • the threshold value determination unit 125 determines the threshold value th (k) used in the filter calculation for the pixels belonging to each unit area. More specifically, the threshold value th (k) associated with the region characteristic k calculated by the region characteristic calculation unit 127 is specified in the threshold table TH decoded by the threshold table decoding unit 113.
  • the filter coefficient decoding unit 111 in the adaptive filter 100 according to the third configuration example is replaced with a filter coefficient table decoding unit 114.
  • the filter coefficient table decoding unit 114 decodes the filter coefficient table W from the encoded data.
  • the filter coefficient table W refers to a table in which the region characteristic k and the filter coefficient group w (k) corresponding to the region characteristic k are recorded in association with each other.
  • a filter coefficient determination unit 128 is added to the filter calculation unit 120.
  • the filter coefficient determination unit 128 determines a filter coefficient group w (k) used in the filter calculation for pixels belonging to each unit region. More specifically, in the filter coefficient table W decoded by the filter coefficient table decoding unit 114, the filter coefficient group w (k) associated with the region characteristic k calculated by the region characteristic calculation unit 127 is specified.
  • the unit for calculating the region characteristic k may be any of a slice, macroblock, block, LCU, CT, CU, PT, PU, TT, TU, or M ⁇ N block.
  • the threshold value determination unit 125 determines a threshold value th (k) corresponding to the region characteristic k of the macro block for each macro block, and the filter coefficient determination unit 128.
  • a filter coefficient group w (k) corresponding to the region characteristic k of the macroblock is determined.
  • the coding apparatus may be equipped with the adaptive filter 100 'shown in FIG.
  • the adaptive filter 100 ′ on the encoding device side (1) instead of the threshold table decoding unit 113 in the adaptive filter 100 on the decoding device side, a threshold table creation unit 113 a and a threshold table encoding unit 113 b include a filter setting unit 110.
  • a filter coefficient table creation unit 114a and a filter coefficient table encoding unit 114b are added to the filter setting unit 110. .
  • the threshold value table creating unit 113a creates the threshold value table TH
  • the threshold value table coding unit 113b is created by the threshold value table creating unit 113a.
  • the table TH is encoded.
  • the threshold table creation unit 113a determines each element of the threshold table TH by the following processing.
  • the threshold value table creating unit 113a uses the filter coefficient table W created by the filter coefficient table creating unit 114a and threshold values TH1 to THNt (Nt is the total number of threshold values) prepared in advance, for each area characteristic k. Filter processing is performed when a threshold value of a type is used. A square error between the image after filtering and the encoding target image is calculated. Subsequently, a value that minimizes the square error among Nt square errors is set as the threshold th (k) for each region characteristic k.
  • the filter coefficient table creation unit 114a creates the filter coefficient table W
  • the filter coefficient table coding unit 114b performs the filter coefficient table creation unit.
  • the filter coefficient table W created by 114a is encoded.
  • the filter coefficient table creation unit 114a determines a filter coefficient table W that minimizes a square error with respect to the original image (encoding target image) of the output image of the linear filter 121 using the least square method.
  • the configuration in which the threshold table TH itself and the filter coefficient table W itself are encoded is shown, but the configuration of the adaptive filter 100 on the encoding device side is not limited to this.
  • the threshold table TH / filter coefficient table W is selected from a plurality of predetermined threshold tables TH / filter coefficient tables W, the index of the selected threshold table TH / filter coefficient table W is encoded.
  • the code obtained by encoding the index of the threshold table TH / filter coefficient table W is shorter than the code obtained by encoding the threshold table TH / filter coefficient table W itself. Therefore, if such a configuration is adopted, encoding efficiency can be improved.
  • Embodiment 3 A third embodiment of the present invention will be described with reference to FIGS.
  • the adaptive filter 200 shown in FIG. 34 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 210 and a filter calculation unit 220.
  • the filter setting unit 210 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 211.
  • the filter coefficient decoding unit 211 decodes the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 from the encoded data.
  • the first filter coefficient table W1 is a table in which a first region characteristic k1 described later and a first filter coefficient group w1 (k1) are recorded in association with each other
  • the second filter coefficient table W2 is a first filter coefficient table W2 described later. It is the table which recorded 2 area
  • the filter calculation unit 220 is a means for executing a filter calculation, and includes a first spatial filter 221, an offset addition unit 222, a second linear filter 223, an addition unit 224, and a region characteristic calculation unit 225.
  • the first spatial filter 221 uses the pixel values s1 [1], s1 [2],..., S1 [] of the reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (B1). N1], the pixel value s1 ′ of the target pixel in the output image is calculated.
  • w1 (k1) [1], w1 (k1) [2],..., W1 (k1) [N1] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later.
  • W1 (k1) [N1] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later.
  • W1 (k1) [1] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later.
  • W1 (k1) [N1] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later.
  • W1 (k1) [N1] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later.
  • the offset addition unit 222 is a means for adding the offset c to s1 ′ calculated by the first spatial filter 221.
  • c is an offset decoded by the filter coefficient decoding unit 221.
  • the sum s ⁇ b> 1 ′ + c calculated by the offset addition unit 222 is supplied to the subsequent addition unit 224.
  • the second spatial filter 223 uses the pixel values s2 [1], s2 [2],..., S2 [] of the reference pixel in the input image (decoded image or decoded image after deblocking) according to the equation (B2). N2], the pixel value s2 ′ of the target pixel in the output image is calculated.
  • s2 ′ w2 (k2) [1] s2 [1] + w2 (k2) [2] s2 [2] +. + W2 (k2) [N2] s2 [N2] (B2)
  • w2 (k2) [1], w2 (k2) [2],..., W2 (k2) [N2] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later.
  • This is an element of the second filter coefficient group w2 (k2) corresponding to the second region characteristic k2. More specifically, in the second filter coefficient table W2 decoded by the filter coefficient decoding unit 221, the second filter coefficient group w2 (k2) associated with the second region characteristic k2 calculated by the region characteristic calculation unit 225. Elements.
  • the pixel value s2 ′ calculated by the second spatial filter 223 is supplied to the subsequent addition unit 224.
  • the addition unit 224 adds s2 ′ calculated by the second spatial filter 223 to the sum s1 ′ + c calculated by the offset addition unit 222.
  • the sum s 1 ′ + c + s 2 ′ calculated by the adder 224 is output to the outside of the adaptive filter 200.
  • the region characteristic calculation unit 225 calculates a first region characteristic k1 and a second region characteristic k2 for each unit region.
  • the first region characteristic k1 and the second region characteristic k2 are different region characteristics, for example, activity and edge direction.
  • Arbitrary areas obtained by dividing a frame for example, slices, macroblocks, blocks, LCUs, CTs, CUs, PTs, PUs, TTs, TUs, or M ⁇ N blocks, a first area characteristic k1 and a second area
  • the calculation unit of the characteristic k2 can be used. For example, when the calculation unit of the first region characteristic k1 and the second region characteristic k2 is a macro block, the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) are updated for each macro book. Will be.
  • FIG. 35 is a diagram illustrating a setting example of the reference area of the first spatial filter 221.
  • the center pixel corresponds to the target pixel
  • the black pixel corresponds to the reference pixel.
  • white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1, the notation of “(k1)” is omitted in FIG.
  • the center pixel corresponds to the target pixel
  • the black pixel corresponds to the reference pixel.
  • white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the second region characteristic k2, the notation of “(k2)” is omitted in FIG.
  • the encoding device cannot calculate the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2).
  • the first filter coefficient group w1 (k1 ) and the second filter coefficient group w2 (k2) cannot be calculated.
  • FIG. 37 is a diagram illustrating another setting example of the reference region of the first spatial filter 221.
  • the center pixel corresponds to the target pixel
  • the black pixel corresponds to the reference pixel.
  • white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1, the notation of “(k1)” is omitted in FIG.
  • the center pixel corresponds to the target pixel
  • the black pixel corresponds to the reference pixel.
  • white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the second region characteristic k2, the notation of “(k2)” is omitted in FIG.
  • the reference region of the first spatial filter 221 is different from the reference region of the second spatial filter 223. Therefore, there is no possibility that the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) cannot be calculated in the encoding device.
  • the adaptive filter 200 includes (1) the first filter coefficient table W1 in which a plurality of first filter coefficient groups w1 (k1) are recorded in association with the corresponding first region characteristics k1, And a filter coefficient decoding unit 211 for decoding the second filter coefficient table W2 in which a plurality of second filter coefficient groups w2 (k2) are recorded in association with the corresponding second area characteristic k2, and (2) each unit area An area characteristic calculation unit 225 for calculating the first area characteristic k1 and the second area characteristic k2, and (3) a filter operation using each pixel belonging to each unit area as a target pixel, which is recorded in the first filter coefficient table W1.
  • the filter coefficient group w1 (k1) corresponding to the first area characteristic k1 of the unit area calculated by the area characteristic calculation unit 225
  • the filter coefficient group w2 (k2) corresponding to the second area characteristic k2 of the unit area calculated by the area characteristic calculation unit 225
  • a filter calculation unit 220 that executes a filter calculation using the above.
  • the adaptive filter 200 when the adaptive filter 200 according to this configuration example is used, a plurality of filter coefficient groups w (k1, k2) depending on both the first region characteristic k1 and the second region characteristic k2 are converted into corresponding region characteristic pairs (k1 , K2), the filter operation corresponding to both the first region characteristic k1 and the second region characteristic k2 of each unit region can be performed without decoding the filter coefficient table W recorded in association with the unit region. That is, if the adaptive filter according to this configuration example is used, a decoded image close to the original image can be accurately reproduced without causing a significant increase in the code amount.
  • the elements of the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) decoded by the filter coefficient decoding unit 221 may be quantized filter coefficients.
  • the offset c decoded by the filter coefficient decoding unit 221 may also be a quantized offset.
  • the linear filter comprising the first spatial filter and the offset adding unit 222 performs (a) a filter operation using the filter coefficient after the inverse quantization after dequantizing the quantized filter coefficient and the offset. Or (b) a configuration in which a filter operation using a filter coefficient and an offset before inverse quantization is performed, and then a result of the filter operation is shifted to the right.
  • the linear filter including the second spatial filter may be configured to perform a filter operation using the filter coefficient after inverse quantization after dequantizing the quantized filter coefficient
  • b) A configuration in which the filter operation using the pre-quantization filter coefficient is performed and then the result of the filter operation is shifted to the right may be employed.
  • the filter coefficient after quantization is 256 times the filter coefficient before quantization, so by shifting the filter operation result to the right by 8 bits The same calculation result as that of the configuration (a) is obtained.
  • the encoding apparatus may be equipped with the adaptive filter 200 'shown in FIG.
  • the filter coefficient decoding unit 211 in the adaptive filter 200 on the decoding device side is replaced with a filter coefficient table creation unit 211a and a filter coefficient table encoding unit 211b.
  • the replacement configuration is taken.
  • the filter coefficient table creation unit 211a creates the first filter coefficient table W1 and the second filter coefficient table W2, and (2) the filter coefficient table coding unit 211b. Encodes the first filter coefficient table W1 and the second filter coefficient table W2 created by the filter coefficient table creation unit 211aa.
  • the filter coefficient table creation unit 211a uses the least square method to minimize the square error with respect to the original image of the filter output image (the output image of the addition unit 224) and the second filter coefficient table W1.
  • the table W2 is determined.
  • 40 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 210 and a filter calculation unit 220.
  • the filter setting unit 210 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 211 and a second region characteristic use flag decoding unit 212.
  • the filter coefficient decoding unit 211 decodes the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 from the encoded data, as in the first configuration example.
  • the second region characteristic use flag decoding unit 212 decodes the second region characteristic use flag enable_dir from the encoded data.
  • the second region characteristic use flag enable_dir is a 1-bit specifying whether or not to perform a filter operation using the filter coefficient group w2 (k2) determined according to the second region characteristic k2 in the filter operation for each unit region.
  • the flag is “1” when the filter operation using the filter coefficient group w2 (k2) is to be performed, and the value “0” when the filter operation using the filter coefficient group w2 (k2) is not to be performed.
  • the setting unit of the second region characteristic use flag enable_dir is arbitrary, and may or may not be the same as the calculation unit of the first region characteristic k1 and the second region characteristic k2.
  • the filter calculation unit 220 is a means for performing a filter calculation, and includes a first spatial filter 221, an offset addition unit 222, a second linear filter 223, an addition unit 224, a region characteristic calculation unit 225, and a switch 226. ing.
  • the first spatial filter 221 has pixel values s1 [1] and s1 of reference pixels in the input image (decoded image or decoded image after deblocking) according to the above-described equation (B1). From [2],..., S1 [N1], the pixel value s1 ′ of the target pixel in the output image is calculated.
  • the offset addition unit 222 adds the offset c to s1 ′ calculated by the first spatial filter 221 as in the first configuration example. However, in this configuration example, the sum s1 ′ + c calculated by the offset adding unit 222 is supplied to the subsequent adding unit 224 and the switch 226. Note that the output image of the offset adding unit 222 is hereinafter also referred to as “one filter output image”.
  • the second spatial filter 223 has pixel values s2 [1] and s2 of reference pixels in the input image (decoded image or decoded image after deblocking) according to the above-described equation (B2). From [2],..., S2 [N2], the pixel value s2 ′ of the target pixel in the output image is calculated. The pixel value s ⁇ b> 2 ′ calculated by the second spatial filter 223 is supplied to the subsequent adding unit 224. However, when the value of the second region characteristic use flag relating to the unit region including the target pixel (the setting unit of the second region characteristic use flag) is “0”, the filter calculation shown in the above-described equation (B2) is executed. do not do.
  • the adding unit 224 adds s2 ′ calculated by the second spatial filter 223 to the sum s1 ′ + c calculated by the offset adding unit 222.
  • the sum s 1 ′ + c + s 2 ′ calculated by the adder 224 is supplied to the switch 226 at the subsequent stage.
  • the output image of the adding unit 224 is hereinafter also referred to as “two-filter output image”.
  • the region characteristic calculation unit 225 calculates the first region characteristic k1 and the second region characteristic k2 for each unit region (region characteristic calculation unit). For example, when the unit for calculating the first region characteristic k1 and the second region characteristic k2 is a macro block, the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) are provided for each macro book. Will be updated.
  • the switch 226 determines whether to output the one-filter output image or the two-filter output image to the value of the second region characteristic use flag enable_dir decoded by the second region characteristic use flag decoding unit 212. Switch accordingly. More precisely, the sum s1 ′ + c calculated by the offset adder 222 or the sum s1 ′ + c + s2 ′ calculated by the adder 225 is output as the pixel value of the target pixel in the output image. Is switched according to the value of the second region characteristic use flag enable_dir decoded by the second region characteristic use flag decoding unit 212.
  • the sum s1 ′ + c calculated by the offset adding unit 222 is output, and the second region characteristic use flag enable_dir is set.
  • the sum s1 ′ + c + s2 ′ calculated by the adder 225 is output.
  • the adaptive filter 200 according to the present configuration example (1) the second region characteristic indicating whether or not to perform the filter operation using the second filter coefficient group w2 (k2) corresponding to the second region characteristic k2.
  • a second region characteristic use flag decoding unit 212 that decodes the use flag is further provided.
  • the filter calculation unit 120 corresponds to the first region characteristic k1 according to the value of the second region characteristic use flag.
  • the filter operation using only one filter coefficient group w1 (k1) is executed, or the first filter coefficient group w1 (k1) corresponding to the first area characteristic k1 and the second filter corresponding to the second area characteristic k2 It is configured to switch whether to perform a filter operation using both of the coefficient group w2 (k2).
  • the adaptive filter 200 according to the present configuration example when used, only the first filter coefficient group w1 (k1) is applied to a unit region that does not need to be subjected to filter operation using the second filter coefficient group w2 (k2). The filter operation using is executed. Therefore, if the adaptive filter 200 according to this configuration example is used, it is possible to further reduce the calculation cost required for the filter operation on the unit region that does not need to be subjected to the filter operation using the second filter coefficient group w2 (k2).
  • the encoding apparatus may be equipped with the adaptive filter 200 'shown in FIG. As shown in FIG. 41, in the adaptive filter 200 ′ on the encoding device side, instead of the second region characteristic use flag decoding unit 212 in the adaptive filter 200 on the decoding device side, a second region characteristic use flag determining unit 212a and A second region characteristic use flag encoding unit 212b is added.
  • the filter coefficient table creation unit 211a creates the first filter coefficient table W1 and the second filter coefficient table W2, and (2) the filter coefficient table coding unit 211b. Encodes the first filter coefficient table W1 and the second filter coefficient table W2 created by the filter coefficient table creation unit 211aa.
  • the filter coefficient table creation unit 211a uses the least square method to minimize the square error with respect to the original image (encoding target image) of (a) 1 filter output image (output image of the offset addition unit 222).
  • a filter coefficient table pair (W1, W2) comprising a first filter coefficient table W1 and (b) a second filter coefficient table W2 that minimizes a square error with respect to the original image of the two-filter output image (the output image of the adder 224) ) And create.
  • the filter coefficient table encoding unit 211b generates the first filter coefficient generated by the filter coefficient table generating unit 211a when the least square error with respect to the original image is smaller in the 1 filter output image than in the 2 filter output image.
  • the first filter coefficient table W1 and the first filter coefficient table W1 created by the filter coefficient table creation unit 211a The 2 filter coefficient table W2 is encoded.
  • the second region characteristic use flag determination unit 212a performs the minimum square error with respect to the original image of the one filter output image and the minimum with respect to the original image of the two filter output image. After comparing with the square error, the value of the second region characteristic use flag is determined according to the comparison result.
  • the second region characteristic use flag encoding unit 212b is a second region characteristic use flag determining unit. The value of the second region characteristic use flag determined by 212a is encoded.
  • the necessary number of executions of the least squares method is six times (when the second filter coefficient group w2 (k2) is determined depending on the first filter coefficient group w1 (k1)) or four times (first filter coefficient group).
  • w1 (k1) is determined depending on the second filter coefficient group w2 (k2)). That is, according to this configuration example, when the filter coefficient group w (k1, k2) determined depending on both the first region characteristic k1 and the second region characteristic k2 is used as in the conventional case, the minimum two times of 24 times are used. Where multiplication is required, the number of times can be significantly reduced.
  • the 42 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 210 and a filter calculation unit 220.
  • the filter setting unit 210 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 211 and an expanded filter coefficient setting unit 213.
  • the filter coefficient decoding unit 211 decodes the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 from the encoded data, as in the second configuration example.
  • the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 decoded by the filter coefficient decoding unit 211 are supplied to the enlarged filter coefficient calculation unit 213.
  • the enlarged filter coefficient setting unit 213 creates an enlarged filter coefficient table W based on the first filter coefficient table W1, the offset c, and the second filter coefficient table W2.
  • the region characteristic pair (k1, k2) is a pair of the first region characteristic k1 and the second region characteristic k2, and the filter coefficient group w (k1, k2) is a filter coefficient of the expanded linear filter 227 described later. It is used as a group.
  • the expanded filter coefficient setting unit 213 includes each filter coefficient group w (k1, k2) included in the expanded filter coefficient table W so that the expanded linear filter 227 becomes a filter equivalent to the filter operation unit 220 according to the first configuration example. ) Is
  • the filter calculation unit 220 includes an enlarged linear filter 227 and a region characteristic calculation unit 225.
  • the magnifying linear filter 227 performs pixel values s [1], s [2],..., S [N] of reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (B3). ], The pixel value s ′ of the target pixel in the output image is calculated.
  • s ′ w (k1, k2) [1] s [1] + w (k1, k2) [2] s [2] +. + W (k1, k2) [N] s [N] + c (B3)
  • w (k1, k2) [1], w (k1, k2) [2],..., W (k1, k2) [N] are target pixels calculated by the region characteristic calculation unit 225. Is an element of the enlarged filter coefficient group w (k1, k2) corresponding to the first region characteristic k1 and the second region characteristic k2 of the unit region including.
  • an area characteristic pair (k1) composed of the first area characteristic k1 and the second area characteristic k2 calculated by the area characteristic calculation unit 225. , K2) are elements of the enlarged filter coefficient group w (k1, k2).
  • the area characteristic calculation unit 225 calculates the first area characteristic k1 and the second area characteristic k2 for each unit area, as in the first configuration example. For example, when the unit for calculating the first region characteristic k1 and the second region characteristic k2 is a macro block, the enlarged filter coefficient group w (k1, k2) is set for each macro book.
  • FIG. 43 is an enlarged view equivalent to the filter operation unit 220 including the first spatial filter 221 in which the reference area is set as shown in FIG. 35 and the second spatial filter 223 in which the reference area is set as shown in FIG.
  • FIG. 10 is a diagram illustrating a setting example of a reference region of the linear filter 227.
  • the center pixel corresponds to the target pixel
  • the black pixel corresponds to the reference pixel.
  • white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1 and the second region characteristic k2, the notation of “(k1, k2)” is omitted in FIG.
  • FIG. 44 is an enlargement equivalent to the filter operation unit 220 including the first spatial filter 221 in which the reference region is set as shown in FIG. 37 and the second spatial filter 223 in which the reference region is set as shown in FIG.
  • FIG. 10 is a diagram illustrating a setting example of a reference region of the linear filter 227.
  • the center pixel corresponds to the target pixel
  • the black pixel corresponds to the reference pixel.
  • white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1 and the second region characteristic k2, the notation of “(k1, k2)” is omitted in FIG.
  • the adaptive filter 200 according to the configuration example also includes (1) the first filter coefficient group w1 (k1) that depends on the first region characteristic k1, At least one first filter coefficient table W1 recorded in association with the corresponding first area characteristic k1 and at least one second filter coefficient group w2 (k2) depending on the second area characteristic k2 correspond to each other.
  • a filter coefficient decoding unit 211 that decodes the second filter coefficient table W2 recorded in association with the area characteristic k2, and (2) an area characteristic calculation unit 225 that calculates the first area characteristic k1 and the second area characteristic k2 of each unit area.
  • the adaptive filter 200 when the adaptive filter 200 according to this configuration example is used, a plurality of filter coefficient groups w (k1, k2) depending on both the first region characteristic k1 and the second region characteristic k2 are converted into corresponding region characteristic pairs (k1 , K2), the filter operation corresponding to both the first region characteristic k1 and the second region characteristic k2 of each unit region can be performed without decoding the filter coefficient table W recorded in association with the unit region. That is, if the adaptive filter according to this configuration example is used, a decoded image close to the original image can be accurately reproduced without causing a significant increase in the code amount.
  • FIG. ⁇ Embodiment 4 A fourth embodiment of the present invention will be described with reference to FIGS. 45 to 46.
  • FIG. 45 to 46 A fourth embodiment of the present invention will be described with reference to FIGS. 45 to 46.
  • 45 is an adaptive filter suitable for mounting on a decoding device, and includes a filter setting unit 310 and a filter calculation unit 320.
  • the filter setting unit 310 is a means for setting filter characteristics, and includes a spatial filter coefficient decoding unit 311 and an offset table decoding unit 312.
  • the spatial filter coefficient group w decoded by the spatial filter coefficient decoding unit 311 is supplied to a spatial filter 321 described later.
  • the offset table decoding unit 312 decodes the offset table C from the encoded data.
  • the offset table C refers to a table in which at least one offset c (k ′) depending on the region characteristic k ′ is recorded in association with the corresponding region characteristic k ′.
  • the offset table C decoded by the offset table decoding unit 312 is supplied to an offset addition unit 324 described later.
  • the filter calculation unit 320 is a means for executing a filter calculation, and includes a spatial filter 321, a region characteristic calculation unit 322, an offset determination unit 323, and an offset addition unit 324.
  • the spatial filter 321 has pixel values s [1], s [2],..., S [N] of reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (C1). From this, the pixel value s ′ of the target pixel in the output image is calculated.
  • s ′ w [1] s [1] + w [2] s [2] +... + w [N] s [N] ... (C1)
  • w [1], w [2],..., W [N] are elements of the spatial filter coefficient group w decoded by the spatial filter coefficient decoding unit 321.
  • the calculated pixel value s ′ is supplied to the subsequent offset addition unit 324.
  • the region characteristic calculation unit 322 calculates a region characteristic k ′ of each unit region in the input image (decoded image or decoded image after deblocking).
  • a region characteristic k ′ in the present configuration example for example, a luminance magnitude (band offset), an edge type (edge offset), or the like can be used.
  • k ′ Y / 16 (a value obtained by quantizing the luminance value Y of the target pixel) may be set.
  • the region characteristic k ′ calculated by the region characteristic calculation unit 322 is supplied to the offset determination unit 323.
  • the offset determination unit 323 determines the value of the offset c used for the filter calculation for the pixels belonging to each unit area. More specifically, in the offset table C decoded by the offset table decoding unit 312, the offset c (k ′) associated with the region characteristic k ′ of the unit region calculated by the region characteristic calculation unit 322 is specified. . The offset c (k ′) determined by the offset determination unit 323 is supplied to the offset addition unit 324.
  • the offset addition unit 324 adds the offset c (k ′) determined by the offset determination unit 323 to the pixel value s ′ calculated by the spatial filter 321.
  • the sum s ′ + c (k ′) calculated by the offset adding unit 324 is output to the outside of the adaptive filter 300.
  • An arbitrary area obtained by dividing the frame can be used as a unit for calculating the area characteristic k ′.
  • a slice, a macro block, a block, an LCU, a CT, a CU, a PT, a PU, a TT, a TU, or an M ⁇ N block can be used as a unit for calculating the region characteristic k ′.
  • an offset c (k ′) corresponding to the region characteristic k ′ of the macroblock is used for the filter calculation for pixels belonging to each macroblock. be able to.
  • the adaptive filter 300 performs the filter operation on each pixel belonging to each unit region by using the offset c (k ′) depending on the region characteristic k ′ of the unit region and the unit.
  • a filter operation unit 320 is provided that executes using a filter coefficient group w that does not depend on the region characteristic k ′ of the region. Therefore, it is possible to achieve higher encoding efficiency than a conventional adaptive filter that performs a filter operation using a certain offset c.
  • the spatial filter coefficient w (k ′) corresponding to the region characteristic k ′ is set.
  • the calculation cost on both the encoding device side and the decoding device side can be reduced and the code amount of the encoded data can be reduced as compared with the case where the filter operation is executed by using. That is, higher encoding efficiency can be realized at a lower calculation cost than the conventional adaptive filter.
  • the filter operation is performed using a certain spatial filter coefficient group w.
  • the present invention is not limited to this. That is, the filter coefficient group w only needs to be independent of the area characteristic k ′, and the filter coefficient group w (k ′′) corresponding to the area characteristic k ′′ different from the area characteristic k ′ is used for filtering.
  • s ′ w (k ′′) [1] s [1] + w (k ′′) [2] s [2] +. + W (k ′′) [N] s [N] + c (k ′) (C2)
  • a configuration may be adopted in which a filter operation is performed using an offset c (k ′, k ′′) corresponding to these two region characteristics k ′, k ′′. That is, you may perform the filter calculation according to (C3) Formula.
  • s ′ w (k ′′) [1] s [1] + w (k ′′) [2] s [2] +. + W (k ′′) [N] s [N] + c (k ′, k ′′) (C3)
  • a configuration may be adopted in which a filter operation is performed using a spatial filter coefficient group w (k ′, k ′′) corresponding to these two region characteristics k ′, k ′′. That is, you may perform the filter calculation according to (C4) Formula.
  • s ′ w (k ′, k ′′) [1] s [1] + w (k ′, k ′′) [2] s [2] +. + W (k ′, k ′′) [N] s [N] + c (k ′) (C4)
  • the activity can be used as the second region characteristic k ′′.
  • the magnitude of the luminance can be used as the second region characteristic k ′′.
  • the amount calculated from the pixel values of the pixels existing in and / or around the unit region is used as the region characteristic k ′ of each unit region.
  • the present invention is not limited to this. is not. In other words, any amount can be used as the region characteristic k ′ of the unit region as long as it is an amount indicating the characteristic of the unit region (in other words, an amount that can be used for classification of the unit region).
  • an encoding parameter relating to a unit region or an encoding parameter relating to a unit including the unit region (for example, a macro block including a block) can be used as the region characteristic k ′ of the unit region.
  • the intra prediction mode and the inter prediction mode are examples of encoding parameters that can be used as the region characteristic k ′. Further, as will be described later, the type of image to which the unit area belongs may be used as the area characteristic k ′ of the unit area. The same can be said for the region characteristic k ′′ described above.
  • a plurality of different offsets c (k) corresponding to each of a plurality of different values k ′ k ′ (0), k ′ (1),..., K ′ (M) of the region characteristic k ′. '(0)), c (k' (0)),..., C (k '(M)), when encoding each offset c (k' (t)) (or its Instead of encoding the quantized value as it is, a difference value (or a quantized value thereof) from the encoded offset c (k ′ (t ⁇ 1)) may be encoded.
  • the offset table decoding unit 312 After decoding the difference value ⁇ (k ′ (t)), the offset value c (k ′ (t)) is obtained according to (C5) using the decoded offset value c (k ′ (t ⁇ 1)).
  • c (k ′ (t)) c (k ′ (t ⁇ 1)) + ⁇ (k ′ (t)) (C6)
  • c (k ′ (0)), c (k ′ (0)),..., C (k ′ (M)) one offset serving as a starting point of encoding / decoding, For example, c (k ′ (0)) is encoded / decoded regardless of other offsets.
  • the configuration for executing the filter operation using the offset c (k ′) corresponding to the region characteristic k ′ has been described, but the configuration using the offset c corresponding to the target to be subjected to the filter processing may also be used. Conceivable. Specifically, an offset c having different values is used when a filter operation is performed on the color difference signal Cb and when a filter operation is performed on the color difference signal Cr.
  • the adaptive filter is based on the principle that the spatial correlation between pixels existing in the original picture is reproduced by filtering. Since the color difference component Cb and the color difference component Cr have edges in the same direction at substantially the same location, the inter-pixel correlation between a certain pixel and its surrounding pixels is often similar to each other.
  • the common use of the spatial filter w (k ′′) determined in relation to the feature of the inter-pixel correlation between the color difference component Cb and the color difference component Cr particularly increases the code amount for the filter coefficient group of the adaptive filter. This is particularly appropriate at a relatively low bit rate, which is difficult to apply, however, because the offset between the decoded image and the original image cannot be said to be close between the color difference component Cb and the color difference component Cr. It is appropriate to use the offset c having different values for the color difference component Cb and the color difference component Cr.
  • a spatial filter coefficient group w (k ′′) corresponding to various region characteristics k ′′ may be used.
  • a spatial filter coefficient group w having different values may be used when the filter operation is executed.
  • the chrominance component Cb and the chrominance component Cr have edges in the same direction at substantially the same place, but their strengths are not necessarily close. Therefore, when encoding at a relatively high bit rate, the chrominance component Cb and the chrominance component It is appropriate to use a spatial filter coefficient group w different from Cr.
  • the encoding device may be installed with the adaptive filter 300 ′ shown in FIG. 46.
  • the spatial filter coefficient decoding unit 311 in the adaptive filter 300 on the decoding device side is replaced with an adaptive filter coefficient determination unit 3111 and a spatial filter coefficient encoding unit 311b.
  • the offset table decoding unit 312 in the adaptive filter 300 on the decoding device side is replaced with an offset table encoding unit 312a.
  • the adaptive filter coefficient determination unit 3111 uses the least square method to calculate a square error with respect to the original image (encoding target image) of the output image of the filter operation unit 320.
  • the spatial filter coefficient group w and the offset table C to be minimized are determined.
  • the objective function to be minimized by the least square method is a function having the order N of the spatial filter coefficient group and the order of the offset table C (for example, N2) as variables, and becomes 0 by partially differentiating the objective function with respect to the N + N2 variable. It can be calculated by solving simultaneous equations.
  • the spatial filter coefficient group w and the offset table C that minimize the error are determined. That is, when the spatial filter coefficient group w (k ′, k ′′) is determined according to the two region characteristics k ′ and k ′′, the least square method is calculated for each region characteristic pair (k ′, k ′′). If the spatial filter coefficient group w (k ′′) is determined according to one characteristic k ′′, the least square method is calculated for each region characteristic k ′′.
  • the filter coefficient group w is determined to be one, one least square method is calculated. Also, (2) the spatial filter coefficient encoding unit 311b encodes the spatial filter coefficient group w determined by the adaptive filter coefficient determination unit 311a, and (3) the offset table encoding unit 312a performs the adaptive filter coefficient determination unit 311a.
  • the offset table C created by is encoded.
  • Encoded data / decoding device / encoding device A video encoding device (encoding device) and a video decoding device (decoding device) on which the adaptive filters according to Embodiments 2 to 4 described above are mounted will be described. A structure of encoded data generated by the moving image encoding device and decoded by the moving image decoding device will also be described.
  • the encoded data # 1 generated by the moving image encoding device 2 and decoded by the moving image decoding device 1 includes a sequence layer, a GOP (Group Of Pictures) layer, a picture layer, a slice layer, and a macroblock layer. Has a hierarchical structure.
  • FIG. 47 shows the structure of encoded data for the layers below the picture layer.
  • 47A to 47F show the structures of the picture layer P, slice layer S, macroblock layer MB, macroblock header MBH, inter prediction partition prediction parameter PP, and intra prediction partition prediction parameter PP, respectively.
  • the picture layer P is a set of data referred to by the video decoding device 1 in order to decode the target picture. As shown in FIG. 47A, the picture layer P includes a picture header PH and slice layers S 1 to S Ns (Ns is the total number of slice layers included in the picture layer P).
  • 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 (entoropy_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.
  • Each slice layer S included in the picture layer P is a set of data referred to by the video decoding device 1 in order to decode the target slice.
  • the slice layer S includes a slice header SH and macroblock layers MB 1 to MB Nm (Nm is the total number of macroblocks 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
  • POC designation information (pic_order_cnt_lbs, delta_pic_order_cnt, etc.) for designating the display order (POC: Picture Order Count) of a picture including the target slice
  • POC Picture Order Count
  • the weighting factor designation information pred_weight_table
  • pred_weight_table that designates the weighting factor used when the moving image coding apparatus 2 performs the coding is an example of a coding parameter included in the slice header SH.
  • slice types that can be specified by the slice type specification information, (1) I slice using only intra prediction at the time of encoding, and (2) P using unidirectional prediction or intra prediction at the time of encoding. Slice, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding.
  • the slice header SH includes a filter parameter FP that is referred to by the adaptive filter included in the video decoding device 1.
  • Each macroblock layer MB included in the slice layer S is a set of data referred to by the video decoding device 1 in order to decode the target macroblock.
  • the macroblock layer MB includes a skip flag SKIP, a macroblock header MBH, prediction parameters PP 1 to PP NP , and quantized prediction errors QD 1 to QD Nb .
  • Np represents the number of partitions (prediction units) included in the target macroblock
  • Nb represents the number of blocks (conversion units) included in the target macroblock.
  • the value of the skip flag SKIP is 1, that is, when the target macroblock is a skip block, the macroblock header MBH, the prediction parameters PP 1 to PP NP , and the quantized prediction errors QD 1 to QD in that macroblock layer Nb is omitted.
  • the macroblock header MBH includes an encoding parameter referred to by the video decoding device 1 in order to determine a decoding method of the target macroblock.
  • macroblock type designation information MBT (mb_type) for designating the macroblock type of the target macroblock
  • CBP coded_block_pattern
  • quantization step Quantization parameter difference ⁇ qp (mb_qp_delta) that specifies the size of.
  • the macroblock type designation information MBT includes prediction unit designation information PT and conversion unit designation information TT.
  • the prediction unit designation information PT includes a partition pattern (that is, the size of each partition included in the target macroblock and a position in the target macroblock) into the partition (prediction unit) of the target macroblock, and video coding.
  • the prediction method (L0 unidirectional prediction, L1 unidirectional prediction, bidirectional prediction, intra prediction, etc.) used when the apparatus 2 generates a predicted image in each partition is designated.
  • the partition size is, for example, 16 ⁇ 16 pixels, 8 ⁇ 8 pixels, 4 ⁇ 4 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, 8 ⁇ 4 pixels, 4 ⁇ 8 pixels, 8 ⁇ 1 pixels, and 1 X 8 pixels can be selected.
  • each partition has M ⁇ N pixels (M is an integer equal to or smaller than the number of pixels in the horizontal direction of the target macroblock, and N is an integer equal to or smaller than the number of pixels in the vertical direction of the target macroblock).
  • M is an integer equal to or smaller than the number of pixels in the horizontal direction of the target macroblock
  • N is an integer equal to or smaller than the number of pixels in the vertical direction of the target macroblock.
  • the conversion unit designation information TT designates the division pattern (that is, the size of each block included in the target macroblock and the position in the target macroblock) into the block (conversion unit) of the target macroblock.
  • Each block is 16 ⁇ 16 pixels, 8 ⁇ 8 pixels, 4 ⁇ 4 pixels, 16 ⁇ 8 pixels, 8 ⁇ 16 pixels, 8 ⁇ 4 pixels, 4 ⁇ 8 pixels, 8 ⁇ 1 pixels, and 1 ⁇ 8 pixels.
  • each block has M ′ ⁇ N ′ pixels (M ′ is an integer less than or equal to the number of pixels on one side of the target macroblock, and N ′ is less than or equal to the number of pixels on the other side of the target macroblock. (Which is an integer).
  • the partition when the macro block is a square area of 16 ⁇ 16 pixels is exemplified, but the present invention is not limited to this.
  • a 64 ⁇ 64 pixel macroblock a 64 ⁇ 64 pixel or 32 ⁇ 32 pixel square area, or 64 ⁇ 32 pixel, 32 ⁇ 64 pixel, 32 ⁇ 16 pixel, or 16 ⁇ 32 pixel
  • the rectangular area is also allowed as a partition or block.
  • the quantization parameter difference ⁇ qp is a difference qp ⁇ qp ′ between the quantization parameter qp in the target macroblock and the quantization parameter qp ′ in the macroblock encoded immediately before the macroblock.
  • Each quantized prediction residual QD n included in the macroblock layer MB is encoded data generated by the moving image encoding apparatus 2 performing the following processes 1 to 3 on the target block.
  • Process 1 DCT transform (Discrete Cosine Transform) is performed on the prediction residual obtained by subtracting the prediction image from the encoding target image.
  • Process 2 The DCT coefficient obtained in Process 1 is quantized.
  • Process 3 The DCT coefficient quantized in Process 2 is variable length encoded.
  • the prediction parameter PP related to the inter prediction partition in which the prediction image is generated by the inter prediction includes a reference image index RI, an estimated motion vector, as shown in FIG.
  • the index PMVI and the motion vector residual MVD are included.
  • the motion vector residual MVD is encoded data generated by the moving image encoding device 2 executing the following processes 4 to 6.
  • Process 4 Select an encoded / decoded locally decoded image (more precisely, an image obtained by performing deblocking processing and adaptive filtering on the encoded / decoded local decoded image)
  • the motion vector mv for the target partition is derived with reference to the selected encoded / decoded local decoded image (hereinafter also referred to as “reference image”).
  • Process 5 An estimation method is selected, and an estimated value (hereinafter also referred to as “estimated motion vector”) pmv of the motion vector mv assigned to the target partition is derived using the selected estimation method.
  • Process 6 The motion vector residual MVD obtained by subtracting the estimated motion vector pmv derived in Process 5 from the motion vector mv derived in Process 4 is encoded.
  • the reference image index RI described above specifies the locally decoded image (reference image) that has been encoded / decoded selected in the process 4, and the estimated motion vector index PMVI described above is selected in the process 5.
  • the estimation methods that can be selected in the processing 5 include: (1) a locally decoded image being encoded / decoded (more precisely, a region that has already been decoded in a locally decoded image being encoded / decoded).
  • a median of a motion vector allocated to a partition adjacent to the target partition hereinafter also referred to as “adjacent partition” is used as an estimated motion vector pmv.
  • a motion vector assigned to a partition (often referred to as a “collocated partition”) occupying the same position as the target partition is used as an estimated motion vector pmv, etc. Is mentioned.
  • the prediction parameter PP related to the partition for which unidirectional prediction is performed includes one each of the reference image index RI, the estimated motion vector index PMVI, and the motion vector residual MVD.
  • the prediction parameters PP for a partition that performs bi-directional prediction include two reference image indexes RI1 and RI2, two estimated motion vector indexes PMVI1 and PMVI2, and two motion vector residuals MVD1. And MVD2.
  • the prediction parameter PP related to the intra prediction partition for which a prediction image is generated by intra prediction includes a prediction index PI as shown in FIG. 47 (f).
  • the prediction index PI is an index for designating an intra prediction method (prediction mode) for the target partition. Note that since the types of prediction modes that can be selected for the target partition differ depending on the size of the target partition, the range of values that the prediction index can take also differs depending on the size of the target partition.
  • the data structure of the encoded data # 1 is not limited to that shown in FIG.
  • a data structure as shown in FIG. 50 obtained by changing a part of a layer structure below a picture in a moving image may be adopted.
  • FIG. 50 is a diagram showing a modification of the data structure of the encoded data # 1.
  • (a) is a picture layer PCT corresponding to a picture
  • (b) is a slice layer S corresponding to a slice obtained by dividing the picture
  • (c) is a tree obtained by dividing the slice.
  • Tree block layers TBLK and (d) corresponding to blocks (Tree blocks) indicate CU layer CUs corresponding to CUs (Coding Units) obtained by dividing the tree blocks.
  • the picture layer PICT includes various types of information that the video decoding device 1 refers to in order to decode a picture (also referred to as a target picture). Specifically, as shown in FIG. 50A, a picture header PH and slice layers S 1 to S NS (NS is the total number of slices included in the target picture) are included.
  • 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.
  • entropy_coding_mode_flag When entropy_coding_mode_flag is 0, the target picture is encoded by CAVLC (Context-based “Adaptive” Variable “Length” Coding). When entropy_coding_mode_flag is 1, the target picture is encoded by CABAC (Context-based Adaptive Binary Arithmetic Coding).
  • picture header PH is also referred to as a picture parameter set (PPS).
  • PPS picture parameter set
  • the slice layer S includes various types of information that the video decoding device 1 refers to in order to decode a slice (also referred to as a target slice). Specifically, as shown in FIG. 50B, a slice header SH and tree block layers TBLK 1 to TBLK NC (NC is the total number of tree blocks included in the target slice) are included.
  • 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.
  • the slice type designation information (slice_type) that designates the slice type of the target slice 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 filter parameter FP that defines the filter coefficient group of the adaptive filter that acts on the target slice is also included in the slice header SH.
  • the tree block layer TBLK includes various types of information that the video decoding device 1 refers to in order to decode a tree block (also referred to as a target tree block). Specifically, as shown in FIG. 50C, a tree block header TBLKH and CU information CUI 1 to CUI NL (NL is the total number of CUs included in the target tree block) are included.
  • the CU is obtained by recursively dividing the tree block into quadtrees.
  • Recursive quadtree partitioning refers to a process in which a tree block is divided into four equal parts and then a step of dividing the partition obtained by the previous partitioning into four equal parts is repeated. At this time, only a part of the partition obtained by the previous division is allowed to be divided into four equal parts. That is, CUs having different sizes can coexist in the tree block.
  • the tree structure obtained by this recursive quadtree partitioning is hereinafter referred to as a coding tree.
  • the tree block corresponds to the root of the coding tree
  • the CU corresponds to the leaf of the coding tree.
  • a leaf of the coding tree is a node corresponding to the CU, and thus may be referred to as a coding node (coding node).
  • the size that each CU can take depends on the size of the tree block and the maximum hierarchical depth (maximummaximhierarchical depth) included in the sequence parameter set SPS of the encoded data # 1. For example, when the size of the tree block is 64 ⁇ 64 pixels and the maximum hierarchical depth is 3, there are three types of sizes, that is, CUs of 64 ⁇ 64 pixels, 32 ⁇ 32 pixels, and 16 ⁇ 16 pixels. Can exist.
  • 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.
  • the tree block division information SP_TBLK that specifies the division pattern of the target tree block into each CU, the quantization parameter difference ⁇ qp (qp_delta) that specifies the size of the quantization step, and the like are encoded parameters included in the tree block header TBLKH. It is an example.
  • the tree block division information SP_TBLK is information indicating a division pattern when the target tree block is divided into CUs, in other words, information representing a coding tree.
  • the tree block division information SP_TBLK can be realized, for example, by a set of flags (split_coding_unit_flag) indicating whether or not each node is divided into four in the coding tree.
  • 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.
  • At least one prediction block is obtained by dividing the CU.
  • the CU is covered by at least one prediction block that does not overlap each other.
  • a tree having a node corresponding to a CU as a root and a node corresponding to a prediction block as a leaf is called a prediction tree (PT).
  • a prediction block is an execution unit of prediction processing, and is also referred to as PU (prediction unit).
  • intra prediction there are roughly two types of division in the prediction tree: intra prediction and inter prediction.
  • intra prediction there are 2N ⁇ 2N (the same size as the encoding node) and N ⁇ N division methods.
  • inter prediction there are 2N ⁇ 2N (the same size as the encoding node), 2N ⁇ N, N ⁇ 2N, N ⁇ N, and the like.
  • At least one conversion block is obtained by dividing the CU.
  • the CU is covered by at least one transform block that does not overlap each other.
  • a tree having a node corresponding to a CU as a root and a node corresponding to a prediction block as a leaf is referred to as a transform tree (TT).
  • the transformation block is another meaning of execution of DCT transformation, and is also called TU (transform unit).
  • 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.
  • the CU information CUI includes various types of information that the video decoding device 1 refers to in order to decode a CU (hereinafter also referred to as a target CU). Specifically, as shown in FIG. 50 (d), a skip flag SKIP, PT information PTI, and TT information TTI are included.
  • the skip flag SKIP is a flag indicating whether or not the skip mode is applied to the target CU.
  • the value of the skip flag SKIP is 1, that is, when the skip mode is applied to the target CU, the CU The PT information PTI and the TT information TTI in the information CUI are omitted. Note that the skip flag SKIP is omitted for the I slice.
  • PT information PTI is information regarding the prediction tree PT having the target CU as a root. Specifically, as shown in FIG. 50 (d), the prediction type information PType and the prediction information PInfo are included.
  • Prediction type information PType is information that specifies whether intra prediction or inter prediction is used to generate a predicted image in the target CU.
  • PInfo PT division information (not shown) for specifying a division pattern for dividing the target CU into PUs, and a prediction parameter referred to by the video decoding device 1 to generate a prediction image of each PU (Not shown) is included.
  • the prediction parameters of a PU for which a predicted image is generated by inter prediction include a reference image index, an estimated motion vector index, a motion vector residual, and the like.
  • the prediction parameters related to the intra PU for which the prediction image is generated by the intra prediction include a prediction index for specifying the prediction mode.
  • the TT information TTI is information related to a conversion tree having the target CU as a root. Specifically, as shown in FIG. 50 (d), TT division information SP_TT and quantization prediction residuals QD 1 to QD NT (NT is the total number of blocks included in the target CU) are included.
  • TT division information SP_TT is information expressing a division pattern when dividing the target CU into TUs, in other words, information expressing a tree structure of a conversion tree having the target CU as a root.
  • the TT division information SP_TT can be configured with, for example, a flag (split_transform_unit_flag) indicating whether or not to perform division of the target CU and information (trafoDepth) indicating the division depth. For example, when the size of the CU is 64 ⁇ 64, each TU obtained by the division can take a size from 32 ⁇ 32 pixels to 2 ⁇ 2 pixels.
  • the quantized prediction residuals QD 1 to QD NT are codes obtained by performing the following processing on each TU.
  • DCT transform Discrete Cosine Transform
  • the transform coefficient obtained in Process 1 is quantized.
  • the transform coefficient quantized in Process 2 is variable length encoded.
  • the moving image decoding apparatus 1001 includes, as a part thereof, H.264. H.264 / MPEG-4. It is a decoding device including AVC and its successor technology.
  • FIG. 48 is a block diagram showing a configuration of the moving picture decoding apparatus 1001.
  • the video decoding device 1001 is a device for generating video # 1002 by decoding the encoded data # 1001, and as shown in FIG. 48, a variable length code decoding unit 1013, a motion vector restoration unit 1014, A buffer memory 1015, an inter prediction image generation unit 1016, an intra prediction image generation unit 1017, a prediction method determination unit 1018, an inverse quantization / inverse transformation unit 1019, an adder 1020, a deblocking filter 1041, and an adaptive filter 1042 are provided. Yes.
  • the adaptive filter 100, 200, 300 according to Embodiments 2 to 4 described above is used as the adaptive filter 1042.
  • the variable length code decoding unit 1013 decodes the prediction parameter PP related to each partition from the encoded data # 1001. 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 # 1001 and supplied to the motion vector restoration unit 1014.
  • 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 # 1001, and this is decoded into the intra prediction image. It supplies to the production
  • variable length code decoding unit 1013 decodes the macroblock type MBT from the encoded data, and supplies this to the prediction method determination unit 1018 (not shown). Furthermore, the variable length code decoding unit 1013 decodes the quantization prediction residual QD for each block and the quantization parameter difference ⁇ qp for the macroblock including the block from the encoded data # 1001, and dequantizes and decodes them. This is supplied to the inverse transform unit 1019. Also, the variable length code decoding unit 1013 supplies the filter parameter FP included in the encoded data # 1001 to the adaptive filter 1042.
  • the motion vector restoration unit 1014 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 other partitions. 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 ′ related to other partitions can be read from the buffer memory 1015.
  • the motion vector restoration unit 1014 supplies the restored motion vector mv to the inter predicted image generation unit 1017 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 1017 together with the corresponding reference image indexes RI1 and RI2.
  • the inter prediction image generation unit 1016 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 1014, 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 1014. Is generated.
  • the filtered decoded image P_FL ′ is obtained by performing deblocking processing by the deblocking filter 1041 and adaptive filtering processing by the adaptive filter 1042 on the decoded image that has already been decoded.
  • the inter prediction image generation unit 1016 is an image, and can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 1015.
  • the motion compensated image mc generated by the inter predicted image generating unit 1016 is supplied to the prediction method determining unit 1018 as an inter predicted 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 1017 generates a predicted image Pred_Intra related to each intra prediction partition. Specifically, first, referring to the correspondence table recorded in its own memory, the prediction mode is specified based on the size designation information and the prediction index designation information supplied from the variable length code decoding unit 1013, The identified 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 1017 is supplied to the prediction method determination unit 1018. In addition, since the specific production
  • the prediction method determination unit 1018 determines whether each partition is an inter prediction partition that should perform inter prediction or an intra prediction partition that should perform intra prediction, based on the macroblock type MBT. In the former case, the inter predicted image Pred_Inter generated by the inter predicted image generation unit 1016 is supplied to the adder 1020 as the predicted image Pred. In the latter case, the intra predicted image generation unit 1017 generates the inter predicted image Pred_Inter. The intra predicted image Pred_Intra that has been processed is supplied to the adder 1020 as the predicted image Pred.
  • the inverse quantization / inverse transform unit 1019 (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 1020.
  • the inverse quantization / inverse transform unit 1019 derives a quantization step QP from the quantization parameter difference ⁇ qp supplied from the variable length code decoding unit 1013.
  • the generation of the prediction residual D by the inverse quantization / inverse transform unit 1019 is performed in units of blocks (transform units).
  • the adder 1020 generates a decoded image P by adding the prediction image Pred supplied from the prediction method determination unit 1018 and the prediction residual D supplied from the inverse quantization / inverse transformation unit 1019.
  • the deblocking filter 1041 determines the block boundary in the decoded image P when the difference between the pixel values of the pixels adjacent to each other via the block boundary in the decoded image P or the macroblock boundary is smaller than a predetermined threshold, or By performing deblocking processing on the macroblock boundary, an image near the block boundary or the macroblock boundary is smoothed.
  • the image subjected to the deblocking process by the deblocking filter 1041 is output to the adaptive filter 42 as a deblocked decoded image P_DB.
  • the adaptive filter 1042 subjects the deblocked decoded image P_DB supplied from the deblocking filter 1041 to a filtering process using a filter coefficient obtained by decoding the filter parameter FP, so that the filtered decoded image P_FL Is generated.
  • the image subjected to the filter processing by the adaptive filter 1042 is output to the outside as the filtered decoded image P_FL, and is associated with the POC designation information decoded from the encoded data by the variable length code decoding unit 1013 in the buffer memory 1015. Stored.
  • the structure of the moving image decoding apparatus 1001 corresponding to the case where encoded data # 1001 has the data structure shown in FIG. 47 was demonstrated here, the structure of the moving image decoding apparatus 1001 is not limited to this. That is, the video decoding apparatus 1 can be made to correspond to the encoded data # 1001 having the data structure shown in FIG.
  • the moving image encoding apparatus 1002 includes, as a part thereof, an H.264 format. H.264 / MPEG-4. It is a decoding device including AVC and its successor technology.
  • FIG. 49 is a block diagram showing a configuration of the moving picture encoding apparatus 1002.
  • the moving image encoding apparatus 1002 is an apparatus that generates encoded data # 1001 by encoding moving image # 1010 (encoding target image).
  • the adaptive folders 100 ′, 200 ′, and 300 ′ according to Embodiments 2 to 4 described above are used as the adaptive folder 1034.
  • the transform / quantization unit 1021 performs (1) DCT transform (Discrete Cosine Transform) for each block 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 1023.
  • the transform / quantization unit 1021 selects (1) a quantization step QP to be used for quantization for each macroblock, and (2) a quantization parameter difference ⁇ qp indicating the size of the selected quantization step QP.
  • the difference value obtained by subtracting the value of '.
  • the variable length code encoding unit 1022 includes (1) a quantization prediction residual QD and ⁇ qp supplied from the transform / quantization unit 1021, and (2) a quantization parameter PP supplied from a prediction scheme control unit 1028 described later. (3) The encoded data # 1001 is generated by variable-length encoding the filter parameter FP supplied from the adaptive filter 1034 described later.
  • the inverse quantization / inverse transform unit 1023 (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 1031.
  • the quantization step QP supplied from the transform / quantization unit 1021 is used.
  • the prediction residual D output from the inverse quantization / inverse transform unit 1023 is obtained by adding a quantization error to the prediction residual D input to the transform / quantization unit 1021. Common names are used for this purpose.
  • the intra predicted image generation unit 1025 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 1025 supplies the generated intra predicted image Pred_Intra to the prediction method control unit 1028.
  • the intra predicted image generation unit 1025 refers to the correspondence table stored in its own memory, and specifies the prediction index PI for each partition from the prediction mode selected for each partition and the size of each partition.
  • the prediction index designation information indicating the prediction index PI for each partition is supplied to the prediction method control unit 28.
  • generation part 1025 can be performed by the process similar to the process demonstrated in (the production
  • the motion vector detection unit 1027 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 1033 and adaptive filtering processing by the adaptive filter 1034 on the decoded image that has already been decoded.
  • the motion vector detection unit 1027 can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 1024.
  • the motion vector detection unit 1027 supplies the detected motion vector mv to the inter prediction image generation unit 1026 and the motion vector redundancy deletion unit 1029 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 1026 and the motion vector redundancy deletion unit 1029.
  • the inter prediction image generation unit 1026 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 1027, the motion compensation image mc is obtained from the filtered decoded image P_FL ′ specified by the reference image index RI supplied from the motion vector detection unit 1027. Generate. Similar to the motion vector detection unit 1027, the inter predicted image generation unit 1026 can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 1024. The inter prediction image generation unit 1026 supplies the generated motion compensated image mc (inter prediction image Pred_Inter) to the prediction scheme control unit 1028 together with the reference image index RI supplied from the motion vector detection unit 1027.
  • 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 scheme control unit 1028 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.
  • intra prediction the prediction scheme control unit 1028 supplies the intra prediction image Pred_Intra as the prediction image Pred to the adder 1031 and the subtractor 1032 and also predicts the prediction index PI supplied from the intra prediction image generation unit 1025.
  • the parameter PP is supplied to the variable length code encoding unit 1022.
  • the prediction scheme control unit 1028 supplies the inter prediction image Pred_Inter as the prediction image Pred to the adder 1031 and the subtracter 1032 and the reference image index supplied from the inter prediction image generation unit 1026.
  • RI and an estimated motion vector index PMVI and a motion vector residual MVD supplied from a motion vector redundancy deletion unit 1029 are supplied as prediction parameters PP to a variable length code encoding unit.
  • the prediction residual D is generated by the subtracter 1032 by subtracting the prediction image Pred selected by the prediction method control unit 1028 from the encoding target image.
  • the prediction residual D generated by the subtracter 1032 is DCT transformed / quantized by the transform / quantization unit 1021 as described above.
  • the adder 1031 by adding the prediction image Pred selected by the prediction method control unit 1028 to the prediction residual D generated by the inverse quantization / inverse transformation unit 1023, the adder 1031 generates a local decoded image P. Generated.
  • the local decoded image P generated by the adder 1031 passes through the deblocking filter 1033 and the adaptive filter 1034, and is then stored in the buffer memory 1024 as a filtered decoded image P_FL and used as a reference image in inter prediction.
  • the motion vector redundancy deletion unit 1029 deletes the redundancy in the motion vector mv detected by the motion vector detection unit 1027. 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 1029 supplies the generated motion vector residual MVD to the prediction method control unit 1028 together with the estimated motion vector index PMVI indicating the selected estimation method.
  • the deblocking filter 1033 determines 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 or the macroblock boundary in the decoded image P is smaller than a predetermined threshold value. By performing deblocking processing on the macroblock boundary, an image near the block boundary or the macroblock boundary is smoothed.
  • the image that has been deblocked by the deblocking filter 1033 is output to the adaptive filter 1034 as a deblocked decoded image P_DB.
  • the adaptive filter 1034 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 1033.
  • the filtered decoded image P_FL that has been filtered by the adaptive filter 1034 is stored in the buffer memory 1024.
  • the configuration of moving image encoding device 1002 corresponding to the case where encoded data # 1001 has the data structure shown in FIG. 47 has been described, but the configuration of moving image encoding device 1002 is not limited to this. That is, by appropriately changing the processing unit of various processes, the moving picture encoding apparatus 1002 can be made to correspond to the encoded data # 1001 having the data structure shown in FIG. ⁇ Application example >>
  • the above-described moving image encoding devices 2 and 1002 and moving image decoding devices 1 and 1001 can be used by being mounted on various devices that transmit, receive, record, and reproduce moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like.
  • the moving image encoding device 2 and the moving image decoding device 1 will be described as an example, but the same applies to the moving image encoding device 1002 and the moving image decoding device 1001.
  • moving picture encoding apparatus 2 and moving picture decoding apparatus 1 can be used for transmission and reception of moving pictures.
  • FIG. 51A is a block diagram illustrating a configuration of a transmission device PROD_A in which the moving image encoding device 2 is mounted.
  • the transmission device PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image and the encoded data obtained by the encoding unit PROD_A1.
  • a modulation unit PROD_A2 that obtains a modulation signal
  • a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided.
  • the moving image encoding apparatus 2 described above is used as the encoding unit PROD_A1.
  • the transmission device PROD_A is a camera PROD_A4 that captures a moving image, a recording medium PROD_A5 that records the moving image, an input terminal PROD_A6 that inputs the moving image from the outside, as a supply source of the moving image input to the encoding unit PROD_A1.
  • An image processing unit A7 that generates or processes an image may be further provided. In FIG. 51A, a configuration in which all of these are provided in the transmission device PROD_A is illustrated, but a part may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 according to the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
  • FIG. 51B is a block diagram illustrating a configuration of a receiving device PROD_B in which the moving image decoding device 1 is mounted.
  • the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator.
  • a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2.
  • the moving picture decoding apparatus 1 described above is used as the decoding unit PROD_B3.
  • the receiving device PROD_B has a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3.
  • PROD_B6 may be further provided.
  • FIG. 51B illustrates a configuration in which all of these are provided in the receiving device PROD_B, but some of them may be omitted.
  • the recording medium PROD_B5 may be used for recording a non-encoded moving image, or may be encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
  • a terrestrial digital broadcast broadcasting station (broadcasting equipment or the like) / receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting.
  • a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
  • a server workstation etc.
  • Client television receiver, personal computer, smart phone etc.
  • VOD Video On Demand
  • video sharing service using the Internet is a transmitting device for transmitting and receiving modulated signals by communication.
  • PROD_A / reception device PROD_B usually, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN.
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multi-function mobile phone terminal.
  • the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
  • the moving picture encoding apparatus 2 and the moving picture decoding apparatus 1 described above can be used for recording and reproduction of moving pictures.
  • FIG. 52 (a) is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described moving picture encoding apparatus 2 is mounted.
  • the recording device PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M.
  • the moving image encoding apparatus 2 described above is used as the encoding unit PROD_C1.
  • the recording medium PROD_M may be of a type built in the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • HDD Hard Disk Drive
  • SSD Solid State Drive
  • SD memory such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • the recording device PROD_C is a camera PROD_C3 that captures moving images as a supply source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and reception for receiving moving images.
  • the unit PROD_C5 and an image processing unit C6 that generates or processes an image may be further provided.
  • FIG. 52A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but a part of the configuration may be omitted.
  • the receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
  • Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is a main supply source of moving images).
  • a camcorder in this case, the camera PROD_C3 is a main source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images
  • a smartphone in this case In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main supply source of moving images
  • the camera PROD_C3 or the receiving unit PROD_C5 is a main supply source of moving images
  • FIG. 52 (b) is a block diagram showing a configuration of a playback device PROD_D in which the above-described video decoding device 1 is mounted.
  • the playback device PROD_D reads the moving image by decoding the read data PROD_D1 for reading the encoded data written on the recording medium PROD_M and the encoded data read by the read unit PROD_D1. And a decoding unit PROD_D2 to be obtained.
  • the moving picture decoding apparatus 1 described above is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory, It may be of a type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.
  • the playback device PROD_D has a display PROD_D3 that displays a moving image, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image as a supply destination of the moving image output by the decoding unit PROD_D2.
  • PROD_D5 may be further provided.
  • FIG. 52B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of the configurations may be omitted.
  • the transmission unit PROD_D5 may transmit an unencoded moving image, or transmits encoded data encoded by a transmission encoding method different from the recording encoding method. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image with an encoding method for transmission between the decoding unit PROD_D2 and the transmission unit PROD_D5.
  • Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main supply destination of moving images).
  • a television receiver in this case, the display PROD_D3 is a main supply destination of moving images
  • a digital signage also referred to as an electronic signboard or an electronic bulletin board
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images.
  • Desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main video image supply destination), laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a moving image)
  • a smartphone which is a main image supply destination
  • a smartphone in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination
  • the like are also examples of such a playback device PROD_D.
  • the adaptive filter 100 including the linear filter 121 in which filter coefficients are adaptively set, the pixel value of the target pixel in the output image of the linear filter 121 and the pixel value of the target pixel in the input image of the linear filter 121 Truncating means for truncating the change amount ⁇ s, which is the difference between the two, is provided.
  • LCU Large Coding Unit
  • HEVC High Efficiency Video Coding
  • a leaf CU is a CU (Coding Unit, coding) It is also called the leaf of the tree).
  • PU and TU in the said embodiment are respectively equivalent to the prediction tree (Prediction Tree) and transformation tree (transform tree) in HEVC.
  • the partition of PU in the said embodiment is corresponded to PU (Prediction Unit) in HEVC.
  • a block obtained by dividing a TU corresponds to a TU (Transformation Unit) in HEVC.
  • the present invention can be suitably used for an image filter device that filters an image. Further, the present invention can be suitably used for a decoding device that decodes encoded data and an encoding device that generates encoded data. Further, it can be suitably used for an image encoding device such as a moving image encoding device and an image decoding device such as a moving image decoding device.
  • Video decoding device 12 Predictive image generation unit (predictive image generation means) 17 Adaptive filter (image filter device) 171 Area characteristic value calculation unit (characteristic value calculation means) 171a Activity calculation unit 171b Pixel value reference unit 172 Region classification unit (classification means) 173 Filter processing unit (filter means) 2 Video encoding device (encoding device) 21 Predicted image generating unit (predicted image generating means) 27 Adaptive filter (image filter device) 271 Area characteristic value calculation unit (characteristic value calculation means) 271a Activity calculation unit 271b Pixel value reference unit 272 Region classification unit (classification means) 273 Filter processing unit (filter means) 100, 200, 300, 42 Adaptive filter (filter device on the decoding device side) 110, 210, 310 Filter setting unit 120, 220, 320 Filter operation unit 100 ', 200', 300 ', 34 Adaptive filter (filter device on the encoding device side) 110 ′, 210 ′, 310 ′ Filter setting unit 120

Landscapes

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

Abstract

An adaptive filter (17) is provided with: a region characteristic calculation unit (171) which calculates characteristic values representing the image characteristics of deblocked decoded images (P_DB) for each unit region; and a region classification unit (172) which classifies each unit area into either a filter-on region in which a filter processing unit (173) is made to operate, or a filter-off region in which the filter processing unit (173) is not made to operate, according to the characteristics values of the unit region.

Description

画像フィルタ装置、フィルタ装置、復号装置、符号化装置、および、データ構造Image filter device, filter device, decoding device, encoding device, and data structure
 本発明は、画像のフィルタリングを行う画像フィルタ装置及びフィルタ装置に関する。また、そのような画像フィルタ装置やフィルタ装置を備えている符号化装置および復号装置に関する。また、そのような復号装置によって復号される符号化データのデータ構造に関する。 The present invention relates to an image filter device and a filter device that perform image filtering. The present invention also relates to an image filter device and an encoding device and a decoding device including the filter device. The present invention also relates to a data structure of encoded data decoded by such a decoding device.
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置(符号化装置)、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置(復号装置)が用いられている。具体的な動画像符号化方式としては、例えば、H.264/MPEG-4.AVC(非特許文献1)、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式、および、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている方式(非特許文献2)などが挙げられる。 In order to efficiently transmit or record a moving image, a moving image encoding device (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. AVC (Non-Patent Document 1), VCEG (Video Coding Expert Group) adopted by KTA software, which is a codec for joint development, and TMuC (Test Model Under Consideration) software, a successor codec. (Non-patent Document 2).
 このような符号化方式において、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる最大符号化単位(LCU:Largest Coding Unit)、最大符号化単位を分割することにより得られる符号化単位(CU:Coding Unit)、及び、符号化単位を分割することより得られるブロックおよびパーティションからなる階層構造により管理され、多くの場合、ブロックを最小単位として符号化される。 In such a coding system, an image (picture) that constitutes a moving image is a slice obtained by dividing the image, a maximum coding unit (LCU: Largegest Coding Unit) obtained by dividing the slice, It is managed by a coding unit (CU: Coding Unit) obtained by dividing the coding unit and a hierarchical structure consisting of blocks and partitions obtained by dividing the coding unit. In many cases, the block is minimized. Encoded as a unit.
 また、このような符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像と入力画像との差分画像(「残差画像」または「予測残差」と呼ぶこともある)が符号化される。また、予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)と呼ばれる方法が知られている。 In such an encoding method, a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and a difference image (“residual” between the predicted image and the input image is generated. (Sometimes referred to as “difference image” or “prediction residual”). As methods for generating a predicted image, methods called inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction) are known.
 インター予測においては、フレーム全体が復号された参照フレーム(復号画像)内の参照画像に対し、動きベクトルを用いた動き補償を適用することによって、予測対象フレーム内の予測画像が予測単位毎に生成される。一方で、イントラ予測においては、同一フレーム内の局所復号画像に基づいて、当該フレームにおける予測画像が順次生成される。 In inter prediction, a prediction image in a prediction target frame is generated for each prediction unit by applying motion compensation using a motion vector to a reference image in a reference frame (decoded image) obtained by decoding the entire frame. Is done. On the other hand, in intra prediction, based on locally decoded images in the same frame, predicted images in the frame are sequentially generated.
 特許文献1には、復号画像の各画素値について、該画素の周辺の画像の乱雑さを示す活性度(Activity)の大きさに基づいて、復号画像を複数の領域に分類し、分類された領域毎にフィルタ係数群を切り替えつつフィルタ処理を行うことによってフィルタ済復号画像を生成する適応的ループフィルタ(Adaptive Loop Filter)(以下、単に「適応フィルタ」とも呼ぶ)が開示されている。ここで、上記適応フィルタに用いられるフィルタ係数群は、符号化対象画像と、復号画像に対して上記適応フィルタを施して得られるフィルタ済復号画像との誤差を最小にするように適応的に決定されたものである。 In Patent Document 1, for each pixel value of a decoded image, the decoded image is classified into a plurality of regions based on the degree of activity (Activity) indicating the randomness of the image around the pixel. An adaptive loop filter (hereinafter also simply referred to as “adaptive filter”) that generates a filtered decoded image by performing filter processing while switching a filter coefficient group for each region is disclosed. Here, the filter coefficient group used for the adaptive filter is adaptively determined so as to minimize an error between the encoding target image and the filtered decoded image obtained by applying the adaptive filter to the decoded image. It has been done.
 このような適応フィルタを備えた符号化装置および復号装置は、フィルタ済復号画像を参照して予測画像を生成することにより、予測精度および符号化効率の向上を図ることができる。 The encoding device and decoding device provided with such an adaptive filter can improve prediction accuracy and encoding efficiency by generating a prediction image with reference to the filtered decoded image.
 また、非特許文献3には、(局所)復号画像を複数の領域に分割し、各領域における(局所)復号画像の局所的な乱雑さを示す活性度(Activity)の大きさに応じて、領域毎にフィルタ係数群を切り替えつつフィルタ処理を行う適応的ループフィルタ(Adaptive Loop Filter)が開示されている。ここで、領域毎のフィルタ係数群は、符号化装置にて、該領域におけるフィルタ済みの画像と符号化対象画像との誤差を最小にするように決定される。 Further, Non-Patent Document 3 divides a (local) decoded image into a plurality of regions, and according to the degree of activity (Activity) indicating local randomness of the (local) decoded image in each region, An adaptive loop filter (Adaptive Loop 行 う Filter) that performs filter processing while switching filter coefficient groups for each region is disclosed. Here, the filter coefficient group for each region is determined by the encoding device so as to minimize the error between the filtered image in the region and the encoding target image.
 このような適応フィルタを備えた符号化装置および復号装置は、(局所)復号画像に対して当該適応フィルタによりフィルタ処理を施して得られるフィルタ済みの復号画像を参照して予測画像を生成することにより、予測精度の向上および符号化効率の向上を図ることができる。 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 (local) decoded image using the adaptive filter. As a result, it is possible to improve the prediction accuracy and the encoding efficiency.
国際公開第2010/083438号(2010年7月22日公開)International Publication No. 2010/083438 (released July 22, 2010)
 しかしながら、特許文献1及び非特許文献3に記載された適応フィルタを用いる場合、符号化対象画像の画像特性如何によっては、符号化効率が期待されるほど向上しないという問題を有していた。 However, when the adaptive filters described in Patent Document 1 and Non-Patent Document 3 are used, there is a problem that the encoding efficiency is not improved as expected depending on the image characteristics of the encoding target image.
 この問題に関して、発明者は、ある範囲の活性度を有する領域については、適応フィルタを作用させることによって、むしろ符号化効率が低下するとの実験結果を得た。 Regarding this problem, the inventor has obtained an experimental result that, for an area having a certain range of activity, the coding efficiency is rather lowered by applying an adaptive filter.
 また、符号化効率を向上させる方法としては、活性度に加えて活性度以外の領域特性に基づいて領域毎にフィルタ係数群を切り替える方法などが考えられる。しかしながら、2つの領域特性に基づいて領域毎にフィルタ係数群を切り替える場合、符号化装置側及び復号装置側での計算コストが高くなるという問題があった。 Also, as a method for improving the coding efficiency, a method of switching the filter coefficient group for each region based on region characteristics other than the activity in addition to the activity may be considered. However, when the filter coefficient group is switched for each region based on the two region characteristics, there is a problem that the calculation cost on the encoding device side and the decoding device side becomes high.
 本発明は、上記の問題に鑑みてなされたものであり、その目的は、従来に比べて符号化効率を向上させることのできる画像フィルタ装置、並びに、そのような画像フィルタ装置を備える復号装置および符号化装置を実現することにある。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image filter device capable of improving encoding efficiency as compared with the prior art, and a decoding device including such an image filter device, and It is to realize an encoding device.
 発明者は、上記の問題に鑑み、復号画像における局所的な画像特性に応じて、フィルタ処理のオンオフを切り替えることによって、符号化効率を向上させることができるとの知見を得た。 In view of the above problems, the inventor has obtained knowledge that encoding efficiency can be improved by switching on / off of filter processing according to local image characteristics in a decoded image.
 上記の問題を解決するために、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について、上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域、または、上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている、ことを特徴としている。 In order to solve the above problem, an image filter device according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit regions, and an image characteristic of the input image for each of the plurality of unit regions. A characteristic value calculating means for calculating a characteristic value representing a filter on area in which each of the unit areas is made to act on the filter means in accordance with the value of the characteristic value for the unit area calculated by the characteristic value calculating means, Alternatively, a classification unit that classifies the filter unit into any one of the filter-off regions where the filter unit does not act is provided.
 上記の構成によれば、上記分類手段は、入力画像を構成する各単位領域を、該単位領域における上記入力画像の画像特性を表す特性値の値に応じて、上記フィルタオン領域、および、上記フィルタオフ領域の何れかに分類する。また、上記フィルタ手段は、上記フィルタオン領域に属する単位領域における入力画像に作用する一方で、上記フィルタオフ領域に属する単位領域における入力画像には作用しない。 According to the above configuration, the classification means determines each unit area constituting the input image according to the value of the characteristic value representing the image characteristic of the input image in the unit area, and Classify into any of the filter-off areas. The filter means acts on the input image in the unit area belonging to the filter-on area, but does not act on the input image in the unit area belonging to the filter-off area.
 このように、上記のように構成された本発明に係る画像フィルタ装置によれば、入力画像の局所的な画像特性に応じて、フィルタ処理のオンオフを切り替えることができる。したがって、上記画像フィルタ装置がフィルタ処理のオンオフを切り替えつつ復号画像に作用して得られる出力画像を、予測画像を生成するための参照画像として用いることによって、従来に比べて予測精度及び符号化効率を向上させることができる。 As described above, according to the image filter device according to the present invention configured as described above, it is possible to switch on / off of the filter process according to the local image characteristics of the input image. Therefore, by using the output image obtained by the image filter device acting on the decoded image while switching on / off of the filtering process as a reference image for generating the predicted image, the prediction accuracy and the coding efficiency are improved as compared with the conventional case. Can be improved.
 なお、上記画像フィルタ装置が、画像を符号化する符号化装置、および、符号化データから画像を復号する復号装置において用いられる場合には、上記単位領域を、例えば、予測画像を生成する単位である予測単位(パーティション)としてもよいし、周波数変換の単位である変換単位としてもよいし、それら以外のものとしてもよい。例えば、上記単位領域は、1画素のみから構成される単位であってもよい。 When the image filter device is used in an encoding device that encodes an image and a decoding device that decodes an image from encoded data, the unit region is, for example, a unit for generating a predicted image. It may be a certain prediction unit (partition), may be a conversion unit that is a unit of frequency conversion, or may be other than those. For example, the unit area may be a unit composed of only one pixel.
 また、本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域または上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタ手段によって用いられるフィルタ係数群を含んでいる、ことを特徴としている。 Further, the data structure of the encoded data according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas. The characteristic value calculation means for calculating, and the filter-on region in which the filter means is activated or the filter means is not activated in accordance with the value of the characteristic value for each unit area calculated by the characteristic value calculation means. A data structure of encoded data that is referred to by an image filter device including classification means for classifying into any of the filter-off regions, and includes a filter coefficient group used by the filter means It is a feature.
 上記のように構成された符号化データを参照する復号装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域または上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えており、上記フィルタ手段は、上記符号化データに含まれるフィルタ係数群を用いてフィルタ処理を行う。したがって、そのような復号装置は、予測精度の高い予測画像を生成することができる。 The decoding apparatus that refers to the encoded data configured as described above represents filter means that operates on an input image composed of a plurality of unit regions, and represents the image characteristics of the input image for each of the plurality of unit regions. A characteristic value calculating means for calculating a characteristic value, and a filter-on area or the filter means for causing the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculating means. And classifying means for classifying it into any one of the filter-off regions that do not act on the filter. The filter means performs filter processing using a filter coefficient group included in the encoded data. Therefore, such a decoding apparatus can generate a prediction image with high prediction accuracy.
 また、そのような復号装置に参照される符号化データは、フィルタ処理のオンオフを切り替えるためのフラグを含まなくともよいので、符号化データの符号量が削減される。したがって、上記符号化データは、符号化効率の高い符号化データである。 Also, since the encoded data referred to by such a decoding apparatus does not need to include a flag for switching on / off of the filtering process, the code amount of the encoded data is reduced. Therefore, the encoded data is encoded data with high encoding efficiency.
 また、本発明に係る画像フィルタ装置は、入力画像を構成する複数の単位領域の各々について、当該入力画像の画素値の平均を算出する算出手段と、各単位領域を、上記算出手段によって算出された該単位領域についての画素値の平均に応じて、複数のタイプの何れかに分類する分類手段と、各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出するフィルタ手段と、と備えていることを特徴としている。 In the image filter device according to the present invention, for each of a plurality of unit regions constituting the input image, a calculation unit that calculates an average of pixel values of the input image, and each unit region is calculated by the calculation unit. According to the average of the pixel values for the unit area, the classification means for classifying into any of a plurality of types, and the pixel value of each pixel in each unit area are set for the type including the pixel And filtering means for calculating using a filter coefficient group.
 上記のように構成された画像フィルタ装置によれば、各単位領域を、上記算出手段によって算出された該単位領域についての画素値の平均に応じて、複数のタイプの何れかに分類し、各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出する。したがって、上記の構成によれば、タイプ毎に設定されたフィルタ係数群を用いてフィルタ処理を行うことができるので、符号化効率が向上する。また、上記の構成によれば、各単位領域を、画素値の平均という算出処理量の小さい特性値に応じて分類するので、処理量を削減することができる。 According to the image filter device configured as described above, each unit area is classified into one of a plurality of types according to the average of the pixel values for the unit area calculated by the calculation unit, The pixel value of each pixel in the unit area is calculated using the filter coefficient group set for the type including the pixel. Therefore, according to the above configuration, the filter processing can be performed using the filter coefficient group set for each type, so that the encoding efficiency is improved. Further, according to the above configuration, each unit area is classified according to a characteristic value with a small calculation processing amount, ie, an average of pixel values, so that the processing amount can be reduced.
 また、上記の課題を解決するために、本発明に係るフィルタ装置は、フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、各単位領域の領域特性の値を算出する領域特性算出手段を備え、上記線形フィルタは、各単位領域に属する各画素を対象とするフィルタ演算を、上記領域特性に依存するオフセットであって、上記領域特性算出手段が算出した該単位領域の領域特性の値に応じたオフセットと、上記領域特性に依存しないフィルタ係数群とを利用して実行する、ことを特徴としている。 In order to solve the above-described problem, a filter device according to the present invention includes a region characteristic for calculating a region characteristic value of each unit region in a filter device including a linear filter in which filter coefficients are adaptively set. The linear filter includes an offset that depends on the region characteristic for performing a filter operation on each pixel belonging to each unit region, and the region characteristic of the unit region calculated by the region characteristic calculating unit This is performed by using an offset corresponding to the value of and a filter coefficient group that does not depend on the region characteristics.
 上記の構成によれば、一定のオフセットを利用してフィルタ演算を実行する従来の適応フィルタよりも高い符号化効率を達成することができる。 According to the above configuration, it is possible to achieve higher encoding efficiency than a conventional adaptive filter that performs a filter operation using a certain offset.
 また、上記の課題を解決するために、本発明に係るフィルタ装置は、フィルタ係数群が適応的に設定される線形フィルタを備えたフィルタ装置であって、上記線形フィルタの出力画像における対象画素の画素値と上記線形フィルタの入力画像における対象画素の画素値との差である変更量とトランケートするトランケート手段を備えている、ことを特徴としている。 In order to solve the above problem, a filter device according to the present invention includes a linear filter in which filter coefficient groups are adaptively set, and includes a target pixel in an output image of the linear filter. Truncation means is provided for truncating the change amount, which is the difference between the pixel value and the pixel value of the target pixel in the input image of the linear filter.
 上記の構成によれば、適応フィルタを復号画像に適用することで復号画像の原画像に対する誤差が却って大きくなるという事態を有効に回避することができる。これにより、従来よりも高い符号化効率を実現することができる。 According to the above configuration, it is possible to effectively avoid a situation in which the error of the decoded image with respect to the original image becomes larger by applying the adaptive filter to the decoded image. Thereby, encoding efficiency higher than before can be realized.
 また、上記の課題を解決するために、フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、第1の領域特性に依存する第1フィルタ係数群を、少なくとも1つ、対応する第1領域特性の値に関連付けて記録した第1フィルタ係数テーブル、及び、第2の領域特性に依存する第2フィルタ係数群を、少なくとも1つ、対応する第2領域特性の値に関連付けて記録した第2フィルタ係数テーブルを復号する復号手段と、各単位領域の第1領域特性及び第2領域特性の値を算出する領域特性算出手段とを備え、上記線形フィルタは、各単位領域に属する各画素を対象画素とするフィルタ演算であって、上記第1フィルタ係数テーブルに記録された第1フィルタ係数群のうち、上記領域特性算出手段が算出した該単位領域の第1領域特性の値に対応した第1フィルタ係数群、及び、上記第2フィルタ係数テーブルに記録された第2フィルタ係数群のうち、上記領域特性算出手段が算出した該単位領域の第2領域特性の値に対応した第2フィルタ係数群を利用したフィルタ演算を実行する、ことを特徴としている。 In order to solve the above problem, in a filter device including a linear filter in which filter coefficients are adaptively set, at least one first filter coefficient group depending on the first region characteristic is associated. The first filter coefficient table recorded in association with the value of the first area characteristic and the second filter coefficient group depending on the second area characteristic are recorded in association with the value of the corresponding second area characteristic. Decoding means for decoding the second filter coefficient table, and area characteristic calculation means for calculating the values of the first area characteristic and the second area characteristic of each unit area, and the linear filter includes each of the unit areas belonging to each unit area. A filter operation using a pixel as a target pixel, and the unit region calculated by the region characteristic calculation unit in the first filter coefficient group recorded in the first filter coefficient table; Among the first filter coefficient group corresponding to the value of the first area characteristic and the second filter coefficient group recorded in the second filter coefficient table, the second of the unit area calculated by the area characteristic calculating means. A filter operation using the second filter coefficient group corresponding to the value of the region characteristic is executed.
 上記の構成によれば、第1領域特性及び第2領域特性の双方に依存する複数のフィルタ係数群を、対応する領域特性対に関連付けて記録したフィルタ係数テーブルを復号することなく、各単位領域の第1領域特性及び第2領域特性の双方に応じたフィルタ演算を行うことができる。すなわち、上記の構成によれば、符号量の大幅な増大を招来することなく、原画像に近い復号画像を精度良く生成することができる。これにより従来より高い符号化効率を実現することができる。 According to the above configuration, each unit area can be obtained without decoding a filter coefficient table in which a plurality of filter coefficient groups depending on both the first area characteristic and the second area characteristic are recorded in association with the corresponding area characteristic pair. The filter operation according to both the first region characteristic and the second region characteristic can be performed. That is, according to the above configuration, a decoded image close to the original image can be generated with high accuracy without causing a significant increase in the code amount. As a result, higher encoding efficiency than conventional can be realized.
 上記フィルタ装置を備えた復号装置、及び、符号化装置も本発明の範疇に含まれる。 The decoding device and the encoding device provided with the filter device are also included in the scope of the present invention.
 以上のように、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について、上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域、または、上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている。 As described above, the image filter device according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas. A characteristic value calculation means for calculating the filter area, and a filter-on area that causes the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculation means, or the filter Classification means for classifying the filter into any one of the filter-off regions in which the means is not operated.
 上記画像フィルタ装置によれば、従来に比べて符号化効率が向上する。 According to the image filter device, the encoding efficiency is improved as compared with the conventional case.
本発明の第1の実施形態に係る動画像復号装置の備える適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter with which the moving image decoding apparatus which concerns on the 1st Embodiment of this invention is provided. 本発明の第1の実施形態に係る動画像符号化装置によって生成され、本発明の実施形態に係る動画像復号装置によって参照される符号化データのデータ構造を示す図である。(a)は、符号化データのピクチャレイヤの構成を示しており、(b)は、ピクチャレイヤに含まれるスライスレイヤの構成を示しており、(c)は、スライスレイヤに含まれるLCUレイヤを構成する各CUの構成を示しており、(d)は、CUレイヤに含まれるリーフCUの構成を示しており、(e)は、リーフCUについてのインター予測情報の構成を示しており、(f)は、リーフCUについてのイントラ予測情報の構成を示しており、(g)は、スライスヘッダに含まれるフィルタパラメータの構成を示している。It is a figure which shows the data structure of the encoding data which are produced | generated by the moving image encoder which concerns on the 1st Embodiment of this invention, and are referred by the moving image decoder which concerns on this Embodiment. (A) shows the configuration of the picture layer of the encoded data, (b) shows the configuration of the slice layer included in the picture layer, and (c) shows the LCU layer included in the slice layer. (D) shows the configuration of the leaf CU included in the CU layer, (e) shows the configuration of the inter prediction information for the leaf CU, ( f) shows the configuration of the intra prediction information for the leaf CU, and (g) shows the configuration of the filter parameter included in the slice header. 本発明の第1の実施形態に係る動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像復号装置の備える適応フィルタによるフィルタ処理を説明するための図である。(a)は、対象単位領域URに含まれる画素と対象単位領域URに隣接する画素とから構成される特性値算出参照領域CRRを示しており、(b)は、対象単位領域URに含まれる画素から構成される特性値算出参照領域CRRを示している。It is a figure for demonstrating the filter process by the adaptive filter with which the moving image decoding apparatus which concerns on the 1st Embodiment of this invention is provided. (A) shows a characteristic value calculation reference region CRR composed of pixels included in the target unit region UR and pixels adjacent to the target unit region UR, and (b) is included in the target unit region UR. A characteristic value calculation reference region CRR composed of pixels is shown. 発明者によって得られた実験データを示すグラフである。(a)は、複数のシーケンスについての、領域毎の活性度に対する二乗誤差削減量を示しており、(b)は、各活性度における二乗誤差削減量について、複数のシーケンスについての平均(「average」)と、各活性度を有する単位領域の総数(「count」)とを示している。It is a graph which shows the experimental data obtained by the inventor. (A) shows the square error reduction amount with respect to the activity for each region for a plurality of sequences, and (b) shows the average (“average” for the plurality of sequences for the square error reduction amount at each activity. )) And the total number of unit areas (“count”) having each degree of activity. 本発明の第1の実施形態に係る適応フィルタによる分類処理例を示す表である。It is a table | surface which shows the example of a classification process by the adaptive filter which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る適応フィルタによって設定される単位領域を示す図であって、(a)は、対象符号化単位に含まれる単位領域の位置およびサイズが、CU分割フラグによって階層的に指定される場合を示す図であり、(b)は、対象単位領域に含まれる単位領域が、予め定められたサイズを有する場合を示す図である。FIG. 6A is a diagram illustrating unit areas set by the adaptive filter according to the first embodiment of the present invention, and FIG. 6A shows the position and size of a unit area included in a target coding unit according to a CU partition flag. (B) is a diagram showing a case where a unit area included in the target unit area has a predetermined size. 本発明の第1の実施形態に係る適応フィルタによるフィルタ処理を説明するための図であって、(a)は、対象単位領域URと、対象単位領域URにおけるフィルタ対象画素の画素値を算出するために参照される画素の集合であるフィルタ参照領域Rと、各フィルタ対象画素についてのフィルタ参照領域Rの和集合として定義されるフィルタ参照範囲RAとを示す図であり、(b)は、フィルタ参照領域Rに含まれる各画素に割り付けられたフィルタ係数を示す図である。It is a figure for demonstrating the filter process by the adaptive filter which concerns on the 1st Embodiment of this invention, Comprising: (a) calculates the pixel value of the filter object pixel in the object unit area | region UR and the object unit area | region UR. FIG. 8 is a diagram illustrating a filter reference region R that is a set of pixels referred to for the purpose and a filter reference range RA that is defined as a union of the filter reference regions R for each filter target pixel. FIG. 4 is a diagram showing filter coefficients assigned to each pixel included in a reference region R. 本発明の第1の実施形態の第1の変形例に係る適応フィルタによる分類処理例を示す表である。It is a table | surface which shows the example of a classification process by the adaptive filter which concerns on the 1st modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第2の変形例に係る適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter which concerns on the 2nd modification of the 1st Embodiment of this invention. 発明者によって得られた実験データを示すグラフである。(a)は、複数のシーケンスについての、領域毎の平均画素値に対する二乗誤差削減量を示しており、(b)は、各平均画素値における二乗誤差削減量について、複数のシーケンスについての平均(「average」)と、各平均画素値を有する単位領域の総数(「count」)とを示している。It is a graph which shows the experimental data obtained by the inventor. (A) shows a square error reduction amount with respect to an average pixel value for each region for a plurality of sequences, and (b) shows an average (for a plurality of sequences) for a square error reduction amount at each average pixel value. “Average”) and the total number of unit areas (“count”) having each average pixel value. 本発明の第1の実施形態の第2の変形例に係る適応フィルタによる分類処理例を示す表である。It is a table | surface which shows the example of a classification process by the adaptive filter which concerns on the 2nd modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第3の変形例に係る適応フィルタによる分類処理例を示す表である。It is a table | surface which shows the example of a classification process by the adaptive filter which concerns on the 3rd modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第4の変形例に係る適応フィルタが参照するフィルタパラメータに含まれるシンタックスの一部を示す図である。It is a figure which shows a part of syntax contained in the filter parameter which the adaptive filter which concerns on the 4th modification of the 1st Embodiment of this invention refers. 本発明の第1の実施形態の第4の変形例に係る適応フィルタによるフィルタ処理を説明するための図である。(a)~(d)は、それぞれ、シンタックスalf_cu_control_max_depthの値が0~3である場合に、最大符号化単位においてオンオフ制御の対象となる各符号化単位を、階層構造を表す分岐図と共に示している。It is a figure for demonstrating the filter process by the adaptive filter which concerns on the 4th modification of the 1st Embodiment of this invention. (A) to (d) show each coding unit to be subjected to on / off control in the maximum coding unit when the value of the syntax alf_cu_control_max_depth is 0 to 3, together with a branch diagram representing a hierarchical structure. ing. 本発明の第1の実施形態の第4の変形例に係る適応フィルタによる分類処理を説明するための図である。(a)は、当該適応フィルタによる分類処理例を示しており、(b)は、最大符号化単位対象符号化単位に含まれる単位領域の位置およびサイズが、CU分割フラグによって階層的に指定される場合を示しており、(c)は、対象単位領域に含まれる単位領域が、予め定められたサイズを有する場合を示している。It is a figure for demonstrating the classification process by the adaptive filter which concerns on the 4th modification of the 1st Embodiment of this invention. (A) shows an example of classification processing by the adaptive filter, and (b) shows the position and size of the unit area included in the maximum coding unit target coding unit hierarchically specified by the CU partitioning flag. (C) shows a case where the unit area included in the target unit area has a predetermined size. 本発明の第1の実施形態の第5の変形例に係る適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter which concerns on the 5th modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第5の変形例に係る適応フィルタによる分類処理例を示す表である。It is a table | surface which shows the example of a classification process by the adaptive filter which concerns on the 5th modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第6の変形例に係る適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter which concerns on the 6th modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第6の変形例に係る適応フィルタによる分類処理例を示す表である。It is a table | surface which shows the classification processing example by the adaptive filter which concerns on the 6th modification of the 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置の備える適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter with which the moving image encoder which concerns on the 1st Embodiment of this invention is provided. 本発明の第1の実施形態の第2の変形例に係る適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter which concerns on the 2nd modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第5の変形例に係る適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter which concerns on the 5th modification of the 1st Embodiment of this invention. 本発明の第1の実施形態の第6の変形例に係る適応フィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive filter which concerns on the 6th modification of the 1st Embodiment of this invention. 本発明の第2の実施形態に係る適応フィルタの第1の構成例を示すブロック図である。It is a block diagram which shows the 1st structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention. 図26の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。FIG. 27 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of FIG. 26 is mounted on a decoding device. 本発明の第2の実施形態に係る適応フィルタの第2の構成例を示すブロック図である。It is a block diagram which shows the 2nd structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention. 図28の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。It is a block diagram which shows the structural example of the adaptive filter suitable for mounting in an encoding apparatus, when mounting the adaptive filter of FIG. 28 in a decoding apparatus. 本発明の第2の実施形態に係る適応フィルタの第3の構成例を示すブロック図である。It is a block diagram which shows the 3rd structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention. 図30の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。[Fig. 31] Fig. 31 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of Fig. 30 is mounted on a decoding device. 本発明の第2の実施形態に係る適応フィルタの第4の構成例を示すブロック図である。It is a block diagram which shows the 4th structural example of the adaptive filter which concerns on the 2nd Embodiment of this invention. 図29の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。[Fig. 30] Fig. 30 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of Fig. 29 is mounted on a decoding device. 本発明の第3の実施形態に係る適応フィルタの第1の構成例を示すブロック図である。It is a block diagram which shows the 1st structural example of the adaptive filter which concerns on the 3rd Embodiment of this invention. 図34の適応フィルタが備える第1空間フィルタの参照領域を示す図である。It is a figure which shows the reference area of the 1st spatial filter with which the adaptive filter of FIG. 34 is provided. 図34の適応フィルタが備える第2空間フィルタの参照領域を示す図である。It is a figure which shows the reference area of the 2nd spatial filter with which the adaptive filter of FIG. 34 is provided. 図34の適応フィルタが備える第1空間フィルタの別の参照領域を示す図である。It is a figure which shows another reference area | region of the 1st spatial filter with which the adaptive filter of FIG. 34 is provided. 図34の適応フィルタが備える第2空間フィルタの別の参照領域を示す図である。It is a figure which shows another reference area | region of the 2nd spatial filter with which the adaptive filter of FIG. 34 is provided. 図34及び図42の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。FIG. 43 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of FIGS. 34 and 42 is mounted on a decoding device. 本発明の第3の実施形態に係る適応フィルタの第2の構成例を示すブロック図である。It is a block diagram which shows the 2nd structural example of the adaptive filter which concerns on the 3rd Embodiment of this invention. 図40の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。[Fig. 41] Fig. 41 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of Fig. 40 is mounted on a decoding device. 本発明の第3の実施形態に係る適応フィルタの第3の構成例を示すブロック図である。It is a block diagram which shows the 3rd structural example of the adaptive filter which concerns on the 3rd Embodiment of this invention. 図42の適応フィルタが備える拡大線形フィルタの参照領域を示す図である。FIG. 43 is a diagram illustrating a reference region of an enlarged linear filter included in the adaptive filter of FIG. 42. 図42の適応フィルタが備える拡大線形フィルタの別の参照領域を示す図である。FIG. 43 is a diagram illustrating another reference region of the enlarged linear filter included in the adaptive filter of FIG. 42. 本発明の第4の実施形態に係る適応フィルタの構成例を示すブロック図である。It is a block diagram which shows the structural example of the adaptive filter which concerns on the 4th Embodiment of this invention. 図45の適応フィルタを復号装置に搭載する場合に、符号化装置への搭載に好適な適応フィルタの構成例を示すブロック図である。FIG. 46 is a block diagram illustrating a configuration example of an adaptive filter suitable for mounting on an encoding device when the adaptive filter of FIG. 45 is mounted on a decoding device. 図49に示す動画像符号化装置によって生成され、図48に示す動画像復号装置によって復号される符号化データのデータ構造を示す図である。It is a figure which shows the data structure of the coding data produced | generated by the moving image encoder shown in FIG. 49, and decoded by the moving image decoder shown in FIG. 各実施形態に係る適応フィルタの搭載に適した動画像復号装置に構成を示したブロック図である。It is the block diagram which showed the structure for the moving image decoding apparatus suitable for mounting of the adaptive filter which concerns on each embodiment. 各実施形態に係る適応フィルタの搭載に適した動画像符号化装置の構成を示したブロック図である。It is the block diagram which showed the structure of the moving image encoder suitable for mounting of the adaptive filter which concerns on each embodiment. 図47に示す符号化データの変形例を示す図である。It is a figure which shows the modification of the coding data shown in FIG. 上記動画像符号化装置を搭載した送信装置、および、上記動画像復号装置を搭載した受信装置の構成について示した図である。(a)は、動画像符号化装置を搭載した送信装置を示しており、(b)は、動画像復号装置を搭載した受信装置を示している。It is the figure shown about the structure of the transmitter which mounts the said moving image encoder, and the receiver which mounts the said moving image decoder. (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. 上記動画像符号化装置を搭載した記録装置、および、上記動画像復号装置を搭載した再生装置の構成について示した図である。(a)は、動画像符号化装置を搭載した記録装置を示しており、(b)は、動画像復号装置を搭載した再生装置を示している。It is the figure shown about the structure of the recording device which mounts the said moving image encoder, and the reproducing | regenerating apparatus which mounts the said moving image decoder. (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.
<<実施形態1>>
 本発明に係る復号装置および符号化装置の第1の実施形態について図面に基づいて説明すれば以下のとおりである。なお、本実施形態に係る復号装置は、符号化データから動画像を復号するものである。したがって、以下では、これを「動画像復号装置」と呼称する。また、本実施形態に係る符号化装置は、動画像を符号化することによって符号化データを生成するものである。したがって、以下では、これを「動画像符号化装置」と呼ぶ。
<< Embodiment 1 >>
A first embodiment of a decoding device and an encoding device according to the present invention will be described below with reference to the drawings. Note that the decoding apparatus according to the present embodiment decodes a moving image from encoded data. Therefore, hereinafter, this is referred to as “moving image decoding apparatus”. In addition, the encoding device according to the present embodiment generates encoded data by encoding a moving image. Therefore, in the following, this is referred to as a “video encoding device”.
 ただし、本発明の適用範囲はこれに限定されるものではない。すなわち、以下の説明からも明らかなように、本発明の特徴は複数のフレームを前提としなくとも成立するものである。すなわち、動画像を対象とするか静止画像を対象とするかを問わず、復号装置一般および符号化装置一般に適用できるものである。 However, the scope of application of the present invention is not limited to this. That is, as will be apparent from the following description, the features of the present invention can be realized without assuming a plurality of frames. That is, the present invention can be applied to a general decoding apparatus and a general encoding apparatus regardless of whether the target is a moving image or a still image.
 (符号化データ#1の構成)
 本実施形態に係る動画像復号装置1の説明に先立ち、本実施形態に係る動画像符号化装置2によって生成され、動画像復号装置1によって復号される符号化データ#1の構成について、図2を参照して説明する。符号化データ#1は、シーケンスレイヤ、GOP(Group Of Pictures)レイヤ、ピクチャレイヤ、スライスレイヤ、及び、最大符号化単位(LCU:Largest Coding Unit)レイヤからなる階層構造を有している。
(Configuration of encoded data # 1)
Prior to the description of the moving picture decoding apparatus 1 according to the present embodiment, the configuration of the encoded data # 1 generated by the moving picture encoding apparatus 2 according to the present embodiment and decoded by the moving picture decoding apparatus 1 will be described with reference to FIG. Will be described with reference to FIG. The encoded data # 1 has a hierarchical structure including a sequence layer, a GOP (Group Of Pictures) layer, a picture layer, a slice layer, and a maximum coding unit (LCU: Large Coding Unit) layer.
 符号化データ#1におけるピクチャレイヤ以下の階層の構造を図2に示す。図2(a)~(f)は、それぞれ、ピクチャレイヤP、スライスレイヤS、LCUレイヤLCU、LCUに含まれるリーフCU(図2(d)ではCULと表記)、インター予測(画面間予測)パーティションについての予測情報PIであるインター予測情報PI_Inter、イントラ予測(画面内予測)パーティションについての予測情報PIであるイントラ予測情報PI_Intraの構造を示す図である。 FIG. 2 shows the hierarchical structure below the picture layer in the encoded data # 1. FIGS. 2A to 2F are a picture layer P, a slice layer S, an LCU layer LCU, a leaf CU included in the LCU (denoted as CUL in FIG. 2D), and inter prediction (inter-screen prediction), respectively. It is a figure which shows the structure of inter prediction information PI_Inter which is the prediction information PI about a partition, and intra prediction information PI_Intra which is the prediction information PI about an intra prediction (prediction in a screen) partition.
 (ピクチャレイヤ)
 ピクチャレイヤPは、処理対象のピクチャである対象ピクチャを復号するために動画像復号装置1が参照するデータの集合である。ピクチャレイヤPは、図2(a)に示すように、ピクチャヘッダPH、及び、スライスレイヤS1~SNsを含んでいる(NsはピクチャレイヤPに含まれるスライスレイヤの総数)。
(Picture layer)
The picture layer P is a set of data that is referenced by the video decoding device 1 in order to decode a target picture that is a processing target picture. As shown in FIG. 2A, the picture layer P includes a picture header PH and slice layers S1 to SNs (Ns is the total number of slice layers included in the picture layer P).
 ピクチャヘッダPHには、対象ピクチャの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれている。例えば、動画像符号化装置2が符号化の際に用いた可変長符号化のモードを示す符号化モード情報(entropy_coding_mode_flag)は、ピクチャヘッダPHに含まれる符号化パラメータの一例である。 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. For example, 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.
 (スライスレイヤ)
 ピクチャレイヤPに含まれる各スライスレイヤSは、処理対象のスライスである対象スライスを復号するために動画像復号装置1が参照するデータの集合である。スライスレイヤSは、図2(b)に示すように、スライスヘッダSH、及び、LCUレイヤLCU1~LCUNc(NcはスライスSに含まれるLCUの総数)を含んでいる。
(Slice layer)
Each slice layer S included in the picture layer P is a set of data referred to by the video decoding device 1 in order to decode a target slice that is a slice to be processed. As shown in FIG. 2B, the slice layer S includes a slice header SH and LCU layers LCU1 to LCUn (Nc is the total number of LCUs included in the slice S).
 スライスヘッダSHには、対象スライスの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。 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.
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、又は、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、又は、イントラ予測を用いるBスライスなどが挙げられる。 As slice types that can be specified by the slice type specification information, (1) 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.
 また、スライスヘッダSHには、動画像復号装置1の備える適応フィルタによって参照されるフィルタパラメータFPが含まれる。なお、フィルタパラメータFPの構成については、後述するためここでは説明を省略する。 Also, the slice header SH includes a filter parameter FP that is referred to by an adaptive filter included in the video decoding device 1. The configuration of the filter parameter FP will be described later and will not be described here.
 (LCUレイヤ)
 スライスレイヤSに含まれる各LCUレイヤLCUは、処理対象のLCUである対象LCUを復号するために動画像復号装置1が参照するデータの集合である。
(LCU layer)
Each LCU layer LCU included in the slice layer S is a set of data that the video decoding device 1 refers to in order to decode the target LCU that is the processing target LCU.
 LCUレイヤLCUは、当該LCUを階層的に4分木分割することにより得られる複数の符号化単位(CU:Coding Unit)より構成される。換言すれば、LCUレイヤLCUは、複数のCUを再帰的に含む階層構造のうち、最上位にあたる符号化単位である。LCUレイヤLCUに含まれる各CUは、図2(c)に示すように、CUヘッダCUH、および、当該CUを4分木分割することにより得られる複数のCUを再帰的に含む階層構造を有している。 The LCU layer LCU is composed of a plurality of coding units (CU: Coding Units) obtained by hierarchically dividing the LCU into a quadtree. In other words, the LCU layer LCU is a coding unit corresponding to the highest level in a hierarchical structure that recursively includes a plurality of CUs. As shown in FIG. 2C, each CU included in the LCU layer LCU has a hierarchical structure that recursively includes a CU header CUH and a plurality of CUs obtained by dividing the CU into quadtrees. is doing.
 LCUを除く各CUのサイズは、当該CUが直接に属するCU(すなわち、当該CUの1階層上位のCU)のサイズの縦横とも半分であり、各CUのとり得るサイズは、符号化データ#1のシーケンスパラメータセットSPSに含まれる、LCUのサイズおよび階層深度(hierarchical depth)に依存する。例えば、LCUのサイズが128×128画素であって、最大階層深度が5である場合には、当該LCU以下の階層におけるCUは、5種類のサイズ、すなわち、128×128画素、64×64画素、32×32画素、16×16画素、および、8×8画素の何れかをとり得る。また、それ以上分割されないCUをリーフCUと呼ぶことにする。 The size of each CU excluding the LCU is half the size of the CU to which the CU directly belongs (that is, the CU one layer higher than the CU), and the size that each CU can take is encoded data # 1. Dependent on the size and hierarchical depth of the LCU included in the sequence parameter set SPS. For example, when the size of the LCU is 128 × 128 pixels and the maximum hierarchical depth is 5, the CUs in the hierarchical level below the LCU have five sizes, that is, 128 × 128 pixels and 64 × 64 pixels. , 32 × 32 pixels, 16 × 16 pixels, and 8 × 8 pixels. A CU that is not further divided is called a leaf CU.
 (CUヘッダ)
 CUヘッダCUHには、対象CUの復号方法を決定するために動画像復号装置1が参照する符号化パラメータが含まれる。具体的には、図2(c)に示すように、対象CUをさらに下位のCUへ4分割するか否かを指定するCU分割フラグSP_CUが含まれる。CU分割フラグSP_CUが0である場合、すなわち、それ以上CUが分割されない場合、当該CUはリーフCUである。
(CU header)
The CU header CUH includes a coding parameter referred to by the video decoding device 1 in order to determine a decoding method of the target CU. Specifically, as shown in FIG. 2C, a CU division flag SP_CU that specifies whether or not the target CU is further divided into four subordinate CUs is included. When the CU division flag SP_CU is 0, that is, when the CU is not further divided, the CU is a leaf CU.
 (リーフCU)
 それ以上分割されないCU(CUのリーフ)は予測単位(PU:Prediction Unit)、および、変換単位(TU:Transform Unit)として取り扱われる。
(Leaf CU)
A CU (CU leaf) that is not further divided is handled as a prediction unit (PU: Prediction Unit) and a transform unit (TU: Transform Unit).
 図2(d)に示すように、リーフCU(図2(d)においてはCULと表記)は、(1)動画像復号装置1により予測画像を生成する際に参照されるPU情報PUI、および、(2)動画像復号装置1により残差データを復号する際に参照されるTU情報TUIを含んでいる。 As shown in FIG. 2 (d), the leaf CU (denoted as CUL in FIG. 2 (d)) includes (1) PU information PUI that is referred to when the moving image decoding apparatus 1 generates a predicted image, and (2) The TU information TUI that is referred to when the residual data is decoded by the moving picture decoding apparatus 1 is included.
 スキップフラグSKIPは、対象のPUについて、スキップモードが適用されているか否かを示すフラグであり、スキップフラグSKIPの値が1の場合、すなわち、対象のリーフにスキップモードが適用されている場合、そのリーフCUにおけるPU情報PUI、および、TU情報TUIは省略される。なお、スキップフラグSKIPは、Iスライスでは省略される。 The skip flag SKIP is a flag indicating whether or not the skip mode is applied to the target PU. When the value of the skip flag SKIP is 1, that is, when the skip mode is applied to the target leaf, PU information PUI and TU information TUI in the leaf CU are omitted. Note that the skip flag SKIP is omitted for the I slice.
 PU情報PUIは、図2(d)に示すように、スキップフラグSKIP、予測タイプ情報PT、および、予測情報PIを含んでいる。予測タイプ情報PTは、対象リーフCU(対象PU)についての予測画像生成方法として、イントラ予測を用いるのか、または、インター予測を用いるのかを指定する情報である。予測情報PIは、予測タイプ情報PTが何れの予測方法を指定するのかに応じて、イントラ予測情報PI_Intra、または、インター予測情報PI_Interより構成される。以下では、イントラ予測が適用されるPUをイントラPUとも呼称し、インター予測が適用されるPUをインターPUとも呼称する。 The PU information PUI includes a skip flag SKIP, prediction type information PT, and prediction information PI as shown in FIG. The prediction type information PT is information that specifies whether intra prediction or inter prediction is used as a predicted image generation method for the target leaf CU (target PU). The prediction information PI includes intra prediction information PI_Intra or inter prediction information PI_Inter depending on which prediction method is specified by the prediction type information PT. Hereinafter, a PU to which intra prediction is applied is also referred to as an intra PU, and a PU to which inter prediction is applied is also referred to as an inter PU.
 PU情報PUIには、対象PUに含まれる各パーティションの形状、サイズ、および、対象PU内での位置を指定する情報が含まれる。ここで、パーティションとは、対象リーフCUを構成する1又は複数の重複しない領域のことであり、予測画像の生成は、パーティションを単位として行われる。 The PU information PUI includes information specifying the shape and size of each partition included in the target PU and the position in the target PU. Here, the partition is one or a plurality of non-overlapping areas constituting the target leaf CU, and the generation of the predicted image is performed in units of partitions.
 TU情報TUIは、図2(d)に示すように、量子化ステップの大きさを指定する量子化パラメータ差分Δqp(tu_qp_delta)、対象リーフCU(対象TU)の各ブロックへの分割パターンを指定するTU分割情報SP_TU、および、量子化予測残差QD1~QDNT(NTは、対象TUに含まれるブロックの総数)を含んでいる。 As shown in FIG. 2D, the TU information TUI specifies a quantization parameter difference Δqp (tu_qp_delta) that specifies the magnitude of the quantization step, and a division pattern for each block of the target leaf CU (target TU). TU partition information SP_TU and quantized prediction residuals QD1 to QDNT (NT is the total number of blocks included in the target TU) are included.
 量子化パラメータ差分Δqpは、対象TUにおける量子化パラメータqpと、そのTUの直前に符号化されたTUにおける量子化パラメータqp’との差分qp-qp’である。 The quantization parameter difference Δqp is a difference qp−qp ′ between the quantization parameter qp in the target TU and the quantization parameter qp ′ in the TU encoded immediately before the TU.
 TU分割情報SP_TUは、具体的には、対象TUに含まれる各ブロックの形状、サイズ、および、対象TU内での位置を指定する情報である。各TUは、例えば、64×64画素から2×2画素までのサイズをとり得る。ここで、ブロックとは、対象リーフCUを構成する1又は複数の重複しない領域のことであり、予測残差の符号化・復号は、ブロックを単位として行われる。 TU partition information SP_TU is information that specifies the shape and size of each block included in the target TU and the position in the target TU. Each TU can be, for example, a size from 64 × 64 pixels to 2 × 2 pixels. Here, the block is one or a plurality of non-overlapping areas constituting the target leaf CU, and encoding / decoding of the prediction residual is performed in units of blocks.
 各量子化予測残差QDは、動画像符号化装置2が以下の処理1~3を、処理対象のブロックである対象ブロックに施すことによって生成した符号化データである。処理1:符号化対象画像から予測画像を減算した予測残差をDCT変換(Discrete Cosine Transform)する。処理2:処理1にて得られたDCT係数を量子化する。処理3:処理2にて量子化されたDCT係数を可変長符号化する。上述した量子化パラメータqpは、動画像符号化装置2がDCT係数を量子化する際に用いた量子化ステップQPの大きさを表す(QP=2qp/6)。 Each quantized 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) is performed on the prediction residual obtained by subtracting the prediction image from the encoding target image. Process 2: The DCT coefficient obtained in Process 1 is quantized. Process 3: The DCT coefficient quantized in Process 2 is variable length encoded. The quantization parameter qp described above represents the magnitude of the quantization step QP used when the moving picture coding apparatus 2 quantizes the DCT coefficient (QP = 2 qp / 6 ).
 (インター予測情報PI_Inter)
 インター予測情報PI_Interは、動画像復号装置1が、インター予測によってインター予測画像を生成する際に参照される符号化パラメータが含まれる。図2(e)に示すように、インター予測情報PI_Interは、対象PUの各パーティションへの分割パターンを指定するインターPU分割情報SP_Inter、および、各パーティションについてのインター予測パラメータPP_Inter1~PP_InterNe(Neは、対象PUに含まれるインター予測パーティションの総数)を含んでいる。
(Inter prediction information PI_Inter)
The inter prediction information PI_Inter includes a coding parameter that is referred to when the video decoding device 1 generates an inter prediction image by inter prediction. As shown in FIG. 2 (e), the inter prediction information PI_Inter includes inter PU partition information SP_Inter that specifies a partition pattern for each partition of the target PU, and inter prediction parameters PP_Inter1 to PP_InterNe (Ne for each partition). The total number of inter prediction partitions included in the target PU).
 インターPU分割情報SP_Interは、具体的には、対象PU(インターPU)に含まれる各インター予測パーティションの形状、サイズ、および、対象PU内での位置を指定する情報である。 Specifically, the inter-PU partition information SP_Inter is information for designating the shape and size of each inter prediction partition included in the target PU (inter PU) and the position in the target PU.
 インターPUは、2N×2N画素、2N×N画素、N×2N画素、およびN×N画素の4つの対称的分割(symmetric splittings)、並びに、2N×nU画素、2N×nD画素、nL×2N画素、およびnR×2N画素の4つの非対称的分割(asymmetric splittings)により、合計8種類のパーティションに分割することが可能である。ここで、Nの具体的な値は、当該PUが属するCUのサイズによって規定され、nU、nD、nL、および、nRの具体的な値は、Nの値に応じて定められる。例えば、128×128画素のインターPUは、128×128画素、128×64画素、64×128画素、64×64画素、128×32画素、128×96画素、32×128画素、および、96×128画素のインター予測パーティションへ分割することが可能である。 The inter PU is composed of four symmetric splittings of 2N × 2N pixels, 2N × N pixels, N × 2N pixels, and N × N pixels, and 2N × nU pixels, 2N × nD pixels, and nL × 2N. It is possible to divide into 8 types of partitions in total by four asymmetric splits of pixels and nR × 2N pixels. Here, the specific value of N is defined by the size of the CU to which the PU belongs, and the specific values of nU, nD, nL, and nR are determined according to the value of N. For example, an inter PU of 128 × 128 pixels is 128 × 128 pixels, 128 × 64 pixels, 64 × 128 pixels, 64 × 64 pixels, 128 × 32 pixels, 128 × 96 pixels, 32 × 128 pixels, and 96 × It is possible to divide into 128-pixel inter prediction partitions.
 (インター予測パラメータPP_Inter)
 インター予測パラメータPP_Interは、図2(e)に示すように、参照画像インデックスRIと、推定動きベクトルインデックスPMVIと、動きベクトル残差MVDとを含んでいる。
(Inter prediction parameter PP_Inter)
As illustrated in FIG. 2E, the inter prediction parameter PP_Inter includes a reference image index RI, an estimated motion vector index PMVI, and a motion vector residual MVD.
 動きベクトル残差MVDは、動画像符号化装置2が以下の処理4~6を実行することによって生成した符号化データである。処理4:符号化/復号化済みの局所復号画像(より正確には、符号化/復号化済みの局所復号画像に対してデブロック処理および適応的フィルタ処理を施すことによって得られる画像)を選択し、選択した符号化/復号化済みの局所復号画像(以下「参照画像」とも呼称)を参照して対象パーティションに対する動きベクトルmvを導出する。処理5:推定方法を選択し、選択した推定方法を用いて対象パーティションに割り付ける動きベクトルmvの推定値(以下「推定動きベクトル」とも呼称)pmvを導出する。処理6:処理4にて導出した動きベクトルmvから処理5にて導出した推定動きベクトルpmvを減算した動きベクトル残差MVDを符号化する。 The motion vector residual MVD is encoded data generated by the moving image encoding device 2 executing the following processes 4 to 6. Process 4: Select an encoded / decoded locally decoded image (more precisely, an image obtained by performing deblocking processing and adaptive filtering on the encoded / decoded local decoded image) The motion vector mv for the target partition is derived with reference to the selected encoded / decoded local decoded image (hereinafter also referred to as “reference image”). Process 5: An estimation method is selected, and an estimated value (hereinafter also referred to as “estimated motion vector”) pmv of the motion vector mv assigned to the target partition is derived using the selected estimation method. Process 6: The motion vector residual MVD obtained by subtracting the estimated motion vector pmv derived in Process 5 from the motion vector mv derived in Process 4 is encoded.
 参照画像インデックスRIは、処理4にて選択した符号化/復号化済みの局所復号画像(参照画像)を指定するものであり、上述した推定動きベクトルインデックスPMVIは、処理5にて選択した推定方法を指定するものである。処理5にて選択可能な推定方法としては、(1)符号化/復号化中の局所復号画像(より正確には、符号化/復号化中の局所復号画像における復号済みの領域に対してデブロック処理および適応的フィルタ処理を施すことによって得られる画像)において、対象パーティションに隣接するパーティション(以下「隣接パーティション」とも呼称する)に割り付けられた動きベクトルのメジアンを推定動きベクトルpmvとする方法や、(2)符号化/復号化済みの局所復号画像において、対象パーティションと同じ位置を占めるパーティション(しばしば「コロケートパーティション」と呼称される)に割り付けられた動きベクトルを推定動きベクトルpmvとする方法などが挙げられる。 The reference image index RI designates the locally decoded image (reference image) that has been encoded / decoded selected in the process 4. The estimated motion vector index PMVI described above is the estimation method selected in the process 5. Is specified. The estimation methods that can be selected in the processing 5 include: (1) a locally decoded image being encoded / decoded (more precisely, a region that has already been decoded in a locally decoded image being encoded / decoded). In an image obtained by performing block processing and adaptive filter processing), a median of a motion vector allocated to a partition adjacent to the target partition (hereinafter also referred to as “adjacent partition”) is used as an estimated motion vector pmv. (2) In a locally decoded image that has been encoded / decoded, a motion vector assigned to a partition (often referred to as a “collocated partition”) occupying the same position as the target partition is used as an estimated motion vector pmv, etc. Is mentioned.
 なお、単方向予測を行うパーティションに関する予測パラメータPPには、図2(e)に示すように、参照画像インデックスRI、推定動きベクトルインデックスPMVI、及び、動きベクトル残差MVDがそれぞれ1つずつ含まれているが、双方向予測(重み付き予測)を行うパーティションに関する予測パラメータPPには、2つの参照画像インデックスRI1及びRI2、2つの推定動きベクトルインデックスPMVI1及びPMVI2、並びに、2つの動きベクトル残差MVD1及びMVD2が含まれる。 Note that, as shown in FIG. 2E, the prediction parameter PP related to the partition for which unidirectional prediction is performed includes one reference image index RI, one estimated motion vector index PMVI, and one motion vector residual MVD. However, the prediction parameters PP for a partition that performs bi-directional prediction (weighted prediction) include two reference image indexes RI1 and RI2, two estimated motion vector indexes PMVI1 and PMVI2, and two motion vector residuals MVD1. And MVD2.
 (イントラ予測情報PI_Intra)
 イントラ予測情報PI_Intraは、動画像復号装置1が、イントラ予測によってイントラ予測画像を生成する際に参照される符号化パラメータが含まれる。図2(f)に示すように、イントラ予測情報PI_Intraは、対象PU(イントラPU)の各パーティションへの分割パターンを指定するイントラPU分割情報SP_Intra、および、各パーティションについてのイントラ予測パラメータPP_Intra1~PP_IntraNa(Naは、対象PUに含まれるイントラ予測パーティションの総数)を含んでいる。
(Intra prediction information PI_Intra)
The intra prediction information PI_Intra includes an encoding parameter that is referred to when the video decoding device 1 generates an intra predicted image by intra prediction. As shown in FIG. 2 (f), the intra prediction information PI_Intra includes intra PU partition information SP_Intra that specifies a partition pattern of the target PU (intra PU) into each partition, and intra prediction parameters PP_Intra1 to PP_IntraNa for each partition. (Na is the total number of intra prediction partitions included in the target PU).
 イントラPU分割情報SP_Intraは、具体的には、対象PUに含まれる各イントラ予測パーティションの形状、サイズ、および、対象PU内での位置を指定する情報である。イントラPU分割情報SP_Intraには、対象PUをパーティションに分割するか否かを指定するイントラ分割フラグ(intra_split_flag)が含まれている。イントラ分割フラグが1であれば、対象PUは、4つのパーティションへと対称的に分割され、イントラ分割フラグが0であれば、対象PUは、分割されることなく、対象PU自身が1つのパーティションとして取り扱われる。したがって、対象PUのサイズを2N×2N画素とすると、イントラ予測パーティションは、2N×2N画素(分割なし)、および、N×N画素(4分割)の何れかのサイズを取り得る(ここで、N=2n、nは1以上の任意の整数)。例えば、128×128画素のイントラPUは、128×128画素、および、64×64画素のイントラ予測パーティションへ分割することが可能である。 Specifically, the intra-PU partition information SP_Intra is information that specifies the shape and size of each intra-predicted partition included in the target PU, and the position in the target PU. The intra PU split information SP_Intra includes an intra split flag (intra_split_flag) that specifies whether or not the target PU is split into partitions. If the intra partition flag is 1, the target PU is divided symmetrically into four partitions. If the intra partition flag is 0, the target PU is not divided and the target PU itself is one partition. Are treated as Therefore, if the size of the target PU is 2N × 2N pixels, the intra prediction partition can take any of 2N × 2N pixels (no division) and N × N pixels (four divisions) (where, N = 2 n , n is an arbitrary integer of 1 or more). For example, a 128 × 128 pixel intra PU can be divided into 128 × 128 pixel and 64 × 64 pixel intra prediction partitions.
 (イントラ予測パラメータPP_Intra)
 イントラ予測パラメータPP_Intraは、図2(f)に示すように、推定フラグMPM、および、残余予測モードインデックスRIPMを含んでいる。イントラ予測パラメータPP_Intraは、各パーティションについてのイントラ予測方法(予測モード)を指定するためのパラメータである。
(Intra prediction parameter PP_Intra)
As shown in FIG. 2F, the intra prediction parameter PP_Intra includes an estimation flag MPM and a residual prediction mode index RIPM. The intra prediction parameter PP_Intra is a parameter for designating an intra prediction method (prediction mode) for each partition.
 推定フラグMPMは、処理対象である対象パーティションの周辺のパーティションに割り付けられた予測モードに基づいて推定された予測モードと当該対象パーティションについての予測モードとが同じであるか否かを示すフラグである。ここで、対象パーティションの周辺のパーティションの例としては、対象パーティションの上辺に隣接するパーティション、および、対象パーティションの左辺に隣接するパーティション等が挙げられる。 The estimation flag MPM is a flag indicating whether or not the prediction mode estimated based on the prediction mode allocated to the peripheral partition of the target partition that is the processing target is the same as the prediction mode for the target partition. . Here, examples of partitions around the target partition include a partition adjacent to the upper side of the target partition and a partition adjacent to the left side of the target partition.
 残余予測モードインデックスRIPMは、推定された予測モードと対象パーティションについての予測モードとが異なる場合に、イントラ予測パラメータPP_Intraに含められるインデックスであり、当該対象パーティションに割り付けられる予測モードを指定するためのインデックスである。 The residual prediction mode index RIPM is an index included in the intra prediction parameter PP_Intra when the estimated prediction mode and the prediction mode for the target partition are different, and is an index for designating a prediction mode assigned to the target partition. It is.
 (フィルタパラメータFP)
 上述のように、スライスヘッダSHには、動画像復号装置1の備える適応フィルタが参照するフィルタパラメータFPが含まれる。ここで、動画像復号装置1の備える適応フィルタは、後述するように、対象スライスまたは対象LCUに含まれる1若しくは複数の単位領域の各々を複数のタイプの何れかに分類し、該単位領域についての適応フィルタ処理のオンオフを、該単位領域が属するタイプに応じて切り替える。また、適応フィルタ処理がオンに設定された単位領域に対して、該単位領域が属するタイプに応じて選択されたフィルタ係数群を用いて適応フィルタ処理を行う。
(Filter parameter FP)
As described above, the slice header SH includes the filter parameter FP that is referred to by the adaptive filter included in the video decoding device 1. Here, as will be described later, the adaptive filter included in the video decoding device 1 classifies each of one or a plurality of unit areas included in the target slice or the target LCU into one of a plurality of types, and the unit area Is switched according to the type to which the unit area belongs. Further, the adaptive filter process is performed on the unit area for which the adaptive filter process is set to ON using the filter coefficient group selected according to the type to which the unit area belongs.
 ここで、単位領域とは、スライス、LCU、CU(リーフCU以外)、リーフCU(予測単位PU、変換単位TU)、予測単位PUを構成するパーティション、および、変換単位TUを構成するブロックの何れであってもよいし、CU等とは別の4×4画素、8×8画素などのブロックでも良い、また1画素のみから構成される領域であってもよいし、それら以外のものであってもよい。 Here, the unit region is any of a slice, an LCU, a CU (other than a leaf CU), a leaf CU (a prediction unit PU, a transform unit TU), a partition that configures a prediction unit PU, and a block that configures a transform unit TU. It may be a block of 4 × 4 pixels, 8 × 8 pixels, etc. different from the CU, etc., or may be an area composed of only one pixel, or other than those. May be.
 図2(g)に、フィルタパラメータFPのデータ構造を示す。図2(g)に示すように、フィルタパラメータFPには、フィルタ係数群n(nは、フィルタ係数群を互いに識別するためのフィルタ番号であり、n=1、・・・、Nfをとる。Nfは、フィルタパラメータFPに含まれるフィルタ係数群の総数を表す)が含まれる。 Fig. 2 (g) shows the data structure of the filter parameter FP. As shown in FIG. 2G, the filter parameter FP includes a filter coefficient group n (n is a filter number for identifying the filter coefficient groups from each other, and n = 1,..., Nf. Nf represents the total number of filter coefficient groups included in the filter parameter FP).
 また、上述した単位領域が、スライス、LCU、CU(リーフCU以外)、リーフCU(予測単位PU、変換単位TU)、予測単位PUを構成するパーティション、および、変換単位TUを構成するブロックの何れでもない場合には、フィルタパラメータFPは、対象スライスまたは対象LCUにおける各単位領域の位置およびサイズを指定するための領域指定情報を含む構成とすることができる。動画像復号装置1の備える適応フィルタは、この領域指定情報を参照することによって、各単位領域の位置およびサイズを特定することができる。ただし、フィルタパラメータFPは、そのような領域指定情報を含まない構成とし、動画像符号化装置2および動画像復号装置1において、予め定められたサイズの単位領域を用いる構成としてもよい。 In addition, the above-described unit area is any one of a slice, an LCU, a CU (other than a leaf CU), a leaf CU (a prediction unit PU, a transform unit TU), a partition constituting the prediction unit PU, and a block constituting the transform unit TU. Otherwise, the filter parameter FP can be configured to include area designation information for designating the position and size of each unit area in the target slice or the target LCU. The adaptive filter included in the moving image decoding apparatus 1 can specify the position and size of each unit region by referring to the region designation information. However, the filter parameter FP may be configured not to include such region designation information, and the moving image encoding device 2 and the moving image decoding device 1 may use a unit region having a predetermined size.
 一方で、上述した単位領域が、スライス、LCU、CU(リーフCU以外)、リーフCU(予測単位PU、変換単位TU)、予測単位PUを構成するパーティション、および、変換単位TUを構成するブロックの何れかである場合には、動画像復号装置1の備える適応フィルタは、CU分割フラグSP_CU、インターPU分割情報SP_Inter、イントラPU分割情報SP_Intra、および、TU分割情報SP_TU等を参照することによって、各単位領域の位置およびサイズを階層的に特定することができる。 On the other hand, the unit area described above includes a slice, an LCU, a CU (other than a leaf CU), a leaf CU (a prediction unit PU, a transform unit TU), a partition constituting the prediction unit PU, and a block constituting the transform unit TU. In any case, the adaptive filter included in the video decoding device 1 refers to the CU partition flag SP_CU, inter-PU partition information SP_Inter, intra-PU partition information SP_Intra, TU partition information SP_TU, etc. The position and size of the unit area can be specified hierarchically.
 フィルタ係数群I(I=1~Nf)には、(1)フィルタのタップ数(若しくはフィルタ係数群毎のフィルタ係数の総数)を指定するタップ数指定情報、(2)フィルタ係数a_I0~a_INT-1(NTは、フィルタ係数群Iに含まれるフィルタ係数の総数)、および、(3)オフセットoIが含まれる。なお、互いに異なるフィルタ番号の付されたフィルタ係数群は、互いに異なるタイプに分類された単位領域のフィルタ処理に用いられる。例えば、フィルタ係数群0およびフィルタ係数群1は、それぞれ、タイプ1に分類された単位領域、および、タイプ1とは異なるタイプ2に分類された単位領域のフィルタ処理に用いられる。 The filter coefficient group I (I = 1 to Nf) includes (1) tap number designation information for designating the number of filter taps (or the total number of filter coefficients for each filter coefficient group), and (2) filter coefficients a_I 0 to a_I. NT-1 (NT is the total number of filter coefficients included in the filter coefficient group I) and (3) an offset oI. Note that filter coefficient groups with different filter numbers are used for the filter processing of unit areas classified into different types. For example, the filter coefficient group 0 and the filter coefficient group 1 are used for the filter processing of the unit area classified into type 1 and the unit area classified into type 2 different from type 1, respectively.
 以下では、本実施形態に係る動画像復号装置1について図1~図20を参照して説明する。動画像復号装置1は、その一部に、H.264/MPEG-4.AVC、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている技術、および、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている技術を含む復号装置である。 Hereinafter, the video decoding device 1 according to the present embodiment will be described with reference to FIGS. The moving picture decoding apparatus 1 includes H.264 as a part thereof. H.264 / MPEG-4. Decoding device including technology adopted in KTA software which is a codec for joint development in AVC and VCEG (Video Coding Expert Group) and technology adopted in TMuC (Test Model Under Consistration) software which is the successor codec It is.
 図3は、動画像復号装置1の構成を示すブロック図である。図3に示すように、動画像復号装置1は、可変長符号復号部11、予測画像生成部12、逆量子化・逆変換部13、加算器14、フレームメモリ15、デブロッキングフィルタ16、および、適応フィルタ17を備えている。また、図3に示すように、予測画像生成部12は、動きベクトル復元部12a、インター予測画像生成部12b、イントラ予測画像生成部12c、および、予測方式決定部12dを備えている。動画像復号装置1は、符号化データ#1を復号することによって動画像#2を生成するための装置である。 FIG. 3 is a block diagram showing a configuration of the moving picture decoding apparatus 1. As shown in FIG. 3, the moving picture decoding apparatus 1 includes a variable length code decoding unit 11, a predicted image generation unit 12, an inverse quantization / inverse conversion unit 13, an adder 14, a frame memory 15, a deblocking filter 16, and The adaptive filter 17 is provided. As shown in FIG. 3, the predicted image generation unit 12 includes a motion vector restoration unit 12a, an inter predicted image generation unit 12b, an intra predicted image generation unit 12c, and a prediction method determination unit 12d. The moving picture decoding apparatus 1 is an apparatus for generating moving picture # 2 by decoding encoded data # 1.
 (可変長符号復号部11)
 可変長符号復号部11は、各パーティションに関する予測パラメータPPを、符号化データ#1から復号し、予測画像生成部12に供給する。具体的には、可変長符号復号部11は、インター予測パーティションに関しては、参照画像インデックスRI、推定動きベクトルインデックスPMVI、及び、動きベクトル残差MVDを含むインター予測パラメータPP_Interを符号化データ#1から復号し、これらを動きベクトル復元部12aに供給する。一方、イントラ予測パーティションに関しては、推定フラグMPM、残余インデックスRIPM、および、追加インデックスAIを含むイントラ予測パラメータPP_Intraを符号化データ#1から復号し、これらをイントラ予測画像生成部12cに供給する。
(Variable-length code decoding unit 11)
The variable length code decoding unit 11 decodes the prediction parameter PP related to each partition from the encoded data # 1, and supplies the decoded prediction parameter PP to the predicted image generation unit 12. Specifically, for the inter prediction partition, the variable length code decoding unit 11 receives the inter prediction parameter PP_Inter including the reference image index RI, the estimated motion vector index PMVI, and the motion vector residual MVD from the encoded data # 1. These are decoded and supplied to the motion vector restoration unit 12a. On the other hand, for the intra prediction partition, the intra prediction parameter PP_Intra including the estimation flag MPM, the residual index RIPM, and the additional index AI is decoded from the encoded data # 1, and these are supplied to the intra prediction image generation unit 12c.
 また、可変長符号復号部11は、各パーティションについての予測タイプ情報PTを符号化データ#1から復号し、これを予測方式決定部12dに供給する。更に、可変長符号復号部11は、各ブロックに関する量子化予測残差QD、及び、そのブロックを含むTUに関する量子化パラメータ差分Δqpを符号化データ#1から復号し、これらを逆量子化・逆変換部13に供給する。また、可変長符号復号部11は、符号化データ#1からフィルタパラメータFPを復号し、これを適応フィルタ17に供給する。 Also, the variable length code decoding unit 11 decodes the prediction type information PT for each partition from the encoded data # 1, and supplies this to the prediction method determination unit 12d. Further, the variable length code decoding unit 11 decodes the quantization prediction residual QD for each block and the quantization parameter difference Δqp for the TU including the block from the encoded data # 1, and performs inverse quantization / inverse This is supplied to the conversion unit 13. Further, the variable length code decoding unit 11 decodes the filter parameter FP from the encoded data # 1 and supplies this to the adaptive filter 17.
 (予測画像生成部12)
 予測画像生成部12は、各パーティションについての予測タイプ情報PTに基づいて、各パーティションがインター予測を行うべきインター予測パーティションであるのか、イントラ予測を行うべきイントラ予測パーティションであるのかを識別する。そして、前者の場合には、インター予測画像Pred_Interを生成すると共に、生成したインター予測画像Pred_Interを予測画像Predとして加算器14に供給し、後者の場合には、イントラ予測画像Pred_Intraを生成すると共に、生成したイントラ予測画像Pred_Intraを加算器14に供給する。なお、予測画像生成部12は、処理対象PUに対してスキップモードが適用されている場合には、当該PUに属する他のパラメータの復号を省略する。
(Predicted image generation unit 12)
The predicted image generation unit 12 identifies whether each partition is an inter prediction partition for performing inter prediction or an intra prediction partition for performing intra prediction based on the prediction type information PT for each partition. In the former case, the inter prediction image Pred_Inter is generated, and the generated inter prediction image Pred_Inter is supplied to the adder 14 as the prediction image Pred. In the latter case, the intra prediction image Pred_Intra is generated, The generated intra predicted image Pred_Intra is supplied to the adder 14. Note that, when the skip mode is applied to the processing target PU, the predicted image generation unit 12 omits decoding of other parameters belonging to the PU.
 (動きベクトル復元部12a)
 動きベクトル復元部12aは、各インター予測パーティションに関する動きベクトルmvを、そのパーティションに関する動きベクトル残差MVDと、他のパーティションに関する復元済みの動きベクトルmv’とから復元する。具体的には、(1)推定動きベクトルインデックスPMVIにより指定される推定方法に従って、復元済みの動きベクトルmv’から推定動きベクトルpmvを導出し、(2)導出した推定動きベクトルpmvと動きベクトル残差MVDとを加算することによって動きベクトルmvを得る。なお、他のパーティションに関する復元済みの動きベクトルmv’は、フレームメモリ15から読み出すことができる。動きベクトル復元部12aは、復元した動きベクトルmvを、対応する参照画像インデックスRIと共に、インター予測画像生成部12bに供給する。
(Motion vector restoration unit 12a)
The motion vector restoration unit 12a 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 frame memory 15. The motion vector restoration unit 12a supplies the restored motion vector mv to the inter predicted image generation unit 12b together with the corresponding reference image index RI.
 (インター予測画像生成部12b)
 インター予測画像生成部12bは、画面間予測によって、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル復元部12aから供給された動きベクトルmvを用いて、同じく動きベクトル復元部12aから供給された参照画像インデックスRIによって指定されるフィルタ済復号画像P_ALF’から動き補償画像mcを生成する。ここで、フィルタ済復号画像P_ALF’は、既にフレーム全体の復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ16によるデブロック処理および適応フィルタ17によるフィルタ処理を施すことによって得られる画像であり、インター予測画像生成部12bは、フィルタ済復号画像P_ALF’を構成する各画素の画素値をフレームメモリ15から読み出すことができる。インター予測画像生成部12bによって生成された動き補償画像mcは、インター予測画像Pred_Interとして予測方式決定部12dに供給される。
(Inter prediction image generation unit 12b)
The inter prediction image generation unit 12b generates a motion compensated image mc related to each inter prediction partition by inter-screen prediction. Specifically, using the motion vector mv supplied from the motion vector restoration unit 12a, the motion compensation image mc from the filtered decoded image P_ALF ′ designated by the reference image index RI supplied from the motion vector restoration unit 12a. Is generated. Here, the filtered decoded image P_ALF ′ is an image obtained by performing deblocking processing by the deblocking filter 16 and filtering processing by the adaptive filter 17 on the decoded image that has already been decoded for the entire frame. The inter-predicted image generation unit 12b can read out the pixel value of each pixel constituting the filtered decoded image P_ALF ′ from the frame memory 15. The motion compensated image mc generated by the inter predicted image generation unit 12b is supplied to the prediction method determination unit 12d as an inter predicted image Pred_Inter.
 (イントラ予測画像生成部12c)
 イントラ予測画像生成部12cは、各イントラ予測パーティションに関する予測画像Pred_Intraを生成する。具体的には、まず、可変長符号復号部11から供給されたイントラ予測パラメータPP_Intraに基づいて予測モードを特定し、特定された予測モードを対象パーティションに対して、例えば、ラスタスキャン順に割り付ける。
(Intra predicted image generation unit 12c)
The intra predicted image generation unit 12c generates a predicted image Pred_Intra related to each intra prediction partition. Specifically, first, a prediction mode is specified based on the intra prediction parameter PP_Intra supplied from the variable length code decoding unit 11, and the specified prediction mode is assigned to the target partition in, for example, raster scan order.
 ここで、イントラ予測パラメータPP_Intraに基づく予測モードの特定は、以下のように行うことができる。(1)推定フラグMPMを復号し、当該推定フラグMPMが、処理対象である対象パーティションについての予測モードと、当該対象パーティションの周辺のパーティションに割り付けられた予測モードとが同一であることを示している場合には、対象パーティションに対して、当該対象パーティションの周辺のパーティションに割り付けられた予測モードを割り付ける。(2)一方で、推定フラグMPMが、処理対象である対象パーティションについての予測モードと、当該対象パーティションの周辺のパーティションに割り付けられた予測モードとが同一でないことを示している場合には、残余予測モードインデックスRIPMを復号し、当該残余予測モードインデックスRIPMの示す予測モードを対象パーティションに対して割り付ける。 Here, specification of the prediction mode based on the intra prediction parameter PP_Intra can be performed as follows. (1) The estimation flag MPM is decoded, and the estimation flag MPM indicates that the prediction mode for the target partition to be processed is the same as the prediction mode assigned to the peripheral partition of the target partition. If it is, the prediction mode assigned to the partition around the target partition is assigned to the target partition. (2) On the other hand, if the estimation flag MPM indicates that the prediction mode for the target partition to be processed is not the same as the prediction mode assigned to a partition around the target partition, the remaining The prediction mode index RIPM is decoded, and the prediction mode indicated by the residual prediction mode index RIPM is assigned to the target partition.
 イントラ予測画像生成部12cは、対象パーティションに割り付けられた予測モードの示す予測方法に従って、画面内予測によって、(局所)復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部12cによって生成されたイントラ予測画像Pred_Intraは、予測方式決定部12dに供給される。なお、イントラ予測画像生成部12cは、画面内予測によって、フィルタ済復号画像P_ALFから予測画像Pred_Intraを生成する構成とすることも可能である。 The intra predicted image generation unit 12c generates a predicted image Pred_Intra from the (local) decoded image P by intra prediction according to the prediction method indicated by the prediction mode assigned to the target partition. The intra predicted image Pred_Intra generated by the intra predicted image generation unit 12c is supplied to the prediction method determination unit 12d. Note that the intra predicted image generation unit 12c may be configured to generate the predicted image Pred_Intra from the filtered decoded image P_ALF by intra prediction.
 (予測方式決定部12d)
 予測方式決定部12dは、各パーティションが属するPUについての予測タイプ情報PTに基づいて、各パーティションがインター予測を行うべきインター予測パーティションであるのか、イントラ予測を行うべきイントラ予測パーティションであるのかを決定する。そして、前者の場合には、インター予測画像生成部12bにて生成されたインター予測画像Pred_Interを予測画像Predとして加算器14に供給し、後者の場合には、イントラ予測画像生成部12cにて生成されたイントラ予測画像Pred_Intraを予測画像Predとして加算器14に供給する。
(Prediction method determination unit 12d)
The prediction method determination unit 12d determines whether each partition is an inter prediction partition that should perform inter prediction or an intra prediction partition that should perform intra prediction based on the prediction type information PT about the PU to which each partition belongs. To do. In the former case, the inter prediction image Pred_Inter generated by the inter prediction image generation unit 12b is supplied to the adder 14 as the prediction image Pred. In the latter case, the inter prediction image generation unit 12c generates the inter prediction image Pred_Inter. The intra predicted image Pred_Intra that has been processed is supplied to the adder 14 as the predicted image Pred.
 (逆量子化・逆変換部13)
 逆量子化・逆変換部13は、(1)量子化予測残差QDを逆量子化し、(2)逆量子化によって得られたDCT係数を逆DCT(Discrete Cosine Transform)変換し、(3)逆DCT変換によって得られた予測残差Dを加算器14に供給する。なお、量子化予測残差QDを逆量子化する際に、逆量子化・逆変換部13は、可変長符号復号部11から供給された量子化パラメータ差分Δqpから量子化ステップQPを導出する。量子化パラメータqpは、直前に逆量子化/逆DCT変換したTUに関する量子化パラメータqp’に量子化パラメータ差分Δqpを加算することによって導出でき、量子化ステップQPは、量子化ステップqpから例えばQP=2pq/6によって導出できる。また、逆量子化・逆変換部13による予測残差Dの生成は、TUあるいはTUを分割したブロックを単位として行われる。
(Inverse quantization / inverse transform unit 13)
The inverse quantization / inverse transform unit 13 (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 14. When the quantization prediction residual QD is inversely quantized, the inverse quantization / inverse transform unit 13 derives the quantization step QP from the quantization parameter difference Δqp supplied from the variable length code decoding unit 11. The quantization parameter qp can be derived by adding the quantization parameter difference Δqp to the quantization parameter qp ′ relating to the TU that has been inversely quantized / inversely DCT transformed immediately before, and the quantization step QP is derived from the quantization step qp, for example, QP = 2 pq / 6 . The generation of the prediction residual D by the inverse quantization / inverse transform unit 13 is performed in units of blocks obtained by dividing TUs or TUs.
 (加算器14)
 加算器14は、予測画像生成部12から供給された予測画像Predと、逆量子化・逆変換部13から供給された予測残差Dとを加算することによって復号画像Pを生成する。生成された復号画像Pは、フレームメモリ15に格納される。
(Adder 14)
The adder 14 generates the decoded image P by adding the prediction image Pred supplied from the prediction image generation unit 12 and the prediction residual D supplied from the inverse quantization / inverse conversion unit 13. The generated decoded image P is stored in the frame memory 15.
 (デブロッキングフィルタ16)
 デブロッキングフィルタ16は、復号画像Pにおけるブロック境界、またはパーティション境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、復号画像Pにおける当該ブロック境界、または当該パーティション境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該パーティション境界付近の画像の平滑化を行う。デブロッキングフィルタ16によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、フレームメモリ15に格納される。
(Deblocking filter 16)
The deblocking filter 16 determines 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 or the partition boundary in the decoded image P is smaller than a predetermined threshold value. By performing a deblocking process on the partition boundary, the block boundary or an image near the partition boundary is smoothed. The image subjected to the deblocking process by the deblocking filter 16 is stored in the frame memory 15 as a deblocked decoded image P_DB.
 (適応フィルタ17)
 適応フィルタ17は、(1)デブロック済復号画像P_DBを構成する1若しくは複数の単位領域の各々を、該単位領域におけるデブロック済復号画像P_DBの画像特性に応じて複数のタイプの何れかに分類し、(2)該単位領域についての適応フィルタ処理のオンオフを、該単位領域が属するタイプに応じて切り替える。また、(3)適応フィルタ処理がオンに設定された単位領域におけるデブロック済復号画像P_DBに対して、該単位領域が属するタイプに応じて選択されたフィルタ係数群を用いて適応フィルタ処理を行う。
(Adaptive filter 17)
The adaptive filter 17 (1) sets one or a plurality of unit areas constituting the deblocked decoded image P_DB to any of a plurality of types according to the image characteristics of the deblocked decoded image P_DB in the unit area. (2) ON / OFF of adaptive filter processing for the unit area is switched according to the type to which the unit area belongs. Further, (3) adaptive filter processing is performed on the deblocked decoded image P_DB in the unit region for which the adaptive filter processing is turned on using a filter coefficient group selected according to the type to which the unit region belongs. .
 図1は、適応フィルタ17の構成を示すブロック図である。図1に示すように、適応フィルタ17は、領域特性値算出部171、領域分類部172、及び、フィルタ処理部173を備えている。 FIG. 1 is a block diagram showing the configuration of the adaptive filter 17. As shown in FIG. 1, the adaptive filter 17 includes a region characteristic value calculation unit 171, a region classification unit 172, and a filter processing unit 173.
 (領域特性値算出部171)
 領域特性値算出部171は、処理対象となる対象単位領域を含む特性値算出参照領域におけるデブロック済復号画像P_DBの各画素値をフレームメモリ15から読み出し、それらの画素値に基づいて、対象単位領域におけるデブロック済復号画像P_DBの画像特性を表す特性値(領域特性値とも呼ぶ)を算出する。ここで、特性値算出参照領域とは、対象単位領域におけるデブロック済復号画像P_DBの特性値を算出するために参照される画素から構成される領域のことを指す。特性値算出参照領域は、対象単位領域のみから構成されるか、または、対象単位領域と対象単位領域の周辺の領域とから構成される。なお、領域特性値算出部171は、対象単位領域に関する特性値を算出するための構成であり、対象単位領域と相関を有する他の画像を用いて特性値を算出することもできる。従って、領域特性値算出部171は、デブロック済復号画像P_DBに限定するものではなく、別の画像、例えば、復号画像Pを参照して特性値を算出しても構わない。この場合にも、対象単位領域に対応する座標領域に位置する画素値を用いる。また、本実施形態では、デブロック済復号画像P_DBを入力とする適応フィルタ17を記載しているが、適応フィルタ17は、複数の入力を有する構成としてもよい。このように適応フィルタ17が複数の異なる入力画像を有する場合には、これらの入力画像の1つを用いて特性値を算出しても構わない。
(Regional characteristic value calculation unit 171)
The region characteristic value calculation unit 171 reads each pixel value of the deblocked decoded image P_DB in the characteristic value calculation reference region including the target unit region to be processed from the frame memory 15, and based on these pixel values, the target unit A characteristic value (also referred to as an area characteristic value) representing the image characteristic of the deblocked decoded image P_DB in the area is calculated. Here, the characteristic value calculation reference region refers to a region formed of pixels referred to for calculating the characteristic value of the deblocked decoded image P_DB in the target unit region. The characteristic value calculation reference area is composed of only the target unit area, or is composed of the target unit area and an area around the target unit area. Note that the region characteristic value calculation unit 171 is a configuration for calculating a characteristic value related to the target unit region, and can also calculate the characteristic value using another image having a correlation with the target unit region. Therefore, the region characteristic value calculation unit 171 is not limited to the deblocked decoded image P_DB, and may calculate the characteristic value with reference to another image, for example, the decoded image P. Also in this case, the pixel value located in the coordinate area corresponding to the target unit area is used. In the present embodiment, the adaptive filter 17 having the deblocked decoded image P_DB as an input is described. However, the adaptive filter 17 may be configured to have a plurality of inputs. In this way, when the adaptive filter 17 has a plurality of different input images, the characteristic value may be calculated using one of these input images.
 図1に示すように、領域特性値算出部171は、活性度算出部171aを備えている。活性度算出部171aは、対象単位領域におけるデブロック済復号画像P_DBの特性値として、活性度(activity)ACTを算出する。ここで、活性度とは、概略的に言えば、画像の乱雑さを示す指標であり、分割領域を含む領域にDCT変換を施した場合に得られる変換係数において大きな高周波成分が存在するかなどに基づいても算出可能であるが、ここでは隣接する画素の画素値に基づいて算出するものとする。隣接する画素の画素値の差が大きいほど、活性度が大きくなる。算出された分割領域毎の活性度ACTは、領域分類部172に供給される。 As shown in FIG. 1, the region characteristic value calculation unit 171 includes an activity calculation unit 171a. The activity calculation unit 171a calculates an activity ACT as the characteristic value of the deblocked decoded image P_DB in the target unit region. Here, generally speaking, the activity is an index indicating the randomness of the image, and whether there is a large high-frequency component in the conversion coefficient obtained when the DCT conversion is performed on the region including the divided region. However, here, 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 for each divided region is supplied to the region classification unit 172.
 対象単位領域がBx画素×By画素の矩形状である場合、対象単位領域における各画素の座標を(i、j)(i、jはそれぞれ0≦i≦Bx-1、0≦j≦By-1を満たす整数)と表し、その座標におけるデブロック済復号画像P_DBの画素値をS(i、j)と表すことにすると、活性度算出部171aは、例えば、以下の数式(1a)を用いることによって、活性度ACTを算出することができる。 When the target unit area has a rectangular shape of Bx pixels × By pixels, the coordinates of each pixel in the target unit area are (i, j) (i and j are 0 ≦ i ≦ Bx−1 and 0 ≦ j ≦ By−, respectively). If the pixel value of the deblocked decoded image P_DB at the coordinates is represented by S (i, j), the activity calculation unit 171a uses, for example, the following formula (1a): Thus, the activity ACT can be calculated.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
数式(1a)は、隣接する画素の画素値の絶対値の総和(Sum of Absolute Difference, SAD)を指標として、活性度を評価することに対応している。 Formula (1a) corresponds to evaluating the activity using the sum of absolute values of adjacent pixel values (Sum of Absolute Difference, SAD) as an index.
 また、活性度算出部171aは、以下の数式(1b)を用いることによって、活性度ACTを算出する構成としてもよい。 Further, the activity calculation unit 171a may be configured to calculate the activity ACT by using the following mathematical formula (1b).
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
数式(1b)は、隣接する画素の画素値の変形ラプラシアンの総和(Sum-Modified Laplacian, SML)を指標として、活性度を評価することに対応している。 Formula (1b) corresponds to the evaluation of activity using the sum of modified Laplacians (Sum-ModifiedModLaplacian, SML) of the pixel values of adjacent pixels as an index.
 対象単位領域についての活性度を数式(1a)または(1b)を用いて算出する場合、活性度算出部171aは、対象単位領域内の画素S(i、j)のみならず、対象単位領域に隣接する画素S(-1、j)、S(Bx、j)、S(i、-1)、および、S(i、By)をも参照する。すなわち、数式(1a)または(1b)を用いる場合の特性値算出参照領域は、対象単位領域内の画素S(i、j)、および、対象単位領域に隣接する画素S(-1、j)、S(Bx、j)、S(i、-1)、および、S(i、By)から構成される。活性度算出部171aが、4×4画素の対象単位領域URについての活性度ACTを、数式(1a)または(1b)を用いて算出する場合の特性値算出参照領域CRRを図4(a)に示す。 When calculating the activity for the target unit region using the formula (1a) or (1b), the activity calculation unit 171a applies not only to the pixel S (i, j) in the target unit region, but also to the target unit region. Reference is also made to adjacent pixels S (−1, j), S (Bx, j), S (i, −1), and S (i, By). That is, the characteristic value calculation reference region when using the formula (1a) or (1b) is the pixel S (i, j) in the target unit region and the pixel S (−1, j) adjacent to the target unit region. , S (Bx, j), S (i, −1), and S (i, By). FIG. 4A shows the characteristic value calculation reference region CRR when the activity calculation unit 171a calculates the activity ACT for the target unit region UR of 4 × 4 pixels using the formula (1a) or (1b). Shown in
 なお、対象単位領域がスライス境界またはLCU境界に接している場合、特性値算出参照領域内の一部の画素について、デブロック済復号画像P_DBの画素値が参照不能である場合が生じ得る。例えば、対象単位領域が、未復号のLCUに隣接している場合、この未復号のLCUの画素値を参照することはできない。このような場合、例外処理として、活性度算出部171aは、それらの参照不能な画素値を参照することなく活性度ACTの算出を行う。例えば、対象単位領域の右辺および下辺が未復号のLCUに隣接している場合、活性度算出部171aは、数式(1a)においてi、jの和の範囲を一部制限して得られる以下の数式(1a’)を用いて活性度ACTを算出すればよい。 When the target unit area is in contact with the slice boundary or the LCU boundary, the pixel value of the deblocked decoded image P_DB may not be referred to for some pixels in the characteristic value calculation reference area. For example, when the target unit area is adjacent to an undecoded LCU, the pixel value of the undecoded LCU cannot be referred to. In such a case, as an exception process, the activity calculation unit 171a calculates the activity ACT without referring to those pixel values that cannot be referred to. For example, when the right side and the lower side of the target unit region are adjacent to an undecoded LCU, the activity calculation unit 171a obtains the following obtained by partially limiting the range of the sum of i and j in Equation (1a) What is necessary is just to calculate activity ACT using Numerical formula (1a ').
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000003
数式(1b)についても同様である。 The same applies to Equation (1b).
 一方で、活性度算出部171aは、対象単位領域がスライス境界またはLCU境界に接しているか否かに関わらず、対象単位領域についての活性度を対象単位領域内の画素値のみを参照することによって算出する構成とすることもできる。例えば、活性度算出部171aは、以下の数式(1c)を用いることによって、活性度ACTを算出することもできる。 On the other hand, the activity calculation unit 171a 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 LCU boundary. It can also be configured to calculate. For example, the activity calculation unit 171a can also calculate the activity ACT by using the following formula (1c).
Figure JPOXMLDOC01-appb-M000004
Figure JPOXMLDOC01-appb-M000004
数式(1c)は、数式(1a)と同様に、隣接する画素の画素値のSADを指標として隣接する画素の画素値の活性度を評価することに対応しているが、数式(1a)と異なり、対象単位領域に含まれる画素のみを参照して活性度を算出することを表している。 Equation (1c) corresponds to evaluating the activity of the pixel value of the adjacent pixel using the SAD of the pixel value of the adjacent pixel as an index, as in Equation (1a). Differently, the degree of activity is calculated by referring to only the pixels included in the target unit area.
 また、活性度算出部171aは、以下の数式(1d)を用いることによって、活性度ACTを算出する構成としてもよい。 Further, the activity calculation unit 171a may be configured to calculate the activity ACT by using the following formula (1d).
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000005
数式(1d)は、数式(1b)と同様に、隣接する画素の画素値のSMLを指標として、活性度を評価することに対応しているが、数式(1d)と異なり、対象単位領域に含まれる画素のみを参照して活性度を算出することを表している。 Similar to Equation (1b), Equation (1d) corresponds to the evaluation of the activity using the SML of the pixel value of the adjacent pixel as an index, but unlike Equation (1d), In other words, the degree of activity is calculated by referring only to the included pixels.
 このように、活性度算出部171aが、対象単位領域についての活性度を対象単位領域内の画素値のみを参照することによって算出する場合、図4(b)に示すように、特性値算出参照領域CRRは、対象単位領域URと同一の領域となる。後述する分散VPも、対象単位領域内の画素値のみを参照して算出可能な活性度の一例である。 As described above, when the activity calculation unit 171a calculates the activity for the target unit region by referring only to the pixel value in the target unit region, as shown in FIG. 4B, the characteristic value calculation reference is made. The region CRR is the same region as the target unit region 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.
 したがって、活性度算出部171aが、対象単位領域についての活性度を対象単位領域内の画素値のみを参照することによって算出する場合には、対象単位領域以外の画素値をも参照する場合に比べて、フレームメモリ15から読み出す画素数が削減され、フレームメモリ15から適応フィルタ16へのデータ伝送量が削減される。また、活性度を算出するために参照される画素の数が少なく、例外処理も不要であるため、活性度を算出するための処理量が削減される。 Therefore, when the activity level calculation unit 171a calculates the activity level for the target unit area by referring only to the pixel values in the target unit area, the activity level calculation unit 171a compares the pixel value other than the target unit area with reference to the pixel value. Thus, the number of pixels read from the frame memory 15 is reduced, and the data transmission amount from the frame memory 15 to the adaptive filter 16 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.
 なお、数式(1c)を用いることによって活性度ACTを算出する活性度算出部171aを以下のように表現することもできる。すなわち、活性度算出部171aは、画素(i、j)についての活性度ACT(i、j)を、座標(i、j)の近傍{(i、j),(i+1、j),(i、j+1)}における各画素の画素値を参照して算出し、対象単位領域の内部領域{(i、j)|0≦i≦Bx-2,0≦j≦By-2}におけるACT(i、j)の総和を用いて、対象単位領域についてのACTを算出する。 In addition, the activity calculation part 171a which calculates activity ACT by using Formula (1c) can also be expressed as follows. That is, the activity calculation unit 171a determines the activity ACT (i, j) for the pixel (i, j) in the vicinity of the coordinates (i, j) {(i, j), (i + 1, j), (i , J + 1)} with reference to the pixel value of each pixel, and ACT (i in the inner region {(i, j) | 0 ≦ i ≦ Bx−2, 0 ≦ j ≦ By−2} of the target unit region , J) is used to calculate the ACT for the target unit region.
 また、数式(1d)を用いることによって活性度ACTを算出する活性度算出部171aを以下のように表現することもできる。すなわち、活性度算出部171aは、画素(i、j)についての活性度ACT(i、j)を、座標(i、j)の近傍{(i、j),(i+1、j),(i、j+1),(i-1、j),(i、j-1)}における各画素の画素値を参照して算出し、対象単位領域の内部領域{(i、j)|1≦i≦Bx-2,1≦j≦By-2}におけるACT(i、j)の総和を用いて、対象単位領域についてのACTを算出する。 Also, the activity calculation unit 171a that calculates the activity ACT by using the mathematical formula (1d) can be expressed as follows. That is, the activity calculation unit 171a determines the activity ACT (i, j) for the pixel (i, j) in the vicinity of the coordinates (i, j) {(i, j), (i + 1, j), (i , J + 1), (i−1, j), (i, j−1)} with reference to the pixel value of each pixel, the inner region {(i, j) | 1 ≦ i ≦ The ACT for the target unit region is calculated using the sum of ACT (i, j) in Bx-2, 1 ≦ j ≦ By-2}.
 このように、対象単位領域に含まれる画素のみを参照して活性度を算出する活性度算出部171aは、対象単位領域において、その近傍全体が該対象単位領域に含まれる画素からなる内部領域に属する各画素の活性度を、該画素の上記近傍に含まれる画素の画素値を参照して導出したうえで、内部領域に属する各画素の活性度から該対象単位領域についての活性度を算出するものであると表現することもできる。 As described above, the activity calculation unit 171a that calculates the activity with reference to only the pixels included in the target unit region has the entire vicinity of the target unit region as an internal region including pixels included in the target unit region. The degree of activity of each target pixel region is calculated from the degree of activity of each pixel belonging to the internal area after deriving the degree of activity of each pixel belonging with reference to the pixel values of the pixels included in the vicinity of the pixel. It can also be expressed as a thing.
 なお、対象単位領域に含まれる画素のみを参照して活性度を算出する構成は、上記の例に限定されるものではなく、対象単位領域を、その近傍全体が該対象単位領域に含まれる画素からなる内部領域と、その近傍全体が該対象単位領域に含まれない画素からなる周辺領域とに分け、内部領域に属する各画素の活性度を該画素の近傍内の画素の画素値を参照して導出し、かつ、周辺領域に属する各画素の活性度を該画素の上記近傍内の画素であって該単位領域内の画素の画素値を参照して導出したうえで、該単位領域に属する各画素の活性度から該単位領域についての活性度を算出する構成としてもよい。 Note that 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.
 (領域分類部172)
 領域分類部172は、対象単位領域についての特性値として領域特性値算出部171が算出した活性度ACTに基づいて、対象単位領域を複数のタイプの何れかに分類する。続いて、タイプに応じて、対象領域をフィルタ処理がオフである領域(フィルタオフ領域)とフィルタ処理がオンである領域(フィルタオン領域)の何れかに分類する。タイプと領域の関係は後述するように予め固定的に定めておいても良いし、どのタイプがどちらの領域に分類されるかを示すフラグを符号化しても良い。以下、フィルタオン領域に分類されるタイプを、フィルタオンタイプ、フィルタオフ領域に分類されるタイプをフィルタオフタイプと呼ぶ。また、対象単位領域をタイプに分類せずに、直接特性値(活性度ACT)からフィルタオン領域とフィルタオフ領域に分類しても構わない。
(Region classification unit 172)
The region classification unit 172 classifies the target unit region into one of a plurality of types based on the activity ACT calculated by the region characteristic value calculation unit 171 as the characteristic value for the target unit region. Subsequently, according to the type, the target region is classified into either a region where the filter process is off (filter off region) or a region where the filter process is on (filter on region). As will be described later, the relationship between the type and the region may be fixed in advance, or a flag indicating which type is classified into which region may be encoded. Hereinafter, a type classified into the filter-on region is referred to as a filter-on type, and a type classified into the filter-off region is referred to as a filter-off type. Further, the target unit area may be classified into the filter-on area and the filter-off area from the direct characteristic value (activity ACT) without classifying the target unit area into a type.
 対象単位領域がフィルタオン領域に分類される場合には、領域分類部172は、可変長符号復号部11から供給されるフィルタパラメータFPに含まれるフィルタ係数群であって、対象単位領域の属するタイプに対応したフィルタ係数群を、対象単位領域に割り付ける。一方で、対象単位領域がフィルタオフ領域に分類される場合には、領域分類部172は、対象単位領域に対してフィルタ係数群を割り付けない。 When the target unit region is classified as a filter-on region, the region classification unit 172 is a filter coefficient group included in the filter parameter FP supplied from the variable length code decoding unit 11, and includes a type to which the target unit region belongs. Are assigned to the target unit area. On the other hand, when the target unit region is classified as the filter-off region, the region classification unit 172 does not assign a filter coefficient group to the target unit region.
 また、領域分類部172は、(1)対象単位領域がフィルタオン領域に分類されたのか、フィルタオフ領域に分類されたのかを示すオンオフ情報U、および、(2)対象単位領域がフィルタオン領域に分類された場合には、対象単位領域に割り付けられたフィルタ係数群、をフィルタ処理部173に供給する。なお、オンオフ情報Uは、対象単位領域についてのフィルタ処理のオンオフを示すものであるため、1ビットで表現することができる。なお、対象単位領域をフィルタオン領域/フィルタオフ領域に分類することと、対象単位領域をフィルタオンタイプ/フィルタオフタイプに分類することは同値であるため、以下の説明では、フィルタオン領域/フィルタオフ領域とフィルタオンタイプ/フィルタオフタイプを区別せずに扱う。 The area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on area or a filter off area, and (2) the target unit area is a filter on area. In the case of the classification, the filter coefficient group allocated to the target unit area is supplied to the filter processing unit 173. Note that the on / off information U indicates on / off of the filter processing for the target unit region, and can therefore be expressed by 1 bit. Since the classification of the target unit area into the filter-on area / filter-off area is equivalent to the classification of the target unit area into the filter-on type / filter-off type, in the following description, the filter-on area / filter-off area is the same value. Handles the OFF area and the filter ON type / filter OFF type without distinction.
 以下では、領域分類部172による分類処理の具体例の説明に先立ち、図5を参照しつつ発明者によって得られた実験データについて説明を行う。 Hereinafter, prior to description of a specific example of classification processing by the region classification unit 172, experimental data obtained by the inventor will be described with reference to FIG.
 図5(a)は、発明者によって得られた実験データを示すグラフであって、量子化パラメータの値が32である複数のシーケンス(「BasketballDrill_q32」、「PartyScene_q32」、「RaceHorses_q32」、「BQSquare_q32」)についての、単位領域毎の活性度と、各単位領域について適応フィルタ処理を施した場合に得られる二乗誤差削減量とを示すグラフである。ここで、二乗誤差削減量は、符号化効率と正の相関を有しており、二乗誤差削減量が大きいほど符号化効率が向上することを示している。また、二乗誤差削減量が負である単位領域は、符号化効率に対して負の寄与、すなわち、符号化効率を低減させる寄与を有していることを示している。また、適応フィルタ処理を施すためにはフィルタ係数の符号化が必要になるため、二乗誤差削減量が負の場合だけでなく二乗誤差が小さい場合においても符号化効率を低減させる可能性がある。なお、図5の実験データにおける活性度は、上述した数式(1a)を用いて算出されたものである。 FIG. 5A is a graph showing experimental data obtained by the inventor, and a plurality of sequences (“BasketballDrill_q32”, “PartyScene_q32”, “RaceHorses_q32”, “BQSquare_q32”) whose quantization parameter value is 32. ) For each unit region, and a square error reduction amount obtained when adaptive filter processing is performed for each unit region. Here, the square error reduction amount has a positive correlation with the coding efficiency, and indicates that the larger the square error reduction amount, the better the coding efficiency. Further, it is indicated that the unit area in which the square error reduction amount is negative has a negative contribution to the coding efficiency, that is, a contribution to reduce the coding efficiency. In addition, since the filter coefficients need to be encoded in order to perform the adaptive filter processing, there is a possibility that the encoding efficiency may be reduced not only when the square error reduction amount is negative but also when the square error is small. The activity in the experimental data of FIG. 5 is calculated using the above-described mathematical formula (1a).
 図5(a)に示すように、何れのシーケンスについても、二乗誤差削減量が負となる活性度の範囲が存在する。具体的には、
・シーケンス「BasketballDrill_q32」については、活性度が略5以下の範囲
・シーケンス「PartyScene_q32」については、活性度が略8以下の範囲
・シーケンス「RaceHorses_q32」については、活性度が略3以下の範囲
・シーケンス「BQSquare_q32」については、活性度が略5以上略20以下の範囲、および、活性度が略3以下
の各範囲において、二乗誤差削減量が負となっている。
As shown in FIG. 5A, there is an activity range in which the square error reduction amount is negative for any sequence. In particular,
・ For the sequence “BasketballDrill_q32”, the range of activity is about 5 or less ・ For the sequence “PartyScene_q32”, the range of activity is about 8 or less ・ For the sequence “RaceHorses_q32”, the range of activity is about 3 or less ・ Sequence Regarding “BQSquare_q32”, the square error reduction amount is negative in the range where the activity is approximately 5 or more and approximately 20 or less and in each range where the activity is approximately 3 or less.
 図5(b)は、各活性度における二乗誤差削減量について、複数のシーケンスについての平均(「average」)と、各活性度を有する単位領域の総数(「count」)とを示すグラフである。 FIG. 5B is a graph showing the average (“average”) for a plurality of sequences and the total number of unit areas (“count”) having each activity, with respect to the square error reduction amount at each activity. .
 図5(b)に示すように、複数のシーケンスの平均を示すグラフの値は、活性度が略8以下の範囲において負となっている。 As shown in FIG. 5B, the value of the graph indicating the average of a plurality of sequences is negative in the range where the activity is approximately 8 or less.
 このように、各シーケンスについて、二乗誤差削減量が負になる活性度の範囲が存在する。発明者は、上記の実験データに基づき、二乗誤差削減量が負になる活性度を有する単位領域については、適応フィルタ処理を行わない構成とすることによって、符号化効率が向上するとの知見を得た。 Thus, for each sequence, there is an activity range in which the square error reduction amount is negative. Based on the above experimental data, the inventor obtained knowledge that coding efficiency is improved by adopting a configuration in which adaptive filter processing is not performed for unit regions having an activity with a negative square error reduction amount. It was.
 以下では、領域分類部172による分類処理の具体例を、図6を参照して説明する。領域分類部172は、以下の(分類処理例1-1)~(分類処理例1-7)のうち、何れかの分類処理を行う構成とすることができる。また、以下の(分類処理例1-1)~(分類処理例1-7)のうち、何れの分類処理を行うのかを指定する分類処理指定情報を符号化データ#1に含めておき、領域分類部172は、(分類処理例1-1)~(分類処理例1-7)のうち、当該分類処理指定情報によって指定される分類処理を選択的に行う構成としてもよい。 Hereinafter, a specific example of classification processing by the region classification unit 172 will be described with reference to FIG. The area classification unit 172 can be configured to perform any of the classification processes among the following (classification process example 1-1) to (classification process example 1-7). Further, among the following (Classification Processing Example 1-1) to (Classification Processing Example 1-7), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 1-1) to (Classification process example 1-7).
 なお、以下の説明では、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。また、以下では、領域分類部172は、タイプI(I=1~Non)に分類された対象単位領域に対して、フィルタ係数群Iを割り付けるものとする。 In the following description, it is assumed that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types. In the following, it is assumed that the region classification unit 172 assigns the filter coefficient group I to the target unit region classified as type I (I = 1 to Non).
 (分類処理例1-1)
 本処理例においては、領域分類部172は、図6(a)に示すように、対象単位領域を以下のように分類する。
(Classification example 1-1)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1
 ・タイプ1:Th1<ACT
 ここで、Th1は予め定められた閾値を示している。閾値Th1の具体的な値は、図5に示した実験データ等を鑑み、例えば、シーケンス毎に予め定められた値を用いればよい。具体的には、
・シーケンス「BasketballDrill_q32」については、Th1=5
・シーケンス「PartyScene_q32」については、Th1=8
・シーケンス「RaceHorses_q32」については、Th1=3
・シーケンス「BQSquare_q32」については、Th1=20
を用いればよい。また、閾値Th1をシーケンスによらずに定める場合には、Th1=8を用いればよい。
・ Type 0: ACT ≦ Th1
・ Type 1: Th1 <ACT
Here, Th1 represents a predetermined threshold value. As a specific value of the threshold Th1, for example, a value predetermined for each sequence may be used in consideration of the experimental data shown in FIG. In particular,
・ Th1 = 5 for the sequence “BasketballDrill_q32”
-For the sequence "PartyScene_q32", Th1 = 8
・ Th1 = 3 for the sequence “RaceHorses_q32”
-For the sequence "BQSquare_q32", Th1 = 20
May be used. When the threshold value Th1 is determined without depending on the sequence, Th1 = 8 may be used.
 このように、活性度が予め定められた閾値以下である単位領域をタイプ0、すなわち、適応フィルタ処理を行わない単位領域に設定することによって、符号化効率に対する負の寄与を削減することができるので、符号化効率が向上する。 As described above, by setting a unit region whose activity is equal to or less than a predetermined threshold as a type region 0, that is, a unit region that is not subjected to adaptive filter processing, the negative contribution to the coding efficiency can be reduced. Therefore, the encoding efficiency is improved.
 また、閾値Th1の値は、活性度を算出する具体的な算出式に応じて設定されることが好ましい。例えば、活性度ACTを数式(1b)を用いて算出する構成において好適に用いられる閾値Th1の値は、数式(1a)を用いて算出する構成において用いられる閾値Th1の値とは異なりうる。 Further, the value of the threshold Th1 is preferably set according to a specific calculation formula for calculating the activity. For example, the value of the threshold Th1 that is preferably used in the configuration that calculates the activity ACT using the formula (1b) may be different from the value of the threshold Th1 that is used in the configuration that uses the formula (1a).
 (分類処理例1-2)
 本処理例においては、領域分類部172は、図6(b)に示すように、対象単位領域を以下のように分類する。
(Classification example 1-2)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1
 ・タイプ1:Th1<ACT≦Th2
 ・タイプ2:Th2<ACT
 ここで、Th2は、予め定められた閾値を示しており、Th1<Th2を満たしているものとする。閾値Th2の具体的な値は、符号化効率が向上するように予め定めておけばよい。
・ Type 0: ACT ≦ Th1
・ Type 1: Th1 <ACT ≦ Th2
・ Type 2: Th2 <ACT
Here, Th2 indicates a predetermined threshold value, and it is assumed that Th1 <Th2. A specific value of the threshold Th2 may be determined in advance so that the encoding efficiency is improved.
 本処理例においても、活性度が予め定められた閾値以下である単位領域をタイプ0、すなわち、適応フィルタ処理を行わない単位領域に設定する。したがって、符号化効率に対する負の寄与を削減することができるので、符号化効率が向上する。また、フィルタ処理をオンにする単位領域については、活性度の値に応じて、複数のフィルタ係数群の何れかを適用するので、符号化効率の更なる向上を図ることができる。なお、本処理例における閾値Th2の具体的な値は、符号化効率が向上するように予め定められた値を用いることが好ましい。 Also in this processing example, a unit area whose activity is equal to or less than a predetermined threshold is set to type 0, that is, a unit area for which adaptive filter processing is not performed. Therefore, the negative contribution to the coding efficiency can be reduced, so that the coding efficiency is improved. In addition, since any one of a plurality of filter coefficient groups is applied to the unit area for which the filter processing is turned on according to the value of the degree of activity, the encoding efficiency can be further improved. In addition, it is preferable to use a predetermined value as the specific value of the threshold Th2 in this processing example so that the coding efficiency is improved.
 (分類処理例1-3)
 本処理例においては、領域分類部172は、図6(c)に示すように、対象単位領域を以下のように分類する。
(Classification example 1-3)
In the present processing example, the area classification unit 172 classifies the target unit area as follows as shown in FIG.
 ・タイプ1:ACT≦Th2
 ・タイプ0:Th2<ACT
 ここで、閾値Th2の値は、高い符号化効率を維持しつつ処理量がより削減されるように、予め実験等によって定めておけばよい。例えば、図5に示した実験データは、活性度の値が略90以上の場合、適応フィルタ処理を行ったとしても、符号化効率がほとんど向上しないことを示している。したがって、閾値Th2の値を90程度に設定しておけば、高い符号化効率を維持しつつ、処理量を削減することができる。
・ Type 1: ACT ≦ Th2
・ Type 0: Th2 <ACT
Here, the value of the threshold Th2 may be determined in advance by experiments or the like so that the processing amount is further reduced while maintaining high coding efficiency. For example, the experimental data shown in FIG. 5 indicates that when the activity value is approximately 90 or more, even if adaptive filter processing is performed, the coding efficiency is hardly improved. Therefore, if the threshold value Th2 is set to about 90, the processing amount can be reduced while maintaining high coding efficiency.
 (分類処理例1-4)
 本処理例においては、領域分類部172は、図6(d)に示すように、対象単位領域を以下のように分類する。
(Classification process example 1-4)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ1:ACT≦Th1
 ・タイプ2:Th1<ACT≦Th2
 ・タイプ0:Th2<ACT
 ここで、本処理例における閾値Th2の具体的な値は、分類処理例1-3と同様に、高い符号化効率を維持しつつ処理量がより削減されるように、90程度の値に設定しておけばよい。また、本処理例における閾値Th1の値は、符号化効率が向上するように予め定められた値を用いることが好ましい。
・ Type 1: ACT ≦ Th1
・ Type 2: Th1 <ACT ≦ Th2
・ Type 0: Th2 <ACT
Here, the specific value of the threshold Th2 in this processing example is set to a value of about 90 so that the processing amount is further reduced while maintaining high coding efficiency, as in the classification processing example 1-3. You just have to. In addition, it is preferable to use a predetermined value for the threshold value Th1 in this processing example so that the encoding efficiency is improved.
 このような閾値Th1およびTh2を用いることによって、符号化効率を効果的に向上させることができる。 The encoding efficiency can be effectively improved by using such threshold values Th1 and Th2.
 (分類処理例1-5)
 本処理例においては、領域分類部172は、図6(e)に示すように、対象単位領域を以下のように分類する。
(Classification example 1-5)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1、または、Th2<ACT
 ・タイプ2:Th1<ACT≦Th2
 ここで、本処理例における閾値Th1の具体的な値は、分類処理例1-1と同様に定めておけばよい。また、本処理例における閾値Th2の具体的な値は、分類処理例1-3と同様に定めておけばよい。
Type 0: ACT ≦ Th1 or Th2 <ACT
・ Type 2: Th1 <ACT ≦ Th2
Here, the specific value of the threshold value Th1 in the present processing example may be determined in the same manner as in the classification processing example 1-1. The specific value of the threshold value Th2 in this processing example may be determined in the same manner as in the classification processing example 1-3.
 このような閾値Th1およびTh2を用いることによって、符号化効率を効果的に向上させることができる。 The encoding efficiency can be effectively improved by using such threshold values Th1 and Th2.
 (分類処理例1-6)
 本処理例においては、領域分類部172は、図6(f)に示すように、対象単位領域を以下のように分類する。
(Classification example 1-6)
In this processing example, the region classification unit 172 classifies the target unit region as follows, as illustrated in FIG.
 ・タイプ1:ACT≦Th1
 ・タイプ2:Th1<ACT≦Th2
 ・タイプ3:Th2<ACT
 ここで、本処理例における閾値Th1およびTh2の具体的な値は、符号化効率を向上させるように予め定めておけばよい。
・ Type 1: ACT ≦ Th1
・ Type 2: Th1 <ACT ≦ Th2
・ Type 3: Th2 <ACT
Here, the specific values of the threshold values Th1 and Th2 in this processing example may be determined in advance so as to improve the encoding efficiency.
 また、処理例において、領域特性値算出部171は、対象単位領域についての活性度ACTを算出する際に、当該対象単位領域内の画素値のみを参照する構成とすることが好ましい。これにより、対象単位領域以外の画素値をも参照する構成に比べて、フレームメモリ15から読み出す画素数が削減され、フレームメモリ15から適応フィルタ16へのデータ伝送量が削減される。また、活性度を算出するために参照される画素の数が少なく、例外処理も不要であるため、活性度を算出するための処理量が削減される。 In the processing example, it is preferable that the region characteristic value calculation unit 171 refers to only the pixel value in the target unit region when calculating the activity ACT for the target unit region. As a result, the number of pixels read from the frame memory 15 is reduced and the amount of data transmission from the frame memory 15 to the adaptive filter 16 is reduced compared to a configuration that also refers to pixel values other than the target unit region. 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.
 したがって、本処理例によれば、処理量を削減しつつ、符号化効率を向上させることができる。 Therefore, according to the present processing example, it is possible to improve the encoding efficiency while reducing the processing amount.
 (分類処理例1-7)
 以上、領域分類部172が活性度ACTを予め定められた閾値と比較することによって、対象単位領域についてのフィルタ処理のオンオフを決定する処理例について説明を行ったが、本実施形態はこれに限られるものではない。
(Classification example 1-7)
As described above, the processing example in which the region classification unit 172 determines the on / off of the filter processing for the target unit region by comparing the activity ACT with a predetermined threshold has been described. However, the present embodiment is not limited to this. It is not something that can be done.
 例えば、フィルタパラメータFPに、各タイプについてのフィルタ処理のオンオフを指定するオンオフ指定情報Vを含めておき、領域分類部172は、このオンオフ指定情報Vを参照することによって、タイプ毎にフィルタ処理のオンオフを決定してもよい。以下では、図6(g)を参照して、このような分類処理例について説明する。なお、オンオフ指定情報Vは、上述したオンオフ情報Uとは異なり、フィルタ処理のオンオフを各タイプについて指定する情報であるため、そのビット長はタイプの総数に依存する。 For example, the filter parameter FP includes on / off designation information V for designating the on / off of the filter processing for each type, and the area classification unit 172 refers to the on / off designation information V, thereby performing the filter processing for each type. On / off may be determined. Hereinafter, an example of such classification processing will be described with reference to FIG. Unlike the above-described on / off information U, the on / off designation information V is information for designating the on / off of the filtering process for each type, and therefore the bit length depends on the total number of types.
 以下の説明では、タイプの総数が4であり、フィルタパラメータFPには、各タイプについてのフィルタ処理のオンオフを指定する情報として、4ビットのオンオフ指定情報Vが含まれている場合について説明する。ただし、本処理例はこれに限定されず、一般にタイプの総数がNtpであり、フィルタパラメータFPにNtpビットのオンオフ指定情報Vが含まれている場合に適用することができる。 In the following description, a case is described in which the total number of types is 4, and the filter parameter FP includes 4-bit on / off designation information V as information for designating on / off of the filter processing for each type. However, the present processing example is not limited to this, and is generally applicable when the total number of types is Ntp and the filter parameter FP includes Ntp bit on / off designation information V.
 図6(g)は、本処理例における分類処理を示す表である。図6(g)に示すように、領域分類部172は、対象単位領域を以下のように分類する。
・タイプA:ACT≦Th
・タイプB:Th<ACT≦2×Th
・タイプC:2×Th<ACT≦3×Th
・タイプD:3×Th<ACT
 また、領域分類部172は、フィルタパラメータFPに含まれるオンオフ指定情報Vを参照し、各タイプについてのフィルタ処理のオンオフを決定する。例えば、オンオフ指定情報Vが2進表現で「0101」である場合には、タイプAおよびタイプCをフィルタオフタイプに設定し、タイプBおよびタイプDをフィルタオンタイプに設定する。なお、閾値Thの具体的な値は、符号化効率が向上するように予め定められた値を用いることが好ましい。
FIG. 6G is a table showing the classification processing in this processing example. As shown in FIG. 6G, the region classification unit 172 classifies the target unit region as follows.
・ Type A: ACT ≦ Th
・ Type B: Th <ACT ≦ 2 × Th
Type C: 2 × Th <ACT ≦ 3 × Th
・ Type D: 3 × Th <ACT
Further, the region classification unit 172 refers to the on / off designation information V included in the filter parameter FP, and determines the on / off of the filter processing for each type. For example, when the on / off designation information V is “0101” in binary expression, type A and type C are set to the filter off type, and type B and type D are set to the filter on type. It should be noted that a specific value of the threshold Th is preferably a predetermined value so that the encoding efficiency is improved.
 領域分類部172は、対象単位領域がフィルタオンタイプに分類される場合には、当該対象単位領域に対して、フィルタパラメータFPに含まれるフィルタ係数群を割り付ける。ここで、フィルタパラメータFPに複数のフィルタ係数群が含まれている場合には、符号化データ#1を生成する動画像符号化装置2において用いられた選択規則と同じ選択規則を用いて、当該複数のフィルタ係数群のうち何れかのフィルタ係数群を選択し、対象単位領域に割り付ければよい。 The region classification unit 172 assigns a filter coefficient group included in the filter parameter FP to the target unit region when the target unit region is classified into the filter on type. Here, when a plurality of filter coefficient groups are included in the filter parameter FP, the same selection rule as the selection rule used in the moving image encoding device 2 that generates the encoded data # 1 is used. Any one of the plurality of filter coefficient groups may be selected and assigned to the target unit area.
 一方で、対象単位領域がフィルタオフタイプに分類される場合には、領域分類部172は、対象単位領域に対してフィルタ係数群を割り付けない。 On the other hand, when the target unit region is classified into the filter-off type, the region classification unit 172 does not assign a filter coefficient group to the target unit region.
 領域分類部172は、(1)対象単位領域がフィルタオンタイプに分類されたのか、フィルタオフタイプに分類されたのかを示すオンオフ情報U、および、(2)対象単位領域がフィルタオンタイプに分類された場合には、対象単位領域に割り付けられたフィルタ係数群、をフィルタ処理部173に供給する。 The area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is classified as a filter on type. If it is, the filter coefficient group assigned to the target unit area is supplied to the filter processing unit 173.
 本処理例においても、活性度の範囲毎にフィルタ処理のオンオフを切り替えることができるので、符号化効率が向上する。 Also in this processing example, since the filter processing can be switched on and off for each activity range, the encoding efficiency is improved.
 (領域分類部172による各単位領域の設定の仕方について)
 なお、上記の説明において、領域分類部172は、各単位領域を、符号化データ#1に含まれるCU分割フラグSP_CU、インターPU分割情報SP_Inter、イントラPU分割情報SP_Intra、および、TU分割情報SP_TU等によって階層的に指定されるサイズおよび位置を有するように設定してもよいし、符号化データ#1に含まれる領域指定情報によって指定されるサイズおよび位置を有するように設定してもよいし、予め定められたサイズを有するように設定してもよい(以下同様)。
(How to set each unit area by the area classification unit 172)
In the above description, the region classification unit 172 sets each unit region as a CU partition flag SP_CU, inter-PU partition information SP_Inter, intra-PU partition information SP_Intra, TU partition information SP_TU, and the like included in the encoded data # 1. May be set so as to have a size and position specified hierarchically, or may be set to have a size and position specified by the area specifying information included in the encoded data # 1, It may be set to have a predetermined size (the same applies hereinafter).
 符号化データ#1に含まれるCU分割フラグSP_CUによって階層的に指定される単位領域の例を図7(a)に示す。図7(a)に示す例においては、対象LCUについての最大階層深度が2であり、対象LCUに含まれる単位領域UR0~UR6の位置およびサイズは、CU分割フラグSP_CUによって階層的に指定される。 FIG. 7A shows an example of a unit area that is hierarchically specified by the CU division flag SP_CU included in the encoded data # 1. In the example shown in FIG. 7A, the maximum hierarchical depth for the target LCU is 2, and the positions and sizes of the unit areas UR0 to UR6 included in the target LCU are hierarchically specified by the CU division flag SP_CU. .
 一方で、予め定められたサイズを有する単位領域の例を図7(b)に示す。図7(b)においては、対象LCU(例えば16×16画素)が、予め定められたサイズ(例えば4×4画素)を有する単位領域UR0~UR15によって分割されている。各単位領域は、例えば、図7(b)に示すように、ラスタスキャン順に割り付けられたインデックスによって互いに識別が可能である。 On the other hand, an example of a unit area having a predetermined size is shown in FIG. In FIG. 7B, the target LCU (for example, 16 × 16 pixels) is divided by unit areas UR0 to UR15 having a predetermined size (for example, 4 × 4 pixels). Each unit area can be identified from each other by an index assigned in the raster scan order as shown in FIG. 7B, for example.
 なお、各単位領域を予め定められたサイズを有するように設定する構成においては、符号化データ#1に含まれるCU分割フラグSP_CU、インターPU分割情報SP_Inter、イントラPU分割情報SP_Intra、TU分割情報SP_TU等を参照する場合に比べて処理量を削減することができる。 In the configuration in which each unit area is set to have a predetermined size, the CU partition flag SP_CU, inter-PU partition information SP_Inter, intra-PU partition information SP_Intra, and TU partition information SP_TU included in the encoded data # 1 The processing amount can be reduced as compared with the case of referring to the above.
 (フィルタ処理部173)
 フィルタ処理部173は、領域分類部172から供給されたオンオフ情報Uがフィルタオンタイプを示している場合に、(1)対象単位領域を含むフィルタ参照範囲におけるデブロック済復号画像P_DBの各画素値をフレームメモリ15から読み出し、(2)それらの画素に対して、領域分類部172から供給されたフィルタ係数群を用いたフィルタ処理を行うことによって、当該対象単位領域におけるフィルタ済復号画像P_ALFを生成する。生成されたフィルタ済復号画像P_ALFは、フレームメモリ15に格納される。ここで、フィルタ参照範囲とは、対象単位領域におけるフィルタ済復号画像P_ALFを生成するために参照される範囲のことを指し、対象単位領域と対象単位領域の周辺の領域とから構成される。
(Filter processing unit 173)
When the on / off information U supplied from the region classification unit 172 indicates the filter on type, the filter processing unit 173 (1) each pixel value of the deblocked decoded image P_DB in the filter reference range including the target unit region (2) A filtered decoded image P_ALF in the target unit region is generated by performing filter processing using the filter coefficient group supplied from the region classification unit 172 on these pixels. To do. The generated filtered decoded image P_ALF is stored in the frame memory 15. Here, the filter reference range refers to a range that is referred to in order to generate the filtered decoded image P_ALF in the target unit region, and includes a target unit region and a region around the target unit region.
 一方で、領域分類部172から供給されたオンオフ情報Uがフィルタオフタイプを示している場合、フィルタ処理部173は、対象単位領域に対してフィルタ処理を行わない。 On the other hand, when the on / off information U supplied from the region classification unit 172 indicates the filter off type, the filter processing unit 173 does not perform the filtering process on the target unit region.
 以下の説明において、領域分類部172から供給されたフィルタ係数群をフィルタ係数群I(Iは1≦I≦Nfを満たす何れかの整数、Nfは、フィルタパラメータFPに含まれるフィルタ係数群の総数)と表すことにする。また、対象単位領域内のフィルタ済復号画像P_ALF(「フィルタ後画像」とも呼称する)におけるフィルタ対象画素の画素値をSF(x’、y’)と表し、フィルタ参照範囲におけるデブロック済復号画像P_DB(「フィルタ前画像」とも呼称する)の画素値をS(x、y)と表すことにする。 In the following description, the filter coefficient group supplied from the region classification unit 172 is the filter coefficient group I (I is any integer satisfying 1 ≦ I ≦ Nf, and Nf is the total number of filter coefficient groups included in the filter parameter FP) ). Further, the pixel value of the filter target pixel in the filtered decoded image P_ALF (also referred to as “filtered image”) in the target unit region is represented as SF (x ′, y ′), and the deblocked decoded image in the filter reference range. The pixel value of P_DB (also referred to as “pre-filter image”) is represented as S (x, y).
 フィルタ処理部173は、画素値SF(x’、y’)を、以下の数式(2)によって算出する。 The filter processing unit 173 calculates the pixel value SF (x ′, y ′) by the following formula (2).
Figure JPOXMLDOC01-appb-M000006
Figure JPOXMLDOC01-appb-M000006
ここで、座標(x、y)は座標(x’、y’)と同一の座標としてもよいし、1対1の対応を有していれば、異なった座標としてもよい。また、aI(i、j)は、フィルタ係数群Iに含まれるフィルタ係数のうち、フィルタ前画像の画素値S(x+i、y+j)に乗ぜられるフィルタ係数を表しており、oIは、フィルタ係数群Iに含まれるオフセットを表している。 Here, 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. AI (i, j) represents a filter coefficient to be multiplied by the pixel value S (x + i, y + j) of the pre-filter image among the filter coefficients included in the filter coefficient group I, and oI represents the filter coefficient group. I represents an offset included in I.
 また、Rは、フィルタ対象画素の画素値を算出するために参照される領域(「フィルタ参照領域R」とも呼称する)を表しており、フィルタ対象画素の位置に応じて設定される。一方で、上述したフィルタ参照範囲(「フィルタ参照範囲RA」とも表記する)は、各フィルタ対象画素についてのフィルタ参照領域Rの和集合として定義される。フィルタ参照範囲RAは、対象単位領域におけるフィルタ後画像の全ての画素値を算出するために必要とされる画素の集合であると表現することもできる。 R represents a region (also referred to as “filter reference region R”) that is referred to in order to calculate the pixel value of the filter target pixel, and is set according to the position of the filter target pixel. On the other hand, the above-described filter reference range (also referred to as “filter reference range RA”) is defined as the union of filter reference regions R for each filter target pixel. The filter reference range RA can also be expressed as a set of pixels required for calculating all pixel values of the filtered image in the target unit region.
 対象単位領域URが8×8画素であり、フィルタ参照領域が5×5タップである場合の、フィルタ参照領域R、および、フィルタ参照範囲RAを図8(a)に示す。図8(a)において、斜線が付された画素は、フィルタ対象画素S(x’、y’)を示している。 FIG. 8A shows a filter reference region R and a filter reference range RA when the target unit region UR is 8 × 8 pixels and the filter reference region is 5 × 5 taps. In FIG. 8A, the hatched pixels indicate the filter target pixels S (x ′, y ′).
 また、フィルタ参照領域Rに含まれる各画素へのフィルタ係数の割り付け方の一例を図8(b)に示す。図8(b)においても、斜線が付された画素は、フィルタ対象画素S(x’、y’)を示している。図8(b)に示すように、各フィルタ係数は、180度の回転対称性を有するように、フィルタ参照領域Rに含まれる各画素に対して割り付けられる構成とすることができる。すなわち、数式(2)におけるaI(i、j)は、フィルタパラメータFPに含まれるフィルタ係数a0~a12を用いて、aI(-3、-3)=aI(3、3)=a0、aI(-2、-3)=aI(2、3)=a1、…、のように、aI(i、j)=aI(-i、-j)を満たすように設定される構成とすることができる。 FIG. 8B shows an example of how to assign filter coefficients to each pixel included in the filter reference region R. Also in FIG. 8B, the hatched pixels indicate the filter target pixels S (x ′, y ′). As shown in FIG. 8B, each filter coefficient can be assigned to each pixel included in the filter reference region R so as to have a rotational symmetry of 180 degrees. That is, aI (i, j) in Equation (2) is obtained by using the filter coefficients a0 to a12 included in the filter parameter FP, so that aI (−3, −3) = aI (3,3) = a0, aI ( −2, −3) = aI (2,3) = a1,..., And can be set to satisfy aI (i, j) = aI (−i, −j). .
 ただし、本実施形態はこれに限定されるものではなく、各フィルタ係数の各画素値への割り付けは、回転対称性を有していなくてもよい。また、フィルタ参照領域Rは、画素を単位として、フィルタ対象画素からの市街地距離がNcb以下である画素によって構成されるひし形の領域であってもよいし、その他の形状を有する領域であってもよい。 However, the present embodiment is not limited to this, and the assignment of each filter coefficient to each pixel value may not have rotational symmetry. In addition, the filter reference region R may be a rhombus region composed of pixels having a city area distance from the filter target pixel of Ncb or less in units of pixels, or regions having other shapes. Good.
 フィルタ参照領域Rに含まれる各画素へのフィルタ係数の割り付け方、および、フィルタ参照領域Rの形状については、符号化データ#1を生成する動画像符号化装置の構成に応じて適宜設定すればよい。 The method of assigning the filter coefficient to each pixel included in the filter reference region R and the shape of the filter reference region R may be appropriately set according to the configuration of the moving picture encoding device that generates the encoded data # 1. Good.
 <変形例1>
 領域特性値算出部171の備える活性度算出部171aは、対象単位領域におけるデブロック済復号画像P_DBの特性値として、上述した活性度ACTに代えて、垂直方向活性度ACT_V、および、水平方向活性度ACT_Hを算出し、領域分類部172が、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vに基づいて対象単位領域を複数のタイプの何れかに分類する構成としてもよい。
<Modification 1>
The activity calculation unit 171a included in the region characteristic value calculation unit 171 uses the vertical activity ACT_V and the horizontal activity as the characteristic value of the deblocked decoded image P_DB in the target unit region instead of the activity ACT described above. The degree ACT_H may be calculated, and the region classification unit 172 may classify the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V.
 ここで、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vは、例えば、上述した数式(1a)の第1項、および、第2項によってそれぞれ算出することができる。また、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vは、上述した数式(1b)~(1d)のうち、何れかの数式の第1項、および、第2項によってそれぞれ算出することもできる。 Here, 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 mathematical formula (1a) described above. In addition, the horizontal direction activity ACT_H and the vertical direction activity ACT_V may be calculated by the first term and the second term of any one of the above formulas (1b) to (1d), respectively. it can.
 領域分類部172は、活性度算出部171aによって算出された水平方向活性度ACT_H、および、垂直方向活性度ACT_Vに基づいて、対象単位領域を複数のタイプのうち、何れかのタイプに分類する。以下では、図9を参照して、本変形例における分類処理について説明する。領域分類部172は、以下の(分類処理例2-1)~(分類処理例2-5)のうち、何れかの分類処理を行う構成とすることができる。また、以下の(分類処理例2-1)~(分類処理例2-5)のうち、何れの分類処理を行うのかを指定する分類処理指定情報を符号化データ#1に含めておき、領域分類部172は、(分類処理例2-1)~(分類処理例2-5)のうち、当該分類処理指定情報によって指定される分類処理を選択的に行う構成としてもよい。 The region classification unit 172 classifies the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V calculated by the activity calculation unit 171a. Below, with reference to FIG. 9, the classification | category process in this modification is demonstrated. The region classification unit 172 may be configured to perform any of the classification processes from the following (Classification process example 2-1) to (Classification process example 2-5). Also, among the following (Classification Processing Example 2-1) to (Classification Processing Example 2-5), classification processing designation information for designating which classification processing is performed is included in the encoded data # 1, The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 2-1) to (Classification process example 2-5).
 なお、以下の説明では、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。また、以下では、領域分類部172は、タイプI(I=1~Non)に分類された対象単位領域に対して、フィルタ係数群Iを割り付けるものとする。 In the following description, it is assumed that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types. In the following, it is assumed that the region classification unit 172 assigns the filter coefficient group I to the target unit region classified as type I (I = 1 to Non).
 (分類処理例2-1)
 本処理例においては、領域分類部172は、図9(a)に示すように、対象単位領域を以下のように分類する。
(Classification example 2-1)
In the present processing example, the area classification unit 172 classifies the target unit area as follows as shown in FIG.
 ・タイプ0:ACT_H≦ThHor1、かつ、ACT_V≦ThVer1
 ・タイプ1:ThHor1<ACT_H、かつ、ACT_V≦ThVer1
 ・タイプ2:ACT_H≦ThHor1、かつ、ThVer1<ACT_V
 ・タイプ3:ThHor1<ACT_H、かつ、ThVer1<ACT_V
 ここで、閾値ThHor1およびThVer1の値は、符号化効率が向上するように予め定められた値を用いればよい。
Type 0: ACT_H ≦ ThHor1 and ACT_V ≦ ThVer1
Type 1: ThHor1 <ACT_H and ACT_V ≦ ThVer1
Type 2: ACT_H ≦ ThHor1 and ThVer1 <ACT_V
Type 3: ThHor1 <ACT_H and ThVer1 <ACT_V
Here, as the values of the thresholds ThHor1 and ThVer1, values that are set in advance so as to improve the encoding efficiency may be used.
 本処理例においては、水平方向活性度ACT_Hおよび垂直方向活性度ACT_Vの各々の値に応じて、対象単位領域をタイプ0を含む複数のタイプの何れかに分類するので、デブロック済復号画像P_DBの画像における水平方向および垂直方向に沿った画像特性に応じて、より適切に分類処理を行うことができる。したがって、本処理例によれば、符号化効率をより効果的に向上させることができる。 In the present processing example, the target unit area is classified into one of a plurality of types including type 0 according to each value of the horizontal direction activity ACT_H and the vertical direction activity ACT_V, so that the deblocked decoded image P_DB The classification process can be performed more appropriately according to the image characteristics along the horizontal and vertical directions of the image. Therefore, according to this processing example, encoding efficiency can be improved more effectively.
 (分類処理例2-2)
 本処理例においては、領域分類部172は、図9(b)に示すように、対象単位領域を以下のように分類する。
(Classification example 2-2)
In the present processing example, the region classification unit 172 classifies the target unit region as follows as shown in FIG. 9B.
 ・タイプ1:ACT_H≦ThHor1、かつ、ACT_V≦ThVer1
 ・タイプ2:ACT_H≦ThHor1、かつ、ThVer1<ACT_V
 ・タイプ3:ThHor1<ACT_H、かつ、ACT_V≦ThVer1
 ・タイプ4:ThHor1<ACT_H、かつ、ThVer1<ACT_V
 ここで、閾値ThHor1およびThVer1の値は、分類処理例2-2と同様に、符号化効率が向上するように予め定められた値を用いればよい。
Type 1: ACT_H ≦ ThHor1 and ACT_V ≦ ThVer1
Type 2: ACT_H ≦ ThHor1 and ThVer1 <ACT_V
Type 3: ThHor1 <ACT_H and ACT_V ≦ ThVer1
Type 4: ThHor1 <ACT_H and ThVer1 <ACT_V
Here, as the values of the thresholds ThHor1 and ThVer1, values that are set in advance so as to improve the coding efficiency may be used, as in the classification processing example 2-2.
 このように、本処理例においては、水平方向活性度ACT_Hおよび垂直方向活性度ACT_Vの各々の値に応じて、対象単位領域をタイプ0を含まない複数のタイプの何れかに分類する。 As described above, in this processing example, the target unit area is classified into one of a plurality of types not including type 0 according to each value of the horizontal activity ACT_H and the vertical activity ACT_V.
 また、処理例において、領域特性値算出部171は、対象単位領域についての活性度ACTを算出する際に、当該対象単位領域内の画素値のみを参照する構成とすることが好ましい。これにより、対象単位領域以外の画素値をも参照する構成に比べて、フレームメモリ15から読み出す画素数が削減され、フレームメモリ15から適応フィルタ16へのデータ伝送量が削減される。また、垂直活性度および水平活性度を算出するために参照される画素の数が少なく、例外処理も不要であるため、活性度を算出するための処理量が削減される。 In the processing example, it is preferable that the region characteristic value calculation unit 171 refers to only the pixel value in the target unit region when calculating the activity ACT for the target unit region. As a result, the number of pixels read from the frame memory 15 is reduced and the amount of data transmission from the frame memory 15 to the adaptive filter 16 is reduced compared to a configuration that also refers to pixel values other than the target unit region. In addition, since the number of pixels referred to calculate the vertical activity and the horizontal activity is small and exception processing is unnecessary, the processing amount for calculating the activity is reduced.
 したがって、本処理例によれば、処理量を削減しつつ、符号化効率を向上させることができる。 Therefore, according to the present processing example, it is possible to improve the encoding efficiency while reducing the processing amount.
 (分類処理例2-3)
 本処理例においては、領域分類部172は、図9(c)に示すように、対象単位領域を以下のように分類する。
(Classification process example 2-3)
In the present processing example, the area classification unit 172 classifies the target unit area as follows as illustrated in FIG.
 ・タイプ0:(ACT_H≦ThHor1、かつ、ACT_V≦ThVer1)、または、ThHor2<ACT_H、または、ThVer2<ACT_V
 ・タイプ1:ThHor1<ACT_H≦ThHor2、かつ、ACT_V≦ThVer1
 ・タイプ2:ACT_H≦ThHor1、かつ、ThVer1<ACT_V≦ThVer2
 ・タイプ3:ThHor1<ACT_H≦ThHor2、かつ、ThVer1<ACT_V≦ThVer2
 ここで、閾値ThHor1、ThVer1、ThHor2、およびThVer2の値は、符号化効率が向上するように予め定められた値を用いればよい。
Type 0: (ACT_H ≦ ThHor1 and ACT_V ≦ ThVer1), or ThHor2 <ACT_H, or ThVer2 <ACT_V
Type 1: ThHor1 <ACT_H ≦ ThHor2 and ACT_V ≦ ThVer1
Type 2: ACT_H ≦ ThHor1 and ThVer1 <ACT_V ≦ ThVer2
Type 3: ThHor1 <ACT_H ≦ ThHor2 and ThVer1 <ACT_V ≦ ThVer2
Here, as the values of the thresholds ThHor1, ThVer1, ThHor2, and ThVer2, values that are set in advance so as to improve the encoding efficiency may be used.
 本処理例においては、閾値ThHor1およびThVer1のみならず、閾値ThHor2およびThVer2を用いることによって、より細かい分類処理を行うので、符号化効率が更に向上する。 In the present processing example, not only the threshold values ThHor1 and ThVer1 but also the threshold values ThHor2 and ThVer2 are used to perform a finer classification process, thereby further improving the encoding efficiency.
 なお、上記構成のように、本発明の一構成は、フィルタオン領域とフィルタオフ領域の分類に用いる特性値として、複数の特性値の組み合わせ(ここでは、水平方向活性度ACT_Hと垂直方向活性度ACT_V)を用いる場合を含む。同様に、本発明の一構成は、フィルタオン領域に対するフィルタ係数群割り当てに用いる特性値として、複数の特性値の組み合わせを用いる場合を含む。 As in the above configuration, one configuration of the present invention is a combination of a plurality of characteristic values (here, the horizontal activity ACT_H and the vertical activity) as the characteristic values used for the classification of the filter-on region and the filter-off region. This includes the case of using ACT_V). Similarly, one configuration of the present invention includes a case where a combination of a plurality of characteristic values is used as a characteristic value used for assigning a filter coefficient group to the filter-on region.
 (分類処理例2-4)
 本処理例においては、領域分類部172は、図9(d)に示すように、対象単位領域を以下のように分類する。
(Classification process example 2-4)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1、または、Th2<ACT
 ・タイプ1:Th1<ACT≦Th2、かつ、ACT_H≦ACT_V
 ・タイプ2:Th1<ACT≦Th2、かつ、ACT_V<ACT_H
 ここで、ACTは、上述した活性度ACTを示しており、活性度算出部171aが、本変形例のように、水平方向活性度ACT_Hおよび垂直方向活性度ACT_Vを個別に算出する構成である場合には、
 ACT=ACT_H+ACT_V
によって求めることができる。
Type 0: ACT ≦ Th1 or Th2 <ACT
Type 1: Th1 <ACT ≦ Th2 and ACT_H ≦ ACT_V
Type 2: Th1 <ACT ≦ Th2 and ACT_V <ACT_H
Here, ACT indicates the above-described activity ACT, and the activity calculation unit 171a is configured to individually calculate the horizontal activity ACT_H and the vertical activity ACT_V as in the present modification. In
ACT = ACT_H + ACT_V
Can be obtained.
 本処理例においては、活性度ACTがTh1<ACT≦Th2を満たす場合に、水平方向活性度ACT_Hと垂直方向活性度ACT_Vとの大小に応じてフィルタ係数群を切り替えるので、符号化効率を効果的に向上させることができる。ACT_H≦ACT_Vすなわち垂直方向活性度ACT_Vが水平方向活性度ACT_H以上である場合には、水平方向エッジなどの垂直成分の変化が存在する可能性が高く、ACT_H>ACT_Vの場合には垂直方向エッジなどの水平方向の変化が存在する可能性が高い。本処理例においては、特性値ACT_H、ACT_Vの大小に応じて対象単位領域における画像の方向性を算出し、方向性に応じてフィルタを選択している。また、本処理例においては、ACT_H≦ACT_V、すなわち、垂直方向の変化がより大きい場合の方向性を方向性0と表現し、ACT_V<ACT_H、すなわち、水平方向の変化がより大きい場合の方向性を方向性1と表現する。ここで、0および1は、画像の方向性を互いに区別するためのインデックス(方向性インデックスとも呼ぶ)である。領域分類部172は、対象単位領域における方向性を示す値である方向性インデックスに応じて、フィルタタイプを選択する。 In the present processing example, when the activity level ACT satisfies Th1 <ACT ≦ Th2, the filter coefficient group is switched according to the magnitude of the horizontal direction activity level ACT_H and the vertical direction activity level ACT_V. Can be improved. When ACT_H ≦ ACT_V, that is, when the vertical activity ACT_V is equal to or higher than the horizontal activity ACT_H, there is a high possibility that a vertical component change such as a horizontal edge exists, and when ACT_H> ACT_V, the vertical edge, etc. There is a high probability that there will be horizontal changes. In this processing example, the directionality of the image in the target unit region is calculated according to the magnitudes of the characteristic values ACT_H and ACT_V, and a filter is selected according to the directionality. In this processing example, ACT_H ≦ ACT_V, that is, the directionality when the change in the vertical direction is larger is expressed as directionality 0, and ACT_V <ACT_H, that is, the directionality when the change in the horizontal direction is larger. Is expressed as directionality 1. Here, 0 and 1 are indexes (also referred to as directionality indexes) for distinguishing the directionality of images from each other. The region classification unit 172 selects a filter type according to a direction index that is a value indicating the direction in the target unit region.
 なお、上記構成のように、フィルタオン領域とフィルタオフ領域の分類に用いる特性値(ここでは活性度ACT)と、フィルタオン領域に対するフィルタ係数群の割り当てに用いる特性値(ここでは水平方向活性度ACT_H、垂直方向活性度ACT_V)は異なるものであっても構わない。すなわち、本発明は一構成として、ある特性値に基づいてフィルタオン領域とフィルタオフ領域に分類する手段と、ある特性値とは別の特性値に基づいてフィルタオン領域にフィルタ係数群を割り当てる手段を備える構成を含む。 Note that, as in the above configuration, the characteristic value used for the classification of the filter-on region and the filter-off region (here, the activity ACT), and the characteristic value used for assigning the filter coefficient group to the filter-on region (here, the horizontal direction activity) ACT_H and vertical activity ACT_V) may be different. That is, the present invention has, as one configuration, a means for classifying the filter on area and the filter off area based on a certain characteristic value, and a means for assigning a filter coefficient group to the filter on area based on a characteristic value different from the certain characteristic value. The structure provided with.
 (分類処理例2-5)
 本処理例においては、領域分類部172は、図9(e)に示すように、対象単位領域を以下のように分類する。
(Classification example 2-5)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1、または(Th2<ACTかつ2×ACT_H<ACH_H)、または(Th1<ACT≦Th2かつ2×ACT_H≧ACT_Vかつ2×ACT_V≧ACT_H)
 ・タイプ1:Th1<ACT≦Th2、かつ、2×ACT_H<ACT_V
 ・タイプ2:Th1<ACT≦Th2、かつ、2×ACT_V<ACT_H
 ・タイプ3:(Th2<ACTかつ2×ACT_H<ACT_V)、または(Th2<ACTかつ2×ACT_H≧ACT_Vかつ2×ACT_V≧ACT_H)
 ここで、ACTは、上述した活性度ACTを示している。
Type 0: ACT ≦ Th1, or (Th2 <ACT and 2 × ACT_H <ACH_H), or (Th1 <ACT ≦ Th2 and 2 × ACT_H ≧ ACT_V and 2 × ACT_V ≧ ACT_H)
Type 1: Th1 <ACT ≦ Th2 and 2 × ACT_H <ACT_V
Type 2: Th1 <ACT ≦ Th2 and 2 × ACT_V <ACT_H
Type 3: (Th2 <ACT and 2 × ACT_H <ACT_V), or (Th2 <ACT and 2 × ACT_H ≧ ACT_V and 2 × ACT_V ≧ ACT_H)
Here, ACT represents the above-described activity ACT.
 なお、2×ACT_H<ACT_Vである場合、すなわち、垂直方向活性度ACT_Vが水平方向活性度ACT_Hよりも所定の程度以上大きい場合(ここでは2倍以上に大きい場合)には、水平方向エッジが存在する可能性が高く、逆に2×ACT_V<ACT_Hである場合には垂直方向エッジが存在する可能性が高い。また2×ACT_H≧ACT_Vかつ2×ACT_V≧ACT_Hの場合には斜め方向エッジが存在する可能性が高い。本処理例においては、特性値ACT_HおよびACT_Vの大小に応じて、対象単位領域における画像の方向性を算出し、方向性に応じてフィルタを選択している。また、本処理例においては、方向性インデックス0~2を用いて、2×ACT_H<ACT_Vである場合の方向性を方向性0と表現し、2×ACT_V<ACT_Hである場合の方向性を方向性1と表現し、2×ACT_H≧ACT_Vかつ2×act_v≧act_hである場合の方向性を方向性2と表現する。方向性0、1、および2は、それぞれ、水平方向エッジ、垂直方向エッジ、および斜め方向エッジが存在する場合に対応する。 Note that when 2 × ACT_H <ACT_V, that is, when the vertical activity ACT_V is greater than the horizontal activity ACT_H by a predetermined degree or more (here, twice or more), there is a horizontal edge. In contrast, when 2 × ACT_V <ACT_H, there is a high possibility that a vertical edge exists. Further, when 2 × ACT_H ≧ ACT_V and 2 × ACT_V ≧ ACT_H, there is a high possibility that an oblique direction edge exists. In this processing example, the directionality of the image in the target unit region is calculated according to the magnitudes of the characteristic values ACT_H and ACT_V, and a filter is selected according to the directionality. In this processing example, the directionality in the case of 2 × ACT_H <ACT_V is expressed as directionality 0 using the directionality indexes 0 to 2, and the directionality in the case of 2 × ACT_V <ACT_H is set to the direction. The directionality in the case of 2 × ACT_H ≧ ACT_V and 2 × act_v ≧ act_h is expressed as directionality 2. Directionality 0, 1, and 2 correspond to the cases where there are horizontal edges, vertical edges, and diagonal edges, respectively.
 領域分類部172は、対象単位領域における画像の方向性を、該方向性を示す値である方向性インデックスに応じて、対象単位領域についてのフィルタタイプを選択する。 The region classifying unit 172 selects the filter type for the target unit region in accordance with the directionality index that is a value indicating the directionality of the image in the target unit region.
 本処理例においては、活性度だけでなく、活性度と方向性に応じてタイプ0を割り当て、フィルタをオフとするため符号化効率を効率的に向上することができる。ここでは活性度が低い場合にはフィルタをオフとする。また活性度が中程度の場合には、斜め方向のフィルタをオフにし、垂直方向と水平方向にはフィルタ1、フィルタ2を割り当てる。活性度が高い場合には、水平方向のフィルタをオフとし水平方向を除く方向にフィルタ3を割り当てる。ここでは、活性度が中かつ方向性が斜め方向の場合にフィルタ0としているのは、この場合を適用するシーケンスでは活性度中の領域に斜め線が少なく、斜め方向にフィルタを割り当てて符号化効率が向上しないためである。なお、この例は一例であり、適切な割り当てはシーケンス依存によって異なる。 In this processing example, since the type 0 is assigned according to not only the activity but also the activity and directionality and the filter is turned off, the coding efficiency can be improved efficiently. Here, the filter is turned off when the activity is low. When the degree of activity is medium, the diagonal filter is turned off, and the filters 1 and 2 are assigned to the vertical and horizontal directions. When the degree of activity is high, the horizontal filter is turned off and the filter 3 is assigned in a direction other than the horizontal direction. Here, the filter 0 is set when the activity is medium and the directionality is oblique. In the sequence to which this case is applied, there are few oblique lines in the region of activity, and encoding is performed by assigning filters in the oblique direction. This is because the efficiency is not improved. Note that this example is an example, and appropriate allocation differs depending on sequence dependency.
 <変形例2>
 以上の説明では、適応フィルタ17が、領域特性値算出部171にて、対象単位領域におけるデブロック済復号画像P_DBの特性値として活性度ACT(または、水平活性度ACT_H、および、垂直活性度ACT_V)を算出し、領域分類部172にて、活性度ACT(または、水平活性度ACT_H、および、垂直活性度ACT_V)に基づいて対象単位領域を複数のタイプの何れかに分類する構成を例に挙げたが、本実施形態はこれに限定されるものではない。以下では、対象単位領域におけるデブロック済復号画像P_DBの特性値として画素値の平均(平均画素値とも呼ぶ)を算出し、算出された平均画素値に基づいて対象単位領域を複数のタイプの何れかに分類する構成について説明する。
<Modification 2>
In the above description, the adaptive filter 17 causes the region characteristic value calculation unit 171 to use the activity ACT (or the horizontal activity ACT_H and the vertical activity ACT_V as the characteristic value of the deblocked decoded image P_DB in the target unit region. ) And the region classification unit 172 classifies the target unit region into one of a plurality of types based on the activity ACT (or horizontal activity ACT_H and vertical activity ACT_V). Although mentioned, this embodiment is not limited to this. Hereinafter, an average of pixel values (also referred to as an average pixel value) is calculated as the characteristic value of the deblocked decoded image P_DB in the target unit region, and the target unit region is selected from a plurality of types based on the calculated average pixel value. A configuration to be classified will be described.
 図10は、本変形例に係る適応フィルタ17の構成を示すブロック図である。図10に示すように、本変形例に係る適応フィルタ17における領域特性値算出部171は、画素値参照部171bを備えている。 FIG. 10 is a block diagram showing the configuration of the adaptive filter 17 according to this modification. As shown in FIG. 10, the region characteristic value calculation unit 171 in the adaptive filter 17 according to this modification includes a pixel value reference unit 171 b.
 画素値参照部171bは、処理対象となる対象単位領域におけるデブロック済復号画像P_DBの各画素値をフレームメモリ15から読み出し、それらの画素値の平均をとることによって平均画素値MPを算出する。 The pixel value reference unit 171b 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 frame memory 15 and taking the average of the pixel values.
 対象単位領域がBx画素×By画素の矩形状である場合、対象単位領域における各画素の座標を(i、j)(i、jはそれぞれ0≦i≦Bx-1、0≦j≦By-1を満たす整数)と表し、その座標におけるデブロック済復号画像P_DBの画素値をS(i、j)と表すことにすると、画素値参照部171bは、例えば、以下の数式(3)を用いて、各画素値の単純平均をとることによって、平均画素値MPを算出することができる。 When the target unit area has a rectangular shape of Bx pixels × By pixels, the coordinates of each pixel in the target unit area are (i, j) (i and j are 0 ≦ i ≦ Bx−1 and 0 ≦ j ≦ By−, respectively). 1), and the pixel value of the deblocked decoded image P_DB at that coordinate is represented as S (i, j), the pixel value reference unit 171b uses, for example, the following formula (3): Thus, the average pixel value MP can be calculated by taking a simple average of the pixel values.
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000007
 なお、画素値参照部171bは、各画素値の単純平均をとることに代えて、各画素値について所定の重み係数を用いた加重平均をとることによって平均画素値MPを算出する構成としてもよい。 The pixel value reference unit 171b may be configured to calculate the average pixel value MP by taking a weighted average using a predetermined weight coefficient for each pixel value instead of taking a simple average of each pixel value. .
 本変形例に係る領域分類部172は、対象単位領域についての特性値として領域特性値算出部171が算出した平均画素値MPに基づいて、対象単位領域を複数のタイプの何れかに分類する。対象単位領域はさらにタイプによって、フィルタオン領域もしくはフィルタオフ領域に分類される。対象単位領域がフィルタオン領域に分類される場合には、領域分類部172は、可変長符号復号部11から供給されるフィルタパラメータFPに含まれるフィルタ係数群であって、対象単位領域の属するタイプに対応したフィルタ係数群を、対象単位領域に割り付ける。一方で、対象単位領域がフィルタオフ領域に分類される場合には、領域分類部172は、対象単位領域に対してフィルタ係数群を割り付けない。 The region classification unit 172 according to this modification classifies the target unit region into one of a plurality of types based on the average pixel value MP calculated by the region characteristic value calculation unit 171 as the characteristic value for the target unit region. The target unit area is further classified into a filter-on area or a filter-off area depending on the type. When the target unit region is classified as a filter-on region, the region classification unit 172 is a filter coefficient group included in the filter parameter FP supplied from the variable length code decoding unit 11, and includes a type to which the target unit region belongs. Are assigned to the target unit area. On the other hand, when the target unit region is classified as the filter-off region, the region classification unit 172 does not assign a filter coefficient group to the target unit region.
 また、領域分類部172は、(1)対象単位領域がフィルタオンタイプに分類されたのか、フィルタオフタイプに分類されたのかを示すオンオフ情報U、および、(2)対象単位領域がフィルタオンタイプに分類された場合には、対象単位領域に割り付けられたフィルタ係数群、をフィルタ処理部173に供給する。 The area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is a filter on type. In the case of the classification, the filter coefficient group allocated to the target unit area is supplied to the filter processing unit 173.
 以下では、本変形例に係る領域分類部172による分類処理の具体例の説明に先立ち、図11を参照しつつ発明者によって得られた実験データについて説明を行う。 Hereinafter, the experimental data obtained by the inventor will be described with reference to FIG. 11 prior to description of a specific example of the classification processing by the region classification unit 172 according to the present modification.
 図11(a)は、発明者によって得られた実験データを示すグラフであって、量子化パラメータの値が32である複数のシーケンス(「PartyScene_q32」、「RaceHorses_q32」、「BQSquare_q32」)についての、単位領域毎の平均画素値と、各単位領域について適応フィルタ処理を施した場合に得られる二乗誤差削減量とを示すグラフである。ここで、二乗誤差削減量は、符号化効率と正の相関を有しており、二乗誤差削減量が大きいほど符号化効率が向上することを示している。また、二乗誤差削減量が負である単位領域は、符号化効率に対して負の寄与、すなわち、符号化効率を低減させる寄与を有していることを示している。 FIG. 11A is a graph showing experimental data obtained by the inventor, and is for a plurality of sequences (“PartyScene_q32”, “RaceHorses_q32”, “BQSquare_q32”) having a quantization parameter value of 32. It is a graph which shows the average pixel value for every unit area | region, and the square error reduction amount obtained when an adaptive filter process is performed about each unit area | region. Here, the square error reduction amount has a positive correlation with the coding efficiency, and indicates that the larger the square error reduction amount, the better the coding efficiency. Further, it is indicated that the unit area in which the square error reduction amount is negative has a negative contribution to the coding efficiency, that is, a contribution to reduce the coding efficiency.
 図11(a)に示すように、何れのシーケンスについても、二乗誤差削減量が負となる活性度の範囲が存在する。具体的には、
・シーケンス「PartyScene_q32」については、平均画素値が略30以下の範囲、および、平均画素値が230以上の範囲
・シーケンス「RaceHorses_q32」については、平均画素値が略40以上50以下の範囲、および、平均画素値が225以上の範囲
・シーケンス「BQSquare_q32」については、平均画素値が略30以下の範囲、および、平均画素値が略235以上の範囲
の各範囲において、二乗誤差削減量が負となっている。
As shown in FIG. 11A, there is an activity range in which the square error reduction amount is negative for any sequence. In particular,
For the sequence “PartyScene_q32”, a range in which the average pixel value is approximately 30 or less, and a range in which the average pixel value is 230 or more. For the sequence “RaceHorses_q32”, a range in which the average pixel value is approximately 40 to 50, and For the range / sequence “BQSquare_q32” where the average pixel value is 225 or more, the square error reduction amount is negative in the range where the average pixel value is about 30 or less and the range where the average pixel value is about 235 or more. ing.
 図11(b)は、各平均画素値における二乗誤差削減量について、複数のシーケンスについての平均(「average」)と、各平均画素値を有する単位領域の総数(「count」)とを示すグラフである。 FIG. 11B is a graph showing the average (“average”) for a plurality of sequences and the total number of unit areas (“count”) having each average pixel value for the square error reduction amount at each average pixel value. It is.
 図11(b)に示すように、複数のシーケンスの平均を示すグラフの値は、平均画素値が略30以下の範囲、および、平均画素値が略230以上の範囲において負となっている。 As shown in FIG. 11B, the value of the graph indicating the average of a plurality of sequences is negative in the range where the average pixel value is about 30 or less and in the range where the average pixel value is about 230 or more.
 このように、各シーケンスについて、二乗誤差削減量が負になる平均画素値の範囲が存在する。発明者は、上記の実験データに基づき、二乗誤差削減量が負になる平均画素値を有する単位領域については、適応フィルタ処理を行わない構成とすることによって、符号化効率が向上するとの知見を得た。 Thus, for each sequence, there is a range of average pixel values where the square error reduction amount is negative. Based on the above experimental data, the inventor has found that the coding efficiency is improved by adopting a configuration in which the adaptive filter processing is not performed for the unit region having the average pixel value in which the square error reduction amount is negative. Obtained.
 以下では、本変形例に係る領域分類部172による分類処理の具体例を、図12を参照して説明する。領域分類部172は、以下の(分類処理例3-1)~(分類処理例3-7)のうち、何れかの分類処理を行う構成とすることができる。また、以下の(分類処理例3-1)~(分類処理例3-7)のうち、何れの分類処理を行うのかを指定する分類処理指定情報を符号化データ#1に含めておき、領域分類部172は、(分類処理例3-1)~(分類処理例3-7)のうち、当該分類処理指定情報によって指定される分類処理を選択的に行う構成としてもよい。 Hereinafter, a specific example of the classification processing by the region classification unit 172 according to the present modification will be described with reference to FIG. The region classification unit 172 can be configured to perform any of the classification processes among the following (classification process examples 3-1) to (classification process examples 3-7). In addition, among the following (Classification Processing Example 3-1) to (Classification Processing Example 3-7), classification processing designation information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform a classification process designated by the classification process designation information among (Classification process examples 3-1) to (Classification process examples 3-7).
 なお、以下の説明では、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。また、領域分類部172は、タイプI(I=1~Non)に分類された対象単位領域に対して、フィルタ係数群Iを割り付けるものとする。 In the following description, it is assumed that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types. The region classification unit 172 assigns the filter coefficient group I to the target unit region classified as type I (I = 1 to Non).
 (分類処理例3-1)
 本処理例においては、領域分類部172は、図12(a)に示すように、対象単位領域を以下のように分類する。
(Classification example 3-1)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:MP≦ThM1
 ・タイプ1:ThM1<MP
 ここで、ThM1は予め定められた閾値を示している。閾値ThM1の具体的な値は、図11に示した実験データ等を鑑み、例えば、シーケンス毎に予め定められた値を用いればよい。具体的には、
・シーケンス「PartyScene_q32」については、Th1M=30
・シーケンス「RaceHorses_q32」については、Th1M=50
・シーケンス「BQSquare_q32」については、Th1M=30
を用いればよい。また、閾値Th1Mをシーケンスによらずに定める場合には、ThM1=30を用いればよい。
・ Type 0: MP ≦ ThM1
・ Type 1: ThM1 <MP
Here, ThM1 indicates a predetermined threshold value. The specific value of the threshold ThM1 may be, for example, a value determined in advance for each sequence in view of the experimental data shown in FIG. In particular,
-For the sequence "PartyScene_q32", Th1M = 30
-For the sequence “RaceHorses_q32”, Th1M = 50
-For the sequence “BQSquare_q32”, Th1M = 30
May be used. Further, when the threshold Th1M is determined without depending on the sequence, ThM1 = 30 may be used.
 このように、平均画素値が予め定められた閾値以下である単位領域をタイプ0、すなわち、適応フィルタ処理を行わない単位領域に設定することによって、符号化効率に対する負の寄与を削減することができるので、符号化効率が向上する。 In this way, by setting a unit region whose average pixel value is equal to or less than a predetermined threshold as a type region 0, that is, a unit region that is not subjected to adaptive filter processing, negative contribution to coding efficiency can be reduced. As a result, encoding efficiency is improved.
 (分類処理例3-2)
 本処理例においては、領域分類部172は、図12(b)に示すように、対象単位領域を以下のように分類する。
(Classification example 3-2)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:MP≦ThM1
 ・タイプ1:ThM1<MP≦ThM2
 ・タイプ2:ThM2<MP
 ここで、ThM2は、予め定められた閾値を示しており、ThM1<ThM2を満たしているものとする。閾値ThM2の具体的な値は、符号化効率が向上するように予め定めておけばよい。
・ Type 0: MP ≦ ThM1
Type 1: ThM1 <MP ≦ ThM2
・ Type 2: ThM2 <MP
Here, ThM2 indicates a predetermined threshold value, and it is assumed that ThM1 <ThM2. A specific value of the threshold ThM2 may be determined in advance so that encoding efficiency is improved.
 本処理例においても、平均画素値が予め定められた閾値以下である単位領域をタイプ0、すなわち、適応フィルタ処理を行わない単位領域に設定する。したがって、符号化効率に対する負の寄与を削減することができるので、符号化効率が向上する。また、フィルタ処理をオンにする単位領域については、平均画素値の値に応じて、複数のフィルタ係数群の何れかを適用するので、符号化効率の更なる向上を図ることができる。なお、本処理例における閾値ThM2の具体的な値は、符号化効率が向上するように予め定められた値を用いることが好ましい。 Also in this processing example, a unit area whose average pixel value is equal to or less than a predetermined threshold is set to type 0, that is, a unit area for which no adaptive filter processing is performed. Therefore, the negative contribution to the coding efficiency can be reduced, so that the coding efficiency is improved. In addition, since any one of a plurality of filter coefficient groups is applied to the unit area where the filter processing is turned on according to the value of the average pixel value, the encoding efficiency can be further improved. It should be noted that a specific value of the threshold value ThM2 in the present processing example is preferably a value determined in advance so that the encoding efficiency is improved.
 (分類処理例3-3)
 本処理例においては、領域分類部172は、図12(c)に示すように、対象単位領域を以下のように分類する。
(Classification example 3-3)
In the present processing example, the area classification unit 172 classifies the target unit area as follows as shown in FIG.
 ・タイプ1:MP≦ThM2
 ・タイプ0:ThM2<MP
 ここで、ThM2は予め定められた閾値を示している。閾値ThM2の具体的な値は、図11に示した実験データ等を鑑み、例えば、シーケンス毎に予め定められた値を用いればよい。具体的には、
・シーケンス「PartyScene_q32」については、Th2M=230
・シーケンス「RaceHorses_q32」については、Th2M=225
・シーケンス「BQSquare_q32」については、Th2M=235
を用いればよい。また、閾値Th2Mをシーケンスによらずに定める場合には、ThM2=230を用いればよい。
・ Type 1: MP ≦ ThM2
・ Type 0: ThM2 <MP
Here, ThM2 indicates a predetermined threshold value. As a specific value of the threshold ThM2, for example, a value predetermined for each sequence may be used in view of the experimental data shown in FIG. In particular,
For the sequence “PartyScene_q32”, Th2M = 230
-For the sequence “RaceHorses_q32”, Th2M = 225
-For the sequence “BQSquare_q32”, Th2M = 235
May be used. Further, when the threshold Th2M is determined without depending on the sequence, ThM2 = 230 may be used.
 このように、平均画素値が予め定められた閾値以上である単位領域をタイプ0、すなわち、適応フィルタ処理を行わない単位領域に設定することによって、符号化効率に対する負の寄与を削減することができるので、符号化効率が向上する。 In this way, by setting a unit region whose average pixel value is equal to or greater than a predetermined threshold as a type region 0, that is, a unit region that is not subjected to adaptive filter processing, negative contribution to coding efficiency can be reduced. As a result, encoding efficiency is improved.
 (分類処理例3-4)
 本処理例においては、領域分類部172は、図12(d)に示すように、対象単位領域を以下のように分類する。
(Classification example 3-4)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ1:MP≦ThM1
 ・タイプ2:ThM1<MP≦ThM2
 ・タイプ0:ThM2<MP
 ここで閾値ThM2の具体的な値は、分類処理例3-3と同様に定めておけばよい。また、閾値ThM1の具体的な値は、符号化効率が向上するように予め定めておけばよい。このような閾値ThM1およびThM2を用いることによって、符号化効率を効果的に向上させることができる。
・ Type 1: MP ≦ ThM1
・ Type 2: ThM1 <MP ≦ ThM2
・ Type 0: ThM2 <MP
Here, a specific value of the threshold ThM2 may be determined in the same manner as in the classification processing example 3-3. In addition, a specific value of the threshold ThM1 may be determined in advance so that encoding efficiency is improved. By using such threshold values ThM1 and ThM2, the encoding efficiency can be effectively improved.
 (分類処理例3-5)
 本処理例においては、領域分類部172は、図12(e)に示すように、対象単位領域を以下のように分類する。
(Classification example 3-5)
In the present processing example, the area classification unit 172 classifies the target unit area as follows as shown in FIG.
 ・タイプ0:MP≦ThM1、または、ThM2<MP
 ・タイプ2:ThM1<MP≦ThM2
 ここで、本処理例における閾値ThM1の具体的な値は、分類処理例3-1と同様に定めておけばよい。また、本処理例における閾値ThM2の具体的な値は、分類処理例3-3と同様に定めておけばよい。
Type 0: MP ≦ ThM1 or ThM2 <MP
・ Type 2: ThM1 <MP ≦ ThM2
Here, the specific value of the threshold ThM1 in this processing example may be determined in the same manner as in the classification processing example 3-1. The specific value of the threshold ThM2 in this processing example may be determined in the same manner as in the classification processing example 3-3.
 このような閾値ThM1およびThM2を用いることによって、符号化効率を効果的に向上させることができる。 The encoding efficiency can be effectively improved by using such threshold values ThM1 and ThM2.
 (分類処理例3-6)
 本処理例においては、領域分類部172は、図12(f)に示すように、対象単位領域を以下のように分類する。
(Classification example 3-6)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ1:ACT≦ThM1
 ・タイプ2:ThM1<ACT≦ThM2
 ・タイプ3:ThM2<ACT
 ここで、本処理例における閾値ThM1およびThM2の具体的な値は、符号化効率を向上させるように予め定めておけばよい。
・ Type 1: ACT ≦ ThM1
・ Type 2: ThM1 <ACT ≦ ThM2
・ Type 3: ThM2 <ACT
Here, the specific values of the threshold values ThM1 and ThM2 in this processing example may be determined in advance so as to improve the encoding efficiency.
 本処理例においては、対象単位領域における平均画素値の値に応じて、フィルタ係数群を切り替えることができるので、符号化効率が向上する。 In the present processing example, the filter coefficient group can be switched according to the value of the average pixel value in the target unit region, so that the encoding efficiency is improved.
 (分類処理例3-7)
 以上、領域分類部172が平均画素値MPを予め定められた閾値と比較することによって、対象単位領域についてのフィルタ処理のオンオフを決定する処理例について説明を行ったが、本実施形態はこれに限られるものではない。
(Classification example 3-7)
As described above, the processing example in which the region classification unit 172 determines the on / off of the filtering process for the target unit region by comparing the average pixel value MP with a predetermined threshold value has been described. It is not limited.
 例えば、フィルタパラメータFPに、各タイプについてのフィルタ処理のオンオフを指定するオンオフ指定情報Vを含めておき、領域分類部172は、このオンオフ指定情報Vを参照することによって、タイプ毎にフィルタ処理のオンオフを決定してもよい。以下では、図12(g)を参照して、このような分類処理例について説明する。なお、オンオフ指定情報Vは、上述したオンオフ情報Uとは異なり、フィルタ処理のオンオフを各タイプについて指定する情報であるため、そのビット長はタイプの総数に依存する。 For example, the filter parameter FP includes on / off designation information V for designating the on / off of the filter processing for each type, and the area classification unit 172 refers to the on / off designation information V, thereby performing the filter processing for each type. On / off may be determined. Hereinafter, an example of such a classification process will be described with reference to FIG. Unlike the above-described on / off information U, the on / off designation information V is information for designating the on / off of the filtering process for each type, and therefore the bit length depends on the total number of types.
 以下の説明では、タイプの総数が4であり、フィルタパラメータFPには、各タイプについてのフィルタ処理のオンオフを指定する情報として、4ビットのオンオフ指定情報Vが含まれている場合について説明する。ただし、本処理例はこれに限定されず、一般にタイプの総数がNtpであり、フィルタパラメータFPにNtpビットのオンオフ指定情報Vが含まれている場合に適用することができる。 In the following description, a case is described in which the total number of types is 4, and the filter parameter FP includes 4-bit on / off designation information V as information for designating on / off of the filter processing for each type. However, the present processing example is not limited to this, and is generally applicable when the total number of types is Ntp and the filter parameter FP includes Ntp bit on / off designation information V.
 図12(g)は、本処理例における分類処理を示す図である。図12(g)に示すように、領域分類部172は、対象単位領域を以下のように分類する。
・タイプA:MP≦ThM
・タイプB:ThM<MP≦2×ThM
・タイプC:2×ThM<MP≦3×ThM
・タイプD:3×ThM<MP
 また、領域分類部172は、フィルタパラメータFPに含まれるオンオフ指定情報Vを参照し、各タイプについてのフィルタ処理のオンオフを決定する。例えば、オンオフ指定情報Vが2進表現で「0101」である場合には、タイプAおよびタイプCをフィルタオフタイプに設定し、タイプBおよびタイプDをフィルタオンタイプに設定する。
FIG. 12G is a diagram illustrating a classification process in this process example. As shown in FIG. 12G, the region classification unit 172 classifies the target unit region as follows.
・ Type A: MP ≦ ThM
・ Type B: ThM <MP ≦ 2 × ThM
・ Type C: 2 × ThM <MP ≦ 3 × ThM
・ Type D: 3 × ThM <MP
Further, the region classification unit 172 refers to the on / off designation information V included in the filter parameter FP, and determines the on / off of the filter processing for each type. For example, when the on / off designation information V is “0101” in binary expression, type A and type C are set to the filter off type, and type B and type D are set to the filter on type.
 領域分類部172は、対象単位領域がフィルタオンタイプに属する場合には、当該対象単位領域に対して、フィルタパラメータFPに含まれるフィルタ係数群を割り付ける。ここで、フィルタパラメータFPに複数のフィルタ係数群が含まれている場合には、符号化データ#1を生成する動画像符号化装置2において用いられた選択規則と同じ選択規則を用いて、当該複数のフィルタ係数群のうち何れかのフィルタ係数群を選択し、対象単位領域に割り付ければよい。 When the target unit region belongs to the filter on type, the region classification unit 172 assigns a filter coefficient group included in the filter parameter FP to the target unit region. Here, when a plurality of filter coefficient groups are included in the filter parameter FP, the same selection rule as the selection rule used in the moving image encoding device 2 that generates the encoded data # 1 is used. Any one of the plurality of filter coefficient groups may be selected and assigned to the target unit area.
 一方で、対象単位領域がフィルタオフタイプに属する場合には、領域分類部172は、対象単位領域に対してフィルタ係数群を割り付けない。 On the other hand, when the target unit region belongs to the filter-off type, the region classification unit 172 does not assign a filter coefficient group to the target unit region.
 領域分類部172は、(1)対象単位領域がフィルタオンタイプに分類されたのか、フィルタオフタイプに分類されたのかを示すオンオフ情報U、および、(2)対象単位領域がフィルタオンタイプに分類された場合には、対象単位領域に割り付けられたフィルタ係数群、をフィルタ処理部173に供給する。 The area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is classified as a filter on type. If it is, the filter coefficient group assigned to the target unit area is supplied to the filter processing unit 173.
 本処理例においても、平均画素値の範囲毎にフィルタ処理のオンオフを切り替えることができるので、符号化効率が向上する。 Also in this processing example, since the filter processing can be switched on and off for each range of the average pixel value, the encoding efficiency is improved.
 <変形例3>
 上述した変形例2においては、領域特性値算出部171の備える画素値参照部171bが、処理対象となる対象単位領域におけるデブロック済復号画像P_DBの特性値として、各画素値の平均をとることによって平均画素値MPを算出し、領域分類部172が、平均画素値MPに基づいて対象単位領域を複数のタイプの何れかに分類する構成について説明したが、画素値を利用する分類の仕方はこれに限定されるものではない。
<Modification 3>
In Modification 2 described above, the pixel value reference unit 171b included in the region characteristic value calculation unit 171 takes the average of the pixel values as the characteristic value of the deblocked decoded image P_DB in the target unit region to be processed. In the above description, the average pixel value MP is calculated, and the region classification unit 172 classifies the target unit region into one of a plurality of types based on the average pixel value MP. It is not limited to this.
 本変形例においては、領域特性値算出部171の備える画素値参照部171bが、対象単位領域におけるデブロック済復号画像P_DBの特性値として、各画素値の平均画素値MPおよび分散VPを算出し、領域分類部172が、平均画素値MPおよび分散VPに基づいて対象単位領域を複数のタイプの何れかに分類する。 In this modification, the pixel value reference unit 171b included in the region characteristic value calculation unit 171 calculates the average pixel value MP and the variance VP of each pixel value as the characteristic value of the deblocked decoded image P_DB in the target unit region. The area classification unit 172 classifies the target unit area into one of a plurality of types based on the average pixel value MP and the variance VP.
 ここで、対象単位領域がBx画素×By画素の矩形状である場合、対象単位領域における各画素の座標を(i、j)(i、jはそれぞれ0≦i≦Bx-1、0≦j≦By-1を満たす整数)と表し、その座標におけるデブロック済復号画像P_DBの画素値をS(i、j)と表すことにすると、画素値参照部171bは、例えば、以下の数式(4)を用いて分散VPを算出することができる。 Here, if the target unit area is a rectangle of Bx pixels × By pixels, the coordinates of each pixel in the target unit area are (i, j) (i and j are 0 ≦ i ≦ Bx−1 and 0 ≦ j, respectively). ≦ By−1), and the pixel value of the deblocked decoded image P_DB at the coordinates is represented by S (i, j), the pixel value reference unit 171b may, for example, ) Can be used to calculate the variance VP.
Figure JPOXMLDOC01-appb-M000008
Figure JPOXMLDOC01-appb-M000008
 なお、画素値参照部171bによって算出される分散VPは、上述した活性度ACTと同様に、対象単位領域におけるデブロック済復号画像P_DBの乱雑さを示す指標として機能する。 Note that the variance VP calculated by the pixel value reference unit 171b functions as an index indicating the randomness of the deblocked decoded image P_DB in the target unit region, similarly to the activity ACT described above.
 また、本変形例に係る画素値参照部171bは、例えば、数式(3)を用いて平均画素値MPを算出する。 In addition, the pixel value reference unit 171b according to this modification example calculates the average pixel value MP using, for example, Equation (3).
 本変形例に係る領域分類部172は、対象単位領域についての特性値として領域特性値算出部171が算出した平均画素値MPおよび分散VPに基づいて、対象単位領域を複数のタイプの何れかに分類する。ここで、上記複数のタイプには、フィルタ処理がオフであるタイプ(フィルタオフタイプ)、および、フィルタ処理がオンであるタイプ(フィルタオンタイプ)の双方が含まれる。対象単位領域がフィルタオンタイプに属する場合には、領域分類部172は、可変長符号復号部11から供給されるフィルタパラメータFPに含まれるフィルタ係数群であって、対象単位領域の属するタイプに対応したフィルタ係数群を、対象単位領域に割り付ける。一方で、対象単位領域がフィルタオフタイプに属する場合には、領域分類部172は、対象単位領域に対してフィルタ係数群を割り付けない。 The area classification unit 172 according to the present modification example sets the target unit area to one of a plurality of types based on the average pixel value MP and the variance VP calculated by the area characteristic value calculation unit 171 as the characteristic values for the target unit area. Classify. Here, the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type). When the target unit region belongs to the filter-on type, the region classification unit 172 is a filter coefficient group included in the filter parameter FP supplied from the variable length code decoding unit 11, and corresponds to the type to which the target unit region belongs. The assigned filter coefficient group is assigned to the target unit area. On the other hand, when the target unit region belongs to the filter-off type, the region classification unit 172 does not assign a filter coefficient group to the target unit region.
 また、領域分類部172は、(1)対象単位領域がフィルタオンタイプに分類されたのか、フィルタオフタイプに分類されたのかを示すオンオフ情報U、および、(2)対象単位領域がフィルタオンタイプに分類された場合には、対象単位領域に割り付けられたフィルタ係数群、をフィルタ処理部173に供給する。 The area classification unit 172 includes (1) on / off information U indicating whether the target unit area is classified as a filter on type or a filter off type, and (2) the target unit area is a filter on type. In the case of the classification, the filter coefficient group allocated to the target unit area is supplied to the filter processing unit 173.
 以下では、本変形例に係る領域分類部172による分類処理の具体例を、図16を参照して説明する。領域分類部172は、以下の(分類処理例4-1)~(分類処理例4-2)のうち、何れかの分類処理を行う構成とすることができる。また、以下の(分類処理例4-1)~(分類処理例4-2)のうち、何れの分類処理を行うのかを指定する分類処理指定情報を符号化データ#1に含めておき、領域分類部172は、(分類処理例4-1)~(分類処理例4-2)のうち、当該分類処理指定情報によって指定される分類処理を選択的に行う構成としてもよい。 Hereinafter, a specific example of the classification processing by the region classification unit 172 according to this modification will be described with reference to FIG. The region classification unit 172 may be configured to perform any of the classification processes from the following (Classification process example 4-1) to (Classification process example 4-2). Further, among the following (Classification Processing Example 4-1) to (Classification Processing Example 4-2), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 4-1) to (Classification process example 4-2).
 なお、以下の説明では、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。また、以下では、領域分類部172は、タイプI(I=1~Non)に分類された対象単位領域に対して、フィルタ係数群Iを割り付けるものとする。 In the following description, it is assumed that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types. In the following, it is assumed that the region classification unit 172 assigns the filter coefficient group I to the target unit region classified as type I (I = 1 to Non).
 (分類処理例4-1)
 本処理例においては、領域分類部172は、図13(a)に示すように、対象単位領域を以下のように分類する。
(Classification example 4-1)
In the present processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:VP≦ThV1
 ・タイプ1:ThV1<VP、かつ、MP≦ThM1
 ・タイプ2:ThV1<VP、かつ、ThM1<MP
 ここで、閾値ThM1、およびThV1は、符号化効率が向上するように定めておけばよい。
・ Type 0: VP ≦ ThV1
Type 1: ThV1 <VP and MP ≦ ThM1
Type 2: ThV1 <VP and ThM1 <MP
Here, the threshold values ThM1 and ThV1 may be determined so that the coding efficiency is improved.
 本処理例においては、分散VP、すなわち、画像の乱雑さが閾値ThV1以下である対象単位領域を、フィルタ処理を施さない単位領域に設定する。したがって、活性度ACTが所定の閾値以下である単位領域を、フィルタ処理を施さない単位領域に設定する構成と同様に、符号化効率が向上する。 In the present processing example, the distribution unit VP, that is, the target unit region in which the randomness of the image is equal to or less than the threshold value ThV1 is set as a unit region that is not subjected to the filtering process. Therefore, the encoding efficiency is improved as in the configuration in which the unit area whose activity ACT is equal to or less than the predetermined threshold is set as a unit area that is not subjected to the filtering process.
 また、分散VPの値が閾値ThM1より大きい場合には、平均画素値の大小に応じてフィルタ係数群を切り替えるので、符号化効率をより効果的に向上させることができる。 Further, when the value of the variance VP is larger than the threshold value ThM1, the filter coefficient group is switched according to the magnitude of the average pixel value, so that the coding efficiency can be improved more effectively.
 (分類処理例4-2)
 本処理例においては、領域分類部172は、図13(b)に示すように、対象単位領域を以下のように分類する。
(Classification example 4-2)
In the present processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:VP≦ThV1、または、Th2<VP、または、ThM2<MP
 ・タイプ1:ThV1<VP≦ThV2、かつ、MP≦ThM1
 ・タイプ2:ThV1<VP≦ThV2、かつ、ThM1<MP≦ThM1
 ここで、閾値ThM1、ThV1、および、ThM2は、符号化効率が向上するように定めておけばよい。また、閾値ThV2の値は、高い符号化効率を維持しつつ、処理量が削減するように定めておけばよい。
Type 0: VP ≦ ThV1, or Th2 <VP, or ThM2 <MP
Type 1: ThV1 <VP ≦ ThV2 and MP ≦ ThM1
Type 2: ThV1 <VP ≦ ThV2 and ThM1 <MP ≦ ThM1
Here, the threshold values ThM1, ThV1, and ThM2 may be determined so that the coding efficiency is improved. Further, the value of the threshold ThV2 may be determined so as to reduce the processing amount while maintaining high coding efficiency.
 本処理例においては、分散VPが閾値ThV1以下である単位領域、および、分散VPが閾値ThV2より大きい単位領域を、フィルタ処理を施さない単位領域に設定する。また、フィルタ処理を施す単位領域については、平均画素値の大小に応じてフィルタ係数群を切り替えるので、符号化効率を効果的に向上させることができる。 In the present processing example, the unit region where the variance VP is equal to or less than the threshold value ThV1 and the unit region where the variance VP is greater than the threshold value ThV2 are set as the unit region where the filter process is not performed. Further, since the filter coefficient group is switched according to the average pixel value for the unit area to be subjected to the filter process, the encoding efficiency can be effectively improved.
 <変形例4>
 以上、対象単位領域におけるデブロック済復号画像P_DBの特性値を算出し、算出された特性値に基づいて当該対象単位領域についてのフィルタ処理のオンオフを切り替える適応フィルタについて説明を行ったが、本実施形態はこれに限定されるものではない。
<Modification 4>
As described above, the characteristic value of the deblocked decoded image P_DB in the target unit area is calculated, and the adaptive filter that switches on / off the filter process for the target unit area based on the calculated characteristic value has been described. The form is not limited to this.
 本変形例においては、所定の分割深度までの符号化単位の各々についてフィルタ処理のオンオフを指定するオンオフフラグを符号化データ#1に含めておき、適応フィルタが、このオンオフフラグと、デブロック済復号画像P_DBの特性値とを参照してフィルタ処理のオンオフを切り替える構成について、図14および図15を参照して説明する。図14は、本変形例に係る符号化データ#1のフィルタパラメータFP(図14においてはalf_paramと表記)に含まれるシンタックスの一部を示す図である。 In this modification, an on / off flag for designating on / off of the filter processing is included in the encoded data # 1 for each of the encoding units up to a predetermined division depth, and the adaptive filter and the on / off flag are deblocked. A configuration for switching on / off of the filtering process with reference to the characteristic value of the decoded image P_DB will be described with reference to FIGS. 14 and 15. FIG. 14 is a diagram illustrating a part of syntax included in the filter parameter FP (denoted as alf_param in FIG. 14) of the encoded data # 1 according to the present modification.
 本変形例に係る符号化データ#1の構成は、上述した符号化データ#1の構成とほぼ同様であるが、以下の点において異なる。すなわち、図14に示すように、本変形例に係る符号化データ#1のフィルタパラメータFPには、(1)対象スライスについて適応フィルタ処理を施すか否かを指定するシンタックスadaptive_loop_filter_flag、(2)適応フィルタ処理のオンオフを符号化単位毎に制御するか否かを指定するシンタックスalf_cu_control_flag、(3)オンオフ制御の対象となる符号化単位についての、最大符号化単位からの最大分割深度(maximum split depth)を指定するシンタックス(階層指定情報)alf_cu_control_max_depth、(4)オンオフ制御の対象となる符号化単位の数を指定するシンタックスalf_length_cu_control_info、及び、(5)オンオフ制御の対象となる符号化単位の各々について、適応フィルタ処理のオンオフを指定するシンタックス(オンオフフラグ)alf_cu_flag [i]が含まれている。図15(a)~(d)は、それぞれ、alf_cu_control_max_depthの値が0~3である場合に、最大符号化単位LCUにおいてオンオフ制御の対象となる各符号化単位を、階層構造を表す分岐図と共に示している。 The configuration of the encoded data # 1 according to this modification is substantially the same as the configuration of the encoded data # 1 described above, but differs in the following points. That is, as shown in FIG. 14, in the filter parameter FP of the encoded data # 1 according to the present modification, (1) syntax adaptive_loop_filter_flag that specifies whether or not to perform adaptive filter processing on the target slice, (2) Syntax alf_cu_control_flag that specifies whether or not to turn on / off the adaptive filter processing for each coding unit, (3) Maximum division depth (maximum split) from the maximum coding unit for the coding unit that is the target of on / off control (depth) specifying syntax (hierarchy specifying information) alf_cu_control_max_depth, (4) syntax alf_length_cu_control_info specifying the number of coding units to be on / off controlled, and (5) coding unit to be on / off controlled Syntax (on / off flag) alf_cu_flag [i] that specifies on / off of adaptive filter processing for each It is included. FIGS. 15 (a) to 15 (d) show respective coding units to be subjected to on / off control in the maximum coding unit LCU when the value of alf_cu_control_max_depth is 0 to 3, together with a branch diagram showing a hierarchical structure. Show.
 図15(a)に示すように、alf_cu_control_max_depth=0のとき、フィルタパラメータFPには、最大符号化単位LCUの全体についてのオンオフフラグalf_cu_flag [0]が含まれる。 As shown in FIG. 15A, when alf_cu_control_max_depth = 0, the filter parameter FP includes an on / off flag alf_cu_flag [0] for the entire maximum coding unit LCU.
 図15(b)に示すように、alf_cu_control_max_depth=1のとき、フィルタパラメータFPには、最大符号化単位LCUより1階層下位の符号化単位0~3の各々についてのオンオフフラグalf_cu_flag [0]~alf_cu_flag [3]が含まれる。 As shown in FIG. 15B, when alf_cu_control_max_depth = 1, the filter parameter FP includes on / off flags alf_cu_flag [0] to alf_cu_flag for each of the encoding units 0 to 3 one layer lower than the maximum encoding unit LCU. [3] is included.
 図15(c)に示すように、alf_cu_control_max_depth=2のとき、フィルタパラメータFPには、最大符号化単位LCUより1階層下位の符号化単位0および符号化単位7、並びに、最大符号化単位LCUより2階層下位の符号化単位1~6の各々についてのオンオフフラグalf_cu_flag [0]~alf_cu_flag [7]が含まれる。 As shown in FIG. 15C, when alf_cu_control_max_depth = 2, the filter parameter FP includes encoding unit 0 and encoding unit 7 that are one layer lower than the maximum encoding unit LCU, and maximum encoding unit LCU. On / off flags alf_cu_flag [0] to alf_cu_flag [7] for each of the encoding units 1 to 6 in the lower hierarchy are included.
 図15(d)に示すように、alf_cu_control_max_depth=3のとき、フィルタパラメータFPには、最大符号化単位LCUより1階層下位の符号化単位0および符号化単位10、最大符号化単位LCUより2階層下位の符号化単位1~4および符号化単位9、並びに、最大符号化単位LCUより3階層下位の符号化単位5~8の各々についてのオンオフフラグalf_cu_flag [0]~alf_cu_flag [10]が含まれる。図16(a)は、本変形例に係る適応フィルタ17の備える領域分類部172が、対象単位領域についての特性値としての活性度ACTと、符号化データ#1より復号されたオンオフフラグであって、当該対象単位領域を含む符号化単位についてのオンオフフラグalf_cu_flag [i]とを参照して、対象単位領域をタイプ0およびタイプ1の何れかに分類する処理例を示している。 As shown in FIG. 15 (d), when alf_cu_control_max_depth = 3, the filter parameter FP includes coding unit 0 and coding unit 10 that are one layer lower than the maximum coding unit LCU, and two layers from the maximum coding unit LCU. On-off flags alf_cu_flag [0] to alf_cu_flag [10] are included for each of the lower encoding units 1 to 4, the encoding unit 9, and the encoding units 5 to 8 that are three layers lower than the maximum encoding unit LCU. . FIG. 16A shows an activity ACT as a characteristic value for the target unit region and an on / off flag decoded from the encoded data # 1 by the region classification unit 172 included in the adaptive filter 17 according to this modification. An example of processing for classifying the target unit region into either type 0 or type 1 with reference to the on / off flag alf_cu_flag_ [i] for the coding unit including the target unit region is shown.
 図16(a)に示すように、対象単位領域を含む符号化単位についてのオンオフフラグalf_cu_flag [i]が0であるとき、すなわち、オンオフフラグalf_cu_flag [i]が当該符号化単位についてフィルタ処理を行わないことを指定しているときには、領域分類部172は、特性値の大小に関わらず、対象単位領域をタイプ0に分類する。したがって、適応フィルタ17の備えるフィルタ処理部173は、このような対象単位領域に対して、フィルタ処理を行わない。 As shown in FIG. 16A, when the on / off flag alf_cu_flag_ [i] for the coding unit including the target unit region is 0, that is, the on / off flag alf_cu_flag [i] performs the filtering process on the coding unit. When it is specified that there is not, the area classification unit 172 classifies the target unit area as type 0 regardless of the magnitude of the characteristic value. Therefore, the filter processing unit 173 included in the adaptive filter 17 does not perform filter processing on such a target unit region.
 一方で、対象単位領域を含む符号化単位についてのオンオフフラグalf_cu_flag [i]が1であるとき、すなわち、オンオフフラグalf_cu_flag [i]が当該符号化単位についてフィルタ処理を行うことを指定しているとき、領域分類部172は、特性値の大小に応じて、対象単位領域を何れかのタイプに分類する。したがって、適応フィルタ17の備えるフィルタ処理部173は、オンオフフラグalf_cu_flag [i]が1であって、かつ、タイプ0以外のタイプに分類された対象単位領域に対してのみフィルタ処理を行う。 On the other hand, when the on / off flag alf_cu_flag [i] for the coding unit including the target unit region is 1, that is, when the on / off flag alf_cu_flag [i] specifies that the filtering process is performed for the coding unit. The area classification unit 172 classifies the target unit area into any type according to the magnitude of the characteristic value. Therefore, the filter processing unit 173 included in the adaptive filter 17 performs the filter process only on the target unit region whose on / off flag alf_cu_flag_ [i] is 1 and classified into a type other than type 0.
 なお、図16(a)においては、特性値として活性度を例に挙げているが、本変形例はこれに限定されるものではなく、特性値として平均画素値や方向性を用いてもよい。また、本変形例は、分類処理例1-1~1-7、2-1~2-4、3-1~3-7、および4-1~4-2において説明した特性値に基づく分類の何れかと、オンオフフラグalf_cu_flag [i]による分類とを組み合わせることによって得られる分類方法に広く適用することができる。 In FIG. 16A, the activity is exemplified as the characteristic value. However, the present modification is not limited to this, and an average pixel value or directionality may be used as the characteristic value. . In addition, the present modification is classified based on the characteristic values described in the classification processing examples 1-1 to 1-7, 2-1 to 2-4, 3-1 to 3-7, and 4-1 to 4-2. Can be widely applied to a classification method obtained by combining any of the above and classification based on the on / off flag alf_cu_flag [i].
 また、以下では、alf_cu_control_max_depth=0、および、alf_cu_control_max_depth=1である場合を例に挙げて説明を行うが、alf_cu_control_max_depth=2、および、alf_cu_control_max_depth=3の場合についても同様の処理を行うことができる。 In the following, the case where alf_cu_control_max_depth = 0 and alf_cu_control_max_depth = 1 will be described as an example, but the same processing can be performed for alf_cu_control_max_depth = 2 and alf_cu_control_max_depth = 3.
 図16(b)は、alf_cu_control_max_depth=0である場合であって、対象LCUについてのオンオフフラグalf_cu_flag [0]がオンを指定している場合に、当該対象LCUを分割して得られる単位領域UR0~UR6を示している。図16(b)において、タイプ0以外のタイプに分類された単位領域、すなわちフィルタ処理部173によって実際にフィルタ処理が行われる単位領域に斜線を付している。なお、図16(b)においては、各単位領域が、符号化データ#1に含まれるCU分割フラグSP_CUによって階層的に指定されるサイズおよび位置を有している場合を例示している。ただし、本変形例はこれに限定されず、各単位領域は、予め定められたサイズを有しているものであってもよい。 FIG. 16B shows a case where alf_cu_control_max_depth = 0, and when the on / off flag alf_cu_flag [0] for the target LCU specifies ON, unit areas UR0 to UR0 to be obtained by dividing the target LCU. UR6 is shown. In FIG. 16B, unit areas classified into types other than type 0, that is, unit areas that are actually subjected to filter processing by the filter processing unit 173 are hatched. FIG. 16B illustrates a case where each unit area has a size and a position that are hierarchically specified by the CU division flag SP_CU included in the encoded data # 1. However, the present modification is not limited to this, and each unit area may have a predetermined size.
 なお、特性算出を行う単位領域は、最小のCU(最小符号化単位)以下であることが好ましい。単位対象領域を最小符号化単位以下にすることにより、符号化単位で行われる制御単位と同じ、もしくはそれよりも細かい単位でフィルタ処理を切り替えることが可能である。 In addition, it is preferable that the unit area for calculating characteristics is equal to or less than the minimum CU (minimum coding unit). By setting the unit target area to be equal to or smaller than the minimum coding unit, it is possible to switch the filter processing in units that are the same as or smaller than the control unit performed in the coding unit.
 また、特性算出を行う単位領域は、4画素(2×2画素、1×4画素、4×1画素)以上の画素よりなる単位領域であることが好ましい。これにより、過度に細かい単位についてフィルタ処理のオンオフやフィルタ係数割り当てを切り替えることがないので、処理量を削減することができる。特性算出を行う単位領域が小さい場合には、算出された特性値を、フィルタ処理までの間、一時的に保持するためのメモリのサイズが大きくなるが、4画素以上とすることでメモリサイズを削減することができる。 Further, the unit area for calculating the characteristics is preferably a unit area composed of four or more pixels (2 × 2 pixels, 1 × 4 pixels, 4 × 1 pixels). As a result, on / off of filter processing and filter coefficient assignment are not switched for an excessively fine unit, the processing amount can be reduced. When the unit area for calculating the characteristic is small, the memory size for temporarily storing the calculated characteristic value until the filtering process is increased. However, the memory size can be reduced by using four or more pixels. Can be reduced.
 図16(c)は、alf_cu_control_max_depth=1である場合であって、各符号化単位CU0~3についてのオンオフフラグalf_cu_flag [i](i=0~3)のうち、alf_cu_flag [0]、alf_cu_flag [2]、および、alf_cu_flag [3]がオンを示しており、alf_cu_flag [1]がオフを示している場合に、各CUを分割して得られる単位領域UR00~UR33を示している。図16(c)においても、タイプ0以外のタイプに分類された単位領域に斜線を付している。なお、図16(c)においては、各単位領域が、予め定められたサイズを有している場合を例示している。ただし、本変形例はこれに限定されず、alf_cu_control_max_depthが0でない場合についても、図16(b)に示した例と同様に、各単位領域が、符号化データ#1に含まれるCU分割フラグSP_CUによって階層的に指定されるサイズおよび位置を有するものとしてもよい。 FIG. 16C shows a case where alf_cu_control_max_depth = 1, and alf_cu_flag [0], alf_cu_flag [2] among the on / off flags alf_cu_flag [i] (i = 0 to 3) for the respective coding units CU0 to CU3. ] And alf_cu_flag [3] indicate ON, and alf_cu_flag [1] indicates OFF, the unit regions UR00 to UR33 obtained by dividing each CU are illustrated. In FIG. 16C as well, the unit areas classified into types other than type 0 are shaded. FIG. 16C illustrates a case where each unit area has a predetermined size. However, the present modification is not limited to this, and even when alf_cu_control_max_depth is not 0, each unit area includes the CU partitioning flag SP_CU included in the encoded data # 1 as in the example illustrated in FIG. It is also possible to have a size and position specified hierarchically by.
 図16(b)~(c)から明らかなように、本変形例に係る適応フィルタ17は、alf_cu_control_max_depthによって指定される最大分割深度に対応する符号化単位よりも小さな単位でフィルタ処理のオンオフを切り替えることができる。すなわち、特性算出を行う単位領域を階層指定情報によらない小さな単位とすることにより、階層指定情報で指定される制御領域が大きい場合においても、より小さい単位でオンオフ制御を行うことができる。したがって、オンオフフラグの符号量を抑制しつつ、きめ細かなオンオフ制御を行うことができるので、符号化効率が向上する。 As is apparent from FIGS. 16B to 16C, the adaptive filter 17 according to the present modification switches on / off of the filter process in units smaller than the encoding unit corresponding to the maximum division depth specified by alf_cu_control_max_depth. be able to. That is, by setting the unit area for calculating the characteristics to a small unit that does not depend on the hierarchy designation information, even when the control area designated by the hierarchy designation information is large, the on / off control can be performed in a smaller unit. Therefore, since it is possible to perform fine on / off control while suppressing the code amount of the on / off flag, encoding efficiency is improved.
 また、特性算出を行う対象単位領域を、階層指定情報で定まる制御単位に応じて定める場合には、制御単位の構造にあわせて特性算出処理を行う必要がある。この場合、多くの分岐を有する複雑な処理となり演算量が大きくなり、また、ソフトウェアや回路の規模が増大する。上記のように、特性算出を行う対象単位領域を階層指定情報によらずに定まる場合には特性値算出の複雑性が低下する。 In addition, when the target unit area for performing characteristic calculation is determined according to the control unit determined by the hierarchy designation information, it is necessary to perform characteristic calculation processing according to the structure of the control unit. In this case, the processing becomes complicated with many branches, and the amount of calculation increases, and the scale of software and circuits increases. As described above, when the target unit area for performing characteristic calculation is determined without depending on the hierarchy designation information, the complexity of characteristic value calculation is reduced.
 <変形例5>
 (分類処理例2-4)および(分類処理例2-5)において、領域分類部172が、各方向の活性度に応じて方向性を識別する構成について説明を行ったが、方向性を識別するための構成は、これらの例に限定されるものではない。
<Modification 5>
In (Classification Processing Example 2-4) and (Classification Processing Example 2-5), the region classification unit 172 explained the configuration for identifying the directionality according to the activity in each direction. The configuration for doing this is not limited to these examples.
 本変形例における領域特性値算出部171は、図17に示すように、活性度算出部171aに加えて、方向性算出部171cを備えている。ここで、方向性算出部171cは、対象単位領域におけるデブロック済復号画像P_DBの方向性としてエッジ角度Thetaを算出する。また、方向性算出部171cは、算出されたエッジ角度Thetaを領域分類部172に供給する。領域分類部172は、活性度ACTおよびエッジ角度Thetaに応じて、フィルタタイプを選択する。 As shown in FIG. 17, the area characteristic value calculation unit 171 in the present modification includes a directionality calculation unit 171c in addition to the activity calculation unit 171a. Here, the directionality calculation unit 171c calculates the edge angle Theta as the directionality of the deblocked decoded image P_DB in the target unit region. In addition, the directionality calculation unit 171c supplies the calculated edge angle Theta to the region classification unit 172. The region classification unit 172 selects a filter type according to the activity ACT and the edge angle Theta.
 (方向性算出部171c)
 方向性算出部171cは、対象単位領域におけるデブロック済復号画像P_DBのエッジ角度Thetaを算出する。以下では、対象単位領域が1つの画素のみを含む場合、および、対象単位領域に複数の画素が含まれている場合の各々について、方向性算出部171cによる方向性の算出処理について説明を行う。
(Direction calculation unit 171c)
The directionality calculation unit 171c calculates the edge angle Theta of the deblocked decoded image P_DB in the target unit region. Hereinafter, the directionality calculation processing by the directionality calculation unit 171c will be described for each of the case where the target unit region includes only one pixel and the case where the target unit region includes a plurality of pixels.
 (対象単位領域が1つの画素のみを含む場合の方向性の算出処理)
 対象単位領域が1つの画素(対象画素)のみを含む場合、方向性算出部171cは、対象画素を中心とする3×3画素の参照領域を設定し、当該参照領域の各画素に対して、以下の数式によって定義されるソーベルフィルタ行列SFM_x、およびSFM_yを作用させることによって、ソーベルフィルタ後の画素値Sobel_xおよびSobel_yを算出する。
(Direction calculation processing when the target unit area includes only one pixel)
When the target unit region includes only one pixel (target pixel), the directionality calculation unit 171c sets a 3 × 3 pixel reference region centered on the target pixel, and for each pixel in the reference region, The pixel values Sobel_x and Sobel_y after the Sobel filter are calculated by applying the Sobel filter matrices SFM_x and SFM_y defined by the following equations.
Figure JPOXMLDOC01-appb-M000009
Figure JPOXMLDOC01-appb-M000009
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000010
 続いて、方向性算出部171cは、以下の数式によって、エッジ角度Thetaを算出する。 Subsequently, the directionality calculating unit 171c calculates the edge angle Theta by the following mathematical formula.
 Theta=arctan(Sobel_x/Sobel_y)
ここで、arctanは、三角関数tanの逆関数を表す。また、角度Thetaは、時計周りに増加するものとし、0度から180度までの範囲(0°≦Theta<180°)で表現されるものとする。
Theta = arctan (Sobel_x / Sobel_y)
Here, 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 °).
 (対象単位領域が複数の画素を含む場合のThetaの算出処理)
 対象単位領域が複数の画素を含む場合、方向性算出部171cは、まず、対象単位領域に含まれる各画素について、3×3画素の参照領域を設定し、上述した方法によって各画素についてのソーベルフィルタ後の画素値Sobel_xおよびSobel_yを算出する。
(Theta calculation process when the target unit region includes a plurality of pixels)
When the target unit region includes a plurality of pixels, the directionality calculation unit 171c first sets a reference region of 3 × 3 pixels for each pixel included in the target unit region, and performs a source search for each pixel by the method described above. Pixel values Sobel_x and Sobel_y after the bell filter are calculated.
 続いて、方向性算出部171cは、以下の数式によって、各画素についてのエッジ強度ESを算出し、最もエッジ強度ESの大きい画素についてのソーベルフィルタ後の画素値Sobel_xおよびSobel_yを用いて算出されたエッジ角度Thetaを領域分類部172に供給する。 Subsequently, the directionality calculation unit 171c calculates the edge strength ES for each pixel by the following mathematical formula, and uses the pixel values Sobel_x and Sobel_y after the Sobel filter for the pixel having the largest edge strength ES. The obtained edge angle Theta is supplied to the region classification unit 172.
 ES=(Sobel_x)2+(Sobel_y)2
 なお、方向性算出部171cは、エッジの角度を算出することなく、エッジ方向に対応する番号(方向インデックス)を出力する構成としても良い。
ES = (Sobel_x) 2 + (Sobel_y) 2
The directionality calculation unit 171c may be configured to output a number (direction index) corresponding to the edge direction without calculating the angle of the edge.
 例えば、三角関数tanの逆関数を用いるのではなく、Sobel_yとSobel_xの大小関係に応じて場合分けをすることによって、以下のように方向性インデックスを生成可能である。 For example, instead of using the inverse function of the trigonometric function tan, the direction index can be generated as follows by dividing the case according to the magnitude relation between Sobel_y and 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個の方向性インデックスを算出する構成としてもよい。
Direction index = 0 | Sobel_y | <a × | Sobel_x | Directionality index = 1 | Sobel_y | ≧ a × | Sobel_x | and | Sobel_y | ≦ b × | Sobel_x | and the signs of Sobel_y and Sobel_x are equal When index of index = 2 | Sobel_y |> b × | Sobel_x | Directionality index = 3 | Sobel_y | ≧ a × | Sobel_x | and | Sobel_y | ≦ b × | Sobel_x | and signs of Sobel_y and Sobel_x A = tan (22.5 °) = 0.414..., B = tan (67.5 °) = 2.414. In this example, four directional indexes are calculated. However, two directional indexes or eight directional indexes may be calculated.
 以下では、本変形例に係る領域分類部172による分類処理の具体例を、図18を参照して説明する。領域分類部172は、以下の(分類処理例5-1)~(分類処理例5-2)のうち、何れかの分類処理を行う構成とすることができる。また、以下の(分類処理例5-1)~(分類処理例5-2)のうち、何れの分類処理を行うのかを指定する分類処理指定情報を符号化データ#1に含めておき、領域分類部172は、(分類処理例5-1)~(分類処理例5-2)のうち、当該分類処理指定情報によって指定される分類処理を選択的に行う構成としてもよい。 Hereinafter, a specific example of the classification processing by the region classification unit 172 according to the present modification will be described with reference to FIG. The area classification unit 172 may be configured to perform any of the classification processes among the following (classification process example 5-1) to (classification process example 5-2). Further, among the following (Classification Processing Example 5-1) to (Classification Processing Example 5-2), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification Process Example 5-1) to (Classification Process Example 5-2).
 なお、以下の説明では、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。また、以下では、領域分類部172は、タイプI(I=1~Non)に分類された対象単位領域に対して、フィルタ係数群Iを割り付けるものとする。 In the following description, it is assumed that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types. In the following, it is assumed that the region classification unit 172 assigns the filter coefficient group I to the target unit region classified as type I (I = 1 to Non).
 (分類処理例5-1)
 本処理例においては、領域分類部172は、図18(a)に示すように、対象単位領域を以下のように分類する。
(Classification example 5-1)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th
 ・タイプ1:ACT>Thかつ(0°≦Theta<45°、または、135°≦Theta<180°)
 ・タイプ2:ACT>Thかつ45°≦Theta<135°
 本処理例においては、活性度ACTが所定の閾値Th以下である対象単位領域を、フィルタ処理を施さない単位領域に設定する。また、活性度ACTが閾値Thより大きい場合には、対象単位領域を、エッジ角度に応じて、2つのタイプの何れかに分類する。
・ Type 0: ACT ≦ Th
Type 1: ACT> Th and (0 ° ≦ Theta <45 ° or 135 ° ≦ Theta <180 °)
Type 2: ACT> Th and 45 ° ≦ Theta <135 °
In the present processing example, a target unit region whose activity ACT is equal to or less than a predetermined threshold Th is set as a unit region that is not subjected to filter processing. Further, when the activity ACT is larger than the threshold Th, the target unit region is classified into one of two types according to the edge angle.
 (分類処理例5-2)
 本処理例においては、領域分類部172は、図18(b)に示すように、対象単位領域を以下のように分類する。
(Classification example 5-2)
In this processing example, the region classification unit 172 classifies the target unit region as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1
 ・タイプ1:Th1<ACT≦Th2かつ(0°≦Theta<22.5°、または、157.5°≦Theta<180°)
 ・タイプ2:Th1<ACT≦Th2かつ22.5°≦Theta<67.5°
 ・タイプ3:Th1<ACT≦Th2かつ67.5°≦Theta<112.5°
 ・タイプ4:Th1<ACT≦Th2かつ112.5°≦Theta<157.5°
 ・タイプ5:ACT>Th2
 本処理例においては、活性度ACTが所定の閾値Th1以下である対象単位領域を、フィルタ処理を施さない単位領域に設定する。また、活性度ACTが閾値Th1より大きく、かつ閾値Th2以下である場合には、対象単位領域を、エッジ角度に応じて、4つのタイプ(タイプ1~タイプ4)の何れかに分類する。また、活性度ACTが閾値Th2より大きい場合には、対象単位領域をタイプ5に分類する。
・ Type 0: ACT ≦ Th1
Type 1: Th1 <ACT ≦ Th2 and (0 ° ≦ Theta <22.5 ° or 157.5 ° ≦ Theta <180 °)
Type 2: Th1 <ACT ≦ Th2 and 22.5 ° ≦ Theta <67.5 °
Type 3: Th1 <ACT ≦ Th2 and 67.5 ° ≦ Theta <112.5 °
Type 4: Th1 <ACT ≦ Th2 and 112.5 ° ≦ Theta <157.5 °
・ Type 5: ACT> Th2
In the present processing example, the target unit area whose activity ACT is equal to or less than the predetermined threshold Th1 is set as a unit area that is not subjected to the filter process. When the activity ACT is larger than the threshold value Th1 and equal to or smaller than the threshold value Th2, the target unit region is classified into one of four types (type 1 to type 4) according to the edge angle. When the activity ACT is larger than the threshold Th2, the target unit area is classified as type 5.
 なお、本変形例における分類処理は上述の例に限定されるものではなく、例えば、活性度ACTが閾値Th2より大きい場合に、対象単位領域を、エッジ角度に応じて、複数のタイプの何れかに分類する構成としてもよい。 Note that the classification process in the present modification is not limited to the above example. For example, when the activity ACT is larger than the threshold Th2, the target unit region is selected from any of a plurality of types according to the edge angle. It is good also as a structure classified into these.
 <変形例6>
 本変形例における領域特性値算出部171は、図19に示すように、活性度算出部171a、および画素値参照部171bの双方を備えている。領域分類部172は、活性度ACTおよび平均画素値MPに応じて、フィルタタイプを選択する。活性度算出部171aによる活性度の算出処理および画素値参照部171bによる平均画素値の算出処理については、既に説明したためここでは説明を省略する。
<Modification 6>
As shown in FIG. 19, the region characteristic value calculation unit 171 in this modification includes both an activity calculation unit 171a and a pixel value reference unit 171b. The region classification unit 172 selects a filter type according to the activity ACT and the average pixel value MP. Since the activity calculation processing by the activity calculation unit 171a and the average pixel value calculation processing by the pixel value reference unit 171b have already been described, description thereof will be omitted here.
 以下では、本変形例に係る領域分類部172による分類処理の具体例を、図20を参照して説明する。領域分類部172は、以下の(分類処理例6-1)~(分類処理例6-2)のうち、何れかの分類処理を行う構成とすることができる。また、以下の(分類処理例6-1)~(分類処理例6-2)のうち、何れの分類処理を行うのかを指定する分類処理指定情報を符号化データ#1に含めておき、領域分類部172は、(分類処理例6-1)~(分類処理例6-2)のうち、当該分類処理指定情報によって指定される分類処理を選択的に行う構成としてもよい。 Hereinafter, a specific example of the classification processing by the region classification unit 172 according to the present modification will be described with reference to FIG. The region classification unit 172 may be configured to perform any of the classification processes from the following (Classification process example 6-1) to (Classification process example 6-2). Further, among the following (Classification Processing Example 6-1) to (Classification Processing Example 6-2), classification processing designating information for designating which classification processing is performed is included in the encoded data # 1, and the region The classification unit 172 may be configured to selectively perform the classification process designated by the classification process designation information among (Classification process example 6-1) to (Classification process example 6-2).
 なお、以下の説明では、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。また、以下では、領域分類部172は、タイプI(I=1~Non)に分類された対象単位領域に対して、フィルタ係数群Iを割り付けるものとする。 In the following description, it is assumed that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types. In the following, it is assumed that the region classification unit 172 assigns the filter coefficient group I to the target unit region classified as type I (I = 1 to Non).
 (分類処理例6-1)
 本処理例においては、領域分類部172は、図20(a)に示すように、対象単位領域を以下のように分類する。
(Classification process example 6-1)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1、または、ACT>Th2、または、(Th1<ACT≦Th2かつMP≦ThM1)
 ・タイプ1:Th1<ACT≦Th2かつThM1<MP≦ThM2
 ・タイプ2:Th1<ACT≦Th2かつThM2<MP
 本処理例においては、活性度ACTが所定の閾値Th1以下である対象単位領域、および、活性度ACTが所定の閾値Th2より大きい対象単位領域を、フィルタ処理を施さない単位領域に設定する。また、活性度ACTが閾値Th1より大きくかつ閾値Th2以下であり、平均画素値MPが所定の閾値ThM1以下である対象単位領域も、フィルタ処理を施さない単位領域に設定する。また、活性度ACTが閾値Th1より大きくかつ閾値Th2以下であり、平均画素値MPが閾値ThM1より大きい場合には、平均画素値MPに応じて、タイプ1、および、タイプ2の何れかに分類する。
Type 0: ACT ≦ Th1, or ACT> Th2, or (Th1 <ACT ≦ Th2 and MP ≦ ThM1)
Type 1: Th1 <ACT ≦ Th2 and ThM1 <MP ≦ ThM2
Type 2: Th1 <ACT ≦ Th2 and ThM2 <MP
In this processing example, the target unit area whose activity ACT is equal to or smaller than the predetermined threshold Th1 and the target unit area whose activity ACT is larger than the predetermined threshold Th2 are set as unit areas not subjected to the filter process. Further, the target unit area whose activity ACT is larger than the threshold Th1 and equal to or smaller than the threshold Th2 and whose average pixel value MP is equal to or smaller than the predetermined threshold ThM1 is also set as a unit area not subjected to the filtering process. Further, when the activity ACT is larger than the threshold Th1 and equal to or smaller than the threshold Th2, and the average pixel value MP is larger than the threshold ThM1, it is classified into either type 1 or type 2 according to the average pixel value MP. To do.
 (分類処理例5-2)
 本処理例においては、領域分類部172は、図20(b)に示すように、対象単位領域を以下のように分類する。
(Classification example 5-2)
In this processing example, the area classification unit 172 classifies the target unit area as follows, as shown in FIG.
 ・タイプ0:ACT≦Th1、または、(Th1<ACT≦Th2かつMP≦ThM1)、または、(Th2<ACTかつMP≦ThM1)
 ・タイプ1:Th1<ACT≦Th2かつThM1<MP≦ThM2
 ・タイプ2:Th1<ACT≦Th2かつThM2<MP
 ・タイプ3:Th2<ACTかつThM1<MP
 本処理例においては、活性度ACTが所定の閾値Th1以下である対象単位領域を、フィルタ処理を施さない単位領域に設定する。また、平均画素値MPが所定の閾値ThM1以下である対象単位領域もフィルタ処理を施さない単位領域に設定する。また、活性度ACTが閾値Th1より大きくかつ閾値Th2以下であり、平均画素値MPが閾値ThM1より大きい場合には、平均画素値MPに応じて、タイプ1、および、タイプ2の何れかに分類する。また、活性度ACTが閾値Th2より大きく、平均画素値MPが閾値ThM1より大きい場合には、タイプ3に分類する。
Type 0: ACT ≦ Th1, or (Th1 <ACT ≦ Th2 and MP ≦ ThM1), or (Th2 <ACT and MP ≦ ThM1)
Type 1: Th1 <ACT ≦ Th2 and ThM1 <MP ≦ ThM2
Type 2: Th1 <ACT ≦ Th2 and ThM2 <MP
Type 3: Th2 <ACT and ThM1 <MP
In the present processing example, the target unit area whose activity ACT is equal to or less than the predetermined threshold Th1 is set as a unit area that is not subjected to the filter process. Further, the target unit region whose average pixel value MP is equal to or less than the predetermined threshold ThM1 is also set as a unit region that is not subjected to the filtering process. Further, when the activity ACT is larger than the threshold Th1 and equal to or smaller than the threshold Th2, and the average pixel value MP is larger than the threshold ThM1, it is classified into either type 1 or type 2 according to the average pixel value MP. To do. Further, when the activity ACT is larger than the threshold value Th2 and the average pixel value MP is larger than the threshold value ThM1, it is classified as type 3.
 (動画像符号化装置2)
 本実施形態に係る動画像符号化装置2の構成について図21~図25を参照して説明する。動画像符号化装置2は、その一部に、H.264/MPEG-4.AVC、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている技術、および、その後継コーデックであるTMuC(Test Model under Consideration)ソフトウェアに採用されている技術を含む符号化装置である。
(Moving picture encoding device 2)
The configuration of the video encoding device 2 according to the present embodiment will be described with reference to FIGS. The moving image encoding apparatus 2 includes H.264 as a part thereof. H.264 / MPEG-4. Coding including technology adopted in KTA software, which is a codec for joint development in AVC and VCEG (Video Coding Expert Group), and technology adopted in TMuC (Test Model under Consideration) software, which is the successor codec Device.
 図21は、動画像符号化装置2の構成を示すブロック図である。図21に示すように、動画像符号化装置2は、予測画像生成部21、変換・量子化部22、逆量子化・逆変換部23、加算器24、フレームメモリ25、デブロッキングフィルタ26、適応フィルタ27、可変長符号符号化部28、および、減算器29を備えている。また、図21に示すように、予測画像生成部21は、イントラ予測画像生成部21a、動きベクトル検出部21b、インター予測画像生成部21c、予測方式制御部21d、および、動きベクトル冗長性削除部21eを備えている。動画像符号化装置2は、動画像#10(符号化対象画像)を符号化することによって、符号化データ#1を生成する装置である。 FIG. 21 is a block diagram showing a configuration of the moving picture encoding apparatus 2. As illustrated in FIG. 21, the moving image encoding device 2 includes a predicted image generation unit 21, a transform / quantization unit 22, an inverse quantization / inverse transform unit 23, an adder 24, a frame memory 25, a deblocking filter 26, An adaptive filter 27, a variable length code encoding unit 28, and a subtractor 29 are provided. Further, as shown in FIG. 21, the predicted image generation unit 21 includes an intra predicted image generation unit 21a, a motion vector detection unit 21b, an inter predicted image generation unit 21c, a prediction method control unit 21d, and a motion vector redundancy deletion unit. 21e. The moving image encoding device 2 is a device that generates encoded data # 1 by encoding moving image # 10 (encoding target image).
 (予測画像生成部21)
 予測画像生成部21は、処理対象LCUを、1または複数の下位CUに再帰的に分割し、各リーフCUをさらに1または複数のパーティションに分割し、パーティション毎に、画面間予測を用いたインター予測画像Pred_Inter、または、画面内予測を用いたイントラ予測画像Pred_Intraを生成する。生成されたインター予測画像Pred_Interおよびイントラ予測画像Pred_Intraは、予測画像Predとして、加算器24および減算器29に供給される。
(Predicted image generation unit 21)
The predicted image generation unit 21 recursively divides the processing target LCU into one or a plurality of lower-order CUs, further divides each leaf CU into one or a plurality of partitions, and uses an inter-screen prediction for each partition. A predicted image Pred_Inter or an intra predicted image Pred_Intra using intra prediction is generated. The generated inter prediction image Pred_Inter and intra prediction image Pred_Intra are supplied to the adder 24 and the subtractor 29 as the prediction image Pred.
 なお、予測画像生成部21は、スキップモードの適応されたPUについては、当該PUに属する他のパラメータの符号化を省略する。また、(1)対象LCUにおける下位CUおよびパーティションへの分割の態様、(2)スキップモードを適用するか否か、および、(3)パーティション毎にインター予測画像Pred_Interおよびイントラ予測画像Pred_Intraの何れを生成するか、は、符号化効率を最適化するように決定される。 Note that the prediction image generation unit 21 omits encoding of other parameters belonging to the PU for the PU to which the skip mode is applied. Also, (1) the mode of division into lower CUs and partitions in the target LCU, (2) whether to apply the skip mode, and (3) which of the inter predicted image Pred_Inter and the intra predicted image Pred_Intra for each partition Whether to generate is determined so as to optimize the encoding efficiency.
 (イントラ予測画像生成部21a)
 イントラ予測画像生成部21aは、画面内予測によって、各パーティションに関する予測画像Pred_Intraを生成する。具体的には、(1)各パーティションついてイントラ予測に用いる予測モードを選択し、(2)選択した予測モードを用いて、復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部21aは、生成したイントラ予測画像Pred_Intraを、予測方式制御部21dに供給する。
(Intra predicted image generation unit 21a)
The intra predicted image generation unit 21a generates a predicted image Pred_Intra for each partition by intra prediction. 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 21a supplies the generated intra predicted image Pred_Intra to the prediction method control unit 21d.
 また、イントラ予測画像生成部21aは、対象パーティションの周辺のパーティションに割り付けられた予測モードから対象パーティションに対する推定予測モードを決定し、当該推定予測モードと、対象パーティションについて実際に選択された予測モードとが同じであるか否かを示すフラグMPMを、イントラ予測パラメータPP_Intraの一部として、予測方式制御部21dを介して可変長符号符号化部27に供給し、可変長符号符号化部27は、当該フラグMPMを符号化データ#1に含める構成とする。 In addition, the intra predicted image generation unit 21a determines an estimated prediction mode for the target partition from the prediction modes assigned to the peripheral partitions of the target partition, and the estimated prediction mode and the prediction mode actually selected for the target partition Are supplied as a part of the intra prediction parameter PP_Intra to the variable length code encoding unit 27 via the prediction scheme control unit 21d, and the variable length code encoding unit 27 The flag MPM is included in the encoded data # 1.
 また、イントラ予測画像生成部21aは、対象パーティションについての推定予測モードと、対象パーティションについて実際に選択された予測モードとが異なる場合には、対象パーティションについての予測モードを示す残余予測モードインデックスRIPMを、イントラ予測パラメータPP_Intraの一部として、予測方式制御部21dを介して可変長符号符号化部27に供給し、可変長符号符号化部27は当該残余予測モードインデックスRIPMを符号化データ#1に含める構成とする。 In addition, when the estimated prediction mode for the target partition is different from the prediction mode actually selected for the target partition, the intra predicted image generation unit 21a sets the residual prediction mode index RIPM indicating the prediction mode for the target partition. Then, as a part of the intra prediction parameter PP_Intra, the variable length code encoding unit 27 supplies the residual prediction mode index RIPM to the encoded data # 1 via the prediction scheme control unit 21d. It is assumed to be included
 なお、イントラ予測画像生成部21aは、画面内予測によって、フィルタ済復号画像P_ALFから予測画像Pred_Intraを生成する構成とすることも可能である。 Note that the intra predicted image generation unit 21a may be configured to generate a predicted image Pred_Intra from the filtered decoded image P_ALF by intra-screen prediction.
 (動きベクトル検出部21b)
 動きベクトル検出部21bは、各パーティションに関する動きベクトルmvを検出する。具体的には、(1)参照画像として利用するフィルタ済復号画像P_ALF’を選択し、(2)選択したフィルタ済復号画像P_ALF’において対象パーティションを最良近似する領域を探索することによって、対象パーティションに関する動きベクトルmvを検出する。ここで、フィルタ済復号画像P_ALF’は、既にフレーム全体の復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ26によるデブロック処理および適応フィルタ27によるフィルタ処理を施すことによって得られる画像であり、動きベクトル検出部21bは、フィルタ済復号画像P_ALF’を構成する各画素の画素値をフレームメモリ25から読み出すことができる。動きベクトル検出部21bは、検出した動きベクトルmvを、参照画像として利用したフィルタ済復号画像P_ALF’を指定する参照画像インデックスRIと共に、インター予測画像生成部21c及び動きベクトル冗長性削除部21eに供給する。
(Motion vector detection unit 21b)
The motion vector detection unit 21b detects a motion vector mv regarding each partition. Specifically, (1) the filtered decoded image P_ALF ′ used as the 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_ALF ′. Detects a motion vector mv. Here, the filtered decoded image P_ALF ′ is an image obtained by performing deblocking processing by the deblocking filter 26 and filtering processing by the adaptive filter 27 on the decoded image that has already been decoded for the entire frame. The motion vector detection unit 21b can read out the pixel value of each pixel constituting the filtered decoded image P_ALF ′ from the frame memory 25. The motion vector detection unit 21b supplies the detected motion vector mv to the inter predicted image generation unit 21c and the motion vector redundancy deletion unit 21e together with the reference image index RI that specifies the filtered decoded image P_ALF ′ used as the reference image. To do.
 (インター予測画像生成部21c)
 インター予測画像生成部21cは、画面間予測によって、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル検出部21bから供給された動きベクトルmvを用いて、動きベクトル検出部21bから供給された参照画像インデックスRIによって指定されるフィルタ済復号画像P_ALF’から動き補償画像mcを生成する。動きベクトル検出部21bと同様に、インター予測画像生成部21cは、フィルタ済復号画像P_ALF’を構成する各画素の画素値をフレームメモリ25から読み出すことができる。インター予測画像生成部21cは、生成した動き補償画像mc(インター予測画像Pred_Inter)を、動きベクトル検出部21bから供給された参照画像インデックスRIと共に、予測方式制御部21dに供給する。
(Inter prediction image generation unit 21c)
The inter prediction image generation unit 21c generates a motion compensated image mc related to each inter prediction partition by inter-screen prediction. Specifically, the motion compensation image mc is obtained from the filtered decoded image P_ALF ′ designated by the reference image index RI supplied from the motion vector detection unit 21b, using the motion vector mv supplied from the motion vector detection unit 21b. Generate. Similar to the motion vector detection unit 21b, the inter prediction image generation unit 21c can read out the pixel value of each pixel constituting the filtered decoded image P_ALF ′ from the frame memory 25. The inter prediction image generation unit 21c 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 21b to the prediction method control unit 21d.
 (予測方式制御部21d)
 予測方式制御部21dは、イントラ予測画像Pred_Intra及びインター予測画像Pred_Interを符号化対象画像と比較し、イントラ予測を行うかインター予測を行うかを選択する。イントラ予測を選択した場合、予測方式制御部21dは、イントラ予測画像Pred_Intraを予測画像Predとして加算器24及び減算器29に供給すると共に、イントラ予測画像生成部21aから供給されるイントラ予測パラメータPP_Intraを可変長符号符号化部28に供給する。一方、インター予測を選択した場合、予測方式制御部21dは、インター予測画像Pred_Interを予測画像Predとして加算器24及び減算器29に供給すると共に、参照画像インデックスRI、並びに、後述する動きベクトル冗長性削除部21eから供給された推定動きベクトルインデックスPMVI及び動きベクトル残差MVDをインター予測パラメータPP_Interとして可変長符号符号化部27に供給する。
(Prediction method controller 21d)
The prediction scheme control unit 21d 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. When intra prediction is selected, the prediction scheme control unit 21d supplies the intra prediction image Pred_Intra as the prediction image Pred to the adder 24 and the subtractor 29, and also uses the intra prediction parameter PP_Intra supplied from the intra prediction image generation unit 21a. This is supplied to the variable length code encoder 28. On the other hand, when the inter prediction is selected, the prediction scheme control unit 21d supplies the inter prediction image Pred_Inter as the prediction image Pred to the adder 24 and the subtractor 29, and the reference image index RI and motion vector redundancy described later. The estimated motion vector index PMVI and the motion vector residual MVD supplied from the deletion unit 21e are supplied to the variable length code encoding unit 27 as an inter prediction parameter PP_Inter.
 (動きベクトル冗長性削除部21e)
 動きベクトル冗長性削除部21eは、動きベクトル検出部21bによって検出された動きベクトルmvにおける冗長性を削除する。具体的には、(1)動きベクトルmvの推定に用いる推定方法を選択し、(2)選択した推定方法に従って推定動きベクトルpmvを導出し、(3)動きベクトルmvから推定動きベクトルpmvを減算することにより動きベクトル残差MVDを生成する。動きベクトル冗長性削除部21eは、生成した動きベクトル残差MVDを、選択した推定方法を示す推定動きベクトルインデックスPMVIと共に、予測方式制御部21dに供給する。
(Motion vector redundancy deleting unit 21e)
The motion vector redundancy deletion unit 21e deletes redundancy in the motion vector mv detected by the motion vector detection unit 21b. 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 deleting unit 21e supplies the generated motion vector residual MVD to the prediction method control unit 21d together with the estimated motion vector index PMVI indicating the selected estimation method.
 (変換・量子化部22)
 変換・量子化部22は、(1)符号化対象画像から予測画像Predを減算した予測残差Dをブロック(変換単位)毎にDCT変換(Discrete Cosine Transform)し、(2)DCT変換により得られたDCT係数を量子化し、(3)量子化により得られた量子化予測残差QDを可変長符号符号化部27及び逆量子化・逆変換部23に供給する。なお、変換・量子化部22は、(1)量子化の際に用いる量子化ステップQPをTU毎に選択し、(2)選択した量子化ステップQPの大きさを示す量子化パラメータ差分Δqpを可変長符号符号化部29に供給し、(3)選択した量子化ステップQPを逆量子化・逆変換部23に供給する。ここで、量子化パラメータ差分Δqpとは、DCT変換/量子化するマクロブロックに関する量子化パラメータqp(例えばQP=2pq/6)の値から、直前にDCT変換/量子化したTUに関する量子化パラメータqp’の値を減算して得られる差分値のことを指す。
(Transformation / quantization unit 22)
The transform / quantization unit 22 performs (1) DCT transform (Discrete Cosine Transform) for each block (transform unit) on the prediction residual D obtained by subtracting the predicted image Pred from the encoding target image, and (2) obtains the DCT transform. The obtained DCT coefficients are quantized, and (3) the quantized prediction residual QD obtained by the quantization is supplied to the variable length code encoding unit 27 and the inverse quantization / inverse transform unit 23. The transform / quantization unit 22 (1) selects a quantization step QP to be used for quantization for each TU, and (2) sets a quantization parameter difference Δqp indicating the size of the selected quantization step QP. This is supplied to the variable length code encoding unit 29, and (3) the selected quantization step QP is supplied to the inverse quantization / inverse transform unit 23. Here, the quantization parameter difference Δqp is the quantization parameter related to the TU that has been DCT transformed / quantized immediately before from the value of the quantization parameter qp (for example, QP = 2 pq / 6 ) relating to the macroblock to be DCT transformed / quantized. It refers to the difference value obtained by subtracting the value of qp ′.
 (逆量子化・逆変換部23)
 逆量子化・逆変換部23は、(1)量子化予測残差QDを逆量子化し、(2)逆量子化によって得られたDCT係数を逆DCT(Discrete Cosine Transform)変換し、(3)逆DCT変換によって得られた予測残差Dを加算器24に供給する。量子化予測残差QDを逆量子化する際には、変換・量子化部22から供給された量子化ステップQPを利用する。なお、逆量子化・逆変換部23から出力される予測残差Dは、変換・量子化部22に入力される予測残差Dに量子化誤差が加わったものであるが、ここでは簡単のために共通の呼称を用いる。
(Inverse quantization / inverse transform unit 23)
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 24. When the quantization prediction residual QD is inversely quantized, the quantization step QP supplied from the transform / quantization unit 22 is used. Note that 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 22. Common names are used for this purpose.
 (加算器24)
 加算器24は、予測方式制御部21dにて選択された予測画像Predを、逆量子化・逆変換部23にて生成された予測残差Dに加算することによって、(局所)復号画像Pを生成する。加算器24にて生成された(局所)復号画像Pは、デブロッキングフィルタ27に供給されると共にフレームメモリ25に格納され、イントラ予測における参照画像として利用される。
(Adder 24)
The adder 24 adds the predicted image Pred selected by the prediction scheme control unit 21d to the prediction residual D generated by the inverse quantization / inverse transform unit 23, thereby obtaining the (local) decoded image P. Generate. The (local) decoded image P generated by the adder 24 is supplied to the deblocking filter 27 and stored in the frame memory 25, and is used as a reference image in intra prediction.
 (可変長符号符号化部28)
 可変長符号符号化部28は、(1)変換・量子化部22から供給された量子化予測残差QD並びにΔqp、(2)予測方式制御部21dから供給された量子化パラメータPP(インター予測パラメータPP_Inter、および、イントラ予測パラメータPP_Intra)、および、(3)適応フィルタ27から供給されたフィルタパラメータFPを可変長符号化することによって、符号化データ#1を生成する。
(Variable-length code encoding unit 28)
The variable-length code encoding unit 28 (1) the quantization prediction residual QD and Δqp supplied from the transform / quantization unit 22, and (2) the quantization parameter PP (inter prediction) supplied from the prediction scheme control unit 21d. The parameter PP_Inter and the intra prediction parameter PP_Intra) and (3) the filter parameter FP supplied from the adaptive filter 27 is variable-length-encoded to generate encoded data # 1.
 なお、可変長符号符号化部28による具体的な符号化方式としては、算術符号化/復号の一方式であるCABAC(Context-based Adaptive Binary Arithmetic Coding)、または、非算術符号化/復号の一方式であるCAVLC(Context-based Adaptive VLC)が用いられる。 As a specific encoding method by the variable-length code encoding unit 28, CABAC (Context-based Adaptive Binary Arithmetic Coding), which is one arithmetic coding / decoding method, or non-arithmetic encoding / decoding one method. CAVLC (Context-based Adaptive VLC) which is a method is used.
 (減算器29)
 減算器29は、予測方式制御部21dにて選択された予測画像Predを、符号化対象画像から減算することによって、予測残差Dを生成する。減算器29にて生成された予測残差Dは、変換・量子化部22によってDCT変換/量子化される。
(Subtractor 29)
The subtracter 29 generates the prediction residual D by subtracting the prediction image Pred selected by the prediction method control unit 21d from the encoding target image. The prediction residual D generated by the subtractor 29 is DCT transformed / quantized by the transform / quantization unit 22.
 (デブロッキングフィルタ26)
 デブロッキングフィルタ26は、復号画像Pにおけるブロック境界、またはパーティション境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、復号画像Pにおける当該ブロック境界、または当該パーティション境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該パーティション境界付近の画像の平滑化を行う。デブロッキングフィルタ26によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、フレームメモリ25に格納される。
(Deblocking filter 26)
When the difference between the pixel values of pixels adjacent to each other via a block boundary or partition boundary in the decoded image P is smaller than a predetermined threshold, the deblocking filter 26 By performing a deblocking process on the partition boundary, the block boundary or an image near the partition boundary is smoothed. The image subjected to the deblocking process by the deblocking filter 26 is stored in the frame memory 25 as a deblocked decoded image P_DB.
 (適応フィルタ27)
 適応フィルタ27は、(1)デブロック済復号画像P_DBを構成する1若しくは複数の単位領域の各々を、該単位領域におけるデブロック済復号画像P_DBの画像特性に応じて複数のタイプの何れかに分類し、(2)該単位領域についての適応フィルタ処理のオンオフを、該単位領域が属するタイプに応じて切り替える。また、(3)適応フィルタ処理がオンに設定された単位領域におけるデブロック済復号画像P_DBと、符号化対象画像(動画像#10)との誤差が最小となるように、タイプ毎にフィルタ係数群を決定し、(4)決定されたフィルタ係数群を用いて、デブロック済復号画像P_DBに対して適応フィルタ処理を行う。
(Adaptive filter 27)
The adaptive filter 27 (1) sets one or a plurality of unit areas constituting the deblocked decoded image P_DB to any of a plurality of types according to the image characteristics of the deblocked decoded image P_DB in the unit area. (2) ON / OFF of adaptive filter processing for the unit area is switched according to the type to which the unit area belongs. Also, (3) filter coefficients for each type so that the error between the deblocked decoded image P_DB and the encoding target image (moving image # 10) in the unit area where the adaptive filter processing is set to ON is minimized. (4) Using the determined filter coefficient group, adaptive filter processing is performed on the deblocked decoded image P_DB.
 図22は、適応フィルタ27の構成を示すブロック図である。図22に示すように、適応フィルタ27は、領域特性値算出部271、領域分類部272、及び、フィルタ処理部273を備えている。 FIG. 22 is a block diagram showing the configuration of the adaptive filter 27. As illustrated in FIG. 22, the adaptive filter 27 includes a region characteristic value calculation unit 271, a region classification unit 272, and a filter processing unit 273.
 (領域特性値算出部271)
 領域特性値算出部271は、処理対象となる対象単位領域を含む特性値算出参照領域におけるデブロック済復号画像P_DBの各画素値をフレームメモリ15から読み出し、それらの画素値に基づいて、対象単位領域におけるデブロック済復号画像P_DBの画像特性を表す特性値(領域特性値とも呼ぶ)を算出する。ここで、特性値算出参照領域とは、対象単位領域におけるデブロック済復号画像P_DBの特性値を算出するために参照される画素から構成される領域のことを指す。特性値算出参照領域は、対象単位領域のみから構成されるか、または、対象単位領域と対象単位領域の周辺の領域とから構成される。
(Region characteristic value calculation unit 271)
The region characteristic value calculation unit 271 reads each pixel value of the deblocked decoded image P_DB in the characteristic value calculation reference region including the target unit region to be processed from the frame memory 15, and based on the pixel value, the target unit A characteristic value (also referred to as an area characteristic value) representing the image characteristic of the deblocked decoded image P_DB in the area is calculated. Here, the characteristic value calculation reference region refers to a region formed of pixels referred to for calculating the characteristic value of the deblocked decoded image P_DB in the target unit region. The characteristic value calculation reference area is composed of only the target unit area, or is composed of the target unit area and an area around the target unit area.
 図22に示すように、領域特性値算出部271は、活性度算出部271aを備えている。活性度算出部271aは、対象単位領域におけるデブロック済復号画像P_DBの特性値として、活性度(activity)ACTを算出する。また、算出された分割領域毎の活性度ACTは、領域分類部272に供給される。 As shown in FIG. 22, the region characteristic value calculation unit 271 includes an activity calculation unit 271a. The activity calculation unit 271a calculates an activity ACT as the characteristic value of the deblocked decoded image P_DB in the target unit region. Further, the calculated activity ACT for each divided region is supplied to the region classification unit 272.
 活性度算出部271aによる活性度の具体的な算出方法は、動画像復号装置1の備える活性度算出部171aによる活性度の算出方法と同様であるため、ここでは説明を省略する。 The specific method for calculating the activity level by the activity level calculation unit 271a is the same as the method for calculating the activity level by the activity level calculation unit 171a included in the moving image decoding apparatus 1, and thus the description thereof is omitted here.
 (領域分類部272)
 領域分類部272は、対象単位領域についての特性値として領域特性値算出部271が算出した活性度ACTに基づいて、対象単位領域を複数のタイプの何れかに分類する。ここで、上記複数のタイプには、フィルタ処理がオフであるタイプ(フィルタオフタイプ)、および、フィルタ処理がオンであるタイプ(フィルタオンタイプ)の双方が含まれる。また、領域分類部272は、対象単位領域が何れのタイプに分類されたのかを示すタイプ情報をフィルタ処理部273に供給する。
(Area classification unit 272)
The region classification unit 272 classifies the target unit region into one of a plurality of types based on the activity ACT calculated by the region characteristic value calculation unit 271 as the characteristic value for the target unit region. Here, the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type). The region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
 領域分類部272は、具体的には、以下の(分類処理例1-1’)~(分類処理例1-6’)のうち、何れかの分類処理を行う構成とすることができる。また、領域分類部272は、以下の(分類処理例1-1’)~(分類処理例1-6’)のうち、何れかの分類処理を選択的に行う構成とし、何れの分類処理を行ったのかを示す分類処理指定情報を符号化データ#1に含める構成としてもよい。なお、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。 Specifically, the area classification unit 272 may be configured to perform any one of the following classification processing examples 1-1 ′ to (classification processing examples 1-6 ′). The region classification unit 272 is configured to selectively perform any one of the following (classification processing example 1-1 ′) to (classification processing example 1-6 ′), It is good also as a structure which includes the classification process designation | designated information which shows whether it performed to encoded data # 1. Note that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types.
 (分類処理例1-1’)~(分類処理例1-6’)
 領域分類部172による(分類処理例1-1)~(分類処理例1-6)と同様の処理を行う。具体的な分類方法については、すでに説明したため、ここでは説明を省略する。
(Classification Processing Example 1-1 ′) to (Classification Processing Example 1-6 ′)
The same processing as (classification processing example 1-1) to (classification processing example 1-6) by the region classification unit 172 is performed. Since the specific classification method has already been described, the description is omitted here.
 (分類処理例1-7’)
 領域分類部172による(分類処理例1-7)とほぼ同様の処理を行う。ただし、領域分類部172が本分類処理を行う場合、フィルタ処理部273は、各タイプ(例えば、図6(g)におけるタイプA~D)についてのフィルタ処理のオンオフを符号化効率がより高くなるように決定し、決定されたオンオフを示すオンオフ指定情報Vを領域分類部172に供給するものとする。
(Classification example 1-7 ′)
Substantially the same processing as (classification processing example 1-7) by the region classification unit 172 is performed. However, when the region classification unit 172 performs the main classification process, the filter processing unit 273 has higher encoding efficiency for on / off of the filter processing for each type (for example, types A to D in FIG. 6G). The on / off designation information V indicating the determined on / off is supplied to the region classification unit 172.
 (フィルタ処理部273)
 フィルタ処理部273は、対象スライスまたは対象LCUに含まれる各単位領域を、領域分類部272から供給されるタイプ情報に基づいて分類し、デブロック済復号画像P_DBと、符号化対象画像(動画像#10)との誤差が最小となるように、タイプ毎にフィルタ係数群を決定する。
(Filter processing unit 273)
The filter processing unit 273 classifies each unit region included in the target slice or the target LCU based on the type information supplied from the region classifying unit 272, and outputs the deblocked decoded image P_DB and the encoding target image (moving image). A filter coefficient group is determined for each type so that the error from # 10) is minimized.
 より具体的には、対象スライスまたは対象LCUにおけるデブロック済復号画像P_DBのうちタイプIに分類された単位領域よりなる画像を画像Iと表し、画像Iに含まれる画素のうち座標が(x、y)である画素の画素値をSI(x、y)と表し、対象スライスまたは対象LCUにおける符号化対象画像に含まれる画素のうち座標が(x、y)である画素の画素値をST(x、y)と表すことにすると、フィルタ処理部273は、例えば、以下の数式(5)によって与えられる二乗誤差Eを最小にするようなフィルタ係数aI(i、j)およびオフセットoIを導出する。 More specifically, an image made up of unit regions classified as type I in the deblocked decoded image P_DB in the target slice or the target LCU is represented as an image I, and coordinates of pixels included in the image I are (x, The pixel value of the pixel that is y) is expressed as SI (x, y), and the pixel value of the pixel whose coordinates are (x, y) among the pixels included in the encoding target image in the target slice or the target LCU is ST ( x, y), the filter processing unit 273 derives, for example, a filter coefficient aI (i, j) and an offset oI that minimize the square error E given by the following equation (5). .
Figure JPOXMLDOC01-appb-M000011
Figure JPOXMLDOC01-appb-M000011
 フィルタ処理部273は、領域分類部272によりタイプ0以外のタイプに分類された全ての単位領域について、フィルタ係数aI(i、j)およびオフセットoIよりなるフィルタ係数群Iを導出する。例えば、対象スライスまたは対象LCUが、タイプ0、タイプ1、及び、タイプ2に分類された単位領域から構成されている場合には、フィルタ処理部273は、タイプ1に分類された単位領域についてのフィルタ係数群1と、タイプ2に分類された単位領域についてのフィルタ係数群2とを導出する。 The filter processing unit 273 derives a filter coefficient group I including the filter coefficient aI (i, j) and the offset oI for all unit areas classified into types other than type 0 by the area classifying unit 272. For example, when the target slice or the target LCU is configured from unit areas classified into type 0, type 1, and type 2, the filter processing unit 273 performs processing for the unit areas classified into type 1. A filter coefficient group 1 and a filter coefficient group 2 for a unit region classified as type 2 are derived.
 また、フィルタ処理部273は、対象スライスまたは対象LCUに含まれる各単位領域におけるデブロック済復号画像P_DBに対して、タイプ毎に導出されたフィルタ係数群を用いてフィルタ処理を行うことによってフィルタ済復号画像P_ALFを生成する。例えば、対象スライスまたは対象LCUが、タイプ0、タイプ1、及び、タイプ2に分類された単位領域から構成されている場合には、フィルタ処理部273は、対象スライスまたは対象LCUにおけるデブロック済復号画像P_DBのうちタイプ1に分類された単位領域に対してフィルタ係数群1を用いたフィルタ処理を行い、タイプ2に分類された単位領域に対してフィルタ係数群2を用いたフィルタ処理を行う。 Further, the filter processing unit 273 performs filtering on the deblocked decoded image P_DB in each unit region included in the target slice or the target LCU by performing filter processing using the filter coefficient group derived for each type. A decoded image P_ALF is generated. For example, when the target slice or the target LCU is composed of unit areas classified into type 0, type 1, and type 2, the filter processing unit 273 performs the deblocked decoding in the target slice or the target LCU. A filter process using the filter coefficient group 1 is performed on a unit area classified as type 1 in the image P_DB, and a filter process using the filter coefficient group 2 is performed on a unit area classified as type 2.
 フィルタ処理部273による具体的なフィルタ処理は、動画像復号装置1の備えるフィルタ処理部173によるフィルタ処理を同様であるのでここでは説明を省略する。 Since the specific filter processing by the filter processing unit 273 is the same as the filter processing by the filter processing unit 173 included in the video decoding device 1, description thereof is omitted here.
 なお、フィルタ処理部273によって導出された各タイプについてのフィルタ係数群は、フィルタパラメータFPの一部として、可変長符号符号化部28に供給される。 The filter coefficient group for each type derived by the filter processing unit 273 is supplied to the variable length code encoding unit 28 as a part of the filter parameter FP.
 <変形例1’>
 領域特性値算出部271の備える活性度算出部271aは、対象単位領域におけるデブロック済復号画像P_DBの特性値として、上述した活性度ACTに代えて、垂直方向活性度ACT_V、および、水平方向活性度ACT_Hを算出し、領域分類部272が、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vに基づいて対象単位領域を複数のタイプの何れかに分類する構成としてもよい。
<Modification 1 '>
The activity calculation unit 271a included in the region characteristic value calculation unit 271 uses, as the characteristic value of the deblocked decoded image P_DB in the target unit region, the vertical activity ACT_V and the horizontal activity instead of the activity ACT described above. The degree ACT_H may be calculated, and the region classification unit 272 may classify the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V.
 ここで、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vは、例えば、上述した数式(1a)の第1項、および、第2項によってそれぞれ算出することができる。また、水平方向活性度ACT_H、および、垂直方向活性度ACT_Vは、上述した数式(1b)~(1d)のうち、何れかの数式の第1項、および、第2項によってそれぞれ算出することもできる。 Here, 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 mathematical formula (1a) described above. In addition, the horizontal direction activity ACT_H and the vertical direction activity ACT_V may be calculated by the first term and the second term of any one of the above formulas (1b) to (1d), respectively. it can.
 領域分類部272は、活性度算出部271aによって算出された水平方向活性度ACT_H、および、垂直方向活性度ACT_Vに基づいて、対象単位領域を複数のタイプのうち、何れかのタイプに分類する。また、領域分類部272は、対象単位領域が何れのタイプに分類されたのかを示すタイプ情報をフィルタ処理部273に供給する。 The region classification unit 272 classifies the target unit region into one of a plurality of types based on the horizontal direction activity ACT_H and the vertical direction activity ACT_V calculated by the activity calculation unit 271a. The region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
 本変形例に係る領域分類部272による分類処理は、<変形例1>において説明した領域分類部172による分類処理と同様であるため、ここでは説明を省略する。 The classification processing by the region classification unit 272 according to the present modification is the same as the classification processing by the region classification unit 172 described in <Modification 1>, and thus description thereof is omitted here.
 <変形例2’>
 適応フィルタ27は、対象単位領域におけるデブロック済復号画像P_DBの特性値として画素値の平均(平均画素値とも呼ぶ)を算出し、算出された平均画素値に基づいて対象単位領域を複数のタイプの何れかに分類する構成としてもよい。
<Modification 2 '>
The adaptive filter 27 calculates an average of pixel values (also referred to as an average pixel value) as a characteristic value of the deblocked decoded image P_DB in the target unit region, and sets the target unit region to a plurality of types based on the calculated average pixel value. It is good also as a structure classified into either.
 図23は、本変形例に係る適応フィルタ27の構成を示すブロック図である。図23に示すように、本変形例に係る適応フィルタ27における領域特性値算出部271は、画素値参照部271bを備えている。 FIG. 23 is a block diagram showing a configuration of the adaptive filter 27 according to this modification. As shown in FIG. 23, the region characteristic value calculation unit 271 in the adaptive filter 27 according to this modification includes a pixel value reference unit 271b.
 画素値参照部271bは、処理対象となる対象単位領域におけるデブロック済復号画像P_DBの各画素値をフレームメモリ25から読み出し、それらの画素値の平均をとることによって平均画素値MPを算出する。 The pixel value reference unit 271b calculates the average pixel value MP by reading each pixel value of the deblocked decoded image P_DB in the target unit area to be processed from the frame memory 25 and taking the average of the pixel values.
 画素値参照部271bによる平均画素値MPの算出方法は、動画像復号装置1の備える画素値参照部171bによる平均画素値MPの算出方法と同様であるため、ここでは説明を省略する。 Since the calculation method of the average pixel value MP by the pixel value reference unit 271b is the same as the calculation method of the average pixel value MP by the pixel value reference unit 171b included in the moving image decoding device 1, the description thereof is omitted here.
 また、本変形例に係る領域分類部272は、対象単位領域についての特性値として領域特性値算出部271が算出した平均画素値MPに基づいて、対象単位領域を複数のタイプの何れかに分類する。ここで、上記複数のタイプには、フィルタ処理がオフであるタイプ(フィルタオフタイプ)、および、フィルタ処理がオンであるタイプ(フィルタオンタイプ)の双方が含まれる。また、領域分類部272は、対象単位領域が何れのタイプに分類されたのかを示すタイプ情報をフィルタ処理部273に供給する。 In addition, the region classification unit 272 according to the present modification classifies the target unit region into one of a plurality of types based on the average pixel value MP calculated by the region characteristic value calculation unit 271 as the characteristic value for the target unit region. To do. Here, the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type). The region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
 領域分類部272は、具体的には、以下の(分類処理例3-1’)~(分類処理例3-7’)のうち、何れかの分類処理を行う構成とすることができる。また、領域分類部272は、以下の(分類処理例3-1’)~(分類処理例3-7’)のうち、何れかの分類処理を選択的に行う構成とし、何れの分類処理を行ったのかを示す分類処理指定情報を符号化データ#1に含める構成としてもよい。なお、タイプ0がフィルタオフタイプであり、タイプ1~Non(Nonはフィルタオンタイプの総数)がフィルタオンタイプであるものとする。 Specifically, the area classification unit 272 can be configured to perform any of the following classification processing examples (classification processing example 3-1 ′) to (classification processing example 3-7 ′). The region classification unit 272 is configured to selectively perform any one of the following (classification processing examples 3-1 ′) to (classification processing examples 3-7 ′). It is good also as a structure which includes the classification process designation | designated information which shows whether it performed to encoded data # 1. Note that type 0 is a filter-off type, and types 1 to Non (Non is the total number of filter-on types) are filter-on types.
 (分類処理例3-1’)~(分類処理例3-6’)
 領域分類部272による(分類処理例3-1)~(分類処理例3-6)と同様の処理を行う。具体的な分類方法については、すでに説明したため、ここでは説明を省略する。
(Classification Processing Example 3-1 ′) to (Classification Processing Example 3-6 ′)
Processing similar to (classification processing example 3-1) to (classification processing example 3-6) by the area classification unit 272 is performed. Since the specific classification method has already been described, the description is omitted here.
 (分類処理例3-7’)
 領域分類部272による(分類処理例3-7)とほぼ同様の処理を行う。ただし、領域分類部272が本分類処理を行う場合、フィルタ処理部273は、各タイプ(例えば、図12(g)におけるタイプA~D)についてのフィルタ処理のオンオフを符号化効率がより高くなるように決定し、決定されたオンオフを示すオンオフ指定情報Vを領域分類部272に供給するものとする。
(Classification example 3-7 ')
Substantially the same processing as (Classification processing example 3-7) by the region classification unit 272 is performed. However, when the region classification unit 272 performs the main classification process, the filter processing unit 273 has higher encoding efficiency for on / off of the filter processing for each type (for example, types A to D in FIG. 12G). The on / off designation information V indicating the determined on / off is supplied to the region classification unit 272.
 <変形例3’>
 領域特性値算出部271の備える画素値参照部271bが、対象単位領域におけるデブロック済復号画像P_DBの特性値として、各画素値の平均画素値MPおよび分散VPを算出し、領域分類部272が、平均画素値MPおよび分散VPに基づいて対象単位領域を複数のタイプの何れかに分類する構成としてもよい。
<Modification 3 '>
The pixel value reference unit 271b included in the region characteristic value calculation unit 271 calculates the average pixel value MP and the variance VP of each pixel value as the characteristic value of the deblocked decoded image P_DB in the target unit region, and the region classification unit 272 The target unit area may be classified into one of a plurality of types based on the average pixel value MP and the variance VP.
 本変形例に係る画素値参照部271bによる分散VPの算出処理は、<変形例3>において説明した画素値参照部171bによる分散VPの算出処理と同様であるため、ここでは説明を省略する。 The calculation process of the variance VP by the pixel value reference unit 271b according to this modification is the same as the calculation process of the variance VP by the pixel value reference unit 171b described in <Modification 3>, and thus the description thereof is omitted here.
 本変形例に係る領域分類部272は、対象単位領域についての特性値として領域特性値算出部271が算出した平均画素値MPおよび分散VPに基づいて、対象単位領域を複数のタイプの何れかに分類する。ここで、上記複数のタイプには、フィルタ処理がオフであるタイプ(フィルタオフタイプ)、および、フィルタ処理がオンであるタイプ(フィルタオンタイプ)の双方が含まれる。また、領域分類部272は、対象単位領域が何れのタイプに分類されたのかを示すタイプ情報をフィルタ処理部273に供給する。 The region classification unit 272 according to the present modification example sets the target unit region to one of a plurality of types based on the average pixel value MP and the variance VP calculated by the region characteristic value calculation unit 271 as the characteristic value for the target unit region. Classify. Here, the plurality of types include both a type in which filter processing is off (filter off type) and a type in which filter processing is on (filter on type). The region classification unit 272 supplies type information indicating to which type the target unit region has been classified to the filter processing unit 273.
 本変形例に係る領域分類部272による分類処理は、<変形例3>において説明した領域分類部172による分類処理と同様であるため、ここでは説明を省略する。 The classification processing by the region classification unit 272 according to the present modification is the same as the classification processing by the region classification unit 172 described in <Modification 3>, and thus description thereof is omitted here.
 <変形例4’>
 本変形例に係る適応フィルタ27は、(1)対象スライスについて適応フィルタ処理を施すか否かを決定し、決定した結果を示すシンタックスadaptive_loop_filter_flagを可変長符号符号化部28に供給する機能と、(2)適応フィルタ処理のオンオフを符号化単位毎に制御するか否かを決定し、決定した結果を示すシンタックスalf_cu_control_flagを可変長符号符号化部28に供給する機能と、(3)オンオフ制御の対象となる符号化単位についての、最大符号化単位からの最大分割深度(maximum split depth)を決定し、決定した結果を示すシンタックス(階層指定情報)alf_cu_control_max_depthを可変長符号符号化部28に供給する機能と、(4)オンオフ制御の対象となる符号化単位の数を決定し、決定した結果を示すシンタックスalf_length_cu_control_infoを可変長符号符号化部28に供給する機能と、(5)オンオフ制御の対象となる符号化単位の各々について、適応フィルタ処理のオンオフを決定し、決定した結果を示すシンタックス(オンオフフラグ)alf_cu_flag [i]を可変長符号符号化部28に供給する機能とを有している。
<Modification 4 '>
The adaptive filter 27 according to this modification example (1) determines whether or not to perform adaptive filter processing on the target slice, and supplies a syntax adaptive_loop_filter_flag indicating the determined result to the variable-length code encoding unit 28; (2) a function for determining whether to control on / off of the adaptive filter processing for each coding unit, and supplying a syntax alf_cu_control_flag indicating the determined result to the variable-length code encoding unit 28; and (3) on / off control. The maximum division depth (maximum split depth) from the maximum coding unit is determined for the coding unit to be processed, and the syntax (hierarchy designation information) alf_cu_control_max_depth indicating the determined result is input to the variable-length code encoding unit 28 The function to be supplied and (4) the number of coding units to be subjected to on / off control is determined, and the syntax alf_length_cu_control_info indicating the determined result is variable (5) A syntax (on / off flag) alf_cu_flag [i] indicating the result of determining the on / off of the adaptive filter processing for each coding unit to be subjected to on / off control ] To the variable-length code encoding unit 28.
 また、本変形例に係る適応フィルタ27は、上記(1)~(5)の決定を、符号化効率がより向上するように行う構成とすることができる。 Further, the adaptive filter 27 according to this modification can be configured to perform the determinations (1) to (5) so that the encoding efficiency is further improved.
 また、特性算出を行う対象単位領域を、階層指定情報で定まる制御単位に応じて定める場合には、制御単位の構造にあわせて特性算出処理を行う必要がある。この場合、多くの分岐を有する複雑な処理となり演算量が大きくなり、また、ソフトウェアや回路の規模が増大する。上記のように、特性算出を行う対象単位領域を階層指定情報によらずに定まる場合には特性値算出の複雑性が低下する。 In addition, when the target unit area for performing characteristic calculation is determined according to the control unit determined by the hierarchy designation information, it is necessary to perform characteristic calculation processing according to the structure of the control unit. In this case, the processing becomes complicated with many branches, and the amount of calculation increases, and the scale of software and circuits increases. As described above, when the target unit area for performing characteristic calculation is determined without depending on the hierarchy designation information, the complexity of characteristic value calculation is reduced.
 動画像符号化装置においては、複数の階層指定情報における符号化をテストし、最適な階層を選択し符号化するような最適化を行うことが望ましいが、階層指定情報に依存して特性算出を行う単位領域の位置やサイズが変化すると、異なる階層指定情報における符号化をテストする度に、特性算出をやり直す必要が生じる。このような再算出は演算量を増大させることから適当ではない。 In a video encoding device, it is desirable to test encoding in a plurality of hierarchy designation information, and to perform optimization such as selecting and coding the optimum hierarchy. However, characteristic calculation is performed depending on the hierarchy designation information. When the position and size of the unit area to be changed are changed, it is necessary to redo the characteristic calculation every time encoding in different hierarchy designation information is tested. Such recalculation is not appropriate because it increases the amount of calculation.
 本変形例に係る領域分類部272は、対象単位領域についての特性値と、当該対象単位領域を含む符号化単位についてのオンオフフラグalf_cu_flag [i]とを参照して、対象単位領域を複数のタイプの何れかに分類する。 The region classification unit 272 according to the present modification refers to the characteristic value for the target unit region and the on / off flag alf_cu_flag [i] for the encoding unit including the target unit region, and sets the target unit region to a plurality of types. It classifies in either.
 本変形例に係る領域分類部272による分類処理は、<変形例4>において説明した領域分類部172による分類処理と同様であるため、ここでは説明を省略する。 The classification processing by the region classification unit 272 according to the present modification is the same as the classification processing by the region classification unit 172 described in <Modification 4>, and thus description thereof is omitted here.
 <変形例5’>
 本変形例に係る領域特性値算出部271は、図24に示すように、活性度算出部271aに加えて方向性算出部271cを備えている。方向性算出部271cは、<変形例5>において説明した方向性算出部171cと同様にエッジ方向Thetaを算出する。
<Modification 5 '>
As shown in FIG. 24, the region characteristic value calculation unit 271 according to this modification includes a directionality calculation unit 271c in addition to the activity calculation unit 271a. The directionality calculation unit 271c calculates the edge direction Theta in the same manner as the directionality calculation unit 171c described in <Modification 5>.
 本変形例に係る領域分類部272による分類処理は、<変形例5>において説明した領域分類部172による分類処理と同様である。 The classification process by the area classification unit 272 according to this modification is the same as the classification process by the area classification unit 172 described in <Modification 5>.
 <変形例6’>
 本変形例に係る領域特性値算出部271は、図25に示すように、活性度算出部271aに加えて画素値参照部271bを備えている。本変形例に係る領域分類部272による分類処理は、<変形例6>において説明した領域分類部172による分類処理と同様である。
<Modification 6 '>
As shown in FIG. 25, the region characteristic value calculation unit 271 according to the present modification includes a pixel value reference unit 271b in addition to the activity calculation unit 271a. The classification process by the area classification unit 272 according to the present modification is the same as the classification process by the area classification unit 172 described in <Modification 6>.
 (付記事項1)
 以上のように、本発明に係る画像フィルタ装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について、上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域、または、上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている、ことを特徴としている。
(Appendix 1)
As described above, the image filter device according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas. A characteristic value calculation means for calculating the filter area, and a filter-on area that causes the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculation means, or the filter And classifying means for classifying the filter into any one of the filter-off regions in which the means is not operated.
 上記の構成によれば、上記分類手段は、入力画像を構成する各単位領域を、該単位領域における上記入力画像の画像特性を表す特性値の値に応じて、上記フィルタオン領域、および、上記フィルタオフ領域の何れかに分類する。また、上記フィルタ手段は、上記フィルタオン領域に属する単位領域における入力画像に作用する一方で、上記フィルタオフ領域に属する単位領域における入力画像には作用しない。 According to the above configuration, the classification means determines each unit area constituting the input image according to the value of the characteristic value representing the image characteristic of the input image in the unit area, and Classify into any of the filter-off areas. The filter means acts on the input image in the unit area belonging to the filter-on area, but does not act on the input image in the unit area belonging to the filter-off area.
 このように、上記のように構成された本発明に係る画像フィルタ装置によれば、入力画像の局所的な画像特性に応じて、フィルタ処理のオンオフを切り替えることができる。したがって、上記画像フィルタ装置がフィルタ処理のオンオフを切り替えつつ復号画像に作用して得られる出力画像を、予測画像を生成するための参照画像として用いることによって、従来に比べて予測精度及び符号化効率を向上させることができる。 As described above, according to the image filter device according to the present invention configured as described above, it is possible to switch on / off of the filter process according to the local image characteristics of the input image. Therefore, by using the output image obtained by the image filter device acting on the decoded image while switching on / off of the filtering process as a reference image for generating the predicted image, the prediction accuracy and the coding efficiency are improved as compared with the conventional case. Can be improved.
 なお、上記画像フィルタ装置が、画像を符号化する符号化装置、および、符号化データから画像を復号する復号装置において用いられる場合には、上記単位領域を、例えば、予測画像を生成する単位である予測単位(パーティション)としてもよいし、周波数変換の単位である変換単位としてもよいし、それら以外のものとしてもよい。例えば、上記単位領域は、1画素のみから構成される単位であってもよい。 When the image filter device is used in an encoding device that encodes an image and a decoding device that decodes an image from encoded data, the unit region is, for example, a unit for generating a predicted image. It may be a certain prediction unit (partition), may be a conversion unit that is a unit of frequency conversion, or may be other than those. For example, the unit area may be a unit composed of only one pixel.
 また、上記分類手段は、上記フィルタオン領域に属する各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、複数のタイプの何れかに更に分類し、上記フィルタ手段は、上記フィルタオン領域に属する各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出する、ことが好ましい。 The classifying unit further classifies each unit region belonging to the filter-on region into one of a plurality of types according to the value of the characteristic value for the unit region calculated by the characteristic value calculating unit. The filter means preferably calculates the pixel value of each pixel in each unit region belonging to the filter-on region using a filter coefficient group set for a type including the pixel.
 上記の構成によれば、上記分類手段が、上記フィルタオン領域に属する各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、複数のタイプの何れかに更に分類し、上記フィルタ手段は、上記フィルタオン領域に属する各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出する。したがって、上記の構成によれば、入力画像の画像特性が単位領域毎に異なる場合であっても、上記タイプ毎に設定されたフィルタ係数群を用いてフィルタ処理を行うことができる。すなわち、上記入力画像の画像特性が、単位領域毎に異なるような場合であっても、予測画像の生成により適した出力画像を生成することができる。したがって、上記のように構成された本発明に係る画像フィルタ装置が生成する出力画像を、予測画像を生成するための参照画像として用いることによって、予測精度及び符号化効率を向上させることができる。 According to the above configuration, the classification unit assigns each of the unit areas belonging to the filter-on area to any one of a plurality of types according to the value of the characteristic value for the unit area calculated by the characteristic value calculation unit. Further, the filter means calculates the pixel value of each pixel in each unit region belonging to the filter-on region using a filter coefficient group set for the type including the pixel. Therefore, according to the above configuration, even when the image characteristics of the input image are different for each unit region, it is possible to perform the filtering process using the filter coefficient group set for each type. That is, even when the image characteristics of the input image are different for each unit region, an output image that is more suitable for generating a predicted image can be generated. Therefore, prediction accuracy and encoding efficiency can be improved by using an output image generated by the image filter device according to the present invention configured as described above as a reference image for generating a predicted image.
 また、上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の活性度を算出する、ことが好ましい。 Further, it is preferable that the characteristic value calculation means calculates the activity of the input image in the unit area as a characteristic value for each unit area.
 上記の構成によれば、上記特性値算出手段は、各単位領域における入力画像の画像特性を表す特性値として活性度を算出する。したがって、上記の構成によれば、上記入力画像が、単位領域毎に異なる活性度を有している場合であっても、予測画像の生成により適した出力画像を生成することができる。なお、活性度とは、画像の乱雑さを示す指標であると表現することもできる。 According to the above configuration, the characteristic value calculating means calculates the activity as a characteristic value representing the image characteristic of the input image in each unit area. Therefore, according to the above configuration, an output image that is more suitable for generating a predicted image can be generated even when the input image has a different degree of activity for each unit region. The activity level can also be expressed as an index indicating the randomness of the image.
 また、上記特性値算出手段は、各単位領域において、その近傍全体が該単位領域に含まれる画素からなる内部領域に属する各画素の活性度を、該画素の上記近傍に含まれる画素の画素値を参照して導出したうえで、内部領域に属する各画素の活性度から該単位領域についての活性度を算出する、ことが好ましい。 In addition, the characteristic value calculation means calculates the activity of each pixel belonging to the internal region, the entire neighborhood of which is composed of pixels included in the unit region, as the pixel value of the pixel included in the vicinity of the pixel. It is preferable to calculate the activity of the unit region from the activity of each pixel belonging to the inner region after being derived with reference to FIG.
 上記の構成によれば、各単位領域において、その近傍全体が該単位領域に含まれる画素からなる内部領域に属する各画素の活性度を、該画素の上記近傍に含まれる画素の画素値を参照して導出したうえで、内部領域に属する各画素の活性度から該単位領域についての活性度を算出する。したがって、上記の構成によれば、各単位領域についての活性度を、該単位領域内の画素のみを参照することによって算出することができる。換言すれば、ある単位領域についての活性度を、その単位領域に含まれない画素を参照することなく算出することができる。 According to the above configuration, in each unit region, the activity of each pixel belonging to the internal region whose entire neighborhood is composed of pixels included in the unit region is referred to the pixel value of the pixel included in the vicinity of the pixel. Then, the activity for the unit region is calculated from the activity of each pixel belonging to the internal region. Therefore, according to the above configuration, the degree of activity for each unit region can be calculated by referring to only the pixels in the unit region. In other words, the degree of activity for a certain unit area can be calculated without referring to pixels that are not included in the unit area.
 したがって、上記の構成によれば、高い符号化効率を維持しつつ、活性度を算出するためのデータ転送量および処理量を削減することができる。 Therefore, according to the above configuration, it is possible to reduce the data transfer amount and the processing amount for calculating the activity while maintaining high encoding efficiency.
 また、上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の画素値の平均を算出する、ことが好ましい。 Further, it is preferable that the characteristic value calculation means calculates an average of pixel values of the input image in the unit area as a characteristic value for each unit area.
 上記の構成によれば、上記特性値算出手段は、各単位領域における入力画像の画像特性を表す特性値として該単位領域における画素値の平均を算出する。したがって、上記の構成によれば、上記入力画像が、単位領域毎に異なる画素値の平均を有している場合であっても、予測画像の生成により適した出力画像を生成することができる。 According to the above configuration, the characteristic value calculating means calculates an average of the pixel values in the unit area as a characteristic value representing the image characteristic of the input image in each unit area. Therefore, according to the above configuration, even when the input image has an average of different pixel values for each unit region, an output image that is more suitable for generating a predicted image can be generated.
 また、上記特性値算出手段は、各単位領域について、互いに算出方法の異なる複数の特性値を算出する、ことが好ましい。 Further, it is preferable that the characteristic value calculation means calculates a plurality of characteristic values having different calculation methods for each unit region.
 上記の構成によれば、上記特性値算出手段は、各単位領域について、互いに算出方法の異なる複数の特性値を算出する。したがって、上記の構成によれば、各単位領域の分類をより適切に行うことができるので、符号化効率をさらに向上させることができる。 According to the above configuration, the characteristic value calculation means calculates a plurality of characteristic values having different calculation methods for each unit region. Therefore, according to the above configuration, each unit region can be classified more appropriately, so that the encoding efficiency can be further improved.
 また、上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の画素値の平均と、該単位領域における上記入力画像の画素値の分散とを算出する、ことが好ましい。 Further, the characteristic value calculation means calculates an average of pixel values of the input image in the unit area and a variance of pixel values of the input image in the unit area as characteristic values for each unit area. Is preferred.
 上記の構成によれば、上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の画素値の平均と、該単位領域における上記入力画像の画素値の分散とを算出する。したがって、上記の構成によれば、各単位領域の分類をより適切に行うことができるので、符号化効率をさらに向上させることができる。 According to the above configuration, the characteristic value calculation means includes, as characteristic values for each unit region, an average of the pixel values of the input image in the unit region, and a variance of the pixel values of the input image in the unit region. Is calculated. Therefore, according to the above configuration, each unit region can be classified more appropriately, so that the encoding efficiency can be further improved.
 なお、画素値の分散は、画像の乱雑さを示す指標とも捉えられる。また、画素値の分散は、画素値の2乗平均と画素値の平均の2乗との差をとることによって求められる。ここで、画素値の分散を算出するために用いられる画素値の平均は、一方の特性値として算出された画素値の平均の値をそのまま用いることができるので、処理量の増大を抑制しつつ、各単位領域の分類をより適切に行うことができる。 Note that the dispersion of pixel values can also be regarded as an index indicating the randomness of the image. Further, the variance of the pixel values is obtained by taking the difference between the square average of the pixel values and the square of the average of the pixel values. Here, as the average of the pixel values used for calculating the variance of the pixel values, the average value of the pixel values calculated as one of the characteristic values can be used as it is, while suppressing an increase in the processing amount. Thus, each unit area can be classified more appropriately.
 また、上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の垂直方向の活性度と、該単位領域における上記入力画像の水平方向の活性度とを算出する、ことが好ましい。 Further, the characteristic value calculation means calculates the vertical activity of the input image in the unit region and the horizontal activity of the input image in the unit region as the characteristic value for each unit region. Is preferable.
 上記の構成によれば、上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の垂直方向の活性度と、該単位領域における上記入力画像の水平方向の活性度とを算出する。したがって、上記の構成によれば、入力画像の活性度の方向性に応じて、各単位領域の分類を適切に行うことができる。また、各方向の活性度を用いて単位領域の分類を行うので、2次元的な活性度を用いて単位領域を分類する構成に比べて、処理量を削減することができる。 According to the above configuration, the characteristic value calculation means uses the vertical activity of the input image in the unit region and the horizontal activity of the input image in the unit region as the characteristic value for each unit region. Calculate the degree. Therefore, according to said structure, according to the directionality of the activity of an input image, each unit area | region can be classified appropriately. Further, since the unit areas are classified using the activity in each direction, the processing amount can be reduced as compared with the configuration in which the unit areas are classified using the two-dimensional activity.
 また、上記分類手段は、単位領域を1つ以上含む所定の単位毎にフィルタ処理のオンオフを指定するオンオフフラグを外部から取得し、当該オンオフフラグがオンを指定している単位に含まれる単位領域を、上記フィルタオン領域および上記フィルタオフ領域の何れかに分類する、ことが好ましい。 In addition, the classification unit obtains an on / off flag for designating on / off of the filtering process for each predetermined unit including one or more unit areas from outside, and the unit area included in the unit for which the on / off flag designates on Is preferably classified into either the filter-on region or the filter-off region.
 上記の構成によれば、上記オンオフフラグがオンを指定している単位に含まれる単位領域を上記フィルタオン領域および上記フィルタオフ領域の何れかに分類する。したがって、上記の構成によれば、上記オンオフフラグのみによってフィルタ処理のオンオフを切り替える構成に比べて、参照すべきデータの符号量が削減される。 According to the above configuration, the unit area included in the unit in which the on / off flag designates on is classified into either the filter on area or the filter off area. Therefore, according to the above configuration, the code amount of data to be referred to is reduced as compared with the configuration in which the on / off of the filtering process is switched only by the on / off flag.
 なお、上記画像フィルタ装置が、画像を符号化する符号化装置、および、符号化データから画像を復号する復号装置において用いられる場合には、上記所定の単位として、例えば、符号化/復号の単位である符号化単位(CU:Coding Unit)を用いることができる。 When the image filter device is used in an encoding device that encodes an image and a decoding device that decodes an image from encoded data, the predetermined unit is, for example, an encoding / decoding unit. A coding unit (CU: Coding Unit) can be used.
 また、上記オンオフフラグに関わる上記所定の単位は、外部より取得される階層指定情報によって階層的に指定されるものであり、上記単位領域は、最小符号化単位以下かつ4画素以上の画素から構成される領域であって、上記階層指定情報によらずに定められるものである、ことが好ましい。 Further, the predetermined unit related to the on / off flag is hierarchically specified by hierarchical specification information acquired from the outside, and the unit region is composed of pixels that are equal to or smaller than the minimum encoding unit and equal to or larger than four pixels. It is preferable that the area is determined regardless of the hierarchy designation information.
 上記の構成によれば、上記所定の単位は、外部より取得される階層指定情報によって階層的に指定されるものであり、上記単位領域は、上記階層指定情報によらずに定められる。したがって、上記の構成によれば、上記階層指定情報の符号量を削減しつつ、より細かい単位毎にフィルタ処理のオンオフを切り替えることができる。また、階層指定情報で変化させる場合に比べ特性値算出の複雑性が低下する。また、符号化装置において、最適な階層指定情報を定める際に特性値の再算出が不要になるため演算量が低下する。また、上記の構成によれば、上記単位領域は、4画素以上の画素から構成される。したがって、上記の構成によれば、過度に細かい単位についてフィルタ処理のオンオフを切り替えることがないので、処理量を削減することができる。 According to the above configuration, the predetermined unit is hierarchically specified by hierarchical designation information acquired from the outside, and the unit area is determined without depending on the hierarchical designation information. Therefore, according to the above configuration, it is possible to switch the filtering process on and off for each finer unit while reducing the code amount of the hierarchy designation information. In addition, the complexity of the characteristic value calculation is reduced as compared with the case of changing with the hierarchy designation information. In addition, in the encoding device, it is not necessary to recalculate the characteristic value when determining the optimum hierarchy designation information, so that the amount of calculation is reduced. Moreover, according to said structure, the said unit area | region is comprised from 4 or more pixels. Therefore, according to the above configuration, since the filter processing is not switched on and off for an excessively small unit, the processing amount can be reduced.
 また、本発明に係る復号装置は、符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、上記画像フィルタ装置と、各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、ことを特徴としている。 The decoding device according to the present invention is a decoding device that decodes encoded data and generates a decoded image after filtering, wherein the image filter device and the predicted image in each unit region are represented by the image filter device. A prediction image generation unit that generates a reference image by referring to the generated output image, and the image filter device includes a prediction image generated by the prediction image generation unit, a residual image decoded from the encoded data, and It is characterized in that the decoded image obtained by adding is used as an input image, and the decoded image after filtering is generated as an output image.
 上記のように構成された本発明に係る復号装置によれば、当該復号装置の備える上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、入力画像(復号画像)の画像特性を表す特性値に応じて、単位領域毎にフィルタ処理のオンオフを切り替えるので、入力画像の画像特性が、単位領域毎に異なるような場合であっても、予測画像を生成するために参照される画像として好適な出力画像を生成することができる。したがって、上記の構成によれば、上記予測画像の予測精度が向上する。 According to the decoding device according to the present invention configured as described above, the image filter device included in the decoding device includes the prediction image generated by the prediction image generation unit and the residual decoded from the encoded data. Since the decoded image obtained by adding the difference image is used as the input image, and the filtering process is switched on / off for each unit area according to the characteristic value representing the image characteristic of the input image (decoded image), the input image Even when the image characteristics are different for each unit region, an output image suitable as an image to be referred to for generating a predicted image can be generated. Therefore, according to the above configuration, the prediction accuracy of the predicted image is improved.
 上記の構成に対応する構成を有する符号化装置によれば、各単位領域における符号化対象画像の画像特性が単位領域毎に異なるような場合であっても、予測画像の予測精度を向上させることができるので、符号化効率の高い符号化データを生成することができる。また、上記の構成を有する復号装置によれば、そのような符号化効率の高い符号化データを適切に復号することができる。 According to the encoding device having the configuration corresponding to the above configuration, it is possible to improve the prediction accuracy of the predicted image even when the image characteristics of the encoding target image in each unit region are different for each unit region. Therefore, encoded data with high encoding efficiency can be generated. Moreover, according to the decoding apparatus having the above configuration, it is possible to appropriately decode such encoded data with high encoding efficiency.
 また、本発明に係る符号化装置は、符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、上記画像フィルタ装置と、各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、を備え、上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、ことを特徴としている。 An encoding apparatus according to the present invention is an encoding apparatus that generates encoded data by encoding a residual image between an encoding target image and a prediction image, the image filter device, and each unit Prediction image generation means for generating the prediction image in the region with reference to the output image generated by the image filter device, and the image filter device includes the prediction image generated by the prediction image generation means and the prediction image generation device. A decoded image obtained by adding the residual image is used as an input image, and an output image is generated.
 上記の構成を有する本発明に係る符号化装置によれば、当該符号化装置の備える上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、符号化対象画像と予測画像との残差画像を加算することによって得られる復号画像を入力画像とし、入力画像(復号画像)の画像特性を表す特性値に応じて、単位領域毎にフィルタ処理のオンオフを切り替えるので、入力画像の画像特性が、単位領域毎に異なるような場合であっても、予測画像を生成するために参照される画像として好適な出力画像を生成することができる。したがって、上記の構成によれば、上記予測画像の予測精度が向上する。予測精度が向上するため、上記符号化装置は、符号化効率の高い符号化データを生成することができる。 According to the encoding apparatus according to the present invention having the above-described configuration, the image filter apparatus included in the encoding apparatus includes a prediction image generated by the prediction image generation unit, an encoding target image, and a prediction image. Since the decoded image obtained by adding the residual images is used as the input image, and the filtering process is switched on and off for each unit area according to the characteristic value representing the image characteristics of the input image (decoded image), the image of the input image Even when the characteristics are different for each unit region, it is possible to generate an output image suitable as an image to be referred to for generating a predicted image. Therefore, according to the above configuration, the prediction accuracy of the predicted image is improved. Since the prediction accuracy is improved, the encoding device can generate encoded data with high encoding efficiency.
 また、本発明に係る上記符号化装置において、上記フィルタ手段によって用いられるフィルタ係数群は、上記フィルタオン領域に含まれる各単位領域における、上記符号化対象画像と上記出力画像との相違を最小化するように定められたものである、ことが好ましい。 In the encoding device according to the present invention, the filter coefficient group used by the filter means minimizes the difference between the encoding target image and the output image in each unit region included in the filter-on region. It is preferable that it is determined to be.
 上記の構成によれば、上記フィルタ手段によって用いられるフィルタ係数群は、上記フィルタオン領域に含まれる各単位領域における、符号化対象画像と上記出力画像との相違を当該フィルタオン領域について最小化するように定められたものであるため、上記フィルタ手段を備える符号化装置は、予測精度の高い予測画像を生成することができる。また、それにより、符号化効率の高い符号化データを生成することができる。なお、上記フィルタオン領域に属する各単位領域が、上記複数のタイプの何れかに更に分類される場合には、上記フィルタ手段によって用いられるフィルタ係数群は、符号化対象画像と上記出力画像との相違をタイプ毎に最小化するように定められる。 According to the above configuration, the filter coefficient group used by the filter means minimizes the difference between the encoding target image and the output image in each unit area included in the filter-on area for the filter-on area. Therefore, the encoding device including the filter unit can generate a prediction image with high prediction accuracy. Thereby, encoded data with high encoding efficiency can be generated. When each unit region belonging to the filter-on region is further classified into any of the plurality of types, the filter coefficient group used by the filter unit is an encoding target image and the output image. It is determined to minimize the difference for each type.
 また、本発明に係る符号化データのデータ構造は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域または上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている画像フィルタ装置によって参照される符号化データのデータ構造であって、上記フィルタ手段によって用いられるフィルタ係数群を含んでいる、ことを特徴としている。 Further, the data structure of the encoded data according to the present invention includes a filter unit that operates on an input image composed of a plurality of unit areas, and a characteristic value that represents an image characteristic of the input image for each of the plurality of unit areas. The characteristic value calculation means for calculating, and the filter-on region in which the filter means is activated or the filter means is not activated in accordance with the value of the characteristic value for each unit area calculated by the characteristic value calculation means. A data structure of encoded data that is referred to by an image filter device including classification means for classifying into any of the filter-off regions, and includes a filter coefficient group used by the filter means It is a feature.
 上記のように構成された符号化データを参照する復号装置は、複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域または上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えており、上記フィルタ手段は、上記符号化データに含まれるフィルタ係数群を用いてフィルタ処理を行う。したがって、そのような復号装置は、予測精度の高い予測画像を生成することができる。 The decoding apparatus that refers to the encoded data configured as described above represents filter means that operates on an input image composed of a plurality of unit regions, and represents the image characteristics of the input image for each of the plurality of unit regions. A characteristic value calculating means for calculating a characteristic value, and a filter-on area or the filter means for causing the filter means to act on each unit area according to the value of the characteristic value for the unit area calculated by the characteristic value calculating means. And classifying means for classifying it into any one of the filter-off regions that do not act on the filter. The filter means performs filter processing using a filter coefficient group included in the encoded data. Therefore, such a decoding apparatus can generate a prediction image with high prediction accuracy.
 また、そのような復号装置に参照される符号化データは、フィルタ処理のオンオフを切り替えるためのフラグを含まなくともよいので、符号化データの符号量が削減される。したがって、上記符号化データは、符号化効率の高い符号化データである。 Also, since the encoded data referred to by such a decoding apparatus does not need to include a flag for switching on / off of the filtering process, the code amount of the encoded data is reduced. Therefore, the encoded data is encoded data with high encoding efficiency.
 また、本発明に係る画像フィルタ装置は、入力画像を構成する複数の単位領域の各々について、当該入力画像の画素値の平均を算出する算出手段と、各単位領域を、上記算出手段によって算出された該単位領域についての画素値の平均に応じて、複数のタイプの何れかに分類する分類手段と、各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出するフィルタ手段と、と備えていることを特徴としている。 In the image filter device according to the present invention, for each of a plurality of unit regions constituting the input image, a calculation unit that calculates an average of pixel values of the input image, and each unit region is calculated by the calculation unit. According to the average of the pixel values for the unit area, the classification means for classifying into any of a plurality of types, and the pixel value of each pixel in each unit area are set for the type including the pixel And filtering means for calculating using a filter coefficient group.
 上記のように構成された画像フィルタ装置によれば、各単位領域を、上記算出手段によって算出された該単位領域についての画素値の平均に応じて、複数のタイプの何れかに分類し、各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出する。したがって、上記の構成によれば、タイプ毎に設定されたフィルタ係数群を用いてフィルタ処理を行うことができるので、符号化効率が向上する。また、上記の構成によれば、各単位領域を、画素値の平均という算出処理量の小さい特性値に応じて分類するので、処理量を削減することができる。 According to the image filter device configured as described above, each unit area is classified into one of a plurality of types according to the average of the pixel values for the unit area calculated by the calculation unit, The pixel value of each pixel in the unit area is calculated using the filter coefficient group set for the type including the pixel. Therefore, according to the above configuration, the filter processing can be performed using the filter coefficient group set for each type, so that the encoding efficiency is improved. Further, according to the above configuration, each unit area is classified according to a characteristic value with a small calculation processing amount, ie, an average of pixel values, so that the processing amount can be reduced.
 (付記事項2)
 上述した動画像復号装置1および動画像符号化装置2の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Appendix 2)
Each block of the moving picture decoding apparatus 1 and the moving picture encoding apparatus 2 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement | achieve by software using.
 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(Random Access Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。 In the latter case, each device includes a CPU that executes instructions of a program that realizes each function, a ROM (Read (Memory) that stores the program, a RAM (Random Memory) that expands the program, the program, and various types A storage device (recording medium) such as a memory for storing data is provided. An object of the present invention is to provide a recording medium in which a program code (execution format program, intermediate code program, source program) of a control program of each of the above devices, which is software that realizes the above-described functions, is recorded so as to be readable by a computer. This can also be achieved by supplying to each of the above devices and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM/MO/MD/DVD/CD-R等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。 Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and disks including optical disks such as CD-ROM / MO / MD / DVD / CD-R. IC cards (including memory cards) / optical cards, semiconductor memories such as mask ROM / EPROM / EEPROM / flash ROM, or PLD (Programmable logic device) or FPGA (Field Programmable Gate Array) Logic circuits can be used.
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、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)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。
(実施形態2~4に関する技術背景)
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置(符号化装置)、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置(復号装置)が用いられている。具体的な動画像符号化方式としては、例えば、H.264/MPEG-4.AVC、および、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式などが挙げられる。
Further, each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited as long as it can transmit the program code. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, and the like can be used. The transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, even with wired lines such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, infrared rays such as IrDA and remote control, Bluetooth (registered trademark), IEEE 802.11 wireless, HDR ( It can also be used by radio such as High Data Rate (NFC), Near Field Communication (NFC), Digital Living Network Alliance (DLNA), mobile phone network, satellite line, and digital terrestrial network.
(Technical background regarding Embodiments 2 to 4)
In order to efficiently transmit or record a moving image, a moving image encoding device (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. Examples thereof include a method adopted in KTA software which is a codec for joint development in AVC and VCEG (Video Coding Expert Group).
 このような符号化方式において、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られるマクロブロック、及び、マクロブロックを分割することより得られるブロックからなる階層構造により管理され、普通、ブロックごとに符号化される。 In such an encoding method, an image (picture) constituting a moving image is obtained by dividing a slice obtained by dividing an image, a macroblock obtained by dividing the slice, and a macroblock. It is managed by a hierarchical structure consisting of blocks to be encoded, and is usually encoded for each block.
 また、このような符号化方式においては、通常、入力画像を符号化/復号化することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像と入力画像との差分データが符号化される。また、予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)と呼ばれる方法が知られている。 In such an encoding method, 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. As methods for generating a predicted image, methods called inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction) are known.
 イントラ予測においては、同一フレーム内の局所復号画像に基づいて、当該フレームにおける予測画像が順次生成される。具体的には、イントラ予測においては、通常、予測単位(例えば、ブロック)毎に、予め定められた予測方向(予測モード)群に含まれる予測方向から何れかの予測方向が選択されると共に、局所復号画像における参照画素の画素値を、選択された予測方向に外挿することによって、予測対象領域上の予測画素値が生成される。また、インター予測においては、フレーム全体が復号された参照フレーム(復号画像)内の参照画像に対し、動きベクトルを用いた動き補償を適用することによって、予測対象フレーム内の予測画像が予測単位(例えば、ブロック)毎に生成される。 In intra prediction, predicted images in a corresponding frame are sequentially generated based on a locally decoded image in the same frame. Specifically, in intra prediction, usually, 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. Also, in 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).
 非特許文献3には、(局所)復号画像を複数の領域に分割し、各領域における(局所)復号画像の局所的な乱雑さを示す活性度(Activity)の大きさに応じて、領域毎にフィルタ係数群を切り替えつつフィルタ処理を行う適応的ループフィルタ(Adaptive Loop Filter)(以下、単に「適応フィルタ」とも呼ぶ)が開示されている。ここで、領域毎のフィルタ係数群は、符号化装置にて、該領域におけるフィルタ済みの画像と符号化対象画像との誤差を最小にするように決定される。 Non-Patent Document 3 divides a (local) decoded image into a plurality of regions, and determines each region according to the level of activity indicating the local randomness of the (local) decoded image in each region. Discloses an adaptive loop filter (hereinafter simply referred to as “adaptive filter”) that performs filter processing while switching the filter coefficient group. Here, the filter coefficient group for each region is determined by the encoding device so as to minimize the error between the filtered image in the region and the encoding target image.
 このような適応フィルタを備えた符号化装置および復号装置は、(局所)復号画像に対して当該適応フィルタによりフィルタ処理を施して得られるフィルタ済みの復号画像を参照して予測画像を生成することにより、予測精度の向上および符号化効率の向上を図ることができる。
(課題)
 しかしながら、従来の適応フィルタには未だ符号化効率を向上させる余地が残されていた。
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 (local) decoded image using the adaptive filter. As a result, it is possible to improve the prediction accuracy and the encoding efficiency.
(Task)
However, the conventional adaptive filter still has room for improving the encoding efficiency.
 符号化効率を向上させる方法としては、活性度に加えて活性度以外の領域特性に基づいて領域毎にフィルタ係数群を切り替える方法などが考えられる。しかしながら、2つの領域特性に基づいて領域毎にフィルタ係数群を切り替える場合、符号化装置側及び復号装置側での計算コストが高くなるという問題があった。 As a method for improving the coding efficiency, a method of switching the filter coefficient group for each region based on region characteristics other than the activity in addition to the activity may be considered. However, when the filter coefficient group is switched for each region based on the two region characteristics, there is a problem that the calculation cost on the encoding device side and the decoding device side becomes high.
 本発明は、上記の課題に鑑みてなされたものであり、その目的は、計算コストの大幅な上昇を招来することなく、従来よりも符号化効率の高い適応フィルタを実現することにある。
(上記課題を解決するための構成)
 上記の課題を解決するために、本発明に係るフィルタ装置は、フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、各単位領域の領域特性の値を算出する領域特性算出手段を備え、上記線形フィルタは、各単位領域に属する各画素を対象とするフィルタ演算を、上記領域特性に依存するオフセットであって、上記領域特性算出手段が算出した該単位領域の領域特性の値に応じたオフセットと、上記領域特性に依存しないフィルタ係数群とを利用して実行する、ことを特徴としている。
The present invention has been made in view of the above-described problems, and an object of the present invention is to realize an adaptive filter with higher encoding efficiency than before without causing a significant increase in calculation cost.
(Configuration for solving the above problems)
In order to solve the above-described problems, a filter device according to the present invention includes a region characteristic calculation unit that calculates a value of a region characteristic of each unit region in a filter device including a linear filter in which filter coefficients are adaptively set. The linear filter is an offset that depends on the region characteristic for performing a filter operation on each pixel belonging to each unit region, and the value of the region characteristic of the unit region calculated by the region characteristic calculating unit This is performed using an offset according to the above and a filter coefficient group that does not depend on the region characteristics.
 上記の構成によれば、一定のオフセットを利用してフィルタ演算を実行する従来の適応フィルタよりも高い符号化効率を達成することができる。 According to the above configuration, it is possible to achieve higher encoding efficiency than a conventional adaptive filter that performs a filter operation using a certain offset.
 本発明に係るフィルタ装置において、上記領域特性は、色差成分の種別に応じた値をもち、上記線形フィルタは、色差成分の種別に応じたオフセットを利用して上記フィルタ演算を実行する、ことが好ましい。 In the filter device according to the present invention, the region characteristic has a value corresponding to a color difference component type, and the linear filter performs the filter operation using an offset corresponding to the color difference component type. preferable.
 色差成分の種別が異なる場合、最適な(符号化効率を最大化する)オフセットの値が異なる。したがって、上記の構成によれば、色差信号の種別に依存しないオフセットを利用してフィルタ演算を実行する場合よりも高い符号化効率を達成することができる。 When the color difference component types are different, the optimum offset value (maximizing encoding efficiency) is different. Therefore, according to the above configuration, higher encoding efficiency can be achieved than when the filter operation is performed using an offset that does not depend on the type of the color difference signal.
 上記の課題に解決するために、本発明に係るフィルタ装置は、フィルタ係数群が適応的に設定される線形フィルタを備えたフィルタ装置であって、上記線形フィルタの出力画像における対象画素の画素値と上記線形フィルタの入力画像における対象画素の画素値との差である変更量とトランケートするトランケート手段を備えている、ことを特徴としている。 In order to solve the above problem, a filter device according to the present invention is a filter device including a linear filter in which filter coefficient groups are adaptively set, and a pixel value of a target pixel in an output image of the linear filter And truncating means for truncating the change amount, which is the difference between the pixel value of the target pixel in the input image of the linear filter.
 上記の構成によれば、適応フィルタを復号画像に適用することで復号画像の原画像に対する誤差が却って大きくなるという事態を有効に回避することができる。これにより、従来よりも高い符号化効率を実現することができる。 According to the above configuration, it is possible to effectively avoid a situation in which the error of the decoded image with respect to the original image becomes larger by applying the adaptive filter to the decoded image. Thereby, encoding efficiency higher than before can be realized.
 本発明に係るフィルタ装置は、上記変更量をトランケートするか否かを示すフラグを復号するフラグ復号手段と、上記線形フィルタの出力画像を、上記変更量をトランケートして出力するか、上記変更量をトランケートせずに出力するかを、上記フラグ復号手段によって復号された上記フラグの値に応じて切り替えるスイッチと、を更に備えている、ことが望ましい。 The filter device according to the present invention includes a flag decoding unit that decodes a flag indicating whether or not to truncate the change amount, and outputs an output image of the linear filter by truncating the change amount or outputting the change amount. It is desirable to further include a switch for switching whether to output without truncation according to the value of the flag decoded by the flag decoding means.
 上記の構成によれば、更量のトランケートにより却って復号精度/符号化効率が低下するという事態を回避することができる。また、変更量のトランケートが有効か否かの判定は符号化装置側で行われるので、復号装置に対して過大な負荷をかけることなく、復号精度/符号化効率の低下を回避することができる。 According to the above configuration, it is possible to avoid a situation in which the decoding accuracy / encoding efficiency is lowered due to the additional amount of truncation. In addition, since it is determined on the encoding device side whether or not the change amount truncation is valid, a decrease in decoding accuracy / encoding efficiency can be avoided without imposing an excessive load on the decoding device. .
 本発明に係るフィルタ装置は、各単位領域の領域特性を算出する領域特性算出手段と、各単位領域に属する画素を出力画素とするフィルタ処理を実行する際に上記変更量をトランケートするために用いる閾値を、上記領域特性算出手段によって算出された、該単位領域に領域特性に応じて決定する閾値決定手段と、を更に備えている、ことが望ましい。 The filter device according to the present invention is used to truncate the change amount when executing a region characteristic calculation unit that calculates a region characteristic of each unit region and a filter process that uses a pixel belonging to each unit region as an output pixel. It is desirable that the apparatus further comprises threshold value determining means for determining the threshold value in the unit area according to the area characteristic calculated by the area characteristic calculating means.
 この際、閾値決定手段は、予め定められた上記領域特性と上記閾値との対応関係に基づいて上記閾値を決定するものであってもよいし、符号化装置側で定められた上記領域特性と上記領域特性との対応関係に基づいて上記閾値を決定するものであってもよい。後者の場合には、例えば、上記領域特性と上記閾値とを関連付けて記録した閾値テーブルを復号する閾値テーブル復号手段を更に備えた構成が採用されることになる。 At this time, the threshold value determination means may determine the threshold value based on a correspondence relationship between the predetermined region characteristic and the threshold value, or may determine the region characteristic determined on the encoding device side. The threshold value may be determined based on a correspondence relationship with the region characteristic. In the latter case, for example, a configuration further including a threshold table decoding unit that decodes a threshold table recorded by associating the region characteristics with the threshold is employed.
 上記の構成によれば、変更量をトランケートするか否かを領域特性に応じて変化させることができるので、復号精度/符号化効率を更に向上させることができる。 According to the above configuration, whether or not to truncate the change amount can be changed according to the region characteristics, so that the decoding accuracy / encoding efficiency can be further improved.
 上記の課題に解決するために、フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、第1の領域特性に依存する第1フィルタ係数群を、少なくとも1つ、対応する第1領域特性の値に関連付けて記録した第1フィルタ係数テーブル、及び、第2の領域特性に依存する第2フィルタ係数群を、少なくとも1つ、対応する第2領域特性の値に関連付けて記録した第2フィルタ係数テーブルを復号する復号手段と、各単位領域の第1領域特性及び第2領域特性の値を算出する領域特性算出手段とを備え、上記線形フィルタは、各単位領域に属する各画素を対象画素とするフィルタ演算であって、上記第1フィルタ係数テーブルに記録された第1フィルタ係数群のうち、上記領域特性算出手段が算出した該単位領域の第1領域特性の値に対応した第1フィルタ係数群、及び、上記第2フィルタ係数テーブルに記録された第2フィルタ係数群のうち、上記領域特性算出手段が算出した該単位領域の第2領域特性の値に対応した第2フィルタ係数群を利用したフィルタ演算を実行する、ことを特徴としている。 In order to solve the above-described problem, in a filter device including a linear filter in which filter coefficients are adaptively set, at least one first filter coefficient group depending on the first region characteristic corresponds to the first filter coefficient group. The first filter coefficient table recorded in association with the value of the region characteristic and the second filter coefficient group depending on the second region characteristic are recorded in association with the corresponding second region characteristic value. A decoding means for decoding the two-filter coefficient table; and an area characteristic calculating means for calculating the values of the first area characteristic and the second area characteristic of each unit area, wherein the linear filter calculates each pixel belonging to each unit area. A filter operation for a target pixel, and the first of the unit areas calculated by the area characteristic calculation means in the first filter coefficient group recorded in the first filter coefficient table; Of the first filter coefficient group corresponding to the area characteristic value and the second filter coefficient group recorded in the second filter coefficient table, the second area characteristic of the unit area calculated by the area characteristic calculating means A filter operation using a second filter coefficient group corresponding to the value is executed.
 上記の構成によれば、第1領域特性及び第2領域特性の双方に依存する複数のフィルタ係数群を、対応する領域特性対に関連付けて記録したフィルタ係数テーブルを復号することなく、各単位領域の第1領域特性及び第2領域特性の双方に応じたフィルタ演算を行うことができる。すなわち、上記の構成によれば、符号量の大幅な増大を招来することなく、原画像に近い復号画像を精度良く生成することができる。これにより従来より高い符号化効率を実現することができる。 According to the above configuration, each unit area can be obtained without decoding a filter coefficient table in which a plurality of filter coefficient groups depending on both the first area characteristic and the second area characteristic are recorded in association with the corresponding area characteristic pair. The filter operation according to both the first region characteristic and the second region characteristic can be performed. That is, according to the above configuration, a decoded image close to the original image can be generated with high accuracy without causing a significant increase in the code amount. As a result, higher encoding efficiency than conventional can be realized.
 本発明に係るフィルタ装置は、上記線形フィルタにおけるフィルタ演算に上記第2フィルタ係数群を利用するか否かを示すフラグを復号するフラグ復号手段と、上記線形フィルタにおける上記第1フィルタ係数群及び上記第2フィルタ係数群を利用したフィルタ演算により得られる出力画像を外部に出力するか、上記線形フィルタにおける上記第1フィルタ係数群のみを利用したフィルタ演算により得られる出力画像を外部に出力するかを、上記フラグ復号手段によって復号された上記フラグの値に応じて切り替えるスイッチと、を更に備えていることが望ましい。 The filter device according to the present invention includes: a flag decoding unit that decodes a flag indicating whether or not to use the second filter coefficient group for a filter operation in the linear filter; the first filter coefficient group in the linear filter; Whether to output an output image obtained by a filter operation using the second filter coefficient group to the outside or to output an output image obtained by a filter operation using only the first filter coefficient group in the linear filter to the outside It is desirable to further include a switch that switches according to the value of the flag decoded by the flag decoding means.
 上記の構成によれば、上記線形フィルタにおけるフィルタ演算に上記第2フィルタ係数群を利用することによって却って復号精度/符号化効率が低下するという事態を回避することができる。また、上記第2フィルタ係数群の利用が有効であるか否かの判定は符号化装置側で行われるので、復号装置に対して過大な負荷をかけることなく、復号精度/符号化効率の低下を回避することができる。 According to the above configuration, it is possible to avoid a situation in which decoding accuracy / encoding efficiency is lowered by using the second filter coefficient group for the filter operation in the linear filter. In addition, since the determination as to whether or not the use of the second filter coefficient group is effective is performed on the encoding device side, the decoding accuracy / encoding efficiency is reduced without imposing an excessive load on the decoding device. Can be avoided.
 上記フィルタ装置を備えた復号装置、及び、符号化装置も本発明の範疇に含まれる。
(上記構成の効果)
 本発明によれば、計算コストの大幅な上昇を招来することなく、従来よりも符号化効率の高い適応フィルタを実現することができる。
<<実施形態2>>
 本発明の第2の実施形態について、図26~図33を参照して説明する。
A decoding device and an encoding device including the filter device are also included in the scope of the present invention.
(Effect of the above configuration)
According to the present invention, it is possible to realize an adaptive filter having higher encoding efficiency than the conventional one without causing a significant increase in calculation cost.
<< Embodiment 2 >>
A second embodiment of the present invention will be described with reference to FIGS.
 (構成例1)
 本実施形態に係る適応フィルタの第1の構成例について、図26を参照して説明する。
(Configuration example 1)
A first configuration example of the adaptive filter according to the present embodiment will be described with reference to FIG.
 図26に示す適応フィルタ100は、復号装置への搭載に好適な適応フィルタであり、フィルタ設定部110及びフィルタ演算部120を備えている。 The adaptive filter 100 shown in FIG. 26 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 110 and a filter calculation unit 120.
 フィルタ設定部110は、フィルタ特性を設定するための手段であり、フィルタ係数復号部111を備えている。 The filter setting unit 110 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 111.
 フィルタ係数復号部111は、符号化データからフィルタ係数群w=(w[1],w[2],・・・,w[N],c)を復号する。フィルタ係数復号部111によって復号されたフィルタ係数群wは、フィルタ演算部120に供給される。 The filter coefficient decoding unit 111 decodes a filter coefficient group w = (w [1], w [2],..., W [N], c) from the encoded data. The filter coefficient group w decoded by the filter coefficient decoding unit 111 is supplied to the filter calculation unit 120.
 フィルタ演算部120は、フィルタ演算を実行するための手段であり、線形フィルタ121、変更量算出部122、変更量制限部123、画素値変更部124(トランケート手段)、及び閾値決定部125を備えている。 The filter calculation unit 120 is a means for executing a filter calculation, and includes a linear filter 121, a change amount calculation unit 122, a change amount restriction unit 123, a pixel value change unit 124 (truncating means), and a threshold value determination unit 125. ing.
 線形フィルタ121は、(A1)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s[1],s[2],・・・,s[N]から、出力画像における対象画素の画素値s’を算出する。 The linear filter 121 has pixel values s [1], s [2],..., S [N] of reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (A1). From this, the pixel value s ′ of the target pixel in the output image is calculated.
  s’=w[1]s[1]+w[2]s[2]+・・・+w[N]s[N]+c
                                 ・・・(A1)
 ここで、w[1],w[2],・・・,w[N],cは、フィルタ係数復号部121によって復号されたフィルタ係数群wの要素である。算出された画素値s’は、後段の変更量制限部123に供給される。
s ′ = w [1] s [1] + w [2] s [2] +... + w [N] s [N] + c
... (A1)
Here, w [1], w [2],..., W [N], c are elements of the filter coefficient group w decoded by the filter coefficient decoding unit 121. The calculated pixel value s ′ is supplied to the subsequent change amount limiting unit 123.
 変更量算出部122は、線形フィルタ121の出力画像における対象画素の画素値s’を、線形フィルタ121の入力画像における同画素(対象画素と同じ位置を占める画素)の画素値sから減算する。算出された差Δs=s-s’は、後段の変更量制限部123に供給される。本明細書においては、この差Δsのことを「変更量」と記載する。 The change amount calculation unit 122 subtracts the pixel value s ′ of the target pixel in the output image of the linear filter 121 from the pixel value s of the same pixel (a pixel occupying the same position as the target pixel) in the input image of the linear filter 121. The calculated difference Δs = s−s ′ is supplied to the change amount limiting unit 123 at the subsequent stage. In the present specification, this difference Δs is described as “amount of change”.
 変更量制限部123は、(A2)式に従って、変更量Δsをトランケートする。トランケートされた変更量Δs’は、後段の画素値変更部124に供給される。 The change amount limiting unit 123 truncates the change amount Δs according to the equation (A2). The truncated change amount Δs ′ is supplied to the subsequent pixel value changing unit 124.
 Δs’=th   (Δs>th)
    =Δs   (-th≦Δs≦th)            ・・・(A2)
    =-th  (Δs<-th)
 なお、変更量Δsをトランケートする方法は、これに限定されない。すなわち、例えば、変更量制限部123は、(A2’)式に従って、変更量Δsをトランケートしてもよい。
Δs ′ = th (Δs> th)
= Δs (−th ≦ Δs ≦ th) (A2)
= -Th (Δs <-th)
Note that the method of truncating the change amount Δs is not limited to this. That is, for example, the change amount limiting unit 123 may truncate the change amount Δs according to the equation (A2 ′).
 Δs’=0    (Δs>th)
    =Δs   (-th≦Δs≦th)           ・・・(A2’)
    =0    (Δs<-th)
 画素値変更部124は、線形フィルタ121の入力画像における画素値sから、トランケートされた変更量Δs’を減算する。算出された差s”=s-Δs’は、フィルタ演算部120の外部に出力される。
Δs ′ = 0 (Δs> th)
= Δs (−th ≦ Δs ≦ th) (A2 ′)
= 0 (Δs <-th)
The pixel value changing unit 124 subtracts the truncated change amount Δs ′ from the pixel value s in the input image of the linear filter 121. The calculated difference s ″ = s−Δs ′ is output to the outside of the filter calculation unit 120.
 閾値決定部125は、変更量Δsをトランケートするために用いる閾値thを決定する。本構成例においては、変更量Δsをトランケートするために用いる閾値thとして、予め定められた閾値th0を用いる。この場合、閾値決定部125は、閾値th0をメモリ(不図示)から読み出して上述した変更量制限部123に通知する。 The threshold determination unit 125 determines the threshold th used for truncating the change amount Δs. In this configuration example, a predetermined threshold th0 is used as the threshold th used to truncate the change amount Δs. In this case, the threshold value determination unit 125 reads the threshold value th0 from a memory (not shown) and notifies the change amount restriction unit 123 described above.
 なお、フィルタ演算部120は、上述した演算結果と同じ演算結果を得るものであればよく、上述した演算手順と同じ演算手順を踏むものであることを要さない。例えば、変更量算出部122にてΔs=s-s’を算出し、画素値変更部124にて差s”=s-Δs’を算出する構成に代えて、変更量算出部122にて差Δs=s’-sを算出し、画素値変更部124にて和s”=s+Δs’を算出する構成を採用してもよい。後者の構成によっても、前者の構成と同様の演算結果を得られることは明らかであろう。 In addition, the filter calculation part 120 should just obtain the same calculation result as the calculation result mentioned above, and does not need to follow the calculation procedure same as the calculation procedure mentioned above. For example, instead of the configuration in which Δs = s−s ′ is calculated by the change amount calculation unit 122 and the difference s ″ = s−Δs ′ is calculated by the pixel value change unit 124, the difference is calculated by the change amount calculation unit 122. A configuration may be adopted in which Δs = s′−s is calculated and the sum s ″ = s + Δs ′ is calculated by the pixel value changing unit 124. It will be apparent that the same result can be obtained with the latter configuration as with the former configuration.
 また、フィルタ係数復号部121によって復号されたフィルタ係数群wの要素は、量子化されたフィルタ係数であり得る。この場合、線形フィルタ121は、(a)量子化されたフィルタ係数を逆量子化したうえで、逆量子化後のフィルタ係数を用いたフィルタ演算を行う構成であってもよいし、(b)逆量子化前のフィルタ係数を用いたフィルタ演算を行ったうえで、フィルタ演算の結果を右シフトする構成であってもよい。例えば、フィルタ係数群wの量子化精度が8ビットである場合、量子化後のフィルタ係数は量子化前のフィルタ係数の256倍になるため、フィルタ演算の結果を8ビットだけ右シフトすることによって、逆量子化前のフィルタ係数を用いてフィルタ演算を行う場合と丸め誤差などの計算誤差を除き同一の演算結果が得られる。 Also, the elements of the filter coefficient group w decoded by the filter coefficient decoding unit 121 may be quantized filter coefficients. In this case, the linear filter 121 may be configured such that (a) the quantized filter coefficient is dequantized and then the filter operation using the dequantized filter coefficient is performed, and (b) A configuration in which the filter operation using the filter coefficient before inverse quantization is performed and then the result of the filter operation is shifted to the right may be employed. For example, when the quantization accuracy of the filter coefficient group w is 8 bits, the filter coefficient after quantization is 256 times the filter coefficient before quantization, so by shifting the filter operation result to the right by 8 bits The same calculation result can be obtained except for calculation errors such as roundoff error and the case of performing filter calculation using filter coefficients before dequantization.
 復号装置に図26に示す適応フィルタ100を搭載する場合、符号化装置には図27に示す適応フィルタ100’を搭載するとよい。図27に示すように、符号化装置側の適応フィルタ100’においては、復号装置側の適応フィルタ100におけるフィルタ係数復号部111を、フィルタ係数決定部111aとフィルタ係数符号化部111bとに置き換えた構成がとられる。 When the decoding apparatus is equipped with the adaptive filter 100 shown in FIG. 26, the coding apparatus may be equipped with the adaptive filter 100 'shown in FIG. As shown in FIG. 27, in the adaptive filter 100 ′ on the encoding device side, the filter coefficient decoding unit 111 in the adaptive filter 100 on the decoding device side is replaced with a filter coefficient determination unit 111a and a filter coefficient encoding unit 111b. Configuration is taken.
 符号化装置側の適応フィルタ100’においては、(1)フィルタ係数決定部111aが、最小二乗法を用いて、線形フィルタ121の出力画像の原画像(符号化対象画像)に対する二乗誤差を最小化するフィルタ係数群wを決定し、(2)フィルタ係数符号化部111bが、フィルタ係数決定部111aによって決定されたフィルタ係数群wを符号化する。符号化装置側の適応フィルタ100’における他の構成は、復号装置側の適応フィルタ100と同様であるので、ここではその説明を割愛する。 In the adaptive filter 100 ′ on the encoding device side, (1) the filter coefficient determination unit 111a minimizes the square error with respect to the original image (encoding target image) of the output image of the linear filter 121 using the least square method. And (2) the filter coefficient encoding unit 111b encodes the filter coefficient group w determined by the filter coefficient determination unit 111a. The other configuration of the adaptive filter 100 ′ on the encoding device side is the same as that of the adaptive filter 100 on the decoding device side, and the description thereof is omitted here.
 (構成例2)
 次に、適応フィルタの第2の構成例について、図28を参照して説明する。
(Configuration example 2)
Next, a second configuration example of the adaptive filter will be described with reference to FIG.
 図28に示す適応フィルタ100は、第1の構成例に係る適応フィルタ100を改良したものであり、第1の構成例に係る適応フィルタ100と同様、復号装置への搭載に好適なものである。本構成例に係る適応フィルタ100と第1の構成例に係る適応フィルタ100との相違点は、以下の2点である。 The adaptive filter 100 shown in FIG. 28 is an improvement of the adaptive filter 100 according to the first configuration example, and is suitable for mounting in a decoding device, like the adaptive filter 100 according to the first configuration example. . The differences between the adaptive filter 100 according to this configuration example and the adaptive filter 100 according to the first configuration example are the following two points.
 ・本構成例においては、制限フラグ復号部112がフィルタ設定部110に追加されている。制限フラグ復号部112は、符号化データから制限フラグを復号するための手段である。ここで、制限フラグとは、出力画像における対象画素の画素値として、トランケート前の画素値s”を出力するか、トランケート後の画素値s’を出力するかを指定するフラグのことを指す。 In the present configuration example, a restriction flag decoding unit 112 is added to the filter setting unit 110. The restriction flag decoding unit 112 is means for decoding the restriction flag from the encoded data. Here, the restriction flag refers to a flag that specifies whether to output the pre-truncated pixel value s ″ or the post-truncated pixel value s ′ as the pixel value of the target pixel in the output image.
 ・本構成例においては、スイッチ126がフィルタ演算部120に追加されている。スイッチ126は、出力画像における対象画素の画素値として、トランケート後の画素値s”を出力するか、トランケート前の画素値s’を出力するかを、制限フラグ復号部112にて復号された制限フラグの値に従って切り替えるための手段である。 In the present configuration example, a switch 126 is added to the filter calculation unit 120. The switch 126 determines whether to output the post-truncated pixel value s ″ or the pre-truncated pixel value s ′ as the pixel value of the target pixel in the output image. It is means for switching according to the value of the flag.
 復号装置に図28に示す適応フィルタ100を搭載する場合、符号化装置には図29に示す適応フィルタ100’を搭載するとよい。図29に示すように、符号化装置側の適応フィルタ100’においては、復号装置側の適応フィルタ100の制限フラグ復号部112の代わりに、制限フラグ決定部112aと制限フラグ符号化部112bとがフィルタ設定部110に追加されている。 When the adaptive filter 100 shown in FIG. 28 is installed in the decoding apparatus, the encoding apparatus may be equipped with the adaptive filter 100 ′ shown in FIG. 29. As shown in FIG. 29, in the adaptive filter 100 ′ on the encoding device side, instead of the restriction flag decoding unit 112 of the adaptive filter 100 on the decoding device side, a restriction flag determining unit 112a and a restriction flag encoding unit 112b are provided. It is added to the filter setting unit 110.
 符号化装置側の適応フィルタ100’においては、(1)制限フラグ決定部112aが、変更量のトランケートが有効か否かを単位領域毎に判定したうえで、判定結果に応じて制限フラグの値を決定し、(2)制限フラグ符号化部112bが、制限フラグ決定部112aが決定した制限フラグの値を符号化する。制限フラグ決定部112aは、例えば、変更量のトランケートが有効であると判定された単位領域において、制限フラグとして第1の値(例えば「1」)とし、変更量のトランケートが有効でないと判定された単位領域において、制限フラグとして第1の値とは異なる第2の値(例えば「0」)とする。符号化装置側の適応フィルタ100’における他の構成は、第1の構成例に示したものと同様である。 In the adaptive filter 100 ′ on the encoding device side, (1) the restriction flag determination unit 112a determines whether or not the change amount truncation is valid for each unit area, and then the value of the restriction flag according to the determination result. (2) The restriction flag encoding unit 112b encodes the value of the restriction flag determined by the restriction flag determination unit 112a. For example, in the unit area in which the truncation of the change amount is determined to be valid, the limit flag determination unit 112a sets the first value (eg, “1”) as the limit flag and determines that the truncation of the change amount is not valid. In the unit area, the restriction flag is set to a second value (for example, “0”) different from the first value. Other configurations of the adaptive filter 100 ′ on the encoding device side are the same as those shown in the first configuration example.
 なお、フレームを分割して得られる任意の領域を、変更量のトランケートが有効であるか否かの判定単位とすることができる。例えば、スライス、マクロブロック、ブロック、LCU(Largest Coding Unit)、CT(Coding Tree)、CU(Coding Unit)、PT(Prediction Tree)、PU(Prediction Unit)、TT(Transformation Tree)、TU(Transformation Unit)、又は、M×Nブロック(Mは当該ブロックの幅を表し、例えば1、2、4、又は8などの値をとる。Nは、当該ブロックの高さを表し、例えば1、2、4、又は8などの値をとる。以下でも同様。)を、変更量のトランケートが有効であるか否かの判定単位とすることができる。例えば、変更量のトランケートが有効であるか否かの判定単位がスライスである場合、制限フラグ符号化部112bは、スライス毎に制限フラグを符号化し、各スライスヘッダにその符号を埋め込む。この場合、復号装置側の適応フィルタ100においては、スライス毎にスイッチ126の切り替えが行われることになる。 It should be noted that an arbitrary area obtained by dividing a frame can be used as a determination unit for determining whether or not the change amount truncation is effective. For example, slice, macroblock, block, LCU (Largest Coding Unit), CT (Coding Tree), CU (Coding Unit), PT (Prediction Tree), PU (Prediction Unit), TT (Transformation Tree), TU (Transformation Unit) ) Or M × N block (M represents the width of the block, for example, takes a value such as 1, 2, 4, or 8. N represents the height of the block, for example 1, 2, 4 or the like. Or a value such as 8, etc. The same applies to the following) can be used as a determination unit for determining whether or not the truncation of the change amount is effective. For example, when the determination unit of whether or not the change amount truncation is valid is a slice, the restriction flag encoding unit 112b encodes a restriction flag for each slice and embeds the code in each slice header. In this case, in the adaptive filter 100 on the decoding device side, the switch 126 is switched for each slice.
 また、変更量のトランケートが有効か否かを判定する方法としては、例えば、(1)変更量をトランケートしたときの誤差(画素値変更部124の出力画像の原画像に対する誤差)と、変更量をトランケートしなかったときの誤差(線形フィルタ121の出力画像の原画像に対する誤差)とを算出し、(2-1)変更量をトランケートしたときの誤差が変更量をトランケートしなかったときの誤差よりも小さくなる場合には、変更量のトランケートが有効であると判定し、(2-2)そうでない場合には、変更量のトランケートが有効でないと判定する方法が挙げられる。また、別の方法としては、(1)変更量をトランケートしたときの符号化効率と変更量をトランケートしなかったときの符号化効率とを算出し、(2-1)変更量をトランケートしたときの符号化効率の方が変更量をトランケートしなかったときの符号化効率よりも高くなる場合には、変更量のトランケートが有効であると判定し、(2-2)そうでない場合には、変更量のトランケートが有効でないと判定する方法が挙げられる。 As a method for determining whether or not the change amount truncation is valid, for example, (1) an error when truncating the change amount (error with respect to the original image of the output image of the pixel value changing unit 124), and the change amount And (2-1) error when truncating the change amount, error when not truncating the change amount, and calculating the error when the change amount is not truncated (error relative to the original image of the output image of the linear filter 121) If the change amount is smaller than that, it is determined that the change amount truncation is effective. (2-2) If not, the change amount truncation is determined not to be effective. As another method, (1) the encoding efficiency when the change amount is truncated and the encoding efficiency when the change amount is not truncated are calculated, and (2-1) the change amount is truncated. When the encoding efficiency of the above becomes higher than the encoding efficiency when the change amount is not truncated, it is determined that the change amount truncation is effective. (2-2) Otherwise, There is a method of determining that the truncation of the change amount is not effective.
 このように、符号化装置側で変更量のトランケートが有効であると判定された単位に限って変更量のトランケートを行うことで、変更量のトランケートにより却って復号精度/符号化効率が低下するという事態を回避することができる。また、変更量のトランケートが有効か否かの判定は符号化装置側で行われるので、復号装置に対して過大な負荷をかけることなく、復号精度/符号化効率の低下を回避することができる。 In this way, by performing the truncation of the change amount only in the unit for which the truncation of the change amount is determined to be valid on the encoding device side, the decoding accuracy / encoding efficiency is reduced by the truncation of the change amount. The situation can be avoided. In addition, since it is determined on the encoding device side whether or not the change amount truncation is valid, a decrease in decoding accuracy / encoding efficiency can be avoided without imposing an excessive load on the decoding device. .
 (構成例3)
 次に、適応フィルタ100の第3の構成例について、図30を参照して説明する。
(Configuration example 3)
Next, a third configuration example of the adaptive filter 100 will be described with reference to FIG.
 図30に示す適応フィルタ100は、第2の構成例に係る適応フィルタ100を改良したものであり、第2の構成例に係る適応フィルタ100と同様、復号装置への搭載に好適なものである。本構成例に係る適応フィルタ100と第2の構成例に係る適応フィルタ100との相違点は、以下の2点である。 An adaptive filter 100 shown in FIG. 30 is an improvement of the adaptive filter 100 according to the second configuration example, and is suitable for mounting in a decoding device, like the adaptive filter 100 according to the second configuration example. . The differences between the adaptive filter 100 according to this configuration example and the adaptive filter 100 according to the second configuration example are the following two points.
 ・本構成例においては、フィルタ演算部120に領域特性算出部127が追加されている。領域特性算出部127は、入力画像(復号画像、又は、デブロッキング後の復号画像_DB)に基づいて、各単位領域の領域特性kを算出する。 In the present configuration example, a region characteristic calculation unit 127 is added to the filter calculation unit 120. The area characteristic calculation unit 127 calculates the area characteristic k of each unit area based on the input image (decoded image or decoded image_DB after deblocking).
 ・本構成例において、閾値決定部125は、各単位領域に属する画素を対象としたフィルタ演算に利用する閾値thの値を決定する。より具体的には、後述する閾値テーブルTHにおいて、領域特性算出部127によって算出された領域特性kに関連付けられた閾値th(k)を特定する。 In the present configuration example, the threshold value determination unit 125 determines the value of the threshold value th used for the filter calculation for pixels belonging to each unit area. More specifically, the threshold value th (k) associated with the region characteristic k calculated by the region characteristic calculation unit 127 is specified in the threshold value table TH described later.
 ここで、領域特性kの算出単位は、スライス、マクロブロック、ブロック、LCU、CT、CU、PT、PU、TT、TU、又はM×Nブロックの何れであってもよい。例えば、領域特性kの算出単位がマクロブロックである場合、閾値決定部125は、各マクロブロックについて、そのマクロブロックに属する画素を対象としたフィルタ演算に利用する閾値thとして、そのマクロブロックの領域特性kに応じた値th(k)を特定することになる。 Here, the calculation unit of the region characteristic k may be any of a slice, macroblock, block, LCU, CT, CU, PT, PU, TT, TU, or M × N block. For example, when the calculation unit of the region characteristic k is a macro block, the threshold value determination unit 125 sets the region of the macro block as the threshold value th used for the filter calculation for pixels belonging to the macro block for each macro block. The value th (k) corresponding to the characteristic k is specified.
 なお、閾値thを決定するために利用可能な領域特性kとしては、例えば、活性度(Activity)が挙げられる。活性度は、復号画像の局所的な乱雑さを示す公知の指標である。閾値thを決定するために活性度を利用する場合、領域特性算出部127は、例えば、各単位領域の活性度kを(A3)式に従って算出する。 It should be noted that the region characteristic k that can be used to determine the threshold th includes, for example, activity. The activity is a publicly known index indicating the local randomness of the decoded image. When the activity is used to determine the threshold th, the region characteristic calculation unit 127 calculates, for example, the activity k of each unit region according to the equation (A3).
 k = Σ|s(i,j)-s(i+1,j)|
     +Σ|s(i,j)-s(i,j+1)|        ・・・(A3)
 ここで、(i,j)は、対象単位領域の左上隅を原点とした座標を表し、S(i,j)は、入力画像(復号画像又はデブロッキング後の復号画像_DB)における画素(i,j)の画素値を表し、Σは、対象単位領域を構成する全ての画素に亘る和を表す。式(A3)は、隣接画素の画素値との差の絶対値の総和(Sum of Absolute Difference, SAD)を指標として、活性度を評価することに対応している。
k = Σ | s (i, j) −s (i + 1, j) |
+ Σ | s (i, j) −s (i, j + 1) | (A3)
Here, (i, j) represents coordinates with the upper left corner of the target unit region as the origin, and S (i, j) represents a pixel (i in the input image (decoded image or decoded image_DB after deblocking)). , J), and Σ represents the sum over all the pixels constituting the target unit region. Expression (A3) corresponds to evaluating the degree of activity using the sum of absolute values of differences from adjacent pixel values (Sum of Absolute Difference, SAD) as an index.
 なお、活性度は、復号画像の局所的な乱雑さの指標となるものであればよく、(A3)式によって定義されるものに限定されない。例えば、単位領域のサイズ(画素数)が一定でない場合、(A3)式によって定義される活性度kを単位領域のサイズ(画素数)Mで除算して得られる正規化された活性度k’=k/Mを、活性度kの代わりに利用するとよい。 Note that the activity is not limited to the one defined by the equation (A3) as long as it is an index of local randomness of the decoded image. For example, when the size (number of pixels) of the unit region is not constant, the normalized activity k ′ obtained by dividing the activity k defined by the equation (A3) by the size (number of pixels) M of the unit region. = K / M may be used instead of the activity k.
 また、活性度kに応じた閾値thを決定するための方法としては、例えば、閾値テーブルTHを参照する方法が挙げられる。閾値テーブルTHとしては、例えば、活性度kと活性度kに応じた閾値th(k)とを互いに関連付けて記録したテーブルを利用することができる。この場合、閾値決定部125は、閾値テーブルTHにおいて、活性度算出部127が算出した活性度kに関連付けられた閾値th(k)を特定する。閾値テーブルTHの一例を表1に示す。 Further, as a method for determining the threshold th according to the activity k, for example, a method of referring to the threshold table TH can be mentioned. As the threshold table TH, for example, a table in which the activity k and the threshold th (k) corresponding to the activity k are recorded in association with each other can be used. In this case, the threshold determination unit 125 specifies the threshold th (k) associated with the activity k calculated by the activity calculation unit 127 in the threshold table TH. An example of the threshold table TH is shown in Table 1.
Figure JPOXMLDOC01-appb-T000012
Figure JPOXMLDOC01-appb-T000012
 表1において、活性度が低くなるほど閾値thの値を小さくしている点に留意されたい。これは、活性度の低い平坦部に対して変更量Δsの大きなフィルタ処理を適用した場合に生じる得るリンキングを防止するためである。 Note that in Table 1, the value of the threshold th is decreased as the activity decreases. This is to prevent linking that may occur when a filter process with a large change amount Δs is applied to a flat portion with low activity.
 なお、閾値thを決定するために参照する閾値テーブルTHは、(1)予め作成されたものであってもよいし、(2)原画像に基づいて符号化装置側で作成したものであってもよいし、(3)復号画像に基づいて復号装置側で作成したものであってもよいが、本構成例においては、予め作成された閾値テーブルTHを参照する。すなわち、閾値決定部125は、予め定められた閾値テーブルTHをメモリから読み出して利用する。 The threshold table TH referred to for determining the threshold th may be (1) created in advance or (2) created on the encoding device side based on the original image. Alternatively, (3) it may be created on the decoding device side based on the decoded image, but in this configuration example, a threshold table TH created in advance is referred to. That is, the threshold value determination unit 125 reads out and uses a predetermined threshold value table TH from the memory.
 このように、各単位領域に属する画素を対象画素とするフィルタ演算に用いる閾値thを、その単位領域の領域特性を示す特性量に応じた値とすることで、フィルタ処理の適用によるノイズ(エッジ周辺で生じるボケや平坦部で生じるリンキングなど)の発生を回避することができる。 As described above, by setting the threshold th used for the filter calculation with the pixel belonging to each unit region as the target pixel to a value corresponding to the characteristic amount indicating the region characteristic of the unit region, noise (edge) due to the application of the filter processing is set. Occurrence of blurring around the periphery and linking occurring on a flat portion can be avoided.
 復号装置に図30に示す適応フィルタ100を搭載する場合、符号化装置には図31に示す適応フィルタ100’を搭載するとよい。符号化装置側の適応フィルタ100’においては、復号装置側の適応フィルタ100と同様、領域特性算出部127がフィルタ演算部120に追加されている。符号化装置側の適応フィルタ100’における領域特性算出部127は、復号装置側の適応フィルタ100における領域特性算出部127と同様、入力画像(局所復号画像又はデブロッキング後の局所復号画像_DB)に基づいて各単位領域の領域特性kを算出する。符号化装置側の適応フィルタ100’における他の構成は、第2の構成例に示したものと同様である。 When the adaptive filter 100 shown in FIG. 30 is installed in the decoding apparatus, the adaptive filter 100 ′ shown in FIG. 31 may be installed in the encoding apparatus. In the adaptive filter 100 ′ on the encoding device side, a region characteristic calculation unit 127 is added to the filter calculation unit 120 as in the adaptive filter 100 on the decoding device side. Similar to the region characteristic calculation unit 127 in the adaptive filter 100 on the decoding device side, the region characteristic calculation unit 127 in the adaptive filter 100 ′ on the encoding device side applies an input image (local decoded image or local decoded image_DB after deblocking) to the input image. Based on this, the region characteristic k of each unit region is calculated. Other configurations of the adaptive filter 100 ′ on the encoding device side are the same as those shown in the second configuration example.
 なお、本構成においては、閾値thを各単位領域の領域特性k(例えば活性度)に基づいて決定する構成について説明したが、これに限定されるものではない。すなわち、閾値thを各単位領域に関する符号化パラメータ(例えば量子化パラメータ)に基づいて決定する構成を採用してもよい。例えば、閾値thを量子化パラメータに基づいて決定する構成を採用する場合、量子化パラメータの値が大きく設定された領域において閾値thを相対的に大きくし、量子化パラメータの値が小さく設定された領域において閾値thを相対的に小さく設定するとよい。これは、量子化パラメータが小さい領域では、符号化ノイズも小さくなっているため、変更量が大きくなるフィルタ演算は復号精度を却って低下させる可能性たあるためである。 In addition, in this structure, although the threshold value th was demonstrated based on the area | region characteristic k (for example, activity) of each unit area, it was not limited to this. That is, a configuration may be adopted in which the threshold th is determined based on an encoding parameter (for example, a quantization parameter) regarding each unit region. For example, when adopting a configuration in which the threshold th is determined based on the quantization parameter, the threshold th is relatively increased in the region where the quantization parameter value is set to be large, and the quantization parameter value is set to be small. The threshold th may be set relatively small in the region. This is because, in the region where the quantization parameter is small, the coding noise is also small, and therefore the filter operation with a large change amount may reduce the decoding accuracy.
 (構成例4)
 次に、適応フィルタの第4の構成例について、図32を参照して説明する。
(Configuration example 4)
Next, a fourth configuration example of the adaptive filter will be described with reference to FIG.
 図29(a)に示す適応フィルタ100は、第3の構成例に係る適応フィルタ100を改良したものであり、第3の構成例に係る適応フィルタ100と同様、復号装置への搭載に好適なものである。本構成例に係る適応フィルタ100と第3の構成例に係る適応フィルタ100との相違点は、以下の4点である。 The adaptive filter 100 shown in FIG. 29A is an improvement of the adaptive filter 100 according to the third configuration example, and is suitable for mounting in a decoding device, like the adaptive filter 100 according to the third configuration example. Is. The differences between the adaptive filter 100 according to this configuration example and the adaptive filter 100 according to the third configuration example are the following four points.
 ・本構成例においては、フィルタ設定部110に閾値テーブル復号部113が追加されている。閾値テーブル復号部113は、符号化データから閾値テーブルTHを復号する。ここで、閾値テーブルTHとは、上述したように、領域特性kと、領域特性kに応じた閾値th(k)とが互いに関連付けて記録されたテーブルのことを指す。 In this configuration example, a threshold table decoding unit 113 is added to the filter setting unit 110. The threshold table decoding unit 113 decodes the threshold table TH from the encoded data. Here, as described above, the threshold value table TH refers to a table in which the area characteristic k and the threshold value th (k) corresponding to the area characteristic k are recorded in association with each other.
 ・本構成例において、閾値決定部125は、各単位領域に属する画素を対象としたフィルタ演算において利用する閾値th(k)を決定する。より具体的には、閾値テーブル復号部113によって復号された閾値テーブルTHにおいて、領域特性算出部127によって算出された領域特性kに関連付けられた閾値th(k)を特定する。 In the present configuration example, the threshold value determination unit 125 determines the threshold value th (k) used in the filter calculation for the pixels belonging to each unit area. More specifically, the threshold value th (k) associated with the region characteristic k calculated by the region characteristic calculation unit 127 is specified in the threshold table TH decoded by the threshold table decoding unit 113.
 ・本構成例においては、第3の構成例に係る適応フィルタ100におけるフィルタ係数復号部111が、フィルタ係数テーブル復号部114に置き換えられている。フィルタ係数テーブル復号部114は、符号化データからフィルタ係数テーブルWを復号する。ここで、フィルタ係数テーブルWとは、領域特性kと、領域特性kに応じたフィルタ係数群w(k)とが互いに関連付けて記録されたテーブルのことを指す。 In this configuration example, the filter coefficient decoding unit 111 in the adaptive filter 100 according to the third configuration example is replaced with a filter coefficient table decoding unit 114. The filter coefficient table decoding unit 114 decodes the filter coefficient table W from the encoded data. Here, the filter coefficient table W refers to a table in which the region characteristic k and the filter coefficient group w (k) corresponding to the region characteristic k are recorded in association with each other.
 ・本構成例においては、フィルタ演算部120にフィルタ係数決定部128が追加されている。フィルタ係数決定部128は、各単位領域に属する画素を対象としたフィルタ演算において利用するフィルタ係数群w(k)を決定する。より具体的には、フィルタ係数テーブル復号部114によって復号されたフィルタ係数テーブルWにおいて、領域特性算出部127によって算出された領域特性kに関連付けられたフィルタ係数群w(k)を特定する。 In the present configuration example, a filter coefficient determination unit 128 is added to the filter calculation unit 120. The filter coefficient determination unit 128 determines a filter coefficient group w (k) used in the filter calculation for pixels belonging to each unit region. More specifically, in the filter coefficient table W decoded by the filter coefficient table decoding unit 114, the filter coefficient group w (k) associated with the region characteristic k calculated by the region characteristic calculation unit 127 is specified.
 ここで、領域特性kを算出する単位は、スライス、マクロブロック、ブロック、LCU、CT、CU、PT、PU、TT、TU、又はM×Nブロックの何れであってもよい。例えば、領域特性kを算出する単位がマクロブロックである場合、閾値決定部125は、マクロブロック毎にそのマクロブロックの領域特性kに応じた閾値th(k)を決定し、フィルタ係数決定部128は、マクロブロック毎にそのマクロブロックの領域特性kに応じたフィルタ係数群w(k)を決定することになる。 Here, the unit for calculating the region characteristic k may be any of a slice, macroblock, block, LCU, CT, CU, PT, PU, TT, TU, or M × N block. For example, when the unit for calculating the region characteristic k is a macro block, the threshold value determination unit 125 determines a threshold value th (k) corresponding to the region characteristic k of the macro block for each macro block, and the filter coefficient determination unit 128. For each macroblock, a filter coefficient group w (k) corresponding to the region characteristic k of the macroblock is determined.
 復号装置に図32に示す適応フィルタ100を搭載する場合、符号化装置には図33に示す適応フィルタ100’を搭載するとよい。符号化装置側の適応フィルタ100’においては、(1)復号装置側の適応フィルタ100における閾値テーブル復号部113の代わりに、閾値テーブル作成部113aと閾値テーブル符号化部113bとがフィルタ設定部110に追加され、(2)復号装置側の適応フィルタ100におけるフィルタ係数テーブル復号部114の代わりに、フィルタ係数テーブル作成部114aとフィルタ係数テーブル符号化部114bとがフィルタ設定部110に追加されている。 When the decoding apparatus is equipped with the adaptive filter 100 shown in FIG. 32, the coding apparatus may be equipped with the adaptive filter 100 'shown in FIG. In the adaptive filter 100 ′ on the encoding device side, (1) instead of the threshold table decoding unit 113 in the adaptive filter 100 on the decoding device side, a threshold table creation unit 113 a and a threshold table encoding unit 113 b include a filter setting unit 110. (2) Instead of the filter coefficient table decoding unit 114 in the adaptive filter 100 on the decoding device side, a filter coefficient table creation unit 114a and a filter coefficient table encoding unit 114b are added to the filter setting unit 110. .
 符号化装置側の適応フィルタ100’においては、(1)閾値テーブル作成部113aが、閾値テーブルTHを作成し、(2)閾値テーブル符号化部113bが、閾値テーブル作成部113aによって作成された閾値テーブルTHを符号化する。ここで、閾値テーブル作成部113aは、閾値テーブルTHの各要素を、以下の処理によって決定する。 In the adaptive filter 100 ′ on the encoding device side, (1) the threshold value table creating unit 113a creates the threshold value table TH, and (2) the threshold value table coding unit 113b is created by the threshold value table creating unit 113a. The table TH is encoded. Here, the threshold table creation unit 113a determines each element of the threshold table TH by the following processing.
 すなわち、閾値テーブル作成部113aは、フィルタ係数テーブル作成部114aで作成されたフィルタ係数テーブルWと、予め用意された閾値TH1~THNt(Ntは閾値の総数)を用いて、領域特性k毎にNt種類の閾値を用いた場合のフィルタ処理を行う。フィルタ処理後の画像と符号化対象画像との二乗誤差を算出する。続いて、領域特性k毎に、Nt個の2乗誤差の内、2乗誤差が最小となる値を閾値th(k)に設定する。 That is, the threshold value table creating unit 113a uses the filter coefficient table W created by the filter coefficient table creating unit 114a and threshold values TH1 to THNt (Nt is the total number of threshold values) prepared in advance, for each area characteristic k. Filter processing is performed when a threshold value of a type is used. A square error between the image after filtering and the encoding target image is calculated. Subsequently, a value that minimizes the square error among Nt square errors is set as the threshold th (k) for each region characteristic k.
 また、符号化装置側の適応フィルタ100’においては、(1)フィルタ係数テーブル作成部114aが、フィルタ係数テーブルWを作成し、(2)フィルタ係数テーブル符号化部114bが、フィルタ係数テーブル作成部114aによって作成されたフィルタ係数テーブルWを符号化する。ここで、フィルタ係数テーブル作成部114aは、最小二乗法を用いて、線形フィルタ121の出力画像の原画像(符号化対象画像)に対する二乗誤差を最小化するフィルタ係数テーブルWを決定する。 In the adaptive filter 100 ′ on the encoding device side, (1) the filter coefficient table creation unit 114a creates the filter coefficient table W, and (2) the filter coefficient table coding unit 114b performs the filter coefficient table creation unit. The filter coefficient table W created by 114a is encoded. Here, the filter coefficient table creation unit 114a determines a filter coefficient table W that minimizes a square error with respect to the original image (encoding target image) of the output image of the linear filter 121 using the least square method.
 なお、本構成においては、閾値テーブルTHそのもの、及び、フィルタ係数テーブルWそのものを符号化する構成を示したが、符号化装置側の適応フィルタ100の構成はこれに限定されない。特に、閾値テーブルTH/フィルタ係数テーブルWが予め定められた複数の閾値テーブルTH/フィルタ係数テーブルWの中から選択される場合には、選択された閾値テーブルTH/フィルタ係数テーブルWのインデックスを符号化する構成を採用してもよい。通常、閾値テーブルTH/フィルタ係数テーブルWのインデックスを符号化して得られる符号は、閾値テーブルTH/フィルタ係数テーブルWそのものを符号化して得られる符号よりも短くなる。したがって、このような構成を採用すれば、符号化効率を向上させることができる。
<<実施形態3>>
 本発明の第3の実施形態について、図34~図44を参照して説明する。
In this configuration, the configuration in which the threshold table TH itself and the filter coefficient table W itself are encoded is shown, but the configuration of the adaptive filter 100 on the encoding device side is not limited to this. In particular, when the threshold table TH / filter coefficient table W is selected from a plurality of predetermined threshold tables TH / filter coefficient tables W, the index of the selected threshold table TH / filter coefficient table W is encoded. You may employ | adopt the structure which makes it. Usually, the code obtained by encoding the index of the threshold table TH / filter coefficient table W is shorter than the code obtained by encoding the threshold table TH / filter coefficient table W itself. Therefore, if such a configuration is adopted, encoding efficiency can be improved.
<< Embodiment 3 >>
A third embodiment of the present invention will be described with reference to FIGS.
 〔構成例1〕
 本実施形態に係る適応フィルタの第1の構成例について、図34を参照して説明する。
[Configuration example 1]
A first configuration example of the adaptive filter according to the present embodiment will be described with reference to FIG.
 図34に示す適応フィルタ200は、復号装置への搭載に好適な適応フィルタであり、フィルタ設定部210及びフィルタ演算部220を備えている。 The adaptive filter 200 shown in FIG. 34 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 210 and a filter calculation unit 220.
 フィルタ設定部210は、フィルタ特性を設定するための手段であり、フィルタ係数復号部211を備えている。 The filter setting unit 210 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 211.
 フィルタ係数復号部211は、符号化データから第1フィルタ係数テーブルW1、オフセットc、及び第2フィルタ係数テーブルW2を復号する。ここで、第1フィルタ係数テーブルW1は、後述する第1領域特性k1と第1フィルタ係数群w1(k1)とを互いに関連付けて記録したテーブルであり、第2フィルタ係数テーブルW2は、後述する第2領域特性k2と第2フィルタ係数群w2(k2)とを互いに関連付けて記録したテーブルである。 The filter coefficient decoding unit 211 decodes the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 from the encoded data. Here, the first filter coefficient table W1 is a table in which a first region characteristic k1 described later and a first filter coefficient group w1 (k1) are recorded in association with each other, and the second filter coefficient table W2 is a first filter coefficient table W2 described later. It is the table which recorded 2 area | region characteristic k2 and 2nd filter coefficient group w2 (k2) mutually linked | related.
 フィルタ演算部220は、フィルタ演算を実行するための手段であり、第1空間フィルタ221、オフセット加算部222、第2の線形フィルタ223、加算部224、領域特性算出部225を備えている。 The filter calculation unit 220 is a means for executing a filter calculation, and includes a first spatial filter 221, an offset addition unit 222, a second linear filter 223, an addition unit 224, and a region characteristic calculation unit 225.
 第1空間フィルタ221は、(B1)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s1[1],s1[2],・・・,s1[N1]から、出力画像における対象画素の画素値s1’を算出する。 The first spatial filter 221 uses the pixel values s1 [1], s1 [2],..., S1 [] of the reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (B1). N1], the pixel value s1 ′ of the target pixel in the output image is calculated.
  s1’=w1(k1)[1]s1[1]+w1(k1)[2]s1[2]+・・・
      +w1(k1)[N1]s1[N1]          ・・・(B1)
 ここで、w1(k1)[1],w1(k1)[2],・・・,w1(k1)[N1]は、後述する領域特性算出部225によって算出された、対象画素を含む単位領域の第1領域特性k1に応じた第1フィルタ係数群w1(k1)の要素である。より具体的には、フィルタ係数復号部221によって復号された第1フィルタ係数テーブルW1において、領域特性算出部225によって算出された第1領域特性k1に関連付けられた第1フィルタ係数群w1(k1)の要素である。第1空間フィルタ221によって算出された画素値s1’は、後段のオフセット加算部222に供給される。
s1 ′ = w1 (k1) [1] s1 [1] + w1 (k1) [2] s1 [2] +.
+ W1 (k1) [N1] s1 [N1] (B1)
Here, w1 (k1) [1], w1 (k1) [2],..., W1 (k1) [N1] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later. Are the elements of the first filter coefficient group w1 (k1) corresponding to the first region characteristic k1. More specifically, in the first filter coefficient table W1 decoded by the filter coefficient decoding unit 221, the first filter coefficient group w1 (k1) associated with the first region characteristic k1 calculated by the region characteristic calculation unit 225. Elements. The pixel value s1 ′ calculated by the first spatial filter 221 is supplied to the subsequent offset addition unit 222.
 なお、第1空間フィルタ221における参照領域(参照画素の集合)については、参照する図面を代えて後述する。 Note that the reference region (collection of reference pixels) in the first spatial filter 221 will be described later with reference to another drawing.
 オフセット加算部222は、第1空間フィルタ221によって算出されたs1’にオフセットcを加算するための手段である。ここで、cは、フィルタ係数復号部221によって復号されたオフセットである。オフセット加算部222によって算出された和s1’+cは、後段の加算部224に供給される。 The offset addition unit 222 is a means for adding the offset c to s1 ′ calculated by the first spatial filter 221. Here, c is an offset decoded by the filter coefficient decoding unit 221. The sum s <b> 1 ′ + c calculated by the offset addition unit 222 is supplied to the subsequent addition unit 224.
 第2空間フィルタ223は、(B2)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s2[1],s2[2],・・・,s2[N2]から、出力画像における対象画素の画素値s2’を算出する。 The second spatial filter 223 uses the pixel values s2 [1], s2 [2],..., S2 [] of the reference pixel in the input image (decoded image or decoded image after deblocking) according to the equation (B2). N2], the pixel value s2 ′ of the target pixel in the output image is calculated.
  s2’=w2(k2)[1]s2[1]+w2(k2)[2]s2[2]+・・・
      +w2(k2)[N2]s2[N2]          ・・・(B2)
 ここで、w2(k2)[1],w2(k2)[2],・・・,w2(k2)[N2]は、後述する領域特性算出部225によって算出された、対象画素を含む単位領域の第2領域特性k2に応じた第2フィルタ係数群w2(k2)の要素である。より具体的には、フィルタ係数復号部221によって復号された第2フィルタ係数テーブルW2において、領域特性算出部225によって算出された第2領域特性k2に関連付けられた第2フィルタ係数群w2(k2)の要素である。第2空間フィルタ223によって算出された画素値s2’は、後段の加算部224に供給される。
s2 ′ = w2 (k2) [1] s2 [1] + w2 (k2) [2] s2 [2] +.
+ W2 (k2) [N2] s2 [N2] (B2)
Here, w2 (k2) [1], w2 (k2) [2],..., W2 (k2) [N2] are unit regions including the target pixel calculated by the region characteristic calculation unit 225 described later. This is an element of the second filter coefficient group w2 (k2) corresponding to the second region characteristic k2. More specifically, in the second filter coefficient table W2 decoded by the filter coefficient decoding unit 221, the second filter coefficient group w2 (k2) associated with the second region characteristic k2 calculated by the region characteristic calculation unit 225. Elements. The pixel value s2 ′ calculated by the second spatial filter 223 is supplied to the subsequent addition unit 224.
 なお、第2空間フィルタ223における参照領域(参照画素の集合)についても、参照する図面を代えて後述する。 Note that the reference region (collection of reference pixels) in the second spatial filter 223 will be described later with reference to another drawing.
 加算部224は、オフセット加算部222によって算出された和s1’+cに、第2空間フィルタ223によって算出されたs2’を加算する。加算部224によって算出された和s1’+c+s2’は、適応フィルタ200の外部に出力される。 The addition unit 224 adds s2 ′ calculated by the second spatial filter 223 to the sum s1 ′ + c calculated by the offset addition unit 222. The sum s 1 ′ + c + s 2 ′ calculated by the adder 224 is output to the outside of the adaptive filter 200.
 領域特性算出部225は、各単位領域について第1領域特性k1と第2領域特性k2とを算出する。第1領域特性k1と第2領域特性k2とは相異なる領域特性であり、例えば、活性度とエッジ方向とである。フレームを分割して得られる任意の領域、例えば、スライス、マクロブロック、ブロック、LCU、CT、CU、PT、PU、TT、TU、又はM×Nブロックを、第1領域特性k1及び第2領域特性k2の算出単位とすることができる。例えば、第1領域特性k1及び第2領域特性k2の算出単位がマクロブロックである場合、第1フィルタ係数群w1(k1)と第2フィルタ係数群w2(k2)とがマクロブック毎に更新されることになる。 The region characteristic calculation unit 225 calculates a first region characteristic k1 and a second region characteristic k2 for each unit region. The first region characteristic k1 and the second region characteristic k2 are different region characteristics, for example, activity and edge direction. Arbitrary areas obtained by dividing a frame, for example, slices, macroblocks, blocks, LCUs, CTs, CUs, PTs, PUs, TTs, TUs, or M × N blocks, a first area characteristic k1 and a second area The calculation unit of the characteristic k2 can be used. For example, when the calculation unit of the first region characteristic k1 and the second region characteristic k2 is a macro block, the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) are updated for each macro book. Will be.
 次に、第1空間フィルタ221及び第2空間フィルタ223における参照領域(参照画素の集合)について、図35~図38を参照して説明する。 Next, reference regions (collection of reference pixels) in the first spatial filter 221 and the second spatial filter 223 will be described with reference to FIGS.
 図35は、第1空間フィルタ221の参照領域の設定例を示す図である。同図に示す5×5画素からなる矩形領域において、中心の画素が対象画素に対応し、黒塗りの画素が参照画素に対応する。また、黒塗りの画素に記された白抜きの文字は、その画素の画素値に乗ぜられるフィルタ係数を示す。なお、これらのフィルタ係数は、第1領域特性k1に依存して決まるが、同図においては「(k1)」の表記を省略している。 FIG. 35 is a diagram illustrating a setting example of the reference area of the first spatial filter 221. In the rectangular area composed of 5 × 5 pixels shown in the figure, the center pixel corresponds to the target pixel, and the black pixel corresponds to the reference pixel. In addition, white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1, the notation of “(k1)” is omitted in FIG.
 図36は、参照領域が図35のように設定された第1空間フィルタ221と共に使用する第2空間フィルタ223の参照領域の設定例を示す図である。(a)は、k2=0のときの参照領域を示し、(b)は、k2=1のときの参照領域を示し、(c)は、k2=2のときの参照領域を示し、(d)は、k2=3のときの参照領域を示す。各図に示す5×5画素からなる矩形領域において、中心の画素が対象画素に対応し、黒塗りの画素が参照画素に対応する。また、黒塗りの画素に記された白抜きの文字は、その画素の画素値に乗ぜられるフィルタ係数を示す。なお、これらのフィルタ係数は、第2領域特性k2に依存して決まるが、同図においては「(k2)」の表記を省略している。 FIG. 36 is a diagram illustrating a setting example of the reference area of the second spatial filter 223 used together with the first spatial filter 221 in which the reference area is set as illustrated in FIG. (A) shows a reference area when k2 = 0, (b) shows a reference area when k2 = 1, (c) shows a reference area when k2 = 2, (d ) Indicates a reference area when k2 = 3. In the rectangular area composed of 5 × 5 pixels shown in each figure, the center pixel corresponds to the target pixel, and the black pixel corresponds to the reference pixel. In addition, white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the second region characteristic k2, the notation of “(k2)” is omitted in FIG.
 第1空間フィルタ221の参照領域と第2の空間フィルタ223の参照領域とが一致している場合、第フィルタ係数群w1(k1)と第2フィルタ係数群w2(k2)とが線形従属になるため、符号化装置において第1フィルタ係数群w1(k1)及び第2フィルタ係数群w2(k2)を算出することができなくなる。しかし、図35及び図36に示すように、第1空間フィルタ221の参照領域と第2の空間フィルタ223の参照領域とを異ならせておけば、符号化装置において第1フィルタ係数群w1(k1)及び第2フィルタ係数群w2(k2)を算出することができなるという事態を回避することができる。 When the reference region of the first spatial filter 221 and the reference region of the second spatial filter 223 match, the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) are linearly dependent. Therefore, the encoding device cannot calculate the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2). However, as shown in FIGS. 35 and 36, if the reference region of the first spatial filter 221 is different from the reference region of the second spatial filter 223, the first filter coefficient group w1 (k1 ) And the second filter coefficient group w2 (k2) cannot be calculated.
 図37は、第1空間フィルタ221の参照領域の他の設定例を示す図である。同図に示す7×5画素からなる矩形領域において、中心の画素が対象画素に対応し、黒塗りの画素が参照画素に対応する。また、黒塗りの画素に記された白抜きの文字は、その画素の画素値に乗ぜられるフィルタ係数を示す。なお、これらのフィルタ係数は、第1領域特性k1に依存して決まるが、同図においては「(k1)」の表記を省略している。 FIG. 37 is a diagram illustrating another setting example of the reference region of the first spatial filter 221. In the rectangular area composed of 7 × 5 pixels shown in the figure, the center pixel corresponds to the target pixel, and the black pixel corresponds to the reference pixel. In addition, white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1, the notation of “(k1)” is omitted in FIG.
 図38は、参照領域が図37のように設定された第1空間フィルタ221と共に使用する第2空間フィルタ223の参照領域の設定例を示す図である。(a)は、k2=0のときの参照領域を示し、(b)は、k2=1のときの参照領域を示し、(c)は、k2=2のときの参照領域を示し、(d)は、k2=3のときの参照領域を示す。各図に示す5×5画素からなる矩形領域において、中心の画素が対象画素に対応し、黒塗りの画素が参照画素に対応する。また、黒塗りの画素に記された白抜きの文字は、その画素の画素値に乗ぜられるフィルタ係数を示す。なお、これらのフィルタ係数は、第2領域特性k2に依存して決まるが、同図においては「(k2)」の表記を省略している。 FIG. 38 is a diagram illustrating a setting example of the reference region of the second spatial filter 223 used together with the first spatial filter 221 in which the reference region is set as illustrated in FIG. (A) shows a reference area when k2 = 0, (b) shows a reference area when k2 = 1, (c) shows a reference area when k2 = 2, (d ) Indicates a reference area when k2 = 3. In the rectangular area composed of 5 × 5 pixels shown in each figure, the center pixel corresponds to the target pixel, and the black pixel corresponds to the reference pixel. In addition, white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the second region characteristic k2, the notation of “(k2)” is omitted in FIG.
 図37及び図38に示す例においても、第1空間フィルタ221の参照領域と第2の空間フィルタ223の参照領域とが異なっている。したがって、符号化装置において第1フィルタ係数群w1(k1)及び第2フィルタ係数群w2(k2)を算出することができなくなるという事態が招来する虞がない。 37 and 38, the reference region of the first spatial filter 221 is different from the reference region of the second spatial filter 223. Therefore, there is no possibility that the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) cannot be calculated in the encoding device.
 以上のように、本構成例に係る適応フィルタ200は、(1)複数の第1フィルタ係数群w1(k1)を、対応する第1領域特性k1に関連付けて記録した第1フィルタ係数テーブルW1、及び、複数の第2フィルタ係数群w2(k2)を、対応する第2領域特性k2に関連付けて記録した第2フィルタ係数テーブルW2を復号するフィルタ係数復号部211と、(2)各単位領域の第1領域特性k1及び第2領域特性k2を算出する領域特性算出部225と、(3)各単位領域に属する各画素を対象画素とするフィルタ演算であって、第1フィルタ係数テーブルW1に記録された複数の第1フィルタ係数群w(k1)のうち、領域特性算出部225が算出した該単位領域の第1領域特性k1に対応したフィルタ係数群w1(k1)、及び、第2フィルタ係数テーブルW2に記録された複数の第2フィルタ係数群w(k2)のうち、領域特性算出部225が算出した該単位領域の第2領域特性k2に対応したフィルタ係数群w2(k2)を利用したフィルタ演算を実行するフィルタ演算部220と、を備えている。 As described above, the adaptive filter 200 according to this configuration example includes (1) the first filter coefficient table W1 in which a plurality of first filter coefficient groups w1 (k1) are recorded in association with the corresponding first region characteristics k1, And a filter coefficient decoding unit 211 for decoding the second filter coefficient table W2 in which a plurality of second filter coefficient groups w2 (k2) are recorded in association with the corresponding second area characteristic k2, and (2) each unit area An area characteristic calculation unit 225 for calculating the first area characteristic k1 and the second area characteristic k2, and (3) a filter operation using each pixel belonging to each unit area as a target pixel, which is recorded in the first filter coefficient table W1. Among the plurality of first filter coefficient groups w (k1) that have been calculated, the filter coefficient group w1 (k1) corresponding to the first area characteristic k1 of the unit area calculated by the area characteristic calculation unit 225, and Among the plurality of second filter coefficient groups w (k2) recorded in the second filter coefficient table W2, the filter coefficient group w2 (k2) corresponding to the second area characteristic k2 of the unit area calculated by the area characteristic calculation unit 225 And a filter calculation unit 220 that executes a filter calculation using the above.
 したがって、本構成例に係る適応フィルタ200を用いれば、第1領域特性k1及び第2領域特性k2の双方に依存する複数のフィルタ係数群w(k1,k2)を、対応する領域特性対(k1,k2)に関連付けて記録したフィルタ係数テーブルWを復号することなく、各単位領域の第1領域特性k1及び第2領域特性k2の双方に応じたフィルタ演算を行うことができる。すなわち、本構成例に係る適応フィルタを用いれば、符号量の大幅な増大を招来することなく、原画像に近い復号画像を精度良く再現することができる。 Therefore, when the adaptive filter 200 according to this configuration example is used, a plurality of filter coefficient groups w (k1, k2) depending on both the first region characteristic k1 and the second region characteristic k2 are converted into corresponding region characteristic pairs (k1 , K2), the filter operation corresponding to both the first region characteristic k1 and the second region characteristic k2 of each unit region can be performed without decoding the filter coefficient table W recorded in association with the unit region. That is, if the adaptive filter according to this configuration example is used, a decoded image close to the original image can be accurately reproduced without causing a significant increase in the code amount.
 なお、フィルタ係数復号部221によって復号された第1フィルタ係数群w1(k1)及び第2フィルタ係数群w2(k2)の要素は、量子化されたフィルタ係数であり得る。また、フィルタ係数復号部221によって復号されたオフセットcも、量子化されたオフセットであり得る。この場合、第1空間フィルタとオフセット加算部222とからなる線形フィルタは、(a)量子化されたフィルタ係数及びオフセットを逆量子化したうえで、逆量子化後のフィルタ係数を用いたフィルタ演算を行う構成であってもよいし、(b)逆量子化前のフィルタ係数及びオフセットを用いたフィルタ演算を行ったうえで、フィルタ演算の結果を右シフトする構成であってもよい。同様に、第2空間フィルタからなる線形フィルタは、量子化されたフィルタ係数を逆量子化したうえで、逆量子化後のフィルタ係数を用いたフィルタ演算を行う構成であってもよいし、(b)量子化前のフィルタ係数を用いたフィルタ演算を行ったうえで、フィルタ演算の結果を右シフトする構成であってもよい。例えば、フィルタ係数群wの量子化精度が8ビットである場合、量子化後のフィルタ係数は量子化前のフィルタ係数の256倍になるため、フィルタ演算の結果を8ビットだけ右シフトすることによって、構成(a)と同一の演算結果が得られる。 Note that the elements of the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) decoded by the filter coefficient decoding unit 221 may be quantized filter coefficients. Further, the offset c decoded by the filter coefficient decoding unit 221 may also be a quantized offset. In this case, the linear filter comprising the first spatial filter and the offset adding unit 222 performs (a) a filter operation using the filter coefficient after the inverse quantization after dequantizing the quantized filter coefficient and the offset. Or (b) a configuration in which a filter operation using a filter coefficient and an offset before inverse quantization is performed, and then a result of the filter operation is shifted to the right. Similarly, the linear filter including the second spatial filter may be configured to perform a filter operation using the filter coefficient after inverse quantization after dequantizing the quantized filter coefficient, b) A configuration in which the filter operation using the pre-quantization filter coefficient is performed and then the result of the filter operation is shifted to the right may be employed. For example, when the quantization accuracy of the filter coefficient group w is 8 bits, the filter coefficient after quantization is 256 times the filter coefficient before quantization, so by shifting the filter operation result to the right by 8 bits The same calculation result as that of the configuration (a) is obtained.
 復号装置に本構成例に係る適応フィルタ200(図34)を搭載する場合、符号化装置には図39に示す適応フィルタ200’を搭載するとよい。図39に示すように、符号化装置側の適応フィルタ200’においては、復号装置側の適応フィルタ200におけるフィルタ係数復号部211を、フィルタ係数テーブル作成部211aとフィルタ係数テーブル符号化部211bとに置き換えた構成がとられる。 When the adaptive filter 200 (FIG. 34) according to this configuration example is installed in the decoding apparatus, the encoding apparatus may be equipped with the adaptive filter 200 'shown in FIG. As shown in FIG. 39, in the adaptive filter 200 ′ on the encoding device side, the filter coefficient decoding unit 211 in the adaptive filter 200 on the decoding device side is replaced with a filter coefficient table creation unit 211a and a filter coefficient table encoding unit 211b. The replacement configuration is taken.
 符号化装置側の適応フィルタ200’においては、(1)フィルタ係数テーブル作成部211aが、第1フィルタ係数テーブルW1及び第2フィルタ係数テーブルW2を作成し、(2)フィルタ係数テーブル符号化部211bが、フィルタ係数テーブル作成部211aaによって作成された第1フィルタ係数テーブルW1及び第2フィルタ係数テーブルW2を符号化する。ここで、フィルタ係数テーブル作成部211aは、最小二乗法を用いて、フィルタ出力画像(加算部224の出力画像)の原画像に対する二乗誤差を最小化する第1フィルタ係数テーブルW1及び第2フィルタ係数テーブルW2を決定する。 In the adaptive filter 200 ′ on the encoding device side, (1) the filter coefficient table creation unit 211a creates the first filter coefficient table W1 and the second filter coefficient table W2, and (2) the filter coefficient table coding unit 211b. Encodes the first filter coefficient table W1 and the second filter coefficient table W2 created by the filter coefficient table creation unit 211aa. Here, the filter coefficient table creation unit 211a uses the least square method to minimize the square error with respect to the original image of the filter output image (the output image of the addition unit 224) and the second filter coefficient table W1. The table W2 is determined.
 〔構成例2〕
 本実施形態に係る適応フィルタの第2の構成例について、図40を参照して説明する。
[Configuration example 2]
A second configuration example of the adaptive filter according to the present embodiment will be described with reference to FIG.
 図40に示す適応フィルタ200は、復号装置への搭載に好適な適応フィルタであり、フィルタ設定部210及びフィルタ演算部220を備えている。 40 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 210 and a filter calculation unit 220.
 フィルタ設定部210は、フィルタ特性を設定するための手段であり、フィルタ係数復号部211と第2領域特性利用フラグ復号部212とを備えている。 The filter setting unit 210 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 211 and a second region characteristic use flag decoding unit 212.
 フィルタ係数復号部211は、第1の構成例と同様、符号化データから第1フィルタ係数テーブルW1、オフセットc、及び第2フィルタ係数テーブルW2を復号する。 The filter coefficient decoding unit 211 decodes the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 from the encoded data, as in the first configuration example.
 第2領域特性利用フラグ復号部212は、符号化データから第2領域特性利用フラグenable_dirを復号する。第2領域特性利用フラグenable_dirは、各単位領域領域に対するフィルタ演算において、第2領域特性k2に応じて決まるフィルタ係数群w2(k2)を用いたフィルタ演算を行うか否かを指定する1ビットのフラグであり、フィルタ係数群w2(k2)を用いたフィルタ演算を行うべきときに値「1」をとり、フィルタ係数群w2(k2)を用いたフィルタ演算を行うべきでないときに値「0」をとる。なお、第2領域特性利用フラグenable_dirの設定単位は任意であり、第1領域特性k1及び第2領域特性k2の算出単位と共通であっても良いし、共通でなくてもよい。 The second region characteristic use flag decoding unit 212 decodes the second region characteristic use flag enable_dir from the encoded data. The second region characteristic use flag enable_dir is a 1-bit specifying whether or not to perform a filter operation using the filter coefficient group w2 (k2) determined according to the second region characteristic k2 in the filter operation for each unit region. The flag is “1” when the filter operation using the filter coefficient group w2 (k2) is to be performed, and the value “0” when the filter operation using the filter coefficient group w2 (k2) is not to be performed. Take. Note that the setting unit of the second region characteristic use flag enable_dir is arbitrary, and may or may not be the same as the calculation unit of the first region characteristic k1 and the second region characteristic k2.
 フィルタ演算部220は、フィルタ演算を実行するための手段であり、第1空間フィルタ221、オフセット加算部222、第2の線形フィルタ223、加算部224、領域特性算出部225、及びスイッチ226を備えている。 The filter calculation unit 220 is a means for performing a filter calculation, and includes a first spatial filter 221, an offset addition unit 222, a second linear filter 223, an addition unit 224, a region characteristic calculation unit 225, and a switch 226. ing.
 第1空間フィルタ221は、第1の構成例と同様、上述した(B1)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s1[1],s1[2],・・・,s1[N1]から、出力画像における対象画素の画素値s1’を算出する。 Similar to the first configuration example, the first spatial filter 221 has pixel values s1 [1] and s1 of reference pixels in the input image (decoded image or decoded image after deblocking) according to the above-described equation (B1). From [2],..., S1 [N1], the pixel value s1 ′ of the target pixel in the output image is calculated.
 オフセット加算部222は、第1の構成例と同様、第1空間フィルタ221によって算出されたs1’にオフセットcを加算する。ただし、本構成例においては、オフセット加算部222によって算出された和s1’+cが、後段の加算部224及びスイッチ226に供給される。なお、オフセット加算部222の出力画像のことを、以下、「1フィルタ出力画像」とも呼称する。 The offset addition unit 222 adds the offset c to s1 ′ calculated by the first spatial filter 221 as in the first configuration example. However, in this configuration example, the sum s1 ′ + c calculated by the offset adding unit 222 is supplied to the subsequent adding unit 224 and the switch 226. Note that the output image of the offset adding unit 222 is hereinafter also referred to as “one filter output image”.
 第2空間フィルタ223は、第1の構成例と同様、上述した(B2)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s2[1],s2[2],・・・,s2[N2]から、出力画像における対象画素の画素値s2’を算出する。第2空間フィルタ223によって算出された画素値s2’は、後段の加算部224に供給される。ただし、対象画素を含む単位領域(第2領域特性利用フラグの設定単位)に関する第2領域特性利用フラグの値が「0」である場合には、上述した(B2)式に示すフィルタ演算を実行しない。 Similarly to the first configuration example, the second spatial filter 223 has pixel values s2 [1] and s2 of reference pixels in the input image (decoded image or decoded image after deblocking) according to the above-described equation (B2). From [2],..., S2 [N2], the pixel value s2 ′ of the target pixel in the output image is calculated. The pixel value s <b> 2 ′ calculated by the second spatial filter 223 is supplied to the subsequent adding unit 224. However, when the value of the second region characteristic use flag relating to the unit region including the target pixel (the setting unit of the second region characteristic use flag) is “0”, the filter calculation shown in the above-described equation (B2) is executed. do not do.
 加算部224は、第1の構成例と同様、オフセット加算部222によって算出された和s1’+cに、第2空間フィルタ223によって算出されたs2’を加算する。ただし、本構成例においては、加算部224によって算出された和s1’+c+s2’が、後段のスイッチ226に供給される。なお、加算部224の出力画像のことを、以下、「2フィルタ出力画像」とも呼称する。 As in the first configuration example, the adding unit 224 adds s2 ′ calculated by the second spatial filter 223 to the sum s1 ′ + c calculated by the offset adding unit 222. However, in this configuration example, the sum s 1 ′ + c + s 2 ′ calculated by the adder 224 is supplied to the switch 226 at the subsequent stage. Note that the output image of the adding unit 224 is hereinafter also referred to as “two-filter output image”.
 領域特性算出部225は、第1の構成例と同様、各単位領域(領域特性の算出単位)について第1領域特性k1と第2領域特性k2とを算出する。例えば、第1領域特性k1と第2領域特性k2とを算出する単位がマクロブロックである場合、第1フィルタ係数群w1(k1)と第2フィルタ係数群w2(k2)とがマクロブック毎に更新されることになる。 Similar to the first configuration example, the region characteristic calculation unit 225 calculates the first region characteristic k1 and the second region characteristic k2 for each unit region (region characteristic calculation unit). For example, when the unit for calculating the first region characteristic k1 and the second region characteristic k2 is a macro block, the first filter coefficient group w1 (k1) and the second filter coefficient group w2 (k2) are provided for each macro book. Will be updated.
 スイッチ226は、1フィルタ出力画像を外部に出力するか、2フィルタ出力画像を外部に出力するかを、第2領域特性利用フラグ復号部212によって復号された第2領域特性利用フラグenable_dirの値に応じて切り替える。より正確に言えば、出力画像における対象画素の画素値として、オフセット加算部222にて算出された和s1’+cを出力するか、加算部225にて算出された和s1’+c+s2’を出力するかを、第2領域特性利用フラグ復号部212によって復号された第2領域特性利用フラグenable_dirの値に応じて切り替える。更に具体的には、第2領域特性利用フラグenable_dirの値が「0」である場合には、オフセット加算部222にて算出された和s1’+cを出力し、第2領域特性利用フラグenable_dirの値が「1」である場合には、加算部225にて算出された和s1’+c+s2’を出力する。 The switch 226 determines whether to output the one-filter output image or the two-filter output image to the value of the second region characteristic use flag enable_dir decoded by the second region characteristic use flag decoding unit 212. Switch accordingly. More precisely, the sum s1 ′ + c calculated by the offset adder 222 or the sum s1 ′ + c + s2 ′ calculated by the adder 225 is output as the pixel value of the target pixel in the output image. Is switched according to the value of the second region characteristic use flag enable_dir decoded by the second region characteristic use flag decoding unit 212. More specifically, when the value of the second region characteristic use flag enable_dir is “0”, the sum s1 ′ + c calculated by the offset adding unit 222 is output, and the second region characteristic use flag enable_dir is set. When the value is “1”, the sum s1 ′ + c + s2 ′ calculated by the adder 225 is output.
 以上のように、本構成例に係る適応フィルタ200は、(1)第2領域特性k2に対応した第2フィルタ係数群w2(k2)を利用したフィルタ演算を行う否かを示す第2領域特性利用フラグを復号する第2領域特性利用フラグ復号部212を更に備えており、(2)フィルタ演算部120は、第2領域特性利用フラグの値に応じて、第1領域特性k1に対応した第1フィルタ係数群w1(k1)のみを利用したフィルタ演算を実行するか、第1領域特性k1に対応した第1フィルタ係数群w1(k1)、及び、第2領域特性k2に対応した第2フィルタ係数群w2(k2)の双方を利用したフィルタ演算を実行するかを切り替えるように構成されている。 As described above, the adaptive filter 200 according to the present configuration example (1) the second region characteristic indicating whether or not to perform the filter operation using the second filter coefficient group w2 (k2) corresponding to the second region characteristic k2. A second region characteristic use flag decoding unit 212 that decodes the use flag is further provided. (2) The filter calculation unit 120 corresponds to the first region characteristic k1 according to the value of the second region characteristic use flag. The filter operation using only one filter coefficient group w1 (k1) is executed, or the first filter coefficient group w1 (k1) corresponding to the first area characteristic k1 and the second filter corresponding to the second area characteristic k2 It is configured to switch whether to perform a filter operation using both of the coefficient group w2 (k2).
 したがって、本構成例に係る適応フィルタ200を用いれば、第2フィルタ係数群w2(k2)を利用したフィルタ演算を施す必要がない単位領域に対しては、第1フィルタ係数群w1(k1)のみを利用したフィルタ演算が実行される。したがって、本構成例に係る適応フィルタ200を用いれば、第2フィルタ係数群w2(k2)を利用したフィルタ演算を施す必要がない単位領域に対するフィルタ演算に要する計算コストをより小さくすることができる。 Therefore, when the adaptive filter 200 according to the present configuration example is used, only the first filter coefficient group w1 (k1) is applied to a unit region that does not need to be subjected to filter operation using the second filter coefficient group w2 (k2). The filter operation using is executed. Therefore, if the adaptive filter 200 according to this configuration example is used, it is possible to further reduce the calculation cost required for the filter operation on the unit region that does not need to be subjected to the filter operation using the second filter coefficient group w2 (k2).
 なお、復号装置に本構成例に係る適応フィルタ200(図40)を搭載する場合、符号化装置には図41に示す適応フィルタ200’を搭載するとよい。図41に示すように、符号化装置側の適応フィルタ200’においては、復号装置側の適応フィルタ200における第2領域特性利用フラグ復号部212の代わりに、第2領域特性利用フラグ決定部212aと第2領域特性利用フラグ符号化部212bとが追加されている。 Note that when the adaptive filter 200 (FIG. 40) according to the present configuration example is installed in the decoding apparatus, the encoding apparatus may be equipped with the adaptive filter 200 'shown in FIG. As shown in FIG. 41, in the adaptive filter 200 ′ on the encoding device side, instead of the second region characteristic use flag decoding unit 212 in the adaptive filter 200 on the decoding device side, a second region characteristic use flag determining unit 212a and A second region characteristic use flag encoding unit 212b is added.
 符号化装置側の適応フィルタ200’においては、(1)フィルタ係数テーブル作成部211aが、第1フィルタ係数テーブルW1及び第2フィルタ係数テーブルW2を作成し、(2)フィルタ係数テーブル符号化部211bが、フィルタ係数テーブル作成部211aaによって作成された第1フィルタ係数テーブルW1及び第2フィルタ係数テーブルW2を符号化する。ここで、フィルタ係数テーブル作成部211aは、最小二乗法を用いて、(a)1フィルタ出力画像(オフセット加算部222の出力画像)の原画像(符号化対象画像)に対する二乗誤差を最小化する第1フィルタ係数テーブルW1と、(b)2フィルタ出力画像(加算部224の出力画像)の原画像に対する二乗誤差を最小化する第2フィルタ係数テーブルW2とからなるフィルタ係数テーブル対(W1,W2)とを作成する。そして、フィルタ係数テーブル符号化部211bは、1フィルタ出力画像の方が2フィルタ出力画像よりも原画像に対する最小二乗誤差が小さくなる場合に、フィルタ係数テーブル作成部211aにより作成された第1フィルタ係数テーブルW1のみを符号化し、2フィルタ出力画像の方が1フィルタ出力画像よりも原画像に対する最小二乗誤差が小さくなる場合に、フィルタ係数テーブル作成部211aにより作成された第1フィルタ係数テーブルW1及び第2フィルタ係数テーブルW2を符号化する。 In the adaptive filter 200 ′ on the encoding device side, (1) the filter coefficient table creation unit 211a creates the first filter coefficient table W1 and the second filter coefficient table W2, and (2) the filter coefficient table coding unit 211b. Encodes the first filter coefficient table W1 and the second filter coefficient table W2 created by the filter coefficient table creation unit 211aa. Here, the filter coefficient table creation unit 211a uses the least square method to minimize the square error with respect to the original image (encoding target image) of (a) 1 filter output image (output image of the offset addition unit 222). A filter coefficient table pair (W1, W2) comprising a first filter coefficient table W1 and (b) a second filter coefficient table W2 that minimizes a square error with respect to the original image of the two-filter output image (the output image of the adder 224) ) And create. The filter coefficient table encoding unit 211b generates the first filter coefficient generated by the filter coefficient table generating unit 211a when the least square error with respect to the original image is smaller in the 1 filter output image than in the 2 filter output image. When only the table W1 is encoded and the least square error with respect to the original image is smaller in the two-filter output image than in the one-filter output image, the first filter coefficient table W1 and the first filter coefficient table W1 created by the filter coefficient table creation unit 211a The 2 filter coefficient table W2 is encoded.
 また、符号化装置側の適応フィルタ200’においては、(1)第2領域特性利用フラグ決定部212aが、1フィルタ出力画像の原画像に対する最小2乗誤差と2フィルタ出力画像の原画像に対する最小2乗誤差とを比較したうえで、比較結果に応じて第2領域特性利用フラグの値を決定し、(2)第2領域特性利用フラグ符号化部212bが、第2領域特性利用フラグ決定部212aによって決定された第2領域特性利用フラグの値を符号化する。より具体的には、1フィルタ出力画像の方が2フィルタ出力画像よりも原画像に対する最小二乗誤差が小さくなる場合には、第2領域特性利用フラグenable_dirとして「0」を符号化し、2フィルタ出力画像の方が1フィルタ出力画像よりも原画像に対する最小二乗誤差が小さくなる場合には、第2領域特性利用フラグenable_dirとして「1」を符号化する。 Further, in the adaptive filter 200 ′ on the encoding device side, (1) the second region characteristic use flag determination unit 212a performs the minimum square error with respect to the original image of the one filter output image and the minimum with respect to the original image of the two filter output image. After comparing with the square error, the value of the second region characteristic use flag is determined according to the comparison result. (2) The second region characteristic use flag encoding unit 212b is a second region characteristic use flag determining unit. The value of the second region characteristic use flag determined by 212a is encoded. More specifically, when the least square error with respect to the original image is smaller in the 1-filter output image than in the 2-filter output image, “0” is encoded as the second region characteristic use flag enable_dir, and the 2-filter output When the least square error with respect to the original image is smaller in the image than in the one-filter output image, “1” is encoded as the second region characteristic use flag enable_dir.
 例えば、第1フィルタ係数テーブルW1に6組のフィルタ係数群w1(k1)を含め、第2フィルタ係数テーブルW2に4組の第2フィルタ係数群w2(k2)を含める場合、本構成例においては、必要な最小二乗法の実行回数は、6回(第2フィルタ係数群w2(k2)を第1フィルタ係数群w1(k1)に従属させて決定する場合)又は4回(第1フィルタ係数群w1(k1)を第2フィルタ係数群w2(k2)に従属させて決定する場合)になる。すなわち、本構成例によれば、従来のように第1領域特性k1及び第2領域特性k2の双方に依存して決まるフィルタ係数群w(k1,k2)を用いた場合、24回の最小二乗法の実行が必要なところ、その回数を著しく減らすことができる。 For example, when six sets of filter coefficient groups w1 (k1) are included in the first filter coefficient table W1 and four sets of second filter coefficient groups w2 (k2) are included in the second filter coefficient table W2, The necessary number of executions of the least squares method is six times (when the second filter coefficient group w2 (k2) is determined depending on the first filter coefficient group w1 (k1)) or four times (first filter coefficient group). w1 (k1) is determined depending on the second filter coefficient group w2 (k2)). That is, according to this configuration example, when the filter coefficient group w (k1, k2) determined depending on both the first region characteristic k1 and the second region characteristic k2 is used as in the conventional case, the minimum two times of 24 times are used. Where multiplication is required, the number of times can be significantly reduced.
 〔構成例3〕
 本実施形態に係る適応フィルタの第3の構成例について、図42を参照して説明する。
[Configuration example 3]
A third configuration example of the adaptive filter according to the present embodiment will be described with reference to FIG.
 図42に示す適応フィルタ200は、復号装置への搭載に好適な適応フィルタであり、フィルタ設定部210及びフィルタ演算部220を備えている。 42 is an adaptive filter suitable for mounting in a decoding device, and includes a filter setting unit 210 and a filter calculation unit 220.
 フィルタ設定部210は、フィルタ特性を設定するための手段であり、フィルタ係数復号部211、及び拡大フィルタ係数設定部213を備えている。 The filter setting unit 210 is a means for setting filter characteristics, and includes a filter coefficient decoding unit 211 and an expanded filter coefficient setting unit 213.
 フィルタ係数復号部211は、第2の構成例と同様、符号化データから第1フィルタ係数テーブルW1、オフセットc、及び第2フィルタ係数テーブルW2を復号する。フィルタ係数復号部211によって復号された第1フィルタ係数テーブルW1、オフセットc、及び第2フィルタ係数テーブルW2は、拡大フィルタ係数算出部213に供給される。 The filter coefficient decoding unit 211 decodes the first filter coefficient table W1, the offset c, and the second filter coefficient table W2 from the encoded data, as in the second configuration example. The first filter coefficient table W1, the offset c, and the second filter coefficient table W2 decoded by the filter coefficient decoding unit 211 are supplied to the enlarged filter coefficient calculation unit 213.
 拡大フィルタ係数設定部213は、第1フィルタ係数テーブルW1、オフセットc、第2フィルタ係数テーブルW2に基づいて、拡大フィルタ係数テーブルWを作成する。ここで、拡大フィルタ係数テーブルWは、領域特性対(k1,k2)とフィルタ係数群w(k1,k2)=(w(k1,k2)[1],w(k1,k2)[2],・・・,w(k1,k2)[N],c)とを互いに関連付けて記録したテーブルである。領域特性対(k1,k2)は、第1領域特性k1と第2領域特性k2とを対にしたものであり、フィルタ係数群w(k1,k2)は、後述する拡大線形フィルタ227のフィルタ係数群として利用されるものである。拡大フィルタ係数設定部213は、拡大線形フィルタ227が第1の構成例に係るフィルタ演算部220と等価なフィルタになるように、拡大フィルタ係数テーブルWに含まれる各フィルタ係数群w(k1,k2)を設定する。 The enlarged filter coefficient setting unit 213 creates an enlarged filter coefficient table W based on the first filter coefficient table W1, the offset c, and the second filter coefficient table W2. Here, the enlarged filter coefficient table W includes a region characteristic pair (k1, k2) and a filter coefficient group w (k1, k2) = (w (k1, k2) [1], w (k1, k2) [2], ..., w (k1, k2) [N], c) are recorded in association with each other. The region characteristic pair (k1, k2) is a pair of the first region characteristic k1 and the second region characteristic k2, and the filter coefficient group w (k1, k2) is a filter coefficient of the expanded linear filter 227 described later. It is used as a group. The expanded filter coefficient setting unit 213 includes each filter coefficient group w (k1, k2) included in the expanded filter coefficient table W so that the expanded linear filter 227 becomes a filter equivalent to the filter operation unit 220 according to the first configuration example. ) Is set.
 フィルタ演算部220は、拡大線形フィルタ227、及び領域特性算出部225を備えている。 The filter calculation unit 220 includes an enlarged linear filter 227 and a region characteristic calculation unit 225.
 拡大線形フィルタ227は、(B3)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s[1],s[2],・・・,s[N]から、出力画像における対象画素の画素値s’を算出する。 The magnifying linear filter 227 performs pixel values s [1], s [2],..., S [N] of reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (B3). ], The pixel value s ′ of the target pixel in the output image is calculated.
  s’=w(k1,k2)[1]s[1]+w(k1,k2)[2]s[2]+・・・
      +w(k1,k2)[N]s[N]+c         ・・・(B3)
 ここで、w(k1,k2)[1],w(k1,k2)[2],・・・,w(k1,k2)[N]は、領域特性算出部225によって算出された、対象画素を含む単位領域の第1領域特性k1及び第2領域特性k2に応じた拡大フィルタ係数群w(k1,k2)の要素である。より具体的には、拡大フィルタ係数設定部213により作成された拡大フィルタ係数テーブルWにおいて、領域特性算出部225によって算出された第1領域特性k1と第2領域特性k2からなる領域特性対(k1,k2)に関連付けられた拡大フィルタ係数群w(k1,k2)の要素である。
s ′ = w (k1, k2) [1] s [1] + w (k1, k2) [2] s [2] +.
+ W (k1, k2) [N] s [N] + c (B3)
Here, w (k1, k2) [1], w (k1, k2) [2],..., W (k1, k2) [N] are target pixels calculated by the region characteristic calculation unit 225. Is an element of the enlarged filter coefficient group w (k1, k2) corresponding to the first region characteristic k1 and the second region characteristic k2 of the unit region including. More specifically, in the enlarged filter coefficient table W created by the enlarged filter coefficient setting unit 213, an area characteristic pair (k1) composed of the first area characteristic k1 and the second area characteristic k2 calculated by the area characteristic calculation unit 225. , K2) are elements of the enlarged filter coefficient group w (k1, k2).
 領域特性算出部225は、第1の構成例と同様、各単位領域について第1領域特性k1と第2領域特性k2とを算出する。例えば、第1領域特性k1と第2領域特性k2とを算出する単位がマクロブロックである場合、拡大フィルタ係数群w(k1,k2)がマクロブック毎に設定されることになる。 The area characteristic calculation unit 225 calculates the first area characteristic k1 and the second area characteristic k2 for each unit area, as in the first configuration example. For example, when the unit for calculating the first region characteristic k1 and the second region characteristic k2 is a macro block, the enlarged filter coefficient group w (k1, k2) is set for each macro book.
 次に、拡大線形フィルタ227における参照領域について、図43~図44を参照して説明する。 Next, the reference region in the enlarged linear filter 227 will be described with reference to FIGS.
 図43は、参照領域が図35に示すように設定された第1空間フィルタ221と参照領域が図36に示すように設定された第2空間フィルタ223とを含むフィルタ演算部220と等価な拡大線形フィルタ227の参照領域の設定例を示す図である。(a)は、k2=0のときの参照領域を示し、(b)は、k2=1のときの参照領域を示し、(c)は、k2=2のときの参照領域を示し、(d)は、k2=3のときの参照領域を示す。同図に示す5×5画素からなる矩形領域において、中心の画素が対象画素に対応し、黒塗りの画素が参照画素に対応する。また、黒塗りの画素に記された白抜きの文字は、その画素の画素値に乗ぜられるフィルタ係数を示す。なお、これらのフィルタ係数は、第1領域特性k1及び第2領域特性k2に依存して決まるが、同図においては「(k1,k2)」の表記を省略している。 FIG. 43 is an enlarged view equivalent to the filter operation unit 220 including the first spatial filter 221 in which the reference area is set as shown in FIG. 35 and the second spatial filter 223 in which the reference area is set as shown in FIG. FIG. 10 is a diagram illustrating a setting example of a reference region of the linear filter 227. (A) shows a reference area when k2 = 0, (b) shows a reference area when k2 = 1, (c) shows a reference area when k2 = 2, (d ) Indicates a reference area when k2 = 3. In the rectangular area composed of 5 × 5 pixels shown in the figure, the center pixel corresponds to the target pixel, and the black pixel corresponds to the reference pixel. In addition, white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1 and the second region characteristic k2, the notation of “(k1, k2)” is omitted in FIG.
 図44は、参照領域が図37に示すように設定された第1空間フィルタ221と参照領域が図38に示すように設定された第2空間フィルタ223とを含むフィルタ演算部220と等価な拡大線形フィルタ227の参照領域の設定例を示す図である。(a)は、k2=0のときの参照領域を示し、(b)は、k2=1のときの参照領域を示し、(c)は、k2=2のときの参照領域を示し、(d)は、k2=3のときの参照領域を示す。同図に示す7×5画素からなる矩形領域において、中心の画素が対象画素に対応し、黒塗りの画素が参照画素に対応する。また、黒塗りの画素に記された白抜きの文字は、その画素の画素値に乗ぜられるフィルタ係数を示す。なお、これらのフィルタ係数は、第1領域特性k1及び第2領域特性k2に依存して決まるが、同図においては「(k1,k2)」の表記を省略している。 44 is an enlargement equivalent to the filter operation unit 220 including the first spatial filter 221 in which the reference region is set as shown in FIG. 37 and the second spatial filter 223 in which the reference region is set as shown in FIG. FIG. 10 is a diagram illustrating a setting example of a reference region of the linear filter 227. (A) shows a reference area when k2 = 0, (b) shows a reference area when k2 = 1, (c) shows a reference area when k2 = 2, (d ) Indicates a reference area when k2 = 3. In the rectangular area composed of 7 × 5 pixels shown in the figure, the center pixel corresponds to the target pixel, and the black pixel corresponds to the reference pixel. In addition, white characters written on black pixels indicate filter coefficients to be multiplied by the pixel values of the pixels. Although these filter coefficients are determined depending on the first region characteristic k1 and the second region characteristic k2, the notation of “(k1, k2)” is omitted in FIG.
 以上のように、本構成例に係る適応フィルタ200も、第1の構成例に係る適応フィルタ200と同様、(1)第1領域特性k1に依存する第1フィルタ係数群w1(k1)を、少なくとも1つ、対応する第1領域特性k1に関連付けて記録した第1フィルタ係数テーブルW1、及び、第2領域特性k2に依存した第2フィルタ係数群w2(k2)を、少なくとも1つ、対応する領域特性k2に関連付けて記録した第2フィルタ係数テーブルW2を復号するフィルタ係数復号部211と、(2)各単位領域の第1領域特性k1及び第2領域特性k2を算出する領域特性算出部225と、(3)各単位領域に属する各画素を対象画素とするフィルタ演算であって、第1フィルタ係数テーブルW1に記録された複数の第1フィルタ係数群w(k1)のうち、領域特性算出部225が算出した該単位領域の第1領域特性k1に対応したフィルタ係数群w1(k1)、及び、第2フィルタ係数テーブルW2に記録された複数の第2フィルタ係数群w(k2)のうち、領域特性算出部225が算出した該単位領域の第2領域特性k2に対応したフィルタ係数群w2(k2)を利用したフィルタ演算を実行する拡張線形フィルタ227と、を備えている。 As described above, similarly to the adaptive filter 200 according to the first configuration example, the adaptive filter 200 according to the configuration example also includes (1) the first filter coefficient group w1 (k1) that depends on the first region characteristic k1, At least one first filter coefficient table W1 recorded in association with the corresponding first area characteristic k1 and at least one second filter coefficient group w2 (k2) depending on the second area characteristic k2 correspond to each other. A filter coefficient decoding unit 211 that decodes the second filter coefficient table W2 recorded in association with the area characteristic k2, and (2) an area characteristic calculation unit 225 that calculates the first area characteristic k1 and the second area characteristic k2 of each unit area. And (3) a filter operation using each pixel belonging to each unit area as a target pixel, and a plurality of first filter coefficient groups w (k) recorded in the first filter coefficient table W1. ), The filter coefficient group w1 (k1) corresponding to the first area characteristic k1 of the unit area calculated by the area characteristic calculation unit 225, and a plurality of second filter coefficients recorded in the second filter coefficient table W2. An extended linear filter 227 that executes a filter operation using the filter coefficient group w2 (k2) corresponding to the second region characteristic k2 of the unit region calculated by the region characteristic calculation unit 225 in the group w (k2). I have.
 したがって、本構成例に係る適応フィルタ200を用いれば、第1領域特性k1及び第2領域特性k2の双方に依存する複数のフィルタ係数群w(k1,k2)を、対応する領域特性対(k1,k2)に関連付けて記録したフィルタ係数テーブルWを復号することなく、各単位領域の第1領域特性k1及び第2領域特性k2の双方に応じたフィルタ演算を行うことができる。すなわち、本構成例に係る適応フィルタを用いれば、符号量の大幅な増大を招来することなく、原画像に近い復号画像を精度良く再現することができる。 Therefore, when the adaptive filter 200 according to this configuration example is used, a plurality of filter coefficient groups w (k1, k2) depending on both the first region characteristic k1 and the second region characteristic k2 are converted into corresponding region characteristic pairs (k1 , K2), the filter operation corresponding to both the first region characteristic k1 and the second region characteristic k2 of each unit region can be performed without decoding the filter coefficient table W recorded in association with the unit region. That is, if the adaptive filter according to this configuration example is used, a decoded image close to the original image can be accurately reproduced without causing a significant increase in the code amount.
 なお、復号装置に本構成例に係る適応フィルタ200を搭載する場合、符号化装置には図39に示す適応フィルタ200’を搭載するとよい。
<<実施形態4>>
 本発明の第4の実施形態について、図45~図46を参照して説明する。
Note that when the adaptive filter 200 according to this configuration example is mounted on the decoding device, the encoding device may be mounted with an adaptive filter 200 ′ shown in FIG.
<< Embodiment 4 >>
A fourth embodiment of the present invention will be described with reference to FIGS. 45 to 46. FIG.
 本実施形態に係る適応フィルタの構成例について、図45を参照して説明する。 A configuration example of the adaptive filter according to the present embodiment will be described with reference to FIG.
 図45に示す適応フィルタ300は、復号装置への搭載に好適な適応フィルタであり、フィルタ設定部310及びフィルタ演算部320を備えている。 45 is an adaptive filter suitable for mounting on a decoding device, and includes a filter setting unit 310 and a filter calculation unit 320.
 フィルタ設定部310は、フィルタ特性を設定するための手段であり、空間フィルタ係数復号部311、及びオフセットテーブル復号部312を備えている。 The filter setting unit 310 is a means for setting filter characteristics, and includes a spatial filter coefficient decoding unit 311 and an offset table decoding unit 312.
 空間フィルタ係数復号部311は、符号化データから空間フィルタ係数群w=(w[1],w[2],・・・,w[N])を復号する。空間フィルタ係数復号部311によって復号された空間フィルタ係数群wは、後述する空間フィルタ321に供給される。 The spatial filter coefficient decoding unit 311 decodes the spatial filter coefficient group w = (w [1], w [2],..., W [N]) from the encoded data. The spatial filter coefficient group w decoded by the spatial filter coefficient decoding unit 311 is supplied to a spatial filter 321 described later.
 オフセットテーブル復号部312は、符号化データからオフセットテーブルCを復号する。ここで、オフセットテーブルCとは、領域特性k’に依存するオフセットc(k’)を少なくとも1つ、対応する領域特性k’と関連付けて記録したテーブルのことを指す。オフセットテーブル復号部312によって復号されたオフセットテーブルCは、後述するオフセット加算部324に供給される。 The offset table decoding unit 312 decodes the offset table C from the encoded data. Here, the offset table C refers to a table in which at least one offset c (k ′) depending on the region characteristic k ′ is recorded in association with the corresponding region characteristic k ′. The offset table C decoded by the offset table decoding unit 312 is supplied to an offset addition unit 324 described later.
 フィルタ演算部320は、フィルタ演算を実行するための手段であり、空間フィルタ321、領域特性算出部322、オフセット決定部323、及びオフセット加算部324を備えている。 The filter calculation unit 320 is a means for executing a filter calculation, and includes a spatial filter 321, a region characteristic calculation unit 322, an offset determination unit 323, and an offset addition unit 324.
 空間フィルタ321は、(C1)式に従って、入力画像(復号画像、又は、デブロッキング後の復号画像)における参照画素の画素値s[1],s[2],・・・,s[N]から、出力画像における対象画素の画素値s’を算出する。 The spatial filter 321 has pixel values s [1], s [2],..., S [N] of reference pixels in the input image (decoded image or decoded image after deblocking) according to the equation (C1). From this, the pixel value s ′ of the target pixel in the output image is calculated.
  s’=w[1]s[1]+w[2]s[2]+・・・+w[N]s[N]
                                 ・・・(C1)
 ここで、w[1],w[2],・・・,w[N]は、空間フィルタ係数復号部321によって復号された空間フィルタ係数群wの要素である。算出された画素値s’は、後段のオフセット加算部324に供給される。
s ′ = w [1] s [1] + w [2] s [2] +... + w [N] s [N]
... (C1)
Here, w [1], w [2],..., W [N] are elements of the spatial filter coefficient group w decoded by the spatial filter coefficient decoding unit 321. The calculated pixel value s ′ is supplied to the subsequent offset addition unit 324.
 領域特性算出部322は、入力画像(復号画像又はデブロッキング後の復号画像)における各単位領域の領域特性k’を算出する。本構成例における領域特性k’としては、例えば、輝度の大きさ(band offset)やエッジの種類(edge offset)などを用いることができる。領域特性k’として輝度の大きさを用いる場合には、例えば、k’=Y/16(対象画素の輝度値Yを量子化して得られる値)とすればよい。領域特性算出部322によって算出された領域特性k’は、オフセット決定部323に供給される。 The region characteristic calculation unit 322 calculates a region characteristic k ′ of each unit region in the input image (decoded image or decoded image after deblocking). As the region characteristic k ′ in the present configuration example, for example, a luminance magnitude (band offset), an edge type (edge offset), or the like can be used. When the magnitude of luminance is used as the region characteristic k ′, for example, k ′ = Y / 16 (a value obtained by quantizing the luminance value Y of the target pixel) may be set. The region characteristic k ′ calculated by the region characteristic calculation unit 322 is supplied to the offset determination unit 323.
 オフセット決定部323は、各単位領域に属する画素を対象としたフィルタ演算に利用するオフセットcの値を決定する。より具体的には、オフセットテーブル復号部312によって復号されたオフセットテーブルCにおいて、領域特性算出部322によって算出された当該単位領域の領域特性k’に関連付けられたオフセットc(k’)を特定する。オフセット決定部323によって決定されたオフセットc(k’)は、オフセット加算部324に供給される。 The offset determination unit 323 determines the value of the offset c used for the filter calculation for the pixels belonging to each unit area. More specifically, in the offset table C decoded by the offset table decoding unit 312, the offset c (k ′) associated with the region characteristic k ′ of the unit region calculated by the region characteristic calculation unit 322 is specified. . The offset c (k ′) determined by the offset determination unit 323 is supplied to the offset addition unit 324.
 オフセット加算部324は、空間フィルタ321によって算出された画素値s’に、オフセット決定部323によって決定されたオフセットc(k’)を加算する。オフセット加算部324によって算出された和s’+c(k’)は、適応フィルタ300の外部に出力される。 The offset addition unit 324 adds the offset c (k ′) determined by the offset determination unit 323 to the pixel value s ′ calculated by the spatial filter 321. The sum s ′ + c (k ′) calculated by the offset adding unit 324 is output to the outside of the adaptive filter 300.
 なお、フレームを分割して得られる任意の領域を、領域特性k’の算出単位とすることができる。例えば、スライス、マクロブロック、ブロック、LCU、CT、CU、PT、PU、TT、TU、又はM×Nブロックを、領域特性k’の算出単位とすることができる。例えば、領域特性k’の算出単位をマクロブロックとする場合、各マクロブロックに属する画素を対象としたフィルタ演算に、そのマクロブロックの領域特性k’に応じたオフセットc(k’)を利用することができる。 An arbitrary area obtained by dividing the frame can be used as a unit for calculating the area characteristic k ′. For example, a slice, a macro block, a block, an LCU, a CT, a CU, a PT, a PU, a TT, a TU, or an M × N block can be used as a unit for calculating the region characteristic k ′. For example, when the calculation unit of the region characteristic k ′ is a macroblock, an offset c (k ′) corresponding to the region characteristic k ′ of the macroblock is used for the filter calculation for pixels belonging to each macroblock. be able to.
 以上のように、本構成例に係る適応フィルタ300は、各単位領域に属する各画素を対象とするフィルタ演算を、該単位領域の領域特性k’に依存したオフセットc(k’)と該単位領域の領域特性k’に依存しないフィルタ係数群wとを利用して実行するフィルタ演算部320を備えている。したがって、一定のオフセットcを利用してフィルタ演算を実行する従来の適応フィルタよりも高い符号化効率を達成することができる。 As described above, the adaptive filter 300 according to the present configuration example performs the filter operation on each pixel belonging to each unit region by using the offset c (k ′) depending on the region characteristic k ′ of the unit region and the unit. A filter operation unit 320 is provided that executes using a filter coefficient group w that does not depend on the region characteristic k ′ of the region. Therefore, it is possible to achieve higher encoding efficiency than a conventional adaptive filter that performs a filter operation using a certain offset c.
 また、本構成例に係る適応フィルタ300のように、一定の空間フィルタ係数群wを利用してフィルタ演算を実行する場合には、領域特性k’に応じた空間フィルタ係数w(k’)を利用してフィルタ演算を実行する場合よりも、符号化装置側と復号装置側との双方における計算コストを小さくすると共に、符号化データの符号量を削減することができる。すなわち、従来の適応フィルタよりも、小さな計算コストで高い符号化効率を実現することができる。 Further, in the case where the filter operation is performed using the constant spatial filter coefficient group w as in the adaptive filter 300 according to this configuration example, the spatial filter coefficient w (k ′) corresponding to the region characteristic k ′ is set. The calculation cost on both the encoding device side and the decoding device side can be reduced and the code amount of the encoded data can be reduced as compared with the case where the filter operation is executed by using. That is, higher encoding efficiency can be realized at a lower calculation cost than the conventional adaptive filter.
 なお、本構成においては一定の空間フィルタ係数群wを利用してフィルタ演算を実行するものとしたが、これに限定されるものではない。すなわち、フィルタ係数群wは、領域特性k’に依存しないものでさえあればよく、領域特性k’とは異なる領域特性k”に応じた空間フィルタ係数群w(k”)を利用してフィルタ演算を実行する構成を採用してもよい。つまり、(C2)式に従ったフィルタ演算を実行してもよい。 In this configuration, the filter operation is performed using a certain spatial filter coefficient group w. However, the present invention is not limited to this. That is, the filter coefficient group w only needs to be independent of the area characteristic k ′, and the filter coefficient group w (k ″) corresponding to the area characteristic k ″ different from the area characteristic k ′ is used for filtering. You may employ | adopt the structure which performs a calculation. That is, you may perform the filter calculation according to (C2) Formula.
  s’=w(k”)[1]s[1]+w(k”)[2]s[2]+・・・
     +w(k”)[N]s[N]+c(k’)         ・・・(C2)
 また、これら2つの領域特性k’,k”に応じたオフセットc(k’,k”)を利用してフィルタ演算を実行する構成を採用してもよい。つまり、(C3)式に従ったフィルタ演算を実行してもよい。
s ′ = w (k ″) [1] s [1] + w (k ″) [2] s [2] +.
+ W (k ″) [N] s [N] + c (k ′) (C2)
Further, a configuration may be adopted in which a filter operation is performed using an offset c (k ′, k ″) corresponding to these two region characteristics k ′, k ″. That is, you may perform the filter calculation according to (C3) Formula.
  s’=w(k”)[1]s[1]+w(k”)[2]s[2]+・・・
     +w(k”)[N]s[N]+c(k’,k”)      ・・・(C3)
 また、これら2つの領域特性k’,k”に応じた空間フィルタ係数群w(k’,k”)を利用してフィルタ演算を実行する構成を採用してもよい。つまり、(C4)式に従ったフィルタ演算を実行してもよい。
s ′ = w (k ″) [1] s [1] + w (k ″) [2] s [2] +.
+ W (k ″) [N] s [N] + c (k ′, k ″) (C3)
Further, a configuration may be adopted in which a filter operation is performed using a spatial filter coefficient group w (k ′, k ″) corresponding to these two region characteristics k ′, k ″. That is, you may perform the filter calculation according to (C4) Formula.
  s’=w(k’,k”)[1]s[1]+w(k’,k”)[2]s[2]+・・・
     +w(k’,k”)[N]s[N]+c(k’)      ・・・(C4)
 なお、これらの変形例において、輝度の大きさを第1の領域特性k’として用いた場合、例えば、活性度を第2の領域特性k”として用いることができる。あるいは逆に、活性度を第1の領域特性k’として用いた場合、輝度の大きさを第2の領域特性k”として用いることができる。
s ′ = w (k ′, k ″) [1] s [1] + w (k ′, k ″) [2] s [2] +.
+ W (k ′, k ″) [N] s [N] + c (k ′) (C4)
In these modifications, when the magnitude of luminance is used as the first region characteristic k ′, for example, the activity can be used as the second region characteristic k ″. When used as the first region characteristic k ′, the magnitude of the luminance can be used as the second region characteristic k ″.
 また、本構成例においては各単位領域の領域特性k’として該単位領域内及び/又は該単位領域周辺に存在する画素の画素値から算出された量を用いたが、これに限定されるものではない。すなわち、単位領域の特性を示す量(換言すれば、単位領域の分類に利用できる量)であれば、どんな量であっても、該単位領域の領域特性k’として利用することができる。例えば、単位領域に関する符号化パラメータ、あるいは、該単位領域を包含する単位(例えば、ブロックを包含するマクロブロック)に関する符号化パラメータは、該単位領域の領域特性k’として利用することができる。イントラ予測モードやインター予測モードは、領域特性k’として利用可能な符号化パラメータの一例である。また、後述するように、単位領域が属する画像の種別を、該単位領域の領域特性k’として利用してもよい。上述した領域特性k”についても同様のことが言える。 In this configuration example, the amount calculated from the pixel values of the pixels existing in and / or around the unit region is used as the region characteristic k ′ of each unit region. However, the present invention is not limited to this. is not. In other words, any amount can be used as the region characteristic k ′ of the unit region as long as it is an amount indicating the characteristic of the unit region (in other words, an amount that can be used for classification of the unit region). For example, an encoding parameter relating to a unit region or an encoding parameter relating to a unit including the unit region (for example, a macro block including a block) can be used as the region characteristic k ′ of the unit region. The intra prediction mode and the inter prediction mode are examples of encoding parameters that can be used as the region characteristic k ′. Further, as will be described later, the type of image to which the unit area belongs may be used as the area characteristic k ′ of the unit area. The same can be said for the region characteristic k ″ described above.
 また、領域特性k’の相異なる複数の値k’=k’(0),k’(1),・・・,k’(M)の各々に対応した、相異なる複数のオフセットc(k’(0)),c(k’(0)),・・・,c(k’(M))の各々を符号化する場合には、各オフセットc(k’(t))(又はその量子化値)をそのまま符号化するのではなく、符号化済みのオフセットc(k’(t-1))との差分値(又はその量子化値)を符号化しても良い。 Further, a plurality of different offsets c (k) corresponding to each of a plurality of different values k ′ = k ′ (0), k ′ (1),..., K ′ (M) of the region characteristic k ′. '(0)), c (k' (0)),..., C (k '(M)), when encoding each offset c (k' (t)) (or its Instead of encoding the quantized value as it is, a difference value (or a quantized value thereof) from the encoded offset c (k ′ (t−1)) may be encoded.
 例えば、符号化装置側で差分値Δ(k’(t))=c(k’(t-1))-c(k’(t))を符号化する場合、オフセットテーブル復号部312は、差分値Δ(k’(t)を復号した後、復号済みのオフセット値c(k’(t-1))を用いて、(C5)に従ってオフセット値c(k’(t))を得る。 For example, when encoding the difference value Δ (k ′ (t)) = c (k ′ (t−1)) − c (k ′ (t)) on the encoding device side, the offset table decoding unit 312 After decoding the difference value Δ (k ′ (t)), the offset value c (k ′ (t)) is obtained according to (C5) using the decoded offset value c (k ′ (t−1)).
 c(k’(t))=c(k’(t-1))-Δ(k’(t)) ・・・(C5)
 また、符号化装置側で差分値Δ’(k’(t))=c(k’(t))-c(k’(t-1))を符号化する場合、オフセットテーブル復号部312は、差分値Δ’(k’(t)を復号した後、復号済みのオフセット値c(k’(t-1))を用いて、(C6)に従ってオフセット値c(k’(t))を得る。
c (k ′ (t)) = c (k ′ (t−1)) − Δ (k ′ (t)) (C5)
Also, when encoding the difference value Δ ′ (k ′ (t)) = c (k ′ (t)) − c (k ′ (t−1)) on the encoding device side, the offset table decoding unit 312 , After decoding the difference value Δ ′ (k ′ (t)), the offset value c (k ′ (t)) is calculated according to (C6) using the decoded offset value c (k ′ (t−1)). obtain.
 c(k’(t))=c(k’(t-1))+Δ(k’(t)) ・・・(C6)
 なお、複数のオフセットc(k’(0)),c(k’(0)),・・・,c(k’(M))のうち、符号化/復号の起点となる1つのオフセット、例えばc(k’(0))は、他のオフセットによらず符号化/復号する。
c (k ′ (t)) = c (k ′ (t−1)) + Δ (k ′ (t)) (C6)
Of the plurality of offsets c (k ′ (0)), c (k ′ (0)),..., C (k ′ (M)), one offset serving as a starting point of encoding / decoding, For example, c (k ′ (0)) is encoded / decoded regardless of other offsets.
 また、本構成例においては、領域特性k’に応じたオフセットc(k’)を利用するフィルタ演算を実行する構成について説明したが、フィルタ処理を行う対象に応じたオフセットcを利用する構成も考えられる。具体的には、色差信号Cbに対するフィルタ演算を実行するときと、色差信号Crに対するフィルタ演算を実行するときとで、値の異なるオフセットcを利用する。 Further, in this configuration example, the configuration for executing the filter operation using the offset c (k ′) corresponding to the region characteristic k ′ has been described, but the configuration using the offset c corresponding to the target to be subjected to the filter processing may also be used. Conceivable. Specifically, an offset c having different values is used when a filter operation is performed on the color difference signal Cb and when a filter operation is performed on the color difference signal Cr.
 適応フィルタは、原画に存在する空間的な画素間相関をフィルタ処理によって再生することを原理としている。色差成分Cbと色差成分Crとはほぼ同じ場所に同一方向のエッジがあることから、ある画素とその周辺の画素との画素間相関は互いに似ていることが多い。色差成分Cbと色差成分Crとの間で、画素間相関の特徴と関連して定まる空間フィルタw(k”)を共通して用いることは、特に、適応フィルタのフィルタ係数群に大きな符号量をかけることが難しい、比較的低ビットレートでは特に適当である。しかしながら、色差成分Cbと色差成分Crとの間に、復号画像と原画との間に生じるオフセットが近いものになるとは言えないことから、色差成分Cbと色差成分Crとで値の異なるオフセットcを用いることは適当である。 The adaptive filter is based on the principle that the spatial correlation between pixels existing in the original picture is reproduced by filtering. Since the color difference component Cb and the color difference component Cr have edges in the same direction at substantially the same location, the inter-pixel correlation between a certain pixel and its surrounding pixels is often similar to each other. The common use of the spatial filter w (k ″) determined in relation to the feature of the inter-pixel correlation between the color difference component Cb and the color difference component Cr particularly increases the code amount for the filter coefficient group of the adaptive filter. This is particularly appropriate at a relatively low bit rate, which is difficult to apply, however, because the offset between the decoded image and the original image cannot be said to be close between the color difference component Cb and the color difference component Cr. It is appropriate to use the offset c having different values for the color difference component Cb and the color difference component Cr.
 なお、更に、各種領域特性k”に応じた空間フィルタ係数群w(k”)を利用してもよいし、オフセットcと同様、色差信号Cbに対するフィルタ演算を実行するときと、色差信号Crに対するフィルタ演算を実行するときとで、値の異なる空間フィルタ係数群wを利用してもよい。色差成分Cbと色差成分Crとはほぼ同じ場所に同一方向のエッジがあるが、その強度が近いとは限らないため、比較的高ビットレートで符号化する場合には、色差成分Cbと色差成分Crとで異なる空間フィルタ係数群wを用いることが適当となる。 Furthermore, a spatial filter coefficient group w (k ″) corresponding to various region characteristics k ″ may be used. Similarly to the offset c, when performing a filter operation on the color difference signal Cb, A spatial filter coefficient group w having different values may be used when the filter operation is executed. The chrominance component Cb and the chrominance component Cr have edges in the same direction at substantially the same place, but their strengths are not necessarily close. Therefore, when encoding at a relatively high bit rate, the chrominance component Cb and the chrominance component It is appropriate to use a spatial filter coefficient group w different from Cr.
 なお、復号装置に図45に示す適応フィルタ300を搭載する場合、符号化装置には図46に示す適応フィルタ300’を搭載するとよい。図46に示すように、符号化装置側の適応フィルタ300’においては、復号装置側の適応フィルタ300における空間フィルタ係数復号部311を、適応フィルタ係数決定部3111と空間フィルタ係数符号化部311bとに置き換え、復号装置側の適応フィルタ300におけるオフセットテーブル復号部312を、オフセットテーブル符号化部312aとに置き換えた構成がとられる。 When the adaptive filter 300 shown in FIG. 45 is installed in the decoding device, the encoding device may be installed with the adaptive filter 300 ′ shown in FIG. 46. As shown in FIG. 46, in the adaptive filter 300 ′ on the encoding device side, the spatial filter coefficient decoding unit 311 in the adaptive filter 300 on the decoding device side is replaced with an adaptive filter coefficient determination unit 3111 and a spatial filter coefficient encoding unit 311b. The offset table decoding unit 312 in the adaptive filter 300 on the decoding device side is replaced with an offset table encoding unit 312a.
 符号化装置側の適応フィルタ300’においては、(1)適応フィルタ係数決定部3111が、最小二乗法を用いて、フィルタ演算部320の出力画像の原画像(符号化対象画像)に対する二乗誤差を最小化する空間フィルタ係数群wとオフセットテーブルCを決定する。最小二乗法で最小化する目的関数は、空間フィルタ係数群の次数NとオフセットテーブルCの次数(例えばN2)を変数とする関数になり、N+N2の変数について目的関数を偏微分して0となる連立方程式を解くことによって算出することができる。ここで、各種領域特性に応じて複数の空間フィルタ係数群wを用いる場合には、空間フィルタ係数群wの切り替えを行う各種領域特性毎に、出力画像の原画像(符号化対象画像)に対する二乗誤差を最小化する空間フィルタ係数群wとオフセットテーブルCを決定する。すなわち、2つの領域特性k’,k”に応じて空間フィルタ係数群w(k’,k”)が定まる場合は領域特性対(k’,k”)毎に最小二乗法の計算を行い、1つの特性k”に応じて空間フィルタ係数群w(k”)が定まる場合であれば領域特性k”毎に最小二乗法の計算を行う。フィルタ係数群wが1つに定まる場合には、1つの最小二乗法の計算を行う。また、(2)空間フィルタ係数符号化部311bが、適応フィルタ係数決定部311aによって決定された空間フィルタ係数群wを符号化し、(3)オフセットテーブル符号化部312aが、適応フィルタ係数決定部311aによって作成されたオフセットテーブルCを符号化する。 In the adaptive filter 300 ′ on the encoding device side, (1) the adaptive filter coefficient determination unit 3111 uses the least square method to calculate a square error with respect to the original image (encoding target image) of the output image of the filter operation unit 320. The spatial filter coefficient group w and the offset table C to be minimized are determined. The objective function to be minimized by the least square method is a function having the order N of the spatial filter coefficient group and the order of the offset table C (for example, N2) as variables, and becomes 0 by partially differentiating the objective function with respect to the N + N2 variable. It can be calculated by solving simultaneous equations. Here, when a plurality of spatial filter coefficient groups w are used according to various area characteristics, the square of the output image with respect to the original image (encoding target image) for each of the various area characteristics for switching the spatial filter coefficient group w. The spatial filter coefficient group w and the offset table C that minimize the error are determined. That is, when the spatial filter coefficient group w (k ′, k ″) is determined according to the two region characteristics k ′ and k ″, the least square method is calculated for each region characteristic pair (k ′, k ″). If the spatial filter coefficient group w (k ″) is determined according to one characteristic k ″, the least square method is calculated for each region characteristic k ″. When the filter coefficient group w is determined to be one, one least square method is calculated. Also, (2) the spatial filter coefficient encoding unit 311b encodes the spatial filter coefficient group w determined by the adaptive filter coefficient determination unit 311a, and (3) the offset table encoding unit 312a performs the adaptive filter coefficient determination unit 311a. The offset table C created by is encoded.
 〔符号化データ/復号装置/符号化装置〕
 上述した実施形態2~4に係る適応フィルタが搭載される動画像符号化装置(符号化装置)及び動画像復号装置(復号装置)について説明する。また、動画像符号化装置により生成され、動画像復号装置により復号される符号化データの構造についても併せて説明する。
[Encoded data / decoding device / encoding device]
A video encoding device (encoding device) and a video decoding device (decoding device) on which the adaptive filters according to Embodiments 2 to 4 described above are mounted will be described. A structure of encoded data generated by the moving image encoding device and decoded by the moving image decoding device will also be described.
 <符号化データ>
 動画像符号化装置2によって生成され、動画像復号装置1によって復号される符号化データ#1の構造について、図47及び図50を参照して説明する。
<Encoded data>
The structure of encoded data # 1 generated by the moving image encoding device 2 and decoded by the moving image decoding device 1 will be described with reference to FIG. 47 and FIG.
 動画像符号化装置2によって生成され、動画像復号装置1によって復号される符号化データ#1は、シーケンスレイヤ、GOP(Group Of Pictures)レイヤ、ピクチャレイヤ、スライスレイヤ、及び、マクロブロックレイヤからなる階層構造を有している。 The encoded data # 1 generated by the moving image encoding device 2 and decoded by the moving image decoding device 1 includes a sequence layer, a GOP (Group Of Pictures) layer, a picture layer, a slice layer, and a macroblock layer. Has a hierarchical structure.
 ピクチャレイヤ以下の階層について符号化データの構造を図47に示す。図47(a)~(f)は、それぞれ、ピクチャレイヤP、スライスレイヤS、マクロブロックレイヤMB、マクロブロックヘッダMBH、インター予測パーティションの予測パラメータPP、イントラ予測パーティションの予測パラメータPPの構造を示す図である。 FIG. 47 shows the structure of encoded data for the layers below the picture layer. 47A to 47F show the structures of the picture layer P, slice layer S, macroblock layer MB, macroblock header MBH, inter prediction partition prediction parameter PP, and intra prediction partition prediction parameter PP, respectively. FIG.
 ピクチャレイヤPは、対象ピクチャを復号するために動画像復号装置1が参照するデータの集合である。ピクチャレイヤPは、図47(a)に示すように、ピクチャヘッダPH、及び、スライスレイヤS1~SNsを含んでいる(NsはピクチャレイヤPに含まれるスライスレイヤの総数)。 The picture layer P is a set of data referred to by the video decoding device 1 in order to decode the target picture. As shown in FIG. 47A, the picture layer P includes a picture header PH and slice layers S 1 to S Ns (Ns is the total number of slice layers included in the picture layer P).
 ピクチャヘッダPHには、対象ピクチャの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれている。例えば、動画像符号化装置2が符号化の際に用いた可変長符号化のモードを示す符号化モード情報(entoropy_coding_mode_flag)は、ピクチャヘッダPHに含まれる符号化パラメータの一例である。 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. For example, the encoding mode information (entoropy_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.
 ピクチャレイヤPに含まれる各スライスレイヤSは、対象スライスを復号するために動画像復号装置1が参照するデータの集合である。スライスレイヤSは、図47(b)に示すように、スライスヘッダSH、及び、マクロブロックレイヤMB1~MBNm(NmはスライスSに含まれるマクロブロックの総数)を含んでいる。 Each slice layer S included in the picture layer P is a set of data referred to by the video decoding device 1 in order to decode the target slice. As shown in FIG. 47 (b), the slice layer S includes a slice header SH and macroblock layers MB 1 to MB Nm (Nm is the total number of macroblocks included in the slice S).
 スライスヘッダSHには、対象スライスの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれる。(1)スライスタイプを指定するスライスタイプ指定情報(slice_type)、(2)対象スライスを含むピクチャの表示順序(POC:Picture Order Count)を指定するPOC指定情報(pic_order_cnt_lbsやdelta_pic_order_cntなど)、及び、(3)動画像符号化装置2が符号化の際に用いた重み係数を指定する重み係数指定情報(pred_weight_table)は、スライスヘッダSHに含まれる符号化パラメータの一例である。 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. (1) Slice type designation information (slice_type) for designating a slice type, (2) POC designation information (pic_order_cnt_lbs, delta_pic_order_cnt, etc.) for designating the display order (POC: Picture Order Count) of a picture including the target slice, and ( 3) The weighting factor designation information (pred_weight_table) that designates the weighting factor used when the moving image coding apparatus 2 performs the coding is an example of a coding parameter included in the slice header SH.
 なお、スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、又は、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、又は、イントラ予測を用いるBスライスなどが挙げられる。 As slice types that can be specified by the slice type specification information, (1) I slice using only intra prediction at the time of encoding, and (2) P using unidirectional prediction or intra prediction at the time of encoding. Slice, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding.
 また、スライスヘッダSHには、動画像復号装置1の備える適応フィルタが参照するフィルタパラメータFPが含まれる。 Also, the slice header SH includes a filter parameter FP that is referred to by the adaptive filter included in the video decoding device 1.
 スライスレイヤSに含まれる各マクロブロックレイヤMBは、対象マクロブロックを復号するために動画像復号装置1が参照するデータの集合である。マクロブロックレイヤMBは、図47(c)に示すように、スキップフラグSKIP、マクロブロックヘッダMBH、予測パラメータPP1~PPNP、及び、量子化予測誤差QD1~QDNbを含んでいる。ここで、Npは、対象マクロブロックに含まれるパーティション(予測単位)の数を表し、Nbは、対象マクロブロックに含まれるブロック(変換単位)の数を表す。スキップフラグSKIPの値が1の場合、すなわち、対象マクロブロックがスキップブロックである場合、そのマクロブロックレイヤにおけるマクロブロックヘッダMBH、予測パラメータPP1~PPNP、及び、量子化予測誤差QD1~QDNbは省略される。 Each macroblock layer MB included in the slice layer S is a set of data referred to by the video decoding device 1 in order to decode the target macroblock. As shown in FIG. 47 (c), the macroblock layer MB includes a skip flag SKIP, a macroblock header MBH, prediction parameters PP 1 to PP NP , and quantized prediction errors QD 1 to QD Nb . Here, Np represents the number of partitions (prediction units) included in the target macroblock, and Nb represents the number of blocks (conversion units) included in the target macroblock. When the value of the skip flag SKIP is 1, that is, when the target macroblock is a skip block, the macroblock header MBH, the prediction parameters PP 1 to PP NP , and the quantized prediction errors QD 1 to QD in that macroblock layer Nb is omitted.
 マクロブロックヘッダMBHには、対象マクロブロックの復号方法を決定するために動画像復号装置1が参照する符号化パラメータが含まれる。具体的には、図47(d)に示すように、対象マクロブロックのマクロブロックタイプを指定するマクロブロックタイプ指定情報MBT(mb_type)、符号化ブロックパターンを指定するCBP(coded_block_pattern)、量子化ステップの大きさを指定する量子化パラメータ差分Δqp(mb_qp_delta)が含まれる。マクロブロックタイプ指定情報MBTは、予測単位指定情報PTと変換単位指定情報TTとを含む。 The macroblock header MBH includes an encoding parameter referred to by the video decoding device 1 in order to determine a decoding method of the target macroblock. Specifically, as shown in FIG. 47 (d), macroblock type designation information MBT (mb_type) for designating the macroblock type of the target macroblock, CBP (coded_block_pattern) for designating the encoded block pattern, and quantization step Quantization parameter difference Δqp (mb_qp_delta) that specifies the size of. The macroblock type designation information MBT includes prediction unit designation information PT and conversion unit designation information TT.
 予測単位指定情報PTは、対象マクロブロックのパーティション(予測単位)への分割パターン(すなわち、対象マクロブロックに含まれる各パーティションのサイズ、及び、対象マクロブロック内での位置)と、動画像符号化装置2が各パーティションにおける予測画像を生成する際に用いた予測方法(L0単方向予測、L1単方向予測、双方向予測、イントラ予測など)を指定する。パーティションのサイズは、例えば、16×16画素、8×8画素、4×4画素、16×8画素、8×16画素、8×4画素、4×8画素、8×1画素、および、1×8画素の中から選択可能である。より一般には、各パーティションは、M×N画素(Mは、対象マクロブロックの横方向の画素数以下の整数であり、Nは、対象マクロブロックの縦方向の画素数以下の整数である)の領域とすることができる。 The prediction unit designation information PT includes a partition pattern (that is, the size of each partition included in the target macroblock and a position in the target macroblock) into the partition (prediction unit) of the target macroblock, and video coding. The prediction method (L0 unidirectional prediction, L1 unidirectional prediction, bidirectional prediction, intra prediction, etc.) used when the apparatus 2 generates a predicted image in each partition is designated. The partition size is, for example, 16 × 16 pixels, 8 × 8 pixels, 4 × 4 pixels, 16 × 8 pixels, 8 × 16 pixels, 8 × 4 pixels, 4 × 8 pixels, 8 × 1 pixels, and 1 X 8 pixels can be selected. More generally, each partition has M × N pixels (M is an integer equal to or smaller than the number of pixels in the horizontal direction of the target macroblock, and N is an integer equal to or smaller than the number of pixels in the vertical direction of the target macroblock). Can be an area.
 一方、変換単位指定情報TTは、対象マクロブロックのブロック(変換単位)への分割パターン(すなわち、対象マクロブロックに含まれる各ブロックのサイズ、及び、対象マクロブロック内での位置)を指定する。各ブロックは、16×16画素、8×8画素、4×4画素、16×8画素、8×16画素、8×4画素、4×8画素、8×1画素、および、1×8画素の中から選択可能である。より一般には、各ブロックは、M’×N’画素(M’は、対象マクロブロックの1辺の画素数以下の整数であり、N’は、対象マクロブロックの他の1辺の画素数以下の整数である)の領域とすることができる。 On the other hand, the conversion unit designation information TT designates the division pattern (that is, the size of each block included in the target macroblock and the position in the target macroblock) into the block (conversion unit) of the target macroblock. Each block is 16 × 16 pixels, 8 × 8 pixels, 4 × 4 pixels, 16 × 8 pixels, 8 × 16 pixels, 8 × 4 pixels, 4 × 8 pixels, 8 × 1 pixels, and 1 × 8 pixels. Can be selected from. More generally, each block has M ′ × N ′ pixels (M ′ is an integer less than or equal to the number of pixels on one side of the target macroblock, and N ′ is less than or equal to the number of pixels on the other side of the target macroblock. (Which is an integer).
 なお、上記の説明では、マクロブロックを16×16画素の正方形領域としたときのパーティションを例示したが、これに限定されるものではない。例えば、64×64画素のマクロブロックに対しては、64×64画素、若しくは32×32画素の正方形領域、又は、64×32画素、32×64画素、32×16画素、若しくは16×32画素の長方形領域もパーティション、またはブロックとして許容される。 In the above description, the partition when the macro block is a square area of 16 × 16 pixels is exemplified, but the present invention is not limited to this. For example, for a 64 × 64 pixel macroblock, a 64 × 64 pixel or 32 × 32 pixel square area, or 64 × 32 pixel, 32 × 64 pixel, 32 × 16 pixel, or 16 × 32 pixel The rectangular area is also allowed as a partition or block.
 量子化パラメータ差分Δqpは、対象マクロブロックにおける量子化パラメータqpと、そのマクロブロックの直前に符号化されたマクロブロックにおける量子化パラメータqp’との差分qp-qp’である。 The quantization parameter difference Δqp is a difference qp−qp ′ between the quantization parameter qp in the target macroblock and the quantization parameter qp ′ in the macroblock encoded immediately before the macroblock.
 マクロブロックレイヤMBに含まれる各量子化予測残差QDnは、動画像符号化装置2が以下の処理1~3を対象ブロックに施すことによって生成した符号化データである。処理1:符号化対象画像から予測画像を減算した予測残差をDCT変換(Discrete Cosine Transform)する。処理2:処理1にて得られたDCT係数を量子化する。処理3:処理2にて量子化されたDCT係数を可変長符号化する。上述した量子化パラメータqpは、動画像符号化装置2がDCT係数を量子化する際に用いた量子化ステップQPの大きさを表す(QP=2pq/6)。 Each quantized prediction residual QD n included in the macroblock layer MB is encoded data generated by the moving image encoding apparatus 2 performing the following processes 1 to 3 on the target block. Process 1: DCT transform (Discrete Cosine Transform) is performed on the prediction residual obtained by subtracting the prediction image from the encoding target image. Process 2: The DCT coefficient obtained in Process 1 is quantized. Process 3: The DCT coefficient quantized in Process 2 is variable length encoded. The quantization parameter qp described above represents the size of the quantization step QP used when the moving image encoding apparatus 2 quantizes the DCT coefficient (QP = 2 pq / 6 ).
 マクロブロックレイヤMBに含まれる予測パラメータPPのうち、インター予測によって予測画像が生成されるインター予測パーティションに関する予測パラメータPPは、図47(e)に示すように、参照画像インデックスRIと、推定動きベクトルインデックスPMVIと、動きベクトル残差MVDとを含んでいる。 Among the prediction parameters PP included in the macroblock layer MB, the prediction parameter PP related to the inter prediction partition in which the prediction image is generated by the inter prediction includes a reference image index RI, an estimated motion vector, as shown in FIG. The index PMVI and the motion vector residual MVD are included.
 動きベクトル残差MVDは、動画像符号化装置2が以下の処理4~6を実行することによって生成した符号化データである。処理4:符号化/復号化済みの局所復号画像(より正確には、符号化/復号化済みの局所復号画像に対してデブロック処理および適応的フィルタ処理を施すことによって得られる画像)を選択し、選択した符号化/復号化済みの局所復号画像(以下「参照画像」とも呼称)を参照して対象パーティションに対する動きベクトルmvを導出する。処理5:推定方法を選択し、選択した推定方法を用いて対象パーティションに割り付ける動きベクトルmvの推定値(以下「推定動きベクトル」とも呼称)pmvを導出する。処理6:処理4にて導出した動きベクトルmvから処理5にて導出した推定動きベクトルpmvを減算した動きベクトル残差MVDを符号化する。 The motion vector residual MVD is encoded data generated by the moving image encoding device 2 executing the following processes 4 to 6. Process 4: Select an encoded / decoded locally decoded image (more precisely, an image obtained by performing deblocking processing and adaptive filtering on the encoded / decoded local decoded image) The motion vector mv for the target partition is derived with reference to the selected encoded / decoded local decoded image (hereinafter also referred to as “reference image”). Process 5: An estimation method is selected, and an estimated value (hereinafter also referred to as “estimated motion vector”) pmv of the motion vector mv assigned to the target partition is derived using the selected estimation method. Process 6: The motion vector residual MVD obtained by subtracting the estimated motion vector pmv derived in Process 5 from the motion vector mv derived in Process 4 is encoded.
 上述した参照画像インデックスRIは、処理4にて選択した符号化/復号化済みの局所復号画像(参照画像)を指定するものであり、上述した推定動きベクトルインデックスPMVIは、処理5にて選択した推定方法を指定するものである。処理5にて選択可能な推定方法としては、(1)符号化/復号化中の局所復号画像(より正確には、符号化/復号化中の局所復号画像における復号済みの領域に対してデブロック処理および適応的フィルタ処理を施すことによって得られる画像)において、対象パーティションに隣接するパーティション(以下「隣接パーティション」とも呼称する)に割り付けられた動きベクトルのメジアンを推定動きベクトルpmvとする方法や、(2)符号化/復号化済みの局所復号画像において、対象パーティションと同じ位置を占めるパーティション(しばしば「コロケートパーティション」と呼称される)に割り付けられた動きベクトルを推定動きベクトルpmvとする方法などが挙げられる。 The reference image index RI described above specifies the locally decoded image (reference image) that has been encoded / decoded selected in the process 4, and the estimated motion vector index PMVI described above is selected in the process 5. Specifies the estimation method. The estimation methods that can be selected in the processing 5 include: (1) a locally decoded image being encoded / decoded (more precisely, a region that has already been decoded in a locally decoded image being encoded / decoded). In an image obtained by performing block processing and adaptive filter processing), a median of a motion vector allocated to a partition adjacent to the target partition (hereinafter also referred to as “adjacent partition”) is used as an estimated motion vector pmv. (2) In a locally decoded image that has been encoded / decoded, a motion vector assigned to a partition (often referred to as a “collocated partition”) occupying the same position as the target partition is used as an estimated motion vector pmv, etc. Is mentioned.
 なお、単方向予測を行うパーティションに関する予測パラメータPPには、図47(e)に示すように、参照画像インデックスRI、推定動きベクトルインデックスPMVI、及び、動きベクトル残差MVDがそれぞれ1つずつ含まれているが、双方向予測(重み付き予測)を行うパーティションに関する予測パラメータPPには、2つの参照画像インデックスRI1及びRI2、2つの推定動きベクトルインデックスPMVI1及びPMVI2、並びに、2つの動きベクトル残差MVD1及びMVD2が含まれる。 Note that, as shown in FIG. 47 (e), the prediction parameter PP related to the partition for which unidirectional prediction is performed includes one each of the reference image index RI, the estimated motion vector index PMVI, and the motion vector residual MVD. However, the prediction parameters PP for a partition that performs bi-directional prediction (weighted prediction) include two reference image indexes RI1 and RI2, two estimated motion vector indexes PMVI1 and PMVI2, and two motion vector residuals MVD1. And MVD2.
 マクロブロックレイヤMBに含まれる予測パラメータPPのうち、イントラ予測によって予測画像が生成されるイントラ予測パーティションに関する予測パラメータPPは、図47(f)に示すように、予測インデックスPIを含んでいる。ここで、予測インデックスPIは、対象パーティションについてのイントラ予測方法(予測モード)を指定するためのインデックスである。なお、対象パーティションについて選択可能な予測モードの種類は、当該対象パーティションのサイズによって異なるため、予測インデックスのとり得る値の範囲も、対象パーティションのサイズによって異なる。 Among the prediction parameters PP included in the macroblock layer MB, the prediction parameter PP related to the intra prediction partition for which a prediction image is generated by intra prediction includes a prediction index PI as shown in FIG. 47 (f). Here, the prediction index PI is an index for designating an intra prediction method (prediction mode) for the target partition. Note that since the types of prediction modes that can be selected for the target partition differ depending on the size of the target partition, the range of values that the prediction index can take also differs depending on the size of the target partition.
 なお、符号化データ#1のデータ構造は、図47に示したものに限定されない。例えば、動画像におけるピクチャ以下のレイヤ構造の一部を変更することにより得られる、図50に示すようなデータ構造を採用してもよい。 Note that the data structure of the encoded data # 1 is not limited to that shown in FIG. For example, a data structure as shown in FIG. 50 obtained by changing a part of a layer structure below a picture in a moving image may be adopted.
 図50は、符号化データ#1のデータ構造の変形例を示す図である。図50において、(a)は、ピクチャに相当するピクチャレイヤPCT、(b)は、ピクチャを分割して得られるスライスに相当するスライスレイヤS、(c)は、スライスを分割して得られるツリーブロック(Tree block)に相当するツリーブロックレイヤTBLK、(d)は、ツリーブロックを分割して得られるCU(Coding Unit;符号化単位)に相当するCUレイヤCUを示す。 FIG. 50 is a diagram showing a modification of the data structure of the encoded data # 1. In FIG. 50, (a) is a picture layer PCT corresponding to a picture, (b) is a slice layer S corresponding to a slice obtained by dividing the picture, and (c) is a tree obtained by dividing the slice. Tree block layers TBLK and (d) corresponding to blocks (Tree blocks) indicate CU layer CUs corresponding to CUs (Coding Units) obtained by dividing the tree blocks.
 ピクチャレイヤPICTには、ピクチャ(対象ピクチャとも呼称する)を復号するために動画像復号装置1が参照する各種情報が含まれる。具体的には、図50(a)に示すように、ピクチャヘッダPH、及び、スライスレイヤS1~SNS(NSは対象ピクチャに含まれるスライスの総数)が含まれる。 The picture layer PICT includes various types of information that the video decoding device 1 refers to in order to decode a picture (also referred to as a target picture). Specifically, as shown in FIG. 50A, a picture header PH and slice layers S 1 to S NS (NS is the total number of slices included in the target picture) are included.
 なお、以下、スライスレイヤS1~SNSのそれぞれを区別する必要が無い場合、符号の添え字を省略してスライスレイヤSと記述する。また、符号化データ#1に含まれる他のレイヤの符号についても同様である。 In the following description, when it is not necessary to distinguish each of the slice layers S 1 to S NS , the reference numerals are omitted and the slice layers S are described. The same applies to codes of other layers included in the encoded data # 1.
 ピクチャヘッダPHには、対象ピクチャの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれている。例えば、動画像符号化装置2が符号化の際に用いた可変長符号化のモードを示す符号化モード情報(entropy_coding_mode_flag)は、ピクチャヘッダPHに含まれる符号化パラメータの一例である。 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. For example, 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.
 entropy_coding_mode_flagが0の場合、対象ピクチャは、CAVLC(Context-based Adaptive Variable Length Coding)によって符号化されている。また、entropy_coding_mode_flagが1である場合、対象ピクチャは、CABAC(Context-based Adaptive Binary Arithmetic Coding)によって符号化されている。 When entropy_coding_mode_flag is 0, the target picture is encoded by CAVLC (Context-based “Adaptive” Variable “Length” Coding). When entropy_coding_mode_flag is 1, the target picture is encoded by CABAC (Context-based Adaptive Binary Arithmetic Coding).
 なお、ピクチャヘッダPHは、ピクチャー・パラメーター・セット(PPS:Picture Parameter Set)とも称される。 Note that the picture header PH is also referred to as a picture parameter set (PPS).
 スライスレイヤSには、スライス(対象スライスとも称する)を復号するために動画像復号装置1が参照する各種情報が含まれる。具体的には、図50(b)に示すように、スライスヘッダSH、及び、ツリーブロックレイヤTBLK1~TBLKNC(NCは対象スライスに含まれるツリーブロックの総数)が含まれる。 The slice layer S includes various types of information that the video decoding device 1 refers to in order to decode a slice (also referred to as a target slice). Specifically, as shown in FIG. 50B, a slice header SH and tree block layers TBLK 1 to TBLK NC (NC is the total number of tree blocks included in the target slice) are included.
 スライスヘッダSHには、対象スライスの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれる。対象スライスのスライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。 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. The slice type designation information (slice_type) that designates the slice type of the target slice is an example of an encoding parameter included in the slice header SH.
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、又は、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、又は、イントラ予測を用いるBスライスなどが挙げられる。 As slice types that can be specified by the slice type specification information, (1) 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.
 また、スライス毎に適応フィルタのフィルタ係数群を切り替える場合、対象スライスに作用させる適応フィルタのフィルタ係数群を規定するフィルタパラメータFPもこのスライスヘッダSHに含まれる。 Further, when the filter coefficient group of the adaptive filter is switched for each slice, the filter parameter FP that defines the filter coefficient group of the adaptive filter that acts on the target slice is also included in the slice header SH.
 ツリーブロックレイヤTBLKには、ツリーブロック(対象ツリーブロックとも称する)を復号するために動画像復号装置1が参照する各種情報が含まれる。具体的には、図50(c)に示すように、ツリーブロックヘッダTBLKH、及び、CU情報CUI~CUINL(NLは対象ツリーブロックに含まれるCUの総数)が含まれる。 The tree block layer TBLK includes various types of information that the video decoding device 1 refers to in order to decode a tree block (also referred to as a target tree block). Specifically, as shown in FIG. 50C, a tree block header TBLKH and CU information CUI 1 to CUI NL (NL is the total number of CUs included in the target tree block) are included.
 ここで、CUは、ツリーブロックを再帰的に4分木分割することにより得られたものである。再帰的な4分木分割とは、ツリーブロックを4等分した後、先の分割により得られたパーティションを4等分するステップを繰り返す処理のことを指す。この際、先の分割により得られたパーティションの一部のみを4等分することが許される。すなわち、ツリーブロックの中にサイズの異なるCUを共存させることができる。 Here, the CU is obtained by recursively dividing the tree block into quadtrees. Recursive quadtree partitioning refers to a process in which a tree block is divided into four equal parts and then a step of dividing the partition obtained by the previous partitioning into four equal parts is repeated. At this time, only a part of the partition obtained by the previous division is allowed to be divided into four equal parts. That is, CUs having different sizes can coexist in the tree block.
 この再帰的な4分木分割により得られる木構造のことを、以下、符号化ツリー(coding tree)と称する。ツリーブロックは、符号化ツリーのルート(root)に対応し、CUは、符号化ツリーのリーフ(leaf)に対応する。なお、符号化ツリーのリーフは、CUに対応するノードであることから、符号化ノード(coding node)と称されることもある。 The tree structure obtained by this recursive quadtree partitioning is hereinafter referred to as a coding tree. The tree block corresponds to the root of the coding tree, and the CU corresponds to the leaf of the coding tree. Note that a leaf of the coding tree is a node corresponding to the CU, and thus may be referred to as a coding node (coding node).
 また、各CUのとり得るサイズは、ツリーブロックのサイズと、符号化データ#1のシーケンスパラメータセットSPSに含まれる最大階層深度(maximum hierarchical depth)とに応じて決まる。例えば、ツリーブロックのサイズが64×64画素であり、最大階層深度が3である場合には、3種類のサイズ、すなわち、64×64画素、32×32画素、および16×16画素のCUが存在し得る。 Also, the size that each CU can take depends on the size of the tree block and the maximum hierarchical depth (maximummaximhierarchical depth) included in the sequence parameter set SPS of the encoded data # 1. For example, when the size of the tree block is 64 × 64 pixels and the maximum hierarchical depth is 3, there are three types of sizes, that is, CUs of 64 × 64 pixels, 32 × 32 pixels, and 16 × 16 pixels. Can exist.
 ツリーブロックヘッダTBLKHには、対象ツリーブロックの復号方法を決定するために動画像復号装置1が参照する符号化パラメータが含まれる。対象ツリーブロックの各CUへの分割パターンを指定するツリーブロック分割情報SP_TBLKや、量子化ステップの大きさを指定する量子化パラメータ差分Δqp(qp_delta)などは、ツリーブロックヘッダTBLKHに含まれる符号化パラメータの一例である。 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. The tree block division information SP_TBLK that specifies the division pattern of the target tree block into each CU, the quantization parameter difference Δqp (qp_delta) that specifies the size of the quantization step, and the like are encoded parameters included in the tree block header TBLKH. It is an example.
 ツリーブロック分割情報SP_TBLKは、対象ツリーブロックをCUに分割する際の分割パターンを示す情報、換言すれば、符号化ツリーを表現する情報である。ツリーブロック分割情報SP_TBLKは、例えば、符号化ツリーにおいて各ノードを4分割するか否かを示すフラグ(split_coding_unit_flag)の集合により実現することができる。 The tree block division information SP_TBLK is information indicating a division pattern when the target tree block is divided into CUs, in other words, information representing a coding tree. The tree block division information SP_TBLK can be realized, for example, by a set of flags (split_coding_unit_flag) indicating whether or not each node is divided into four in the coding tree.
 また、量子化パラメータ差分Δqpは、対象ツリーブロックにおける量子化パラメータqpと、対象ツリーブロックの直前に符号化されたツリーブロックにおける量子化パラメータqp’との差分qp-qp’である。 Further, 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情報CUIについて説明する前に、CUの構造について説明する。 Before describing the CU information CUI, the structure of the CU will be described.
 CUを分割することにより、少なくとも1つの予測ブロックが得られる。換言すれば、CUは、互いに重複しない少なくとも1つの予測ブロックにより被覆される。CUに対応するノードをルートとし、予測ブロックに対応するノードをリーフとするツリーを、予測ツリー(prediction tree;PT)と呼ぶ。予測ブロックは、予測処理の実行単位であり、PU(prediction unit;予測単位)とも呼ばれる。 • At least one prediction block is obtained by dividing the CU. In other words, the CU is covered by at least one prediction block that does not overlap each other. A tree having a node corresponding to a CU as a root and a node corresponding to a prediction block as a leaf is called a prediction tree (PT). A prediction block is an execution unit of prediction processing, and is also referred to as PU (prediction unit).
 予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測の場合、分割方法は、2N×2N(符号化ノードと同一サイズ)と、N×Nとがある。また、インター予測の場合、分割方法は、2N×2N(符号化ノードと同一サイズ)、2N×N、N×2N、および、N×Nなどがある。 There are roughly two types of division in the prediction tree: intra prediction and inter prediction. In the case of intra prediction, there are 2N × 2N (the same size as the encoding node) and N × N division methods. In the case of inter prediction, there are 2N × 2N (the same size as the encoding node), 2N × N, N × 2N, N × N, and the like.
 また、CUを分割することにより、少なくとも1つの変換ブロックが得られる。換言すれば、CUは、互いに重複しない少なくとも1つの変換ブロックにより被覆される。CUに対応するノードをルートとし、予測ブロックに対応するノードをリーフとするツリーを、変換ツリー(transform tree;TT)と呼ぶ。変換ブロックは、DCT変換の実行他員意であり、TU(transform unit;変換単位)とも呼ばれる。 Moreover, at least one conversion block is obtained by dividing the CU. In other words, the CU is covered by at least one transform block that does not overlap each other. A tree having a node corresponding to a CU as a root and a node corresponding to a prediction block as a leaf is referred to as a transform tree (TT). The transformation block is another meaning of execution of DCT transformation, and is also called TU (transform unit).
 変換ツリーにおける分割には、符号化ノードと同一のサイズの領域を変換ブロックとして割り付けるものと、上述したツリーブロックの分割と同様、再帰的な4分木分割によるものがある。 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.
 CU情報CUIには、CU(以下、対象CUとも称する)を復号するために動画像復号装置1が参照する各種情報が含まれる。具体的には、図50(d)に示すように、スキップフラグSKIP、PT情報PTI、および、TT情報TTIが含まれる。 The CU information CUI includes various types of information that the video decoding device 1 refers to in order to decode a CU (hereinafter also referred to as a target CU). Specifically, as shown in FIG. 50 (d), a skip flag SKIP, PT information PTI, and TT information TTI are included.
 スキップフラグSKIPは、対象CUについて、スキップモードが適用されているか否かを示すフラグであり、スキップフラグSKIPの値が1の場合、すなわち、対象CUにスキップモードが適用されている場合、そのCU情報CUIにおけるPT情報PTI、および、TT情報TTIは省略される。なお、スキップフラグSKIPは、Iスライスでは省略される。 The skip flag SKIP is a flag indicating whether or not the skip mode is applied to the target CU. When the value of the skip flag SKIP is 1, that is, when the skip mode is applied to the target CU, the CU The PT information PTI and the TT information TTI in the information CUI are omitted. Note that the skip flag SKIP is omitted for the I slice.
 PT情報PTIは、対象CUをルートとする予測ツリーPTに関する情報である。具体的には、図50(d)に示すように、予測タイプ情報PType、及び、予測情報PInfoを含んでいる。 PT information PTI is information regarding the prediction tree PT having the target CU as a root. Specifically, as shown in FIG. 50 (d), the prediction type information PType and the prediction information PInfo are included.
 予測タイプ情報PTypeは、対象CUにおける予測画像の生成にイントラ予測を用いるのか、インター予測を用いるのかを指定する情報である。予測情報PInfoには、対象CUをPUに分割する際の分割パターンを指定するPT分割情報(不図示)、及び、各PUの予測画像を生成するために動画像復号装置1が参照する予測パラメータ(不図示)が含まれる。 Prediction type information PType is information that specifies whether intra prediction or inter prediction is used to generate a predicted image in the target CU. In the prediction information PInfo, PT division information (not shown) for specifying a division pattern for dividing the target CU into PUs, and a prediction parameter referred to by the video decoding device 1 to generate a prediction image of each PU (Not shown) is included.
 インター予測によって予測画像が生成されるPUの予測パラメータには、参照画像インデックス、推定動きベクトルインデックス、動きベクトル残差などが含まれる。一方、イントラ予測によって予測画像が生成されるイントラPUに関する予測パラメータには、予測モードを指定する予測インデックスなどが含まれる。 The prediction parameters of a PU for which a predicted image is generated by inter prediction include a reference image index, an estimated motion vector index, a motion vector residual, and the like. On the other hand, the prediction parameters related to the intra PU for which the prediction image is generated by the intra prediction include a prediction index for specifying the prediction mode.
 TT情報TTIは、対象CUをルートとする変換ツリーに関する情報である。具体的には、図50(d)に示すように、TT分割情報SP_TT、及び、量子化予測残差QD1~QDNT(NTは、対象CUに含まれるブロックの総数)を含んでいる。 The TT information TTI is information related to a conversion tree having the target CU as a root. Specifically, as shown in FIG. 50 (d), TT division information SP_TT and quantization prediction residuals QD 1 to QD NT (NT is the total number of blocks included in the target CU) are included.
 TT分割情報SP_TTは、対象CUをTUに分割する際の分割パターンを表現する情報、換言すれば、対象CUをルートとする変換ツリーのツリー構造を表現する情報である。TT分割情報SP_TTは、例えば、対象CUの分割を行うか否かを示すフラグ(split_transform_unit_flag)、分割深度を示す情報(trafoDepth)とにより構成することができる。例えば、CUのサイズが、64×64の場合、分割により得られる各TUは、32×32画素から2×2画素までのサイズをとり得る。 TT division information SP_TT is information expressing a division pattern when dividing the target CU into TUs, in other words, information expressing a tree structure of a conversion tree having the target CU as a root. The TT division information SP_TT can be configured with, for example, a flag (split_transform_unit_flag) indicating whether or not to perform division of the target CU and information (trafoDepth) indicating the division depth. For example, when the size of the CU is 64 × 64, each TU obtained by the division can take a size from 32 × 32 pixels to 2 × 2 pixels.
 量子化予測残差QD1~QDNTは、各TUに対して以下の処理を施して得られる符号である。(処理1)符号化対象画像から予測画像を減算した予測残差をDCT変換(Discrete Cosine Transform)する。(処理2)処理1にて得られた変換係数を量子化する。(処理3)処理2にて量子化された変換係数を可変長符号化する。なお、上述した量子化パラメータqpは、変換係数を量子化する際に用いた量子化ステップQPの大きさを表す(QP=2qp/6)。 The quantized prediction residuals QD 1 to QD NT are codes obtained by performing the following processing on each TU. (Process 1) DCT transform (Discrete Cosine Transform) is performed on the prediction residual obtained by subtracting the prediction image from the encoding target image. (Process 2) The transform coefficient obtained in Process 1 is quantized. (Process 3) The transform coefficient quantized in Process 2 is variable length encoded. The quantization parameter qp described above represents the size of the quantization step QP used when quantizing the transform coefficient (QP = 2qp / 6).
 <動画像復号装置>
 上述した実施形態2~4に係る適応フォルタ100,200,300が搭載される動画像復号装置について図48を参照して説明する。動画像復号装置1001は、その一部に、H.264/MPEG-4.AVC、及び、その後継技術を含む復号装置である。
<Video decoding device>
With reference to FIG. 48, a description will be given of a moving picture decoding apparatus in which the adaptive filter 100, 200, 300 according to Embodiments 2 to 4 described above is mounted. The moving image decoding apparatus 1001 includes, as a part thereof, H.264. H.264 / MPEG-4. It is a decoding device including AVC and its successor technology.
 図48は、動画像復号装置1001の構成を示すブロック図である。動画像復号装置1001は、符号化データ#1001を復号することによって動画像#1002を生成するための装置であり、図48に示すように、可変長符号復号部1013、動きベクトル復元部1014、バッファメモリ1015、インター予測画像生成部1016、イントラ予測画像生成部1017、予測方式決定部1018、逆量子化・逆変換部1019、加算器1020、デブロッキングフィルタ1041、および、適応フィルタ1042を備えている。上述した実施形態2~4に係る適応フォルタ100,200,300は、この適応フィルタ1042として利用される。 FIG. 48 is a block diagram showing a configuration of the moving picture decoding apparatus 1001. The video decoding device 1001 is a device for generating video # 1002 by decoding the encoded data # 1001, and as shown in FIG. 48, a variable length code decoding unit 1013, a motion vector restoration unit 1014, A buffer memory 1015, an inter prediction image generation unit 1016, an intra prediction image generation unit 1017, a prediction method determination unit 1018, an inverse quantization / inverse transformation unit 1019, an adder 1020, a deblocking filter 1041, and an adaptive filter 1042 are provided. Yes. The adaptive filter 100, 200, 300 according to Embodiments 2 to 4 described above is used as the adaptive filter 1042.
 可変長符号復号部1013は、各パーティションに関する予測パラメータPPを、符号化データ#1001から復号する。すなわち、インター予測パーティションに関しては、参照画像インデックスRI、推定動きベクトルインデックスPMVI、及び、動きベクトル残差MVDを符号化データ#1001から復号し、これらを動きベクトル復元部1014に供給する。一方、イントラ予測パーティションに関しては、(1)パーティションのサイズを指定するサイズ指定情報、および、(2)予測インデックスを指定する予測インデックス指定情報を符号化データ#1001から復号し、これをイントラ予測画像生成部1017に供給する。また、可変長符号復号部1013は、マクロブロックタイプMBTを符号化データから復号し、これを予測方式決定部1018に供給する(図示省略)。更に、可変長符号復号部1013は、各ブロックに関する量子化予測残差QD、及び、そのブロックを含むマクロブロックに関する量子化パラメータ差分Δqpを符号化データ#1001から復号し、これらを逆量子化・逆変換部1019に供給する。また、可変長符号復号部1013は、符号化データ#1001に含まれるフィルタパラメータFPを適応フィルタ1042に供給する。 The variable length code decoding unit 1013 decodes the prediction parameter PP related to each partition from the encoded data # 1001. 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 # 1001 and supplied to the motion vector restoration unit 1014. 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 # 1001, and this is decoded into the intra prediction image. It supplies to the production | generation part 1017. Further, the variable length code decoding unit 1013 decodes the macroblock type MBT from the encoded data, and supplies this to the prediction method determination unit 1018 (not shown). Furthermore, the variable length code decoding unit 1013 decodes the quantization prediction residual QD for each block and the quantization parameter difference Δqp for the macroblock including the block from the encoded data # 1001, and dequantizes and decodes them. This is supplied to the inverse transform unit 1019. Also, the variable length code decoding unit 1013 supplies the filter parameter FP included in the encoded data # 1001 to the adaptive filter 1042.
 動きベクトル復元部1014は、各インター予測パーティションに関する動きベクトルmvを、そのパーティションに関する動きベクトル残差MVDと、他のパーティションに関する復元済みの動きベクトルmv’とから復元する。具体的には、(1)推定動きベクトルインデックスPMVIにより指定される推定方法に従って、復元済みの動きベクトルmv’から推定動きベクトルpmvを導出し、(2)導出した推定動きベクトルpmvと動きベクトル残差MVDとを加算することによって動きベクトルmvを得る。なお、他のパーティションに関する復元済みの動きベクトルmv’は、バッファメモリ1015から読み出すことができる。動きベクトル復元部1014は、復元した動きベクトルmvを、対応する参照画像インデックスRIと共に、インター予測画像生成部1017に供給する。なお、双方向予測(重み付き予測)を行うインター予測パーティションについては、復元した2つの動きベクトルmv1及びmv2を、対応する参照画像インデックスRI1及びRI2と共に、インター予測画像生成部1017に供給する。 The motion vector restoration unit 1014 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 other partitions. 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 ′ related to other partitions can be read from the buffer memory 1015. The motion vector restoration unit 1014 supplies the restored motion vector mv to the inter predicted image generation unit 1017 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 1017 together with the corresponding reference image indexes RI1 and RI2.
 インター予測画像生成部1016は、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル復元部1014から供給された動きベクトルmvを用いて、同じく動きベクトル復元部1014から供給された参照画像インデックスRIによって指定されるフィルタ済復号画像P_FL’から動き補償画像mcを生成する。ここで、フィルタ済復号画像P_FL’は、既に復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ1041によるデブロック処理、および、適応フィルタ1042による適応的フィルタ処理を施すことによって得られる画像であり、インター予測画像生成部1016は、フィルタ済復号画像P_FL’を構成する各画素の画素値をバッファメモリ1015から読み出すことができる。インター予測画像生成部1016によって生成された動き補償画像mcは、インター予測画像Pred_Interとして予測方式決定部1018に供給される。なお、双方向予測(重み付き予測)を行うインター予測パーティションについては、(1)動きベクトルmv1を用いて、参照画像インデックスRI1によって指定されたフィルタ済復号画像P_FL1’から動き補償画像mc1を生成し、(2)動きベクトルmv2を用いて、参照画像インデックスRI2によって指定されたフィルタ済復号画像P_FL2’とから動き補償画像mc2を生成し、(3)動き補償画像mc1と動き補償画像mc2との加重平均にオフセット値を加えることによってインター予測画像Pred_Interを生成する。 The inter prediction image generation unit 1016 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 1014, 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 1014. Is generated. Here, the filtered decoded image P_FL ′ is obtained by performing deblocking processing by the deblocking filter 1041 and adaptive filtering processing by the adaptive filter 1042 on the decoded image that has already been decoded. The inter prediction image generation unit 1016 is an image, and can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 1015. The motion compensated image mc generated by the inter predicted image generating unit 1016 is supplied to the prediction method determining unit 1018 as an inter predicted image Pred_Inter. For the inter prediction partition that performs bi-directional prediction (weighted prediction), (1) 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. (2) 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.
 イントラ予測画像生成部1017は、各イントラ予測パーティションに関する予測画像Pred_Intraを生成する。具体的には、まず、自身のメモリに記録されている対応表を参照して、可変長符号復号部1013から供給されたサイズ指定情報と予測インデックス指定情報とに基づいて予測モードを特定し、特定された予測モードを対象パーティションに対して、例えば、ラスタスキャン順に割り付ける。続いて、当該予測モードの示す予測方法に従って、復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部1017によって生成されたイントラ予測画像Pred_Intraは、予測方式決定部1018に供給される。なお、イントラ予測画像生成部1017によるイントラ予測画像Pred_Intraの具体的な生成処理については、後述するためここでは説明を省略する。 The intra predicted image generation unit 1017 generates a predicted image Pred_Intra related to each intra prediction partition. Specifically, first, referring to the correspondence table recorded in its own memory, the prediction mode is specified based on the size designation information and the prediction index designation information supplied from the variable length code decoding unit 1013, The identified 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 1017 is supplied to the prediction method determination unit 1018. In addition, since the specific production | generation process of the intra estimated image Pred_Intra by the intra estimated image generation part 1017 is mentioned later, description is abbreviate | omitted here.
 予測方式決定部1018は、マクロブロックタイプMBTに基づいて、各パーティションがインター予測を行うべきインター予測パーティションであるのか、イントラ予測を行うべきイントラ予測パーティションであるのかを決定する。そして、前者の場合には、インター予測画像生成部1016にて生成されたインター予測画像Pred_Interを予測画像Predとして加算器1020に供給し、後者の場合には、イントラ予測画像生成部1017にて生成されたイントラ予測画像Pred_Intraを予測画像Predとして加算器1020に供給する。 The prediction method determination unit 1018 determines whether each partition is an inter prediction partition that should perform inter prediction or an intra prediction partition that should perform intra prediction, based on the macroblock type MBT. In the former case, the inter predicted image Pred_Inter generated by the inter predicted image generation unit 1016 is supplied to the adder 1020 as the predicted image Pred. In the latter case, the intra predicted image generation unit 1017 generates the inter predicted image Pred_Inter. The intra predicted image Pred_Intra that has been processed is supplied to the adder 1020 as the predicted image Pred.
 逆量子化・逆変換部1019は、(1)量子化予測残差QDを逆量子化し、(2)逆量子化によって得られたDCT係数を逆DCT(Discrete Cosine Transform)変換し、(3)逆DCT変換によって得られた予測残差Dを加算器1020に供給する。なお、量子化予測残差QDを逆量子化する際に、逆量子化・逆変換部1019は、可変長符号復号部1013から供給された量子化パラメータ差分Δqpから量子化ステップQPを導出する。量子化パラメータqpは、直前に逆量子化/逆DCT変換したマクロブロックに関する量子化パラメータqp’に量子化パラメータ差分Δqpを加算することによって導出でき、量子化ステップQPは、量子化ステップqpからQP=2pq/6によって導出できる。また、逆量子化・逆変換部1019による予測残差Dの生成は、ブロック(変換単位)を単位として行われる。 The inverse quantization / inverse transform unit 1019 (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 1020. When the quantization prediction residual QD is inversely quantized, the inverse quantization / inverse transform unit 1019 derives a quantization step QP from the quantization parameter difference Δqp supplied from the variable length code decoding unit 1013. The quantization parameter qp can be derived by adding the quantization parameter difference Δqp to the quantization parameter qp ′ relating to the macroblock that has been inversely quantized / inversely DCT transformed immediately before, and the quantization step QP is performed from the quantization step qp to QP. = 2pq / 6. In addition, the generation of the prediction residual D by the inverse quantization / inverse transform unit 1019 is performed in units of blocks (transform units).
 加算器1020は、予測方式決定部1018から供給された予測画像Predと、逆量子化・逆変換部1019から供給された予測残差Dとを加算することによって復号画像Pを生成する。 The adder 1020 generates a decoded image P by adding the prediction image Pred supplied from the prediction method determination unit 1018 and the prediction residual D supplied from the inverse quantization / inverse transformation unit 1019.
 デブロッキングフィルタ1041は、復号画像Pにおけるブロック境界、またはマクロブロック境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、復号画像Pにおける当該ブロック境界、または当該マクロブロック境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該マクロブロック境界付近の画像の平滑化を行う。デブロッキングフィルタ1041によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、適応フィルタ42に出力される。 The deblocking filter 1041 determines the block boundary in the decoded image P when the difference between the pixel values of the pixels adjacent to each other via the block boundary in the decoded image P or the macroblock boundary is smaller than a predetermined threshold, or By performing deblocking processing on the macroblock boundary, an image near the block boundary or the macroblock boundary is smoothed. The image subjected to the deblocking process by the deblocking filter 1041 is output to the adaptive filter 42 as a deblocked decoded image P_DB.
 適応フィルタ1042は、デブロッキングフィルタ1041から供給されるデブロック済復号画像P_DBに対して、フィルタパラメータFPを復号することにより得られるフィルタ係数を用いたフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ1042によりフィルタ処理が施された画像は、フィルタ済復号画像P_FLとして外部に出力されると共に、可変長符号復号部1013によって符号化データから復号されたPOC指定情報と関連付けてバッファメモリ1015に格納される。 The adaptive filter 1042 subjects the deblocked decoded image P_DB supplied from the deblocking filter 1041 to a filtering process using a filter coefficient obtained by decoding the filter parameter FP, so that the filtered decoded image P_FL Is generated. The image subjected to the filter processing by the adaptive filter 1042 is output to the outside as the filtered decoded image P_FL, and is associated with the POC designation information decoded from the encoded data by the variable length code decoding unit 1013 in the buffer memory 1015. Stored.
 なお、ここでは、符号化データ#1001が図47に示すデータ構造を有する場合に対応した動画像復号装置1001の構成について説明したが、動画像復号装置1001の構成はこれに限定されない。すなわち、各種処理の処理単位を適宜変更することによって、動画像復号装置1を図50に示すデータ構造を有する符号化データ#1001に対応させることができる。 In addition, although the structure of the moving image decoding apparatus 1001 corresponding to the case where encoded data # 1001 has the data structure shown in FIG. 47 was demonstrated here, the structure of the moving image decoding apparatus 1001 is not limited to this. That is, the video decoding apparatus 1 can be made to correspond to the encoded data # 1001 having the data structure shown in FIG.
 <動画像符号化装置>
 上述した実施形態2~4に係る適応フォルタ100’,200’,300’が搭載される動画像符号化装置について図49を参照して説明する。動画像符号化装置1002は、その一部に、H.264/MPEG-4.AVC、及び、その後継技術を含む復号装置である。
<Moving picture encoding apparatus>
With reference to FIG. 49, a description will be given of a moving picture encoding apparatus in which the adaptive folders 100 ′, 200 ′, and 300 ′ according to Embodiments 2 to 4 described above are mounted. The moving image encoding apparatus 1002 includes, as a part thereof, an H.264 format. H.264 / MPEG-4. It is a decoding device including AVC and its successor technology.
 図49は、動画像符号化装置1002の構成を示すブロック図である。動画像符号化装置1002は、動画像#1010(符号化対象画像)を符号化することによって符号化データ#1001を生成する装置であり、図49に示すように、変換・量子化部1021、可変長符号符号化部1022、逆量子化・逆変換部1023、バッファメモリ1024、イントラ予測画像生成部1025、インター予測画像生成部1026、動きベクトル検出部1027、予測方式制御部1028、動きベクトル冗長性削除部1029、加算器1031、減算器1032、デブロッキングフィルタ1033、および、適応フィルタ1034を備えている。上述した実施形態2~4に係る適応フォルタ100’,200’,300’は、この適応フォルタ1034として利用される。 FIG. 49 is a block diagram showing a configuration of the moving picture encoding apparatus 1002. The moving image encoding apparatus 1002 is an apparatus that generates encoded data # 1001 by encoding moving image # 1010 (encoding target image). As illustrated in FIG. 49, as illustrated in FIG. Variable length code encoding unit 1022, inverse quantization / inverse transform unit 1023, buffer memory 1024, intra prediction image generation unit 1025, inter prediction image generation unit 1026, motion vector detection unit 1027, prediction scheme control unit 1028, motion vector redundancy A deletion unit 1029, an adder 1031, a subtractor 1032, a deblocking filter 1033, and an adaptive filter 1034. The adaptive folders 100 ′, 200 ′, and 300 ′ according to Embodiments 2 to 4 described above are used as the adaptive folder 1034.
 変換・量子化部1021は、(1)符号化対象画像から予測画像Predを減算した予測残差Dをブロック毎にDCT変換(Discrete Cosine Transform)し、(2)DCT変換により得られたDCT係数を量子化し、(3)量子化により得られた量子化予測残差QDを可変長符号符号化部22及び逆量子化・逆変換部1023に供給する。なお、変換・量子化部1021は、(1)量子化の際に用いる量子化ステップQPをマクロブロック毎に選択し、(2)選択した量子化ステップQPの大きさを示す量子化パラメータ差分Δqpを可変長符号符号化部1022に供給し、(3)選択した量子化ステップQPを逆量子化・逆変換部1023に供給する。ここで、量子化パラメータ差分Δqpとは、DCT変換/量子化するマクロブロックに関する量子化パラメータqp(QP=2pq/6)の値から、直前にDCT変換/量子化したマクロブロックに関する量子化パラメータqp’の値を減算して得られる差分値のことを指す。 The transform / quantization unit 1021 performs (1) DCT transform (Discrete Cosine Transform) for each block 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 1023. The transform / quantization unit 1021 selects (1) a quantization step QP to be used for quantization for each macroblock, and (2) a quantization parameter difference Δqp indicating the size of the selected quantization step QP. Is supplied to the variable-length code encoding unit 1022, and (3) the selected quantization step QP is supplied to the inverse quantization / inverse transform unit 1023. Here, the quantization parameter difference Δqp is the quantization parameter qp related to the macroblock DCT transformed / quantized immediately before from the value of the quantization parameter qp (QP = 2pq / 6) related to the macroblock to be DCT transformed / quantized. The difference value obtained by subtracting the value of '.
 可変長符号符号化部1022は、(1)変換・量子化部1021から供給された量子化予測残差QD並びにΔqp、(2)後述する予測方式制御部1028から供給された量子化パラメータPP、および、(3)後述する適応フィルタ1034から供給されたフィルタパラメータFPを可変長符号化することによって、符号化データ#1001を生成する。 The variable length code encoding unit 1022 includes (1) a quantization prediction residual QD and Δqp supplied from the transform / quantization unit 1021, and (2) a quantization parameter PP supplied from a prediction scheme control unit 1028 described later. (3) The encoded data # 1001 is generated by variable-length encoding the filter parameter FP supplied from the adaptive filter 1034 described later.
 逆量子化・逆変換部1023は、(1)量子化予測残差QDを逆量子化し、(2)逆量子化によって得られたDCT係数を逆DCT(Discrete Cosine Transform)変換し、(3)逆DCT変換によって得られた予測残差Dを加算器1031に供給する。量子化予測残差QDを逆量子化する際には、変換・量子化部1021から供給された量子化ステップQPを利用する。なお、逆量子化・逆変換部1023から出力される予測残差Dは、変換・量子化部1021に入力される予測残差Dに量子化誤差が加わったものであるが、ここでは簡単のために共通の呼称を用いる。 The inverse quantization / inverse transform unit 1023 (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 1031. When the quantization prediction residual QD is inversely quantized, the quantization step QP supplied from the transform / quantization unit 1021 is used. Note that the prediction residual D output from the inverse quantization / inverse transform unit 1023 is obtained by adding a quantization error to the prediction residual D input to the transform / quantization unit 1021. Common names are used for this purpose.
 イントラ予測画像生成部1025は、各パーティションに関する予測画像Pred_Intraを生成する。具体的には、(1)各パーティションついてイントラ予測に用いる予測モードを選択し、(2)選択した予測モードを用いて、復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部1025は、生成したイントラ予測画像Pred_Intraを、予測方式制御部1028に供給する。 The intra predicted image generation unit 1025 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 1025 supplies the generated intra predicted image Pred_Intra to the prediction method control unit 1028.
 また、イントラ予測画像生成部1025は、自身のメモリに格納されている対応表を参照し、各パーティションについて選択された予測モードと、各パーティションのサイズとから各パーティションについての予測インデックスPIを特定し、各パーティションについての当該予測インデックスPIを示す予測インデックス指定情報を予測方式制御部28に供給する。 Also, the intra predicted image generation unit 1025 refers to the correspondence table stored in its own memory, and specifies the prediction index PI for each partition from the prediction mode selected for each partition and the size of each partition. The prediction index designation information indicating the prediction index PI for each partition is supplied to the prediction method control unit 28.
 なお、イントラ予測画像生成部1025によるイントラ予測画像の生成は、(イントラ予測画像生成部1017によるイントラ予測画像の生成処理)において説明した処理と同様の処理によって行うことができる。 In addition, the production | generation of the intra estimated image by the intra estimated image production | generation part 1025 can be performed by the process similar to the process demonstrated in (the production | generation process of the intra estimated image by the intra estimated image generation part 1017).
 動きベクトル検出部1027は、各パーティションに関する動きベクトルmvを検出する。具体的には、(1)参照画像として利用するフィルタ済復号画像P_FL’を選択し、(2)選択したフィルタ済復号画像P_FL’において対象パーティションを最良近似する領域を探索することによって、対象パーティションに関する動きベクトルmvを検出する。ここで、フィルタ済復号画像P_FL’は、既に復号が完了した復号済みの復号画像に対して、デブロッキングフィルタ1033によるデブロック処理、および、適応フィルタ1034による適応的フィルタ処理を施すことによって得られる画像であり、動きベクトル検出部1027は、フィルタ済復号画像P_FL’を構成する各画素の画素値をバッファメモリ1024から読み出すことができる。動きベクトル検出部1027は、検出した動きベクトルmvを、参照画像として利用したフィルタ済復号画像P_FL’を指定する参照画像インデックスRIと共に、インター予測画像生成部1026及び動きベクトル冗長性削除部1029に供給する。なお、双方向予測(重み付き予測)を行うパーティションについては、参照画像として2枚のフィルタ済復号画像P_FL1’及びP_FL2’を選択し、2枚のフィルタ済復号画像P_FL1’及びP_FL2’の各々に対応する動きベクトルmv1及びmv2、並びに、参照画像インデックスRI1及びRI2をインター予測画像生成部1026及び動きベクトル冗長性削除部1029に供給する。 The motion vector detection unit 1027 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. Here, the filtered decoded image P_FL ′ is obtained by performing deblocking processing by the deblocking filter 1033 and adaptive filtering processing by the adaptive filter 1034 on the decoded image that has already been decoded. It is an image, and the motion vector detection unit 1027 can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 1024. The motion vector detection unit 1027 supplies the detected motion vector mv to the inter prediction image generation unit 1026 and the motion vector redundancy deletion unit 1029 together with the reference image index RI that specifies the filtered decoded image P_FL ′ used as the reference image. To do. Note that for a partition that performs bi-directional prediction (weighted prediction), 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 1026 and the motion vector redundancy deletion unit 1029.
 インター予測画像生成部1026は、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル検出部1027から供給された動きベクトルmvを用いて、動きベクトル検出部1027から供給された参照画像インデックスRIによって指定されるフィルタ済復号画像P_FL’から動き補償画像mcを生成する。動きベクトル検出部1027と同様、インター予測画像生成部1026は、フィルタ済復号画像P_FL’を構成する各画素の画素値をバッファメモリ1024から読み出すことができる。インター予測画像生成部1026は、生成した動き補償画像mc(インター予測画像Pred_Inter)を、動きベクトル検出部1027から供給された参照画像インデックスRIと共に、予測方式制御部1028に供給する。なお、双方向予測(重み付き予測)をパーティションについては、(1)動きベクトルmv1を用いて、参照画像インデックスRI1によって指定されたフィルタ済復号画像P_FL1’から動き補償画像mc1を生成し、(2)動きベクトルmv2を用いて、参照画像インデックスRI2によって指定されたフィルタ済参照画像P_FL2’から動き補償画像mc2を生成し、(3)動き補償画像mc1と動き補償画像mc2との加重平均にオフセット値を加えることによってインター予測画像Pred_Interを生成する。 The inter prediction image generation unit 1026 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 1027, the motion compensation image mc is obtained from the filtered decoded image P_FL ′ specified by the reference image index RI supplied from the motion vector detection unit 1027. Generate. Similar to the motion vector detection unit 1027, the inter predicted image generation unit 1026 can read out the pixel value of each pixel constituting the filtered decoded image P_FL ′ from the buffer memory 1024. The inter prediction image generation unit 1026 supplies the generated motion compensated image mc (inter prediction image Pred_Inter) to the prediction scheme control unit 1028 together with the reference image index RI supplied from the motion vector detection unit 1027. For the partition with bi-directional prediction (weighted prediction), (1) 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.
 予測方式制御部1028は、イントラ予測画像Pred_Intra及びインター予測画像Pred_Interを符号化対象画像と比較し、イントラ予測を行うかインター予測を行うかを選択する。イントラ予測を選択した場合、予測方式制御部1028は、イントラ予測画像Pred_Intraを予測画像Predとして加算器1031及び減算器1032に供給すると共に、イントラ予測画像生成部1025から供給された予測インデックスPIを予測パラメータPPとして可変長符号符号化部1022に供給する。一方、インター予測を選択した場合、予測方式制御部1028は、インター予測画像Pred_Interを予測画像Predとして加算器1031及び減算器1032に供給すると共に、インター予測画像生成部1026から供給された参照画像インデックスRI、並びに、動きベクトル冗長性削除部1029(後述)から供給された推定動きベクトルインデックスPMVI及び動きベクトル残差MVDを予測パラメータPPとして可変長符号符号化部に供給する。 The prediction scheme control unit 1028 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. When intra prediction is selected, the prediction scheme control unit 1028 supplies the intra prediction image Pred_Intra as the prediction image Pred to the adder 1031 and the subtractor 1032 and also predicts the prediction index PI supplied from the intra prediction image generation unit 1025. The parameter PP is supplied to the variable length code encoding unit 1022. On the other hand, when the inter prediction is selected, the prediction scheme control unit 1028 supplies the inter prediction image Pred_Inter as the prediction image Pred to the adder 1031 and the subtracter 1032 and the reference image index supplied from the inter prediction image generation unit 1026. RI and an estimated motion vector index PMVI and a motion vector residual MVD supplied from a motion vector redundancy deletion unit 1029 (described later) are supplied as prediction parameters PP to a variable length code encoding unit.
 予測方式制御部1028にて選択された予測画像Predを、符号化対象画像から減算することによって、減算器1032にて予測残差Dが生成される。減算器1032にて生成された予測残差Dは、上述したとおり、変換・量子化部1021によってDCT変換/量子化される。一方、予測方式制御部1028にて選択された予測画像Predを、逆量子化・逆変換部1023にて生成された予測残差Dに加算することによって、加算器1031にて局所復号画像Pが生成される。加算器1031にて生成された局所復号画像Pは、デブロッキングフィルタ1033および適応フィルタ1034を経由したのち、フィルタ済復号画像P_FLとしてバッファメモリ1024に格納され、インター予測における参照画像として利用される。 The prediction residual D is generated by the subtracter 1032 by subtracting the prediction image Pred selected by the prediction method control unit 1028 from the encoding target image. The prediction residual D generated by the subtracter 1032 is DCT transformed / quantized by the transform / quantization unit 1021 as described above. On the other hand, by adding the prediction image Pred selected by the prediction method control unit 1028 to the prediction residual D generated by the inverse quantization / inverse transformation unit 1023, the adder 1031 generates a local decoded image P. Generated. The local decoded image P generated by the adder 1031 passes through the deblocking filter 1033 and the adaptive filter 1034, and is then stored in the buffer memory 1024 as a filtered decoded image P_FL and used as a reference image in inter prediction.
 なお、動きベクトル冗長性削除部1029は、動きベクトル検出部1027によって検出された動きベクトルmvにおける冗長性を削除する。具体的には、(1)動きベクトルmvの推定に用いる推定方法を選択し、(2)選択した推定方法に従って推定動きベクトルpmvを導出し、(3)動きベクトルmvから推定動きベクトルpmvを減算することにより動きベクトル残差MVDを生成する。動きベクトル冗長性削除部1029は、生成した動きベクトル残差MVDを、選択した推定方法を示す推定動きベクトルインデックスPMVIと共に、予測方式制御部1028に供給する。 The motion vector redundancy deletion unit 1029 deletes the redundancy in the motion vector mv detected by the motion vector detection unit 1027. 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 1029 supplies the generated motion vector residual MVD to the prediction method control unit 1028 together with the estimated motion vector index PMVI indicating the selected estimation method.
 デブロッキングフィルタ1033は、復号画像Pにおけるブロック境界、またはマクロブロック境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、復号画像Pにおける当該ブロック境界、または当該マクロブロック境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該マクロブロック境界付近の画像の平滑化を行う。デブロッキングフィルタ1033によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、適応フィルタ1034に出力される。 The deblocking filter 1033 determines 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 or the macroblock boundary in the decoded image P is smaller than a predetermined threshold value. By performing deblocking processing on the macroblock boundary, an image near the block boundary or the macroblock boundary is smoothed. The image that has been deblocked by the deblocking filter 1033 is output to the adaptive filter 1034 as a deblocked decoded image P_DB.
 適応フィルタ1034は、デブロッキングフィルタ1033から供給されるデブロック済復号画像P_DBに対して、適応的なフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ1034によりフィルタ処理が施されたフィルタ済復号画像P_FLは、バッファメモリ1024に格納される。 The adaptive filter 1034 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 1033. The filtered decoded image P_FL that has been filtered by the adaptive filter 1034 is stored in the buffer memory 1024.
 なお、ここでは、符号化データ#1001が図47に示すデータ構造を有する場合に対応した動画像符号化装置1002の構成について説明したが、動画像符号化装置1002の構成はこれに限定されない。すなわち、各種処理の処理単位を適宜変更することによって、動画像符号化装置1002を図50に示すデータ構造を有する符号化データ#1001に対応させることができる。
<<応用例>>
 上述した動画像符号化装置2,1002及び動画像復号装置1,1001は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。なお、以下では、例示的に、動画像符号化装置2及び動画像復号装置1について説明するが、動画像符号化装置1002及び動画像復号装置1001についても同様である。
Here, the configuration of moving image encoding device 1002 corresponding to the case where encoded data # 1001 has the data structure shown in FIG. 47 has been described, but the configuration of moving image encoding device 1002 is not limited to this. That is, by appropriately changing the processing unit of various processes, the moving picture encoding apparatus 1002 can be made to correspond to the encoded data # 1001 having the data structure shown in FIG.
<< Application example >>
The above-described moving image encoding devices 2 and 1002 and moving image decoding devices 1 and 1001 can be used by being mounted on various devices that transmit, receive, record, and reproduce moving images. The moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like. In the following, the moving image encoding device 2 and the moving image decoding device 1 will be described as an example, but the same applies to the moving image encoding device 1002 and the moving image decoding device 1001.
 まず、上述した動画像符号化装置2及び動画像復号装置1を、動画像の送信及び受信に利用できることを、図51を参照して説明する。 First, it will be described with reference to FIG. 51 that the above-described moving picture encoding apparatus 2 and moving picture decoding apparatus 1 can be used for transmission and reception of moving pictures.
 図51の(a)は、動画像符号化装置2を搭載した送信装置PROD_Aの構成を示したブロック図である。図51の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_A1として利用される。 FIG. 51A is a block diagram illustrating a configuration of a transmission device PROD_A in which the moving image encoding device 2 is mounted. As illustrated in (a) of FIG. 51, the transmission device PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image and the encoded data obtained by the encoding unit PROD_A1. Thus, a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided. The moving image encoding apparatus 2 described above is used as the encoding unit PROD_A1.
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図51の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。 The transmission device PROD_A is a camera PROD_A4 that captures a moving image, a recording medium PROD_A5 that records the moving image, an input terminal PROD_A6 that inputs the moving image from the outside, as a supply source of the moving image input to the encoding unit PROD_A1. An image processing unit A7 that generates or processes an image may be further provided. In FIG. 51A, a configuration in which all of these are provided in the transmission device PROD_A is illustrated, but a part may be omitted.
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。 The recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 according to the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
 図51の(b)は、動画像復号装置1を搭載した受信装置PROD_Bの構成を示したブロック図である。図51の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した動画像復号装置1は、この復号部PROD_B3として利用される。 FIG. 51B is a block diagram illustrating a configuration of a receiving device PROD_B in which the moving image decoding device 1 is mounted. As illustrated in FIG. 51 (b), the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator. A decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2. The moving picture decoding apparatus 1 described above is used as the decoding unit PROD_B3.
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図51の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。 The receiving device PROD_B has a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3. PROD_B6 may be further provided. FIG. 51B illustrates a configuration in which all of these are provided in the receiving device PROD_B, but some of them may be omitted.
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。 The recording medium PROD_B5 may be used for recording a non-encoded moving image, or may be encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。 Note that the transmission medium for transmitting the modulation signal may be wireless or wired. Further, the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。 For example, a terrestrial digital broadcast broadcasting station (broadcasting equipment or the like) / receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting. Further, a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
 また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線又は有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。 Also, a server (workstation etc.) / Client (television receiver, personal computer, smart phone etc.) such as VOD (Video On Demand) service and video sharing service using the Internet is a transmitting device for transmitting and receiving modulated signals by communication. This is an example of PROD_A / reception device PROD_B (usually, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN). Here, the personal computer includes a desktop PC, a laptop PC, and a tablet PC. The smartphone also includes a multi-function mobile phone terminal.
 なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。 In addition to the function of decoding the encoded data downloaded from the server and displaying it on the display, the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
 次に、上述した動画像符号化装置2及び動画像復号装置1を、動画像の記録及び再生に利用できることを、図52を参照して説明する。 Next, it will be described with reference to FIG. 52 that the moving picture encoding apparatus 2 and the moving picture decoding apparatus 1 described above can be used for recording and reproduction of moving pictures.
 図52の(a)は、上述した動画像符号化装置2を搭載した記録装置PROD_Cの構成を示したブロック図である。図52の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_C1として利用される。 FIG. 52 (a) is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described moving picture encoding apparatus 2 is mounted. As shown in (a) of FIG. 52, the recording device PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M. A writing unit PROD_C2 for writing. The moving image encoding apparatus 2 described above is used as the encoding unit 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に内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 The recording medium PROD_M may be of a type built in the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部C6を更に備えていてもよい。図52の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。 The recording device PROD_C is a camera PROD_C3 that captures moving images as a supply source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and reception for receiving moving images. The unit PROD_C5 and an image processing unit C6 that generates or processes an image may be further provided. FIG. 52A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but a part of the configuration may be omitted.
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。 The receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
 このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4又は受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5又は画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3又は受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。 Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is a main supply source of moving images). . In addition, a camcorder (in this case, the camera PROD_C3 is a main source of moving images), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images), a smartphone (in this case In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main supply source of moving images) is also an example of such a recording device PROD_C.
 図52の(b)は、上述した動画像復号装置1を搭載した再生装置PROD_Dの構成を示したブロックである。図52の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置1は、この復号部PROD_D2として利用される。 FIG. 52 (b) is a block diagram showing a configuration of a playback device PROD_D in which the above-described video decoding device 1 is mounted. As shown in (b) of FIG. 52, the playback device PROD_D reads the moving image by decoding the read data PROD_D1 for reading the encoded data written on the recording medium PROD_M and the encoded data read by the read unit PROD_D1. And a decoding unit PROD_D2 to be obtained. The moving picture decoding apparatus 1 described above is used as the decoding unit PROD_D2.
 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 Note that the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory, It may be of a type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図52の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the playback device PROD_D has a display PROD_D3 that displays a moving image, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image as a supply destination of the moving image output by the decoding unit PROD_D2. PROD_D5 may be further provided. FIG. 52B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of the configurations may be omitted.
  なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。 The transmission unit PROD_D5 may transmit an unencoded moving image, or transmits encoded data encoded by a transmission encoding method different from the recording encoding method. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image with an encoding method for transmission between the decoding unit PROD_D2 and the transmission unit 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の一例である。 Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main supply destination of moving images). . In addition, a television receiver (in this case, the display PROD_D3 is a main supply destination of moving images), a digital signage (also referred to as an electronic signboard or an electronic bulletin board), and the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images. Desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main video image supply destination), laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a moving image) A smartphone (which is a main image supply destination), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination), and the like are also examples of such a playback device PROD_D.
 (実施形態2~4のまとめ)
 このように、フィルタ係数が適応的に設定される線形フィルタ121を備えた適応フィルタ100において、線形フィルタ121の出力画像における対象画素の画素値と線形フィルタ121の入力画像における対象画素の画素値との差である変更量Δsをトランケートするトランケート手段を備えている。
(Summary of Embodiments 2 to 4)
As described above, in the adaptive filter 100 including the linear filter 121 in which filter coefficients are adaptively set, the pixel value of the target pixel in the output image of the linear filter 121 and the pixel value of the target pixel in the input image of the linear filter 121 Truncating means for truncating the change amount Δs, which is the difference between the two, is provided.
 (HEVCとの対応について)
 なお、上記実施形態における、LCU(最大コーディングユニット:Largest Coding Unit)は、H.264/MPEG-4 AVCの後継規格として提案されているHEVC(High Efficiency Video Coding)の符号化ツリー(Coding Tree)のrootに相当し、リーフCUは、HEVCのCU(コーディングユニット:Coding Unit、コーディングツリーのleafと呼ばれることもある)に相当する。また、上記実施形態における、PUおよびTUは、それぞれ、HEVCにおける、予測ツリー(Prediction Tree)および変換ツリー(transform tree)に相当する。また、上記実施形態における、PUのパーティションは、HEVCにおけるPU(Prediction Unit)に相当する。また、上記実施形態において、TUを分割して得られるブロックは、HEVCにおけるTU(Transformation Unit)に相当する。
(About correspondence with HEVC)
In the above embodiment, LCU (Largest Coding Unit) is H.264. It corresponds to the root of a coding tree (Coding Tree) of HEVC (High Efficiency Video Coding) proposed as a successor to H.264 / MPEG-4 AVC, and a leaf CU is a CU (Coding Unit, coding) It is also called the leaf of the tree). Moreover, PU and TU in the said embodiment are respectively equivalent to the prediction tree (Prediction Tree) and transformation tree (transform tree) in HEVC. Moreover, the partition of PU in the said embodiment is corresponded to PU (Prediction Unit) in HEVC. In the above embodiment, a block obtained by dividing a TU corresponds to a TU (Transformation Unit) in HEVC.
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention.
 本発明は、画像にフィルタリングを行う画像フィルタ装置に好適に用いることができる。また、符号化データを復号する復号装置、および、符号化データを生成する符号化装置に好適に用いることができる。また、動画像符号化装置等の画像符号化装置、及び、動画像復号装置等の画像復号装置に好適に利用することができる。 The present invention can be suitably used for an image filter device that filters an image. Further, the present invention can be suitably used for a decoding device that decodes encoded data and an encoding device that generates encoded data. Further, it can be suitably used for an image encoding device such as a moving image encoding device and an image decoding device such as a moving image decoding device.
 1         動画像復号装置(復号装置)
 12        予測画像生成部(予測画像生成手段)
 17        適応フィルタ(画像フィルタ装置)
 171       領域特性値算出部(特性値算出手段)
 171a      活性度算出部
 171b      画素値参照部
 172       領域分類部(分類手段)
 173       フィルタ処理部(フィルタ手段)
 2         動画像符号化装置(符号化装置)
 21        予測画像生成部(予測画像生成手段)
 27        適応フィルタ(画像フィルタ装置)
 271       領域特性値算出部(特性値算出手段)
 271a      活性度算出部
 271b      画素値参照部
 272       領域分類部(分類手段)
 273       フィルタ処理部(フィルタ手段)
 100、200、300、42    適応フィルタ(復号装置側のフィルタ装置)
 110、210、310       フィルタ設定部
 120、220、320       フィルタ演算部
 100’、200’、300’、34 適応フィルタ(符号化装置側のフィルタ装置)
 110’、210’、310’    フィルタ設定部
 120’、220’、320’    フィルタ演算部
 311               空間フィルタ係数復号部
 312               オフセットテーブル復号部
 311a              適応フィルタ係数決定部
 311b              空間フィルタ係数符号化部
 312b              オフセットテーブル符号化部
 1001                 動画像復号装置(復号装置)
 1002                 動画像符号化装置
 
1 Video decoding device (decoding device)
12 Predictive image generation unit (predictive image generation means)
17 Adaptive filter (image filter device)
171 Area characteristic value calculation unit (characteristic value calculation means)
171a Activity calculation unit 171b Pixel value reference unit 172 Region classification unit (classification means)
173 Filter processing unit (filter means)
2 Video encoding device (encoding device)
21 Predicted image generating unit (predicted image generating means)
27 Adaptive filter (image filter device)
271 Area characteristic value calculation unit (characteristic value calculation means)
271a Activity calculation unit 271b Pixel value reference unit 272 Region classification unit (classification means)
273 Filter processing unit (filter means)
100, 200, 300, 42 Adaptive filter (filter device on the decoding device side)
110, 210, 310 Filter setting unit 120, 220, 320 Filter operation unit 100 ', 200', 300 ', 34 Adaptive filter (filter device on the encoding device side)
110 ′, 210 ′, 310 ′ Filter setting unit 120 ′, 220 ′, 320 ′ Filter operation unit 311 Spatial filter coefficient decoding unit 312 Offset table decoding unit 311a Adaptive filter coefficient determination unit 311b Spatial filter coefficient encoding unit 312b Offset table code 1001 moving picture decoding apparatus (decoding apparatus)
1002 Moving picture encoding apparatus

Claims (25)

  1.  複数の単位領域から構成される入力画像に作用するフィルタ手段と、
     上記複数の単位領域の各々について、上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、
     各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域、または、上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている、
    ことを特徴とする画像フィルタ装置。
    Filter means for acting on an input image composed of a plurality of unit regions;
    For each of the plurality of unit areas, a characteristic value calculating means for calculating a characteristic value representing an image characteristic of the input image;
    Depending on the value of the characteristic value for the unit area calculated by the characteristic value calculation means, each unit area is either a filter-on area in which the filter means is applied or a filter-off area in which the filter means is not applied. Classification means for classifying
    An image filter device.
  2.  上記分類手段は、上記フィルタオン領域に属する各単位領域を、上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、複数のタイプの何れかに更に分類し、
     上記フィルタ手段は、上記フィルタオン領域に属する各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出する、
    ことを特徴とする請求項1に記載の画像フィルタ装置。
    The classification means further classifies each unit area belonging to the filter-on area into any of a plurality of types according to the value of the characteristic value for the unit area calculated by the characteristic value calculation means,
    The filter means calculates a pixel value of each pixel in each unit region belonging to the filter-on region using a filter coefficient group set for a type including the pixel;
    The image filter device according to claim 1.
  3.  上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の活性度を算出する、
    ことを特徴とする請求項1または2に記載の画像フィルタ装置。
    The characteristic value calculation means calculates the activity of the input image in the unit area as a characteristic value for each unit area.
    The image filter device according to claim 1, wherein the image filter device is an image filter device.
  4.  上記特性値算出手段は、各単位領域において、その近傍全体が該単位領域に含まれる画素からなる内部領域に属する各画素の活性度を、該画素の上記近傍に含まれる画素の画素値を参照して導出したうえで、内部領域に属する各画素の活性度から該単位領域についての活性度を算出する、
    ことを特徴とする請求項3に記載の画像フィルタ装置。
    The characteristic value calculation means refers to the degree of activity of each pixel belonging to the internal region, the entire neighborhood of which is composed of pixels included in the unit region, and the pixel value of the pixel included in the vicinity of the pixel. And then calculating the activity of the unit region from the activity of each pixel belonging to the internal region.
    The image filter device according to claim 3.
  5.  上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の画素値の平均を算出する、
    ことを特徴とする請求項1または2に記載の画像フィルタ装置。
    The characteristic value calculation means calculates an average of pixel values of the input image in the unit area as a characteristic value for each unit area.
    The image filter device according to claim 1, wherein the image filter device is an image filter device.
  6.  上記特性値算出手段は、各単位領域について、互いに算出方法の異なる複数の特性値を算出する、
    ことを特徴とする請求項1または2に記載の画像フィルタ装置。
    The characteristic value calculation means calculates a plurality of characteristic values with different calculation methods for each unit region.
    The image filter device according to claim 1, wherein the image filter device is an image filter device.
  7.  上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の画素値の平均と、該単位領域における上記入力画像の画素値の分散とを算出する、
    ことを特徴とする請求項6に記載の画像フィルタ装置。
    The characteristic value calculating means calculates an average of pixel values of the input image in the unit area and a variance of pixel values of the input image in the unit area as characteristic values for each unit area.
    The image filter device according to claim 6.
  8.  上記特性値算出手段は、各単位領域についての特性値として、該単位領域における上記入力画像の垂直方向の活性度と、該単位領域における上記入力画像の水平方向の活性度とを算出する、
    ことを特徴とする請求項6に記載の画像フィルタ装置。
    The characteristic value calculation means calculates the vertical activity of the input image in the unit area and the horizontal activity of the input image in the unit area as characteristic values for each unit area.
    The image filter device according to claim 6.
  9.  上記分類手段は、単位領域を1つ以上含む所定の単位毎にフィルタ処理のオンオフを指定するオンオフフラグを外部から取得し、当該オンオフフラグがオンを指定している単位に含まれる単位領域を、上記フィルタオン領域および上記フィルタオフ領域の何れかに分類する、
    ことを特徴とする請求項1から8の何れか1項に記載の画像フィルタ装置。
    The classification means obtains an on / off flag for designating on / off of the filtering process for each predetermined unit including one or more unit areas from outside, and unit areas included in the unit for which the on / off flag designates on, Classify into either the filter-on region or the filter-off region;
    The image filter device according to claim 1, wherein the image filter device is an image filter device.
  10.  上記オンオフフラグに関わる上記所定の単位は、外部より取得される階層指定情報によって階層的に指定されるものであり、上記単位領域は、最小符号化単位以下かつ4画素以上の画素から構成される領域であって、上記階層指定情報によらずに定められるものである、
    ことを特徴とする請求項9に記載の画像フィルタ装置。
    The predetermined unit related to the on / off flag is hierarchically specified by hierarchical specification information acquired from the outside, and the unit area is composed of pixels of the minimum encoding unit and 4 pixels or more. An area that is determined without depending on the hierarchy designation information.
    The image filter device according to claim 9.
  11.  符号化データを復号し、フィルタ後の復号画像を生成する復号装置であって、
     請求項1から10の何れか1項に記載の画像フィルタ装置と、
     各単位領域における予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
    を備え、
     上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と、上記符号化データから復号された残差画像とを加算することによって得られた復号画像を入力画像とし、出力画像として上記フィルタ後の復号画像を生成するものである、
    ことを特徴とする復号装置。
    A decoding device that decodes encoded data and generates a decoded image after filtering,
    The image filter device according to any one of claims 1 to 10,
    Predicted image generation means for generating a predicted image in each unit region with reference to the output image generated by the image filter device;
    With
    The image filter device uses, as an input image, a decoded image obtained by adding the predicted image generated by the predicted image generation unit and a residual image decoded from the encoded data as an output image. Generate a decoded image after filtering.
    A decoding device characterized by the above.
  12.  符号化対象画像と予測画像との残差画像を符号化することによって符号化データを生成する符号化装置であって、
     請求項1から10の何れか1項に記載の画像フィルタ装置と、
     各単位領域における上記予測画像を、上記画像フィルタ装置が生成した出力画像を参照して生成する予測画像生成手段と、
    を備え、
     上記画像フィルタ装置は、上記予測画像生成手段によって生成された予測画像と上記残差画像とを加算することによって得られる復号画像を入力画像とし、出力画像を生成するものである、
    ことを特徴とする符号化装置。
    An encoding device that generates encoded data by encoding a residual image between an encoding target image and a predicted image,
    The image filter device according to any one of claims 1 to 10,
    Predicted image generation means for generating the predicted image in each unit region with reference to the output image generated by the image filter device;
    With
    The image filter device generates an output image using a decoded image obtained by adding the prediction image generated by the prediction image generation unit and the residual image as an input image,
    An encoding apparatus characterized by that.
  13.  上記フィルタ手段によって用いられるフィルタ係数群は、上記フィルタオン領域に含まれる各単位領域における、上記符号化対象画像と上記出力画像との相違を最小化するように定められたものである、
    ことを特徴とする請求項12に記載の符号化装置。
    The filter coefficient group used by the filter means is determined so as to minimize the difference between the encoding target image and the output image in each unit region included in the filter-on region.
    The encoding apparatus according to claim 12.
  14.  複数の単位領域から構成される入力画像に作用するフィルタ手段と、上記複数の単位領域の各々について上記入力画像の画像特性を表す特性値を算出する特性値算出手段と、各単位領域を上記特性値算出手段によって算出された該単位領域についての特性値の値に応じて、上記フィルタ手段を作用させるフィルタオン領域または上記フィルタ手段を作用させないフィルタオフ領域の何れかに分類する分類手段と、を備えている画像フィルタ装置によって参照される符号化データのデータ構造であって、
     上記フィルタ手段によって用いられるフィルタ係数群を含んでいる、
    ことを特徴とする符号化データのデータ構造。
    Filter means acting on an input image composed of a plurality of unit areas; characteristic value calculation means for calculating a characteristic value representing the image characteristics of the input image for each of the plurality of unit areas; and Classifying means for classifying into either a filter-on region in which the filter means is applied or a filter-off region in which the filter means is not operated according to the value of the characteristic value for the unit area calculated by the value calculation means, A data structure of encoded data referred to by an image filter device comprising:
    Including filter coefficient groups used by the filter means,
    A data structure of encoded data characterized by the above.
  15.  入力画像を構成する複数の単位領域の各々について、当該入力画像の画素値の平均を算出する算出手段と、
     各単位領域を、上記算出手段によって算出された該単位領域についての画素値の平均に応じて、複数のタイプの何れかに分類する分類手段と、
     各単位領域内の各画素の画素値を、該画素を含むタイプに対して設定されたフィルタ係数群を用いて算出するフィルタ手段と、
    を備えていることを特徴とする画像フィルタ装置。
    For each of a plurality of unit areas constituting the input image, calculation means for calculating the average of the pixel values of the input image;
    Classifying means for classifying each unit area into one of a plurality of types according to the average of the pixel values for the unit area calculated by the calculating means,
    Filter means for calculating a pixel value of each pixel in each unit area using a filter coefficient group set for a type including the pixel;
    An image filter device comprising:
  16.  フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、
     各単位領域の領域特性の値を算出する領域特性算出手段を備え、
     上記線形フィルタは、各単位領域に属する各画素を対象とするフィルタ演算を、上記領域特性に依存するオフセットであって、上記領域特性算出手段が算出した該単位領域の領域特性の値に応じたオフセットと、上記領域特性に依存しないフィルタ係数群とを利用して実行する、
    ことを特徴とするフィルタ装置。
    In a filter device comprising a linear filter in which filter coefficients are adaptively set,
    A region characteristic calculation means for calculating the value of the region characteristic of each unit region is provided,
    The linear filter is an offset that depends on the region characteristic for performing a filter operation on each pixel belonging to each unit region, and is in accordance with the region characteristic value of the unit region calculated by the region characteristic calculating unit. Execute using offset and filter coefficient group that does not depend on the region characteristics,
    And a filter device.
  17.  上記領域特性は、色差成分の種別に応じた値をもち、
     上記線形フィルタは、色差成分の種別に応じたオフセットを利用して上記フィルタ演算を実行する、
    ことを特徴とする請求項16に記載のフィルタ装置。
    The region characteristic has a value corresponding to the type of the color difference component,
    The linear filter performs the filter operation using an offset according to the type of color difference component.
    The filter device according to claim 16.
  18.  フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、
     上記線形フィルタの出力画像における対象画素の画素値と上記線形フィルタの入力画像における対象画素の画素値との差である変更量をトランケートするトランケート手段を備えている、
    ことを特徴とするフィルタ装置。
    In a filter device comprising a linear filter in which filter coefficients are adaptively set,
    Truncating means for truncating the amount of change that is the difference between the pixel value of the target pixel in the output image of the linear filter and the pixel value of the target pixel in the input image of the linear filter;
    And a filter device.
  19.  上記変更量をトランケートするか否かを示すフラグを復号するフラグ復号手段と、
     上記線形フィルタの出力画像を、上記変更量をトランケートして出力するか、上記変更量をトランケートせずに出力するかを、上記フラグ復号手段によって復号された上記フラグの値に応じて切り替えるスイッチと、を更に備えている、
    ことを特徴とする請求項18に記載のフィルタ装置。
    Flag decoding means for decoding a flag indicating whether to truncate the change amount;
    A switch that switches whether to output the output image of the linear filter by truncating the change amount or outputting the change amount without truncation according to the value of the flag decoded by the flag decoding means; , Further comprising
    The filter device according to claim 18.
  20.  各単位領域の領域特性を算出する領域特性算出手段と、
     各単位領域に属する画素を出力画素とするフィルタ処理を実行する際に上記変更量をトランケートするために用いる閾値を、上記領域特性算出手段によって算出された、該単位領域に領域特性に応じて決定する閾値決定手段と、を更に備えている、
    ことを特徴とする請求項18又は19に記載のフィルタ装置。
    Area characteristic calculating means for calculating area characteristics of each unit area;
    A threshold value used to truncate the change amount when executing a filtering process using a pixel belonging to each unit area as an output pixel is determined according to the area characteristic of the unit area calculated by the area characteristic calculation unit. Threshold value determining means for
    The filter device according to claim 18 or 19, wherein
  21.  上記領域特性と上記閾値とを関連付けて記録した閾値テーブルを復号する閾値テーブル復号手段を更に備えており、
     上記閾値決定手段は、上記閾値テーブルを参照して閾値を決定する、
    ことを特徴とする請求項20に記載のフィルタ装置。
    Threshold table decoding means for decoding the threshold table recorded in association with the region characteristics and the threshold,
    The threshold value determination means determines the threshold value with reference to the threshold value table;
    The filter device according to claim 20.
  22.  フィルタ係数が適応的に設定される線形フィルタを備えたフィルタ装置において、
     第1領域特性に依存する第1フィルタ係数群を、少なくとも1つ、対応する第1領域特性の値に関連付けて記録した第1フィルタ係数テーブル、及び、第2領域特性に依存する第2フィルタ係数群を、少なくとも1つ、対応する第2領域特性の値に関連付けて記録した第2フィルタ係数テーブルを復号する復号手段と、
     各単位領域の第1領域特性及び第2領域特性の値を算出する領域特性算出手段とを備え、
     上記線形フィルタは、各単位領域に属する各画素を対象画素とするフィルタ演算であって、上記第1フィルタ係数テーブルに記録された第1フィルタ係数群のうち、上記領域特性算出手段が算出した該単位領域の第1領域特性の値に対応した第1フィルタ係数群、及び、上記第2フィルタ係数テーブルに記録された第2フィルタ係数群のうち、上記領域特性算出手段が算出した該単位領域の第2領域特性の値に対応した第2フィルタ係数群を利用したフィルタ演算を実行する、
    ことを特徴とするフィルタ装置。
    In a filter device comprising a linear filter in which filter coefficients are adaptively set,
    A first filter coefficient table in which at least one first filter coefficient group depending on the first area characteristic is recorded in association with a value of the corresponding first area characteristic, and a second filter coefficient depending on the second area characteristic Decoding means for decoding a second filter coefficient table in which at least one group is recorded in association with a corresponding second region characteristic value;
    Area characteristic calculating means for calculating values of the first area characteristic and the second area characteristic of each unit area,
    The linear filter is a filter operation using each pixel belonging to each unit region as a target pixel, and the region characteristic calculation unit calculates the first filter coefficient group recorded in the first filter coefficient table. Of the first filter coefficient group corresponding to the value of the first area characteristic of the unit area and the second filter coefficient group recorded in the second filter coefficient table, the unit area calculated by the area characteristic calculating means Performing a filter operation using the second filter coefficient group corresponding to the value of the second region characteristic;
    And a filter device.
  23.  上記線形フィルタにおけるフィルタ演算に上記第2フィルタ係数群を利用するか否かを示すフラグを復号するフラグ復号手段と、
     上記線形フィルタにおける上記第1フィルタ係数群及び上記第2フィルタ係数群を利用したフィルタ演算により得られる出力画像を外部に出力するか、上記線形フィルタにおける上記第1フィルタ係数群のみを利用したフィルタ演算により得られる出力画像を外部に出力するかを、上記フラグ復号手段によって復号された上記フラグの値に応じて切り替えるスイッチと、を更に備えている、
    ことを特徴とする請求項22に記載のフィルタ装置。
    Flag decoding means for decoding a flag indicating whether or not to use the second filter coefficient group for filter operation in the linear filter;
    An output image obtained by a filter operation using the first filter coefficient group and the second filter coefficient group in the linear filter is output to the outside, or a filter operation using only the first filter coefficient group in the linear filter A switch for switching whether to output the output image obtained in accordance with the value of the flag decoded by the flag decoding means,
    The filter device according to claim 22.
  24.  画像を復号する復号装置であって、復号画像に作用させる適応フィルタとして請求項16から23までの何れか1項に記載のフィルタ装置を備えた復号装置。 A decoding device for decoding an image, comprising the filter device according to any one of claims 16 to 23 as an adaptive filter that acts on the decoded image.
  25.  画像を符号化する符号化装置であって、局所復号画像に作用させるフィルタとして請求項16から23までの何れか1項に記載のフィルタ装置を備えた符号化装置。
     
    An encoding apparatus that encodes an image, the encoding apparatus including the filter device according to any one of claims 16 to 23 as a filter that acts on a locally decoded image.
PCT/JP2011/079232 2010-12-17 2011-12-16 Image filter device, filter device, decoder, encoder, and data structure WO2012081706A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2010-282195 2010-12-17
JP2010282195 2010-12-17
JP2011053610 2011-03-10
JP2011-053610 2011-03-10

Publications (1)

Publication Number Publication Date
WO2012081706A1 true WO2012081706A1 (en) 2012-06-21

Family

ID=46244798

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/079232 WO2012081706A1 (en) 2010-12-17 2011-12-16 Image filter device, filter device, decoder, encoder, and data structure

Country Status (1)

Country Link
WO (1) WO2012081706A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014123251A (en) * 2012-12-21 2014-07-03 Nippon Hoso Kyokai <Nhk> Digital signal processing device and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03270378A (en) * 1990-03-19 1991-12-02 Victor Co Of Japan Ltd Data compressing device
JP2006101397A (en) * 2004-09-30 2006-04-13 Victor Co Of Japan Ltd Moving image encoding device and moving image encoding program
WO2008084745A1 (en) * 2007-01-09 2008-07-17 Panasonic Corporation Image coding apparatus and image decoding apparatus
WO2009110559A1 (en) * 2008-03-07 2009-09-11 株式会社 東芝 Dynamic image encoding/decoding device
WO2009110160A1 (en) * 2008-03-07 2009-09-11 株式会社 東芝 Dynamic image encoding/decoding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03270378A (en) * 1990-03-19 1991-12-02 Victor Co Of Japan Ltd Data compressing device
JP2006101397A (en) * 2004-09-30 2006-04-13 Victor Co Of Japan Ltd Moving image encoding device and moving image encoding program
WO2008084745A1 (en) * 2007-01-09 2008-07-17 Panasonic Corporation Image coding apparatus and image decoding apparatus
WO2009110559A1 (en) * 2008-03-07 2009-09-11 株式会社 東芝 Dynamic image encoding/decoding device
WO2009110160A1 (en) * 2008-03-07 2009-09-11 株式会社 東芝 Dynamic image encoding/decoding method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Test Model under Consideration Output Document (draft007), Joint Collaborative Team on Video Coding", (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11, JCTVC-B205, 2ND MEETING, October 2010 (2010-10-01), GENEVA, CH, pages 1 - 12, 168 *
MARTA KARCZEWICZ ET AL.: "Video coding technology proposal by Qualcomm Inc.", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11, JCTVC-A121, 1ST MEETING, April 2010 (2010-04-01), DRESDEN, DE, pages 1 - 25 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014123251A (en) * 2012-12-21 2014-07-03 Nippon Hoso Kyokai <Nhk> Digital signal processing device and program

Similar Documents

Publication Publication Date Title
JP7200320B2 (en) Image filter device, filter method and moving image decoding device
US11627337B2 (en) Image decoding device
JP6190361B2 (en) Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device
WO2013065702A1 (en) Arithmetic decoding device, image decoding device, arithmetic coding device, image coding device, and arithmetic decoding method
JP5551274B2 (en) Image filter device
WO2012077719A1 (en) Image decoding device and image coding device
WO2013046990A1 (en) Offset decoding apparatus, offset encoding apparatus, image filter apparatus, and data structure
JP7139144B2 (en) image filter device
WO2019065488A1 (en) Image decoding device and image encoding device
JP2013192118A (en) Arithmetic decoder, image decoder, arithmetic encoder, and image encoder
JP2013141094A (en) Image decoding device, image encoding device, image filter device, and data structure of encoded data
JP2013223050A (en) Filtering device, decoding apparatus and encoding apparatus
WO2012121352A1 (en) Video decoding device, video coding device, and data structure
WO2012137890A1 (en) Image filter apparatus, decoder apparatus, encoder apparatus, and data structure
WO2012090962A1 (en) Image decoding device, image encoding device, data structure of encoded data, arithmetic decoding device, and arithmetic encoding device
WO2012081706A1 (en) Image filter device, filter device, decoder, encoder, and data structure
AU2015264943B2 (en) Image decoding device, image encoding device, and data structure of encoded data
WO2013018737A1 (en) Image filter device, decoding device, encoding device, and data structure
WO2019139012A1 (en) Image filter device, image decoder, image encoder, and data structure
JP2013251827A (en) Image filter device, image decoding device, image encoding device, and data structure
WO2012043676A1 (en) Decoding device, encoding device, and data structure
WO2012043766A1 (en) Image decoding device, image encoding device, and data structure for encoded data

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

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP