WO2020008910A1 - 符号化装置、符号化方法、復号装置、及び、復号方法 - Google Patents

符号化装置、符号化方法、復号装置、及び、復号方法 Download PDF

Info

Publication number
WO2020008910A1
WO2020008910A1 PCT/JP2019/024643 JP2019024643W WO2020008910A1 WO 2020008910 A1 WO2020008910 A1 WO 2020008910A1 JP 2019024643 W JP2019024643 W JP 2019024643W WO 2020008910 A1 WO2020008910 A1 WO 2020008910A1
Authority
WO
WIPO (PCT)
Prior art keywords
class
merge
classes
unit
classification
Prior art date
Application number
PCT/JP2019/024643
Other languages
English (en)
French (fr)
Inventor
優 池田
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Publication of WO2020008910A1 publication Critical patent/WO2020008910A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Definitions

  • the present technology relates to an encoding device, an encoding method, a decoding device, and a decoding method, and in particular, for example, an encoding device that reduces processing amount and improves encoding efficiency, and an encoding device.
  • TECHNICAL FIELD The present invention relates to a method, a decoding device, and a decoding method.
  • FVC Full Video Coding
  • HEVC High Efficiency Video Coding
  • ILF In Loop Filter
  • a bilateral filter Bilateral Filter
  • ALF Adaptive Loop Filter
  • an optimal merge pattern for merging classes is obtained for each merge class number, with each natural number value equal to or less than the original class number being the merge class number after class merge. Then, from among the optimal merge patterns for each number of merge classes, the merge pattern that minimizes the cost is determined as the adopted merge pattern to be adopted when performing the filter processing.
  • the encoding device and the decoding device may be independent devices, or may be internal blocks forming one device.
  • FIG. 4 is a diagram for describing an outline of a process of a class classification unit 10 that performs a GALF class classification.
  • FIG. 9 is a diagram illustrating how to determine the direction of GALF as a specified direction (inclination direction) of a target pixel.
  • FIG. 3 is a diagram for explaining classes obtained by GALF class classification.
  • 5 is a flowchart illustrating a GALF process that an encoding device that encodes an image has as one of the ILFs. It is a flowchart explaining a merge pattern determination process of step S21.
  • FIG. 9 is a diagram for describing an example of an expression format of a merge pattern.
  • FIG. 9 is a diagram illustrating an example of a merge pattern for each number of merge classes.
  • FIG. 3 is a diagram illustrating an example of a merge pattern transmitted from an encoding device to a decoding device.
  • FIG. 9 is a diagram illustrating a first example of a preset merge pattern.
  • FIG. 9 is a diagram illustrating a first example of a preset merge pattern.
  • FIG. 14 is a diagram illustrating a method of setting a merge pattern corresponding to a merge class number of 25 in which 25 initial classes obtained by GALF class classification are merged into 25 merge classes.
  • FIG. 10 is a diagram illustrating a method of setting a merge pattern corresponding to a merge class number of 20 in which 25 initial classes obtained by GALF class classification are merged into 20 merge classes.
  • FIG. 10 is a diagram illustrating a method of setting a merge pattern corresponding to a merge class number of 20 in which 25 initial classes obtained by GALF class classification are merged into 20 merge classes.
  • FIG. 14 is a diagram illustrating a method of setting a merge pattern corresponding to a merge class number of 15 in which 25 initial classes obtained by GALF class classification are merged into 15 merge classes.
  • FIG. 11 is a diagram illustrating a method of setting a merge pattern corresponding to a merge class number of 10, in which 25 initial classes obtained by GALF class classification are merged into 10 merge classes.
  • FIG. 11 is a diagram illustrating a method of setting a merge pattern corresponding to a merge class number of 5, in which 25 initial classes obtained by GALF class classification are merged into 5 merge classes.
  • FIG. 11 is a diagram illustrating a method of setting a merge pattern corresponding to three merge classes in which 25 initial classes obtained by GALF class classification are merged into three merge classes.
  • FIG. 11 is a diagram illustrating a method of setting a merge pattern corresponding to the number of merge classes of two in which 25 initial classes obtained by GALF class classification are merged into two merge classes.
  • FIG. 11 is a diagram for explaining a method of setting a merge pattern corresponding to a merge class number of 1, in which 25 initial classes obtained by GALF class classification are merged into one merge class.
  • FIG. 9 is a diagram illustrating a second example of a preset merge pattern.
  • FIG. 9 is a diagram illustrating a second example of a preset merge pattern.
  • FIG. 9 is a diagram illustrating class classification using ranking as a feature amount of a target pixel.
  • FIG. 9 is a diagram illustrating class classification using a pixel value as a feature amount of a target pixel.
  • FIG. 11 is a diagram illustrating class classification using reliability in a tilt direction as a feature amount of a target pixel. It is a figure explaining the last class calculated
  • FIG. 14 is a diagram illustrating a third example of a preset merge pattern.
  • FIG. 14 is a diagram illustrating a third example of a preset merge pattern.
  • FIG. 14 is a diagram illustrating a fourth example of a preset merge pattern.
  • FIG. 26 is a block diagram illustrating a configuration example of a class classification prediction filter to which the present technology is applied.
  • 9 is a flowchart illustrating an example of a class classification prediction process performed by a class classification prediction filter 110.
  • FIG. 1 is a block diagram illustrating an outline of an embodiment of an image processing system to which the present technology is applied.
  • 5 is a flowchart illustrating an outline of an encoding process of the encoding device 160. It is a flow chart explaining an outline of decoding processing of decoding device 170.
  • FIG. 39 is a block diagram illustrating a detailed configuration example of an encoding device 160.
  • 15 is a flowchart illustrating an example of an encoding process of the encoding device 160. It is a flowchart explaining the example of the prediction encoding process of step S206.
  • FIG. 35 is a block diagram illustrating a detailed configuration example of a decoding device 170.
  • 15 is a flowchart illustrating an example of a decoding process of the decoding device 170. It is a flowchart explaining the example of the prediction decoding process of step S305.
  • FIG. 3 is a block diagram illustrating a configuration example of an embodiment of a computer.
  • Reference 1 AVC standard ("Advanced video coding for generic audiovisual services", ITU-T H.264 (04/2017))
  • Reference 2 HEVC standard ("High efficiency video coding”, ITU-T H.265 (12/2016))
  • Reference 3 Algorithm description of Joint Exploration Test Model 7 (JEM7), 2017-08-19
  • the contents described in the above-mentioned documents are also the basis for judging support requirements.
  • Quad-Tree Block Structure described in Document 1 and QTBT Quad Tree Plus Binary Tree
  • Block Structure described in Document 3 Block Structure described in Document 3
  • the present technology can be used. It is within the disclosure range and meets the support requirements of the claims. Further, for example, similarly, technical terms such as parsing, syntax, and semantics are within the disclosure range of the present technology even if there is no direct description in the embodiment. Meet claims support requirements.
  • a “block” (not a block indicating a processing unit) used for description as a partial region of an image (picture) or a processing unit indicates an arbitrary partial region in a picture unless otherwise specified.
  • the size, shape, characteristics, and the like are not limited.
  • “block” includes TB (Transform Block), TU (Transform Unit), PB (Prediction Block), PU (Prediction Unit), SCU (Smallest Coding Unit), CU ( An arbitrary partial area (processing unit) such as Coding Unit, LCU (Largest Coding Unit), CTB (Coding Tree Block), CTU (Coding Tree Unit), conversion block, subblock, macroblock, tile, or slice included.
  • the block size may be specified directly, but also the block size may be specified indirectly.
  • the block size may be specified using identification information for identifying the size.
  • the block size may be specified by a ratio or a difference from the size of a reference block (for example, an LCU or an SCU).
  • a reference block for example, an LCU or an SCU.
  • the designation of the block size also includes designation of a range of block sizes (for example, designation of a range of allowable block sizes).
  • Encoded data is data obtained by encoding an image, for example, data obtained by orthogonally transforming and quantizing an image (residual thereof).
  • the pixel (its pixel value) as the i-th prediction tap used for prediction (calculation of a prediction formula) among the pixels of the first image is x i , the i-th tap coefficient is w i , and the second image
  • Tap coefficient w i which constitutes the prediction equation, the value y 'obtained by the prediction equation is obtained by statistically learning to minimize the error y'-y of the true value y.
  • tap coefficient learning As a method of learning tap coefficients (hereinafter also referred to as tap coefficient learning), there is a least square method.
  • tap coefficient learning a student image as student data (input x i to the prediction formula) corresponding to the first image to which the prediction formula is applied, and a prediction formula is applied to the first image.
  • the prediction process is a process of predicting a second image by applying a prediction formula to a first image.
  • a predicted value of the second image is obtained by performing a product-sum operation as an operation of a prediction equation using (pixel value of) the pixel of the first image.
  • Performing the sum-of-products operation using the first image can be referred to as a filtering process of applying a filter to the first image, and using the first image, the sum-of-products operation of the prediction formula (as the calculation of the prediction formula) Can be said to be a kind of filter processing.
  • the filter image means an image obtained as a result of the filtering process.
  • the second image (predicted value) obtained from the first image by the filtering process as the prediction process is a filtered image.
  • the prediction tap is information such as (a pixel value of) a pixel used in the calculation of the prediction formula, and is multiplied by a tap coefficient in the prediction formula.
  • the prediction tap includes, in addition to the pixel (the pixel value) itself, a value obtained from the pixel, for example, a sum or an average value of the pixels (the pixel value) in a certain block.
  • selecting a pixel or the like as a prediction tap used in the calculation of the prediction formula is equivalent to providing (distributing) a connection line for supplying an input signal to the tap of the digital filter. Selecting a pixel as a prediction tap used in the calculation of the expression is also referred to as “setting a prediction tap”.
  • Class classification means that pixels are classified (clustered) into one of a plurality of classes.
  • the class classification can be performed, for example, using (pixel values of) pixels in a peripheral area of the target pixel and coding information related to the target pixel.
  • the coding information related to the target pixel includes, for example, a quantization parameter used for quantization of the target pixel, DF (Deblocking Filter) information on a deblocking filter applied to the target pixel, and the like.
  • the DF information is, for example, information indicating which of the strong filter and the weak filter has been applied to the deblocking filter and which has not been applied.
  • the higher-order term is a term having a product of (two or more) prediction taps (pixels) among terms constituting a polynomial as a prediction equation.
  • the D-order term is a term having a product of D prediction taps among terms constituting a polynomial as a prediction equation.
  • the first-order term is a term having one prediction tap
  • the second-order term is a term having a product of two prediction taps.
  • the prediction taps taking the product may be the same prediction tap (pixel).
  • D-order coefficient means a tap coefficient constituting the D-order term.
  • D-th tap means a prediction tap (pixel as) constituting the D-th term.
  • a certain pixel may be a D-th tap and a D 'next tap different from the D-th tap.
  • the tap structure of the D-th tap and the tap structure of the D 'next tap different from the D-th tap need not be the same.
  • the DC (Direct ⁇ ⁇ Current) prediction formula is a prediction formula including a DC term.
  • the DC term is a term of a product of a value representing a DC component of an image as a prediction tap and a tap coefficient among terms constituting a polynomial as a prediction equation.
  • DC tap means a prediction tap of a DC term, that is, a value representing a DC component.
  • DC coefficient means a tap coefficient of a DC term.
  • the primary prediction formula is a prediction formula consisting of only the first-order term.
  • the higher-order prediction equation is a prediction equation including a higher-order term, that is, a prediction equation including a first-order term and a second-order or higher-order term, or a prediction equation including only a second-order or higher-order term.
  • the i-th prediction tap (pixel value or the like) used for prediction among the pixels of the first image is x i
  • the i-th tap coefficient is w i
  • DC prediction equation moistened with DC term to the primary prediction equation for example, the formula ⁇ w i x i + w DCB DCB .
  • w DCB represents a DC coefficient
  • DCB represents a DC tap.
  • the tap coefficients of the first-order prediction formula, the higher-order prediction formula, and the DC prediction formula can all be obtained by performing the tap coefficient learning by the least square method as described above.
  • the class classification unit 10 employs, for example, four directions, starting from the target pixel, a vertical direction starting from the target pixel, a left direction, a horizontal upper left direction, and an upper right direction. Is done.
  • the class classification unit 10 uses the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1) of the target pixel in the V direction, H direction, D0 direction, and D1 direction,
  • the direction of GALF is determined (set) as a specified direction indicating the inclination direction of the target pixel.
  • the GALF directions as defined directions are eight directions to which 000 to 111 are assigned in binary and 0 to 7 are assigned in decimal, as shown in FIG.
  • a direction between the H direction and the direction HD0 that bisects the H direction and the D0 direction, a direction between the directions HD0 and D0, a direction between the D0 direction, the D direction, and the V direction are defined as directions.
  • the class classification unit 10 obtains (sets) a direction class representing the inclination direction of the target pixel from the direction as the specified direction of the target pixel.
  • the direction class of GALF indicates either the V direction or the H direction, or the D0 direction or the D1 direction.
  • obtaining the direction class constitutes a part of the GALF class classification performed by the class classification unit 10, and thus can be called subclass classification.
  • the subclass classification for obtaining the direction class is hereinafter also referred to as a direction subclass classification.
  • the class classification unit 10 determines the direction class of the pixel of interest, and the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1) in the V, H, D0, and D1 directions. ), The target pixel is classified into classes.
  • FIG. 2 is a diagram for explaining how to determine the direction of GALF as a specified direction (inclination direction) of the target pixel.
  • FIG. 2 shows, in the GALF class classification, the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1) in the V, H, D0, and D1 directions.
  • An example of the required (set) MainDir and SecDir is shown.
  • FIG. 2 shows a direction class classification table showing the relationship between MainDir, SecDir, and direction, and the relationship between direction, transpose, and class used in GALF class classification.
  • the class classification unit 10 After calculating the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1) in the V direction, H direction, D0 direction, and D1 direction, the class classification unit 10 The sumA (H) and the sumA (V) are compared, and the larger one is set as a first winner activity HVhigh, and the other is set as a first loser activity HVlow.
  • the class classification unit 10 compares the activity sums sumA (D0) and sumA (D1), and determines the larger one as the second winner activity Dhigh, and the other as the second loser activity Dlow.
  • the classifying unit 10 calculates a product value HVhigh ⁇ Dlow of the first winner activity HVhigh and the second loser activity Dlow and a product value Dhigh ⁇ HVlow of the second winner activity Dhigh and the first loser activity HVlow. Compare with
  • the classifying unit 10 determines the direction (H direction or V direction) in which the first winner activity HVhigh was obtained as Main Dir (MainDirection). At the same time, the direction (D0 direction or D1 direction) in which the second winner activity Dhigh is obtained is determined as SecDir (Second Direction).
  • the filter coefficient is transposed and used for the filtering process.
  • Transpose indicates the way of transposing the filter coefficient.
  • class represents a direction class.
  • GALF direction classes are two classes represented by decimal numbers 0 and 2.
  • the direction class can be obtained by taking the logical product of the direction of the target pixel and 010 in binary.
  • the direction class 0 indicates that the tilt direction is the D0 direction or the D1 direction
  • the direction class 2 indicates that the tilt direction is the V direction or the H direction.
  • FIG. 3 is a diagram for explaining classes obtained by GALF class classification.
  • the classifying unit 10 calculates the activity sums sumA (D0) and sumA (D0) in the D0 and D1 directions.
  • the ratios r d1 and d2 of D1) are obtained as the gradient intensity ratio.
  • the class classification unit 10 obtains a class representing the size of the activity sum according to the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1).
  • the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1) are used, and the activity sums sumA (V) and sumA (H) are used.
  • class_idx Clip (0, 15, ((sumA (V) + sumA (H)) * 24) >> 13).
  • Clip (0, 15, X) indicates that X is clipped such that X takes a value in the range of 0 to 15.
  • the target pixels classified as non-class in the gradient intensity ratio subclass classification are classified into final classes 0 to 4, respectively.
  • the class classification unit 10 determines the activity sum sumA (V, H, D0, and D1 directions as the spatial feature amount of the target pixel. According to V), sumA (H), sumA (D0), and sumA (D1), the target pixel is classified into the final class.
  • the pixel of interest is classified into a Strong class having a large gradient intensity ratio in the Strong class.
  • the class classification unit 10 determines the activity sum sumA (V direction, H direction, D0 direction, and D1 direction as the spatial feature amount of the target pixel. According to V), sumA (H), sumA (D0), and sumA (D1), the target pixel is classified into the final class.
  • the class classification unit 10 calculates the activity sums sumA (V) and sumA (H) in the V direction and the H direction.
  • the class classification unit 10 sets the V direction, H direction, D0 direction, and D1 direction In accordance with the activity sums sumA (V), sumA (H), sumA (D0), and sumA (D1), the target pixel is classified into one of the final classes 0 to 4.
  • Gradient intensity ratio r h, v is the first case is a threshold value t 1 or more second less than the threshold t 2, the target pixel is inclined intensity ratio is smaller Week (Weak) class gradient strength ratio sub-class classification.
  • the gradient intensity ratio subclass classification is performed. Are classified into the final classes 15 to 19, respectively.
  • the class classification unit 10 determines the activity sum sumA (V direction, H direction, D0 direction, and D1 direction as the spatial feature amount of the target pixel. According to V), sumA (H), sumA (D0), and sumA (D1), the target pixel is classified into one of the final classes 20 to 24.
  • the gradient intensity ratio subclass classification is performed. Are classified into the final classes 20 to 24, respectively.
  • the class c means a class having a class number c specifying the class.
  • step S11 GALF sequentially selects pixels of a decoded image (for example, one picture) obtained by local decoding in the encoding device as a target pixel, and the process proceeds to step S12.
  • a decoded image for example, one picture
  • step S13 the GALF uses the decoded image and the original image (the image encoded with the encoded data decoded into the decoded image) for the decoded image, and calculates a normal equation for obtaining the tap coefficient for each initial class.
  • the process proceeds to step S14.
  • the i-th prediction tap (pixel value or the like) used for prediction is x i
  • the i-th tap coefficient is w i
  • primary prediction equation y ⁇ w i x i
  • X represents a matrix of N rows and N columns having a sum of products of the prediction taps x i and x j as elements, and W is a matrix of N rows and 1 column having tap coefficients w i as elements (column vector ).
  • step S14 GALF solves the normal equation for each initial class by, for example, Cholesky decomposition or the like, to obtain tap coefficients for each initial class, and the process proceeds to step S15.
  • the process of obtaining the tap coefficients for each initial class as in steps S11 to S14 is tap coefficient learning.
  • step S15 GALF performs a class merge process of merging the initial class in order to reduce (the data amount of) the tap coefficient, and the process proceeds to step S16.
  • an optimal merge pattern is determined for each number of merge classes, with each value of a natural number less than or equal to the initial number of classes as the number of merge classes. Adopted in the number of merge class determination process, used to convert from the initial class to the merge class when performing filter processing using tap coefficients from the number of merge classes for which the optimal merge pattern was determined in the merge pattern determination process The number of employed merge classes to be used is determined.
  • step S16 GALF performs a GALF filter process, and the process proceeds to step S17.
  • FIG. 5 is a flowchart illustrating the merge pattern determination process in step S21 of FIG.
  • the number of merged classes C is the number of initial classes Cini, none of the initial classes has been merged, but for convenience, it is treated as a state in which 0 initial classes have been merged.
  • step S32 GALF sets 0 to the merge class (variable representing c), and the process proceeds to step S33.
  • the merge class number C is the initial class number Cini
  • the merge class c is the initial class c.
  • the merge class number C is the initial class number Cini
  • the merge class c is the initial class c
  • the normal equation of the merge class c is the initial class c obtained in step S13 (FIG. 4). Is the normal equation.
  • the merge class number C is smaller than the initial class number Cini
  • the normal equation of the merge class c is the normal equation of the initial class c
  • step S38 GALF uses the tap coefficients of the new merge class c and the tap coefficients of the C class (C merge classes 1, 2,,..., C) other than the merge classes c and m. Then, filter processing is performed on the decoded image. Then, GALF obtains an error of the filtered image obtained by the filtering process with respect to the original image, and the process proceeds to step S39.
  • step S38 tapping of C-1 merge classes obtained by merging merge classes c and m into a new merge class c among the C merge classes 1, 2,, C An error of the filter image when the filter processing is performed using the coefficient is obtained.
  • step S39 GALF determines whether (the class number of) the merge class m is equal to C-1.
  • step S41 If it is determined in step S41 that the merge class c is not equal to C-2, that is, if the merge class c is less than C-2, the process proceeds to step S42.
  • step S42 GALF increments the merge class c by one, and the process returns to step S33, and thereafter, the same process is repeated.
  • step S41 if it is determined in step S41 that the merge class c is equal to C-2, that is, for C merge classes 1, 2,,.
  • the process proceeds to step S43.
  • step S43 in the C (C-1) / 2 types of merging of any two of the C merging classes 1, 2,,.
  • GALF merges the merge classes c and m that are the targets of the optimal merge into a new merge class c, assuming that the minimum merge is the optimal merge that merges the number of merge classes from C to C-1. Then, the process proceeds to step S44. That is, GALF sets the class number m of the merge class m to the class number c of the new merge class c.
  • the class number m since the class number m is set to the class number c in step S43, when the process in step S44 is performed, the class number m does not exist in the class numbers c + 1 to C-1.
  • step S45 GALF decrements the merge class number C by one, and the process proceeds to step S46.
  • step S46 the merge pattern indicating the correspondence between the Cini initial classes and the C merge classes after merging the merge classes c and m into the new merge class c is determined by the optimal merge of the merge class number C. Assuming that the pattern is a pattern, GALF stores the optimal merge pattern of the merge class number C as a merge pattern corresponding to the merge class number C, and the process proceeds to step S47.
  • step S47 GALF determines whether or not the number C of merge classes is equal to one.
  • step S47 If it is determined in step S47 that the number C of merge classes is not equal to 1, the process returns to step S32, and the same process is repeated.
  • step S47 when it is determined that the number C of merge classes is equal to 1, the merge pattern determination processing ends.
  • FIG. 6 is a diagram illustrating an example of the expression format of the merge pattern.
  • the merge pattern indicates the correspondence between the initial class and the merge class that merges the initial class. For example, in the order of the class numbers arranged in the initial class table, the merge class of the class having the class number is merged. Expressed by arranging class numbers.
  • the initial class table is a table in which the class numbers of the initial classes are arranged.
  • AA of FIG. 6 shows an initial class table of an initial class obtained by the GALF class classification.
  • the class numbers 0 to 24 of the 25 initial classes obtained by the GALF class classification are arranged in ascending order.
  • BB in FIG. 6 shows an example of the merge pattern.
  • the class numbers of the merge class into which the class of the class number is merged are arranged in the order of the class numbers arranged in the initial class table.
  • the merge pattern of B in FIG. 6 is a combination of the initial classes 0 to 24 in which the class numbers are arranged at the 1st to 25th in the initial class table, , 1, 0, 0, 0, 4, 1, 4, 0, 0, 2, 2, 4, 4, 1, 4, 4, and 4, respectively.
  • the initial class table and the merge pattern are expressed in a 5 ⁇ 5 table format.
  • the expression format of the initial class table and the merge pattern is not limited to the table format. An expression format in which class numbers are separated by commas or spaces may be used.
  • FIG. 7 is a diagram showing an example of a merge pattern for each number of merge classes.
  • FIG. 7 shows an example of an optimal merge pattern for each merge class number, with each natural number value equal to or less than 25 (initial class numbers) obtained from the GALF class classification as the number of merge classes. I have.
  • a circle attached to a merge pattern of the number C of merge classes indicates that the number of merge classes is changed from C + 1 to C among merge classes obtained according to the merge pattern corresponding to the number C + 1 of merge classes. Represents a merge class to be merged into another merge class by the merge.
  • a circle is assigned to the class number 6 arranged at the 16th position. This is because, in a merge where the number of merge classes is changed from 25 to 24, the merge class of class number 15 placed at the 16th of the merge pattern of 25 merge classes is placed at the 16th of the merge pattern of 24 merge classes. This indicates that the merged class will be merged with the merge class of class number 6 (which is also the merge class of class number 6 arranged in the seventh of the merge pattern with 24 merge classes).
  • the merge pattern determination process (FIG. 5) after merging the merge classes c and m with the new merge class c in step S43, series sorting of class numbers is performed in step S44. Therefore, in the merge pattern corresponding to each merge class number in FIG. 7, the maximum value of the class number is a value corresponding to the merge class number C, that is, the merge class number C-1.
  • merge pattern determination process while decrementing the number C of merge classes by one, for the merge classes of the number C of merge classes obtained by the merge determined in the immediately preceding step S43, merge two arbitrary merge classes C ( C-1) / 2 types of merge are performed. Then, of the C (C-1) / 2 types of merges, the merge that minimizes the error of the filter image is determined as the optimal merge to the merge class number C-1, and the merge pattern of the merge is It is obtained as a merge pattern corresponding to the merge class number C-1.
  • the merge class number C is 25.
  • the merge pattern corresponds to the number of merge classes 25 and the merge pattern corresponding to the number of merge classes 1 respectively.
  • the number C of merge classes is any one of 2 to 24
  • the number when merging any two of the merge classes of the number C of merge classes is C (C-1) /
  • C (C-1) / 2 types of merges are performed, and a filter process is performed using tap coefficients obtained by each merge, thereby obtaining a filter image error. Then, the merge pattern of the merge that minimizes the error of the filter image is determined as the merge class corresponding to the merge class number C-1.
  • FIG. 8 is a flowchart illustrating the adopted merge class number determination process in step S22 of FIG.
  • step S62 GALF acquires (loads) a merge pattern corresponding to the number C of merge classes obtained in the merge pattern determination process (FIG. 5), and the process proceeds to step S63.
  • step S63 GALF calculates the tap coefficient of the C class (minutes) when 25 initial classes are merged into the C class merge class (C merge classes) according to the merge pattern corresponding to the merge class number C. Is acquired (loaded), and the process proceeds to step S64.
  • step S64 GALF performs a GALF filter process using the tap coefficient of the C class, and the process proceeds to step S65.
  • GALF sequentially selects the pixels of the decoded image as the pixel of interest, and performs class classification of the pixel of interest (class classification for the pixel of interest). Further, GALF converts the initial class of the target pixel obtained by the class classification of the target pixel into a merge class according to a merge pattern corresponding to the merge class number C. Then, GALF performs a filter process using the tap coefficient of the merge class of the pixel of interest among the tap coefficients of the C class acquired in step S63, and obtains a filter image.
  • step S65 GALF obtains an error dist of the filter image obtained by performing the filter process using the tap coefficient of the merge class of the target pixel with respect to the original image, and the process proceeds to step S66.
  • step S68 If it is determined in step S68 that the number C of merge classes is equal to 1, the process proceeds to step S70.
  • step S70 the merge with the minimum cost among the merges into one class or the Cini class is determined to be the adoption merge adopted in the GALF filter processing, and GALF determines the number of merge classes in the merge pattern when performing the adoption merge. , And the number of adopted merge classes is determined, and the adopted merge class number determination process ends.
  • the ith number j from the beginning (left) indicates that the initial class of the class number i is converted (merged) into the merge class of the class number j.
  • Deterioration of the performance of the filtering process can be attributed to the information that influences the class classification into the merge class among the information such as the feature amounts of the pixels used in the class classification for obtaining the initial class for each number of merge classes, and the merging of the information
  • a classification rule of class classification into a merge class such as a method of assigning a class (subclass) (for example, to which range of which feature amount to which merge class), and to set a merge pattern. Can be suppressed.
  • suppressing the deterioration of the performance of the filtering process is set as a setting policy for setting a merge pattern, and a merge pattern corresponding to each number of merge classes is set according to a setting rule that does not violate the setting policy.
  • a reduction setting for setting a merge pattern for each merge class number such that the number of classes decreases from an initial class obtained by a predetermined class classification can be adopted.
  • a merge pattern for merging an initial class obtained by a predetermined class classification and a merge pattern for merging an initial class obtained by another class classification are mixed. Can be adopted.
  • a setting rule when an image for setting a merge pattern prepared in advance is coded as an original image, codes of parameters (tap coefficients for each merge class and the number of adopted merge classes) required for filter processing are used.
  • Statistical settings for setting a merge pattern for each number of merge classes can be employed so that one or both of the amount and the error of the filtered image with respect to the original image are statistically optimized.
  • FIGS. 10 and 11 show examples of reduction settings for merge patterns.
  • the merge pattern for each number of merge classes is set so that the number of classes decreases from the initial class obtained by the predetermined class classification.
  • the GALF class classification is adopted as the predetermined class classification.
  • the information used for the GALF class classification includes the gradient intensity ratio, the direction class, and the activity sum (activity subclass) as described with reference to FIGS. ).
  • a merge pattern for each number of merge classes can be set so that a merge class in which the gradient intensity ratio or the activity sum influences preferentially is obtained.
  • the merge patterns in FIGS. 10 and 11 are such that a merge class in which the gradient intensity ratio affects preferentially is obtained.
  • the merge pattern corresponding to the number of merge classes 25 is one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio.
  • Crab gradient intensity ratio subclass classification, activity subclass classification into any of 5 subclasses according to activity sum, and gradient intensity ratio subclass obtained by gradient intensity ratio subclass classification according to gradient intensity ratio is other than non-class
  • the class obtained by the classification rule of classifying all 25 classes is obtained as a merge class It has a merge pattern. That is, the merge pattern corresponding to the number of merge classes 25 is a merge pattern that can obtain the same merge class as the initial class obtained by the GALF class classification.
  • the H / V class refers to the direction class 2 (a subclass indicating that the tilt direction is the V direction or the H direction) described with reference to FIGS. 1 to 3.
  • the D0 / D1 class means the direction class 0 (a subclass indicating that the tilt direction is the D0 direction or the D1 direction) described with reference to FIGS.
  • the merge pattern corresponding to the merge class number 10 classifies the pixel of interest into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio, According to the activity sum, the activity subclass is classified into one of the two subclasses. If the gradient intensity ratio subclass is other than the non-class, one of the two subclasses of the H / V class and the D0 / D1 class is selected according to the direction class. By performing the direction subclass classification, the class obtained by the classification rule for classification into all 10 classes is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the merge class number 5 classifies the target pixel into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio, If the gradient strength ratio subclass is other than the non-class, according to the direction class, by classifying the direction subclass into one of two subclasses of H / V class and D0 / D1 class, according to the classification rules to classify into all 5 classes
  • the obtained class is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the number of merge classes 3 is to classify the pixel of interest into one of three subclasses of non-class, weak class, and strong class according to the gradient intensity ratio.
  • the class obtained by the classification rule of classifying into all three classes is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the number of merge classes 2 is obtained by classifying the pixel of interest into one of two subclasses of a non-class and a weak / strong class according to the gradient intensity ratio.
  • a class obtained by the classification rule for classifying into two classes is a merge pattern obtained as a merge class.
  • the weak / strong class is a combination of the weak class and the strong class when the gradient intensity ratio subclass is classified into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio. (Merged) class.
  • the merge pattern corresponding to the number of merge classes 1 is such that the class obtained by classifying the pixel of interest into one class is a merge pattern obtained as a merge class.
  • classifying the target pixel into one class does not perform class classification, that is, it can be considered that there is no class.
  • the one class is also referred to as a mono class.
  • the merge pattern corresponding to the merge class number 1 is a merge pattern in which a monoclass is obtained as a merge class.
  • FIG. 12 is a diagram for explaining a method of setting a merge pattern corresponding to a merge class number of 25 in which 25 initial classes obtained by GALF class classification are merged into 25 merge classes.
  • the target pixel is a non-class, a weak class, and a weak class according to the gradient intensity ratio.
  • the gradient strength ratio subclass is classified into one of the three subclasses of the Strong class, and the activity subclass is classified into any one of the five subclasses according to the activity sum as the spatial feature.
  • the direction subclass is classified into one of two subclasses of the H / V class and the D0 / D1 class, so that the classification is performed into any of the merge classes 0 to 24.
  • the target pixel is classified into the merge class 5 when the activity subclass is 0, and is merged into the merge class 6 when the activity subclass is 1.
  • the activity subclass is 2, it is classified into a merge class 7, when the activity subclass is 3, it is classified into a merge class 8, and when the activity subclass is 4, it is classified into a merge class 9.
  • FIG. 13 is a diagram for explaining a method of setting a merge pattern corresponding to a merge class number of 20 in which 25 initial classes obtained by GALF class classification are merged into 20 merge classes.
  • FIG. 13 shows a classification rule for performing class classification into merge classes obtained according to the merge pattern corresponding to the number of merge classes 20 in FIG.
  • the target pixel has an index class_idx of 0 or 1, according to the index class_idx obtained from the activity sum as described in FIG. 3. If, as an activity subclass is classified into a small (small) class, if the index class_idx is 2 to 6, if the activity subclass is classified into the Middle 1 (Middle1) class, if the index class_idx is 7 to 14, the activity It is classified into a Middle2 class as a subclass, and when the index class_idx is 15, it is classified into a Large class as an activity subclass.
  • the number of activity subclasses is four, which is one less than the number of activity subclasses in the initial class.
  • the small class matches the activity subclasses 0 and 1 in the initial class, and the middle 1 class, the middle 2 class, and the large class match the activity subclasses 2, 3, and 4 in the initial class, respectively.
  • the target pixel is classified into the merge class 4 when the activity subclass is the small class, and when the activity subclass is the middle 1 class, If the activity subclass is a middle class, it is classified into a merge class 6, and if the activity subclass is a large class, it is classified into a merge class 7.
  • the target pixel is classified into the merge class 8 when the activity subclass is the small class, and when the activity subclass is the middle 1 class, If the activity subclass is a middle class, it is classified into a merge class 10, and if the activity subclass is a large class, it is classified into a merge class 11.
  • the pixel of interest is classified into the merge class 12 when the activity subclass is the small class, and when the activity subclass is the middle 1 class, If the activity subclass is the middle 2 class, it is classified into the merge class 14, and if the activity subclass is the large class, it is classified into the merge class 15.
  • the pixel of interest is classified into the merge class 16 when the activity subclass is the small class, and when the activity subclass is the middle 1 class, If the activity subclass is a middle class, it is classified into a merge class 18, and if the activity subclass is a large class, it is classified into a merge class 19.
  • the merge class 0 matches the initial classes 0 and 1 obtained by the GALF class classification
  • the merge classes 1 to 3 correspond to the initial classes 2 to 4 obtained by the GALF class classification, respectively.
  • Match, merge class 4 matches initial classes 5 and 6 obtained by GALF classification
  • merge classes 5 to 7 match initial classes 7 to 9 obtained by GALF classification
  • merge Class 8 matches the initial classes 10 and 11 obtained by the GALF classification
  • merge classes 9 to 11 respectively match the initial classes 12 to 14 obtained by the GALF classification
  • the merge class 12 Match the initial classes 15 and 16 obtained by the GALF classification
  • the merged classes 13 to 15 become the initial classes 17 to 19 obtained by the GALF classification.
  • Are matched, merged class 16 matches the initial class 20 and 21 obtained by the class classification GALF, merge classes 17 to 19, to an initial class 22 not obtained by the class classification GALF matches respectively 24.
  • the initial classes 0 and 1 become the merge class 0
  • the initial classes 2 to 4 become the merge classes 1 to 3, respectively
  • the initial classes 5 and 6 become the merge class 4.
  • the initial classes 7 to 9 respectively into the merge classes 5 to 7, the initial classes 10 and 11 into the merge class 8, the initial classes 12 to 14 into the merge classes 9 to 11, respectively, and the initial classes 15 and 16 into the merge class.
  • a merge pattern for converting each of the initial classes 17 to 19 into a merge class 13 to 15, each of the initial classes 20 and 21 into a merge class 16, and each of the initial classes 22 to 24 into a merge class 17 to 19, respectively. Can be set.
  • FIG. 14 is a diagram for explaining a method of setting a merge pattern corresponding to a merge class number of 15 in which 25 initial classes obtained by GALF classification are merged into 15 merge classes.
  • FIG. 14 shows a classification rule for performing class classification into merge classes obtained according to a merge pattern corresponding to the number of merge classes 15 in FIG.
  • the pixel of interest is classified into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio, and the activity as a spatial feature amount is performed. If the activity subclass is classified into one of the three subclasses according to the sum, and if the gradient intensity ratio subclass is other than the non-class, according to the direction class, it is classified into one of the two subclasses of the H / V class and the D0 / D1 class. By being classified in the direction subclass, it is classified into one of the merge classes 0 to 14.
  • the classification rule in FIG. 14 is a rule in which the small class as the activity subclass and the middle 1 class in the classification rule in FIG. 13 are merged to reduce the number of activity subclasses from four to three.
  • the target pixel in the activity subclass classification into any one of the three subclasses, has an index class_idx of 0 to 6 according to the index class_idx obtained from the activity sum as described in FIG. In the case, it is classified into a small (small) class as an activity subclass, if the index class_idx is 7 to 14, it is classified into a middle (Middle) class as an activity subclass, and if the index class_idx is 15, It is classified into the Large class.
  • the assignment of the subclass to the activity sum is reduced by two subclasses as compared with the case of the GALF classification, and accordingly, the activity sum affects the classification of the merge class. Gone.
  • a merge class in which the gradient intensity ratio and the direction class have a higher priority than the activity sum is obtained.
  • the target pixel is classified into the merge class 6 when the activity subclass is the small class, and is merged when the activity subclass is the middle class. If the activity subclass is a large class, it is classified into a merge class 8.
  • the target pixel is classified into the merge class 12 when the activity subclass is the small class, and is merged when the activity subclass is the middle class. If the activity subclass is a large class, it is classified into a merge class 14.
  • the merge class 0 matches the initial classes 0 and 2 obtained by the GALF class classification
  • the merge classes 1 and 2 correspond to the initial classes 3 and 4 obtained by the GALF class classification, respectively.
  • Merge class 3 matches the initial classes 5 to 7 obtained by the GALF classification
  • merge classes 4 and 5 match the initial classes 8 and 9 obtained by the GALF classification, respectively.
  • Class 6 matches the initial classes 10 to 12 obtained by the GALF classification
  • merge classes 7 and 8 respectively match the initial classes 13 and 14 obtained by the GALF classification
  • the merge class 9 The merged classes 10 and 11 correspond to the initial classes 18 and 19 obtained by the GALF classification, respectively.
  • the merge class 12 matches the initial classes 20 to 22 obtained by the GALF classification
  • the merge classes 13 and 14 match the initial classes 23 and 24 obtained by the GALF classification.
  • FIG. 15 shows a classification rule for performing class classification into merge classes obtained according to the merge pattern corresponding to the number of merge classes 10 in FIG.
  • the target pixel is classified into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio, and the activity as a spatial feature amount is performed.
  • the activity subclass is classified into one of two subclasses. If the gradient intensity ratio subclass is other than the non-class, the activity subclass is classified into one of two subclasses of the H / V class and the D0 / D1 class according to the direction class. By being classified in the direction subclass, it is classified into one of the merge classes 0 to 14.
  • the classification rule in FIG. 15 is a rule in which the middle class and the large class as activity subclasses in the classification rule in FIG. 14 are merged to reduce the number of activity subclasses from three to two.
  • the target pixel is classified into the merge class 0 when the activity subclass is the small class, and is merged when the activity subclass is the large class.
  • the target pixel is classified into the merge class 4 when the activity subclass is the small class, and is merged when the activity subclass is the large class. Classified into class 5.
  • the target pixel is classified into the merge class 8 when the activity subclass is the small class, and is merged when the activity subclass is the large class. Classified as Class 9.
  • the initial classes 0 to 3 are set to the merge class 0
  • the initial classes 3 and 4 are set to the merge class 1
  • the initial classes 5 to 7 are set to the merge class 2
  • the initial class 8 is set.
  • the initial classes 10 to 12 to the merge class 4 the initial classes 13 and 14 to the merge class 5, the initial classes 15 to 17 to the merge class 6, and the initial classes 18 and 19 to the merge class.
  • a merge pattern for converting the initial classes 20 to 22 into a merge class 8 and the initial classes 23 and 24 into a merge class 9 can be set.
  • FIG. 16 is a diagram for explaining a method of setting a merge pattern corresponding to a merge class number of 5, in which 25 initial classes obtained by GALF class classification are merged into 5 merge classes.
  • FIG. 16 shows a classification rule for performing class classification into merge classes obtained according to the merge pattern corresponding to the number of merge classes 10 in FIG.
  • the pixel of interest is classified into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio, and the gradient intensity ratio subclass is non-class. If it is not a class, it is classified into one of the merge classes 0 to 4 by being classified into one of the two subclasses of the H / V class and the D0 / D1 class according to the direction class.
  • the classification rule in FIG. 16 is a rule in which the small class and the large class as the activity subclass in the classification rule in FIG. 15 are merged to reduce the number of activity subclasses from 2 to 1.
  • the target pixel is classified into the merge class 3.
  • the initial classes 0 to 4 are set to the merge class 0
  • the initial classes 5 to 9 are set to the merge class 1
  • the initial classes 10 to 14 are set to the merge class 2
  • the initial class 15 is set.
  • To 19 can be set to the merge class 3 and the initial classes 20 to 24 can be set to the merge class 4, respectively.
  • the initial classes 0 to 4 are set to the merge class 0
  • the initial classes 5 to 9 and 15 to 19 are set to the merge class 1
  • the initial classes 10 to 14 and 20 to 24 are set to the merge class.
  • Merge patterns to be converted can be set in merge class 2.
  • FIG. 18 is a diagram for explaining a method of setting a merge pattern corresponding to the number of merge classes 2 for merging 25 initial classes obtained by GALF class classification into two merge classes.
  • the target pixel when the gradient intensity ratio subclass is a non-class, the target pixel is classified into the merge class 0, and when the gradient intensity ratio subclass is the weak / strong class, the target pixel is the merge class. Classified into 1. In this case, the target pixel is classified into a texture pixel and a non-texture pixel.
  • the target pixel is always classified into the merge class 0 as a monoclass.
  • the classification rule in FIG. 19 is a rule in which the non-class as the gradient intensity ratio subclass and the weak / strong class in the classification rule in FIG. 18 are merged to reduce the number of gradient intensity ratio subclasses from 2 to 1. I have.
  • the merge class 0 matches the initial classes 0 to 24 obtained by the GALF class classification.
  • a merge pattern for converting the initial classes 0 to 24 into the merge class 0 can be set.
  • a feature amount other than the gradient intensity ratio for example, the merge class in which the activity sum influences preferentially, Can be set.
  • FIGS. 20 and 21 are diagrams showing a second example of a preset merge pattern.
  • FIGS. 20 and 21 show examples of merge patterns corresponding to the number of merge classes 25, 15, 10, 5, 4, 3, 2, 1 for merging 25 initial classes obtained by the GALF class classification.
  • FIG. 20 and 21 show examples of merge patterns corresponding to the number of merge classes 25, 15, 10, 5, 4, 3, 2, 1 for merging 25 initial classes obtained by the GALF class classification.
  • the merge patterns in FIGS. 20 and 21 are set by the reduction setting, similarly to the merge patterns in FIGS. 10 and 11.
  • the merge patterns in FIG. 10 and FIG. 11 are merge patterns in which a merge class in which the gradient intensity ratio affects preferentially is obtained, whereas in the merge patterns in FIG. 20 and FIG. It is a merge pattern that gives the affected merge class.
  • the merge pattern corresponding to the number of merge classes 25 is one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio.
  • the merge pattern corresponding to the merge class number 15 classifies the target pixel into one of three subclasses of a non-class, a weak class, and a strong class according to the gradient intensity ratio,
  • the class obtained by the classification rule of classifying into all 15 classes is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the number of merge classes of 10 classifies the target pixel into one of two subclasses of a non-class and a weak / strong class according to the gradient intensity ratio,
  • the class obtained by the classification rule for classifying all the ten classes is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the merge class number 5 is a class obtained by a classification rule that classifies the target pixel into one of the five subclasses according to the activity sum and classifies the target pixel into all five classes. Is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the merge class number 4 is a class obtained by a classification rule that classifies the target pixel into one of four subclasses according to the activity sum and classifies the target pixel into all four classes. Is a merge pattern obtained as a merge class.
  • the merge pattern corresponding to the number of merge classes 2 is a class obtained by a classification rule that classifies the target pixel into one of two subclasses according to the activity sum and classifies the target pixel into all two classes. Is a merge pattern obtained as a merge class.
  • the GALF class classification is adopted as the class classification for obtaining the initial class (hereinafter, also referred to as the initial class classification), but a class classification other than the GALF class classification is adopted as the initial class classification. be able to.
  • (i, j) ⁇ (s ′ (i, j) ⁇ s ′ (k, l)? 1: 0)
  • (i, j) is the position of the target pixel (for example, I-th from the left and j-th position from the top).
  • s ′ (i, j) represents the pixel value (for example, luminance) of the pixel at the position (i, j).
  • the first summation ( ⁇ ) on the right-hand side represents the summation where k is changed to an integer from i-1 to i + 1, and the second summation is when l is changed from j-1 to j + Represents summation, changing to an integer up to 1.
  • (X? 1: 0) means that it takes 1 when X is true, and takes 0 when X is false.
  • if the ⁇ T 3 is satisfied, the category of the pixel of interest as (category) 0, wherein T 3 ⁇
  • T 4 is satisfied If the category of the attention pixel is 1, the formula
  • T 1 , T 2 , T 3 , and T 4 are preset thresholds.
  • T 1 and T 2 is related to the formula T 1 ⁇ T 2
  • T 3 and T 4 are related equation T 3 ⁇ T 4.
  • v (i, j) 4 * s' (i, j)-(s' (i-1, j) + s' (i + 1, j) + s '(i, j + 1) + s' (i, j-1)).
  • FIG. 23 is a diagram illustrating a class classification using a pixel value as a feature amount of a target pixel, that is, a class classification of JVET-J0018.
  • the merge conversion unit 112 converts the initial class of the pixel of interest from the class classification unit 111 into a merge class according to a merge pattern preset for each number of merge classes. That is, the merge conversion unit 112 converts the initial class of the pixel of interest into a merge class in accordance with the merge pattern corresponding to the number of adopted merge classes among the merge patterns preset for each merge class number. The merge conversion unit 112 supplies the merge class of the pixel of interest to the tap coefficient acquisition unit 113.
  • the learning unit 121 supplies the number of adopted merge classes to the class classification unit 111 and the merge conversion unit 112, and supplies the tap coefficients for each merge class of the number of adopted merge classes to the tap coefficient acquisition unit 113.
  • step S114 the tap coefficient acquisition unit 113 acquires the tap coefficient of the merge class of the target pixel from the merge conversion unit 112 from among the tap coefficients for each merge class, and the process proceeds to step S115.
  • the local decoding unit 162 performs local decoding of the encoded data from the encoding unit 161 using the filter image from the filter unit 163, and supplies a (local) decoded image obtained as a result to the filter unit 163.
  • the filter unit 163 uses the normal equation (the X matrix and the Y vector of) obtained by the tap coefficient learning to determine the merge pattern in steps S36 and S36 of the merge pattern determination process (FIG. 5). By performing the same processing as in S37, the tap coefficient for each merge class of the number of adopted merge classes is obtained.
  • the filter unit 163 supplies the filter image obtained by the filter processing to the encoding unit 161 and the local decoding unit 162. Further, the filter unit 163 supplies the number of adopted merge classes and the tap coefficient of each of the adopted merge classes to the encoding unit 161 as filter information.
  • the decoding device 170 includes a parsing unit 171, a decoding unit 172, and a filter unit 173.
  • the decoding unit 172 is supplied with encoded data from the parsing unit 171 and is also supplied with a filter image from the filtering unit 173.
  • the filter unit 173 is configured, for example, similarly to the class classification prediction filter 110 without a learning function (FIG. 29), and includes a class classification unit 174 and a merge conversion unit 175.
  • the filter unit 173 performs a filter process as a prediction process of applying, to the decoded image, a prediction expression for performing a product-sum operation of a tap coefficient of a merge class of the pixel of interest obtained by the conversion of the merge conversion unit 175 and a pixel of the decoded image. I do.
  • the tap coefficient of the merge class of the pixel of interest used for the filter processing is obtained from the tap coefficient for each merge class included in the filter information from the parse unit 171.
  • the filter unit 173 supplies the filtered image obtained by the filtering process to the decoding unit 172, and outputs it as a final decoded image obtained by decoding the original image.
  • the processing according to the flowchart in FIG. 32 is performed, for example, on a frame (picture) basis.
  • step S161 the encoding unit 161 (FIG. 31) encodes (predicts) the original image using the filter image from the filter unit 163, and sends the encoded data obtained by the encoding to the local decoding unit 162. After supplying, the process proceeds to step S162.
  • step S162 the local decoding unit 162 performs local decoding of the encoded data from the encoding unit 161 using the filter image from the filter unit 163, and outputs the (local) decoded image obtained as a result to the filter unit 163. , And the process proceeds to step S163.
  • step S164 the filter unit 163 performs merging of the initial classes according to the merge pattern corresponding to the number of merge classes for each of the plurality of merge classes for which the merge pattern is set in advance, and the number of merge classes that minimizes the cost. Is determined as the number of employed merges. Further, the filter unit 163 uses the normal equation (X matrix and Y vector of) obtained by the tap coefficient learning for obtaining the tap coefficient for each initial class to convert the initial class into a merge pattern corresponding to the number of adopted merge classes. The tap coefficients for each merge class merged according to are obtained as described in steps S36 and S37 in FIG. 5, and the process proceeds from step S164 to step S165.
  • step S165 the class classification unit 164 of the filter unit 163 performs the class classification of the target pixel of the decoded image from the local decoding unit 162 by the class classification method corresponding to the number of employed merge classes, and the process proceeds to step S166. .
  • step S166 the merge conversion unit 165 of the filter unit 163 converts the initial class of the pixel of interest obtained by the class classification of the class classification unit 164 into a merge class according to the merge pattern corresponding to the number of adopted merge classes. Then, the process proceeds to step S167.
  • step S167 the filter unit 163 calculates a prediction expression for performing a product-sum operation between the tap coefficient of the merge class of the pixel of interest and the pixel of the decoded image among the tap coefficients for each merge class obtained in step S164.
  • a filter image is generated as a prediction process to be applied to the image data, and a filter image is generated.
  • the filter image is supplied from the filter unit 163 to the encoding unit 161 and the local decoding unit 162.
  • the filter image supplied from the filter unit 163 to the encoding unit 161 and the local decoding unit 162 is used in the processing of steps S161 and S162 performed for the next frame.
  • the filter unit 163 supplies the number of adopted merge classes and the tap coefficients for each merge class to the encoding unit 161 as filter information.
  • step S181 the parsing unit 171 (FIG. 31) receives the encoded bit stream transmitted from the encoding device 160, and determines the number of merge classes adopted as filter information included in the encoded bit stream, and the number of merge classes. The tap coefficient for each is parsed and supplied to the filter unit 173. Further, the parsing unit 171 supplies the encoded data included in the encoded bit stream to the decoding unit 172, and the process proceeds from step S181 to step S182.
  • step S183 the class classification unit 174 of the filter unit 173 classifies the target pixel of the decoded image from the decoding unit 172 by the class classification method corresponding to the number of merge classes adopted from the parsing unit 171. Proceeds to step S184.
  • step S185 the filter unit 173 performs a filtering process as a class classification prediction process on the decoded image from the decoding unit 172 using the tap coefficient for each merge class from the parsing unit 171 to generate a filtered image.
  • the filter unit 173 applies, to the decoded image, a prediction expression that performs a product-sum operation between the tap coefficient of the merge class of the pixel of interest and the pixel of the decoded image among the tap coefficients for each merge class from the parsing unit 171. Filter processing is performed as prediction processing to generate a filtered image.
  • the filter image is supplied from the filter unit 173 to the decoding unit 172, and is output as a final decoded image obtained by decoding the original image.
  • the filter image supplied from the filter unit 173 to the decoding unit 172 is used in the process of step S182 performed on the next frame of the decoded image.
  • FIG. 34 is a block diagram illustrating a detailed configuration example of the encoding device 160 in FIG.
  • the encoding device 160 includes an A / D conversion unit 201, a rearrangement buffer 202, an operation unit 203, an orthogonal transformation unit 204, a quantization unit 205, a lossless encoding unit 206, and a storage buffer 207. Further, the encoding device 160 includes an inverse quantization unit 208, an inverse orthogonal transform unit 209, an arithmetic unit 210, an ILF 211, a frame memory 212, a selection unit 213, an intra prediction unit 214, a motion prediction compensation unit 215, and a predicted image selection unit 216. , And a rate control unit 217.
  • the A / D converter 201 A / D converts the original image of the analog signal into the original image of the digital signal, and supplies the original image to the rearrangement buffer 202 for storage.
  • the rearrangement buffer 202 rearranges the frames of the original image in the order of display from encoding to decoding (decoding) according to the GOP (Group Of Picture), and calculates the operation unit 203, the intra prediction unit 214, the motion prediction compensation unit 215, and , ILF211.
  • the operation unit 203 subtracts the predicted image supplied from the intra prediction unit 214 or the motion prediction compensation unit 215 via the predicted image selection unit 216 from the original image from the rearrangement buffer 202, and obtains a residual obtained by the subtraction. (Prediction residual) is supplied to the orthogonal transform unit 204.
  • the calculation unit 203 subtracts the predicted image supplied from the motion prediction compensation unit 215 from the original image read from the rearrangement buffer 202.
  • the orthogonal transform unit 204 performs an orthogonal transform such as a discrete cosine transform or a Karhunen-Loeve transform on the residual supplied from the arithmetic unit 203.
  • an orthogonal transform such as a discrete cosine transform or a Karhunen-Loeve transform
  • the method of this orthogonal transformation is arbitrary.
  • the orthogonal transform unit 204 supplies the orthogonal transform coefficients obtained by the orthogonal exchange to the quantization unit 205.
  • the quantization unit 205 quantizes the orthogonal transform coefficient supplied from the orthogonal transform unit 204.
  • the quantization unit 205 sets the quantization parameter QP based on the target code amount (code amount target value) supplied from the rate control unit 217, and quantizes the orthogonal transform coefficients. Note that this quantization method is optional.
  • the quantization unit 205 supplies the coded data that is the quantized orthogonal transform coefficient to the lossless coding unit 206.
  • the lossless encoding unit 206 encodes the quantized orthogonal transform coefficients as encoded data from the quantization unit 205 using a predetermined lossless encoding method. Since the orthogonal transform coefficients are quantized under the control of the rate control unit 217, the code amount of the coded bit stream obtained by the lossless coding of the lossless coding unit 206 depends on the code set by the rate control unit 217. It becomes the amount target value (or approximates the code amount target value).
  • the lossless encoding unit 206 acquires, from each block, encoding information necessary for decoding by the decoding device 170, out of encoding information related to predictive encoding by the encoding device 160.
  • the coding information for example, prediction modes of intra prediction and inter prediction, motion information such as a motion vector, a code amount target value, a quantization parameter QP, a picture type (I, P, B), CU (Coding Unit) and CTU (Coding Tree Unit) information.
  • motion information such as a motion vector, a code amount target value, a quantization parameter QP, a picture type (I, P, B), CU (Coding Unit) and CTU (Coding Tree Unit) information.
  • the prediction mode can be obtained from the intra prediction unit 214 or the motion prediction compensation unit 215.
  • the motion information can be obtained from the motion prediction compensation unit 215.
  • the lossless encoding unit 206 acquires the coding information, and also acquires, from the ILF 211, the tap coefficient for each class as the filter information related to the filtering process in the ILF 211.
  • the lossless encoding unit 206 converts the encoding information and the filter information into, for example, variable-length encoding such as CAVLC (Context-Adaptive Variable Length Coding) and CABAC (Context-Adaptive Binary Arithmetic Coding) or arithmetic encoding or other lossless encoding.
  • variable-length encoding such as CAVLC (Context-Adaptive Variable Length Coding) and CABAC (Context-Adaptive Binary Arithmetic Coding) or arithmetic encoding or other lossless encoding.
  • An encoding bit stream including the encoded information and the filter information after encoding and the encoded data from the quantization unit 205 is generated and supplied to the accumulation buffer 207.
  • the storage buffer 207 temporarily stores the coded bit stream supplied from the lossless coding unit 206.
  • the coded bit stream stored in the storage buffer 207 is read and transmitted at a predetermined timing.
  • the encoded data which is the orthogonal transform coefficient quantized by the quantization unit 205, is supplied to the lossless encoding unit 206 and also to the inverse quantization unit 208.
  • the inverse quantization unit 208 inversely quantizes the quantized orthogonal transform coefficient by a method corresponding to the quantization by the quantization unit 205, and outputs the orthogonal transform coefficient obtained by the inverse quantization to the inverse orthogonal transform unit 209. Supply.
  • the inverse orthogonal transform unit 209 performs an inverse orthogonal transform on the orthogonal transform coefficient supplied from the inverse quantization unit 208 by a method corresponding to the orthogonal transform process by the orthogonal transform unit 204, and calculates a residual obtained as a result of the inverse orthogonal transform. , To the arithmetic unit 210.
  • the arithmetic unit 210 adds the prediction image supplied from the intra prediction unit 214 or the motion prediction compensation unit 215 via the prediction image selection unit 216 to the residual supplied from the inverse orthogonal transform unit 209, and thereby calculates the original A (part of) decoded image obtained by decoding the image is obtained and output.
  • the decoded image output from the operation unit 210 is supplied to the ILF 211.
  • the ILF 211 is configured, for example, in the same manner as the class classification prediction filter 110 with a learning function (FIG. 29), and performs a filtering process as a class classification prediction process to perform a deblocking filter, an adaptive offset filter, a bilateral filter, and an ALF. Function as one or two or more filters.
  • the ILF 211 functions as two or more filters among the deblocking filter, the adaptive offset filter, the bilateral filter, and the ALF, the arrangement order of the two or more filters is arbitrary.
  • the ILF 211 is supplied with the decoded image from the arithmetic unit 210 and the original image for the decoded image from the rearrangement buffer 202.
  • the ILF 211 stores merge information in which a plurality of merge classes, a merge pattern set in advance for each merge class, and a class classification method of a class classification for obtaining an initial class to be converted according to the merge pattern are stored. ing.
  • the ILF 211 performs tap coefficient learning by using, for example, a decoded image from the arithmetic unit 210 and an original image from the rearrangement buffer 202 as a student image and a teacher image, respectively, and obtains a tap coefficient for each initial class.
  • class classification is performed by a class classification method included in merge information using a decoded image as a student image, and each initial class obtained by the class classification includes a tap coefficient and a prediction tap.
  • the tap coefficient that statistically minimizes the prediction error of the prediction value of the original image as the teacher image obtained by the prediction formula is obtained by the least square method.
  • the ILF 211 performs a process similar to the adopted merge class number determination process (FIG. 8) by using a merge pattern corresponding to each of the plurality of merge classes included in the merge information.
  • the merge class number that minimizes the cost for example, the cost dist + lambda * coeffBit obtained in step S67 in FIG. 8) is determined as the adopted merge class number.
  • step S63 which is a filter process for obtaining a cost for determining the number of adopted merge classes in the adopted merge class number determination process (FIG. 8)
  • a merge pattern determination process (see FIG. 8) is performed.
  • steps S36 and S37 of 5 a plurality of normal equations (X matrix and Y vector of) that are established when tap coefficients for each initial class are obtained by tap coefficient learning are used.
  • a tap coefficient for each merge class is determined.
  • the ILF 211 supplies the number of adopted merge classes and the tap coefficient of each adopted merge class to the lossless encoding unit 206 as filter information.
  • the ILF 211 sequentially selects, for example, pixels of the decoded image from the arithmetic unit 210 as target pixels.
  • the ILF 211 performs a class classification of the target pixel by a class classification method associated with the number of adopted merge classes in the merge information, and obtains an initial class of the target pixel.
  • the ILF 211 converts the initial class of the pixel of interest into a merge class according to a merge pattern corresponding to the number of adopted merge classes.
  • the ILF 211 acquires (reads) the tap coefficient of the merge class of the target pixel among the tap coefficients of each merge class. Then, the ILF 211 selects a pixel in the vicinity of the pixel of interest from the decoded image as a prediction tap, and decodes a prediction equation for performing a product-sum operation between a tap coefficient of a merge class of the pixel of interest and a pixel of the decoded image as a prediction tap. Filter processing is performed as prediction processing applied to the image to generate a filtered image.
  • the class obtained by the class classification of the upper left pixel of the 2 ⁇ 2 pixel of the decoded image can be adopted as the class of each 2 ⁇ 2 pixel.
  • the frame memory 212 temporarily stores the filter image supplied from the ILF 211.
  • the filter image stored in the frame memory 212 is supplied to the selection unit 213 at a necessary timing as a reference image used for generating a predicted image.
  • the selection unit 213 selects a supply destination of the reference image supplied from the frame memory 212. For example, when the intra prediction is performed by the intra prediction unit 214, the selection unit 213 supplies the reference image supplied from the frame memory 212 to the intra prediction unit 214. Further, for example, when inter prediction is performed in the motion prediction / compensation unit 215, the selection unit 213 supplies the reference image supplied from the frame memory 212 to the motion prediction / compensation unit 215.
  • the intra prediction unit 214 uses the original image supplied from the rearrangement buffer 202 and the reference image supplied from the frame memory 212 via the selection unit 213, and uses, for example, a PU (Prediction @ Unit) as a processing unit to perform intra processing. Perform prediction (in-screen prediction).
  • the intra-prediction unit 214 selects an optimal intra-prediction mode based on a predetermined cost function (for example, RD cost or the like), and sends the predicted image generated in the optimal intra-prediction mode to the predicted image selection unit 216. Supply. Further, as described above, the intra prediction unit 214 appropriately supplies the prediction mode indicating the intra prediction mode selected based on the cost function to the lossless encoding unit 206 and the like.
  • the motion prediction compensation unit 215 uses the original image supplied from the rearrangement buffer 202 and the reference image supplied from the frame memory 212 via the selection unit 213, and performs motion prediction (inter Prediction). Further, the motion prediction compensation unit 215 performs motion compensation according to the motion vector detected by the motion prediction, and generates a predicted image. The motion prediction compensation unit 215 performs inter prediction in a plurality of inter prediction modes prepared in advance, and generates a predicted image.
  • the motion prediction compensation unit 215 selects an optimal inter prediction mode based on a predetermined cost function of the predicted image obtained for each of the plurality of inter prediction modes. Further, the motion prediction compensation unit 215 supplies the predicted image generated in the optimal inter prediction mode to the predicted image selection unit 216.
  • the motion prediction compensation unit 215 includes a prediction mode indicating the inter prediction mode selected based on the cost function, and a motion vector such as a motion vector required when decoding encoded data encoded in the inter prediction mode.
  • the information and the like are supplied to the lossless encoding unit 206.
  • the predicted image selection unit 216 selects a source (intra prediction unit 214 or motion prediction compensation unit 215) of the predicted image to be supplied to the calculation units 203 and 210, and predicts the prediction supplied from the selected source.
  • the image is supplied to the calculation units 203 and 210.
  • the rate control unit 217 controls the rate of the quantization operation of the quantization unit 205 based on the code amount of the coded bit stream stored in the storage buffer 207 so that overflow or underflow does not occur. That is, the rate control unit 217 sets the target code amount of the coded bit stream so as not to cause overflow and underflow of the accumulation buffer 207, and supplies the target code amount to the quantization unit 205.
  • the arithmetic unit 203 or the lossless encoding unit 206 is in the encoding unit 161 in FIG. 31, the inverse quantization unit 208 or the arithmetic unit 210 is in the local decoding unit 162 in FIG. 31, and the ILF 211 is the filter in FIG.
  • the section 163 corresponds to each.
  • FIG. 35 is a flowchart illustrating an example of an encoding process of the encoding device 160 in FIG.
  • the ILF 211 temporarily stores the decoded image supplied from the arithmetic unit 210, and also temporarily stores the original image for the decoded image supplied from the arithmetic unit 210, supplied from the rearrangement buffer 202.
  • step S201 the encoding device 160 (the control unit (not shown)) determines whether or not the current timing is an update timing for updating the filter information.
  • the update timing of the filter information is, for example, every one or more frames (pictures), every one or more sequences, every one or more slices, every one or more lines of a predetermined block such as a CTU, etc. , Can be determined in advance.
  • the update timing of the filter information may be a periodic (fixed) timing such as a timing for each one or more frames (pictures), or a timing when the S / N of the filter image becomes equal to or less than the threshold (the filter image).
  • Dynamic timing such as the timing at which the error with respect to the original image exceeds the threshold, or the timing at which the residual (sum of absolute values thereof) exceeds the threshold.
  • the ILF 211 performs tap coefficient learning using one frame of the decoded image and the original image, and the timing of each frame is the update timing of the filter information.
  • step S201 If it is determined in step S201 that the current timing is not the update timing of the filter information, the process skips steps S202 to S204 and proceeds to step S205.
  • step S201 If it is determined in step S201 that the current timing is the update timing of the filter information, the process proceeds to step S202, and the ILF 211 performs tap coefficient learning for obtaining a tap coefficient for each initial class.
  • the ILF 211 uses, for example, the decoded image and the original image (here, the latest one-frame decoded image and the original image supplied to the ILF 211) stored between the previous update timing and the current update timing. Then, tap coefficient learning is performed to determine tap coefficients for each initial class.
  • the ILF 211 converts each of the plurality of merge classes included in the merge information into a merge class by merging the initial class according to the merge pattern corresponding to the number of merge classes, and taps the same as in steps S36 and S37 in FIG.
  • a tap coefficient for each merge class is obtained by using a normal equation created by coefficient learning.
  • the ILF 211 obtains a cost (for example, the cost dist + lambda * coeffBit obtained in step S67 in FIG. 8) by performing a filtering process using a tap coefficient for each of the plurality of merge classes. . Then, the ILF 211 determines the number of merge classes having the minimum cost among the plurality of merge classes as the number of adopted merge classes, and the process proceeds from step S203 to step S204.
  • a cost for example, the cost dist + lambda * coeffBit obtained in step S67 in FIG. 8
  • step S204 the ILF 211 supplies the number of adopted merge classes and the tap coefficients of each adopted merge class to the lossless encoding unit 206 as filter information.
  • the lossless encoding unit 206 sets the filter information from the ILF 211 as a transmission target, and the process proceeds from step S204 to step S205.
  • the filter information set as the transmission target is included in the coded bit stream and transmitted in the predictive coding process performed in step S206 described below.
  • step S205 the ILF 211 updates the number of adoption merges and the tap coefficient used in the class classification prediction process by using the tap coefficient for each merge class of the number of adoption merges and the number of adoption merge classes determined in the latest step S203. Then, the process proceeds to step S206.
  • step S206 the predictive encoding of the original image is performed, and the encoding ends.
  • FIG. 36 is a flowchart illustrating an example of the predictive encoding process in step S206 in FIG.
  • step S211 the A / D conversion unit 201 performs A / D conversion on the original image and supplies it to the rearrangement buffer 202, and the process proceeds to step S212.
  • step S212 the rearrangement buffer 202 stores the original images from the A / D conversion unit 201, rearranges and outputs them in the order of encoding, and the process proceeds to step S213.
  • step S213 the intra prediction unit 214 performs an intra prediction process in an intra prediction mode, and the process proceeds to step S214.
  • the motion prediction / compensation unit 215 performs an inter motion prediction process for performing motion prediction or motion compensation in the inter prediction mode, and the process proceeds to step S215.
  • step S ⁇ b> 215 the prediction image selection unit 216 determines an optimal prediction mode based on each cost function obtained by the intra prediction unit 214 and the motion prediction compensation unit 215. Then, the predicted image selection unit 216 selects and outputs a predicted image in the optimal prediction mode from the predicted image generated by the intra prediction unit 214 and the predicted image generated by the motion prediction compensation unit 215, and performs processing. Proceeds from step S215 to step S216.
  • step S216 the arithmetic unit 203 calculates the residual between the encoding target image, which is the original image output from the rearrangement buffer 202, and the predicted image output from the predicted image selection unit 216. , And the process proceeds to step S217.
  • step S217 the orthogonal transform unit 204 orthogonally transforms the residual from the arithmetic unit 203 and supplies the resulting orthogonal transform coefficient to the quantization unit 205, and the process proceeds to step S218.
  • step S218 the quantization unit 205 quantizes the orthogonal transform coefficients from the orthogonal transform unit 204, and supplies the quantized coefficients obtained by the quantization to the lossless encoding unit 206 and the inverse quantization unit 208, The process proceeds to step S219.
  • step S219 the inverse quantization unit 208 inversely quantizes the quantized coefficient from the quantization unit 205, and supplies the resulting orthogonal transform coefficient to the inverse orthogonal transform unit 209, and the process proceeds to step S220. move on.
  • step S220 the inverse orthogonal transform unit 209 performs an inverse orthogonal transform on the orthogonal transform coefficient from the inverse quantization unit 208, and supplies the resulting residual to the arithmetic unit 210, and the process proceeds to step S221. .
  • step S221 the calculation unit 210 adds the residual from the inverse orthogonal transform unit 209 and the predicted image output from the predicted image selection unit 216, and calculates the element for which the calculation unit 203 has calculated the residual. Generate a decoded image corresponding to the image.
  • the calculation unit 210 supplies the decoded image to the ILF 211, and the process proceeds from step S221 to step S222.
  • step S222 the ILF 211 performs a filtering process as a class classification prediction process on the decoded image from the calculation unit 210, and supplies a filtered image obtained by the filtering process to the frame memory 212. Then, the process proceeds to step S223.
  • step S222 the same process as that of the class classification prediction filter 110 (FIG. 29) is performed.
  • the ILF 211 classifies the target pixel of the decoded image from the arithmetic unit 210 by the class classification method associated with the number of merge classes adopted in the merge information, and obtains an initial class of the target pixel. Further, the ILF 211 converts the initial class of the target pixel into a merge class according to the merge pattern corresponding to the number of adopted merge classes updated in step S205 in FIG. The ILF 211 acquires the tap coefficient of the merge class of the target pixel from the tap coefficients for each merge class updated in step S205 of FIG.
  • the ILF 211 performs a filtering process as a prediction process of applying a prediction formula configured using a tap coefficient of a merge class of the pixel of interest to the decoded image, and generates a filtered image.
  • the filter image is supplied from the ILF 211 to the frame memory 212.
  • step S223 the frame memory 212 stores the filter image supplied from the ILF 211, and the process proceeds to step S224.
  • the filter image stored in the frame memory 212 is used as a reference image from which a predicted image is generated in steps S213 and S114.
  • the lossless encoding unit 206 encodes the encoded data, which is the quantized coefficient from the quantization unit 205, and generates an encoded bit stream including the encoded data. Further, the lossless encoding unit 206 includes a quantization parameter QP used for quantization in the quantization unit 205, a prediction mode obtained in intra prediction processing in the intra prediction unit 214, and a prediction mode obtained in the motion prediction compensation unit 215. Encoding information such as a prediction mode and motion information obtained by the inter motion prediction process is encoded as necessary, and included in an encoded bit stream.
  • the lossless encoding unit 206 encodes the filter information set as the transmission target in step S203 in FIG. 35 as necessary, and includes the encoded filter information in the encoded bitstream. Then, the lossless encoding unit 206 supplies the encoded bit stream to the accumulation buffer 207, and the process proceeds from step S224 to step S225.
  • step S225 the accumulation buffer 207 accumulates the encoded bit stream from the lossless encoding unit 206, and the process proceeds to step S226.
  • the coded bit stream stored in the storage buffer 207 is appropriately read and transmitted.
  • step S 226 the rate control unit 217 uses the quantization amount of the quantization unit 205 based on the code amount (generated code amount) of the coded bit stream stored in the storage buffer 207 so that overflow or underflow does not occur.
  • the rate of the encoding operation is controlled, and the encoding process ends.
  • FIG. 37 is a block diagram showing a detailed configuration example of the decoding device 170 of FIG.
  • the decoding device 170 includes an accumulation buffer 301, a lossless decoding unit 302, an inverse quantization unit 303, an inverse orthogonal transformation unit 304, an operation unit 305, an ILF 306, a reordering buffer 307, and a D / A conversion unit 308.
  • the decoding device 170 includes a frame memory 310, a selection unit 311, an intra prediction unit 312, a motion prediction compensation unit 313, and a selection unit 314.
  • the accumulation buffer 301 temporarily stores the coded bit stream transmitted from the coding device 160 and supplies the coded bit stream to the lossless decoding unit 302 at a predetermined timing.
  • the lossless decoding unit 302 receives the coded bit stream from the storage buffer 301, and decodes the coded bit stream using a method corresponding to the coding method of the lossless coding unit 206 in FIG.
  • the lossless decoding unit 302 supplies the quantization coefficient as encoded data included in the decoding result of the encoded bit stream to the inverse quantization unit 303.
  • the lossless decoding unit 302 has a function of performing parsing.
  • the lossless decoding unit 302 parses necessary encoding information and filter information included in the decoding result of the encoded bit stream, and supplies the encoded information to the intra prediction unit 312, the motion prediction compensation unit 313, and other necessary blocks. I do. Further, the lossless decoding unit 302 supplies the filter information to the ILF 306.
  • the inverse quantization unit 303 inversely quantizes the quantized coefficient as the encoded data from the lossless decoding unit 302 using a method corresponding to the quantization method of the quantization unit 205 in FIG. 34, and is obtained by the inverse quantization.
  • the orthogonal transform coefficient is supplied to the inverse orthogonal transform unit 304.
  • the inverse orthogonal transform unit 304 performs an inverse orthogonal transform on the orthogonal transform coefficient supplied from the inverse quantization unit 303 using a method corresponding to the orthogonal transform method of the orthogonal transform unit 204 in FIG. It is supplied to the arithmetic unit 305.
  • the operation unit 305 is supplied with the residual from the inverse orthogonal transform unit 304, and is also supplied with a predicted image from the intra prediction unit 312 or the motion prediction compensation unit 313 via the selection unit 314.
  • the operation unit 305 adds the residual from the inverse orthogonal transform unit 304 and the predicted image from the selection unit 314, generates a decoded image, and supplies the decoded image to the ILF 306.
  • $ IFL 306 stores the same merge information as ILF 211 (FIG. 34).
  • the ILF 306 is configured, for example, in the same manner as the class classification prediction filter 110 without a learning function (FIG. 29). It functions as one of an offset filter, a bilateral filter, and an ALF, or two or more filters.
  • the ILF 306 sequentially selects pixels of the decoded image from the calculation unit 305 as target pixels.
  • the ILF 306 performs, for the pixel of interest, the class classification of the class classification method that is associated with the number of adopted merge classes included in the filter information supplied from the lossless decoding unit 302 among the classification methods included in the merge information. And the initial class of the pixel of interest.
  • the ILF 211 converts the initial class of the pixel of interest into a merge class according to the merge pattern corresponding to the number of adopted merge classes among the merge patterns included in the merge information.
  • the ILF 306 acquires the tap coefficient of the merge class of the target pixel among the tap coefficients for each merge class included in the filter information supplied from the lossless decoding unit 302.
  • the ILF 306 selects, from the decoded image, a pixel in the vicinity of the pixel of interest as a prediction tap, and calculates a prediction equation for performing a product-sum operation of the tap coefficient of the class of the pixel of interest and the pixel of the decoded image as the prediction tap Performs a filtering process as a prediction process to be applied to the image data, and generates and outputs a filtered image.
  • the class classification in the ILF 306 for example, similarly to the ILF 211, the class obtained by the class classification of the upper left pixel of 2 ⁇ 2 pixels is adopted as the class of each of the 2 ⁇ 2 pixels. be able to.
  • the filter image output from the ILF 306 is similar to the filter image output from the ILF 211 in FIG. 34, and is supplied to the rearrangement buffer 307 and the frame memory 310.
  • the reordering buffer 307 temporarily stores the filter images supplied from the ILF 306, reorders the frames (pictures) of the filter images from encoding (decoding) order to display order, and supplies the frames to the D / A conversion unit 308. .
  • the D / A conversion unit 308 performs D / A conversion of the filter image supplied from the rearrangement buffer 307, and outputs the filtered image to a display (not shown) for display.
  • the frame memory 310 temporarily stores the filter image supplied from the ILF 306. Further, the frame memory 310 uses the filter image as a reference image to be used for generating a prediction image at a predetermined timing or based on an external request from the intra prediction unit 312, the motion prediction compensation unit 313, or the like. To supply.
  • the selection unit 311 selects a supply destination of the reference image supplied from the frame memory 310.
  • the selection unit 311 supplies the reference image supplied from the frame memory 310 to the intra prediction unit 312.
  • the selection unit 311 supplies the reference image supplied from the frame memory 310 to the motion prediction compensation unit 313.
  • step S302 the lossless decoding unit 302 receives and decodes the coded bit stream supplied from the storage buffer 301, and dequantizes the quantized coefficient as coded data included in the decoding result of the coded bit stream. Supply to the unit 303.
  • step S312 the inverse orthogonal transform unit 304 performs an inverse orthogonal transform on the orthogonal transform coefficient from the inverse quantization unit 303, and supplies the resulting residual to the calculation unit 305, and the process proceeds to step S313. .
  • the ILF 306 performs a filtering process as a prediction process of applying a prediction formula including a tap coefficient of a merge class of the pixel of interest to the decoded image, and generates a filtered image.
  • the filter image is supplied from the ILF 306 to the rearrangement buffer 307 and the frame memory 310.
  • class classification prediction filter 110 (FIG. 29) is used for generating a prediction image of the motion prediction compensation unit 215 and the motion prediction compensation unit 313 in the encoding device 160 and the decoding device 170 in addition to the ILF 211 and the ILF 306, for example. It can be applied to an interpolation filter or the like.
  • one step includes a plurality of processes
  • the plurality of processes included in the one step may be executed by one device or may be shared and executed by a plurality of devices.

Landscapes

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

Abstract

本技術は、処理量を削減するとともに、符号化効率を改善することができるようにする符号化装置、符号化方法、復号装置、及び、復号方法に関する。 符号化装置及び復号装置は、復号画像(局所復号画像)の注目画素に対するクラス分類を行い、そのクラス分類により得られる注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換する。そして、符号化装置及び復号装置は、注目画素のマージクラスのタップ係数と復号画像の画素との積和演算を行う予測式を復号画像に適用するフィルタ処理を行って、フィルタ画像を生成する。本技術は、例えば、画像の符号化及び復号を行う場合に適用することができる。

Description

符号化装置、符号化方法、復号装置、及び、復号方法
 本技術は、符号化装置、符号化方法、復号装置、及び、復号方法に関し、特に、例えば、処理量を削減するとともに、符号化効率を改善することができるようにする符号化装置、符号化方法、復号装置、及び、復号方法に関する。
 HEVC(High Efficiency Video Coding)の後継規格としてFVC(Future Video Coding)の標準化の開始に向けた作業が進められており、画像の符号化及び復号に用いるILF(In Loop Filter)として、デブロッキングフィルタ、適応オフセットフィルタに加えて、バイラテラルフィルタ(Bilateral Filter)、ALF(Adaptive Loop Filter)が検討されている(例えば、非特許文献1を参照)。
 また、既存のALFを改善するフィルタとして、GALF(Geometry Adaptive Loop Filter)が提案されている(例えば、非特許文献2を参照)。
Algorithm description of Joint Exploration Test Model 7 (JEM7), 2017-08-19 Marta Karczewicz, Li Zhang, Wei-Jung Chien, Xiang Li, "Geometry transformation-based adaptive in-loop filter", IEEE Picture Coding Symposium (PCS), 2016.
 GALFでは、複数のクラスで、フィルタ処理に用いるタップ係数を共有して、タップ係数のデータ量を削減するために、クラスをマージするクラスマージ処理が行われる。
 クラスマージ処理では、元のクラス数以下の自然数の各値を、クラスのマージ後のマージクラス数として、各マージクラス数について、クラスをマージする最適なマージパターンが求められる。そして、各マージクラス数についての最適なマージパターンの中から、コストを最小にするマージパターンが、フィルタ処理を行うときに採用する採用マージパターンに決定される。
 以上のように、クラスマージ処理では、元のクラス数以下の自然数の各値を、クラスのマージ後のマージクラス数として、各マージクラス数について、最適なマージパターンを求めるため、処理量が多くなる。さらに、クラスマージ処理で決定された採用マージパターンを、符号化装置から復号装置に伝送する必要があるため、符号化効率が劣化する。
 本技術は、このような状況に鑑みてなされたものであり、処理量を削減するとともに、符号化効率を改善することができるようにするものである。
 本技術の復号装置は、符号化ビットストリームに含まれる符号化データを復号し、復号画像を生成する復号部と、前記復号部により生成された前記復号画像の注目画素に対するクラス分類を行うクラス分類部と、前記クラス分類部により行われたクラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換するマージ変換部と、前記マージ変換部により変換された前記注目画素のマージクラスのタップ係数と前記復号画像の画素との積和演算を行う予測式を前記復号画像に適用するフィルタ処理を行って、フィルタ画像を生成するフィルタ部とを備える復号装置である。
 本技術の復号方法は、符号化ビットストリームに含まれる元画像の符号化データを復号し、復号画像を生成することと、前記復号画像の注目画素に対するクラス分類を行うことと、前記クラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換することと、前記注目画素のマージクラスのタップ係数と前記復号画像の画素との積和演算を行う予測式を前記復号画像に適用するフィルタ処理を行って、フィルタ画像を生成することとを含む復号方法である。
 本技術の復号装置及び復号方法においては、符号化ビットストリームに含まれる元画像の符号化データが復号され、復号画像が生成される。前記復号画像の注目画素に対するクラス分類が行われ、前記クラス分類により得られる前記注目画素の初期クラスが、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換される。そして、前記注目画素のマージクラスのタップ係数と前記復号画像の画素との積和演算を行う予測式を前記復号画像に適用するフィルタ処理を行って、フィルタ画像が生成される。
 本技術の符号化装置は、局所復号された局所復号画像の注目画素に対するクラス分類を行うクラス分類部と、前記クラス分類部により行われたクラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換するマージ変換部と、前記マージ変換部により変換された前記注目画素のマージクラスのタップ係数と前記局所復号画像の画素との積和演算を行う予測式を前記局所復号画像に適用するフィルタ処理を行って、フィルタ画像を生成するフィルタ部と、前記フィルタ部により生成された前記フィルタ画像を用いて、元画像を符号化する符号化部とを備える符号化装置である。
 本技術の符号化方法は、局所復号された局所復号画像の注目画素に対するクラス分類を行うことと、前記クラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換することと、前記注目画素のマージクラスのタップ係数と前記局所復号画像の画素との積和演算を行う予測式を前記局所復号画像に適用するフィルタ処理を行って、フィルタ画像を生成することと、前記フィルタ画像を用いて、元画像を符号化することとを含む符号化方法である。
 本技術の符号化装置及び符号化方法においては、局所復号された局所復号画像の注目画素に対するクラス分類が行われ、前記クラス分類により得られる前記注目画素の初期クラスが、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換される。そして、前記注目画素のマージクラスのタップ係数と前記局所復号画像の画素との積和演算を行う予測式を前記局所復号画像に適用するフィルタ処理を行って、フィルタ画像が生成され、前記フィルタ画像を用いて、元画像が符号化される。
 なお、符号化装置や復号装置は、独立した装置であっても良いし、1つの装置を構成している内部ブロックであっても良い。
 また、符号化装置や復号装置は、コンピュータにプログラムを実行させることにより実現することができる。プログラムは、伝送媒体を介して伝送することにより、又は、記録媒体に記録して、提供することができる。
 本技術によれば、処理量を削減するとともに、符号化効率を改善することができる。
 なお、ここに記載された効果は必ずしも限定されるものではなく、本開示中に記載されたいずれかの効果であってもよい。
GALFのクラス分類を行うクラス分類部10の処理の概要を説明する図である。 注目画素の規定方向(傾斜方向)としてのGALFのdirectionの求め方を説明する図である。 GALFのクラス分類で求められるクラスを説明する図である。 画像を符号化する符号化装置がILFの1つとして有するGALFの処理を説明するフローチャートである。 ステップS21のマージパターン決定処理を説明するフローチャートである。 マージパターンの表現形式の例を説明する図である。 マージクラス数ごとのマージパターンの例を示す図である。 ステップS22の採用マージクラス数決定処理を説明するフローチャートである。 符号化装置から復号装置に伝送されるマージパターンの例を示す図である。 あらかじめ設定されるマージパターンの第1の例を示す図である。 あらかじめ設定されるマージパターンの第1の例を示す図である。 GALFのクラス分類により得られる25クラスの初期クラスを25クラスのマージクラスにマージするマージクラス数25に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを20クラスのマージクラスにマージするマージクラス数20に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを15クラスのマージクラスにマージするマージクラス数15に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを10クラスのマージクラスにマージするマージクラス数10に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを5クラスのマージクラスにマージするマージクラス数5に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを3クラスのマージクラスにマージするマージクラス数3に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを2クラスのマージクラスにマージするマージクラス数2に対応するマージパターンの設定の方法を説明する図である。 GALFのクラス分類により得られる25クラスの初期クラスを1クラスのマージクラスにマージするマージクラス数1に対応するマージパターンの設定の方法を説明する図である。 あらかじめ設定されるマージパターンの第2の例を示す図である。 あらかじめ設定されるマージパターンの第2の例を示す図である。 注目画素の特徴量としてのランキング(Ranking)を用いたクラス分類を説明する図である。 注目画素の特徴量としての画素値を用いたクラス分類を説明する図である。 注目画素の特徴量としての傾斜方向の信頼度を用いたクラス分類を説明する図である。 信頼度を用いたクラス分類で求められる最終クラスを説明する図である。 あらかじめ設定されるマージパターンの第3の例を示す図である。 あらかじめ設定されるマージパターンの第3の例を示す図である。 あらかじめ設定されるマージパターンの第4の例を示す図である。 本技術を適用したクラス分類予測フィルタの構成例を示すブロック図である。 クラス分類予測フィルタ110が行うクラス分類予測処理の例を説明するフローチャートである。 本技術を適用した画像処理システムの一実施の形態の概要を示すブロック図である。 符号化装置160の符号化処理の概要を説明するフローチャートである。 復号装置170の復号処理の概要を説明するフローチャートである。 符号化装置160の詳細な構成例を示すブロック図である。 符号化装置160の符号化処理の例を説明するフローチャートである。 ステップS206の予測符号化処理の例を説明するフローチャートである。 復号装置170の詳細な構成例を示すブロック図である。 復号装置170の復号処理の例を説明するフローチャートである。 ステップS305の予測復号処理の例を説明するフローチャートである。 コンピュータの一実施の形態の構成例を示すブロック図である。
 <技術内容・技術用語をサポートする文献等>
 本願で開示される範囲は、本明細書及び図面に記載されている内容だけではなく、出願当時において公知となっている以下の文献に記載されている内容も含まれる。
 文献1:AVC規格書("Advanced video coding for generic audiovisual services", ITU-T H.264(04/2017))
 文献2:HEVC規格書("High efficiency video coding", ITU-T H.265(12/2016))
 文献3:FVC アルゴリズム解説書(Algorithm description of Joint Exploration Test Model 7 (JEM7), 2017-08-19)
 つまり、上述の文献に記載されている内容もサポート要件を判断する際の根拠となる。例えば、文献1に記載されているQuad-Tree Block Structure、文献3に記載されているQTBT(Quad Tree Plus Binary Tree)やBlock Structureが実施の形態において直接的な記載がない場合でも、本技術の開示範囲内であり、請求の範囲のサポート要件を満たす。また、例えば、パース(Parsing)、シンタックス(Syntax)、セマンティクス(Semantics)等の技術用語についても同様に、実施の形態において直接的な記載がない場合でも、本技術の開示範囲内であり、請求の範囲のサポート要件を満たす。
 また、本明細書において、画像(ピクチャ)の部分領域や処理単位として説明に用いる「ブロック」(処理部を示すブロックではない)は、特に言及しない限り、ピクチャ内の任意の部分領域を示し、その大きさ、形状、および特性等は限定されない。例えば、「ブロック」には、上述の文献1ないし3に記載のTB(Transform Block)、TU(Transform Unit)、PB(Prediction Block)、PU(Prediction Unit)、SCU(Smallest Coding Unit)、CU(Coding Unit)、LCU(Largest Coding Unit)、CTB(Coding Tree Block)、CTU(Coding Tree Unit)、変換ブロック、サブブロック、マクロブロック、タイル、又は、スライス等、任意の部分領域(処理単位)が含まれる。
 また、このようなブロックのサイズを指定するに当たって、直接的にブロックサイズを指定するだけでなく、間接的にブロックサイズを指定するようにしてもよい。例えばサイズを識別する識別情報を用いてブロックサイズを指定するようにしてもよい。また、例えば、基準となるブロック(例えばLCUやSCU等)のサイズとの比または差分によってブロックサイズを指定するようにしてもよい。例えば、シンタックス要素等としてブロックサイズを指定する情報を伝送する場合に、その情報として、上述のような間接的にサイズを指定する情報を用いるようにしてもよい。このようにすることにより、その情報の情報量を低減させることができ、符号化効率を向上させることができる場合がある。また、このブロックサイズの指定には、ブロックサイズの範囲の指定(例えば、許容されるブロックサイズの範囲の指定等)も含む。
 <定義>
 本願では、以下の用語を、以下のように定義する。
 符号化データとは、画像を符号化することにより得られるデータであり、例えば、画像(の残差)を直交変換して量子化することにより得られるデータである。
 符号化ビットストリームとは、符号化データを含むビットストリームであり、必要に応じて、符号化に関する符号化情報を含む。符号化情報には、符号化データを復号するのに必要な情報、すなわち、例えば、符号化で量子化が行われている場合の量子化パラメータ(QP)や、符号化で予測符号化(動き補償)が行われている場合の動きベクトル等が、少なくとも含まれる。
 予測式とは、第1のデータから第2のデータを予測する多項式である。第1のデータ及び第2のデータが、例えば、画像(データ)である場合、予測式は、第1の画像から第2の画像を予測する多項式となる。かかる多項式である予測式の各項は、1個のタップ係数と1個以上の予測タップとの積で構成され、したがって、予測式は、タップ係数と予測タップとの積和演算を行う式である。第1の画像の画素のうちの予測(予測式の演算)に用いるi番目の予測タップとしての画素(の画素値)をxiと、i番目のタップ係数をwiと、第2の画像の画素(の画素値の予測値)をy'と、それぞれ表すとともに、予測式として、1次項のみからなる多項式を採用することとすると、予測式は、式y'=Σwixiで表される。式y'=Σwixiにおいて、Σは、iについてのサメーションを表す。予測式を構成するタップ係数wiは、予測式により得られる値y'の、真値yとの誤差y'-yを統計的に最小にする学習により求められる。タップ係数を求める学習(以下、タップ係数学習ともいう)の方法としては、最小自乗法がある。タップ係数学習では、予測式が適用される第1の画像に相当する、学習の生徒となる生徒データ(予測式への入力xi)としての生徒画像と、第1の画像に予測式を適用した結果として得たい第2の画像に相当する、学習の教師となる教師データ(予測式の演算により求められる予測値の真値y)としての教師画像とを用いて、正規方程式を構成する各項の係数の足し込み(係数のサメーション)を行うことにより、正規方程式が求められ、その正規方程式を解くことにより、予測値y'の自乗誤差の総和(統計的な誤差)を最小にするタップ係数が求められる。
 予測処理とは、第1の画像に、予測式を適用して、第2の画像を予測する処理である。予測処理では、第1の画像の画素(の画素値)を用いて、予測式の演算としての積和演算を行うことにより、第2の画像の予測値が求められる。第1の画像を用いて積和演算を行うことは、第1の画像にフィルタをかけるフィルタ処理ということができ、第1の画像を用いて、予測式の積和演算(予測式の演算としての積和演算)を行う予測処理は、フィルタ処理の一種であるということができる。
 フィルタ画像とは、フィルタ処理の結果得られる画像を意味する。予測処理としてのフィルタ処理により、第1の画像から得られる第2の画像(の予測値)は、フィルタ画像である。
 タップ係数とは、予測式である多項式の各項を構成する係数であり、ディジタルフィルタのタップにおいて、フィルタリングの対象の信号に乗算されるフィルタ係数に相当する。
 予測タップとは、予測式の演算に用いられる画素(の画素値)等の情報であり、予測式において、タップ係数と乗算される。予測タップには、画素(の画素値)そのものの他、画素から求められる値、例えば、あるブロック内の画素(の画素値)の総和や平均値等が含まれる。
 ここで、予測式の演算に用いる予測タップとしての画素等を選択することは、ディジタルフィルタのタップに、入力となる信号を供給する接続線を張る(配する)ことに相当することから、予測式の演算に用いる予測タップとしての画素を選択することを、「予測タップを張る」ともいう。
 クラス分類とは、画素を複数のクラスのうちのいずれかのクラスに分類する(クラスタリングする)ことを意味する。クラス分類は、例えば、注目画素の周辺領域の画素(の画素値)や、注目画素に関係する符号化情報を用いて行うことができる。注目画素に関係する符号化情報としては、例えば、注目画素の量子化に用いられる量子化パラメータや、注目画素にかけられたデブロッキングフィルタに関するDF(Deblocking Filter)情報等がある。DF情報とは、例えば、デブロッキングフィルタにおいて、ストロングフィルタ又はウィークフィルタのうちのいずれが適用されたかや、いずれも適用されなかったといった情報である。
 クラス分類予測処理とは、クラスごとに行われる予測処理としてのフィルタ処理である。クラス分類予測処理の基本的な原理については、例えば、特許第4449489号等に記載されている。
 高次項とは、予測式としての多項式を構成する項のうちの、2個以上の予測タップ(としての画素)の積を有する項である。
 D次項とは、予測式としての多項式を構成する項のうちの、D個の予測タップの積を有する項である。例えば、1次項は、1個の予測タップを有する項であり、2次項は、2個の予測タップの積を有する項である。D次項を構成する予測タップの積において、その積をとる予測タップは、同一の予測タップ(画素)であってもよい。
 D次係数とは、D次項を構成するタップ係数を意味する。
 D次タップとは、D次項を構成する予測タップ(としての画素)を意味する。ある1個の画素が、D次タップであり、かつ、D次タップとは異なるD’次タップであることもある。また、D次タップのタップ構造と、D次タップとは異なるD’次タップのタップ構造とは、同一である必要はない。
 DC(Direct Current)予測式とは、DC項を含む予測式である。
 DC項とは、予測式としての多項式を構成する項のうちの、予測タップとしての画像のDC成分を表す値とタップ係数との積の項である。
 DCタップとは、DC項の予測タップ、すなわち、DC成分を表す値を意味する。
 DC係数とは、DC項のタップ係数を意味する。
 1次予測式とは、1次項のみからなる予測式である。
 高次予測式とは、高次項を含む予測式、すなわち、1次項と2次以上の高次項とからなる予測式や、2次以上の高次項のみからなる予測式である。
 第1の画像の画素のうちの予測に用いるi番目の予測タップ(画素値等)をxiと、i番目のタップ係数をwiと、予測式により求める第2の画像の画素(の画素値の予測値)をyと、それぞれ表すこととすると、1次予測式は、式y=Σwixiで表される。
 また、1次項及び2次項のみからなる高次予測式は、例えば、式y=Σwixi+Σ(Σwj,kxk)xjで表される。
 さらに、例えば、1次予測式にDC項を含ませたDC予測式は、例えば、式Σwixi+wDCBDCBで表される。ここで、wDCBは、DC係数を表し、DCBは、DCタップを表す。
 1次予測式、高次予測式、及び、DC予測式のタップ係数は、いずれも、上述したような最小自乗法によるタップ係数学習を行うことにより求めることができる。
 本実施の形態では、説明を簡単にするため、予測式としては、1次予測式を採用することとする。
 タップ構造とは、(例えば、注目画素の位置を基準とする、)予測タップとしての画素の配置を意味する。タップ構造は、予測タップの張り方、ということもできる。1次予測式が採用される場合、予測タップを構成する画素の位置に、その画素と乗算されるタップ係数を配置した状態を考えると、タップ構造は、タップ係数の配置であるということもできる。そこで、タップ構造とは、注目画素の予測タップを構成する画素の配置、及び、予測タップを構成する画素の位置に、その画素と乗算されるタップ係数を配置した状態でのタップ係数の配置のいずれをも意味することとする。
 (画像の)アクティビティとは、画像の空間的な画素値の変化具合を意味する。
 復号画像とは、元画像を符号化することにより得られる符号化データを復号することにより得られる画像である。復号画像には、復号装置で符号化データを復号することにより得られる画像の他、符号化装置で元画像が予測符号化される場合には、その予測符号化の局所復号で得られる画像も含まれる。すなわち、符号化装置において、元画像が予測符号化される場合には、局所復号において、予測画像と(復号された)残差とが加算されるが、その加算の加算結果は、復号画像である。符号化装置の局所復号にILFが用いられる場合、予測画像と残差との加算結果である復号画像が、ILFのフィルタ処理の対象となるが、ILFのフィルタ処理後の復号画像は、フィルタ画像でもある。
 (画素の)傾斜方向とは、画素値の傾斜の方向、特に、例えば、画素値の傾斜が最大の方向を意味する。なお、画素値の傾斜が最大の方向は、画素値の等高線に直交する方向であり、画素値の等高線の接線方向と直交するので、画素値の等高線の接線方向とは一対一の関係にある。したがって、画素値の傾斜が最大の方向と、画素値の等高線の接線方向とは、等価な情報であり、傾斜方向というときには、画素値の傾斜が最大の方向、及び、画素値の等高線の接線方向のいずれをも含む。本実施の形態では、傾斜方向として、画素値の傾斜が最大の方向を採用することとする。
 規定方向とは、あらかじめ決められた離散的な方向を意味する。方向の表現方法としては、例えば、連続的な角度によって連続的な方向を表現する方法や、水平方向及び垂直方向という2種類の離散的な方向で表現する方法、周囲360度を等角度の8方向に区分して、その8方向の離散的な方向で表現する方法等を採用することができる。規定方向とは、このように、あらかじめ決められた離散的な方向で表現される方向を意味する。例えば、非特許文献2に記載のGALFで用いられるdirectionや、GALFの方向クラスが表す方向(後述するV方向若しくはH方向のいずれかか、又は、D0方向若しくはD1方向のいずれかかの2通りの方向)等が、規定方向の一例である。
 傾斜方向というときには、連続的な角度によって連続的に表現される方向も含まれるし、規定方向も含まれる。すなわち、傾斜方向は、連続的な方向で表現することもできるし、規定方向で表現することもできる。
 傾斜特徴量とは、傾斜方向を表す画像の特徴量である。例えば、各方向のアクティビティや、画像にソーベルフィルタ等をかけて得られる傾斜ベクトル(グラディエント)が、傾斜特徴量の一例である。
 傾斜方向の信頼度とは、何らかの方法で求められた画素の傾斜方向の信頼性(確からしさ)を意味する。
 初期クラスとは、タップ係数学習においてタップ係数が求められるクラスであり、マージされる前のクラスである。
 マージクラスとは、1個(1クラス)以上の初期クラスをマージしたクラスである。
 マージクラス数とは、初期クラスをマージして得られるマージクラスの数である。
 マージパターンとは、初期クラスと、その初期クラスをマージして得られるマージクラスとの対応関係を表し、例えば、初期クラスを表すクラス番号の順番に、そのクラス番号の初期クラスがマージされるマージクラスのクラス番号を配置する表現形式等で表現される。
 以下、本技術の実施の形態を説明する前に、GALFのクラス分類を含むGALFの処理の概要を説明する。
 <GALFのクラス分類の概要>
 図1は、GALFのクラス分類を行うクラス分類部10の処理の概要を説明する図である。
 すなわち、図1は、JVET(Joint Video. Exploration Team)-B0060のクラス分類の概要を示している。
 クラス分類部10は、復号画像(符号化装置での局所復号により得られる復号画像を含む)において、クラス分類の対象となる画素を、順次、注目画素に選択し、注目画素を始点とする複数方向それぞれのアクティビティを、注目画素の傾斜特徴量として求める。
 クラス分類部10では、注目画素を始点とする複数方向として、例えば、注目画素を始点とする垂直方向としての上方向、水平方向としての左方向、左上方向、及び、右上方向の4方向が採用される。
 ここで、図1に示すように、上方向、左方向、左上方向、及び、右上方向を、以下、それぞれ、V方向、H方向、D0方向、及び、D1方向ともいう。また、V方向、H方向、D0方向、及び、D1方向に対して、注目画素(の位置)を対称の中心として点対称の方向(反対方向)を、それぞれ、V'方向、H'方向、D0'方向、及び、D1'方向ともいう。
 画像のアクティビティは、点対称であることが多いため、GALFのクラス分類では、点対称の2方向のアクティビティが、その2方向のうちの1方向のアクティビティによって兼用(代用)される。すなわち、V方向及びV'方向のアクティビティは、V方向のアクティビティによって兼用され、H方向及びH'方向のアクティビティは、H方向のアクティビティによって兼用される。D0方向及びD0'方向のアクティビティは、D0方向のアクティビティによって兼用され、D1方向及びD1'方向のアクティビティは、D1方向のアクティビティによって兼用される。
 V方向、H方向、D0方向、及び、D1方向は、GALFのクラス分類においてアクティビティが求められる方向であるから、アクティビティ算出方向であるということができる。アクティビティ算出方向であるV方向、H方向、D0方向、及び、D1方向は、あらかじめ決められた離散的な方向であるから、規定方向(の一種)である。
 クラス分類部10は、注目画素のD方向(V方向、H方向、D0方向、又は、D1方向を表す)のアクティビティA(D)を、注目画素を含む復号画像に、例えば、ラプラシアンフィルタをかけることで求める。この場合、注目画素のV方向、H方向、D0方向、及び、D1方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)は、例えば、次式に従って求めることができる。
 A(V) = abs((L[y][x]<<1) - L[y-1][x] - L[y+1][x])
 A(H) = abs((L[y][x]<<1) - L[y][x-1] - L[y][x+1])
 A(D0) = abs((L[y][x]<<1) - L[y-1][x-1] - L[y+1][x+1])
 A(D1) = abs((L[y][x]<<1) - L[y+1][x-1] - L[y-1][x+1])
                        ・・・(1)
 ここで、L[y][x]は、復号画像の第y行第x列の位置の画素の画素値(輝度値)を表し、いまの場合、復号画像の第y行第x列の位置の画素が、注目画素である。また、abs(v)は、vの絶対値を表し、v<<bは、vを、bビットだけ左シフトすること(2b倍すること)を表す。
 クラス分類部10は、注目画素の周辺領域内の複数の画素それぞれのアクティビティを同様にして求める。そして、クラス分類部10は、注目画素の周辺領域内の複数の画素それぞれのアクティビティを、V方向、H方向、D0方向、及び、D1方向それぞれごとに加算し、V方向、H方向、D0方向、及び、D1方向それぞれについて、アクティビティの加算値(以下、アクティビティサム(activity summation)ともいう)を求める。
 本実施の形態では、例えば、図1に示すように、注目画素を中心とする横×縦が3×3画素の領域が、傾斜特徴量としてのアクティビティA(D)を総合的に用いる対象とする周辺領域になっており、その周辺領域の3×3画素それぞれの式(1)のアクティビティA(V)を加算し、注目画素のV方向のアクティビティサムsumA(V)が求められる。注目画素のH方向、D0方向、及び、D1方向のアクティビティサムsumA(H)、sumA(D0)、及び、sumA(D1)も同様にして求められる。ここで、周辺領域は、3×3画素の領域に限定されるものではない。傾斜特徴量を総合的に用いる対象とする周辺領域、(ここでは、アクティビティA(D)の加算の対象とする周辺領域)としては、3×3画素の領域の他、注目画素を含む6×6画素の領域、その他の、注目画素を含む任意の領域を採用することができる。
 クラス分類部10は、注目画素のV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)を用いて、注目画素の傾斜方向を表す規定方向としてのGALFのdirectionを求める(設定する)。
 ここで、規定方向としてのGALFのdirectionとは、図1に示すように、2進数で000ないし111、10進数で0ないし7が割り当てられた8方向である。GALFでは、規定方向としてのdirectionとして、H方向とH方向及びD0方向を2等分する方向HD0との間の方向、方向HD0とD0方向との間の方向、D0方向とD方向及びV方向を2等分する方向D0Vとの間の方向、方向D0VとV方向との間の方向、V方向とV方向及びD1方向を2等分する方向VD1との間の方向、方向VD1とD1方向との間の方向、D1方向とD1方向及びH'方向を2等分する方向D1H'との間の方向、並びに、方向D1H'とH'方向との間の方向の、合計で8方向があらかじめ決められている。
 H方向と方向HD0との間の方向には2進数の110が、方向HD0とD0方向との間の方向には2進数の001が、D0方向と方向D0Vとの間の方向には2進数の000が、方向D0VとV方向との間の方向には2進数の010が、V方向と方向VD1との間の方向には2進数の011が、方向VD1とD1方向との間の方向には2進数の100が、D1方向と方向D1H'との間の方向には2進数の101が、方向D1H'とH'方向との間の方向には2進数の111が、それぞれ割り当てられている。なお、GALFでは、上述の8方向それぞれと、その8方向それぞれと点対称の方向とは、同一の方向として扱われる。
 クラス分類部10は、注目画素の規定方向としてのdirectionから、注目画素の傾斜方向を表す方向クラスを求める(設定する)。GALFの方向クラスは、V方向若しくはH方向のいずれかか、又は、D0方向若しくはD1方向のいずれかかの2通りの方向を表す。
 ここで、方向クラスを求めることは、クラス分類部10が行うGALFのクラス分類の一部を構成するので、サブクラス分類ということができる。方向クラスを求めるサブクラス分類を、以下、方向サブクラス分類ともいう。
 クラス分類部10は、注目画素の方向クラス、並びに、V方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素をクラス分類する。
 図2は、注目画素の規定方向(傾斜方向)としてのGALFのdirectionの求め方を説明する図である。
 図2は、GALFのクラス分類において、V方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)を用いて求められる(設定される)MainDir及びSecDirの例を示している。さらに、図2は、GALFのクラス分類で用いられるMainDir及びSecDirとdirectionとの関係、及び、directionとtranspose及びclassとの関係を示す方向クラス分類テーブルを示している。
 クラス分類部10は、V方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)を求めた後、アクティビティサムsumA(H)とsumA(V)とを比較し、大きい方を第1の勝者アクティビティHVhighとするとともに、他方を第1の敗者アクティビティHVlowとする。
 また、クラス分類部10は、アクティビティサムsumA(D0)とsumA(D1)とを比較し、大きい方を第2の勝者アクティビティDhighとするとともに、他方を第2の敗者アクティビティDlowとする。
 そして、クラス分類部10は、第1の勝者アクティビティHVhighと第2の敗者アクティビティDlowとの乗算値HVhigh×Dlowと、第2の勝者アクティビティDhighと第1の敗者アクティビティHVlowとの乗算値Dhigh×HVlowとを比較する。
 乗算値HVhigh×Dlowが、乗算値Dhigh×HVlowより大きい場合、クラス分類部10は、第1の勝者アクティビティHVhighが得られた方向(H方向又はV方向)を、Main Dir(MainDirection)に決定するとともに、第2の勝者アクティビティDhighが得られた方向(D0方向又はD1方向)を、SecDir(Second Direction)に決定する。
 一方、HVhigh×Dlowが、Dhigh×HVlowより大きくない場合、クラス分類部10は、第2の勝者アクティビティDhighが得られた方向を、MainDirに決定するとともに、第1の勝者アクティビティHVhighが得られた方向を、SecDirに決定する。
 図2では、注目画素のMainDir及びSecDirが、それぞれ、D0方向及びV方向になっている。
 クラス分類部10は、方向クラス分類テーブルにおいて、注目画素のMainDir及びSecDirに割り当てられているdirectionを、注目画素の規定方向としてのdirectionに決定する。さらに、クラス分類部10は、方向クラス分類テーブルにおいて、注目画素のdirectionに割り当てられているtranspose及びclassを、注目画素のtranspose及びclassに決定する。
 ここで、GALFでは、フィルタ係数が転置され、フィルタ処理に用いられるが、transposeは、フィルタ係数の転置の仕方を表す。classは、方向クラスを表す。GALFの方向クラスは、10進数の0及び2で表される2通りのクラスである。方向クラスは、注目画素のdirectionと、2進数の010との論理積をとることにより求めることができる。方向クラス0は、傾斜方向がD0方向又はD1方向であることを表し、方向クラス2は、傾斜方向がV方向又はH方向であることを表す。
 図3は、GALFのクラス分類で求められるクラスを説明する図である。
 クラス分類部10が行うGALFのクラス分類では、注目画素は、(最終)クラス0ないし24の25クラスのうちのいずれかに分類される。
 すなわち、クラス分類部10は、注目画素の方向クラス、並びに、V方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)を必要に応じて用いて、注目画素の画素値の傾斜の強度を表す傾斜強度比を求め、その傾斜強度比に応じて、注目画素の傾斜強度比を表すクラスを求める(設定する)。
 ここで、傾斜強度比を表すクラスを求めることは、クラス分類部10が行うGALFのクラス分類の一部を構成するので、サブクラス分類ということができる。傾斜強度比を表すクラスを求めるサブクラス分類を、以下、傾斜強度比サブクラス分類ともいう。サブクラス分類により得られるクラスを、以下、サブクラスともいう。
 注目画素の方向クラス(サブクラス)が、D0方向又はD1方向に対応する方向クラス0である場合、クラス分類部10は、D0方向、及び、D1方向のアクティビティサムsumA(D0)、及び、sumA(D1)の比rd1,d2を、傾斜強度比として求める。
 すなわち、傾斜強度比rd1,d2は、式(2)に従って求められる。
 rd1,d2=max{sumA(D0),sumA(D1)}/min{sumA(D0),sumA(D1)}
                        ・・・(2)
 ここで、max{A, B}は、A及びBのうちの大きい方を表し、min{A, B}は、A及びBのうちの小さい方を表す。
 傾斜強度比rd1,d2が、第1の閾値t1未満である場合、注目画素は、傾斜強度比が極めて小さいノン(None)クラスに傾斜強度比サブクラス分類される。
 傾斜強度比サブクラス分類において、注目画素がノンクラスに分類された場合、クラス分類部10は、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素を、最終的な初期クラス(以下、最終クラスともいう)にクラス分類する。
 すなわち、クラス分類部10は、アクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、アクティビティサムの大きさを表すクラスを求める。
 ここで、アクティビティサムの大きさを表すクラスを求めることは、傾斜強度比サブクラス分類等と同様に、サブクラス分類であり、以下、アクティビティサブクラス分類ともいう。
 アクティビティサブクラス分類では、アクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)のうちの、アクティビティサムsumA(V)及びsumA(H)を用い、アクティビティサブクラス分類により求めるサブクラスであるアクティビティサブクラスへのインデクスclass_idxを求める。
 インデクスclass_idxは、例えば、式class_idx = Clip(0, 15, ((sumA(V)+sumA(H)) * 24) >>13)に従って求められる。ここで、Clip(0, 15, X)は、Xが、0ないし15の範囲内の値となるように、Xをクリップすることを表す。
 アクティビティサブクラス分類では、インデクスclass_idxに応じて、アクティビティサブクラスが求められる。
 すなわち、インデクスclass_idxが0である場合、アクティビティサブクラスは0(Smallクラス)とされ、インデクスclass_idxが1である場合、アクティビティサブクラスは1とされる。また、インデクスclass_idxが2ないし6である場合、アクティビティサブクラスは2とされ、インデクスclass_idxが7ないし14である場合、アクティビティサブクラスは3とされる。そして、インデクスclass_idxが15である場合、アクティビティサブクラスは4(Largeクラス)とされる。
 アクティビティサブクラスが0ないし4である場合、傾斜強度比サブクラス分類においてノンクラスに分類された注目画素は、最終クラス0ないし4にそれぞれクラス分類される。
 傾斜強度比rd1,d2が、第1の閾値t1以上第2の閾値t2未満である場合、注目画素は、傾斜強度比が小さいウイーク(Weak)クラスに傾斜強度比サブクラス分類される。
 傾斜強度比サブクラス分類において、注目画素がウイーククラスに分類された場合、クラス分類部10は、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素を、最終クラスにクラス分類する。
 すなわち、アクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じたアクティビティサブクラス分類により得られるアクティビティサブクラスが、0ないし4である場合、傾斜強度比サブクラス分類においてウイーククラスに分類された注目画素は、最終クラス5ないし9にそれぞれクラス分類される。
 傾斜強度比rd1,d2が、第2の閾値t2以上である場合、注目画素は、傾斜強度比が大きいストロング(Strong)クラスに傾斜強度比サブクラス分類される。
 傾斜強度比サブクラス分類において、注目画素がストロングクラスに分類された場合、クラス分類部10は、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素を、最終クラスにクラス分類する。
 すなわち、アクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じたアクティビティサブクラス分類により得られるアクティビティサブクラスが、0ないし4である場合、傾斜強度比サブクラス分類においてストロングクラスに分類された注目画素は、最終クラス10ないし14にそれぞれクラス分類される。
 一方、注目画素の方向クラスが、V方向又はH方向に対応する方向クラス2である場合、クラス分類部10は、V方向、及び、H方向のアクティビティサムsumA(V)、及び、sumA(H)の比rh,vを、傾斜強度比として求める。
 すなわち、傾斜強度比rh,vは、式(3)に従って求められる。
 rh,v=max{sumA(V),sumA(H)}/min{sumA(V),sumA(H)}
                        ・・・(3)
 傾斜強度比rh,vが、第1の閾値t1未満である場合、注目画素は、傾斜強度比が極めて小さいノン(None)クラスに傾斜強度比サブクラス分類される。
 傾斜強度比サブクラス分類において、注目画素がノンクラスに分類された場合、上述したように、クラス分類部10は、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素を、最終クラス0ないし4のいずれかにクラス分類する。
 傾斜強度比rh,vが、第1の閾値t1以上第2の閾値t2未満である場合、注目画素は、傾斜強度比が小さいウイーク(Weak)クラスに傾斜強度比サブクラス分類される。
 傾斜強度比サブクラス分類において、注目画素がウイーククラスに分類された場合、クラス分類部10は、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素を、最終クラス15ないし19のいずれかにクラス分類する。
 すなわち、アクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じたアクティビティサブクラス分類により得られるアクティビティサブクラスが、0ないし4である場合、傾斜強度比サブクラス分類においてウイークラスに分類された注目画素は、最終クラス15ないし19にそれぞれクラス分類される。
 傾斜強度比rh,vが、第2の閾値t2以上である場合、注目画素は、傾斜強度比が大きいストロング(Strong)クラスに傾斜強度比サブクラス分類される。
 傾斜強度比サブクラス分類において、注目画素がストロングクラスに分類された場合、クラス分類部10は、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素を、最終クラス20ないし24のいずれかにクラス分類する。
 すなわち、アクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じたアクティビティサブクラス分類により得られるアクティビティサブクラスが、0ないし4である場合、傾斜強度比サブクラス分類においてストロングクラスに分類された注目画素は、最終クラス20ないし24にそれぞれクラス分類される。
 ここで、本明細書において、クラスcとは、クラスを特定するクラス番号がcのクラスを意味する。
 <GALFの処理>
 図4は、画像を符号化する符号化装置がILFの1つとして有するGALFの処理を説明するフローチャートである。
 ステップS11において、GALFは、符号化装置において局所復号により得られた(例えば、1ピクチャの)復号画像の画素を、順次、注目画素に選択し、処理は、ステップS12に進む。
 ステップS12では、GALFは、図1ないし図3で説明したように、注目画素のクラス分類を行い、最終クラス0ないし24を24個の初期クラス0ないし24として、注目画素をいずれかの初期クラスに分類して、処理は、ステップS13に進む。
 ステップS13では、GALFは、復号画像と、その復号画像に対する元画像(復号画像に復号された符号化データに符号化された画像)とを用い、初期クラスごとに、タップ係数を求める正規方程式をたてて、処理は、ステップS14に進む。
 ここで、復号画像の画素のうちの予測に用いるi番目の予測タップ(画素値等)をxiと、i番目のタップ係数をwiと、予測式により求める元画像の画素(の画素値の予測値)をyと、それぞれ表すこととする。GALFでは、1次予測式y=Σwixiに従って、元画像の画素yを予測する予測処理としてのフィルタ処理が行われる。この場合、タップ係数wiを求める正規方程式、すなわち、1次予測式y=Σwixiに従って求められる元画像の画素の画素値の予測値yの予測誤差の自乗誤差の総和を最小にするタップ係数wiを求める正規方程式は、式XW=Yで表される。
 いま、各初期クラスのタップ係数の個数が同一のN個であるとすると、式XW=Yにおいて、Yは、元画像の画素の画素値yと、復号画像の画素の画素値(予測タップ)xiとの積の和を要素とするN行1列の行列(列ベクトル)を表す。また、Xは、予測タップxiとxjとの積の和を要素とするN行N列の行列を表し、Wは、タップ係数wiを要素とするN行1列の行列(列ベクトル)を表す。以下、正規方程式XW=YにおけるXを、X行列ともいい、Yを、Yベクトルともいう。
 ステップS14では、GALFは、初期クラスごとの正規方程式を、例えば、コレスキー分解等によって解き、初期クラスごとのタップ係数を求め、処理は、ステップS15に進む。
 ここで、ステップS11ないしS14のようにして、初期クラスごとのタップ係数を求める処理が、タップ係数学習である。
 ステップS15では、GALFは、タップ係数(のデータ量)を削減するために、初期クラスをマージするクラスマージ処理を行い、処理は、ステップS16に進む。
 クラスマージ処理では、ステップS21において、マージパターン決定処理が行われ、ステップS22において、採用マージクラス数決定処理が行われる。
 マージパターン決定処理では、初期クラス数以下の自然数の各値を、マージクラス数として、マージクラス数ごとに最適なマージパターンが決定される。採用マージクラス数決定処理では、マージパターン決定処理で最適なマージパターンが決定されたマージクラス数の中から、タップ係数を用いたフィルタ処理を行うときの、初期クラスからマージクラスへの変換に採用する採用マージクラス数が決定される。
 マージパターン決定処理、及び、採用マージクラス数決定処理の詳細については、後述する。
 ステップS16では、GALFは、GALFフィルタ処理を行い、処理は、ステップS17に進む。
 すなわち、GALFは、復号画像の画素を、順次、注目画素に選択し、注目画素のクラス分類を行う。さらに、GALFは、注目画素のクラス分類により得られる注目画素の初期クラスを、採用マージ数に対応するマージパターンに従って、マージクラスに変換する。そして、GALFは、注目画素のマージクラスのタップ係数を用いた予測式を復号画像に適用するフィルタ処理を行い、すなわち、注目画素のマージクラスのタップ係数wiを用いた1次予測式y=Σwixiを計算し、フィルタ画像の画素値(元画像の画素の画素値の予測値)を求める。
 ここで、GALFフィルタ処理では、マージクラスごとのタップ係数が必要であるが、マージクラスごとのタップ係数は、ステップS21のマージパターン決定処理で求められる。
 ステップS17では、GALFは、採用マージクラス数に対応するマージパターンに従って初期クラスを変換して得られるマージクラスごとのタップ係数、採用マージクラス数、採用マージクラス数に対応するマージパターンを符号化し、処理は、ステップS18に進む。
 ステップS18では、GALFは、復号画像にフィルタ処理を行うかどうかを判定するRD(Rate Distortion)判定を行い、処理は終了する。
 図5は、図4のステップS21のマージパターン決定処理を説明するフローチャートである。
 ステップS31において、GALFは、マージクラス数(を表す変数)Cに、初期値としての初期クラス数(初期クラスのクラス数)Ciniを設定し、処理は、ステップS32に進む。
 ここで、マージクラス数Cが、初期クラス数Ciniである場合、初期クラスのいずれもマージされていない状態であるが、便宜上、0個の初期クラスがマージされた状態として扱う。
 また、GALFにおいて、初期クラス数Ciniは25である。
 ステップS32では、GALFは、マージクラス(を表す変数)cに、0を設定し、処理は、ステップS33に進む。ここで、マージクラス数Cが、初期クラス数Ciniである場合、マージクラスcは、初期クラスcである。
 ステップS33では、GALFは、マージクラスcの(タップ係数を求めるときにたてられた)正規方程式を構成するX行列及びYベクトルを取得し、処理は、ステップS34に進む。
 ここで、マージクラス数Cが、初期クラス数Ciniである場合、マージクラスcは、初期クラスcであるから、マージクラスcの正規方程式は、ステップS13(図4)で得られた初期クラスcの正規方程式である。マージクラス数Cが、初期クラス数Cini未満の値である場合、マージクラスcの正規方程式は、初期クラスcの正規方程式、後述するステップS36で構成された(たてられた)マージクラスcの正規方程式、又は、初期クラスc'の正規方程式、若しくは、ステップS36で構成されたマージクラスc'の正規方程式であって、後述するステップS44でクラス番号がcにソートされた正規方程式である。
 ステップS34では、GALFは、マージクラス(を表す変数)mに、c+1を設定し、処理は、ステップS35に進む。
 ステップS35では、GALFは、ステップS33と同様に、マージクラスmの正規方程式を構成するX行列及びYベクトルを取得し、処理は、ステップS36に進む。
 ステップS36では、GALFは、マージクラスcの正規方程式を構成するX行列と、マージクラスmの正規方程式を構成するX行列との要素どうしを加算する。さらに、GALFは、マージクラスcの正規方程式を構成するYベクトルと、マージクラスmの正規方程式を構成するYベクトルとの要素どうしを加算する。そして、GALFは、加算後のX行列及びYベクトルにより構成される、マージクラスcとmとをマージした新たなマージクラスcの正規方程式をたて、処理は、ステップS36からステップS37に進む。
 ステップS37では、GALFは、加算後のX行列及びYベクトルで構成される新たなマージクラスcの正規方程式を解くことにより、新たなマージクラスcのタップ係数を求め(算出し)、処理は、ステップS38に進む。
 ステップS38では、GALFは、新たなマージクラスcのタップ係数と、Cクラス(C個のマージクラス1, 2, ..., C)のうちのマージクラスc及びm以外のタップ係数とを用いて、復号画像にフィルタ処理を行う。そして、GALFは、フィルタ処理により得られるフィルタ画像の元画像に対する誤差を求め、処理は、ステップS39に進む。
 すなわち、ステップS38では、C個のマージクラス1, 2, ..., Cのうちの、マージクラスc及びmを新たなマージクラスcにマージして得られるC-1個のマージクラスのタップ係数を用いてフィルタ処理を行った場合のフィルタ画像の誤差が求められる。
 ステップS39では、GALFは、マージクラス(のクラス番号)mがC-1に等しいかどうかを判定する。
 ステップS39において、マージクラスmがC-1に等しくないと判定された場合、すなわち、マージクラスmがC-1未満である場合、処理は、ステップS40に進む。ステップS40では、GALFは、マージクラスmを1だけインクリメントして、処理は、ステップS35に戻り、以下、同様の処理が繰り返される。
 一方、ステップS39において、マージクラスmがC-1に等しいと判定された場合、すなわち、マージクラスcと、マージクラスc+1, c+2, ..., Cそれぞれとをマージして、それぞれのマージについてフィルタ画像の誤差が求められた場合、処理は、ステップS41に進む。
 ステップS41では、GALFは、マージクラス(のクラス番号)cがC-2に等しいかどうかを判定する。
 ステップS41において、マージクラスcがC-2に等しくないと判定された場合、すなわち、マージクラスcがC-2未満である場合、処理は、ステップS42に進む。ステップS42では、GALFは、マージクラスcを1だけインクリメントして、処理は、ステップS33に戻り、以下、同様の処理が繰り返される。
 一方、ステップS41において、マージクラスcがC-2に等しいと判定された場合、すなわち、C個のマージクラス1, 2, ..., Cについて、任意の2個のマージクラスをマージするC(C-1)/2通りのマージが行われ、C(C-1)/2通りのマージそれぞれについて、フィルタ画像の誤差が求められた場合、処理は、ステップS43に進む。
 ステップS43では、C個のマージクラス1, 2, ..., Cのうちの任意の2個のマージクラスをマージするC(C-1)/2通りのマージの中で、フィルタ画像の誤差が最小のマージが、マージクラス数をCからC-1にマージする最適なマージであるとして、GALFは、最適なマージの対象となるマージクラスc及びmを、新たなマージクラスcにマージすることを確定し、処理は、ステップS44に進む。すなわち、GALFは、マージクラスmのクラス番号mを、新たなマージクラスcのクラス番号cに設定する。
 ステップS44では、GALFは、クラス番号c+1ないしC-1のうちのmを除くクラス番号を、昇順に、クラス番号c+1ないしC-2に変換し、処理は、ステップS45に進む。
 なお、ステップS43において、クラス番号mはクラス番号cに設定されているので、ステップS44の処理が行われるときには、クラス番号c+1ないしC-1の中に、クラス番号mは、存在しない。
 また、クラス番号c+1ないしC-1のうちのmを除くクラス番号を、昇順に、クラス番号c+1ないしC-2に変換することを、シリーズソートともいう。
 ステップS45では、GALFは、マージクラス数Cを1だけデクリメントして、処理は、ステップS46に進む。
 ステップS46では、Cini個の初期クラスと、マージクラスc及びmを新たなマージクラスcにマージした後のC個のマージクラスとの対応関係を表すマージパターンが、マージクラス数Cの最適なマージパターンであるとして、GALFは、そのマージクラス数Cの最適なマージパターンを、マージクラス数Cに対応するマージパターンとして記憶し、処理は、ステップS47に進む。
 ステップS47では、GALFは、マージクラス数Cが1に等しいかどうかを判定する。
 ステップS47において、マージクラス数Cが1に等しくないと判定された場合、処理は、ステップS32に戻り、以下、同様の処理が繰り返される。
 また、ステップS47において、マージクラス数Cが1に等しいと判定された場合、マージパターン決定処理は、終了する。
 図6は、マージパターンの表現形式の例を説明する図である。
 本実施の形態では、以下のような表現形式で、マージパターンを表現する。
 マージパターンは、初期クラスと、その初期クラスをマージするマージクラスとの対応関係を表し、例えば、初期クラステーブルに配置されたクラス番号の順番に、そのクラス番号のクラスがマージされるマージクラスのクラス番号を配置して表現される。
 初期クラステーブルとは、初期クラスのクラス番号を配置したテーブルである。
 図6のAは、GALFのクラス分類で得られる初期クラスの初期クラステーブルを示している。
 図6のAの初期クラステーブルでは、GALFのクラス分類で得られる25個の初期クラスのクラス番号0ないし24が、昇順に並んでいる。
 図6のBは、マージパターンの例を示している。
 上述したように、マージパターンでは、初期クラステーブルに配置されたクラス番号の順番に、そのクラス番号のクラスがマージされるマージクラスのクラス番号が配置されている。
 したがって、図6のBのマージパターンは、初期クラステーブルの1ないし25番目にクラス番号が配置された初期クラス0ないし24を、マージクラス0, 1, 2, 2, 3, 1, 0, 1, 1, 0, 0, 0, 4, 1, 4, 0, 0, 2, 2, 4, 4, 1, 4, 4, 4に、それぞれマージすることを表す。
 なお、図6では、初期クラステーブル及びマージパターンを、5×5の表形式で表現しているが、初期クラステーブル及びマージパターンの表現形式は、表形式に限定されるものではなく、単に、クラス番号を、カンマやスペースで区切って並べるような表現形式であってもよい。
 また、本実施の形態では、図面において、初期クラステーブルにクラス番号が配置された初期クラスの数(初期クラス数)、及び、マージパターンに従ってマージを行って得られるマージクラスの数(マージクラス数)を、適宜、初期クラステーブル及びマージパターンとしての表の左上に示す。図6のAの初期クラステーブルの左上の数字25は、初期クラス数を表し、図6のBのマージパターンの左上の数字5は、マージクラス数を表す。
 図7は、マージクラス数ごとのマージパターンの例を示す図である。
 すなわち、図7は、GALFのクラス分類で得られる初期クラスの数(初期クラス数)25以下の自然数の各値を、マージクラス数として、各マージクラス数の最適なマージパターンの例を示している。
 GALFのクラス分類で得られる初期クラスをマージする各マージクラス数の最適なマージパターンは、初期クラス数に等しい25個存在する。
 図7において、マージクラス数Cのマージパターンに付されている丸印は、マージクラス数C+1に対応するマージパターンに従って得られるマージクラスの中で、マージクラス数をC+1からCにするマージにより他のマージクラスにマージされるマージクラスを表している。
 例えば、マージクラス数24のマージパターンでは、16番目に配置されたクラス番号6に丸印が付されている。これは、マージクラス数を25から24にするマージにおいて、マージクラス数25のマージパターンの16番目に配置されたクラス番号15のマージクラスが、マージクラス数24のマージパターンの16番目に配置されたクラス番号6のマージクラス(マージクラス数24のマージパターンの7番目に配置されたクラス番号6のマージクラスでもある)にマージされることを表す。
 なお、GALFのクラス分類で得られる初期クラスをマージする25個のマージクラス数に対応するマージパターンのうちの、初期クラス数に等しいマージクラス数25に対応するマージパターンでは、初期クラスのいずれもマージされないが、説明の便宜上、初期クラス数に等しいマージクラス数25に対応するマージパターンは、0個の初期クラスがマージされるマージパターンとして扱う。マージクラス数25に対応するマージパターンは、初期クラステーブルに等しい。
 マージパターン決定処理(図5)では、ステップS43で、マージクラスc及びmを、新たなマージクラスcにマージした後に、ステップS44で、クラス番号のシリーズソートが行われる。そのため、図7の各マージクラス数に対応するマージパターンにおいて、クラス番号の最大値は、マージクラス数Cに応じた値、すなわち、マージクラス数C-1になっている。
 マージパターン決定処理では、マージクラス数Cを1ずつデクリメントしながら、直前のステップS43で確定されたマージにより得られるマージクラス数Cのマージクラスについて、任意の2個のマージクラスをマージするC(C-1)/2通りのマージが行われる。そして、C(C-1)/2通りのマージのうちの、フィルタ画像の誤差を最小にするマージが、マージクラス数C-1への最適なマージとして確定され、そのマージのマージパターンが、マージクラス数C-1に対応するマージパターンとして求められる。
 なお、マージクラス数Cが、GALFのクラス分類で最大の25である場合と、最小の1である場合とについては、マージパターンは、それぞれ、1通りであるため、マージクラス数Cが25である場合、及び、1である場合のそれぞれの1通りのマージパターンが、それぞれ、マージクラス数25に対応するマージパターン、及び、マージクラス数1に対応するマージパターンとなる。
 一方、マージクラス数Cが、2ないし24のいずれかである場合、マージクラス数Cのマージクラスのうちの任意の2個のマージクラスをマージする場合の数は、C(C-1)/2通り存在する。そのため、マージパターン決定処理では、そのC(C-1)/2通りのマージを行い、各マージにより得られるタップ係数を用いてフィルタ処理を行って、フィルタ画像の誤差が求められる。そして、フィルタ画像の誤差を最小にするマージのマージパターンが、マージクラス数C-1に対応するマージクラスに決定される。
 したがって、マージクラス数Cを25から24にするマージでは、25(25-1)/2=300通りのマージを行い、マージクラス数Cを24から23にするマージでは、24(24-1)/2=276通りのマージを行う必要がある。以下同様に、マージクラス数Cを4から3にするマージでは、4(4-1)/2=6通りのマージを行う必要があり、マージクラス数Cを3から2にするマージでは、3(3-1)/2=3通りのマージを行う必要がある。
 マージクラス数Cが1ないし25のそれぞれに対応するマージパターンを決定するには、合計で2600回のマージを行う必要があり、このため、マージパターン決定処理の処理量は多くなる。
 図8は、図4のステップS22の採用マージクラス数決定処理を説明するフローチャートである。
 ステップS61において、GALFは、マージクラス数(を表す変数)Cに、初期クラス数Cini=25を設定し、処理は、ステップS62に進む。
 ステップS62において、GALFは、マージパターン決定処理(図5)で求められたマージクラス数Cに対応するマージパターンを取得(ロード)し、処理は、ステップS63に進む。
 ステップS63では、GALFは、マージクラス数Cに対応するマージパターンに従って、25個の初期クラスを、Cクラスのマージクラス(C個のマージクラス)にマージした場合のCクラス(分)のタップ係数を取得(ロード)し、処理は、ステップS64に進む。
 ここで、マージクラス数Cに対応するマージパターンに従って、25個の初期クラスを、Cクラスのマージクラスにマージした場合のCクラス(マージクラス)のタップ係数は、マージパターン決定処理のステップS37で既に求められている。
 ステップS64では、GALFは、Cクラスのタップ係数を用いたGALFフィルタ処理を行って、処理は、ステップS65に進む。
 すなわち、GALFは、復号画像の画素を、順次、注目画素に選択し、注目画素のクラス分類(注目画素に対するクラス分類)を行う。さらに、GALFは、注目画素のクラス分類により得られる注目画素の初期クラスを、マージクラス数Cに対応するマージパターンに従って、マージクラスに変換する。そして、GALFは、ステップS63で取得したCクラスのタップ係数のうちの、注目画素のマージクラスのタップ係数を用いて、フィルタ処理を行い、フィルタ画像を求める。
 ステップS65では、GALFは、注目画素のマージクラスのタップ係数を用いたフィルタ処理を行って得られるフィルタ画像の、元画像に対する誤差distを求め、処理は、ステップS66に進む。
 ステップS66では、GALFは、復号装置でのGALFフィルタ処理に必要なパラメータ、すなわち、マージクラス数C、マージクラス数Cに対応するマージパターン、及び、そのマージパターンに従って初期クラスをマージして得られるCクラスのタップ係数の符号量coeffBitを求め、処理は、ステップS67に進む。
 ステップS67では、GALFは、誤差distと符号量coeffBitとを用いて、初期クラスをCクラス(マージクラス数C)にマージするCクラスへのマージのコストdist+lambda*coeffBitを求め、処理は、ステップS68に進む。lambdaは、QPに応じて設定される値である。
 ステップS68では、GALFは、マージクラス数Cが1に等しいかどうかを判定する。
 ステップS68において、マージクラス数Cが1に等しくないと判定された場合、処理は、ステップS69に進む。ステップS69では、GALFは、マージクラス数Cを1だけデクリメントして、処理は、ステップS62に戻り、以下、同様の処理が繰り返される。
 また、ステップS68において、マージクラス数Cが1に等しいと判定された場合、処理は、ステップS70に進む。ステップS70では、1クラスないしCiniクラスへのマージのうちの、コストが最小のマージが、GALFフィルタ処理に採用する採用マージとされ、GALFは、採用マージを行うときのマージパターンのマージクラス数を、採用マージクラス数に決定し、採用マージクラス数決定処理は、終了する。
 以上のように、採用マージクラス数決定処理では、マージパターン決定処理(図5)で得られたマージクラス数1ないし25のそれぞれに対応するマージパターンのうちの、コストを最小にするマージパターンのマージクラス数が、採用マージクラス数に決定される。
 GALFでは、採用マージクラス数が1及び25以外の値である場合、25クラスの初期クラスと、採用マージクラス数のマージクラスとの対応関係を表すマージパターンを、符号化装置から復号装置に伝送する必要がある。
 図9は、符号化装置から復号装置に伝送されるマージパターンの例を示す図である。
 図9では、マージパターンは、25個の初期クラスがマージされるマージクラスのクラス番号が設定される配列変数mergeInfo[25]で表されている。
 図9の配列変数mergeInfo[25]において、先頭(左)からi番目の数字jは、クラス番号iの初期クラスを、クラス番号jのマージクラスに変換(マージ)することを表す。
 以上のように、GALFでは、マージクラス数Cが1ないし25のそれぞれに対応するマージパターンを決定するマージパターン決定処理において、2600回のマージを行う必要があり、処理量が多くなる。さらに、GALFでは、マージパターンを、符号化装置から復号装置に伝送する必要がある。
 そこで、本技術では、マージクラス数ごとに、そのマージクラス数に対応するマージパターンをあらかじめ設定しておき、そのあらかじめ設定されたマージパターンに従って、初期クラスをマージクラスに変換する。
 <あらかじめ設定されるマージパターンの例>
 図10及び図11は、あらかじめ設定されるマージパターンの第1の例を示す図である。
 すなわち、図10及び図11は、GALFのクラス分類で得られる25個の初期クラスをマージする、マージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターンの例を示す図である。
 本技術では、上述したように、マージクラス数ごとに、そのマージクラス数に対応するマージパターンをあらかじめ設定しておき、そのあらかじめ設定されたマージパターンに従って、初期クラスをマージクラスに変換する。
 そのため、GALFで行われるマージパターン決定処理を行う必要がなく、処理量を削減することができる。さらに、マージパターンは、マージクラス数ごとにあらかじめ設定されているため、マージクラス数が特定されれば、マージパターンも一意に特定される。したがって、あらかじめ設定されたマージパターンを、符号化装置及び復号装置で共有することで、マージパターンを、符号化装置から復号装置に伝送する必要がなくなり、マージパターンを伝送する必要がない分だけ、符号化効率を改善することができる。
 なお、マージパターンをあらかじめ設定しておくマージクラス数は、連続する自然数である必要はなく、飛び飛びの値の自然数であっても良い。
 マージクラス数ごとのマージパターンは、任意の方法で設定することができるが、マージパターンを、任意の方法で設定すると、フィルタ処理の性能が劣化し、フィルタ画像の画質が低下することがある。ここで、注目画素を初期クラスに分類する所定のクラス分類を行い、その所定のクラス分類により得られる初期クラスを、マージパターンに従って変換し、マージクラスを求めることは、注目画素をマージクラスに分類するクラス分類である捉えることができる。この場合、初期クラスをマージクラスに変換するマージパターンは、マージクラスへのクラス分類の分類ルール(クラス分類法)を決めていると捉えることができる。したがって、マージパターンを設定することは、マージクラスへのクラス分類の分類ルールを決めることにより行うことができる。
 フィルタ処理の性能の劣化は、マージクラス数ごとに、初期クラスを求めるクラス分類に用いられる画素の特徴量等の情報の中で、マージクラスへのクラス分類に影響させる情報や、その情報に対するマージクラス(のサブクラス)の割り当て方(例えば、どの特徴量のどの範囲に、どのマージクラスを割り当てるか)等のマージクラスへのクラス分類の分類ルールを適切に決定して、マージパターンを設定することで抑制することができる。
 そこで、本技術では、フィルタ処理の性能の劣化を抑制することを、マージパターンを設定する設定方針として、その設定方針に反しない設定ルールで、各マージクラス数に対応するマージパターンを設定する。
 マージパターンを設定する設定ルールとしては、マージクラス数ごとのマージパターンを、所定のクラス分類により得られる初期クラスからクラス数が減少していくように設定するリダクション設定を採用することができる。
 また、設定ルールとしては、マージクラス数ごとのマージパターンを、所定のクラス分類により得られる初期クラスをマージするマージパターンと、他のクラス分類により得られる初期クラスをマージするマージパターンとが混在するように設定する混在設定を採用することができる。
 さらに、設定ルールとしては、あらかじめ用意されたマージパターンの設定用の画像を、元画像として符号化した場合の、フィルタ処理に必要なパラメータ(マージクラスごとのタップ係数や採用マージクラス数)の符号量と、フィルタ画像の元画像に対する誤差とのうちの一方又は両方が統計的に最適化されるように、マージクラス数ごとのマージパターンを設定する統計的設定を採用することができる。
 マージパターンの統計的設定では、マージパターンの設定用の画像を元画像として用いて、例えば、GALFで行われるマージパターン決定処理を、あらかじめオフラインで行っておき、そのオフラインで行われたマージパターン決定処理で得られる各マージクラス数に対応するマージパターンをマージクラス数ごとのマージパターンに設定することができる。
 図10及び図11は、マージパターンのリダクション設定の例を示している。
 リダクション設定では、マージクラス数ごとのマージパターンが、所定のクラス分類により得られる初期クラスからクラス数が減少していくように設定される。
 図10及び図11では、所定のクラス分類として、例えば、GALFのクラス分類が採用されている。
 リダクション設定では、所定のクラス分類に用いられる情報のうちのいずれかの情報が優先的に影響するマージクラスが得られるように、マージクラスごとのマージパターンを設定することができる。
 所定のクラス分類が、GALFのクラス分類である場合、GALFのクラス分類に用いられる情報としては、図1ないし図3で説明したように、傾斜強度比、方向クラス、及び、アクティビティサム(アクティビティサブクラス)がある。
 リダクション設定では、例えば、傾斜強度比又はアクティビティサムが優先的に影響するマージクラスが得られるように、マージクラス数ごとのマージパターンを設定することができる。図10及び図11のマージパターンは、傾斜強度比が優先的に影響するマージクラスが得られるようなマージパターンになっている。
 図10において、マージクラス数25に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノン(None)クラス、ウイーク(Weak)クラス、及び、ストロング(Strong)クラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、5サブクラスのいずれかにアクティビティサブクラス分類し、傾斜強度比に応じた傾斜強度比サブクラス分類により得られる傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類することで、全25クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。すなわち、マージクラス数25に対応するマージパターンは、GALFのクラス分類で得られる初期クラスと同一のマージクラスが得られるマージパターンになっている。
 ここで、H/Vクラスは、図1ないし図3で説明した方向クラス2(傾斜方向がV方向又はH方向であることを表すサブクラス)を意味する。D0/D1クラスは、図1ないし図3で説明した方向クラス0(傾斜方向がD0方向又はD1方向であることを表すサブクラス)を意味する。
 図10において、マージクラス数20に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、4サブクラスのいずれかにアクティビティサブクラス分類し、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類することで、全20クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 図10において、マージクラス数15に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、3サブクラスのいずれかにアクティビティサブクラス分類し、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類することで、全15クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 図10において、マージクラス数10に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、2サブクラスのいずれかにアクティビティサブクラス分類し、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類することで、全10クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 図11において、マージクラス数5に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類することで、全5クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 図11において、マージクラス数3に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類することで、全3クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 図11において、マージクラス数2に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、及び、ウイーク/ストロングクラスの2サブクラスのいずれかに傾斜強度比サブクラス分類することで、全2クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 ここで、ウイーク/ストロングクラスは、傾斜強度比に応じてノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類する場合の、ウイーククラスとストロングクラスとを合わせた(マージした)クラスである。
 図11において、マージクラス数1に対応するマージパターンは、注目画素を、1クラスにクラス分類することにより得られるクラスが、マージクラスとして得られるマージパターンになっている。ここで、注目画素を1クラスにクラス分類することは、クラス分類を行わない、つまり、クラスがないと考えることができる。本実施の形態では、注目画素を1クラスにクラス分類する場合のその1クラスを、モノクラスともいう。マージクラス数1に対応するマージパターンは、モノクラスが、マージクラスとして得られるマージパターンである。
 傾斜強度比が優先的に影響するマージクラスが得られる図10及び図11のマージパターンの設定の方法を説明する。
 図12は、GALFのクラス分類により得られる25クラスの初期クラスを25クラスのマージクラスにマージするマージクラス数25に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図12は、図10のマージクラス数25に対応するマージパターンに従って(初期クラスを変換することにより)得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図12の分類ルールによれば、図1ないし図3で説明したGALFのクラス分類と同様に、注目画素は、傾斜強度比に応じて、ノン(None)クラス、ウイーク(Weak)クラス、及び、ストロング(Strong)クラスの3サブクラスのいずれかに傾斜強度比サブクラス分類され、空間特徴量としてのアクティビティサムに応じて、5サブクラスのいずれかにアクティビティサブクラス分類され、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類されることで、マージクラス0ないし24のいずれかにクラス分類される。
 図12の分類ルールにおいて、5サブクラスのいずれかへのアクティビティサブクラス分類では、注目画素は、アクティビティサムから図3で説明したようにして求められるインデクスclass_idxに応じて、インデクスclass_idxが0である場合、アクティビティサブクラス0(Smallクラス)に分類され、インデクスclass_idxが1である場合、アクティビティサブクラス1に分類され、インデクスclass_idxが2ないし6である場合、アクティビティサブクラス2に分類され、インデクスclass_idxが7ないし14である場合、アクティビティサブクラス3に分類され、インデクスclass_idxが15である場合、アクティビティサブクラス4(Largeクラス)に分類される。
 そして、図12の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、アクティビティサブクラスが0であるときには、マージクラス0に分類され、アクティビティサブクラスが1であるときには、マージクラス1に分類され、アクティビティサブクラスが2であるときには、マージクラス2に分類され、アクティビティサブクラスが3であるときには、マージクラス3に分類され、アクティビティサブクラスが4であるときには、マージクラス4に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスが0であるときには、マージクラス5に分類され、アクティビティサブクラスが1であるときには、マージクラス6に分類され、アクティビティサブクラスが2であるときには、マージクラス7に分類され、アクティビティサブクラスが3であるときには、マージクラス8に分類され、アクティビティサブクラスが4であるときには、マージクラス9に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスが0であるときには、マージクラス10に分類され、アクティビティサブクラスが1であるときには、マージクラス11に分類され、アクティビティサブクラスが2であるときには、マージクラス12に分類され、アクティビティサブクラスが3であるときには、マージクラス13に分類され、アクティビティサブクラスが4であるときには、マージクラス14に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスが0であるときには、マージクラス15に分類され、アクティビティサブクラスが1であるときには、マージクラス16に分類され、アクティビティサブクラスが2であるときには、マージクラス17に分類され、アクティビティサブクラスが3であるときには、マージクラス18に分類され、アクティビティサブクラスが4であるときには、マージクラス19に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスが0であるときには、マージクラス20に分類され、アクティビティサブクラスが1であるときには、マージクラス21に分類され、アクティビティサブクラスが2であるときには、マージクラス22に分類され、アクティビティサブクラスが3であるときには、マージクラス23に分類され、アクティビティサブクラスが4であるときには、マージクラス24に分類される。
 図12の分類ルールに従ったクラス分類により得られるマージクラス0ないし24は、GALFのクラス分類により得られる初期クラス0ないし24に、それぞれ一致する。したがって、マージクラス数25に対応するマージパターンとしては、初期クラス0ないし24を、マージクラス0ないし24にそれぞれ変換(マージ)するマージパターンを設定することができる。
 図13は、GALFのクラス分類により得られる25クラスの初期クラスを20クラスのマージクラスにマージするマージクラス数20に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図13は、図10のマージクラス数20に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図13の分類ルールによれば、注目画素は、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類され、空間特徴量としてのアクティビティサムに応じて、4サブクラスのいずれかにアクティビティサブクラス分類され、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類されることで、マージクラス0ないし19のいずれかにクラス分類される。図13の分類ルールは、図12の分類ルールにおけるアクティビティサブクラス0と1とをマージして、アクティビティサブクラスの数を5から4に減少させたルールになっている。
 図13の分類ルールにおいて、4サブクラスのいずれかへのアクティビティサブクラス分類では、注目画素は、アクティビティサムから図3で説明したようにして求められるインデクスclass_idxに応じて、インデクスclass_idxが0又は1である場合、アクティビティサブクラスとしてのスモール(small)クラスに分類され、インデクスclass_idxが2ないし6である場合、アクティビティサブクラスとしてのミドル1(Middle1)クラスに分類され、インデクスclass_idxが7ないし14である場合、アクティビティサブクラスとしてのミドル2(Middle2)クラスに分類され、インデクスclass_idxが15である場合、アクティビティサブクラスとしてのラージ(Large)クラスに分類される。
 図13の分類ルールにおいて、アクティビティサブクラスの数は、初期クラスにおけるアクティビティサブクラスの数5から1だけ減少した4になっている。そして、スモールクラスは、初期クラスにおけるアクティビティサブクラス0及び1に一致し、ミドル1クラス、ミドル2クラス、ラージクラスは、初期クラスにおけるアクティビティサブクラス2, 3, 4にそれぞれ一致する。
 図13の分類ルールでは、アクティビティサムに対するサブクラスの割り当てが、GALFのクラス分類の場合よりも、1サブクラスだけ減少しているので、その分だけ、アクティビティサムは、マージクラスへのクラス分類に影響しなくなる。結果として、図13の分類ルールによれば、傾斜強度比や方向クラスが、アクティビティサムよりも優先的に影響するマージクラスが得られる。
 図13の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス0に分類され、アクティビティサブクラスがミドル1クラスであるときには、マージクラス1に分類され、アクティビティサブクラスがミドル2クラスであるときには、マージクラス2に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス3に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス4に分類され、アクティビティサブクラスがミドル1クラスであるときには、マージクラス5に分類され、アクティビティサブクラスがミドル2クラスであるときには、マージクラス6に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス7に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス8に分類され、アクティビティサブクラスがミドル1クラスであるときには、マージクラス9に分類され、アクティビティサブクラスがミドル2クラスであるときには、マージクラス10に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス11に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス12に分類され、アクティビティサブクラスがミドル1クラスであるときには、マージクラス13に分類され、アクティビティサブクラスがミドル2クラスであるときには、マージクラス14に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス15に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス16に分類され、アクティビティサブクラスがミドル1クラスであるときには、マージクラス17に分類され、アクティビティサブクラスがミドル2クラスであるときには、マージクラス18に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス19に分類される。
 図13の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0及び1に一致し、マージクラス1ないし3は、GALFのクラス分類により得られる初期クラス2ないし4に、それぞれ一致し、マージクラス4は、GALFのクラス分類により得られる初期クラス5及び6に一致し、マージクラス5ないし7は、GALFのクラス分類により得られる初期クラス7ないし9に、それぞれ一致し、マージクラス8は、GALFのクラス分類により得られる初期クラス10及び11に一致し、マージクラス9ないし11は、GALFのクラス分類により得られる初期クラス12ないし14に、それぞれ一致し、マージクラス12は、GALFのクラス分類により得られる初期クラス15及び16に一致し、マージクラス13ないし15は、GALFのクラス分類により得られる初期クラス17ないし19に、それぞれ一致し、マージクラス16は、GALFのクラス分類により得られる初期クラス20及び21に一致し、マージクラス17ないし19は、GALFのクラス分類により得られる初期クラス22ないし24にそれぞれ一致する。
 したがって、マージクラス数20に対応するマージパターンとしては、初期クラス0及び1をマージクラス0に、初期クラス2ないし4それぞれをマージクラス1ないし3それぞれに、初期クラス5及び6をマージクラス4に、初期クラス7ないし9それぞれをマージクラス5ないし7それぞれに、初期クラス10及び11をマージクラス8に、初期クラス12ないし14それぞれをマージクラス9ないし11それぞれに、初期クラス15及び16をマージクラス12に、初期クラス17ないし19それぞれをマージクラス13ないし15それぞれに、初期クラス20及び21をマージクラス16に、初期クラス22ないし24それぞれをマージクラス17ないし19それぞれに、それぞれ変換するマージパターンを設定することができる。
 図14は、GALFのクラス分類により得られる25クラスの初期クラスを15クラスのマージクラスにマージするマージクラス数15に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図14は、図10のマージクラス数15に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図14の分類ルールによれば、注目画素は、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類され、空間特徴量としてのアクティビティサムに応じて、3サブクラスのいずれかにアクティビティサブクラス分類され、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類されることで、マージクラス0ないし14のいずれかにクラス分類される。図14の分類ルールは、図13の分類ルールにおけるアクティビティサブクラスとしてのスモールクラスとミドル1クラスとをマージして、アクティビティサブクラスの数を4から3に減少させたルールになっている。
 図14の分類ルールにおいて、3サブクラスのいずれかへのアクティビティサブクラス分類では、注目画素は、アクティビティサムから図3で説明したようにして求められるインデクスclass_idxに応じて、インデクスclass_idxが0ないし6である場合、アクティビティサブクラスとしてのスモール(small)クラスに分類され、インデクスclass_idxが7ないし14である場合、アクティビティサブクラスとしてのミドル(Middle)クラスに分類され、インデクスclass_idxが15である場合、アクティビティサブクラスとしてのラージ(Large)クラスに分類される。
 図14の分類ルールにおいて、アクティビティサブクラスの数は、初期クラスにおけるアクティビティサブクラスの数5から2だけ減少した3になっている。そして、スモールクラスは、初期クラスにおけるアクティビティサブクラス0ないし2に一致し、ミドルクラス、ラージクラスは、初期クラスにおけるアクティビティサブクラス3, 4に、それぞれ一致する。
 図14の分類ルールでは、アクティビティサムに対するサブクラスの割り当てが、GALFのクラス分類の場合よりも、2サブクラスだけ減少しているので、その分だけ、アクティビティサムは、マージクラスへのクラス分類に影響しなくなる。結果として、図14の分類ルールによれば、傾斜強度比や方向クラスが、アクティビティサムよりも優先的に影響するマージクラスが得られる。
 図14の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス0に分類され、アクティビティサブクラスがミドルクラスであるときには、マージクラス1に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス2に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス3に分類され、アクティビティサブクラスがミドルクラスであるときには、マージクラス4に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス5に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス6に分類され、アクティビティサブクラスがミドルクラスであるときには、マージクラス7に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス8に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス9に分類され、アクティビティサブクラスがミドルクラスであるときには、マージクラス10に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス11に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス12に分類され、アクティビティサブクラスがミドルクラスであるときには、マージクラス13に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス14に分類される。
 図14の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0ないし2に一致し、マージクラス1及び2は、GALFのクラス分類により得られる初期クラス3及び4に、それぞれ一致し、マージクラス3は、GALFのクラス分類により得られる初期クラス5ないし7に一致し、マージクラス4及び5は、GALFのクラス分類により得られる初期クラス8及び9に、それぞれ一致し、マージクラス6は、GALFのクラス分類により得られる初期クラス10ないし12に一致し、マージクラス7及び8は、GALFのクラス分類により得られる初期クラス13及び14に、それぞれ一致し、マージクラス9は、GALFのクラス分類により得られる初期クラス15ないし17に一致し、マージクラス10及び11は、GALFのクラス分類により得られる初期クラス18及び19に、それぞれ一致し、マージクラス12は、GALFのクラス分類により得られる初期クラス20ないし22に一致し、マージクラス13及び14は、GALFのクラス分類により得られる初期クラス23及び24にそれぞれ一致する。
 したがって、マージクラス数15に対応するマージパターンとしては、初期クラス0ないし3をマージクラス0に、初期クラス3及び4それぞれをマージクラス1及び2それぞれに、初期クラス5ないし7をマージクラス3に、初期クラス8及び9それぞれをマージクラス4及び5それぞれに、初期クラス10ないし12をマージクラス6に、初期クラス13及び14それぞれをマージクラス7及び8それぞれに、初期クラス15ないし17をマージクラス9に、初期クラス18及び19それぞれをマージクラス10及び11それぞれに、初期クラス20ないし22をマージクラス12に、初期クラス23及び24それぞれをマージクラス13及び14それぞれに、それぞれ変換するマージパターンを設定することができる。
 図15は、GALFのクラス分類により得られる25クラスの初期クラスを10クラスのマージクラスにマージするマージクラス数10に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図15は、図10のマージクラス数10に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図15の分類ルールによれば、注目画素は、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類され、空間特徴量としてのアクティビティサムに応じて、2サブクラスのいずれかにアクティビティサブクラス分類され、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類されることで、マージクラス0ないし14のいずれかにクラス分類される。図15の分類ルールは、図14の分類ルールにおけるアクティビティサブクラスとしてのミドルクラスとラージクラスとをマージして、アクティビティサブクラスの数を3から2に減少させたルールになっている。
 図15の分類ルールにおいて、2サブクラスのいずれかへのアクティビティサブクラス分類では、注目画素は、アクティビティサムから図3で説明したようにして求められるインデクスclass_idxに応じて、インデクスclass_idxが0ないし6である場合、アクティビティサブクラスとしてのスモール(small)クラスに分類され、インデクスclass_idxが7ないし15である場合、アクティビティサブクラスとしてのラージ(Large)クラスに分類される。
 図15の分類ルールにおいて、アクティビティサブクラスの数は、初期クラス(図3)におけるアクティビティサブクラスの数5から3だけ減少した2になっている。そして、スモールクラスは、初期クラス(図3)におけるアクティビティサブクラス0ないし2に一致し、ラージクラスは、初期クラスにおけるアクティビティサブクラス3及び4に一致する。
 図15の分類ルールでは、アクティビティサムに対するサブクラスの割り当てが、GALFのクラス分類の場合よりも、3サブクラスだけ減少しているので、その分だけ、アクティビティサムは、マージクラスへのクラス分類に影響しなくなる。結果として、図15の分類ルールによれば、傾斜強度比や方向クラスが、アクティビティサムよりも優先的に影響するマージクラスが得られる。
 図15の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス0に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス1に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス2に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス3に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがD0/D1クラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス4に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス5に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス6に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス7に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがH/Vクラスである場合、注目画素は、アクティビティサブクラスがスモールクラスであるときには、マージクラス8に分類され、アクティビティサブクラスがラージクラスであるときには、マージクラス9に分類される。
 図15の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0ないし2に一致し、マージクラス1は、GALFのクラス分類により得られる初期クラス3及び4に一致し、マージクラス2は、GALFのクラス分類により得られる初期クラス5ないし7に一致し、マージクラス3、GALFのクラス分類により得られる初期クラス8及び9に一致し、マージクラス4は、GALFのクラス分類により得られる初期クラス10ないし12に一致し、マージクラス5は、GALFのクラス分類により得られる初期クラス13及び14に一致し、マージクラス6は、GALFのクラス分類により得られる初期クラス15ないし17に一致し、マージクラス7は、GALFのクラス分類により得られる初期クラス18及び19に一致し、マージクラス8は、GALFのクラス分類により得られる初期クラス20ないし22に一致し、マージクラス9は、GALFのクラス分類により得られる初期クラス23及び24に一致する。
 したがって、マージクラス数10に対応するマージパターンとしては、初期クラス0ないし3をマージクラス0に、初期クラス3及び4をマージクラス1に、初期クラス5ないし7をマージクラス2に、初期クラス8及び9をマージクラス3それぞれに、初期クラス10ないし12をマージクラス4に、初期クラス13及び14をマージクラス5に、初期クラス15ないし17をマージクラス6に、初期クラス18及び19をマージクラス7に、初期クラス20ないし22をマージクラス8に、初期クラス23及び24をマージクラス9に、それぞれ変換するマージパターンを設定することができる。
 図16は、GALFのクラス分類により得られる25クラスの初期クラスを5クラスのマージクラスにマージするマージクラス数5に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図16は、図11のマージクラス数10に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図16の分類ルールによれば、注目画素は、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類され、傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類されることで、マージクラス0ないし4のいずれかにクラス分類される。図16の分類ルールは、図15の分類ルールにおけるアクティビティサブクラスとしてのスモールクラスとラージクラスとをマージして、アクティビティサブクラスの数を2から1に減少させたルールになっている。
 したがって、図16の分類ルールでは、空間特徴量としてのアクティビティサムは、マージクラスへのクラス分類に影響しない。すなわち、図16の分類ルールでは、傾斜強度比、方向クラス、及び、アクティビティサムのうちの、傾斜強度比と方向クラスとだけが、マージクラスへのクラス分類に影響する。
 図16の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、マージクラス0に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがD0/D1クラスである場合、注目画素は、マージクラス1に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがD0/D1クラスである場合、注目画素は、マージクラス2に分類される。
 傾斜強度比サブクラスがウイーククラスで、方向クラスがH/Vクラスである場合、注目画素は、マージクラス3に分類される。
 傾斜強度比サブクラスがストロングクラスで、方向クラスがH/Vクラスである場合、注目画素は、マージクラス4に分類される。
 図16の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0ないし4に一致し、マージクラス1は、GALFのクラス分類により得られる初期クラス5ないし9に一致し、マージクラス2は、GALFのクラス分類により得られる初期クラス10ないし14に一致し、マージクラス3、GALFのクラス分類により得られる初期クラス15ないし19に一致し、マージクラス4は、GALFのクラス分類により得られる初期クラス20ないし24に一致する。
 したがって、マージクラス数5に対応するマージパターンとしては、初期クラス0ないし4をマージクラス0に、初期クラス5ないし9をマージクラス1に、初期クラス10ないし14をマージクラス2に、初期クラス15ないし19をマージクラス3それぞれに、初期クラス20ないし24をマージクラス4に、それぞれ変換するマージパターンを設定することができる。
 図17は、GALFのクラス分類により得られる25クラスの初期クラスを3クラスのマージクラスにマージするマージクラス数3に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図17は、図11のマージクラス数3に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図17の分類ルールによれば、注目画素は、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類されることで、マージクラス0ないし2のいずれかにクラス分類される。図17の分類ルールは、図16の分類ルールにおける方向クラスとしてのD0/D1クラスとH/Vクラスとをマージして、方向クラスの数を2から1に減少させたルールになっている。
 したがって、図17の分類ルールでは、方向クラス及び空間特徴量としてのアクティビティサムは、マージクラスへのクラス分類に影響しない。すなわち、図17の分類ルールでは、傾斜強度比、方向クラス、及び、アクティビティサムのうちの、傾斜強度比だけが、マージクラスへのクラス分類に影響する。
 図17の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、マージクラス0に分類される。
 傾斜強度比サブクラスがウイーククラスである場合、注目画素は、マージクラス1に分類され、傾斜強度比サブクラスがストロングクラスである場合、注目画素は、マージクラス2に分類される。
 図17の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0ないし4に一致し、マージクラス1は、GALFのクラス分類により得られる初期クラス5ないし9及び15ないし19に一致し、マージクラス2は、GALFのクラス分類により得られる初期クラス10ないし14及び20ないし24に一致する。
 したがって、マージクラス数3に対応するマージパターンとしては、初期クラス0ないし4をマージクラス0に、初期クラス5ないし9及び15ないし19をマージクラス1に、初期クラス10ないし14及び20ないし24をマージクラス2に、それぞれ変換するマージパターンを設定することができる。
 図18は、GALFのクラス分類により得られる25クラスの初期クラスを2クラスのマージクラスにマージするマージクラス数2に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図18は、図11のマージクラス数2に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図18の分類ルールによれば、注目画素は、傾斜強度比に応じて、ノンクラス、及び、ウイーク/ストロングクラスの2サブクラスのいずれかに傾斜強度比サブクラス分類されることで、マージクラス0及び1のいずれかにクラス分類される。図18の分類ルールは、図17の分類ルールにおける傾斜強度比サブクラスとしてのウイーククラスとストロングクラスとをマージして、傾斜強度比サブクラスの数を3から2に減少させたルールになっている。
 図18の分類ルールにおいて、傾斜強度比サブクラス分類により得られる傾斜強度比サブクラスの数は、初期クラスにおける傾斜強度比サブクラスの数3から減少した2になっている。図18の分類ルールにおけるノンクラスは、初期クラスにおけるノンクラスに一致し、ウイーク/ストロングクラスは、初期クラスにおけるウイーククラス及びストロングクラスに一致する。
 したがって、図18の分類ルールでは、図17の分類ルールと同様に、方向クラス及び空間特徴量としてのアクティビティサムは、マージクラスへのクラス分類に影響しない。すなわち、図18の分類ルールでは、傾斜強度比、方向クラス、及び、アクティビティサムのうちの、傾斜強度比だけが、マージクラスへのクラス分類に影響する。
 図18の分類ルールによれば、傾斜強度比サブクラスがノンクラスである場合、注目画素は、マージクラス0に分類され、傾斜強度比サブクラスがウイーク/ストロングクラスである場合、注目画素は、マージクラス1に分類される。この場合、注目画素は、テクスチャの画素と、テクスチャ以外の画素とに分類される。
 図18の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0ないし4に一致し、マージクラス1は、GALFのクラス分類により得られる初期クラス5ないし24に一致する。
 したがって、マージクラス数2に対応するマージパターンとしては、初期クラス0ないし4をマージクラス0に、初期クラス5ないし24をマージクラス1に、それぞれ変換するマージパターンを設定することができる。
 図19は、GALFのクラス分類により得られる25クラスの初期クラスを1クラスのマージクラスにマージするマージクラス数1に対応するマージパターンの設定の方法を説明する図である。
 すなわち、図19は、図11のマージクラス数1に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールを示している。
 図19の分類ルールによれば、注目画素は、常に、モノクラスとしてのマージクラス0にクラス分類される。図19の分類ルールは、図18の分類ルールにおける傾斜強度比サブクラスとしてのノンクラスとウイーク/ストロングクラスとをマージして、傾斜強度比サブクラスの数を2から1に減少させたルールになっている。
 図19の分類ルールにおいて、マージクラス0は、GALFのクラス分類により得られる初期クラス0ないし24に一致する。
 したがって、マージクラス数1に対応するマージパターンとしては、初期クラス0ないし24をマージクラス0に変換するマージパターンを設定することができる。
 図10ないし図19に示したマージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターンの設定では、GALFのクラス分類における傾斜強度比サブクラスをなるべくマージしないようにしたため、かかるマージパターンによれば、傾斜強度比が優先的に影響するマージクラスが得られる。
 マージパターンの設定では、以上のように、傾斜強度比が優先的に影響するマージクラスが得られるマージパターンの他、傾斜強度比以外の特徴量、例えば、アクティビティサムが優先的に影響するマージクラスが得られるマージパターンを設定することができる。
 図20及び図21は、あらかじめ設定されるマージパターンの第2の例を示す図である。
 すなわち、図20及び図21は、GALFのクラス分類で得られる25個の初期クラスをマージするマージクラス数25, 15, 10, 5, 4, 3, 2, 1に対応するマージパターンの例を示す図である。
 図20及び図21のマージパターンは、図10及び図11のマージパターンと同様に、リダクション設定により設定される。但し、図10及び図11のマージパターンは、傾斜強度比が優先的に影響するマージクラスが得られるマージパターンになっているが、図20及び図21のマージパターンは、アクティビティサムが優先的に影響するマージクラスが得られるマージパターンになっている。
 図20において、マージクラス数25に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノン(None)クラス、ウイーク(Weak)クラス、及び、ストロング(Strong)クラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、5サブクラス(アクティビティサブクラス0ないし4)のいずれかにアクティビティサブクラス分類し、傾斜強度比に応じた傾斜強度比サブクラス分類により得られる傾斜強度比サブクラスがノンクラス以外である場合、方向クラスに応じて、H/Vクラス及びD0/D1クラスの2サブクラスのいずれかに方向サブクラス分類することで、全25クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。すなわち、マージクラス数25に対応するマージパターンは、GALFのクラス分類で得られる初期クラスと同一のマージクラスが得られるマージパターンになっている。
 図20において、マージクラス数15に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、ウイーククラス、及び、ストロングクラスの3サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、5サブクラスのいずれかにアクティビティサブクラス分類することで、全15クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 マージクラス数15に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールでは、方向クラスが用いられないので、方向クラスは、マージクラスへのクラス分類に影響しない。なお、この点、以下説明する図20及び図21のマージクラス数10, 5, 4, 3, 2, 1のマージパターンについても、同様である。
 図20において、マージクラス数10に対応するマージパターンは、注目画素を、傾斜強度比に応じて、ノンクラス、及び、ウイーク/ストロングクラスの2サブクラスのいずれかに傾斜強度比サブクラス分類し、アクティビティサムに応じて、5サブクラスのいずれかにアクティビティサブクラス分類することで、全10クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 マージクラス数10に対応するマージパターンに従って得られるマージクラスへのクラス分類を行う分類ルールでは、傾斜強度比に対するサブクラスの割り当てが、GALFのクラス分類の場合よりも、1サブクラスだけ減少しているので、その分だけ、傾斜強度比は、マージクラスへのクラス分類に影響しなくなる。結果として、マージクラス数10に対応するマージパターンによれば、アクティビティサムが、傾斜強度比よりも優先的に影響するマージクラスが得られる。なお、この点、以下説明する図20及び図21のマージクラス数5, 4, 3, 2のマージパターンについても、同様である。
 図20において、マージクラス数5に対応するマージパターンは、注目画素を、アクティビティサムに応じて、5サブクラスのいずれかにアクティビティサブクラス分類することで、全5クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 図21において、マージクラス数4に対応するマージパターンは、注目画素を、アクティビティサムに応じて、4サブクラスのいずれかにアクティビティサブクラス分類することで、全4クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 なお、ここでのアクティビティサブクラス分類により得られる4サブクラスとしては、図13で説明したスモールクラス、ミドル1クラス、ミドル2クラス、ラージクラスを採用することができる。
 図21において、マージクラス数3に対応するマージパターンは、注目画素を、アクティビティサムに応じて、3サブクラスのいずれかにアクティビティサブクラス分類することで、全3クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 なお、ここでのアクティビティサブクラス分類により得られる3サブクラスとしては、図14で説明したスモールクラス、ミドルクラス、ラージクラスを採用することができる。
 図21において、マージクラス数2に対応するマージパターンは、注目画素を、アクティビティサムに応じて、2サブクラスのいずれかにアクティビティサブクラス分類することで、全2クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。
 なお、ここでのアクティビティサブクラス分類により得られる2サブクラスとしては、図15で説明したスモールクラス、ラージクラスを採用することができる。
 図21において、マージクラス数1に対応するマージパターンは、常に、モノクラスとしてのマージクラス0が得られるマージパターンになっている。
 以上においては、初期クラスを得るクラス分類(以下、初期クラス分類ともいう)として、GALFのクラス分類を採用することとしたが、初期クラス分類としては、GALFのクラス分類以外のクラス分類を採用することができる。
 図22は、注目画素の特徴量としてのランキング(Ranking)を用いたクラス分類、すなわち、JVET-J0014のクラス分類を説明する図である。
 ランキングを用いたクラス分類では、注目画素のランキングr8(i, j)が、式r8(i, j)=ΣΣ(s'(i, j) < s'(k, l) ? 1 : 0)に従って求められる。
 ここで、式r8(i, j)=ΣΣ(s'(i, j) < s'(k, l) ? 1 : 0)において、(i, j)は、注目画素の位置(例えば、左からi番目で、上からj番目の位置)を表す。s'(i, j)は、位置(i, j)の画素の画素値(例えば、輝度)を表す。右辺の1つ目のサメーション(Σ)は、kをi-1からi+1までの整数に変えてのサメーションを表し、2つ目のサメーションは、lをj-1からj+1までの整数に変えてのサメーションを表す。(X ? 1 : 0)は、Xが真である場合に1をとり、Xが偽である場合に0をとることを表す。
 式r8(i, j)=ΣΣ(s'(i, j) < s'(k, l) ? 1 : 0)によれば、注目画素よりも大きい画素値の画素が、注目画素の周囲に存在するほど、注目画素のランキングr8(i, j)は大になる。r8(i, j)は、0ないし8の範囲の整数値をとる。
 ランキングを用いたクラス分類では、注目画素のカテゴリが求められる。例えば、式s'(i, j)<=T1が満たされる場合、注目画素のカテゴリは(カテゴリ)0とされる。式T1<s'(i, j)<=T2が満たされる場合、注目画素のカテゴリは1とされ、式T2<s'(i, j)が満たされる場合、注目画素のカテゴリは2とされる。
 なお、注目画素のカテゴリは、その他、以下のようにして求めることができる。
 すなわち、式|v(i, j)| <= T3が満たされる場合、注目画素のカテゴリを(カテゴリ)0とし、式T3 < |v(i, j)| <= T4が満たされる場合、注目画素のカテゴリを1とし、式 |v(i, j)| > T4が満たされる場合、注目画素のカテゴリを2とすることができる。
 ここで、T1, T2, T3, T4は、あらかじめ設定される閾値である。T1及びT2は、式T1 < T2の関係があり、T3及びT4は、式T3 < T4の関係がある。また、v(i, j)は、式v(i, j) = 4 * s'(i, j) - (s'(i-1, j) + s'(i+1, j) +s'(i, j+1) + s'(i, j-1))で表される。
 ランキングを用いたクラス分類では、注目画素のランキングr8(i, j)及びカテゴリを用いて、注目画素のクラスD1 R(i, j)が求められる。注目画素のカテゴリが0である場合、クラス番号D1 R(i, j) = r8(i, j)のクラスが、注目画素のクラスとして求められる。注目画素のカテゴリが1である場合、クラス番号D1 R(i, j) = r8(i, j) + 9のクラスが、注目画素のクラスとして求められる。注目画素のカテゴリが2である場合、クラス番号D1 R(i, j) = r8(i, j) + 18のクラスが、注目画素のクラスとして求められる。
 以上のようにして、ランキングを用いたクラス分類では、注目画素は、クラス0ないし26の27クラスのうちのいずれかにクラス分類される。
 ランキングを用いたクラス分類により得られるクラスを初期クラスとする初期クラステーブルの例を、図22に示す。図22の初期クラステーブルは、横軸をr8(i, j)とするとともに、縦軸をカテゴリとしたテーブルになっている。
 図23は、注目画素の特徴量としての画素値を用いたクラス分類、すなわち、JVET-J0018のクラス分類を説明する図である。
 画素値を用いたクラス分類では、画素値のダイナミックレンジが、例えば、同一の大きさのバンドに区切られる。注目画素の画素値が、いずれのバンドに属するかによって、注目画素がクラス分類される。
 図23では、画素値のダイナミックレンジが、256=28レベルであり、8レベルの大きさのバンドによって、32個のバンドに区切られている。そして、0からのクラス番号が、画素値の小さいバンドから割り当てられている。画素値を用いたクラス分類では、注目画素は、その注目画素の画素値が属するバンドに割り当てられたクラス番号のクラスに分類される。
 この場合、注目画素は、クラス0ないし31の32クラスのうちのいずれかにクラス分類される。
 図24は、注目画素の特徴量としての傾斜方向の信頼度を用いたクラス分類を説明する図である。
 信頼度を用いたクラス分類では、例えば、GALFと同様に、注目画素の規定方向としてのdirectionが求められる(設定される)。
 すなわち、信頼度を用いたクラス分類では、復号画像にラプラシアンフィルタを適用することで、周辺領域としての、例えば、注目画素を中心とする横×縦が3×3画素それぞれのV方向、H方向、D0方向、及び、D1方向の4方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)が求められる。
 さらに、信頼度を用いたクラス分類は、注目画素について、周辺領域としての3×3画素のアクティビティA(D)を4方向それぞれごとに加算することで、4方向それぞれのアクティビティサムsumA(H)、sumA(D0)、及び、sumA(D1)が求められる。
 そして、信頼度を用いたクラス分類では、注目画素についての4方向それぞれのアクティビティサムsumA(H)、sumA(D0)、及び、sumA(D1)に対して、図2で説明したように、MainDir及びSecDirが求められ(設定され)、方向クラス分類テーブルにおいて、そのMainDir及びSecDirに割り当てられているdirectionが、注目画素の規定方向として求められる(設定される)。
 また、信頼度を用いたクラス分類は、注目画素について、傾斜方向の度数分布が生成される。
 すなわち、信頼度を用いたクラス分類では、復号画像にラプラシアンフィルタを適用することで、注目画素を含む度数分布生成領域としての、例えば、注目画素を中心とする横×縦が3×3画素それぞれのV方向、H方向、D0方向、及び、D1方向の4方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)が求められる。
 ここで、度数分布生成領域とは、規定方向の度数分布の生成に用いられる画素の領域である。ここでは、説明を簡単にするため、度数分布生成領域は、周辺領域と一致する領域とする。度数分布生成領域が、周辺領域と一致する場合、度数分布生成領域内の3×3画素それぞれの4方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)としては、注目画素の規定方向としてのdirectionを求めるときに求められた周辺領域内の3×3画素それぞれの4方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)をそのまま用いることができる。
 信頼度を用いたクラス分類では、例えば、図1で説明したGALFの8方向のdirectionを、度数分布の階級を表す規定方向として、注目画素について、度数分布生成領域内の3×3画素の4方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)に対して求められる(設定される)GALFのdirectionで表される規定方向を対象に、その規定方向の度数をカウントすることで、規定方向の度数分布が生成される。
 すなわち、信頼度を用いたクラス分類では、4方向それぞれのアクティビティサムsumA(H)、sumA(D0)、及び、sumA(D1)に代えて、4方向それぞれのアクティビティA(V), A(H), A(D0)、及び、 A(D1)を用いて、度数分布生成領域内の3×3画素それぞれについて、図2で説明したように、MainDir及びSecDirが求められる。さらに、信頼度を用いたクラス分類では、度数分布生成領域内の3×3画素それぞれについて、図2で説明したように、MainDir及びSecDirに割り当てられているdirectionが、画素の規定方向として求められる。
 そして、信頼度を用いたクラス分類では、以上のようにして、度数分布生成領域内の3×3画素それぞれについて求められた(設定された)規定方向の度数をカウントすることにより、注目画素についての規定方向の度数分布が生成される。
 その後、信頼度を用いたクラス分類では、注目画素についての規定方向の度数分布において、注目画素の規定方向としてのdirection(の階級)の度数に対応する値が、注目画素の規定方向の信頼度として求められる(設定される)。
 図24では、注目画素の規定方向は、GALFの8方向のdirectionとしての規定方向のうちの、規定方向000(10進数で0(2進数で000)が割り当てられた規定方向)であり、注目画素についての規定方向の度数分布において、規定方向000の度数に対応する値が、注目画素の規定方向の信頼度として求められる(設定される)。
 信頼度を用いたクラス分類では、例えば、注目画素の規定方向の信頼度を用い、例えば、GALFのクラス分類を利用して、注目画素が、GALFのクラス分類と同様の最終クラス0ないし24の25クラスのうちのいずれかに分類される。
 なお、ここでは、注目画素の傾斜方向としての規定方向の信頼度を、度数分布生成領域の画素の傾斜方向の度数分布を用いて求めることとしたが、注目画素の傾斜方向の信頼度としては、その他、例えば、注目画素の傾斜方向を表すベクトルと、注目画素の周辺の複数の画素の傾斜方向を表すベクトルそれぞれとの内積の絶対値又は自乗の総和に対応する値、その他の、注目画素の傾斜方向の確からしさを表す値等を採用することができる。
 図25は、信頼度を用いたクラス分類で求められる最終クラスを説明する図である。
 信頼度を用いたクラス分類では、GALFのクラス分類と同様に、方向サブクラス分類が行われる。但し、信頼度を用いたクラス分類では、注目画素の規定方向としてのdirectionの他、その規定方向の信頼度にも応じて、方向サブクラス分類が行われる。
 そのため、図25では、方向クラスについては、方向クラス0(D0/D1クラス)及び2(H/Vクラス)の他、信頼度が低いことを表すノン(None)クラスが用意されている。
 注目画素の規定方向の信頼度が、閾値p未満である場合、信頼度を用いたクラス分類では、注目画素が、ノンクラスの方向クラスに方向サブクラス分類される。そして、信頼度を用いたクラス分類では、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、GALFのクラス分類と同様に、注目画素が、最終クラス0ないし4のいずれかにクラス分類される。
 注目画素の規定方向の信頼度が、閾値p以上である場合、信頼度を用いたクラス分類では、GALFのクラス分類と同様に、注目画素の規定方向としてのdirectionに応じて、注目画が、方向クラス0又は2に方向サブクラス分類される。
 方向サブクラス分類において、注目画素が方向クラス0又は2に分類された場合、信頼度を用いたクラス分類では、GALFのクラス分類と同様に、式(2)又は式(3)の傾斜強度比が求められる。そして、その傾斜強度比に応じて、注目画素の傾斜強度比を表すクラスを求める傾斜強度比サブクラス分類が行われる。
 その後は、図3で説明したGALFのクラス分類と同様に、方向クラス0又は2、傾斜強度比サブクラス分類の結果得られるノンクラス、ウイーククラス、又は、ストロングクラス、並びに、注目画素の空間特徴量としてのV方向、H方向、D0方向、及び、D1方向のアクティビティサムsumA(V)、sumA(H)、sumA(D0)、及び、sumA(D1)に応じて、注目画素は、最終クラス5ないし24のいずれかにクラス分類される。
 なお、規定方向の信頼度の閾値pは、度数分布生成領域の画素数に応じて設定することができる。例えば、規定方向の信頼度として、規定方向の度数分布の度数そのものを採用する場合において、度数分布生成領域が6×6画素の領域であるときには、閾値pは、例えば、度数分布生成領域の画素数(例えば36画素)の1/4又は1/8に設定することができる。
 図25のクラス分類は、図3のGALFのクラス分類に、傾斜方向(規定方向)の信頼度を導入したクラス分類であるということができる。図25のクラス分類によれば、傾斜方向の信頼度によって、画素が分類されることで、傾斜方向の信頼度が低い場合、すなわち、傾斜方向を表すdirectionの信頼性が低い場合に、そのようなdirectionに応じた方向サブクラス分類によって、画素が方向クラス0又は2に分類されてしまい、画素が傾斜方向に対応していない方向クラスに分類されることを防止することができる。その結果、画素を適切なクラス(最終クラス)に分類し、そのクラスのタップ係数を用いて、適切な予測処理としてのフィルタ処理を行うことができる。したがって、フィルタ処理の性能を改善することができる。
 図26及び図27は、あらかじめ設定されるマージパターンの第3の例を示す図である。
 すなわち、図26及び図27は、図22で説明したランキングを用いたクラス分類で得られる27個の初期クラスをマージするマージクラス数27, 24, 21, 18, 12, 9, 6に対応するマージパターンの例を示す図である。
 図26及び図27のマージパターンは、図10及び図11並びに図20及び図21のマージパターンと同様に、リダクション設定により設定される。
 ここで、ランキングを用いたクラス分類では、注目画素を、ランキングに応じて、ランキングr8(i, j)が0ないし9であることを表す9サブクラスのうちのいずれかにサブクラス分類し、カテゴリに応じて、カテゴリが0ないし2であることを表す3サブクラスのうちのいずれかにサブクラス分類することで、全27クラスに分類する分類ルールが採用されているということができる。
 図26及び図27において、マージクラス数27に対応するマージパターンは、注目画素を、ランキングに応じて、9サブクラスにサブクラス分類し、カテゴリに応じて、3サブクラスにサブクラス分類することで、全27クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。すなわち、マージクラス数27に対応するマージパターンは、ランキングを用いたクラス分類で得られる初期クラスと同一のマージクラスが得られるマージパターンになっている。
 図26及び図27において、マージクラス数24, 21, 18, 12, 9, 6に対応するマージパターンは、注目画素を、ランキングに応じて、8, 7, 6, 4, 3, 2サブクラスにサブクラス分類し、カテゴリに応じて、3サブクラスのうちのいずれかにサブクラス分類することで、全24, 21, 18, 12, 9, 6クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンにそれぞれなっている。
 なお、ランキングを用いたクラス分類で得られる27個の初期クラスをマージするマージパターンのマージクラス数としては、27, 24, 21, 18, 12, 9, 6の他、例えば、15や、3、1を採用することができる。
 マージクラス数15に対応するマージパターンとしては、注目画素を、ランキングに応じて、5サブクラスにサブクラス分類し、カテゴリに応じて、3サブクラスのうちのいずれかにサブクラス分類することで、全15クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンを採用することができる。
 マージクラス数3に対応するマージパターンとしては、注目画素を、カテゴリに応じて、3サブクラスのうちのいずれかにサブクラス分類することで、全3クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンを採用することができる。
 マージクラス数1に対応するマージパターンは、常に、モノクラスとしてのマージクラス0が得られるマージパターンである。
 マージクラス数24, 21, 18, 15, 12, 9, 6, 3に対応するマージパターンによれば、カテゴリが、ランキングよりも優先的に影響するマージクラスが得られる。
 図28は、あらかじめ設定されるマージパターンの第4の例を示す図である。
 すなわち、図28は、図23で説明した画素値を用いたクラス分類で得られる32個の初期クラスをマージするマージクラス数32, 16, 8, 4に対応するマージパターンの例を示す図である。
 図28のマージパターンは、図10及び図11並びに図20及び図21のマージパターンと同様に、リダクション設定により設定される。
 ここで、図23の画素値を用いたクラス分類では、画素値のダイナミックレンジとしての256レベルを32バンドに区切って、注目画素を、注目画素の画素値に応じて、その画素値が属するバンドに割り当てられたクラスに分類することで、全32クラスに分類する分類ルールが採用されているということができる。
 図28において、マージクラス数32に対応するマージパターンは、画素値のダイナミックレンジとしての256レベルを32バンドに区切って、注目画素を、注目画素の画素値に応じて、その画素値が属するバンドに割り当てられたクラスに分類することで、全32クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンになっている。すなわち、マージクラス数32に対応するマージパターンは、画素値を用いたクラス分類で得られる初期クラスと同一のマージクラスが得られるマージパターンになっている。
 図28において、マージクラス数16, 8, 4に対応するマージパターンは、画素値のダイナミックレンジとしての256レベルを16, 8, 4バンドに区切って、注目画素を、注目画素の画素値に応じて、その画素値が属するバンドに割り当てられたクラスに分類することで、全16, 8, 4クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンにそれぞれなっている。
 なお、画素値のダイナミックレンジとしての256レベルを、32, 16, 8, 4バンドに区切る場合、バンドの大きさは、それぞれ8, 16, 32, 64レベルになる。
 また、画素値を用いたクラス分類で得られる32個の初期クラスをマージするマージパターンのマージクラス数としては、32, 16, 8, 4の他、例えば、2や1を採用することができる。
 マージクラス数2に対応するマージパターンとしては、画素値のダイナミックレンジとしての256レベルを2バンドに区切って、注目画素を、注目画素の画素値に応じて、その画素値が属するバンドに割り当てられたクラスに分類することで、全2クラスに分類する分類ルールにより得られるクラスが、マージクラスとして得られるマージパターンを採用することができる。
 マージクラス数1に対応するマージパターンは、常に、モノクラスとしてのマージクラス0が得られるマージパターンである。
 以上のように、各マージクラス数に対応するマージパターンとしては、GALFのクラス分類や、ランキングを用いたクラス分類、画素値を用いたクラス分類、傾斜方向の信頼度を用いたクラス分類等の様々なクラス分類法のクラス分類により得られる初期クラスをマージするマージパターンを採用することができる。
 さらに、各マージクラス数に対応するマージパターンは、混在設定で設定すること、すなわち、所定のクラス分類により得られる初期クラスをマージするマージパターンと、他のクラス分類により得られる初期クラスをマージするマージパターンとが混在するように設定することができる。
 例えば、各マージクラス数に対応するマージパターンは、GALFのクラス分類により得られる初期クラスをマージするマージパターンと、ランキングを用いたクラス分類により得られる初期クラスをマージするマージパターンとが混在するように設定することができる。
 GALFのクラス分類により得られる初期クラスをマージするマージパターンとしては、例えば、図10及び図11に示したマージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターンを採用することができる。
 ランキングを用いたクラス分類により得られる初期クラスをマージするマージパターンとしては、図26及び図27で説明したマージクラス数27, 24, 21, 18, 15, 12, 9, 6, 3, 1に対応するマージパターンを採用することができる。
 但し、GALFのクラス分類により得られる初期クラスをマージするマージパターンとしてのマージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターン(以下、GALFマージパターンともいう)と、ランキングを用いたクラス分類により得られる初期クラスをマージするマージパターンとしてのマージクラス数27, 24, 21, 18, 15, 12, 9, 6, 3, 1に対応するマージパターン(以下、ランキングマージパターンともいう)とが混在する場合には、GALFマージパターンとランキングマージパターンとで、マージクラス数15, 3, 1が重複する。
 GALFマージパターンとランキングマージパターンとで、マージクラス数が重複する場合には、GALFマージパターンとランキングマージパターンとのうちのいずれのマージパターンを優先するかを、あらかじめ設定しておくことができる。例えば、GALFマージパターンを優先する場合には、マージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターンとしては、GALFマージパターンが採用され、マージクラス数27, 24, 21, 18, 12, 9, 6に対応するマージパターンとしては、ランキングマージパターンが採用される。
 また、各マージクラス数に対応するマージパターンは、GALFのクラス分類及びランキングを用いたクラス分類の他、任意の2種類以上のクラス分類法のクラス分類それぞれにより得られる初期クラスをマージするマージパターンが混在するように設定することができる。
 例えば、各マージクラス数に対応するマージパターンは、GALFのクラス分類により得られる初期クラスをマージするマージパターンと、画素値を用いたクラス分類により得られる初期クラスをマージするマージパターンとが混在するように設定することができる。
 GALFのクラス分類により得られる初期クラスをマージするマージパターンとしては、例えば、図10及び図11に示したマージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターンを採用することができる。
 画素値を用いたクラス分類により得られる初期クラスをマージするマージパターンとしては、図28で説明したマージクラス数32, 16, 8, 4, 2, 1に対応するマージパターンを採用することができる。
 但し、GALFのクラス分類により得られる初期クラスをマージするマージパターンとしてのマージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するGALFマージパターンと、画素値を用いたクラス分類により得られる初期クラスをマージするマージパターンとしてのマージクラス数32, 16, 8, 4, 2, 1に対応するマージパターン(以下、画素値マージパターンともいう)とが混在する場合には、GALFマージパターンと画素値マージパターンとで、マージクラス数2, 1が重複する。
 いま、GALFマージパターンと画素値マージパターンとのうちの、例えば、GALFマージパターンを優先することとすると、マージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターンとしては、GALFマージパターンが採用され、マージクラス数32, 16, 8, 4に対応するマージパターンとしては、ランキングマージパターンが採用される。
 なお、以上のように、所定のクラス分類により得られる初期クラスをマージするマージパターンと、他のクラス分類により得られる初期クラスをマージするマージパターンとが混在するように、マージパターンを設定することは、所定のクラス分類により得られる初期クラスをマージするマージパターンのマージクラス数以外のマージクラス数を、他のクラス分類により得られる初期クラスをマージするマージパターンのマージクラス数で補間するように、マージパターンを設定している、ということができる。
 例えば、GALFマージパターンと、画素値マージパターンとが混在する場合、GALFマージパターンのマージクラス数として存在しないマージクラス数32, 16, 8, 4が、画素値マージパターンのマージクラス数32, 16, 8, 4によって補間されている、ということができる。
 <本技術を適用したクラス分類予測フィルタの構成例>
 図29は、本技術を適用したクラス分類予測フィルタの構成例を示すブロック図である。
 クラス分類予測フィルタ110では、クラス分類予測処理が行われる。クラス分類予測処理では、所定のクラス分類が行われ、その所定のクラス分類により得られる初期クラスがマージクラスに変換される。そして、マージクラスのタップ係数を用いた予測式を適用する予測処理としてのフィルタ処理が行われる。
 図29において、クラス分類予測フィルタ110は、クラス分類部111、マージ変換部112、タップ係数取得部113、及び、予測部114を有する。
 クラス分類部111及び予測部114には、フィルタ処理の対象となる対象画像(例えば、復号画像)が供給される。
 クラス分類部111は、対象画像の画素を、順次、注目画素に選択する。クラス分類部111は、注目画素に対して、初期クラスからマージクラスへの変換に採用する採用マージクラス数に対応するクラス分類法のクラス分類を行うことにより、注目画素の初期クラスを求め、マージ変換部112に供給する。
 マージ変換部112は、クラス分類部111からの注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、マージクラスに変換する。すなわち、マージ変換部112は、マージクラス数ごとにあらかじめ設定されたマージパターンのうちの、採用マージクラス数に対応するマージパターンに従って、注目画素の初期クラスを、マージクラスに変換する。マージ変換部112は、注目画素のマージクラスを、タップ係数取得部113に供給する。
 タップ係数取得部113は、マージクラスごとのタップ係数を記憶しており、マージ変換部112からの注目画素のマージクラスに応じて、注目画素の予測処理としてのフィルタ処理に用いるタップ係数を取得する。
 すなわち、タップ係数取得部113は、マージクラスごとのタップ係数(採用マージクラス数分のタップ係数)の中から、マージ変換部112からの注目画素のマージクラスのタップ係数を選択し、予測部114に供給する。
 予測部114は、対象画像に、タップ係数取得部113からの注目画素のマージクラスのタップ係数を用いた予測式を適用する予測処理としてのフィルタ処理を行い、そのフィルタ処理により生成されるフィルタ画像を出力する。
 すなわち、予測部114は、対象画像の画素のうちの、例えば、注目画素の近傍の複数の画素を、注目画素の予測タップとして選択する。さらに、予測部114は、対象画像に、注目画素のクラスのタップ係数で構成される予測式を適用する予測処理を行うことにより、すなわち、注目画素の予測タップとしての画素(の画素値)xnと、注目画素のマージクラスのタップ係数wnとで構成される予測式y'=Σwnxnを演算することにより、注目画素に対する所定の画像(教師画像に相当する画像)(例えば、復号画像に対する元画像)の画素(の画素値)の予測値y'を求める。そして、予測部114は、その予測値y'を画素値とする画像を生成し、フィルタ画像として出力する。
 クラス分類予測フィルタ110において、採用マージクラス数、及び、タップ係数取得部113に記憶させるマージクラスごとのタップ係数は、外部からクラス分類予測フィルタ110に供給することができる。
 また、クラス分類予測フィルタ110には、タップ係数学習を行う学習部121を内蔵させることができる。そして、学習部121では、教師画像及び生徒画像を用いて、マージクラスごとのタップ係数を求め、タップ係数取得部113に記憶させることができる。さらに、学習部121では、採用マージクラス数を決定し、クラス分類部111及びマージ変換部112に供給することができる。
 クラス分類予測フィルタ110が、符号化装置に適用される場合、教師画像として、符号化対象の元画像を採用するとともに、生徒画像として、元画像を符号化して局所復号することにより得られる復号画像を採用することができる。
 学習部121は、生徒画像としての復号画像を用いて、クラス分類部111と同様のクラス分類を行い、そのクラス分類により得られる初期クラスごとに、タップ係数と予測タップとで構成される予測式により求められる教師画像の予測値の予測誤差を統計的に最小にするタップ係数を最小自乗法により求めるタップ係数学習を行う。
 また、学習部121は、複数のマージクラス数それぞれごとにあらかじめ設定されたマージパターン、例えば、図10及び図11で説明したGALFのクラス分類により得られる初期クラスをマージするマージクラス数25, 20, 15, 10, 5, 3, 2, 1に対応するマージパターン等を記憶している。学習部121は、あらかじめ設定された複数のマージクラス数それぞれに対応するマージパターンを用いて、採用マージクラス数決定処理(図8)と同様の処理を行うことにより、あらかじめマージパターンが設定された複数のマージクラス数のうちの、コスト(例えば、図8のステップS67で求められるコストdist+lambda*coeffBit)が最小になるマージクラス数を、採用マージクラス数に決定する。
 さらに、学習部121は、採用マージクラス数決定処理(図8)で採用マージクラス数を決定するコストを求めるためのフィルタ処理であるステップS64の処理を行う前のステップS63において、マージパターン決定処理(図5)のステップS36及びS37と同様の処理を行うことにより、マージクラスごとのタップ係数を求める。
 学習部121は、採用マージクラス数を、クラス分類部111及びマージ変換部112に供給し、採用マージクラス数のマージクラスごとのタップ係数を、タップ係数取得部113に供給する。
 マージ変換部112は、学習部121に設定されているのと同一の複数のマージクラス数それぞれに対応するマージパターンがあらかじめ設定されている。そして、マージ変換部112は、あらかじめ設定された複数のマージクラス数それぞれに対応するマージパターンのうちの、そこに供給される採用マージクラス数に対応するマージパターンに従って、クラス分類部111からの注目画素の初期クラスをマージクラスに変換する。
 マージ変換部112や学習部121に設定された複数のマージクラス数それぞれに対応するマージパターンは、マージクラス数ごとに設定されたマージパターンであるので、マージクラス数によって、マージパターンを一意に特定することができる。さらに、マージクラス数によって一意に特定されるマージパターンに従って変換(マージ)される初期クラスを求めるクラス分類も一意に特定することができる。
 本技術は、マージクラス数と、そのマージクラス数に対応するマージパターンとしてあらかじめ設定されたマージパターンと、そのマージパターンに従って変換される初期クラスを求めるクラス分類のクラス分類法とを対応付けておくことを前提とする。
 いま、マージクラス数と、そのマージクラス数に対応するマージパターンとしてあらかじめ設定されたマージパターンと、そのマージパターンに従って変換される初期クラスを求めるクラス分類のクラス分類法とを対応付けた情報を、マージ情報ということとする。
 本技術を適用した符号化装置及び復号装置は、複数のマージクラス数それぞれのマージ情報を共有する。そして、符号化装置は、複数のマージクラス数から、採用マージクラス数を決定し、復号装置に伝送する。復号装置は、符号化装置からの採用マージクラス数からマージパターンと初期クラスのクラス分類(のクラス分類法)とを特定する。そして、復号装置は、採用マージクラス数から特定されるクラス分類を行い、そのクラス分類により得られる初期クラスを、採用マージクラス数から特定されるマージパターンに従って、マージクラスに変換する。
 図30は、図29のクラス分類予測フィルタ110が行うクラス分類予測処理の例を説明するフローチャートである。
 ステップS111において、クラス分類部111は、対象画像としての復号画像の、注目画素に選択すべき画素を、順次、注目画素に選択し、処理は、ステップS112に進む。
 ステップS112では、クラス分類部111は、採用マージクラス数に対応するクラス分類法で、注目画素のクラス分類を行い、注目画素の初期クラスを求める。クラス分類部111は、注目画素の初期クラスを、マージ変換部112に供給して、処理は、ステップS112からステップS113に進む。
 ステップS113では、マージ変換部112は、採用マージクラス数に対応するマージパターンに従って、クラス分類部111からの注目画素の初期クラスをマージクラスに変換する。マージ変換部112は、注目画素のマージクラスを、タップ係数取得部113に供給し、処理は、ステップS113からステップS114に進む。
 ステップS114では、タップ係数取得部113は、マージクラスごとのタップ係数の中から、マージ変換部112からの注目画素のマージクラスのタップ係数を取得し、処理は、ステップS115に進む。
 ステップS115では、予測部114は、復号画像に、タップ係数取得部113からの注目画素のマージクラスのタップ係数で構成される予測式を適用する予測処理としてのフィルタ処理を行う。
 すなわち、予測部114は、復号画像から、注目画素の予測タップとなる画素を選択し、その予測タップ及び注目画素のマージクラスのタップ係数を用いて構成される1次予測式を演算することにより、注目画素に対する元画像の画素(の画素値)の予測値を求める。そして、予測部114は、その予測値を画素値とする画像を生成し、フィルタ画像として出力して、クラス分類予測処理は終了する。
 <本技術を適用した画像処理システムの一実施の形態>
 図31は、本技術を適用した画像処理システムの一実施の形態の概要を示すブロック図である。
 図31において、画像処理システムは、符号化装置160及び復号装置170を有する。
 符号化装置160は、符号化部161、局所復号部162、及び、フィルタ部163を有する。
 符号化部161には、符号化対象の画像である元画像(データ)が供給されるとともに、フィルタ部163からフィルタ画像が供給される。
 符号化部161は、フィルタ部163からのフィルタ画像を用いて、元画像を、例えば、CU等の所定のブロック単位で(予測)符号化し、その符号化により得られる符号化データを、局所復号部162に供給する。
 すなわち、符号化部161は、フィルタ部163からのフィルタ画像の動き補償を行って得られる元画像の予測画像を、元画像から減算し、その結果得られる残差を符号化する。
 符号化部161には、フィルタ部163からフィルタ情報が供給される。
 符号化部161は、符号化データと、フィルタ部163からのフィルタ情報とを含む符号化ビットストリームを生成して伝送(送信)する。
 局所復号部162には、符号化部161から符号化データが供給される他、フィルタ部163からフィルタ画像が供給される。
 局所復号部162は、符号化部161からの符号化データの局所復号を、フィルタ部163からのフィルタ画像を用いて行い、その結果得られる(局所)復号画像を、フィルタ部163に供給する。
 すなわち、局所復号部162は、符号化部161からの符号化データを残差に復号し、その残差に、フィルタ部163からのフィルタ画像の動き補償を行って得られる元画像の予測画像を加算することで、元画像を復号した復号画像(局所復号画像)を生成する。
 フィルタ部163は、例えば、学習機能付きのクラス分類予測フィルタ110(図29)と同様に構成され、クラス分類部164及びマージ変換部165を含む。
 フィルタ部163は、局所復号部162からの復号画像、及び、その復号画像に対する元画像を、生徒画像及び教師画像として用いてタップ係数学習を行い、クラスごとのタップ係数を求める。
 また、フィルタ部163は、複数のマージクラス数それぞれごとにあらかじめ設定されたマージパターンを用いて、採用マージクラス数決定処理(図8)と同様の処理を行うことにより、あらかじめマージパターンが設定された複数のマージクラス数のうちの、コストが最小になるマージクラス数を、採用マージクラス数に決定する。
 さらに、フィルタ部163は、採用マージクラス数を決定するにあたり、タップ係数学習で求められた正規方程式(のX行列及びYベクトル)を利用して、マージパターン決定処理(図5)のステップS36及びS37と同様の処理を行うことにより、採用マージクラス数のマージクラスごとのタップ係数を求める。
 そして、フィルタ部163は、クラス分類部164において、局所復号部162からの復号画像を用いて、採用マージクラス数に対応するクラス分類法のクラス分類(採用マージクラス数により特定されるクラス分類)を行い、注目画素の初期クラスを求める。さらに、フィルタ部163は、マージ変換部165において、採用マージクラス数に対応するマージパターンに従って、注目画素の初期クラスをマージクラスに変換する。そして、フィルタ部163は、マージ変換部165の変換により得られる注目画素のマージクラスのタップ係数と復号画像の画素との積和演算を行う予測式を復号画像に適用する予測処理としてのフィルタ処理を行う。
 フィルタ部163は、フィルタ処理により得られるフィルタ画像を、符号化部161及び局所復号部162に供給する。さらに、フィルタ部163は、採用マージクラス数、及び、その採用マージクラス数のマージクラスごとのタップ係数を、フィルタ情報として、符号化部161に供給する。
 復号装置170は、パース部171、復号部172、及び、フィルタ部173を有する。
 パース部171は、符号化装置160が伝送する符号化ビットストリームを受信してパースを行い、そのパースにより得られるフィルタ情報を、フィルタ部173に供給する。さらに、パース部171は、符号化ビットストリームに含まれる符号化データを、復号部172に供給する。
 復号部172には、パース部171から符号化データが供給される他、フィルタ部173からフィルタ画像が供給される。
 復号部172は、パース部171からの符号化データの復号を、フィルタ部173からのフィルタ画像を用いて、例えば、CU等の所定のブロック単位で行い、その結果得られる復号画像を、フィルタ部173に供給する。
 すなわち、復号部172は、局所復号部162と同様に、パース部171からの符号化データを残差に復号し、その残差に、フィルタ部173からのフィルタ画像の動き補償を行って得られる元画像の予測画像を加算することで、元画像を復号した復号画像を生成する。
 フィルタ部173は、例えば、学習機能付きでないクラス分類予測フィルタ110(図29)と同様に構成され、クラス分類部174及びマージ変換部175を含む。
 フィルタ部173は、復号部172からの復号画像に、フィルタ部163と同様のフィルタ処理を行い、フィルタ画像を生成して、復号部172に供給する。
 すなわち、フィルタ部173は、クラス分類部174において、復号部172からの復号画像を用いて、パース部171からのフィルタ情報に含まれる採用マージクラス数に対応するクラス分類法のクラス分類を行い、注目画素の初期クラスを求める。さらに、フィルタ部173は、マージ変換部175において、パース部171からのフィルタ情報に含まれる採用マージクラス数に対応するマージパターンに従って、注目画素の初期クラスをマージクラスに変換する。そして、フィルタ部173は、マージ変換部175の変換により得られる注目画素のマージクラスのタップ係数と復号画像の画素との積和演算を行う予測式を復号画像に適用する予測処理としてのフィルタ処理を行う。フィルタ処理に用いられる注目画素のマージクラスのタップ係数は、パース部171からのフィルタ情報に含まれるマージクラスごとのタップ係数から取得される。
 フィルタ部173は、フィルタ処理により得られるフィルタ画像を、復号部172に供給するとともに、元画像を復号した最終的な復号画像として出力する。
 図32は、図31の符号化装置160の符号化処理の概要を説明するフローチャートである。
 図32のフローチャートに従った処理は、例えば、フレーム(ピクチャ)単位で行われる。
 ステップS161において、符号化部161(図31)は、フィルタ部163からのフィルタ画像を用いて、元画像を(予測)符号化し、その符号化により得られる符号化データを、局所復号部162に供給して、処理は、ステップS162に進む。
 ステップS162では、局所復号部162は、符号化部161からの符号化データの局所復号を、フィルタ部163からのフィルタ画像を用いて行い、その結果得られる(局所)復号画像を、フィルタ部163に供給して、処理は、ステップS163に進む。
 ステップS163では、フィルタ部163は、局所復号部162からの復号画像、及び、その復号画像に対する元画像を、生徒画像及び教師画像として用いてタップ係数学習を行い、初期クラスごとのタップ係数を求め、処理は、ステップS164に進む。
 ステップS164では、フィルタ部163は、あらかじめマージパターンが設定された複数のマージクラス数それぞれについて、マージクラス数に対応するマージパターンに従った初期クラスのマージを行い、コストが最小になるマージクラス数を、採用マージ数に決定する。さらに、フィルタ部163は、初期クラスごとのタップ係数を求めるタップ係数学習で得られた正規方程式(のX行列及びYベクトル)を利用して、初期クラスを、採用マージクラス数に対応するマージパターンに従ってマージしたマージクラスごとのタップ係数を、図5のステップS36及びS37で説明したようにして求め、処理は、ステップS164からステップS165に進む。
 ステップS165では、フィルタ部163のクラス分類部164は、採用マージクラス数に対応するクラス分類法で、局所復号部162からの復号画像の注目画素のクラス分類を行い、処理は、ステップS166に進む。
 ステップS166では、フィルタ部163のマージ変換部165は、クラス分類部164のクラス分類により得られる注目画素の初期クラスを、採用マージクラス数に対応するマージパターンに従って、マージクラスに変換し、処理は、ステップS167に進む。
 ステップS167では、フィルタ部163は、ステップS164で求められたマージクラスごとのタップ係数のうちの、注目画素のマージクラスのタップ係数と復号画像の画素との積和演算を行う予測式を復号画像に適用する予測処理としてのフィルタ処理を行い、フィルタ画像を生成する。フィルタ画像は、フィルタ部163から、符号化部161及び局所復号部162に供給される。フィルタ部163から符号化部161及び局所復号部162に供給されるフィルタ画像は、次のフレームを対象として行われるステップS161及びS162の処理で用いられる。
 また、フィルタ部163は、採用マージクラス数、及び、マージクラスごとのタップ係数を、フィルタ情報として、符号化部161に供給する。
 その後、処理は、ステップS167からステップS168に進み、符号化部161は、ステップS161で得られた符号化データと、フィルタ部163からのフィルタ情報としての採用マージクラス数、及び、マージクラスごとのタップ係数とを含む符号化ビットストリームを生成して伝送する。
 図33は、図31の復号装置170の復号処理の概要を説明するフローチャートである。
 図33のフローチャートに従った処理は、例えば、図32の符号化処理と同様に、フレーム単位で行われる。
 ステップS181において、パース部171(図31)は、符号化装置160から伝送されてくる符号化ビットストリームを受信し、符号化ビットストリームに含まれるフィルタ情報としての採用マージクラス数、及び、マージクラスごとのタップ係数をパースして、フィルタ部173に供給する。さらに、パース部171は、符号化ビットストリームに含まれる符号化データを、復号部172に供給し、処理は、ステップS181からステップS182に進む。
 ステップS182では、復号部172は、パース部171からの符号化データの復号を、フィルタ部173からのフィルタ画像を用いて行い、その結果得られる復号画像を、フィルタ部173に供給して、処理は、ステップS183に進む。
 ステップS183では、フィルタ部173のクラス分類部174は、復号部172からの復号画像の注目画素に対して、パース部171からの採用マージクラス数に対応するクラス分類法のクラス分類を行い、処理は、ステップS184に進む。
 ステップS184では、フィルタ部173のマージ変換部175は、クラス分類部174のクラス分類により得られる注目画素の初期クラスを、パース部171からの採用マージクラス数に対応するマージパターンに従って、マージクラスに変換し、処理は、ステップS185に進む。
 ステップS185では、フィルタ部173は、パース部171からのマージクラスごとのタップ係数を用いて、復号部172からの復号画像に、クラス分類予測処理としてのフィルタ処理を行い、フィルタ画像を生成する。
 すなわち、フィルタ部173は、パース部171からのマージクラスごとのタップ係数のうちの、注目画素のマージクラスのタップ係数と復号画像の画素との積和演算を行う予測式を復号画像に適用する予測処理としてのフィルタ処理を行い、フィルタ画像を生成する。
 フィルタ画像は、フィルタ部173から復号部172に供給されるとともに、元画像を復号した最終的な復号画像として出力される。
 フィルタ部173から復号部172に供給されるフィルタ画像は、復号画像の次のフレームを対象として行われるステップS182の処理で用いられる。
 <符号化装置160の構成例>
 図34は、図31の符号化装置160の詳細な構成例を示すブロック図である。
 なお、以下説明するブロック図については、図が煩雑になるのを避けるため、各ブロックの処理で必要となる情報(データ)を供給する線の記載を、適宜省略する。
 図34において、符号化装置160は、A/D変換部201、並べ替えバッファ202、演算部203、直交変換部204、量子化部205、可逆符号化部206、及び、蓄積バッファ207を有する。さらに、符号化装置160は、逆量子化部208、逆直交変換部209、演算部210、ILF211、フレームメモリ212、選択部213、イントラ予測部214、動き予測補償部215、予測画像選択部216、及び、レート制御部217を有する。
 A/D変換部201は、アナログ信号の元画像を、ディジタル信号の元画像にA/D変換し、並べ替えバッファ202に供給して記憶させる。
 並べ替えバッファ202は、元画像のフレームを、GOP(Group Of Picture)に応じて、表示順から符号化(復号)順に並べ替え、演算部203、イントラ予測部214、動き予測補償部215、及び、ILF211に供給する。
 演算部203は、並べ替えバッファ202からの元画像から、予測画像選択部216を介してイントラ予測部214又は動き予測補償部215から供給される予測画像を減算し、その減算により得られる残差(予測残差)を、直交変換部204に供給する。
 例えば、インター符号化が行われる画像の場合、演算部203は、並べ替えバッファ202から読み出された元画像から、動き予測補償部215から供給される予測画像を減算する。
 直交変換部204は、演算部203から供給される残差に対して、離散コサイン変換やカルーネン・レーベ変換等の直交変換を施す。なお、この直交変換の方法は任意である。直交変換部204は、直交交換により得られる直交変換係数を量子化部205に供給する。
 量子化部205は、直交変換部204から供給される直交変換係数を量子化する。量子化部205は、レート制御部217から供給される符号量の目標値(符号量目標値)に基づいて量子化パラメータQPを設定し、直交変換係数の量子化を行う。なお、この量子化の方法は任意である。量子化部205は、量子化された直交変換係数である符号化データを、可逆符号化部206に供給する。
 可逆符号化部206は、量子化部205からの符号化データとしての量子化された直交変換係数を所定の可逆符号化方式で符号化する。直交変換係数は、レート制御部217の制御の下で量子化されているので、可逆符号化部206の可逆符号化により得られる符号化ビットストリームの符号量は、レート制御部217が設定した符号量目標値となる(又は符号量目標値に近似する)。
 また、可逆符号化部206は、符号化装置160での予測符号化に関する符号化情報のうちの、復号装置170での復号に必要な符号化情報を、各ブロックから取得する。
 ここで、符号化情報としては、例えば、イントラ予測やインター予測の予測モード、動きベクトル等の動き情報、符号量目標値、量子化パラメータQP、ピクチャタイプ(I,P,B)、CU(Coding Unit)やCTU(Coding Tree Unit)の情報等がある。
 例えば、予測モードは、イントラ予測部214や動き予測補償部215から取得することができる。また、例えば、動き情報は、動き予測補償部215から取得することができる。
 可逆符号化部206は、符号化情報を取得する他、ILF211から、そのILF211でのフィルタ処理に関するフィルタ情報としてのクラスごとのタップ係数を取得する。
 可逆符号化部206は、符号化情報及びフィルタ情報を、例えば、CAVLC(Context-Adaptive Variable Length Coding)やCABAC(Context-Adaptive Binary Arithmetic Coding)等の可変長符号化又は算術符号化その他の可逆符号化方式で符号化し、符号化後の符号化情報及びフィルタ情報、及び、量子化部205からの符号化データを含む符号化ビットストリームを生成して、蓄積バッファ207に供給する。
 蓄積バッファ207は、可逆符号化部206から供給される符号化ビットストリームを、一時的に蓄積する。蓄積バッファ207に蓄積された符号化ビットストリームは、所定のタイミングで読み出されて伝送される。
 量子化部205において量子化された直交変換係数である符号化データは、可逆符号化部206に供給される他、逆量子化部208にも供給される。逆量子化部208は、量子化された直交変換係数を、量子化部205による量子化に対応する方法で逆量子化し、その逆量子化により得られる直交変換係数を、逆直交変換部209に供給する。
 逆直交変換部209は、逆量子化部208から供給される直交変換係数を、直交変換部204による直交変換処理に対応する方法で逆直交変換し、その逆直交変換の結果得られる残差を、演算部210に供給する。
 演算部210は、逆直交変換部209から供給される残差に、予測画像選択部216を介してイントラ予測部214又は動き予測補償部215から供給される予測画像を加算し、これにより、元画像を復号した復号画像(の一部)を得て出力する。
 演算部210が出力する復号画像は、ILF211に供給される。
 ILF211は、例えば、学習機能付きのクラス分類予測フィルタ110(図29)と同様に構成され、クラス分類予測処理としてのフィルタ処理を行うことで、デブロッキングフィルタ、適応オフセットフィルタ、バイラテラルフィルタ、ALFのうちの1つ、又は、2以上のフィルタとして機能する。ILF211を、デブロッキングフィルタ、適応オフセットフィルタ、バイラテラルフィルタ、及び、ALFのうちの2以上のフィルタとして機能させる場合、その2以上のフィルタの配置順は任意である。
 ILF211には、演算部210から復号画像が供給される他、並べ替えバッファ202から、復号画像に対する元画像が供給される。
 ILF211は、複数のマージクラス数と、マージクラス数ごとにあらかじめ設定されたマージパターンと、そのマージパターンに従って変換される初期クラスを求めるクラス分類のクラス分類法とを対応付けたマージ情報を記憶している。
 ILF211は、例えば、演算部210からの復号画像、及び、並べ替えバッファ202からの元画像を、それぞれ生徒画像及び教師画像として用いて、タップ係数学習を行い、初期クラスごとのタップ係数を求める。タップ係数学習では、生徒画像としての復号画像を用いて、マージ情報に含まれるクラス分類法でクラス分類が行われ、そのクラス分類により得られる初期クラスごとに、タップ係数と予測タップとで構成される予測式により求められる教師画像としての元画像の予測値の予測誤差を統計的に最小にするタップ係数が、最小自乗法により求められる。
 ILF211は、マージ情報に含まれる複数のマージクラス数それぞれに対応するマージパターンを用いて、採用マージクラス数決定処理(図8)と同様の処理を行うことにより、マージ情報に含まれる複数のマージクラス数のうちの、コスト(例えば、図8のステップS67で求められるコストdist+lambda*coeffBit)が最小になるマージクラス数を、採用マージクラス数に決定する。
 なお、ILF211において、採用マージクラス数決定処理(図8)で採用マージクラス数を決定するコストを求めるためのフィルタ処理であるステップS64の処理を行う前のステップS63では、マージパターン決定処理(図5)のステップS36及びS37と同様に、タップ係数学習で初期クラスごとのタップ係数を求めるときにたてられる正規方程式(のX行列及びYベクトル)を利用して、マージ情報に含まれる複数のマージクラス数それぞれについて、マージクラスごとのタップ係数が求められる。
 ILF211は、採用マージクラス数と、採用マージクラス数のマージクラスごとのタップ係数とを、フィルタ情報として、可逆符号化部206に供給する。
 さらに、ILF211は、例えば、演算部210からの復号画像の画素を、順次、注目画素に選択する。ILF211は、注目画素に対して、マージ情報において採用マージクラス数に対応付けられたクラス分類法のクラス分類を行い、注目画素の初期クラスを求める。
 さらに、ILF211は、注目画素の初期クラスを、採用マージクラス数に対応するマージパターンに従って、マージクラスに変換する。ILF211は、マージクラスごとのタップ係数のうちの、注目画素のマージクラスのタップ係数を取得する(読み出す)。そして、ILF211は、復号画像から、注目画素の近傍の画素を予測タップとして選択し、注目画素のマージクラスのタップ係数と予測タップとしての復号画像の画素との積和演算を行う予測式を復号画像に適用する予測処理としてのフィルタ処理を行い、フィルタ画像を生成する。なお、ILF211でのクラス分類では、例えば、復号画像の2×2画素の左上の画素のクラス分類で得られたクラスを、その2×2画素それぞれのクラスとして採用することができる。
 ILF211で生成されたフィルタ画像は、フレームメモリ212に供給される。
 フレームメモリ212は、ILF211から供給されるフィルタ画像を一時記憶する。フレームメモリ212に記憶されたフィルタ画像は、必要なタイミングで、予測画像の生成に用いられる参照画像として、選択部213に供給される。
 選択部213は、フレームメモリ212から供給される参照画像の供給先を選択する。例えば、イントラ予測部214においてイントラ予測が行われる場合、選択部213は、フレームメモリ212から供給される参照画像を、イントラ予測部214に供給する。また、例えば、動き予測補償部215においてインター予測が行われる場合、選択部213は、フレームメモリ212から供給される参照画像を、動き予測補償部215に供給する。
 イントラ予測部214は、並べ替えバッファ202から供給される元画像と、選択部213を介してフレームメモリ212から供給される参照画像とを用い、例えば、PU(Prediction Unit)を処理単位として、イントラ予測(画面内予測)を行う。イントラ予測部214は、所定のコスト関数(例えば、RDコスト等)に基づいて、最適なイントラ予測モードを選択し、その最適なイントラ予測モードで生成された予測画像を、予測画像選択部216に供給する。また、上述したように、イントラ予測部214は、コスト関数に基づいて選択されたイントラ予測モードを示す予測モードを、可逆符号化部206等に適宜供給する。
 動き予測補償部215は、並べ替えバッファ202から供給される元画像と、選択部213を介してフレームメモリ212から供給される参照画像とを用い、例えば、PUを処理単位として、動き予測(インター予測)を行う。さらに、動き予測補償部215は、動き予測により検出される動きベクトルに応じて動き補償を行い、予測画像を生成する。動き予測補償部215は、あらかじめ用意された複数のインター予測モードで、インター予測を行い、予測画像を生成する。
 動き予測補償部215は、複数のインター予測モードそれぞれについて得られた予測画像の所定のコスト関数に基づいて、最適なインター予測モードを選択する。さらに、動き予測補償部215は、最適なインター予測モードで生成された予測画像を、予測画像選択部216に供給する。
 また、動き予測補償部215は、コスト関数に基づいて選択されたインター予測モードを示す予測モードや、そのインター予測モードで符号化された符号化データを復号する際に必要な動きベクトル等の動き情報等を、可逆符号化部206に供給する。
 予測画像選択部216は、演算部203及び演算部210に供給する予測画像の供給元(イントラ予測部214又は動き予測補償部215)を選択し、その選択した方の供給元から供給される予測画像を、演算部203及び演算部210に供給する。
 レート制御部217は、蓄積バッファ207に蓄積された符号化ビットストリームの符号量に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部205の量子化動作のレートを制御する。すなわち、レート制御部217は、蓄積バッファ207のオーバーフロー及びアンダーフローが生じないように、符号化ビットストリームの目標符号量を設定し、量子化部205に供給する。
 なお、図34において、演算部203ないし可逆符号化部206が図31の符号化部161に、逆量子化部208ないし演算部210が図31の局所復号部162に、ILF211が図31のフィルタ部163に、それぞれ相当する。
 <符号化処理>
 図35は、図34の符号化装置160の符号化処理の例を説明するフローチャートである。
 なお、図35等に示す符号化処理の各ステップの順番は、説明の便宜上の順番であり、実際の符号化処理の各ステップは、適宜、並列的に、必要な順番で行われる。後述する処理についても、同様である。
 符号化装置160において、ILF211は、演算部210から供給される復号画像を一時記憶するとともに、並べ替えバッファ202から供給される、演算部210からの復号画像に対する元画像を一時記憶する。
 そして、符号化装置160(の図示せぬ制御部)は、ステップS201において、現在のタイミングが、フィルタ情報を更新する更新タイミングであるかどうかを判定する。
 ここで、フィルタ情報の更新タイミングは、例えば、1以上のフレーム(ピクチャ)ごとや、1以上のシーケンスごと、1以上のスライスごと、CTU等の所定のブロックの1以上のラインごと等のように、あらかじめ決めておくことができる。
 また、フィルタ情報の更新タイミングとしては、1以上のフレーム(ピクチャ)ごとのタイミングのような周期的(固定的)なタイミングの他、フィルタ画像のS/Nが閾値以下になったタイミング(フィルタ画像の、元画像に対する誤差が閾値以上になったタイミング)や、残差(の絶対値和等)が閾値以上になったタイミング等の、いわば動的なタイミングを採用することができる。
 ここでは、例えば、ILF211が、復号画像及び元画像の1フレームを用いて、タップ係数学習を行うこととし、1フレームごとのタイミングがフィルタ情報の更新タイミングであることとする。
 ステップS201において、現在のタイミングが、フィルタ情報の更新タイミングでないと判定された場合、処理は、ステップS202ないしS204をスキップして、ステップS205に進む。
 また、ステップS201において、現在のタイミングが、フィルタ情報の更新タイミングであると判定された場合、処理は、ステップS202に進み、ILF211は、初期クラスごとのタップ係数を求めるタップ係数学習を行う。
 すなわち、ILF211は、例えば、前回の更新タイミングから、今回の更新タイミングまでの間に記憶した復号画像及び元画像(ここでは、ILF211に供給された最新の1フレームの復号画像及び元画像)を用いて、タップ係数学習を行い、初期クラスごとのタップ係数を求める。
 ILF211は、マージ情報に含まれる複数のマージクラス数それぞれについて、初期クラスをマージクラス数に対応するマージパターンに従ってマージすることによりマージクラスに変換し、図5のステップS36及びS37と同様に、タップ係数学習でたてられた正規方程式を利用して、マージクラスごとのタップ係数を求める。
 さらに、ILF211は、複数のマージクラス数それぞれについて、マージクラスごとのタップ係数を用いてフィルタ処理を行うことにより、コスト(例えば、図8のステップS67で求められるコストdist+lambda*coeffBit)を求める。そして、ILF211は、複数のマージクラス数のうちのコストが最小になるマージクラス数を、採用マージクラス数に決定し、処理は、ステップS203からステップS204に進む。
 ステップS204では、ILF211は、採用マージクラス数と、採用マージクラス数のマージクラスごとのタップ係数とを、フィルタ情報として、可逆符号化部206に供給する。可逆符号化部206は、ILF211からのフィルタ情報を、伝送対象に設定して、処理は、ステップS204からステップS205に進む。伝送対象に設定されたフィルタ情報は、後述するステップS206で行われる予測符号化処理において符号化ビットストリームに含められて伝送される。
 ステップS205では、ILF211が、最新のステップS203で決定された採用マージ数及び採用マージクラス数のマージクラスごとのタップ係数によって、クラス分類予測処理に用いる採用マージ数及びタップ係数を更新し、処理は、ステップS206に進む。
 ステップS206では、元画像の予測符号化処理が行われ、符号化処理は終了する。
 図36は、図35のステップS206の予測符号化処理の例を説明するフローチャートである。
 予測符号化処理では、ステップS211において、A/D変換部201は、元画像をA/D変換し、並べ替えバッファ202に供給して、処理は、ステップS212に進む。
 ステップS212において、並べ替えバッファ202は、A/D変換部201からの元画像を記憶し、符号化順に並べ替えて出力し、処理は、ステップS213に進む。
 ステップS213では、イントラ予測部214は、イントラ予測モードのイントラ予測処理を行い、処理は、ステップS214に進む。ステップS214において、動き予測補償部215は、インター予測モードでの動き予測や動き補償を行うインター動き予測処理を行い、処理は、ステップS215に進む。
 イントラ予測部214のイントラ予測処理、及び、動き予測補償部215のインター動き予測処理では、各種の予測モードのコスト関数が演算されるとともに、予測画像が生成される。
 ステップS215では、予測画像選択部216は、イントラ予測部214及び動き予測補償部215で得られる各コスト関数に基づいて、最適な予測モードを決定する。そして、予測画像選択部216は、イントラ予測部214により生成された予測画像と、動き予測補償部215により生成された予測画像のうちの最適な予測モードの予測画像を選択して出力し、処理は、ステップS215からステップS216に進む。
 ステップS216では、演算部203は、並べ替えバッファ202が出力する元画像である符号化対象の対象画像と、予測画像選択部216が出力する予測画像との残差を演算し、直交変換部204に供給して、処理は、ステップS217に進む。
 ステップS217では、直交変換部204は、演算部203からの残差を直交変換し、その結果得られる直交変換係数を、量子化部205に供給して、処理は、ステップS218に進む。
 ステップS218では、量子化部205は、直交変換部204からの直交変換係数を量子化し、その量子化により得られる量子化係数を、可逆符号化部206及び逆量子化部208に供給して、処理は、ステップS219に進む。
 ステップS219では、逆量子化部208は、量子化部205からの量子化係数を逆量子化し、その結果得られる直交変換係数を、逆直交変換部209に供給して、処理は、ステップS220に進む。ステップS220では、逆直交変換部209は、逆量子化部208からの直交変換係数を逆直交変換し、その結果得られる残差を、演算部210に供給して、処理は、ステップS221に進む。
 ステップS221では、演算部210は、逆直交変換部209からの残差と、予測画像選択部216が出力する予測画像とを加算し、演算部203での残差の演算の対象となった元画像に対応する復号画像を生成する。演算部210は、復号画像を、ILF211に供給し、処理は、ステップS221からステップS222に進む。
 ステップS222では、ILF211は、演算部210からの復号画像に、クラス分類予測処理としてのフィルタ処理を施し、そのフィルタ処理により得られるフィルタ画像を、フレームメモリ212に供給して、処理は、ステップS222からステップS223に進む。
 ステップS222のクラス分類予測処理では、クラス分類予測フィルタ110(図29)と同様の処理が行われる。
 すなわち、ILF211は、演算部210からの復号画像の注目画素に対して、マージ情報において採用マージクラス数に対応付けられたクラス分類法のクラス分類を行い、注目画素の初期クラスを求める。さらに、ILF211は、注目画素の初期クラスを、図35のステップS205で更新された採用マージクラス数に対応するマージパターンに従って、マージクラスに変換する。ILF211は、図35のステップS205で更新されたマージクラスごとのタップ係数から、注目画素のマージクラスのタップ係数を取得する。その後、ILF211は、復号画像に、注目画素のマージクラスのタップ係数を用いて構成される予測式を適用する予測処理としてのフィルタ処理を行い、フィルタ画像を生成する。フィルタ画像は、ILF211からフレームメモリ212に供給される。
 ステップS223では、フレームメモリ212は、ILF211から供給されるフィルタ画像を記憶し、処理は、ステップS224に進む。フレームメモリ212に記憶されたフィルタ画像は、ステップS213やS114で、予測画像を生成する元となる参照画像として使用される。
 ステップS224では、可逆符号化部206は、量子化部205からの量子化係数である符号化データを符号化し、その符号化データを含む符号化ビットストリームを生成する。さらに、可逆符号化部206は、量子化部205での量子化に用いられた量子化パラメータQPや、イントラ予測部214でのイントラ予測処理で得られた予測モード、動き予測補償部215でのインター動き予測処理で得られた予測モードや動き情報等の符号化情報を必要に応じて符号化し、符号化ビットストリームに含める。
 また、可逆符号化部206は、図35のステップS203で伝送対象に設定されたフィルタ情報を必要に応じて符号化し、符号化ビットストリームに含める。そして、可逆符号化部206は、符号化ビットストリームを、蓄積バッファ207に供給し、処理は、ステップS224からステップS225に進む。
 ステップS225において、蓄積バッファ207は、可逆符号化部206からの符号化ビットストリームを蓄積し、処理は、ステップS226に進む。蓄積バッファ207に蓄積された符号化ビットストリームは、適宜読み出されて伝送される。
 ステップS226では、レート制御部217は、蓄積バッファ207に蓄積されている符号化ビットストリームの符号量(発生符号量)に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部205の量子化動作のレートを制御し、符号化処理は終了する。
 <復号装置170の構成例>
 図37は、図31の復号装置170の詳細な構成例を示すブロック図である。
 図37において、復号装置170は、蓄積バッファ301、可逆復号部302、逆量子化部303、逆直交変換部304、演算部305、ILF306、並べ替えバッファ307、及び、D/A変換部308を有する。また、復号装置170は、フレームメモリ310、選択部311、イントラ予測部312、動き予測補償部313、及び、選択部314を有する。
 蓄積バッファ301は、符号化装置160から伝送されてくる符号化ビットストリームを一時蓄積し、所定のタイミングにおいて、その符号化ビットストリームを、可逆復号部302に供給する。
 可逆復号部302は、蓄積バッファ301からの符号化ビットストリームを受信し、図34の可逆符号化部206の符号化方式に対応する方式で復号する。
 そして、可逆復号部302は、符号化ビットストリームの復号結果に含まれる符号化データとしての量子化係数を、逆量子化部303に供給する。
 また、可逆復号部302は、パースを行う機能を有する。可逆復号部302は、符号化ビットストリームの復号結果に含まれる必要な符号化情報やフィルタ情報をパースし、符号化情報を、イントラ予測部312や動き予測補償部313その他の必要なブロックに供給する。さらに、可逆復号部302は、フィルタ情報を、ILF306に供給する。
 逆量子化部303は、可逆復号部302からの符号化データとしての量子化係数を、図34の量子化部205の量子化方式に対応する方式で逆量子化し、その逆量子化により得られる直交変換係数を、逆直交変換部304に供給する。
 逆直交変換部304は、逆量子化部303から供給される直交変換係数を、図34の直交変換部204の直交変換方式に対応する方式で逆直交変換し、その結果得られる残差を、演算部305に供給する。
 演算部305には、逆直交変換部304から残差が供給される他、選択部314を介して、イントラ予測部312又は動き予測補償部313から予測画像が供給される。
 演算部305は、逆直交変換部304からの残差と、選択部314からの予測画像とを加算し、復号画像を生成して、ILF306に供給する。
 IFL306は、ILF211(図34)と同様のマージ情報を記憶している。
 ILF306は、例えば、学習機能付きでないクラス分類予測フィルタ110(図29)と同様に構成され、クラス分類予測処理としてのフィルタ処理を行うことで、図34のILF211と同様に、デブロッキングフィルタ、適応オフセットフィルタ、バイラテラルフィルタ、ALFのうちの1つ、又は、2以上のフィルタとして機能する。
 ILF306は、演算部305からの復号画像の画素を、順次、注目画素に選択する。ILF306は、マージ情報に含まれるクラス分類法のうちの、可逆復号部302から供給されるフィルタ情報に含まれる採用マージクラス数に対応付けられたクラス分類法のクラス分類を注目画素に対して行い、注目画素の初期クラスを求める。さらに、ILF211は、注目画素の初期クラスを、マージ情報に含まれるマージパターンのうちの、採用マージクラス数に対応するマージパターンに従って、マージクラスに変換する。ILF306は、可逆復号部302から供給されるフィルタ情報に含まれるマージクラスごとのタップ係数のうちの、注目画素のマージクラスのタップ係数を取得する。そして、ILF306は、復号画像から、注目画素の近傍の画素を予測タップとして選択し、注目画素のクラスのタップ係数と予測タップとしての復号画像の画素との積和演算を行う予測式を復号画像に適用する予測処理としてのフィルタ処理を行い、フィルタ画像を生成して出力する。なお、ILF211と同様に、ILF306でのクラス分類では、例えば、ILF211と同様に、2×2画素の左上の画素のクラス分類で得られたクラスを、その2×2画素それぞれのクラスとして採用することができる。
 ILF306が出力するフィルタ画像は、図34のILF211が出力するフィルタ画像と同様の画像であり、並べ替えバッファ307及びフレームメモリ310に供給される。
 並べ替えバッファ307は、ILF306から供給されるフィルタ画像を一時記憶し、フィルタ画像のフレーム(ピクチャ)の並びを、符号化(復号)順から表示順に並べ替え、D/A変換部308に供給する。
 D/A変換部308は、並べ替えバッファ307から供給されるフィルタ画像をD/A変換し、図示せぬディスプレイに出力して表示させる。
 フレームメモリ310は、ILF306から供給されるフィルタ画像を一時記憶する。さらに、フレームメモリ310は、所定のタイミングにおいて、又は、イントラ予測部312や動き予測補償部313等の外部の要求に基づいて、フィルタ画像を、予測画像の生成に用いる参照画像として、選択部311に供給する。
 選択部311は、フレームメモリ310から供給される参照画像の供給先を選択する。選択部311は、イントラ符号化された画像を復号する場合、フレームメモリ310から供給される参照画像をイントラ予測部312に供給する。また、選択部311は、インター符号化された画像を復号する場合、フレームメモリ310から供給される参照画像を動き予測補償部313に供給する。
 イントラ予測部312は、可逆復号部302から供給される符号化情報に含まれる予測モードに従い、図34のイントラ予測部214において用いられたイントラ予測モードで、フレームメモリ310から選択部311を介して供給される参照画像を用いてイントラ予測を行う。そして、イントラ予測部312は、イントラ予測により得られる予測画像を、選択部314に供給する。
 動き予測補償部313は、可逆復号部302から供給される符号化情報に含まれる予測モードに従い、図34の動き予測補償部215において用いられたインター予測モードで、フレームメモリ310から選択部311を介して供給される参照画像を用いてインター予測を行う。インター予測は、可逆復号部302から供給される符号化情報に含まれる動き情報等を必要に応じて用いて行われる。
 動き予測補償部313は、インター予測により得られる予測画像を、選択部314に供給する。
 選択部314は、イントラ予測部312から供給される予測画像、又は、動き予測補償部313から供給される予測画像を選択し、演算部305に供給する。
 なお、図37において、可逆復号部302が図31のパース部171に、逆量子化部303ないし演算部305が図31の復号部172に、ILF306が図31のフィルタ部173に、それぞれ相当する。
 <復号処理>
 図38は、図37の復号装置170の復号処理の例を説明するフローチャートである。
 復号処理では、ステップS301において、蓄積バッファ301は、符号化装置160から伝送されてくる符号化ビットストリームを一時蓄積し、適宜、可逆復号部302に供給して、処理は、ステップS302に進む。
 ステップS302では、可逆復号部302は、蓄積バッファ301から供給される符号化ビットストリームを受け取って復号し、符号化ビットストリームの復号結果に含まれる符号化データとしての量子化係数を、逆量子化部303に供給する。
 また、可逆復号部302は、符号化ビットストリームの復号結果に、フィルタ情報や符号化情報が含まれる場合には、そのフィルタ情報や符号化情報をパースする。そして、可逆復号部302は、必要な符号化情報を、イントラ予測部312や動き予測補償部313その他の必要なブロックに供給する。また、可逆復号部302は、フィルタ情報を、ILF306に供給する。
 その後、処理は、ステップS302からステップS303に進み、ILF306は、可逆復号部302から採用マージクラス数及び採用マージクラス数のマージクラスごとのタップ係数を含むフィルタ情報が供給されたかどうかを判定する。
 ステップS303において、フィルタ情報が供給されていないと判定された場合、処理は、ステップS304をスキップして、ステップS305に進む。
 また、ステップS303において、フィルタ情報が供給されたと判定された場合、処理は、ステップS304に進み、ILF306は、可逆復号部302からのフィルタ情報に含まれる採用マージクラス数及び採用マージクラス数のマージクラスごとのタップ係数を取得する。さらに、ILF306は、可逆復号部302からのフィルタ情報から取得した採用マージクラス数及び採用マージクラス数のマージクラスごとのタップ係数によって、クラス分類予測処理に用いる採用マージクラス数及びタップ係数を更新する。
 そして、処理は、ステップS304からステップS305に進み、予測復号処理が行われ、復号処理は終了する。
 図39は、図38のステップS305の予測復号処理の例を説明するフローチャートである。
 ステップS311において、逆量子化部303は、可逆復号部302からの量子化係数を逆量子化し、その結果得られる直交変換係数を、逆直交変換部304に供給して、処理は、ステップS312に進む。
 ステップS312では、逆直交変換部304は、逆量子化部303からの直交変換係数を逆直交変換し、その結果得られる残差を、演算部305に供給して、処理は、ステップS313に進む。
 ステップS313では、イントラ予測部312又は動き予測補償部313が、フレームメモリ310から選択部311を介して供給される参照画像、及び、可逆復号部302から供給される符号化情報を用いて、予測画像を生成するイントラ予測処理又はインター動き予測処理を行う。そして、イントラ予測部312又は動き予測補償部313は、イントラ予測処理又はインター動き予測処理により得られる予測画像を、選択部314に供給し、処理は、ステップS313からステップS314に進む。
 ステップS314では、選択部314は、イントラ予測部312又は動き予測補償部313から供給される予測画像を選択し、演算部305に供給して、処理は、ステップS315に進む。
 ステップS315では、演算部305は、逆直交変換部304からの残差と、選択部314からの予測画像を加算することにより、復号画像を生成する。そして、演算部305は、復号画像を、ILF306に供給して、処理は、ステップS315からステップS316に進む。
 ステップS316では、ILF306は、演算部305からの復号画像に、クラス分類予測処理としてのフィルタ処理を施し、そのフィルタ処理により得られるフィルタ画像を、並べ替えバッファ307及びフレームメモリ310に供給して、処理は、ステップS316からステップS317に進む。
 ステップS316のクラス分類予測処理では、クラス分類予測フィルタ110(図29)と同様の処理が行われる。
 すなわち、ILF306は、演算部305からの復号画像の注目画素に対して、マージ情報に含まれるクラス分類法のうちの、図38のステップS304で更新された採用マージクラス数に対応付けられたクラス分類法のクラス分類を行い、注目画素の初期クラスを求める。さらに、ILF306は、注目画素の初期クラスを、採用マージクラス数に対応するマージパターンに従って、マージクラスに変換する。ILF306は、図38のステップS304で更新されたマージクラスごとのタップ係数のうちの、注目画素のマージクラスのタップ係数を取得する。その後、ILF306は、復号画像に、注目画素のマージクラスのタップ係数で構成される予測式を適用する予測処理としてのフィルタ処理を行い、フィルタ画像を生成する。フィルタ画像は、ILF306から並べ替えバッファ307及びフレームメモリ310に供給される。
 ステップS317では、並べ替えバッファ307は、ILF306から供給されるフィルタ画像を一時記憶する。さらに、並べ替えバッファ307は、記憶したフィルタ画像を、表示順に並べ替えて、D/A変換部308に供給し、処理は、ステップS317からステップS318に進む。
 ステップS318では、D/A変換部308は、並べ替えバッファ307からのフィルタ画像をD/A変換し、処理は、ステップS319に進む。D/A変換後のフィルタ画像は、図示せぬディスプレイに出力されて表示される。
 ステップS319では、フレームメモリ310は、ILF306から供給されるフィルタ画像を記憶し、復号処理は終了する。フレームメモリ310に記憶されたフィルタ画像は、ステップS313のイントラ予測処理又はインター動き予測処理で、予測画像を生成する元となる参照画像として使用される。
 なお、クラス分類予測フィルタ110(図29)は、ILF211及びILF306の他、例えば、符号化装置160や復号装置170において、動き予測補償部215及び動き予測補償部313の予測画像の生成に用いられる補間フィルタ等に適用することができる。
 <本技術を適用したコンピュータの説明>
 次に、上述した一連の処理は、ハードウェアにより行うこともできるし、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータ等にインストールされる。
 図40は、上述した一連の処理を実行するプログラムがインストールされるコンピュータの一実施の形態の構成例を示すブロック図である。
 プログラムは、コンピュータに内蔵されている記録媒体としてのハードディスク905やROM903に予め記録しておくことができる。
 あるいはまた、プログラムは、リムーバブル記録媒体911に格納(記録)しておくことができる。このようなリムーバブル記録媒体911は、いわゆるパッケージソフトウエアとして提供することができる。ここで、リムーバブル記録媒体911としては、例えば、フレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto Optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリ等がある。
 なお、プログラムは、上述したようなリムーバブル記録媒体911からコンピュータにインストールする他、通信網や放送網を介して、コンピュータにダウンロードし、内蔵するハードディスク905にインストールすることができる。すなわち、プログラムは、例えば、ダウンロードサイトから、ディジタル衛星放送用の人工衛星を介して、コンピュータに無線で転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送することができる。
 コンピュータは、CPU(Central Processing Unit)902を内蔵しており、CPU902には、バス901を介して、入出力インタフェース910が接続されている。
 CPU902は、入出力インタフェース910を介して、ユーザによって、入力部907が操作等されることにより指令が入力されると、それに従って、ROM(Read Only Memory)903に格納されているプログラムを実行する。あるいは、CPU902は、ハードディスク905に格納されたプログラムを、RAM(Random Access Memory)904にロードして実行する。
 これにより、CPU902は、上述したフローチャートにしたがった処理、あるいは上述したブロック図の構成により行われる処理を行う。そして、CPU902は、その処理結果を、必要に応じて、例えば、入出力インタフェース910を介して、出力部906から出力、あるいは、通信部908から送信、さらには、ハードディスク905に記録等させる。
 なお、入力部907は、キーボードや、マウス、マイク等で構成される。また、出力部906は、LCD(Liquid Crystal Display)やスピーカ等で構成される。
 ここで、本明細書において、コンピュータがプログラムに従って行う処理は、必ずしもフローチャートとして記載された順序に沿って時系列に行われる必要はない。すなわち、コンピュータがプログラムに従って行う処理は、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含む。
 また、プログラムは、1のコンピュータ(プロセッサ)により処理されるものであっても良いし、複数のコンピュータによって分散処理されるものであっても良い。さらに、プログラムは、遠方のコンピュータに転送されて実行されるものであっても良い。
 さらに、本明細書において、システムとは、複数の構成要素(装置、モジュール(部品)等)の集合を意味し、すべての構成要素が同一筐体中にあるか否かは問わない。したがって、別個の筐体に収納され、ネットワークを介して接続されている複数の装置、及び、1つの筐体の中に複数のモジュールが収納されている1つの装置は、いずれも、システムである。
 なお、本技術の実施の形態は、上述した実施の形態に限定されるものではなく、本技術の要旨を逸脱しない範囲において種々の変更が可能である。
 例えば、本技術は、1つの機能をネットワークを介して複数の装置で分担、共同して処理するクラウドコンピューティングの構成をとることができる。
 また、上述のフローチャートで説明した各ステップは、1つの装置で実行する他、複数の装置で分担して実行することができる。
 さらに、1つのステップに複数の処理が含まれる場合には、その1つのステップに含まれる複数の処理は、1つの装置で実行する他、複数の装置で分担して実行することができる。
 また、本明細書に記載された効果はあくまで例示であって限定されるものではなく、他の効果があってもよい。
 <本技術の適用対象>
 本技術は、任意の画像符号化・復号方式に適用することができる。つまり、上述した本技術と矛盾しない限り、変換(逆変換)、量子化(逆量子化)、符号化(復号)、予測等、画像符号化・復号に関する各種処理の仕様は任意であり、上述した例に限定されない。また、上述した本技術と矛盾しない限り、これらの処理の内の一部を省略してもよい。
 <処理単位>
 以上において説明した各種情報が設定されるデータ単位や、各種処理が対象とするデータ単位は、それぞれ任意であり上述した例に限定されない。例えば、これらの情報や処理が、それぞれ、TU(Transform Unit)、TB(Transform Block)、PU(Prediction Unit)、PB(Prediction Block)、CU(Coding Unit)、LCU(Largest Coding Unit)、サブブロック、ブロック、タイル、スライス、ピクチャ、シーケンス、またはコンポーネント毎に設定されるようにしてもよいし、それらのデータ単位のデータを対象とするようにしてもよい。もちろん、このデータ単位は、情報や処理毎に設定され得るものであり、全ての情報や処理のデータ単位が統一されている必要はない。なお、これらの情報の格納場所は任意であり、上述したデータ単位のヘッダやパラメータセット等に格納されるようにしてもよい。また、複数個所に格納されるようにしてもよい。
 <制御情報>
 以上の各実施の形態において説明した本技術に関する制御情報を符号化側から復号側に伝送するようにしてもよい。例えば、上述した本技術を適用することを許可(または禁止)するか否かを制御する制御情報(例えばenabled_flag)を伝送するようにしてもよい。また、例えば、上述した本技術を適用する対象(または適用しない対象)を示す制御情報を伝送するようにしてもよい。例えば、本技術を適用する(または、適用を許可若しくは禁止する)ブロックサイズ(上限若しくは下限、またはその両方)、フレーム、コンポーネント、またはレイヤ等を指定する制御情報を伝送するようにしてもよい。
 <ブロックサイズ情報>
 本技術を適用するブロックのサイズを指定するに当たって、直接的にブロックサイズを指定するだけでなく、間接的にブロックサイズを指定するようにしてもよい。例えばサイズを識別する識別情報を用いてブロックサイズを指定するようにしてもよい。また、例えば、基準となるブロック(例えばLCUやSCU等)のサイズとの比または差分によってブロックサイズを指定するようにしてもよい。例えば、シンタックス要素等としてブロックサイズを指定する情報を伝送する場合に、その情報として、上述のような間接的にサイズを指定する情報を用いるようにしてもよい。このようにすることにより、その情報の情報量を低減させることができ、符号化効率を向上させることができる場合もある。また、このブロックサイズの指定には、ブロックサイズの範囲の指定(例えば、許容されるブロックサイズの範囲の指定等)も含む。
 <その他>
 なお、本明細書において「フラグ」とは、複数の状態を識別するための情報であり、真(1)または偽(0)の2状態を識別する際に用いる情報だけでなく、3以上の状態を識別することが可能な情報も含まれる。したがって、この「フラグ」が取り得る値は、例えば1/0の2値であってもよいし、3値以上であってもよい。すなわち、この「フラグ」を構成するbit数は任意であり、1bitでも複数bitでもよい。また、識別情報(フラグも含む)は、その識別情報をビットストリームに含める形だけでなく、ある基準となる情報に対する識別情報の差分情報をビットストリームに含める形も想定されるため、本明細書においては、「フラグ」や「識別情報」は、その情報だけではなく、基準となる情報に対する差分情報も包含する。
 10 クラス分類部, 110 クラス分類予測フィルタ, 111 クラス分類部, 112 マージ変換部, 113 タップ係数取得部, 114 予測部, 121 学習部, 160 符号化装置, 161 符号化部, 162 局所復号部, 163 フィルタ部, 164 クラス分類部, 165 マージ変換部, 170 復号装置, 171 パース部, 172 復号部, 173 フィルタ部, 174 クラス分類部, 175 マージ変換部, 201 A/D変換部, 202 並べ替えバッファ, 203 演算部, 204 直交変換部, 205 量子化部, 206 可逆符号化部, 207 蓄積バッファ, 208 逆量子化部, 209 逆直交変換部, 210 演算部, 211 ILF, 212 フレームメモリ, 213 選択部, 214 イントラ予測部, 215 動き予測補償部, 216 予測画像選択部, 217 レート制御部, 301 蓄積バッファ, 302 可逆復号部, 303 逆量子化部, 304 逆直交変換部, 305 演算部, 306 ILF, 307 並べ替えバッファ, 308 D/A変換部, 310 フレームメモリ, 311 選択部, 312 イントラ予測部, 313 動き予測補償部, 314 選択部, 901 バス, 902 CPU, 903 ROM, 904 RAM, 905 ハードディスク, 906 出力部, 907 入力部, 908 通信部, 909 ドライブ, 910 入出力インタフェース, 911 リムーバブル記録媒体

Claims (20)

  1.  符号化ビットストリームに含まれる符号化データを復号し、復号画像を生成する復号部と、
     前記復号部により生成された前記復号画像の注目画素に対するクラス分類を行うクラス分類部と、
     前記クラス分類部により行われたクラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換するマージ変換部と、
     前記マージ変換部により変換された前記注目画素のマージクラスのタップ係数と前記復号画像の画素との積和演算を行う予測式を前記復号画像に適用するフィルタ処理を行って、フィルタ画像を生成するフィルタ部と
     を備える復号装置。
  2.  前記マージクラス数ごとのマージパターンは、所定のクラス分類により得られる初期クラスからクラス数が減少していくように設定される
     請求項1に記載の復号装置。
  3.  前記マージクラス数ごとのマージパターンは、所定のクラス分類により得られる初期クラスをマージするマージパターンと、他のクラス分類により得られる初期クラスをマージするマージパターンとが混在するように設定される
     請求項1に記載の復号装置。
  4.  前記マージクラス数ごとのマージパターンは、前記フィルタ処理に必要なパラメータの符号量又は前記フィルタ画像の誤差が統計的に最適化されるように設定される
     請求項1に記載の復号装置。
  5.  前記クラス分類部は、前記注目画素の画素値の傾斜の強度を表す傾斜強度比と、前記注目画素の画素値の傾斜の方向を表す傾斜方向と、前記注目画素の周辺領域内の複数の画素それぞれの複数方向のアクティビティを方向ごとに加算して得られる前記複数方向のアクティビティサムとを用いて、前記注目画素に対するクラス分類を行う
     請求項1に記載の復号装置。
  6.  前記クラス分類部は、前記傾斜方向の信頼度を用いて、前記注目画素に対するクラス分類を行う
     請求項5に記載の復号装置。
  7.  前記マージクラス数ごとのマージパターンは、前記傾斜強度比又は前記アクティビティサムが優先的に影響するマージクラスが得られるように設定される
     請求項5に記載の復号装置。
  8.  前記符号化ビットストリームから、前記初期クラスから前記マージクラスへの変換に採用する採用マージクラス数をパースするパース部をさらに備え、
     前記マージ変換部は、前記パース部によりパースされた前記採用マージクラス数に対応する前記マージパターンに従って、前記注目画素の初期クラスを前記マージクラスに変換する
     請求項1に記載の復号装置。
  9.  前記復号部は、Quad-Tree Block Structure、又は、QTBT(Quad Tree Plus Binary Tree) Block StructureのCU(Coding Unit)を処理単位として、前記符号化データを復号する
     請求項1に記載の復号装置。
  10.  符号化ビットストリームに含まれる元画像の符号化データを復号し、復号画像を生成することと、
     前記復号画像の注目画素に対するクラス分類を行うことと、
     前記クラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換することと、
     前記注目画素のマージクラスのタップ係数と前記復号画像の画素との積和演算を行う予測式を前記復号画像に適用するフィルタ処理を行って、フィルタ画像を生成することと
     を含む復号方法。
  11.  局所復号された局所復号画像の注目画素に対するクラス分類を行うクラス分類部と、
     前記クラス分類部により行われたクラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換するマージ変換部と、
     前記マージ変換部により変換された前記注目画素のマージクラスのタップ係数と前記局所復号画像の画素との積和演算を行う予測式を前記局所復号画像に適用するフィルタ処理を行って、フィルタ画像を生成するフィルタ部と、
     前記フィルタ部により生成された前記フィルタ画像を用いて、元画像を符号化する符号化部と
     を備える符号化装置。
  12.  前記マージクラス数ごとのマージパターンは、所定のクラス分類により得られる初期クラスからクラス数が減少していくように設定される
     請求項11に記載の符号化装置。
  13.  前記マージクラス数ごとのマージパターンは、所定のクラス分類により得られる初期クラスをマージするマージパターンと、他のクラス分類により得られる初期クラスをマージするマージパターンとが混在するように設定される
     請求項11に記載の符号化装置。
  14.  前記マージクラス数ごとのマージパターンは、前記フィルタ処理に必要なパラメータの符号量又は前記フィルタ画像の誤差が統計的に最適化されるように設定される
     請求項11に記載の符号化装置。
  15.  前記クラス分類部は、前記注目画素の画素値の傾斜の強度を表す傾斜強度比と、前記注目画素の画素値の傾斜の方向を表す傾斜方向と、前記注目画素の周辺領域内の複数の画素それぞれの複数方向のアクティビティを方向ごとに加算して得られる前記複数方向のアクティビティサムとを用いて、前記注目画素に対するクラス分類を行う
     請求項11に記載の符号化装置。
  16.  前記クラス分類部は、前記傾斜方向の信頼度を用いて、前記注目画素に対するクラス分類を行う
     請求項15に記載の符号化装置。
  17.  前記マージクラス数ごとのマージパターンは、前記傾斜強度比又は前記アクティビティサムが優先的に影響するマージクラスが得られるように設定される
     請求項15に記載の符号化装置。
  18.  前記フィルタ部は、前記マージクラス数に対応するマージパターンに従って前記初期クラスをマージした場合のコストが最小となるマージクラス数を、前記初期クラスから前記マージクラスへの変換に採用する採用マージクラス数として決定し、
     前記符号化部は、前記元画像を符号化することにより得られる符号化データと、前記採用マージクラス数とを含む前記符号化ビットストリームを生成する
     請求項11に記載の符号化装置。
  19.  前記符号化部は、Quad-Tree Block Structure、又は、QTBT(Quad Tree Plus Binary Tree) Block StructureのCU(Coding Unit)を処理単位として、前記元画像を符号化する
     請求項11に記載の符号化装置。
  20.  局所復号された局所復号画像の注目画素に対するクラス分類を行うことと、
     前記クラス分類により得られる前記注目画素の初期クラスを、マージクラス数ごとにあらかじめ設定されたマージパターンに従って、初期クラスをマージしたマージクラスに変換することと、
     前記注目画素のマージクラスのタップ係数と前記局所復号画像の画素との積和演算を行う予測式を前記局所復号画像に適用するフィルタ処理を行って、フィルタ画像を生成することと、
     前記フィルタ画像を用いて、元画像を符号化することと
     を含む符号化方法。
PCT/JP2019/024643 2018-07-06 2019-06-21 符号化装置、符号化方法、復号装置、及び、復号方法 WO2020008910A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-128689 2018-07-06
JP2018128689A JP2021166319A (ja) 2018-07-06 2018-07-06 符号化装置、符号化方法、復号装置、及び、復号方法

Publications (1)

Publication Number Publication Date
WO2020008910A1 true WO2020008910A1 (ja) 2020-01-09

Family

ID=69059559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/024643 WO2020008910A1 (ja) 2018-07-06 2019-06-21 符号化装置、符号化方法、復号装置、及び、復号方法

Country Status (3)

Country Link
JP (1) JP2021166319A (ja)
TW (1) TW202013973A (ja)
WO (1) WO2020008910A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013150084A (ja) * 2012-01-18 2013-08-01 Nippon Telegr & Teleph Corp <Ntt> 画像符号化方法,画像符号化装置,画像復号方法,画像復号装置およびそれらのプログラム
JP2017523668A (ja) * 2014-06-13 2017-08-17 インテル コーポレイション ビデオ符号化用の高コンテンツ適応型品質回復フィルタ処理のためのシステムおよび方法
WO2017142946A1 (en) * 2016-02-15 2017-08-24 Qualcomm Incorporated Merging filters for multiple classes of blocks for video coding
WO2017196852A1 (en) * 2016-05-09 2017-11-16 Qualcomm Incorporated Signalling of filtering information
JP2018509074A (ja) * 2015-02-11 2018-03-29 クアルコム,インコーポレイテッド コーディングツリーユニット(ctu)レベル適応ループフィルタ(alf)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013150084A (ja) * 2012-01-18 2013-08-01 Nippon Telegr & Teleph Corp <Ntt> 画像符号化方法,画像符号化装置,画像復号方法,画像復号装置およびそれらのプログラム
JP2017523668A (ja) * 2014-06-13 2017-08-17 インテル コーポレイション ビデオ符号化用の高コンテンツ適応型品質回復フィルタ処理のためのシステムおよび方法
JP2018509074A (ja) * 2015-02-11 2018-03-29 クアルコム,インコーポレイテッド コーディングツリーユニット(ctu)レベル適応ループフィルタ(alf)
WO2017142946A1 (en) * 2016-02-15 2017-08-24 Qualcomm Incorporated Merging filters for multiple classes of blocks for video coding
WO2017196852A1 (en) * 2016-05-09 2017-11-16 Qualcomm Incorporated Signalling of filtering information

Also Published As

Publication number Publication date
TW202013973A (zh) 2020-04-01
JP2021166319A (ja) 2021-10-14

Similar Documents

Publication Publication Date Title
JP2023133553A (ja) 画像処理装置及び画像処理方法
US11032557B2 (en) Decoding device, coding device, and method
MXPA05012973A (es) Orden de explotacion de coeficiente adaptable.
US11595647B2 (en) Image segmentation method and apparatus for image encoding and decoding
US11438614B2 (en) Encoding method and apparatus therefor, and decoding method and apparatus therefor
WO2020066642A1 (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
US20120281749A1 (en) Encoder, decoder, and data configuration
JP2023101812A (ja) 画像処理装置、及び画像処理方法
WO2019220947A1 (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
US11451833B2 (en) Encoding device, encoding method, decoding device, and decoding method
WO2020008910A1 (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
US11006133B2 (en) Image compression technique
WO2020066643A1 (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
WO2019208258A1 (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
US5724096A (en) Video signal encoding method and apparatus employing inter-block redundancies
WO2019131161A1 (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
WO2019198519A1 (ja) データ処理装置及びデータ処理方法
JP2022002357A (ja) 符号化装置、符号化方法、復号装置、及び、復号方法
WO2021002214A1 (ja) 情報処理装置および方法
WO2020262370A1 (ja) 画像処理装置および画像処理方法

Legal Events

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

Ref document number: 19830741

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP