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

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

Info

Publication number
WO2018193967A1
WO2018193967A1 PCT/JP2018/015411 JP2018015411W WO2018193967A1 WO 2018193967 A1 WO2018193967 A1 WO 2018193967A1 JP 2018015411 W JP2018015411 W JP 2018015411W WO 2018193967 A1 WO2018193967 A1 WO 2018193967A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
motion vector
sub
units
motion
Prior art date
Application number
PCT/JP2018/015411
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 WO2018193967A1 publication Critical patent/WO2018193967A1/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/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/53Multi-resolution motion estimation; Hierarchical motion estimation

Definitions

  • the present disclosure relates to an encoding device that encodes a moving image by performing motion compensation.
  • H.264 265 exists.
  • H. H.265 is also called HEVC (High Efficiency Video Coding).
  • the present disclosure provides an encoding device and the like that can efficiently perform motion compensation.
  • An encoding apparatus is an encoding apparatus that encodes a moving image by performing motion compensation, and includes a memory and a circuit that can access the memory, and the memory is accessible
  • the circuit derives a motion vector of an image block in the moving image, performs the motion compensation in a unit of the block or a unit of a sub-block constituting the block, and a template FRUC (Frame Rate Up-Conversion).
  • FRUC Framework Up-Conversion
  • the motion compensation is performed in units of the sub-block, and the template FRUC
  • the equation is a method of deriving the motion vector of the processing target area that is the block or the sub-block according to the matching degree between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture.
  • the bilateral FRUC method is a method of deriving the motion vector of the processing target region according to the matching degree of two reconstructed images of two regions in two different reference pictures.
  • the encoding apparatus and the like according to one aspect of the present disclosure can efficiently perform motion compensation.
  • FIG. 1 is a block diagram showing a functional configuration of the encoding apparatus according to Embodiment 1.
  • FIG. 2 is a diagram illustrating an example of block division in the first embodiment.
  • FIG. 3 is a table showing conversion basis functions corresponding to each conversion type.
  • FIG. 4A is a diagram illustrating an example of the shape of a filter used in ALF.
  • FIG. 4B is a diagram illustrating another example of the shape of a filter used in ALF.
  • FIG. 4C is a diagram illustrating another example of the shape of a filter used in ALF.
  • FIG. 5A is a diagram illustrating 67 intra prediction modes in intra prediction.
  • FIG. 5B is a flowchart for explaining the outline of the predicted image correction process by the OBMC process.
  • FIG. 5A is a diagram illustrating 67 intra prediction modes in intra prediction.
  • FIG. 5B is a flowchart for explaining the outline of the predicted image correction process by the OBMC process.
  • FIG. 5A is a
  • FIG. 5C is a conceptual diagram for explaining the outline of the predicted image correction process by the OBMC process.
  • FIG. 5D is a diagram illustrating an example of FRUC.
  • FIG. 6 is a diagram for explaining pattern matching (bilateral matching) between two blocks along the motion trajectory.
  • FIG. 7 is a diagram for explaining pattern matching (template matching) between a template in the current picture and a block in the reference picture.
  • FIG. 8 is a diagram for explaining a model assuming constant velocity linear motion.
  • FIG. 9A is a diagram for explaining derivation of a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks.
  • FIG. 9B is a diagram for explaining the outline of the motion vector deriving process in the merge mode.
  • FIG. 9A is a diagram for explaining derivation of a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks.
  • FIG. 9B is a diagram for explaining the outline of
  • FIG. 9C is a conceptual diagram for explaining an outline of DMVR processing.
  • FIG. 9D is a diagram for describing an overview of a predicted image generation method using luminance correction processing by LIC processing.
  • FIG. 10 is a block diagram showing a functional configuration of the decoding apparatus according to the first embodiment.
  • FIG. 11 is a block diagram for explaining processing related to inter-screen prediction performed by the encoding apparatus according to Embodiment 1.
  • FIG. 12 is a block diagram for explaining processing related to inter-screen prediction performed by the decoding apparatus according to Embodiment 1.
  • FIG. 13 is a flowchart showing a first specific example of inter-screen prediction according to the first embodiment.
  • FIG. 14 is a flowchart showing a second specific example of inter-screen prediction according to the first embodiment.
  • FIG. 15 is a flowchart showing a third specific example of inter-screen prediction according to the first embodiment.
  • FIG. 16 is a flowchart illustrating a fourth specific example of inter-screen prediction according to the first embodiment.
  • FIG. 17 is a flowchart showing a fifth specific example of inter-screen prediction according to the first embodiment.
  • FIG. 18 is a flowchart illustrating a sixth specific example of inter-screen prediction according to the first embodiment.
  • FIG. 19 is a conceptual diagram showing the template FRUC method according to the first embodiment.
  • FIG. 20 is a conceptual diagram showing the bilateral FRUC method according to the first embodiment.
  • FIG. 21 is a flowchart showing an operation of deriving a motion vector by the FRUC method according to the first embodiment.
  • FIG. 21 is a flowchart showing an operation of deriving a motion vector by the FRUC method according to the first embodiment.
  • FIG. 22 is a block diagram illustrating an implementation example of the coding apparatus according to Embodiment 1.
  • FIG. 23 is a flowchart showing a first operation example of the coding apparatus according to Embodiment 1.
  • FIG. 24 is a flowchart showing a second operation example of the coding apparatus according to Embodiment 1.
  • FIG. 25 is a block diagram illustrating an implementation example of the decoding apparatus according to the first embodiment.
  • FIG. 26 is a flowchart showing a first operation example of the decoding apparatus according to the first embodiment.
  • FIG. 27 is a flowchart showing a second operation example of the decoding apparatus according to the first embodiment.
  • FIG. 28 is an overall configuration diagram of a content supply system that implements a content distribution service.
  • FIG. 28 is an overall configuration diagram of a content supply system that implements a content distribution service.
  • FIG. 29 is a diagram illustrating an example of a coding structure at the time of scalable coding.
  • FIG. 30 is a diagram illustrating an example of a coding structure at the time of scalable coding.
  • FIG. 31 is a diagram illustrating an example of a web page display screen.
  • FIG. 32 shows an example of a web page display screen.
  • FIG. 33 is a diagram illustrating an example of a smartphone.
  • FIG. 34 is a block diagram illustrating a configuration example of a smartphone.
  • Motion compensation may be performed in encoding and decoding of moving images. Motion compensation is also called inter-screen prediction or inter prediction. A motion vector is used for motion compensation. As a method for deriving this motion vector, for example, there are a normal inter-screen prediction method, a FRUC (Frame Rate Up-Conversion) method, and the like.
  • the encoding device derives a motion vector using the image of the processing target area in the processing target picture.
  • the encoding device encodes motion vector information.
  • the decoding device derives a motion vector by decoding the information on the motion vector. Accordingly, the encoding device and the decoding device can perform motion compensation using the same motion vector.
  • the encoding device derives a motion vector using a reconstructed image of a region different from the processing target region without using the processing target region image in the processing target picture.
  • the decoding apparatus also derives a motion vector using a reconstructed image of a region different from the processing target region without using the processing target region image in the processing target picture.
  • a template FRUC method and a bilateral FRUC method as FRUC methods.
  • a motion vector is derived using a reconstructed image of a region adjacent to a processing target region and a reconstructed image of a reference region in a reference picture.
  • the bilateral FRUC method motion vectors are derived using two reconstructed images of two reference regions in two reference pictures.
  • the encoding device and the decoding device can derive the same motion vector by a common method without encoding and decoding the motion vector, and perform motion compensation using the same motion vector. Can do. Therefore, the code amount is reduced.
  • motion compensation is performed in units smaller than the encoding unit.
  • motion compensation is performed in units of blocks called encoding units or prediction units.
  • motion compensation is performed in units of sub-blocks that are finer than this block unit. Done.
  • the motion compensation is performed in a fine unit, so that the prediction accuracy can be improved without increasing the code amount.
  • motion compensation may not be performed efficiently, which may adversely affect the code amount, image quality, processing speed, or the like.
  • a reconstructed image of a region adjacent to the processing target region is used to derive a motion vector. Therefore, when the reconstructed image of the area adjacent to the sub-block is not generated, the motion vector of the sub-block is not appropriately derived by the template FRUC method, and the motion compensation is not efficiently performed.
  • motion compensation when motion compensation is performed in units of sub-blocks, the amount of processing increases and processing delay may increase.
  • prediction accuracy may not be improved as compared with motion compensation performed in units of blocks.
  • an encoding device that encodes a moving image by performing motion compensation, and includes a memory and a circuit that can access the memory, and the memory
  • the circuit that can access the image derives the motion vector of the block of the image in the moving image, performs the motion compensation in the unit of the block or the unit of the sub-block constituting the block, and generates a template FRUC (Frame When the motion vector of the block is derived by the rate up-conversion method and the motion compensation is performed in units of the sub-block, the motion vector of the sub-block is derived by the bilateral FRUC method and the motion of the sub-block is derived.
  • the motion vector of the processing target area that is the block or the sub-block is derived according to the degree of matching between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture.
  • the bilateral FRUC method is a method for deriving the motion vector of the processing target region according to the degree of matching between two reconstructed images of two regions in two different reference pictures.
  • the encoding apparatus can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, the encoding apparatus can appropriately derive the motion vector of the sub block even when the reconstructed image of the region adjacent to the sub block is not generated. Then, the encoding apparatus can efficiently perform motion compensation by using the appropriately derived motion vector.
  • the circuit when the circuit derives a motion vector of the block by the template FRUC method and performs the motion compensation in the unit of the block or the unit of the sub-block, the motion vector of the block is unidirectionally predicted. If the motion vector of the block is a motion vector for bi-prediction, the motion compensation of the block is performed using the motion vector. Then, the motion compensation is performed in units of the sub-blocks.
  • the encoding apparatus can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. . Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the encoding device efficiently performs motion compensation in units of blocks using the block motion vector as it is. It can be carried out.
  • the circuit when the circuit derives the motion vector of the block by the bilateral FRUC method and performs the motion compensation in units of the subblock, the circuit calculates the motion vector of the subblock by the bilateral FRUC method. And the motion compensation is performed in units of the sub-block using the motion vector of the sub-block.
  • the encoding apparatus obtains the sub-block motion vector by the bilateral FRUC method regardless of whether the block motion vector is derived by the template FRUC method or the block motion vector by the bilateral FRUC method. Can be derived. Therefore, the encoding apparatus can derive the motion vector of the sub-block in the same way in these two cases.
  • the circuit when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block.
  • the motion vector of is derived.
  • the encoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding device can improve prediction accuracy.
  • a decoding device is a decoding device that performs motion compensation and decodes a moving image, and includes a memory and a circuit that can access the memory, and can access the memory
  • the circuit derives a motion vector of an image block in the moving image, performs the motion compensation in the unit of the block or a unit of a sub-block constituting the block, and generates a template FRUC (Frame Rate Up- When the motion vector of the block is derived by the conversion method and the motion compensation is performed in units of the sub block, the motion vector of the sub block is derived by the bilateral FRUC method, and the motion vector of the sub block is used.
  • FRUC Forward Rate Up
  • a motion vector of a processing target area that is the block or the sub-block is derived according to a matching degree between a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture.
  • the bilateral FRUC method is a method of deriving the motion vector of the processing target region according to the matching degree of two reconstructed images of two regions in two different reference pictures.
  • the decoding apparatus can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, the decoding apparatus can appropriately derive the motion vector of the sub block even when the reconstructed image of the region adjacent to the sub block is not generated. Then, the decoding apparatus can efficiently perform motion compensation using the appropriately derived motion vector.
  • the motion vector of the block is unidirectionally predicted. If the motion vector of the block is a bi-predicted motion vector, the motion compensation of the block is performed using the motion vector of the block. Then, the motion compensation is performed in units of the sub-blocks.
  • the decoding device can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the decoding apparatus efficiently performs motion compensation in units of blocks using the block motion vector as it is. be able to.
  • the circuit when the circuit derives the motion vector of the block by the bilateral FRUC method and performs the motion compensation in units of the subblock, the circuit calculates the motion vector of the subblock by the bilateral FRUC method. And the motion compensation is performed in units of the sub-block using the motion vector of the sub-block.
  • the decoding apparatus derives the sub-block motion vector by the bilateral FRUC method regardless of whether the block motion vector is derived by the template FRUC method or the block motion vector by the bilateral FRUC method. can do. Therefore, the decoding apparatus can derive the motion vector of the sub-block in the same way in these two cases.
  • the circuit when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block.
  • the motion vector of is derived.
  • the decoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus can improve prediction accuracy.
  • an encoding method is an encoding method for encoding a moving image by performing motion compensation, in which a motion vector of an image block in the moving image is derived, and the block Or the sub-block unit constituting the block, the motion compensation is performed, and the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion is performed in the sub-block unit.
  • FRUC Full Rate Up-Conversion
  • a motion vector of the sub-block is derived by a bilateral FRUC method, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC method Alternatively, the motion vector of the processing target area that is the sub-block is
  • the bilateral FRUC method is a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture. This is a method of deriving according to the degree of matching between two reconstructed images of two regions in two different reference pictures.
  • an apparatus using this encoding method can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, a device or the like using this encoding method can appropriately derive a motion vector of a sub block even when a reconstructed image of an area adjacent to the sub block is not generated. An apparatus using this encoding method can efficiently perform motion compensation using an appropriately derived motion vector.
  • a decoding method is a decoding method that performs motion compensation and decodes a moving image, and derives a motion vector of an image block in the moving image, the unit of the block,
  • the motion compensation is performed in units of subblocks constituting the block, and the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion compensation is performed in units of the subblocks.
  • a motion vector of the sub-block is derived by a bilateral FRUC scheme, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC scheme is configured to use the block or the sub-block.
  • the motion vector of the processing target area which is a block is This is a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture, and the bilateral FRUC method uses different motion vectors for the processing target region. This is a method of deriving according to the degree of matching between two reconstructed images of two regions in two reference pictures.
  • an apparatus or the like using this decoding method can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, a device or the like using this decoding method can appropriately derive a motion vector of a sub block even when a reconstructed image of an area adjacent to the sub block is not generated. An apparatus using this decoding method can efficiently perform motion compensation using an appropriately derived motion vector.
  • an encoding device that performs motion compensation and encodes a moving image, and includes a memory and a circuit that can access the memory, and the memory
  • the circuit accessible to encodes first control information indicating one method for deriving a motion vector of an image block in the moving image, and performs the motion compensation in units of sub-blocks constituting the block Is it effective to encode the second control information indicating whether is effective or invalid, derive the motion vector of the block by the one method, and perform the motion compensation in units of the sub-blocks? It is determined whether the motion compensation is performed in units of the sub-blocks or the motion compensation is performed in units of the blocks according to whether it is invalid.
  • a motion vector of the sub-block is derived, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the motion compensation is performed in units of the block If it is determined, the motion compensation is performed in units of the block using the motion vector of the block.
  • the encoding apparatus can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the block motion vector. Therefore, the encoding apparatus can appropriately suppress that the motion compensation is performed inefficiently. That is, the encoding device can efficiently perform motion compensation.
  • the circuit selects the one method from a plurality of methods including a normal inter-screen prediction method, a template FRUC (Frame Rate Up-Conversion) method, and a bilateral FRUC method, and the normal inter-screen prediction method.
  • a normal inter-screen prediction method Is a method of deriving a motion vector of the processing target region that is the block or the sub-block, and encoding information on the motion vector of the processing target region
  • the template FRUC method is a motion vector of the processing target region.
  • the bilateral FRUC method calculates the motion vector of the processing target region.
  • Two of the two regions in two different reference pictures It is a method to derive in accordance goodness of the reconstructed image.
  • the encoding apparatus can adaptively select one method for deriving the motion vector of the block from a plurality of methods.
  • the one method is a template FRUC method or a bilateral FRUC method
  • the template FRUC scheme is the block or subblock
  • the bilateral FRUC method is The motion vector of the processing target region is set to two regions in two different reference pictures. It is a method to derive in accordance with goodness of two reconstructed images.
  • the encoding device can perform motion compensation in an appropriate unit according to a determination result of whether or not to perform motion compensation in units of sub-blocks when a block motion vector is derived by the FRUC method. .
  • the determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, the encoding apparatus can perform motion compensation in an appropriate unit according to whether or not it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the FRUC method. it can.
  • the circuit when the motion compensation is determined to be performed in units of the subblocks, the unit in the units of the subblocks.
  • the motion compensation is performed in units of the block, and the normal inter-screen prediction method is performed in the block or the sub-block.
  • a motion vector of a certain processing target area is derived and information on the motion vector of the processing target area is encoded.
  • the encoding device can select an appropriate unit according to a determination result on whether to perform motion compensation in units of subblocks. Motion compensation can be performed. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
  • the encoding device when the motion vector of a block is derived by the normal inter-frame prediction method, the encoding device performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in a sub-block unit. It can be carried out.
  • the circuit when the circuit derives the motion vector of the sub-block, the circuit derives the motion vector of the sub-block by the bilateral FRUC method, and the bilateral FRUC method is a process that is the block or the sub-block.
  • the motion vector of the target region is derived according to the degree of matching between two reconstructed images in two regions in two different reference pictures.
  • the encoding apparatus can appropriately derive the motion vector of the sub-block even when the reconstructed image of the region adjacent to the sub-block is not generated. Therefore, the encoding apparatus can efficiently perform motion compensation by using the appropriately derived motion vector.
  • the circuit compensates for the motion compensation in the unit of the sub-block. If the motion vector of the block is a bi-directional motion vector and it is invalid to perform the motion compensation in units of the sub-blocks, the motion compensation is performed in units of the block. If the motion vector of the block is a unidirectional motion vector, it is determined that the motion compensation is performed in units of the block.
  • the encoding apparatus converts the sub-block motion vector to the bilateral FRUC when the motion vector of the block is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. Can be derived in a manner. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the encoding device efficiently uses the motion vector of the block as it is. Motion compensation can be performed in units of blocks.
  • the circuit determines that the motion compensation is performed in units of the sub-blocks, and the motion compensation is performed in units of the sub-blocks. If it is invalid to perform the motion compensation, it is determined that the motion compensation is performed in units of the block.
  • the encoding apparatus can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks. Then, when it is invalid to perform motion compensation in units of sub-blocks, the encoding device can perform motion compensation in units of blocks. Therefore, the encoding apparatus can simply control the unit in which motion compensation is performed.
  • the circuit when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block.
  • the motion vector of is derived.
  • the encoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding device can improve prediction accuracy.
  • the circuit encodes the first control information to a header layer of the block, a header layer of a slice including the block, a header layer of a picture including the block, or a header layer of a stream including the block.
  • the second control information is encoded into the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
  • the encoding apparatus can designate a scheme for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
  • a decoding device is a decoding device that performs motion compensation and decodes a moving image, and includes a memory and a circuit that can access the memory, and can access the memory It is effective that the circuit decodes first control information indicating one method for deriving a motion vector of an image block in the moving image, and performs the motion compensation in units of sub-blocks constituting the block.
  • the motion compensation is performed in units of the sub-blocks or the motion compensation is performed in units of the blocks, and the motion compensation is performed in units of the sub-blocks. Is determined, the motion vector of the sub-block is derived, the motion compensation of the sub-block is performed using the motion vector of the sub-block, and the motion compensation is determined to be performed in the unit of the block. In this case, the motion compensation is performed in units of the block using the motion vector of the block.
  • the decoding apparatus can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the motion vector of the block. Therefore, the decoding apparatus can appropriately suppress inefficient motion compensation. That is, the decoding device can efficiently perform motion compensation.
  • the circuit selects the one method from a plurality of methods including a normal inter-screen prediction method, a template FRUC (Frame Rate Up-Conversion) method, and a bilateral FRUC method, and the normal inter-screen prediction method.
  • a normal inter-screen prediction method including a normal inter-screen prediction method, a template FRUC (Frame Rate Up-Conversion) method, and a bilateral FRUC method, and the normal inter-screen prediction method.
  • a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture, and the bilateral FRUC method is a motion vector of the processing target region, Two of the two regions in two different reference pictures It is a method to derive in accordance with goodness of constituent images.
  • the decoding apparatus can adaptively select one method for deriving the motion vector of the block from a plurality of methods.
  • the one method is a template FRUC method or a bilateral FRUC method
  • the template FRUC scheme is the block or subblock
  • the bilateral FRUC method is The motion vector of the processing target region is set to two regions in two different reference pictures. It is a method to derive in accordance with goodness of two reconstructed images.
  • the decoding apparatus can perform motion compensation in an appropriate unit according to the determination result of whether or not motion compensation is performed in units of sub-blocks.
  • the determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, the decoding device can perform motion compensation in an appropriate unit according to whether or not it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the FRUC method. .
  • the circuit when the motion compensation is determined to be performed in units of the subblocks, the unit in the units of the subblocks.
  • the motion compensation is performed in units of the block, and the normal inter-screen prediction method is performed in the block or the sub-block. This is a method of decoding motion vector information of a certain processing target region and deriving the motion vector of the processing target region.
  • the decoding apparatus when the motion vector of the block is derived by the normal inter-frame prediction scheme different from the FRUC scheme, the decoding apparatus performs the appropriate unit according to the determination result of whether or not to perform the motion compensation in the sub-block unit. Motion compensation can be performed. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
  • the decoding apparatus when a motion vector of a block is derived by the normal inter-frame prediction method, the decoding apparatus performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in a sub-block unit. be able to.
  • the circuit when the circuit derives the motion vector of the sub-block, the circuit derives the motion vector of the sub-block by the bilateral FRUC method, and the bilateral FRUC method is a process that is the block or the sub-block.
  • the motion vector of the target region is derived according to the degree of matching between two reconstructed images in two regions in two different reference pictures.
  • the decoding apparatus can appropriately derive the motion vector of the sub-block even when the reconstructed image of the area adjacent to the sub-block is not generated. Therefore, the decoding apparatus can efficiently perform motion compensation using the appropriately derived motion vector.
  • the circuit compensates for the motion compensation in the unit of the sub-block. If the motion vector of the block is a bi-directional motion vector and it is invalid to perform the motion compensation in units of the sub-blocks, the motion compensation is performed in units of the block. If the motion vector of the block is a unidirectional motion vector, it is determined that the motion compensation is performed in units of the block.
  • the decoding apparatus converts the sub-block motion vector into the bilateral FRUC scheme when the motion vector of the block is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. Can be derived. Therefore, for example, when a motion vector of a sub-block is derived using a motion vector of the block, an appropriate motion vector can be used.
  • the decoding apparatus efficiently uses the block motion vector as it is. Motion compensation can be performed in units of.
  • the circuit determines that the motion compensation is performed in units of the sub-blocks, and the motion compensation is performed in units of the sub-blocks. If it is invalid to perform the motion compensation, it is determined that the motion compensation is performed in units of the block.
  • the decoding apparatus can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks.
  • the decoding apparatus can perform motion compensation in units of blocks when it is invalid to perform motion compensation in units of sub-blocks. Therefore, the decoding apparatus can simply control the unit in which motion compensation is performed.
  • the circuit when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block.
  • the motion vector of is derived.
  • the decoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus can improve prediction accuracy.
  • the circuit decodes the first control information from a header layer of the block, a header layer of a slice including the block, a header layer of a picture including the block, or a header layer of a stream including the block. Then, the second control information is decoded from the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
  • the decoding apparatus can specify a method for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
  • an encoding method is an encoding method for encoding a moving image by performing motion compensation, and one method for deriving a motion vector of an image block in the moving image
  • the second control information indicating whether it is effective or invalid to perform the motion compensation in units of sub-blocks constituting the block is encoded, and the one method is used.
  • a motion vector of the block Deriving a motion vector of the block and performing the motion compensation in units of the sub-blocks according to whether the motion compensation is valid or invalid in units of the sub-blocks or in units of the blocks It is determined whether to perform motion compensation, and when it is determined to perform the motion compensation in units of the sub-block, a motion vector of the sub-block is derived, If it is determined that the motion compensation is performed in units of the sub-block using a vector and the motion compensation is performed in units of the block, the motion compensation is performed in units of the block using the motion vector of the block. Do.
  • an apparatus or the like using this encoding method can validate or invalidate motion compensation in units of sub-blocks separately from a method for deriving a block motion vector. Therefore, an apparatus using this encoding method can appropriately suppress inefficient motion compensation. That is, a device using this encoding method can efficiently perform motion compensation.
  • a decoding method is a decoding method that decodes a moving image by performing motion compensation, and is a first method that derives a motion vector of an image block in the moving image.
  • 1 control information is decoded
  • second control information indicating whether it is effective or ineffective to perform the motion compensation in units of sub-blocks constituting the block is decoded
  • a motion vector of the sub-block is derived and a motion vector of the sub-block is derived.
  • an apparatus using this decoding method can validate or invalidate motion compensation in units of sub-blocks separately from a method for deriving a block motion vector. Therefore, an apparatus using this decoding method can appropriately suppress inefficient motion compensation. That is, an apparatus using this decoding method can efficiently perform motion compensation.
  • these comprehensive or specific aspects may be realized by a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM.
  • the present invention may be realized by any combination of an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
  • an outline of the first embodiment will be described as an example of an encoding device and a decoding device to which the processing and / or configuration described in each aspect of the present disclosure to be described later can be applied.
  • the first embodiment is merely an example of an encoding device and a decoding device to which the processing and / or configuration described in each aspect of the present disclosure can be applied, and the processing and / or processing described in each aspect of the present disclosure.
  • the configuration can also be implemented in an encoding device and a decoding device different from those in the first embodiment.
  • the encoding apparatus or decoding apparatus according to the first embodiment corresponds to the constituent elements described in each aspect of the present disclosure among a plurality of constituent elements constituting the encoding apparatus or decoding apparatus. Replacing components with components described in each aspect of the disclosure
  • the constituent elements that perform part of the processing performed by some constituent elements of the plurality of constituent elements constituting the decoding device are the constituent elements described in each aspect of the present disclosure, and the respective aspects of the present disclosure.
  • the processes and / or configurations described in each aspect of the present disclosure are not limited to the above examples.
  • the present invention may be implemented in an apparatus used for a different purpose from the moving picture / picture encoding apparatus or moving picture / picture decoding apparatus disclosed in the first embodiment, and the processing and / or described in each aspect.
  • the configuration may be implemented alone.
  • you may implement combining the process and / or structure which were demonstrated in the different aspect.
  • FIG. 1 is a block diagram showing a functional configuration of encoding apparatus 100 according to Embodiment 1.
  • the encoding device 100 is a moving image / image encoding device that encodes moving images / images in units of blocks.
  • an encoding apparatus 100 is an apparatus that encodes an image in units of blocks, and includes a dividing unit 102, a subtracting unit 104, a transforming unit 106, a quantizing unit 108, and entropy encoding.
  • Unit 110 inverse quantization unit 112, inverse transform unit 114, addition unit 116, block memory 118, loop filter unit 120, frame memory 122, intra prediction unit 124, inter prediction unit 126, A prediction control unit 128.
  • the encoding device 100 is realized by, for example, a general-purpose processor and a memory.
  • the processor when the software program stored in the memory is executed by the processor, the processor performs the division unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, and the inverse quantization unit 112.
  • the encoding apparatus 100 includes a dividing unit 102, a subtracting unit 104, a transforming unit 106, a quantizing unit 108, an entropy coding unit 110, an inverse quantizing unit 112, an inverse transforming unit 114, an adding unit 116, and a loop filter unit 120.
  • the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 may be implemented as one or more dedicated electronic circuits.
  • the dividing unit 102 divides each picture included in the input moving image into a plurality of blocks, and outputs each block to the subtracting unit 104.
  • the dividing unit 102 first divides a picture into blocks of a fixed size (for example, 128 ⁇ 128).
  • This fixed size block may be referred to as a coding tree unit (CTU).
  • the dividing unit 102 divides each of the fixed size blocks into blocks of a variable size (for example, 64 ⁇ 64 or less) based on recursive quadtree and / or binary tree block division.
  • This variable size block may be referred to as a coding unit (CU), a prediction unit (PU) or a transform unit (TU).
  • CU, PU, and TU do not need to be distinguished, and some or all blocks in a picture may be processing units of CU, PU, and TU.
  • FIG. 2 is a diagram showing an example of block division in the first embodiment.
  • a solid line represents a block boundary by quadtree block division
  • a broken line represents a block boundary by binary tree block division.
  • the block 10 is a 128 ⁇ 128 pixel square block (128 ⁇ 128 block).
  • the 128 ⁇ 128 block 10 is first divided into four square 64 ⁇ 64 blocks (quadtree block division).
  • the upper left 64 ⁇ 64 block is further divided vertically into two rectangular 32 ⁇ 64 blocks, and the left 32 ⁇ 64 block is further divided vertically into two rectangular 16 ⁇ 64 blocks (binary tree block division). As a result, the upper left 64 ⁇ 64 block is divided into two 16 ⁇ 64 blocks 11 and 12 and a 32 ⁇ 64 block 13.
  • the upper right 64 ⁇ 64 block is horizontally divided into two rectangular 64 ⁇ 32 blocks 14 and 15 (binary tree block division).
  • the lower left 64x64 block is divided into four square 32x32 blocks (quadrant block division). Of the four 32 ⁇ 32 blocks, the upper left block and the lower right block are further divided.
  • the upper left 32 ⁇ 32 block is vertically divided into two rectangular 16 ⁇ 32 blocks, and the right 16 ⁇ 32 block is further divided horizontally into two 16 ⁇ 16 blocks (binary tree block division).
  • the lower right 32 ⁇ 32 block is horizontally divided into two 32 ⁇ 16 blocks (binary tree block division).
  • the lower left 64 ⁇ 64 block is divided into a 16 ⁇ 32 block 16, two 16 ⁇ 16 blocks 17 and 18, two 32 ⁇ 32 blocks 19 and 20, and two 32 ⁇ 16 blocks 21 and 22.
  • the lower right 64x64 block 23 is not divided.
  • the block 10 is divided into 13 variable-size blocks 11 to 23 based on the recursive quadtree and binary tree block division.
  • Such division may be called QTBT (quad-tree plus binary tree) division.
  • one block is divided into four or two blocks (quadrature tree or binary tree block division), but the division is not limited to this.
  • one block may be divided into three blocks (triple tree block division).
  • Such a division including a tri-tree block division may be called an MBT (multi type tree) division.
  • the subtraction unit 104 subtracts the prediction signal (prediction sample) from the original signal (original sample) in units of blocks divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction error (also referred to as a residual) of a coding target block (hereinafter referred to as a current block). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.
  • a prediction error also referred to as a residual of a coding target block (hereinafter referred to as a current block).
  • the original signal is an input signal of the encoding device 100, and is a signal (for example, a luminance (luma) signal and two color difference (chroma) signals) representing an image of each picture constituting the moving image.
  • a signal representing an image may be referred to as a sample.
  • the transform unit 106 transforms the prediction error in the spatial domain into a transform factor in the frequency domain, and outputs the transform coefficient to the quantization unit 108. Specifically, the transform unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on a prediction error in the spatial domain.
  • DCT discrete cosine transform
  • DST discrete sine transform
  • the conversion unit 106 adaptively selects a conversion type from a plurality of conversion types, and converts a prediction error into a conversion coefficient using a conversion basis function corresponding to the selected conversion type. May be. Such a conversion may be referred to as EMT (explicit multiple core transform) or AMT (adaptive multiple transform).
  • the plurality of conversion types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I and DST-VII.
  • FIG. 3 is a table showing conversion basis functions corresponding to each conversion type. In FIG. 3, N indicates the number of input pixels. Selection of a conversion type from among these multiple conversion types may depend on, for example, the type of prediction (intra prediction and inter prediction), or may depend on an intra prediction mode.
  • Information indicating whether or not to apply such EMT or AMT (for example, called an AMT flag) and information indicating the selected conversion type are signaled at the CU level.
  • AMT flag information indicating whether or not to apply such EMT or AMT
  • the signalization of these pieces of information need not be limited to the CU level, but may be other levels (for example, a sequence level, a picture level, a slice level, a tile level, or a CTU level).
  • the conversion unit 106 may reconvert the conversion coefficient (conversion result). Such reconversion is sometimes referred to as AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the conversion unit 106 performs re-conversion for each sub-block (for example, 4 ⁇ 4 sub-block) included in the block of the conversion coefficient corresponding to the intra prediction error. Information indicating whether or not NSST is applied and information related to the transformation matrix used for NSST are signaled at the CU level. Note that the signalization of these pieces of information need not be limited to the CU level, but may be other levels (for example, a sequence level, a picture level, a slice level, a tile level, or a CTU level).
  • the separable conversion is a method of performing the conversion a plurality of times by separating the number of dimensions of the input for each direction, and the non-separable conversion is two or more when the input is multidimensional.
  • the dimensions are collectively regarded as one dimension, and conversion is performed collectively.
  • non-separable conversion if an input is a 4 ⁇ 4 block, it is regarded as one array having 16 elements, and 16 ⁇ 16 conversion is performed on the array. The thing which performs the conversion process with a matrix is mentioned.
  • a 4 ⁇ 4 input block is regarded as a single array having 16 elements, and then the Givens rotation is performed multiple times on the array (Hypercube Givens Transform) is also a non-separable. It is an example of conversion.
  • the quantization unit 108 quantizes the transform coefficient output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order, and quantizes the transform coefficients based on the quantization parameter (QP) corresponding to the scanned transform coefficients. Then, the quantization unit 108 outputs the quantized transform coefficient (hereinafter referred to as a quantization coefficient) of the current block to the entropy encoding unit 110 and the inverse quantization unit 112.
  • QP quantization parameter
  • the predetermined order is an order for quantization / inverse quantization of transform coefficients.
  • the predetermined scanning order is defined in ascending order of frequency (order from low frequency to high frequency) or descending order (order from high frequency to low frequency).
  • the quantization parameter is a parameter that defines a quantization step (quantization width). For example, if the value of the quantization parameter increases, the quantization step also increases. That is, if the value of the quantization parameter increases, the quantization error increases.
  • the entropy encoding unit 110 generates an encoded signal (encoded bit stream) by performing variable length encoding on the quantization coefficient that is input from the quantization unit 108. Specifically, the entropy encoding unit 110 binarizes the quantization coefficient, for example, and arithmetically encodes the binary signal.
  • the inverse quantization unit 112 inversely quantizes the quantization coefficient that is an input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantization coefficient of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inverse-quantized transform coefficient of the current block to the inverse transform unit 114.
  • the inverse transform unit 114 restores the prediction error by inverse transforming the transform coefficient that is an input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform corresponding to the transform by the transform unit 106 on the transform coefficient. Then, the inverse transformation unit 114 outputs the restored prediction error to the addition unit 116.
  • the restored prediction error does not match the prediction error calculated by the subtraction unit 104 because information is lost due to quantization. That is, the restored prediction error includes a quantization error.
  • the adder 116 reconstructs the current block by adding the prediction error input from the inverse transform unit 114 and the prediction sample input from the prediction control unit 128. Then, the adding unit 116 outputs the reconfigured block to the block memory 118 and the loop filter unit 120.
  • the reconstructed block is sometimes referred to as a local decoding block.
  • the block memory 118 is a storage unit for storing blocks in an encoding target picture (hereinafter referred to as current picture) that are referred to in intra prediction. Specifically, the block memory 118 stores the reconstructed block output from the adding unit 116.
  • the loop filter unit 120 applies a loop filter to the block reconstructed by the adding unit 116 and outputs the filtered reconstructed block to the frame memory 122.
  • the loop filter is a filter (in-loop filter) used in the encoding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), an adaptive loop filter (ALF), and the like.
  • a least square error filter is applied to remove coding distortion. For example, for each 2 ⁇ 2 sub-block in the current block, a plurality of multiples based on the direction of the local gradient and the activity are provided. One filter selected from the filters is applied.
  • sub-blocks for example, 2 ⁇ 2 sub-blocks
  • a plurality of classes for example, 15 or 25 classes.
  • the direction value D of the gradient is derived, for example, by comparing gradients in a plurality of directions (for example, horizontal, vertical, and two diagonal directions).
  • the gradient activation value A is derived, for example, by adding gradients in a plurality of directions and quantizing the addition result.
  • a filter for a sub-block is determined from among a plurality of filters.
  • FIG. 4A to 4C are diagrams showing a plurality of examples of filter shapes used in ALF.
  • 4A shows a 5 ⁇ 5 diamond shape filter
  • FIG. 4B shows a 7 ⁇ 7 diamond shape filter
  • FIG. 4C shows a 9 ⁇ 9 diamond shape filter.
  • Information indicating the shape of the filter is signalized at the picture level. It should be noted that the signalization of the information indicating the filter shape need not be limited to the picture level, but may be another level (for example, a sequence level, a slice level, a tile level, a CTU level, or a CU level).
  • ON / OFF of ALF is determined at the picture level or the CU level, for example. For example, for luminance, it is determined whether to apply ALF at the CU level, and for color difference, it is determined whether to apply ALF at the picture level.
  • Information indicating ALF on / off is signaled at the picture level or the CU level. Signaling of information indicating ALF on / off need not be limited to the picture level or the CU level, and may be performed at other levels (for example, a sequence level, a slice level, a tile level, or a CTU level). Good.
  • a coefficient set of a plurality of selectable filters (for example, up to 15 or 25 filters) is signalized at the picture level.
  • the signalization of the coefficient set need not be limited to the picture level, but may be another level (for example, sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
  • the frame memory 122 is a storage unit for storing a reference picture used for inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed block filtered by the loop filter unit 120.
  • the intra prediction unit 124 generates a prediction signal (intra prediction signal) by referring to the block in the current picture stored in the block memory 118 and performing intra prediction (also referred to as intra-screen prediction) of the current block. Specifically, the intra prediction unit 124 generates an intra prediction signal by performing intra prediction with reference to a sample (for example, luminance value and color difference value) of a block adjacent to the current block, and performs prediction control on the intra prediction signal. To the unit 128.
  • the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes.
  • the plurality of intra prediction modes include one or more non-directional prediction modes and a plurality of directional prediction modes.
  • One or more non-directional prediction modes are for example H.264. It includes Planar prediction mode and DC prediction mode defined by H.265 / HEVC (High-Efficiency Video Coding) standard (Non-patent Document 1).
  • the multiple directionality prediction modes are for example H.264. It includes 33-direction prediction modes defined in the H.265 / HEVC standard. In addition to the 33 directions, the plurality of directionality prediction modes may further include 32 direction prediction modes (a total of 65 directionality prediction modes).
  • FIG. 5A is a diagram illustrating 67 intra prediction modes (two non-directional prediction modes and 65 directional prediction modes) in intra prediction. The solid line arrows The 33 directions defined in the H.265 / HEVC standard are represented, and the dashed arrow represents the added 32 directions.
  • the luminance block may be referred to in the intra prediction of the color difference block. That is, the color difference component of the current block may be predicted based on the luminance component of the current block.
  • Such intra prediction is sometimes called CCLM (cross-component linear model) prediction.
  • the intra prediction mode (for example, called CCLM mode) of the color difference block which refers to such a luminance block may be added as one of the intra prediction modes of the color difference block.
  • the intra prediction unit 124 may correct the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal / vertical direction. Intra prediction with such correction may be called PDPC (position dependent intra prediction combination). Information indicating whether or not PDPC is applied (for example, referred to as a PDPC flag) is signaled, for example, at the CU level.
  • the signalization of this information need not be limited to the CU level, but may be another level (for example, a sequence level, a picture level, a slice level, a tile level, or a CTU level).
  • the inter prediction unit 126 refers to a reference picture stored in the frame memory 122 and is different from the current picture, and performs inter prediction (also referred to as inter-screen prediction) of the current block, thereby generating a prediction signal (inter prediction signal). Prediction signal). Inter prediction is performed in units of a current block or a sub-block (for example, 4 ⁇ 4 block) in the current block. For example, the inter prediction unit 126 performs motion estimation in the reference picture for the current block or sub-block. Then, the inter prediction unit 126 generates an inter prediction signal of the current block or sub-block by performing motion compensation using motion information (for example, a motion vector) obtained by motion search. Then, the inter prediction unit 126 outputs the generated inter prediction signal to the prediction control unit 128.
  • inter prediction also referred to as inter-screen prediction
  • a motion vector predictor may be used for signalizing the motion vector. That is, the difference between the motion vector and the predicted motion vector may be signaled.
  • an inter prediction signal may be generated using not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks. Specifically, the inter prediction signal is generated in units of sub-blocks in the current block by weighted addition of the prediction signal based on the motion information obtained by motion search and the prediction signal based on the motion information of adjacent blocks. May be.
  • Such inter prediction motion compensation
  • OBMC overlapped block motion compensation
  • OBMC block size information indicating the size of a sub-block for OBMC
  • OBMC flag information indicating whether or not to apply the OBMC mode
  • the level of signalization of these information does not need to be limited to the sequence level and the CU level, and may be other levels (for example, a picture level, a slice level, a tile level, a CTU level, or a sub-block level). Good.
  • FIG. 5B and FIG. 5C are a flowchart and a conceptual diagram for explaining the outline of the predicted image correction process by the OBMC process.
  • a prediction image (Pred) by normal motion compensation is acquired using a motion vector (MV) assigned to an encoding target block.
  • MV motion vector
  • a prediction image (Pred_L) is obtained by applying the motion vector (MV_L) of the encoded left adjacent block to the encoding target block, and prediction is performed by superimposing the prediction image and Pred_L with weights. Perform the first correction of the image.
  • the motion vector (MV_U) of the encoded upper adjacent block is applied to the block to be encoded to obtain a prediction image (Pred_U), and the prediction image and Pred_U that have been subjected to the first correction are weighted. Then, the second correction of the predicted image is performed by superimposing and making it the final predicted image.
  • the two-step correction method using the left adjacent block and the upper adjacent block has been described here, the correction may be performed more times than the two steps using the right adjacent block and the lower adjacent block. Is possible.
  • the area to be overlapped may not be the pixel area of the entire block, but only a part of the area near the block boundary.
  • the processing target block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
  • obmc_flag is a signal indicating whether or not to apply the OBMC process.
  • the encoding apparatus it is determined whether or not the encoding target block belongs to a complex motion region, and if it belongs to a complex motion region, a value 1 is set as obmc_flag. Encoding is performed by applying the OBMC process, and if it does not belong to a complex region of motion, the value 0 is set as obmc_flag and the encoding is performed without applying the OBMC process.
  • the decoding apparatus by decoding the obmc_flag described in the stream, decoding is performed by switching whether to apply the OBMC process according to the value.
  • the motion information may be derived on the decoding device side without being converted into a signal.
  • H.M. A merge mode defined in the H.265 / HEVC standard may be used.
  • the motion information may be derived by performing motion search on the decoding device side. In this case, motion search is performed without using the pixel value of the current block.
  • the mode in which motion search is performed on the decoding device side is sometimes called a PMMVD (patterned motion vector derivation) mode or an FRUC (frame rate up-conversion) mode.
  • PMMVD patterned motion vector derivation
  • FRUC frame rate up-conversion
  • FIG. 5D An example of FRUC processing is shown in FIG. 5D.
  • a list of a plurality of candidates each having a predicted motion vector (may be common with the merge list) is generated Is done.
  • the best candidate MV is selected from a plurality of candidate MVs registered in the candidate list. For example, the evaluation value of each candidate included in the candidate list is calculated, and one candidate is selected based on the evaluation value.
  • a motion vector for the current block is derived based on the selected candidate motion vector.
  • the selected candidate motion vector (best candidate MV) is directly derived as a motion vector for the current block.
  • the motion vector for the current block may be derived by performing pattern matching in the peripheral region at the position in the reference picture corresponding to the selected candidate motion vector. That is, the same method is used to search the area around the best candidate MV, and if there is an MV with a good evaluation value, the best candidate MV is updated to the MV, and the current block is updated. The final MV may be used. It is also possible to adopt a configuration in which the processing is not performed.
  • the same processing may be performed when processing is performed in units of sub-blocks.
  • the evaluation value is calculated by obtaining a difference value of the reconstructed image by pattern matching between a region in the reference picture corresponding to the motion vector and a predetermined region. Note that the evaluation value may be calculated using information other than the difference value.
  • the first pattern matching and the second pattern matching may be referred to as bilateral matching and template matching, respectively.
  • pattern matching is performed between two blocks in two different reference pictures that follow the motion trajectory of the current block. Therefore, in the first pattern matching, a region in another reference picture along the motion trajectory of the current block is used as the predetermined region for calculating the candidate evaluation value described above.
  • FIG. 6 is a diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory.
  • first pattern matching two blocks along the motion trajectory of the current block (Cur block) and two blocks in two different reference pictures (Ref0, Ref1) are used.
  • two motion vectors MV0, MV1 are derived.
  • MV0, MV1 a reconstructed image at a designated position in the first encoded reference picture (Ref0) designated by the candidate MV, and a symmetric MV obtained by scaling the candidate MV at a display time interval.
  • the difference from the reconstructed image at the designated position in the second encoded reference picture (Ref1) designated in (2) is derived, and the evaluation value is calculated using the obtained difference value.
  • the candidate MV having the best evaluation value among the plurality of candidate MVs may be selected as the final MV.
  • the motion vectors (MV0, MV1) pointing to the two reference blocks are temporal distances between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). It is proportional to (TD0, TD1).
  • the first pattern matching uses a mirror-symmetric bi-directional motion vector Is derived.
  • pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (for example, an upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, a block adjacent to the current block in the current picture is used as the predetermined region for calculating the candidate evaluation value described above.
  • FIG. 7 is a diagram for explaining an example of pattern matching (template matching) between a template in the current picture and a block in the reference picture.
  • the current block is searched by searching the reference picture (Ref0) for the block that most closely matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic).
  • Ref0 the reference picture
  • the reconstructed image of the encoded region of the left adjacent area and / or the upper adjacent area, and the equivalent in the encoded reference picture (Ref0) designated by the candidate MV When a difference from the reconstructed image at the position is derived, an evaluation value is calculated using the obtained difference value, and a candidate MV having the best evaluation value among a plurality of candidate MVs is selected as the best candidate MV. Good.
  • FRUC flag Information indicating whether or not to apply such FRUC mode
  • FRUC flag information indicating whether or not to apply such FRUC mode
  • the FRUC mode is applied (for example, when the FRUC flag is true)
  • information indicating the pattern matching method (first pattern matching or second pattern matching) (for example, called the FRUC mode flag) is signaled at the CU level. It becomes. Note that the signalization of these pieces of information need not be limited to the CU level, but may be other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level). .
  • BIO bi-directional optical flow
  • FIG. 8 is a diagram for explaining a model assuming constant velocity linear motion.
  • (v x , v y ) indicates a velocity vector
  • ⁇ 0 and ⁇ 1 are the time between the current picture (Cur Pic) and two reference pictures (Ref 0 , Ref 1 ), respectively.
  • the distance. (MVx 0 , MVy 0 ) indicates a motion vector corresponding to the reference picture Ref 0
  • (MVx 1 , MVy 1 ) indicates a motion vector corresponding to the reference picture Ref 1 .
  • This optical flow equation consists of (i) the product of the time derivative of the luminance value, (ii) the horizontal component of the horizontal velocity and the spatial gradient of the reference image, and (iii) the vertical velocity and the spatial gradient of the reference image. Indicates that the sum of the products of the vertical components of is equal to zero. Based on a combination of this optical flow equation and Hermite interpolation, a block-based motion vector obtained from a merge list or the like is corrected in pixel units.
  • the motion vector may be derived on the decoding device side by a method different from the derivation of the motion vector based on the model assuming constant velocity linear motion.
  • a motion vector may be derived for each subblock based on the motion vectors of a plurality of adjacent blocks.
  • This mode may be referred to as an affine motion compensation prediction mode.
  • FIG. 9A is a diagram for explaining derivation of a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks.
  • the current block includes 16 4 ⁇ 4 sub-blocks.
  • the motion vector v 0 of the upper left corner control point of the current block is derived based on the motion vector of the adjacent block
  • the motion vector v 1 of the upper right corner control point of the current block is derived based on the motion vector of the adjacent sub block. Is done.
  • the motion vector (v x , v y ) of each sub-block in the current block is derived by the following equation (2).
  • x and y indicate the horizontal position and vertical position of the sub-block, respectively, and w indicates a predetermined weight coefficient.
  • Such an affine motion compensation prediction mode may include several modes in which the motion vector derivation methods of the upper left and upper right corner control points are different.
  • Information indicating such an affine motion compensation prediction mode (for example, called an affine flag) is signaled at the CU level. Note that the information indicating the affine motion compensation prediction mode need not be limited to the CU level, but other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level). ).
  • the prediction control unit 128 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal to the subtraction unit 104 and the addition unit 116 as a prediction signal.
  • FIG. 9B is a diagram for explaining the outline of the motion vector deriving process in the merge mode.
  • a prediction MV list in which prediction MV candidates are registered is generated.
  • prediction MV candidates spatial adjacent prediction MVs that are MVs of a plurality of encoded blocks located spatially around the encoding target block, and the position of the encoding target block in the encoded reference picture are projected.
  • Temporal adjacent prediction MV that is MV of neighboring blocks combined prediction MV that is MV generated by combining MV values of spatial adjacent prediction MV and temporal adjacent prediction MV, zero prediction MV that is MV having a value of zero, and the like There is.
  • variable length encoding unit describes and encodes merge_idx which is a signal indicating which prediction MV is selected in the stream.
  • the prediction MV registered in the prediction MV list described with reference to FIG. 9B is an example, and the number of prediction MVs may be different from the number in the figure, or may not include some types of prediction MVs in the figure. It may be the composition which added prediction MV other than the kind of prediction MV in a figure.
  • the final MV may be determined by performing DMVR processing, which will be described later, using the MV of the encoding target block derived by the merge mode.
  • FIG. 9C is a conceptual diagram for explaining an outline of DMVR processing.
  • the optimal MVP set in the processing target block is set as a candidate MV, and reference pixels from a first reference picture that is a processed picture in the L0 direction and a second reference picture that is a processed picture in the L1 direction are set according to the candidate MV. Are obtained, and a template is generated by taking the average of each reference pixel.
  • the peripheral areas of the candidate MVs of the first reference picture and the second reference picture are searched, respectively, and the MV with the lowest cost is determined as the final MV.
  • the cost value is calculated using a difference value between each pixel value of the template and each pixel value of the search area, an MV value, and the like.
  • FIG. 9D is a diagram for explaining an outline of a predicted image generation method using luminance correction processing by LIC processing.
  • an MV for obtaining a reference image corresponding to a block to be encoded is derived from a reference picture that is an encoded picture.
  • the predicted image for the encoding target block is generated by performing the brightness correction process using the brightness correction parameter for the reference image in the reference picture specified by MV.
  • the shape of the peripheral reference region in FIG. 9D is an example, and other shapes may be used.
  • the process of generating a predicted image from one reference picture has been described, but the same applies to the case of generating a predicted image from a plurality of reference pictures, and the same applies to reference images acquired from each reference picture.
  • the predicted image is generated after performing the luminance correction processing by the method.
  • lic_flag is a signal indicating whether to apply LIC processing.
  • the encoding device it is determined whether or not the encoding target block belongs to an area where the luminance change occurs, and if it belongs to the area where the luminance change occurs, lic_flag is set. Encode by applying LIC processing with a value of 1 set, and if not belonging to an area where a luminance change has occurred, set 0 as lic_flag and perform encoding without applying the LIC processing .
  • the decoding device by decoding lic_flag described in the stream, decoding is performed by switching whether to apply the LIC processing according to the value.
  • a method for determining whether or not to apply LIC processing for example, there is a method for determining whether or not LIC processing has been applied to peripheral blocks.
  • the encoding target block is in the merge mode
  • whether or not the surrounding encoded blocks selected in the derivation of the MV in the merge mode processing are encoded by applying the LIC processing. Judgment is performed, and encoding is performed by switching whether to apply the LIC processing according to the result.
  • the decoding process is exactly the same.
  • FIG. 10 is a block diagram showing a functional configuration of decoding apparatus 200 according to Embodiment 1.
  • the decoding device 200 is a moving image / image decoding device that decodes moving images / images in units of blocks.
  • the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, and a frame memory 214. And an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
  • the decoding device 200 is realized by, for example, a general-purpose processor and a memory.
  • the processor executes the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, and the intra prediction unit. 216, the inter prediction unit 218, and the prediction control unit 220.
  • the decoding apparatus 200 is dedicated to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. It may be realized as one or more electronic circuits.
  • the entropy decoding unit 202 performs entropy decoding on the encoded bit stream. Specifically, the entropy decoding unit 202 performs arithmetic decoding from a coded bitstream to a binary signal, for example. Then, the entropy decoding unit 202 debinarizes the binary signal. As a result, the entropy decoding unit 202 outputs the quantized coefficient to the inverse quantization unit 204 in units of blocks.
  • the inverse quantization unit 204 inversely quantizes the quantization coefficient of a decoding target block (hereinafter referred to as a current block) that is an input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inversely quantizes each quantization coefficient of the current block based on the quantization parameter corresponding to the quantization coefficient. Then, the inverse quantization unit 204 outputs the quantization coefficient (that is, the transform coefficient) obtained by inverse quantization of the current block to the inverse transform unit 206.
  • a decoding target block hereinafter referred to as a current block
  • the inverse quantization unit 204 inversely quantizes each quantization coefficient of the current block based on the quantization parameter corresponding to the quantization coefficient. Then, the inverse quantization unit 204 outputs the quantization coefficient (that is, the transform coefficient) obtained by inverse quantization of the current block to the inverse transform unit 206.
  • the inverse transform unit 206 restores the prediction error by inverse transforming the transform coefficient that is an input from the inverse quantization unit 204.
  • the inverse conversion unit 206 determines the current block based on the information indicating the read conversion type. Inversely transform the conversion coefficient of.
  • the inverse transform unit 206 applies inverse retransformation to the transform coefficient.
  • the adder 208 reconstructs the current block by adding the prediction error input from the inverse converter 206 and the prediction sample input from the prediction controller 220. Then, the adding unit 208 outputs the reconfigured block to the block memory 210 and the loop filter unit 212.
  • the block memory 210 is a storage unit for storing a block that is referred to in intra prediction and that is within a decoding target picture (hereinafter referred to as a current picture). Specifically, the block memory 210 stores the reconstructed block output from the adding unit 208.
  • the loop filter unit 212 applies a loop filter to the block reconstructed by the adding unit 208, and outputs the filtered reconstructed block to the frame memory 214, the display device, and the like.
  • one filter is selected from the plurality of filters based on the local gradient direction and activity, The selected filter is applied to the reconstruction block.
  • the frame memory 214 is a storage unit for storing a reference picture used for inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed block filtered by the loop filter unit 212.
  • the intra prediction unit 216 performs intra prediction with reference to the block in the current picture stored in the block memory 210 based on the intra prediction mode read from the encoded bitstream, so that a prediction signal (intra prediction Signal). Specifically, the intra prediction unit 216 generates an intra prediction signal by performing intra prediction with reference to a sample (for example, luminance value and color difference value) of a block adjacent to the current block, and performs prediction control on the intra prediction signal. Output to the unit 220.
  • a prediction signal for example, luminance value and color difference value
  • the intra prediction unit 216 may predict the color difference component of the current block based on the luminance component of the current block.
  • the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal / vertical direction.
  • the inter prediction unit 218 refers to the reference picture stored in the frame memory 214 and predicts the current block. Prediction is performed in units of a current block or a sub-block (for example, 4 ⁇ 4 block) in the current block. For example, the inter prediction unit 218 generates an inter prediction signal of the current block or sub-block by performing motion compensation using motion information (for example, a motion vector) read from the encoded bitstream, and generates the inter prediction signal. The result is output to the prediction control unit 220.
  • motion information for example, a motion vector
  • the inter prediction unit 218 When the information read from the encoded bitstream indicates that the OBMC mode is to be applied, the inter prediction unit 218 includes not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks. To generate an inter prediction signal.
  • the inter prediction unit 218 follows the pattern matching method (bilateral matching or template matching) read from the encoded stream. Motion information is derived by performing motion search. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.
  • the inter prediction unit 218 derives a motion vector based on a model assuming constant velocity linear motion. Also, when the information read from the encoded bitstream indicates that the affine motion compensated prediction mode is applied, the inter prediction unit 218 determines the motion vector in units of subblocks based on the motion vectors of a plurality of adjacent blocks. Is derived.
  • the prediction control unit 220 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal to the adding unit 208 as a prediction signal.
  • FIG. 11 is a block diagram for explaining processing related to inter-screen prediction performed by the encoding device 100 shown in FIG. For example, the input image is divided into blocks by the dividing unit 102 shown in FIG. Then, processing is performed for each block.
  • the subtraction unit 104 generates a difference image by acquiring a difference between the input image in block units and a prediction image generated by intra prediction or inter prediction. Then, the conversion unit 106 and the quantization unit 108 generate a coefficient signal by performing conversion and quantization on the difference image.
  • the entropy encoding unit 110 generates an encoded stream (encoded bit stream) by performing entropy encoding on the generated coefficient signal and other encoded signals.
  • the inverse quantization unit 112 and the inverse transform unit 114 restore the difference image by performing inverse quantization and inverse transform on the generated coefficient signal.
  • the intra prediction unit (intra prediction unit) 124 generates a prediction image by intra prediction
  • the inter prediction unit (inter prediction unit) 126 generates a prediction image by inter prediction.
  • the adding unit 116 generates a reconstructed image by adding one of the predicted image generated by the intra-screen prediction and the predicted image generated by the inter-screen prediction and the restored difference image.
  • the intra prediction unit 124 uses the reconstructed image of the processed block for intra prediction of another block to be processed later.
  • the loop filter unit 120 applies a loop filter to the reconstructed image of the processed block, and stores the reconstructed image to which the loop filter is applied in the frame memory 122.
  • the inter-screen prediction unit 126 uses the reconstructed image stored in the frame memory 122 for inter-screen prediction of another block in another picture to be processed later.
  • the inter-screen prediction unit 126 performs inter-screen prediction according to the inter-screen prediction control signal set from the outside.
  • FRUC control information, sub-block processing control information, and the like are used as the inter-screen prediction control signal.
  • the entropy encoding unit 110 encodes FRUC control information, sub-block processing control information, and the like into a stream as an inter-screen prediction control signal.
  • the above FRUC control information is information indicating a method for deriving a motion vector.
  • FRUC control information indicates one of a plurality of methods for deriving a motion vector.
  • the FRUC control information corresponds to information indicating whether or not to apply the FRUC mode and information indicating a pattern matching method as described above.
  • the sub-block processing control information is information indicating whether it is effective or ineffective to perform motion compensation in units of sub-blocks constituting the block.
  • the FRUC control information may be encoded into the header layer of the processing target block, may be encoded into the header layer of the processing target slice, or may be encoded into the header layer of the processing target picture. However, it may be encoded into the header layer of the processing target stream.
  • the sub-block processing control information may be encoded into the header layer of the processing target block, may be encoded into the header layer of the processing target slice, or encoded into the header layer of the processing target picture. Alternatively, it may be encoded into the header layer of the processing target stream.
  • the inter-screen prediction control signal may be set from the outside of the encoding device 100.
  • the inter-screen prediction control signal may be determined according to processing performance.
  • the inter-screen prediction control signal may not be used. In this case, the inter-screen prediction control signal may not be encoded.
  • the inter-screen prediction control signal is not limited to being set from the outside of the encoding apparatus 100, and may be set inside the encoding apparatus 100.
  • the inter-screen prediction unit 126 may set an inter-screen prediction control signal. Specifically, the inter-screen prediction unit 126 may evaluate the inter-screen prediction control signal setting candidates according to the degree of matching between the predicted image generated according to the inter-screen prediction control signal setting candidates and the input image. Then, the inter-screen prediction unit 126 may set an inter-screen prediction control signal according to the evaluation result.
  • the degree of matching between the predicted image and the input image can be evaluated by the difference between the predicted image and the input image.
  • the degree of matching between other images described in this embodiment and the like can be similarly evaluated based on the difference between images.
  • FIG. 12 is a block diagram for explaining processing related to inter-screen prediction performed by the decoding device 200 shown in FIG.
  • the entropy decoding unit 202 performs entropy decoding on the input stream that is the encoded stream, thereby acquiring information in units of blocks. Then, processing is performed for each block.
  • the inverse quantization unit 204 and the inverse transform unit 206 restore the difference image by performing inverse quantization and inverse transform on the coefficient signal decoded for each block.
  • the intra prediction unit (intra prediction unit) 216 generates a prediction image by intra prediction
  • the inter prediction unit (inter prediction unit) 218 generates a prediction image by inter prediction
  • the adding unit 208 generates a reconstructed image by adding one of the predicted image generated by the intra-screen prediction and the predicted image generated by the inter-screen prediction and the restored difference image.
  • the intra-screen prediction unit 216 uses the reconstructed image of the processed block for intra-screen prediction of another block to be processed later. Further, the loop filter unit 212 applies a loop filter to the reconstructed image of the processed block, and stores the reconstructed image to which the loop filter is applied in the frame memory 214. The inter-screen prediction unit 218 uses the reconstructed image stored in the frame memory 214 for inter-screen prediction of another block in another picture to be processed later.
  • the inter-screen prediction unit 218 performs inter-screen prediction according to the inter-screen prediction control signal acquired from the input stream by entropy decoding.
  • FRUC control information, sub-block processing control information, and the like are used as the inter-screen prediction control signal. That is, the entropy decoding unit 202 decodes FRUC control information, sub-block processing control information, and the like from the stream as inter-screen prediction control signals.
  • the FRUC control information may be decoded from the header layer of the processing target block, may be decoded from the header layer of the processing target slice, may be decoded from the header layer of the processing target picture, It may be decoded from the header layer of the target stream.
  • the sub-block processing control information may be decoded from the header layer of the processing target block, may be decoded from the header layer of the processing target slice, or may be decoded from the header layer of the processing target picture. However, it may be decoded from the header layer of the processing target stream.
  • the inter-screen prediction control signal set in the encoding device 100 may be set from the outside of the decoding device 200. Further, when the FRUC control information, the sub-block processing control information, and the like are determined in advance in the same way in the encoding device 100 and the decoding device 200, the inter-screen prediction control signal may not be used. In this case, the inter-screen prediction control signal may not be decoded.
  • inter-screen prediction a plurality of specific examples of inter-screen prediction will be shown. For example, one of a plurality of specific examples is applied.
  • the operation of the encoding device 100 is mainly shown, but the operation of the decoding device 200 is basically the same.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the encoding apparatus 100 encodes FRUC control information, sub-block processing control information, and the like used for inter-screen prediction into a stream.
  • FRUC control information, sub-block processing control information, and the like may be set in advance from the outside, or may be set in advance by the encoding apparatus 100 itself.
  • the decoding device 200 decodes FRUC control information and sub-block processing control information used for inter-screen prediction from the stream.
  • the encoding apparatus 100 derives a motion vector according to the degree of matching between the image of the processing target region and the reconstructed image of the region in the reference picture, and encodes motion vector information.
  • the decoding apparatus 200 decodes motion vector information and derives a motion vector.
  • the above motion vector information is information related to the motion vector and directly or indirectly indicates the motion vector.
  • the motion vector information may indicate the motion vector itself, or may indicate a differential motion vector that is a difference between the motion vector and the predicted motion vector, and an identifier of the predicted motion vector.
  • the normal inter-screen prediction method may be expressed as a basic inter-screen prediction method.
  • the encoding device 100 and the decoding device 200 derive a motion vector without encoding and decoding motion vector information.
  • the encoding device 100 and the decoding device 200 calculate the motion vector according to the matching degree between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture. To derive.
  • the encoding device 100 and the decoding device 200 derive a motion vector according to the degree of matching between two reconstructed images in two regions in two reference pictures.
  • the FRUC control information in the following description indicates the normal inter-screen prediction method as 0, the template FRUC method as 1, and the bilateral FRUC method as 2.
  • these numbers and classifications are examples, and numbers and classifications different from these numbers and classifications may be used.
  • sub-block processing control information in the following description indicates that it is effective to perform motion compensation in units of sub-blocks, and indicates that it is invalid to perform motion compensation in units of sub-blocks. As shown. However, these numbers are examples, and numbers different from these numbers may be used.
  • This block is also referred to as a prediction block.
  • the block may be an image data unit to be encoded and decoded, or may be an image data unit to be reconstructed.
  • the subblock which comprises a block may be defined by predetermined size.
  • the sub-block may be composed of 16 pixels of 4 ⁇ 4, for example. Then, one or more sub-blocks constituting the block may be determined by dividing the block by a predetermined size.
  • FIG. 13 is a flowchart illustrating a first specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 performs processing for each block. For example, when the FRUC control information indicates 0 (0 in S101), the inter-screen prediction unit 126 derives a block-based motion vector (MV) according to the normal inter-screen prediction method (S111). Then, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vectors in units of blocks as they are (S117).
  • MV block-based motion vector
  • the inter-screen prediction unit 126 derives a motion vector in block units according to the template FRUC method (S121).
  • the inter-screen prediction unit 126 derives a block-based motion vector according to the bilateral FRUC method (S131).
  • the inter-screen prediction unit 126 derives a motion vector in units of blocks according to the template FRUC method or the bilateral method, and then derives a motion vector in units of sub-blocks according to the bilateral method (S136). At this time, for example, the inter-screen prediction unit 126 derives a motion vector in units of sub-blocks using the motion vector in units of blocks. More specifically, the inter-screen prediction unit 126 uses a motion vector in units of blocks as a candidate motion vector for a motion vector in units of sub-blocks.
  • the bilateral FRUC method is applied regardless of whether the method for deriving the motion vector in block units is the template FRUC method or the bilateral FRUC method. That is, even if the template FRUC method is applied to the derivation of the motion vector for each block, the bilateral FRUC method is applied to the derivation of the motion vector for each sub-block.
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using the motion vector in units of sub-blocks (S137). The inter-screen prediction unit 126 then repeats derivation of motion vectors (S136) and motion compensation (S137) for each sub-block in the block.
  • a reconstructed image of an area adjacent to the processing target area is used to derive a motion vector of the processing target area.
  • a reconstructed image for deriving a motion vector according to the template FRUC method is not generated, and there is a possibility that a sub-block unit motion vector is not properly derived according to the template FRUC method.
  • the bilateral FRUC method is applied instead of the template FRUC method for deriving motion vectors in units of sub-blocks.
  • the motion vector of a subblock unit can be derived
  • a sub-block-based motion vector is derived according to the bilateral FRUC method.
  • the present invention is not limited to this, and when a motion vector in units of blocks is derived according to the normal inter-screen prediction method, a motion vector in units of sub-blocks may be derived according to the bilateral FRUC method.
  • FIG. 14 is a flowchart illustrating a second specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 operates in the same manner as in the first specific example.
  • the inter-screen prediction unit 126 derives a block-based motion vector according to the template FRUC method (S121).
  • the inter-screen prediction unit 126 determines whether or not the motion vector derived as the block-based motion vector according to the template FRUC method is a motion vector for bidirectional prediction (S122). In other words, the inter-screen prediction unit 126 determines whether the motion vector for each block is a bidirectional motion vector or a unidirectional motion vector.
  • the inter-screen prediction unit 126 When it is determined that the motion vector in block units is a unidirectional motion vector (No in S122), the inter-screen prediction unit 126 performs motion compensation in block units using the block motion vectors as they are. Perform (S117). Thereby, the inter-screen prediction unit 126 generates an inter-screen prediction image.
  • the inter-screen prediction unit 126 when it is determined that the motion vector in units of blocks is a motion vector for bidirectional prediction (Yes in S122), the inter-screen prediction unit 126, in the same way as in the first specific example, performs sub-block units in accordance with the bilateral method.
  • the motion vector is derived (S136).
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using motion vectors in units of sub-blocks (S137).
  • bi-predictive motion vectors are derived using bi-predictive motion vector candidates. Therefore, when a motion vector derived as a block-based motion vector according to the template FRUC method is a unidirectional prediction motion vector, it is not used as a candidate as it is.
  • a motion vector derived as a block-unit motion vector according to the template FRUC method is a unidirectional motion vector
  • a sub-block unit motion vector is not derived according to the bilateral FRUC method. Then, motion compensation is performed in units of blocks using the motion vectors in units of blocks.
  • a motion vector derived as a block-unit motion vector according to the template FRUC method is a bidirectional prediction motion vector
  • a sub-block unit motion vector is derived according to the bilateral FRUC method. Then, motion compensation is performed in units of subblocks using motion vectors in units of subblocks.
  • the motion vector in units of blocks is suitable for a candidate for deriving the motion vector in units of sub-blocks according to the bilateral FRUC method
  • the motion vectors in units of sub-blocks can be derived according to the bilateral FRUC method. Therefore, a sub-block unit motion vector can be appropriately derived according to the bilateral FRUC method.
  • a motion vector in block units is derived according to the template FRUC method, whether or not processing is performed in subblock units is controlled according to bi-directional prediction or uni-directional prediction.
  • the present invention is not limited to this, and even when a motion vector in block units is derived according to the normal inter-screen prediction method, whether or not to perform processing in sub-block units may be controlled according to bidirectional prediction or unidirectional prediction. .
  • FIG. 15 is a flowchart illustrating a third specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 operates in the same manner as in the first specific example.
  • the inter-screen prediction unit 126 derives a block-based motion vector according to the template FRUC method (S121).
  • the FRUC control information indicates 2 (2 in S101)
  • the inter-screen prediction unit 126 derives a block-based motion vector according to the bilateral FRUC method (S131).
  • the inter-screen prediction unit 126 determines whether the sub-block processing control information indicates 0 or 1 after deriving a motion vector for each block according to the template FRUC method or the bilateral method (S133). ).
  • the sub-block processing control information indicates that it is effective to perform motion compensation in units of sub-blocks, and that it is invalid to perform motion compensation in units of sub-blocks. Shown as 0.
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vector in units of blocks as it is. (S117).
  • the inter-screen prediction unit 126 derives a motion vector in units of sub-blocks according to the bilateral method as in the first specific example (S136). Then, similarly to the first specific example, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using motion vectors in units of sub-blocks (S137).
  • the encoding apparatus 100 can flexibly switch between performing motion compensation in units of sub-blocks and performing motion compensation in units of blocks. Then, the encoding apparatus 100 and the decoding apparatus 200 perform motion compensation in units of subblocks in the same way between the encoding apparatus 100 and the decoding apparatus 200 by encoding and decoding the subblock processing control information, or in units of blocks. To switch between motion compensation.
  • FIG. 16 is a flowchart illustrating a fourth specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
  • the inter-screen prediction unit 126 derives a motion vector in block units according to the template FRUC method (S121). Then, the inter-screen prediction unit 126 determines whether or not the motion vector derived as a block-based motion vector according to the template FRUC method is a motion vector for bidirectional prediction (S122).
  • the inter-screen prediction unit 126 If it is determined that the motion vector in units of blocks is a unidirectional motion vector (No in S122), the inter-screen prediction unit 126 operates in the same manner as in the second specific example. On the other hand, when it is determined that the motion vector in units of blocks is a motion vector for bidirectional prediction (Yes in S122), the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
  • the second specific example and the third specific example are combined.
  • the sub-block unit motion vector can be derived according to the bilateral FRUC method. Also, it is possible to flexibly switch between performing motion compensation in units of sub-blocks and performing motion compensation in units of blocks.
  • a block-based motion vector when a block-based motion vector is derived according to the template FRUC method, whether to perform processing in subblock units according to bi-directional prediction or unidirectional prediction and sub-block processing control information. Is controlled. Not only this, but also when motion vectors in block units are derived according to the normal inter-screen prediction method, whether to perform processing in sub-block units according to bi-directional prediction or uni-directional prediction and sub-block processing control information Whether or not may be controlled.
  • FIG. 17 is a flowchart illustrating a fifth specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
  • the inter-screen prediction unit 126 derives a block-based motion vector according to the normal inter-screen prediction method (S111). Then, the inter-screen prediction unit 126 determines whether the sub-block processing control information indicates 0 or 1 after deriving a motion vector for each block according to the normal inter-screen prediction method (S133).
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vector in units of blocks as it is. (S117).
  • the inter-screen prediction unit 126 derives a motion vector for each sub-block according to the bilateral method (S136). At that time, in the first specific example, the inter-screen prediction unit 126 derives a motion vector for each sub-block according to the bilateral method, similarly to the process for deriving the motion vector for each sub-block according to the bilateral method.
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using the motion vector in units of sub-blocks (S137).
  • the template FRUC method and the bilateral FRUC method can be flexibly switched between performing motion compensation in sub-block units or performing motion compensation in block units.
  • FIG. 18 is a flowchart illustrating a sixth specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
  • the inter-screen prediction unit 126 derives a block-based motion vector according to the template FRUC method (S121).
  • the inter-screen prediction unit 126 determines whether the sub-block processing control information indicates 0 or 1 after deriving the motion vector for each block according to the template FRUC method (S123). As described above, here, the sub-block processing control information indicates that it is effective to perform motion compensation in units of sub-blocks, and that it is invalid to perform motion compensation in units of sub-blocks. Shown as 0.
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vector in units of blocks as it is. (S117).
  • the inter-screen prediction unit 126 derives a motion vector for each sub-block according to the template method (S126). At this time, for example, the inter-screen prediction unit 126 derives a motion vector in units of sub-blocks using the motion vector in units of blocks. More specifically, the inter-screen prediction unit 126 uses a motion vector in units of blocks as a candidate motion vector for a motion vector in units of sub-blocks.
  • the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using the motion vector in units of sub-blocks (S127). Then, the inter-screen prediction unit 126 repeats motion vector derivation (S126) and motion compensation (S127) for each sub-block in the block.
  • a motion vector for each sub-block is derived according to the template FRUC method.
  • a motion vector for each subblock is derived according to the bilateral FRUC scheme.
  • the template FRUC method or the bilateral FRUC method can be applied adaptively as a method used for deriving a motion vector in units of sub-blocks.
  • one method used for deriving a motion vector in units of blocks is selected from the three methods of the normal inter-screen prediction method, the template FRUC method, and the bilateral FRUC method. Yes.
  • one method used for deriving a motion vector in units of blocks may be selected from four or more methods including another method different from these three methods.
  • the other method may be handled in the same manner as one of the three methods.
  • sub-block processing control information may be used to determine whether to perform motion compensation in units of sub-blocks.
  • whether or not the motion vector in units of blocks is a bi-predictive motion vector in determining whether to perform motion compensation in units of sub-blocks. May be used.
  • a merge mode method for deriving a motion vector of a region spatially or temporally adjacent to a processing target region as a motion vector of the processing target region.
  • affine transformation there are other methods using affine transformation.
  • the selection range may be narrowed down to one or more of the above four or more methods.
  • one method used for deriving a motion vector in units of blocks may be selected from two predetermined methods. Specifically, one method may be selected from the normal inter-screen prediction method and the template FRUC method, or one method may be selected from the normal inter-screen prediction method and the bilateral FRUC method. . Alternatively, one method may be selected from the template FRUC method and the bilateral FRUC method.
  • one method used for deriving a motion vector in units of blocks may be determined in advance.
  • a normal inter-screen prediction method may be determined in advance
  • a template FRUC method may be determined in advance
  • a bilateral method may be determined in advance. It may be determined.
  • the bidirectional prediction described here may be bidirectional prediction using the previous reference picture and the subsequent reference picture in the display order, or may be bidirectional prediction using the two previous reference pictures in the display order.
  • bi-directional prediction using the two subsequent reference pictures in the display order may be used. That is, in bi-directional prediction, the previous reference picture and the subsequent reference picture may be used in the display order, the two previous reference pictures may be used in the display order, or the subsequent reference pictures may be used in the display order. Two reference pictures may be used.
  • the subblock processing control information may not be encoded or decoded.
  • the sub-block processing control information may not be encoded or decoded.
  • the sub-block processing control information is encoded. It does not have to be or may not be decoded.
  • Temporal FRUC method and bilateral FRUC method a method for deriving a motion vector according to the template FRUC method or the bilateral FRUC method will be described.
  • a method for deriving a motion vector in units of blocks and a method for deriving a motion vector in units of sub-blocks are basically the same.
  • a method for deriving a motion vector of a block and a method for deriving a motion vector of a sub-block will be described as methods for deriving a motion vector of a processing target region.
  • FIG. 19 is a conceptual diagram showing a template FRUC method used for derivation of a motion vector of a processing target area in the encoding device 100 and the decoding device 200.
  • a motion vector is derived using a common method between the encoding device 100 and the decoding device 200 without encoding and decoding of motion vector information of the processing target region.
  • a motion vector is derived using a reconstructed image of an adjacent region that is a region adjacent to the processing target region and a reconstructed image of a corresponding adjacent region that is a region in the reference picture.
  • the adjacent region is one or both of the region adjacent to the left and the region adjacent above the processing target region.
  • the corresponding adjacent region is a region specified using a candidate motion vector that is a candidate motion vector of the processing target region. Specifically, the corresponding adjacent region is a region indicated by the candidate motion vector from the adjacent region. In addition, the relative position of the corresponding adjacent area with respect to the corresponding area indicated by the candidate motion vector from the processing target area is equal to the relative position of the adjacent area with respect to the processing target area.
  • FIG. 20 is a conceptual diagram showing a bilateral FRUC method used in the encoding device 100 and the decoding device 200 for deriving the motion vector of the processing target region.
  • the bilateral FRUC method similarly to the template FRUC method, a method common to the encoding device 100 and the decoding device 200 is used without encoding and decoding of motion vector information of the processing target region. A motion vector is derived.
  • a motion vector is derived using two reconstructed images of two regions in two reference pictures. For example, as shown in FIG. 20, the motion vector is derived using the reconstructed image of the corresponding region in the first reference picture and the reconstructed image of the symmetric region in the second reference picture.
  • each of the corresponding region and the symmetric region is a region specified using a candidate motion vector that is a candidate motion vector of the processing target region.
  • the corresponding region is a region indicated by the candidate motion vector from the processing target region.
  • the symmetric region is a region indicated by a symmetric motion vector from the processing target region.
  • a symmetric motion vector is a motion vector constituting a set of candidate motion vectors for bidirectional prediction.
  • the symmetric motion vector may be a motion vector derived by scaling the candidate motion vector.
  • FIG. 21 is a flowchart showing an operation in which the inter-screen prediction unit 126 of the encoding apparatus 100 derives a motion vector according to the template FRUC method or the bilateral FRUC method.
  • the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
  • the inter-screen prediction unit 126 derives a candidate motion vector by referring to each motion vector of one or more processed regions that are temporally or spatially adjacent to the processing target region.
  • the inter-screen prediction unit 126 derives a candidate motion vector for bidirectional prediction. That is, the inter-screen prediction unit 126 derives candidate motion vectors as a set of two motion vectors.
  • the inter prediction unit 126 when the motion vector of the processed region is a bidirectional prediction motion vector, the inter prediction unit 126 directly uses the bidirectional prediction motion vector as a candidate motion for bidirectional prediction. Derived as a vector.
  • the inter-frame prediction unit 126 derives a bidirectional prediction motion vector from the unidirectional prediction motion vector by scaling or the like, thereby performing bidirectional prediction.
  • Candidate motion vectors may be derived.
  • the inter-screen prediction unit 126 derives a motion vector that refers to the second reference picture by scaling the motion vector that refers to the first reference picture according to the display time interval in the bilateral FRUC method. . Thereby, the inter-screen prediction unit 126 derives a candidate motion vector constituting a set of a motion vector for unidirectional prediction and a scaled motion vector as a candidate motion vector for bidirectional prediction.
  • the inter-frame prediction unit 126 may derive the motion vector of the processed area as a candidate motion vector when the motion vector of the processed area is a bidirectional motion vector.
  • the inter-screen prediction unit 126 may not derive the motion vector of the processed region as a candidate motion vector when the motion vector of the processed region is a unidirectional motion vector.
  • the inter-screen prediction unit 126 derives the processed region motion vector as a candidate motion vector. To do.
  • the inter-screen prediction unit 126 generates a candidate motion vector list composed of candidate motion vectors (S201).
  • the processing target region is a sub-block, that is, when deriving a motion vector for each sub-block
  • the inter-screen prediction unit 126 includes the motion vector for each block as a candidate motion vector in the candidate motion vector list. Also good.
  • the inter-screen prediction unit 126 may include the motion vector in units of blocks in the candidate motion vector list as the candidate motion vector having the highest priority.
  • the inter-frame prediction unit 126 when the motion vector in block units is a unidirectional prediction motion vector, the inter-frame prediction unit 126 derives a bidirectional motion candidate motion vector from the unidirectional prediction motion vector by scaling or the like. May be.
  • the inter-screen prediction unit 126 may derive a candidate motion vector for bidirectional prediction by scaling or the like from the motion vector for unidirectional prediction, as in the case where the surrounding motion vector is a motion vector for unidirectional prediction. .
  • the inter-screen prediction unit 126 may include the candidate motion vector derived as the candidate motion vector for bidirectional prediction from the motion vector for unidirectional prediction in the candidate motion vector list.
  • the inter-screen prediction unit 126 may include a motion vector in block units as a candidate motion vector in the candidate motion vector list when the motion vector in block units is a motion vector for bidirectional prediction. Good.
  • the inter-screen prediction unit 126 may not include the block-based motion vector as a candidate motion vector in the candidate motion vector list when the block-based motion vector is a unidirectional prediction motion vector.
  • the inter-screen prediction unit 126 selects the best candidate motion vector from one or more candidate motion vectors included in the candidate motion vector list (S202). At this time, the inter-screen prediction unit 126 calculates an evaluation value for each of one or more candidate motion vectors according to the degree of matching between the two reconstructed images in the two evaluation target regions.
  • the two evaluation target areas are an adjacent area and a corresponding adjacent area as shown in FIG. 19, and in the bilateral FRUC method, the two evaluation target areas are as shown in FIG. A region and a symmetric region.
  • the corresponding adjacent region used in the template FRUC method, and the corresponding region and the symmetric region used in the bilateral FRUC method are determined according to the candidate motion vector.
  • the inter-screen prediction unit 126 calculates a better evaluation value as the degree of matching between the two reconstructed images of the two evaluation target areas is higher. Specifically, the inter-screen prediction unit 126 derives a difference value between two reconstructed images of two evaluation target areas. Then, the inter-screen prediction unit 126 calculates an evaluation value using the difference value. For example, the inter-screen prediction unit 126 calculates a better evaluation value as the difference value is smaller.
  • the inter-screen prediction unit 126 may calculate the evaluation value using the difference value and other information. For example, the priority order of one or more candidate motion vectors, the code amount based on the priority order, and the like may affect the evaluation value.
  • the inter-screen prediction unit 126 selects a candidate motion vector having the best evaluation value from among one or more candidate motion vectors as the best candidate motion vector.
  • the inter-screen prediction unit 126 derives a motion vector of the processing target region by searching around the best candidate motion vector (S203).
  • the inter-screen prediction unit 126 similarly calculates an evaluation value for a motion vector indicating a region around the region indicated by the best candidate motion vector. Then, when there is a motion vector having an evaluation value better than the best candidate motion vector, the inter-screen prediction unit 126 updates the best candidate motion vector with a motion vector having an evaluation value better than the best candidate motion vector. Then, the inter-screen prediction unit 126 derives the updated best candidate motion vector as the final motion vector of the processing target region.
  • the inter-screen prediction unit 126 may derive the best candidate motion vector as the final motion vector of the processing target region without performing the process of searching around the best candidate motion vector (S203).
  • the best candidate motion vector is not limited to the candidate motion vector having the best evaluation value.
  • One of one or more candidate motion vectors having an evaluation value equal to or higher than a reference may be selected as the best candidate motion vector according to a predetermined priority.
  • the process related to the processing target area and the processed area is, for example, an encoding or decoding process. More specifically, the process related to the processing target area and the processed area may be a process for deriving a motion vector. Alternatively, the process related to the processing target area and the processed area may be a reconstruction process.
  • FIG. 22 is a block diagram illustrating an implementation example of the encoding apparatus 100 according to Embodiment 1.
  • the encoding device 100 includes a circuit 160 and a memory 162.
  • a plurality of components of the encoding device 100 shown in FIGS. 1 and 11 are implemented by the circuit 160 and the memory 162 shown in FIG.
  • the circuit 160 is a circuit that performs information processing and is a circuit that can access the memory 162.
  • the circuit 160 is a dedicated or general-purpose electronic circuit that encodes a moving image.
  • the circuit 160 may be a processor such as a CPU.
  • the circuit 160 may be an aggregate of a plurality of electronic circuits. Further, for example, the circuit 160 may serve as a plurality of constituent elements excluding a constituent element for storing information among a plurality of constituent elements of the encoding device 100 illustrated in FIG. 1 and the like.
  • the memory 162 is a dedicated or general-purpose memory in which information for the circuit 160 to encode a moving image is stored.
  • the memory 162 may be an electronic circuit or may be connected to the circuit 160. In addition, the memory 162 may be included in the circuit 160.
  • the memory 162 may be an aggregate of a plurality of electronic circuits. Further, the memory 162 may be a magnetic disk or an optical disk, or may be expressed as a storage or a recording medium.
  • the memory 162 may be a non-volatile memory or a volatile memory.
  • a moving image to be encoded may be stored, or a bit string corresponding to the encoded moving image may be stored.
  • the memory 162 may store a program for the circuit 160 to encode a moving image.
  • the memory 162 may serve as a component for storing information among a plurality of components of the encoding device 100 illustrated in FIG. Specifically, the memory 162 may serve as the block memory 118 and the frame memory 122 shown in FIG. More specifically, the memory 162 may store a reconstructed block, a reconstructed picture, and the like.
  • not all of the plurality of components shown in FIG. 1 or the like may be mounted, or all of the plurality of processes described above may not be performed. Some of the plurality of components shown in FIG. 1 and the like may be included in another device, and some of the plurality of processes described above may be executed by another device. In the encoding device 100, some of the plurality of components shown in FIG. 1 and the like are mounted, and a part of the plurality of processes described above is performed, so that motion compensation is efficiently performed. Is called.
  • the template FRUC method uses a motion vector of a processing target region that is a block or a sub-block as a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture. This is a method of deriving according to the degree of matching.
  • the bilateral FRUC method is a method for deriving the motion vector of the processing target region according to the degree of matching between the two reconstructed images of the two regions in two different reference pictures.
  • the normal inter-screen prediction method is a method for deriving a motion vector of a processing target region and encoding information on the motion vector of the processing target region. That is, when the circuit 160 derives the motion vector of the processing target area using the normal inter-screen prediction method, the circuit 160 encodes the information on the motion vector of the processing target area.
  • FIG. 23 is a flowchart showing a first operation example of the encoding apparatus 100 shown in FIG.
  • the encoding apparatus 100 illustrated in FIG. 22 performs the operation illustrated in FIG. 23 when performing motion compensation and encoding a moving image.
  • the circuit 160 of the encoding device 100 derives a motion vector of an image block in a moving image (S311). Then, the circuit 160 performs motion compensation in units of blocks or sub-blocks constituting the blocks (S312).
  • the circuit 160 derives the motion vector of the sub block by the bilateral FRUC method when the motion vector of the block is derived by the template FRUC method and the motion compensation is performed in units of the sub block. Then, the circuit 160 performs motion compensation in units of sub-blocks using the sub-block motion vectors.
  • the encoding apparatus 100 can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, encoding apparatus 100 can appropriately derive a motion vector of a sub block even when a reconstructed image of a region adjacent to the sub block is not generated. Then, the encoding apparatus 100 can efficiently perform motion compensation using a motion vector that is appropriately derived.
  • the circuit 160 performs the motion compensation in units of the block when the motion vector of the block is a unidirectional prediction motion vector. May be.
  • the circuit 160 may perform motion compensation in units of blocks using the motion vectors of the blocks.
  • the circuit 160 performs motion compensation in units of sub-blocks when the motion vector of the block is a bidirectional motion vector when the motion vector of the block is derived by the template FRUC method and motion compensation is performed. Also good. In this case, the circuit 160 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
  • the encoding apparatus 100 can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. it can. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the encoding apparatus 100 efficiently uses the block motion vector as it is and performs motion compensation in units of blocks. It can be performed.
  • the circuit 160 may derive the subblock motion vector by the bilateral FRUC method.
  • the circuit 160 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
  • the encoding apparatus 100 derives a sub-block motion vector using the bilateral FRUC method, regardless of whether a block motion vector is derived using the template FRUC method or a block motion vector using the bilateral FRUC method. can do. Therefore, encoding apparatus 100 can derive the motion vector of the sub-block in the same way in these two cases.
  • the circuit 160 when deriving a sub-block motion vector, the circuit 160 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the encoding apparatus 100 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding apparatus 100 can improve prediction accuracy.
  • FIG. 24 is a flowchart showing a second operation example of the encoding apparatus 100 shown in FIG.
  • the encoding apparatus 100 illustrated in FIG. 22 performs the operation illustrated in FIG. 24 when performing motion compensation and encoding a moving image.
  • the circuit 160 of the encoding device 100 encodes first control information indicating one method for deriving a motion vector of an image block in a moving image (S321). Then, the circuit 160 encodes second control information indicating whether it is effective or ineffective to perform motion compensation in units of sub-blocks constituting the block (S322).
  • the circuit 160 derives the motion vector of the block by one method (S323). Then, the circuit 160 determines whether to perform motion compensation in units of subblocks or motion compensation in units of blocks according to whether motion compensation in units of subblocks is valid or invalid ( S324).
  • the circuit 160 when it is determined that motion compensation is performed in units of sub-blocks (Yes in S324), the circuit 160 derives a motion vector of the sub-blocks (S325). Then, the circuit 160 performs motion compensation in units of sub-blocks using the sub-block motion vectors (S326). On the other hand, when it is determined that motion compensation is performed in units of blocks (No in S324), the circuit 160 performs motion compensation in units of blocks using the motion vectors of the blocks (S327).
  • the encoding apparatus 100 can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the block motion vector. Therefore, the encoding apparatus 100 can appropriately suppress that the motion compensation is performed inefficiently. That is, the encoding apparatus 100 can efficiently perform motion compensation.
  • the circuit 160 may select one method for deriving a block motion vector from a plurality of methods including a normal inter-screen prediction method, a template FRUC method, and a bilateral FRUC method.
  • the encoding apparatus 100 can adaptively select one method for deriving a motion vector of a block from a plurality of methods.
  • the circuit 160 determines that the motion compensation is performed in units of subblocks. Motion compensation may be performed in units. Then, when one scheme for deriving the motion vector of the block is the template FRUC scheme or the bilateral FRUC scheme, the circuit 160 performs motion compensation in block units when it is determined to perform motion compensation in block units. May be performed.
  • the encoding apparatus 100 can perform the motion compensation in an appropriate unit according to the determination result of whether to perform the motion compensation in the subblock unit. it can.
  • the determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, the encoding apparatus 100 performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in units of sub-blocks when a block motion vector is derived by the FRUC method. Can do.
  • the circuit 160 performs motion in units of subblocks when it is determined that motion compensation is performed in units of subblocks when one method for deriving a motion vector of a block is a normal inter-screen prediction method. Compensation may be performed.
  • the circuit 160 performs motion compensation in units of blocks when it is determined that motion compensation is performed in units of blocks when one method for deriving a motion vector of a block is a normal inter-screen prediction method. Also good.
  • the encoding apparatus 100 can appropriately perform the determination according to the determination result of whether or not to perform motion compensation in units of subblocks.
  • Motion compensation can be performed in units. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
  • the encoding apparatus 100 performs motion compensation in appropriate units according to whether or not it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the normal inter-frame prediction method. It can be performed.
  • the circuit 160 may derive the sub-block motion vector using the bilateral FRUC method.
  • the encoding apparatus 100 can appropriately derive the motion vector of the sub-block even when the reconstructed image of the region adjacent to the sub-block is not generated. Therefore, the encoding apparatus 100 can efficiently perform motion compensation using an appropriately derived motion vector.
  • the circuit 160 determines that the motion compensation is performed in units of sub-blocks when the motion vector of the block is a motion vector for bidirectional prediction and it is effective to perform motion compensation in units of sub-blocks. May be.
  • the circuit 160 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a motion vector for bidirectional prediction and it is invalid to perform motion compensation in units of sub-blocks. .
  • the circuit 160 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a unidirectional motion vector.
  • the encoding apparatus 100 converts the sub-block motion vector into the bilateral when the block motion vector is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. It can be derived by the FRUC method. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the encoding apparatus 100 can efficiently use the motion vector of the block as it is.
  • motion compensation can be performed in units of blocks.
  • the circuit 160 determines that motion compensation is performed in units of subblocks, and it is invalid to perform motion compensation in units of subblocks. In some cases, it may be determined that motion compensation is performed in units of blocks.
  • the encoding apparatus 100 can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks. Then, when it is invalid to perform motion compensation in units of subblocks, the encoding apparatus 100 can perform motion compensation in units of blocks. Therefore, the encoding apparatus 100 can simply control a unit in which motion compensation is performed.
  • the circuit 160 when deriving a sub-block motion vector, the circuit 160 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the encoding apparatus 100 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding apparatus 100 can improve prediction accuracy.
  • the circuit 160 may encode the first control information into the header layer of the block, the header layer of the slice including the block, the header layer of the picture including the block, or the header layer of the stream including the block.
  • the circuit 160 may encode the second control information into the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
  • the encoding apparatus 100 can designate a scheme for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
  • the first control information is FRUC control information as described above
  • the second control information is subblock processing control information as described above.
  • the circuit 160 encodes both the first control information and the second control information.
  • the circuit 160 may encode only the first control information out of the first control information and the second control information, and may not encode the second control information.
  • the circuit 160 determines the second control information. It may not be encoded.
  • the second control information may not be encoded.
  • the second control information is determined when it is uniformly determined to perform motion compensation in units of blocks. May not be encoded.
  • the circuit 160 may not encode the second control information when the second control information is not used.
  • the circuit 160 may not encode the first control information when a method for deriving a motion vector of a block is determined in advance.
  • FIG. 25 is a block diagram illustrating an implementation example of the decoding device 200 according to the first embodiment.
  • the decoding device 200 includes a circuit 260 and a memory 262.
  • a plurality of components of the decoding device 200 shown in FIGS. 10 and 12 are implemented by the circuit 260 and the memory 262 shown in FIG.
  • the circuit 260 is a circuit that performs information processing and is a circuit that can access the memory 262.
  • the circuit 260 is a dedicated or general-purpose electronic circuit that decodes a moving image.
  • the circuit 260 may be a processor such as a CPU.
  • the circuit 260 may be an aggregate of a plurality of electronic circuits. Further, for example, the circuit 260 may serve as a plurality of constituent elements excluding the constituent elements for storing information among the plurality of constituent elements of the decoding device 200 illustrated in FIG. 10 and the like.
  • the memory 262 is a dedicated or general-purpose memory in which information for the circuit 260 to decode a moving image is stored.
  • the memory 262 may be an electronic circuit or may be connected to the circuit 260. Further, the memory 262 may be included in the circuit 260.
  • the memory 262 may be an aggregate of a plurality of electronic circuits.
  • the memory 262 may be a magnetic disk or an optical disk, or may be expressed as a storage or a recording medium. Further, the memory 262 may be a nonvolatile memory or a volatile memory.
  • the memory 262 may store a bit sequence corresponding to the encoded moving image, or may store a moving image corresponding to the decoded bit sequence.
  • the memory 262 may store a program for the circuit 260 to decode a moving image.
  • the memory 262 may serve as a component for storing information among a plurality of components of the decoding device 200 illustrated in FIG. 10 and the like. Specifically, the memory 262 may serve as the block memory 210 and the frame memory 214 shown in FIG. More specifically, the memory 262 may store a reconstructed block, a reconstructed picture, and the like.
  • the decoding device 200 not all of the plurality of components shown in FIG. 10 and the like may be implemented, or all of the plurality of processes described above may not be performed. Some of the plurality of components shown in FIG. 10 and the like may be included in another device, and some of the plurality of processes described above may be executed by another device. Then, in the decoding device 200, some of the plurality of components shown in FIG. 10 and the like are mounted, and motion compensation is efficiently performed by performing some of the plurality of processes described above. .
  • the template FRUC method uses a motion vector of a processing target region that is a block or a sub-block as a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture. This is a method of deriving according to the degree of matching.
  • the bilateral FRUC method is a method for deriving the motion vector of the processing target region according to the degree of matching between the two reconstructed images of the two regions in two different reference pictures.
  • the normal inter-screen prediction method is a method of decoding the motion vector information of the processing target area and deriving the motion vector of the processing target area. That is, when the circuit 260 derives the motion vector of the processing target region using the normal inter-screen prediction method, the circuit 260 decodes the information on the motion vector of the processing target region.
  • FIG. 26 is a flowchart showing a first operation example of the decoding device 200 shown in FIG.
  • the decoding device 200 illustrated in FIG. 25 performs the operation illustrated in FIG. 26 when performing motion compensation and decoding a moving image.
  • the circuit 260 of the decoding device 200 derives a motion vector of an image block in a moving image (S411). Then, the circuit 260 performs motion compensation in units of blocks or sub-blocks constituting the blocks (S412).
  • the circuit 260 derives the motion vector of the sub block by the bilateral FRUC method when the motion vector of the block is derived by the template FRUC method and the motion compensation is performed in units of the sub block. Then, the circuit 260 performs motion compensation in units of sub-blocks using the sub-block motion vectors.
  • the decoding apparatus 200 can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, the decoding apparatus 200 can appropriately derive the motion vector of the sub block even when the reconstructed image of the region adjacent to the sub block is not generated. Then, the decoding apparatus 200 can efficiently perform motion compensation using the appropriately derived motion vector.
  • the circuit 260 when the block 260 derives a motion vector of a block by the template FRUC method and performs motion compensation, if the motion vector of the block is a unidirectional motion vector, the circuit 260 performs motion compensation in units of blocks. May be. In this case, the circuit 260 may perform motion compensation in units of blocks using the motion vectors of the blocks.
  • the circuit 260 performs motion compensation in units of sub-blocks when the motion vector of the block is a bidirectional motion vector when the motion vector of the block is derived by the template FRUC method and motion compensation is performed. Also good. In this case, the circuit 260 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
  • the decoding apparatus 200 can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. . Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the decoding apparatus 200 efficiently performs motion compensation in units of blocks using the block motion vector as it is. It can be carried out.
  • the circuit 260 may derive the subblock motion vector by the bilateral FRUC method.
  • the circuit 260 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
  • the decoding apparatus 200 derives a sub-block motion vector using the bilateral FRUC method, regardless of whether a block motion vector is derived using the template FRUC method or a block motion vector using the bilateral FRUC method. be able to. Therefore, the decoding apparatus 200 can derive the motion vector of the sub-block in the same way in these two cases.
  • the circuit 260 when deriving a sub-block motion vector, the circuit 260 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the decoding apparatus 200 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus 200 can improve prediction accuracy.
  • FIG. 27 is a flowchart showing a second operation example of the decoding device 200 shown in FIG.
  • the decoding device 200 illustrated in FIG. 25 performs the operation illustrated in FIG. 27 when performing motion compensation and decoding a moving image.
  • the circuit 260 of the decoding device 200 decodes first control information indicating one method for deriving a motion vector of an image block in a moving image (S421). Then, the circuit 260 decodes the second control information indicating whether it is valid or invalid to perform motion compensation in units of sub-blocks constituting the block (S422).
  • the circuit 260 derives the motion vector of the block by one method (S423). Then, the circuit 260 determines whether to perform motion compensation in units of sub-blocks or motion compensation in units of blocks according to whether motion compensation in units of sub-blocks is valid or invalid ( S424).
  • the circuit 260 when it is determined that motion compensation is performed in units of sub-blocks (Yes in S424), the circuit 260 derives a motion vector of the sub-blocks (S425). Then, the circuit 260 performs motion compensation in units of sub-blocks using the sub-block motion vectors (S426). On the other hand, when it is determined that motion compensation is to be performed in units of blocks (No in S424), the circuit 260 performs motion compensation in units of blocks using the motion vectors of the blocks (S427).
  • the decoding apparatus 200 can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the block motion vector. Therefore, the decoding apparatus 200 can appropriately suppress that the motion compensation is performed inefficiently. That is, the decoding device 200 can efficiently perform motion compensation.
  • the circuit 260 may select one method for deriving a block motion vector from a plurality of methods including a normal inter-screen prediction method, a template FRUC method, and a bilateral FRUC method.
  • the decoding apparatus 200 can adaptively select one method for deriving a motion vector of a block from a plurality of methods.
  • the circuit 260 determines that the motion compensation is performed in units of subblocks. Motion compensation may be performed in units. Then, when one method for deriving the motion vector of the block is the template FRUC method or the bilateral FRUC method, the circuit 260 performs motion compensation in block units when it is determined to perform motion compensation in block units. May be performed.
  • the decoding apparatus 200 can perform motion compensation in an appropriate unit according to a determination result of whether or not motion compensation is performed in units of subblocks. .
  • the determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, when the motion vector of a block is derived by the FRUC method, the decoding apparatus 200 can perform motion compensation in an appropriate unit according to whether or not it is effective to perform motion compensation in a sub-block unit. it can.
  • the circuit 260 when one method for deriving a motion vector of a block is a normal inter-screen prediction method, the circuit 260 performs motion in units of subblocks when it is determined that motion compensation is performed in units of subblocks. Compensation may be performed. The circuit 260 performs motion compensation in units of blocks when it is determined that motion compensation is performed in units of blocks when one method for deriving a motion vector of the block is a normal inter-screen prediction method. Also good.
  • the decoding apparatus 200 can select an appropriate unit according to the determination result of whether to perform motion compensation in units of subblocks. Motion compensation can be performed. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
  • the decoding apparatus 200 performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the normal inter-frame prediction method. It can be carried out.
  • the circuit 260 may derive the sub-block motion vector by the bilateral FRUC method.
  • the decoding apparatus 200 can appropriately derive the motion vector of the sub-block even when the reconstructed image of the area adjacent to the sub-block is not generated. Therefore, the decoding apparatus 200 can efficiently perform motion compensation using the appropriately derived motion vector.
  • the circuit 260 determines that the motion compensation is performed in units of sub-blocks when the motion vector of the block is a bidirectional motion vector and it is effective to perform motion compensation in units of sub-blocks. May be.
  • the circuit 260 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a motion vector for bidirectional prediction and it is invalid to perform motion compensation in units of sub-blocks. .
  • the circuit 260 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a unidirectional motion vector.
  • the decoding apparatus 200 converts the sub-block motion vector to the bilateral FRUC when the motion vector of the block is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. Can be derived in a manner. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
  • the decoding apparatus 200 efficiently uses the motion vector of the block as it is. Motion compensation can be performed in units of blocks.
  • the circuit 260 determines that motion compensation is performed in units of sub-blocks, and it is invalid to perform motion compensation in units of sub-blocks. In some cases, it may be determined that motion compensation is performed in units of blocks.
  • the decoding apparatus 200 can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks.
  • the decoding apparatus 200 can perform motion compensation in units of blocks when it is invalid to perform motion compensation in units of sub-blocks. Therefore, the decoding apparatus 200 can simply control the unit in which motion compensation is performed.
  • the circuit 260 when deriving a sub-block motion vector, the circuit 260 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the decoding apparatus 200 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus 200 can improve prediction accuracy.
  • the circuit 260 may decode the first control information from the header layer of the block, the header layer of the slice including the block, the header layer of the picture including the block, or the header layer of the stream including the block.
  • the circuit 260 may decode the second control information from the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
  • the decoding apparatus 200 can specify a scheme for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
  • the first control information is FRUC control information as described above
  • the second control information is subblock processing control information as described above.
  • the circuit 260 decodes both the first control information and the second control information.
  • the circuit 260 may decode only the first control information out of the first control information and the second control information, and may not decode the second control information.
  • the circuit 260 determines the second control information. Decoding is not necessary.
  • the second control information may not be decoded.
  • the second control information is determined when it is uniformly determined to perform motion compensation in units of blocks. May not be decrypted.
  • the circuit 260 may not decode the second control information when the second control information is not used. In addition, when a method for deriving a motion vector of a block is determined in advance, the circuit 260 may not decode the first control information.
  • the encoding device 100 and the decoding device 200 in the present embodiment may be used as an image encoding device and an image decoding device, respectively, or may be used as a moving image encoding device and a moving image decoding device, respectively. Good.
  • the encoding device 100 and the decoding device 200 can each be used as an inter prediction device (inter-screen prediction device).
  • the encoding device 100 and the decoding device 200 may correspond to only the inter prediction unit (inter-screen prediction unit) 126 and the inter prediction unit (inter-screen prediction unit) 218, respectively.
  • Other components such as the conversion unit 106 and the inverse conversion unit 206 may be included in other devices.
  • each component may be configured by dedicated hardware or may be realized by executing a software program suitable for each component.
  • Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.
  • each of the encoding device 100 and the decoding device 200 includes a processing circuit (Processing Circuit) and a storage device (Storage) electrically connected to the processing circuit and accessible from the processing circuit. You may have.
  • the processing circuit corresponds to the circuit 160 or 260
  • the storage device corresponds to the memory 162 or 262.
  • the processing circuit includes at least one of dedicated hardware and a program execution unit, and executes processing using a storage device. Further, when the processing circuit includes a program execution unit, the storage device stores a software program executed by the program execution unit.
  • the software that realizes the encoding apparatus 100 or the decoding apparatus 200 of the present embodiment is the following program.
  • this program is an encoding method for encoding a moving image by performing motion compensation on a computer, and derives a motion vector of an image block in the moving image, and the unit of the block or the block
  • the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion compensation is performed in units of the sub-blocks.
  • a motion vector of the sub-block is derived by a lateral FRUC method, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC method is a process that is the block or the sub-block.
  • the motion vector of the target area The method is derived according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture.
  • the bilateral FRUC method uses different motion vectors of the processing target region.
  • An encoding method that is a method of deriving according to the degree of matching between two reconstructed images of two regions in two reference pictures may be executed.
  • this program is a decoding method for decoding a moving image by performing motion compensation on a computer, and deriving a motion vector of an image block in the moving image, and configuring the unit of the block or the block
  • the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion compensation is performed in units of the sub-blocks
  • bilateral FRUC A motion vector of the sub-block is derived by a method, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block
  • the template FRUC method is a processing target region that is the block or the sub-block.
  • the motion vector of This is a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the target region and the reconstructed image of the region in the reference picture.
  • the bilateral FRUC method uses two different motion vectors for the processing target region.
  • a decoding method that is a method of deriving according to the degree of matching between two reconstructed images of two regions in two reference pictures may be executed.
  • this program is an encoding method for encoding a moving image by performing motion compensation on a computer, and includes first control information indicating one method for deriving a motion vector of an image block in the moving image.
  • Encode encode second control information indicating whether it is effective or ineffective to perform the motion compensation in units of sub-blocks constituting the block, and derive a motion vector of the block by the one method And determining whether to perform the motion compensation in units of the sub-blocks or to perform the motion compensation in units of the blocks according to whether the motion compensation in units of the sub-block is valid or invalid If it is determined that the motion compensation is performed in units of the sub-block, a motion vector of the sub-block is derived and the motion of the sub-block is derived.
  • the motion compensation is performed in units of the sub-blocks using a Kuttle, and the motion compensation is performed in units of the blocks, the motion compensation is performed in units of the blocks using a motion vector of the blocks.
  • An encoding method may be executed.
  • this program is a decoding method for decoding a moving image by performing motion compensation on a computer, and decoding first control information indicating one method for deriving a motion vector of an image block in the moving image. , Decoding second control information indicating whether the motion compensation is valid or invalid in units of sub-blocks constituting the block, and deriving a motion vector of the block by the one method, Determining whether to perform the motion compensation in units of the sub-blocks or whether to perform the motion compensation in units of the blocks according to whether the motion compensation in units of the sub-block is valid or invalid.
  • a motion vector of the sub-block is derived, and the motion vector of the sub-block is derived.
  • Each component may be a circuit as described above. These circuits may constitute one circuit as a whole, or may be separate circuits. Each component may be realized by a general-purpose processor or a dedicated processor.
  • the encoding / decoding device may include the encoding device 100 and the decoding device 200.
  • the first and second ordinal numbers used in the description may be replaced as appropriate.
  • an ordinal number may be newly given to a component or the like, or may be removed.
  • the aspect of the encoding apparatus 100 and the decoding apparatus 200 was demonstrated based on embodiment, the aspect of the encoding apparatus 100 and decoding apparatus 200 is not limited to this embodiment. As long as it does not deviate from the gist of the present disclosure, the encoding device 100 and the decoding device 200 may be configured in which various modifications conceived by those skilled in the art have been made in the present embodiment, or in a form constructed by combining components in different embodiments. It may be included within the scope of the embodiment.
  • This aspect may be implemented in combination with at least a part of other aspects in the present disclosure.
  • a part of the processing, a part of the configuration of the apparatus, a part of the syntax, and the like described in the flowchart of this aspect may be combined with another aspect.
  • each of the functional blocks can usually be realized by an MPU, a memory, and the like. Further, the processing by each functional block is usually realized by a program execution unit such as a processor reading and executing software (program) recorded on a recording medium such as a ROM. The software may be distributed by downloading or the like, or may be distributed by being recorded on a recording medium such as a semiconductor memory. Naturally, each functional block can be realized by hardware (dedicated circuit).
  • each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using a plurality of devices. Good.
  • the number of processors that execute the program may be one or more. That is, centralized processing may be performed, or distributed processing may be performed.
  • the system includes an image encoding device using an image encoding method, an image decoding device using an image decoding method, and an image encoding / decoding device including both.
  • Other configurations in the system can be appropriately changed according to circumstances.
  • FIG. 28 is a diagram showing an overall configuration of a content supply system ex100 that implements a content distribution service.
  • the communication service providing area is divided into desired sizes, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.
  • devices such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101, the Internet service provider ex102 or the communication network ex104, and the base stations ex106 to ex110.
  • the content supply system ex100 may be connected by combining any of the above elements.
  • Each device may be directly or indirectly connected to each other via a telephone network or a short-range wireless communication without using the base stations ex106 to ex110 which are fixed wireless stations.
  • the streaming server ex103 is connected to each device such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101.
  • the streaming server ex103 is connected to a terminal in a hot spot in the airplane ex117 via the satellite ex116.
  • the streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to the airplane ex117 without going through the satellite ex116.
  • the camera ex113 is a device that can shoot still images and moving images such as a digital camera.
  • the smartphone ex115 is a smartphone, a cellular phone, or a PHS (Personal Handyphone System) that is compatible with a mobile communication system generally called 2G, 3G, 3.9G, 4G, and 5G in the future.
  • a mobile communication system generally called 2G, 3G, 3.9G, 4G, and 5G in the future.
  • the home appliance ex118 is a device included in a refrigerator or a household fuel cell cogeneration system.
  • a terminal having a photographing function is connected to the streaming server ex103 through the base station ex106 or the like, thereby enabling live distribution or the like.
  • the terminal (computer ex111, game machine ex112, camera ex113, home appliance ex114, smartphone ex115, terminal in airplane ex117, etc.) is used for the still image or video content captured by the user using the terminal.
  • the encoding process described in each embodiment is performed, and the video data obtained by the encoding and the sound data obtained by encoding the sound corresponding to the video are multiplexed, and the obtained data is transmitted to the streaming server ex103. That is, each terminal functions as an image encoding device according to an aspect of the present disclosure.
  • the streaming server ex103 streams the content data transmitted to the requested client.
  • the client is a computer or the like in the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, the smart phone ex115, or the airplane ex117 that can decode the encoded data.
  • Each device that has received the distributed data decrypts and reproduces the received data. That is, each device functions as an image decoding device according to an aspect of the present disclosure.
  • the streaming server ex103 may be a plurality of servers or a plurality of computers, and may process, record, and distribute data in a distributed manner.
  • the streaming server ex103 may be realized by a CDN (Contents Delivery Network), and content distribution may be realized by a network connecting a large number of edge servers and edge servers distributed all over the world.
  • CDN Contents Delivery Network
  • edge servers that are physically close to each other are dynamically allocated according to clients. Then, the content can be cached and distributed to the edge server, thereby reducing the delay.
  • the processing is distributed among multiple edge servers, the distribution subject is switched to another edge server, or the part of the network where the failure has occurred Since detouring can be continued, high-speed and stable distribution can be realized.
  • the captured data may be encoded at each terminal, may be performed on the server side, or may be shared with each other.
  • a processing loop is performed twice.
  • the first loop the complexity of the image or the code amount in units of frames or scenes is detected.
  • the second loop processing for maintaining the image quality and improving the coding efficiency is performed.
  • the terminal performs the first encoding process
  • the server receiving the content performs the second encoding process, thereby improving the quality and efficiency of the content while reducing the processing load on each terminal. it can.
  • the encoded data of the first time performed by the terminal can be received and reproduced by another terminal, enabling more flexible real-time distribution.
  • the camera ex113 or the like extracts a feature amount from an image, compresses data relating to the feature amount as metadata, and transmits the metadata to the server.
  • the server performs compression according to the meaning of the image, for example, by determining the importance of the object from the feature amount and switching the quantization accuracy.
  • the feature data is particularly effective for improving the accuracy and efficiency of motion vector prediction at the time of re-compression on the server.
  • simple coding such as VLC (variable length coding) may be performed at the terminal, and coding with a large processing load such as CABAC (context adaptive binary arithmetic coding) may be performed at the server.
  • a plurality of video data in which almost the same scene is captured by a plurality of terminals.
  • a GOP Group of Picture
  • a picture unit or a tile obtained by dividing a picture using a plurality of terminals that have performed shooting and other terminals and servers that have not performed shooting as necessary.
  • Distributed processing is performed by assigning encoding processing in units or the like. Thereby, delay can be reduced and real-time property can be realized.
  • the server may manage and / or instruct the video data captured by each terminal to refer to each other.
  • the encoded data from each terminal may be received by the server and the reference relationship may be changed among a plurality of data, or the picture itself may be corrected or replaced to be encoded again. This makes it possible to generate a stream with improved quality and efficiency of each piece of data.
  • the server may distribute the video data after performing transcoding to change the encoding method of the video data.
  • the server may convert the MPEG encoding system to the VP encoding. 264. It may be converted into H.265.
  • the encoding process can be performed by a terminal or one or more servers. Therefore, in the following, description such as “server” or “terminal” is used as the subject performing processing, but part or all of processing performed by the server may be performed by the terminal, or processing performed by the terminal may be performed. Some or all may be performed at the server. The same applies to the decoding process.
  • the server not only encodes a two-dimensional moving image, but also encodes a still image automatically based on a scene analysis of the moving image or at a time specified by the user and transmits it to the receiving terminal. Also good.
  • the server can acquire the relative positional relationship between the photographing terminals, the server obtains the three-dimensional shape of the scene based on not only the two-dimensional moving image but also the video obtained by photographing the same scene from different angles. Can be generated.
  • the server may separately encode the three-dimensional data generated by the point cloud or the like, and the video to be transmitted to the receiving terminal based on the result of recognizing or tracking the person or the object using the three-dimensional data.
  • the images may be selected or reconstructed from videos captured by a plurality of terminals.
  • the user can arbitrarily select each video corresponding to each photographing terminal and enjoy a scene, or can display a video of an arbitrary viewpoint from three-dimensional data reconstructed using a plurality of images or videos. You can also enjoy the clipped content.
  • sound is collected from a plurality of different angles, and the server may multiplex and transmit sound from a specific angle or space according to the video.
  • the server may create viewpoint images for the right eye and the left eye, respectively, and perform encoding that allows reference between each viewpoint video by Multi-View Coding (MVC) or the like. You may encode as another stream, without referring. At the time of decoding another stream, it is preferable to reproduce in synchronization with each other so that a virtual three-dimensional space is reproduced according to the viewpoint of the user.
  • MVC Multi-View Coding
  • the server superimposes virtual object information in the virtual space on the camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint.
  • the decoding device may acquire or hold virtual object information and three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and create superimposition data by connecting them smoothly.
  • the decoding device transmits the movement of the user's viewpoint to the server in addition to the request for the virtual object information, and the server creates superimposition data according to the movement of the viewpoint received from the three-dimensional data held in the server,
  • the superimposed data may be encoded and distributed to the decoding device.
  • the superimposed data has an ⁇ value indicating transparency in addition to RGB
  • the server sets the ⁇ value of a portion other than the object created from the three-dimensional data to 0 or the like, and the portion is transparent. May be encoded.
  • the server may generate data in which a RGB value of a predetermined value is set as the background, such as a chroma key, and the portion other than the object is set to the background color.
  • the decryption processing of the distributed data may be performed at each terminal as a client, may be performed on the server side, or may be performed in a shared manner.
  • a terminal may once send a reception request to the server, receive content corresponding to the request at another terminal, perform a decoding process, and transmit a decoded signal to a device having a display.
  • a part of a region such as a tile in which a picture is divided may be decoded and displayed on a viewer's personal terminal while receiving large-size image data on a TV or the like. Accordingly, it is possible to confirm at hand the area in which the person is responsible or the area to be confirmed in more detail while sharing the whole image.
  • access to encoded data on the network such as when the encoded data is cached in a server that can be accessed from the receiving terminal in a short time, or copied to the edge server in the content delivery service. It is also possible to switch the bit rate of received data based on ease.
  • the content switching will be described using a scalable stream that is compression-encoded by applying the moving image encoding method shown in each of the above embodiments shown in FIG.
  • the server may have a plurality of streams of the same content and different quality as individual streams, but the temporal / spatial scalable implementation realized by dividing into layers as shown in the figure.
  • the configuration may be such that the content is switched by utilizing the characteristics of the stream.
  • the decoding side decides which layer to decode according to internal factors such as performance and external factors such as the state of communication bandwidth, so that the decoding side can combine low-resolution content and high-resolution content. You can switch freely and decrypt. For example, when the user wants to continue watching the video that was viewed on the smartphone ex115 while moving on a device such as an Internet TV after returning home, the device only has to decode the same stream to a different layer, so the load on the server side Can be reduced.
  • the enhancement layer includes meta information based on image statistical information, etc., in addition to the configuration in which the picture is encoded for each layer and the enhancement layer exists above the base layer.
  • the decoding side may generate content with high image quality by super-resolution of the base layer picture based on the meta information.
  • Super-resolution may be either improvement of the SN ratio at the same resolution or enlargement of the resolution.
  • the meta information includes information for specifying a linear or non-linear filter coefficient used for super-resolution processing, or information for specifying a parameter value in filter processing, machine learning, or least square calculation used for super-resolution processing. .
  • the picture may be divided into tiles or the like according to the meaning of the object in the image, and the decoding side may select only a part of the region by selecting the tile to be decoded.
  • the decoding side can determine the position of the desired object based on the meta information. Can be identified and the tile containing the object can be determined.
  • the meta information is stored using a data storage structure different from the pixel data such as the SEI message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.
  • meta information may be stored in units composed of a plurality of pictures, such as streams, sequences, or random access units.
  • the decoding side can acquire the time when the specific person appears in the video, etc., and can match the picture in which the object exists and the position of the object in the picture by combining with the information in units of pictures.
  • FIG. 31 is a diagram showing an example of a web page display screen on the computer ex111 or the like.
  • FIG. 32 is a diagram illustrating a display screen example of a web page on the smartphone ex115 or the like.
  • a web page may include a plurality of link images that are links to image content, and the appearance differs depending on the browsing device. When a plurality of link images are visible on the screen, the display device until the user explicitly selects the link image, or until the link image approaches the center of the screen or the entire link image enters the screen.
  • the (decoding device) displays a still image or an I picture included in each content as a link image, displays a video like a gif animation with a plurality of still images or I pictures, or receives only a base layer to receive a video. Are decoded and displayed.
  • the display device When the link image is selected by the user, the display device decodes the base layer with the highest priority. If there is information indicating that the HTML constituting the web page is scalable content, the display device may decode up to the enhancement layer. Also, in order to ensure real-time properties, the display device only decodes forward reference pictures (I picture, P picture, forward reference only B picture) before being selected or when the communication band is very strict. In addition, the delay between the decoding time of the first picture and the display time (delay from the start of content decoding to the start of display) can be reduced by displaying. Further, the display device may intentionally ignore the reference relationship of pictures and roughly decode all B pictures and P pictures with forward reference, and perform normal decoding as the number of received pictures increases over time.
  • forward reference pictures I picture, P picture, forward reference only B picture
  • the receiving terminal when transmitting and receiving still image or video data such as two-dimensional or three-dimensional map information for automatic driving or driving support of a car, the receiving terminal adds meta data to image data belonging to one or more layers. Weather or construction information may also be received and decoded in association with each other. The meta information may belong to a layer or may be simply multiplexed with image data.
  • the receiving terminal since the car, drone, airplane, or the like including the receiving terminal moves, the receiving terminal transmits the position information of the receiving terminal at the time of the reception request, thereby seamless reception and decoding while switching the base stations ex106 to ex110. Can be realized.
  • the receiving terminal can dynamically switch how much meta-information is received or how much map information is updated according to the user's selection, the user's situation, or the communication band state. become.
  • the encoded information transmitted by the user can be received, decoded and reproduced in real time by the client.
  • the content supply system ex100 can perform not only high-quality and long-time content by a video distributor but also unicast or multicast distribution of low-quality and short-time content by an individual. Moreover, such personal contents are expected to increase in the future.
  • the server may perform the encoding process after performing the editing process. This can be realized, for example, with the following configuration.
  • the server After shooting, the server performs recognition processing such as shooting error, scene search, semantic analysis, and object detection from the original image or encoded data. Then, the server manually or automatically corrects out-of-focus or camera shake based on the recognition result, or selects a less important scene such as a scene whose brightness is lower than that of other pictures or is out of focus. Edit such as deleting, emphasizing the edge of an object, and changing the hue.
  • the server encodes the edited data based on the editing result. It is also known that if the shooting time is too long, the audience rating will decrease, and the server will move not only in the less important scenes as described above, but also in motion according to the shooting time. A scene with few images may be automatically clipped based on the image processing result. Alternatively, the server may generate and encode a digest based on the result of the semantic analysis of the scene.
  • the server may change and encode the face of the person in the periphery of the screen or the inside of the house into an unfocused image.
  • the server recognizes whether or not a face of a person different from the person registered in advance is shown in the encoding target image, and if so, performs processing such as applying a mosaic to the face part. May be.
  • the user designates a person or background area that the user wants to process an image from the viewpoint of copyright, etc., and the server replaces the designated area with another video or blurs the focus. It is also possible to perform such processing. If it is a person, the face image can be replaced while tracking the person in the moving image.
  • the decoding device first receives the base layer with the highest priority and performs decoding and reproduction, depending on the bandwidth.
  • the decoding device may receive the enhancement layer during this time, and may play back high-quality video including the enhancement layer when played back twice or more, such as when playback is looped.
  • a stream that is scalable in this way can provide an experience in which the stream becomes smarter and the image is improved gradually, although it is a rough moving picture when it is not selected or at the beginning of viewing.
  • the same experience can be provided even if the coarse stream played back the first time and the second stream coded with reference to the first video are configured as one stream. .
  • these encoding or decoding processes are generally processed in the LSI ex500 included in each terminal.
  • the LSI ex500 may be configured as a single chip or a plurality of chips.
  • moving image encoding or decoding software is incorporated into some recording medium (CD-ROM, flexible disk, hard disk, etc.) that can be read by the computer ex111 and the like, and encoding or decoding processing is performed using the software. Also good.
  • moving image data acquired by the camera may be transmitted. The moving image data at this time is data encoded by the LSI ex500 included in the smartphone ex115.
  • the LSI ex500 may be configured to download and activate application software.
  • the terminal first determines whether the terminal is compatible with the content encoding method or has a specific service execution capability. If the terminal does not support the content encoding method or does not have the capability to execute a specific service, the terminal downloads a codec or application software, and then acquires and reproduces the content.
  • the content supply system ex100 via the Internet ex101, but also a digital broadcasting system, at least the moving image encoding device (image encoding device) or the moving image decoding device (image decoding device) of the above embodiments. Any of these can be incorporated.
  • the unicasting of the content supply system ex100 is suitable for multicasting because it uses a satellite or the like to transmit and receive multiplexed data in which video and sound are multiplexed on broadcasting radio waves.
  • the same application is possible for the encoding process and the decoding process.
  • FIG. 33 is a diagram illustrating the smartphone ex115.
  • FIG. 34 is a diagram illustrating a configuration example of the smartphone ex115.
  • the smartphone ex115 receives the antenna ex450 for transmitting / receiving radio waves to / from the base station ex110, the camera unit ex465 capable of taking video and still images, the video captured by the camera unit ex465, and the antenna ex450.
  • a display unit ex458 for displaying data obtained by decoding the video or the like.
  • the smartphone ex115 further includes an operation unit ex466 that is a touch panel or the like, a voice output unit ex457 that is a speaker or the like for outputting voice or sound, a voice input unit ex456 that is a microphone or the like for inputting voice, and photographing.
  • Memory unit ex467 that can store encoded video or still image, recorded audio, received video or still image, encoded data such as mail, or decoded data, and a user, and network
  • An external memory may be used instead of the memory unit ex467.
  • a main control unit ex460 that comprehensively controls the display unit ex458, the operation unit ex466, and the like, a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / Demodulation unit ex452, multiplexing / demultiplexing unit ex453, audio signal processing unit ex454, slot unit ex464, and memory unit ex467 are connected via bus ex470.
  • the power supply circuit unit ex461 starts up the smartphone ex115 in an operable state by supplying power from the battery pack to each unit.
  • the smartphone ex115 performs processing such as calling and data communication based on the control of the main control unit ex460 having a CPU, a ROM, a RAM, and the like.
  • the voice signal picked up by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, spread spectrum processing is performed by the modulation / demodulation unit ex452, and digital / analog conversion is performed by the transmission / reception unit ex451.
  • the data is transmitted via the antenna ex450.
  • the received data is amplified and subjected to frequency conversion processing and analog-digital conversion processing, spectrum despreading processing is performed by the modulation / demodulation unit ex452, and converted to analog audio signal by the audio signal processing unit ex454, and then this is output to the audio output unit ex457.
  • text, still image, or video data is sent to the main control unit ex460 via the operation input control unit ex462 by the operation of the operation unit ex466 of the main body unit, and transmission / reception processing is performed similarly.
  • the video signal processing unit ex455 uses the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 as described above.
  • the video data is compressed and encoded by the moving image encoding method shown in the form, and the encoded video data is sent to the multiplexing / demultiplexing unit ex453.
  • the audio signal processing unit ex454 encodes the audio signal picked up by the audio input unit ex456 while the camera unit ex465 captures a video or a still image, and sends the encoded audio data to the multiplexing / separating unit ex453. To do.
  • the multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded audio data by a predetermined method, and the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the modulation / demodulation unit ex451 perform modulation processing and conversion.
  • the data is processed and transmitted via the antenna ex450.
  • the multiplexing / demultiplexing unit ex453 performs multiplexing By separating the data, the multiplexed data is divided into a bit stream of video data and a bit stream of audio data, and the encoded video data is supplied to the video signal processing unit ex455 via the synchronization bus ex470. The converted audio data is supplied to the audio signal processing unit ex454.
  • the video signal processing unit ex455 decodes the video signal by the video decoding method corresponding to the video encoding method shown in each of the above embodiments, and is linked from the display unit ex458 via the display control unit ex459.
  • a video or still image included in the moving image file is displayed.
  • the audio signal processing unit ex454 decodes the audio signal, and the audio is output from the audio output unit ex457. Since real-time streaming is widespread, depending on the user's situation, there may be occasions where audio playback is not socially appropriate. Therefore, it is desirable that the initial value is a configuration in which only the video data is reproduced without reproducing the audio signal. Audio may be synchronized and played back only when the user performs an operation such as clicking on video data.
  • the smartphone ex115 has been described here as an example, in addition to a transmission / reception terminal having both an encoder and a decoder as a terminal, a transmission terminal having only an encoder and a reception having only a decoder There are three possible mounting formats: terminals.
  • terminals In the digital broadcasting system, it has been described as receiving or transmitting multiplexed data in which audio data or the like is multiplexed with video data.
  • multiplexed data includes character data related to video in addition to audio data. Multiplexing may be performed, and video data itself may be received or transmitted instead of multiplexed data.
  • the terminal often includes a GPU. Therefore, a configuration may be adopted in which a wide area is processed in a lump by utilizing the performance of the GPU by using a memory shared by the CPU and the GPU or a memory whose addresses are managed so as to be used in common. As a result, the encoding time can be shortened, real-time performance can be ensured, and low delay can be realized. In particular, it is efficient to perform motion search, deblocking filter, SAO (Sample Adaptive Offset), and transformation / quantization processing in batches in units of pictures or the like instead of the CPU.
  • SAO Sample Adaptive Offset
  • the present disclosure can be used for, for example, a television receiver, a digital video recorder, a car navigation, a mobile phone, a digital camera, a digital video camera, a video conference system, or an electronic mirror.

Abstract

This encoding device (100) is provided with memory (162) and a circuit (160) which can access the memory (162). The circuit (160) derives a motion vector of a block of an image in a video, performs motion compensation by block unit or by sub-block unit, wherein sub-blocks configure a block. In the case of deriving a motion vector of a block with a template Frame Rate Up-Conversion (FRUC) method and performing motion compensation by sub-block unit, the motion vectors of the sub-blocks are derived with a bilateral FRUC method, and motion compensation is performed by sub-block unit using motion vectors of the sub-blocks.

Description

符号化装置、復号装置、符号化方法及び復号方法Encoding device, decoding device, encoding method, and decoding method
 本開示は、動き補償を行って動画像を符号化する符号化装置等に関する。 The present disclosure relates to an encoding device that encodes a moving image by performing motion compensation.
 従来、動画像を符号化するための規格として、H.265が存在する。H.265は、HEVC(High Efficiency Video Coding)とも呼ばれる。 Conventionally, as a standard for encoding moving images, H.264 265 exists. H. H.265 is also called HEVC (High Efficiency Video Coding).
 しかしながら、動画像の符号化及び復号において、動き補償が非効率的に行われた場合、符号量、画質又は処理速度等に悪影響が及ぶ可能性がある。 However, when motion compensation is performed inefficiently in encoding and decoding of moving images, there is a possibility that the amount of code, image quality, processing speed, etc. will be adversely affected.
 そこで、本開示は、動き補償を効率的に行うことができる符号化装置等を提供する。 Therefore, the present disclosure provides an encoding device and the like that can efficiently perform motion compensation.
 本開示の一態様に係る符号化装置は、動き補償を行って動画像を符号化する符号化装置であって、メモリと、前記メモリにアクセス可能な回路とを備え、前記メモリにアクセス可能な前記回路は、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 An encoding apparatus according to an aspect of the present disclosure is an encoding apparatus that encodes a moving image by performing motion compensation, and includes a memory and a circuit that can access the memory, and the memory is accessible The circuit derives a motion vector of an image block in the moving image, performs the motion compensation in a unit of the block or a unit of a sub-block constituting the block, and a template FRUC (Frame Rate Up-Conversion). ) Method to derive the motion vector of the block and perform the motion compensation in the unit of the sub-block, the motion vector of the sub-block is derived by the bilateral FRUC method, and the motion vector of the sub-block is used. The motion compensation is performed in units of the sub-block, and the template FRUC The equation is a method of deriving the motion vector of the processing target area that is the block or the sub-block according to the matching degree between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture. In addition, the bilateral FRUC method is a method of deriving the motion vector of the processing target region according to the matching degree of two reconstructed images of two regions in two different reference pictures.
 なお、これらの包括的又は具体的な態様は、システム、装置、方法、集積回路、コンピュータプログラム、又は、コンピュータ読み取り可能なCD-ROMなどの非一時的な記録媒体で実現されてもよく、システム、装置、方法、集積回路、コンピュータプログラム、及び、記録媒体の任意な組み合わせで実現されてもよい。 Note that these comprehensive or specific aspects may be realized by a system, apparatus, method, integrated circuit, computer program, or non-transitory recording medium such as a computer-readable CD-ROM. The present invention may be realized by any combination of an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
 本開示の一態様に係る符号化装置等は、動き補償を効率的に行うことができる。 The encoding apparatus and the like according to one aspect of the present disclosure can efficiently perform motion compensation.
図1は、実施の形態1に係る符号化装置の機能構成を示すブロック図である。FIG. 1 is a block diagram showing a functional configuration of the encoding apparatus according to Embodiment 1. 図2は、実施の形態1におけるブロック分割の一例を示す図である。FIG. 2 is a diagram illustrating an example of block division in the first embodiment. 図3は、各変換タイプに対応する変換基底関数を示す表である。FIG. 3 is a table showing conversion basis functions corresponding to each conversion type. 図4Aは、ALFで用いられるフィルタの形状の一例を示す図である。FIG. 4A is a diagram illustrating an example of the shape of a filter used in ALF. 図4Bは、ALFで用いられるフィルタの形状の他の一例を示す図である。FIG. 4B is a diagram illustrating another example of the shape of a filter used in ALF. 図4Cは、ALFで用いられるフィルタの形状の他の一例を示す図である。FIG. 4C is a diagram illustrating another example of the shape of a filter used in ALF. 図5Aは、イントラ予測における67個のイントラ予測モードを示す図である。FIG. 5A is a diagram illustrating 67 intra prediction modes in intra prediction. 図5Bは、OBMC処理による予測画像補正処理の概要を説明するためのフローチャートである。FIG. 5B is a flowchart for explaining the outline of the predicted image correction process by the OBMC process. 図5Cは、OBMC処理による予測画像補正処理の概要を説明するための概念図である。FIG. 5C is a conceptual diagram for explaining the outline of the predicted image correction process by the OBMC process. 図5Dは、FRUCの一例を示す図である。FIG. 5D is a diagram illustrating an example of FRUC. 図6は、動き軌道に沿う2つのブロック間でのパターンマッチング(バイラテラルマッチング)を説明するための図である。FIG. 6 is a diagram for explaining pattern matching (bilateral matching) between two blocks along the motion trajectory. 図7は、カレントピクチャ内のテンプレートと参照ピクチャ内のブロックとの間でのパターンマッチング(テンプレートマッチング)を説明するための図である。FIG. 7 is a diagram for explaining pattern matching (template matching) between a template in the current picture and a block in the reference picture. 図8は、等速直線運動を仮定したモデルを説明するための図である。FIG. 8 is a diagram for explaining a model assuming constant velocity linear motion. 図9Aは、複数の隣接ブロックの動きベクトルに基づくサブブロック単位の動きベクトルの導出を説明するための図である。FIG. 9A is a diagram for explaining derivation of a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks. 図9Bは、マージモードによる動きベクトル導出処理の概要を説明するための図である。FIG. 9B is a diagram for explaining the outline of the motion vector deriving process in the merge mode. 図9Cは、DMVR処理の概要を説明するための概念図である。FIG. 9C is a conceptual diagram for explaining an outline of DMVR processing. 図9Dは、LIC処理による輝度補正処理を用いた予測画像生成方法の概要を説明するための図である。FIG. 9D is a diagram for describing an overview of a predicted image generation method using luminance correction processing by LIC processing. 図10は、実施の形態1に係る復号装置の機能構成を示すブロック図である。FIG. 10 is a block diagram showing a functional configuration of the decoding apparatus according to the first embodiment. 図11は、実施の形態1に係る符号化装置によって行われる画面間予測に関連する処理を説明するためのブロック図である。FIG. 11 is a block diagram for explaining processing related to inter-screen prediction performed by the encoding apparatus according to Embodiment 1. 図12は、実施の形態1に係る復号装置によって行われる画面間予測に関連する処理を説明するためのブロック図である。FIG. 12 is a block diagram for explaining processing related to inter-screen prediction performed by the decoding apparatus according to Embodiment 1. 図13は、実施の形態1に係る画面間予測の第1具体例を示すフローチャートである。FIG. 13 is a flowchart showing a first specific example of inter-screen prediction according to the first embodiment. 図14は、実施の形態1に係る画面間予測の第2具体例を示すフローチャートである。FIG. 14 is a flowchart showing a second specific example of inter-screen prediction according to the first embodiment. 図15は、実施の形態1に係る画面間予測の第3具体例を示すフローチャートである。FIG. 15 is a flowchart showing a third specific example of inter-screen prediction according to the first embodiment. 図16は、実施の形態1に係る画面間予測の第4具体例を示すフローチャートである。FIG. 16 is a flowchart illustrating a fourth specific example of inter-screen prediction according to the first embodiment. 図17は、実施の形態1に係る画面間予測の第5具体例を示すフローチャートである。FIG. 17 is a flowchart showing a fifth specific example of inter-screen prediction according to the first embodiment. 図18は、実施の形態1に係る画面間予測の第6具体例を示すフローチャートである。FIG. 18 is a flowchart illustrating a sixth specific example of inter-screen prediction according to the first embodiment. 図19は、実施の形態1に係るテンプレートFRUC方式を示す概念図である。FIG. 19 is a conceptual diagram showing the template FRUC method according to the first embodiment. 図20は、実施の形態1に係るバイラテラルFRUC方式を示す概念図である。FIG. 20 is a conceptual diagram showing the bilateral FRUC method according to the first embodiment. 図21は、実施の形態1に係るFRUC方式で動きベクトルを導出する動作を示すフローチャートである。FIG. 21 is a flowchart showing an operation of deriving a motion vector by the FRUC method according to the first embodiment. 図22は、実施の形態1に係る符号化装置の実装例を示すブロック図である。FIG. 22 is a block diagram illustrating an implementation example of the coding apparatus according to Embodiment 1. 図23は、実施の形態1に係る符号化装置の第1動作例を示すフローチャートである。FIG. 23 is a flowchart showing a first operation example of the coding apparatus according to Embodiment 1. 図24は、実施の形態1に係る符号化装置の第2動作例を示すフローチャートである。FIG. 24 is a flowchart showing a second operation example of the coding apparatus according to Embodiment 1. 図25は、実施の形態1に係る復号装置の実装例を示すブロック図である。FIG. 25 is a block diagram illustrating an implementation example of the decoding apparatus according to the first embodiment. 図26は、実施の形態1に係る復号装置の第1動作例を示すフローチャートである。FIG. 26 is a flowchart showing a first operation example of the decoding apparatus according to the first embodiment. 図27は、実施の形態1に係る復号装置の第2動作例を示すフローチャートである。FIG. 27 is a flowchart showing a second operation example of the decoding apparatus according to the first embodiment. 図28は、コンテンツ配信サービスを実現するコンテンツ供給システムの全体構成図である。FIG. 28 is an overall configuration diagram of a content supply system that implements a content distribution service. 図29は、スケーラブル符号化時の符号化構造の一例を示す図である。FIG. 29 is a diagram illustrating an example of a coding structure at the time of scalable coding. 図30は、スケーラブル符号化時の符号化構造の一例を示す図である。FIG. 30 is a diagram illustrating an example of a coding structure at the time of scalable coding. 図31は、webページの表示画面例を示す図である。FIG. 31 is a diagram illustrating an example of a web page display screen. 図32は、webページの表示画面例を示す図である。FIG. 32 shows an example of a web page display screen. 図33は、スマートフォンの一例を示す図である。FIG. 33 is a diagram illustrating an example of a smartphone. 図34は、スマートフォンの構成例を示すブロック図である。FIG. 34 is a block diagram illustrating a configuration example of a smartphone.
 (本開示の基礎となった知見)
 動画像の符号化及び復号において、動き補償が行われる場合がある。動き補償は、画面間予測又はインター予測とも呼ばれる。動き補償には、動きベクトルが用いられる。この動きベクトルを導出する方式として、例えば、通常画面間予測方式、及び、FRUC(Frame Rate Up-Conversion)方式等が存在する。
(Knowledge that became the basis of this disclosure)
Motion compensation may be performed in encoding and decoding of moving images. Motion compensation is also called inter-screen prediction or inter prediction. A motion vector is used for motion compensation. As a method for deriving this motion vector, for example, there are a normal inter-screen prediction method, a FRUC (Frame Rate Up-Conversion) method, and the like.
 通常画面間予測方式では、符号化装置が、処理対象ピクチャにおける処理対象領域の画像を用いて、動きベクトルを導出する。そして、符号化装置は、動きベクトルの情報を符号化する。復号装置は、動きベクトルの情報を復号することで、動きベクトルを導出する。これにより、符号化装置と復号装置とが、同じ動きベクトルを用いて、動き補償を行うことができる。 In the normal inter-screen prediction method, the encoding device derives a motion vector using the image of the processing target area in the processing target picture. The encoding device encodes motion vector information. The decoding device derives a motion vector by decoding the information on the motion vector. Accordingly, the encoding device and the decoding device can perform motion compensation using the same motion vector.
 FRUC方式では、符号化装置が、処理対象ピクチャにおける処理対象領域の画像を用いずに、処理対象領域とは異なる領域の再構成画像を用いて、動きベクトルを導出する。復号装置も、処理対象ピクチャにおける処理対象領域の画像を用いずに、処理対象領域とは異なる領域の再構成画像を用いて、動きベクトルを導出する。 In the FRUC method, the encoding device derives a motion vector using a reconstructed image of a region different from the processing target region without using the processing target region image in the processing target picture. The decoding apparatus also derives a motion vector using a reconstructed image of a region different from the processing target region without using the processing target region image in the processing target picture.
 具体的には、FRUC方式として、テンプレートFRUC方式及びバイラテラルFRUC方式が存在する。テンプレートFRUC方式では、処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける参照領域の再構成画像とを用いて、動きベクトルが導出される。バイラテラルFRUC方式では、2つの参照ピクチャにおける2つの参照領域の2つの再構成画像を用いて、動きベクトルが導出される。 Specifically, there are a template FRUC method and a bilateral FRUC method as FRUC methods. In the template FRUC method, a motion vector is derived using a reconstructed image of a region adjacent to a processing target region and a reconstructed image of a reference region in a reference picture. In the bilateral FRUC method, motion vectors are derived using two reconstructed images of two reference regions in two reference pictures.
 これにより、符号化装置と復号装置とが、動きベクトルの符号化及び復号を行うことなく、共通の方法で同じ動きベクトルを導出することができ、同じ動きベクトルを用いて、動き補償を行うことができる。したがって、符号量が削減される。 Thereby, the encoding device and the decoding device can derive the same motion vector by a common method without encoding and decoding the motion vector, and perform motion compensation using the same motion vector. Can do. Therefore, the code amount is reduced.
 また、FRUC方式では、符号化の単位よりも細かい単位で動き補償が行われる。具体的には、通常画面間予測方式では、符号化ユニット又は予測ユニットと呼ばれるブロックの単位で動き補償が行われるが、FRUC方式では、このブロックの単位よりも細かいサブブロックの単位で動き補償が行われる。FRUC方式では、動きベクトルの符号化及び復号が行われないため、細かい単位で動き補償が行われることにより、符号量の増加なしで、予測精度の改善が見込まれる。 Also, in the FRUC method, motion compensation is performed in units smaller than the encoding unit. Specifically, in the normal inter-frame prediction method, motion compensation is performed in units of blocks called encoding units or prediction units. In the FRUC method, motion compensation is performed in units of sub-blocks that are finer than this block unit. Done. In the FRUC method, since the motion vector is not encoded and decoded, the motion compensation is performed in a fine unit, so that the prediction accuracy can be improved without increasing the code amount.
 しかしながら、動き補償が効率的に行われない場合があり、これにより、符号量、画質又は処理速度等に悪影響が及ぶ可能性がある。 However, motion compensation may not be performed efficiently, which may adversely affect the code amount, image quality, processing speed, or the like.
 例えば、テンプレートFRUC方式では、動きベクトルの導出に、処理対象領域に隣接する領域の再構成画像が用いられる。したがって、サブブロックに隣接する領域の再構成画像が生成されていない場合、テンプレートFRUC方式でサブブロックの動きベクトルが適切に導出されず、動き補償が効率的に行われない。 For example, in the template FRUC method, a reconstructed image of a region adjacent to the processing target region is used to derive a motion vector. Therefore, when the reconstructed image of the area adjacent to the sub-block is not generated, the motion vector of the sub-block is not appropriately derived by the template FRUC method, and the motion compensation is not efficiently performed.
 また、サブブロックの単位で動き補償が行われた場合、処理量が増加し、処理遅延が大きくなる可能性がある。また、サブブロックの単位で行われる動き補償において、画像の内容によっては、ブロックの単位で行われる動き補償と比べて、予測精度が改善されない場合もある。 Also, when motion compensation is performed in units of sub-blocks, the amount of processing increases and processing delay may increase. In addition, in motion compensation performed in units of sub-blocks, depending on the content of an image, prediction accuracy may not be improved as compared with motion compensation performed in units of blocks.
 そこで、例えば、本開示の一態様に係る符号化装置は、動き補償を行って動画像を符号化する符号化装置であって、メモリと、前記メモリにアクセス可能な回路とを備え、前記メモリにアクセス可能な前記回路は、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Thus, for example, an encoding device according to an aspect of the present disclosure is an encoding device that encodes a moving image by performing motion compensation, and includes a memory and a circuit that can access the memory, and the memory The circuit that can access the image derives the motion vector of the block of the image in the moving image, performs the motion compensation in the unit of the block or the unit of the sub-block constituting the block, and generates a template FRUC (Frame When the motion vector of the block is derived by the rate up-conversion method and the motion compensation is performed in units of the sub-block, the motion vector of the sub-block is derived by the bilateral FRUC method and the motion of the sub-block is derived. Performing the motion compensation in units of the sub-block using a vector, In the rate FRUC method, the motion vector of the processing target area that is the block or the sub-block is derived according to the degree of matching between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture. The bilateral FRUC method is a method for deriving the motion vector of the processing target region according to the degree of matching between two reconstructed images of two regions in two different reference pictures.
 これにより、符号化装置は、ブロックの動きベクトルがテンプレートFRUC方式で導出された場合でも、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、符号化装置は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。そして、符号化装置は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Accordingly, the encoding apparatus can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, the encoding apparatus can appropriately derive the motion vector of the sub block even when the reconstructed image of the region adjacent to the sub block is not generated. Then, the encoding apparatus can efficiently perform motion compensation by using the appropriately derived motion vector.
 また、例えば、前記回路は、前記テンプレートFRUC方式で前記ブロックの動きベクトルを導出して前記ブロックの単位又は前記サブブロックの単位で前記動き補償を行う場合において、前記ブロックの動きベクトルが片方向予測の動きベクトルである場合、前記ブロックを動きベクトルを用いて前記ブロックの単位で前記動き補償を行い、前記ブロックの動きベクトルが双方向予測の動きベクトルである場合、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う。 For example, when the circuit derives a motion vector of the block by the template FRUC method and performs the motion compensation in the unit of the block or the unit of the sub-block, the motion vector of the block is unidirectionally predicted. If the motion vector of the block is a motion vector for bi-prediction, the motion compensation of the block is performed using the motion vector. Then, the motion compensation is performed in units of the sub-blocks.
 これにより、符号化装置は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適している場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 Accordingly, the encoding apparatus can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. . Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、符号化装置は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適していない場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when the motion vector derived as the motion vector of the block in the template FRUC method is not suitable for the bilateral FRUC method, the encoding device efficiently performs motion compensation in units of blocks using the block motion vector as it is. It can be carried out.
 また、例えば、前記回路は、前記バイラテラルFRUC方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、前記バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う。 For example, when the circuit derives the motion vector of the block by the bilateral FRUC method and performs the motion compensation in units of the subblock, the circuit calculates the motion vector of the subblock by the bilateral FRUC method. And the motion compensation is performed in units of the sub-block using the motion vector of the sub-block.
 これにより、符号化装置は、テンプレートFRUC方式でブロックの動きベクトルが導出された場合も、バイラテラルFRUC方式でブロックの動きベクトルが導出された場合も、バイラテラルFRUC方式でサブブロックの動きベクトルを導出することができる。したがって、符号化装置は、この2つの場合において、同じように、サブブロックの動きベクトルを導出することができる。 As a result, the encoding apparatus obtains the sub-block motion vector by the bilateral FRUC method regardless of whether the block motion vector is derived by the template FRUC method or the block motion vector by the bilateral FRUC method. Can be derived. Therefore, the encoding apparatus can derive the motion vector of the sub-block in the same way in these two cases.
 また、例えば、前記回路は、前記サブブロックの動きベクトルを導出する場合、前記ブロックの動きベクトルを用いて前記サブブロックの動きベクトルの候補を導出し、導出された前記候補を用いて前記サブブロックの動きベクトルを導出する。 For example, when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block. The motion vector of is derived.
 これにより、符号化装置は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、符号化装置は、予測精度を向上させることができる。 Thereby, the encoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding device can improve prediction accuracy.
 また、例えば、本開示の一態様に係る復号装置は、動き補償を行って動画像を復号する復号装置であって、メモリと、前記メモリにアクセス可能な回路とを備え、前記メモリにアクセス可能な前記回路は、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Further, for example, a decoding device according to an aspect of the present disclosure is a decoding device that performs motion compensation and decodes a moving image, and includes a memory and a circuit that can access the memory, and can access the memory The circuit derives a motion vector of an image block in the moving image, performs the motion compensation in the unit of the block or a unit of a sub-block constituting the block, and generates a template FRUC (Frame Rate Up- When the motion vector of the block is derived by the conversion method and the motion compensation is performed in units of the sub block, the motion vector of the sub block is derived by the bilateral FRUC method, and the motion vector of the sub block is used. And performing the motion compensation in units of the sub-block, In the RUC method, a motion vector of a processing target area that is the block or the sub-block is derived according to a matching degree between a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture. The bilateral FRUC method is a method of deriving the motion vector of the processing target region according to the matching degree of two reconstructed images of two regions in two different reference pictures.
 これにより、復号装置は、ブロックの動きベクトルがテンプレートFRUC方式で導出された場合でも、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、復号装置は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。そして、復号装置は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thus, the decoding apparatus can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, the decoding apparatus can appropriately derive the motion vector of the sub block even when the reconstructed image of the region adjacent to the sub block is not generated. Then, the decoding apparatus can efficiently perform motion compensation using the appropriately derived motion vector.
 また、例えば、前記回路は、前記テンプレートFRUC方式で前記ブロックの動きベクトルを導出して前記ブロックの単位又は前記サブブロックの単位で前記動き補償を行う場合において、前記ブロックの動きベクトルが片方向予測の動きベクトルである場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行い、前記ブロックの動きベクトルが双方向予測の動きベクトルである場合、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う。 For example, when the circuit derives a motion vector of the block by the template FRUC method and performs the motion compensation in the unit of the block or the unit of the sub-block, the motion vector of the block is unidirectionally predicted. If the motion vector of the block is a bi-predicted motion vector, the motion compensation of the block is performed using the motion vector of the block. Then, the motion compensation is performed in units of the sub-blocks.
 これにより、復号装置は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適している場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 Thereby, the decoding device can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、復号装置は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適していない場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when a motion vector derived as a block motion vector in the template FRUC method is not suitable for the bilateral FRUC method, the decoding apparatus efficiently performs motion compensation in units of blocks using the block motion vector as it is. be able to.
 また、例えば、前記回路は、前記バイラテラルFRUC方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、前記バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う。 For example, when the circuit derives the motion vector of the block by the bilateral FRUC method and performs the motion compensation in units of the subblock, the circuit calculates the motion vector of the subblock by the bilateral FRUC method. And the motion compensation is performed in units of the sub-block using the motion vector of the sub-block.
 これにより、復号装置は、テンプレートFRUC方式でブロックの動きベクトルが導出された場合も、バイラテラルFRUC方式でブロックの動きベクトルが導出された場合も、バイラテラルFRUC方式でサブブロックの動きベクトルを導出することができる。したがって、復号装置は、この2つの場合において、同じように、サブブロックの動きベクトルを導出することができる。 As a result, the decoding apparatus derives the sub-block motion vector by the bilateral FRUC method regardless of whether the block motion vector is derived by the template FRUC method or the block motion vector by the bilateral FRUC method. can do. Therefore, the decoding apparatus can derive the motion vector of the sub-block in the same way in these two cases.
 また、例えば、前記回路は、前記サブブロックの動きベクトルを導出する場合、前記ブロックの動きベクトルを用いて前記サブブロックの動きベクトルの候補を導出し、導出された前記候補を用いて前記サブブロックの動きベクトルを導出する。 For example, when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block. The motion vector of is derived.
 これにより、復号装置は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、復号装置は、予測精度を向上させることができる。 Thereby, the decoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus can improve prediction accuracy.
 また、例えば、本開示の一態様に係る符号化方法は、動き補償を行って動画像を符号化する符号化方法であって、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Further, for example, an encoding method according to an aspect of the present disclosure is an encoding method for encoding a moving image by performing motion compensation, in which a motion vector of an image block in the moving image is derived, and the block Or the sub-block unit constituting the block, the motion compensation is performed, and the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion is performed in the sub-block unit. When performing compensation, a motion vector of the sub-block is derived by a bilateral FRUC method, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC method Alternatively, the motion vector of the processing target area that is the sub-block is The bilateral FRUC method is a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture. This is a method of deriving according to the degree of matching between two reconstructed images of two regions in two different reference pictures.
 これにより、この符号化方法を用いる装置等は、ブロックの動きベクトルがテンプレートFRUC方式で導出された場合でも、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、この符号化方法を用いる装置等は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。そして、この符号化方法を用いる装置等は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thus, an apparatus using this encoding method can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, a device or the like using this encoding method can appropriately derive a motion vector of a sub block even when a reconstructed image of an area adjacent to the sub block is not generated. An apparatus using this encoding method can efficiently perform motion compensation using an appropriately derived motion vector.
 また、例えば、本開示の一態様に係る復号方法は、動き補償を行って動画像を復号する復号方法であって、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Further, for example, a decoding method according to an aspect of the present disclosure is a decoding method that performs motion compensation and decodes a moving image, and derives a motion vector of an image block in the moving image, the unit of the block, Alternatively, the motion compensation is performed in units of subblocks constituting the block, and the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion compensation is performed in units of the subblocks. In this case, a motion vector of the sub-block is derived by a bilateral FRUC scheme, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC scheme is configured to use the block or the sub-block. The motion vector of the processing target area which is a block is This is a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture, and the bilateral FRUC method uses different motion vectors for the processing target region. This is a method of deriving according to the degree of matching between two reconstructed images of two regions in two reference pictures.
 これにより、この復号方法を用いる装置等は、ブロックの動きベクトルがテンプレートFRUC方式で導出された場合でも、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、この復号方法を用いる装置等は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。そして、この復号方法を用いる装置等は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thus, an apparatus or the like using this decoding method can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, a device or the like using this decoding method can appropriately derive a motion vector of a sub block even when a reconstructed image of an area adjacent to the sub block is not generated. An apparatus using this decoding method can efficiently perform motion compensation using an appropriately derived motion vector.
 また、例えば、本開示の一態様に係る符号化装置は、動き補償を行って動画像を符号化する符号化装置であって、メモリと、前記メモリにアクセス可能な回路とを備え、前記メモリにアクセス可能な前記回路は、前記動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を符号化し、前記ブロックを構成するサブブロックの単位で前記動き補償を行うことが有効であるか無効であるかを示す第2制御情報を符号化し、前記1つの方式で前記ブロックの動きベクトルを導出し、前記サブブロックの単位で前記動き補償を行うことが有効であるか無効であるかに従って、前記サブブロックの単位で前記動き補償を行うか前記ブロックの単位で前記動き補償を行うかを判定し、前記サブブロックの単位で前記動き補償を行うと判定された場合、前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記ブロックの単位で前記動き補償を行うと判定された場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行う。 Further, for example, an encoding device according to an aspect of the present disclosure is an encoding device that performs motion compensation and encodes a moving image, and includes a memory and a circuit that can access the memory, and the memory The circuit accessible to encodes first control information indicating one method for deriving a motion vector of an image block in the moving image, and performs the motion compensation in units of sub-blocks constituting the block Is it effective to encode the second control information indicating whether is effective or invalid, derive the motion vector of the block by the one method, and perform the motion compensation in units of the sub-blocks? It is determined whether the motion compensation is performed in units of the sub-blocks or the motion compensation is performed in units of the blocks according to whether it is invalid. When it is determined that compensation is to be performed, a motion vector of the sub-block is derived, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the motion compensation is performed in units of the block If it is determined, the motion compensation is performed in units of the block using the motion vector of the block.
 これにより、符号化装置は、ブロックの動きベクトルを導出する方式とは別に、サブブロックの単位で動き補償を行うことを有効化又は無効化することができる。したがって、符号化装置は、動き補償が非効率的に行われることを適切に抑制することができる。すなわち、符号化装置は、動き補償を効率的に行うことができる。 Accordingly, the encoding apparatus can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the block motion vector. Therefore, the encoding apparatus can appropriately suppress that the motion compensation is performed inefficiently. That is, the encoding device can efficiently perform motion compensation.
 また、例えば、前記回路は、通常画面間予測方式とテンプレートFRUC(Frame Rate Up-Conversion)方式とバイラテラルFRUC方式とを含む複数の方式から前記1つの方式を選択し、前記通常画面間予測方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを導出し、前記処理対象領域の動きベクトルの情報を符号化する方式であり、前記テンプレートFRUC方式は、前記処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 For example, the circuit selects the one method from a plurality of methods including a normal inter-screen prediction method, a template FRUC (Frame Rate Up-Conversion) method, and a bilateral FRUC method, and the normal inter-screen prediction method. Is a method of deriving a motion vector of the processing target region that is the block or the sub-block, and encoding information on the motion vector of the processing target region, and the template FRUC method is a motion vector of the processing target region. Is derived in accordance with the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture, and the bilateral FRUC method calculates the motion vector of the processing target region. , Two of the two regions in two different reference pictures It is a method to derive in accordance goodness of the reconstructed image.
 これにより、符号化装置は、ブロックの動きベクトルを導出する1つの方式を複数の方式から適応的に選択することができる。 Thereby, the encoding apparatus can adaptively select one method for deriving the motion vector of the block from a plurality of methods.
 また、例えば、前記回路は、前記1つの方式がテンプレートFRUC方式又はバイラテラルFRUC方式である場合において、(i)前記サブブロックの単位で前記動き補償を行うと判定された場合に前記サブブロックの単位で前記動き補償を行い、(ii)前記ブロックの単位で前記動き補償を行うと判定された場合に前記ブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Further, for example, in the case where the one method is a template FRUC method or a bilateral FRUC method, (i) when it is determined that the motion compensation is performed in units of the subblock, The motion compensation is performed in units, and (ii) the motion compensation is performed in units of blocks when it is determined that the motion compensation is performed in units of blocks, and the template FRUC scheme is the block or subblock Is a method for deriving a motion vector of a processing target region according to the degree of matching between a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture, and the bilateral FRUC method is The motion vector of the processing target region is set to two regions in two different reference pictures. It is a method to derive in accordance with goodness of two reconstructed images.
 これにより、符号化装置は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。よって、符号化装置は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Accordingly, the encoding device can perform motion compensation in an appropriate unit according to a determination result of whether or not to perform motion compensation in units of sub-blocks when a block motion vector is derived by the FRUC method. . The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, the encoding apparatus can perform motion compensation in an appropriate unit according to whether or not it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the FRUC method. it can.
 また、例えば、前記回路は、前記1つの方式が通常画面間予測方式である場合において、(i)前記サブブロックの単位で前記動き補償を行うと判定された場合に前記サブブロックの単位で前記動き補償を行い、(ii)前記ブロックの単位で前記動き補償を行うと判定された場合に前記ブロックの単位で前記動き補償を行い、前記通常画面間予測方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを導出し、前記処理対象領域の動きベクトルの情報を符号化する方式である。 In addition, for example, in the case where the one method is a normal inter-screen prediction method, the circuit (i) when the motion compensation is determined to be performed in units of the subblocks, the unit in the units of the subblocks. (Ii) When it is determined that the motion compensation is performed in units of the block, the motion compensation is performed in units of the block, and the normal inter-screen prediction method is performed in the block or the sub-block. In this method, a motion vector of a certain processing target area is derived and information on the motion vector of the processing target area is encoded.
 これにより、符号化装置は、FRUC方式とは異なる通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。 As a result, when the motion vector of a block is derived by a normal inter-frame prediction method different from the FRUC method, the encoding device can select an appropriate unit according to a determination result on whether to perform motion compensation in units of subblocks. Motion compensation can be performed. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
 よって、符号化装置は、通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Therefore, when the motion vector of a block is derived by the normal inter-frame prediction method, the encoding device performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in a sub-block unit. It can be carried out.
 また、例えば、前記回路は、前記サブブロックの動きベクトルを導出する場合、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記バイラテラルFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Also, for example, when the circuit derives the motion vector of the sub-block, the circuit derives the motion vector of the sub-block by the bilateral FRUC method, and the bilateral FRUC method is a process that is the block or the sub-block. In this method, the motion vector of the target region is derived according to the degree of matching between two reconstructed images in two regions in two different reference pictures.
 これにより、符号化装置は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。したがって、符号化装置は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thereby, the encoding apparatus can appropriately derive the motion vector of the sub-block even when the reconstructed image of the region adjacent to the sub-block is not generated. Therefore, the encoding apparatus can efficiently perform motion compensation by using the appropriately derived motion vector.
 また、例えば、前記回路は、前記ブロックの動きベクトルが双方向予測の動きベクトルであり、前記サブブロックの単位で前記動き補償を行うことが有効である場合、前記サブブロックの単位で前記動き補償を行うと判定し、前記ブロックの動きベクトルが双方向予測の動きベクトルであり、前記サブブロックの単位で前記動き補償を行うことが無効である場合、前記ブロックの単位で前記動き補償を行うと判定し、前記ブロックの動きベクトルが片方向予測の動きベクトルである場合、前記ブロックの単位で前記動き補償を行うと判定する。 In addition, for example, when the motion vector of the block is a motion vector of bidirectional prediction and it is effective to perform the motion compensation in the unit of the sub-block, the circuit compensates for the motion compensation in the unit of the sub-block. If the motion vector of the block is a bi-directional motion vector and it is invalid to perform the motion compensation in units of the sub-blocks, the motion compensation is performed in units of the block. If the motion vector of the block is a unidirectional motion vector, it is determined that the motion compensation is performed in units of the block.
 これにより、符号化装置は、ブロックの動きベクトルがバイラテラルFRUC方式に適しており、かつ、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 As a result, the encoding apparatus converts the sub-block motion vector to the bilateral FRUC when the motion vector of the block is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. Can be derived in a manner. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、符号化装置は、ブロックの動きベクトルがバイラテラルFRUC方式に適していない、又は、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when the motion vector of a block is not suitable for the bilateral FRUC method or when it is invalid to perform motion compensation in units of sub-blocks, the encoding device efficiently uses the motion vector of the block as it is. Motion compensation can be performed in units of blocks.
 また、例えば、前記回路は、前記サブブロックの単位で前記動き補償を行うことが有効である場合、前記サブブロックの単位で前記動き補償を行うと判定し、前記サブブロックの単位で前記動き補償を行うことが無効である場合、前記ブロックの単位で前記動き補償を行うと判定する。 Further, for example, when it is effective to perform the motion compensation in units of the sub-blocks, the circuit determines that the motion compensation is performed in units of the sub-blocks, and the motion compensation is performed in units of the sub-blocks. If it is invalid to perform the motion compensation, it is determined that the motion compensation is performed in units of the block.
 これにより、符号化装置は、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの単位で動き補償を行うことができる。そして、符号化装置は、サブブロックの単位で動き補償を行うことが無効である場合に、ブロックの単位で動き補償を行うことができる。したがって、符号化装置は、動き補償が行われる単位をシンプルに制御することができる。 Thereby, the encoding apparatus can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks. Then, when it is invalid to perform motion compensation in units of sub-blocks, the encoding device can perform motion compensation in units of blocks. Therefore, the encoding apparatus can simply control the unit in which motion compensation is performed.
 また、例えば、前記回路は、前記サブブロックの動きベクトルを導出する場合、前記ブロックの動きベクトルを用いて前記サブブロックの動きベクトルの候補を導出し、導出された前記候補を用いて前記サブブロックの動きベクトルを導出する。 For example, when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block. The motion vector of is derived.
 これにより、符号化装置は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、符号化装置は、予測精度を向上させることができる。 Thereby, the encoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding device can improve prediction accuracy.
 また、例えば、前記回路は、前記ブロックのヘッダ層、前記ブロックを含むスライスのヘッダ層、前記ブロックを含むピクチャのヘッダ層、又は、前記ブロックを含むストリームのヘッダ層へ前記第1制御情報を符号化し、前記ブロックのヘッダ層、前記スライスのヘッダ層、前記ピクチャのヘッダ層、又は、前記ストリームのヘッダ層へ前記第2制御情報を符号化する。 For example, the circuit encodes the first control information to a header layer of the block, a header layer of a slice including the block, a header layer of a picture including the block, or a header layer of a stream including the block. The second control information is encoded into the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
 これにより、符号化装置は、ブロックの動きベクトルを導出する方式、及び、サブブロックの単位で動き補償を行うことが有効であるか否かを適切な範囲で指定することができる。 Thereby, the encoding apparatus can designate a scheme for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
 また、例えば、本開示の一態様に係る復号装置は、動き補償を行って動画像を復号する復号装置であって、メモリと、前記メモリにアクセス可能な回路とを備え、前記メモリにアクセス可能な前記回路は、前記動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を復号し、前記ブロックを構成するサブブロックの単位で前記動き補償を行うことが有効であるか無効であるかを示す第2制御情報を復号し、前記1つの方式で前記ブロックの動きベクトルを導出し、前記サブブロックの単位で前記動き補償を行うことが有効であるか無効であるかに従って、前記サブブロックの単位で前記動き補償を行うか前記ブロックの単位で前記動き補償を行うかを判定し、前記サブブロックの単位で前記動き補償を行うと判定された場合、前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記ブロックの単位で前記動き補償を行うと判定された場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行う。 Further, for example, a decoding device according to an aspect of the present disclosure is a decoding device that performs motion compensation and decodes a moving image, and includes a memory and a circuit that can access the memory, and can access the memory It is effective that the circuit decodes first control information indicating one method for deriving a motion vector of an image block in the moving image, and performs the motion compensation in units of sub-blocks constituting the block. It is effective or ineffective to decode the second control information indicating whether it is present or invalid, derive the motion vector of the block by the one method, and perform the motion compensation in units of the sub-blocks Accordingly, it is determined whether the motion compensation is performed in units of the sub-blocks or the motion compensation is performed in units of the blocks, and the motion compensation is performed in units of the sub-blocks. Is determined, the motion vector of the sub-block is derived, the motion compensation of the sub-block is performed using the motion vector of the sub-block, and the motion compensation is determined to be performed in the unit of the block. In this case, the motion compensation is performed in units of the block using the motion vector of the block.
 これにより、復号装置は、ブロックの動きベクトルを導出する方式とは別に、サブブロックの単位で動き補償を行うことを有効化又は無効化することができる。したがって、復号装置は、動き補償が非効率的に行われることを適切に抑制することができる。すなわち、復号装置は、動き補償を効率的に行うことができる。 Thereby, the decoding apparatus can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the motion vector of the block. Therefore, the decoding apparatus can appropriately suppress inefficient motion compensation. That is, the decoding device can efficiently perform motion compensation.
 また、例えば、前記回路は、通常画面間予測方式とテンプレートFRUC(Frame Rate Up-Conversion)方式とバイラテラルFRUC方式とを含む複数の方式から前記1つの方式を選択し、前記通常画面間予測方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルの情報を復号し、前記処理対象領域の動きベクトルを導出する方式であり、前記テンプレートFRUC方式は、前記処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 For example, the circuit selects the one method from a plurality of methods including a normal inter-screen prediction method, a template FRUC (Frame Rate Up-Conversion) method, and a bilateral FRUC method, and the normal inter-screen prediction method. Is a method of decoding motion vector information of the processing target region that is the block or the sub-block and deriving a motion vector of the processing target region, and the template FRUC method uses the motion vector of the processing target region. , A method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture, and the bilateral FRUC method is a motion vector of the processing target region, Two of the two regions in two different reference pictures It is a method to derive in accordance with goodness of constituent images.
 これにより、復号装置は、ブロックの動きベクトルを導出する1つの方式を複数の方式から適応的に選択することができる。 Thereby, the decoding apparatus can adaptively select one method for deriving the motion vector of the block from a plurality of methods.
 また、例えば、前記回路は、前記1つの方式がテンプレートFRUC方式又はバイラテラルFRUC方式である場合において、(i)前記サブブロックの単位で前記動き補償を行うと判定された場合に前記サブブロックの単位で前記動き補償を行い、(ii)前記ブロックの単位で前記動き補償を行うと判定された場合に前記ブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Further, for example, in the case where the one method is a template FRUC method or a bilateral FRUC method, (i) when it is determined that the motion compensation is performed in units of the subblock, The motion compensation is performed in units, and (ii) the motion compensation is performed in units of blocks when it is determined that the motion compensation is performed in units of blocks, and the template FRUC scheme is the block or subblock Is a method for deriving a motion vector of a processing target region according to the degree of matching between a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture, and the bilateral FRUC method is The motion vector of the processing target region is set to two regions in two different reference pictures. It is a method to derive in accordance with goodness of two reconstructed images.
 これにより、復号装置は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。よって、復号装置は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Thereby, when the motion vector of the block is derived by the FRUC method, the decoding apparatus can perform motion compensation in an appropriate unit according to the determination result of whether or not motion compensation is performed in units of sub-blocks. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, the decoding device can perform motion compensation in an appropriate unit according to whether or not it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the FRUC method. .
 また、例えば、前記回路は、前記1つの方式が通常画面間予測方式である場合において、(i)前記サブブロックの単位で前記動き補償を行うと判定された場合に前記サブブロックの単位で前記動き補償を行い、(ii)前記ブロックの単位で前記動き補償を行うと判定された場合に前記ブロックの単位で前記動き補償を行い、前記通常画面間予測方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルの情報を復号し、前記処理対象領域の動きベクトルを導出する方式である。 In addition, for example, in the case where the one method is a normal inter-screen prediction method, the circuit (i) when the motion compensation is determined to be performed in units of the subblocks, the unit in the units of the subblocks. (Ii) When it is determined that the motion compensation is performed in units of the block, the motion compensation is performed in units of the block, and the normal inter-screen prediction method is performed in the block or the sub-block. This is a method of decoding motion vector information of a certain processing target region and deriving the motion vector of the processing target region.
 これにより、復号装置は、FRUC方式とは異なる通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。 As a result, when the motion vector of the block is derived by the normal inter-frame prediction scheme different from the FRUC scheme, the decoding apparatus performs the appropriate unit according to the determination result of whether or not to perform the motion compensation in the sub-block unit. Motion compensation can be performed. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
 よって、復号装置は、通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Therefore, when a motion vector of a block is derived by the normal inter-frame prediction method, the decoding apparatus performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in a sub-block unit. be able to.
 また、例えば、前記回路は、前記サブブロックの動きベクトルを導出する場合、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記バイラテラルFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Also, for example, when the circuit derives the motion vector of the sub-block, the circuit derives the motion vector of the sub-block by the bilateral FRUC method, and the bilateral FRUC method is a process that is the block or the sub-block. In this method, the motion vector of the target region is derived according to the degree of matching between two reconstructed images in two regions in two different reference pictures.
 これにより、復号装置は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。したがって、復号装置は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thereby, the decoding apparatus can appropriately derive the motion vector of the sub-block even when the reconstructed image of the area adjacent to the sub-block is not generated. Therefore, the decoding apparatus can efficiently perform motion compensation using the appropriately derived motion vector.
 また、例えば、前記回路は、前記ブロックの動きベクトルが双方向予測の動きベクトルであり、前記サブブロックの単位で前記動き補償を行うことが有効である場合、前記サブブロックの単位で前記動き補償を行うと判定し、前記ブロックの動きベクトルが双方向予測の動きベクトルであり、前記サブブロックの単位で前記動き補償を行うことが無効である場合、前記ブロックの単位で前記動き補償を行うと判定し、前記ブロックの動きベクトルが片方向予測の動きベクトルである場合、前記ブロックの単位で前記動き補償を行うと判定する。 In addition, for example, when the motion vector of the block is a motion vector of bidirectional prediction and it is effective to perform the motion compensation in the unit of the sub-block, the circuit compensates for the motion compensation in the unit of the sub-block. If the motion vector of the block is a bi-directional motion vector and it is invalid to perform the motion compensation in units of the sub-blocks, the motion compensation is performed in units of the block. If the motion vector of the block is a unidirectional motion vector, it is determined that the motion compensation is performed in units of the block.
 これにより、復号装置は、ブロックの動きベクトルがバイラテラルFRUC方式に適しており、かつ、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 As a result, the decoding apparatus converts the sub-block motion vector into the bilateral FRUC scheme when the motion vector of the block is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. Can be derived. Therefore, for example, when a motion vector of a sub-block is derived using a motion vector of the block, an appropriate motion vector can be used.
 一方、復号装置は、ブロックの動きベクトルがバイラテラルFRUC方式に適していない、又は、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when the motion vector of the block is not suitable for the bilateral FRUC method, or when it is invalid to perform motion compensation in units of sub-blocks, the decoding apparatus efficiently uses the block motion vector as it is. Motion compensation can be performed in units of.
 また、例えば、前記回路は、前記サブブロックの単位で前記動き補償を行うことが有効である場合、前記サブブロックの単位で前記動き補償を行うと判定し、前記サブブロックの単位で前記動き補償を行うことが無効である場合、前記ブロックの単位で前記動き補償を行うと判定する。 Further, for example, when it is effective to perform the motion compensation in units of the sub-blocks, the circuit determines that the motion compensation is performed in units of the sub-blocks, and the motion compensation is performed in units of the sub-blocks. If it is invalid to perform the motion compensation, it is determined that the motion compensation is performed in units of the block.
 これにより、復号装置は、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの単位で動き補償を行うことができる。そして、復号装置は、サブブロックの単位で動き補償を行うことが無効である場合に、ブロックの単位で動き補償を行うことができる。したがって、復号装置は、動き補償が行われる単位をシンプルに制御することができる。 Thereby, the decoding apparatus can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks. The decoding apparatus can perform motion compensation in units of blocks when it is invalid to perform motion compensation in units of sub-blocks. Therefore, the decoding apparatus can simply control the unit in which motion compensation is performed.
 また、例えば、前記回路は、前記サブブロックの動きベクトルを導出する場合、前記ブロックの動きベクトルを用いて前記サブブロックの動きベクトルの候補を導出し、導出された前記候補を用いて前記サブブロックの動きベクトルを導出する。 For example, when the circuit derives the motion vector of the sub-block, the circuit derives a candidate for the motion vector of the sub-block using the motion vector of the block, and uses the derived candidate for the sub-block. The motion vector of is derived.
 これにより、復号装置は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、復号装置は、予測精度を向上させることができる。 Thereby, the decoding apparatus can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus can improve prediction accuracy.
 また、例えば、前記回路は、前記ブロックのヘッダ層、前記ブロックを含むスライスのヘッダ層、前記ブロックを含むピクチャのヘッダ層、又は、前記ブロックを含むストリームのヘッダ層から前記第1制御情報を復号し、前記ブロックのヘッダ層、前記スライスのヘッダ層、前記ピクチャのヘッダ層、又は、前記ストリームのヘッダ層から前記第2制御情報を復号する。 Also, for example, the circuit decodes the first control information from a header layer of the block, a header layer of a slice including the block, a header layer of a picture including the block, or a header layer of a stream including the block. Then, the second control information is decoded from the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
 これにより、復号装置は、ブロックの動きベクトルを導出する方式、及び、サブブロックの単位で動き補償を行うことが有効であるか否かを適切な範囲で指定することができる。 Thereby, the decoding apparatus can specify a method for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
 また、例えば、本開示の一態様に係る符号化方法は、動き補償を行って動画像を符号化する符号化方法であって、前記動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を符号化し、前記ブロックを構成するサブブロックの単位で前記動き補償を行うことが有効であるか無効であるかを示す第2制御情報を符号化し、前記1つの方式で前記ブロックの動きベクトルを導出し、前記サブブロックの単位で前記動き補償を行うことが有効であるか無効であるかに従って、前記サブブロックの単位で前記動き補償を行うか前記ブロックの単位で前記動き補償を行うかを判定し、前記サブブロックの単位で前記動き補償を行うと判定された場合、前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記ブロックの単位で前記動き補償を行うと判定された場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行う。 In addition, for example, an encoding method according to an aspect of the present disclosure is an encoding method for encoding a moving image by performing motion compensation, and one method for deriving a motion vector of an image block in the moving image The second control information indicating whether it is effective or invalid to perform the motion compensation in units of sub-blocks constituting the block is encoded, and the one method is used. Deriving a motion vector of the block and performing the motion compensation in units of the sub-blocks according to whether the motion compensation is valid or invalid in units of the sub-blocks or in units of the blocks It is determined whether to perform motion compensation, and when it is determined to perform the motion compensation in units of the sub-block, a motion vector of the sub-block is derived, If it is determined that the motion compensation is performed in units of the sub-block using a vector and the motion compensation is performed in units of the block, the motion compensation is performed in units of the block using the motion vector of the block. Do.
 これにより、この符号化方法を用いる装置等は、ブロックの動きベクトルを導出する方式とは別に、サブブロックの単位で動き補償を行うことを有効化又は無効化することができる。したがって、この符号化方法を用いる装置等は、動き補償が非効率的に行われることを適切に抑制することができる。すなわち、この符号化方法を用いる装置等は、動き補償を効率的に行うことができる。 Thus, an apparatus or the like using this encoding method can validate or invalidate motion compensation in units of sub-blocks separately from a method for deriving a block motion vector. Therefore, an apparatus using this encoding method can appropriately suppress inefficient motion compensation. That is, a device using this encoding method can efficiently perform motion compensation.
 また、例えば、本開示の一態様に係る復号方法は、動き補償を行って動画像を復号する復号方法であって、前記動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を復号し、前記ブロックを構成するサブブロックの単位で前記動き補償を行うことが有効であるか無効であるかを示す第2制御情報を復号し、前記1つの方式で前記ブロックの動きベクトルを導出し、前記サブブロックの単位で前記動き補償を行うことが有効であるか無効であるかに従って、前記サブブロックの単位で前記動き補償を行うか前記ブロックの単位で前記動き補償を行うかを判定し、前記サブブロックの単位で前記動き補償を行うと判定された場合、前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記ブロックの単位で前記動き補償を行うと判定された場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行う。 In addition, for example, a decoding method according to an aspect of the present disclosure is a decoding method that decodes a moving image by performing motion compensation, and is a first method that derives a motion vector of an image block in the moving image. 1 control information is decoded, second control information indicating whether it is effective or ineffective to perform the motion compensation in units of sub-blocks constituting the block is decoded, and the block Deriving a motion vector and performing the motion compensation in units of the sub-blocks according to whether it is valid or invalid to perform the motion compensation in units of the sub-blocks or performing the motion compensation in units of the blocks If it is determined that the motion compensation is performed in units of the sub-block, a motion vector of the sub-block is derived and a motion vector of the sub-block is derived. Performs the motion compensation in units of the sub-block using, if it is determined to perform the motion compensation in units of the blocks, it carries out the motion compensation in units of the block using the motion vector of the block.
 これにより、この復号方法を用いる装置等は、ブロックの動きベクトルを導出する方式とは別に、サブブロックの単位で動き補償を行うことを有効化又は無効化することができる。したがって、この復号方法を用いる装置等は、動き補償が非効率的に行われることを適切に抑制することができる。すなわち、この復号方法を用いる装置等は、動き補償を効率的に行うことができる。 Accordingly, an apparatus using this decoding method can validate or invalidate motion compensation in units of sub-blocks separately from a method for deriving a block motion vector. Therefore, an apparatus using this decoding method can appropriately suppress inefficient motion compensation. That is, an apparatus using this decoding method can efficiently perform motion compensation.
 さらに、これらの包括的又は具体的な態様は、システム、装置、方法、集積回路、コンピュータプログラム、又は、コンピュータ読み取り可能なCD-ROMなどの非一時的な記録媒体で実現されてもよく、システム、装置、方法、集積回路、コンピュータプログラム、及び、記録媒体の任意な組み合わせで実現されてもよい。 Furthermore, these comprehensive or specific aspects may be realized by a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM. The present invention may be realized by any combination of an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
 以下、実施の形態について図面を参照しながら具体的に説明する。 Hereinafter, embodiments will be specifically described with reference to the drawings.
 なお、以下で説明する実施の形態は、いずれも包括的または具体的な例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置及び接続形態、ステップ、ステップの順序などは、一例であり、請求の範囲を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、最上位概念を示す独立請求項に記載されていない構成要素については、任意の構成要素として説明される。 It should be noted that each of the embodiments described below shows a comprehensive or specific example. Numerical values, shapes, materials, components, arrangement positions and connection forms of components, steps, order of steps, and the like shown in the following embodiments are merely examples, and are not intended to limit the scope of the claims. In addition, among the constituent elements in the following embodiments, constituent elements that are not described in the independent claims indicating the highest concept are described as optional constituent elements.
 (実施の形態1)
 まず、後述する本開示の各態様で説明する処理および/または構成を適用可能な符号化装置および復号化装置の一例として、実施の形態1の概要を説明する。ただし、実施の形態1は、本開示の各態様で説明する処理および/または構成を適用可能な符号化装置および復号化装置の一例にすぎず、本開示の各態様で説明する処理および/または構成は、実施の形態1とは異なる符号化装置および復号化装置においても実施可能である。
(Embodiment 1)
First, an outline of the first embodiment will be described as an example of an encoding device and a decoding device to which the processing and / or configuration described in each aspect of the present disclosure to be described later can be applied. However, the first embodiment is merely an example of an encoding device and a decoding device to which the processing and / or configuration described in each aspect of the present disclosure can be applied, and the processing and / or processing described in each aspect of the present disclosure. The configuration can also be implemented in an encoding device and a decoding device different from those in the first embodiment.
 実施の形態1に対して本開示の各態様で説明する処理および/または構成を適用する場合、例えば以下のいずれかを行ってもよい。 When applying the processing and / or configuration described in each aspect of the present disclosure to Embodiment 1, for example, one of the following may be performed.
 (1)実施の形態1の符号化装置または復号化装置に対して、当該符号化装置または復号化装置を構成する複数の構成要素のうち、本開示の各態様で説明する構成要素に対応する構成要素を、本開示の各態様で説明する構成要素に置き換えること (1) The encoding apparatus or decoding apparatus according to the first embodiment corresponds to the constituent elements described in each aspect of the present disclosure among a plurality of constituent elements constituting the encoding apparatus or decoding apparatus. Replacing components with components described in each aspect of the disclosure
 (2)実施の形態1の符号化装置または復号化装置に対して、当該符号化装置または復号化装置を構成する複数の構成要素のうち一部の構成要素について機能または実施する処理の追加、置き換え、削除などの任意の変更を施した上で、本開示の各態様で説明する構成要素に対応する構成要素を、本開示の各態様で説明する構成要素に置き換えること (2) Addition of a function or processing to be performed on some of the constituent elements of the encoding apparatus or decoding apparatus to the encoding apparatus or decoding apparatus of the first embodiment, After making any changes such as replacement and deletion, the components corresponding to the components described in each aspect of the present disclosure are replaced with the components described in each aspect of the present disclosure.
 (3)実施の形態1の符号化装置または復号化装置が実施する方法に対して、処理の追加、および/または当該方法に含まれる複数の処理のうちの一部の処理について置き換え、削除などの任意の変更を施した上で、本開示の各態様で説明する処理に対応する処理を、本開示の各態様で説明する処理に置き換えること (3) Addition of processes to the method performed by the encoding apparatus or decoding apparatus of the first embodiment and / or replacement or deletion of some processes among a plurality of processes included in the method With any change in the above, the processing corresponding to the processing described in each aspect of the present disclosure is replaced with the processing described in each aspect of the present disclosure.
 (4)実施の形態1の符号化装置または復号化装置を構成する複数の構成要素のうちの一部の構成要素を、本開示の各態様で説明する構成要素、本開示の各態様で説明する構成要素が備える機能の一部を備える構成要素、または本開示の各態様で説明する構成要素が実施する処理の一部を実施する構成要素と組み合わせて実施すること (4) A part of the components constituting the encoding device or the decoding device according to the first embodiment is described in each aspect of the present disclosure, and in each aspect of the present disclosure. To be implemented in combination with a component that includes a part of the function provided by the component to be performed, or a component that performs a part of processing performed by the component described in each aspect of the present disclosure
 (5)実施の形態1の符号化装置または復号化装置を構成する複数の構成要素のうちの一部の構成要素が備える機能の一部を備える構成要素、または実施の形態1の符号化装置または復号化装置を構成する複数の構成要素のうちの一部の構成要素が実施する処理の一部を実施する構成要素を、本開示の各態様で説明する構成要素、本開示の各態様で説明する構成要素が備える機能の一部を備える構成要素、または本開示の各態様で説明する構成要素が実施する処理の一部を実施する構成要素と組み合わせて実施すること (5) A component provided with a part of the functions of some of the components constituting the encoding device or the decoding device of the first embodiment, or the encoding device of the first embodiment Alternatively, the constituent elements that perform part of the processing performed by some constituent elements of the plurality of constituent elements constituting the decoding device are the constituent elements described in each aspect of the present disclosure, and the respective aspects of the present disclosure. To be implemented in combination with a component that includes a part of the function of the component to be described, or a component that performs a part of processing performed by the component described in each aspect of the present disclosure
 (6)実施の形態1の符号化装置または復号化装置が実施する方法に対して、当該方法に含まれる複数の処理のうち、本開示の各態様で説明する処理に対応する処理を、本開示の各態様で説明する処理に置き換えること (6) For the method performed by the encoding device or the decoding device according to Embodiment 1, processing corresponding to the processing described in each aspect of the present disclosure among the plurality of processing included in the method is Replace with the process described in each aspect of the disclosure
 (7)実施の形態1の符号化装置または復号化装置が実施する方法に含まれる複数の処理のうちの一部の処理を、本開示の各態様で説明する処理と組み合わせて実施すること (7) A part of the plurality of processes included in the method performed by the encoding apparatus or the decoding apparatus according to the first embodiment is combined with the processes described in each aspect of the present disclosure.
 なお、本開示の各態様で説明する処理および/または構成の実施の仕方は、上記の例に限定されるものではない。例えば、実施の形態1において開示する動画像/画像符号化装置または動画像/画像復号化装置とは異なる目的で利用される装置において実施されてもよいし、各態様において説明した処理および/または構成を単独で実施してもよい。また、異なる態様において説明した処理および/または構成を組み合わせて実施してもよい。 Note that the processes and / or configurations described in each aspect of the present disclosure are not limited to the above examples. For example, the present invention may be implemented in an apparatus used for a different purpose from the moving picture / picture encoding apparatus or moving picture / picture decoding apparatus disclosed in the first embodiment, and the processing and / or described in each aspect. The configuration may be implemented alone. Moreover, you may implement combining the process and / or structure which were demonstrated in the different aspect.
 [符号化装置の概要]
 まず、実施の形態1に係る符号化装置の概要を説明する。図1は、実施の形態1に係る符号化装置100の機能構成を示すブロック図である。符号化装置100は、動画像/画像をブロック単位で符号化する動画像/画像符号化装置である。
[Outline of encoding device]
First, the outline | summary of the encoding apparatus which concerns on Embodiment 1 is demonstrated. FIG. 1 is a block diagram showing a functional configuration of encoding apparatus 100 according to Embodiment 1. The encoding device 100 is a moving image / image encoding device that encodes moving images / images in units of blocks.
 図1に示すように、符号化装置100は、画像をブロック単位で符号化する装置であって、分割部102と、減算部104と、変換部106と、量子化部108と、エントロピー符号化部110と、逆量子化部112と、逆変換部114と、加算部116と、ブロックメモリ118と、ループフィルタ部120と、フレームメモリ122と、イントラ予測部124と、インター予測部126と、予測制御部128と、を備える。 As shown in FIG. 1, an encoding apparatus 100 is an apparatus that encodes an image in units of blocks, and includes a dividing unit 102, a subtracting unit 104, a transforming unit 106, a quantizing unit 108, and entropy encoding. Unit 110, inverse quantization unit 112, inverse transform unit 114, addition unit 116, block memory 118, loop filter unit 120, frame memory 122, intra prediction unit 124, inter prediction unit 126, A prediction control unit 128.
 符号化装置100は、例えば、汎用プロセッサ及びメモリにより実現される。この場合、メモリに格納されたソフトウェアプログラムがプロセッサにより実行されたときに、プロセッサは、分割部102、減算部104、変換部106、量子化部108、エントロピー符号化部110、逆量子化部112、逆変換部114、加算部116、ループフィルタ部120、イントラ予測部124、インター予測部126及び予測制御部128として機能する。また、符号化装置100は、分割部102、減算部104、変換部106、量子化部108、エントロピー符号化部110、逆量子化部112、逆変換部114、加算部116、ループフィルタ部120、イントラ予測部124、インター予測部126及び予測制御部128に対応する専用の1以上の電子回路として実現されてもよい。 The encoding device 100 is realized by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor performs the division unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, and the inverse quantization unit 112. , An inverse transform unit 114, an addition unit 116, a loop filter unit 120, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128. The encoding apparatus 100 includes a dividing unit 102, a subtracting unit 104, a transforming unit 106, a quantizing unit 108, an entropy coding unit 110, an inverse quantizing unit 112, an inverse transforming unit 114, an adding unit 116, and a loop filter unit 120. The intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 may be implemented as one or more dedicated electronic circuits.
 以下に、符号化装置100に含まれる各構成要素について説明する。 Hereinafter, each component included in the encoding device 100 will be described.
 [分割部]
 分割部102は、入力動画像に含まれる各ピクチャを複数のブロックに分割し、各ブロックを減算部104に出力する。例えば、分割部102は、まず、ピクチャを固定サイズ(例えば128x128)のブロックに分割する。この固定サイズのブロックは、符号化ツリーユニット(CTU)と呼ばれることがある。そして、分割部102は、再帰的な四分木(quadtree)及び/又は二分木(binary tree)ブロック分割に基づいて、固定サイズのブロックの各々を可変サイズ(例えば64x64以下)のブロックに分割する。この可変サイズのブロックは、符号化ユニット(CU)、予測ユニット(PU)あるいは変換ユニット(TU)と呼ばれることがある。なお、本実施の形態では、CU、PU及びTUは区別される必要はなく、ピクチャ内の一部又はすべてのブロックがCU、PU、TUの処理単位となってもよい。
[Division part]
The dividing unit 102 divides each picture included in the input moving image into a plurality of blocks, and outputs each block to the subtracting unit 104. For example, the dividing unit 102 first divides a picture into blocks of a fixed size (for example, 128 × 128). This fixed size block may be referred to as a coding tree unit (CTU). Then, the dividing unit 102 divides each of the fixed size blocks into blocks of a variable size (for example, 64 × 64 or less) based on recursive quadtree and / or binary tree block division. . This variable size block may be referred to as a coding unit (CU), a prediction unit (PU) or a transform unit (TU). In the present embodiment, CU, PU, and TU do not need to be distinguished, and some or all blocks in a picture may be processing units of CU, PU, and TU.
 図2は、実施の形態1におけるブロック分割の一例を示す図である。図2において、実線は四分木ブロック分割によるブロック境界を表し、破線は二分木ブロック分割によるブロック境界を表す。 FIG. 2 is a diagram showing an example of block division in the first embodiment. In FIG. 2, a solid line represents a block boundary by quadtree block division, and a broken line represents a block boundary by binary tree block division.
 ここでは、ブロック10は、128x128画素の正方形ブロック(128x128ブロック)である。この128x128ブロック10は、まず、4つの正方形の64x64ブロックに分割される(四分木ブロック分割)。 Here, the block 10 is a 128 × 128 pixel square block (128 × 128 block). The 128 × 128 block 10 is first divided into four square 64 × 64 blocks (quadtree block division).
 左上の64x64ブロックは、さらに2つの矩形の32x64ブロックに垂直に分割され、左の32x64ブロックはさらに2つの矩形の16x64ブロックに垂直に分割される(二分木ブロック分割)。その結果、左上の64x64ブロックは、2つの16x64ブロック11、12と、32x64ブロック13とに分割される。 The upper left 64 × 64 block is further divided vertically into two rectangular 32 × 64 blocks, and the left 32 × 64 block is further divided vertically into two rectangular 16 × 64 blocks (binary tree block division). As a result, the upper left 64 × 64 block is divided into two 16 × 64 blocks 11 and 12 and a 32 × 64 block 13.
 右上の64x64ブロックは、2つの矩形の64x32ブロック14、15に水平に分割される(二分木ブロック分割)。 The upper right 64 × 64 block is horizontally divided into two rectangular 64 × 32 blocks 14 and 15 (binary tree block division).
 左下の64x64ブロックは、4つの正方形の32x32ブロックに分割される(四分木ブロック分割)。4つの32x32ブロックのうち左上のブロック及び右下のブロックはさらに分割される。左上の32x32ブロックは、2つの矩形の16x32ブロックに垂直に分割され、右の16x32ブロックはさらに2つの16x16ブロックに水平に分割される(二分木ブロック分割)。右下の32x32ブロックは、2つの32x16ブロックに水平に分割される(二分木ブロック分割)。その結果、左下の64x64ブロックは、16x32ブロック16と、2つの16x16ブロック17、18と、2つの32x32ブロック19、20と、2つの32x16ブロック21、22とに分割される。 The lower left 64x64 block is divided into four square 32x32 blocks (quadrant block division). Of the four 32 × 32 blocks, the upper left block and the lower right block are further divided. The upper left 32 × 32 block is vertically divided into two rectangular 16 × 32 blocks, and the right 16 × 32 block is further divided horizontally into two 16 × 16 blocks (binary tree block division). The lower right 32 × 32 block is horizontally divided into two 32 × 16 blocks (binary tree block division). As a result, the lower left 64 × 64 block is divided into a 16 × 32 block 16, two 16 × 16 blocks 17 and 18, two 32 × 32 blocks 19 and 20, and two 32 × 16 blocks 21 and 22.
 右下の64x64ブロック23は分割されない。 The lower right 64x64 block 23 is not divided.
 以上のように、図2では、ブロック10は、再帰的な四分木及び二分木ブロック分割に基づいて、13個の可変サイズのブロック11~23に分割される。このような分割は、QTBT(quad-tree plus binary tree)分割と呼ばれることがある。 As described above, in FIG. 2, the block 10 is divided into 13 variable-size blocks 11 to 23 based on the recursive quadtree and binary tree block division. Such division may be called QTBT (quad-tree plus binary tree) division.
 なお、図2では、1つのブロックが4つ又は2つのブロックに分割されていたが(四分木又は二分木ブロック分割)、分割はこれに限定されない。例えば、1つのブロックが3つのブロックに分割されてもよい(三分木ブロック分割)。このような三分木ブロック分割を含む分割は、MBT(multi type tree)分割と呼ばれることがある。 In FIG. 2, one block is divided into four or two blocks (quadrature tree or binary tree block division), but the division is not limited to this. For example, one block may be divided into three blocks (triple tree block division). Such a division including a tri-tree block division may be called an MBT (multi type tree) division.
 [減算部]
 減算部104は、分割部102によって分割されたブロック単位で原信号(原サンプル)から予測信号(予測サンプル)を減算する。つまり、減算部104は、符号化対象ブロック(以下、カレントブロックという)の予測誤差(残差ともいう)を算出する。そして、減算部104は、算出された予測誤差を変換部106に出力する。
[Subtraction section]
The subtraction unit 104 subtracts the prediction signal (prediction sample) from the original signal (original sample) in units of blocks divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction error (also referred to as a residual) of a coding target block (hereinafter referred to as a current block). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.
 原信号は、符号化装置100の入力信号であり、動画像を構成する各ピクチャの画像を表す信号(例えば輝度(luma)信号及び2つの色差(chroma)信号)である。以下において、画像を表す信号をサンプルともいうこともある。 The original signal is an input signal of the encoding device 100, and is a signal (for example, a luminance (luma) signal and two color difference (chroma) signals) representing an image of each picture constituting the moving image. Hereinafter, a signal representing an image may be referred to as a sample.
 [変換部]
 変換部106は、空間領域の予測誤差を周波数領域の変換係数に変換し、変換係数を量子化部108に出力する。具体的には、変換部106は、例えば空間領域の予測誤差に対して予め定められた離散コサイン変換(DCT)又は離散サイン変換(DST)を行う。
[Conversion section]
The transform unit 106 transforms the prediction error in the spatial domain into a transform factor in the frequency domain, and outputs the transform coefficient to the quantization unit 108. Specifically, the transform unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on a prediction error in the spatial domain.
 なお、変換部106は、複数の変換タイプの中から適応的に変換タイプを選択し、選択された変換タイプに対応する変換基底関数(transform basis function)を用いて、予測誤差を変換係数に変換してもよい。このような変換は、EMT(explicit multiple core transform)又はAMT(adaptive multiple transform)と呼ばれることがある。 Note that the conversion unit 106 adaptively selects a conversion type from a plurality of conversion types, and converts a prediction error into a conversion coefficient using a conversion basis function corresponding to the selected conversion type. May be. Such a conversion may be referred to as EMT (explicit multiple core transform) or AMT (adaptive multiple transform).
 複数の変換タイプは、例えば、DCT-II、DCT-V、DCT-VIII、DST-I及びDST-VIIを含む。図3は、各変換タイプに対応する変換基底関数を示す表である。図3においてNは入力画素の数を示す。これらの複数の変換タイプの中からの変換タイプの選択は、例えば、予測の種類(イントラ予測及びインター予測)に依存してもよいし、イントラ予測モードに依存してもよい。 The plurality of conversion types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I and DST-VII. FIG. 3 is a table showing conversion basis functions corresponding to each conversion type. In FIG. 3, N indicates the number of input pixels. Selection of a conversion type from among these multiple conversion types may depend on, for example, the type of prediction (intra prediction and inter prediction), or may depend on an intra prediction mode.
 このようなEMT又はAMTを適用するか否かを示す情報(例えばAMTフラグと呼ばれる)及び選択された変換タイプを示す情報は、CUレベルで信号化される。なお、これらの情報の信号化は、CUレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、ピクチャレベル、スライスレベル、タイルレベル又はCTUレベル)であってもよい。 Information indicating whether or not to apply such EMT or AMT (for example, called an AMT flag) and information indicating the selected conversion type are signaled at the CU level. Note that the signalization of these pieces of information need not be limited to the CU level, but may be other levels (for example, a sequence level, a picture level, a slice level, a tile level, or a CTU level).
 また、変換部106は、変換係数(変換結果)を再変換してもよい。このような再変換は、AST(adaptive secondary transform)又はNSST(non-separable secondary transform)と呼ばれることがある。例えば、変換部106は、イントラ予測誤差に対応する変換係数のブロックに含まれるサブブロック(例えば4x4サブブロック)ごとに再変換を行う。NSSTを適用するか否かを示す情報及びNSSTに用いられる変換行列に関する情報は、CUレベルで信号化される。なお、これらの情報の信号化は、CUレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、ピクチャレベル、スライスレベル、タイルレベル又はCTUレベル)であってもよい。 Further, the conversion unit 106 may reconvert the conversion coefficient (conversion result). Such reconversion is sometimes referred to as AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the conversion unit 106 performs re-conversion for each sub-block (for example, 4 × 4 sub-block) included in the block of the conversion coefficient corresponding to the intra prediction error. Information indicating whether or not NSST is applied and information related to the transformation matrix used for NSST are signaled at the CU level. Note that the signalization of these pieces of information need not be limited to the CU level, but may be other levels (for example, a sequence level, a picture level, a slice level, a tile level, or a CTU level).
 ここで、Separableな変換とは、入力の次元の数だけ方向ごとに分離して複数回変換を行う方式であり、Non-Separableな変換とは、入力が多次元であった際に2つ以上の次元をまとめて1次元とみなして、まとめて変換を行う方式である。 Here, the separable conversion is a method of performing the conversion a plurality of times by separating the number of dimensions of the input for each direction, and the non-separable conversion is two or more when the input is multidimensional. In this method, the dimensions are collectively regarded as one dimension, and conversion is performed collectively.
 例えば、Non-Separableな変換の1例として、入力が4×4のブロックであった場合にはそれを16個の要素を持ったひとつの配列とみなし、その配列に対して16×16の変換行列で変換処理を行うようなものが挙げられる。 For example, as an example of non-separable conversion, if an input is a 4 × 4 block, it is regarded as one array having 16 elements, and 16 × 16 conversion is performed on the array. The thing which performs the conversion process with a matrix is mentioned.
 また、同様に4×4の入力ブロックを16個の要素を持ったひとつの配列とみなした後に、その配列に対してGivens回転を複数回行うようなもの(Hypercube Givens Transform)もNon-Separableな変換の例である。 Similarly, a 4 × 4 input block is regarded as a single array having 16 elements, and then the Givens rotation is performed multiple times on the array (Hypercube Givens Transform) is also a non-separable. It is an example of conversion.
 [量子化部]
 量子化部108は、変換部106から出力された変換係数を量子化する。具体的には、量子化部108は、カレントブロックの変換係数を所定の走査順序で走査し、走査された変換係数に対応する量子化パラメータ(QP)に基づいて当該変換係数を量子化する。そして、量子化部108は、カレントブロックの量子化された変換係数(以下、量子化係数という)をエントロピー符号化部110及び逆量子化部112に出力する。
[Quantization unit]
The quantization unit 108 quantizes the transform coefficient output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order, and quantizes the transform coefficients based on the quantization parameter (QP) corresponding to the scanned transform coefficients. Then, the quantization unit 108 outputs the quantized transform coefficient (hereinafter referred to as a quantization coefficient) of the current block to the entropy encoding unit 110 and the inverse quantization unit 112.
 所定の順序は、変換係数の量子化/逆量子化のための順序である。例えば、所定の走査順序は、周波数の昇順(低周波から高周波の順)又は降順(高周波から低周波の順)で定義される。 The predetermined order is an order for quantization / inverse quantization of transform coefficients. For example, the predetermined scanning order is defined in ascending order of frequency (order from low frequency to high frequency) or descending order (order from high frequency to low frequency).
 量子化パラメータとは、量子化ステップ(量子化幅)を定義するパラメータである。例えば、量子化パラメータの値が増加すれば量子化ステップも増加する。つまり、量子化パラメータの値が増加すれば量子化誤差が増大する。 The quantization parameter is a parameter that defines a quantization step (quantization width). For example, if the value of the quantization parameter increases, the quantization step also increases. That is, if the value of the quantization parameter increases, the quantization error increases.
 [エントロピー符号化部]
 エントロピー符号化部110は、量子化部108から入力である量子化係数を可変長符号化することにより符号化信号(符号化ビットストリーム)を生成する。具体的には、エントロピー符号化部110は、例えば、量子化係数を二値化し、二値信号を算術符号化する。
[Entropy encoding unit]
The entropy encoding unit 110 generates an encoded signal (encoded bit stream) by performing variable length encoding on the quantization coefficient that is input from the quantization unit 108. Specifically, the entropy encoding unit 110 binarizes the quantization coefficient, for example, and arithmetically encodes the binary signal.
 [逆量子化部]
 逆量子化部112は、量子化部108からの入力である量子化係数を逆量子化する。具体的には、逆量子化部112は、カレントブロックの量子化係数を所定の走査順序で逆量子化する。そして、逆量子化部112は、カレントブロックの逆量子化された変換係数を逆変換部114に出力する。
[Inverse quantization unit]
The inverse quantization unit 112 inversely quantizes the quantization coefficient that is an input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantization coefficient of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inverse-quantized transform coefficient of the current block to the inverse transform unit 114.
 [逆変換部]
 逆変換部114は、逆量子化部112からの入力である変換係数を逆変換することにより予測誤差を復元する。具体的には、逆変換部114は、変換係数に対して、変換部106による変換に対応する逆変換を行うことにより、カレントブロックの予測誤差を復元する。そして、逆変換部114は、復元された予測誤差を加算部116に出力する。
[Inverse conversion part]
The inverse transform unit 114 restores the prediction error by inverse transforming the transform coefficient that is an input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform corresponding to the transform by the transform unit 106 on the transform coefficient. Then, the inverse transformation unit 114 outputs the restored prediction error to the addition unit 116.
 なお、復元された予測誤差は、量子化により情報が失われているので、減算部104が算出した予測誤差と一致しない。すなわち、復元された予測誤差には、量子化誤差が含まれている。 Note that the restored prediction error does not match the prediction error calculated by the subtraction unit 104 because information is lost due to quantization. That is, the restored prediction error includes a quantization error.
 [加算部]
 加算部116は、逆変換部114からの入力である予測誤差と予測制御部128からの入力である予測サンプルとを加算することによりカレントブロックを再構成する。そして、加算部116は、再構成されたブロックをブロックメモリ118及びループフィルタ部120に出力する。再構成ブロックは、ローカル復号ブロックと呼ばれることもある。
[Addition part]
The adder 116 reconstructs the current block by adding the prediction error input from the inverse transform unit 114 and the prediction sample input from the prediction control unit 128. Then, the adding unit 116 outputs the reconfigured block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes referred to as a local decoding block.
 [ブロックメモリ]
 ブロックメモリ118は、イントラ予測で参照されるブロックであって符号化対象ピクチャ(以下、カレントピクチャという)内のブロックを格納するための記憶部である。具体的には、ブロックメモリ118は、加算部116から出力された再構成ブロックを格納する。
[Block memory]
The block memory 118 is a storage unit for storing blocks in an encoding target picture (hereinafter referred to as current picture) that are referred to in intra prediction. Specifically, the block memory 118 stores the reconstructed block output from the adding unit 116.
 [ループフィルタ部]
 ループフィルタ部120は、加算部116によって再構成されたブロックにループフィルタを施し、フィルタされた再構成ブロックをフレームメモリ122に出力する。ループフィルタとは、符号化ループ内で用いられるフィルタ(インループフィルタ)であり、例えば、デブロッキング・フィルタ(DF)、サンプルアダプティブオフセット(SAO)及びアダプティブループフィルタ(ALF)などを含む。
[Loop filter section]
The loop filter unit 120 applies a loop filter to the block reconstructed by the adding unit 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used in the encoding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), an adaptive loop filter (ALF), and the like.
 ALFでは、符号化歪みを除去するための最小二乗誤差フィルタが適用され、例えばカレントブロック内の2x2サブブロックごとに、局所的な勾配(gradient)の方向及び活性度(activity)に基づいて複数のフィルタの中から選択された1つのフィルタが適用される。 In ALF, a least square error filter is applied to remove coding distortion. For example, for each 2 × 2 sub-block in the current block, a plurality of multiples based on the direction of the local gradient and the activity are provided. One filter selected from the filters is applied.
 具体的には、まず、サブブロック(例えば2x2サブブロック)が複数のクラス(例えば15又は25クラス)に分類される。サブブロックの分類は、勾配の方向及び活性度に基づいて行われる。例えば、勾配の方向値D(例えば0~2又は0~4)と勾配の活性値A(例えば0~4)とを用いて分類値C(例えばC=5D+A)が算出される。そして、分類値Cに基づいて、サブブロックが複数のクラス(例えば15又は25クラス)に分類される。 Specifically, first, sub-blocks (for example, 2 × 2 sub-blocks) are classified into a plurality of classes (for example, 15 or 25 classes). Sub-block classification is performed based on gradient direction and activity. For example, the classification value C (for example, C = 5D + A) is calculated using the gradient direction value D (for example, 0 to 2 or 0 to 4) and the gradient activity value A (for example, 0 to 4). Then, based on the classification value C, the sub-blocks are classified into a plurality of classes (for example, 15 or 25 classes).
 勾配の方向値Dは、例えば、複数の方向(例えば水平、垂直及び2つの対角方向)の勾配を比較することにより導出される。また、勾配の活性値Aは、例えば、複数の方向の勾配を加算し、加算結果を量子化することにより導出される。 The direction value D of the gradient is derived, for example, by comparing gradients in a plurality of directions (for example, horizontal, vertical, and two diagonal directions). The gradient activation value A is derived, for example, by adding gradients in a plurality of directions and quantizing the addition result.
 このような分類の結果に基づいて、複数のフィルタの中からサブブロックのためのフィルタが決定される。 -Based on the result of such classification, a filter for a sub-block is determined from among a plurality of filters.
 ALFで用いられるフィルタの形状としては例えば円対称形状が利用される。図4A~図4Cは、ALFで用いられるフィルタの形状の複数の例を示す図である。図4Aは、5x5ダイヤモンド形状フィルタを示し、図4Bは、7x7ダイヤモンド形状フィルタを示し、図4Cは、9x9ダイヤモンド形状フィルタを示す。フィルタの形状を示す情報は、ピクチャレベルで信号化される。なお、フィルタの形状を示す情報の信号化は、ピクチャレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、スライスレベル、タイルレベル、CTUレベル又はCUレベル)であってもよい。 As the shape of the filter used in ALF, for example, a circularly symmetric shape is used. 4A to 4C are diagrams showing a plurality of examples of filter shapes used in ALF. 4A shows a 5 × 5 diamond shape filter, FIG. 4B shows a 7 × 7 diamond shape filter, and FIG. 4C shows a 9 × 9 diamond shape filter. Information indicating the shape of the filter is signalized at the picture level. It should be noted that the signalization of the information indicating the filter shape need not be limited to the picture level, but may be another level (for example, a sequence level, a slice level, a tile level, a CTU level, or a CU level).
 ALFのオン/オフは、例えば、ピクチャレベル又はCUレベルで決定される。例えば、輝度についてはCUレベルでALFを適用するか否かが決定され、色差についてはピクチャレベルでALFを適用するか否かが決定される。ALFのオン/オフを示す情報は、ピクチャレベル又はCUレベルで信号化される。なお、ALFのオン/オフを示す情報の信号化は、ピクチャレベル又はCUレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、スライスレベル、タイルレベル又はCTUレベル)であってもよい。 ON / OFF of ALF is determined at the picture level or the CU level, for example. For example, for luminance, it is determined whether to apply ALF at the CU level, and for color difference, it is determined whether to apply ALF at the picture level. Information indicating ALF on / off is signaled at the picture level or the CU level. Signaling of information indicating ALF on / off need not be limited to the picture level or the CU level, and may be performed at other levels (for example, a sequence level, a slice level, a tile level, or a CTU level). Good.
 選択可能な複数のフィルタ(例えば15又は25までのフィルタ)の係数セットは、ピクチャレベルで信号化される。なお、係数セットの信号化は、ピクチャレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、スライスレベル、タイルレベル、CTUレベル、CUレベル又はサブブロックレベル)であってもよい。 A coefficient set of a plurality of selectable filters (for example, up to 15 or 25 filters) is signalized at the picture level. The signalization of the coefficient set need not be limited to the picture level, but may be another level (for example, sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
 [フレームメモリ]
 フレームメモリ122は、インター予測に用いられる参照ピクチャを格納するための記憶部であり、フレームバッファと呼ばれることもある。具体的には、フレームメモリ122は、ループフィルタ部120によってフィルタされた再構成ブロックを格納する。
[Frame memory]
The frame memory 122 is a storage unit for storing a reference picture used for inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed block filtered by the loop filter unit 120.
 [イントラ予測部]
 イントラ予測部124は、ブロックメモリ118に格納されたカレントピクチャ内のブロックを参照してカレントブロックのイントラ予測(画面内予測ともいう)を行うことで、予測信号(イントラ予測信号)を生成する。具体的には、イントラ予測部124は、カレントブロックに隣接するブロックのサンプル(例えば輝度値、色差値)を参照してイントラ予測を行うことでイントラ予測信号を生成し、イントラ予測信号を予測制御部128に出力する。
[Intra prediction section]
The intra prediction unit 124 generates a prediction signal (intra prediction signal) by referring to the block in the current picture stored in the block memory 118 and performing intra prediction (also referred to as intra-screen prediction) of the current block. Specifically, the intra prediction unit 124 generates an intra prediction signal by performing intra prediction with reference to a sample (for example, luminance value and color difference value) of a block adjacent to the current block, and performs prediction control on the intra prediction signal. To the unit 128.
 例えば、イントラ予測部124は、予め規定された複数のイントラ予測モードのうちの1つを用いてイントラ予測を行う。複数のイントラ予測モードは、1以上の非方向性予測モードと、複数の方向性予測モードと、を含む。 For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes include one or more non-directional prediction modes and a plurality of directional prediction modes.
 1以上の非方向性予測モードは、例えばH.265/HEVC(High-Efficiency Video Coding)規格(非特許文献1)で規定されたPlanar予測モード及びDC予測モードを含む。 One or more non-directional prediction modes are for example H.264. It includes Planar prediction mode and DC prediction mode defined by H.265 / HEVC (High-Efficiency Video Coding) standard (Non-patent Document 1).
 複数の方向性予測モードは、例えばH.265/HEVC規格で規定された33方向の予測モードを含む。なお、複数の方向性予測モードは、33方向に加えてさらに32方向の予測モード(合計で65個の方向性予測モード)を含んでもよい。図5Aは、イントラ予測における67個のイントラ予測モード(2個の非方向性予測モード及び65個の方向性予測モード)を示す図である。実線矢印は、H.265/HEVC規格で規定された33方向を表し、破線矢印は、追加された32方向を表す。 The multiple directionality prediction modes are for example H.264. It includes 33-direction prediction modes defined in the H.265 / HEVC standard. In addition to the 33 directions, the plurality of directionality prediction modes may further include 32 direction prediction modes (a total of 65 directionality prediction modes). FIG. 5A is a diagram illustrating 67 intra prediction modes (two non-directional prediction modes and 65 directional prediction modes) in intra prediction. The solid line arrows The 33 directions defined in the H.265 / HEVC standard are represented, and the dashed arrow represents the added 32 directions.
 なお、色差ブロックのイントラ予測において、輝度ブロックが参照されてもよい。つまり、カレントブロックの輝度成分に基づいて、カレントブロックの色差成分が予測されてもよい。このようなイントラ予測は、CCLM(cross-component linear model)予測と呼ばれることがある。このような輝度ブロックを参照する色差ブロックのイントラ予測モード(例えばCCLMモードと呼ばれる)は、色差ブロックのイントラ予測モードの1つとして加えられてもよい。 Note that the luminance block may be referred to in the intra prediction of the color difference block. That is, the color difference component of the current block may be predicted based on the luminance component of the current block. Such intra prediction is sometimes called CCLM (cross-component linear model) prediction. The intra prediction mode (for example, called CCLM mode) of the color difference block which refers to such a luminance block may be added as one of the intra prediction modes of the color difference block.
 イントラ予測部124は、水平/垂直方向の参照画素の勾配に基づいてイントラ予測後の画素値を補正してもよい。このような補正をともなうイントラ予測は、PDPC(position dependent intra prediction combination)と呼ばれることがある。PDPCの適用の有無を示す情報(例えばPDPCフラグと呼ばれる)は、例えばCUレベルで信号化される。なお、この情報の信号化は、CUレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、ピクチャレベル、スライスレベル、タイルレベル又はCTUレベル)であってもよい。 The intra prediction unit 124 may correct the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal / vertical direction. Intra prediction with such correction may be called PDPC (position dependent intra prediction combination). Information indicating whether or not PDPC is applied (for example, referred to as a PDPC flag) is signaled, for example, at the CU level. The signalization of this information need not be limited to the CU level, but may be another level (for example, a sequence level, a picture level, a slice level, a tile level, or a CTU level).
 [インター予測部]
 インター予測部126は、フレームメモリ122に格納された参照ピクチャであってカレントピクチャとは異なる参照ピクチャを参照してカレントブロックのインター予測(画面間予測ともいう)を行うことで、予測信号(インター予測信号)を生成する。インター予測は、カレントブロック又はカレントブロック内のサブブロック(例えば4x4ブロック)の単位で行われる。例えば、インター予測部126は、カレントブロック又はサブブロックについて参照ピクチャ内で動き探索(motion estimation)を行う。そして、インター予測部126は、動き探索により得られた動き情報(例えば動きベクトル)を用いて動き補償を行うことでカレントブロック又はサブブロックのインター予測信号を生成する。そして、インター予測部126は、生成されたインター予測信号を予測制御部128に出力する。
[Inter prediction section]
The inter prediction unit 126 refers to a reference picture stored in the frame memory 122 and is different from the current picture, and performs inter prediction (also referred to as inter-screen prediction) of the current block, thereby generating a prediction signal (inter prediction signal). Prediction signal). Inter prediction is performed in units of a current block or a sub-block (for example, 4 × 4 block) in the current block. For example, the inter prediction unit 126 performs motion estimation in the reference picture for the current block or sub-block. Then, the inter prediction unit 126 generates an inter prediction signal of the current block or sub-block by performing motion compensation using motion information (for example, a motion vector) obtained by motion search. Then, the inter prediction unit 126 outputs the generated inter prediction signal to the prediction control unit 128.
 動き補償に用いられた動き情報は信号化される。動きベクトルの信号化には、予測動きベクトル(motion vector predictor)が用いられてもよい。つまり、動きベクトルと予測動きベクトルとの間の差分が信号化されてもよい。 The motion information used for motion compensation is signaled. A motion vector predictor may be used for signalizing the motion vector. That is, the difference between the motion vector and the predicted motion vector may be signaled.
 なお、動き探索により得られたカレントブロックの動き情報だけでなく、隣接ブロックの動き情報も用いて、インター予測信号が生成されてもよい。具体的には、動き探索により得られた動き情報に基づく予測信号と、隣接ブロックの動き情報に基づく予測信号と、を重み付け加算することにより、カレントブロック内のサブブロック単位でインター予測信号が生成されてもよい。このようなインター予測(動き補償)は、OBMC(overlapped block motion compensation)と呼ばれることがある。 Note that an inter prediction signal may be generated using not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks. Specifically, the inter prediction signal is generated in units of sub-blocks in the current block by weighted addition of the prediction signal based on the motion information obtained by motion search and the prediction signal based on the motion information of adjacent blocks. May be. Such inter prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).
 このようなOBMCモードでは、OBMCのためのサブブロックのサイズを示す情報(例えばOBMCブロックサイズと呼ばれる)は、シーケンスレベルで信号化される。また、OBMCモードを適用するか否かを示す情報(例えばOBMCフラグと呼ばれる)は、CUレベルで信号化される。なお、これらの情報の信号化のレベルは、シーケンスレベル及びCUレベルに限定される必要はなく、他のレベル(例えばピクチャレベル、スライスレベル、タイルレベル、CTUレベル又はサブブロックレベル)であってもよい。 In such an OBMC mode, information indicating the size of a sub-block for OBMC (for example, called OBMC block size) is signaled at the sequence level. Also, information indicating whether or not to apply the OBMC mode (for example, referred to as an OBMC flag) is signaled at the CU level. Note that the level of signalization of these information does not need to be limited to the sequence level and the CU level, and may be other levels (for example, a picture level, a slice level, a tile level, a CTU level, or a sub-block level). Good.
 OBMCモードについて、より具体的に説明する。図5B及び図5Cは、OBMC処理による予測画像補正処理の概要を説明するためのフローチャート及び概念図である。 The OBMC mode will be described more specifically. FIG. 5B and FIG. 5C are a flowchart and a conceptual diagram for explaining the outline of the predicted image correction process by the OBMC process.
 まず、符号化対象ブロックに割り当てられた動きベクトル(MV)を用いて通常の動き補償による予測画像(Pred)を取得する。 First, a prediction image (Pred) by normal motion compensation is acquired using a motion vector (MV) assigned to an encoding target block.
 次に、符号化済みの左隣接ブロックの動きベクトル(MV_L)を符号化対象ブロックに適用して予測画像(Pred_L)を取得し、前記予測画像とPred_Lとを重みを付けて重ね合わせることで予測画像の1回目の補正を行う。 Next, a prediction image (Pred_L) is obtained by applying the motion vector (MV_L) of the encoded left adjacent block to the encoding target block, and prediction is performed by superimposing the prediction image and Pred_L with weights. Perform the first correction of the image.
 同様に、符号化済みの上隣接ブロックの動きベクトル(MV_U)を符号化対象ブロックに適用して予測画像(Pred_U)を取得し、前記1回目の補正を行った予測画像とPred_Uとを重みを付けて重ね合わせることで予測画像の2回目の補正を行い、それを最終的な予測画像とする。 Similarly, the motion vector (MV_U) of the encoded upper adjacent block is applied to the block to be encoded to obtain a prediction image (Pred_U), and the prediction image and Pred_U that have been subjected to the first correction are weighted. Then, the second correction of the predicted image is performed by superimposing and making it the final predicted image.
 なお、ここでは左隣接ブロックと上隣接ブロックを用いた2段階の補正の方法を説明したが、右隣接ブロックや下隣接ブロックを用いて2段階よりも多い回数の補正を行う構成とすることも可能である。 Although the two-step correction method using the left adjacent block and the upper adjacent block has been described here, the correction may be performed more times than the two steps using the right adjacent block and the lower adjacent block. Is possible.
 なお、重ね合わせを行う領域はブロック全体の画素領域ではなく、ブロック境界近傍の一部の領域のみであってもよい。 Note that the area to be overlapped may not be the pixel area of the entire block, but only a part of the area near the block boundary.
 なお、ここでは1枚の参照ピクチャからの予測画像補正処理について説明したが、複数枚の参照ピクチャから予測画像を補正する場合も同様であり、各々の参照ピクチャから補正した予測画像を取得した後に、得られた予測画像をさらに重ね合わせることで最終的な予測画像とする。 Note that here, the predicted image correction processing from one reference picture has been described, but the same applies to the case where a predicted image is corrected from a plurality of reference pictures, and after obtaining a corrected predicted image from each reference picture. Then, the obtained predicted image is further superimposed to obtain a final predicted image.
 なお、前記処理対象ブロックは、予測ブロック単位であっても、予測ブロックをさらに分割したサブブロック単位であってもよい。 The processing target block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
 OBMC処理を適用するかどうかの判定の方法として、例えば、OBMC処理を適用するかどうかを示す信号であるobmc_flagを用いる方法がある。具体的な一例としては、符号化装置において、符号化対象ブロックが動きの複雑な領域に属しているかどうかを判定し、動きの複雑な領域に属している場合はobmc_flagとして値1を設定してOBMC処理を適用して符号化を行い、動きの複雑な領域に属していない場合はobmc_flagとして値0を設定してOBMC処理を適用せずに符号化を行う。一方、復号化装置では、ストリームに記述されたobmc_flagを復号化するとことで、その値に応じてOBMC処理を適用するかどうかを切替えて復号化を行う。 As a method for determining whether or not to apply the OBMC process, for example, there is a method of using obmc_flag which is a signal indicating whether or not to apply the OBMC process. As a specific example, in the encoding apparatus, it is determined whether or not the encoding target block belongs to a complex motion region, and if it belongs to a complex motion region, a value 1 is set as obmc_flag. Encoding is performed by applying the OBMC process, and if it does not belong to a complex region of motion, the value 0 is set as obmc_flag and the encoding is performed without applying the OBMC process. On the other hand, in the decoding apparatus, by decoding the obmc_flag described in the stream, decoding is performed by switching whether to apply the OBMC process according to the value.
 なお、動き情報は信号化されずに、復号装置側で導出されてもよい。例えば、H.265/HEVC規格で規定されたマージモードが用いられてもよい。また例えば、復号装置側で動き探索を行うことにより動き情報が導出されてもよい。この場合、カレントブロックの画素値を用いずに動き探索が行われる。 Note that the motion information may be derived on the decoding device side without being converted into a signal. For example, H.M. A merge mode defined in the H.265 / HEVC standard may be used. Further, for example, the motion information may be derived by performing motion search on the decoding device side. In this case, motion search is performed without using the pixel value of the current block.
 ここで、復号装置側で動き探索を行うモードについて説明する。この復号装置側で動き探索を行うモードは、PMMVD(pattern matched motion vector derivation)モード又はFRUC(frame rate up-conversion)モードと呼ばれることがある。 Here, a mode in which motion search is performed on the decoding device side will be described. The mode in which motion search is performed on the decoding device side is sometimes called a PMMVD (patterned motion vector derivation) mode or an FRUC (frame rate up-conversion) mode.
 FRUC処理の一例を図5Dに示す。まず、カレントブロックに空間的又は時間的に隣接する符号化済みブロックの動きベクトルを参照して、各々が予測動きベクトルを有する複数の候補のリスト(マージリストと共通であってもよい)が生成される。次に、候補リストに登録されている複数の候補MVの中からベスト候補MVを選択する。例えば、候補リストに含まれる各候補の評価値が算出され、評価値に基づいて1つの候補が選択される。 An example of FRUC processing is shown in FIG. 5D. First, by referring to the motion vector of an encoded block spatially or temporally adjacent to the current block, a list of a plurality of candidates each having a predicted motion vector (may be common with the merge list) is generated Is done. Next, the best candidate MV is selected from a plurality of candidate MVs registered in the candidate list. For example, the evaluation value of each candidate included in the candidate list is calculated, and one candidate is selected based on the evaluation value.
 そして、選択された候補の動きベクトルに基づいて、カレントブロックのための動きベクトルが導出される。具体的には、例えば、選択された候補の動きベクトル(ベスト候補MV)がそのままカレントブロックのための動きベクトルとして導出される。また例えば、選択された候補の動きベクトルに対応する参照ピクチャ内の位置の周辺領域において、パターンマッチングを行うことにより、カレントブロックのための動きベクトルが導出されてもよい。すなわち、ベスト候補MVの周辺の領域に対して同様の方法で探索を行い、さらに評価値が良い値となるMVがあった場合は、ベスト候補MVを前記MVに更新して、それをカレントブロックの最終的なMVとしてもよい。なお、当該処理を実施しない構成とすることも可能である。 Then, a motion vector for the current block is derived based on the selected candidate motion vector. Specifically, for example, the selected candidate motion vector (best candidate MV) is directly derived as a motion vector for the current block. Further, for example, the motion vector for the current block may be derived by performing pattern matching in the peripheral region at the position in the reference picture corresponding to the selected candidate motion vector. That is, the same method is used to search the area around the best candidate MV, and if there is an MV with a good evaluation value, the best candidate MV is updated to the MV, and the current block is updated. The final MV may be used. It is also possible to adopt a configuration in which the processing is not performed.
 サブブロック単位で処理を行う場合も全く同様の処理としてもよい。 The same processing may be performed when processing is performed in units of sub-blocks.
 なお、評価値は、動きベクトルに対応する参照ピクチャ内の領域と、所定の領域との間のパターンマッチングによって再構成画像の差分値を求めることにより算出される。なお、差分値に加えてそれ以外の情報を用いて評価値を算出してもよい。 Note that the evaluation value is calculated by obtaining a difference value of the reconstructed image by pattern matching between a region in the reference picture corresponding to the motion vector and a predetermined region. Note that the evaluation value may be calculated using information other than the difference value.
 パターンマッチングとしては、第1パターンマッチング又は第2パターンマッチングが用いられる。第1パターンマッチング及び第2パターンマッチングは、それぞれ、バイラテラルマッチング(bilateral matching)及びテンプレートマッチング(template matching)と呼ばれることがある。 As the pattern matching, the first pattern matching or the second pattern matching is used. The first pattern matching and the second pattern matching may be referred to as bilateral matching and template matching, respectively.
 第1パターンマッチングでは、異なる2つの参照ピクチャ内の2つのブロックであってカレントブロックの動き軌道(motion trajectory)に沿う2つのブロックの間でパターンマッチングが行われる。したがって、第1パターンマッチングでは、上述した候補の評価値の算出のための所定の領域として、カレントブロックの動き軌道に沿う他の参照ピクチャ内の領域が用いられる。 In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that follow the motion trajectory of the current block. Therefore, in the first pattern matching, a region in another reference picture along the motion trajectory of the current block is used as the predetermined region for calculating the candidate evaluation value described above.
 図6は、動き軌道に沿う2つのブロック間でのパターンマッチング(バイラテラルマッチング)の一例を説明するための図である。図6に示すように、第1パターンマッチングでは、カレントブロック(Cur block)の動き軌道に沿う2つのブロックであって異なる2つの参照ピクチャ(Ref0、Ref1)内の2つのブロックのペアの中で最もマッチするペアを探索することにより2つの動きベクトル(MV0、MV1)が導出される。具体的には、カレントブロックに対して、候補MVで指定された第1の符号化済み参照ピクチャ(Ref0)内の指定位置における再構成画像と、前記候補MVを表示時間間隔でスケーリングした対称MVで指定された第2の符号化済み参照ピクチャ(Ref1)内の指定位置における再構成画像との差分を導出し、得られた差分値を用いて評価値を算出する。複数の候補MVの中で最も評価値が良い値となる候補MVを最終MVとして選択するとよい。 FIG. 6 is a diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. As shown in FIG. 6, in the first pattern matching, two blocks along the motion trajectory of the current block (Cur block) and two blocks in two different reference pictures (Ref0, Ref1) are used. By searching for the best matching pair, two motion vectors (MV0, MV1) are derived. Specifically, for the current block, a reconstructed image at a designated position in the first encoded reference picture (Ref0) designated by the candidate MV, and a symmetric MV obtained by scaling the candidate MV at a display time interval. The difference from the reconstructed image at the designated position in the second encoded reference picture (Ref1) designated in (2) is derived, and the evaluation value is calculated using the obtained difference value. The candidate MV having the best evaluation value among the plurality of candidate MVs may be selected as the final MV.
 連続的な動き軌道の仮定の下では、2つの参照ブロックを指し示す動きベクトル(MV0、MV1)は、カレントピクチャ(Cur Pic)と2つの参照ピクチャ(Ref0、Ref1)との間の時間的な距離(TD0、TD1)に対して比例する。例えば、カレントピクチャが時間的に2つの参照ピクチャの間に位置し、カレントピクチャから2つの参照ピクチャへの時間的な距離が等しい場合、第1パターンマッチングでは、鏡映対称な双方向の動きベクトルが導出される。 Under the assumption of continuous motion trajectory, the motion vectors (MV0, MV1) pointing to the two reference blocks are temporal distances between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). It is proportional to (TD0, TD1). For example, when the current picture is temporally located between two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, the first pattern matching uses a mirror-symmetric bi-directional motion vector Is derived.
 第2パターンマッチングでは、カレントピクチャ内のテンプレート(カレントピクチャ内でカレントブロックに隣接するブロック(例えば上及び/又は左隣接ブロック))と参照ピクチャ内のブロックとの間でパターンマッチングが行われる。したがって、第2パターンマッチングでは、上述した候補の評価値の算出のための所定の領域として、カレントピクチャ内のカレントブロックに隣接するブロックが用いられる。 In the second pattern matching, pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (for example, an upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, a block adjacent to the current block in the current picture is used as the predetermined region for calculating the candidate evaluation value described above.
 図7は、カレントピクチャ内のテンプレートと参照ピクチャ内のブロックとの間でのパターンマッチング(テンプレートマッチング)の一例を説明するための図である。図7に示すように、第2パターンマッチングでは、カレントピクチャ(Cur Pic)内でカレントブロック(Cur block)に隣接するブロックと最もマッチするブロックを参照ピクチャ(Ref0)内で探索することによりカレントブロックの動きベクトルが導出される。具体的には、カレントブロックに対して、左隣接および上隣接の両方もしくはどちらか一方の符号化済み領域の再構成画像と、候補MVで指定された符号化済み参照ピクチャ(Ref0)内の同等位置における再構成画像との差分を導出し、得られた差分値を用いて評価値を算出し、複数の候補MVの中で最も評価値が良い値となる候補MVをベスト候補MVとして選択するとよい。 FIG. 7 is a diagram for explaining an example of pattern matching (template matching) between a template in the current picture and a block in the reference picture. As shown in FIG. 7, in the second pattern matching, the current block is searched by searching the reference picture (Ref0) for the block that most closely matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Of motion vectors are derived. Specifically, with respect to the current block, the reconstructed image of the encoded region of the left adjacent area and / or the upper adjacent area, and the equivalent in the encoded reference picture (Ref0) designated by the candidate MV When a difference from the reconstructed image at the position is derived, an evaluation value is calculated using the obtained difference value, and a candidate MV having the best evaluation value among a plurality of candidate MVs is selected as the best candidate MV. Good.
 このようなFRUCモードを適用するか否かを示す情報(例えばFRUCフラグと呼ばれる)は、CUレベルで信号化される。また、FRUCモードが適用される場合(例えばFRUCフラグが真の場合)、パターンマッチングの方法(第1パターンマッチング又は第2パターンマッチング)を示す情報(例えばFRUCモードフラグと呼ばれる)がCUレベルで信号化される。なお、これらの情報の信号化は、CUレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、ピクチャレベル、スライスレベル、タイルレベル、CTUレベル又はサブブロックレベル)であってもよい。 Information indicating whether or not to apply such FRUC mode (for example, called FRUC flag) is signaled at the CU level. In addition, when the FRUC mode is applied (for example, when the FRUC flag is true), information indicating the pattern matching method (first pattern matching or second pattern matching) (for example, called the FRUC mode flag) is signaled at the CU level. It becomes. Note that the signalization of these pieces of information need not be limited to the CU level, but may be other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level). .
 ここで、等速直線運動を仮定したモデルに基づいて動きベクトルを導出するモードについて説明する。このモードは、BIO(bi-directional optical flow)モードと呼ばれることがある。 Here, a mode for deriving a motion vector based on a model assuming constant velocity linear motion will be described. This mode may be referred to as a BIO (bi-directional optical flow) mode.
 図8は、等速直線運動を仮定したモデルを説明するための図である。図8において、(v,v)は、速度ベクトルを示し、τ、τは、それぞれ、カレントピクチャ(Cur Pic)と2つの参照ピクチャ(Ref,Ref)との間の時間的な距離を示す。(MVx,MVy)は、参照ピクチャRefに対応する動きベクトルを示し、(MVx、MVy)は、参照ピクチャRefに対応する動きベクトルを示す。 FIG. 8 is a diagram for explaining a model assuming constant velocity linear motion. In FIG. 8, (v x , v y ) indicates a velocity vector, and τ 0 and τ 1 are the time between the current picture (Cur Pic) and two reference pictures (Ref 0 , Ref 1 ), respectively. The distance. (MVx 0 , MVy 0 ) indicates a motion vector corresponding to the reference picture Ref 0 , and (MVx 1 , MVy 1 ) indicates a motion vector corresponding to the reference picture Ref 1 .
 このとき速度ベクトル(v,v)の等速直線運動の仮定の下では、(MVx,MVy)及び(MVx,MVy)は、それぞれ、(vτ,vτ)及び(-vτ,-vτ)と表され、以下のオプティカルフロー等式(1)が成り立つ。 At this time, under the assumption of constant velocity linear motion of the velocity vector (v x , v y ), (MVx 0 , MVy 0 ) and (MVx 1 , MVy 1 ) are (v x τ 0 , v y τ), respectively. 0 ) and (−v x τ 1 , −v y τ 1 ), and the following optical flow equation (1) holds.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 ここで、I(k)は、動き補償後の参照画像k(k=0,1)の輝度値を示す。このオプティカルフロー等式は、(i)輝度値の時間微分と、(ii)水平方向の速度及び参照画像の空間勾配の水平成分の積と、(iii)垂直方向の速度及び参照画像の空間勾配の垂直成分の積と、の和が、ゼロと等しいことを示す。このオプティカルフロー等式とエルミート補間(Hermite interpolation)との組み合わせに基づいて、マージリスト等から得られるブロック単位の動きベクトルが画素単位で補正される。 Here, I (k) represents the luminance value of the reference image k (k = 0, 1) after motion compensation. This optical flow equation consists of (i) the product of the time derivative of the luminance value, (ii) the horizontal component of the horizontal velocity and the spatial gradient of the reference image, and (iii) the vertical velocity and the spatial gradient of the reference image. Indicates that the sum of the products of the vertical components of is equal to zero. Based on a combination of this optical flow equation and Hermite interpolation, a block-based motion vector obtained from a merge list or the like is corrected in pixel units.
 なお、等速直線運動を仮定したモデルに基づく動きベクトルの導出とは異なる方法で、復号装置側で動きベクトルが導出されてもよい。例えば、複数の隣接ブロックの動きベクトルに基づいてサブブロック単位で動きベクトルが導出されてもよい。 Note that the motion vector may be derived on the decoding device side by a method different from the derivation of the motion vector based on the model assuming constant velocity linear motion. For example, a motion vector may be derived for each subblock based on the motion vectors of a plurality of adjacent blocks.
 ここで、複数の隣接ブロックの動きベクトルに基づいてサブブロック単位で動きベクトルを導出するモードについて説明する。このモードは、アフィン動き補償予測(affine motion compensation prediction)モードと呼ばれることがある。 Here, a mode for deriving a motion vector for each sub-block based on the motion vectors of a plurality of adjacent blocks will be described. This mode may be referred to as an affine motion compensation prediction mode.
 図9Aは、複数の隣接ブロックの動きベクトルに基づくサブブロック単位の動きベクトルの導出を説明するための図である。図9Aにおいて、カレントブロックは、16の4x4サブブロックを含む。ここでは、隣接ブロックの動きベクトルに基づいてカレントブロックの左上角制御ポイントの動きベクトルvが導出され、隣接サブブロックの動きベクトルに基づいてカレントブロックの右上角制御ポイントの動きベクトルvが導出される。そして、2つの動きベクトルv及びvを用いて、以下の式(2)により、カレントブロック内の各サブブロックの動きベクトル(v,v)が導出される。 FIG. 9A is a diagram for explaining derivation of a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks. In FIG. 9A, the current block includes 16 4 × 4 sub-blocks. Here, the motion vector v 0 of the upper left corner control point of the current block is derived based on the motion vector of the adjacent block, and the motion vector v 1 of the upper right corner control point of the current block is derived based on the motion vector of the adjacent sub block. Is done. Then, using the two motion vectors v 0 and v 1 , the motion vector (v x , v y ) of each sub-block in the current block is derived by the following equation (2).
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 ここで、x及びyは、それぞれ、サブブロックの水平位置及び垂直位置を示し、wは、予め定められた重み係数を示す。 Here, x and y indicate the horizontal position and vertical position of the sub-block, respectively, and w indicates a predetermined weight coefficient.
 このようなアフィン動き補償予測モードでは、左上及び右上角制御ポイントの動きベクトルの導出方法が異なるいくつかのモードを含んでもよい。このようなアフィン動き補償予測モードを示す情報(例えばアフィンフラグと呼ばれる)は、CUレベルで信号化される。なお、このアフィン動き補償予測モードを示す情報の信号化は、CUレベルに限定される必要はなく、他のレベル(例えば、シーケンスレベル、ピクチャレベル、スライスレベル、タイルレベル、CTUレベル又はサブブロックレベル)であってもよい。 Such an affine motion compensation prediction mode may include several modes in which the motion vector derivation methods of the upper left and upper right corner control points are different. Information indicating such an affine motion compensation prediction mode (for example, called an affine flag) is signaled at the CU level. Note that the information indicating the affine motion compensation prediction mode need not be limited to the CU level, but other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level). ).
 [予測制御部]
 予測制御部128は、イントラ予測信号及びインター予測信号のいずれかを選択し、選択した信号を予測信号として減算部104及び加算部116に出力する。
[Prediction control unit]
The prediction control unit 128 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal to the subtraction unit 104 and the addition unit 116 as a prediction signal.
 ここで、マージモードにより符号化対象ピクチャの動きベクトルを導出する例を説明する。図9Bは、マージモードによる動きベクトル導出処理の概要を説明するための図である。 Here, an example of deriving the motion vector of the encoding target picture by the merge mode will be described. FIG. 9B is a diagram for explaining the outline of the motion vector deriving process in the merge mode.
 まず、予測MVの候補を登録した予測MVリストを生成する。予測MVの候補としては、符号化対象ブロックの空間的に周辺に位置する複数の符号化済みブロックが持つMVである空間隣接予測MV、符号化済み参照ピクチャにおける符号化対象ブロックの位置を投影した近辺のブロックが持つMVである時間隣接予測MV、空間隣接予測MVと時間隣接予測MVのMV値を組合わせて生成したMVである結合予測MV、および値がゼロのMVであるゼロ予測MV等がある。 First, a prediction MV list in which prediction MV candidates are registered is generated. As prediction MV candidates, spatial adjacent prediction MVs that are MVs of a plurality of encoded blocks located spatially around the encoding target block, and the position of the encoding target block in the encoded reference picture are projected. Temporal adjacent prediction MV that is MV of neighboring blocks, combined prediction MV that is MV generated by combining MV values of spatial adjacent prediction MV and temporal adjacent prediction MV, zero prediction MV that is MV having a value of zero, and the like There is.
 次に、予測MVリストに登録されている複数の予測MVの中から1つの予測MVを選択することで、符号化対象ブロックのMVとして決定する。 Next, by selecting one prediction MV from a plurality of prediction MVs registered in the prediction MV list, it is determined as the MV of the block to be encoded.
 さらに可変長符号化部では、どの予測MVを選択したかを示す信号であるmerge_idxをストリームに記述して符号化する。 Further, the variable length encoding unit describes and encodes merge_idx which is a signal indicating which prediction MV is selected in the stream.
 なお、図9Bで説明した予測MVリストに登録する予測MVは一例であり、図中の個数とは異なる個数であったり、図中の予測MVの一部の種類を含まない構成であったり、図中の予測MVの種類以外の予測MVを追加した構成であったりしてもよい。 Note that the prediction MV registered in the prediction MV list described with reference to FIG. 9B is an example, and the number of prediction MVs may be different from the number in the figure, or may not include some types of prediction MVs in the figure. It may be the composition which added prediction MV other than the kind of prediction MV in a figure.
 なお、マージモードにより導出した符号化対象ブロックのMVを用いて、後述するDMVR処理を行うことによって最終的なMVを決定してもよい。 It should be noted that the final MV may be determined by performing DMVR processing, which will be described later, using the MV of the encoding target block derived by the merge mode.
 ここで、DMVR処理を用いてMVを決定する例について説明する。 Here, an example in which MV is determined using DMVR processing will be described.
 図9Cは、DMVR処理の概要を説明するための概念図である。 FIG. 9C is a conceptual diagram for explaining an outline of DMVR processing.
 まず、処理対象ブロックに設定された最適MVPを候補MVとして、前記候補MVに従って、L0方向の処理済みピクチャである第1参照ピクチャ、およびL1方向の処理済みピクチャである第2参照ピクチャから参照画素をそれぞれ取得し、各参照画素の平均をとることでテンプレートを生成する。 First, the optimal MVP set in the processing target block is set as a candidate MV, and reference pixels from a first reference picture that is a processed picture in the L0 direction and a second reference picture that is a processed picture in the L1 direction are set according to the candidate MV. Are obtained, and a template is generated by taking the average of each reference pixel.
 次に、前記テンプレートを用いて、第1参照ピクチャおよび第2参照ピクチャの候補MVの周辺領域をそれぞれ探索し、最もコストが最小となるMVを最終的なMVとして決定する。なお、コスト値はテンプレートの各画素値と探索領域の各画素値との差分値およびMV値等を用いて算出する。 Next, using the template, the peripheral areas of the candidate MVs of the first reference picture and the second reference picture are searched, respectively, and the MV with the lowest cost is determined as the final MV. The cost value is calculated using a difference value between each pixel value of the template and each pixel value of the search area, an MV value, and the like.
 なお、符号化装置および復号化装置では、ここで説明した処理の概要は基本的に共通である。 Note that the outline of the processing described here is basically the same in the encoding device and the decoding device.
 なお、ここで説明した処理そのものでなくても、候補MVの周辺を探索して最終的なMVを導出することができる処理であれば、他の処理を用いてもよい。 Note that other processes may be used as long as they are processes that can search the vicinity of the candidate MV and derive the final MV, instead of the process described here.
 ここで、LIC処理を用いて予測画像を生成するモードについて説明する。 Here, a mode for generating a predicted image using LIC processing will be described.
 図9Dは、LIC処理による輝度補正処理を用いた予測画像生成方法の概要を説明するための図である。 FIG. 9D is a diagram for explaining an outline of a predicted image generation method using luminance correction processing by LIC processing.
 まず、符号化済みピクチャである参照ピクチャから符号化対象ブロックに対応する参照画像を取得するためのMVを導出する。 First, an MV for obtaining a reference image corresponding to a block to be encoded is derived from a reference picture that is an encoded picture.
 次に、符号化対象ブロックに対して、左隣接および上隣接の符号化済み周辺参照領域の輝度画素値と、MVで指定された参照ピクチャ内の同等位置における輝度画素値とを用いて、参照ピクチャと符号化対象ピクチャとで輝度値がどのように変化したかを示す情報を抽出して輝度補正パラメータを算出する。 Next, for the encoding target block, reference is made using the luminance pixel values of the left and upper adjacent encoded peripheral reference regions and the luminance pixel value at the equivalent position in the reference picture specified by MV. Information indicating how the luminance value has changed between the picture and the picture to be encoded is extracted to calculate a luminance correction parameter.
 MVで指定された参照ピクチャ内の参照画像に対して前記輝度補正パラメータを用いて輝度補正処理を行うことで、符号化対象ブロックに対する予測画像を生成する。 The predicted image for the encoding target block is generated by performing the brightness correction process using the brightness correction parameter for the reference image in the reference picture specified by MV.
 なお、図9Dにおける前記周辺参照領域の形状は一例であり、これ以外の形状を用いてもよい。 Note that the shape of the peripheral reference region in FIG. 9D is an example, and other shapes may be used.
 また、ここでは1枚の参照ピクチャから予測画像を生成する処理について説明したが、複数枚の参照ピクチャから予測画像を生成する場合も同様であり、各々の参照ピクチャから取得した参照画像に同様の方法で輝度補正処理を行ってから予測画像を生成する。 Further, here, the process of generating a predicted image from one reference picture has been described, but the same applies to the case of generating a predicted image from a plurality of reference pictures, and the same applies to reference images acquired from each reference picture. The predicted image is generated after performing the luminance correction processing by the method.
 LIC処理を適用するかどうかの判定の方法として、例えば、LIC処理を適用するかどうかを示す信号であるlic_flagを用いる方法がある。具体的な一例としては、符号化装置において、符号化対象ブロックが輝度変化が発生している領域に属しているかどうかを判定し、輝度変化が発生している領域に属している場合はlic_flagとして値1を設定してLIC処理を適用して符号化を行い、輝度変化が発生している領域に属していない場合はlic_flagとして値0を設定してLIC処理を適用せずに符号化を行う。一方、復号化装置では、ストリームに記述されたlic_flagを復号化するとことで、その値に応じてLIC処理を適用するかどうかを切替えて復号化を行う。 As a method for determining whether to apply LIC processing, for example, there is a method of using lic_flag, which is a signal indicating whether to apply LIC processing. As a specific example, in the encoding device, it is determined whether or not the encoding target block belongs to an area where the luminance change occurs, and if it belongs to the area where the luminance change occurs, lic_flag is set. Encode by applying LIC processing with a value of 1 set, and if not belonging to an area where a luminance change has occurred, set 0 as lic_flag and perform encoding without applying the LIC processing . On the other hand, in the decoding device, by decoding lic_flag described in the stream, decoding is performed by switching whether to apply the LIC processing according to the value.
 LIC処理を適用するかどうかの判定の別の方法として、例えば、周辺ブロックでLIC処理を適用したかどうかに従って判定する方法もある。具体的な一例としては、符号化対象ブロックがマージモードであった場合、マージモード処理におけるMVの導出の際に選択した周辺の符号化済みブロックがLIC処理を適用して符号化したかどうかを判定し、その結果に応じてLIC処理を適用するかどうかを切替えて符号化を行う。なお、この例の場合、復号化における処理も全く同様となる。 As another method for determining whether or not to apply LIC processing, for example, there is a method for determining whether or not LIC processing has been applied to peripheral blocks. As a specific example, when the encoding target block is in the merge mode, whether or not the surrounding encoded blocks selected in the derivation of the MV in the merge mode processing are encoded by applying the LIC processing. Judgment is performed, and encoding is performed by switching whether to apply the LIC processing according to the result. In this example, the decoding process is exactly the same.
 [復号装置の概要]
 次に、上記の符号化装置100から出力された符号化信号(符号化ビットストリーム)を復号可能な復号装置の概要について説明する。図10は、実施の形態1に係る復号装置200の機能構成を示すブロック図である。復号装置200は、動画像/画像をブロック単位で復号する動画像/画像復号装置である。
[Outline of Decoding Device]
Next, an outline of a decoding apparatus capable of decoding the encoded signal (encoded bit stream) output from the encoding apparatus 100 will be described. FIG. 10 is a block diagram showing a functional configuration of decoding apparatus 200 according to Embodiment 1. The decoding device 200 is a moving image / image decoding device that decodes moving images / images in units of blocks.
 図10に示すように、復号装置200は、エントロピー復号部202と、逆量子化部204と、逆変換部206と、加算部208と、ブロックメモリ210と、ループフィルタ部212と、フレームメモリ214と、イントラ予測部216と、インター予測部218と、予測制御部220と、を備える。 As illustrated in FIG. 10, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, and a frame memory 214. And an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
 復号装置200は、例えば、汎用プロセッサ及びメモリにより実現される。この場合、メモリに格納されたソフトウェアプログラムがプロセッサにより実行されたときに、プロセッサは、エントロピー復号部202、逆量子化部204、逆変換部206、加算部208、ループフィルタ部212、イントラ予測部216、インター予測部218及び予測制御部220として機能する。また、復号装置200は、エントロピー復号部202、逆量子化部204、逆変換部206、加算部208、ループフィルタ部212、イントラ予測部216、インター予測部218及び予測制御部220に対応する専用の1以上の電子回路として実現されてもよい。 The decoding device 200 is realized by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor executes the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, and the intra prediction unit. 216, the inter prediction unit 218, and the prediction control unit 220. Also, the decoding apparatus 200 is dedicated to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. It may be realized as one or more electronic circuits.
 以下に、復号装置200に含まれる各構成要素について説明する。 Hereinafter, each component included in the decoding device 200 will be described.
 [エントロピー復号部]
 エントロピー復号部202は、符号化ビットストリームをエントロピー復号する。具体的には、エントロピー復号部202は、例えば、符号化ビットストリームから二値信号に算術復号する。そして、エントロピー復号部202は、二値信号を多値化(debinarize)する。これにより、エントロピー復号部202は、ブロック単位で量子化係数を逆量子化部204に出力する。
[Entropy decoding unit]
The entropy decoding unit 202 performs entropy decoding on the encoded bit stream. Specifically, the entropy decoding unit 202 performs arithmetic decoding from a coded bitstream to a binary signal, for example. Then, the entropy decoding unit 202 debinarizes the binary signal. As a result, the entropy decoding unit 202 outputs the quantized coefficient to the inverse quantization unit 204 in units of blocks.
 [逆量子化部]
 逆量子化部204は、エントロピー復号部202からの入力である復号対象ブロック(以下、カレントブロックという)の量子化係数を逆量子化する。具体的には、逆量子化部204は、カレントブロックの量子化係数の各々について、当該量子化係数に対応する量子化パラメータに基づいて当該量子化係数を逆量子化する。そして、逆量子化部204は、カレントブロックの逆量子化された量子化係数(つまり変換係数)を逆変換部206に出力する。
[Inverse quantization unit]
The inverse quantization unit 204 inversely quantizes the quantization coefficient of a decoding target block (hereinafter referred to as a current block) that is an input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inversely quantizes each quantization coefficient of the current block based on the quantization parameter corresponding to the quantization coefficient. Then, the inverse quantization unit 204 outputs the quantization coefficient (that is, the transform coefficient) obtained by inverse quantization of the current block to the inverse transform unit 206.
 [逆変換部]
 逆変換部206は、逆量子化部204からの入力である変換係数を逆変換することにより予測誤差を復元する。
[Inverse conversion part]
The inverse transform unit 206 restores the prediction error by inverse transforming the transform coefficient that is an input from the inverse quantization unit 204.
 例えば符号化ビットストリームから読み解かれた情報がEMT又はAMTを適用することを示す場合(例えばAMTフラグが真)、逆変換部206は、読み解かれた変換タイプを示す情報に基づいてカレントブロックの変換係数を逆変換する。 For example, when the information read from the encoded bit stream indicates that EMT or AMT is applied (for example, the AMT flag is true), the inverse conversion unit 206 determines the current block based on the information indicating the read conversion type. Inversely transform the conversion coefficient of.
 また例えば、符号化ビットストリームから読み解かれた情報がNSSTを適用することを示す場合、逆変換部206は、変換係数に逆再変換を適用する。 Also, for example, when the information read from the encoded bitstream indicates that NSST is applied, the inverse transform unit 206 applies inverse retransformation to the transform coefficient.
 [加算部]
 加算部208は、逆変換部206からの入力である予測誤差と予測制御部220からの入力である予測サンプルとを加算することによりカレントブロックを再構成する。そして、加算部208は、再構成されたブロックをブロックメモリ210及びループフィルタ部212に出力する。
[Addition part]
The adder 208 reconstructs the current block by adding the prediction error input from the inverse converter 206 and the prediction sample input from the prediction controller 220. Then, the adding unit 208 outputs the reconfigured block to the block memory 210 and the loop filter unit 212.
 [ブロックメモリ]
 ブロックメモリ210は、イントラ予測で参照されるブロックであって復号対象ピクチャ(以下、カレントピクチャという)内のブロックを格納するための記憶部である。具体的には、ブロックメモリ210は、加算部208から出力された再構成ブロックを格納する。
[Block memory]
The block memory 210 is a storage unit for storing a block that is referred to in intra prediction and that is within a decoding target picture (hereinafter referred to as a current picture). Specifically, the block memory 210 stores the reconstructed block output from the adding unit 208.
 [ループフィルタ部]
 ループフィルタ部212は、加算部208によって再構成されたブロックにループフィルタを施し、フィルタされた再構成ブロックをフレームメモリ214及び表示装置等に出力する。
[Loop filter section]
The loop filter unit 212 applies a loop filter to the block reconstructed by the adding unit 208, and outputs the filtered reconstructed block to the frame memory 214, the display device, and the like.
 符号化ビットストリームから読み解かれたALFのオン/オフを示す情報がALFのオンを示す場合、局所的な勾配の方向及び活性度に基づいて複数のフィルタの中から1つのフィルタが選択され、選択されたフィルタが再構成ブロックに適用される。 If the ALF on / off information read from the encoded bitstream indicates ALF on, one filter is selected from the plurality of filters based on the local gradient direction and activity, The selected filter is applied to the reconstruction block.
 [フレームメモリ]
 フレームメモリ214は、インター予測に用いられる参照ピクチャを格納するための記憶部であり、フレームバッファと呼ばれることもある。具体的には、フレームメモリ214は、ループフィルタ部212によってフィルタされた再構成ブロックを格納する。
[Frame memory]
The frame memory 214 is a storage unit for storing a reference picture used for inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed block filtered by the loop filter unit 212.
 [イントラ予測部]
 イントラ予測部216は、符号化ビットストリームから読み解かれたイントラ予測モードに基づいて、ブロックメモリ210に格納されたカレントピクチャ内のブロックを参照してイントラ予測を行うことで、予測信号(イントラ予測信号)を生成する。具体的には、イントラ予測部216は、カレントブロックに隣接するブロックのサンプル(例えば輝度値、色差値)を参照してイントラ予測を行うことでイントラ予測信号を生成し、イントラ予測信号を予測制御部220に出力する。
[Intra prediction section]
The intra prediction unit 216 performs intra prediction with reference to the block in the current picture stored in the block memory 210 based on the intra prediction mode read from the encoded bitstream, so that a prediction signal (intra prediction Signal). Specifically, the intra prediction unit 216 generates an intra prediction signal by performing intra prediction with reference to a sample (for example, luminance value and color difference value) of a block adjacent to the current block, and performs prediction control on the intra prediction signal. Output to the unit 220.
 なお、色差ブロックのイントラ予測において輝度ブロックを参照するイントラ予測モードが選択されている場合は、イントラ予測部216は、カレントブロックの輝度成分に基づいて、カレントブロックの色差成分を予測してもよい。 In addition, when the intra prediction mode that refers to the luminance block is selected in the intra prediction of the color difference block, the intra prediction unit 216 may predict the color difference component of the current block based on the luminance component of the current block. .
 また、符号化ビットストリームから読み解かれた情報がPDPCの適用を示す場合、イントラ予測部216は、水平/垂直方向の参照画素の勾配に基づいてイントラ予測後の画素値を補正する。 In addition, when the information read from the encoded bitstream indicates application of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal / vertical direction.
 [インター予測部]
 インター予測部218は、フレームメモリ214に格納された参照ピクチャを参照して、カレントブロックを予測する。予測は、カレントブロック又はカレントブロック内のサブブロック(例えば4x4ブロック)の単位で行われる。例えば、インター予測部218は、符号化ビットストリームから読み解かれた動き情報(例えば動きベクトル)を用いて動き補償を行うことでカレントブロック又はサブブロックのインター予測信号を生成し、インター予測信号を予測制御部220に出力する。
[Inter prediction section]
The inter prediction unit 218 refers to the reference picture stored in the frame memory 214 and predicts the current block. Prediction is performed in units of a current block or a sub-block (for example, 4 × 4 block) in the current block. For example, the inter prediction unit 218 generates an inter prediction signal of the current block or sub-block by performing motion compensation using motion information (for example, a motion vector) read from the encoded bitstream, and generates the inter prediction signal. The result is output to the prediction control unit 220.
 なお、符号化ビットストリームから読み解かれた情報がOBMCモードを適用することを示す場合、インター予測部218は、動き探索により得られたカレントブロックの動き情報だけでなく、隣接ブロックの動き情報も用いて、インター予測信号を生成する。 When the information read from the encoded bitstream indicates that the OBMC mode is to be applied, the inter prediction unit 218 includes not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks. To generate an inter prediction signal.
 また、符号化ビットストリームから読み解かれた情報がFRUCモードを適用することを示す場合、インター予測部218は、符号化ストリームから読み解かれたパターンマッチングの方法(バイラテラルマッチング又はテンプレートマッチング)に従って動き探索を行うことにより動き情報を導出する。そして、インター予測部218は、導出された動き情報を用いて動き補償を行う。 Also, when the information read from the encoded bitstream indicates that the FRUC mode is applied, the inter prediction unit 218 follows the pattern matching method (bilateral matching or template matching) read from the encoded stream. Motion information is derived by performing motion search. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.
 また、インター予測部218は、BIOモードが適用される場合に、等速直線運動を仮定したモデルに基づいて動きベクトルを導出する。また、符号化ビットストリームから読み解かれた情報がアフィン動き補償予測モードを適用することを示す場合には、インター予測部218は、複数の隣接ブロックの動きベクトルに基づいてサブブロック単位で動きベクトルを導出する。 In addition, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming constant velocity linear motion. Also, when the information read from the encoded bitstream indicates that the affine motion compensated prediction mode is applied, the inter prediction unit 218 determines the motion vector in units of subblocks based on the motion vectors of a plurality of adjacent blocks. Is derived.
 [予測制御部]
 予測制御部220は、イントラ予測信号及びインター予測信号のいずれかを選択し、選択した信号を予測信号として加算部208に出力する。
[Prediction control unit]
The prediction control unit 220 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal to the adding unit 208 as a prediction signal.
 [符号化装置及び復号装置によって行われる画面間予測]
 図11は、図1に示された符号化装置100によって行われる画面間予測に関連する処理を説明するためのブロック図である。例えば、図1に示された分割部102によって入力画像はブロック単位で分割される。そして、ブロック毎に処理が行われる。
[Inter-screen prediction performed by encoding device and decoding device]
FIG. 11 is a block diagram for explaining processing related to inter-screen prediction performed by the encoding device 100 shown in FIG. For example, the input image is divided into blocks by the dividing unit 102 shown in FIG. Then, processing is performed for each block.
 減算部104は、ブロック単位の入力画像と、画面内予測又は画面間予測によって生成された予測画像との差分を取得することにより、差分画像を生成する。そして、変換部106及び量子化部108は、差分画像に対して変換及び量子化を行うことにより、係数信号を生成する。エントロピー符号化部110は、生成された係数信号、及び、その他の符号化信号に対してエントロピー符号化を行うことにより、符号化ストリーム(符号化ビットストリーム)を生成する。 The subtraction unit 104 generates a difference image by acquiring a difference between the input image in block units and a prediction image generated by intra prediction or inter prediction. Then, the conversion unit 106 and the quantization unit 108 generate a coefficient signal by performing conversion and quantization on the difference image. The entropy encoding unit 110 generates an encoded stream (encoded bit stream) by performing entropy encoding on the generated coefficient signal and other encoded signals.
 一方、逆量子化部112及び逆変換部114は、生成された係数信号に対して逆量子化及び逆変換を行うことにより、差分画像を復元する。画面内予測部(イントラ予測部)124は、画面内予測によって予測画像を生成し、画面間予測部(インター予測部)126は、画面間予測によって予測画像を生成する。加算部116は、画面内予測によって生成された予測画像、及び、画面間予測によって生成された予測画像のうち一方と、復元された差分画像とを加算することにより、再構成画像を生成する。 Meanwhile, the inverse quantization unit 112 and the inverse transform unit 114 restore the difference image by performing inverse quantization and inverse transform on the generated coefficient signal. The intra prediction unit (intra prediction unit) 124 generates a prediction image by intra prediction, and the inter prediction unit (inter prediction unit) 126 generates a prediction image by inter prediction. The adding unit 116 generates a reconstructed image by adding one of the predicted image generated by the intra-screen prediction and the predicted image generated by the inter-screen prediction and the restored difference image.
 また、画面内予測部124は、処理されたブロックの再構成画像を後に処理される別のブロックの画面内予測に用いる。また、ループフィルタ部120は、処理されたブロックの再構成画像に対してループフィルタを適用して、ループフィルタが適用された再構成画像をフレームメモリ122に格納する。そして、画面間予測部126は、後に処理される別のピクチャにおける別のブロックの画面間予測に、フレームメモリ122に格納された再構成画像を用いる。 Also, the intra prediction unit 124 uses the reconstructed image of the processed block for intra prediction of another block to be processed later. In addition, the loop filter unit 120 applies a loop filter to the reconstructed image of the processed block, and stores the reconstructed image to which the loop filter is applied in the frame memory 122. The inter-screen prediction unit 126 uses the reconstructed image stored in the frame memory 122 for inter-screen prediction of another block in another picture to be processed later.
 また、画面間予測部126は、外部から設定された画面間予測制御信号に従って画面間予測を行う。ここでは、画面間予測制御信号として、FRUC制御情報及びサブブロック処理制御情報等が用いられる。そして、エントロピー符号化部110は、FRUC制御情報及びサブブロック処理制御情報等を画面間予測制御信号としてストリームへ符号化する。 Also, the inter-screen prediction unit 126 performs inter-screen prediction according to the inter-screen prediction control signal set from the outside. Here, FRUC control information, sub-block processing control information, and the like are used as the inter-screen prediction control signal. Then, the entropy encoding unit 110 encodes FRUC control information, sub-block processing control information, and the like into a stream as an inter-screen prediction control signal.
 上記のFRUC制御情報は、動きベクトルを導出する方式を示す情報である。例えば、FRUC制御情報は、動きベクトルを導出する複数の方式のうちのいずれかを示す。また、FRUC制御情報は、上述されたような、FRUCモードを適用するか否かを示す情報、及び、パターンマッチングの方法を示す情報に対応する。また、上記のサブブロック処理制御情報は、ブロックを構成するサブブロックの単位で動き補償を行うことが有効であるか無効であるかを示す情報である。 The above FRUC control information is information indicating a method for deriving a motion vector. For example, FRUC control information indicates one of a plurality of methods for deriving a motion vector. The FRUC control information corresponds to information indicating whether or not to apply the FRUC mode and information indicating a pattern matching method as described above. The sub-block processing control information is information indicating whether it is effective or ineffective to perform motion compensation in units of sub-blocks constituting the block.
 例えば、FRUC制御情報は、処理対象ブロックのヘッダ層へ符号化されてもよいし、処理対象スライスのヘッダ層へ符号化されてもよいし、処理対象ピクチャのヘッダ層へ符号化されてもよいし、処理対象ストリームのヘッダ層へ符号化されてもよい。同様に、サブブロック処理制御情報は、処理対象ブロックのヘッダ層へ符号化されてもよいし、処理対象スライスのヘッダ層へ符号化されてもよいし、処理対象ピクチャのヘッダ層へ符号化されてもよいし、処理対象ストリームのヘッダ層へ符号化されてもよい。 For example, the FRUC control information may be encoded into the header layer of the processing target block, may be encoded into the header layer of the processing target slice, or may be encoded into the header layer of the processing target picture. However, it may be encoded into the header layer of the processing target stream. Similarly, the sub-block processing control information may be encoded into the header layer of the processing target block, may be encoded into the header layer of the processing target slice, or encoded into the header layer of the processing target picture. Alternatively, it may be encoded into the header layer of the processing target stream.
 また、画面間予測制御信号は、符号化装置100の外部から設定されてもよい。例えば、画面間予測制御信号は、処理性能に従って定められてもよい。また、FRUC制御情報及びサブブロック処理制御情報等が予め定められている場合、画面間予測制御信号が用いられなくてもよい。そして、この場合、画面間予測制御信号が符号化されなくてもよい。 Further, the inter-screen prediction control signal may be set from the outside of the encoding device 100. For example, the inter-screen prediction control signal may be determined according to processing performance. Moreover, when FRUC control information, sub-block processing control information, and the like are determined in advance, the inter-screen prediction control signal may not be used. In this case, the inter-screen prediction control signal may not be encoded.
 また、画面間予測制御信号は、符号化装置100の外部から設定されることに限られず、符号化装置100の内部で設定されてもよい。例えば、画面間予測部126が画面間予測制御信号を設定してもよい。具体的には、画面間予測部126は、画面間予測制御信号の設定候補に従って生成される予測画像と入力画像との適合度合いに従って、画面間予測制御信号の設定候補を評価してもよい。そして、画面間予測部126は、評価結果に従って、画面間予測制御信号を設定してもよい。 In addition, the inter-screen prediction control signal is not limited to being set from the outside of the encoding apparatus 100, and may be set inside the encoding apparatus 100. For example, the inter-screen prediction unit 126 may set an inter-screen prediction control signal. Specifically, the inter-screen prediction unit 126 may evaluate the inter-screen prediction control signal setting candidates according to the degree of matching between the predicted image generated according to the inter-screen prediction control signal setting candidates and the input image. Then, the inter-screen prediction unit 126 may set an inter-screen prediction control signal according to the evaluation result.
 なお、予測画像と入力画像との間の適合度合いは、予測画像と入力画像との間の差によって評価され得る。本実施の形態等で説明されるその他の画像間の適合度合いも同様に画像間の差によって評価され得る。 Note that the degree of matching between the predicted image and the input image can be evaluated by the difference between the predicted image and the input image. The degree of matching between other images described in this embodiment and the like can be similarly evaluated based on the difference between images.
 図12は、図10に示された復号装置200によって行われる画面間予測に関連する処理を説明するためのブロック図である。エントロピー復号部202によって、符号化ストリームである入力ストリームに対してエントロピー復号が行われることにより、ブロック単位で情報が取得される。そして、ブロック毎に処理が行われる。 FIG. 12 is a block diagram for explaining processing related to inter-screen prediction performed by the decoding device 200 shown in FIG. The entropy decoding unit 202 performs entropy decoding on the input stream that is the encoded stream, thereby acquiring information in units of blocks. Then, processing is performed for each block.
 逆量子化部204及び逆変換部206は、ブロック毎に復号された係数信号に対して逆量子化及び逆変換を行うことにより、差分画像を復元する。 The inverse quantization unit 204 and the inverse transform unit 206 restore the difference image by performing inverse quantization and inverse transform on the coefficient signal decoded for each block.
 画面内予測部(イントラ予測部)216は、画面内予測によって予測画像を生成し、画面間予測部(インター予測部)218は、画面間予測によって予測画像を生成する。加算部208は、画面内予測によって生成された予測画像、及び、画面間予測によって生成された予測画像のうち一方と、復元された差分画像とを加算することにより、再構成画像を生成する。 The intra prediction unit (intra prediction unit) 216 generates a prediction image by intra prediction, and the inter prediction unit (inter prediction unit) 218 generates a prediction image by inter prediction. The adding unit 208 generates a reconstructed image by adding one of the predicted image generated by the intra-screen prediction and the predicted image generated by the inter-screen prediction and the restored difference image.
 また、画面内予測部216は、処理されたブロックの再構成画像を後に処理される別のブロックの画面内予測に用いる。また、ループフィルタ部212は、処理されたブロックの再構成画像に対してループフィルタを適用して、ループフィルタが適用された再構成画像をフレームメモリ214に格納する。そして、画面間予測部218は、後に処理される別のピクチャにおける別のブロックの画面間予測に、フレームメモリ214に格納された再構成画像を用いる。 Also, the intra-screen prediction unit 216 uses the reconstructed image of the processed block for intra-screen prediction of another block to be processed later. Further, the loop filter unit 212 applies a loop filter to the reconstructed image of the processed block, and stores the reconstructed image to which the loop filter is applied in the frame memory 214. The inter-screen prediction unit 218 uses the reconstructed image stored in the frame memory 214 for inter-screen prediction of another block in another picture to be processed later.
 また、画面間予測部218は、エントロピー復号によって入力ストリームから取得された画面間予測制御信号に従って画面間予測を行う。ここでは、画面間予測制御信号として、FRUC制御情報及びサブブロック処理制御情報等が用いられる。つまり、エントロピー復号部202は、ストリームからFRUC制御情報及びサブブロック処理制御情報等を画面間予測制御信号として復号する。 Also, the inter-screen prediction unit 218 performs inter-screen prediction according to the inter-screen prediction control signal acquired from the input stream by entropy decoding. Here, FRUC control information, sub-block processing control information, and the like are used as the inter-screen prediction control signal. That is, the entropy decoding unit 202 decodes FRUC control information, sub-block processing control information, and the like from the stream as inter-screen prediction control signals.
 また、FRUC制御情報は、処理対象ブロックのヘッダ層から復号されてもよいし、処理対象スライスのヘッダ層から復号されてもよいし、処理対象ピクチャのヘッダ層から復号されてもよいし、処理対象ストリームのヘッダ層から復号されてもよい。同様に、サブブロック処理制御情報は、処理対象ブロックのヘッダ層から復号されてもよいし、処理対象スライスのヘッダ層から復号されてもよいし、処理対象ピクチャのヘッダ層から復号されてもよいし、処理対象ストリームのヘッダ層から復号されてもよい。 The FRUC control information may be decoded from the header layer of the processing target block, may be decoded from the header layer of the processing target slice, may be decoded from the header layer of the processing target picture, It may be decoded from the header layer of the target stream. Similarly, the sub-block processing control information may be decoded from the header layer of the processing target block, may be decoded from the header layer of the processing target slice, or may be decoded from the header layer of the processing target picture. However, it may be decoded from the header layer of the processing target stream.
 また、符号化装置100に設定された画面間予測制御信号が、復号装置200の外部から設定されてもよい。また、FRUC制御情報及びサブブロック処理制御情報等が、符号化装置100と復号装置200とで同じように、予め定められている場合、画面間予測制御信号が用いられなくてもよい。そして、この場合、画面間予測制御信号が復号されなくてもよい。 Also, the inter-screen prediction control signal set in the encoding device 100 may be set from the outside of the decoding device 200. Further, when the FRUC control information, the sub-block processing control information, and the like are determined in advance in the same way in the encoding device 100 and the decoding device 200, the inter-screen prediction control signal may not be used. In this case, the inter-screen prediction control signal may not be decoded.
 [画面間予測の具体例]
 以下、画面間予測の複数の具体例を示す。例えば、複数の具体例のうちの1つが適用される。また、以下では、主に符号化装置100の動作が示されているが、復号装置200の動作も基本的に同じである。特に、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。
[Specific example of inter-screen prediction]
Hereinafter, a plurality of specific examples of inter-screen prediction will be shown. For example, one of a plurality of specific examples is applied. In the following, the operation of the encoding device 100 is mainly shown, but the operation of the decoding device 200 is basically the same. In particular, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
 ただし、符号化装置100は、画面間予測に用いられるFRUC制御情報及びサブブロック処理制御情報等をストリームに符号化する。FRUC制御情報及びサブブロック処理制御情報等は、外部から予め設定されていてもよいし、符号化装置100自身によって予め設定されてもよい。一方、復号装置200は、画面間予測に用いられるFRUC制御情報及びサブブロック処理制御情報等をストリームから復号する。 However, the encoding apparatus 100 encodes FRUC control information, sub-block processing control information, and the like used for inter-screen prediction into a stream. FRUC control information, sub-block processing control information, and the like may be set in advance from the outside, or may be set in advance by the encoding apparatus 100 itself. On the other hand, the decoding device 200 decodes FRUC control information and sub-block processing control information used for inter-screen prediction from the stream.
 また、通常画面間予測方式において、符号化装置100は、処理対象領域の画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って、動きベクトルを導出し、動きベクトルの情報を符号化する。一方、復号装置200は、動きベクトルの情報を復号し、動きベクトルを導出する。 Also, in the normal inter-screen prediction method, the encoding apparatus 100 derives a motion vector according to the degree of matching between the image of the processing target region and the reconstructed image of the region in the reference picture, and encodes motion vector information. . On the other hand, the decoding apparatus 200 decodes motion vector information and derives a motion vector.
 上記の動きベクトルの情報は、動きベクトルに関連する情報であって、直接的又は間接的に動きベクトルを示す。例えば、動きベクトルの情報は、動きベクトル自体を示してもよいし、動きベクトル及び予測動きベクトルの間の差である差分動きベクトルと、予測動きベクトルの識別子とを示してもよい。また、通常画面間予測方式は、基本画面間予測方式と表現されてもよい。 The above motion vector information is information related to the motion vector and directly or indirectly indicates the motion vector. For example, the motion vector information may indicate the motion vector itself, or may indicate a differential motion vector that is a difference between the motion vector and the predicted motion vector, and an identifier of the predicted motion vector. Further, the normal inter-screen prediction method may be expressed as a basic inter-screen prediction method.
 テンプレートFRUC方式及びバイラテラルFRUC方式では、符号化装置100及び復号装置200が、動きベクトルの情報の符号化及び復号を行うことなく、動きベクトルを導出する。 In the template FRUC method and the bilateral FRUC method, the encoding device 100 and the decoding device 200 derive a motion vector without encoding and decoding motion vector information.
 具体的には、テンプレートFRUC方式において、符号化装置100及び復号装置200は、処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って、動きベクトルを導出する。バイラテラルFRUC方式では、符号化装置100及び復号装置200は、2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って、動きベクトルを導出する。 Specifically, in the template FRUC method, the encoding device 100 and the decoding device 200 calculate the motion vector according to the matching degree between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture. To derive. In the bilateral FRUC method, the encoding device 100 and the decoding device 200 derive a motion vector according to the degree of matching between two reconstructed images in two regions in two reference pictures.
 また、以下の説明におけるFRUC制御情報は、通常画面間予測方式を0として示し、テンプレートFRUC方式を1として示し、バイラテラルFRUC方式を2として示す。ただし、これらの番号及び分類は一例であり、これらの番号及び分類とは異なる番号及び分類が用いられてもよい。 Also, the FRUC control information in the following description indicates the normal inter-screen prediction method as 0, the template FRUC method as 1, and the bilateral FRUC method as 2. However, these numbers and classifications are examples, and numbers and classifications different from these numbers and classifications may be used.
 また、以下の説明におけるサブブロック処理制御情報は、サブブロックの単位で動き補償を行うことが有効であることを1として示し、サブブロックの単位で動き補償を行うことが無効であることを0として示す。ただし、これらの番号は一例であり、これらの番号とは異なる番号が用いられてもよい。 Further, the sub-block processing control information in the following description indicates that it is effective to perform motion compensation in units of sub-blocks, and indicates that it is invalid to perform motion compensation in units of sub-blocks. As shown. However, these numbers are examples, and numbers different from these numbers may be used.
 また、以下では、ブロック毎に行われる処理が示されている。このブロックは、予測ブロックとも称される。ブロックは、符号化及び復号が行われる画像データ単位であってもよいし、再構成が行われる画像データ単位であってもよい。そして、ブロックを構成するサブブロックは、所定サイズで定められてもよい。サブブロックは、例えば、4x4の16個の画素で構成されてもよい。そして、ブロックを所定サイズで分割することにより、ブロックを構成する1つ以上のサブブロックが定められてもよい。 In the following, processing performed for each block is shown. This block is also referred to as a prediction block. The block may be an image data unit to be encoded and decoded, or may be an image data unit to be reconstructed. And the subblock which comprises a block may be defined by predetermined size. The sub-block may be composed of 16 pixels of 4 × 4, for example. Then, one or more sub-blocks constituting the block may be determined by dividing the block by a predetermined size.
 図13は、符号化装置100の画面間予測部126によって行われる画面間予測の第1具体例を示すフローチャートである。上述した通り、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。 FIG. 13 is a flowchart illustrating a first specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100. As described above, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
 図13のように、画面間予測部126は、ブロック毎に処理を行う。例えば、FRUC制御情報が0を示す場合(S101で0)、画面間予測部126は、通常画面間予測方式に従ってブロック単位の動きベクトル(MV)を導出する(S111)。そして、画面間予測部126は、ブロック単位の動きベクトルをそのまま用いて、ブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S117)。 As shown in FIG. 13, the inter-screen prediction unit 126 performs processing for each block. For example, when the FRUC control information indicates 0 (0 in S101), the inter-screen prediction unit 126 derives a block-based motion vector (MV) according to the normal inter-screen prediction method (S111). Then, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vectors in units of blocks as they are (S117).
 また、FRUC制御情報が1を示す場合(S101で1)、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルを導出する(S121)。FRUC制御情報が2を示す場合(S101で2)、画面間予測部126は、バイラテラルFRUC方式に従ってブロック単位の動きベクトルを導出する(S131)。 If the FRUC control information indicates 1 (1 in S101), the inter-screen prediction unit 126 derives a motion vector in block units according to the template FRUC method (S121). When the FRUC control information indicates 2 (2 in S101), the inter-screen prediction unit 126 derives a block-based motion vector according to the bilateral FRUC method (S131).
 そして、画面間予測部126は、テンプレートFRUC方式又はバイラテラル方式に従ってブロック単位の動きベクトルを導出した後、バイラテラル方式に従ってサブブロック単位の動きベクトルを導出する(S136)。その際、例えば、画面間予測部126は、ブロック単位の動きベクトルを用いてサブブロック単位の動きベクトルを導出する。より具体的には、画面間予測部126は、ブロック単位の動きベクトルをサブブロック単位の動きベクトルの候補動きベクトルとして用いる。 The inter-screen prediction unit 126 derives a motion vector in units of blocks according to the template FRUC method or the bilateral method, and then derives a motion vector in units of sub-blocks according to the bilateral method (S136). At this time, for example, the inter-screen prediction unit 126 derives a motion vector in units of sub-blocks using the motion vector in units of blocks. More specifically, the inter-screen prediction unit 126 uses a motion vector in units of blocks as a candidate motion vector for a motion vector in units of sub-blocks.
 上記のサブブロック単位の動きベクトルの導出において、ブロック単位の動きベクトルを導出する方式が、テンプレートFRUC方式であるかバイラテラルFRUC方式であるかにかかわらず、バイラテラルFRUC方式が適用される。すなわち、ブロック単位の動きベクトルの導出にテンプレートFRUC方式が適用されていても、サブブロック単位の動きベクトルの導出にバイラテラルFRUC方式が適用される。 In the derivation of the motion vector in units of sub-blocks, the bilateral FRUC method is applied regardless of whether the method for deriving the motion vector in block units is the template FRUC method or the bilateral FRUC method. That is, even if the template FRUC method is applied to the derivation of the motion vector for each block, the bilateral FRUC method is applied to the derivation of the motion vector for each sub-block.
 そして、画面間予測部126は、サブブロック単位の動きベクトルを用いて、サブブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S137)。そして、画面間予測部126は、ブロック内の各サブブロックについて、動きベクトルの導出(S136)と、動き補償(S137)とを繰り返す。 Then, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using the motion vector in units of sub-blocks (S137). The inter-screen prediction unit 126 then repeats derivation of motion vectors (S136) and motion compensation (S137) for each sub-block in the block.
 テンプレートFRUC方式では、処理対象領域に隣接する領域の再構成画像が処理対象領域の動きベクトルの導出に用いられる。一方、サブブロック単位で処理が行われる場合、処理対象サブブロックに隣接する領域の再構成画像がまだ生成されていない可能性がある。したがって、テンプレートFRUC方式に従って動きベクトルを導出するための再構成画像が生成されておらず、テンプレートFRUC方式に従ってサブブロック単位の動きベクトルが適切に導出されない可能性がある。 In the template FRUC method, a reconstructed image of an area adjacent to the processing target area is used to derive a motion vector of the processing target area. On the other hand, when processing is performed in units of sub-blocks, there is a possibility that a reconstructed image of an area adjacent to the processing target sub-block has not yet been generated. Therefore, a reconstructed image for deriving a motion vector according to the template FRUC method is not generated, and there is a possibility that a sub-block unit motion vector is not properly derived according to the template FRUC method.
 そこで、本具体例では、サブブロック単位の動きベクトルの導出に、テンプレートFRUC方式ではなくバイラテラルFRUC方式が適用される。これにより、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが適切に導出され得る。 Therefore, in this specific example, the bilateral FRUC method is applied instead of the template FRUC method for deriving motion vectors in units of sub-blocks. Thereby, the motion vector of a subblock unit can be derived | led-out appropriately according to the bilateral FRUC system.
 なお、本具体例では、テンプレートFRUC方式又はバイラテラルFRUC方式に従ってブロック単位の動きベクトルが導出された場合に、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出される。これに限らず、通常画面間予測方式に従ってブロック単位の動きベクトルが導出された場合に、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出されてもよい。 In this specific example, when a block-based motion vector is derived according to the template FRUC method or the bilateral FRUC method, a sub-block-based motion vector is derived according to the bilateral FRUC method. However, the present invention is not limited to this, and when a motion vector in units of blocks is derived according to the normal inter-screen prediction method, a motion vector in units of sub-blocks may be derived according to the bilateral FRUC method.
 図14は、符号化装置100の画面間予測部126によって行われる画面間予測の第2具体例を示すフローチャートである。上述した通り、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。本具体例において、FRUC制御情報が0又は2を示す場合(S101で0又は2)、画面間予測部126は、第1具体例と同様に動作する。 FIG. 14 is a flowchart illustrating a second specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100. As described above, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100. In this specific example, when the FRUC control information indicates 0 or 2 (0 or 2 in S101), the inter-screen prediction unit 126 operates in the same manner as in the first specific example.
 FRUC制御情報が1を示す場合(S101で1)、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルを導出する(S121)。 When the FRUC control information indicates 1 (1 in S101), the inter-screen prediction unit 126 derives a block-based motion vector according to the template FRUC method (S121).
 そして、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルとして導出された動きベクトルが、双方向予測の動きベクトルであるか否かを判定する(S122)。言い換えれば、画面間予測部126は、ブロック単位の動きベクトルが、双方向予測の動きベクトルであるか片方向予測の動きベクトルであるかを判定する。 Then, the inter-screen prediction unit 126 determines whether or not the motion vector derived as the block-based motion vector according to the template FRUC method is a motion vector for bidirectional prediction (S122). In other words, the inter-screen prediction unit 126 determines whether the motion vector for each block is a bidirectional motion vector or a unidirectional motion vector.
 そして、ブロック単位の動きベクトルが、片方向予測の動きベクトルであると判定された場合(S122でNo)、画面間予測部126は、ブロック単位の動きベクトルをそのまま用いてブロック単位で動き補償を行う(S117)。そして、これにより、画面間予測部126は、画面間予測画像を生成する。 When it is determined that the motion vector in block units is a unidirectional motion vector (No in S122), the inter-screen prediction unit 126 performs motion compensation in block units using the block motion vectors as they are. Perform (S117). Thereby, the inter-screen prediction unit 126 generates an inter-screen prediction image.
 一方、ブロック単位の動きベクトルが、双方向予測の動きベクトルであると判定された場合(S122でYes)、画面間予測部126は、第1具体例と同様に、バイラテラル方式に従ってサブブロック単位の動きベクトルを導出する(S136)。そして、画面間予測部126は、第1具体例と同様に、サブブロック単位の動きベクトルを用いて、サブブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S137)。 On the other hand, when it is determined that the motion vector in units of blocks is a motion vector for bidirectional prediction (Yes in S122), the inter-screen prediction unit 126, in the same way as in the first specific example, performs sub-block units in accordance with the bilateral method. The motion vector is derived (S136). Then, similarly to the first specific example, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using motion vectors in units of sub-blocks (S137).
 バイラテラルFRUC方式では、双方向予測の動きベクトルの候補を用いて、双方向予測の動きベクトルが導出される。したがって、テンプレートFRUC方式に従ってブロック単位の動きベクトルとして導出された動きベクトルが、片方向予測の動きベクトルである場合、そのまま候補には用いられない。 In the bilateral FRUC method, bi-predictive motion vectors are derived using bi-predictive motion vector candidates. Therefore, when a motion vector derived as a block-based motion vector according to the template FRUC method is a unidirectional prediction motion vector, it is not used as a candidate as it is.
 そこで、本具体例では、テンプレートFRUC方式に従ってブロック単位の動きベクトルとして導出された動きベクトルが片方向予測の動きベクトルである場合に、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出されない。そして、ブロック単位の動きベクトルを用いてブロック単位で動き補償が行われる。 Therefore, in this specific example, when a motion vector derived as a block-unit motion vector according to the template FRUC method is a unidirectional motion vector, a sub-block unit motion vector is not derived according to the bilateral FRUC method. Then, motion compensation is performed in units of blocks using the motion vectors in units of blocks.
 一方、テンプレートFRUC方式に従ってブロック単位の動きベクトルとして導出された動きベクトルが双方向予測の動きベクトルである場合に、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出される。そして、サブブロック単位の動きベクトルを用いてサブブロック単位で動き補償が行われる。 On the other hand, when a motion vector derived as a block-unit motion vector according to the template FRUC method is a bidirectional prediction motion vector, a sub-block unit motion vector is derived according to the bilateral FRUC method. Then, motion compensation is performed in units of subblocks using motion vectors in units of subblocks.
 これにより、ブロック単位の動きベクトルが、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルを導出するための候補に適している場合に、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出され得る。よって、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが適切に導出され得る。 Thereby, when the motion vector in units of blocks is suitable for a candidate for deriving the motion vector in units of sub-blocks according to the bilateral FRUC method, the motion vectors in units of sub-blocks can be derived according to the bilateral FRUC method. Therefore, a sub-block unit motion vector can be appropriately derived according to the bilateral FRUC method.
 なお、本具体例では、テンプレートFRUC方式に従ってブロック単位の動きベクトルが導出された場合に、双方向予測か片方向予測かに従って、サブブロック単位で処理を行うか否かが制御される。これに限らず、通常画面間予測方式に従ってブロック単位の動きベクトルが導出された場合にも、双方向予測か片方向予測かに従って、サブブロック単位で処理を行うか否かが制御されてもよい。 In this specific example, when a motion vector in block units is derived according to the template FRUC method, whether or not processing is performed in subblock units is controlled according to bi-directional prediction or uni-directional prediction. The present invention is not limited to this, and even when a motion vector in block units is derived according to the normal inter-screen prediction method, whether or not to perform processing in sub-block units may be controlled according to bidirectional prediction or unidirectional prediction. .
 図15は、符号化装置100の画面間予測部126によって行われる画面間予測の第3具体例を示すフローチャートである。上述した通り、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。本具体例において、FRUC制御情報が0である場合(S101で0)、画面間予測部126は、第1具体例と同様に動作する。 FIG. 15 is a flowchart illustrating a third specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100. As described above, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100. In this specific example, when the FRUC control information is 0 (0 in S101), the inter-screen prediction unit 126 operates in the same manner as in the first specific example.
 また、第1具体例と同様に、FRUC制御情報が1を示す場合(S101で1)、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルを導出する(S121)。FRUC制御情報が2を示す場合(S101で2)、画面間予測部126は、バイラテラルFRUC方式に従ってブロック単位の動きベクトルを導出する(S131)。 Similarly to the first specific example, when the FRUC control information indicates 1 (1 in S101), the inter-screen prediction unit 126 derives a block-based motion vector according to the template FRUC method (S121). When the FRUC control information indicates 2 (2 in S101), the inter-screen prediction unit 126 derives a block-based motion vector according to the bilateral FRUC method (S131).
 さらに、この例では、画面間予測部126は、テンプレートFRUC方式又はバイラテラル方式に従ってブロック単位の動きベクトルを導出した後、サブブロック処理制御情報が0を示すか1を示すかを判定する(S133)。上述した通り、ここで、サブブロック処理制御情報は、サブブロックの単位で動き補償を行うことが有効であることを1として示し、サブブロックの単位で動き補償を行うことが無効であることを0として示す。 Furthermore, in this example, the inter-screen prediction unit 126 determines whether the sub-block processing control information indicates 0 or 1 after deriving a motion vector for each block according to the template FRUC method or the bilateral method (S133). ). As described above, here, the sub-block processing control information indicates that it is effective to perform motion compensation in units of sub-blocks, and that it is invalid to perform motion compensation in units of sub-blocks. Shown as 0.
 そして、サブブロック処理制御情報が0を示す場合(S133で0)、画面間予測部126は、ブロック単位の動きベクトルをそのまま用いてブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S117)。 When the sub-block processing control information indicates 0 (0 in S133), the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vector in units of blocks as it is. (S117).
 一方、サブブロック処理制御情報が1を示す場合(S133で1)、画面間予測部126は、第1具体例と同様に、バイラテラル方式に従ってサブブロック単位の動きベクトルを導出する(S136)。そして、画面間予測部126は、第1具体例と同様に、サブブロック単位の動きベクトルを用いて、サブブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S137)。 On the other hand, when the sub-block processing control information indicates 1 (1 in S133), the inter-screen prediction unit 126 derives a motion vector in units of sub-blocks according to the bilateral method as in the first specific example (S136). Then, similarly to the first specific example, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using motion vectors in units of sub-blocks (S137).
 本具体例において、符号化装置100は、サブブロック単位で動き補償を行うかブロック単位で動き補償を行うかを柔軟に切り替えることができる。そして、符号化装置100及び復号装置200は、サブブロック処理制御情報の符号化及び復号によって、符号化装置100と復号装置200との間で同じようにサブブロック単位で動き補償を行うかブロック単位で動き補償を行うかを切り替えることができる。 In this specific example, the encoding apparatus 100 can flexibly switch between performing motion compensation in units of sub-blocks and performing motion compensation in units of blocks. Then, the encoding apparatus 100 and the decoding apparatus 200 perform motion compensation in units of subblocks in the same way between the encoding apparatus 100 and the decoding apparatus 200 by encoding and decoding the subblock processing control information, or in units of blocks. To switch between motion compensation.
 図16は、符号化装置100の画面間予測部126によって行われる画面間予測の第4具体例を示すフローチャートである。上述した通り、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。本具体例において、FRUC制御情報が0又は2である場合(S101で0又は2)、画面間予測部126は、第3具体例と同様に動作する。 FIG. 16 is a flowchart illustrating a fourth specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100. As described above, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100. In this specific example, when the FRUC control information is 0 or 2 (0 or 2 in S101), the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
 また、第2具体例と同様に、FRUC制御情報が1を示す場合(S101で1)、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルを導出する(S121)。そして、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルとして導出された動きベクトルが、双方向予測の動きベクトルであるか否かを判定する(S122)。 Also, as in the second specific example, when the FRUC control information indicates 1 (1 in S101), the inter-screen prediction unit 126 derives a motion vector in block units according to the template FRUC method (S121). Then, the inter-screen prediction unit 126 determines whether or not the motion vector derived as a block-based motion vector according to the template FRUC method is a motion vector for bidirectional prediction (S122).
 そして、ブロック単位の動きベクトルが、片方向予測の動きベクトルであると判定された場合(S122でNo)、画面間予測部126は、第2具体例と同様に動作する。一方、ブロック単位の動きベクトルが、双方向予測の動きベクトルであると判定された場合(S122でYes)、画面間予測部126は、第3具体例と同様に動作する。 If it is determined that the motion vector in units of blocks is a unidirectional motion vector (No in S122), the inter-screen prediction unit 126 operates in the same manner as in the second specific example. On the other hand, when it is determined that the motion vector in units of blocks is a motion vector for bidirectional prediction (Yes in S122), the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
 本具体例では、第2具体例と第3具体例とが組み合わされている。これにより、ブロック単位の動きベクトルが、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルを導出するための候補に適している場合に、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出され得る。また、サブブロック単位で動き補償を行うかブロック単位で動き補償を行うかが柔軟に切り替えられ得る。 In this specific example, the second specific example and the third specific example are combined. As a result, when the block-based motion vector is suitable for a candidate for deriving the sub-block unit motion vector according to the bilateral FRUC method, the sub-block unit motion vector can be derived according to the bilateral FRUC method. Also, it is possible to flexibly switch between performing motion compensation in units of sub-blocks and performing motion compensation in units of blocks.
 なお、本具体例では、テンプレートFRUC方式に従ってブロック単位の動きベクトルが導出された場合に、双方向予測か片方向予測か、及び、サブブロック処理制御情報に従って、サブブロック単位で処理を行うか否かが制御される。これに限らず、通常画面間予測方式に従ってブロック単位の動きベクトルが導出された場合にも、双方向予測か片方向予測か、及び、サブブロック処理制御情報に従って、サブブロック単位で処理を行うか否かが制御されてもよい。 In this specific example, when a block-based motion vector is derived according to the template FRUC method, whether to perform processing in subblock units according to bi-directional prediction or unidirectional prediction and sub-block processing control information. Is controlled. Not only this, but also when motion vectors in block units are derived according to the normal inter-screen prediction method, whether to perform processing in sub-block units according to bi-directional prediction or uni-directional prediction and sub-block processing control information Whether or not may be controlled.
 図17は、符号化装置100の画面間予測部126によって行われる画面間予測の第5具体例を示すフローチャートである。上述した通り、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。本具体例において、FRUC制御情報が1又は2である場合(S101で1又は2)、画面間予測部126は、第3具体例と同様に動作する。 FIG. 17 is a flowchart illustrating a fifth specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100. As described above, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100. In this specific example, when the FRUC control information is 1 or 2 (1 or 2 in S101), the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
 また、FRUC制御情報が0を示す場合(S101で0)、画面間予測部126は、通常画面間予測方式に従ってブロック単位の動きベクトルを導出する(S111)。そして、画面間予測部126は、通常画面間予測方式に従ってブロック単位の動きベクトルを導出した後、サブブロック処理制御情報が0を示すか1を示すかを判定する(S133)。 Further, when the FRUC control information indicates 0 (0 in S101), the inter-screen prediction unit 126 derives a block-based motion vector according to the normal inter-screen prediction method (S111). Then, the inter-screen prediction unit 126 determines whether the sub-block processing control information indicates 0 or 1 after deriving a motion vector for each block according to the normal inter-screen prediction method (S133).
 そして、サブブロック処理制御情報が0を示す場合(S133で0)、画面間予測部126は、ブロック単位の動きベクトルをそのまま用いてブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S117)。 When the sub-block processing control information indicates 0 (0 in S133), the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vector in units of blocks as it is. (S117).
 一方、サブブロック処理制御情報が1を示す場合(S133で1)、画面間予測部126は、バイラテラル方式に従ってサブブロック単位の動きベクトルを導出する(S136)。その際、画面間予測部126は、第1具体例において、バイラテラル方式に従ってサブブロック単位の動きベクトルを導出する処理と同様に、バイラテラル方式に従ってサブブロック単位の動きベクトルを導出する。 On the other hand, when the sub-block processing control information indicates 1 (1 in S133), the inter-screen prediction unit 126 derives a motion vector for each sub-block according to the bilateral method (S136). At that time, in the first specific example, the inter-screen prediction unit 126 derives a motion vector for each sub-block according to the bilateral method, similarly to the process for deriving the motion vector for each sub-block according to the bilateral method.
 そして、画面間予測部126は、サブブロック単位の動きベクトルを用いて、サブブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S137)。 Then, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using the motion vector in units of sub-blocks (S137).
 本具体例では、テンプレートFRUC方式及びバイラテラルFRUC方式のみでなく、通常画面間予測方式においても、サブブロック単位で動き補償を行うかブロック単位で動き補償を行うかが、柔軟に切り替えられ得る。 In this specific example, not only the template FRUC method and the bilateral FRUC method but also the normal inter-screen prediction method can be flexibly switched between performing motion compensation in sub-block units or performing motion compensation in block units.
 図18は、符号化装置100の画面間予測部126によって行われる画面間予測の第6具体例を示すフローチャートである。上述した通り、復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。本具体例において、FRUC制御情報が0又は2である場合(S101で0又は2)、画面間予測部126は、第3具体例と同様に動作する。 FIG. 18 is a flowchart illustrating a sixth specific example of inter-screen prediction performed by the inter-screen prediction unit 126 of the encoding device 100. As described above, the inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100. In this specific example, when the FRUC control information is 0 or 2 (0 or 2 in S101), the inter-screen prediction unit 126 operates in the same manner as in the third specific example.
 また、第3具体例と同様に、FRUC制御情報が1を示す場合(S101で1)、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルを導出する(S121)。 Also, as in the third specific example, when the FRUC control information indicates 1 (1 in S101), the inter-screen prediction unit 126 derives a block-based motion vector according to the template FRUC method (S121).
 そして、画面間予測部126は、テンプレートFRUC方式に従ってブロック単位の動きベクトルを導出した後、サブブロック処理制御情報が0を示すか1を示すかを判定する(S123)。上述した通り、ここで、サブブロック処理制御情報は、サブブロックの単位で動き補償を行うことが有効であることを1として示し、サブブロックの単位で動き補償を行うことが無効であることを0として示す。 Then, the inter-screen prediction unit 126 determines whether the sub-block processing control information indicates 0 or 1 after deriving the motion vector for each block according to the template FRUC method (S123). As described above, here, the sub-block processing control information indicates that it is effective to perform motion compensation in units of sub-blocks, and that it is invalid to perform motion compensation in units of sub-blocks. Shown as 0.
 そして、サブブロック処理制御情報が0を示す場合(S123で0)、画面間予測部126は、ブロック単位の動きベクトルをそのまま用いてブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S117)。 When the sub-block processing control information indicates 0 (0 in S123), the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of blocks using the motion vector in units of blocks as it is. (S117).
 一方、サブブロック処理制御情報が1を示す場合(S123で1)、画面間予測部126は、テンプレート方式に従ってサブブロック単位の動きベクトルを導出する(S126)。その際、例えば、画面間予測部126は、ブロック単位の動きベクトルを用いてサブブロック単位の動きベクトルを導出する。より具体的には、画面間予測部126は、ブロック単位の動きベクトルをサブブロック単位の動きベクトルの候補動きベクトルとして用いる。 On the other hand, when the sub-block processing control information indicates 1 (1 in S123), the inter-screen prediction unit 126 derives a motion vector for each sub-block according to the template method (S126). At this time, for example, the inter-screen prediction unit 126 derives a motion vector in units of sub-blocks using the motion vector in units of blocks. More specifically, the inter-screen prediction unit 126 uses a motion vector in units of blocks as a candidate motion vector for a motion vector in units of sub-blocks.
 そして、画面間予測部126は、サブブロック単位の動きベクトルを用いて、サブブロック単位で動き補償を行うことにより、画面間予測画像を取得する(S127)。そして、画面間予測部126は、ブロック内の各サブブロックについて、動きベクトルの導出(S126)と、動き補償(S127)とを繰り返す。 Then, the inter-screen prediction unit 126 obtains an inter-screen prediction image by performing motion compensation in units of sub-blocks using the motion vector in units of sub-blocks (S127). Then, the inter-screen prediction unit 126 repeats motion vector derivation (S126) and motion compensation (S127) for each sub-block in the block.
 本具体例において、第3具体例と同様に、テンプレートFRUC方式又はバイラテラルFRUC方式に従ってブロック単位の動きベクトルが導出された場合に、サブブロック処理制御情報に従って、サブブロック単位で処理を行うか否かが制御される。 In this specific example, similarly to the third specific example, when a block-unit motion vector is derived according to the template FRUC method or the bilateral FRUC method, whether or not the processing is performed in subblock units according to the subblock processing control information. Is controlled.
 そして、テンプレートFRUC方式に従ってブロック単位の動きベクトルが導出され、サブブロック単位で処理が行われる場合、テンプレートFRUC方式に従ってサブブロック単位の動きベクトルが導出される。また、バイラテラルFRUC方式に従ってブロック単位の動きベクトルが導出され、サブブロック単位で処理が行われる場合、バイラテラルFRUC方式に従ってサブブロック単位の動きベクトルが導出される。 Then, when a motion vector for each block is derived according to the template FRUC method and processing is performed for each sub-block, a motion vector for each sub-block is derived according to the template FRUC method. In addition, when a motion vector for each block is derived according to the bilateral FRUC scheme and processing is performed for each subblock, a motion vector for each subblock is derived according to the bilateral FRUC scheme.
 これにより、サブブロック単位の動きベクトルの導出に用いられる方式として、テンプレートFRUC方式又はバイラテラルFRUC方式が、適応的に適用され得る。 Thereby, the template FRUC method or the bilateral FRUC method can be applied adaptively as a method used for deriving a motion vector in units of sub-blocks.
 なお、図13~図18の説明では、通常画面間予測方式、テンプレートFRUC方式及びバイラテラルFRUC方式の3つの方式の中から、ブロック単位の動きベクトルの導出に用いられる1つの方式が選択されている。しかし、これらの3つの方式とは異なる別の方式を含む4つ以上の方式の中から、ブロック単位の動きベクトルの導出に用いられる1つの方式が選択されてもよい。 In the description of FIGS. 13 to 18, one method used for deriving a motion vector in units of blocks is selected from the three methods of the normal inter-screen prediction method, the template FRUC method, and the bilateral FRUC method. Yes. However, one method used for deriving a motion vector in units of blocks may be selected from four or more methods including another method different from these three methods.
 そして、例えば、上記の別の方式は、上記の3つ方式のうちの1つの方式と同様に扱われてもよい。具体的には、別の方式に従ってブロック単位の動きベクトルが導出された場合にも、サブブロック単位で動き補償を行うか否かの判定に、サブブロック処理制御情報が用いられてもよい。また、別の方式に従ってブロック単位の動きベクトルが導出された場合にも、サブブロック単位で動き補償を行うか否かの判定に、ブロック単位の動きベクトルが双方向予測の動きベクトルであるか否かが用いられてもよい。 And, for example, the other method may be handled in the same manner as one of the three methods. Specifically, even when a block-based motion vector is derived according to another scheme, sub-block processing control information may be used to determine whether to perform motion compensation in units of sub-blocks. In addition, when a motion vector in units of blocks is derived according to another scheme, whether or not the motion vector in units of blocks is a bi-predictive motion vector in determining whether to perform motion compensation in units of sub-blocks. May be used.
 例えば、上記の別の方式として、処理対象領域に空間的又は時間的に隣接する領域の動きベクトルを処理対象領域の動きベクトルとして導出するマージモード方式が存在する。また、他にも、アフィン変換を用いる方式等が存在する。 For example, as another method described above, there is a merge mode method for deriving a motion vector of a region spatially or temporally adjacent to a processing target region as a motion vector of the processing target region. In addition, there are other methods using affine transformation.
 また、上記の4つ以上の方式のうち1つ以上の方式に選択範囲が絞られていてもよい。例えば、予め定められた2つの方式の中から、ブロック単位の動きベクトルの導出に用いられる1つの方式が選択されてもよい。具体的には、通常画面間予測方式及びテンプレートFRUC方式の中から1つの方式が選択されてもよいし、通常画面間予測方式及びバイラテラルFRUC方式の中から1つの方式が選択されてもよい。あるいは、テンプレートFRUC方式及びバイラテラルFRUC方式の中から1つの方式が選択されてもよい。 Also, the selection range may be narrowed down to one or more of the above four or more methods. For example, one method used for deriving a motion vector in units of blocks may be selected from two predetermined methods. Specifically, one method may be selected from the normal inter-screen prediction method and the template FRUC method, or one method may be selected from the normal inter-screen prediction method and the bilateral FRUC method. . Alternatively, one method may be selected from the template FRUC method and the bilateral FRUC method.
 あるいは、ブロック単位の動きベクトルの導出に用いられる1つの方式が予め定められていてもよい。例えば、ブロック単位の動きベクトルの導出に用いられる1つの方式として、通常画面間予測方式が予め定められていてもよいし、テンプレートFRUC方式が予め定められていてもよいし、バイラテラル方式が予め定められていてもよい。 Alternatively, one method used for deriving a motion vector in units of blocks may be determined in advance. For example, as one method used for deriving motion vectors in block units, a normal inter-screen prediction method may be determined in advance, a template FRUC method may be determined in advance, or a bilateral method may be determined in advance. It may be determined.
 また、ここで説明されている双方向予測は、表示順で、前の参照ピクチャ及び後の参照ピクチャを用いる双方向予測でもよいし、表示順で前の2つの参照ピクチャを用いる双方向予測でもよいし、表示順で後の2つの参照ピクチャを用いる双方向予測でもよい。つまり、双方向予測では、表示順で、前の参照ピクチャ及び後の参照ピクチャが用いられてもよいし、表示順で前の2つの参照ピクチャが用いられてもよいし、表示順で後の2つの参照ピクチャが用いられてもよい。 The bidirectional prediction described here may be bidirectional prediction using the previous reference picture and the subsequent reference picture in the display order, or may be bidirectional prediction using the two previous reference pictures in the display order. Alternatively, bi-directional prediction using the two subsequent reference pictures in the display order may be used. That is, in bi-directional prediction, the previous reference picture and the subsequent reference picture may be used in the display order, the two previous reference pictures may be used in the display order, or the subsequent reference pictures may be used in the display order. Two reference pictures may be used.
 また、サブブロック処理制御情報によらず、サブブロック単位で動き補償を行わないと判定される場合に、サブブロック処理制御情報は、符号化されなくてもよいし、復号されなくてもよい。 In addition, when it is determined that motion compensation is not performed in units of subblocks regardless of the subblock processing control information, the subblock processing control information may not be encoded or decoded.
 例えば、図15の第3具体例において、通常画面間予測方式でブロック単位の動きベクトルが導出される場合、サブブロック処理制御情報は、符号化されなくてもよい、復号されなくてもよい。また、図16の第4具体例において、テンプレートFRUC方式でブロック単位の動きベクトルが導出され、ブロック単位の動きベクトルが片方向予測の動きベクトルである場合、サブブロック処理制御情報は、符号化されなくてもよいし、復号されなくてもよい。 For example, in the third specific example of FIG. 15, when the motion vector in units of blocks is derived by the normal inter-screen prediction method, the sub-block processing control information may not be encoded or decoded. Further, in the fourth specific example of FIG. 16, when a block-unit motion vector is derived by the template FRUC method and the block-unit motion vector is a unidirectional motion vector, the sub-block processing control information is encoded. It does not have to be or may not be decoded.
 [テンプレートFRUC方式及びバイラテラルFRUC方式]
 以下、テンプレートFRUC方式又はバイラテラルFRUC方式に従って動きベクトルを導出する方法を説明する。ブロック単位の動きベクトルを導出する方法と、サブブロック単位の動きベクトルを導出する方法とは、基本的に同じである。下記の説明では、ブロックの動きベクトルを導出する方法、及び、サブブロックの動きベクトルを導出する方法を処理対象領域の動きベクトルを導出する方法として説明する。
[Template FRUC method and bilateral FRUC method]
Hereinafter, a method for deriving a motion vector according to the template FRUC method or the bilateral FRUC method will be described. A method for deriving a motion vector in units of blocks and a method for deriving a motion vector in units of sub-blocks are basically the same. In the following description, a method for deriving a motion vector of a block and a method for deriving a motion vector of a sub-block will be described as methods for deriving a motion vector of a processing target region.
 図19は、符号化装置100及び復号装置200において処理対象領域の動きベクトルの導出に用いられるテンプレートFRUC方式を示す概念図である。テンプレートFRUC方式では、処理対象領域の動きベクトルの情報の符号化及び復号が行われることなく、符号化装置100と復号装置200との間で共通の方法を用いて動きベクトルが導出される。 FIG. 19 is a conceptual diagram showing a template FRUC method used for derivation of a motion vector of a processing target area in the encoding device 100 and the decoding device 200. In the template FRUC method, a motion vector is derived using a common method between the encoding device 100 and the decoding device 200 without encoding and decoding of motion vector information of the processing target region.
 また、テンプレートFRUC方式では、処理対象領域に隣接する領域である隣接領域の再構成画像と、参照ピクチャにおける領域である対応隣接領域の再構成画像とを用いて動きベクトルが導出される。 In the template FRUC method, a motion vector is derived using a reconstructed image of an adjacent region that is a region adjacent to the processing target region and a reconstructed image of a corresponding adjacent region that is a region in the reference picture.
 ここで、隣接領域は、処理対象領域に対して、左に隣接する領域、及び、上に隣接する領域のうち一方又は両方の領域である。 Here, the adjacent region is one or both of the region adjacent to the left and the region adjacent above the processing target region.
 また、対応隣接領域は、処理対象領域の動きベクトルの候補である候補動きベクトルを用いて指定される領域である。具体的には、対応隣接領域は、隣接領域から候補動きベクトルによって指し示される領域である。また、処理対象領域から候補動きベクトルによって指し示される対応領域に対する対応隣接領域の相対的な位置は、処理対象領域に対する隣接領域の相対的な位置に等しい。 Also, the corresponding adjacent region is a region specified using a candidate motion vector that is a candidate motion vector of the processing target region. Specifically, the corresponding adjacent region is a region indicated by the candidate motion vector from the adjacent region. In addition, the relative position of the corresponding adjacent area with respect to the corresponding area indicated by the candidate motion vector from the processing target area is equal to the relative position of the adjacent area with respect to the processing target area.
 図20は、符号化装置100及び復号装置200において処理対象領域の動きベクトルの導出に用いられるバイラテラルFRUC方式を示す概念図である。バイラテラルFRUC方式では、テンプレートFRUC方式と同様に、処理対象領域の動きベクトルの情報の符号化及び復号が行われることなく、符号化装置100と復号装置200との間で共通の方法を用いて動きベクトルが導出される。 FIG. 20 is a conceptual diagram showing a bilateral FRUC method used in the encoding device 100 and the decoding device 200 for deriving the motion vector of the processing target region. In the bilateral FRUC method, similarly to the template FRUC method, a method common to the encoding device 100 and the decoding device 200 is used without encoding and decoding of motion vector information of the processing target region. A motion vector is derived.
 また、バイラテラルFRUC方式では、2つの参照ピクチャにおける2つの領域の2つの再構成画像を用いて動きベクトルが導出される。例えば、図20のように、第1参照ピクチャにおける対応領域の再構成画像と、第2参照ピクチャにおける対称領域の再構成画像とを用いて動きベクトルが導出される。 Also, in the bilateral FRUC method, a motion vector is derived using two reconstructed images of two regions in two reference pictures. For example, as shown in FIG. 20, the motion vector is derived using the reconstructed image of the corresponding region in the first reference picture and the reconstructed image of the symmetric region in the second reference picture.
 ここで、対応領域及び対称領域のそれぞれは、処理対象領域の動きベクトルの候補である候補動きベクトルを用いて指定される領域である。具体的には、対応領域は、処理対象領域から候補動きベクトルによって指し示される領域である。対称領域は、処理対象領域から対称動きベクトルによって指し示される領域である。対称動きベクトルは、双方向予測の候補動きベクトルの組を構成する動きベクトルである。対称動きベクトルは、候補動きベクトルをスケーリングすることで導出される動きベクトルであってもよい。 Here, each of the corresponding region and the symmetric region is a region specified using a candidate motion vector that is a candidate motion vector of the processing target region. Specifically, the corresponding region is a region indicated by the candidate motion vector from the processing target region. The symmetric region is a region indicated by a symmetric motion vector from the processing target region. A symmetric motion vector is a motion vector constituting a set of candidate motion vectors for bidirectional prediction. The symmetric motion vector may be a motion vector derived by scaling the candidate motion vector.
 図21は、符号化装置100の画面間予測部126がテンプレートFRUC方式又はバイラテラルFRUC方式に従って動きベクトルを導出する動作を示すフローチャートである。復号装置200の画面間予測部218は、符号化装置100の画面間予測部126と同様に動作する。 FIG. 21 is a flowchart showing an operation in which the inter-screen prediction unit 126 of the encoding apparatus 100 derives a motion vector according to the template FRUC method or the bilateral FRUC method. The inter-screen prediction unit 218 of the decoding device 200 operates in the same manner as the inter-screen prediction unit 126 of the encoding device 100.
 まず、画面間予測部126は、処理対象領域に対して時間的又は空間的に周辺の1つ以上の処理済み領域のそれぞれの動きベクトルを参照して、候補動きベクトルを導出する。 First, the inter-screen prediction unit 126 derives a candidate motion vector by referring to each motion vector of one or more processed regions that are temporally or spatially adjacent to the processing target region.
 バイラテラルFRUC方式では、ここで、画面間予測部126は、双方向予測の候補動きベクトルを導出する。つまり、画面間予測部126は、2つの動きベクトルのセットとして候補動きベクトルを導出する。 In the bilateral FRUC method, the inter-screen prediction unit 126 derives a candidate motion vector for bidirectional prediction. That is, the inter-screen prediction unit 126 derives candidate motion vectors as a set of two motion vectors.
 具体的には、バイラテラルFRUC方式において、処理済み領域の動きベクトルが、双方向予測の動きベクトルである場合、画面間予測部126は、双方向予測の動きベクトルをそのまま双方向予測の候補動きベクトルとして導出する。処理済み領域の動きベクトルが、片方向予測の動きベクトルである場合、画面間予測部126は、片方向予測の動きベクトルからスケーリング等によって双方向予測の動きベクトルを導出することにより、双方向予測の候補動きベクトルを導出してもよい。 Specifically, in the bilateral FRUC method, when the motion vector of the processed region is a bidirectional prediction motion vector, the inter prediction unit 126 directly uses the bidirectional prediction motion vector as a candidate motion for bidirectional prediction. Derived as a vector. When the motion vector of the processed region is a unidirectional prediction motion vector, the inter-frame prediction unit 126 derives a bidirectional prediction motion vector from the unidirectional prediction motion vector by scaling or the like, thereby performing bidirectional prediction. Candidate motion vectors may be derived.
 より具体的には、画面間予測部126は、バイラテラルFRUC方式において、第1参照ピクチャを参照する動きベクトルを表示時間間隔に従ってスケーリングすることにより、第2参照ピクチャを参照する動きベクトルを導出する。これにより、画面間予測部126は、片方向予測の動きベクトルと、スケーリングされた動きベクトルとの組を構成する候補動きベクトルを双方向予測の候補動きベクトルとして導出する。 More specifically, the inter-screen prediction unit 126 derives a motion vector that refers to the second reference picture by scaling the motion vector that refers to the first reference picture according to the display time interval in the bilateral FRUC method. . Thereby, the inter-screen prediction unit 126 derives a candidate motion vector constituting a set of a motion vector for unidirectional prediction and a scaled motion vector as a candidate motion vector for bidirectional prediction.
 あるいは、バイラテラルFRUC方式において、画面間予測部126は、処理済み領域の動きベクトルが双方向予測の動きベクトルである場合に、処理済み領域の動きベクトルを候補動きベクトルとして導出してもよい。そして、画面間予測部126は、処理済み領域の動きベクトルが片方向予測の動きベクトルである場合に、処理済み領域の動きベクトルを候補動きベクトルとして導出しなくてもよい。 Alternatively, in the bilateral FRUC method, the inter-frame prediction unit 126 may derive the motion vector of the processed area as a candidate motion vector when the motion vector of the processed area is a bidirectional motion vector. The inter-screen prediction unit 126 may not derive the motion vector of the processed region as a candidate motion vector when the motion vector of the processed region is a unidirectional motion vector.
 テンプレートFRUC方式では、処理済み領域の動きベクトルが、双方向予測の動きベクトルか片方向予測の動きベクトルかによらず、画面間予測部126は、処理済み領域の動きベクトルを候補動きベクトルとして導出する。 In the template FRUC method, regardless of whether the motion vector of the processed region is a bidirectional prediction motion vector or a unidirectional prediction motion vector, the inter-screen prediction unit 126 derives the processed region motion vector as a candidate motion vector. To do.
 そして、画面間予測部126は、候補動きベクトルで構成される候補動きベクトルリストを生成する(S201)。ここで、画面間予測部126は、処理対象領域がサブブロックである場合、すなわち、サブブロック単位の動きベクトルを導出する場合、ブロック単位の動きベクトルを候補動きベクトルとして候補動きベクトルリストに含めてもよい。その際、画面間予測部126は、ブロック単位の動きベクトルを最も優先される候補動きベクトルとして候補動きベクトルリストに含めてもよい。 Then, the inter-screen prediction unit 126 generates a candidate motion vector list composed of candidate motion vectors (S201). Here, when the processing target region is a sub-block, that is, when deriving a motion vector for each sub-block, the inter-screen prediction unit 126 includes the motion vector for each block as a candidate motion vector in the candidate motion vector list. Also good. At this time, the inter-screen prediction unit 126 may include the motion vector in units of blocks in the candidate motion vector list as the candidate motion vector having the highest priority.
 また、バイラテラルFRUC方式において、ブロック単位の動きベクトルが片方向予測の動きベクトルである場合、画面間予測部126は、片方向予測の動きベクトルからスケーリング等によって双方向予測の候補動きベクトルを導出してもよい。例えば、画面間予測部126は、周辺の動きベクトルが片方向予測の動きベクトルである場合と同様に、片方向予測の動きベクトルからスケーリング等によって双方向予測の候補動きベクトルを導出してもよい。 Also, in the bilateral FRUC method, when the motion vector in block units is a unidirectional prediction motion vector, the inter-frame prediction unit 126 derives a bidirectional motion candidate motion vector from the unidirectional prediction motion vector by scaling or the like. May be. For example, the inter-screen prediction unit 126 may derive a candidate motion vector for bidirectional prediction by scaling or the like from the motion vector for unidirectional prediction, as in the case where the surrounding motion vector is a motion vector for unidirectional prediction. .
 そして、画面間予測部126は、片方向予測の動きベクトルから双方向予測の候補動きベクトルとして導出された候補動きベクトルを候補動きベクトルリストに含めてもよい。 Then, the inter-screen prediction unit 126 may include the candidate motion vector derived as the candidate motion vector for bidirectional prediction from the motion vector for unidirectional prediction in the candidate motion vector list.
 あるいは、バイラテラルFRUC方式において、画面間予測部126は、ブロック単位の動きベクトルが双方向予測の動きベクトルである場合に、ブロック単位の動きベクトルを候補動きベクトルとして候補動きベクトルリストに含めてもよい。そして、画面間予測部126は、ブロック単位の動きベクトルが片方向予測の動きベクトルである場合に、ブロック単位の動きベクトルを候補動きベクトルとして候補動きベクトルリストに含めなくてもよい。 Alternatively, in the bilateral FRUC method, the inter-screen prediction unit 126 may include a motion vector in block units as a candidate motion vector in the candidate motion vector list when the motion vector in block units is a motion vector for bidirectional prediction. Good. The inter-screen prediction unit 126 may not include the block-based motion vector as a candidate motion vector in the candidate motion vector list when the block-based motion vector is a unidirectional prediction motion vector.
 そして、画面間予測部126は、候補動きベクトルリストに含まれる1つ以上の候補動きベクトルの中から、ベスト候補動きベクトルを選択する(S202)。その際、画面間予測部126は、1つ以上の候補動きベクトルのそれぞれについて、2つの評価対象領域の2つの再構成画像の適合度合いに従って、評価値を算出する。 Then, the inter-screen prediction unit 126 selects the best candidate motion vector from one or more candidate motion vectors included in the candidate motion vector list (S202). At this time, the inter-screen prediction unit 126 calculates an evaluation value for each of one or more candidate motion vectors according to the degree of matching between the two reconstructed images in the two evaluation target regions.
 具体的には、テンプレートFRUC方式において、2つの評価対象領域は、図19のような隣接領域及び対応隣接領域であり、バイラテラルFRUC方式において、2つの評価対象領域は、図20のような対応領域及び対称領域である。上述した通り、テンプレートFRUC方式に用いられる対応隣接領域、並びに、バイラテラルFRUC方式に用いられる対応領域及び対称領域は、候補動きベクトルに従って定められる。 Specifically, in the template FRUC method, the two evaluation target areas are an adjacent area and a corresponding adjacent area as shown in FIG. 19, and in the bilateral FRUC method, the two evaluation target areas are as shown in FIG. A region and a symmetric region. As described above, the corresponding adjacent region used in the template FRUC method, and the corresponding region and the symmetric region used in the bilateral FRUC method are determined according to the candidate motion vector.
 例えば、画面間予測部126は、2つの評価対象領域の2つの再構成画像の適合度合いが高いほど良い評価値を算出する。具体的には、画面間予測部126は、2つの評価対象領域の2つの再構成画像の差分値を導出する。そして、画面間予測部126は、差分値を用いて評価値を算出する。例えば、画面間予測部126は、差分値が小さいほど良い評価値を算出する。 For example, the inter-screen prediction unit 126 calculates a better evaluation value as the degree of matching between the two reconstructed images of the two evaluation target areas is higher. Specifically, the inter-screen prediction unit 126 derives a difference value between two reconstructed images of two evaluation target areas. Then, the inter-screen prediction unit 126 calculates an evaluation value using the difference value. For example, the inter-screen prediction unit 126 calculates a better evaluation value as the difference value is smaller.
 また、評価値の算出には、差分値のみではなく、その他の情報が用いられてもよい。つまり、画面間予測部126は、差分値、及び、その他の情報を用いて、評価値を算出してもよい。例えば、1つ以上の候補動きベクトルの優先順位、及び、優先順位に基づく符号量等が、評価値に影響を与えてもよい。 Further, not only the difference value but also other information may be used for calculating the evaluation value. That is, the inter-screen prediction unit 126 may calculate the evaluation value using the difference value and other information. For example, the priority order of one or more candidate motion vectors, the code amount based on the priority order, and the like may affect the evaluation value.
 そして、画面間予測部126は、1つ以上の候補動きベクトルの中から最も評価値が良い候補動きベクトルをベスト候補動きベクトルとして選択する。 Then, the inter-screen prediction unit 126 selects a candidate motion vector having the best evaluation value from among one or more candidate motion vectors as the best candidate motion vector.
 そして、画面間予測部126は、ベスト候補動きベクトルの周辺を探索することにより、処理対象領域の動きベクトルを導出する(S203)。 Then, the inter-screen prediction unit 126 derives a motion vector of the processing target region by searching around the best candidate motion vector (S203).
 すなわち、画面間予測部126は、ベスト候補動きベクトルによって指し示される領域の周辺の領域を指し示す動きベクトルに対して、同様に評価値を算出する。そして、画面間予測部126は、ベスト候補動きベクトルよりも評価値が良い動きベクトルが存在する場合、ベスト候補動きベクトルよりも評価値が良い動きベクトルでベスト候補動きベクトルを更新する。そして、画面間予測部126は、更新されたベスト候補動きベクトルを処理対象領域の最終的な動きベクトルとして導出する。 That is, the inter-screen prediction unit 126 similarly calculates an evaluation value for a motion vector indicating a region around the region indicated by the best candidate motion vector. Then, when there is a motion vector having an evaluation value better than the best candidate motion vector, the inter-screen prediction unit 126 updates the best candidate motion vector with a motion vector having an evaluation value better than the best candidate motion vector. Then, the inter-screen prediction unit 126 derives the updated best candidate motion vector as the final motion vector of the processing target region.
 なお、画面間予測部126は、ベスト候補動きベクトルの周辺を探索する処理(S203)を行わず、ベスト候補動きベクトルを処理対象領域の最終的な動きベクトルとして導出してもよい。また、ベスト候補動きベクトルは、評価値が最も良い候補動きベクトルに限られない。評価値が基準以上である1つ以上の候補動きベクトルのうちの1つが所定の優先順位に従ってベスト候補動きベクトルとして選択されてもよい。 Note that the inter-screen prediction unit 126 may derive the best candidate motion vector as the final motion vector of the processing target region without performing the process of searching around the best candidate motion vector (S203). The best candidate motion vector is not limited to the candidate motion vector having the best evaluation value. One of one or more candidate motion vectors having an evaluation value equal to or higher than a reference may be selected as the best candidate motion vector according to a predetermined priority.
 また、ここで、処理対象領域及び処理済み領域に関連する処理は、例えば、符号化又は復号の処理である。より具体的には、処理対象領域及び処理済み領域に関連する処理は、動きベクトルを導出する処理であってもよい。あるいは、処理対象領域及び処理済み領域に関連する処理は、再構成の処理であってもよい。 Also, here, the process related to the processing target area and the processed area is, for example, an encoding or decoding process. More specifically, the process related to the processing target area and the processed area may be a process for deriving a motion vector. Alternatively, the process related to the processing target area and the processed area may be a reconstruction process.
 [符号化装置の実装例]
 図22は、実施の形態1に係る符号化装置100の実装例を示すブロック図である。符号化装置100は、回路160及びメモリ162を備える。例えば、図1及び図11に示された符号化装置100の複数の構成要素は、図22に示された回路160及びメモリ162によって実装される。
[Example of encoding device implementation]
FIG. 22 is a block diagram illustrating an implementation example of the encoding apparatus 100 according to Embodiment 1. The encoding device 100 includes a circuit 160 and a memory 162. For example, a plurality of components of the encoding device 100 shown in FIGS. 1 and 11 are implemented by the circuit 160 and the memory 162 shown in FIG.
 回路160は、情報処理を行う回路であり、メモリ162にアクセス可能な回路である。例えば、回路160は、動画像を符号化する専用又は汎用の電子回路である。回路160は、CPUのようなプロセッサであってもよい。また、回路160は、複数の電子回路の集合体であってもよい。また、例えば、回路160は、図1等に示された符号化装置100の複数の構成要素のうち、情報を記憶するための構成要素を除く、複数の構成要素の役割を果たしてもよい。 The circuit 160 is a circuit that performs information processing and is a circuit that can access the memory 162. For example, the circuit 160 is a dedicated or general-purpose electronic circuit that encodes a moving image. The circuit 160 may be a processor such as a CPU. The circuit 160 may be an aggregate of a plurality of electronic circuits. Further, for example, the circuit 160 may serve as a plurality of constituent elements excluding a constituent element for storing information among a plurality of constituent elements of the encoding device 100 illustrated in FIG. 1 and the like.
 メモリ162は、回路160が動画像を符号化するための情報が記憶される専用又は汎用のメモリである。メモリ162は、電子回路であってもよく、回路160に接続されていてもよい。また、メモリ162は、回路160に含まれていてもよい。また、メモリ162は、複数の電子回路の集合体であってもよい。また、メモリ162は、磁気ディスク又は光ディスク等であってもよいし、ストレージ又は記録媒体等と表現されてもよい。また、メモリ162は、不揮発性メモリでもよいし、揮発性メモリでもよい。 The memory 162 is a dedicated or general-purpose memory in which information for the circuit 160 to encode a moving image is stored. The memory 162 may be an electronic circuit or may be connected to the circuit 160. In addition, the memory 162 may be included in the circuit 160. The memory 162 may be an aggregate of a plurality of electronic circuits. Further, the memory 162 may be a magnetic disk or an optical disk, or may be expressed as a storage or a recording medium. The memory 162 may be a non-volatile memory or a volatile memory.
 例えば、メモリ162には、符号化される動画像が記憶されてもよいし、符号化された動画像に対応するビット列が記憶されてもよい。また、メモリ162には、回路160が動画像を符号化するためのプログラムが記憶されていてもよい。 For example, in the memory 162, a moving image to be encoded may be stored, or a bit string corresponding to the encoded moving image may be stored. The memory 162 may store a program for the circuit 160 to encode a moving image.
 また、例えば、メモリ162は、図1等に示された符号化装置100の複数の構成要素のうち、情報を記憶するための構成要素の役割を果たしてもよい。具体的には、メモリ162は、図1に示されたブロックメモリ118及びフレームメモリ122の役割を果たしてもよい。より具体的には、メモリ162には、再構成済みブロック及び再構成済みピクチャ等が記憶されてもよい。 For example, the memory 162 may serve as a component for storing information among a plurality of components of the encoding device 100 illustrated in FIG. Specifically, the memory 162 may serve as the block memory 118 and the frame memory 122 shown in FIG. More specifically, the memory 162 may store a reconstructed block, a reconstructed picture, and the like.
 なお、符号化装置100において、図1等に示された複数の構成要素の全てが実装されなくてもよいし、上述された複数の処理の全てが行われなくてもよい。図1等に示された複数の構成要素の一部は、他の装置に含まれていてもよいし、上述された複数の処理の一部は、他の装置によって実行されてもよい。そして、符号化装置100において、図1等に示された複数の構成要素のうちの一部が実装され、上述された複数の処理の一部が行われることによって、動き補償が効率的に行われる。 Note that in the encoding device 100, not all of the plurality of components shown in FIG. 1 or the like may be mounted, or all of the plurality of processes described above may not be performed. Some of the plurality of components shown in FIG. 1 and the like may be included in another device, and some of the plurality of processes described above may be executed by another device. In the encoding device 100, some of the plurality of components shown in FIG. 1 and the like are mounted, and a part of the plurality of processes described above is performed, so that motion compensation is efficiently performed. Is called.
 以下に、図22に示された符号化装置100の複数の動作例を示す。以下の複数の動作例において、テンプレートFRUC方式は、ブロック又はサブブロックである処理対象領域の動きベクトルを、処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式である。また、バイラテラルFRUC方式は、処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Hereinafter, a plurality of operation examples of the encoding apparatus 100 shown in FIG. 22 will be shown. In a plurality of operation examples below, the template FRUC method uses a motion vector of a processing target region that is a block or a sub-block as a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture. This is a method of deriving according to the degree of matching. In addition, the bilateral FRUC method is a method for deriving the motion vector of the processing target region according to the degree of matching between the two reconstructed images of the two regions in two different reference pictures.
 また、通常画面間予測方式は、処理対象領域の動きベクトルを導出し、処理対象領域の動きベクトルの情報を符号化する方式である。つまり、回路160は、通常画面間予測方式で処理対象領域の動きベクトルを導出する場合、処理対象領域の動きベクトルの情報を符号化する。 In addition, the normal inter-screen prediction method is a method for deriving a motion vector of a processing target region and encoding information on the motion vector of the processing target region. That is, when the circuit 160 derives the motion vector of the processing target area using the normal inter-screen prediction method, the circuit 160 encodes the information on the motion vector of the processing target area.
 図23は、図22に示された符号化装置100の第1動作例を示すフローチャートである。例えば、図22に示された符号化装置100は、動き補償を行って動画像を符号化する際、図23に示された動作を行う。 FIG. 23 is a flowchart showing a first operation example of the encoding apparatus 100 shown in FIG. For example, the encoding apparatus 100 illustrated in FIG. 22 performs the operation illustrated in FIG. 23 when performing motion compensation and encoding a moving image.
 具体的には、符号化装置100の回路160は、動画像における画像のブロックの動きベクトルを導出する(S311)。そして、回路160は、ブロックの単位、又は、ブロックを構成するサブブロックの単位で、動き補償を行う(S312)。 Specifically, the circuit 160 of the encoding device 100 derives a motion vector of an image block in a moving image (S311). Then, the circuit 160 performs motion compensation in units of blocks or sub-blocks constituting the blocks (S312).
 例えば、回路160は、テンプレートFRUC方式でブロックの動きベクトルを導出してサブブロックの単位で動き補償を行う場合において、バイラテラルFRUC方式でサブブロックの動きベクトルを導出する。そして、回路160は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行う。 For example, the circuit 160 derives the motion vector of the sub block by the bilateral FRUC method when the motion vector of the block is derived by the template FRUC method and the motion compensation is performed in units of the sub block. Then, the circuit 160 performs motion compensation in units of sub-blocks using the sub-block motion vectors.
 これにより、符号化装置100は、ブロックの動きベクトルがテンプレートFRUC方式で導出された場合でも、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、符号化装置100は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。そして、符号化装置100は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thereby, the encoding apparatus 100 can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, encoding apparatus 100 can appropriately derive a motion vector of a sub block even when a reconstructed image of a region adjacent to the sub block is not generated. Then, the encoding apparatus 100 can efficiently perform motion compensation using a motion vector that is appropriately derived.
 また、例えば、回路160は、テンプレートFRUC方式でブロックの動きベクトルを導出して動き補償を行う場合において、ブロックの動きベクトルが片方向予測の動きベクトルである場合、ブロックの単位で動き補償を行ってもよい。この場合、回路160は、ブロックの動きベクトルを用いてブロックの単位で動き補償を行ってもよい。 Further, for example, in the case where the motion compensation is performed by deriving the motion vector of the block by the template FRUC method, the circuit 160 performs the motion compensation in units of the block when the motion vector of the block is a unidirectional prediction motion vector. May be. In this case, the circuit 160 may perform motion compensation in units of blocks using the motion vectors of the blocks.
 そして、回路160は、テンプレートFRUC方式でブロックの動きベクトルを導出して動き補償を行う場合において、ブロックの動きベクトルが双方向予測の動きベクトルである場合、サブブロックの単位で動き補償を行ってもよい。この場合、回路160は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行ってもよい。 The circuit 160 performs motion compensation in units of sub-blocks when the motion vector of the block is a bidirectional motion vector when the motion vector of the block is derived by the template FRUC method and motion compensation is performed. Also good. In this case, the circuit 160 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
 これにより、符号化装置100は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適している場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 Accordingly, the encoding apparatus 100 can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. it can. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、符号化装置100は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適していない場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when the motion vector derived as the block motion vector in the template FRUC method is not suitable for the bilateral FRUC method, the encoding apparatus 100 efficiently uses the block motion vector as it is and performs motion compensation in units of blocks. It can be performed.
 また、例えば、回路160は、バイラテラルFRUC方式でブロックの動きベクトルを導出してサブブロックの単位で動き補償を行う場合において、バイラテラルFRUC方式でサブブロックの動きベクトルを導出してもよい。そして、回路160は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行ってもよい。 Further, for example, when the block 160 derives a block motion vector by the bilateral FRUC method and performs motion compensation in units of subblocks, the circuit 160 may derive the subblock motion vector by the bilateral FRUC method. The circuit 160 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
 これにより、符号化装置100は、テンプレートFRUC方式でブロックの動きベクトルが導出されても、バイラテラルFRUC方式でブロックの動きベクトルが導出されても、バイラテラルFRUC方式でサブブロックの動きベクトルを導出することができる。したがって、符号化装置100は、この2つの場合において、同じように、サブブロックの動きベクトルを導出することができる。 Accordingly, the encoding apparatus 100 derives a sub-block motion vector using the bilateral FRUC method, regardless of whether a block motion vector is derived using the template FRUC method or a block motion vector using the bilateral FRUC method. can do. Therefore, encoding apparatus 100 can derive the motion vector of the sub-block in the same way in these two cases.
 また、例えば、回路160は、サブブロックの動きベクトルを導出する場合、ブロックの動きベクトルを用いてサブブロックの動きベクトルの候補を導出し、導出された候補を用いてサブブロックの動きベクトルを導出してもよい。これにより、符号化装置100は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、符号化装置100は、予測精度を向上させることができる。 Further, for example, when deriving a sub-block motion vector, the circuit 160 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the encoding apparatus 100 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding apparatus 100 can improve prediction accuracy.
 図24は、図22に示された符号化装置100の第2動作例を示すフローチャートである。例えば、図22に示された符号化装置100は、動き補償を行って動画像を符号化する際、図24に示された動作を行う。 FIG. 24 is a flowchart showing a second operation example of the encoding apparatus 100 shown in FIG. For example, the encoding apparatus 100 illustrated in FIG. 22 performs the operation illustrated in FIG. 24 when performing motion compensation and encoding a moving image.
 具体的には、符号化装置100の回路160は、動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を符号化する(S321)。そして、回路160は、ブロックを構成するサブブロックの単位で動き補償を行うことが有効であるか無効であるかを示す第2制御情報を符号化する(S322)。 Specifically, the circuit 160 of the encoding device 100 encodes first control information indicating one method for deriving a motion vector of an image block in a moving image (S321). Then, the circuit 160 encodes second control information indicating whether it is effective or ineffective to perform motion compensation in units of sub-blocks constituting the block (S322).
 そして、回路160は、1つの方式でブロックの動きベクトルを導出する(S323)。そして、回路160は、サブブロックの単位で動き補償を行うことが有効であるか無効であるかに従って、サブブロックの単位で動き補償を行うかブロックの単位で動き補償を行うかを判定する(S324)。 Then, the circuit 160 derives the motion vector of the block by one method (S323). Then, the circuit 160 determines whether to perform motion compensation in units of subblocks or motion compensation in units of blocks according to whether motion compensation in units of subblocks is valid or invalid ( S324).
 ここで、サブブロックの単位で動き補償を行うと判定された場合(S324でYes)、回路160は、サブブロックの動きベクトルを導出する(S325)。そして、回路160は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行う(S326)。一方、ブロックの単位で動き補償を行うと判定された場合(S324でNo)、回路160は、ブロックの動きベクトルを用いてブロックの単位で動き補償を行う(S327)。 Here, when it is determined that motion compensation is performed in units of sub-blocks (Yes in S324), the circuit 160 derives a motion vector of the sub-blocks (S325). Then, the circuit 160 performs motion compensation in units of sub-blocks using the sub-block motion vectors (S326). On the other hand, when it is determined that motion compensation is performed in units of blocks (No in S324), the circuit 160 performs motion compensation in units of blocks using the motion vectors of the blocks (S327).
 これにより、符号化装置100は、ブロックの動きベクトルを導出する方式とは別に、サブブロックの単位で動き補償を行うことを有効化又は無効化することができる。したがって、符号化装置100は、動き補償が非効率的に行われることを適切に抑制することができる。すなわち、符号化装置100は、動き補償を効率的に行うことができる。 Thereby, the encoding apparatus 100 can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the block motion vector. Therefore, the encoding apparatus 100 can appropriately suppress that the motion compensation is performed inefficiently. That is, the encoding apparatus 100 can efficiently perform motion compensation.
 例えば、回路160は、通常画面間予測方式とテンプレートFRUC方式とバイラテラルFRUC方式とを含む複数の方式からブロックの動きベクトルを導出する1つの方式を選択してもよい。これにより、符号化装置100は、ブロックの動きベクトルを導出する1つの方式を複数の方式から適応的に選択することができる。 For example, the circuit 160 may select one method for deriving a block motion vector from a plurality of methods including a normal inter-screen prediction method, a template FRUC method, and a bilateral FRUC method. Thereby, the encoding apparatus 100 can adaptively select one method for deriving a motion vector of a block from a plurality of methods.
 また、例えば、回路160は、ブロックの動きベクトルを導出する1つの方式がテンプレートFRUC方式又はバイラテラルFRUC方式である場合において、サブブロックの単位で動き補償を行うと判定された場合にサブブロックの単位で動き補償を行ってもよい。そして、回路160は、ブロックの動きベクトルを導出する1つの方式がテンプレートFRUC方式又はバイラテラルFRUC方式である場合において、ブロックの単位で動き補償を行うと判定された場合にブロックの単位で動き補償を行ってもよい。 In addition, for example, when one scheme for deriving a motion vector of a block is the template FRUC scheme or the bilateral FRUC scheme, the circuit 160 determines that the motion compensation is performed in units of subblocks. Motion compensation may be performed in units. Then, when one scheme for deriving the motion vector of the block is the template FRUC scheme or the bilateral FRUC scheme, the circuit 160 performs motion compensation in block units when it is determined to perform motion compensation in block units. May be performed.
 これにより、符号化装置100は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。よって、符号化装置100は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 As a result, when the motion vector of the block is derived by the FRUC method, the encoding apparatus 100 can perform the motion compensation in an appropriate unit according to the determination result of whether to perform the motion compensation in the subblock unit. it can. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, the encoding apparatus 100 performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in units of sub-blocks when a block motion vector is derived by the FRUC method. Can do.
 また、例えば、回路160は、ブロックの動きベクトルを導出する1つの方式が通常画面間予測方式である場合において、サブブロックの単位で動き補償を行うと判定された場合にサブブロックの単位で動き補償を行ってもよい。そして、回路160は、ブロックの動きベクトルを導出する1つの方式が通常画面間予測方式である場合において、ブロックの単位で動き補償を行うと判定された場合にブロックの単位で動き補償を行ってもよい。 In addition, for example, the circuit 160 performs motion in units of subblocks when it is determined that motion compensation is performed in units of subblocks when one method for deriving a motion vector of a block is a normal inter-screen prediction method. Compensation may be performed. The circuit 160 performs motion compensation in units of blocks when it is determined that motion compensation is performed in units of blocks when one method for deriving a motion vector of a block is a normal inter-screen prediction method. Also good.
 これにより、符号化装置100は、FRUC方式とは異なる通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。 Thereby, when the motion vector of a block is derived by a normal inter-screen prediction method different from the FRUC method, the encoding apparatus 100 can appropriately perform the determination according to the determination result of whether or not to perform motion compensation in units of subblocks. Motion compensation can be performed in units. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
 よって、符号化装置100は、通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Therefore, the encoding apparatus 100 performs motion compensation in appropriate units according to whether or not it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the normal inter-frame prediction method. It can be performed.
 また、例えば、回路160は、サブブロックの動きベクトルを導出する場合、バイラテラルFRUC方式でサブブロックの動きベクトルを導出してもよい。これにより、符号化装置100は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。したがって、符号化装置100は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Also, for example, when the sub-block motion vector is derived, the circuit 160 may derive the sub-block motion vector using the bilateral FRUC method. Thereby, the encoding apparatus 100 can appropriately derive the motion vector of the sub-block even when the reconstructed image of the region adjacent to the sub-block is not generated. Therefore, the encoding apparatus 100 can efficiently perform motion compensation using an appropriately derived motion vector.
 また、例えば、回路160は、ブロックの動きベクトルが双方向予測の動きベクトルであり、サブブロックの単位で動き補償を行うことが有効である場合、サブブロックの単位で動き補償を行うと判定してもよい。そして、回路160は、ブロックの動きベクトルが双方向予測の動きベクトルであり、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの単位で動き補償を行うと判定してもよい。 For example, the circuit 160 determines that the motion compensation is performed in units of sub-blocks when the motion vector of the block is a motion vector for bidirectional prediction and it is effective to perform motion compensation in units of sub-blocks. May be. The circuit 160 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a motion vector for bidirectional prediction and it is invalid to perform motion compensation in units of sub-blocks. .
 そして、回路160は、ブロックの動きベクトルが片方向予測の動きベクトルである場合、ブロックの単位で動き補償を行うと判定してもよい。 The circuit 160 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a unidirectional motion vector.
 これにより、符号化装置100は、ブロックの動きベクトルがバイラテラルFRUC方式に適しており、かつ、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 As a result, the encoding apparatus 100 converts the sub-block motion vector into the bilateral when the block motion vector is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. It can be derived by the FRUC method. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、符号化装置100は、ブロックの動きベクトルがバイラテラルFRUC方式に適していない、又は、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when the motion vector of a block is not suitable for the bilateral FRUC method or when it is invalid to perform motion compensation in units of sub-blocks, the encoding apparatus 100 can efficiently use the motion vector of the block as it is. In addition, motion compensation can be performed in units of blocks.
 また、例えば、回路160は、サブブロックの単位で動き補償を行うことが有効である場合、サブブロックの単位で動き補償を行うと判定し、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの単位で動き補償を行うと判定してもよい。 Further, for example, when it is effective to perform motion compensation in units of subblocks, the circuit 160 determines that motion compensation is performed in units of subblocks, and it is invalid to perform motion compensation in units of subblocks. In some cases, it may be determined that motion compensation is performed in units of blocks.
 これにより、符号化装置100は、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの単位で動き補償を行うことができる。そして、符号化装置100は、サブブロックの単位で動き補償を行うことが無効である場合に、ブロックの単位で動き補償を行うことができる。したがって、符号化装置100は、動き補償が行われる単位をシンプルに制御することができる。 Thereby, the encoding apparatus 100 can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks. Then, when it is invalid to perform motion compensation in units of subblocks, the encoding apparatus 100 can perform motion compensation in units of blocks. Therefore, the encoding apparatus 100 can simply control a unit in which motion compensation is performed.
 また、例えば、回路160は、サブブロックの動きベクトルを導出する場合、ブロックの動きベクトルを用いてサブブロックの動きベクトルの候補を導出し、導出された候補を用いてサブブロックの動きベクトルを導出してもよい。これにより、符号化装置100は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、符号化装置100は、予測精度を向上させることができる。 Further, for example, when deriving a sub-block motion vector, the circuit 160 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the encoding apparatus 100 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the encoding apparatus 100 can improve prediction accuracy.
 また、例えば、回路160は、ブロックのヘッダ層、ブロックを含むスライスのヘッダ層、ブロックを含むピクチャのヘッダ層、又は、ブロックを含むストリームのヘッダ層へ第1制御情報を符号化してもよい。そして、回路160は、ブロックのヘッダ層、スライスのヘッダ層、ピクチャのヘッダ層、又は、ストリームのヘッダ層へ第2制御情報を符号化してもよい。 Also, for example, the circuit 160 may encode the first control information into the header layer of the block, the header layer of the slice including the block, the header layer of the picture including the block, or the header layer of the stream including the block. The circuit 160 may encode the second control information into the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
 これにより、符号化装置100は、ブロックの動きベクトルを導出する方式、及び、サブブロックの単位で動き補償を行うことが有効であるか否かを適切な範囲で指定することができる。 Thereby, the encoding apparatus 100 can designate a scheme for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
 また、例えば、第1制御情報は、上述したようなFRUC制御情報であり、第2制御情報は、上述したようなサブブロック処理制御情報である。 Also, for example, the first control information is FRUC control information as described above, and the second control information is subblock processing control information as described above.
 また、上記の例において、回路160は、第1制御情報及び第2制御情報の両方を符号化している。しかし、回路160は、第1制御情報及び第2制御情報のうち、第1制御情報のみを符号化し、第2制御情報を符号化しなくてもよい。特に、回路160は、例えば、サブブロックの単位で動き補償を行うことが有効であるか無効であるかにかかわらず、ブロック単位で動き補償を行うことが決定される場合、第2制御情報を符号化しなくてもよい。 In the above example, the circuit 160 encodes both the first control information and the second control information. However, the circuit 160 may encode only the first control information out of the first control information and the second control information, and may not encode the second control information. In particular, for example, when it is determined that the motion compensation is performed in units of blocks regardless of whether the motion compensation is performed in units of sub-blocks, the circuit 160 determines the second control information. It may not be encoded.
 より具体的には、例えば図15及び図16で示されたように、通常画面間予測方式でブロックの動きベクトルが導出された場合において、ブロック単位で動き補償を行うことが画一的に決定される場合に第2制御情報を符号化しなくてもよい。また、例えば図16で示されたように、ブロックの動きベクトルが片方向予測の動きベクトルである場合において、ブロック単位で動き補償を行うことが画一的に決定される場合に第2制御情報を符号化しなくてもよい。 More specifically, for example, as shown in FIGS. 15 and 16, when the motion vector of a block is derived by the normal inter-screen prediction method, it is uniformly decided to perform motion compensation in units of blocks. In this case, the second control information may not be encoded. Also, for example, as shown in FIG. 16, when the motion vector of a block is a unidirectional prediction motion vector, the second control information is determined when it is uniformly determined to perform motion compensation in units of blocks. May not be encoded.
 また、回路160は、例えば図13及び図14で示されたように、第2制御情報を用いない場合、第2制御情報を符号化しなくてもよい。また、ブロックの動きベクトルを導出する方式が予め定められている場合、回路160は、第1制御情報を符号化しなくてもよい。 Further, as illustrated in FIGS. 13 and 14, for example, the circuit 160 may not encode the second control information when the second control information is not used. In addition, when a method for deriving a motion vector of a block is determined in advance, the circuit 160 may not encode the first control information.
 [復号装置の実装例]
 図25は、実施の形態1に係る復号装置200の実装例を示すブロック図である。復号装置200は、回路260及びメモリ262を備える。例えば、図10及び図12に示された復号装置200の複数の構成要素は、図25に示された回路260及びメモリ262によって実装される。
[Decoding device implementation example]
FIG. 25 is a block diagram illustrating an implementation example of the decoding device 200 according to the first embodiment. The decoding device 200 includes a circuit 260 and a memory 262. For example, a plurality of components of the decoding device 200 shown in FIGS. 10 and 12 are implemented by the circuit 260 and the memory 262 shown in FIG.
 回路260は、情報処理を行う回路であり、メモリ262にアクセス可能な回路である。例えば、回路260は、動画像を復号する専用又は汎用の電子回路である。回路260は、CPUのようなプロセッサであってもよい。また、回路260は、複数の電子回路の集合体であってもよい。また、例えば、回路260は、図10等に示された復号装置200の複数の構成要素のうち、情報を記憶するための構成要素を除く、複数の構成要素の役割を果たしてもよい。 The circuit 260 is a circuit that performs information processing and is a circuit that can access the memory 262. For example, the circuit 260 is a dedicated or general-purpose electronic circuit that decodes a moving image. The circuit 260 may be a processor such as a CPU. The circuit 260 may be an aggregate of a plurality of electronic circuits. Further, for example, the circuit 260 may serve as a plurality of constituent elements excluding the constituent elements for storing information among the plurality of constituent elements of the decoding device 200 illustrated in FIG. 10 and the like.
 メモリ262は、回路260が動画像を復号するための情報が記憶される専用又は汎用のメモリである。メモリ262は、電子回路であってもよく、回路260に接続されていてもよい。また、メモリ262は、回路260に含まれていてもよい。また、メモリ262は、複数の電子回路の集合体であってもよい。また、メモリ262は、磁気ディスク又は光ディスク等であってもよいし、ストレージ又は記録媒体等と表現されてもよい。また、メモリ262は、不揮発性メモリでもよいし、揮発性メモリでもよい。 The memory 262 is a dedicated or general-purpose memory in which information for the circuit 260 to decode a moving image is stored. The memory 262 may be an electronic circuit or may be connected to the circuit 260. Further, the memory 262 may be included in the circuit 260. The memory 262 may be an aggregate of a plurality of electronic circuits. The memory 262 may be a magnetic disk or an optical disk, or may be expressed as a storage or a recording medium. Further, the memory 262 may be a nonvolatile memory or a volatile memory.
 例えば、メモリ262には、符号化された動画像に対応するビット列が記憶されてもよいし、復号されたビット列に対応する動画像が記憶されてもよい。また、メモリ262には、回路260が動画像を復号するためのプログラムが記憶されていてもよい。 For example, the memory 262 may store a bit sequence corresponding to the encoded moving image, or may store a moving image corresponding to the decoded bit sequence. The memory 262 may store a program for the circuit 260 to decode a moving image.
 また、例えば、メモリ262は、図10等に示された復号装置200の複数の構成要素のうち、情報を記憶するための構成要素の役割を果たしてもよい。具体的には、メモリ262は、図10に示されたブロックメモリ210及びフレームメモリ214の役割を果たしてもよい。より具体的には、メモリ262には、再構成済みブロック及び再構成済みピクチャ等が記憶されてもよい。 For example, the memory 262 may serve as a component for storing information among a plurality of components of the decoding device 200 illustrated in FIG. 10 and the like. Specifically, the memory 262 may serve as the block memory 210 and the frame memory 214 shown in FIG. More specifically, the memory 262 may store a reconstructed block, a reconstructed picture, and the like.
 なお、復号装置200において、図10等に示された複数の構成要素の全てが実装されなくてもよいし、上述された複数の処理の全てが行われなくてもよい。図10等に示された複数の構成要素の一部は、他の装置に含まれていてもよいし、上述された複数の処理の一部は、他の装置によって実行されてもよい。そして、復号装置200において、図10等に示された複数の構成要素のうちの一部が実装され、上述された複数の処理の一部が行われることによって、動き補償が効率的に行われる。 Note that in the decoding device 200, not all of the plurality of components shown in FIG. 10 and the like may be implemented, or all of the plurality of processes described above may not be performed. Some of the plurality of components shown in FIG. 10 and the like may be included in another device, and some of the plurality of processes described above may be executed by another device. Then, in the decoding device 200, some of the plurality of components shown in FIG. 10 and the like are mounted, and motion compensation is efficiently performed by performing some of the plurality of processes described above. .
 以下に、図25に示された復号装置200の複数の動作例を示す。以下の複数の動作例において、テンプレートFRUC方式は、ブロック又はサブブロックである処理対象領域の動きベクトルを、処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式である。また、バイラテラルFRUC方式は、処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である。 Hereinafter, a plurality of operation examples of the decoding device 200 shown in FIG. 25 will be shown. In a plurality of operation examples below, the template FRUC method uses a motion vector of a processing target region that is a block or a sub-block as a reconstructed image of a region adjacent to the processing target region and a reconstructed image of a region in a reference picture. This is a method of deriving according to the degree of matching. In addition, the bilateral FRUC method is a method for deriving the motion vector of the processing target region according to the degree of matching between the two reconstructed images of the two regions in two different reference pictures.
 また、通常画面間予測方式は、処理対象領域の動きベクトルの情報を復号し、処理対象領域の動きベクトルを導出する方式である。つまり、回路260は、通常画面間予測方式で処理対象領域の動きベクトルを導出する場合、処理対象領域の動きベクトルの情報を復号する。 In addition, the normal inter-screen prediction method is a method of decoding the motion vector information of the processing target area and deriving the motion vector of the processing target area. That is, when the circuit 260 derives the motion vector of the processing target region using the normal inter-screen prediction method, the circuit 260 decodes the information on the motion vector of the processing target region.
 図26は、図25に示された復号装置200の第1動作例を示すフローチャートである。例えば、図25に示された復号装置200は、動き補償を行って動画像を復号する際、図26に示された動作を行う。 FIG. 26 is a flowchart showing a first operation example of the decoding device 200 shown in FIG. For example, the decoding device 200 illustrated in FIG. 25 performs the operation illustrated in FIG. 26 when performing motion compensation and decoding a moving image.
 具体的には、復号装置200の回路260は、動画像における画像のブロックの動きベクトルを導出する(S411)。そして、回路260は、ブロックの単位、又は、ブロックを構成するサブブロックの単位で、動き補償を行う(S412)。 Specifically, the circuit 260 of the decoding device 200 derives a motion vector of an image block in a moving image (S411). Then, the circuit 260 performs motion compensation in units of blocks or sub-blocks constituting the blocks (S412).
 例えば、回路260は、テンプレートFRUC方式でブロックの動きベクトルを導出してサブブロックの単位で動き補償を行う場合において、バイラテラルFRUC方式でサブブロックの動きベクトルを導出する。そして、回路260は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行う。 For example, the circuit 260 derives the motion vector of the sub block by the bilateral FRUC method when the motion vector of the block is derived by the template FRUC method and the motion compensation is performed in units of the sub block. Then, the circuit 260 performs motion compensation in units of sub-blocks using the sub-block motion vectors.
 これにより、復号装置200は、ブロックの動きベクトルがテンプレートFRUC方式で導出された場合でも、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、復号装置200は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。そして、復号装置200は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Thereby, the decoding apparatus 200 can derive the sub-block motion vector by the bilateral FRUC method even when the block motion vector is derived by the template FRUC method. Therefore, the decoding apparatus 200 can appropriately derive the motion vector of the sub block even when the reconstructed image of the region adjacent to the sub block is not generated. Then, the decoding apparatus 200 can efficiently perform motion compensation using the appropriately derived motion vector.
 また、例えば、回路260は、テンプレートFRUC方式でブロックの動きベクトルを導出して動き補償を行う場合において、ブロックの動きベクトルが片方向予測の動きベクトルである場合、ブロックの単位で動き補償を行ってもよい。この場合、回路260は、ブロックの動きベクトルを用いてブロックの単位で動き補償を行ってもよい。 Also, for example, when the block 260 derives a motion vector of a block by the template FRUC method and performs motion compensation, if the motion vector of the block is a unidirectional motion vector, the circuit 260 performs motion compensation in units of blocks. May be. In this case, the circuit 260 may perform motion compensation in units of blocks using the motion vectors of the blocks.
 そして、回路260は、テンプレートFRUC方式でブロックの動きベクトルを導出して動き補償を行う場合において、ブロックの動きベクトルが双方向予測の動きベクトルである場合、サブブロックの単位で動き補償を行ってもよい。この場合、回路260は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行ってもよい。 The circuit 260 performs motion compensation in units of sub-blocks when the motion vector of the block is a bidirectional motion vector when the motion vector of the block is derived by the template FRUC method and motion compensation is performed. Also good. In this case, the circuit 260 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
 これにより、復号装置200は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適している場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 Accordingly, the decoding apparatus 200 can derive the sub-block motion vector by the bilateral FRUC method when the motion vector derived as the block motion vector by the template FRUC method is suitable for the bilateral FRUC method. . Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、復号装置200は、テンプレートFRUC方式でブロックの動きベクトルとして導出された動きベクトルがバイラテラルFRUC方式に適していない場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when a motion vector derived as a block motion vector in the template FRUC method is not suitable for the bilateral FRUC method, the decoding apparatus 200 efficiently performs motion compensation in units of blocks using the block motion vector as it is. It can be carried out.
 また、例えば、回路260は、バイラテラルFRUC方式でブロックの動きベクトルを導出してサブブロックの単位で動き補償を行う場合において、バイラテラルFRUC方式でサブブロックの動きベクトルを導出してもよい。そして、回路260は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行ってもよい。 Further, for example, when the block 260 derives a block motion vector by the bilateral FRUC method and performs motion compensation in units of subblocks, the circuit 260 may derive the subblock motion vector by the bilateral FRUC method. The circuit 260 may perform motion compensation in units of sub-blocks using the sub-block motion vectors.
 これにより、復号装置200は、テンプレートFRUC方式でブロックの動きベクトルが導出されても、バイラテラルFRUC方式でブロックの動きベクトルが導出されても、バイラテラルFRUC方式でサブブロックの動きベクトルを導出することができる。したがって、復号装置200は、この2つの場合において、同じように、サブブロックの動きベクトルを導出することができる。 Accordingly, the decoding apparatus 200 derives a sub-block motion vector using the bilateral FRUC method, regardless of whether a block motion vector is derived using the template FRUC method or a block motion vector using the bilateral FRUC method. be able to. Therefore, the decoding apparatus 200 can derive the motion vector of the sub-block in the same way in these two cases.
 また、例えば、回路260は、サブブロックの動きベクトルを導出する場合、ブロックの動きベクトルを用いてサブブロックの動きベクトルの候補を導出し、導出された候補を用いてサブブロックの動きベクトルを導出してもよい。これにより、復号装置200は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、復号装置200は、予測精度を向上させることができる。 Further, for example, when deriving a sub-block motion vector, the circuit 260 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the decoding apparatus 200 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus 200 can improve prediction accuracy.
 図27は、図25に示された復号装置200の第2動作例を示すフローチャートである。例えば、図25に示された復号装置200は、動き補償を行って動画像を復号する際、図27に示された動作を行う。 FIG. 27 is a flowchart showing a second operation example of the decoding device 200 shown in FIG. For example, the decoding device 200 illustrated in FIG. 25 performs the operation illustrated in FIG. 27 when performing motion compensation and decoding a moving image.
 具体的には、復号装置200の回路260は、動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を復号する(S421)。そして、回路260は、ブロックを構成するサブブロックの単位で動き補償を行うことが有効であるか無効であるかを示す第2制御情報を復号する(S422)。 Specifically, the circuit 260 of the decoding device 200 decodes first control information indicating one method for deriving a motion vector of an image block in a moving image (S421). Then, the circuit 260 decodes the second control information indicating whether it is valid or invalid to perform motion compensation in units of sub-blocks constituting the block (S422).
 そして、回路260は、1つの方式でブロックの動きベクトルを導出する(S423)。そして、回路260は、サブブロックの単位で動き補償を行うことが有効であるか無効であるかに従って、サブブロックの単位で動き補償を行うかブロックの単位で動き補償を行うかを判定する(S424)。 Then, the circuit 260 derives the motion vector of the block by one method (S423). Then, the circuit 260 determines whether to perform motion compensation in units of sub-blocks or motion compensation in units of blocks according to whether motion compensation in units of sub-blocks is valid or invalid ( S424).
 ここで、サブブロックの単位で動き補償を行うと判定された場合(S424でYes)、回路260は、サブブロックの動きベクトルを導出する(S425)。そして、回路260は、サブブロックの動きベクトルを用いてサブブロックの単位で動き補償を行う(S426)。一方、ブロックの単位で動き補償を行うと判定された場合(S424でNo)、回路260は、ブロックの動きベクトルを用いてブロックの単位で動き補償を行う(S427)。 Here, when it is determined that motion compensation is performed in units of sub-blocks (Yes in S424), the circuit 260 derives a motion vector of the sub-blocks (S425). Then, the circuit 260 performs motion compensation in units of sub-blocks using the sub-block motion vectors (S426). On the other hand, when it is determined that motion compensation is to be performed in units of blocks (No in S424), the circuit 260 performs motion compensation in units of blocks using the motion vectors of the blocks (S427).
 これにより、復号装置200は、ブロックの動きベクトルを導出する方式とは別に、サブブロックの単位で動き補償を行うことを有効化又は無効化することができる。したがって、復号装置200は、動き補償が非効率的に行われることを適切に抑制することができる。すなわち、復号装置200は、動き補償を効率的に行うことができる。 Thereby, the decoding apparatus 200 can enable or disable the motion compensation in units of sub-blocks separately from the method of deriving the block motion vector. Therefore, the decoding apparatus 200 can appropriately suppress that the motion compensation is performed inefficiently. That is, the decoding device 200 can efficiently perform motion compensation.
 例えば、回路260は、通常画面間予測方式とテンプレートFRUC方式とバイラテラルFRUC方式とを含む複数の方式からブロックの動きベクトルを導出する1つの方式を選択してもよい。これにより、復号装置200は、ブロックの動きベクトルを導出する1つの方式を複数の方式から適応的に選択することができる。 For example, the circuit 260 may select one method for deriving a block motion vector from a plurality of methods including a normal inter-screen prediction method, a template FRUC method, and a bilateral FRUC method. Thereby, the decoding apparatus 200 can adaptively select one method for deriving a motion vector of a block from a plurality of methods.
 また、例えば、回路260は、ブロックの動きベクトルを導出する1つの方式がテンプレートFRUC方式又はバイラテラルFRUC方式である場合において、サブブロックの単位で動き補償を行うと判定された場合にサブブロックの単位で動き補償を行ってもよい。そして、回路260は、ブロックの動きベクトルを導出する1つの方式がテンプレートFRUC方式又はバイラテラルFRUC方式である場合において、ブロックの単位で動き補償を行うと判定された場合にブロックの単位で動き補償を行ってもよい。 In addition, for example, when one method for deriving a motion vector of a block is the template FRUC method or the bilateral FRUC method, the circuit 260 determines that the motion compensation is performed in units of subblocks. Motion compensation may be performed in units. Then, when one method for deriving the motion vector of the block is the template FRUC method or the bilateral FRUC method, the circuit 260 performs motion compensation in block units when it is determined to perform motion compensation in block units. May be performed.
 これにより、復号装置200は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。よって、復号装置200は、FRUC方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Thereby, when the motion vector of a block is derived by the FRUC method, the decoding apparatus 200 can perform motion compensation in an appropriate unit according to a determination result of whether or not motion compensation is performed in units of subblocks. . The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks. Therefore, when the motion vector of a block is derived by the FRUC method, the decoding apparatus 200 can perform motion compensation in an appropriate unit according to whether or not it is effective to perform motion compensation in a sub-block unit. it can.
 また、例えば、回路260は、ブロックの動きベクトルを導出する1つの方式が通常画面間予測方式である場合において、サブブロックの単位で動き補償を行うと判定された場合にサブブロックの単位で動き補償を行ってもよい。そして、回路260は、ブロックの動きベクトルを導出する1つの方式が通常画面間予測方式である場合において、ブロックの単位で動き補償を行うと判定された場合にブロックの単位で動き補償を行ってもよい。 Further, for example, when one method for deriving a motion vector of a block is a normal inter-screen prediction method, the circuit 260 performs motion in units of subblocks when it is determined that motion compensation is performed in units of subblocks. Compensation may be performed. The circuit 260 performs motion compensation in units of blocks when it is determined that motion compensation is performed in units of blocks when one method for deriving a motion vector of the block is a normal inter-screen prediction method. Also good.
 これにより、復号装置200は、FRUC方式とは異なる通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うか否かの判定結果に従って、適切な単位で動き補償を行うことができる。そして、この判定結果は、サブブロックの単位で動き補償を行うことが有効であるか否かに従っている。 Thereby, when the motion vector of a block is derived by a normal inter-screen prediction method different from the FRUC method, the decoding apparatus 200 can select an appropriate unit according to the determination result of whether to perform motion compensation in units of subblocks. Motion compensation can be performed. The determination result depends on whether or not it is effective to perform motion compensation in units of sub-blocks.
 よって、復号装置200は、通常画面間予測方式でブロックの動きベクトルが導出された場合に、サブブロックの単位で動き補償を行うことが有効であるか否かに従って、適切な単位で動き補償を行うことができる。 Therefore, the decoding apparatus 200 performs motion compensation in an appropriate unit according to whether it is effective to perform motion compensation in units of sub-blocks when a motion vector of a block is derived by the normal inter-frame prediction method. It can be carried out.
 また、例えば、回路260は、サブブロックの動きベクトルを導出する場合、バイラテラルFRUC方式でサブブロックの動きベクトルを導出してもよい。これにより、復号装置200は、サブブロックに隣接する領域の再構成画像が生成されていない場合でも、サブブロックの動きベクトルを適切に導出することができる。したがって、復号装置200は、適切に導出された動きベクトルを用いて、動き補償を効率的に行うことができる。 Also, for example, when the sub-block motion vector is derived, the circuit 260 may derive the sub-block motion vector by the bilateral FRUC method. Thereby, the decoding apparatus 200 can appropriately derive the motion vector of the sub-block even when the reconstructed image of the area adjacent to the sub-block is not generated. Therefore, the decoding apparatus 200 can efficiently perform motion compensation using the appropriately derived motion vector.
 また、例えば、回路260は、ブロックの動きベクトルが双方向予測の動きベクトルであり、サブブロックの単位で動き補償を行うことが有効である場合、サブブロックの単位で動き補償を行うと判定してもよい。そして、回路260は、ブロックの動きベクトルが双方向予測の動きベクトルであり、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの単位で動き補償を行うと判定してもよい。 For example, the circuit 260 determines that the motion compensation is performed in units of sub-blocks when the motion vector of the block is a bidirectional motion vector and it is effective to perform motion compensation in units of sub-blocks. May be. The circuit 260 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a motion vector for bidirectional prediction and it is invalid to perform motion compensation in units of sub-blocks. .
 そして、回路260は、ブロックの動きベクトルが片方向予測の動きベクトルである場合、ブロックの単位で動き補償を行うと判定してもよい。 The circuit 260 may determine that the motion compensation is performed in units of blocks when the motion vector of the block is a unidirectional motion vector.
 これにより、復号装置200は、ブロックの動きベクトルがバイラテラルFRUC方式に適しており、かつ、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの動きベクトルをバイラテラルFRUC方式で導出することができる。したがって、例えばブロックの動きベクトルを用いてサブブロックの動きベクトルが導出される場合に、適切な動きベクトルが用いられ得る。 As a result, the decoding apparatus 200 converts the sub-block motion vector to the bilateral FRUC when the motion vector of the block is suitable for the bilateral FRUC scheme and it is effective to perform motion compensation in units of sub-blocks. Can be derived in a manner. Therefore, for example, when the motion vector of the sub-block is derived using the motion vector of the block, an appropriate motion vector can be used.
 一方、復号装置200は、ブロックの動きベクトルがバイラテラルFRUC方式に適していない、又は、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの動きベクトルをそのまま用いて効率的にブロックの単位で動き補償を行うことができる。 On the other hand, when the motion vector of the block is not suitable for the bilateral FRUC method or when it is invalid to perform motion compensation in units of sub-blocks, the decoding apparatus 200 efficiently uses the motion vector of the block as it is. Motion compensation can be performed in units of blocks.
 また、例えば、回路260は、サブブロックの単位で動き補償を行うことが有効である場合、サブブロックの単位で動き補償を行うと判定し、サブブロックの単位で動き補償を行うことが無効である場合、ブロックの単位で動き補償を行うと判定してもよい。 Further, for example, when it is effective to perform motion compensation in units of sub-blocks, the circuit 260 determines that motion compensation is performed in units of sub-blocks, and it is invalid to perform motion compensation in units of sub-blocks. In some cases, it may be determined that motion compensation is performed in units of blocks.
 これにより、復号装置200は、サブブロックの単位で動き補償を行うことが有効である場合に、サブブロックの単位で動き補償を行うことができる。そして、復号装置200は、サブブロックの単位で動き補償を行うことが無効である場合に、ブロックの単位で動き補償を行うことができる。したがって、復号装置200は、動き補償が行われる単位をシンプルに制御することができる。 Thereby, the decoding apparatus 200 can perform motion compensation in units of sub-blocks when it is effective to perform motion compensation in units of sub-blocks. The decoding apparatus 200 can perform motion compensation in units of blocks when it is invalid to perform motion compensation in units of sub-blocks. Therefore, the decoding apparatus 200 can simply control the unit in which motion compensation is performed.
 また、例えば、回路260は、サブブロックの動きベクトルを導出する場合、ブロックの動きベクトルを用いてサブブロックの動きベクトルの候補を導出し、導出された候補を用いてサブブロックの動きベクトルを導出してもよい。これにより、復号装置200は、ブロックの動きベクトルを用いて、サブブロックの動きベクトルを導出することができる。したがって、復号装置200は、予測精度を向上させることができる。 Further, for example, when deriving a sub-block motion vector, the circuit 260 derives a sub-block motion vector candidate using the block motion vector, and derives a sub-block motion vector using the derived candidate. May be. Thereby, the decoding apparatus 200 can derive the motion vector of the sub-block using the motion vector of the block. Therefore, the decoding apparatus 200 can improve prediction accuracy.
 また、例えば、回路260は、ブロックのヘッダ層、ブロックを含むスライスのヘッダ層、ブロックを含むピクチャのヘッダ層、又は、ブロックを含むストリームのヘッダ層から第1制御情報を復号してもよい。そして、回路260は、ブロックのヘッダ層、スライスのヘッダ層、ピクチャのヘッダ層、又は、ストリームのヘッダ層から第2制御情報を復号してもよい。 Also, for example, the circuit 260 may decode the first control information from the header layer of the block, the header layer of the slice including the block, the header layer of the picture including the block, or the header layer of the stream including the block. The circuit 260 may decode the second control information from the header layer of the block, the header layer of the slice, the header layer of the picture, or the header layer of the stream.
 これにより、復号装置200は、ブロックの動きベクトルを導出する方式、及び、サブブロックの単位で動き補償を行うことが有効であるか否かを適切な範囲で指定することができる。 Thereby, the decoding apparatus 200 can specify a scheme for deriving a motion vector of a block and whether or not it is effective to perform motion compensation in units of sub-blocks within an appropriate range.
 また、例えば、第1制御情報は、上述したようなFRUC制御情報であり、第2制御情報は、上述したようなサブブロック処理制御情報である。 Also, for example, the first control information is FRUC control information as described above, and the second control information is subblock processing control information as described above.
 また、上記の例において、回路260は、第1制御情報及び第2制御情報の両方を復号している。しかし、回路260は、第1制御情報及び第2制御情報のうち、第1制御情報のみを復号し、第2制御情報を復号しなくてもよい。特に、回路260は、例えば、サブブロックの単位で動き補償を行うことが有効であるか無効であるかにかかわらず、ブロック単位で動き補償を行うことが決定される場合、第2制御情報を復号しなくてもよい。 In the above example, the circuit 260 decodes both the first control information and the second control information. However, the circuit 260 may decode only the first control information out of the first control information and the second control information, and may not decode the second control information. In particular, for example, when it is determined that the motion compensation is performed in units of blocks regardless of whether the motion compensation is performed in units of sub-blocks, the circuit 260 determines the second control information. Decoding is not necessary.
 より具体的には、例えば図15及び図16で示されたように、通常画面間予測方式でブロックの動きベクトルが導出された場合において、ブロック単位で動き補償を行うことが画一的に決定される場合に第2制御情報を復号しなくてもよい。また、例えば図16で示されたように、ブロックの動きベクトルが片方向予測の動きベクトルである場合において、ブロック単位で動き補償を行うことが画一的に決定される場合に第2制御情報を復号しなくてもよい。 More specifically, for example, as shown in FIGS. 15 and 16, when the motion vector of a block is derived by the normal inter-screen prediction method, it is uniformly decided to perform motion compensation in units of blocks. In this case, the second control information may not be decoded. Also, for example, as shown in FIG. 16, when the motion vector of a block is a unidirectional prediction motion vector, the second control information is determined when it is uniformly determined to perform motion compensation in units of blocks. May not be decrypted.
 また、回路260は、例えば図13及び図14で示されたように、第2制御情報を用いない場合、第2制御情報を復号しなくてもよい。また、ブロックの動きベクトルを導出する方式が予め定められている場合、回路260は、第1制御情報を復号しなくてもよい。 In addition, as illustrated in FIGS. 13 and 14, for example, the circuit 260 may not decode the second control information when the second control information is not used. In addition, when a method for deriving a motion vector of a block is determined in advance, the circuit 260 may not decode the first control information.
 [補足]
 また、本実施の形態における符号化装置100及び復号装置200は、それぞれ、画像符号化装置及び画像復号装置として利用されてもよいし、動画像符号化装置及び動画像復号装置として利用されてもよい。あるいは、符号化装置100及び復号装置200は、それぞれ、インター予測装置(画面間予測装置)として利用され得る。
[Supplement]
Also, the encoding device 100 and the decoding device 200 in the present embodiment may be used as an image encoding device and an image decoding device, respectively, or may be used as a moving image encoding device and a moving image decoding device, respectively. Good. Alternatively, the encoding device 100 and the decoding device 200 can each be used as an inter prediction device (inter-screen prediction device).
 すなわち、符号化装置100及び復号装置200は、それぞれ、インター予測部(画面間予測部)126及びインター予測部(画面間予測部)218のみに対応していてもよい。そして、変換部106及び逆変換部206等の他の構成要素は、他の装置に含まれていてもよい。 That is, the encoding device 100 and the decoding device 200 may correspond to only the inter prediction unit (inter-screen prediction unit) 126 and the inter prediction unit (inter-screen prediction unit) 218, respectively. Other components such as the conversion unit 106 and the inverse conversion unit 206 may be included in other devices.
 また、本実施の形態において、各構成要素は、専用のハードウェアで構成されるか、各構成要素に適したソフトウェアプログラムを実行することによって実現されてもよい。各構成要素は、CPU又はプロセッサなどのプログラム実行部が、ハードディスク又は半導体メモリなどの記録媒体に記録されたソフトウェアプログラムを読み出して実行することによって実現されてもよい。 In the present embodiment, each component may be configured by dedicated hardware or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.
 具体的には、符号化装置100及び復号装置200のそれぞれは、処理回路(Processing Circuitry)と、当該処理回路に電気的に接続された、当該処理回路からアクセス可能な記憶装置(Storage)とを備えていてもよい。例えば、処理回路は回路160又は260に対応し、記憶装置はメモリ162又は262に対応する。 Specifically, each of the encoding device 100 and the decoding device 200 includes a processing circuit (Processing Circuit) and a storage device (Storage) electrically connected to the processing circuit and accessible from the processing circuit. You may have. For example, the processing circuit corresponds to the circuit 160 or 260, and the storage device corresponds to the memory 162 or 262.
 処理回路は、専用のハードウェア及びプログラム実行部の少なくとも一方を含み、記憶装置を用いて処理を実行する。また、記憶装置は、処理回路がプログラム実行部を含む場合には、当該プログラム実行部により実行されるソフトウェアプログラムを記憶する。 The processing circuit includes at least one of dedicated hardware and a program execution unit, and executes processing using a storage device. Further, when the processing circuit includes a program execution unit, the storage device stores a software program executed by the program execution unit.
 ここで、本実施の形態の符号化装置100又は復号装置200などを実現するソフトウェアは、次のようなプログラムである。 Here, the software that realizes the encoding apparatus 100 or the decoding apparatus 200 of the present embodiment is the following program.
 すなわち、このプログラムは、コンピュータに、動き補償を行って動画像を符号化する符号化方法であって、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である符号化方法を実行させてもよい。 That is, this program is an encoding method for encoding a moving image by performing motion compensation on a computer, and derives a motion vector of an image block in the moving image, and the unit of the block or the block In the case where the motion compensation is performed in units of sub-blocks constituting the block, the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion compensation is performed in units of the sub-blocks. A motion vector of the sub-block is derived by a lateral FRUC method, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC method is a process that is the block or the sub-block. The motion vector of the target area The method is derived according to the degree of matching between the reconstructed image of the region adjacent to the processing target region and the reconstructed image of the region in the reference picture. The bilateral FRUC method uses different motion vectors of the processing target region. An encoding method that is a method of deriving according to the degree of matching between two reconstructed images of two regions in two reference pictures may be executed.
 あるいは、このプログラムは、コンピュータに、動き補償を行って動画像を復号する復号方法であって、前記動画像における画像のブロックの動きベクトルを導出し、前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である復号方法を実行させてもよい。 Alternatively, this program is a decoding method for decoding a moving image by performing motion compensation on a computer, and deriving a motion vector of an image block in the moving image, and configuring the unit of the block or the block In the case where the motion compensation is performed in units of sub-blocks, the motion vector of the block is derived by a template FRUC (Frame Rate Up-Conversion) method, and the motion compensation is performed in units of the sub-blocks, bilateral FRUC A motion vector of the sub-block is derived by a method, the motion compensation is performed in units of the sub-block using the motion vector of the sub-block, and the template FRUC method is a processing target region that is the block or the sub-block. The motion vector of This is a method of deriving according to the degree of matching between the reconstructed image of the region adjacent to the target region and the reconstructed image of the region in the reference picture. The bilateral FRUC method uses two different motion vectors for the processing target region. A decoding method that is a method of deriving according to the degree of matching between two reconstructed images of two regions in two reference pictures may be executed.
 あるいは、このプログラムは、コンピュータに、動き補償を行って動画像を符号化する符号化方法であって、前記動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を符号化し、前記ブロックを構成するサブブロックの単位で前記動き補償を行うことが有効であるか無効であるかを示す第2制御情報を符号化し、前記1つの方式で前記ブロックの動きベクトルを導出し、前記サブブロックの単位で前記動き補償を行うことが有効であるか無効であるかに従って、前記サブブロックの単位で前記動き補償を行うか前記ブロックの単位で前記動き補償を行うかを判定し、前記サブブロックの単位で前記動き補償を行うと判定された場合、前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記ブロックの単位で前記動き補償を行うと判定された場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行う符号化方法を実行させてもよい。 Alternatively, this program is an encoding method for encoding a moving image by performing motion compensation on a computer, and includes first control information indicating one method for deriving a motion vector of an image block in the moving image. Encode, encode second control information indicating whether it is effective or ineffective to perform the motion compensation in units of sub-blocks constituting the block, and derive a motion vector of the block by the one method And determining whether to perform the motion compensation in units of the sub-blocks or to perform the motion compensation in units of the blocks according to whether the motion compensation in units of the sub-block is valid or invalid If it is determined that the motion compensation is performed in units of the sub-block, a motion vector of the sub-block is derived and the motion of the sub-block is derived. When it is determined that the motion compensation is performed in units of the sub-blocks using a Kuttle, and the motion compensation is performed in units of the blocks, the motion compensation is performed in units of the blocks using a motion vector of the blocks. An encoding method may be executed.
 あるいは、このプログラムは、コンピュータに、動き補償を行って動画像を復号する復号方法であって、前記動画像における画像のブロックの動きベクトルを導出する1つの方式を示す第1制御情報を復号し、前記ブロックを構成するサブブロックの単位で前記動き補償を行うことが有効であるか無効であるかを示す第2制御情報を復号し、前記1つの方式で前記ブロックの動きベクトルを導出し、前記サブブロックの単位で前記動き補償を行うことが有効であるか無効であるかに従って、前記サブブロックの単位で前記動き補償を行うか前記ブロックの単位で前記動き補償を行うかを判定し、前記サブブロックの単位で前記動き補償を行うと判定された場合、前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、前記ブロックの単位で前記動き補償を行うと判定された場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行う復号方法を実行させてもよい。 Alternatively, this program is a decoding method for decoding a moving image by performing motion compensation on a computer, and decoding first control information indicating one method for deriving a motion vector of an image block in the moving image. , Decoding second control information indicating whether the motion compensation is valid or invalid in units of sub-blocks constituting the block, and deriving a motion vector of the block by the one method, Determining whether to perform the motion compensation in units of the sub-blocks or whether to perform the motion compensation in units of the blocks according to whether the motion compensation in units of the sub-block is valid or invalid. When it is determined that the motion compensation is performed in units of the sub-block, a motion vector of the sub-block is derived, and the motion vector of the sub-block is derived A decoding method for performing motion compensation in units of sub-blocks and performing motion compensation in units of blocks using a motion vector of the blocks when it is determined to perform motion compensation in units of blocks May be executed.
 また、各構成要素は、上述の通り、回路であってもよい。これらの回路は、全体として1つの回路を構成してもよいし、それぞれ別々の回路であってもよい。また、各構成要素は、汎用的なプロセッサで実現されてもよいし、専用のプロセッサで実現されてもよい。 Each component may be a circuit as described above. These circuits may constitute one circuit as a whole, or may be separate circuits. Each component may be realized by a general-purpose processor or a dedicated processor.
 また、特定の構成要素が実行する処理を別の構成要素が実行してもよい。また、処理を実行する順番が変更されてもよいし、複数の処理が並行して実行されてもよい。また、符号化復号装置が、符号化装置100及び復号装置200を備えていてもよい。 Also, another component may execute the process executed by a specific component. In addition, the order in which the processes are executed may be changed, or a plurality of processes may be executed in parallel. Further, the encoding / decoding device may include the encoding device 100 and the decoding device 200.
 説明に用いられた第1及び第2等の序数は、適宜、付け替えられてもよい。また、構成要素などに対して、序数が新たに与えられてもよいし、取り除かれてもよい。 The first and second ordinal numbers used in the description may be replaced as appropriate. In addition, an ordinal number may be newly given to a component or the like, or may be removed.
 以上、符号化装置100及び復号装置200の態様について、実施の形態に基づいて説明したが、符号化装置100及び復号装置200の態様は、この実施の形態に限定されるものではない。本開示の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態に施したものや、異なる実施の形態における構成要素を組み合わせて構築される形態も、符号化装置100及び復号装置200の態様の範囲内に含まれてもよい。 As mentioned above, although the aspect of the encoding apparatus 100 and the decoding apparatus 200 was demonstrated based on embodiment, the aspect of the encoding apparatus 100 and decoding apparatus 200 is not limited to this embodiment. As long as it does not deviate from the gist of the present disclosure, the encoding device 100 and the decoding device 200 may be configured in which various modifications conceived by those skilled in the art have been made in the present embodiment, or in a form constructed by combining components in different embodiments. It may be included within the scope of the embodiment.
 本態様を本開示における他の態様の少なくとも一部と組み合わせて実施してもよい。また、本態様のフローチャートに記載の一部の処理、装置の一部の構成、シンタックスの一部などを他の態様と組み合わせて実施してもよい。 This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. In addition, a part of the processing, a part of the configuration of the apparatus, a part of the syntax, and the like described in the flowchart of this aspect may be combined with another aspect.
 (実施の形態2)
 以上の各実施の形態において、機能ブロックの各々は、通常、MPU及びメモリ等によって実現可能である。また、機能ブロックの各々による処理は、通常、プロセッサなどのプログラム実行部が、ROM等の記録媒体に記録されたソフトウェア(プログラム)を読み出して実行することで実現される。当該ソフトウェアはダウンロード等により配布されてもよいし、半導体メモリなどの記録媒体に記録して配布されてもよい。なお、各機能ブロックをハードウェア(専用回路)によって実現することも、当然、可能である。
(Embodiment 2)
In each of the above embodiments, each of the functional blocks can usually be realized by an MPU, a memory, and the like. Further, the processing by each functional block is usually realized by a program execution unit such as a processor reading and executing software (program) recorded on a recording medium such as a ROM. The software may be distributed by downloading or the like, or may be distributed by being recorded on a recording medium such as a semiconductor memory. Naturally, each functional block can be realized by hardware (dedicated circuit).
 また、各実施の形態において説明した処理は、単一の装置(システム)を用いて集中処理することによって実現してもよく、又は、複数の装置を用いて分散処理することによって実現してもよい。また、上記プログラムを実行するプロセッサは、単数であってもよく、複数であってもよい。すなわち、集中処理を行ってもよく、又は分散処理を行ってもよい。 Further, the processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using a plurality of devices. Good. The number of processors that execute the program may be one or more. That is, centralized processing may be performed, or distributed processing may be performed.
 本開示の態様は、以上の実施例に限定されることなく、種々の変更が可能であり、それらも本開示の態様の範囲内に包含される。 The aspects of the present disclosure are not limited to the above embodiments, and various modifications are possible, and these are also included within the scope of the aspects of the present disclosure.
 さらにここで、上記各実施の形態で示した動画像符号化方法(画像符号化方法)又は動画像復号化方法(画像復号方法)の応用例とそれを用いたシステムを説明する。当該システムは、画像符号化方法を用いた画像符号化装置、画像復号方法を用いた画像復号装置、及び両方を備える画像符号化復号装置を有することを特徴とする。システムにおける他の構成について、場合に応じて適切に変更することができる。 Furthermore, application examples of the moving picture coding method (picture coding method) or the moving picture decoding method (picture decoding method) shown in the above embodiments and a system using the same will be described. The system includes an image encoding device using an image encoding method, an image decoding device using an image decoding method, and an image encoding / decoding device including both. Other configurations in the system can be appropriately changed according to circumstances.
 [使用例]
 図28は、コンテンツ配信サービスを実現するコンテンツ供給システムex100の全体構成を示す図である。通信サービスの提供エリアを所望の大きさに分割し、各セル内にそれぞれ固定無線局である基地局ex106、ex107、ex108、ex109、ex110が設置されている。
[Example of use]
FIG. 28 is a diagram showing an overall configuration of a content supply system ex100 that implements a content distribution service. The communication service providing area is divided into desired sizes, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.
 このコンテンツ供給システムex100では、インターネットex101に、インターネットサービスプロバイダex102又は通信網ex104、及び基地局ex106~ex110を介して、コンピュータex111、ゲーム機ex112、カメラex113、家電ex114、及びスマートフォンex115などの各機器が接続される。当該コンテンツ供給システムex100は、上記のいずれかの要素を組合せて接続するようにしてもよい。固定無線局である基地局ex106~ex110を介さずに、各機器が電話網又は近距離無線等を介して直接的又は間接的に相互に接続されていてもよい。また、ストリーミングサーバex103は、インターネットex101等を介して、コンピュータex111、ゲーム機ex112、カメラex113、家電ex114、及びスマートフォンex115などの各機器と接続される。また、ストリーミングサーバex103は、衛星ex116を介して、飛行機ex117内のホットスポット内の端末等と接続される。 In the content supply system ex100, devices such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101, the Internet service provider ex102 or the communication network ex104, and the base stations ex106 to ex110. Is connected. The content supply system ex100 may be connected by combining any of the above elements. Each device may be directly or indirectly connected to each other via a telephone network or a short-range wireless communication without using the base stations ex106 to ex110 which are fixed wireless stations. The streaming server ex103 is connected to each device such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101. The streaming server ex103 is connected to a terminal in a hot spot in the airplane ex117 via the satellite ex116.
 なお、基地局ex106~ex110の代わりに、無線アクセスポイント又はホットスポット等が用いられてもよい。また、ストリーミングサーバex103は、インターネットex101又はインターネットサービスプロバイダex102を介さずに直接通信網ex104と接続されてもよいし、衛星ex116を介さず直接飛行機ex117と接続されてもよい。 Note that a wireless access point or a hot spot may be used instead of the base stations ex106 to ex110. Further, the streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to the airplane ex117 without going through the satellite ex116.
 カメラex113はデジタルカメラ等の静止画撮影、及び動画撮影が可能な機器である。また、スマートフォンex115は、一般に2G、3G、3.9G、4G、そして今後は5Gと呼ばれる移動通信システムの方式に対応したスマートフォン機、携帯電話機、又はPHS(Personal Handyphone System)等である。 The camera ex113 is a device that can shoot still images and moving images such as a digital camera. The smartphone ex115 is a smartphone, a cellular phone, or a PHS (Personal Handyphone System) that is compatible with a mobile communication system generally called 2G, 3G, 3.9G, 4G, and 5G in the future.
 家電ex118は、冷蔵庫、又は家庭用燃料電池コージェネレーションシステムに含まれる機器等である。 The home appliance ex118 is a device included in a refrigerator or a household fuel cell cogeneration system.
 コンテンツ供給システムex100では、撮影機能を有する端末が基地局ex106等を通じてストリーミングサーバex103に接続されることで、ライブ配信等が可能になる。ライブ配信では、端末(コンピュータex111、ゲーム機ex112、カメラex113、家電ex114、スマートフォンex115、及び飛行機ex117内の端末等)は、ユーザが当該端末を用いて撮影した静止画又は動画コンテンツに対して上記各実施の形態で説明した符号化処理を行い、符号化により得られた映像データと、映像に対応する音を符号化した音データと多重化し、得られたデータをストリーミングサーバex103に送信する。即ち、各端末は、本開示の一態様に係る画像符号化装置として機能する。 In the content supply system ex100, a terminal having a photographing function is connected to the streaming server ex103 through the base station ex106 or the like, thereby enabling live distribution or the like. In live distribution, the terminal (computer ex111, game machine ex112, camera ex113, home appliance ex114, smartphone ex115, terminal in airplane ex117, etc.) is used for the still image or video content captured by the user using the terminal. The encoding process described in each embodiment is performed, and the video data obtained by the encoding and the sound data obtained by encoding the sound corresponding to the video are multiplexed, and the obtained data is transmitted to the streaming server ex103. That is, each terminal functions as an image encoding device according to an aspect of the present disclosure.
 一方、ストリーミングサーバex103は要求のあったクライアントに対して送信されたコンテンツデータをストリーム配信する。クライアントは、上記符号化処理されたデータを復号化することが可能な、コンピュータex111、ゲーム機ex112、カメラex113、家電ex114、スマートフォンex115、又は飛行機ex117内の端末等である。配信されたデータを受信した各機器は、受信したデータを復号化処理して再生する。即ち、各機器は、本開示の一態様に係る画像復号装置として機能する。 On the other hand, the streaming server ex103 streams the content data transmitted to the requested client. The client is a computer or the like in the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, the smart phone ex115, or the airplane ex117 that can decode the encoded data. Each device that has received the distributed data decrypts and reproduces the received data. That is, each device functions as an image decoding device according to an aspect of the present disclosure.
 [分散処理]
 また、ストリーミングサーバex103は複数のサーバ又は複数のコンピュータであって、データを分散して処理したり記録したり配信するものであってもよい。例えば、ストリーミングサーバex103は、CDN(Contents Delivery Network)により実現され、世界中に分散された多数のエッジサーバとエッジサーバ間をつなぐネットワークによりコンテンツ配信が実現されていてもよい。CDNでは、クライアントに応じて物理的に近いエッジサーバが動的に割り当てられる。そして、当該エッジサーバにコンテンツがキャッシュ及び配信されることで遅延を減らすことができる。また、何らかのエラーが発生した場合又はトラフィックの増加などにより通信状態が変わる場合に複数のエッジサーバで処理を分散したり、他のエッジサーバに配信主体を切り替えたり、障害が生じたネットワークの部分を迂回して配信を続けることができるので、高速かつ安定した配信が実現できる。
[Distributed processing]
The streaming server ex103 may be a plurality of servers or a plurality of computers, and may process, record, and distribute data in a distributed manner. For example, the streaming server ex103 may be realized by a CDN (Contents Delivery Network), and content distribution may be realized by a network connecting a large number of edge servers and edge servers distributed all over the world. In CDN, edge servers that are physically close to each other are dynamically allocated according to clients. Then, the content can be cached and distributed to the edge server, thereby reducing the delay. Also, if some error occurs or the communication status changes due to an increase in traffic, etc., the processing is distributed among multiple edge servers, the distribution subject is switched to another edge server, or the part of the network where the failure has occurred Since detouring can be continued, high-speed and stable distribution can be realized.
 また、配信自体の分散処理にとどまらず、撮影したデータの符号化処理を各端末で行ってもよいし、サーバ側で行ってもよいし、互いに分担して行ってもよい。一例として、一般に符号化処理では、処理ループが2度行われる。1度目のループでフレーム又はシーン単位での画像の複雑さ、又は、符号量が検出される。また、2度目のループでは画質を維持して符号化効率を向上させる処理が行われる。例えば、端末が1度目の符号化処理を行い、コンテンツを受け取ったサーバ側が2度目の符号化処理を行うことで、各端末での処理負荷を減らしつつもコンテンツの質と効率を向上させることができる。この場合、ほぼリアルタイムで受信して復号する要求があれば、端末が行った一度目の符号化済みデータを他の端末で受信して再生することもできるので、より柔軟なリアルタイム配信も可能になる。 In addition to the distributed processing of the distribution itself, the captured data may be encoded at each terminal, may be performed on the server side, or may be shared with each other. As an example, in general, in an encoding process, a processing loop is performed twice. In the first loop, the complexity of the image or the code amount in units of frames or scenes is detected. In the second loop, processing for maintaining the image quality and improving the coding efficiency is performed. For example, the terminal performs the first encoding process, and the server receiving the content performs the second encoding process, thereby improving the quality and efficiency of the content while reducing the processing load on each terminal. it can. In this case, if there is a request to receive and decode in almost real time, the encoded data of the first time performed by the terminal can be received and reproduced by another terminal, enabling more flexible real-time distribution. Become.
 他の例として、カメラex113等は、画像から特徴量抽出を行い、特徴量に関するデータをメタデータとして圧縮してサーバに送信する。サーバは、例えば特徴量からオブジェクトの重要性を判断して量子化精度を切り替えるなど、画像の意味に応じた圧縮を行う。特徴量データはサーバでの再度の圧縮時の動きベクトル予測の精度及び効率向上に特に有効である。また、端末でVLC(可変長符号化)などの簡易的な符号化を行い、サーバでCABAC(コンテキスト適応型二値算術符号化方式)など処理負荷の大きな符号化を行ってもよい。 As another example, the camera ex113 or the like extracts a feature amount from an image, compresses data relating to the feature amount as metadata, and transmits the metadata to the server. The server performs compression according to the meaning of the image, for example, by determining the importance of the object from the feature amount and switching the quantization accuracy. The feature data is particularly effective for improving the accuracy and efficiency of motion vector prediction at the time of re-compression on the server. Also, simple coding such as VLC (variable length coding) may be performed at the terminal, and coding with a large processing load such as CABAC (context adaptive binary arithmetic coding) may be performed at the server.
 さらに他の例として、スタジアム、ショッピングモール、又は工場などにおいては、複数の端末によりほぼ同一のシーンが撮影された複数の映像データが存在する場合がある。この場合には、撮影を行った複数の端末と、必要に応じて撮影をしていない他の端末及びサーバを用いて、例えばGOP(Group of Picture)単位、ピクチャ単位、又はピクチャを分割したタイル単位などで符号化処理をそれぞれ割り当てて分散処理を行う。これにより、遅延を減らし、よりリアルタイム性を実現できる。 As yet another example, in a stadium, a shopping mall, a factory, or the like, there may be a plurality of video data in which almost the same scene is captured by a plurality of terminals. In this case, for example, a GOP (Group of Picture) unit, a picture unit, or a tile obtained by dividing a picture using a plurality of terminals that have performed shooting and other terminals and servers that have not performed shooting as necessary. Distributed processing is performed by assigning encoding processing in units or the like. Thereby, delay can be reduced and real-time property can be realized.
 また、複数の映像データはほぼ同一シーンであるため、各端末で撮影された映像データを互いに参照し合えるように、サーバで管理及び/又は指示をしてもよい。または、各端末からの符号化済みデータを、サーバが受信し複数のデータ間で参照関係を変更、又はピクチャ自体を補正或いは差し替えて符号化しなおしてもよい。これにより、一つ一つのデータの質と効率を高めたストリームを生成できる。 In addition, since the plurality of video data are almost the same scene, the server may manage and / or instruct the video data captured by each terminal to refer to each other. Alternatively, the encoded data from each terminal may be received by the server and the reference relationship may be changed among a plurality of data, or the picture itself may be corrected or replaced to be encoded again. This makes it possible to generate a stream with improved quality and efficiency of each piece of data.
 また、サーバは、映像データの符号化方式を変更するトランスコードを行ったうえで映像データを配信してもよい。例えば、サーバは、MPEG系の符号化方式をVP系に変換してもよいし、H.264をH.265に変換してもよい。 Also, the server may distribute the video data after performing transcoding to change the encoding method of the video data. For example, the server may convert the MPEG encoding system to the VP encoding. 264. It may be converted into H.265.
 このように、符号化処理は、端末、又は1以上のサーバにより行うことが可能である。よって、以下では、処理を行う主体として「サーバ」又は「端末」等の記載を用いるが、サーバで行われる処理の一部又は全てが端末で行われてもよいし、端末で行われる処理の一部又は全てがサーバで行われてもよい。また、これらに関しては、復号処理についても同様である。 Thus, the encoding process can be performed by a terminal or one or more servers. Therefore, in the following, description such as “server” or “terminal” is used as the subject performing processing, but part or all of processing performed by the server may be performed by the terminal, or processing performed by the terminal may be performed. Some or all may be performed at the server. The same applies to the decoding process.
 [3D、マルチアングル]
 近年では、互いにほぼ同期した複数のカメラex113及び/又はスマートフォンex115などの端末により撮影された異なるシーン、又は、同一シーンを異なるアングルから撮影した画像或いは映像を統合して利用することも増えてきている。各端末で撮影した映像は、別途取得した端末間の相対的な位置関係、又は、映像に含まれる特徴点が一致する領域などに基づいて統合される。
[3D, multi-angle]
In recent years, different scenes photographed by terminals such as a plurality of cameras ex113 and / or smartphones ex115 that are substantially synchronized with each other, or images or videos obtained by photographing the same scene from different angles have been increasingly used. Yes. The video captured by each terminal is integrated based on the relative positional relationship between the terminals acquired separately or the region where the feature points included in the video match.
 サーバは、2次元の動画像を符号化するだけでなく、動画像のシーン解析などに基づいて自動的に、又は、ユーザが指定した時刻において、静止画を符号化し、受信端末に送信してもよい。サーバは、さらに、撮影端末間の相対的な位置関係を取得できる場合には、2次元の動画像だけでなく、同一シーンが異なるアングルから撮影された映像に基づき、当該シーンの3次元形状を生成できる。なお、サーバは、ポイントクラウドなどにより生成した3次元のデータを別途符号化してもよいし、3次元データを用いて人物又はオブジェクトを認識或いは追跡した結果に基づいて、受信端末に送信する映像を、複数の端末で撮影した映像から選択、又は、再構成して生成してもよい。 The server not only encodes a two-dimensional moving image, but also encodes a still image automatically based on a scene analysis of the moving image or at a time specified by the user and transmits it to the receiving terminal. Also good. In addition, when the server can acquire the relative positional relationship between the photographing terminals, the server obtains the three-dimensional shape of the scene based on not only the two-dimensional moving image but also the video obtained by photographing the same scene from different angles. Can be generated. The server may separately encode the three-dimensional data generated by the point cloud or the like, and the video to be transmitted to the receiving terminal based on the result of recognizing or tracking the person or the object using the three-dimensional data. Alternatively, the images may be selected or reconstructed from videos captured by a plurality of terminals.
 このようにして、ユーザは、各撮影端末に対応する各映像を任意に選択してシーンを楽しむこともできるし、複数画像又は映像を用いて再構成された3次元データから任意視点の映像を切り出したコンテンツを楽しむこともできる。さらに、映像と同様に音も複数の相異なるアングルから収音され、サーバは、映像に合わせて特定のアングル又は空間からの音を映像と多重化して送信してもよい。 In this way, the user can arbitrarily select each video corresponding to each photographing terminal and enjoy a scene, or can display a video of an arbitrary viewpoint from three-dimensional data reconstructed using a plurality of images or videos. You can also enjoy the clipped content. Furthermore, as with video, sound is collected from a plurality of different angles, and the server may multiplex and transmit sound from a specific angle or space according to the video.
 また、近年ではVirtual Reality(VR)及びAugmented Reality(AR)など、現実世界と仮想世界とを対応付けたコンテンツも普及してきている。VRの画像の場合、サーバは、右目用及び左目用の視点画像をそれぞれ作成し、Multi-View Coding(MVC)などにより各視点映像間で参照を許容する符号化を行ってもよいし、互いに参照せずに別ストリームとして符号化してもよい。別ストリームの復号時には、ユーザの視点に応じて仮想的な3次元空間が再現されるように互いに同期させて再生するとよい。 Also, in recent years, content that associates the real world with the virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has become widespread. In the case of a VR image, the server may create viewpoint images for the right eye and the left eye, respectively, and perform encoding that allows reference between each viewpoint video by Multi-View Coding (MVC) or the like. You may encode as another stream, without referring. At the time of decoding another stream, it is preferable to reproduce in synchronization with each other so that a virtual three-dimensional space is reproduced according to the viewpoint of the user.
 ARの画像の場合には、サーバは、現実空間のカメラ情報に、仮想空間上の仮想物体情報を、3次元的位置又はユーザの視点の動きに基づいて重畳する。復号装置は、仮想物体情報及び3次元データを取得又は保持し、ユーザの視点の動きに応じて2次元画像を生成し、スムーズにつなげることで重畳データを作成してもよい。または、復号装置は仮想物体情報の依頼に加えてユーザの視点の動きをサーバに送信し、サーバは、サーバに保持される3次元データから受信した視点の動きに合わせて重畳データを作成し、重畳データを符号化して復号装置に配信してもよい。なお、重畳データは、RGB以外に透過度を示すα値を有し、サーバは、3次元データから作成されたオブジェクト以外の部分のα値が0などに設定し、当該部分が透過する状態で、符号化してもよい。もしくは、サーバは、クロマキーのように所定の値のRGB値を背景に設定し、オブジェクト以外の部分は背景色にしたデータを生成してもよい。 In the case of an AR image, the server superimposes virtual object information in the virtual space on the camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device may acquire or hold virtual object information and three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and create superimposition data by connecting them smoothly. Alternatively, the decoding device transmits the movement of the user's viewpoint to the server in addition to the request for the virtual object information, and the server creates superimposition data according to the movement of the viewpoint received from the three-dimensional data held in the server, The superimposed data may be encoded and distributed to the decoding device. Note that the superimposed data has an α value indicating transparency in addition to RGB, and the server sets the α value of a portion other than the object created from the three-dimensional data to 0 or the like, and the portion is transparent. May be encoded. Alternatively, the server may generate data in which a RGB value of a predetermined value is set as the background, such as a chroma key, and the portion other than the object is set to the background color.
 同様に配信されたデータの復号処理はクライアントである各端末で行っても、サーバ側で行ってもよいし、互いに分担して行ってもよい。一例として、ある端末が、一旦サーバに受信リクエストを送り、そのリクエストに応じたコンテンツを他の端末で受信し復号処理を行い、ディスプレイを有する装置に復号済みの信号が送信されてもよい。通信可能な端末自体の性能によらず処理を分散して適切なコンテンツを選択することで画質のよいデータを再生することができる。また、他の例として大きなサイズの画像データをTV等で受信しつつ、鑑賞者の個人端末にピクチャが分割されたタイルなど一部の領域が復号されて表示されてもよい。これにより、全体像を共有化しつつ、自身の担当分野又はより詳細に確認したい領域を手元で確認することができる。 Similarly, the decryption processing of the distributed data may be performed at each terminal as a client, may be performed on the server side, or may be performed in a shared manner. As an example, a terminal may once send a reception request to the server, receive content corresponding to the request at another terminal, perform a decoding process, and transmit a decoded signal to a device having a display. Regardless of the performance of the communicable terminal itself, it is possible to reproduce data with good image quality by distributing processing and selecting appropriate content. As another example, a part of a region such as a tile in which a picture is divided may be decoded and displayed on a viewer's personal terminal while receiving large-size image data on a TV or the like. Accordingly, it is possible to confirm at hand the area in which the person is responsible or the area to be confirmed in more detail while sharing the whole image.
 また今後は、屋内外にかかわらず近距離、中距離、又は長距離の無線通信が複数使用可能な状況下で、MPEG-DASHなどの配信システム規格を利用して、接続中の通信に対して適切なデータを切り替えながらシームレスにコンテンツを受信することが予想される。これにより、ユーザは、自身の端末のみならず屋内外に設置されたディスプレイなどの復号装置又は表示装置を自由に選択しながらリアルタイムで切り替えられる。また、自身の位置情報などに基づいて、復号する端末及び表示する端末を切り替えながら復号を行うことができる。これにより、目的地への移動中に、表示可能なデバイスが埋め込まれた隣の建物の壁面又は地面の一部に地図情報を表示させながら移動することも可能になる。また、符号化データが受信端末から短時間でアクセスできるサーバにキャッシュされている、又は、コンテンツ・デリバリー・サービスにおけるエッジサーバにコピーされている、などの、ネットワーク上での符号化データへのアクセス容易性に基づいて、受信データのビットレートを切り替えることも可能である。 In the future, in the situation where multiple short-distance, medium-distance, or long-distance wireless communications can be used regardless of whether indoors or outdoors, using a distribution system standard such as MPEG-DASH, It is expected that content is received seamlessly while switching appropriate data. Accordingly, the user can switch in real time while freely selecting a decoding device or a display device such as a display installed indoors or outdoors as well as his / her own terminal. Also, decoding can be performed while switching between a terminal to be decoded and a terminal to be displayed based on its own position information. This makes it possible to move while displaying map information on the wall surface of a neighboring building or a part of the ground in which a displayable device is embedded while moving to the destination. Also, access to encoded data on the network, such as when the encoded data is cached in a server that can be accessed from the receiving terminal in a short time, or copied to the edge server in the content delivery service. It is also possible to switch the bit rate of received data based on ease.
 [スケーラブル符号化]
 コンテンツの切り替えに関して、図29に示す、上記各実施の形態で示した動画像符号化方法を応用して圧縮符号化されたスケーラブルなストリームを用いて説明する。サーバは、個別のストリームとして内容は同じで質の異なるストリームを複数有していても構わないが、図示するようにレイヤに分けて符号化を行うことで実現される時間的/空間的スケーラブルなストリームの特徴を活かして、コンテンツを切り替える構成であってもよい。つまり、復号側が性能という内的要因と通信帯域の状態などの外的要因とに応じてどのレイヤまで復号するかを決定することで、復号側は、低解像度のコンテンツと高解像度のコンテンツとを自由に切り替えて復号できる。例えば移動中にスマートフォンex115で視聴していた映像の続きを、帰宅後にインターネットTV等の機器で視聴したい場合には、当該機器は、同じストリームを異なるレイヤまで復号すればよいので、サーバ側の負担を軽減できる。
[Scalable coding]
The content switching will be described using a scalable stream that is compression-encoded by applying the moving image encoding method shown in each of the above embodiments shown in FIG. The server may have a plurality of streams of the same content and different quality as individual streams, but the temporal / spatial scalable implementation realized by dividing into layers as shown in the figure. The configuration may be such that the content is switched by utilizing the characteristics of the stream. In other words, the decoding side decides which layer to decode according to internal factors such as performance and external factors such as the state of communication bandwidth, so that the decoding side can combine low-resolution content and high-resolution content. You can switch freely and decrypt. For example, when the user wants to continue watching the video that was viewed on the smartphone ex115 while moving on a device such as an Internet TV after returning home, the device only has to decode the same stream to a different layer, so the load on the server side Can be reduced.
 さらに、上記のように、レイヤ毎にピクチャが符号化されており、ベースレイヤの上位にエンハンスメントレイヤが存在するスケーラビリティを実現する構成以外に、エンハンスメントレイヤが画像の統計情報などに基づくメタ情報を含み、復号側が、メタ情報に基づきベースレイヤのピクチャを超解像することで高画質化したコンテンツを生成してもよい。超解像とは、同一解像度におけるSN比の向上、及び、解像度の拡大のいずれであってもよい。メタ情報は、超解像処理に用いる線形或いは非線形のフィルタ係数を特定するため情報、又は、超解像処理に用いるフィルタ処理、機械学習或いは最小2乗演算におけるパラメータ値を特定する情報などを含む。 Further, as described above, the enhancement layer includes meta information based on image statistical information, etc., in addition to the configuration in which the picture is encoded for each layer and the enhancement layer exists above the base layer. The decoding side may generate content with high image quality by super-resolution of the base layer picture based on the meta information. Super-resolution may be either improvement of the SN ratio at the same resolution or enlargement of the resolution. The meta information includes information for specifying a linear or non-linear filter coefficient used for super-resolution processing, or information for specifying a parameter value in filter processing, machine learning, or least square calculation used for super-resolution processing. .
 または、画像内のオブジェクトなどの意味合いに応じてピクチャがタイル等に分割されており、復号側が、復号するタイルを選択することで一部の領域だけを復号する構成であってもよい。また、オブジェクトの属性(人物、車、ボールなど)と映像内の位置(同一画像における座標位置など)とをメタ情報として格納することで、復号側は、メタ情報に基づいて所望のオブジェクトの位置を特定し、そのオブジェクトを含むタイルを決定できる。例えば、図30に示すように、メタ情報は、HEVCにおけるSEIメッセージなど画素データとは異なるデータ格納構造を用いて格納される。このメタ情報は、例えば、メインオブジェクトの位置、サイズ、又は色彩などを示す。 Alternatively, the picture may be divided into tiles or the like according to the meaning of the object in the image, and the decoding side may select only a part of the region by selecting the tile to be decoded. Also, by storing the object attributes (person, car, ball, etc.) and the position in the video (coordinate position in the same image, etc.) as meta information, the decoding side can determine the position of the desired object based on the meta information. Can be identified and the tile containing the object can be determined. For example, as shown in FIG. 30, the meta information is stored using a data storage structure different from the pixel data such as the SEI message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.
 また、ストリーム、シーケンス又はランダムアクセス単位など、複数のピクチャから構成される単位でメタ情報が格納されてもよい。これにより、復号側は、特定人物が映像内に出現する時刻などが取得でき、ピクチャ単位の情報と合わせることで、オブジェクトが存在するピクチャ、及び、ピクチャ内でのオブジェクトの位置を特定できる。 Also, meta information may be stored in units composed of a plurality of pictures, such as streams, sequences, or random access units. Thereby, the decoding side can acquire the time when the specific person appears in the video, etc., and can match the picture in which the object exists and the position of the object in the picture by combining with the information in units of pictures.
 [Webページの最適化]
 図31は、コンピュータex111等におけるwebページの表示画面例を示す図である。図32は、スマートフォンex115等におけるwebページの表示画面例を示す図である。図31及び図32に示すようにwebページが、画像コンテンツへのリンクであるリンク画像を複数含む場合があり、閲覧するデバイスによってその見え方は異なる。画面上に複数のリンク画像が見える場合には、ユーザが明示的にリンク画像を選択するまで、又は画面の中央付近にリンク画像が近付く或いはリンク画像の全体が画面内に入るまでは、表示装置(復号装置)は、リンク画像として各コンテンツが有する静止画又はIピクチャを表示したり、複数の静止画又はIピクチャ等でgifアニメのような映像を表示したり、ベースレイヤのみ受信して映像を復号及び表示したりする。
[Web page optimization]
FIG. 31 is a diagram showing an example of a web page display screen on the computer ex111 or the like. FIG. 32 is a diagram illustrating a display screen example of a web page on the smartphone ex115 or the like. As shown in FIGS. 31 and 32, a web page may include a plurality of link images that are links to image content, and the appearance differs depending on the browsing device. When a plurality of link images are visible on the screen, the display device until the user explicitly selects the link image, or until the link image approaches the center of the screen or the entire link image enters the screen. The (decoding device) displays a still image or an I picture included in each content as a link image, displays a video like a gif animation with a plurality of still images or I pictures, or receives only a base layer to receive a video. Are decoded and displayed.
 ユーザによりリンク画像が選択された場合、表示装置は、ベースレイヤを最優先にして復号する。なお、webページを構成するHTMLにスケーラブルなコンテンツであることを示す情報があれば、表示装置は、エンハンスメントレイヤまで復号してもよい。また、リアルタイム性を担保するために、選択される前又は通信帯域が非常に厳しい場合には、表示装置は、前方参照のピクチャ(Iピクチャ、Pピクチャ、前方参照のみのBピクチャ)のみを復号及び表示することで、先頭ピクチャの復号時刻と表示時刻との間の遅延(コンテンツの復号開始から表示開始までの遅延)を低減できる。また、表示装置は、ピクチャの参照関係を敢えて無視して全てのBピクチャ及びPピクチャを前方参照にして粗く復号し、時間が経ち受信したピクチャが増えるにつれて正常の復号を行ってもよい。 When the link image is selected by the user, the display device decodes the base layer with the highest priority. If there is information indicating that the HTML constituting the web page is scalable content, the display device may decode up to the enhancement layer. Also, in order to ensure real-time properties, the display device only decodes forward reference pictures (I picture, P picture, forward reference only B picture) before being selected or when the communication band is very strict. In addition, the delay between the decoding time of the first picture and the display time (delay from the start of content decoding to the start of display) can be reduced by displaying. Further, the display device may intentionally ignore the reference relationship of pictures and roughly decode all B pictures and P pictures with forward reference, and perform normal decoding as the number of received pictures increases over time.
 [自動走行]
 また、車の自動走行又は走行支援のため2次元又は3次元の地図情報などの静止画又は映像データを送受信する場合、受信端末は、1以上のレイヤに属する画像データに加えて、メタ情報として天候又は工事の情報なども受信し、これらを対応付けて復号してもよい。なお、メタ情報は、レイヤに属してもよいし、単に画像データと多重化されてもよい。
[Automatic driving]
In addition, when transmitting and receiving still image or video data such as two-dimensional or three-dimensional map information for automatic driving or driving support of a car, the receiving terminal adds meta data to image data belonging to one or more layers. Weather or construction information may also be received and decoded in association with each other. The meta information may belong to a layer or may be simply multiplexed with image data.
 この場合、受信端末を含む車、ドローン又は飛行機などが移動するため、受信端末は、当該受信端末の位置情報を受信要求時に送信することで、基地局ex106~ex110を切り替えながらシームレスな受信及び復号を実現できる。また、受信端末は、ユーザの選択、ユーザの状況又は通信帯域の状態に応じて、メタ情報をどの程度受信するか、又は地図情報をどの程度更新していくかを動的に切り替えることが可能になる。 In this case, since the car, drone, airplane, or the like including the receiving terminal moves, the receiving terminal transmits the position information of the receiving terminal at the time of the reception request, thereby seamless reception and decoding while switching the base stations ex106 to ex110. Can be realized. In addition, the receiving terminal can dynamically switch how much meta-information is received or how much map information is updated according to the user's selection, the user's situation, or the communication band state. become.
 以上のようにして、コンテンツ供給システムex100では、ユーザが送信した符号化された情報をリアルタイムでクライアントが受信して復号し、再生することができる。 As described above, in the content supply system ex100, the encoded information transmitted by the user can be received, decoded and reproduced in real time by the client.
 [個人コンテンツの配信]
 また、コンテンツ供給システムex100では、映像配信業者による高画質で長時間のコンテンツのみならず、個人による低画質で短時間のコンテンツのユニキャスト、又はマルチキャスト配信が可能である。また、このような個人のコンテンツは今後も増加していくと考えられる。個人コンテンツをより優れたコンテンツにするために、サーバは、編集処理を行ってから符号化処理を行ってもよい。これは例えば、以下のような構成で実現できる。
[Distribution of personal contents]
Further, the content supply system ex100 can perform not only high-quality and long-time content by a video distributor but also unicast or multicast distribution of low-quality and short-time content by an individual. Moreover, such personal contents are expected to increase in the future. In order to make personal content superior, the server may perform the encoding process after performing the editing process. This can be realized, for example, with the following configuration.
 撮影時にリアルタイム又は蓄積して撮影後に、サーバは、原画又は符号化済みデータから撮影エラー、シーン探索、意味の解析、及びオブジェクト検出などの認識処理を行う。そして、サーバは、認識結果に基いて手動又は自動で、ピントずれ又は手ブレなどを補正したり、明度が他のピクチャに比べて低い又は焦点が合っていないシーンなどの重要性の低いシーンを削除したり、オブジェクトのエッジを強調したり、色合いを変化させるなどの編集を行う。サーバは、編集結果に基いて編集後のデータを符号化する。また撮影時刻が長すぎると視聴率が下がることも知られており、サーバは、撮影時間に応じて特定の時間範囲内のコンテンツになるように上記のように重要性が低いシーンのみならず動きが少ないシーンなどを、画像処理結果に基き自動でクリップしてもよい。または、サーバは、シーンの意味解析の結果に基づいてダイジェストを生成して符号化してもよい。 After shooting, the server performs recognition processing such as shooting error, scene search, semantic analysis, and object detection from the original image or encoded data. Then, the server manually or automatically corrects out-of-focus or camera shake based on the recognition result, or selects a less important scene such as a scene whose brightness is lower than that of other pictures or is out of focus. Edit such as deleting, emphasizing the edge of an object, and changing the hue. The server encodes the edited data based on the editing result. It is also known that if the shooting time is too long, the audience rating will decrease, and the server will move not only in the less important scenes as described above, but also in motion according to the shooting time. A scene with few images may be automatically clipped based on the image processing result. Alternatively, the server may generate and encode a digest based on the result of the semantic analysis of the scene.
 なお、個人コンテンツには、そのままでは著作権、著作者人格権、又は肖像権等の侵害となるものが写り込んでいるケースもあり、共有する範囲が意図した範囲を超えてしまうなど個人にとって不都合な場合もある。よって、例えば、サーバは、画面の周辺部の人の顔、又は家の中などを敢えて焦点が合わない画像に変更して符号化してもよい。また、サーバは、符号化対象画像内に、予め登録した人物とは異なる人物の顔が映っているかどうかを認識し、映っている場合には、顔の部分にモザイクをかけるなどの処理を行ってもよい。または、符号化の前処理又は後処理として、著作権などの観点からユーザが画像を加工したい人物又は背景領域を指定し、サーバは、指定された領域を別の映像に置き換える、又は焦点をぼかすなどの処理を行うことも可能である。人物であれば、動画像において人物をトラッキングしながら、顔の部分の映像を置き換えることができる。 In some cases, personal content may include infringements such as copyrights, author's personality rights, or portrait rights, which are inconvenient for individuals, such as exceeding the intended scope of sharing. In some cases. Therefore, for example, the server may change and encode the face of the person in the periphery of the screen or the inside of the house into an unfocused image. In addition, the server recognizes whether or not a face of a person different from the person registered in advance is shown in the encoding target image, and if so, performs processing such as applying a mosaic to the face part. May be. Alternatively, as a pre-processing or post-processing of encoding, the user designates a person or background area that the user wants to process an image from the viewpoint of copyright, etc., and the server replaces the designated area with another video or blurs the focus. It is also possible to perform such processing. If it is a person, the face image can be replaced while tracking the person in the moving image.
 また、データ量の小さい個人コンテンツの視聴はリアルタイム性の要求が強いため、帯域幅にもよるが、復号装置は、まずベースレイヤを最優先で受信して復号及び再生を行う。復号装置は、この間にエンハンスメントレイヤを受信し、再生がループされる場合など2回以上再生される場合に、エンハンスメントレイヤも含めて高画質の映像を再生してもよい。このようにスケーラブルな符号化が行われているストリームであれば、未選択時又は見始めた段階では粗い動画だが、徐々にストリームがスマートになり画像がよくなるような体験を提供することができる。スケーラブル符号化以外にも、1回目に再生される粗いストリームと、1回目の動画を参照して符号化される2回目のストリームとが1つのストリームとして構成されていても同様の体験を提供できる。 In addition, since viewing of personal content with a small amount of data is strongly demanded for real-time performance, the decoding device first receives the base layer with the highest priority and performs decoding and reproduction, depending on the bandwidth. The decoding device may receive the enhancement layer during this time, and may play back high-quality video including the enhancement layer when played back twice or more, such as when playback is looped. A stream that is scalable in this way can provide an experience in which the stream becomes smarter and the image is improved gradually, although it is a rough moving picture when it is not selected or at the beginning of viewing. In addition to scalable coding, the same experience can be provided even if the coarse stream played back the first time and the second stream coded with reference to the first video are configured as one stream. .
 [その他の使用例]
 また、これらの符号化又は復号処理は、一般的に各端末が有するLSIex500において処理される。LSIex500は、ワンチップであっても複数チップからなる構成であってもよい。なお、動画像符号化又は復号用のソフトウェアをコンピュータex111等で読み取り可能な何らかの記録メディア(CD-ROM、フレキシブルディスク、又はハードディスクなど)に組み込み、そのソフトウェアを用いて符号化又は復号処理を行ってもよい。さらに、スマートフォンex115がカメラ付きである場合には、そのカメラで取得した動画データを送信してもよい。このときの動画データはスマートフォンex115が有するLSIex500で符号化処理されたデータである。
[Other usage examples]
In addition, these encoding or decoding processes are generally processed in the LSI ex500 included in each terminal. The LSI ex500 may be configured as a single chip or a plurality of chips. Note that moving image encoding or decoding software is incorporated into some recording medium (CD-ROM, flexible disk, hard disk, etc.) that can be read by the computer ex111 and the like, and encoding or decoding processing is performed using the software. Also good. Furthermore, when the smartphone ex115 has a camera, moving image data acquired by the camera may be transmitted. The moving image data at this time is data encoded by the LSI ex500 included in the smartphone ex115.
 なお、LSIex500は、アプリケーションソフトをダウンロードしてアクティベートする構成であってもよい。この場合、端末は、まず、当該端末がコンテンツの符号化方式に対応しているか、又は、特定サービスの実行能力を有するかを判定する。端末がコンテンツの符号化方式に対応していない場合、又は、特定サービスの実行能力を有さない場合、端末は、コーデック又はアプリケーションソフトをダウンロードし、その後、コンテンツ取得及び再生する。 Note that the LSI ex500 may be configured to download and activate application software. In this case, the terminal first determines whether the terminal is compatible with the content encoding method or has a specific service execution capability. If the terminal does not support the content encoding method or does not have the capability to execute a specific service, the terminal downloads a codec or application software, and then acquires and reproduces the content.
 また、インターネットex101を介したコンテンツ供給システムex100に限らず、デジタル放送用システムにも上記各実施の形態の少なくとも動画像符号化装置(画像符号化装置)又は動画像復号化装置(画像復号装置)のいずれかを組み込むことができる。衛星などを利用して放送用の電波に映像と音が多重化された多重化データを載せて送受信するため、コンテンツ供給システムex100のユニキャストがし易い構成に対してマルチキャスト向きであるという違いがあるが符号化処理及び復号処理に関しては同様の応用が可能である。 Further, not only the content supply system ex100 via the Internet ex101, but also a digital broadcasting system, at least the moving image encoding device (image encoding device) or the moving image decoding device (image decoding device) of the above embodiments. Any of these can be incorporated. The difference is that the unicasting of the content supply system ex100 is suitable for multicasting because it uses a satellite or the like to transmit and receive multiplexed data in which video and sound are multiplexed on broadcasting radio waves. However, the same application is possible for the encoding process and the decoding process.
 [ハードウェア構成]
 図33は、スマートフォンex115を示す図である。また、図34は、スマートフォンex115の構成例を示す図である。スマートフォンex115は、基地局ex110との間で電波を送受信するためのアンテナex450と、映像及び静止画を撮ることが可能なカメラ部ex465と、カメラ部ex465で撮像した映像、及びアンテナex450で受信した映像等が復号されたデータを表示する表示部ex458とを備える。スマートフォンex115は、さらに、タッチパネル等である操作部ex466と、音声又は音響を出力するためのスピーカ等である音声出力部ex457と、音声を入力するためのマイク等である音声入力部ex456と、撮影した映像或いは静止画、録音した音声、受信した映像或いは静止画、メール等の符号化されたデータ、又は、復号化されたデータを保存可能なメモリ部ex467と、ユーザを特定し、ネットワークをはじめ各種データへのアクセスの認証をするためのSIMex468とのインタフェース部であるスロット部ex464とを備える。なお、メモリ部ex467の代わりに外付けメモリが用いられてもよい。
[Hardware configuration]
FIG. 33 is a diagram illustrating the smartphone ex115. FIG. 34 is a diagram illustrating a configuration example of the smartphone ex115. The smartphone ex115 receives the antenna ex450 for transmitting / receiving radio waves to / from the base station ex110, the camera unit ex465 capable of taking video and still images, the video captured by the camera unit ex465, and the antenna ex450. A display unit ex458 for displaying data obtained by decoding the video or the like. The smartphone ex115 further includes an operation unit ex466 that is a touch panel or the like, a voice output unit ex457 that is a speaker or the like for outputting voice or sound, a voice input unit ex456 that is a microphone or the like for inputting voice, and photographing. Memory unit ex467 that can store encoded video or still image, recorded audio, received video or still image, encoded data such as mail, or decoded data, and a user, and network A slot part ex464, which is an interface part with the SIMex 468 for authenticating access to various data. An external memory may be used instead of the memory unit ex467.
 また、表示部ex458及び操作部ex466等を統括的に制御する主制御部ex460と、電源回路部ex461、操作入力制御部ex462、映像信号処理部ex455、カメラインタフェース部ex463、ディスプレイ制御部ex459、変調/復調部ex452、多重/分離部ex453、音声信号処理部ex454、スロット部ex464、及びメモリ部ex467とがバスex470を介して接続されている。 Also, a main control unit ex460 that comprehensively controls the display unit ex458, the operation unit ex466, and the like, a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / Demodulation unit ex452, multiplexing / demultiplexing unit ex453, audio signal processing unit ex454, slot unit ex464, and memory unit ex467 are connected via bus ex470.
 電源回路部ex461は、ユーザの操作により電源キーがオン状態にされると、バッテリパックから各部に対して電力を供給することによりスマートフォンex115を動作可能な状態に起動する。 When the power key is turned on by a user operation, the power supply circuit unit ex461 starts up the smartphone ex115 in an operable state by supplying power from the battery pack to each unit.
 スマートフォンex115は、CPU、ROM及びRAM等を有する主制御部ex460の制御に基づいて、通話及データ通信等の処理を行う。通話時は、音声入力部ex456で収音した音声信号を音声信号処理部ex454でデジタル音声信号に変換し、これを変調/復調部ex452でスペクトラム拡散処理し、送信/受信部ex451でデジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex450を介して送信する。また受信データを増幅して周波数変換処理及びアナログデジタル変換処理を施し、変調/復調部ex452でスペクトラム逆拡散処理し、音声信号処理部ex454でアナログ音声信号に変換した後、これを音声出力部ex457から出力する。データ通信モード時は、本体部の操作部ex466等の操作によってテキスト、静止画、又は映像データが操作入力制御部ex462を介して主制御部ex460に送出され、同様に送受信処理が行われる。データ通信モード時に映像、静止画、又は映像と音声を送信する場合、映像信号処理部ex455は、メモリ部ex467に保存されている映像信号又はカメラ部ex465から入力された映像信号を上記各実施の形態で示した動画像符号化方法によって圧縮符号化し、符号化された映像データを多重/分離部ex453に送出する。また、音声信号処理部ex454は、映像又は静止画等をカメラ部ex465で撮像中に音声入力部ex456で収音した音声信号を符号化し、符号化された音声データを多重/分離部ex453に送出する。多重/分離部ex453は、符号化済み映像データと符号化済み音声データを所定の方式で多重化し、変調/復調部(変調/復調回路部)ex452、及び送信/受信部ex451で変調処理及び変換処理を施してアンテナex450を介して送信する。 The smartphone ex115 performs processing such as calling and data communication based on the control of the main control unit ex460 having a CPU, a ROM, a RAM, and the like. During a call, the voice signal picked up by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, spread spectrum processing is performed by the modulation / demodulation unit ex452, and digital / analog conversion is performed by the transmission / reception unit ex451. After performing the processing and the frequency conversion processing, the data is transmitted via the antenna ex450. Further, the received data is amplified and subjected to frequency conversion processing and analog-digital conversion processing, spectrum despreading processing is performed by the modulation / demodulation unit ex452, and converted to analog audio signal by the audio signal processing unit ex454, and then this is output to the audio output unit ex457. Output from. In the data communication mode, text, still image, or video data is sent to the main control unit ex460 via the operation input control unit ex462 by the operation of the operation unit ex466 of the main body unit, and transmission / reception processing is performed similarly. When transmitting video, still image, or video and audio in the data communication mode, the video signal processing unit ex455 uses the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 as described above. The video data is compressed and encoded by the moving image encoding method shown in the form, and the encoded video data is sent to the multiplexing / demultiplexing unit ex453. The audio signal processing unit ex454 encodes the audio signal picked up by the audio input unit ex456 while the camera unit ex465 captures a video or a still image, and sends the encoded audio data to the multiplexing / separating unit ex453. To do. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded audio data by a predetermined method, and the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the modulation / demodulation unit ex451 perform modulation processing and conversion. The data is processed and transmitted via the antenna ex450.
 電子メール又はチャットに添付された映像、又はウェブページ等にリンクされた映像を受信した場合、アンテナex450を介して受信された多重化データを復号するために、多重/分離部ex453は、多重化データを分離することにより、多重化データを映像データのビットストリームと音声データのビットストリームとに分け、同期バスex470を介して符号化された映像データを映像信号処理部ex455に供給するとともに、符号化された音声データを音声信号処理部ex454に供給する。映像信号処理部ex455は、上記各実施の形態で示した動画像符号化方法に対応した動画像復号化方法によって映像信号を復号し、ディスプレイ制御部ex459を介して表示部ex458から、リンクされた動画像ファイルに含まれる映像又は静止画が表示される。また音声信号処理部ex454は、音声信号を復号し、音声出力部ex457から音声が出力される。なおリアルタイムストリーミングが普及しているため、ユーザの状況によっては音声の再生が社会的にふさわしくない場も起こりえる。そのため、初期値としては、音声信号は再生せず映像データのみを再生する構成の方が望ましい。ユーザが映像データをクリックするなど操作を行った場合にのみ音声を同期して再生してもよい。 In order to decode the multiplexed data received via the antenna ex450 when the video attached to the e-mail or chat, or the video linked to the web page or the like is received, the multiplexing / demultiplexing unit ex453 performs multiplexing By separating the data, the multiplexed data is divided into a bit stream of video data and a bit stream of audio data, and the encoded video data is supplied to the video signal processing unit ex455 via the synchronization bus ex470. The converted audio data is supplied to the audio signal processing unit ex454. The video signal processing unit ex455 decodes the video signal by the video decoding method corresponding to the video encoding method shown in each of the above embodiments, and is linked from the display unit ex458 via the display control unit ex459. A video or still image included in the moving image file is displayed. The audio signal processing unit ex454 decodes the audio signal, and the audio is output from the audio output unit ex457. Since real-time streaming is widespread, depending on the user's situation, there may be occasions where audio playback is not socially appropriate. Therefore, it is desirable that the initial value is a configuration in which only the video data is reproduced without reproducing the audio signal. Audio may be synchronized and played back only when the user performs an operation such as clicking on video data.
 またここではスマートフォンex115を例に説明したが、端末としては符号化器及び復号化器を両方持つ送受信型端末の他に、符号化器のみを有する送信端末、及び、復号化器のみを有する受信端末という3通りの実装形式が考えられる。さらに、デジタル放送用システムにおいて、映像データに音声データなどが多重化された多重化データを受信又は送信するとして説明したが、多重化データには、音声データ以外に映像に関連する文字データなどが多重化されてもよいし、多重化データではなく映像データ自体が受信又は送信されてもよい。 In addition, although the smartphone ex115 has been described here as an example, in addition to a transmission / reception terminal having both an encoder and a decoder as a terminal, a transmission terminal having only an encoder and a reception having only a decoder There are three possible mounting formats: terminals. Furthermore, in the digital broadcasting system, it has been described as receiving or transmitting multiplexed data in which audio data or the like is multiplexed with video data. However, multiplexed data includes character data related to video in addition to audio data. Multiplexing may be performed, and video data itself may be received or transmitted instead of multiplexed data.
 なお、CPUを含む主制御部ex460が符号化又は復号処理を制御するとして説明したが、端末はGPUを備えることも多い。よって、CPUとGPUで共通化されたメモリ、又は共通に使用できるようにアドレスが管理されているメモリにより、GPUの性能を活かして広い領域を一括して処理する構成でもよい。これにより符号化時間を短縮でき、リアルタイム性を確保し、低遅延を実現できる。特に動き探索、デブロックフィルタ、SAO(Sample Adaptive Offset)、及び変換・量子化の処理を、CPUではなく、GPUでピクチャなどの単位で一括して行うと効率的である。 In addition, although it has been described that the main control unit ex460 including the CPU controls the encoding or decoding process, the terminal often includes a GPU. Therefore, a configuration may be adopted in which a wide area is processed in a lump by utilizing the performance of the GPU by using a memory shared by the CPU and the GPU or a memory whose addresses are managed so as to be used in common. As a result, the encoding time can be shortened, real-time performance can be ensured, and low delay can be realized. In particular, it is efficient to perform motion search, deblocking filter, SAO (Sample Adaptive Offset), and transformation / quantization processing in batches in units of pictures or the like instead of the CPU.
 本開示は、例えば、テレビジョン受像機、デジタルビデオレコーダー、カーナビゲーション、携帯電話、デジタルカメラ、デジタルビデオカメラ、テレビ会議システム、又は、電子ミラー等に利用可能である。 The present disclosure can be used for, for example, a television receiver, a digital video recorder, a car navigation, a mobile phone, a digital camera, a digital video camera, a video conference system, or an electronic mirror.
  100 符号化装置
  102 分割部
  104 減算部
  106 変換部
  108 量子化部
  110 エントロピー符号化部
  112、204 逆量子化部
  114、206 逆変換部
  116、208 加算部
  118、210 ブロックメモリ
  120、212 ループフィルタ部
  122、214 フレームメモリ
  124、216 イントラ予測部(画面内予測部)
  126、218 インター予測部(画面間予測部)
  128、220 予測制御部
  160、260 回路
  162、262 メモリ
  200 復号装置
  202 エントロピー復号部
DESCRIPTION OF SYMBOLS 100 Coding apparatus 102 Division | segmentation part 104 Subtraction part 106 Conversion part 108 Quantization part 110 Entropy encoding part 112,204 Inverse quantization part 114,206 Inverse conversion part 116,208 Adder 118,210 Block memory 120,212 Loop filter Unit 122, 214 Frame memory 124, 216 Intra prediction unit (intra-screen prediction unit)
126, 218 Inter prediction unit (inter-screen prediction unit)
128, 220 Prediction control unit 160, 260 Circuit 162, 262 Memory 200 Decoding device 202 Entropy decoding unit

Claims (10)

  1.  動き補償を行って動画像を符号化する符号化装置であって、
     メモリと、
     前記メモリにアクセス可能な回路とを備え、
     前記メモリにアクセス可能な前記回路は、
     前記動画像における画像のブロックの動きベクトルを導出し、
     前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、
     テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、
     前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、
     前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である
     符号化装置。
    An encoding device that encodes a moving image by performing motion compensation,
    Memory,
    A circuit capable of accessing the memory,
    The circuit accessible to the memory is:
    Deriving a motion vector of an image block in the moving image;
    Performing the motion compensation in units of the block or in units of sub-blocks constituting the block;
    When the motion vector of the block is derived using a template FRUC (Frame Rate Up-Conversion) method and the motion compensation is performed in units of the sub-block, the motion vector of the sub-block is derived using a bilateral FRUC method, Performing the motion compensation in units of sub-blocks using sub-block motion vectors;
    In the template FRUC method, a motion vector of a processing target area that is the block or the sub-block is derived according to the degree of matching between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture. It is a method to
    The bilateral FRUC method is a method of deriving a motion vector of the processing target region in accordance with the degree of matching between two reconstructed images of two regions in two different reference pictures.
  2.  前記回路は、前記テンプレートFRUC方式で前記ブロックの動きベクトルを導出して前記ブロックの単位又は前記サブブロックの単位で前記動き補償を行う場合において、
     前記ブロックの動きベクトルが片方向予測の動きベクトルである場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行い、
     前記ブロックの動きベクトルが双方向予測の動きベクトルである場合、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う
     請求項1に記載の符号化装置。
    In the case where the circuit performs the motion compensation in the unit of the block or the unit of the sub-block by deriving the motion vector of the block by the template FRUC method,
    If the motion vector of the block is a unidirectional motion vector, the motion compensation is performed in units of the block using the motion vector of the block;
    The encoding apparatus according to claim 1, wherein when the motion vector of the block is a bi-directional motion vector, the motion compensation is performed in units of the sub block using the motion vector of the sub block.
  3.  前記回路は、前記バイラテラルFRUC方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、前記バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う
     請求項1又は2に記載の符号化装置。
    The circuit derives a motion vector of the sub-block using the bilateral FRUC method when the motion vector of the block is derived using the bi-lateral FRUC method and the motion compensation is performed in units of the sub-block. The encoding apparatus according to claim 1 or 2, wherein the motion compensation is performed in units of the sub-block using a motion vector of the sub-block.
  4.  前記回路は、前記サブブロックの動きベクトルを導出する場合、前記ブロックの動きベクトルを用いて前記サブブロックの動きベクトルの候補を導出し、導出された前記候補を用いて前記サブブロックの動きベクトルを導出する
     請求項1~3のいずれか1項に記載の符号化装置。
    When deriving a motion vector for the sub-block, the circuit derives a motion vector candidate for the sub-block using the motion vector for the block, and determines a motion vector for the sub-block using the derived candidate. The encoding apparatus according to any one of claims 1 to 3.
  5.  動き補償を行って動画像を復号する復号装置であって、
     メモリと、
     前記メモリにアクセス可能な回路とを備え、
     前記メモリにアクセス可能な前記回路は、
     前記動画像における画像のブロックの動きベクトルを導出し、
     前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、
     テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、
     前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、
     前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である
     復号装置。
    A decoding device for decoding a moving image by performing motion compensation,
    Memory,
    A circuit capable of accessing the memory,
    The circuit accessible to the memory is:
    Deriving a motion vector of an image block in the moving image;
    Performing the motion compensation in units of the block or in units of sub-blocks constituting the block;
    When the motion vector of the block is derived using a template FRUC (Frame Rate Up-Conversion) method and the motion compensation is performed in units of the sub-block, the motion vector of the sub-block is derived using a bilateral FRUC method, Performing the motion compensation in units of sub-blocks using sub-block motion vectors;
    In the template FRUC method, a motion vector of a processing target area that is the block or the sub-block is derived according to the degree of matching between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture. It is a method to
    The bilateral FRUC method is a method of deriving a motion vector of the processing target region according to a degree of matching between two reconstructed images of two regions in two different reference pictures.
  6.  前記回路は、前記テンプレートFRUC方式で前記ブロックの動きベクトルを導出して前記ブロックの単位又は前記サブブロックの単位で前記動き補償を行う場合において、
     前記ブロックの動きベクトルが片方向予測の動きベクトルである場合、前記ブロックの動きベクトルを用いて前記ブロックの単位で前記動き補償を行い、
     前記ブロックの動きベクトルが双方向予測の動きベクトルである場合、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う
     請求項5に記載の復号装置。
    In the case where the circuit performs the motion compensation in the unit of the block or the unit of the sub-block by deriving the motion vector of the block by the template FRUC method,
    If the motion vector of the block is a unidirectional motion vector, the motion compensation is performed in units of the block using the motion vector of the block;
    The decoding device according to claim 5, wherein when the motion vector of the block is a bi-directional motion vector, the motion compensation is performed in units of the sub block using the motion vector of the sub block.
  7.  前記回路は、前記バイラテラルFRUC方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、前記バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行う
     請求項5又は6に記載の復号装置。
    The circuit derives a motion vector of the sub-block using the bilateral FRUC method when the motion vector of the block is derived using the bi-lateral FRUC method and the motion compensation is performed in units of the sub-block. The decoding device according to claim 5 or 6, wherein the motion compensation is performed in units of the sub-block using a motion vector of the sub-block.
  8.  前記回路は、前記サブブロックの動きベクトルを導出する場合、前記ブロックの動きベクトルを用いて前記サブブロックの動きベクトルの候補を導出し、導出された前記候補を用いて前記サブブロックの動きベクトルを導出する
     請求項5~7のいずれか1項に記載の復号装置。
    When deriving a motion vector for the sub-block, the circuit derives a motion vector candidate for the sub-block using the motion vector for the block, and determines a motion vector for the sub-block using the derived candidate. The decoding device according to any one of claims 5 to 7.
  9.  動き補償を行って動画像を符号化する符号化方法であって、
     前記動画像における画像のブロックの動きベクトルを導出し、
     前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、
     テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、
     前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、
     前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である
     符号化方法。
    An encoding method for encoding a moving image by performing motion compensation,
    Deriving a motion vector of an image block in the moving image;
    Performing the motion compensation in units of the block or in units of sub-blocks constituting the block;
    When the motion vector of the block is derived using a template FRUC (Frame Rate Up-Conversion) method and the motion compensation is performed in units of the sub-block, the motion vector of the sub-block is derived using a bilateral FRUC method, Performing the motion compensation in units of sub-blocks using sub-block motion vectors;
    In the template FRUC method, a motion vector of a processing target area that is the block or the sub-block is derived according to the degree of matching between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture. It is a method to
    The bilateral FRUC method is a method of deriving a motion vector of the processing target region according to the degree of matching between two reconstructed images of two regions in two different reference pictures.
  10.  動き補償を行って動画像を復号する復号方法であって、
     前記動画像における画像のブロックの動きベクトルを導出し、
     前記ブロックの単位、又は、前記ブロックを構成するサブブロックの単位で、前記動き補償を行い、
     テンプレートFRUC(Frame Rate Up-Conversion)方式で前記ブロックの動きベクトルを導出して前記サブブロックの単位で前記動き補償を行う場合において、バイラテラルFRUC方式で前記サブブロックの動きベクトルを導出し、前記サブブロックの動きベクトルを用いて前記サブブロックの単位で前記動き補償を行い、
     前記テンプレートFRUC方式は、前記ブロック又は前記サブブロックである処理対象領域の動きベクトルを、前記処理対象領域に隣接する領域の再構成画像と、参照ピクチャにおける領域の再構成画像との適合度合いに従って導出する方式であり、
     前記バイラテラルFRUC方式は、前記処理対象領域の動きベクトルを、互いに異なる2つの参照ピクチャにおける2つの領域の2つの再構成画像の適合度合いに従って導出する方式である
     復号方法。
    A decoding method for decoding a moving image by performing motion compensation,
    Deriving a motion vector of an image block in the moving image;
    Performing the motion compensation in units of the block or in units of sub-blocks constituting the block;
    When the motion vector of the block is derived using a template FRUC (Frame Rate Up-Conversion) method and the motion compensation is performed in units of the sub-block, the motion vector of the sub-block is derived using a bilateral FRUC method, Performing the motion compensation in units of sub-blocks using sub-block motion vectors;
    In the template FRUC method, a motion vector of a processing target area that is the block or the sub-block is derived according to the degree of matching between the reconstructed image of the area adjacent to the processing target area and the reconstructed image of the area in the reference picture It is a method to
    The bilateral FRUC method is a method of deriving a motion vector of the processing target region according to a degree of matching between two reconstructed images of two regions in two different reference pictures.
PCT/JP2018/015411 2017-04-19 2018-04-12 Encoding device, decoding device, encoding method and decoding method WO2018193967A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201762487119P 2017-04-19 2017-04-19
US62/487,119 2017-04-19

Publications (1)

Publication Number Publication Date
WO2018193967A1 true WO2018193967A1 (en) 2018-10-25

Family

ID=63856254

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/015411 WO2018193967A1 (en) 2017-04-19 2018-04-12 Encoding device, decoding device, encoding method and decoding method

Country Status (1)

Country Link
WO (1) WO2018193967A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113796084A (en) * 2019-04-14 2021-12-14 北京字节跳动网络技术有限公司 Motion vector and prediction sample refinement

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160286229A1 (en) * 2015-03-27 2016-09-29 Qualcomm Incorporated Motion vector derivation in video coding
WO2018061522A1 (en) * 2016-09-27 2018-04-05 シャープ株式会社 Motion vector generation device, prediction image generation device, moving image decoding device, and moving image encoding device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160286229A1 (en) * 2015-03-27 2016-09-29 Qualcomm Incorporated Motion vector derivation in video coding
WO2018061522A1 (en) * 2016-09-27 2018-04-05 シャープ株式会社 Motion vector generation device, prediction image generation device, moving image decoding device, and moving image encoding device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHEN, JIANLE ET AL.: "Algorithm Description of Joint Exploration Test Model 5 (JEM 5", JOINT VIDEO EXPLORATION TEAM(JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG11 5TH MEETING, 11 February 2017 (2017-02-11), Geneva, CH, pages 21 - 23 *
CHEN, JIANLE ET AL.: "Further improvements to HMKTA- 1. 0", ITU-TELECOMMUNICATIONS STANDARDIZATION SECTOR STUDY GROUP 16 QUESTION 6 VIDEO CODING EXPERTS GROUP (VCEG) 52ND MEETING : 19- 26 JUNE 2015, 19 June 2015 (2015-06-19), Warsaw, Poland *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113796084A (en) * 2019-04-14 2021-12-14 北京字节跳动网络技术有限公司 Motion vector and prediction sample refinement
CN113796084B (en) * 2019-04-14 2023-09-15 北京字节跳动网络技术有限公司 Motion vector and prediction sample refinement

Similar Documents

Publication Publication Date Title
JP6765520B2 (en) Encoding device, decoding device, coding method and decoding method
WO2018199051A1 (en) Coding device, decoding device, coding method, and decoding method
WO2019208677A1 (en) Coding device, decoding device, coding method, and decoding method
JP7339890B2 (en) Encoding device and decoding device
JP2019017066A (en) Coding apparatus, decoding apparatus, coding method, and decoding method
WO2018221631A1 (en) Encoding device, decoding device, encoding method, and decoding method
JPWO2018190207A1 (en) Decoding device, decoding method, and program
WO2018193968A1 (en) Encoding device, decoding device, encoding method and decoding method
WO2018190207A1 (en) Encoding device, decoding device, encoding method, and decoding method
WO2019189346A1 (en) Encoding device, decoding device, encoding method and decoding method
WO2019208372A1 (en) Encoding device, decoding device, encoding method, and decoding method
WO2018212111A1 (en) Encoding device, decoding device, encoding method and decoding method
JP2020184808A (en) Encoding device, decoding device, coding method and decoding method
WO2018199050A1 (en) Encoding device, decoding device, encoding method and decoding method
WO2018097115A1 (en) Encoding device, decoding device, encoding method, and decoding method
WO2019221103A1 (en) Encoding device, decoding device, encoding method, and decoding method
JP2022093625A (en) Encoder, decoder, encoding method, and decoding method
WO2018105579A1 (en) Encoding device, decoding device, encoding method, and decoding method
WO2019189344A1 (en) Encoding device, decoding device, encoding method and decoding method
WO2018221553A1 (en) Encoding device, encoding method, decoding device, and decoding method
WO2018221554A1 (en) Encoding device, encoding method, decoding device, and decoding method
JP2021180494A (en) Decoding device, decoding method, and non-temporary storage medium
WO2019163794A1 (en) Encoding device and encoding method
WO2018097078A1 (en) Encoding device, decoding device, encoding method, and decoding method
WO2018097117A1 (en) Encoding device, decoding device, encoding method, and decoding method

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

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

Country of ref document: EP

Kind code of ref document: A1