WO2018061503A1 - Encoding device, encoding method, decoding device, and decoding method - Google Patents

Encoding device, encoding method, decoding device, and decoding method Download PDF

Info

Publication number
WO2018061503A1
WO2018061503A1 PCT/JP2017/029411 JP2017029411W WO2018061503A1 WO 2018061503 A1 WO2018061503 A1 WO 2018061503A1 JP 2017029411 W JP2017029411 W JP 2017029411W WO 2018061503 A1 WO2018061503 A1 WO 2018061503A1
Authority
WO
WIPO (PCT)
Prior art keywords
weighting factor
prediction
pixel
region
encoding
Prior art date
Application number
PCT/JP2017/029411
Other languages
French (fr)
Japanese (ja)
Inventor
佐藤 数史
Original Assignee
株式会社ドワンゴ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社ドワンゴ filed Critical 株式会社ドワンゴ
Publication of WO2018061503A1 publication Critical patent/WO2018061503A1/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/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
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/174Methods 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 slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures

Definitions

  • Some aspects according to the present invention relate to an encoding device, an encoding method, a decoding device, and a decoding method for encoding and decoding an image.
  • H.264 H.264 / AVC (hereinafter also referred to as “AVC”) and H.264.
  • AVC H.264 H.264 / AVC
  • HEVC HEVC
  • JVET Joint Video Exploration Team
  • a cost function value is calculated for a candidate prediction mode on the encoder (encoding device) side, and then the value is minimized.
  • the prediction mode is applied to the block to be encoded.
  • JM Joint Model
  • different cost functions having different calculation amounts are used in the high complexity mode and the low complexity mode.
  • a cost function value is calculated for each candidate prediction mode, and a prediction mode that minimizes this value can be applied to the encoding target block (current block).
  • bi-prediction a prediction method called bi-prediction that performs prediction on a block to be encoded using two reference images (reference pictures) is defined.
  • the pixel value is calculated by the following equation (1).
  • x is the coordinate position (two-dimensional vector value including the x coordinate direction and y coordinate direction) of the pixel to be processed
  • v 0 and v 1 are motion vectors (including the x coordinate direction and the y coordinate direction). 2D vector value).
  • P is a predicted value of the pixel of the processing target block
  • P 0 and P 1 are pixel values in the reference image.
  • predicted pixel values are calculated by multiplying the pixel values of two reference images by the same weight 1/2.
  • Non-Patent Document 1 proposes that a predicted pixel value is calculated using different weights using the following equation (2).
  • w is a weight.
  • the weight coefficient w is limited to -1/4, 1/4, 3/8, 1/2, 5/8, 3/4, 5/4, and the index of w
  • the value is explicitly transmitted for each prediction block (PU: Prediction unit).
  • Non-Patent Document 1 the combinations of motion vectors and weighting coefficients are enormous. As a result, a large amount of calculation is required to obtain an optimal combination of motion vectors and weighting factors.
  • Non-Patent Document 1 it is necessary to explicitly transmit information related to the weighting factor w in the encoded data (bit stream). For this reason, the amount of information in the encoded data increases and the encoding efficiency decreases.
  • Non-Patent Document 1 does not consider how the weighting coefficient w is applied to the luminance signal and the color difference signal.
  • Some aspects of the present invention have been made in view of any of the above-described problems, and provide an encoding device, an encoding method, a decoding device, and a decoding method that enable suitable bidirectional prediction.
  • One of the purposes is to do.
  • An encoding apparatus encodes an input moving image having a luminance signal and two color difference signals by predictive encoding using bidirectional prediction using a first weighting factor and a second weighting factor.
  • a frame memory that stores a plurality of reference images including a first reference image and a second reference image, and the first reference that is referred to by an encoding target region in an encoding target image in the input moving image.
  • the first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal may take
  • the decoding apparatus is a code in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor.
  • a first motion vector for determining a position of a first region in the first reference image to which a decoding target region of a decoding target image in the input moving image refers Information of the second motion vector that determines the position of the second region in the second reference image referred to by the decoding target region, the pixel value and the predicted pixel value of the pixel in the decoding target region, Means for receiving the encoded data including residual information based on the difference between the frame, a frame memory for storing a plurality of reference images including a first reference image and a second reference image, and reference by the first motion vector
  • Weight coefficient determining means for determining the second weight coefficient applied to the second area calculated by the first weight coefficient used and the second motion vector, and pixel values of the pixels in the first area Means for calculating the
  • An encoding method is an encoding method in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor.
  • a method of storing a plurality of reference images including a first reference image and a second reference image, and the first reference referred to by an encoding target region in an encoding target image in the input moving image Obtaining a first motion vector defining a position of a first region in an image and a second motion vector defining a position of a second region in the second reference image referred to by the encoding target region; Determining the first weighting factor applied to the first region referenced by one motion vector and the second weighting factor applied to the second region referenced by the second motion vector; First area The predicted pixel value for the encoding target area is calculated by multiplying the pixel value of each pixel by the first weighting coefficient and multiplying the pixel value of the pixel in the second area by the second weighting
  • the encoding device performs the steps and generating encoded data by encoding residual information relating to a difference between a pixel value of a pixel in the encoding target region and the predicted pixel value, and the luminance
  • the first weighting factor and the second weighting factor applied to the signal and the first weighting factor and the second weighting factor applied to the color difference signal may take different values.
  • a decoding method is a code in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor.
  • Information of the second motion vector that determines the position of the second region in the second reference image referred to by the decoding target region, the pixel value and the predicted pixel value of the pixel in the decoding target region, Receiving the encoded data including residual information based on the difference between the plurality of reference images, storing a plurality of reference images including a first reference image and a second reference image, and being referred to by the first motion vector.
  • the decoding apparatus performs a step of calculating the predicted pixel value for the decoding target region by multiplying a pixel value of a pixel in the second region by the second weighting factor while multiplying by a weighting factor.
  • the first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal have different values. obtain.
  • “part”, “means”, “apparatus”, and “system” do not simply mean physical means, but “part”, “means”, “apparatus”, “system”. This includes the case where the functions possessed by "are realized by software. Further, even if the functions of one “unit”, “means”, “apparatus”, and “system” are realized by two or more physical means or devices, two or more “parts” or “means”, The functions of “device” and “system” may be realized by a single physical means or device.
  • FIG. 4 is a block diagram illustrating a partial functional configuration of the encoding device illustrated in FIG. 3. It is a block diagram which shows the function structure of the decoding apparatus which concerns on embodiment.
  • FIG. 4 is a block diagram illustrating a partial functional configuration of the encoding device illustrated in FIG. 3. It is a block diagram which shows the function structure of the decoding apparatus which concerns on embodiment.
  • FIG. 6 is a block diagram illustrating a partial functional configuration of the decoding device illustrated in FIG. 5. It is a flowchart which shows the flow of a process of the encoding apparatus shown in FIG. 6 is a flowchart showing a flow of processing of the decoding device shown in FIG. 5. It is a figure which shows the specific example of a structure of coding data.
  • FIG. 6 is a block diagram illustrating a specific example of a hardware configuration in which the encoding device and the decoding device illustrated in FIGS. 3 and 5 can be mounted.
  • bi-prediction In moving picture coding schemes such as AVC and HEVC, a prediction scheme called bi-prediction that performs prediction on a processing target block using two reference images (reference pictures) is defined.
  • bi-prediction a prediction scheme called bi-prediction that performs prediction on a processing target block using two reference images (reference pictures) is defined.
  • the bidirectional prediction will be briefly described with reference to FIG.
  • the luminance and color difference in the prediction unit PU are referred to by referring to the two reference images P 0 and P 1 that are decoded first.
  • the pixel value of is predicted.
  • the prediction unit PU refers to the reference images P 0 and P 1 using reference information r 0 and r 1 (hereinafter also referred to as reference information r).
  • reference information r reference information
  • the motion vector v are relative to the prediction unit PU. It is assumed that it is specified as a direction (vector value of x coordinate direction and y coordinate direction).
  • Blocks B 0 and B 1 are blocks that are specified by the reference information r and the motion vector v and are referenced from the prediction unit PU.
  • the same weighting factor 1/2 is applied to the pixel values P [x + v 0 ] and P [x + v 1 ] in the two reference images P 0 and P 1 .
  • the pixel value P [x] of the pixel in the prediction unit PU to be processed is calculated.
  • Equation (2) if the weighting factor w is an arbitrary value, a large amount of coding is required to transmit the weighting factor w, so that the coding efficiency decreases. Therefore, the weight coefficient w is limited to -1/4, 1/4, 3/8, 1/2, 5/8, 3/4, 5/4, and the index value of the weight coefficient w is predicted. An explicit transmission for each unit PU is also conceivable. However, when bidirectional prediction is performed by such a method, the following problems occur.
  • At least one of the two methods is used to solve at least one of the two problems. Both methods can be applied independently in the prediction process, and it is not always necessary to use both in combination.
  • reference image P will be described as two reference images P 0 and P 1 .
  • the number of reference images P is not necessarily two, and it may be predicted using three or more reference images.
  • reference information r, motion vector v, and weight coefficient w can be prepared for each reference image.
  • the weighting factors applied to the two reference images P 0 and P 1 are w and (1-w), respectively, and the weighting factors are applied to the two reference images P 0 and P 1. It is assumed that the sum of is 1. However, it is also conceivable that the sum of the weighting factors applied to the two reference images is other than 1.
  • the technique 1 is mainly for solving the above-described problem 1, that is, for reducing the amount of calculation related to the calculation of the combination of the motion vector v and the weighting coefficient w during the encoding process. Specifically, first, with respect to the luminance signal component in the prediction unit PU, motion vectors v 0 and v 1 that obtain a favorable result by prediction according to the above equation (1) are calculated. In the above equation (1), the weighting coefficient applied to the two reference images P 0 and P 1 (hereinafter, the weighting coefficient applied only to the luminance signal is also referred to as w Y ) is 1/2. Therefore, the amount of calculation required to determine the motion vector v is smaller than that in the equation (2).
  • the motion vector v from which a favorable result is obtained is, for example, a prediction unit of an absolute value difference (residual) between an actual pixel value of a pixel in the prediction unit PU to be processed and a predicted pixel value P [x].
  • the sum total of all the pixels in the PU is the smallest among the possible motion vectors.
  • a weighting coefficient w (hereinafter, applied only to the chrominance signal) that can obtain a favorable result by prediction using the above equation (2) using the motion vector v determined based on the luminance signal component.
  • the weight coefficient is also referred to as w C ). If the motion vector v is a fixed value, it is only necessary to perform an operation on w, so that the amount of operation is drastically reduced compared to the case of performing an operation on both.
  • the weighting factor w from which a suitable result is obtained is, for example, prediction of the absolute value difference (residual) between the actual pixel value of the pixel in the prediction unit PU to be processed and the predicted pixel value P [x]. The sum of all the pixels in the unit PU is the smallest among the possible weighting factors.
  • the weighting factor w can be calculated and applied by a shift operation. In other words, division is not necessary in calculating the weighting factor w, so that the amount of calculation can be further reduced.
  • the degree of freedom related to the prediction image generation is improved, so that the prediction accuracy of the prediction image is improved (residual is reduced). Is possible.
  • the color difference signal component includes two components (here, Cb and Cr), but independent weighting factors w Cb and w Cr may be calculated for Cb and Cr, respectively.
  • the weighting coefficient of one color difference signal for example, the weighting coefficient w Cb related to Cb processed and transmitted before Cr
  • the weighting coefficient of the other color difference signal for example, Cb
  • a weighting factor w Cr ) related to Cr to be transmitted may be predicted.
  • the color space is described as being expressed in YCbCr, but the color space expression method is not limited to this.
  • the processing method according to the following description can be similarly applied.
  • the motion vector v and the weighting factor w calculated in this way are each predicted and indexed and then stored in the bitstream, so that the coding efficiency can be improved. It is also conceivable that the weight coefficient w is not included in the bitstream by combining the technique 1 with the technique 2 described later.
  • the mechanism for sharing the weighting coefficient w between the encoding side and the decoding side is divided between the luminance signal and the color difference signal.
  • the luminance signal weight coefficient w Y may be encoded in the bit stream, and the color difference signal weight coefficient w C information may not be included in the bit stream by applying Method 2 described later.
  • Method 2 is mainly for solving the above-described problem 2, that is, for improving the coding efficiency related to the transmission of the weight coefficient.
  • the technique will be described with reference to FIGS. 2a and 2b.
  • the prediction unit PU, the motion vectors v 0 and v 1 , the reference images P 0 and P 1 , the reference information r 0 and r 1 , and the blocks B 0 and B 1 have the same meaning and relationship as in FIG. It is the same.
  • a left adjacent pixel lap adjacent to the prediction unit PU on the left side, an upper adjacent pixel uap adjacent on the upper side, and an upper left adjacent pixel ulap adjacent on the upper left (hereinafter also collectively referred to as an adjacent pixel ap) are considered.
  • To calculate the weighting coefficient w Details of the relationship between the prediction unit PU, the left adjacent pixel lap, the upper adjacent pixel uap, and the upper left adjacent pixel ulap are shown in FIG. 2b.
  • each pixel included in the adjacent pixel ap is drawn as a circle.
  • the size of the prediction unit PU is 8 pixels ⁇ 8 pixels.
  • the size of the prediction unit PU is not limited to this, and can be any size, for example, 4 pixels ⁇ 4 pixels, 16 pixels ⁇ 16 pixels, 8 pixels ⁇ 16 pixels, 16 pixels ⁇ 8 pixels, and the like. It is.
  • the left adjacent pixel lap is 8 pixels adjacent to the left side of the prediction unit PU.
  • the upper adjacent pixel uap is eight pixels adjacent to the upper side of the prediction unit PU.
  • the upper left adjacent pixel ulap is one pixel adjacent to the prediction unit PU at the upper left.
  • a suitable weight coefficient w is calculated based on the pixel value of the adjacent pixel ap adjacent on the left side and / or the upper side of the prediction unit PU, not the prediction unit PU itself.
  • the adjacent pixels of the blocks B 0 and B 1 in the reference images P 0 and P 1 are ap 0 and ap 1 , respectively, the adjacent pixel ap of the prediction unit PU and the adjacent pixels ap 0 and ap 1 of the blocks B 0 and B 1
  • the weighting factor w is calculated so that the total residual is minimized.
  • the weighting coefficient w is calculated based on the pixel value of the adjacent pixel ap of the prediction unit PU. If the same processing is performed in both the encoding device and the decoding device, the encoding device predicts the weighting factor w information (the value of the weighting factor w, the index for determining the weighting factor w, and the weighting factor w). For example, the decoding apparatus can calculate the weight coefficient w without including the prediction information and the like in the bitstream.
  • the image CP is divided into slices and / or tiles, and each slice and tile can be independently encoded / decoded. Therefore, even when trying to use the adjacent pixel ap when obtaining the weighting coefficient w of the prediction unit PU, there are cases where it cannot be used due to circumstances such as at least a part of the adjacent pixel ap is not in the same slice and / or tile. Therefore, depending on the situation, the weighting factor w may be calculated using only the upper adjacent pixel uap, or the weighting factor w may be calculated using only the left adjacent pixel lap. This point will be described below with reference to FIGS. 2c and 2d.
  • a slice and / or tile includes one or more blocks (macroblock or coding tree unit (CTU)).
  • CTU coding tree unit
  • the CTU is further recursively divided into one or more coding units (CUs).
  • the CU includes a prediction unit PU that divides the CU for prediction processing, and a conversion unit (Transform Unit: TU) that is divided for conversion processing.
  • the image CP includes 16 CTUs in the horizontal direction and 9 in the vertical direction, but the number of CTUs included in the image CP is not limited to this.
  • CU, PU, and TU obtained by further dividing the CTU are not shown.
  • the image CP can be divided into one or more slices and / or tiles.
  • the image CP is divided into four tiles T1 to T4 (hereinafter collectively referred to as tiles T) that are rectangular areas.
  • the tile T1 includes 35 CTUs surrounded by CTUs 0101, 0107, 0507, and 0501.
  • the tile T2 includes 45 CTUs surrounded by CTUs 0108, 0116, 0516, and 0508
  • the tile T3 includes 28 CTUs surrounded by CTU0601, 0607, 0907, and 0901
  • the tile T4 includes CTU0608, 36 CTUs surrounded by 0616, 0916 and 0908 are included, respectively.
  • the number of divisions from the image CP to the tile T is not limited to four, and can be divided into an arbitrary number.
  • the tile T1 is divided into two slices S1 and S2 (hereinafter collectively referred to as slice S).
  • slice S1 includes 18 CTUs of CTUs 0101 to 0107, 0201 to 0207, 0301 to 0304, and the slice S2 includes 17 CTUs of CTUs 0305 to 0307, 0401 to 0407, and 0501 to 0507. include.
  • the number of divisions from the tile T to the slice S is not limited to two, and can be divided into an arbitrary number.
  • the tile T is divided into slices S.
  • the present invention is not limited to this, and the slice S can be divided into tiles T.
  • the tile T is not necessarily divided into slices S.
  • the slice S is not necessarily divided into tiles T.
  • each CTU in the tile T can be decoded independently of the other tiles T.
  • each CTU in slice S can be decoded independently of the other slices S.
  • the processing for each CTU is performed in order from the left side to the right side and from the upper side to the lower side. For example, in the case of the slice S1, processing for the CTU 0101 is first performed. Thereafter, the processing for the CTU adjacent on the right side is sequentially performed up to CTU0107. When the processing up to CTU0107 is completed, the boundary of the slice S is reached, so the processing on the leftmost CTU0201 in the lower row is performed next.
  • the CTU in each tile T and the CTU in the slice S must be able to be processed independently of the other tiles T and slices S. Therefore, for example, the processing of CTU0607 cannot depend on CTU0507. That is, when calculating the weighting coefficient w for CTU0607, it is not possible to refer to pixels in the adjacent CTU0507 on the upper side. In such a case, when calculating the weighting coefficient w for CTU0607, only the pixel in CTU0606 that is the CTU adjacent to the left side, that is, the left adjacent pixel lap is used, and the upper adjacent pixel uap is not used. (See FIG. 2d).
  • the weighting factor is based on the adjacent pixel ap. w cannot be calculated. Therefore, in this case, for example, it is conceivable to transmit information including the weighting factor w included in the encoded data, or to set the weighting factor in bidirectional prediction to a fixed value. In the latter case, the weighting factor w may be fixed to 1/2, for example.
  • the weight coefficient w is obtained using the left adjacent pixel lap, and when the left adjacent pixel lap cannot be used, the upper adjacent pixel lap is upper adjacent. What is necessary is just to obtain
  • each adjacent pixel ap may be determined at any time on the encoding side and the decoding side, but information on the adjacent pixel ap used when calculating the weighting coefficient w is explicitly encoded. It is also possible to include it in the digitized data. In this case, for example, when calculating the weighting coefficient w, only the upper adjacent pixel uap or only the left adjacent pixel lap is used, or all of the upper adjacent pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap Whether or not to use the adjacent pixel ap may be given to the encoded data as flag information or the like.
  • the motion vectors v 0 and v 1 can be determined by various methods such as motion vector prediction using a motion vector of an adjacent block.
  • the weighting factor w for example, after calculating the weighting factor w to be applied to the prediction unit PU so that the sum of the residuals of the luminance signals of the adjacent pixels ap is minimized, the weighting factor w may be applied to the color difference signal. Conceivable. Alternatively, the weighting coefficient w applied to the prediction unit PU may be calculated so that the sum of the residuals of the luminance signal and the color difference signal of the adjacent pixel ap is reduced.
  • the luminance signal weight coefficient w Y and the color difference signal weight coefficient w C may be obtained so that the sum of the luminance signal and the color difference signal is reduced.
  • the color difference signals Cb and Cr it is conceivable to obtain the weighting factors w Cb and w Cr independently of each other. Furthermore, it is conceivable to predict w Cr from the weight coefficient w Cb .
  • Method 2 When Method 2 is used in combination with Method 1, motion vectors v 0 and v 1 are calculated for the luminance signal after the weighting factor w Y is halved. Then, it is conceivable to calculate the weighting coefficient w C applied to the color difference signal of the prediction unit PU so that the sum of the residuals of the color difference signals of the adjacent pixels ap is minimized. In this case, for each of the color difference signal C b C r, different weighting factors so that the total is less residual neighboring pixels ap w Cb, it may calculate the w Cr. Furthermore, w Cr may be predicted from the obtained weight coefficient w Cb .
  • the encoding apparatus 100 includes an input unit I1, an output unit O1, an A / D (analog / digital) conversion unit 101, a rearrangement buffer 103, an orthogonal conversion unit 105, a quantization unit 107, an entropy code. 109, accumulation buffer 111, rate control unit 113, inverse quantization unit 115, inverse orthogonal transform unit 117, loop filter 119, frame memory 121, intra prediction unit 123, motion prediction unit 125, and bidirectional prediction weight coefficient calculation Part 127.
  • input / output of main signals is represented by arrows. However, even when there is input / output of signals between functions, the description of the arrows is omitted. There may be. This also applies to FIGS. 4 to 6.
  • the A / D conversion unit 101 converts the analog signal image data input from the input unit I1 into image data for each frame of the digital signal, and supplies the image data to the rearrangement buffer 103 in the display order.
  • the rearrangement buffer 103 is a buffer for rearranging the order of image frame data (hereinafter also referred to as input image) for encoding.
  • the rearrangement buffer 103 outputs the input image to the arithmetic unit AD1 in the order of encoding.
  • the rearrangement buffer 103 also supplies the input image to be encoded to the intra prediction unit 123 and the motion prediction unit 125.
  • the image division unit 103a divides the input image and supplies the divided input image. More specifically, for example, as described with reference to FIG. 2c, the image dividing unit 103a may divide the input image into slices and / or tiles including one or more blocks (CTU).
  • CTU blocks
  • the computing unit AD1 subtracts the prediction image supplied from the intra prediction unit 123 or the motion prediction unit 125 from the input image to be encoded supplied from the rearrangement buffer 103, thereby obtaining each pixel value (luminance signal and A residual signal relating to a differential image consisting of residuals (which can include color difference signals) is obtained.
  • the orthogonal transform unit 105 performs orthogonal transform such as discrete cosine transform (DCT) and Karhunen-Loeve transform on the residual signal calculated by the arithmetic unit AD1.
  • the method of orthogonal transformation is arbitrary.
  • the transform coefficient of the residual signal calculated by the orthogonal transform unit 105 is supplied to the quantization unit 107.
  • the quantization unit 107 quantizes the transform coefficient supplied from the orthogonal transform unit 105. At this time, the quantization unit 107 performs quantization based on the quantization parameter based on the information related to the target value of the coding amount supplied from the rate control unit 113. Note that the quantization method is arbitrary.
  • the entropy encoding unit 109 encodes the transform coefficient quantized by the quantization unit 107 using an arbitrary encoding method.
  • the entropy encoding unit 109 receives information indicating the prediction mode and various types of information used for prediction, for example, information on the division mode in the prediction unit PU and information on the motion vector v, from the intra prediction unit 123 and the motion prediction unit 125. get. Also, information such as used filter coefficients is acquired from the loop filter 119. The entropy encoding unit 109 encodes the information by an arbitrary method, and generates header information from the encoded information. The entropy encoding unit 109 supplies encoded data obtained as a result of encoding to the accumulation buffer 111.
  • an arithmetic encoding method using a variable length encoding method such as CAVLC (Context-Adaptive Variable Length Coding) or a CABAC (Context-Adaptive Binary Arithmetic Coding) is used. Is possible.
  • the accumulation buffer 111 is a buffer that temporarily stores the encoded data supplied from the entropy encoding unit 109.
  • the accumulation buffer 111 outputs the stored encoded data from the output unit O1 as a bit stream to a storage device or a transmission path (not shown).
  • the rate control unit 113 sets a target value of the coding amount so that overflow or underflow does not occur based on the code amount of the coded data accumulated in the accumulation buffer 111, and performs the quantization operation in the quantization unit 107. Perform rate control.
  • the transform coefficient quantized by the quantization unit 107 is supplied not only to the entropy encoding unit 109 but also to the inverse quantization unit 115.
  • the inverse quantization unit 115 inversely quantizes the quantized transform coefficient.
  • any method can be used as long as it corresponds to the quantization method used in the quantization unit 107.
  • the inverse orthogonal transform unit 117 performs inverse orthogonal transform on the transform coefficient obtained by the inverse quantization by the inverse quantization unit 115.
  • the inverse orthogonal transform method any method can be used as long as it corresponds to the orthogonal transform method used in the orthogonal transform unit 105.
  • a residual signal constituting the difference image which is an input of the orthogonal transform unit 105, is restored.
  • the restored residual signal is supplied from the inverse orthogonal transform unit 117 to the arithmetic unit AD2.
  • the arithmetic unit AD2 adds the predicted image supplied from the intra prediction unit 123 or the motion prediction unit 125 to the residual signal supplied from the inverse orthogonal transform unit 117, thereby obtaining a locally restored decoded image. be able to.
  • the decoded image is supplied to the loop filter 119 or the frame memory 121.
  • the loop filter 119 performs various types of filter processing that can include deblocking filter processing, SAO (Sample Adaptive Offset) processing, and the like on the decoded image. For example, the loop filter 119 reduces block distortion by performing a deblocking filter process on the decoded image. Further, the loop filter 119 performs SAO processing on the decoded image after the deblocking filter processing, thereby reducing ringing that distorts pixel values around the edge and correcting pixel value deviation. In addition, the loop filter 119 may perform an arbitrary filter process for improving the image quality. The loop filter 119 supplies the decoded image after various filter processes to the frame memory 121.
  • SAO Sample Adaptive Offset
  • the frame memory 121 stores the decoded image and supplies the decoded image as a reference image to the selection unit SW1 and the bi-directional prediction weight coefficient calculation unit 127.
  • the frame memory 121 can store a plurality of reference images by dividing them into two reference image groups of list 0 (list0) and list 1 (list1).
  • a prediction method for performing motion prediction with reference to reference images stored in list 0 and motion prediction with reference to reference images stored in list 1 are performed. Any one of a prediction method and a prediction method (bidirectional prediction) in which motion prediction is performed with reference to two reference images of a reference image stored in list 0 and a reference image stored in list 1 can be applied. .
  • the selection unit SW1 supplies the reference image supplied from the frame memory 121 to the motion prediction unit 125 or the intra prediction unit 123 according to the prediction mode to be applied. For example, when encoding by intra prediction (intra-screen prediction), SW1 outputs a reference image to the intra prediction unit 123. On the other hand, when encoding by inter prediction (motion prediction), SW1 outputs a reference image to the motion prediction unit 125.
  • the intra prediction unit 123 uses the pixel values in the reference image (processing target picture) supplied from the frame memory 121 via the selection unit SW1 to generate a prediction image with a prediction unit PU as a processing unit. Perform intra prediction. At this time, the intra prediction unit 123 performs intra prediction in a plurality of intra prediction modes prepared in advance, and generates a prediction image, respectively. After that, the input image is read from the rearrangement buffer 103, and a prediction mode in which the difference (residual) between the input image and the predicted image is selected is selected. More specifically, for example, a cost function prepared in advance is applied to the input image and each predicted image, and a prediction mode that minimizes the obtained cost function value is applied to the prediction unit PU to be encoded. The intra prediction mode can be set.
  • the intra prediction unit 123 outputs various information necessary for intra prediction, such as information on the selected intra prediction mode, to the entropy encoding unit 109. Moreover, the prediction image produced
  • the motion prediction unit 125 performs a motion prediction process for each prediction unit PU, using the reference image supplied from the frame memory 121 via the selection unit SW1 and the input image supplied from the rearrangement buffer 103.
  • the motion prediction unit 125 performs inter prediction in a plurality of inter prediction modes prepared in advance, and generates a predicted image respectively. After that, the input image is read from the rearrangement buffer 103, and a prediction mode in which the difference (residual) between the input image and the predicted image is selected is selected. More specifically, for example, a cost function prepared in advance is applied to the input image and each predicted image, and a prediction mode that minimizes the obtained cost function value is applied to the prediction unit PU to be encoded.
  • the motion prediction mode can be set.
  • the motion prediction unit 125 outputs various information necessary for motion prediction, such as information on the selected motion prediction mode, to the entropy encoding unit 109. Further, the prediction image generated in the inter prediction mode is output to the arithmetic unit AD2 via the selection unit SW2.
  • the motion prediction unit 125 can perform prediction using a weighting factor w that is not fixed to 1 ⁇ 2 when performing bidirectional prediction.
  • the bi-directional prediction weight coefficient calculator 127 calculates the weight coefficient w.
  • the motion prediction unit 125 includes a motion vector search unit 151, a prediction direction determination unit 153, a bidirectional prediction unit 155, a mode determination unit 157, and a predicted image generation unit 159.
  • the selection units SW1 and SW2 are not shown.
  • the motion vector search unit 151 uses the reference image supplied from the frame memory 121 and the input image supplied from the rearrangement buffer 103, and uses the two motion vectors v (v to be applied to the processing target prediction unit PU. Search for 0 and v 1 ).
  • the motion vector v obtained for the reference image in the list 0 is referred to as a motion vector v 0
  • the motion vector v obtained for the reference image in the list 1 is referred to as a motion vector v 1 .
  • a motion vector v referring to a region (block B) in the reference image P in which the difference from the pixel value of the pixel included in the prediction unit PU is minimized is determined as a motion.
  • the vector search unit 151 searches. At this time, for example, a motion vector v having the smallest cost function value can be adopted by applying a predetermined cost function to all possible motion vectors v.
  • the motion vector search unit 151 may determine the motion vector v in consideration of all of the luminance signal and the two color difference signals included in the prediction unit PU, or only the luminance signal is considered. Thus, the motion vector v may be determined.
  • the prediction for the prediction unit PU can be performed by dividing the prediction unit PU into a plurality of pieces. Therefore, the motion vector search unit 151 calculates a motion vector v for each division method.
  • the division method of the prediction unit PU is also referred to as a division mode.
  • the prediction direction determination unit 153 determines, for each division mode, which one of the motion vectors v 0 and v 1 supplied from the motion vector search unit 151 is used or both.
  • prediction using only one of the motion vectors v 0 and v 1 is referred to as unidirectional prediction
  • prediction using both is referred to as bidirectional prediction.
  • unidirectional prediction or bidirectional prediction uses unidirectional prediction using motion vector v 0 , unidirectional prediction using motion vector v 1 , and both motion vectors v 0 and v 1 . It is possible to determine which of the two-way predictions has the smallest difference from the input image.
  • the prediction direction determination unit 153 may determine the prediction method in consideration of all of the luminance signal and the two color difference signals included in the prediction unit PU, or may determine the prediction method in consideration of only the luminance signal. You may do it. Moreover, when calculating the prediction pixel value in bidirectional prediction in order to determine the prediction method, the prediction pixel value when the weighting factor w is 1 ⁇ 2 may be applied.
  • the prediction direction information determined by the prediction direction determination unit 153 is used to control the selection units SW3 and SW4. Specifically, in the case of bidirectional prediction, the selection unit SW3 so that information on the motion vectors v 0 and v 1 used for prediction is supplied to the bidirectional prediction weight coefficient calculation unit 127 and the bidirectional prediction unit 155. And SW4 are controlled.
  • the bi-directional prediction weight coefficient calculation unit 127 includes an input image to be encoded supplied from the rearrangement buffer 103 and two reference images supplied from the frame memory 121 (reference images included in each of list 0 and list 1). ) To calculate a weighting coefficient w to be applied in bidirectional prediction. This processing is performed for each division mode in which bidirectional prediction is performed. At this time, as described above, the bidirectional prediction weight coefficient calculation unit 127 can limit the possible value of the weight coefficient w to m / (2 n ) (where m and n are integers). In this case, since the weighting factor w can be calculated only by the shift calculation (no division is required), it is possible to reduce the calculation amount.
  • the bidirectional prediction weight coefficient calculation unit 127 sets the weight coefficient applied to the luminance signal to 1 ⁇ 2, and bidirectionally only the weight coefficient w C for only the color difference signal.
  • the prediction weight coefficient calculation unit 127 may calculate the weight.
  • the bidirectional prediction weight coefficient calculation unit 127 may calculate different weight coefficients w Cb and w Cr for the two color difference signals.
  • a weight coefficient w that is not 1 ⁇ 2 that can be applied to all of the luminance signal and the color difference signal may be calculated, or for the luminance signal and the two color difference signals, Different weighting factors w Y and w C may be calculated.
  • Information on the calculated weighting factor w is output from the bidirectional prediction weighting factor calculation unit 127 to the bidirectional prediction unit 155 of the motion prediction unit 125.
  • the bidirectional prediction weight coefficient calculation unit 127 calculates the weight coefficient w and the pixel value of each pixel in the prediction unit PU in the input image to be encoded and the prediction unit PU calculated by the above equation (2).
  • the weighting coefficient w can be determined so that the sum of differences from the pixel values of the respective pixels in the inside becomes small.
  • the weighting factor w that reduces the difference in the pixel value calculated by the above equation (2) may be calculated in the adjacent pixel ap (the method 2 described above). ). In the latter case, the weighting factor w can be inevitably calculated from the adjacent pixel ap that is not included in the prediction unit PU to be processed.
  • the decoding apparatus can calculate the weighting coefficient w without receiving the value of the weighting coefficient w or the index information indicating the weighting coefficient w, it is not necessary to include information on the weighting coefficient w in the bitstream. For this reason, it is possible to prevent a decrease in coding efficiency due to transmission of information related to the weighting factor w, while adopting a flexible weighting factor w that is not fixed to 1 ⁇ 2.
  • the weight coefficient w can be set to a fixed value such as 1/2.
  • the bidirectional prediction unit 155 performs bidirectional prediction using the motion vectors v 0 and v 1 supplied from the prediction direction determination unit 153 and the weight coefficient w supplied from the bidirectional prediction weight coefficient calculation unit 127. This processing is performed for each division mode in which bidirectional prediction is performed.
  • the mode determination unit 157 determines which prediction mode should be used for motion prediction from the motion vector v and the weighting factor w in each prediction mode (including the division mode) generated in this way. To do. In this process, for example, a prediction mode in which a difference between a predicted image in each prediction mode and an input image read from the rearrangement buffer 103 is reduced is selected. More specifically, a prediction mode that applies a cost function prepared in advance to each of the input image and each prediction image and minimizes the obtained cost function value is applied to the prediction unit PU to be encoded. Motion prediction mode.
  • the prediction image generation unit 159 receives information for prediction in the prediction mode determined by the mode determination unit 157, for example, the motion vector v and the prediction mode information, and reads the reference image information from the frame memory 121 to thereby perform prediction. Generate an image. The generated prediction image is output to the arithmetic units AD1 and AD2.
  • the mode determination unit 157 outputs the determined motion vector v and prediction mode information to the entropy encoding unit 109.
  • the mode determination unit 157 does not necessarily obtain information on the weighting coefficient w even when bidirectional prediction is performed. There is no need to output.
  • the adjacent pixel ap used when calculating the weighting factor w is the upper adjacent pixel uap, the left adjacent pixel lap, or the upper adjacent pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap. It is also conceivable that information indicating whether or not any of the adjacent pixels ap is used is output to the entropy encoding unit 109 so as to be included in the encoded data.
  • the mode determination unit 157 uses index information for determining the value of the weight coefficient w, and the like. May be output to the entropy encoding unit 109.
  • the mode determination unit 157 may output flag information indicating that to the entropy encoding unit 109. The flag information may be included for each prediction unit PU or may be included for each slice.
  • the decoding apparatus 200 includes an input unit I2, an accumulation buffer 201, an entropy decoding unit 203, an inverse quantization unit 205, an inverse orthogonal transform unit 207, a loop filter 209, a rearrangement buffer 211, a D / D An A (digital / analog) conversion unit 213, a frame memory 215, an intra prediction unit 217, a motion prediction unit 219, and a bidirectional prediction weight coefficient calculation unit 221 are included.
  • the accumulation buffer 201 accumulates the encoded data (bit stream) input from the input unit I2, and appropriately outputs the encoded data to the entropy decoding unit 203.
  • the entropy decoding unit 203 decodes the information supplied from the accumulation buffer 201 and encoded by the entropy encoding unit 109 in FIG. 3 to the encoding method used at the time of encoding. Decrypt with.
  • the quantized transform coefficient of the difference image obtained as a result of decoding is supplied from the entropy decoding unit 203 to the inverse quantization unit 205.
  • the inverse quantization unit 205 inversely quantizes the quantized transform coefficient of the difference image by a method corresponding to the quantization method in the quantization unit 107 in FIG. 3 to obtain a transform coefficient.
  • the inverse quantization method any method can be used as long as it corresponds to the quantization method used in the quantization unit 107.
  • the inverse orthogonal transform unit 207 performs inverse orthogonal transform on the transform coefficient obtained by inverse quantization by the inverse quantization unit 205.
  • the inverse orthogonal transform method any method can be used as long as it corresponds to the orthogonal transform method used in the orthogonal transform unit 105.
  • the residual signal constituting the difference image is restored.
  • the residual signal relating to the difference image is supplied to the arithmetic unit AD3.
  • the arithmetic unit AD3 adds the predicted image supplied from the intra prediction unit 217 or the motion prediction unit 219 to the difference image supplied from the inverse orthogonal transform unit 207, thereby obtaining image data related to the decoded image.
  • the arithmetic unit AD3 supplies the image data related to the decoded image to the loop filter 209.
  • the loop filter 209 performs various types of filter processing that can include deblocking filter processing, SAO processing, and the like on the decoded image input from the arithmetic unit AD3. For example, the loop filter 209 reduces block distortion by performing a deblocking filter process on the decoded image. In addition, the loop filter 209 performs SAO processing on the decoded image after the deblocking filter processing, thereby reducing ringing in which pixel values around the edge are distorted and correcting pixel values. In addition, the loop filter 209 may perform an arbitrary filter process for improving the image quality. The loop filter 209 supplies the decoded image after various filter processes to the rearrangement buffer 211 and the frame memory 215.
  • the rearrangement buffer 211 is a buffer for rearranging the decoded image (image frame data) after the filtering process supplied from the loop filter 209 in the display order.
  • the rearrangement buffer 211 outputs the decoded images to the D / A conversion unit 213 in the display order.
  • the D / A conversion unit 213 converts the image data for each frame of the digital signal supplied from the rearrangement buffer 211 into an analog signal as appropriate, and then outputs it from the output unit O2.
  • the frame memory 215 stores the decoded image supplied from the loop filter 209 and supplies the decoded image as a reference image to the selection unit SW5.
  • the frame memory 215 can store a plurality of reference images by dividing them into two reference image groups, List 0 and List 1.
  • a prediction method for performing motion prediction with reference to reference images stored in list 0 and motion prediction with reference to reference images stored in list 1 are performed. Applying any of a prediction method, a reference image stored in list 0, and a prediction method (bidirectional prediction) for performing motion prediction with reference to two reference images stored in list 1 may be applied. it can.
  • the selection unit SW5 supplies the reference image supplied from the frame memory 215 to the intra prediction unit 217 or the motion prediction unit 219 according to the applied prediction mode. For example, when decoding an intra-coded image, the selection unit SW5 supplies the reference image supplied from the frame memory 215 to the intra prediction unit 217. The selection unit SW5 outputs the reference image supplied from the frame memory 215 to the motion prediction unit 219 when decoding an image encoded by motion prediction.
  • the intra prediction unit 217 performs intra prediction using the pixel values in the reference image (processing target picture) supplied from the frame memory 215 via the selection unit SW5 to generate a prediction image using the prediction unit PU as a processing unit. .
  • the intra prediction unit 217 decodes the prediction unit PU to be decoded using an intra prediction mode selected based on prediction mode information obtained from the entropy decoding unit 203 among a plurality of prepared intra prediction modes. To do. Thereby, a prediction image can be generated by the intra prediction mode used when the intra prediction unit 123 in FIG. 3 performs encoding.
  • the motion prediction unit 219 performs motion prediction processing for each prediction unit PU using the reference image supplied from the frame memory 215 via the selection unit SW5.
  • the motion prediction unit 219 decodes a prediction target PU to be decoded using a motion prediction mode selected based on prediction mode information obtained from the entropy decoding unit 203 among a plurality of motion prediction modes prepared in advance. To do.
  • the motion prediction unit 125 can generate a prediction image by the method used by the motion prediction unit 125 of FIG. 3 when encoding.
  • the motion prediction unit 219 can perform prediction using a weighting factor w that is not fixed to 1 ⁇ 2 when performing bidirectional prediction.
  • the bi-directional prediction weight coefficient calculation unit 221 calculates the weight coefficient w.
  • the motion prediction unit 219 includes a predicted image generation unit 251 and a prediction mode / motion vector buffer 253.
  • the selection units SW5 and SW6 are not shown.
  • the predicted image generation unit 251 generates a predicted image using the reference image supplied from the frame memory 215 as a processing unit.
  • the prediction image generation unit 251 corresponds to a plurality of motion prediction modes, and among these, the prediction unit PU to be decoded is selected according to the prediction mode selected based on the prediction mode information supplied from the prediction mode / motion vector buffer 253. Is decrypted.
  • the predicted image generation unit 251 reads the motion vector v and the weighting coefficient w as necessary from the prediction mode / motion vector buffer 253 when generating a predicted image by motion prediction. Thereby, the motion prediction unit 219 can generate a prediction image by the method used by the motion prediction unit 219 of FIG. 3 when encoding.
  • the generated predicted image is output to the arithmetic unit AD3.
  • the prediction mode / motion vector buffer 253 is a buffer that temporarily stores prediction mode information and motion vector information supplied from the entropy decoding unit 203.
  • the prediction mode / motion vector buffer 253 passes the information on the motion vector v to the bidirectional prediction weight coefficient calculation unit 221 and both The weight coefficient w is received from the direction prediction weight coefficient calculation unit 221 and temporarily stored.
  • the selection unit SW7 receives information related to the prediction direction of the prediction unit PU to be processed from the prediction mode / motion vector buffer 253, and switches whether to pass the information on the motion vector v to the bidirectional prediction weight coefficient calculation unit 221. . More specifically, when the prediction related to the prediction unit PU is unidirectional prediction using only one of the motion vectors v 0 and v 1 , information on the motion vector v is sent to the bidirectional prediction weight coefficient calculation unit 221. Not output. On the other hand, when bidirectional prediction using both motion vectors v 0 and v 1 is performed on the prediction unit to be processed, information on the motion vector v is output to the bidirectional prediction weight coefficient calculation unit 221. .
  • the bidirectional prediction weight coefficient calculation unit 221 calculates a weight coefficient w used for bidirectional prediction. At this time, for example, when index information or the like for calculating the weighting factor w is received from the entropy decoding unit 203, the bidirectional prediction weighting factor calculation unit 221 calculates the weighting factor w based on the information.
  • the bidirectional prediction weighting coefficient calculation unit 221 is supplied from the frame memory 215.
  • the weighting coefficient w is calculated based on the adjacent pixel ap of the prediction unit PU in the target picture and two reference images (reference images included in list 0 and list 1).
  • the weighting coefficient applied to the luminance signal is halved, and only the weighting coefficient w C for only the color difference signal is calculated by the bidirectional prediction weighting coefficient calculation unit 221. May be.
  • the bi-directional prediction weight coefficient calculation unit 221 may calculate different weight coefficients w Cb and w Cr for the two color difference signals. Alternatively, as described in Method 2 above, a weight coefficient w that is not 1 ⁇ 2 that can be applied to all of the luminance signal and the color difference signal may be calculated, or for the luminance signal and the two color difference signals, Different weighting factors w Y and w C may be calculated. Information on the calculated weight coefficient w is output from the bidirectional prediction weight coefficient calculation unit 221 to the prediction mode / motion vector buffer 253.
  • the bidirectional prediction weight coefficient calculation unit 221 is based on the information. May calculate the weight coefficient w. Furthermore, for example, when the encoded data includes a flag indicating that a fixed value such as 1/2 is to be used in the weighting factor w, the fixed value is used as the weighting factor w without considering the adjacent pixel ap. Just set.
  • FIG. 7 is a flowchart showing a flow of processing related to encoding when a predicted image is generated by motion prediction.
  • predicted image generation can be performed not only by motion prediction but also by intra prediction, but description thereof is omitted here. The same applies to the flowchart of FIG. 8 described later.
  • each reference image is divided into two reference image groups of list 0 and list 1 in the frame memory 121 and stored.
  • the motion vector search unit 151 searches for the motion vector v 0 for the reference images stored as the list 0 in the frame memory 121 (S703). As described above, this search can be performed, for example, as a search for the motion vector v 0 indicating the block B 0 in which the residual with the prediction unit PU is the smallest in the reference image. At this time, for example, a search for obtaining the motion vector v 0 may be performed in consideration of only the luminance signal.
  • the motion vector search unit 151 to the reference image stored as a list 1 in the frame memory 121, to search for a motion vector v 1 in the same manner as the motion vector v 0 (S705).
  • the prediction direction determination unit 153 uses which of the motion vectors v 0 and v 1 (unidirectional prediction) or both (both) Direction prediction) is determined (S707).
  • the predicted image generation unit 159 when performing unidirectional prediction (No in S709), the predicted image generation unit 159 generates a predicted image based on the motion vector v (S713).
  • the prediction direction determination unit 153 outputs information on the motion vectors v 0 and v 1 to the bi-directional prediction weight coefficient calculation unit 127 to calculate the bi-directional prediction weight coefficient.
  • the unit 127 obtains a weighting coefficient w using the motion vectors v 0 and v 1 (S711).
  • the weighting coefficient applied to the luminance signal is halved, and only the weighting coefficient w C for only the color difference signal is calculated by the bidirectional prediction weighting coefficient calculation unit 127.
  • the bidirectional prediction weight coefficient calculation unit 127 may calculate different weight coefficients w Cb and w Cr for the two color difference signals.
  • a weight coefficient w that is not 1 ⁇ 2 that can be applied to all of the luminance signal and the color difference signal may be calculated, or for the luminance signal and the two color difference signals, Different weighting factors w Y and w C may be calculated.
  • the possible value of the weighting factor w may be limited to m / (2 n ) (where m and n are integers).
  • the bidirectional prediction weighting coefficient calculating unit 127 calculates the pixel value of each pixel in the prediction unit PU in the input image to be encoded and the prediction calculated by the above equation (2).
  • the weighting factor w can be determined so that the difference from the pixel value of each pixel of the unit PU becomes small.
  • the weighting factor w may be calculated so that the difference between the pixel values calculated by the above equation (2) becomes small in the adjacent pixel ap (above Method 2).
  • the predicted image generation unit 159 When the motion vector v and the weighting factor w are calculated in this way, the predicted image generation unit 159 generates a predicted image using these pieces of information and the reference image read from the frame memory 121 (S713).
  • the mode determination unit 157 outputs information necessary for generating the predicted image, for example, prediction mode information, information on the motion vector v, and the like to the entropy encoding unit 109.
  • the entropy encoding unit 109 includes encoded data including prediction mode information and motion vector v information received from the mode determination unit 157 and a residual signal generated from a difference image that is a difference between the input image and the prediction image. Is generated (S715). At this time, when the weight coefficient w is generated based on the adjacent pixel ap, reference adjacent pixel information for determining the adjacent pixel ap to be referred to when the weight coefficient w is obtained may be included in the encoded data. good.
  • FIG. 8 is a flowchart illustrating a flow of processing related to decoding when a predicted image is generated using motion prediction.
  • the accumulation buffer 201 accumulates the encoded data input from the input unit I2, and the entropy decoding unit 203 sequentially decodes the encoded data (S801).
  • the encoded data can include, for example, prediction mode information related to the prediction unit PU, information on the motion vector v, and the like.
  • the image generated based on the encoded data is appropriately stored as a reference image in the frame memory 215 (S803).
  • each reference image is stored in the frame memory 215 by being divided into two reference image groups of list 0 and list 1.
  • the prediction mode / motion vector buffer 253 of the motion prediction unit 219 receives, from the entropy decoding unit 203, the prediction mode information regarding the division mode and the prediction direction of the prediction unit PU and the motion vector v from the entropy decoding unit 203. And memorize (S805). If the prediction direction of the prediction unit PU to be processed is unidirectional prediction (No in S807), the predicted image generation unit 251 generates a predicted image based on the motion vector v (S811).
  • the bidirectional prediction weight coefficient calculation unit 221 determines the weight coefficient w to be applied.
  • the weight coefficient w can be received, for example, as index information from the entropy decoding unit 203, for example.
  • the above equation (2) is used by using adjacent pixels ap 0 and ap 1 adjacent to the blocks B 0 and B 1 specified by the motion vectors v 0 and v 1 in the reference images P 0 and P 1.
  • the bidirectional prediction weight coefficient calculation unit 221 calculates the weight coefficient w so that the difference between the value calculated by (1) and the value of the adjacent pixel ap of the prediction unit PU becomes small. At this time, whether the adjacent pixel ap to be referred to is the upper adjacent pixel uap, the left adjacent pixel lap, the upper adjacent pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap is encoded data. It may be determined based on the reference adjacent pixel information included in.
  • the generated weight coefficient w is stored in the prediction mode / motion vector buffer 253.
  • the predicted image generation unit 251 generates a predicted image by bidirectional prediction using the motion vectors v 0 and v 1 and the weighting factor w (S807).
  • FIG. 9 is a diagram illustrating a specific example of the configuration of the encoded data 900.
  • the encoding device 100 and the decoding device 200 can process the image CP by dividing the image CP into slices S and / or tiles T. In the example of FIG. 9, the tile T is not considered.
  • the slice S is encoded as slice data 910.
  • the slice data 910 includes slice header information 911 and one or more coding tree units (CTU) 920.
  • Each CTU 920 includes CTU header information 921 and one or more coding units (CU) 930.
  • the CU 930 includes CU header information 931, a prediction unit (PU) 940, and a conversion unit (TU) 950.
  • the TU 950 includes data related to the residual signal related to the difference between the image to be encoded and the predicted image (quantized and orthogonally transformed as appropriate).
  • the PU940 includes various data related to the prediction process.
  • the PU 940 may include prediction mode information 941, image reference information 943, motion vector information 945, weight coefficient information 947, and reference adjacent pixel information 949. Note that it is not necessary for the PU 940 to include all of this information. Depending on whether the prediction method is motion prediction or intra prediction, unidirectional prediction or bidirectional prediction, how to determine the weighting factor w, etc., it is included in the PU 940 as appropriate. Information can be changed.
  • the prediction mode information 941 is information for determining a prediction method applied to the PU 940. For example, information on whether it is intra prediction or motion prediction, information on the division mode on how to divide the PU 940, such as 2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N, etc. Can be included in the prediction mode information 941.
  • the image reference information 943 is information for specifying a reference image referred to by the PU 940 when performing motion prediction.
  • the image reference information 943 can be index information in each of the reference image groups in list 0 and list 1. .
  • the motion vector information 945 is information for specifying the motion vector v applied to the PU 940 when performing motion prediction.
  • the motion vector information 945 can include various types of information necessary for predicting the motion vector v.
  • the weighting factor information 947 is information for calculating the weighting factor w when bi-directional prediction is performed. For example, the value of the weighting factor w or an index indicating the value of the weighting factor w can be stored in the weighting factor information 947. As described in the above method 2, when the weighting factor w is obtained from the adjacent pixel ap, the weighting factor information 947 does not need to be included in the PU 940.
  • the weighting factor information 947 can include information on what weighting factor w is applied to either the luminance signal or the color difference signal. For example, whether the weighting factor for the luminance signal is halved, whether the weighting factor for the color difference signal is halved, whether the weighting factor for the luminance signal and the weighting signal is independent, Or the like, flag information 947 may be included in the weight coefficient information 947.
  • the flag information is not necessarily included in the weight coefficient information 947 in the PU 940. For example, it may be possible to include flag information related to application of the weighting factor w in the slice header information 911.
  • the reference adjacent pixel information 949 is information for indicating information of the adjacent pixel ap to be referred to when bi-directional prediction is performed and the weighting coefficient w is calculated from the adjacent pixel ap. For example, when calculating the weighting factor w, only the upper adjacent pixel uap should be referred to, only the left adjacent pixel lap should be referred to, or all of the upper left adjacent pixel lap and the upper left adjacent pixel ulap should be referred to Or a flag indicating whether neither should be referenced (or cannot be referred to) can be included in the reference neighboring pixel information 949.
  • the image processing apparatus 1000 includes encoded video data (bitstream) stored in various storage media such as a DVD (Digital Versatile Disc), Blu-ray (registered trademark), HDD (Hard Disk Drive), and flash memory. Or a dedicated player for reproducing encoded video data received from a network such as the Internet.
  • the image processing apparatus 1000 can also be realized as a camcorder or a recorder that encodes an input video or a video shot by a camera or the like as video data and stores it in various storage media.
  • the image processing apparatus 1000 may be a video distribution apparatus that outputs encoded video data to other apparatuses on the network.
  • the image processing apparatus 1000 can be realized as a personal computer or a mobile phone (whether it is a feature phone or a so-called smartphone) having functions such as reproduction, storage, and distribution of video data. is there.
  • the image processing apparatus 1000 includes a control unit 1001, a communication interface (I / F) unit 1005, a data I / F unit 1007, a storage unit 1009, a display unit 1015, and an input unit 1017. Each part is connected via a bus line 1019.
  • I / F communication interface
  • the image processing apparatus 1000 has both an encoding function and a decoding function.
  • the image processing apparatus 1000 includes an encoding function and a decoding function. Only one of them may be provided.
  • the image processing apparatus 1000 includes an encoding function (function of the encoding apparatus 100 illustrated in FIG. 3) and a decoding function (each function of the decoding apparatus 200 illustrated in FIG. 5).
  • the functions are realized by the encoding program 1011 and the decoding program 1013, which are programs, but it is not always necessary to realize these functions as programs.
  • the encoding program 1011 and the decoding program 1013 are changed. It may be unnecessary.
  • a part of the encoding device 100 and the decoding device 200 shown in FIGS. 3 and 5 can be realized by the encoding program 1011 / decoding program 1013 and other functions can be realized by the processor 1003 for image processing. It is.
  • the control unit 1001 includes one or more processors 1003, a ROM (Read Only Memory, not shown), a RAM (Random Access Memory, not shown), and the like.
  • the control unit 1001 executes an encoding program 1011 and / or a decoding program 1013 stored in the storage unit 1009, thereby performing an image related to encoding / decoding related to image processing in addition to various general control functions.
  • the process is configured to be executable. For example, at least a part of each function of the encoding device 100 shown in FIG. 3 and at least a part of each function of the decoding device 200 shown in FIG. 5 are realized as the encoding program 1011 and the decoding program 1013, respectively. Is possible.
  • the one or more processors 1003 may include a CPU (Central Processing Unit), an image processing processor for executing processing related to image encoding / encoding, and the like.
  • the CPU executes an encoding program 1011 and a decoding program 1013.
  • the image processing processor may include a part or all of the functions of the encoding device 100 illustrated in FIG. Some or all of the functions of the decryption apparatus 200 can be included. In this case, these functions do not need to be included in the encoding program 1011 or the decoding program 1013.
  • the communication I / F unit 1005 is an interface for inputting / outputting image data to / from an external device by wire or wirelessly.
  • the image processing apparatus 1000 can decode video data input from the communication I / F unit 1005 and output video data obtained by encoding video from the communication I / F unit 1005 to an external device.
  • various communication methods such as LAN, USB (Universal Serial Bus), mobile phone communication, Bluetooth (registered trademark) communication, and the like can be considered as the communication method performed by the communication I / F unit 1005.
  • the data I / F unit 1007 is a device for inputting / outputting data to / from various external storage devices such as an optical disc such as a DVD and Blu-ray (registered trademark), a flash memory, and an HDD.
  • an optical disc such as a DVD and Blu-ray (registered trademark)
  • a flash memory such as a CD-ROM, DVD-ROM, DVD-ROM, DVD-ROM, DVD-ROM, DVD-ROM, and an HDD.
  • a drive device for reading data stored in various storage devices can be considered.
  • the storage unit 1009 is a built-in nonvolatile storage medium such as an HDD or a flash memory.
  • the storage unit 1009 stores an encoding program 1011 and a decoding program 1013 for realizing an encoding and / or decoding function, in addition to a control program for realizing a function as a general information processing apparatus. Can do.
  • the display unit 1015 is a display device for displaying, for example, decoded video or video to be encoded. Specific examples of the display unit 1015 include a liquid crystal display and an organic EL (Electro-Luminescence) display.
  • the input unit 1017 is a device for accepting operation inputs as necessary. Specific examples of the input unit 1017 include a keyboard, a mouse, a touch panel, and various operation buttons.
  • the image processing apparatus 1000 does not necessarily include the display unit 1015 and the input unit 1017.
  • the display unit 1015 and the input unit 1017 may be connected to the image processing apparatus 1000 from the outside via various interfaces such as a USB and a display port.
  • the encoding device 100 and the decoding device 200 can perform bi-directional prediction using a weighting factor w other than 1 ⁇ 2.
  • the encoding device 100 tries to obtain an optimal combination of the motion vectors v 0 and v 1 and the weighting coefficient w, the amount of calculation increases dramatically. Therefore, the encoding device 100 according to one embodiment First, the motion vectors v 0 and v 1 are obtained by setting the weighting factor to 1 ⁇ 2 for the luminance signal, and then a suitable weighting factor w is obtained for the color difference signal. As a result, the amount of calculation can be drastically reduced as compared with the case of obtaining the optimum one from all combinations of the motion vectors v 0 and v 1 and the weight coefficient w.
  • the encoding device 100 and the decoding device 200 can calculate the weighting factor w based on the adjacent pixel ap of the prediction unit PU to be predicted. As a result, the same weighting factor w can be calculated by the encoding device 100 and the decoding device 200 without including the value and index of the weighting factor w in the bitstream. That is, it is possible to suppress an increase in the amount of coding related to transmission of the weight coefficient w.
  • the encoding device 100 and the decoding device 200 can apply different weighting factors w for the luminance signal and the color difference signal. Thereby, the prediction precision of the prediction image produced

Landscapes

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

Abstract

Provided are an encoding device, an encoding method, a decoding device, and a decoding method with which it is possible to make suitable bidirectional prediction. The present invention is provided with: a frame memory for storing a plurality of reference images including a first reference image and a second reference image; a means for finding first and second motion vectors that determine the positions of first and second regions in the first and second reference images referred to by a region to be encoded among images to be encoded of an inputted moving-image; a weighting factor determination means for determining a first weighting factor that is applied to the first region and a second weighting factor that is applied to the second region; and a means for multiplying the pixel value of pixels in the first region by the first weighting factor and multiplying the pixel value of pixels in the second region by the second weighting factor, and thereby calculating a predicted pixel value for the region to be encoded. It is possible that the first weighting factor and second weighting factor applied to a luminance signal and the first weighting factor and second weighting factor applied to a color-difference signal assume different values.

Description

符号化装置、符号化方法、復号化装置、及び復号化方法Encoding device, encoding method, decoding device, and decoding method
 本発明に係るいくつかの態様は、画像を符号化及び復号化するための符号化装置、符号化方法、復号化装置、及び復号化方法に関する。 Some aspects according to the present invention relate to an encoding device, an encoding method, a decoding device, and a decoding method for encoding and decoding an image.
 現在、従来のH.264/AVC(以下、「AVC」ともいう。)やH.265/HEVC(以下、「HEVC」ともいう。)よりも符号化効率を更に向上させることを目的として、ITU-T VCEG及びISO/IECとが共同したJVET(Joint Video Exploration Team)により、新たな符号化方式に関する検討が行われている。 Currently, the conventional H.264 H.264 / AVC (hereinafter also referred to as “AVC”) and H.264. With the aim of further improving the coding efficiency over H.265 / HEVC (hereinafter also referred to as “HEVC”), a new version has been developed by JVET (Joint Video Exploration Team) in collaboration with ITU-T VCEG and ISO / IEC. Studies on coding schemes are underway.
 AVCやHEVCのように、複数の予測モードがある符号化方式では、エンコーダ(符号化装置)側で、候補となる予測モードに対してコスト関数値を算出した上で、その値を最小にする予測モードが符号化対象のブロックに適用される。例えば、JM(Joint Model)と呼ばれるAVCの参照ソフトウェア(Reference Software)においては、ハイ・コンプレクシティ・モード(High Complexity Mode)と、ロー・コンプレクシティ・モード(Low Complexity Mode)の2つのモード判定方式が実装されている。ここで、ハイ・コンプレクシティ・モードと、ロー・コンプレクシティ・モードとでは、演算量が異なる別のコスト関数が用いられる。いずれの方式を用いる場合も、候補となる各々の予測モードに対してコスト関数値を算出し、この値を最小とする予測モードを符号化対象ブロック(カレントブロック)に適用することができる。 In an encoding method having a plurality of prediction modes, such as AVC and HEVC, a cost function value is calculated for a candidate prediction mode on the encoder (encoding device) side, and then the value is minimized. The prediction mode is applied to the block to be encoded. For example, in the reference software (Reference Software) of AVC called JM (Joint Model), there are two mode determination methods: High Complexity Mode and Low Complexity Mode. Has been implemented. Here, different cost functions having different calculation amounts are used in the high complexity mode and the low complexity mode. In any case, a cost function value is calculated for each candidate prediction mode, and a prediction mode that minimizes this value can be applied to the encoding target block (current block).
 ここで、AVCやHEVCでは、2つの参照画像(reference picture)を用いて、符号化対象ブロックに対する予測を行う双方向予測(bi-prediction)と呼ばれる予測方式が規定されている。AVCやHEVCの双方向予測では、画素値は以下の式(1)により算出される。 Here, in AVC and HEVC, a prediction method called bi-prediction that performs prediction on a block to be encoded using two reference images (reference pictures) is defined. In bi-directional prediction of AVC and HEVC, the pixel value is calculated by the following equation (1).
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 式(1)において、xは処理対象の画素の座標位置(x座標方向及びy座標方向を含む二次元のベクトル値)、v0及びv1は動きベクトル(x座標方向及びy座標方向を含む二次元のベクトル値)を示す。Pは処理対象ブロックの画素の予測値、P0及びP1は参照画像における画素値である。式(1)を用いた双方向予測では、2枚の参照画像の画素値に対して、それぞれ同一の重み1/2を乗算して予測画素値が算出される。
 これに対し、非特許文献1では、以下の式(2)を用いて、異なる重みを用いて予測画素値を算出することが提案されている。
In Expression (1), x is the coordinate position (two-dimensional vector value including the x coordinate direction and y coordinate direction) of the pixel to be processed, and v 0 and v 1 are motion vectors (including the x coordinate direction and the y coordinate direction). 2D vector value). P is a predicted value of the pixel of the processing target block, and P 0 and P 1 are pixel values in the reference image. In bi-directional prediction using Expression (1), predicted pixel values are calculated by multiplying the pixel values of two reference images by the same weight 1/2.
On the other hand, Non-Patent Document 1 proposes that a predicted pixel value is calculated using different weights using the following equation (2).
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 式(2)において、wは重みである。非特許文献1においては、当該重み係数wは-1/4、1/4、3/8、1/2、5/8、3/4、5/4に限定した上で、wのインデックスの値が、予測ブロック(PU:Prediction unit)毎に明示的に伝達される。 In equation (2), w is a weight. In Non-Patent Document 1, the weight coefficient w is limited to -1/4, 1/4, 3/8, 1/2, 5/8, 3/4, 5/4, and the index of w The value is explicitly transmitted for each prediction block (PU: Prediction unit).
 しかしながら、非特許文献1記載の手法では、動きベクトルと重み係数の組み合わせが膨大となる。この結果、動きベクトルと重み係数の最適な組み合わせを求めるには、多大な演算量が必要となる。 However, in the method described in Non-Patent Document 1, the combinations of motion vectors and weighting coefficients are enormous. As a result, a large amount of calculation is required to obtain an optimal combination of motion vectors and weighting factors.
 また、非特許文献1記載の手法では、重み係数wに関する情報を、符号化データ(ビットストリーム)に含めて明示的に伝達する必要がある。このため、符号化データにおける情報量が増大し、符号化効率が低下する。 Further, in the method described in Non-Patent Document 1, it is necessary to explicitly transmit information related to the weighting factor w in the encoded data (bit stream). For this reason, the amount of information in the encoded data increases and the encoding efficiency decreases.
 更に、非特許文献1では、重み係数wについて、輝度信号及び色差信号にそれぞれどのように適用するかを考慮していない。 Furthermore, Non-Patent Document 1 does not consider how the weighting coefficient w is applied to the luminance signal and the color difference signal.
 本発明のいくつかの態様は前述の課題のいずれかに鑑みてなされたものであり、好適な双方向予測を可能とする符号化装置、符号化方法、復号化装置、及び復号化方法を提供することを目的の1つとする。 Some aspects of the present invention have been made in view of any of the above-described problems, and provide an encoding device, an encoding method, a decoding device, and a decoding method that enable suitable bidirectional prediction. One of the purposes is to do.
 本発明の1の態様に係る符号化装置は、輝度信号と2つの色差信号とを有する入力動画像を、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化する符号化装置であって、第1参照画像及び第2参照画像を含む複数の参照画像を記憶するフレームメモリと、前記入力動画像中の符号化対象画像のうちの符号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルと、前記符号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルとを求める手段と、前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより参照される前記第2領域に適用される前記第2重み係数を定める重み係数決定手段と、前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記符号化対象領域に対する予測画素値を算出する手段と、前記符号化対象領域内の画素の画素値と前記予測画素値との差異に係る残差情報を符号化することにより符号化データを生成する符号化手段とを備え、前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る。 An encoding apparatus according to one aspect of the present invention encodes an input moving image having a luminance signal and two color difference signals by predictive encoding using bidirectional prediction using a first weighting factor and a second weighting factor. A frame memory that stores a plurality of reference images including a first reference image and a second reference image, and the first reference that is referred to by an encoding target region in an encoding target image in the input moving image. Means for determining a first motion vector that determines a position of a first region in a reference image and a second motion vector that determines a position of a second region in the second reference image referred to by the encoding target region; Weight coefficient determination for determining the first weighting factor applied to the first region referenced by the first motion vector and the second weighting factor applied to the second region referenced by the second motion vector Means and before By multiplying the pixel value of the pixel in the first region by the first weighting factor and multiplying the pixel value of the pixel in the second region by the second weighting factor, a prediction pixel for the encoding target region Means for calculating a value, and encoding means for generating encoded data by encoding residual information relating to a difference between a pixel value of a pixel in the encoding target region and the predicted pixel value, The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal may take different values. .
 本発明の1の態様に係る復号化装置は、輝度信号と2つの色差信号とを有する入力動画像が、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化された符号化データを復号する復号化装置であって、前記入力動画像中の復号化対象画像のうちの復号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルの情報と、前記復号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルの情報と、前記復号化対象領域内の画素の画素値と予測画素値との差異に基づく残差情報とを含む前記符号化データの入力を受ける手段と、第1参照画像及び第2参照画像を含む複数の参照画像を記憶するフレームメモリと、前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより算出される前記第2領域に適用される前記第2重み係数を定める重み係数決定手段と、前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記復号化対象領域に対する前記予測画素値を算出する手段とを備え、前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る。 The decoding apparatus according to one aspect of the present invention is a code in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor. A first motion vector for determining a position of a first region in the first reference image to which a decoding target region of a decoding target image in the input moving image refers Information of the second motion vector that determines the position of the second region in the second reference image referred to by the decoding target region, the pixel value and the predicted pixel value of the pixel in the decoding target region, Means for receiving the encoded data including residual information based on the difference between the frame, a frame memory for storing a plurality of reference images including a first reference image and a second reference image, and reference by the first motion vector In the first region Weight coefficient determining means for determining the second weight coefficient applied to the second area calculated by the first weight coefficient used and the second motion vector, and pixel values of the pixels in the first area Means for calculating the predicted pixel value for the decoding target region by multiplying the pixel value of the pixel in the second region by the second weighting factor. The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal have different values. obtain.
 本発明の1の態様に係る符号化方法は、輝度信号と2つの色差信号とを有する入力動画像を、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化する符号化方法であって、第1参照画像及び第2参照画像を含む複数の参照画像を記憶するステップと、前記入力動画像中の符号化対象画像のうちの符号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルと、前記符号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルとを求めるステップと、前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより参照される前記第2領域に適用される前記第2重み係数を定めるステップと、前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記符号化対象領域に対する予測画素値を算出するステップと、前記符号化対象領域内の画素の画素値と前記予測画素値との差異に係る残差情報を符号化することにより符号化データを生成するステップとを符号化装置が行い、前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る。 An encoding method according to one aspect of the present invention is an encoding method in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor. A method of storing a plurality of reference images including a first reference image and a second reference image, and the first reference referred to by an encoding target region in an encoding target image in the input moving image Obtaining a first motion vector defining a position of a first region in an image and a second motion vector defining a position of a second region in the second reference image referred to by the encoding target region; Determining the first weighting factor applied to the first region referenced by one motion vector and the second weighting factor applied to the second region referenced by the second motion vector; First area The predicted pixel value for the encoding target area is calculated by multiplying the pixel value of each pixel by the first weighting coefficient and multiplying the pixel value of the pixel in the second area by the second weighting coefficient. The encoding device performs the steps and generating encoded data by encoding residual information relating to a difference between a pixel value of a pixel in the encoding target region and the predicted pixel value, and the luminance The first weighting factor and the second weighting factor applied to the signal and the first weighting factor and the second weighting factor applied to the color difference signal may take different values.
 本発明の1の態様に係る復号化方法は、輝度信号と2つの色差信号とを有する入力動画像が、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化された符号化データを復号する復号化方法であって、前記入力動画像中の復号化対象画像のうちの復号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルの情報と、前記復号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルの情報と、前記復号化対象領域内の画素の画素値と予測画素値との差異に基づく残差情報とを含む前記符号化データの入力を受けるステップと、第1参照画像及び第2参照画像を含む複数の参照画像を記憶するステップと、前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより算出される前記第2領域に適用される前記第2重み係数を定めるステップと、前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記復号化対象領域に対する前記予測画素値を算出するステップとを復号化装置が行い、前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る。 A decoding method according to one aspect of the present invention is a code in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor. A first motion vector for determining a position of a first region in the first reference image that is referred to by a decoding target region in a decoding target image in the input moving image. Information of the second motion vector that determines the position of the second region in the second reference image referred to by the decoding target region, the pixel value and the predicted pixel value of the pixel in the decoding target region, Receiving the encoded data including residual information based on the difference between the plurality of reference images, storing a plurality of reference images including a first reference image and a second reference image, and being referred to by the first motion vector. Suitable for the first area Determining the first weighting factor to be applied and the second weighting factor to be applied to the second region calculated by the second motion vector; and the pixel value of the pixel in the first region to the first value The decoding apparatus performs a step of calculating the predicted pixel value for the decoding target region by multiplying a pixel value of a pixel in the second region by the second weighting factor while multiplying by a weighting factor. The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal have different values. obtain.
 なお、本発明において、「部」や「手段」、「装置」、「システム」とは、単に物理的手段を意味するものではなく、その「部」や「手段」、「装置」、「システム」が有する機能をソフトウェアによって実現する場合も含む。また、1つの「部」や「手段」、「装置」、「システム」が有する機能が2つ以上の物理的手段や装置により実現されても、2つ以上の「部」や「手段」、「装置」、「システム」の機能が1つの物理的手段や装置により実現されても良い。 In the present invention, “part”, “means”, “apparatus”, and “system” do not simply mean physical means, but “part”, “means”, “apparatus”, “system”. This includes the case where the functions possessed by "are realized by software. Further, even if the functions of one “unit”, “means”, “apparatus”, and “system” are realized by two or more physical means or devices, two or more “parts” or “means”, The functions of “device” and “system” may be realized by a single physical means or device.
双方向予測について説明するための図である。It is a figure for demonstrating bidirectional | two-way prediction. 本実施形態に係る双方向予測の一例を説明するための図である。It is a figure for demonstrating an example of the bidirectional | two-way prediction which concerns on this embodiment. 本実施形態に係る双方向予測の一例を説明するための図である。It is a figure for demonstrating an example of the bidirectional | two-way prediction which concerns on this embodiment. 画像の分割方法の具体例を示す図である。It is a figure which shows the specific example of the division method of an image. 本実施形態に係る双方向予測の一例を説明するための図である。It is a figure for demonstrating an example of the bidirectional | two-way prediction which concerns on this embodiment. 実施形態に係る符号化装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the encoding apparatus which concerns on embodiment. 図3に示す符号化装置の一部の機能構成を示すブロック図である。FIG. 4 is a block diagram illustrating a partial functional configuration of the encoding device illustrated in FIG. 3. 実施形態に係る復号化装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the decoding apparatus which concerns on embodiment. 図5に示す復号化装置の一部の機能構成を示すブロック図である。FIG. 6 is a block diagram illustrating a partial functional configuration of the decoding device illustrated in FIG. 5. 図3に示す符号化装置の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the encoding apparatus shown in FIG. 図5に示す復号化装置の処理の流れを示すフローチャートである。6 is a flowchart showing a flow of processing of the decoding device shown in FIG. 5. 符号化データの構成の具体例を示す図である。It is a figure which shows the specific example of a structure of coding data. 図3及び図5に示した符号化装置及び復号化装置を実装可能なハードウェア構成の具体例を示すブロック図である。FIG. 6 is a block diagram illustrating a specific example of a hardware configuration in which the encoding device and the decoding device illustrated in FIGS. 3 and 5 can be mounted.
 以下、図面を参照して本発明の実施形態を説明する。ただし、以下に説明する実施形態は、あくまでも例示であり、以下に明示しない種々の変形や技術の適用を排除する意図はない。即ち、本発明は、その趣旨を逸脱しない範囲で種々変形して実施することができる。また、以下の図面の記載において、同一又は類似の部分には同一又は類似の符号を付して表している。図面は模式的なものであり、必ずしも実際の寸法や比率等とは一致しない。図面相互間においても互いの寸法の関係や比率が異なる部分が含まれていることがある。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the embodiment described below is merely an example, and there is no intention to exclude various modifications and technical applications that are not explicitly described below. That is, the present invention can be implemented with various modifications without departing from the spirit of the present invention. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals. The drawings are schematic and do not necessarily match actual dimensions and ratios. In some cases, the dimensional relationships and ratios may be different between the drawings.
(1 概要)
 AVCやHEVC等の動画像符号化方式においては、2つの参照画像(reference picture)を用いて、処理対象ブロックに対する予測を行う双方向予測(bi-prediction)と呼ばれる予測方式が規定されている。以下、図1を参照しながら、双方向予測について簡単に説明する。
(1 overview)
In moving picture coding schemes such as AVC and HEVC, a prediction scheme called bi-prediction that performs prediction on a processing target block using two reference images (reference pictures) is defined. Hereinafter, the bidirectional prediction will be briefly described with reference to FIG.
 双方向予測では、先に復号される2枚の参照画像P0及びP1を参照することにより、予測ユニットPU(処理対象の画像CPを分割した処理対象のブロックに相当する)における輝度や色差の画素値を予測する。図1の例では、予測ユニットPUが、参照情報r0及びr1(以下、参照情報rともいう。)により、参照画像P0及びP1を参照しているものとする。また、動きベクトルv0及びv1(以下総称して動きベクトルvともいう。)により、予測の際に参照すべき各参照画像P0及びP1内の位置が、予測ユニットPUから見た相対方向(x座標方向及びy座標方向のベクトル値)として指定されているものとする。ブロックB0及びB1は、参照情報r及び動きベクトルvにより指定される、予測ユニットPUから参照されるブロックである。 In bidirectional prediction, the luminance and color difference in the prediction unit PU (corresponding to the processing target block obtained by dividing the processing target image CP) are referred to by referring to the two reference images P 0 and P 1 that are decoded first. The pixel value of is predicted. In the example of FIG. 1, it is assumed that the prediction unit PU refers to the reference images P 0 and P 1 using reference information r 0 and r 1 (hereinafter also referred to as reference information r). Further, the positions in the reference images P 0 and P 1 to be referred to in the prediction based on the motion vectors v 0 and v 1 (hereinafter collectively referred to as the motion vector v) are relative to the prediction unit PU. It is assumed that it is specified as a direction (vector value of x coordinate direction and y coordinate direction). Blocks B 0 and B 1 are blocks that are specified by the reference information r and the motion vector v and are referenced from the prediction unit PU.
 この時、処理対象の画像CP内の座標位置x(x座標及びy座標の値を含むベクトル値)の画素値をP[x]とすると、AVCやHEVCにおける双方向予測では、P[x]は以下の式(1)により算出される。 At this time, assuming that the pixel value of the coordinate position x (vector value including the values of the x coordinate and the y coordinate) in the image CP to be processed is P [x], in bidirectional prediction in AVC or HEVC, P [x] Is calculated by the following equation (1).
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000003
 式(1)を用いた双方向予測では、2枚の参照画像P0及びP1内の画素値P[x+v0]及びP[x+v1]に対して、それぞれ同一の重み係数1/2を乗算して、処理対象の予測ユニットPU内の画素の画素値P[x]が算出される。 In bi-directional prediction using equation (1), the same weighting factor 1/2 is applied to the pixel values P [x + v 0 ] and P [x + v 1 ] in the two reference images P 0 and P 1 . By multiplying, the pixel value P [x] of the pixel in the prediction unit PU to be processed is calculated.
 ここで、AVCやHEVCの双方向予測を修正し、以下の式(2)を用いて、異なる重み係数w及び(1-w)を用いて予測画素値を算出することも考えられる。 Here, it is also conceivable to correct the AVC or HEVC bi-directional prediction and calculate the predicted pixel value using different weighting factors w and (1-w) using the following equation (2).
Figure JPOXMLDOC01-appb-M000004
Figure JPOXMLDOC01-appb-M000004
 式(2)において、重み係数wを任意の値とすると、重み係数wを伝送するために多くの符号化量が必要となるため、符号化効率が低下する。よって、重み係数wを-1/4、1/4、3/8、1/2、5/8、3/4、5/4に限定した上で、重み係数wのインデックスの値を、予測ユニットPU毎に明示的に伝達することも考えられる。
 しかしながら、このような手法により双方向予測を行うと、以下のような課題が生じする。
In Equation (2), if the weighting factor w is an arbitrary value, a large amount of coding is required to transmit the weighting factor w, so that the coding efficiency decreases. Therefore, the weight coefficient w is limited to -1/4, 1/4, 3/8, 1/2, 5/8, 3/4, 5/4, and the index value of the weight coefficient w is predicted. An explicit transmission for each unit PU is also conceivable.
However, when bidirectional prediction is performed by such a method, the following problems occur.
[課題1]符号化の際、動きベクトルvと重み係数wを算出する必要があるが、動きベクトルvと重み係数wの組み合わせが膨大となるため、最適な組み合わせを求めるには多大な演算量が必要となる。 [Problem 1] At the time of encoding, it is necessary to calculate the motion vector v and the weighting coefficient w. However, since the combinations of the motion vector v and the weighting coefficient w are enormous, a large amount of calculation is required to obtain an optimal combination. Is required.
[課題2]重み係数wに関する情報(重み係数wそのもの、又は重み係数wのインデックス)を伝達する必要があるため、符号化の結果出力されるビットストリーム(符号化データ)における情報量が増大し、符号化効率が低下する。 [Problem 2] Since it is necessary to transmit information on the weighting factor w (the weighting factor w itself or the index of the weighting factor w), the amount of information in the bitstream (encoded data) output as a result of encoding increases. The encoding efficiency is reduced.
 よって、以下に説明する予測処理方法では、上記2つの課題の少なくともいずれかを解決するため、2つの手法の少なくともいずれかを用いる。なお、両手法は、予測処理において各々独立して適用することができ、必ずしも両者を組み合わせて用いる必要はない。 Therefore, in the prediction processing method described below, at least one of the two methods is used to solve at least one of the two problems. Both methods can be applied independently in the prediction process, and it is not always necessary to use both in combination.
 以下の説明において、参照画像Pは、参照画像P0及びP1の2枚であるものとして説明する。しかしながら、参照画像Pは必ずしも2枚である必要はなく、3枚以上の参照画像を用いて予測することも考えられる。この場合には、各々の参照画像に対して、参照情報r、動きベクトルv、重み係数wを用意することが可能である。 In the following description, the reference image P will be described as two reference images P 0 and P 1 . However, the number of reference images P is not necessarily two, and it may be predicted using three or more reference images. In this case, reference information r, motion vector v, and weight coefficient w can be prepared for each reference image.
 また以下の説明では、2枚の参照画像P0及びP1に対して各々適用する重み係数をw及び(1-w)とし、2枚の参照画像P0及びP1に適用される重み係数の合計を1であるものとして説明する。しかしながら、2枚の参照画像に適用される重み係数の合計を1以外とすることも考えられる。 In the following description, the weighting factors applied to the two reference images P 0 and P 1 are w and (1-w), respectively, and the weighting factors are applied to the two reference images P 0 and P 1. It is assumed that the sum of is 1. However, it is also conceivable that the sum of the weighting factors applied to the two reference images is other than 1.
(1.1 手法1:演算量の低減)
 手法1は、主に上記課題1を解決するためのもの、すなわち、符号化処理の際、動きベクトルv及び重み係数wの組み合わせ算出に係る演算量を低減するためのものである。具体的には、まず、予測ユニットPUにおける輝度信号成分については、上記(1)式による予測で好適な結果が得られる動きベクトルv0及びv1を算出する。上記(1)式において、2枚の参照画像P0及びP1に対して適用される重み係数(以下、輝度信号に対してのみ適用される重み係数を、wYともいう)は1/2に固定であるため、動きベクトルvの決定に必要となる演算量は(2)式よりも少ない。ここで、好適な結果が得られる動きベクトルvは、例えば、処理対象の予測ユニットPU内の画素の実際の画素値と予測画素値P[x]との絶対値差異(残差)の予測ユニットPU内の全画素の総和が、取りうる動きベクトルの中で最小になるものである。
(1.1 Method 1: Reduction of computational complexity)
The technique 1 is mainly for solving the above-described problem 1, that is, for reducing the amount of calculation related to the calculation of the combination of the motion vector v and the weighting coefficient w during the encoding process. Specifically, first, with respect to the luminance signal component in the prediction unit PU, motion vectors v 0 and v 1 that obtain a favorable result by prediction according to the above equation (1) are calculated. In the above equation (1), the weighting coefficient applied to the two reference images P 0 and P 1 (hereinafter, the weighting coefficient applied only to the luminance signal is also referred to as w Y ) is 1/2. Therefore, the amount of calculation required to determine the motion vector v is smaller than that in the equation (2). Here, the motion vector v from which a favorable result is obtained is, for example, a prediction unit of an absolute value difference (residual) between an actual pixel value of a pixel in the prediction unit PU to be processed and a predicted pixel value P [x]. The sum total of all the pixels in the PU is the smallest among the possible motion vectors.
 色差信号成分に対しては、輝度信号成分に基づき定めた動きベクトルvを用いて、上記(2)式による予測で好適な結果が得られる重み係数w(以下、色差信号に対してのみ適用される重み係数を、wCともいう。)を算出する。動きベクトルvが固定値であればwのみに対する演算を行えば良いため、両者に対する演算を行う場合よりも演算量は飛躍的に低減する。ここで、好適な結果が得られる重み係数wは、例えば、処理対象の予測ユニットPU内の画素の実際の画素値と、予測画素値P[x]との絶対値差異(残差)の予測ユニットPU内の全画素の総和が、取りうる重み係数の中で最小になるものである。 For the chrominance signal component, a weighting coefficient w (hereinafter, applied only to the chrominance signal) that can obtain a favorable result by prediction using the above equation (2) using the motion vector v determined based on the luminance signal component. The weight coefficient is also referred to as w C ). If the motion vector v is a fixed value, it is only necessary to perform an operation on w, so that the amount of operation is drastically reduced compared to the case of performing an operation on both. Here, the weighting factor w from which a suitable result is obtained is, for example, prediction of the absolute value difference (residual) between the actual pixel value of the pixel in the prediction unit PU to be processed and the predicted pixel value P [x]. The sum of all the pixels in the unit PU is the smallest among the possible weighting factors.
 また、重み係数wの値をm/(2n)(但し、m、nは整数)として設定すれば、重み係数wをシフト演算により算出及び適用することが可能である。すなわち、重み係数wの算出において除算が不要となるため、更に演算量の低減を図ることが可能となる。また、もし重み係数wに係る情報を符号化装置から復号化装置に伝達するのであれば、符号化データ中にmやnに関する情報を含めれば良い。この際、必ずしもm及びnの両者を符号化データに含める必要はない。例えば一方を固定化する(例えばm=1)のであれば他方のみを符号化データ中に含めれば良い。 If the value of the weighting factor w is set as m / (2 n ) (where m and n are integers), the weighting factor w can be calculated and applied by a shift operation. In other words, division is not necessary in calculating the weighting factor w, so that the amount of calculation can be further reduced. In addition, if information related to the weight coefficient w is transmitted from the encoding device to the decoding device, information relating to m and n may be included in the encoded data. At this time, it is not always necessary to include both m and n in the encoded data. For example, if one is fixed (for example, m = 1), only the other may be included in the encoded data.
 更に、輝度信号と、色差信号とで異なる重み係数wの適用を認めることにより、予測画像生成に係る自由度が向上するため、予測画像の予測精度を向上させる(残差を小さくする)ことが可能である。 Further, by allowing the application of the weighting factor w different between the luminance signal and the color difference signal, the degree of freedom related to the prediction image generation is improved, so that the prediction accuracy of the prediction image is improved (residual is reduced). Is possible.
 ここで、色差信号成分には2つの成分(ここでは、Cb、Crとする)が含まれるが、Cb及びCrに対し、各々独立した重み係数wCb及びwCrを算出してもよい。またこの場合には、一方の色差信号の重み係数(例えば、Crよりも先に処理及び伝送されるCbに関する重み係数wCb)から、他方の色差信号の重み係数(例えば、Cbよりも後に処理及び伝送されるCrに関する重み係数wCr)を予測するようにしても良い。 Here, the color difference signal component includes two components (here, Cb and Cr), but independent weighting factors w Cb and w Cr may be calculated for Cb and Cr, respectively. In this case, the weighting coefficient of one color difference signal (for example, the weighting coefficient w Cb related to Cb processed and transmitted before Cr) is processed after the weighting coefficient of the other color difference signal (for example, Cb). And a weighting factor w Cr ) related to Cr to be transmitted may be predicted.
 なお、ここでは色空間はYCbCrで表現されるものとして説明しているが、色空間の表現方法はこれに限られるものではない。例えば、YUVやYPbPr、YCoCg等により色空間が表現される場合であっても、同様に以下の説明に係る処理方法を適用することができる。 Note that here, the color space is described as being expressed in YCbCr, but the color space expression method is not limited to this. For example, even when the color space is expressed by YUV, YPbPr, YCoCg, or the like, the processing method according to the following description can be similarly applied.
 このようにして算出した動きベクトルvや重み係数wは、各々、予測やインデックス化を行った上でビットストリーム中に格納することで、符号化効率を向上させることができる。また、手法1を後述の手法2と組み合わせることで、重み係数wをビットストリームに含ませないことも考えられる。 The motion vector v and the weighting factor w calculated in this way are each predicted and indexed and then stored in the bitstream, so that the coding efficiency can be improved. It is also conceivable that the weight coefficient w is not included in the bitstream by combining the technique 1 with the technique 2 described later.
 また、重み係数wを符号化側と復号化側とで共有する仕組みを、輝度信号と色差信号とで分けることも考えられる。例えば、輝度信号の重み係数wYについてはビットストリーム中に符号化し、色差信号の重み係数wCの情報については後述の手法2を適用することでビットストリーム中に含めないことも考えられる。 It is also conceivable that the mechanism for sharing the weighting coefficient w between the encoding side and the decoding side is divided between the luminance signal and the color difference signal. For example, the luminance signal weight coefficient w Y may be encoded in the bit stream, and the color difference signal weight coefficient w C information may not be included in the bit stream by applying Method 2 described later.
(1.2 手法2:符号化量の低減)
 手法2は、主に上記課題2を解決するためのもの、すなわち、重み係数の伝達に係る符号化効率を向上させるためのものである。当該手法を、図2a及び図2bを参照しながら説明する。ここで、図2aにおいて、予測ユニットPU、動きベクトルv0及びv1、参照画像P0及びP1、参照情報r0及びr1、並びにブロックB0及びB1意味及び関係は、図1と同様である。
(1.2 Method 2: Reduction of coding amount)
Method 2 is mainly for solving the above-described problem 2, that is, for improving the coding efficiency related to the transmission of the weight coefficient. The technique will be described with reference to FIGS. 2a and 2b. Here, in FIG. 2a, the prediction unit PU, the motion vectors v 0 and v 1 , the reference images P 0 and P 1 , the reference information r 0 and r 1 , and the blocks B 0 and B 1 have the same meaning and relationship as in FIG. It is the same.
 手法2では、予測ユニットPUに左側で隣接する左隣接画素lap、上側で隣接する上隣接画素uap、左上で隣接する左上隣接画素ulap(以下、総称して隣接画素apともいう。)を考慮して重み係数wを算出する。予測ユニットPUと、左隣接画素lap、上隣接画素uap、及び左上隣接画素ulapとの関係の詳細を、図2bに示す。図2において、隣接画素apに含まれる画素は各々丸として描かれている。 In Method 2, a left adjacent pixel lap adjacent to the prediction unit PU on the left side, an upper adjacent pixel uap adjacent on the upper side, and an upper left adjacent pixel ulap adjacent on the upper left (hereinafter also collectively referred to as an adjacent pixel ap) are considered. To calculate the weighting coefficient w. Details of the relationship between the prediction unit PU, the left adjacent pixel lap, the upper adjacent pixel uap, and the upper left adjacent pixel ulap are shown in FIG. 2b. In FIG. 2, each pixel included in the adjacent pixel ap is drawn as a circle.
 ここで、図2の例では、予測ユニットPUの大きさは8画素×8画素である。しかしながら予測ユニットPUの大きさはこれに限られるものではなく、例えば4画素×4画素、16画素×16画素、8画素×16画素、16画素×8画素等、任意の大きさとすることが可能である。 Here, in the example of FIG. 2, the size of the prediction unit PU is 8 pixels × 8 pixels. However, the size of the prediction unit PU is not limited to this, and can be any size, for example, 4 pixels × 4 pixels, 16 pixels × 16 pixels, 8 pixels × 16 pixels, 16 pixels × 8 pixels, and the like. It is.
 図2bに示すように、予測ユニットPUの大きさが8画素×8画素の場合、左隣接画素lapは、予測ユニットPUの左側に隣接する8画素である。同様に上隣接画素uapは、予測ユニットPUの上側に隣接する8画素である。左上隣接画素ulapは、予測ユニットPUに左上に隣接する1画素である。 As shown in FIG. 2b, when the size of the prediction unit PU is 8 pixels × 8 pixels, the left adjacent pixel lap is 8 pixels adjacent to the left side of the prediction unit PU. Similarly, the upper adjacent pixel uap is eight pixels adjacent to the upper side of the prediction unit PU. The upper left adjacent pixel ulap is one pixel adjacent to the prediction unit PU at the upper left.
 符号化及び復号化処理では通常、ピクチャ内の左側から右側、上側から下側に向けて処理されるため、予測ユニットPUの予測処理を行う際、予測ユニットPUの上側及び左側の隣接画素apは処理済み(符号化/復号化済み)であることが多い。よって手法2では、予測ユニットPU自体ではなく、予測ユニットPUの左側及び/又は上側で隣接する隣接画素apの画素値に基づいて、好適な重み係数wを算出する。参照画像P0及びP1におけるブロックB0及びB1の隣接画素をそれぞれap0、ap1とすると、予測ユニットPUの隣接画素apと、ブロックB0及びB1の隣接画素ap0及びap1との残差の合計が最小となるように重み係数wを算出する。 In the encoding and decoding processes, since processing is normally performed from the left side to the right side and from the upper side to the lower side in the picture, when performing the prediction process of the prediction unit PU, the adjacent pixels ap on the upper side and the left side of the prediction unit PU are Often processed (encoded / decoded). Therefore, in Method 2, a suitable weight coefficient w is calculated based on the pixel value of the adjacent pixel ap adjacent on the left side and / or the upper side of the prediction unit PU, not the prediction unit PU itself. If the adjacent pixels of the blocks B 0 and B 1 in the reference images P 0 and P 1 are ap 0 and ap 1 , respectively, the adjacent pixel ap of the prediction unit PU and the adjacent pixels ap 0 and ap 1 of the blocks B 0 and B 1 The weighting factor w is calculated so that the total residual is minimized.
 このように手法2では、予測ユニットPUの隣接画素apの画素値に基づき、重み係数wが算出される。符号化装置及び復号化装置の両者で同様の処理を行うようにすれば、符号化装置で重み係数wの情報(重み係数wの値や重み係数wを定めるためのインデックス、重み係数wを予測するための予測情報等)をビットストリームに含めずとも、復号化装置は重み係数wを算出することができる。 Thus, in the method 2, the weighting coefficient w is calculated based on the pixel value of the adjacent pixel ap of the prediction unit PU. If the same processing is performed in both the encoding device and the decoding device, the encoding device predicts the weighting factor w information (the value of the weighting factor w, the index for determining the weighting factor w, and the weighting factor w). For example, the decoding apparatus can calculate the weight coefficient w without including the prediction information and the like in the bitstream.
 ここで、AVCやHEVC等の符号化方式では、画像CPはスライス及び/又はタイルに分割され、各々のスライスやタイルは独立して符号化/復号化処理が可能である。よって、予測ユニットPUの重み係数wを求める際に隣接画素apを利用しようとしても、隣接画素apの少なくとも一部が同一のスライス及び/タイルにない等の事情により、利用できない場合がある。よって、状況に応じて、上隣接画素uapのみを用いて重み係数wを算出したり、左隣接画素lapのみを用いて重み係数wを算出したりすることも考えられる。以下この点について、図2c及び図2dを参照しながら説明する。 Here, in an encoding method such as AVC or HEVC, the image CP is divided into slices and / or tiles, and each slice and tile can be independently encoded / decoded. Therefore, even when trying to use the adjacent pixel ap when obtaining the weighting coefficient w of the prediction unit PU, there are cases where it cannot be used due to circumstances such as at least a part of the adjacent pixel ap is not in the same slice and / or tile. Therefore, depending on the situation, the weighting factor w may be calculated using only the upper adjacent pixel uap, or the weighting factor w may be calculated using only the left adjacent pixel lap. This point will be described below with reference to FIGS. 2c and 2d.
 まず、図2cを参照しながら、画像CPの分割方法について説明する。先述の通り、AVCやHEVC等の符号化方式では、符号化及び復号化処理は、画像CPを分割したスライス及び/又はタイル単位で行われる。スライス及び/又はタイルには、1以上のブロック(マクロブロック又は符号化ツリーユニット(Coding Tree Unit):CTU)が含まれる。HEVCの場合には、CTUが更に1以上の符号化ユニット(Coding Unit:CU)に再帰的に分割される。CUには、CUを予測処理用に分割した予測ユニットPU、及び変換処理用に分割した変換ユニット(Transform Unit:TU)が含まれる。 First, a method for dividing the image CP will be described with reference to FIG. As described above, in encoding methods such as AVC and HEVC, encoding and decoding processing are performed in units of slices and / or tiles obtained by dividing the image CP. A slice and / or tile includes one or more blocks (macroblock or coding tree unit (CTU)). In the case of HEVC, the CTU is further recursively divided into one or more coding units (CUs). The CU includes a prediction unit PU that divides the CU for prediction processing, and a conversion unit (Transform Unit: TU) that is divided for conversion processing.
 ここで、図2cの例では、画像CPには、CTUが横方向に16、縦方向に9含まれているが、画像CPに含まれるCTUの数はこれに限られるものではない。また、図2cでは、CTUを更に分割したCUやPU、TUについては図示していない。 Here, in the example of FIG. 2c, the image CP includes 16 CTUs in the horizontal direction and 9 in the vertical direction, but the number of CTUs included in the image CP is not limited to this. In FIG. 2c, CU, PU, and TU obtained by further dividing the CTU are not shown.
 画像CPは、先述の通り、1以上のスライス及び/又はタイルに分割することができる。図2cの例では、画像CPは、矩形領域である4つのタイルT1乃至T4(以下、総称してタイルTともいう。)に分割されている。図2cの例では、タイルT1には、CTU0101、0107、0507、及び0501に囲まれる35個のCTUが含まれている。同様にタイルT2にはCTU0108、0116、0516、及び0508に囲まれる45個のCTUが、タイルT3にはCTU0601、0607、0907、及び0901で囲まれる28個のCTUが、タイルT4にはCTU0608、0616、0916及び0908で囲まれる36個のCTUがそれぞれ含まれている。なお、画像CPからタイルTへの分割数は4つに限られるものではなく、任意の数に分割することが可能である。 As described above, the image CP can be divided into one or more slices and / or tiles. In the example of FIG. 2c, the image CP is divided into four tiles T1 to T4 (hereinafter collectively referred to as tiles T) that are rectangular areas. In the example of FIG. 2c, the tile T1 includes 35 CTUs surrounded by CTUs 0101, 0107, 0507, and 0501. Similarly, the tile T2 includes 45 CTUs surrounded by CTUs 0108, 0116, 0516, and 0508, the tile T3 includes 28 CTUs surrounded by CTU0601, 0607, 0907, and 0901, and the tile T4 includes CTU0608, 36 CTUs surrounded by 0616, 0916 and 0908 are included, respectively. Note that the number of divisions from the image CP to the tile T is not limited to four, and can be divided into an arbitrary number.
 更に、タイルT1は、2つのスライスS1及びS2(以下、総称してスライスSともいう。)に分割されている。具体的には、スライスS1にはCTU0101~0107、0201~0207、0301~0304の18個のCTUが含まれ、スライスS2にはCTU0305~0307、0401~0407、0501~0507の17個のCTUが含まれている。なお、タイルTからスライスSへの分割数は2つに限られるものではなく、任意の数に分割することが可能である。 Furthermore, the tile T1 is divided into two slices S1 and S2 (hereinafter collectively referred to as slice S). Specifically, the slice S1 includes 18 CTUs of CTUs 0101 to 0107, 0201 to 0207, 0301 to 0304, and the slice S2 includes 17 CTUs of CTUs 0305 to 0307, 0401 to 0407, and 0501 to 0507. include. Note that the number of divisions from the tile T to the slice S is not limited to two, and can be divided into an arbitrary number.
 また、図2cの例では、タイルTをスライスSに分割しているが、これに限られるものではなく、スライスSをタイルTに分割することも可能である。また、タイルTを必ずしもスライスSに分割する必要はない。また同様に、スライスSを必ずしもタイルTに分割する必要はない。 In the example of FIG. 2c, the tile T is divided into slices S. However, the present invention is not limited to this, and the slice S can be divided into tiles T. Further, the tile T is not necessarily divided into slices S. Similarly, the slice S is not necessarily divided into tiles T.
 タイルT内のCTUは、各々、他のタイルTとは独立して復号可能である。同様に、スライスS内のCTUは、各々、他のスライスSとは独立して復号可能である。また、各々のタイルT又はスライスS内で、図2c中、矢印で示すように、左側から右側、上側から下側へ向けて、順番に各々のCTUに対する処理がなされる。例えば、スライスS1の例であれば、まずCTU0101に対する処理がなされる。その後、右側に隣接するCTUに対する処理が、CTU0107まで順番になされる。CTU0107までの処理が終わるとスライスSの境界に達するため、次はその下の行の最も左側にあるCTU0201に対する処理がなされる。その後、右側に隣接するCTUに対する処理が、CTU0207に至るまでなされる。CTU0207までの処理が終わると、その下の行であるCTU0301~CTU0304に対する処理が、左側のCTUから順になされる。 Each CTU in the tile T can be decoded independently of the other tiles T. Similarly, each CTU in slice S can be decoded independently of the other slices S. Also, within each tile T or slice S, as indicated by the arrows in FIG. 2c, the processing for each CTU is performed in order from the left side to the right side and from the upper side to the lower side. For example, in the case of the slice S1, processing for the CTU 0101 is first performed. Thereafter, the processing for the CTU adjacent on the right side is sequentially performed up to CTU0107. When the processing up to CTU0107 is completed, the boundary of the slice S is reached, so the processing on the leftmost CTU0201 in the lower row is performed next. Thereafter, the processing for the CTU adjacent on the right side is performed until the CTU 0207 is reached. When the processing up to CTU 0207 is completed, the processing for CTU 0301 to CTU 0304, which are the lower rows, is sequentially performed from the left CTU.
 先述の通り、各々のタイルT内のCTU及びスライスS内のCTUは、他のタイルTやスライスSと独立して処理できなければならない。よって、例えばCTU0607の処理は、CTU0507に依存することはできない。すなわち、CTU0607に対する重み係数wを算出する際に、上側で隣接するCTU0507内の画素を参照することはできない。このような場合に、CTU0607に対する重み係数wを算出する場合には、左側に隣接するCTUであるCTU0606内の画素、すなわち左隣接画素lapのみを利用し、上隣接画素uapを利用しないようにすることが考えられる(図2d参照)。或いは、同一のタイルTやスライスS内に左側及び上側に隣接するCTUが存在しないために隣接画素apを参照できない場合には(例えばCTU0101、CTU0305、CTU0401等)、隣接画素apに基づいて重み係数wを算出することはできない。よってこの場合には、例えば重み係数wの情報を符号化データに含めて伝送したり、双方向予測における重み係数を固定値としたりすることが考えられる。後者の場合には、重み係数wを例えば1/2に固定すれば良い。 As described above, the CTU in each tile T and the CTU in the slice S must be able to be processed independently of the other tiles T and slices S. Therefore, for example, the processing of CTU0607 cannot depend on CTU0507. That is, when calculating the weighting coefficient w for CTU0607, it is not possible to refer to pixels in the adjacent CTU0507 on the upper side. In such a case, when calculating the weighting coefficient w for CTU0607, only the pixel in CTU0606 that is the CTU adjacent to the left side, that is, the left adjacent pixel lap is used, and the upper adjacent pixel uap is not used. (See FIG. 2d). Alternatively, when the adjacent pixel ap cannot be referred to because the left and upper adjacent CTUs do not exist in the same tile T or slice S (for example, CTU0101, CTU0305, CTU0401, etc.), the weighting factor is based on the adjacent pixel ap. w cannot be calculated. Therefore, in this case, for example, it is conceivable to transmit information including the weighting factor w included in the encoded data, or to set the weighting factor in bidirectional prediction to a fixed value. In the latter case, the weighting factor w may be fixed to 1/2, for example.
 すなわち、画枠やタイル境界、スタイル境界等の理由により、上隣接画素uapを利用できない場合には左隣接画素lapを用いて重み係数wを求め、左隣接画素lapを利用できない場合には上隣接画素uapを用いて重み係数wを求めれば良い。また、上隣接画素ual、左隣接画素lapのいずれも利用できない場合には、例えば1/2等の固定値を用いて重み係数wを求めれば良い。この際、各隣接画素apの利用の可否を、符号化側及び復号化側で随時判断しても良いが、重み係数wの算出の際に利用する隣接画素apの情報を、明示的に符号化データに含ませることも考えられる。この場合には、例えば、重み係数wを算出する際に、上隣接画素uapのみを用いるか、左隣接画素lapのみを用いるか、上隣接画素uap、左隣接画素lap、左上隣接画素ulapの全てを用いるかを、或いは隣接画素apを用いないかを、フラグ情報等として符号化データに持たせれば良い。 That is, when the upper adjacent pixel uap cannot be used due to an image frame, tile boundary, style boundary, or the like, the weight coefficient w is obtained using the left adjacent pixel lap, and when the left adjacent pixel lap cannot be used, the upper adjacent pixel lap is upper adjacent. What is necessary is just to obtain | require the weighting coefficient w using the pixel uap. Further, when neither the upper adjacent pixel eal nor the left adjacent pixel lap can be used, the weight coefficient w may be obtained using a fixed value such as 1/2. At this time, whether or not each adjacent pixel ap can be used may be determined at any time on the encoding side and the decoding side, but information on the adjacent pixel ap used when calculating the weighting coefficient w is explicitly encoded. It is also possible to include it in the digitized data. In this case, for example, when calculating the weighting coefficient w, only the upper adjacent pixel uap or only the left adjacent pixel lap is used, or all of the upper adjacent pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap Whether or not to use the adjacent pixel ap may be given to the encoded data as flag information or the like.
(1.3 手法1及び手法2の関係)
 先述の通り、手法2は、単独で用いることもできるし、手法1と組み合わせて用いることもできる。手法2を単独で用いる場合には、動きベクトルv0及びv1は、例えば隣接ブロックの動きベクトルを用いた動きベクトル予測など、様々な手法により定めることができる。重み係数wについては、例えば、隣接画素apの輝度信号の残差の合計が最小となるように予測ユニットPUに適用する重み係数wを算出した上で、当該重みを色差信号に適用することが考えられる。或いは、隣接画素apの輝度信号及び色差信号の残差の合計が少なくなるように予測ユニットPUに適用する重み係数wを算出しても良い。若しくは、輝度信号、及び色差信号の各々について、合計が少なくなるように、輝度信号の重み係数wY及び色差信号の重み係数wCを求めても良い。色差信号Cb、Crについて、各々独立に重み係数wCb及びwCrを求めることも考えられる。更には、重み係数wCbからwCrを予測することも考えられる。
(1.3 Relationship between Method 1 and Method 2)
As described above, method 2 can be used alone or in combination with method 1. When the method 2 is used alone, the motion vectors v 0 and v 1 can be determined by various methods such as motion vector prediction using a motion vector of an adjacent block. For the weighting factor w, for example, after calculating the weighting factor w to be applied to the prediction unit PU so that the sum of the residuals of the luminance signals of the adjacent pixels ap is minimized, the weighting factor w may be applied to the color difference signal. Conceivable. Alternatively, the weighting coefficient w applied to the prediction unit PU may be calculated so that the sum of the residuals of the luminance signal and the color difference signal of the adjacent pixel ap is reduced. Alternatively, the luminance signal weight coefficient w Y and the color difference signal weight coefficient w C may be obtained so that the sum of the luminance signal and the color difference signal is reduced. For the color difference signals Cb and Cr, it is conceivable to obtain the weighting factors w Cb and w Cr independently of each other. Furthermore, it is conceivable to predict w Cr from the weight coefficient w Cb .
 手法2を手法1と組み合わせて用いる場合には、輝度信号については、重み係数wYを1/2とした上で動きベクトルv0及びv1を算出する。その上で、色差信号について、隣接画素apの色差信号の残差の合計が最小となるように予測ユニットPUの色差信号に適用する重み係数wCを算出することが考えられる。この時、色差信号Cbrの各々について、隣接画素apの残差の合計が少なくなるように異なる重み係数wCb、wCrを算出しても良い。更には、求まった重み係数wCbからwCrを予測しても良い。 When Method 2 is used in combination with Method 1, motion vectors v 0 and v 1 are calculated for the luminance signal after the weighting factor w Y is halved. Then, it is conceivable to calculate the weighting coefficient w C applied to the color difference signal of the prediction unit PU so that the sum of the residuals of the color difference signals of the adjacent pixels ap is minimized. In this case, for each of the color difference signal C b C r, different weighting factors so that the total is less residual neighboring pixels ap w Cb, it may calculate the w Cr. Furthermore, w Cr may be predicted from the obtained weight coefficient w Cb .
(2 機能構成)
 以下、図3乃至図6を参照しながら、本実施形態に係る符号化装置100、及び復号化装置200の機能構成を説明する。
(2 Function configuration)
Hereinafter, the functional configurations of the encoding device 100 and the decoding device 200 according to the present embodiment will be described with reference to FIGS. 3 to 6.
(2.1 符号化装置100)
 まず、図3を参照しながら、符号化装置100の機能構成を説明する。符号化装置100は、図3に示すように、入力部I1、出力部O1、A/D(アナログ/デジタル)変換部101、並替えバッファ103、直交変換部105、量子化部107、エントロピー符号化部109、蓄積バッファ111、レート制御部113、逆量子化部115、逆直交変換部117、ループフィルタ119、フレームメモリ121、イントラ予測部123、動き予測部125、及び双方向予測重み係数計算部127を含む。なお、図3の機能ブロック図において、主な信号の入出力を矢印で表現しているが、一部、機能間の信号の入出力がある場合であっても、矢印の記載を省略している場合がある。この点、図4乃至図6においても同様である。
(2.1 Encoding device 100)
First, the functional configuration of the encoding device 100 will be described with reference to FIG. As shown in FIG. 3, the encoding apparatus 100 includes an input unit I1, an output unit O1, an A / D (analog / digital) conversion unit 101, a rearrangement buffer 103, an orthogonal conversion unit 105, a quantization unit 107, an entropy code. 109, accumulation buffer 111, rate control unit 113, inverse quantization unit 115, inverse orthogonal transform unit 117, loop filter 119, frame memory 121, intra prediction unit 123, motion prediction unit 125, and bidirectional prediction weight coefficient calculation Part 127. In the functional block diagram of FIG. 3, input / output of main signals is represented by arrows. However, even when there is input / output of signals between functions, the description of the arrows is omitted. There may be. This also applies to FIGS. 4 to 6.
 A/D変換部101は、入力部I1から入力されたアナログ信号の画像データをデジタル信号のフレーム毎の画像データに変換し、表示順に並替えバッファ103へ供給する。並替えバッファ103は、画像フレームデータ(以下、入力画像ともいう。)の順序を、符号化のために並替えるためのバッファである。並替えバッファ103は、符号化を行う順に入力画像を演算器AD1へ出力する。また並替えバッファ103は、符号化対象の入力画像を、イントラ予測部123及び動き予測部125にも供給する。 The A / D conversion unit 101 converts the analog signal image data input from the input unit I1 into image data for each frame of the digital signal, and supplies the image data to the rearrangement buffer 103 in the display order. The rearrangement buffer 103 is a buffer for rearranging the order of image frame data (hereinafter also referred to as input image) for encoding. The rearrangement buffer 103 outputs the input image to the arithmetic unit AD1 in the order of encoding. The rearrangement buffer 103 also supplies the input image to be encoded to the intra prediction unit 123 and the motion prediction unit 125.
 なお、並替えバッファ103は入力画像を出力する際、画像分割部103aにより入力画像を分割して、分割された入力画像を供給する。より具体的には例えば、図2cを参照しながら説明したように、画像分割部103aは、入力画像を1以上のブロック(CTU)を含むスライス及び/又はタイルに分割すれば良い。 Note that when the rearrangement buffer 103 outputs an input image, the image division unit 103a divides the input image and supplies the divided input image. More specifically, for example, as described with reference to FIG. 2c, the image dividing unit 103a may divide the input image into slices and / or tiles including one or more blocks (CTU).
 演算器AD1は、並替えバッファ103から供給される符号化対象の入力画像から、イントラ予測部123又は動き予測部125から供給される予測画像を減算することにより、各々の画素値(輝度信号及び色差信号を含むことができる)の残差からなる差分画像に係る残差信号が得られる。 The computing unit AD1 subtracts the prediction image supplied from the intra prediction unit 123 or the motion prediction unit 125 from the input image to be encoded supplied from the rearrangement buffer 103, thereby obtaining each pixel value (luminance signal and A residual signal relating to a differential image consisting of residuals (which can include color difference signals) is obtained.
 直交変換部105は、演算器AD1で算出した残差信号に対して、離散コサイン変換(DCT)やカルーネン・レーベ変換等の直交変換を施す。直交変換の方法は任意である。直交変換部105により算出された残差信号の変換係数は、量子化部107へ供給される。 The orthogonal transform unit 105 performs orthogonal transform such as discrete cosine transform (DCT) and Karhunen-Loeve transform on the residual signal calculated by the arithmetic unit AD1. The method of orthogonal transformation is arbitrary. The transform coefficient of the residual signal calculated by the orthogonal transform unit 105 is supplied to the quantization unit 107.
 量子化部107は、直交変換部105から供給される変換係数を量子化する。この際量子化部107は、レート制御部113から供給される符号化量の目標値に係る情報に基づいて量子化パラメータに基づいて量子化を行う。なお、量子化の手法は任意である。
 エントロピー符号化部109は、量子化部107において量子化された変換係数を任意の符号化方式で符号化する。
The quantization unit 107 quantizes the transform coefficient supplied from the orthogonal transform unit 105. At this time, the quantization unit 107 performs quantization based on the quantization parameter based on the information related to the target value of the coding amount supplied from the rate control unit 113. Note that the quantization method is arbitrary.
The entropy encoding unit 109 encodes the transform coefficient quantized by the quantization unit 107 using an arbitrary encoding method.
 また、エントロピー符号化部109は、イントラ予測部123及び動き予測部125から、予測モードを示す情報や予測に使用する各種情報、例えば予測ユニットPU内の分割モードの情報や動きベクトルvの情報を取得する。また、ループフィルタ119から、使用されたフィルタ係数等の情報を取得する。エントロピー符号化部109は、これらの情報を任意の方式で符号化し、符号化した情報からヘッダ情報を生成する。エントロピー符号化部109は、符号化の結果得られる符号化データを蓄積バッファ111へ供給する。 In addition, the entropy encoding unit 109 receives information indicating the prediction mode and various types of information used for prediction, for example, information on the division mode in the prediction unit PU and information on the motion vector v, from the intra prediction unit 123 and the motion prediction unit 125. get. Also, information such as used filter coefficients is acquired from the loop filter 119. The entropy encoding unit 109 encodes the information by an arbitrary method, and generates header information from the encoded information. The entropy encoding unit 109 supplies encoded data obtained as a result of encoding to the accumulation buffer 111.
 エントロピー符号化部109による符号化には、例えば、CAVLC(Context-Adaptive Variable Length Coding)等の可変長符号化方式や、CABAC(Context-Adaptive Binary Arithmetic Coding)等の算術符号化方式を用いることが可能である。 For the encoding by the entropy encoding unit 109, for example, an arithmetic encoding method using a variable length encoding method such as CAVLC (Context-Adaptive Variable Length Coding) or a CABAC (Context-Adaptive Binary Arithmetic Coding) is used. Is possible.
 蓄積バッファ111は、エントロピー符号化部109から供給された符号化データを一時的に記憶するバッファである。蓄積バッファ111は、記憶している符号化データを、出力部O1から、ビットストリームとして図示しない記憶装置や伝送路などへ出力する。 The accumulation buffer 111 is a buffer that temporarily stores the encoded data supplied from the entropy encoding unit 109. The accumulation buffer 111 outputs the stored encoded data from the output unit O1 as a bit stream to a storage device or a transmission path (not shown).
 レート制御部113は、蓄積バッファ111に蓄積された符号化データの符号量に基づき、オーバーフロー又はアンダーフローが発生しないような符号化量の目標値を設定し、量子化部107における量子化動作のレート制御を行う。 The rate control unit 113 sets a target value of the coding amount so that overflow or underflow does not occur based on the code amount of the coded data accumulated in the accumulation buffer 111, and performs the quantization operation in the quantization unit 107. Perform rate control.
 量子化部107で量子化された変換係数は、エントロピー符号化部109のみならず、逆量子化部115にも供給される。逆量子化部115は、量子化された変換係数を逆量子化する。当該逆量子化の方法は、量子化部107で用いた量子化の方法に対応するものであれば任意の方法を用いることができる。 The transform coefficient quantized by the quantization unit 107 is supplied not only to the entropy encoding unit 109 but also to the inverse quantization unit 115. The inverse quantization unit 115 inversely quantizes the quantized transform coefficient. As the inverse quantization method, any method can be used as long as it corresponds to the quantization method used in the quantization unit 107.
 逆直交変換部117は、逆量子化部115により逆量子化されて得られた変換係数を、逆直交変換する。当該逆直交変換の方法は、直交変換部105で用いた直交変換の方法に対応するものであれば任意の方法を用いることができる。逆直交変換部117による変換係数に対する逆直交変換の結果、直交変換部105の入力である、差分画像を構成する残差信号が復元される。 The inverse orthogonal transform unit 117 performs inverse orthogonal transform on the transform coefficient obtained by the inverse quantization by the inverse quantization unit 115. As the inverse orthogonal transform method, any method can be used as long as it corresponds to the orthogonal transform method used in the orthogonal transform unit 105. As a result of the inverse orthogonal transform on the transform coefficient by the inverse orthogonal transform unit 117, a residual signal constituting the difference image, which is an input of the orthogonal transform unit 105, is restored.
 復元された残差信号は、逆直交変換部117から演算器AD2へ供給される。演算器AD2は、逆直交変換部117から供給される残差信号に、イントラ予測部123又は動き予測部125から供給される予測画像を加算することにより、局部的に復元された復号画像を得ることができる。当該復号画像は、ループフィルタ119又はフレームメモリ121に供給される。 The restored residual signal is supplied from the inverse orthogonal transform unit 117 to the arithmetic unit AD2. The arithmetic unit AD2 adds the predicted image supplied from the intra prediction unit 123 or the motion prediction unit 125 to the residual signal supplied from the inverse orthogonal transform unit 117, thereby obtaining a locally restored decoded image. be able to. The decoded image is supplied to the loop filter 119 or the frame memory 121.
 ループフィルタ119は、デブロッキングフィルタ処理やSAO(Sample Adaptive Offset)処理等を含みうる各種フィルタ処理を復号画像に対して行う。例えば、ループフィルタ119は、復号画像に対してデブロッキングフィルタ処理を施すことにより、ブロック歪みを低減する。またループフィルタ119は、当該デブロッキングフィルタ処理後の復号画像に対してSAO処理を施すことにより、エッジ周辺での画素値が歪むリンギングの低減や画素値のずれを補正する。この他、ループフィルタ119は、画質改善のための任意のフィルタ処理を施しても良い。ループフィルタ119は、各種フィルタ処理後の復号画像をフレームメモリ121に供給する。 The loop filter 119 performs various types of filter processing that can include deblocking filter processing, SAO (Sample Adaptive Offset) processing, and the like on the decoded image. For example, the loop filter 119 reduces block distortion by performing a deblocking filter process on the decoded image. Further, the loop filter 119 performs SAO processing on the decoded image after the deblocking filter processing, thereby reducing ringing that distorts pixel values around the edge and correcting pixel value deviation. In addition, the loop filter 119 may perform an arbitrary filter process for improving the image quality. The loop filter 119 supplies the decoded image after various filter processes to the frame memory 121.
 フレームメモリ121は、復号画像を記憶し、当該復号画像を参照画像として選択部SW1及び双方向予測重み係数計算部127に供給する。ここで、フレームメモリ121は、複数の参照画像を、リスト0(list0)及びリスト1(list1)の2つの参照画像群に分けて保存することができる。後述の動き予測部125で動き予測を行う際には、リスト0に格納された参照画像を参照して動き予測を行う予測方式、リスト1に格納された参照画像を参照して動き予測を行う予測方式、リスト0に格納された参照画像及びリスト1に格納された参照画像の2枚の参照画像を参照して動き予測を行う予測方式(双方向予測)のいずれかを適用することができる。 The frame memory 121 stores the decoded image and supplies the decoded image as a reference image to the selection unit SW1 and the bi-directional prediction weight coefficient calculation unit 127. Here, the frame memory 121 can store a plurality of reference images by dividing them into two reference image groups of list 0 (list0) and list 1 (list1). When motion prediction is performed by a motion prediction unit 125 described later, a prediction method for performing motion prediction with reference to reference images stored in list 0 and motion prediction with reference to reference images stored in list 1 are performed. Any one of a prediction method and a prediction method (bidirectional prediction) in which motion prediction is performed with reference to two reference images of a reference image stored in list 0 and a reference image stored in list 1 can be applied. .
 選択部SW1は、フレームメモリ121から供給される参照画像を、適用する予測モードに応じて、動き予測部125又はイントラ予測部123へ供給する。例えばイントラ予測(画面内予測)による符号化を行う場合には、SW1は参照画像をイントラ予測部123へ出力する。一方、インター予測(動き予測)による符号化を行う場合には、SW1は参照画像を動き予測部125へ出力する。 The selection unit SW1 supplies the reference image supplied from the frame memory 121 to the motion prediction unit 125 or the intra prediction unit 123 according to the prediction mode to be applied. For example, when encoding by intra prediction (intra-screen prediction), SW1 outputs a reference image to the intra prediction unit 123. On the other hand, when encoding by inter prediction (motion prediction), SW1 outputs a reference image to the motion prediction unit 125.
 イントラ予測部123は、選択部SW1を介してフレームメモリ121から供給される参照画像(処理対象ピクチャ)内の画素値を用いて、予測ユニット(Prediction Unit)PUを処理単位として予測画像を生成するイントラ予測を行う。この際、イントラ予測部123は、予め用意された複数のイントラ予測モードでイントラ予測を行ってそれぞれ予測画像を生成する。その上で、並替えバッファ103から入力画像を読出し、当該入力画像と予測画像との差分(残差)が小さくなる予測モードを選択する。より具体的には例えば、入力画像と各々の予測画像に対して予め用意されたコスト関数を適用し、得られるコスト関数値を最小にする予測モードを、符号化対象の予測ユニットPUに適用するイントラ予測モードとすることができる。 The intra prediction unit 123 uses the pixel values in the reference image (processing target picture) supplied from the frame memory 121 via the selection unit SW1 to generate a prediction image with a prediction unit PU as a processing unit. Perform intra prediction. At this time, the intra prediction unit 123 performs intra prediction in a plurality of intra prediction modes prepared in advance, and generates a prediction image, respectively. After that, the input image is read from the rearrangement buffer 103, and a prediction mode in which the difference (residual) between the input image and the predicted image is selected is selected. More specifically, for example, a cost function prepared in advance is applied to the input image and each predicted image, and a prediction mode that minimizes the obtained cost function value is applied to the prediction unit PU to be encoded. The intra prediction mode can be set.
 イントラ予測部123は、選択されたイントラ予測モードの情報等の、イントラ予測のために必要な各種情報をエントロピー符号化部109へ出力する。また、当該イントラ予測モードにより生成された予測画像を、選択部SW2を介して演算器AD1へ出力する。 The intra prediction unit 123 outputs various information necessary for intra prediction, such as information on the selected intra prediction mode, to the entropy encoding unit 109. Moreover, the prediction image produced | generated by the said intra prediction mode is output to computing unit AD1 via selection part SW2.
 動き予測部125は、選択部SW1を介してフレームメモリ121から供給される参照画像と、並替えバッファ103から供給される入力画像とを用いて、予測ユニットPU単位で動き予測処理を行う。動き予測部125は、予め用意された複数のインター予測モードでインター予測を行ってそれぞれ予測画像を生成する。その上で、並替えバッファ103から入力画像を読出し、当該入力画像と予測画像との差分(残差)が小さくなる予測モードを選択する。より具体的には例えば、入力画像と各々の予測画像に対して予め用意されたコスト関数を適用し、得られるコスト関数値を最小にする予測モードを、符号化対象の予測ユニットPUに適用する動き予測モードとすることができる。 The motion prediction unit 125 performs a motion prediction process for each prediction unit PU, using the reference image supplied from the frame memory 121 via the selection unit SW1 and the input image supplied from the rearrangement buffer 103. The motion prediction unit 125 performs inter prediction in a plurality of inter prediction modes prepared in advance, and generates a predicted image respectively. After that, the input image is read from the rearrangement buffer 103, and a prediction mode in which the difference (residual) between the input image and the predicted image is selected is selected. More specifically, for example, a cost function prepared in advance is applied to the input image and each predicted image, and a prediction mode that minimizes the obtained cost function value is applied to the prediction unit PU to be encoded. The motion prediction mode can be set.
 動き予測部125は、選択された動き予測モードの情報等の、動き予測のために必要な各種情報をエントロピー符号化部109へ出力する。また、当該インター予測モードにより生成された予測画像を、選択部SW2を介して演算器AD2へ出力する。 The motion prediction unit 125 outputs various information necessary for motion prediction, such as information on the selected motion prediction mode, to the entropy encoding unit 109. Further, the prediction image generated in the inter prediction mode is output to the arithmetic unit AD2 via the selection unit SW2.
 ここで、本実施形態において動き予測部125は、双方向予測を行う際に、1/2に固定ではない重み係数wを用いた予測が可能である。当該重み係数wは、双方向予測重み係数計算部127が算出する。 Here, in the present embodiment, the motion prediction unit 125 can perform prediction using a weighting factor w that is not fixed to ½ when performing bidirectional prediction. The bi-directional prediction weight coefficient calculator 127 calculates the weight coefficient w.
 以下、動き予測部125及び双方向予測重み係数計算部127の詳細な機能構成を、図4を参照しながら説明する。動き予測部125は、動きベクトル探索部151、予測方向決定部153、双方向予測部155、モード判定部157、及び予測画像生成部159を含む。なお、図4において、選択部SW1及びSW2は記載を省略している。 Hereinafter, detailed functional configurations of the motion prediction unit 125 and the bidirectional prediction weight coefficient calculation unit 127 will be described with reference to FIG. The motion prediction unit 125 includes a motion vector search unit 151, a prediction direction determination unit 153, a bidirectional prediction unit 155, a mode determination unit 157, and a predicted image generation unit 159. In FIG. 4, the selection units SW1 and SW2 are not shown.
 動きベクトル探索部151は、フレームメモリ121から供給される参照画像と、並替えバッファ103から供給される入力画像とを用いて、処理対象の予測ユニットPUに適用する2本の動きベクトルv(v0及びv1)を探索する。ここでは、フレームメモリ121のうち、リスト0中の参照画像に対して求められる動きベクトルvを動きベクトルv0、リスト1中の参照画像に対して求められる動きベクトルvを動きベクトルv1という。 The motion vector search unit 151 uses the reference image supplied from the frame memory 121 and the input image supplied from the rearrangement buffer 103, and uses the two motion vectors v (v to be applied to the processing target prediction unit PU. Search for 0 and v 1 ). Here, in the frame memory 121, the motion vector v obtained for the reference image in the list 0 is referred to as a motion vector v 0 , and the motion vector v obtained for the reference image in the list 1 is referred to as a motion vector v 1 .
 動きベクトルvの探索方法は種々考えられるが、例えば、予測ユニットPUに含まれる画素の画素値との差異が最小となる参照画像P内の領域(ブロックB)を参照する動きベクトルvを、動きベクトル探索部151は探索する。この際、例えば、取りうる全ての動きベクトルvに対して予め定められたコスト関数を適用して、コスト関数値が最も小さくなる動きベクトルvを採用することもできる。動きベクトル探索部151は、動きベクトルvを探索する際、予測ユニットPUに含まれる輝度信号及び2つの色差信号の全てを考慮して動きベクトルvを決定してもよいし、輝度信号のみを考慮して動きベクトルvを決定しても良い。 Various search methods for the motion vector v are conceivable. For example, a motion vector v referring to a region (block B) in the reference image P in which the difference from the pixel value of the pixel included in the prediction unit PU is minimized is determined as a motion. The vector search unit 151 searches. At this time, for example, a motion vector v having the smallest cost function value can be adopted by applying a predetermined cost function to all possible motion vectors v. When searching for the motion vector v, the motion vector search unit 151 may determine the motion vector v in consideration of all of the luminance signal and the two color difference signals included in the prediction unit PU, or only the luminance signal is considered. Thus, the motion vector v may be determined.
 なお、予測ユニットPUに対する予測は、予測ユニットPUを複数に分割して行うことが可能である。よって、動きベクトル探索部151は、各々の分割方式に対して、動きベクトルvを算出する。以下、予測ユニットPUの分割方式を分割モードともいう。 Note that the prediction for the prediction unit PU can be performed by dividing the prediction unit PU into a plurality of pieces. Therefore, the motion vector search unit 151 calculates a motion vector v for each division method. Hereinafter, the division method of the prediction unit PU is also referred to as a division mode.
 予測方向決定部153は、動きベクトル探索部151から供給される動きベクトルv0及びv1のうち、いずれを用いるか、或いは両方を用いるかを、分割モード毎に決定する。ここでは、動きベクトルv0及びv1のうち、いずれか一方のみを用いる予測を単一方向予測、両方を用いる予測を双方向予測という。単一方向予測とするか双方向予測とするかは、動きベクトルv0を用いた単一方向予測、動きベクトルv1を用いた単一方向予測、動きベクトルv0及びv1の両者を用いた双方向予測のうち、いずれが最も入力画像との差異が小さくなるか等により決定することができる。この際、予測方向決定部153は、予測ユニットPUに含まれる輝度信号及び2つの色差信号の全てを考慮して予測方式を決定しても良いし、輝度信号のみを考慮して予測方式を決定しても良い。また、予測方式を決定するために双方向予測における予測画素値を算出する際には、重み係数wを1/2とした場合の予測画素値を適用しても良い。 The prediction direction determination unit 153 determines, for each division mode, which one of the motion vectors v 0 and v 1 supplied from the motion vector search unit 151 is used or both. Here, prediction using only one of the motion vectors v 0 and v 1 is referred to as unidirectional prediction, and prediction using both is referred to as bidirectional prediction. Whether to use unidirectional prediction or bidirectional prediction uses unidirectional prediction using motion vector v 0 , unidirectional prediction using motion vector v 1 , and both motion vectors v 0 and v 1 . It is possible to determine which of the two-way predictions has the smallest difference from the input image. At this time, the prediction direction determination unit 153 may determine the prediction method in consideration of all of the luminance signal and the two color difference signals included in the prediction unit PU, or may determine the prediction method in consideration of only the luminance signal. You may do it. Moreover, when calculating the prediction pixel value in bidirectional prediction in order to determine the prediction method, the prediction pixel value when the weighting factor w is ½ may be applied.
 動きベクトルv0を用いた単一方向予測、動きベクトルv1を用いた単一方向予測、動きベクトルv0及びv1の両者を用いた双方向予測のいずれの予測方式とするかの情報を、以下、予測方向情報という。予測方向決定部153により決定された予測方向情報は、選択部SW3及びSW4の制御に用いられる。具体的には、双方向予測の場合には、予測に用いられる動きベクトルv0及びv1の情報が双方向予測重み係数計算部127及び双方向予測部155に供給されるように選択部SW3及びSW4が制御される。単一方向予測の場合には、予測に用いられる動きベクトルv0又はv1の情報がモード判定部157に供給され、双方向予測重み係数計算部127及び双方向予測部155に供給されないように、選択部SW3及びSW4が制御される。 Unidirectional prediction using motion vectors v 0, unidirectional prediction using motion vectors v 1, or the information and any prediction method of the bidirectional prediction using both motion vectors v 0 and v 1 Hereinafter, it is referred to as prediction direction information. The prediction direction information determined by the prediction direction determination unit 153 is used to control the selection units SW3 and SW4. Specifically, in the case of bidirectional prediction, the selection unit SW3 so that information on the motion vectors v 0 and v 1 used for prediction is supplied to the bidirectional prediction weight coefficient calculation unit 127 and the bidirectional prediction unit 155. And SW4 are controlled. In the case of unidirectional prediction, information on the motion vector v 0 or v 1 used for prediction is supplied to the mode determination unit 157 and is not supplied to the bidirectional prediction weight coefficient calculation unit 127 and the bidirectional prediction unit 155. The selection units SW3 and SW4 are controlled.
 双方向予測重み係数計算部127は、並替えバッファ103から供給される符号化対象の入力画像と、フレームメモリ121から供給される2枚の参照画像(リスト0及びリスト1に各々含まれる参照画像)とに基づき、双方向予測の際に適用する重み係数wを算出する。当該処理は、双方向予測を行う各々の分割モードに対してなされる。この際、先述の通り、双方向予測重み係数計算部127は、重み係数wの取り得る値を、m/(2n)(但し、m、nは整数)に限定することが可能である。この場合、シフト演算のみで重み係数wを算出できる(除算が不要となる)ため、演算量の低減を図ることが可能となる。 The bi-directional prediction weight coefficient calculation unit 127 includes an input image to be encoded supplied from the rearrangement buffer 103 and two reference images supplied from the frame memory 121 (reference images included in each of list 0 and list 1). ) To calculate a weighting coefficient w to be applied in bidirectional prediction. This processing is performed for each division mode in which bidirectional prediction is performed. At this time, as described above, the bidirectional prediction weight coefficient calculation unit 127 can limit the possible value of the weight coefficient w to m / (2 n ) (where m and n are integers). In this case, since the weighting factor w can be calculated only by the shift calculation (no division is required), it is possible to reduce the calculation amount.
 また双方向予測重み係数計算部127は、上記手法1で説明したように、輝度信号に対して適用する重み係数は1/2とした上で、色差信号のみに対する重み係数wCのみを双方向予測重み係数計算部127で算出してもよい。また、2つの色差信号に対して、異なる重み係数wCb及びwCrを双方向予測重み係数計算部127が算出してもよい。或いは、上記手法2で説明したように、輝度信号及び色差信号の全てに適用可能な、1/2ではない重み係数wを算出しても良いし、輝度信号及び2つの色差信号に対して、それぞれ異なる重み係数wY及びwCを算出してもよい。算出した重み係数wの情報は、双方向予測重み係数計算部127から、動き予測部125の双方向予測部155へ出力される。 Further, as described in Method 1 above, the bidirectional prediction weight coefficient calculation unit 127 sets the weight coefficient applied to the luminance signal to ½, and bidirectionally only the weight coefficient w C for only the color difference signal. The prediction weight coefficient calculation unit 127 may calculate the weight. The bidirectional prediction weight coefficient calculation unit 127 may calculate different weight coefficients w Cb and w Cr for the two color difference signals. Alternatively, as described in Method 2 above, a weight coefficient w that is not ½ that can be applied to all of the luminance signal and the color difference signal may be calculated, or for the luminance signal and the two color difference signals, Different weighting factors w Y and w C may be calculated. Information on the calculated weighting factor w is output from the bidirectional prediction weighting factor calculation unit 127 to the bidirectional prediction unit 155 of the motion prediction unit 125.
 なお、双方向予測重み係数計算部127は重み係数wの算出に際し、符号化対象の入力画像中の予測ユニットPU中の各画素の画素値と、上記式(2)により算出される予測ユニットPU中の各画素の画素値との相違の合計が小さくなるように、重み係数wを定めることができる。或いは、図2a及び図2bを参照しながら説明したように、隣接画素apにおいて、上記式(2)により算出される画素値の差異が小さくなる重み係数wを算出してもよい(上記手法2)。後者の場合、処理対象の予測ユニットPUには含まれない、隣接画素apから必然的に重み係数wが算出できる。この結果、復号化装置は、重み係数wの値や重み係数wを示すインデックス情報を受け取らずとも重み係数wが算出できるため、ビットストリーム中に、重み係数wに係る情報を含む必要がなくなる。このため、1/2に固定しない柔軟な重み係数wを採用しつつも、重み係数wに係る情報の伝送に起因する符号化効率の低下を防ぐことが可能となる。 Note that the bidirectional prediction weight coefficient calculation unit 127 calculates the weight coefficient w and the pixel value of each pixel in the prediction unit PU in the input image to be encoded and the prediction unit PU calculated by the above equation (2). The weighting coefficient w can be determined so that the sum of differences from the pixel values of the respective pixels in the inside becomes small. Alternatively, as described with reference to FIGS. 2a and 2b, the weighting factor w that reduces the difference in the pixel value calculated by the above equation (2) may be calculated in the adjacent pixel ap (the method 2 described above). ). In the latter case, the weighting factor w can be inevitably calculated from the adjacent pixel ap that is not included in the prediction unit PU to be processed. As a result, since the decoding apparatus can calculate the weighting coefficient w without receiving the value of the weighting coefficient w or the index information indicating the weighting coefficient w, it is not necessary to include information on the weighting coefficient w in the bitstream. For this reason, it is possible to prevent a decrease in coding efficiency due to transmission of information related to the weighting factor w, while adopting a flexible weighting factor w that is not fixed to ½.
 なおこのとき、画枠境界、スライス境界、タイル境界等の理由により、上隣接画素uap又は左隣接画素lapが重み係数wの算出のために利用できない場合には、利用可能な左隣接画素lap又は上隣接画素uapのみを利用して重み係数wを算出することも可能である。更に、上隣接画素uap及び左隣接画素laの両者が利用できない場合には、例えば、重み係数wを1/2等の固定値とすることも可能である。 At this time, if the upper adjacent pixel uap or the left adjacent pixel lap cannot be used for the calculation of the weighting factor w due to an image frame boundary, a slice boundary, a tile boundary, or the like, the available left adjacent pixel lap or It is also possible to calculate the weighting coefficient w using only the upper adjacent pixel uap. Further, when both the upper adjacent pixel uap and the left adjacent pixel la cannot be used, for example, the weight coefficient w can be set to a fixed value such as 1/2.
 双方向予測部155は、予測方向決定部153から供給される動きベクトルv0及びv1、及び双方向予測重み係数計算部127から供給される重み係数wを用いて、双方向予測を行う。当該処理は、双方向予測を行う各々の分割モードに対してなされる。 The bidirectional prediction unit 155 performs bidirectional prediction using the motion vectors v 0 and v 1 supplied from the prediction direction determination unit 153 and the weight coefficient w supplied from the bidirectional prediction weight coefficient calculation unit 127. This processing is performed for each division mode in which bidirectional prediction is performed.
 モード判定部157は、このようにして生成される各々の予測モード(分割モードを含む)における動きベクトルv、重み係数wのうちから、いずれの予測モードを用いて動き予測を行うべきかを判定する。当該処理においては、例えば、各々の予測モードにおける予測画像と、並替えバッファ103から読み出される入力画像との差分が小さくなる予測モードが選択される。より具体的には、入力画像と、各々の予測画像に対して予め用意されたコスト関数を適用し、得られるコスト関数値を最小にする予測モードが、符号化対象の予測ユニットPUに適用される動き予測モードとなる。 The mode determination unit 157 determines which prediction mode should be used for motion prediction from the motion vector v and the weighting factor w in each prediction mode (including the division mode) generated in this way. To do. In this process, for example, a prediction mode in which a difference between a predicted image in each prediction mode and an input image read from the rearrangement buffer 103 is reduced is selected. More specifically, a prediction mode that applies a cost function prepared in advance to each of the input image and each prediction image and minimizes the obtained cost function value is applied to the prediction unit PU to be encoded. Motion prediction mode.
 予測画像生成部159は、モード判定部157により決定された予測モードで予測するための情報、例えば動きベクトルv及び予測モード情報を受け取ると共に、フレームメモリ121から参照画像の情報を読み込むことにより、予測画像を生成する。生成された予測画像は、演算器AD1及びAD2に出力される。 The prediction image generation unit 159 receives information for prediction in the prediction mode determined by the mode determination unit 157, for example, the motion vector v and the prediction mode information, and reads the reference image information from the frame memory 121 to thereby perform prediction. Generate an image. The generated prediction image is output to the arithmetic units AD1 and AD2.
 また、モード判定部157は、決定した動きベクトルv及び予測モード情報を、エントロピー符号化部109へ出力する。この時、双方向予測重み係数計算部127が重み係数wを隣接画素apに基づいて定める場合には、双方向予測を行う場合であっても、モード判定部157は重み係数wの情報を必ずしも出力する必要はない。しかしながら、重み係数wを算出する際に使用する隣接画素apが上隣接画素uapであるか、左隣接画素lapであるか、上隣接画素uap、左隣接画素lap、左上隣接画素ulapの全てであるか、若しくは隣接画素apのいずれも利用しないかを示す情報を、符号化データに含ませるためにエントロピー符号化部109へ出力することも考えられる。 Also, the mode determination unit 157 outputs the determined motion vector v and prediction mode information to the entropy encoding unit 109. At this time, when the bidirectional prediction weighting coefficient calculation unit 127 determines the weighting coefficient w based on the adjacent pixel ap, the mode determination unit 157 does not necessarily obtain information on the weighting coefficient w even when bidirectional prediction is performed. There is no need to output. However, the adjacent pixel ap used when calculating the weighting factor w is the upper adjacent pixel uap, the left adjacent pixel lap, or the upper adjacent pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap. It is also conceivable that information indicating whether or not any of the adjacent pixels ap is used is output to the entropy encoding unit 109 so as to be included in the encoded data.
 一方、双方向予測を行う場合であって、予測ユニットPU内の画素の画素値に基づき重み係数wを定める場合には、モード判定部157は、重み係数wの値を求めるためのインデックス情報等を、エントロピー符号化部109へ出力すれば良い。また、例えば重み係数wに固定値(1/2等)を用いる場合には、その旨を示すフラグ情報を、モード判定部157はエントロピー符号化部109へ出力すれば良い。なおフラグ情報は、予測ユニットPU毎に含めても良いし、或いは、スライス毎に含めても良い。 On the other hand, when bidirectional prediction is performed and the weight coefficient w is determined based on the pixel value of the pixel in the prediction unit PU, the mode determination unit 157 uses index information for determining the value of the weight coefficient w, and the like. May be output to the entropy encoding unit 109. For example, when a fixed value (1/2 or the like) is used for the weight coefficient w, the mode determination unit 157 may output flag information indicating that to the entropy encoding unit 109. The flag information may be included for each prediction unit PU or may be included for each slice.
(2.2 復号化装置200)
 次に、図5を参照しながら、復号化装置200の機能構成を説明する。復号化装置200は、図5に示すように、入力部I2、蓄積バッファ201、エントロピー復号化部203、逆量子化部205、逆直交変換部207、ループフィルタ209、並替えバッファ211、D/A(デジタル/アナログ)変換部213、フレームメモリ215、イントラ予測部217、動き予測部219、及び双方向予測重み係数計算部221を含む。
(2.2 Decryption device 200)
Next, the functional configuration of the decoding device 200 will be described with reference to FIG. As shown in FIG. 5, the decoding apparatus 200 includes an input unit I2, an accumulation buffer 201, an entropy decoding unit 203, an inverse quantization unit 205, an inverse orthogonal transform unit 207, a loop filter 209, a rearrangement buffer 211, a D / D An A (digital / analog) conversion unit 213, a frame memory 215, an intra prediction unit 217, a motion prediction unit 219, and a bidirectional prediction weight coefficient calculation unit 221 are included.
 蓄積バッファ201は、入力部I2から入力された符号化データ(ビットストリーム)を蓄積し、適宜、符号化データをエントロピー復号化部203へ出力する。エントロピー復号化部203は、蓄積バッファ201から供給された、図3のエントロピー符号化部109にて符号化された情報を、当該符号化の際に用いられた符号化方式に対応する復号化方式で復号する。復号の結果得られる差分画像の量子化された変換係数は、エントロピー復号化部203から逆量子化部205へ供給される。 The accumulation buffer 201 accumulates the encoded data (bit stream) input from the input unit I2, and appropriately outputs the encoded data to the entropy decoding unit 203. The entropy decoding unit 203 decodes the information supplied from the accumulation buffer 201 and encoded by the entropy encoding unit 109 in FIG. 3 to the encoding method used at the time of encoding. Decrypt with. The quantized transform coefficient of the difference image obtained as a result of decoding is supplied from the entropy decoding unit 203 to the inverse quantization unit 205.
 逆量子化部205は、差分画像の量子化された変換係数に対し、図3の量子化部107での量子化方式に対応する方式で逆量子化し、変換係数を求める。当該逆量子化の方法は、量子化部107で用いられた量子化の方法に対応するものであれば、任意の方法を用いることができる。 The inverse quantization unit 205 inversely quantizes the quantized transform coefficient of the difference image by a method corresponding to the quantization method in the quantization unit 107 in FIG. 3 to obtain a transform coefficient. As the inverse quantization method, any method can be used as long as it corresponds to the quantization method used in the quantization unit 107.
 逆直交変換部207は、逆量子化部205により逆量子化されて得られた変換係数を、逆直交変換する。当該逆直交変換の方法は、直交変換部105で用いた直交変換の方法に対応するものであれば任意の方法を用いることができる。逆直交変換部207による逆直交変換の結果、差分画像を構成する残差信号が復元される。 The inverse orthogonal transform unit 207 performs inverse orthogonal transform on the transform coefficient obtained by inverse quantization by the inverse quantization unit 205. As the inverse orthogonal transform method, any method can be used as long as it corresponds to the orthogonal transform method used in the orthogonal transform unit 105. As a result of the inverse orthogonal transform by the inverse orthogonal transform unit 207, the residual signal constituting the difference image is restored.
 差分画像に係る残差信号は、演算器AD3に供給される。演算器AD3は、逆直交変換部207から供給される差分画像に、イントラ予測部217又は動き予測部219から供給される予測画像を加算することにより、復号画像に係る画像データを得る。演算器AD3は、当該復号画像に係る画像データをループフィルタ209へ供給する。 The residual signal relating to the difference image is supplied to the arithmetic unit AD3. The arithmetic unit AD3 adds the predicted image supplied from the intra prediction unit 217 or the motion prediction unit 219 to the difference image supplied from the inverse orthogonal transform unit 207, thereby obtaining image data related to the decoded image. The arithmetic unit AD3 supplies the image data related to the decoded image to the loop filter 209.
 ループフィルタ209は、演算器AD3から入力された復号画像に対して、デブロッキングフィルタ処理やSAO処理等を含みうる各種フィルタ処理を施す。例えば、ループフィルタ209は、復号画像に対してデブロッキングフィルタ処理施すことにより、ブロック歪みを低減する。またループフィルタ209は当該デブロッキングフィルタ処理後の復号画像に対して、SAO処理を施すことにより、エッジ周辺での画素値が歪むリンギングの低減や画素値のずれを補正する。この他、ループフィルタ209は、画質改善のための任意のフィルタ処理を施しても良い。ループフィルタ209は、各種フィルタ処理後の復号画像を、並替えバッファ211及びフレームメモリ215へ供給する。 The loop filter 209 performs various types of filter processing that can include deblocking filter processing, SAO processing, and the like on the decoded image input from the arithmetic unit AD3. For example, the loop filter 209 reduces block distortion by performing a deblocking filter process on the decoded image. In addition, the loop filter 209 performs SAO processing on the decoded image after the deblocking filter processing, thereby reducing ringing in which pixel values around the edge are distorted and correcting pixel values. In addition, the loop filter 209 may perform an arbitrary filter process for improving the image quality. The loop filter 209 supplies the decoded image after various filter processes to the rearrangement buffer 211 and the frame memory 215.
 並替えバッファ211は、ループフィルタ209から供給された、フィルタ処理後の復号画像(画像フレームデータ)を表示順に並び替えるためのバッファである。並替えバッファ211は、表示順に復号画像をD/A変換部213へ出力する。D/A変換部213は、並替えバッファ211から供給されたデジタル信号のフレームごとの画像データを、適宜アナログ信号に変換後、出力部O2から出力する。 The rearrangement buffer 211 is a buffer for rearranging the decoded image (image frame data) after the filtering process supplied from the loop filter 209 in the display order. The rearrangement buffer 211 outputs the decoded images to the D / A conversion unit 213 in the display order. The D / A conversion unit 213 converts the image data for each frame of the digital signal supplied from the rearrangement buffer 211 into an analog signal as appropriate, and then outputs it from the output unit O2.
 フレームメモリ215は、ループフィルタ209から供給される復号画像を記憶し、当該復号画像を参照画像として選択部SW5へ供給する。ここで、フレームメモリ215は、複数の参照画像をリスト0及びリスト1の2つの参照画像群に分けて格納することができる。後述の動き予測部125で動き予測を行う際には、リスト0に格納された参照画像を参照して動き予測を行う予測方式、リスト1に格納された参照画像を参照して動き予測を行う予測方式、リスト0に格納された参照画像、及びリスト1に格納された参照画像の2枚の参照画像を参照して動き予測を行う予測方式(双方向予測)のいずれかを適用することができる。 The frame memory 215 stores the decoded image supplied from the loop filter 209 and supplies the decoded image as a reference image to the selection unit SW5. Here, the frame memory 215 can store a plurality of reference images by dividing them into two reference image groups, List 0 and List 1. When motion prediction is performed by a motion prediction unit 125 described later, a prediction method for performing motion prediction with reference to reference images stored in list 0 and motion prediction with reference to reference images stored in list 1 are performed. Applying any of a prediction method, a reference image stored in list 0, and a prediction method (bidirectional prediction) for performing motion prediction with reference to two reference images stored in list 1 may be applied. it can.
 選択部SW5は、フレームメモリ215から供給される参照画像を、適用される予測モードに応じて、イントラ予測部217又は動き予測部219へ供給する。例えば、イントラ符号化された画像を復号する場合には、選択部SW5は、フレームメモリ215から供給される参照画像をイントラ予測部217へ供給する。また選択部SW5は、動き予測により符号化された画像を復号する場合には、フレームメモリ215から供給される参照画像を動き予測部219へ出力する。 The selection unit SW5 supplies the reference image supplied from the frame memory 215 to the intra prediction unit 217 or the motion prediction unit 219 according to the applied prediction mode. For example, when decoding an intra-coded image, the selection unit SW5 supplies the reference image supplied from the frame memory 215 to the intra prediction unit 217. The selection unit SW5 outputs the reference image supplied from the frame memory 215 to the motion prediction unit 219 when decoding an image encoded by motion prediction.
 イントラ予測部217は、フレームメモリ215から選択部SW5を介して供給される参照画像(処理対象ピクチャ)内の画素値を用いて、予測ユニットPUを処理単位として予測画像を生成するイントラ予測を行う。イントラ予測部217は、予め用意された複数のイントラ予測モードのうち、エントロピー復号化部203から得られる予測モード情報等に基づいて選択されるイントラ予測モードにより、復号化対象の予測ユニットPUを復号する。これにより、図3のイントラ予測部123が符号化の際に用いたイントラ予測モードにより、予測画像を生成することができる。 The intra prediction unit 217 performs intra prediction using the pixel values in the reference image (processing target picture) supplied from the frame memory 215 via the selection unit SW5 to generate a prediction image using the prediction unit PU as a processing unit. . The intra prediction unit 217 decodes the prediction unit PU to be decoded using an intra prediction mode selected based on prediction mode information obtained from the entropy decoding unit 203 among a plurality of prepared intra prediction modes. To do. Thereby, a prediction image can be generated by the intra prediction mode used when the intra prediction unit 123 in FIG. 3 performs encoding.
 動き予測部219は、フレームメモリ215から選択部SW5を介して供給される参照画像を用いて、予測ユニットPU単位で動き予測処理を行う。動き予測部219は、予め用意された複数の動き予測モードのうち、エントロピー復号化部203から得られた予測モード情報に基づいて選択される動き予測モードにより、復号化対象の予測ユニットPUを復号する。また当該復号の際、エントロピー復号化部203から供給される動きベクトルvの情報や、必要に応じて供給される重み係数wの情報が用いられる。これにより動き予測部125は、図3の動き予測部125が符号化の際に用いた方法により予測画像を生成することができる。 The motion prediction unit 219 performs motion prediction processing for each prediction unit PU using the reference image supplied from the frame memory 215 via the selection unit SW5. The motion prediction unit 219 decodes a prediction target PU to be decoded using a motion prediction mode selected based on prediction mode information obtained from the entropy decoding unit 203 among a plurality of motion prediction modes prepared in advance. To do. In the decoding, information on the motion vector v supplied from the entropy decoding unit 203 and information on the weighting coefficient w supplied as necessary are used. Accordingly, the motion prediction unit 125 can generate a prediction image by the method used by the motion prediction unit 125 of FIG. 3 when encoding.
 ここで、本実施形態において動き予測部219は、双方向予測を行う際に、1/2に固定ではない重み係数wを用いた予測が可能である。当該重み係数wは、双方向予測重み係数計算部221が算出する。 Here, in the present embodiment, the motion prediction unit 219 can perform prediction using a weighting factor w that is not fixed to ½ when performing bidirectional prediction. The bi-directional prediction weight coefficient calculation unit 221 calculates the weight coefficient w.
 以下、動き予測部219及び双方向予測重み係数計算部221の詳細な機能構成を、図6を参照しながら説明する。動き予測部219は、予測画像生成部251と、予測モード・動きベクトルバッファ253とを含む。なお、図6において、選択部SW5及びSW6は記載を省略している。 Hereinafter, detailed functional configurations of the motion prediction unit 219 and the bidirectional prediction weight coefficient calculation unit 221 will be described with reference to FIG. The motion prediction unit 219 includes a predicted image generation unit 251 and a prediction mode / motion vector buffer 253. In FIG. 6, the selection units SW5 and SW6 are not shown.
 予測画像生成部251は、先述の通り、フレームメモリ215から供給される参照画像を用いて、予測ユニットPUを処理単位として予測画像を生成する。予測画像生成部251は複数の動き予測モードに対応するが、このうち、予測モード・動きベクトルバッファ253から供給される予測モード情報に基づいて選択される予測モードにより、復号化対象の予測ユニットPUを復号する。また、予測画像生成部251は、動き予測による予測画像生成に際し、予測モード・動きベクトルバッファ253から動きベクトルvと、必要に応じて重み係数wとを読込む。これにより動き予測部219は、図3の動き予測部219が符号化の際に用いた方法により、予測画像を生成することができる。生成された予測画像は、演算器AD3へ出力される。 As described above, the predicted image generation unit 251 generates a predicted image using the reference image supplied from the frame memory 215 as a processing unit. The prediction image generation unit 251 corresponds to a plurality of motion prediction modes, and among these, the prediction unit PU to be decoded is selected according to the prediction mode selected based on the prediction mode information supplied from the prediction mode / motion vector buffer 253. Is decrypted. Also, the predicted image generation unit 251 reads the motion vector v and the weighting coefficient w as necessary from the prediction mode / motion vector buffer 253 when generating a predicted image by motion prediction. Thereby, the motion prediction unit 219 can generate a prediction image by the method used by the motion prediction unit 219 of FIG. 3 when encoding. The generated predicted image is output to the arithmetic unit AD3.
 予測モード・動きベクトルバッファ253は、エントロピー復号化部203から供給される、予測モード情報や動きベクトル情報を一時的に格納するバッファである。また予測モード・動きベクトルバッファ253は、処理対象の予測ユニットPUの予測モードが双方向予測である場合に、双方向予測重み係数計算部221に対して、動きベクトルvの情報を渡すと共に、双方向予測重み係数計算部221から重み係数wを受取り、一時的に格納する。 The prediction mode / motion vector buffer 253 is a buffer that temporarily stores prediction mode information and motion vector information supplied from the entropy decoding unit 203. In addition, when the prediction mode of the prediction unit PU to be processed is bidirectional prediction, the prediction mode / motion vector buffer 253 passes the information on the motion vector v to the bidirectional prediction weight coefficient calculation unit 221 and both The weight coefficient w is received from the direction prediction weight coefficient calculation unit 221 and temporarily stored.
 選択部SW7は、予測モード・動きベクトルバッファ253から、処理対象の予測ユニットPUの予測方向に係る情報を受取り、動きベクトルvの情報を双方向予測重み係数計算部221に渡すか否かを切り替える。より具体的には、予測ユニットPUに係る予測が、動きベクトルv0又はv1の一方しか使用しない単一方向予測の場合には、動きベクトルvの情報は双方向予測重み係数計算部221に出力されない。一方、処理対象の予測ユニットに対して、動きベクトルv0及びv1の両者を使用する双方向予測を行う場合には、動きベクトルvの情報が双方向予測重み係数計算部221に出力される。 The selection unit SW7 receives information related to the prediction direction of the prediction unit PU to be processed from the prediction mode / motion vector buffer 253, and switches whether to pass the information on the motion vector v to the bidirectional prediction weight coefficient calculation unit 221. . More specifically, when the prediction related to the prediction unit PU is unidirectional prediction using only one of the motion vectors v 0 and v 1 , information on the motion vector v is sent to the bidirectional prediction weight coefficient calculation unit 221. Not output. On the other hand, when bidirectional prediction using both motion vectors v 0 and v 1 is performed on the prediction unit to be processed, information on the motion vector v is output to the bidirectional prediction weight coefficient calculation unit 221. .
 双方向予測重み係数計算部221は、双方向予測に用いる重み係数wを算出する。この際、例えば重み係数wを算出するためのインデックス情報等をエントロピー復号化部203から受け取る場合には、双方向予測重み係数計算部221は、当該情報に基づき、重み係数wを算出する。 The bidirectional prediction weight coefficient calculation unit 221 calculates a weight coefficient w used for bidirectional prediction. At this time, for example, when index information or the like for calculating the weighting factor w is received from the entropy decoding unit 203, the bidirectional prediction weighting factor calculation unit 221 calculates the weighting factor w based on the information.
 一方、上記手法2として説明したように、重み係数wを予測ユニットPUの隣接画素apに基づいて算出する場合には、双方向予測重み係数計算部221は、フレームメモリ215から供給される、処理対象ピクチャ内の予測ユニットPUの隣接画素apと、2枚の参照画像(リスト0及びリスト1に各々含まれる参照画像)とに基づいて重み係数wを算出する。この際、上記手法1で説明したように、輝度信号に対して適用する重み係数は1/2とした上で、色差信号のみに対する重み係数wCのみを双方向予測重み係数計算部221で算出してもよい。また、2つの色差信号に対して、異なる重み係数wCb及びwCrを双方向予測重み係数計算部221が算出してもよい。或いは、上記手法2で説明したように、輝度信号及び色差信号の全てに適用可能な、1/2ではない重み係数wを算出してもよいし、輝度信号及び2つの色差信号に対して、それぞれ異なる重み係数wY及びwCを算出してもよい。算出した重み係数wの情報は、双方向予測重み係数計算部221から、予測モード・動きベクトルバッファ253へ出力される。 On the other hand, when the weighting coefficient w is calculated based on the adjacent pixel ap of the prediction unit PU as described in the method 2, the bidirectional prediction weighting coefficient calculation unit 221 is supplied from the frame memory 215. The weighting coefficient w is calculated based on the adjacent pixel ap of the prediction unit PU in the target picture and two reference images (reference images included in list 0 and list 1). At this time, as described in Method 1 above, the weighting coefficient applied to the luminance signal is halved, and only the weighting coefficient w C for only the color difference signal is calculated by the bidirectional prediction weighting coefficient calculation unit 221. May be. Further, the bi-directional prediction weight coefficient calculation unit 221 may calculate different weight coefficients w Cb and w Cr for the two color difference signals. Alternatively, as described in Method 2 above, a weight coefficient w that is not ½ that can be applied to all of the luminance signal and the color difference signal may be calculated, or for the luminance signal and the two color difference signals, Different weighting factors w Y and w C may be calculated. Information on the calculated weight coefficient w is output from the bidirectional prediction weight coefficient calculation unit 221 to the prediction mode / motion vector buffer 253.
 この時、例えば、符号化データ中に、重み係数wの算出の際に参照すべき隣接画素apの情報(例えば、上隣接画素uapを参照すべきか、左隣接画素lapを参照すべきか、上隣接画素uap、左隣接画素lap、及び左上隣接画素ulapのいずれも参照すべきか、いずれも参照すべきでないか)の情報が含まれる場合には、当該情報に基づき、双方向予測重み係数算出部221は重み係数wを算出すれば良い。更に、例えば重み係数wに1/2等の固定値を利用すべき旨のフラグが符号化データ中に含まれる場合には、隣接画素apを考慮せずに、当該固定値を重み係数wにセットすれば良い。 At this time, for example, information on the adjacent pixel ap to be referred to when calculating the weighting coefficient w (for example, whether to refer to the upper adjacent pixel uap, the left adjacent pixel lap, or the upper adjacent pixel in the encoded data) In the case where information on whether or not all of the pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap should be referred to is included), the bidirectional prediction weight coefficient calculation unit 221 is based on the information. May calculate the weight coefficient w. Furthermore, for example, when the encoded data includes a flag indicating that a fixed value such as 1/2 is to be used in the weighting factor w, the fixed value is used as the weighting factor w without considering the adjacent pixel ap. Just set.
(3. 動き予測を用いた画像処理の流れ)
 以下、図7及び図8を参照しながら、符号化及び復号化における、動き予測を用いた画像処理の流れを説明する。
(3. Flow of image processing using motion prediction)
Hereinafter, the flow of image processing using motion prediction in encoding and decoding will be described with reference to FIGS. 7 and 8.
(3.1 動き予測による予測画像を生成する場合の符号化処理)
 まず、図7を参照しながら、動き予測により予測画像を生成する場合の、符号化に係る処理の流れを説明する。図7は、動き予測により予測画像を生成する場合の、符号化に係る処理の流れを示すフローチャートである。なお、先述の通り、予測画像生成は動き予測のみならずイントラ予測によっても可能であるが、ここでは説明を省略する。この点、後述する図8のフローチャートについても同様である。
(3.1 Coding process when generating predicted image by motion prediction)
First, the flow of processing related to encoding when a predicted image is generated by motion prediction will be described with reference to FIG. FIG. 7 is a flowchart showing a flow of processing related to encoding when a predicted image is generated by motion prediction. As described above, predicted image generation can be performed not only by motion prediction but also by intra prediction, but description thereof is omitted here. The same applies to the flowchart of FIG. 8 described later.
 動画像がIO1から入力信号として入力されると、それらの動画像は画像毎に符号化された後、符号化されたデータに基づいて再度復号化され、適宜フレームメモリ121に参照画像として格納される(S701)。この際、各々の参照画像は、フレームメモリ121中でリスト0及びリスト1の2つの参照画像群に分けて格納される。 When moving images are input as input signals from the IO 1, the moving images are encoded for each image, then decoded again based on the encoded data, and appropriately stored as a reference image in the frame memory 121. (S701). At this time, each reference image is divided into two reference image groups of list 0 and list 1 in the frame memory 121 and stored.
 このようにしてフレームメモリ121中でリスト0として格納されている参照画像に対して、動きベクトル探索部151は、動きベクトルv0の探索を行う(S703)。この探索は先述の通り、例えば、参照画像中で、予測ユニットPUとの残差が最も少なくなるブロックB0を示す動きベクトルv0の探索として行うことができる。またこの時、例えば輝度信号のみを考慮して、動きベクトルv0を求める探索を行っても良い。 In this way, the motion vector search unit 151 searches for the motion vector v 0 for the reference images stored as the list 0 in the frame memory 121 (S703). As described above, this search can be performed, for example, as a search for the motion vector v 0 indicating the block B 0 in which the residual with the prediction unit PU is the smallest in the reference image. At this time, for example, a search for obtaining the motion vector v 0 may be performed in consideration of only the luminance signal.
 次に動きベクトル探索部151は、フレームメモリ121中でリスト1として格納されている参照画像に対して、動きベクトルv0と同様に動きベクトルv1の探索を行う(S705)。 Then the motion vector search unit 151, to the reference image stored as a list 1 in the frame memory 121, to search for a motion vector v 1 in the same manner as the motion vector v 0 (S705).
 このようにして動きベクトルv0及びv1が求まると、予測方向決定部153は、動きベクトルv0及びv1のうち、いずれを用いるか(単一方向予測)、或いは両方を用いるか(双方向予測)を決定する(S707)。 When the motion vectors v 0 and v 1 are obtained in this way, the prediction direction determination unit 153 uses which of the motion vectors v 0 and v 1 (unidirectional prediction) or both (both) Direction prediction) is determined (S707).
 この結果、単一方向予測を行う場合には(S709のNo)、予測画像生成部159は当該動きベクトルvに基づき、予測画像の生成を行う(S713)。一方、双方向予測を行う場合には(S709のYes)、予測方向決定部153は動きベクトルv0及びv1の情報を双方向予測重み係数計算部127へ出力し、双方向予測重み係数計算部127は当該動きベクトルv0及びv1を用いて重み係数wを求める(S711)。この時、上記手法1として説明したように、輝度信号に対して適用する重み係数は1/2とした上で、色差信号のみに対する重み係数wCのみを双方向予測重み係数計算部127で算出してもよい。また、2つの色差信号に対して、それぞれ異なる重み係数wCb及びwCrを双方向予測重み係数計算部127が算出してもよい。或いは、上記手法2で説明したように、輝度信号及び色差信号の全てに適用可能な、1/2ではない重み係数wを算出してもよいし、輝度信号及び2つの色差信号に対して、それぞれ異なる重み係数wY及びwCを算出してもよい。なおこの時、重み係数wの取り得る値は、m/(2n)(但し、m、nは整数)に限定することも考えられる。 As a result, when performing unidirectional prediction (No in S709), the predicted image generation unit 159 generates a predicted image based on the motion vector v (S713). On the other hand, when bi-directional prediction is performed (Yes in S709), the prediction direction determination unit 153 outputs information on the motion vectors v 0 and v 1 to the bi-directional prediction weight coefficient calculation unit 127 to calculate the bi-directional prediction weight coefficient. The unit 127 obtains a weighting coefficient w using the motion vectors v 0 and v 1 (S711). At this time, as described in Method 1 above, the weighting coefficient applied to the luminance signal is halved, and only the weighting coefficient w C for only the color difference signal is calculated by the bidirectional prediction weighting coefficient calculation unit 127. May be. In addition, the bidirectional prediction weight coefficient calculation unit 127 may calculate different weight coefficients w Cb and w Cr for the two color difference signals. Alternatively, as described in Method 2 above, a weight coefficient w that is not ½ that can be applied to all of the luminance signal and the color difference signal may be calculated, or for the luminance signal and the two color difference signals, Different weighting factors w Y and w C may be calculated. At this time, the possible value of the weighting factor w may be limited to m / (2 n ) (where m and n are integers).
 先述の通り、双方向予測重み係数計算部127は重み係数wの算出に際し、符号化対象の入力画像中の予測ユニットPU中の各画素の画素値と、上記式(2)により算出される予測ユニットPUの各画素の画素値との差異が小さくなるように、重み係数wを定めることができる。或いは、図2a及び図2bを参照しながら説明したように、隣接画素apにおいて、上記式(2)により算出される画素値の差異が小さくなるように重み係数wを算出してもよい(上記手法2)。 As described above, when calculating the weighting coefficient w, the bidirectional prediction weighting coefficient calculating unit 127 calculates the pixel value of each pixel in the prediction unit PU in the input image to be encoded and the prediction calculated by the above equation (2). The weighting factor w can be determined so that the difference from the pixel value of each pixel of the unit PU becomes small. Alternatively, as described with reference to FIGS. 2a and 2b, the weighting factor w may be calculated so that the difference between the pixel values calculated by the above equation (2) becomes small in the adjacent pixel ap (above Method 2).
 このようにして動きベクトルv及び重み係数wが算出されると、予測画像生成部159は、これらの情報と、フレームメモリ121から読み出される参照画像とを用いて、予測画像を生成する(S713)。またモード判定部157は、当該予測画像生成に必要な情報、例えば予測モード情報や動きベクトルvの情報等を、エントロピー符号化部109に出力する。 When the motion vector v and the weighting factor w are calculated in this way, the predicted image generation unit 159 generates a predicted image using these pieces of information and the reference image read from the frame memory 121 (S713). . In addition, the mode determination unit 157 outputs information necessary for generating the predicted image, for example, prediction mode information, information on the motion vector v, and the like to the entropy encoding unit 109.
 エントロピー符号化部109は、モード判定部157から受け取った予測モード情報や動きベクトルvの情報と、入力画像と予測画像との差異である差分画像から生成される残差信号とを含む符号化データを生成する(S715)。このとき、重み係数wが隣接画素apに基づいて生成される場合には、当該重み係数wを求める際に参照すべき隣接画素apを決めるための参照隣接画素情報を符号化データに含めても良い。 The entropy encoding unit 109 includes encoded data including prediction mode information and motion vector v information received from the mode determination unit 157 and a residual signal generated from a difference image that is a difference between the input image and the prediction image. Is generated (S715). At this time, when the weight coefficient w is generated based on the adjacent pixel ap, reference adjacent pixel information for determining the adjacent pixel ap to be referred to when the weight coefficient w is obtained may be included in the encoded data. good.
(3.2 動き予測により予測画像を生成する場合の復号化処理)
 次に、図8を参照しながら、復号化時における、動き予測を用いて予測画像を生成する場合の、復号化に係る処理の流れを説明する。図8は、動き予測を用いて予測画像を生成する場合の、復号化に係る処理の流れを示すフローチャートである。
(3.2 Decoding process when generating predicted image by motion prediction)
Next, a flow of processing related to decoding in the case where a prediction image is generated using motion prediction at the time of decoding will be described with reference to FIG. FIG. 8 is a flowchart illustrating a flow of processing related to decoding when a predicted image is generated using motion prediction.
 蓄積バッファ201は、入力部I2から入力される符号化データを蓄積し、逐次、エントロピー復号化部203は当該符号化データを復号化する(S801)。当該符号化データには、例えば、予測ユニットPUに係る予測モード情報や動きベクトルvの情報等を含むことが可能である。 The accumulation buffer 201 accumulates the encoded data input from the input unit I2, and the entropy decoding unit 203 sequentially decodes the encoded data (S801). The encoded data can include, for example, prediction mode information related to the prediction unit PU, information on the motion vector v, and the like.
 符号化データに基づき生成される画像は、適宜、フレームメモリ215に参照画像として格納される(S803)。この際、各々の参照画像は、フレームメモリ215中でリスト0及びリスト1の2つの参照画像群に分けて格納される。 The image generated based on the encoded data is appropriately stored as a reference image in the frame memory 215 (S803). At this time, each reference image is stored in the frame memory 215 by being divided into two reference image groups of list 0 and list 1.
 また、動き予測部219の予測モード・動きベクトルバッファ253は、エントロピー復号化部203より、予測ユニットPUの分割モードや予測方向等に関する予測モード情報、及び動きベクトルvをエントロピー復号化部203から受けとり、記憶する(S805)。処理対象である予測ユニットPUの予測方向が単一方向予測であれば(S807のNo)、予測画像生成部251は、動きベクトルvに基づき予測画像を生成する(S811)。 Also, the prediction mode / motion vector buffer 253 of the motion prediction unit 219 receives, from the entropy decoding unit 203, the prediction mode information regarding the division mode and the prediction direction of the prediction unit PU and the motion vector v from the entropy decoding unit 203. And memorize (S805). If the prediction direction of the prediction unit PU to be processed is unidirectional prediction (No in S807), the predicted image generation unit 251 generates a predicted image based on the motion vector v (S811).
 一方、処理対象である予測ユニットPUの予測方向が双方向予測であれば(S807のYes)、双方向予測重み係数計算部221は、適用する重み係数wを決定する。当該重み係数wは、例えば、エントロピー復号化部203から、例えばインデックス情報として受け取ることが可能である。或いは、上記手法2で説明したように、予測ユニットPUの隣接画素apから重み係数wを算出することも可能である。後者の場合には、参照画像P0及びP1中の、動きベクトルv0及びv1で指定されるブロックB0及びB1に隣接する隣接画素ap0及びap1を用いて上記式(2)により算出される値と予測ユニットPUの隣接画素apの値との差異が小さくなるように、双方向予測重み係数計算部221は重み係数wを算出する。この際、参照すべき隣接画素apを、上隣接画素uapとするか、左隣接画素lapとするか、上隣接画素uap、左隣接画素lap、及び左上隣接画素ulapとするかを、符号化データに含まれる参照隣接画素情報に基づいて定めても良い。生成された重み係数wは、予測モード・動きベクトルバッファ253に格納される。 On the other hand, if the prediction direction of the prediction unit PU to be processed is bidirectional prediction (Yes in S807), the bidirectional prediction weight coefficient calculation unit 221 determines the weight coefficient w to be applied. The weight coefficient w can be received, for example, as index information from the entropy decoding unit 203, for example. Alternatively, as described in Method 2 above, it is also possible to calculate the weighting coefficient w from the adjacent pixel ap of the prediction unit PU. In the latter case, the above equation (2) is used by using adjacent pixels ap 0 and ap 1 adjacent to the blocks B 0 and B 1 specified by the motion vectors v 0 and v 1 in the reference images P 0 and P 1. The bidirectional prediction weight coefficient calculation unit 221 calculates the weight coefficient w so that the difference between the value calculated by (1) and the value of the adjacent pixel ap of the prediction unit PU becomes small. At this time, whether the adjacent pixel ap to be referred to is the upper adjacent pixel uap, the left adjacent pixel lap, the upper adjacent pixel uap, the left adjacent pixel lap, and the upper left adjacent pixel ulap is encoded data. It may be determined based on the reference adjacent pixel information included in. The generated weight coefficient w is stored in the prediction mode / motion vector buffer 253.
 双方向予測の場合には、予測画像生成部251は、動きベクトルv0及びv1、並びに重み係数wを用いて、双方向予測により予測画像を生成する(S807)。 In the case of bidirectional prediction, the predicted image generation unit 251 generates a predicted image by bidirectional prediction using the motion vectors v 0 and v 1 and the weighting factor w (S807).
(4 符号化データの構成例)
 以下、図9を参照しながら、符号化装置100が生成すると共に復号化装置200が復号化可能な符号化データ900の構成(シンタックス)の具体例を説明する。図9は、符号化データ900の構成の具体例を示す図である。
(4 Configuration example of encoded data)
Hereinafter, a specific example of the configuration (syntax) of encoded data 900 that is generated by the encoding device 100 and can be decoded by the decoding device 200 will be described with reference to FIG. FIG. 9 is a diagram illustrating a specific example of the configuration of the encoded data 900.
 先述の通り、符号化装置100及び復号化装置200は、画像CPをスライスS及び/又はタイルTに分割して処理することができる。図9の例では、タイルTについては考慮していない。 As described above, the encoding device 100 and the decoding device 200 can process the image CP by dividing the image CP into slices S and / or tiles T. In the example of FIG. 9, the tile T is not considered.
 符号化データ900において、スライスSはスライスデータ910として符号化されている。スライスデータ910には、スライスヘッダ情報911と、1以上の符号化ツリーユニット(CTU)920とが含まれる。また、各々のCTU920には、CTUヘッダ情報921と、1以上の符号化ユニット(CU)930とが含まれる。CU930には、CUヘッダ情報931と、予測ユニット(PU)940と、変換ユニット(TU)950とが含まれる。ここでTU950には、符号化対象の画像と予測画像との差異に係る残差信号にかかるデータ(適宜、量子化及び直交変換がなされる)が含まれる。 In the encoded data 900, the slice S is encoded as slice data 910. The slice data 910 includes slice header information 911 and one or more coding tree units (CTU) 920. Each CTU 920 includes CTU header information 921 and one or more coding units (CU) 930. The CU 930 includes CU header information 931, a prediction unit (PU) 940, and a conversion unit (TU) 950. Here, the TU 950 includes data related to the residual signal related to the difference between the image to be encoded and the predicted image (quantized and orthogonally transformed as appropriate).
 PU940には予測処理にかかる各種データが含まれる。例えば、PU940には、予測モード情報941、画像参照情報943、動きベクトル情報945、重み係数情報947、参照隣接画素情報949を含みうる。なお、PU940がこれらの情報を全て含む必要はない。予測方法が動き予測であるかイントラ予測であるか、単一方向予測であるか双方向予測であるか、重み係数wをどのようにして定めるか、等に応じて、適宜、PU940に含まれる情報を変えることができる。 The PU940 includes various data related to the prediction process. For example, the PU 940 may include prediction mode information 941, image reference information 943, motion vector information 945, weight coefficient information 947, and reference adjacent pixel information 949. Note that it is not necessary for the PU 940 to include all of this information. Depending on whether the prediction method is motion prediction or intra prediction, unidirectional prediction or bidirectional prediction, how to determine the weighting factor w, etc., it is included in the PU 940 as appropriate. Information can be changed.
 予測モード情報941は、PU940に対して適用される予測方法を定めるための情報である。例えば、イントラ予測であるか動き予測であるかの情報や、PU940を2N×2Nや2N×N、N×2N等、どのように分割して予測処理を行うかの分割モードに係る情報等を、予測モード情報941に含むことができる。 The prediction mode information 941 is information for determining a prediction method applied to the PU 940. For example, information on whether it is intra prediction or motion prediction, information on the division mode on how to divide the PU 940, such as 2N × 2N, 2N × N, N × 2N, etc. Can be included in the prediction mode information 941.
 画像参照情報943は、動き予測を行う場合において、PU940が参照する参照画像を特定するための情報である。特に、リスト0とリスト1に分けて参照画像群が管理される場合には、画像参照情報943は、リスト0及びリスト1の各々の参照画像群内でのインデックス情報とすることが可能である。 The image reference information 943 is information for specifying a reference image referred to by the PU 940 when performing motion prediction. In particular, when reference image groups are managed separately in list 0 and list 1, the image reference information 943 can be index information in each of the reference image groups in list 0 and list 1. .
 動きベクトル情報945は、動き予測を行う場合において、PU940に適用される動きベクトルvを特定するための情報である。動きベクトル情報945には、動きベクトルvの予測のために必要な各種情報を含むことができる。 The motion vector information 945 is information for specifying the motion vector v applied to the PU 940 when performing motion prediction. The motion vector information 945 can include various types of information necessary for predicting the motion vector v.
 重み係数情報947は、双方向予測を行う場合において、重み係数wを算出するための情報である。例えば、重み係数wの値、又は重み係数wの値を示すインデックスを、重み係数情報947に格納することが可能である。なお、上記手法2で説明したように、重み係数wを隣接画素apから求める場合には、重み係数情報947をPU940内に含める必要はない。 The weighting factor information 947 is information for calculating the weighting factor w when bi-directional prediction is performed. For example, the value of the weighting factor w or an index indicating the value of the weighting factor w can be stored in the weighting factor information 947. As described in the above method 2, when the weighting factor w is obtained from the adjacent pixel ap, the weighting factor information 947 does not need to be included in the PU 940.
 また、重み係数情報947には、輝度信号及び色差信号のいずれに、どのような重み係数wを適用するかの情報を含むことができる。例えば、輝度信号に係る重み係数を1/2とするか否か、色差信号に対する重み係数を1/2とするか否か、輝度信号と重み信号に対する重み係数をそれぞれ独立とするか否か、等を示すためのフラグ情報を、重み係数情報947に含むことができる。なお、当該フラグ情報は、必ずしもPU940内の重み係数情報947に含まれるものではない。例えば、スライスヘッダ情報911に、重み係数wの適用に関するフラグ情報を含ませることも考えられる。 Also, the weighting factor information 947 can include information on what weighting factor w is applied to either the luminance signal or the color difference signal. For example, whether the weighting factor for the luminance signal is halved, whether the weighting factor for the color difference signal is halved, whether the weighting factor for the luminance signal and the weighting signal is independent, Or the like, flag information 947 may be included in the weight coefficient information 947. The flag information is not necessarily included in the weight coefficient information 947 in the PU 940. For example, it may be possible to include flag information related to application of the weighting factor w in the slice header information 911.
 参照隣接画素情報949は、双方向予測を行う場合であって、重み係数wを隣接画素apから算出する場合に、参照すべき隣接画素apの情報を示すためのものである。例えば、重み係数wを求める際に、上隣接画素uapのみを参照すべきか、左隣接画素lapのみを参照すべきか、上隣接画素uapの、左隣接画素lap、左上隣接画素ulapの全てを参照すべきか、若しくはいずれも参照すべきでない(又は参照できない)かを示すフラグを、参照隣接画素情報949に含めることができる。 The reference adjacent pixel information 949 is information for indicating information of the adjacent pixel ap to be referred to when bi-directional prediction is performed and the weighting coefficient w is calculated from the adjacent pixel ap. For example, when calculating the weighting factor w, only the upper adjacent pixel uap should be referred to, only the left adjacent pixel lap should be referred to, or all of the upper left adjacent pixel lap and the upper left adjacent pixel ulap should be referred to Or a flag indicating whether neither should be referenced (or cannot be referred to) can be included in the reference neighboring pixel information 949.
(5 ハードウェア構成の具体例)
 以下、図10を参照しながら、図3に示した符号化装置100や図5に示した復号化装置200を実現可能な画像処理装置1000のハードウェア構成の具体例を説明する。
(5 Specific examples of hardware configuration)
A specific example of the hardware configuration of the image processing apparatus 1000 capable of realizing the encoding apparatus 100 shown in FIG. 3 and the decoding apparatus 200 shown in FIG. 5 will be described below with reference to FIG.
 なお、画像処理装置1000は、DVD(Digital Versatile Disc)やBlu-ray(登録商標)、HDD(Hard Disk Drive)、フラッシュメモリ等の各種記憶媒体に記憶された符号化済みの映像データ(ビットストリーム)や、インターネット等のネットワークから受信した符号化済みの映像データを再生する専用のプレーヤとして実現することが考えられる。また画像処理装置1000は、入力された映像やカメラ等で撮影した映像を映像データとして符号化して各種記憶媒体に記憶するカムコーダやレコーダとして実現することも可能である。或いは、画像処理装置1000は、符号化した映像データをネットワーク上の他の装置に出力する映像配信装置としても良い。更には、映像データの再生や記憶、配信等の機能を持つ、パーソナルコンピュータや携帯電話(フィーチャーフォンであるか、いわゆるスマートフォンであるかは問わない)として画像処理装置1000を実現することも可能である。 The image processing apparatus 1000 includes encoded video data (bitstream) stored in various storage media such as a DVD (Digital Versatile Disc), Blu-ray (registered trademark), HDD (Hard Disk Drive), and flash memory. Or a dedicated player for reproducing encoded video data received from a network such as the Internet. The image processing apparatus 1000 can also be realized as a camcorder or a recorder that encodes an input video or a video shot by a camera or the like as video data and stores it in various storage media. Alternatively, the image processing apparatus 1000 may be a video distribution apparatus that outputs encoded video data to other apparatuses on the network. Furthermore, the image processing apparatus 1000 can be realized as a personal computer or a mobile phone (whether it is a feature phone or a so-called smartphone) having functions such as reproduction, storage, and distribution of video data. is there.
 図10に示す通り、画像処理装置1000は、制御部1001と、通信インタフェース(I/F)部1005と、データI/F部1007と、記憶部1009と、表示部1015と、入力部1017とを含み、各部はバスライン1019を介して接続される。 As illustrated in FIG. 10, the image processing apparatus 1000 includes a control unit 1001, a communication interface (I / F) unit 1005, a data I / F unit 1007, a storage unit 1009, a display unit 1015, and an input unit 1017. Each part is connected via a bus line 1019.
 ここで、図10の例では、画像処理装置1000は、符号化機能及び復号化機能の両者を持っているがこれに限られるものではなく、画像処理装置1000は、符号化機能及び復号化機能の一方のみを備えていても良い。 Here, in the example of FIG. 10, the image processing apparatus 1000 has both an encoding function and a decoding function. However, the present invention is not limited to this. The image processing apparatus 1000 includes an encoding function and a decoding function. Only one of them may be provided.
 また、図10の例では、画像処理装置1000は、符号化機能(図3に示した符号化装置100の機能)及び復号化機能(図5に示した復号化装置200の各機能)を、各々プログラムである符号化プログラム1011及び復号化プログラム1013により実現しているが、必ずしもプログラムとしてこれらの機能を実現する必要はない。例えば、制御部1001内に含まれる1以上のプロセッサ1003を、符号化及び/又は復号化のために用いられる画像処理専用のプロセッサとした上で、符号化プログラム1011及び/又は復号化プログラム1013を不要とすることも考えられる。或いは、図3及び図5に示した符号化装置100及び復号化装置200の一部を符号化プログラム1011/復号化プログラム1013により、その他の機能を画像処理用のプロセッサ1003により実現することも可能である。 In the example of FIG. 10, the image processing apparatus 1000 includes an encoding function (function of the encoding apparatus 100 illustrated in FIG. 3) and a decoding function (each function of the decoding apparatus 200 illustrated in FIG. 5). The functions are realized by the encoding program 1011 and the decoding program 1013, which are programs, but it is not always necessary to realize these functions as programs. For example, after making one or more processors 1003 included in the control unit 1001 a processor dedicated to image processing used for encoding and / or decoding, the encoding program 1011 and / or the decoding program 1013 are changed. It may be unnecessary. Alternatively, a part of the encoding device 100 and the decoding device 200 shown in FIGS. 3 and 5 can be realized by the encoding program 1011 / decoding program 1013 and other functions can be realized by the processor 1003 for image processing. It is.
 制御部1001は、1以上のプロセッサ1003、ROM(Read Only Memory。図示せず)、RAM(Random Access Memory。図示せず)等を含む。制御部1001は、記憶部1009に記憶される符号化プログラム1011及び/又は復号化プログラム1013を実行することにより、一般的な各種制御機能に加え、画像処理に係る符号化/復号化に係る画像処理を実行可能に構成される。例えば、図3に示した符号化装置100の各機能の少なくとも一部や、図5に示した復号化装置200の各機能の少なくとも一部は、各々符号化プログラム1011や復号化プログラム1013として実現可能である。 The control unit 1001 includes one or more processors 1003, a ROM (Read Only Memory, not shown), a RAM (Random Access Memory, not shown), and the like. The control unit 1001 executes an encoding program 1011 and / or a decoding program 1013 stored in the storage unit 1009, thereby performing an image related to encoding / decoding related to image processing in addition to various general control functions. The process is configured to be executable. For example, at least a part of each function of the encoding device 100 shown in FIG. 3 and at least a part of each function of the decoding device 200 shown in FIG. 5 are realized as the encoding program 1011 and the decoding program 1013, respectively. Is possible.
 1以上のプロセッサ1003は、CPU(Central Processing Unit)や、画像の符号化/符号化に係る処理を実行するための画像処理用のプロセッサ等を含みうる。CPUは、符号化プログラム1011や復号化プログラム1013を実行する。また、プロセッサ1003に画像処理用のプロセッサが含まれる場合には、当該画像処理用のプロセッサは、図3に示した符号化装置100が有する各機能の一部又は全部や、図5に示した復号化装置200が有する各機能の一部又は全部を含むことができる。この場合には、それらの機能は、符号化プログラム1011や復号化プログラム1013に含む必要はない。 The one or more processors 1003 may include a CPU (Central Processing Unit), an image processing processor for executing processing related to image encoding / encoding, and the like. The CPU executes an encoding program 1011 and a decoding program 1013. If the processor 1003 includes an image processing processor, the image processing processor may include a part or all of the functions of the encoding device 100 illustrated in FIG. Some or all of the functions of the decryption apparatus 200 can be included. In this case, these functions do not need to be included in the encoding program 1011 or the decoding program 1013.
 通信I/F部1005は、外部の装置との間で、有線又は無線により画像データの入出力を行うためのインタフェースである。画像処理装置1000は、例えば通信I/F部1005から入力された映像データを復号したり、映像を符号化した映像データを通信I/F部1005から外部の装置へ出力したりすることができる。なお、通信I/F部1005が行う通信方式は、例えば、LAN、USB(Universal Serial Bus)、携帯電話通信、Bluetooth(登録商標)通信等、様々な方式を考えることができる。 The communication I / F unit 1005 is an interface for inputting / outputting image data to / from an external device by wire or wirelessly. For example, the image processing apparatus 1000 can decode video data input from the communication I / F unit 1005 and output video data obtained by encoding video from the communication I / F unit 1005 to an external device. . Note that various communication methods such as LAN, USB (Universal Serial Bus), mobile phone communication, Bluetooth (registered trademark) communication, and the like can be considered as the communication method performed by the communication I / F unit 1005.
 データI/F部1007は、DVDやBlu-ray(登録商標)等の光ディスク、フラッシュメモリ、HDD等の各種外部記憶装置との間でデータの入出力を行うためのデバイスである。データI/F部1007の具体例としては、各種記憶デバイスに記憶されているデータを読み取るためのドライブ装置等を考えることができる。 The data I / F unit 1007 is a device for inputting / outputting data to / from various external storage devices such as an optical disc such as a DVD and Blu-ray (registered trademark), a flash memory, and an HDD. As a specific example of the data I / F unit 1007, a drive device for reading data stored in various storage devices can be considered.
 記憶部1009は、例えばHDDやフラッシュメモリ等の、内蔵の不揮発性の記憶媒体である。記憶部1009は、一般的な情報処理装置としての機能を実現するための制御プログラム等に加えて、符号化及び/又は復号化機能を実現するための符号化プログラム1011や復号化プログラム1013を記憶し得る。 The storage unit 1009 is a built-in nonvolatile storage medium such as an HDD or a flash memory. The storage unit 1009 stores an encoding program 1011 and a decoding program 1013 for realizing an encoding and / or decoding function, in addition to a control program for realizing a function as a general information processing apparatus. Can do.
 表示部1015は、例えば復号済みの映像や、符号化対象の映像を表示するためのディスプレイ装置である。表示部1015の具体例としては、例えば液晶ディスプレイや有機EL(Electro-Luminescence)ディスプレイ等が挙げられる。入力部1017は、必要に応じて操作入力を受け付けるためのデバイスである。入力部1017の具体例としては、キーボードやマウス、タッチパネル、各種操作ボタン等を挙げることができる。 The display unit 1015 is a display device for displaying, for example, decoded video or video to be encoded. Specific examples of the display unit 1015 include a liquid crystal display and an organic EL (Electro-Luminescence) display. The input unit 1017 is a device for accepting operation inputs as necessary. Specific examples of the input unit 1017 include a keyboard, a mouse, a touch panel, and various operation buttons.
 なお、画像処理装置1000は、表示部1015及び入力部1017を必ずしも備える必要はない。また表示部1015及び入力部1017は、USBやディスプレイポート等の各種インタフェースを介して外部から画像処理装置1000へ接続されても良い。 Note that the image processing apparatus 1000 does not necessarily include the display unit 1015 and the input unit 1017. The display unit 1015 and the input unit 1017 may be connected to the image processing apparatus 1000 from the outside via various interfaces such as a USB and a display port.
(6 本実施形態に係る効果)
 以上説明したように、符号化装置100及び復号化装置200は、1/2以外の重み係数wを用いて、双方向予測を行うことが可能である。この際、符号化装置100が動きベクトルv0及びv1、並びに重み係数wの最適な組み合わせを求めようとすると演算量が飛躍的に増大するため、一つの形態に係る符号化装置100は、まずは輝度信号に対して重み係数を1/2として動きベクトルv0及びv1を求めた上で、色差信号に対して好適な重み係数wを求める。これにより、動きベクトルv0及びv1、並びに重み係数wの全ての組み合わせの中から最適なものを求める場合よりも、演算量を飛躍的に低減させることができる。
(6 Effects of this embodiment)
As described above, the encoding device 100 and the decoding device 200 can perform bi-directional prediction using a weighting factor w other than ½. At this time, when the encoding device 100 tries to obtain an optimal combination of the motion vectors v 0 and v 1 and the weighting coefficient w, the amount of calculation increases dramatically. Therefore, the encoding device 100 according to one embodiment First, the motion vectors v 0 and v 1 are obtained by setting the weighting factor to ½ for the luminance signal, and then a suitable weighting factor w is obtained for the color difference signal. As a result, the amount of calculation can be drastically reduced as compared with the case of obtaining the optimum one from all combinations of the motion vectors v 0 and v 1 and the weight coefficient w.
 また、一つの形態に係る符号化装置100及び復号化装置200は、予測対象の予測ユニットPUの隣接画素apに基づいて重み係数wを算出し得る。これにより、重み係数wの値やインデックスをビットストリームに含めずとも、符号化装置100及び復号化装置200で同一の重み係数wを算出することが可能となる。すなわち、重み係数wの伝送に係る符号化量の増大を抑制することができる。 Also, the encoding device 100 and the decoding device 200 according to one embodiment can calculate the weighting factor w based on the adjacent pixel ap of the prediction unit PU to be predicted. As a result, the same weighting factor w can be calculated by the encoding device 100 and the decoding device 200 without including the value and index of the weighting factor w in the bitstream. That is, it is possible to suppress an increase in the amount of coding related to transmission of the weight coefficient w.
 更に、一つの形態に係る符号化装置100及び復号化装置200は、輝度信号と、色差信号とで、異なる重み係数wを適用し得る。これにより、重み係数wを用いて生成される予測画像の予測精度を向上させることができる。 Furthermore, the encoding device 100 and the decoding device 200 according to one embodiment can apply different weighting factors w for the luminance signal and the color difference signal. Thereby, the prediction precision of the prediction image produced | generated using the weighting coefficient w can be improved.
(7 付記)
 なお、上述の実施形態の構成は、組み合わせたり或いは一部の構成部分を入れ替えたりしてもよい。また、本発明の構成は上述の実施形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加えてもよい。特に、上記(1)~(4)式はあくまでも一例であり、他の数式を適用することも考えられる。
(7 notes)
Note that the configurations of the above-described embodiments may be combined or some components may be replaced. The configuration of the present invention is not limited to the above-described embodiment, and various modifications may be made without departing from the scope of the present invention. In particular, the above formulas (1) to (4) are merely examples, and other formulas may be applied.
100  :符号化装置
101  :アナログ/デジタル(A/D)変換部
103  :並替えバッファ
103a :画像分割部
105  :直交変換部
107  :量子化部
109  :エントロピー符号化部
111  :蓄積バッファ
113  :レート制御部
115  :逆量子化部
117  :逆直交変換部
119  :ループフィルタ
121  :フレームメモリ
123  :イントラ予測部
125  :動き予測部
127  :双方向予測重み係数計算部
151  :動きベクトル探索部
153  :予測方向決定部
155  :双方向予測部
157  :モード判定部
159  :予測画像生成部
200  :復号化装置
201  :蓄積バッファ
203  :エントロピー復号化部
205  :逆量子化部
207  :逆直交変換部
209  :ループフィルタ
211  :並替えバッファ
213  :デジタル/アナログ(D/A)変換部
215  :フレームメモリ
217  :イントラ予測部
219  :動き予測部
221  :双方向予測重み係数計算部
251  :予測画像生成部
253  :予測モード・動きベクトルバッファ
DESCRIPTION OF SYMBOLS 100: Coding apparatus 101: Analog / digital (A / D) conversion part 103: Rearrangement buffer 103a: Image division part 105: Orthogonal transformation part 107: Quantization part 109: Entropy encoding part 111: Accumulation buffer 113: Rate Control unit 115: Inverse quantization unit 117: Inverse orthogonal transform unit 119: Loop filter 121: Frame memory 123: Intra prediction unit 125: Motion prediction unit 127: Bidirectional prediction weight coefficient calculation unit 151: Motion vector search unit 153: Prediction Direction determination unit 155: Bidirectional prediction unit 157: Mode determination unit 159: Prediction image generation unit 200: Decoding device 201: Accumulation buffer 203: Entropy decoding unit 205: Inverse quantization unit 207: Inverse orthogonal transform unit 209: Loop Filter 211: Rearrangement buffer 213: Digi Le / analog (D / A) conversion unit 215: frame memory 217: intra-prediction unit 219 motion prediction unit 221: bidirectional prediction weight coefficient calculator 251: prediction image generating unit 253: prediction mode and motion vector buffer

Claims (20)

  1.  輝度信号と2つの色差信号とを有する入力動画像を、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化する符号化装置であって、
     第1参照画像及び第2参照画像を含む複数の参照画像を記憶するフレームメモリと、
     前記入力動画像中の符号化対象画像のうちの符号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルと、前記符号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルとを求める手段と、
     前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより参照される前記第2領域に適用される前記第2重み係数を定める重み係数決定手段と、
     前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記符号化対象領域に対する予測画素値を算出する手段と、
     前記符号化対象領域内の画素の画素値と前記予測画素値との差異に係る残差情報を符号化することにより符号化データを生成する符号化手段と
    を備え、
     前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る、
    符号化装置。
    An encoding device that predictively encodes an input moving image having a luminance signal and two color difference signals by bi-directional prediction using a first weighting factor and a second weighting factor,
    A frame memory for storing a plurality of reference images including a first reference image and a second reference image;
    The first motion vector that determines the position of the first region in the first reference image that is referred to by the encoding target region of the encoding target image in the input moving image, and the first reference that is referred to by the encoding target region. Means for determining a second motion vector defining a position of the second region in the two reference images;
    A weighting factor that determines the first weighting factor applied to the first region referenced by the first motion vector and the second weighting factor applied to the second region referenced by the second motion vector. A determination means;
    The pixel value of the pixel in the first region is multiplied by the first weighting factor, and the pixel value of the pixel in the second region is multiplied by the second weighting factor, thereby predicting the encoding target region. Means for calculating a pixel value;
    Encoding means for generating encoded data by encoding residual information relating to a difference between a pixel value of a pixel in the encoding target region and the predicted pixel value;
    The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal may take different values. ,
    Encoding device.
  2.  前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数は1/2であり、
     前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数は1/2以外の値を取り得る、
    請求項1記載の符号化装置。
    The first weighting factor and the second weighting factor applied to the luminance signal are ½,
    The first weighting factor and the second weighting factor applied to the color difference signal can take values other than ½,
    The encoding device according to claim 1.
  3.  前記符号化データは、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数の情報を含むと共に、前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数の情報を含まない、
    請求項2記載の符号化装置。
    The encoded data includes information on the first weight coefficient and the second weight coefficient applied to the color difference signal, and the first weight coefficient and the second weight applied to the luminance signal. Does not include information on weighting factors,
    The encoding device according to claim 2.
  4.  前記符号化データは、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数が1/2であるか否かを示すフラグを含む、
    請求項2又は請求項3記載の符号化装置。
    The encoded data includes a flag indicating whether or not the first weight coefficient and the second weight coefficient applied to the color difference signal are 1/2.
    The encoding device according to claim 2 or 3.
  5.  前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数は、2つの前記色差信号に対してそれぞれ異なる値を取り得る、
    請求項1乃至請求項4のいずれか1項記載の符号化装置。
    The first weighting factor and the second weighting factor applied to the color difference signal may take different values for the two color difference signals, respectively.
    The encoding device according to any one of claims 1 to 4.
  6.  前記第1重み係数及び前記第2重み係数の合計値は1である、
    請求項1乃至請求項5のいずれか1項記載の符号化装置。
    The total value of the first weighting factor and the second weighting factor is 1.
    The encoding device according to any one of claims 1 to 5.
  7.  前記重み係数決定手段は、前記符号化対象領域の上側の隣接画素及び左側の隣接画素の少なくとも一方の画素値を用いて、前記第1重み係数及び前記第2重み係数を求める、
    請求項1乃至請求項6のいずれか1項記載の符号化装置。
    The weighting factor determination means obtains the first weighting factor and the second weighting factor by using at least one pixel value of an upper adjacent pixel and a left adjacent pixel of the encoding target region.
    The encoding device according to any one of claims 1 to 6.
  8.  前記符号化データは、前記符号化対象領域に係る前記第1重み係数及び前記第2重み係数を求めるに際に参照すべき隣接画素の情報を含む、
    請求項7記載の符号化装置。
    The encoded data includes information of adjacent pixels to be referred to when obtaining the first weighting coefficient and the second weighting coefficient related to the encoding target area.
    The encoding device according to claim 7.
  9.  前記入力動画像中の前記符号化対象画像を、1以上の前記符号化対象領域が含まれるスライス及び/又はタイルに分割する手段
    を更に備え、
     前記重み係数決定手段は、
     前記符号化対象領域が属する前記スライス及び/又はタイル内に、当該符号化対象領域が上側で隣接する画素が存在せず、左側で隣接する画素が存在する場合に、当該左側で隣接する画素の画素値を用いて、前記第1重み係数及び前記第2重み係数を求め、
     前記符号化対象領域が属する前記スライス及び/又はタイル内に、当該符号化対象領域が上側で隣接する画素が存在し、左側で隣接する画素が存在しない場合に、当該上側で隣接する画素の画素値を用いて、前記第1重み係数及び前記第2重み係数を求める、
    請求項7又は請求項8記載の符号化装置。
    Means for dividing the encoding target image in the input moving image into slices and / or tiles including one or more encoding target regions;
    The weight coefficient determining means includes
    In the slice and / or tile to which the encoding target region belongs, when there is no adjacent pixel on the upper side of the encoding target region and adjacent pixels on the left side, Using the pixel value, obtain the first weighting factor and the second weighting factor,
    In the slice and / or tile to which the encoding target area belongs, if there is a pixel adjacent on the upper side of the encoding target area and no adjacent pixel on the left side, the pixel of the adjacent pixel on the upper side Using the value to determine the first weighting factor and the second weighting factor;
    The encoding device according to claim 7 or 8.
  10.  輝度信号と2つの色差信号とを有する入力動画像が、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化された符号化データを復号する復号化装置であって、
     前記入力動画像中の復号化対象画像のうちの復号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルの情報と、前記復号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルの情報と、前記復号化対象領域内の画素の画素値と予測画素値との差異に基づく残差情報とを含む前記符号化データの入力を受ける手段と、
     第1参照画像及び第2参照画像を含む複数の参照画像を記憶するフレームメモリと、
     前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより算出される前記第2領域に適用される前記第2重み係数を定める重み係数決定手段と、
     前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記復号化対象領域に対する前記予測画素値を算出する手段と
    を備え、
     前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る、
    復号化装置。
    A decoding device for decoding encoded data in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor,
    The information of the first motion vector that determines the position of the first region in the first reference image that is referred to by the decoding target region in the decoding target image in the input moving image, and the decoding target region is referred to. The code including information of a second motion vector that determines the position of the second region in the second reference image and residual information based on a difference between a pixel value of a pixel in the decoding target region and a predicted pixel value A means for receiving input of digitized data;
    A frame memory for storing a plurality of reference images including a first reference image and a second reference image;
    A weighting factor that determines the first weighting factor applied to the first region referenced by the first motion vector and the second weighting factor applied to the second region calculated by the second motion vector. A determination means;
    The pixel value of the pixel in the first region is multiplied by the first weighting factor, and the pixel value of the pixel in the second region is multiplied by the second weighting factor, thereby obtaining the decoding target region with respect to the decoding target region. Means for calculating a predicted pixel value,
    The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal may take different values. ,
    Decryption device.
  11.  前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数は1/2であり、
     前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数は1/2以外の値を取り得る、
    請求項10記載の復号化装置。
    The first weighting factor and the second weighting factor applied to the luminance signal are ½,
    The first weighting factor and the second weighting factor applied to the color difference signal can take values other than ½,
    The decoding device according to claim 10.
  12.  前記符号化データは、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数の情報を含むと共に、前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数の情報を含まない、
    請求項11記載の復号化装置。
    The encoded data includes information on the first weight coefficient and the second weight coefficient applied to the color difference signal, and the first weight coefficient and the second weight applied to the luminance signal. Does not include information on weighting factors,
    The decoding device according to claim 11.
  13.  前記符号化データは、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数が1/2であるか否かを示すフラグを含む、
    請求項11又は請求項12記載の復号化装置。
    The encoded data includes a flag indicating whether or not the first weight coefficient and the second weight coefficient applied to the color difference signal are 1/2.
    The decoding device according to claim 11 or 12.
  14.  前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数は、2つの前記色差信号に対してそれぞれ異なる値を取り得る、
    請求項10乃至請求項13のいずれか1項記載の復号化装置。
    The first weighting factor and the second weighting factor applied to the color difference signal may take different values for the two color difference signals, respectively.
    The decoding device according to any one of claims 10 to 13.
  15.  前記第1重み係数及び前記第2重み係数の合計値は1である、
    請求項10乃至請求項14のいずれか1項記載の復号化装置。
    The total value of the first weighting factor and the second weighting factor is 1.
    The decoding device according to any one of claims 10 to 14.
  16.  前記重み係数決定手段は、前記復号化対象領域の上側で隣接する画素及び左側で隣接する画素の少なくとも一方の画素値を用いて、前記第1重み係数及び前記第2重み係数を求める、
    請求項10乃至請求項15のいずれか1項記載の復号化装置。
    The weighting factor determination means obtains the first weighting factor and the second weighting factor by using at least one pixel value of a pixel adjacent on the upper side and a pixel adjacent on the left side of the decoding target region.
    The decoding device according to any one of claims 10 to 15.
  17.  前記符号化データは、前記復号化対象領域に係る前記第1重み係数及び前記第2重み係数を求めるに際に参照すべき隣接画素の情報を含む、
    請求項16記載の復号化装置。
    The encoded data includes information on adjacent pixels to be referred to when obtaining the first weighting coefficient and the second weighting coefficient related to the decoding target area,
    The decoding device according to claim 16.
  18.  前記符号化データは、前記復号化対象画像が分割された、1以上の前記復号化対象領域が含まれるスライス及び/又はタイル毎に復号され、
     前記重み係数決定手段は、
     前記復号化対象領域が属する前記スライス及び/又はタイル内に、当該復号化対象領域が上側で隣接する画素が存在せず、左側で隣接する画素が存在する場合に、当該左側で隣接する画素の画素値を用いて、前記第1重み係数及び前記第2重み係数を求め、
     前記復号化対象領域が属する前記スライス及び/又はタイル内に、当該復号化対象領域が上側で隣接する画素が存在し、左側で隣接する画素が存在しない場合に、当該上側で隣接する画素の画素値を用いて、前記第1重み係数及び前記第2重み係数を求める、
    請求項16又は請求項17記載の復号化装置。
    The encoded data is decoded for each slice and / or tile including one or more decoding target areas into which the decoding target image is divided,
    The weight coefficient determining means includes
    In the slice and / or tile to which the decoding target area belongs, when there is no adjacent pixel on the upper side of the decoding target area and adjacent pixels on the left side, Using the pixel value, obtain the first weighting factor and the second weighting factor,
    In the slice and / or tile to which the decoding target area belongs, if there is a pixel adjacent to the decoding target area on the upper side and there is no adjacent pixel on the left side, the pixel of the adjacent pixel on the upper side Using the value to determine the first weighting factor and the second weighting factor;
    The decoding device according to claim 16 or 17.
  19.  輝度信号と2つの色差信号とを有する入力動画像を、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化する符号化方法であって、
     第1参照画像及び第2参照画像を含む複数の参照画像を記憶するステップと、
     前記入力動画像中の符号化対象画像のうちの符号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルと、前記符号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルとを求めるステップと、
     前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより参照される前記第2領域に適用される前記第2重み係数を定めるステップと、
     前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記符号化対象領域に対する予測画素値を算出するステップと、
     前記符号化対象領域内の画素の画素値と前記予測画素値との差異に係る残差情報を符号化することにより符号化データを生成するステップと
    を符号化装置が行い、
     前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る、
    符号化方法。
    An encoding method for predictively encoding an input moving image having a luminance signal and two color difference signals by bidirectional prediction using a first weighting factor and a second weighting factor,
    Storing a plurality of reference images including a first reference image and a second reference image;
    The first motion vector that determines the position of the first region in the first reference image that is referred to by the encoding target region of the encoding target image in the input moving image, and the first reference that is referred to by the encoding target region. Obtaining a second motion vector defining a position of a second region in the two reference images;
    Determining the first weighting factor applied to the first region referenced by the first motion vector and the second weighting factor applied to the second region referenced by the second motion vector; ,
    The pixel value of the pixel in the first region is multiplied by the first weighting factor, and the pixel value of the pixel in the second region is multiplied by the second weighting factor, thereby predicting the encoding target region. Calculating a pixel value;
    The encoding device performs a step of generating encoded data by encoding residual information relating to a difference between a pixel value of a pixel in the encoding target region and the predicted pixel value,
    The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal may take different values. ,
    Encoding method.
  20.  輝度信号と2つの色差信号とを有する入力動画像が、第1重み係数及び第2重み係数を用いた双方向予測により予測符号化された符号化データを復号する復号化方法であって、
     前記入力動画像中の復号化対象画像のうちの復号化対象領域が参照する前記第1参照画像内の第1領域の位置を定める第1動きベクトルの情報と、前記復号化対象領域が参照する前記第2参照画像内の第2領域の位置を定める第2動きベクトルの情報と、前記復号化対象領域内の画素の画素値と予測画素値との差異に基づく残差情報とを含む前記符号化データの入力を受けるステップと、
     第1参照画像及び第2参照画像を含む複数の参照画像を記憶するステップと、
     前記第1動きベクトルにより参照される前記第1領域に適用される前記第1重み係数、及び前記第2動きベクトルにより算出される前記第2領域に適用される前記第2重み係数を定めるステップと、
     前記第1領域内の画素の画素値に前記第1重み係数を乗算すると共に、前記第2領域内の画素の画素値に前記第2重み係数を乗算することにより、前記復号化対象領域に対する前記予測画素値を算出するステップと
    を復号化装置が行い、
     前記輝度信号に対して適用される前記第1重み係数及び前記第2重み係数と、前記色差信号に対して適用される前記第1重み係数及び前記第2重み係数とは、異なる値を取り得る、
    復号化方法。
    A decoding method for decoding encoded data in which an input moving image having a luminance signal and two color difference signals is predictively encoded by bidirectional prediction using a first weighting factor and a second weighting factor,
    The information of the first motion vector that determines the position of the first region in the first reference image that is referred to by the decoding target region in the decoding target image in the input moving image, and the decoding target region is referred to. The code including information of a second motion vector that determines the position of the second region in the second reference image and residual information based on a difference between a pixel value of a pixel in the decoding target region and a predicted pixel value Receiving an input of digitized data;
    Storing a plurality of reference images including a first reference image and a second reference image;
    Determining the first weighting factor applied to the first region referenced by the first motion vector and the second weighting factor applied to the second region calculated by the second motion vector; ,
    The pixel value of the pixel in the first region is multiplied by the first weighting factor, and the pixel value of the pixel in the second region is multiplied by the second weighting factor, thereby obtaining the decoding target region with respect to the decoding target region. The decoding device performs the step of calculating the predicted pixel value;
    The first weighting coefficient and the second weighting coefficient applied to the luminance signal and the first weighting coefficient and the second weighting coefficient applied to the color difference signal may take different values. ,
    Decryption method.
PCT/JP2017/029411 2016-09-27 2017-08-15 Encoding device, encoding method, decoding device, and decoding method WO2018061503A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016-188308 2016-09-27
JP2016188308A JP2018056699A (en) 2016-09-27 2016-09-27 Encoder, encoding method, decoder and decoding method

Publications (1)

Publication Number Publication Date
WO2018061503A1 true WO2018061503A1 (en) 2018-04-05

Family

ID=61759438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/029411 WO2018061503A1 (en) 2016-09-27 2017-08-15 Encoding device, encoding method, decoding device, and decoding method

Country Status (2)

Country Link
JP (1) JP2018056699A (en)
WO (1) WO2018061503A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3554080A1 (en) * 2018-04-13 2019-10-16 InterDigital VC Holdings, Inc. Methods and devices for picture encoding and decoding
US11863774B2 (en) 2021-01-15 2024-01-02 Tencent America LLC Method and apparatus for video coding

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010035731A1 (en) * 2008-09-24 2010-04-01 ソニー株式会社 Image processing apparatus and image processing method
JP2013500661A (en) * 2009-07-30 2013-01-07 トムソン ライセンシング Method for decoding a stream of encoded data representing an image sequence and method for encoding an image sequence
WO2013057782A1 (en) * 2011-10-17 2013-04-25 株式会社東芝 Encoding method and decoding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010035731A1 (en) * 2008-09-24 2010-04-01 ソニー株式会社 Image processing apparatus and image processing method
JP2013500661A (en) * 2009-07-30 2013-01-07 トムソン ライセンシング Method for decoding a stream of encoded data representing an image sequence and method for encoding an image sequence
WO2013057782A1 (en) * 2011-10-17 2013-04-25 株式会社東芝 Encoding method and decoding method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHUN-CHI CHEN ET AL.: "Generalized bi-prediction for inter coding", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, JVET-C0047_RL, 3RD MEETING, no. JVET-C0047, 17 May 2016 (2016-05-17), Geneva, CH, pages 1 - 4, XP030150142 *

Also Published As

Publication number Publication date
JP2018056699A (en) 2018-04-05

Similar Documents

Publication Publication Date Title
KR102620624B1 (en) Method for video decoding and computer readable redording meduim thereof
KR102509543B1 (en) Image encoding and decoding method and apparatus
CN112703740A (en) History-based motion vector prediction for affine mode
JP2022507683A (en) Decoder side motion vector improvement
US10735746B2 (en) Method and apparatus for motion compensation prediction
JP2022521979A (en) Restrictions on improving motion vector on the decoder side
KR20240024140A (en) Methods of decoding using skip mode and apparatuses for using the same
JP2008278091A (en) Moving picture recording method, and apparatus thereof
KR20060127155A (en) Image information encoding device and image information encoding method
JP7447097B2 (en) Image encoding/decoding method and device
KR20210088693A (en) Encoders, decoders and corresponding methods using IBC search range optimization for arbitrary CTU sizes
JP7375224B2 (en) Encoding/decoding methods, apparatus and devices thereof
CN117241040A (en) Image signal encoding/decoding method and apparatus therefor
JP2022533061A (en) Gradient-based prediction improvements for video coding
KR20210016054A (en) Video encoding/decoding method and apparatus
WO2018061503A1 (en) Encoding device, encoding method, decoding device, and decoding method
KR20210153548A (en) Method and apparatus for encoding/decoding a video signal, and a recording medium storing a bitstream
WO2020184263A1 (en) Image decoding device, image decoding method, and program
JP5680778B2 (en) Video encoding method and video decoding method
KR20230133775A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20240033672A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
JP5893178B2 (en) Video encoding method and video decoding method
JP5957513B2 (en) Video decoding method
KR20240026871A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20240016222A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream

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

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

Country of ref document: EP

Kind code of ref document: A1