WO2020079827A1 - 画像符号化方法及び画像符号化装置 - Google Patents

画像符号化方法及び画像符号化装置 Download PDF

Info

Publication number
WO2020079827A1
WO2020079827A1 PCT/JP2018/038986 JP2018038986W WO2020079827A1 WO 2020079827 A1 WO2020079827 A1 WO 2020079827A1 JP 2018038986 W JP2018038986 W JP 2018038986W WO 2020079827 A1 WO2020079827 A1 WO 2020079827A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
image
cost
encoding
predetermined value
Prior art date
Application number
PCT/JP2018/038986
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 株式会社ソシオネクスト
Priority to JP2020551691A priority Critical patent/JP7255605B2/ja
Priority to PCT/JP2018/038986 priority patent/WO2020079827A1/ja
Publication of WO2020079827A1 publication Critical patent/WO2020079827A1/ja
Priority to US17/231,470 priority patent/US11882269B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/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/103Selection of coding mode or of prediction mode
    • 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/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria

Definitions

  • the present invention relates to an image encoding method and an image encoding apparatus, and more particularly to a method and an apparatus for selecting an appropriate mode for encoding and encoding an image.
  • Video coding can be roughly divided into the "implementer-dependent" process in the first stage and the "standard” process in the second stage.
  • the former corresponds to determination of various modes, and includes, for example, determination of the size of a coding block, in-plane prediction, and motion detection.
  • the latter is a typical process according to the mode determined by the former, and is, for example, orthogonal transformation, quantization, entropy coding, motion compensation, or the like.
  • the former mode determination is equivalent to finding the optimum or sub-optimal combination from a huge number of combinations, and is a process that follows a theoretical algorithm. Therefore, it is possible to design a mode decision engine that makes such a mode decision.
  • the engine is a device that executes data processing, and is, for example, hardware such as an electronic circuit, or an integrated system of software and hardware including a program and a CPU that executes the program.
  • Non-Patent Document 1 it has become possible to design desired hardware and software by machine learning by giving a huge amount of inputs and expected combinations of outputs without using an algorithm as a black box. It is becoming possible (see Non-Patent Document 1). Therefore, there is a possibility that a more efficient mode decision engine can be realized by using machine learning than that by the conventional method (that is, processing according to a theoretical algorithm).
  • the machine-learned mode decision engine has a risk of giving unintended and inappropriate results (see Non-Patent Document 1). If the machine-learned mode decision engine gives an inappropriate result, the coding efficiency in the latter stage may deteriorate. Problems such as extreme deterioration may occur.
  • the present invention has been made in view of the above problems, and while minimizing the risk of the machine-learned mode decision engine, it is possible to enjoy the advantages of the machine-learned mode decision engine. It is an object of the present invention to provide an image encoding method and an image encoding device having different architectures.
  • an image coding method for coding an image, wherein the image is input, and the image is coded according to a first processing procedure.
  • a cost calculation step of calculating a cost when the image is coded, the second processing procedure is realized by a reconfigurable circuit, Cost selects the first mode is greater than the first predetermined value, selecting the second mode when the cost is less than the first predetermined value.
  • an image coding apparatus is an image coding apparatus that codes an image, and receives the image as an input, and codes the image according to a first processing procedure.
  • a first mode determination engine that determines a first mode suitable for encoding
  • a second mode determination engine that receives the image as an input, and determines a second mode suitable for encoding the image according to a second processing procedure
  • a mode selection unit that selects one of the first mode and the second mode as a final mode, an encoding unit that encodes the image using the final mode, and a second mode.
  • a cost calculation unit that calculates a cost when the image is encoded, the second processing procedure is realized by a reconfigurable circuit, and the mode selection unit is configured such that the cost is higher than a first predetermined value. Select the first mode when heard, to select the second mode when the cost is less than the first predetermined value.
  • an image coding method and an image coding apparatus having an architecture capable of taking advantage of the machine-learned mode decision engine while minimizing the risk of the machine-learned mode decision engine. Will be provided.
  • FIG. 1 is a block diagram showing the configuration of the image coding apparatus according to the first embodiment.
  • FIG. 2A is a diagram illustrating an example of a mode (in-plane prediction mode) in encoding a moving image.
  • FIG. It is a figure which shows the kind of in-plane prediction mode in 265 standard.
  • FIG. 3A is a diagram illustrating another example of a mode in moving image encoding (a reference image used for motion detection).
  • FIG. 3B is a diagram illustrating an example (1/4 precision) of the precision of a motion vector in motion detection in encoding a moving image.
  • FIG. 4 is a diagram illustrating another example (size of a coding block) of a mode in coding a moving image.
  • FIG. 1 is a block diagram showing the configuration of the image coding apparatus according to the first embodiment.
  • FIG. 2A is a diagram illustrating an example of a mode (in-plane prediction mode) in encoding a moving image.
  • FIG. It is
  • FIG. 5 is a flowchart showing the operation of the image coding apparatus according to the first embodiment.
  • FIG. 6 is a flowchart showing the operation of the image coding apparatus according to the first modification of the first embodiment.
  • FIG. 7 is a flowchart showing the operation of the image coding apparatus according to the second modification of the first embodiment.
  • FIG. 8 is a block diagram showing the configuration of the image coding apparatus according to Embodiment 2.
  • FIG. 9A is a flowchart showing the operation of the image coding apparatus according to Embodiment 2 in the coding mode.
  • FIG. 9B is a flowchart showing the operation of the image coding apparatus according to Embodiment 2 in the learning mode.
  • Embodiment 1 First, the image coding apparatus and the image coding method according to Embodiment 1 will be described.
  • FIG. 1 is a block diagram showing the configuration of the image coding device 10 according to the first embodiment.
  • the image encoding device 10 is a device that encodes an image such as a moving image or a still image, and includes a first mode determination engine 11, a second mode determination engine 12, a cost calculation unit 13, a mode selection unit 14, and The encoding unit 15 is provided.
  • the first mode determination engine 11 is a processing unit that receives an image to be encoded (hereinafter, also referred to as “target image”) and determines a first mode suitable for encoding the target image according to a first processing procedure.
  • a first processing procedure There is, for example, an electronic circuit or a circuit system including a program and a CPU that executes the program.
  • the first processing procedure is, for example, a processing procedure of calculating the cost when the target image is encoded using each of a plurality of predetermined modes, and determining the mode with the smallest calculated cost as the first mode. is there.
  • the first mode decision engine 11 is typically a mode decision engine according to a conventional method (that is, a process according to a theoretical algorithm). Specifically, in the coding of a moving image, “Implementer-dependent" processing, such as coding block size determination, in-plane prediction, and motion detection, is performed.
  • the second mode determination engine 12 receives the image to be encoded (that is, the same target image as the processing target of the first mode determination engine 11) as input, and performs the second suitable for encoding the target image according to the second processing procedure.
  • the second processing procedure is, for example, a processing procedure for determining the second mode from a plurality of predetermined modes without using cost calculation.
  • the reconfigurable circuit is a circuit device in which the logic circuit and its connection relationship can be rewritten by programming.
  • FPGA Field-Programmable Gate Array
  • rewritable in which a program is stored. It is a circuit system including a memory and a CPU that executes programs.
  • the second mode decision engine 12 is composed of a circuit reconfigured by machine learning, for example, a neural network.
  • the second mode decision engine 12 is typically a machine-learned mode decision engine, and according to the brain (that is, the second processing procedure) obtained by the machine learning without using cost calculation, This is a processing unit that determines the second mode suitable for image encoding.
  • the cost calculation unit 13 calculates the cost when the target image is encoded using the second mode determined by the second mode determination engine 12 (hereinafter, this cost is also referred to as “cost for the second mode”). Unit, and is realized by, for example, an electronic circuit or a circuit system including a program and a CPU that executes the program.
  • the mode selection unit 14 is a processing unit that selects one of the first mode determined by the first mode determination engine 11 and the second mode determined by the second mode determination engine 12 as the final mode. Specifically, when the cost for the second mode calculated by the cost calculation unit 13 is larger than the first predetermined value, the first mode is selected, and when the cost for the second mode is the first predetermined value or less, A processing unit that selects the second mode, and is realized by, for example, an electronic circuit or a circuit system including a program and a CPU that executes the program. As the first predetermined value, for example, the first mode determination engine 11 sets the minimum cost obtained in the determination process of the first mode, or sets the value predicted to be the minimum cost.
  • the encoding unit 15 is a processing unit that encodes the target image using the final mode selected by the mode selection unit 14 and outputs the encoded image as a bit stream.
  • an electronic circuit, a program, or a CPU that executes the program may be used. It is realized by the circuit system including. Specifically, in the coding of a moving image, the coding unit 15 performs a subsequent “standard” process, that is, after performing orthogonal transformation and quantization on the target image using the final mode, and then performing entropy coding. And output as a bitstream.
  • the encoding unit 15 performs inverse quantization and inverse orthogonal transformation on the image after orthogonal transformation and quantization, and then performs a loop filter process such as deblocking to obtain a reference image as an internal frame.
  • a loop filter process such as deblocking to obtain a reference image as an internal frame.
  • the prediction image obtained by performing the motion compensation process using the final mode is used to subtract from the target image prior to orthogonal transform and quantization, It may be used to add to the target image that has undergone the inverse quantization and the inverse orthogonal transform prior to the processing of the loop filter.
  • FIG. 2A is a diagram illustrating an example of a mode in encoding a moving image (here, a mode of in-plane prediction).
  • a mode of in-plane prediction there are various modes of the intra prediction, and the intra prediction having a direction in which a prediction image is generated based on adjacent pixels in the directions of 45 ° and 90 ° from the target pixel is used.
  • modes and in-plane prediction modes that do not have a direction such that the average value of adjacent pixels is used as a prediction image.
  • FIG. 2B shows the H.264. It is a figure which shows the kind of in-plane prediction mode in 265 standard.
  • FIG. 2B (a) shows H.264. 2B shows prediction directions of in-plane prediction mode numbers 0 to 34 in the H.265 standard, and (b) of FIG. 2C shows the definition of an angle with respect to the prediction direction of each mode of the in-plane prediction in the H.265 standard. The correspondence between each mode number of the in-plane prediction in the H.265 standard and the definition of the angle is shown.
  • the in-plane prediction mode having a direction is 33 modes (mode numbers 2 to 34), and the in-plane prediction mode having no direction is 2 modes (mode number 0 (Planar), mode number 1 (DC)). is there.
  • the first mode determination engine 11 and the second mode determination engine 12 are H.264.
  • in-plane prediction suitable for encoding is performed according to the first processing procedure and the second processing procedure from the plurality of in-plane prediction modes shown in FIG. 2B, respectively.
  • a mode is selected and the selected mode is determined as the first mode and the second mode.
  • the first mode determination engine 11 is an H.264 standard.
  • Distortion indicates coding distortion, and for example, the sum of absolute values (SAD) of the difference values between the original image and the predicted image in the coding block is used.
  • SAD sum of absolute values
  • Rate for example, the amount of generated bits at the time of encoding is used.
  • is called a Lagrange multiplier and is a parameter for optimizing coding distortion and bit amount.
  • the first mode determination engine 11 uses the adjacent pixels in the H.264 mode in each in-plane prediction mode in the 33 directions. The cost of each coding block when the prediction process is performed according to the processing content of the H.265 standard is calculated, and the mode of the in-plane prediction with the smallest cost is determined as the first mode.
  • FIG. 3A is a diagram illustrating another example of a mode in moving image coding (here, a reference image used for motion detection).
  • a motion that is, a motion vector
  • the motion vector is a coordinate indicating from which pixel of the image indicated by the reference image number the image is predicted.
  • FIG. 3B is a diagram illustrating an example (here, 1/4 precision) of the precision of the motion vector in the motion detection in the encoding of the moving image.
  • the motion vector can point to the decimal point position.
  • a pixel is generated by performing a filtering process based on the peripheral pixels at the position pointed to by the motion vector.
  • This decimal precision is H.264.
  • the precision is 1/4.
  • the first mode determination engine 11 and the second mode determination engine 12 are H.264.
  • a reference image suitable for encoding is selected from the plurality of reference images shown in FIG. 3A according to the first processing procedure and the second processing procedure, and then shown in FIG. 3B.
  • the mode in motion detection that is, the combination of the reference image and the motion vector
  • the selected mode is determined as the first mode and the second mode.
  • the first mode determination engine 11 is an H.264 standard.
  • the first mode determination engine 11 calculates the cost when performing the prediction process on the three reference images and each motion vector. Then, the motion detection mode (reference image + motion vector) with the lowest cost is determined as the first mode.
  • FIG. 4 is a diagram illustrating another example of the mode in encoding a moving image (here, the size of an encoding block).
  • H.264 The size of the coding block in the H.265 standard is shown.
  • the coding blocks are only squares, and small coding blocks can be made.
  • the size of the smallest coded block is 8x8.
  • the minimum size is 8x8, and the size can be further divided into a minimum of 4x4 to individually specify the mode of in-plane prediction and the mode of inter-plane prediction.
  • the first mode determination engine 11 and the second mode determination engine 12 are H.264.
  • it is suitable for encoding according to the first processing procedure and the second processing procedure from the sizes (that is, modes) of the plurality of coding blocks shown in FIG.
  • the size (that is, the mode) of the encoded block is selected, and the selected mode is determined as the first mode and the second mode.
  • the first mode determination engine 11 is an H.264 standard.
  • the first mode determination engine 11 uses the adjacent pixels in the H.264 mode in each in-plane prediction mode (35 mode).
  • the cost of each coding block when the prediction process is performed according to the processing content of the H.265 standard is calculated, and the mode of the in-plane prediction that minimizes the cost is selected as the cost in the size of the coding block. This process is performed for all coded block sizes from 64x64 to 8x8.
  • the cost of each coding block size is compared to determine the size of the coding block (that is, the first mode).
  • the first mode determination engine 11 compares the costs when four 8x8 coding block sizes are selected and when the 16x16 coding block sizes are selected, and then selects the smaller cost.
  • Optimal coding block size is determined by choosing the cost.
  • the size of the determined coding block is the first mode for the size of the coding block.
  • FIG. 5 is a flowchart showing the operation of the image coding device 10 according to the first embodiment.
  • the first mode determination engine 11 determines the first mode suitable for image encoding according to the first processing procedure for the target image (first mode determination step S11). Specifically, the first mode determination engine 11 encodes an image using each of a plurality of predetermined modes in determining the size of a coding block in moving image coding, in-plane prediction, motion detection, and the like. In this case, the cost is calculated, and the mode having the smallest calculated cost is determined as the first mode.
  • the second mode determination engine 12 determines the second mode suitable for encoding the target image according to the second processing procedure for the same target image as the processing target of the first mode determination engine 11 (second Mode determining step S12). Specifically, the second mode determination engine 12 determines the size of the coding block in the coding of the moving image, the in-plane prediction, the motion detection, etc. without using the cost calculation, and the brain obtained by the machine learning ( That is, the second mode suitable for encoding the target image is determined according to the second processing procedure).
  • the cost calculation unit 13 calculates the cost when the target image is encoded using the second mode determined by the second mode determination engine 12 (cost calculation step S13).
  • the mode selection unit 14 selects one of the first mode determined by the first mode determination engine 11 and the second mode determined by the second mode determination engine 12, based on the cost calculated by the cost calculation unit 13. Is selected as the final mode (mode selection step S14).
  • the mode selection unit 14 determines whether the cost for the second mode calculated by the cost calculation unit 13 is larger than the first predetermined value. However, if it is determined that the cost for the second mode is larger than the first predetermined value (S20) (Yes in S20), the first mode is selected as the final mode (S21), while the cost for the second mode is selected. When it is determined that is less than or equal to the first predetermined value (No in S20), the second mode is selected as the final mode (S22).
  • the encoding unit 15 encodes the target image using the final mode selected by the mode selecting unit 14 and outputs it as a bitstream (encoding step S15). Specifically, the encoding unit 15 performs entropy encoding on the target image after performing orthogonal transform and quantization using the final mode, and outputs it as a bitstream. At this time, the encoding unit 15 performs the inverse quantization and the inverse orthogonal transformation on the image after the orthogonal transformation and the quantization, and then performs the loop filter processing such as deblocking to obtain the reference image inside.
  • the predicted image obtained by performing the motion compensation process using the final mode is extracted from the target image before orthogonal transform and quantization. It is also used for subtraction, or for adding to an image that has been subjected to inverse quantization and inverse orthogonal transform prior to the processing of the loop filter.
  • the image coding apparatus 10 is an apparatus for coding an image, which takes an image as an input and performs the first mode suitable for image coding according to the first processing procedure. From a first mode determination engine 11 that determines an image, a second mode determination engine 12 that receives an image as an input, and determines a second mode suitable for image encoding according to a second processing procedure, and a first mode and a second mode. , A mode selecting unit 14 that selects either one as a final mode, an encoding unit 15 that encodes an image using the final mode, and a cost when an image is encoded using the second mode.
  • the cost calculation unit 13 the second processing procedure is realized by a reconfigurable circuit, and the mode selection unit 14 performs the first processing when the cost calculated by the cost calculation unit 13 is larger than the first predetermined value.
  • Mo Select the cost calculated by the cost calculation unit 13 selects the second mode when it is less than the first predetermined value.
  • the image coding method is an image coding method for coding an image, in which an image is input, and a first mode suitable for image coding is determined according to a first processing procedure. From the first mode determining step S11 for inputting an image and the second mode determining step S12 for determining a second mode suitable for image encoding according to the second processing procedure, the first mode and the second mode, A mode selecting step S14 for selecting either one as the final mode, an encoding step S15 for encoding the image using the final mode, and a cost for calculating the cost when the image is encoded using the second mode. And the calculation step S13, the second processing procedure is realized by a reconfigurable circuit, and the mode selection step S14 calculates the cost calculation step S13. Strike the first mode selected is greater than the first predetermined value, the cost calculated in the cost calculation step (S13) selects the second mode when it is less than the first predetermined value.
  • the first mode and the second mode suitable for encoding are determined for the target image according to two types of processing procedures. Then, the cost when encoded using the second mode is calculated, and if the cost is larger than the first predetermined value, the first mode is selected, and if not, the second mode is selected.
  • the second mode uses a processing procedure realized by a reconfigurable circuit.
  • the first mode decision engine 11 for deciding the first mode is a mode decision engine according to a conventional method (that is, a process according to a theoretical algorithm), and the second mode decision engine 12 for deciding the second mode is
  • the second mode determined by the second mode decision engine 12 subjected to machine learning is appropriate in terms of cost by using a mode decision engine realized by a reconfigurable circuit by machine learning such as a neural network.
  • the second mode is adopted as the final mode.
  • the first mode is adopted as the final mode as a fail safe, and then the target image is encoded.
  • the fail-safe function minimizes the risk of the machine-learned mode decision engine, and also has the architecture capable of enjoying the merit of the machine-learned mode decision engine.
  • the method is realized.
  • the first processing procedure is a processing procedure for calculating a cost when an image is encoded using each of a plurality of predetermined modes and determining the mode having the smallest calculated cost as the first mode.
  • the second processing procedure is a processing procedure for determining the second mode from a plurality of predetermined modes without using cost calculation.
  • the first mode is determined from the viewpoint of cost in encoding, while the second mode is determined from the viewpoint other than the cost in encoding. Therefore, the first mode decision engine 11 for deciding the first mode is realized by the mode decision engine according to the conventional method (that is, the process according to the theoretical algorithm), and the second mode decision engine 12 for deciding the second mode is provided. It can be realized by a mode decision engine composed of a reconfigurable circuit by machine learning such as a neural network.
  • the reconfigurable circuit that realizes the second mode decision engine 12 is reconfigured by machine learning.
  • the second mode is determined by a circuit that can be reconfigured by machine learning. Therefore, by repeating machine learning for the second mode determination engine 12 that determines the second mode, a more appropriate mode can be set as the second mode. Can be determined as
  • the determination of the first mode is performed by calculating the cost for the second mode (cost calculation step S13) and comparing the result of the cost calculation with the first predetermined value (although it is always executed prior to the mode selection step S14), it is not limited to this procedure, and it may be determined whether or not to execute depending on the result of comparison between the cost for the second mode and the first predetermined value.
  • FIG. 6 is a diagram of the first embodiment that controls whether or not the determination of the first mode (first mode determination step S11) is performed depending on the comparison result between the cost for the second mode and the first predetermined value.
  • 13 is a flowchart showing an operation (that is, an image encoding method) of the image encoding device according to the modified example 1. The same processes as those in FIG. 5 according to the first embodiment are designated by the same reference numerals.
  • first mode determination step S11 in the determination of the first mode (first mode determination step S11), it is determined in the mode selection process (S14a) that the cost for the second mode is larger than the first predetermined value (Yes in S20). ) Will be executed later. That is, when the mode selection unit 14 determines that the cost for the second mode calculated by the cost calculation unit 13 is larger than the first predetermined value (Yes in S20), the first mode determination engine 11 determines that the target image On the other hand, according to the first processing procedure, the first mode suitable for image encoding is determined (first mode determination step S11). Other procedures are the same as those in the first embodiment shown in FIG.
  • the first mode determination step S11 is performed when the cost for the second mode is larger than the first predetermined value (Yes in S20) and is equal to or less than the first predetermined value (S20). No), it is executed only when it is larger than the first predetermined value (Yes in S20).
  • the first mode is determined only when it is determined that the first mode is used as the final mode, so that the processing load is reduced as compared with the case where the first mode is always determined, and the first mode is set.
  • the power consumption of the first mode decision engine 11 that decides is reduced.
  • the selection of the final mode is performed only based on the cost for the second mode (mode selection step S14), but in addition to the cost.
  • the second mode may be performed after considering the probability that the second mode is suitable for image coding.
  • FIG. 7 shows an image coding apparatus according to Modification 2 of Embodiment 1 in which the final mode is selected in consideration of the probability that the second mode is suitable for image coding in addition to the cost for the second mode.
  • It is a flow chart which shows operation (namely, image coding method). It should be noted that the flow chart also includes the features according to the first modification of the first embodiment (whether or not the determination of the first mode is executed depending on the determination result of the mode selection unit 14). include.
  • the same processes as those in FIG. 5 according to the first embodiment are designated by the same reference numerals.
  • the second mode determination engine 12 determines the second mode suitable for encoding the target image according to the second processing procedure for the same target image as the processing target.
  • probability information indicating the probability that the second mode is suitable for encoding the target image is generated (second mode determination step S12a).
  • the probability information for example, the probability (probability) of the second mode obtained from the output layer of the neural network forming the second mode determination engine 12 is used. That is, as the second mode determination engine 12, the output layer of the neural network is configured by a plurality of output nodes corresponding to each of the plurality of modes that can be candidates for the second mode.
  • the second mode determination engine 12 determines, as the second mode, the mode corresponding to the output node showing the maximum value of the values obtained at the plurality of output nodes when the target image is input, and the output node The ratio of the value obtained in (3) to the sum of the values obtained at all output nodes is generated as probability information.
  • the mode selection unit 14 first compares the cost calculated for the second mode by the cost calculation unit 13 and the first predetermined value (S20) with each other, first, in the second mode determination engine. It is determined whether the probability indicated by the probability information generated by 12 is smaller than the second predetermined value (S30). As a result, when the probability indicated by the probability information is smaller than the second predetermined value (Yes in S30), the first mode determination engine 11 determines the first mode (first mode determination step S11), and The mode selection unit 14 selects the first mode determined by the first mode determination engine 11 as the final mode (S21a).
  • the mode selection unit 14 subsequently determines whether the probability indicated by the probability information is the third predetermined value or more. If the probability indicated by the probability information is not less than the third predetermined value (Yes in S31), the second mode is selected as the final mode (S22a).
  • the third predetermined value is a value larger than the second predetermined value (that is, showing a higher probability).
  • the mode selection unit 14 determines whether the cost for the second mode calculated by the cost calculation unit 13 is larger than the first predetermined value (S20). As a result, when it is determined that the cost for the second mode is larger than the first predetermined value (Yes in S20), the first mode determination engine 11 determines the first mode (first mode determination step). S11), the mode selection unit 14 selects the first mode determined by the first mode determination engine 11 as the final mode (S21). On the other hand, when it is determined that the cost for the second mode is less than or equal to the first predetermined value (No in S20), the mode selection unit 14 selects the second mode as the final mode (S22).
  • the mode selection step In S14 when the probability indicated by the probability information is smaller than the second predetermined value (Yes in S30), the first mode is selected (S21a), and the probability indicated by the probability information is equal to or higher than the third predetermined value (S21a).
  • the second mode is selected in S31 (Yes) (S22a).
  • the probability indicated by the probability information is smaller than the second predetermined value (Yes in S30) and the probability indicated by the probability information is the third predetermined value or more (Yes in S31). ), The probability indicated by the probability information is smaller than the second predetermined value (Yes in S30).
  • the first mode is determined only when the first mode is determined to be used as the final mode by the determination using the probability information, so that the processing load is reduced as compared to the case where the first mode is always determined.
  • the power consumption of the first mode determination engine 11 that determines the first mode is reduced.
  • Embodiment 2 Next, an image coding apparatus and an image coding method according to Embodiment 2 will be described.
  • FIG. 8 is a block diagram showing the configuration of the image coding device 10a according to the second embodiment.
  • the image encoding device 10a is a device that encodes an image such as a moving image or a still image similarly to the first embodiment, but unlike the first embodiment, the second mode determination engine 12 is trained. It is characterized in that it further has a function for executing. Therefore, the image encoding device 10a includes the configuration of the image encoding device 10 according to the first embodiment (first mode determination engine 11, second mode determination engine 12, cost calculation unit 13, mode selection unit 14, and In addition to the encoding unit 15), a storage unit 16 and a learning control unit 17 are provided.
  • first mode determination engine 11, second mode determination engine 12, cost calculation unit 13, mode selection unit 14, and In addition to the encoding unit 15), a storage unit 16 and a learning control unit 17 are provided.
  • the points different from the first embodiment will be mainly described.
  • the storage unit 16 includes a storage unit 16a realized by a non-volatile memory or the like, and when the second mode is not selected by the mode selection unit 14 (that is, the first mode is selected), the target image or It is a processing unit that stores information specifying the target image and the first mode determined by the first mode determination engine 11 in the storage unit 16a.
  • the information that identifies the target image is the identification information of the target image, and is the information that the learning control unit 17 refers to to acquire the target image.
  • the learning control unit 17 is a processing unit that causes the second mode determination engine 12 to perform machine learning. More specifically, the learning control unit 17 stores in the storage unit 16a a reconfigurable circuit that implements the second mode determination engine 12. The processing unit reconfigures a reconfigurable circuit by performing machine learning using the stored information or the cost calculated by the cost calculation unit 13.
  • the learning control unit 17 performs supervised learning or reinforcement learning on the second mode determination engine 12 in accordance with a preset setting for the learning control unit 17.
  • the learning control unit 17 reads the target image or information specifying the target image and the first mode determined by the first mode determination engine 11 from the storage unit 16a. Then, the learning control unit 17 uses the target image read from the storage unit 16a or the target image indicated by the information specifying the target image read from the storage unit 16a as input data, and sets the first mode read from the storage unit 16a as the teacher data. Is used as, the supervisable learning is performed on the reconfigurable circuit that realizes the second mode decision engine 12.
  • the learning control unit 17 acquires from the cost calculation unit 13 the cost calculated for the second mode determined by the second mode determination engine 12 and the target image at that time. Then, the learning control unit 17 realizes the second mode determination engine 12 that is the agent by using the acquired target image as input data and using a value corresponding to the acquired cost (for example, the reciprocal of the cost) as a reward. Reinforceable learning is performed on the reconfigurable circuit.
  • the storage unit 16 and the learning control unit 17 are realized by an electronic circuit or a circuit system including a program and a CPU that executes the program.
  • the image coding device 10a has a coding mode and a learning mode as operation modes.
  • the coding mode among all the constituent elements of the image coding apparatus 10a, all the constituent elements except the learning control unit 17 operate, thereby coding the input image and storing the image in the storage unit 16a. Stored.
  • the learning mode at least the second mode determination engine 12 and the learning control unit 17 among all the constituent elements of the image encoding device 10a operate to perform machine learning on the second mode determination engine 12. .
  • the learning mode may be performed in parallel with the encoding mode. Control of these operation modes is performed by a control unit (not shown) realized by a circuit system including a program and a CPU that executes the program, which controls all the constituent elements of the image encoding device 10a. .
  • FIG. 9A is a flowchart showing the operation of the image encoding device 10 a according to Embodiment 2 in the encoding mode.
  • the difference from the flowchart of FIG. 5 according to the first embodiment is that in the mode selection (S14c), after the first mode is selected (S21), the storage unit 16 stores the target image or information specifying the target image and the first image. This means that a step of storing the first mode determined by the 1-mode determination engine 11 in the storage unit 16a (storage step S40) is added.
  • the image or the information specifying the image and the first A storage step S40 of storing the mode and the mode in the storage unit 16a is included.
  • the second mode determination engine 12 that determines the second mode.
  • the input data the image or the information specifying the image
  • the correct output data that is, the first mode when the second mode decision engine 12 decides the inappropriate second mode. Since the first mode) is stored in the storage unit 16a, the second mode determination engine 12 can be machine-learned (that is, supervised learning) using these data.
  • FIG. 9B is a flowchart showing an operation (that is, an image encoding method) in the learning mode of the image encoding device 10a according to the second embodiment. Here, a flowchart centering on the operation by the learning control unit 17 is shown.
  • the learning control unit 17 determines whether to perform the supervised learning or the reinforcement learning for the second mode determination engine 12 according to the setting in advance (S50).
  • the learning control unit 17 reads the target image or information for identifying the target image and the first mode determination engine from the storage unit 16a.
  • the target image and the first mode are acquired by reading the first mode determined by 11 (S51).
  • the learning control unit 17 stores the information that specifies the target image and the target image in association with each other (for example, stored in the storage unit 16a).
  • the target image is acquired by referencing the database).
  • the learning control unit 17 uses the target image read from the storage unit 16a or the target image indicated by the information specifying the target image read from the storage unit 16a as input data, and sets the first mode read from the storage unit 16a as the teacher data. As a result, supervised learning is performed on the reconfigurable circuit that realizes the second mode determination engine 12 (S52).
  • the learning control unit 17 calculates the cost calculated for the second mode determined by the second mode determination engine 12 and the time.
  • the target image of is acquired from the cost calculation unit 13 (S53).
  • the learning control unit 17 uses the target image as input data, and uses the value corresponding to the cost for the second mode determined by the second mode determination engine 12 for the target image (for example, the reciprocal of the cost) as the reward.
  • the reconfigurable circuit that realizes the second mode decision engine 12 that is the agent is made to perform the reinforcement learning (S54).
  • the learning control unit 17 performs machine learning on the reconfigurable circuit that implements the second mode determination engine 12, and reconfigures the learning control. Steps S50 to S54 are included.
  • the second mode determination engine 12 that determines the second mode can be machine-learned, and a more appropriate mode can be determined as the second mode.
  • the learning control unit 17 uses, as one of machine learning, the first mode determined in the first mode determination step S11 as the teacher data, and thereby the reconfigurable circuit that realizes the second mode determination engine 12. In response, let the teacher learn. This enables supervised learning for the second mode determination engine 12 that determines the second mode, using the first mode as the teacher data.
  • the learning control unit 17 uses a reward corresponding to the cost calculated in the cost calculation step S13 as another one of the machine learning, and thereby the reconfigurable circuit that realizes the second mode determination engine 12 is realized. On the other hand, make reinforcement learning. Thus, by determining the reward according to the cost calculated in the cost calculation step S13, the reinforcement learning for the second mode determination engine 12 that determines the second mode becomes possible.
  • the first mode decision engine 11 is realized by a mode decision engine according to a conventional method (that is, processing according to a theoretical algorithm), and the second mode decision engine 12 is a neural network.
  • a mode decision engine configured by a network
  • specific examples of the first mode decision engine 11 and the second mode decision engine 12 are not limited to these.
  • Reconfigurable circuit and non-reconfigurable circuit as long as the first mode determination engine 11 can select a first mode suitable for image encoding from a plurality of selectable modes according to an arbitrary search algorithm.
  • the second mode decision engine 12 may be any mode decision engine realized by a reconfigurable circuit, and is not limited to the neural network.
  • the second processing procedure may be performed by arbitrary machine learning such as a support vector machine. It may be any mode decision engine that can be learned.
  • the image coding apparatuses have two types of mode decision engines, but may have three or more types of mode decision engines.
  • the first mode decision engine a plurality of first mode decision engines that decide the first mode by a process according to a different theoretical algorithm are provided, and the first mode decision engine is provided according to the cost for the second mode calculated by the cost calculation unit 13.
  • the cost calculation unit 13 may be selected from the plurality of first mode decision engines.
  • the determination using the probability (S30, S31) is performed, and then the determination using the cost for the second mode (S20) is performed.
  • These orders may be reversed. That is, the determination using the cost for the second mode (S20) may be performed first, and then the determination using the probability (S30, S31) may be performed.
  • the determination of the first mode is executed after it is confirmed that the first mode is selected (Yes in S30, Yes in S20).
  • the processing procedure is not limited to this.
  • the determination of the first mode may be executed before the mode selection (S14b).
  • the first mode determination is performed by the cost calculation for the second mode (cost calculation step S13) and comparison between the cost calculation result and the first predetermined value.
  • cost calculation step S13 cost calculation step S13
  • comparison step S14c the procedure is not limited to this procedure, and the cost and the first predetermined value for the second mode are compared with each other as in the first modification and the second modification of the first embodiment. It may be determined whether to execute depending on the result or the comparison result between the probability indicated by the probability information and the second predetermined value.
  • the mode selection unit 14 compares the first predetermined value and the cost with each other, and compares the second predetermined value and the third predetermined value with the probability with the first predetermined value and the cost. Is the same, and if the second predetermined value and the third predetermined value are the same as the probability, one of the two selective processes after the comparison is executed. Alternatively, the other of the two selective processing may be executed. That is, "greater than the first predetermined value” and “equal to or less than the first predetermined value” may be replaced with "greater than or equal to the first predetermined value" and "smaller than the first predetermined value", respectively.
  • “smaller than the second predetermined value” and “greater than or equal to the second predetermined value” may be replaced with “less than or equal to the second predetermined value” and “greater than the second predetermined value”, respectively.
  • the terms “greater than or equal to the third predetermined value” and “smaller than the third predetermined value” may be replaced with “greater than the third predetermined value” and “less than or equal to the third predetermined value”, respectively.
  • Cost Distortion + ⁇ * Rate is used as the cost function, but the cost function is not limited to such a function.
  • another function may be used as long as the cost increases in either case, even if the coding distortion increases or the generated bit amount increases.
  • the present invention relates to an image encoding device for selecting an appropriate mode for encoding and encoding an image, for example, a moving image encoding device including one or more semiconductor integrated circuits equipped with a machine-learned mode decision engine. It can be used as a device.

Abstract

画像符号化方法は、画像を入力とし、第1処理手順に従って、画像の符号化に適した第1モードを決定する第1モード決定ステップ(S11)と、画像を入力とし、第2処理手順に従って、画像の符号化に適した第2モードを決定する第2モード決定ステップ(S12)と、第1モード及び第2モードから、いずれか一方を最終モードとして選択するモード選択ステップ(S14)と、最終モードを用いて、画像を符号化する符号化ステップ(S15)と、第2モードを用いて画像を符号化した場合のコストを計算するコスト計算ステップ(S13)とを含み、第2処理手順は、再構成可能な回路によって実現され、モード選択ステップ(S14)では、コスト計算ステップ(S13)で計算されたコストが第1所定値よりも大きい場合に第1モードを選択し、コストが第1所定値以下である場合に第2モードを選択する。

Description

画像符号化方法及び画像符号化装置
 本発明は、画像符号化方法及び画像符号化装置に関し、特に、符号化に適したモードを選択して画像を符号化する方法及び装置に関する。
 動画像の符号化では、大きく分けて、前段の「実装者依存」処理と、後段の「定型」処理に分けられる。前者は、各種のモード決定に相当し、例えば、符号化ブロックのサイズの決定、面内予測、動き検出等がある。一方、後者は、前者で決められたモードに従った定型的な処理であり、例えば、直交変換、量子化、エントロピー符号化、動き補償等である。
 前者のモード決定は、膨大な組み合わせの中から最適な、あるいは、準最適な組み合わせを求めることに相当し、理論的なアルゴリズムに従った処理である。よって、このようなモード決定を行うモード決定エンジンの設計が可能である。なお、エンジンとは、データ処理を実行する装置であり、例えば、電子回路等のハードウェア、あるいは、プログラム及びプログラムを実行するCPUを含むソフトウェア及びハードウェアの統合システム等である。
 一方で、近年、アルゴリズムを経ずに、その処理内容をブラックボックスとして、膨大な量の入力と期待される出力の組み合わせとを与え、機械学習により、所望のハードウェア及びソフトウェアを設計することが可能になってきている(非特許文献1参照)。よって、機械学習を利用することで、従来手法(つまり、理論的なアルゴリズムに従った処理)によるものよりも効率のいいモード決定エンジンを実現できる可能性がある。
Tianyi Li et al," A DEEP CONVOLUTIONAL NEURAL NETWORK APPROACH FOR COMPLEXITY REDUCTION ON INTRA-MODE HEVC" published 10-14 July 2017 in 2017 IEEE International Conference
 しかしながら、機械学習によるモード決定エンジンの設計は完全ではない。機械学習されたモード決定エンジンは、意図しない適切でない結果を出してしまうリスクを有する(非特許文献1参照)。機械学習されたモード決定エンジンで不適切な結果が出た場合には、後段での符号化効率が悪化することが考えられ、符号化データの伝送量の制限があるときには、結果として、画質が極端に劣化する等の問題を生じる可能性がある。
 そこで、本発明は、上記問題に鑑みてなされたものであり、機械学習されたモード決定エンジンのリスクを最小限に抑えたうえで、機械学習されたモード決定エンジンのメリットを享受することが可能なアーキテクチャを有する画像符号化方法及び画像符号化装置を提供することを目的とする。
 上記目的を達成するために、本発明の一形態に係る画像符号化方法は、画像を符号化する画像符号化方法であって、前記画像を入力とし、第1処理手順に従って、前記画像の符号化に適した第1モードを決定する第1モード決定ステップと、前記画像を入力とし、第2処理手順に従って、前記画像の符号化に適した第2モードを決定する第2モード決定ステップと、前記第1モード及び前記第2モードから、いずれか一方を最終モードとして選択するモード選択ステップと、前記最終モードを用いて、前記画像を符号化する符号化ステップと、前記第2モードを用いて前記画像を符号化した場合のコストを計算するコスト計算ステップとを含み、前記第2処理手順は、再構成可能な回路によって実現され、前記モード選択ステップでは、前記コストが第1所定値よりも大きい場合に前記第1モードを選択し、前記コストが前記第1所定値以下である場合に前記第2モードを選択する。
 上記目的を達成するために、本発明の一形態に係る画像符号化装置は、画像を符号化する画像符号化装置であって、前記画像を入力とし、第1処理手順に従って、前記画像の符号化に適した第1モードを決定する第1モード決定エンジンと、前記画像を入力とし、第2処理手順に従って、前記画像の符号化に適した第2モードを決定する第2モード決定エンジンと、前記第1モード及び前記第2モードから、いずれか一方を最終モードとして選択するモード選択部と、前記最終モードを用いて、前記画像を符号化する符号化部と、前記第2モードを用いて前記画像を符号化した場合のコストを計算するコスト計算部とを含み、前記第2処理手順は、再構成可能な回路によって実現され、前記モード選択部は、前記コストが第1所定値よりも大きい場合に前記第1モードを選択し、前記コストが前記第1所定値以下である場合に前記第2モードを選択する。
 本発明により、機械学習されたモード決定エンジンのリスクを最小限に抑えたうえで、機械学習されたモード決定エンジンのメリットを享受することが可能なアーキテクチャを有する画像符号化方法及び画像符号化装置を提供される。
図1は、実施の形態1に係る画像符号化装置の構成を示すブロック図である。 図2Aは、動画像の符号化におけるモードの一例(面内予測のモード)を説明する図である。 図2Bは、H.265規格における面内予測のモードの種類を示す図である。 図3Aは、動画像の符号化におけるモードの他の一例(動き検出に用いられる参照画像)を説明する図である。 図3Bは、動画像の符号化での動き検出における動きベクトルの精度の一例(1/4精度)を説明する図である。 図4は、動画像の符号化におけるモードの他の一例(符号化ブロックのサイズ)を説明する図である。 図5は、実施の形態1に係る画像符号化装置の動作を示すフローチャートである。 図6は、実施の形態1の変形例1に係る画像符号化装置の動作を示すフローチャートである。 図7は、実施の形態1の変形例2に係る画像符号化装置の動作を示すフローチャートである。 図8は、実施の形態2に係る画像符号化装置の構成を示すブロック図である。 図9Aは、実施の形態2に係る画像符号化装置の符号化モードにおける動作を示すフローチャートである。 図9Bは、実施の形態2に係る画像符号化装置の学習モードにおける動作を示すフローチャートである。
 以下、本発明の実施の形態について、図面を用いて詳細に説明する。なお、以下で説明する実施の形態は、いずれも本発明の一具体例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置及び接続形態、ステップ、ステップの順序等は、一例であり、本発明を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、本発明の最上位概念を示す独立請求項に記載されていない構成要素については、任意の構成要素として説明される。また、各図は、必ずしも厳密に図示したものではない。各図において、実質的に同一の構成については同一の符号を付し、重複する説明は省略又は簡略化する。
 (実施の形態1)
 まず、実施の形態1に係る画像符号化装置及び画像符号化方法について説明する。
 図1は、実施の形態1に係る画像符号化装置10の構成を示すブロック図である。画像符号化装置10は、動画像又は静止画等の画像を符号化する装置であって、第1モード決定エンジン11、第2モード決定エンジン12、コスト計算部13、モード選択部14、及び、符号化部15を備える。
 第1モード決定エンジン11は、符号化対象の画像(以下、「対象画像」ともいう)を入力とし、第1処理手順に従って、対象画像の符号化に適した第1モードを決定する処理部であり、例えば、電子回路、あるいは、プログラム及びプログラムを実行するCPUを含む回路システムで実現される。第1処理手順は、例えば、所定の複数のモードのそれぞれを用いて対象画像を符号化した場合のコストを計算し、計算したコストが最小であるモードを、第1モードとして決定する処理手順である。
 つまり、第1モード決定エンジン11は、典型的には、従来手法(つまり、理論的なアルゴリズムに従った処理)によるモード決定エンジンであり、具体的には、動画像の符号化では、前段の「実装者依存」処理、例えば、符号化ブロックのサイズ決定、面内予測、動き検出等を行う。
 第2モード決定エンジン12は、符号化対象の画像(つまり、第1モード決定エンジン11の処理対象と同じ対象画像)を入力とし、第2処理手順に従って、対象画像の符号化に適した第2モードを決定する処理部であり、再構成可能な回路で実現される。第2処理手順は、例えば、コスト計算を用いることなく、所定の複数のモードから第2モードを決定する処理手順である。ここで、再構成可能な回路とは、論理回路及びその接続関係をプログラミングで書き換えることが可能な回路デバイスであり、例えば、FPGA(Field-Programmable Gate Array)、あるいは、プログラムが格納された書き換え可能なメモリ及びプログラムを実行するCPUを含む回路システムである。本実施の形態では、第2モード決定エンジン12は、機械学習によって再構成される回路、例えば、ニューラルネットワークで構成される。
 つまり、第2モード決定エンジン12は、典型的には、機械学習されたモード決定エンジンであり、コスト計算を用いることなく、機械学習によって得られた頭脳(つまり、第2処理手順)に従って、対象画像の符号化に適した第2モードを決定する処理部であり、具体的な処理として、第1モード決定エンジン11と同様の処理、つまり、動画像の符号化では、前段の「実装者依存」処理、例えば、符号化ブロックのサイズ決定、面内予測、動き検出等を行う。
 コスト計算部13は、第2モード決定エンジン12が決定した第2モードを用いて対象画像を符号化した場合のコスト(以下、このコストを「第2モードに対するコスト」ともいう)を計算する処理部であり、例えば、電子回路、あるいは、プログラム及びプログラムを実行するCPUを含む回路システムで実現される。
 モード選択部14は、第1モード決定エンジン11が決定した第1モード、及び、第2モード決定エンジン12が決定した第2モードから、いずれか一方を最終モードとして選択する処理部であり、より具体的には、コスト計算部13で計算された第2モードに対するコストが第1所定値よりも大きい場合に第1モードを選択し、第2モードに対するコストが第1所定値以下である場合に第2モードを選択する処理部であり、例えば、電子回路、あるいは、プログラム及びプログラムを実行するCPUを含む回路システムで実現される。第1所定値として、例えば、第1モード決定エンジン11が第1モードの決定過程で得られる最小のコストに設定にしたり、そのような最小のコストと予測される値に設定したりする。
 符号化部15は、モード選択部14が選択した最終モードを用いて、対象画像を符号化し、ビットストリームとして出力する処理部であり、例えば、電子回路、あるいは、プログラム及びプログラムを実行するCPUを含む回路システムで実現される。符号化部15は、具体的には、動画像の符号化では、後段の「定型」処理、つまり、対象画像に対して、最終モードを用いて、直交変換及び量子化をした後に、エントロピー符号化をし、ビットストリームとして、出力する。さらに、符号化部15は、直交変換及び量子化後の画像に対して、逆量子化及び逆直交変換をした後に、デブロッキング等のループフィルタの処理を施して得られる参照画像を内部のフレームメモリに格納する。フレームメモリに格納した参照画像に対しては、最終モードを用いて動き補償の処理を施すことで得られた予測画像を、対象画像から、直交変換及び量子化に先立って差し引くために用いたり、逆量子化及び逆直交変換を終えた対象画像に対して、ループフィルタの処理に先立って加算するために用いたりする。
 次に、第1モード決定エンジン11及び第2モード決定エンジン12が決定するモードの具体例を説明する。
 図2Aは、動画像の符号化におけるモードの一例(ここで、面内予測のモード)を説明する図である。本図に示されるように、面内予測のモードは、いろいろあり、対象画素から45°、90°といった方向にある隣接画素をもとに予測画像を生成するような方向を持つ面内予測のモードと、隣接する画素の平均値を予測画像とするような方向を持たない面内予測のモードとがある。
 図2Bは、H.265規格における面内予測のモードの種類を示す図である。図2Bの(a)は、H.265規格における面内予測のモード番号0~34の予測方向等を示し、図2Bの(b)は、H.265規格における面内予測の各モードの予測方向についての角度の定義を示し、図2Bの(c)は、H.265規格における面内予測の各モード番号と角度の定義との対応を示す。図2Bに示されるように、H.265規格では、方向を持つ面内予測のモードが33モード(モード番号2~34)、方向を持たない面内予測のモードが2モード(モード番号0(Planar)、モード番号1(DC))ある。
 本実施の形態では、第1モード決定エンジン11及び第2モード決定エンジン12は、H.265規格に従って動画像を符号化する場合には、図2Bに示された複数の面内予測のモードから、それぞれ、第1処理手順及び第2処理手順に従って、符号化に適した面内予測のモードを選択し、選択したモードを第1モード及び第2モードとして決定する。
 なお、第1モード決定エンジン11は、H.265規格に従って面内予測のモードを決定する際には、例えば、R-D最適化(レート歪み最適化)のための一般的なコスト関数(つまり、Cost=Distortion+λ*Rate)を用いる。ここで、Distortionは、符号化歪を指し、例えば、符号化ブロックにおける原画像と予測画像との差分値の絶対値和(SAD)を用いる。Rateは、例えば、符号化時の発生ビット量を使用する。λは、ラグランジュ乗数と呼ばれ、符号化歪とビット量の最適化のためのパラメータである。第1モード決定エンジン11は、33方向の各面内予測のモードにおいて、隣接画素を用いてH.265規格の処理内容に従って予測処理を行ったときの符号化ブロックのコストをそれぞれ算出し、最もコストが小さくなる面内予測のモードを第1モードとして決定する。
 また、コスト計算部13についても、第2モード決定エンジン12が決定した第2モードのコストを計算する際に、上述したR-D最適化のためのコスト関数(Cost=Distortion+λ*Rate)を用いる。
 図3Aは、動画像の符号化におけるモードの他の一例(ここで、動き検出に用いられる参照画像)を説明する図である。本図に示されるように、H.265規格では、面間予測として、時間的に前方向(過去)及び後ろ方向(未来)の両方から動き(つまり、動きベクトル)を予測することが可能であり、前後合わせて16面の参照画像が定義されている。また前方向及び後ろ方向いずれも、連続した画像でなくてもよく、任意の画像を参照画像として選ぶことができる。なお、動きベクトルは、参照画像番号が示す画像のどの画素から予測するかを示す座標である。
 図3Bは、動画像の符号化での動き検出における動きベクトルの精度の一例(ここでは、1/4精度)を説明する図である。図3Bに示されるように、動きベクトルは、小数点位置を指し示すことができる。その場合、動きベクトルが指した位置の周辺画素をもとにフィルタ処理を行って画素を生成する。この小数精度は、H.265規格では1/4精度となっている。
 本実施の形態では、第1モード決定エンジン11及び第2モード決定エンジン12は、H.265規格に従って動画像を符号化する場合には、第1処理手順及び第2処理手順に従って、図3Aに示された複数の参照画像から符号化に適した参照画像を選択し、図3Bに示される1/4精度で動きベクトルを決定することで、動き検出におけるモード(つまり、参照画像と動きベクトルとの組み合わせ)を選択し、選択したモードを第1モード及び第2モードとして決定する。
 なお、第1モード決定エンジン11は、H.265規格に従って面内予測のモードを決定する際には、例えば、R-D最適化のためのコスト関数(Cost=Distortion+λ*Rate)を用いる。いま、前方向のみの参照関係で、かつ、直前の3枚を参照可能とすると、第1モード決定エンジン11は、3つの参照画像及び各動きベクトルにおいて予測処理を行ったときのコストをそれぞれ算出し、最もコストが小さくなる動き検出のモード(参照画像+動きベクトル)を第1モードとして決定する。
 図4は、動画像の符号化におけるモードの他の一例(ここで、符号化ブロックのサイズ)を説明する図である。ここでは、H.265規格における符号化ブロックのサイズが示されている。本図に示されるように、H.265規格では、符号化ブロックは、正方形のみであり、小さい符号化ブロックを作ることができる。最小の符号化ブロックのサイズは、8x8である。面内か面間かの選択では、最小のサイズが8x8であり、さらに最小4x4までサイズを分割して、面内予測のモードや面間予測のモードを個別に指定できる。
 本実施の形態では、第1モード決定エンジン11及び第2モード決定エンジン12は、H.265規格に従って動画像を符号化する場合には、図4に示された複数の符号化ブロックのサイズ(つまり、モード)から、それぞれ、第1処理手順及び第2処理手順に従って、符号化に適した符号化ブロックのサイズ(つまり、モード)を選択し、選択したモードを第1モード及び第2モードとして決定する。
 なお、第1モード決定エンジン11は、H.265規格に従って符号化ブロックのサイズについてのモードを決定する際には、例えば、各面内予測のモードにおけるR-D最適化のためのコスト関数(Cost=Distortion+λ*Rate)を用いて行う。具体的には、第1モード決定エンジン11は、各面内予測のモード(35モード)において隣接画素を用いてH.265規格の処理内容に従って予測処理を行ったときの符号化ブロックのコストをそれぞれ算出し、最もコストが小さくなる面内予測のモードを選択して、当該符号化ブロックのサイズにおけるコストとする。この処理を64x64~8x8までの符号化ブロックサイズのすべてについて行う。
 そして、各符号化ブロックサイズのコストを比べて符号化ブロックのサイズ(つまり、第1モード)を決定する。つまり、第1モード決定エンジン11は、8x8の符号化ブロックサイズを4つ選択した場合と16x16の符号化ブロックサイズを選択した場合の各コストを比較し、続いて、より小さなコストの方を選択した場合と32x32の符号化ブロックサイズを選択した場合の各コストを比較し、続いて、より小さなコストを選択した場合と64x64の符号化ブロックサイズを選択した場合の各コストを比較し、より小さなコストの方を選択することで、最適な符号化ブロックのサイズを決定する。決定した符号化ブロックのサイズが、符号化ブロックのサイズについての第1モードとなる。
 次に、以上のように構成された実施の形態1に係る画像符号化装置10の動作(つまり、画像符号化方法)について説明する。
 図5は、実施の形態1に係る画像符号化装置10の動作を示すフローチャートである。
 まず、第1モード決定エンジン11は、対象画像に対して、第1処理手順に従って、画像の符号化に適した第1モードを決定する(第1モード決定ステップS11)。具体的には、第1モード決定エンジン11は、動画像の符号化における符号化ブロックのサイズ決定、面内予測、動き検出等において、所定の複数のモードのそれぞれを用いて画像を符号化した場合のコストを計算し、計算したコストが最小であるモードを、第1モードとして決定する。
 一方、第2モード決定エンジン12は、第1モード決定エンジン11の処理対象と同じ対象画像に対して、第2処理手順に従って、対象画像の符号化に適した第2モードを決定する(第2モード決定ステップS12)。具体的には、第2モード決定エンジン12は、動画像の符号化における符号化ブロックのサイズ決定、面内予測、動き検出等において、コスト計算を用いることなく、機械学習によって得られた頭脳(つまり、第2処理手順)に従って、対象画像の符号化に適した第2モードを決定する。
 なお、第1モード決定エンジン11による第1モードの決定(第1モード決定ステップS11)と、第2モード決定エンジン12による第2モードの決定(第2モード決定ステップS12)とは、いずれが先であってもよいし、同時並行に行われてもよい。
 次に、コスト計算部13は、第2モード決定エンジン12が決定した第2モードを用いて対象画像を符号化した場合のコストを計算する(コスト計算ステップS13)。
 そして、モード選択部14は、コスト計算部13が計算したコストに基づいて、第1モード決定エンジン11が決定した第1モード及び第2モード決定エンジン12が決定した第2モードから、いずれか一方を最終モードとして選択する(モード選択ステップS14)。
 具体的には、本図の右側に図示されたサブフローのように、モード選択部14は、コスト計算部13で計算された第2モードに対するコストが第1所定値よりも大きいか否かを判断し(S20)、第2モードに対するコストが第1所定値よりも大きいと判断した場合には(S20でYes)、第1モードを最終モードとして選択し(S21)、一方、第2モードに対するコストが第1所定値以下であると判断した場合には(S20でNo)、第2モードを最終モードとして選択する(S22)。
 最後に、符号化部15は、モード選択部14が選択した最終モードを用いて、対象画像を符号化し、ビットストリームとして出力する(符号化ステップS15)。具体的には、符号化部15は、対象画像に対して、最終モードを用いて、直交変換及び量子化をした後に、エントロピー符号化をし、ビットストリームとして、出力する。このとき、符号化部15は、直交変換及び量子化後の画像に対して、逆量子化及び逆直交変換をした後に、デブロッキング等のループフィルタの処理を施して得られる参照画像を内部のフレームメモリに格納したり、フレームメモリに格納した参照画像に対しては、最終モードを用いて動き補償の処理を施すことで得られた予測画像を、対象画像から、直交変換及び量子化に先立って差し引くために用いたり、逆量子化及び逆直交変換を終えた画像に対して、ループフィルタの処理に先立って加算するために用いたりする。
 以上のように、本実施の形態に係る画像符号化装置10は、画像を符号化する装置であって、画像を入力とし、第1処理手順に従って、画像の符号化に適した第1モードを決定する第1モード決定エンジン11と、画像を入力とし、第2処理手順に従って、画像の符号化に適した第2モードを決定する第2モード決定エンジン12と、第1モード及び第2モードから、いずれか一方を最終モードとして選択するモード選択部14と、最終モードを用いて、画像を符号化する符号化部15と、第2モードを用いて画像を符号化した場合のコストを計算するコスト計算部13とを含み、第2処理手順は、再構成可能な回路によって実現され、モード選択部14は、コスト計算部13で計算されたコストが第1所定値よりも大きい場合に第1モードを選択し、コスト計算部13で計算されたコストが第1所定値以下である場合に第2モードを選択する。
 また、本実施の形態に係る画像符号化方法は、画像を符号化する画像符号化方法であって、画像を入力とし、第1処理手順に従って、画像の符号化に適した第1モードを決定する第1モード決定ステップS11と、画像を入力とし、第2処理手順に従って、画像の符号化に適した第2モードを決定する第2モード決定ステップS12と、第1モード及び第2モードから、いずれか一方を最終モードとして選択するモード選択ステップS14と、最終モードを用いて、画像を符号化する符号化ステップS15と、第2モードを用いて画像を符号化した場合のコストを計算するコスト計算ステップS13とを含み、第2処理手順は、再構成可能な回路によって実現され、モード選択ステップS14では、コスト計算ステップS13で計算されたコストが第1所定値よりも大きい場合に第1モードを選択し、コスト計算ステップ(S13)で計算されたコストが第1所定値以下である場合に第2モードを選択する。
 これにより、対象画像に対して、2種類の処理手順に従って符号化に適した第1モード及び第2モードが決定される。そして、第2モードを用いて符号化した場合のコストが計算され、そのコストが第1所定値よりも大きい場合に第1モードが選択され、そうでない場合に第2モードが選択される。第2モードは、再構成可能な回路によって実現される処理手順が用いられる。
 よって、例えば、第1モードを決定する第1モード決定エンジン11を従来手法(つまり、理論的なアルゴリズムに従った処理)によるモード決定エンジンとし、第2モードを決定する第2モード決定エンジン12をニューラルネットワーク等の機械学習による再構成可能な回路によって実現されるモード決定エンジンとすることで、機械学習された第2モード決定エンジン12が決定した第2モードがコスト的に適切である場合にはその第2モードを最終モードとして採用し、一方、第2モードがコスト的に適切でない場合にはフェイルセーフとして第1モードを最終モードとして採用したうえで、対象画像が符号化される。
 よって、フェイルセーフ機能により、機械学習されたモード決定エンジンのリスクを最小限に抑えたうえで、機械学習されたモード決定エンジンのメリットを享受することが可能なアーキテクチャを有する画像符号化装置10及びその方法が実現される。
 また、第1処理手順は、所定の複数のモードのそれぞれを用いて画像を符号化した場合のコストを計算し、計算したコストが最小であるモードを、第1モードとして決定する処理手順であり、第2処理手順は、コスト計算を用いることなく、所定の複数のモードから第2モードを決定する処理手順である。
 これにより、第1モードは、符号化におけるコストの観点から決定され、一方、第2モードは、符号化におけるコスト以外の観点から決定される。よって、第1モードを決定する第1モード決定エンジン11を従来手法(つまり、理論的なアルゴリズムに従った処理)によるモード決定エンジンで実現し、第2モードを決定する第2モード決定エンジン12をニューラルネットワーク等の機械学習による再構成可能な回路で構成されるモード決定エンジンで実現することができる。
 また、第2モード決定エンジン12を実現する再構成可能な回路は、機械学習によって再構成される。これにより、第2モードは、機械学習によって再構成可能な回路で決定されるので、第2モードを決定する第2モード決定エンジン12に対する機械学習を繰り返すことで、より適切なモードを第2モードとして決定することができる。
 なお、実施の形態1では、第1モードの決定(第1モード決定ステップS11)は、第2モードに対するコスト計算(コスト計算ステップS13)及びそのコスト計算の結果と第1所定値との比較(モード選択ステップS14)に先立って常に実行されたが、この手順に限られず、第2モードに対するコストと第1所定値との比較結果に依存して実行するか否かを決定してもよい。
 図6は、第2モードに対するコストと第1所定値との比較結果に依存して第1モードの決定(第1モード決定ステップS11)を実行するか否かを制御する、実施の形態1の変形例1に係る画像符号化装置の動作(つまり、画像符号化方法)を示すフローチャートである。実施の形態1に係る図5と同じ処理については、同じ符号を付している。
 本変形例では、第1モードの決定(第1モード決定ステップS11)は、モード選択の処理(S14a)において、第2モードに対するコストが第1所定値よりも大きいと判断された(S20でYes)後に実行される。つまり、モード選択部14により、コスト計算部13が計算した第2モードに対するコストが第1所定値よりも大きいと判断された場合に(S20でYes)、第1モード決定エンジン11は、対象画像に対して、第1処理手順に従って、画像の符号化に適した第1モードを決定する(第1モード決定ステップS11)。その他の手順は、図5に示される実施の形態1での手順と同じである。
 このように、本変形例では、第1モード決定ステップS11は、第2モードに対するコストが第1所定値よりも大きい場合(S20でYes)、及び、第1所定値以下である場合(S20でNo)のうち、第1所定値よりも大きい場合(S20でYes)にだけ実行される。
 これにより、第1モードが最終モードとして用いられることが確定した場合にだけ、第1モードが決定されるので、常に第1モードを決定する場合に比べ、処理負荷が軽減され、第1モードを決定する第1モード決定エンジン11の消費電力が削減される。
 また、実施の形態1では、最終モード(つまり、第1モードか第2モードか)の選択は、第2モードに対するコストだけに基づいて行われたが(モード選択ステップS14)、コストに加えて、第2モードが画像の符号化に適している蓋然性も考慮したうえで、行われてもよい。
 図7は、第2モードに対するコストに加えて第2モードが画像の符号化に適している蓋然性も考慮したうえ最終モードを選択する、実施の形態1の変形例2に係る画像符号化装置の動作(つまり、画像符号化方法)を示すフローチャートである。なお、本フローチャートには、実施の形態1の変形例1に係る特徴(第1モードの決定がモード選択部14での判断結果に依存して実行されるか否かが決定されること)も含まれている。実施の形態1に係る図5と同じ処理については、同じ符号を付している。
 本変形例では、第2モードの決定においては、第2モード決定エンジン12は、処理対象と同じ対象画像に対して第2処理手順に従って対象画像の符号化に適した第2モードを決定することに加えて、第2モードが対象画像の符号化に適している蓋然性を示す蓋然性情報を生成する(第2モード決定ステップS12a)。蓋然性情報としては、例えば、第2モード決定エンジン12を構成するニューラルネットワークの出力層から得られる第2モードの確からしさ(確率)を用いる。つまり、第2モード決定エンジン12として、ニューラルネットワークの出力層を、第2モードの候補となり得る複数のモードのそれぞれに対応させた複数の出力ノードで構成しておく。そして、第2モード決定エンジン12は、対象画像が入力されたときに複数の出力ノードで得られる値のうちの最大値を示す出力ノードに対応するモードを第2モードとして決定し、その出力ノードで得られた値の、全出力ノードで得られた値の合計に対する割合を、蓋然性情報として生成する。
 また、モード選択の処理(S14b)において、モード選択部14は、コスト計算部13が計算した第2モードに対するコストと第1所定値との比較(S20)に先立ち、まず、第2モード決定エンジン12が生成した蓋然性情報が示す蓋然性が第2所定値よりも小さいか否かを判断する(S30)。その結果、蓋然性情報が示す蓋然性が第2所定値よりも小さい場合には(S30でYes)、第1モード決定エンジン11は、第1モードを決定し(第1モード決定ステップS11)、そして、モード選択部14は、第1モード決定エンジン11によって決定された第1モードを最終モードとして選択する(S21a)。
 一方、蓋然性情報が示す蓋然性が第2所定値よりも小さくない場合には(S30でNo)、モード選択部14は、続いて、蓋然性情報が示す蓋然性が第3所定値以上であるか否かを判断し(S31)、蓋然性情報が示す蓋然性が第3所定値以上である場合には(S31でYes)、第2モードを最終モードとして選択する(S22a)。ここで、第3所定値は、第2所定値よりも大きい(つまり、より高い蓋然性を示す)値である。
 一方、蓋然性情報が示す蓋然性が第3所定値以上でない場合には(S31でNo)、上記変形例1のモード選択(S14a(S20、S11、S21、S22))と同様の処理が行われる。つまり、モード選択部14は、コスト計算部13が計算した第2モードに対するコストが第1所定値よりも大きいか否かを判断する(S20)。その結果、第2モードに対するコストが第1所定値よりも大きいと判断された場合には(S20でYes)、第1モード決定エンジン11によって第1モードが決定されるので(第1モード決定ステップS11)、モード選択部14は、第1モード決定エンジン11によって決定された第1モードを最終モードとして選択する(S21)。一方、第2モードに対するコストが第1所定値以下であると判断された場合には(S20でNo)、モード選択部14は、第2モードを最終モードとして選択する(S22)。
 このように、本変形例では、第2モード決定ステップS12aでは、第2モードの決定に加えて、第2モードが画像の符号化に適している蓋然性を示す蓋然性情報を生成し、モード選択ステップS14では、さらに、蓋然性情報が示す蓋然性が第2所定値よりも小さい場合(S30でYes)に第1モードを選択し(S21a)、蓋然性情報が示す蓋然性が第3所定値以上である場合(S31でYes)に第2モードを選択する(S22a)。
 これにより、第2モードに対するコストだけでなく、第2モードが画像の符号化に適している蓋然性も含めたうえで、第1モード及び第2モードの選択が行われるので、より信頼性のあるモード選択が可能になる。
 また、第1モード決定ステップS11は、蓋然性情報が示す蓋然性が第2所定値よりも小さい場合(S30でYes)、及び、蓋然性情報が示す蓋然性が第3所定値以上である場合(S31でYes)のうち、蓋然性情報が示す蓋然性が第2所定値よりも小さい場合(S30でYes)にだけ実行される。
 これにより、蓋然性情報を用いた判定によって第1モードが最終モードとして用いられることが確定した場合にだけ第1モードが決定されるので、常に第1モードを決定する場合に比べ、処理負荷が軽減され、第1モードを決定する第1モード決定エンジン11の消費電力が削減される。
 (実施の形態2)
 次に、実施の形態2に係る画像符号化装置及び画像符号化方法について説明する。
 図8は、実施の形態2に係る画像符号化装置10aの構成を示すブロック図である。画像符号化装置10aは、実施の形態1と同様に、動画像又は静止画等の画像を符号化する装置であるが、実施の形態1と異なり、第2モード決定エンジン12に対して学習を実行させるための機能をさらに有する点に特徴を有する。そのために、画像符号化装置10aは、実施の形態1に係る画像符号化装置10の構成(第1モード決定エンジン11、第2モード決定エンジン12、コスト計算部13、モード選択部14、及び、符号化部15)に加えて、格納部16、及び、学習制御部17を備える。以下、実施の形態1と異なる点を中心に説明する。
 格納部16は、不揮発性メモリ等で実現される記憶部16aを有し、モード選択部14において第2モードが選択されなかった(つまり、第1モードが選択された)場合に、対象画像又は対象画像を特定する情報と、第1モード決定エンジン11が決定した第1モードとを記憶部16aに格納する処理部である。なお、対象画像を特定する情報とは、対象画像の識別情報であり、学習制御部17が対象画像を取得するために参照する情報である。
 学習制御部17は、第2モード決定エンジン12に対して機械学習をさせる処理部であり、より詳しくは、第2モード決定エンジン12を実現する再構成可能な回路に対して、記憶部16aに格納された情報又はコスト計算部13で計算されたコストを用いて機械学習をさせることで、再構成可能な回路を再構成する処理部である。
 具体的には、学習制御部17は、学習制御部17に対する事前の設定に応じて、第2モード決定エンジン12に対して、教師あり学習、又は、強化学習を行う。教師あり学習では、学習制御部17は、記憶部16aから、対象画像又は対象画像を特定する情報と、第1モード決定エンジン11が決定した第1モードとを読み出す。そして、学習制御部17は、記憶部16aから読み出した対象画像又は記憶部16aから読み出した対象画像を特定する情報が示す対象画像を入力データとし、記憶部16aから読み出した第1モードを教師データとして用いることで、第2モード決定エンジン12を実現する再構成可能な回路に対して、教師あり学習をさせる。一方、強化学習では、学習制御部17は、第2モード決定エンジン12で決定された第2モードに対して計算されたコスト及びそのときの対象画像をコスト計算部13から取得する。そして、学習制御部17は、取得した対象画像を入力データとし、取得したコストに対応する値(例えば、コストの逆数)を報酬として用いることで、エージェントである第2モード決定エンジン12を実現する再構成可能な回路に対して、強化学習をさせる。
 なお、格納部16及び学習制御部17は、電子回路、あるいは、プログラム及びプログラムを実行するCPUを含む回路システムで実現される。
 次に、以上のように構成された実施の形態2に係る画像符号化装置10aの動作(つまり、画像符号化方法)について説明する。
 本実施の形態に係る画像符号化装置10aは、動作モードとして、符号化モードと学習モードとを有する。符号化モードでは、画像符号化装置10aを構成する全構成要素のうち、学習制御部17を除く全ての構成要素が動作することで、入力された画像に対する符号化、及び、記憶部16aへの格納が行われる。一方、学習モードでは、画像符号化装置10aを構成する全構成要素のうち、少なくとも第2モード決定エンジン12及び学習制御部17が動作することで、第2モード決定エンジン12に対する機械学習が行われる。なお、学習モードは、符号化モードと並行して行われてもよい。これらの動作モードの制御については、画像符号化装置10aを構成する全構成要素を制御する、プログラム及びプログラムを実行するCPUを含む回路システムで実現される制御部(図示せず)等によって行われる。
 図9Aは、実施の形態2に係る画像符号化装置10aの符号化モードにおける動作を示すフローチャートである。実施の形態1に係る図5のフローチャートと異なる点は、モード選択(S14c)において、第1モードが選択された(S21)後に、格納部16が、対象画像又は対象画像を特定する情報と第1モード決定エンジン11が決定した第1モードとを記憶部16aに格納するステップ(格納ステップS40)が追加されていることである。
 このように、本変形例の符号化モードでは、画像符号化方法として、モード選択ステップS14において第2モードが選択されなかった場合に(S20でYes)、画像又は画像を特定する情報と第1モードとを記憶部16aに格納する格納ステップS40が含まれる。
 これにより、第2モードが選択されなかった場合に、画像又は画像を特定する情報と第1モードとが記憶部16aに格納されるので、例えば、第2モードを決定する第2モード決定エンジン12として機械学習されたモード決定エンジンとすることで、第2モード決定エンジン12が不適切な第2モードを決定したときの入力データ(画像又は画像を特定する情報)及び正しい出力データ(つまり、第1モード)が記憶部16aに格納されるので、これらのデータを用いて第2モード決定エンジン12を機械学習(つまり、教師あり学習)させることが可能になる。
 図9Bは、実施の形態2に係る画像符号化装置10aの学習モードにおける動作(つまり、画像符号化方法)を示すフローチャートである。ここでは、学習制御部17による動作を中心とするフローチャートが示されている。
 まず、学習制御部17は、事前の設定に応じて、第2モード決定エンジン12に対して教師あり学習を行うか、又は、強化学習を行うかを判断する(S50)。
 その結果、教師あり学習を行うと判断した場合には(S50で「教師あり学習」)、学習制御部17は、記憶部16aから、対象画像又は対象画像を特定する情報と第1モード決定エンジン11が決定した第1モードとを読み出すことで、対象画像と第1モードとを取得する(S51)。なお、学習制御部17は、記憶部16aから対象画像を特定する情報を読み出した場合には、対象画像を特定する情報と対象画像とを対応付けて記憶するデータベース(例えば、記憶部16aに格納されているデータベース)を参照することで、対象画像を取得する。そして、学習制御部17は、記憶部16aから読み出した対象画像又は記憶部16aから読み出した対象画像を特定する情報が示す対象画像を入力データとし、記憶部16aから読み出した第1モードを教師データとして用いることで、第2モード決定エンジン12を実現する再構成可能な回路に対して、教師あり学習をさせる(S52)。
 一方、強化学習を行うと判断した場合には(S50で「強化学習」)、学習制御部17は、第2モード決定エンジン12で決定された第2モードに対して計算されたコスト及びそのときの対象画像をコスト計算部13から取得する(S53)。そして、学習制御部17は、対象画像を入力データとし、その対象画像に対して第2モード決定エンジン12で決定された第2モードに対するコストに対応する値(例えば、コストの逆数)を報酬として用いることで、エージェントである第2モード決定エンジン12を実現する再構成可能な回路に対して、強化学習をさせる(S54)。
 このように、本変形例の学習モードでは、画像符号化方法として、第2モード決定エンジン12を実現する再構成可能な回路に対して学習制御部17が機械学習させることで再構成する学習制御ステップS50~S54が含まれる。これにより、第2モードを決定する第2モード決定エンジン12を機械学習させることが可能となり、より適切なモードが第2モードとして決定され得る。
 また、学習制御部17は、機械学習の一つとして、第1モード決定ステップS11で決定された第1モードを教師データとして用いることで、第2モード決定エンジン12を実現する再構成可能な回路に対して、教師あり学習をさせる。これにより、第1モードを教師データとして、第2モードを決定する第2モード決定エンジン12に対する教師あり学習が可能になる。
 また、学習制御部17は、機械学習の他の一つとして、コスト計算ステップS13で計算されたコストに対応する報酬を用いることで、第2モード決定エンジン12を実現する再構成可能な回路に対して、強化学習をさせる。これにより、コスト計算ステップS13で計算されたコストに応じて報酬を定めることで、第2モードを決定する第2モード決定エンジン12に対する強化学習が可能になる。
 以上、本発明に係る画像符号化装置及び画像符号化方法について、実施の形態及び変形例に基づいて説明したが、本発明は、これらの実施の形態及び変形例に限定されるものではない。本発明の主旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態又は変形例に施したものや、実施の形態及び変形例における一部の構成要素を組み合わせて構築される別の形態も、本発明の範囲内に含まれる。
 例えば、上記実施の形態及び変形例では、第1モード決定エンジン11として、従来手法(つまり、理論的なアルゴリズムに従った処理)によるモード決定エンジンで実現し、第2モード決定エンジン12として、ニューラルネットワークで構成されるモード決定エンジンで実現する例が示されたが、第1モード決定エンジン11及び第2モード決定エンジン12の具体例は、これらに限定されない。第1モード決定エンジン11として、任意の探索アルゴリズムに従って複数の選択可能なモードから画像の符号化に適した第1モードを選択できるものであれば、再構成可能な回路及び再構成不可能な回路のいずれで実現されてもよい。また、第2モード決定エンジン12として、再構成可能な回路によって実現されるモード決定エンジンであればよく、ニューラルネットワークに限られず、例えば、サポートベクタマシン等の任意の機械学習によって第2処理手順が学習され得るモード決定エンジンであればよい。
 また、上記実施の形態及び変形例に係る画像符号化装置は、2種類のモード決定エンジンを備えたが、3種類以上のモード決定エンジンを備えてもよい。例えば、第1モード決定エンジンとして、異なる理論的なアルゴリズムに従った処理で第1モードを決定する複数の第1モード決定エンジンを備え、コスト計算部13で計算された第2モードに対するコストに応じて、複数の第1モード決定エンジンの中から実行させる一つを選択してもよい。
 また、上記実施の形態1の変形例2では、モード選択(S14b)において、蓋然性を用いた判断(S30、S31)をした後に、第2モードに対するコストを用いた判断(S20)をしたが、これらの順序は、逆であってもよい。つまり、まず第2モードに対するコストを用いた判断(S20)をし、その後に蓋然性を用いた判断(S30、S31)をしてもよい。
 また、上記実施の形態1の変形例2では、第1モードの決定(第1モード決定ステップS11)は、第1モードを選択することが確定した(S30でYes、S20でYes)後に実行されたが、このような処理手順に限定されない。実施の形態1のように、第1モードの決定(第1モード決定ステップS11)は、モード選択(S14b)の前に実行されてもよい。
 また、上記実施の形態2では、第1モードの決定(第1モード決定ステップS11)は、第2モードに対するコスト計算(コスト計算ステップS13)及びそのコスト計算の結果と第1所定値との比較(モード選択ステップS14c)に先立って常に実行されたが、この手順に限られず、実施の形態1の変形例1及び変形例2のように、第2モードに対するコストと第1所定値との比較結果、あるいは、蓋然性情報が示す蓋然性と第2所定値との比較結果に依存して実行するか否かを決定してもよい。
 また、上記実施の形態及び変形例では、モード選択部14は、第1所定値とコストとの比較、第2所定値及び第3所定値と蓋然性との比較において、第1所定値とコストとが同一である場合、並びに、第2所定値及び第3所定値と蓋然性とが同一である場合に、比較後の選択的な2つの処理の一方を実行したが、これに代えて、比較後の選択的な2つの処理の他方を実行してもよい。つまり、「第1所定値よりも大きい」及び「第1所定値以下」は、それぞれ、「第1所定値以上」及び「第1所定値よりも小さい」に置き換えてもよい。同様に、「第2所定値よりも小さい」及び「第2所定値以上」は、それぞれ、「第2所定値以下」及び「第2所定値よりも大きい」に置き換えてもよい。「第3所定値以上」及び「第3所定値よりも小さい」は、それぞれ、「第3所定値よりも大きい」及び「第3所定値以下」に置き換えてもよい。これらの表現は、第1所定値、第2所定値及び第3所定値の値をどのような値に設定するかによって、実質的に差異がないことを意味し得る。
 また、上記実施の形態及び変形例では、コスト関数として、Cost=Distortion+λ*Rateが用いられたが、このような関数に限られない。例えば、符号化歪が増えても、発生ビット量が増えても、どちらの場合でもコストが大きくなるような関数であれば、他の関数であってもよい。
 本発明は、符号化に適したモードを選択して画像を符号化する画像符号化装置として、例えば、機械学習されるモード決定エンジンを備える一以上の半導体集積回路で構成される動画像符号化装置として、利用できる。
 10、10a 画像符号化装置
 11 第1モード決定エンジン
 12 第2モード決定エンジン
 13 コスト計算部
 14 モード選択部
 15 符号化部
 16 格納部
 16a 記憶部
 17 学習制御部

Claims (14)

  1.  画像を符号化する画像符号化方法であって、
     前記画像を入力とし、第1処理手順に従って、前記画像の符号化に適した第1モードを決定する第1モード決定ステップと、
     前記画像を入力とし、第2処理手順に従って、前記画像の符号化に適した第2モードを決定する第2モード決定ステップと、
     前記第1モード及び前記第2モードから、いずれか一方を最終モードとして選択するモード選択ステップと、
     前記最終モードを用いて、前記画像を符号化する符号化ステップと、
     前記第2モードを用いて前記画像を符号化した場合のコストを計算するコスト計算ステップとを含み、
     前記第2処理手順は、再構成可能な回路によって実現され、
     前記モード選択ステップでは、前記コストが第1所定値よりも大きい場合に前記第1モードを選択し、前記コストが前記第1所定値以下である場合に前記第2モードを選択する
     画像符号化方法。
  2.  前記第1処理手順は、所定の複数のモードのそれぞれを用いて前記画像を符号化した場合のコストを計算し、計算した前記コストが最小であるモードを、前記第1モードとして決定する処理手順であり、
     前記第2処理手順は、コスト計算を用いることなく、所定の複数のモードから前記第2モードを決定する処理手順である
     請求項1記載の画像符号化方法。
  3.  前記回路は、機械学習によって再構成される
     請求項1又は2記載の画像符号化方法。
  4.  前記第1モード決定ステップは、前記コストが前記第1所定値よりも大きい場合、及び、前記コストが前記第1所定値以下である場合のうち、前記コストが前記第1所定値よりも大きい場合にだけ実行される
     請求項1~3のいずれか1項に記載の画像符号化方法。
  5.  前記第2モード決定ステップでは、さらに、前記第2モードが前記画像の符号化に適している蓋然性を示す蓋然性情報を生成し、
     前記モード選択ステップでは、さらに、前記蓋然性情報が示す蓋然性が第2所定値よりも小さい場合に前記第1モードを選択し、前記蓋然性情報が示す蓋然性が第3所定値以上である場合に前記第2モードを選択する
     請求項1~4のいずれか1項に記載の画像符号化方法。
  6.  前記第1モード決定ステップは、前記蓋然性情報が示す蓋然性が第2所定値よりも小さい場合、及び、前記蓋然性情報が示す蓋然性が第3所定値以上である場合のうち、前記蓋然性情報が示す蓋然性が第2所定値よりも小さい場合にだけ実行される
     請求項5記載の画像符号化方法。
  7.  さらに、前記モード選択ステップにおいて前記第2モードが選択されなかった場合に、前記画像又は前記画像を特定する情報と前記第1モードとを記憶部に格納する格納ステップを含む
     請求項1~6のいずれか1項に記載の画像符号化方法。
  8.  さらに、前記回路を機械学習させることで前記回路を再構成する学習制御ステップを含む
     請求項1~7のいずれか1項に記載の画像符号化方法。
  9.  前記学習制御ステップでは、前記第1モード決定ステップで決定された前記第1モードを教師データとして用いることで、前記回路に対して、教師あり学習をさせる
     請求項8記載の画像符号化方法。
  10.  前記学習制御ステップでは、前記コスト計算ステップで計算された前記コストに対応する報酬を用いることで、前記回路に対して、強化学習をさせる
     請求項8記載の画像符号化方法。
  11.  画像を符号化する画像符号化装置であって、
     前記画像を入力とし、第1処理手順に従って、前記画像の符号化に適した第1モードを決定する第1モード決定エンジンと、
     前記画像を入力とし、第2処理手順に従って、前記画像の符号化に適した第2モードを決定する第2モード決定エンジンと、
     前記第1モード及び前記第2モードから、いずれか一方を最終モードとして選択するモード選択部と、
     前記最終モードを用いて、前記画像を符号化する符号化部と、
     前記第2モードを用いて前記画像を符号化した場合のコストを計算するコスト計算部とを含み、
     前記第2処理手順は、再構成可能な回路によって実現され、
     前記モード選択部は、前記コストが第1所定値よりも大きい場合に前記第1モードを選択し、前記コストが前記第1所定値以下である場合に前記第2モードを選択する
     画像符号化装置。
  12.  さらに、前記回路を機械学習させることで前記回路を再構成する学習制御部を含む
     請求項11記載の画像符号化装置。
  13.  前記学習制御部は、前記第1モード決定エンジンで決定された前記第1モードを教師データとして用いることで、前記回路に対して、教師あり学習をさせる
     請求項12記載の画像符号化装置。
  14.  前記学習制御部は、前記コスト計算部で計算された前記コストに対応する報酬を用いることで、前記回路に対して、強化学習をさせる
     請求項12記載の画像符号化装置。
PCT/JP2018/038986 2018-10-19 2018-10-19 画像符号化方法及び画像符号化装置 WO2020079827A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2020551691A JP7255605B2 (ja) 2018-10-19 2018-10-19 画像符号化方法及び画像符号化装置
PCT/JP2018/038986 WO2020079827A1 (ja) 2018-10-19 2018-10-19 画像符号化方法及び画像符号化装置
US17/231,470 US11882269B2 (en) 2018-10-19 2021-04-15 Image encoding method and image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/038986 WO2020079827A1 (ja) 2018-10-19 2018-10-19 画像符号化方法及び画像符号化装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/231,470 Continuation US11882269B2 (en) 2018-10-19 2021-04-15 Image encoding method and image encoding device

Publications (1)

Publication Number Publication Date
WO2020079827A1 true WO2020079827A1 (ja) 2020-04-23

Family

ID=70284473

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/038986 WO2020079827A1 (ja) 2018-10-19 2018-10-19 画像符号化方法及び画像符号化装置

Country Status (3)

Country Link
US (1) US11882269B2 (ja)
JP (1) JP7255605B2 (ja)
WO (1) WO2020079827A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005151017A (ja) * 2003-11-13 2005-06-09 Sharp Corp 画像符号化装置
JP2007267414A (ja) * 2007-05-24 2007-10-11 Toshiba Corp フレーム内画像符号化方法及びその装置
JP2007281634A (ja) * 2006-04-04 2007-10-25 Hitachi Ltd 画像処理装置及び動画像符号化方法。
WO2016200714A2 (en) * 2015-06-12 2016-12-15 Microsoft Technology Licensing, Llc Search strategies for intra-picture prediction modes
WO2018108330A1 (en) * 2016-12-16 2018-06-21 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Encoder and concept for configuring same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016125604A1 (ja) * 2015-02-06 2016-08-11 ソニー株式会社 画像符号化装置および方法
US10216566B2 (en) 2015-06-22 2019-02-26 Hitachi, Ltd. Field programmable gate array

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005151017A (ja) * 2003-11-13 2005-06-09 Sharp Corp 画像符号化装置
JP2007281634A (ja) * 2006-04-04 2007-10-25 Hitachi Ltd 画像処理装置及び動画像符号化方法。
JP2007267414A (ja) * 2007-05-24 2007-10-11 Toshiba Corp フレーム内画像符号化方法及びその装置
WO2016200714A2 (en) * 2015-06-12 2016-12-15 Microsoft Technology Licensing, Llc Search strategies for intra-picture prediction modes
WO2018108330A1 (en) * 2016-12-16 2018-06-21 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Encoder and concept for configuring same

Also Published As

Publication number Publication date
US20210235070A1 (en) 2021-07-29
JP7255605B2 (ja) 2023-04-11
JPWO2020079827A1 (ja) 2021-09-16
US11882269B2 (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN102665079B (zh) 用于hevc的自适应快速帧内预测模式决策方法
US10003792B2 (en) Video encoder for images
JP7448563B2 (ja) 画像コーデック方法、エンコーダ、デコーダおよび記憶媒体
JP2006246431A (ja) 画像符号化装置および画像符号化方法
CN102665078A (zh) 用于hevc的基于方向矢量的帧内预测模式决策
CN105721878A (zh) Hevc视频编解码中执行帧内预测的图像处理装置及方法
JP7245898B2 (ja) ビデオ画像成分の予測方法、装置及びコンピュータ記憶媒体
Díaz-Honrubia et al. Adaptive fast quadtree level decision algorithm for H. 264 to HEVC video transcoding
JP6965887B2 (ja) イントラ予測モード決定方法、イントラ予測モード決定装置およびイントラ予測モード決定プログラム
CN109819250B (zh) 一种多核全组合方式的变换方法和系统
KR102327942B1 (ko) 코딩 유닛 분할 결정 방법 및 디바이스, 컴퓨팅 디바이스 및 판독 가능한 저장 매체
WO2014087861A1 (ja) 画像処理装置、画像処理方法、およびプログラム
CN103957414A (zh) 一种hevc帧内预测编码方法和系统
JP4880255B2 (ja) 符号化モードを選択する方法及び装置
US20240031576A1 (en) Method and apparatus for video predictive coding
Sanchez et al. Hardware-friendly HEVC motion estimation: new algorithms and efficient VLSI designs targeting high definition videos
WO2020079827A1 (ja) 画像符号化方法及び画像符号化装置
Wang et al. Raw image reconstruction with learned compact metadata
CN110971896B (zh) 一种h.265编码方法和装置
CN113992914B (zh) 帧间预测方法及装置、设备、存储介质
CN110049322B (zh) 模式选择的方法、装置、电子设备及存储介质
JP5711789B2 (ja) 画像符号化方法、画像符号化装置及び画像符号化プログラム
CN111918059B (zh) 硬件友好的基于回归树的帧内预测模式决策方法及装置
JP2012060208A (ja) 動画像符号化方法,動画像符号化装置,動画像復号方法,動画像復号装置およびそれらのプログラム
US20170323454A1 (en) Apparatus and method for efficient motion estimation

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020551691

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18937108

Country of ref document: EP

Kind code of ref document: A1