[go: up one dir, main page]

CN110024394A - The recording medium of method and apparatus and stored bits stream to encoding/decoding image - Google Patents

The recording medium of method and apparatus and stored bits stream to encoding/decoding image Download PDF

Info

Publication number
CN110024394A
CN110024394A CN201780073517.5A CN201780073517A CN110024394A CN 110024394 A CN110024394 A CN 110024394A CN 201780073517 A CN201780073517 A CN 201780073517A CN 110024394 A CN110024394 A CN 110024394A
Authority
CN
China
Prior art keywords
block
current
prediction
prediction block
motion information
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201780073517.5A
Other languages
Chinese (zh)
Other versions
CN110024394B (en
Inventor
赵承眩
林成昶
姜晶媛
高玄硕
李镇浩
李河贤
全东山
金晖容
崔振秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Electronics and Telecommunications Research Institute ETRI
Original Assignee
Electronics and Telecommunications Research Institute ETRI
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 Electronics and Telecommunications Research Institute ETRI filed Critical Electronics and Telecommunications Research Institute ETRI
Priority to CN202311020975.6A priority Critical patent/CN116886928A/en
Priority to CN202311021525.9A priority patent/CN116886929A/en
Priority to CN202311025877.1A priority patent/CN116866594A/en
Priority to CN202311024704.8A priority patent/CN116866593A/en
Priority to CN202311023493.6A priority patent/CN116886930A/en
Publication of CN110024394A publication Critical patent/CN110024394A/en
Application granted granted Critical
Publication of CN110024394B publication Critical patent/CN110024394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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
    • 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/513Processing of motion vectors
    • 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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

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

Abstract

本发明涉及一种用于对图像进行编码和解码的方法。用于对图像进行解码的方法可包括以下步骤:通过当前块的运动数据产生当前块的第一预测块;在邻近下级块的运动数据之中确定能够被用于产生第二预测块的当前下级块的至少一个运动数据;通过确定的至少一个运动数据产生当前下级块的至少一个第二预测块;基于当前块的第一预测块和当前下级块的至少一个第二预测块的加权和来产生最终预测块。

The present invention relates to a method for encoding and decoding images. The method for decoding an image may include the steps of: generating a first prediction block of the current block from motion data of the current block; determining a current lower level that can be used to generate the second prediction block among motion data of adjacent lower level blocks at least one motion data of the block; at least one second prediction block of the current subordinate block is generated by the determined at least one motion data; generated based on the weighted sum of the first prediction block of the current block and the at least one second prediction block of the current subordinate block Final prediction block.

Description

对图像编码/解码的方法和设备及存储比特流的记录介质Method and apparatus for encoding/decoding image and recording medium for storing bit stream

技术领域technical field

本发明涉及一种用于对图像进行编码/解码的方法和设备以及存储比特流的记录介质。更具体地讲,本发明涉及一种用于使用重叠块运动补偿对图像进行编码/解码的方法和设备。The present invention relates to a method and apparatus for encoding/decoding an image and a recording medium storing a bitstream. More particularly, the present invention relates to a method and apparatus for encoding/decoding images using overlapping block motion compensation.

背景技术Background technique

近来,对诸如高清(HD)图像或超高清(UHD)图像的高分辨率质量图像的需求在各个应用领域已获得增长。然而,与传统的图像数据相比,更高分辨率和质量的图像数据的数据量有所增加。因此,当通过使用诸如传统的有线宽带网络或无线宽带网络的介质传输图像数据时,或者当在传统的存储介质中存储图像数据时,传输成本和存储成本增加。为了解决随着图像数据的分辨率和质量的提高而出现的这些问题,需要高效的图像编码/解码技术。Recently, demands for high-resolution quality images such as high-definition (HD) images or ultra-high-definition (UHD) images have increased in various application fields. However, the data volume of image data of higher resolution and quality has increased compared to conventional image data. Therefore, when the image data is transmitted by using a medium such as a conventional wired broadband network or a wireless broadband network, or when the image data is stored in a conventional storage medium, the transmission cost and the storage cost increase. In order to solve these problems that arise as the resolution and quality of image data increase, efficient image encoding/decoding techniques are required.

图像压缩技术包括各种技术,包括:从当前画面的先前画面或后续画面预测包括在当前画面中的像素值的帧间预测技术;通过使用当前画面中的像素信息来预测包括在当前画面中的像素值的帧内预测技术;向高出现频率的值分配短码并且向低出现频率的值分配长码的熵编码技术;等等。通过使用这样的图像压缩技术,图像数据可被有效压缩,并且压缩的图像数据被发送或存储。Image compression techniques include various techniques, including: an inter prediction technique that predicts pixel values included in the current picture from a previous or subsequent picture of the current picture; Intra prediction techniques for pixel values; entropy coding techniques that assign short codes to high-frequency values and long codes to low-frequency values; and so on. By using such an image compression technique, image data can be efficiently compressed, and the compressed image data is transmitted or stored.

传统图像编码/解码方法和设备的缺点在于:在计算针对重叠块运动补偿的加权和以及推导邻近块的运动信息期间,计算复杂度增加。A disadvantage of conventional image encoding/decoding methods and apparatuses is that the computational complexity increases during the computation of the weighted sum for motion compensation of overlapping blocks and the deriving of motion information for neighboring blocks.

发明内容SUMMARY OF THE INVENTION

技术问题technical problem

因此,本发明已经考虑到现有技术中出现的以上问题,并且本发明的目标在于提供一种用于在计算针对重叠块运动补偿的加权和以及推导邻近块的运动信息期间降低计算复杂度的同时执行重叠块运动补偿的方法和设备。Therefore, the present invention has taken into account the above problems arising in the prior art, and an object of the present invention is to provide a method for reducing computational complexity during calculation of a weighted sum for motion compensation for overlapping blocks and deriving motion information of adjacent blocks A method and apparatus for simultaneously performing overlapping block motion compensation.

解决方案solution

为了实现以上目标,本发明提供了一种用于对图像进行解码的方法,所述方法包括:使用当前块的运动信息产生当前块的第一预测块;在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息;使用确定的运动信息产生当前子块的至少一个第二预测块;以及基于当前块的第一预测块与当前子块的所述至少一个第二预测块的加权和来产生最终预测块。In order to achieve the above objects, the present invention provides a method for decoding an image, the method comprising: generating a first prediction block of the current block using motion information of the current block; at least one adjacent sub-block of the current sub-block Determine the motion information that can be used to generate the second prediction block from the motion information of the current sub-block; use the determined motion information to generate at least one second prediction block of the current sub-block; A weighted sum of the at least one second prediction block is used to generate a final prediction block.

在图像解码方法中,在确定能够用于产生第二预测块的运动信息的步骤中,可基于当前子块的邻近子块的运动矢量的大小和方向中的至少一个来确定能够用于产生第二预测块的运动信息。In the image decoding method, in the step of determining motion information that can be used to generate the second prediction block, it may be determined based on at least one of the size and direction of motion vectors of neighboring sub-blocks of the current sub-block that can be used to generate the first prediction block. 2. The motion information of the prediction block.

在图像解码方法中,在确定能够用于产生第二预测块的运动信息的步骤中,可基于所述邻近子块的参考画面的画面计数(POC)与当前块的参考画面的POC来确定能够用于产生第二预测块的运动信息。In the image decoding method, in the step of determining motion information that can be used to generate the second prediction block, it may be determined based on a picture count (POC) of a reference picture of the adjacent sub-block and a POC of a reference picture of the current block Motion information for generating the second prediction block.

在图像解码方法中,在确定能够用于产生第二预测块的运动信息的步骤中,仅当所述邻近子块的参考画面的POC等于当前块的参考画面的POC时,将所述邻近子块的运动信息确定为能够用于产生第二预测块的运动信息。In the image decoding method, in the step of determining motion information that can be used to generate the second prediction block, only when the POC of the reference picture of the adjacent sub-block is equal to the POC of the reference picture of the current block, the adjacent sub-block is The motion information of the block is determined as motion information that can be used to generate the second prediction block.

在图像解码方法中,当前子块可具有正方形形状和矩形形状中的至少一种。In the image decoding method, the current subblock may have at least one of a square shape and a rectangular shape.

在图像解码方法中,在产生至少一个第二预测块的步骤中,仅当当前块既不具有运动矢量推导模式也不具有仿射运动补偿模式时,可使用当前子块的至少一个邻近子块的运动信息来产生所述至少一个第二预测块。In the image decoding method, in the step of generating the at least one second prediction block, at least one neighboring subblock of the current subblock may be used only when the current block has neither a motion vector derivation mode nor an affine motion compensation mode of motion information to generate the at least one second prediction block.

在图像解码方法中,在产生最终预测块的步骤中,当当前子块被包括在当前块的边界区域中时,通过获得第一预测块的与边界相邻的部分行或部分列中的每一个样点以及第二预测块的与边界相邻的部分行或部分列中的每一个样点的加权和来产生最终预测块。In the image decoding method, in the step of generating the final prediction block, when the current sub-block is included in the boundary area of the current block, by obtaining each part of the row or column of the first prediction block adjacent to the boundary A weighted sum of one sample and each sample in a partial row or partial column of the second predicted block adjacent to the boundary produces the final predicted block.

在图像解码方法中,第一预测块的与边界相邻的所述部分行或所述部分列中的样点以及第二预测块的与边界相邻的所述部分行或所述部分列中的样点可基于当前子块的块尺寸、当前子块的运动矢量的大小和方向、当前块的帧间预测指示符、以及当前块的参考画面的POC中的至少一个被确定。In the image decoding method, the samples in the partial row or the partial column adjacent to the boundary of the first prediction block and the partial row or the partial column adjacent to the boundary of the second prediction block The samples may be determined based on at least one of the block size of the current subblock, the size and direction of the motion vector of the current subblock, the inter prediction indicator of the current block, and the POC of the reference picture of the current block.

在图像解码方法中,在产生最终预测块的步骤中,可通过根据当前子块的运动矢量的大小和方向中的至少一个将不同权重因子应用于第一预测块和第二预测块中的样点来获得第一预测块和第二预测块的加权和。In the image decoding method, in the step of generating the final prediction block, different weighting factors may be applied to samples in the first prediction block and the second prediction block by at least one of the size and direction of the motion vector of the current subblock point to obtain the weighted sum of the first prediction block and the second prediction block.

本发明提供一种用于对图像进行编码的方法,所述方法包括:使用当前块的运动信息产生当前块的第一预测块;在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息;使用确定的运动信息来产生当前子块的至少一个第二预测块;基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块。The present invention provides a method for encoding an image, the method comprising: generating a first prediction block of the current block using motion information of the current block; determining among motion information of at least one adjacent sub-block of the current sub-block motion information that can be used to generate a second prediction block; use the determined motion information to generate at least one second prediction block of the current subblock; based on the first prediction block of the current block and the at least one second prediction of the current subblock The weighted sum of the blocks is used to generate the final predicted block.

在图像编码方法中,在确定能够用于产生第二预测块的运动信息的步骤中,可基于所述邻近子块的运动矢量的大小和方向中的至少一个确定能够用于产生第二预测块的运动信息。In the image encoding method, in the step of determining motion information that can be used to generate the second prediction block, it may be determined that the motion information that can be used to generate the second prediction block can be used based on at least one of a size and a direction of a motion vector of the adjacent sub-block. sports information.

在图像编码方法中,在确定能够用于产生第二预测块的运动信息的步骤中,可基于所述邻近子块的参考画面的POC与当前块的参考画面的POC来确定能够用于产生第二预测块的运动信息。In the image coding method, in the step of determining the motion information that can be used to generate the second prediction block, it may be determined that the motion information that can be used to generate the second prediction block may be determined based on the POC of the reference picture of the adjacent sub-block and the POC of the reference picture of the current block. 2. The motion information of the prediction block.

在图像编码方法中,在确定能够用于产生第二预测块的运动信息的步骤中,仅当所述邻近子块的参考画面的POC等于当前块的参考画面的POC时,可将所述邻近子块的运动信息确定为能够用于产生第二预测块的运动信息。In the image encoding method, in the step of determining motion information that can be used to generate the second prediction block, only when the POC of the reference picture of the adjacent sub-block is equal to the POC of the reference picture of the current block, the adjacent sub-block may be The motion information of the sub-block is determined as motion information that can be used to generate the second prediction block.

在图像编码方法中,当前子块可具有正方形形状和矩形形状中的至少一种。In the image encoding method, the current subblock may have at least one of a square shape and a rectangular shape.

在图像编码方法中,在产生至少一个第二预测块的步骤中,仅当当前块既不具有运动矢量推导模式也不具有仿射运动补偿模式时,可使用所述至少一个邻近子块的运动信息来产生所述至少一个第二预测块。In the image coding method, in the step of generating the at least one second prediction block, the motion of the at least one adjacent sub-block may be used only when the current block has neither a motion vector derivation mode nor an affine motion compensation mode information to generate the at least one second prediction block.

在图像编码方法中,在产生最终预测块的步骤中,当当前子块被包括在当前块的边界区域中时,可基于第一预测块的与边界相邻的部分行或部分列中的样点以及第二预测块的与边界相邻的部分行或部分列中的样点的加权和来产生最终预测块。In the image encoding method, in the step of generating the final prediction block, when the current sub-block is included in the boundary area of the current block, the sample may be points and the weighted sum of the samples in part of the row or part of the column of the second prediction block adjacent to the boundary to produce the final prediction block.

在图像编码方法中,第一预测块的与边界相邻的所述部分行或所述部分列中的样点以及第二预测块的与边界相邻的所述部分行或所述部分列中的样点可基于当前子块的块尺寸、当前子块的运动矢量的大小和方向、当前块的帧间预测指示符、以及当前块的参考画面的POC中的至少一个被确定。In the image coding method, the samples in the partial row or the partial column adjacent to the boundary of the first prediction block and the partial row or the partial column adjacent to the boundary of the second prediction block The samples may be determined based on at least one of the block size of the current subblock, the size and direction of the motion vector of the current subblock, the inter prediction indicator of the current block, and the POC of the reference picture of the current block.

在图像编码方法中,在产生最终预测块的步骤中,可通过根据当前子块的运动矢量的大小和方向中的至少一个将不同权重值应用于第一预测块和第二预测块中的样点来获得所述加权和。In the image encoding method, in the step of generating the final prediction block, different weight values may be applied to samples in the first prediction block and the second prediction block by at least one of the size and direction of the motion vector of the current subblock. points to obtain the weighted sum.

本发明提供了一种存储通过图像编码方法所产生的比特流的记录介质,所述图像编码方法包括:使用当前块的运动信息产生当前块的第一预测块;在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息;使用确定的运动信息来产生当前子块的至少一个第二预测块;基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块。The present invention provides a recording medium for storing a bit stream generated by an image encoding method, the image encoding method comprising: generating a first prediction block of the current block using motion information of the current block; Determine the motion information that can be used to generate the second prediction block from the motion information of the sub-block; use the determined motion information to generate at least one second prediction block of the current sub-block; based on the first prediction block of the current block and the current sub-block A weighted sum of the at least one second prediction block to generate a final prediction block.

有益效果beneficial effect

根据本发明,能够提供一种用于以改进的压缩效率对图像进行编码/解码的方法和设备。According to the present invention, a method and apparatus for encoding/decoding an image with improved compression efficiency can be provided.

根据本发明,能够提高图像编码/解码效率。According to the present invention, image encoding/decoding efficiency can be improved.

根据本发明,能够降低图像编码器和图像解码器的计算复杂度。According to the present invention, the computational complexity of the image encoder and the image decoder can be reduced.

附图说明Description of drawings

图1是示出根据被应用了本发明的实施例的编码设备的构造的框图;1 is a block diagram showing a configuration of an encoding apparatus according to an embodiment to which the present invention is applied;

图2是示出根据被应用了本发明的实施例的解码设备的构造的框图;2 is a block diagram showing a configuration of a decoding apparatus according to an embodiment to which the present invention is applied;

图3是示意性地示出当对图像进行编码或解码时使用的图像的分区结构的示图;3 is a diagram schematically showing a partition structure of an image used when encoding or decoding an image;

图4是示出帧间预测处理的实施例的示图;4 is a diagram illustrating an embodiment of an inter prediction process;

图5是示出根据本发明的一个实施例的图像编码方法的流程图;5 is a flowchart illustrating an image encoding method according to an embodiment of the present invention;

图6是示出根据本发明的一个实施例的图像解码方法的流程图;6 is a flowchart illustrating an image decoding method according to an embodiment of the present invention;

图7是示出根据本发明的另一实施例的图像编码方法的流程图;7 is a flowchart illustrating an image encoding method according to another embodiment of the present invention;

图8是示出根据本发明的另一实施例的图像解码方法的流程图;8 is a flowchart illustrating an image decoding method according to another embodiment of the present invention;

图9是示出推导当前块的空间运动矢量候选的示例的示图;9 is a diagram illustrating an example of deriving a spatial motion vector candidate for a current block;

图10是示出推导当前块的时间运动矢量候选的示例的示图;10 is a diagram illustrating an example of deriving a temporal motion vector candidate for a current block;

图11是示出将空间合并候选添加到合并候选列表的示例的示图;11 is a diagram illustrating an example of adding a spatial merge candidate to a merge candidate list;

图12是示出将时间合并候选添加到合并候选列表的示例的示图;12 is a diagram illustrating an example of adding a temporal merge candidate to a merge candidate list;

图13是示出逐子块地执行重叠块运动补偿的示例的示图;13 is a diagram illustrating an example of performing overlapping block motion compensation on a sub-block-by-sub-block basis;

图14是示出使用同位块的子块的运动信息来执行重叠块运动补偿的示例的示图;14 is a diagram illustrating an example of performing overlapping block motion compensation using motion information of sub-blocks of a co-located block;

图15是示出使用与参考块的边界相邻的块的运动信息来执行重叠块运动补偿的示例的示图;15 is a diagram illustrating an example of performing overlapping block motion compensation using motion information of a block adjacent to a boundary of a reference block;

图16是示出逐子块组地执行重叠块运动补偿的示例的示图;16 is a diagram illustrating an example of performing overlapping block motion compensation on a sub-block group-by-sub-block group basis;

图17是示出用于重叠块运动补偿的运动信息的条数的示例的示图;17 is a diagram showing an example of the number of pieces of motion information for overlapping block motion compensation;

图18和图19是示出推导用于产生第二预测块的运动信息的顺序的示图;18 and 19 are diagrams illustrating an order of deriving motion information for generating a second prediction block;

图20是示出通过将当前子块的参考画面的POC与当前子块的邻近子块的参考画面的POC进行比较来确定邻近子块的运动信息是否是可用于产生第二预测块的信息的示例的示图;20 is a diagram illustrating determining whether motion information of a neighboring subblock is information that can be used to generate a second prediction block by comparing the POC of the reference picture of the current subblock with the POC of the reference pictures of neighboring subblocks of the current subblock A diagram of the example;

图21是示出当计算第一预测块和第二预测块的加权和时应用权重因子的实施例的示图;21 is a diagram illustrating an embodiment of applying a weighting factor when calculating a weighted sum of a first prediction block and a second prediction block;

图22是示出当计算第一预测块和第二预测块的加权和时根据块中的样点的位置将不同权重因子应用于所述样点的实施例的示图;22 is a diagram illustrating an embodiment of applying different weighting factors to samples in a block according to their positions when calculating a weighted sum of a first prediction block and a second prediction block;

图23是示出在重叠块运动补偿期间按照预定顺序依次累积地计算第一预测块和第二预测块的加权和的实施例的示图;23 is a diagram illustrating an embodiment of cumulatively calculating a weighted sum of a first prediction block and a second prediction block sequentially in a predetermined order during overlapping block motion compensation;

图24是示出在重叠块运动补偿期间计算第一预测块和第二预测块的加权和的实施例的示图;24 is a diagram illustrating an embodiment of calculating a weighted sum of a first prediction block and a second prediction block during overlapping block motion compensation;

图25是示出根据本发明的另一实施例的图像解码方法的流程图。FIG. 25 is a flowchart illustrating an image decoding method according to another embodiment of the present invention.

具体实施方式Detailed ways

可对本发明做出多种修改,并且存在本发明的多种实施例,其中,现在将参照附图提供所述实施例的示例并且将详细描述所述实施例的示例。然而,本发明不限于此,尽管示例性实施例可被解释为包括本发明的技术构思和技术范围内的所有修改、等同形式或替换形式。相似的参考标号指在各方面相同或相似的功能。在附图中,为了清楚起见,元件的形状和大小可被夸大。在本发明的以下详细描述中,对通过图示的方式示出可对本发明进行实施的具体实施例的附图进行参照。这些实施例被足够详细地描述以使本领域技术人员能够实施本公开。应该理解,本公开的各种实施例尽管不同,但不必是相互排他的。例如,在不脱离本公开的精神和范围的情况下,这里描述的与一个实施例关联的特定特征、结构和特性可在其它实施例中被实施。此外,应该理解,在不脱离本公开的精神和范围的情况下,每个公开的实施例内的各个元件的位置或布置可被修改。因此,以下详细描述并不用以限制的含义,本公开的范围仅由所附权利要求(在合适解释的情况下,还连同权利要求所要求保护的等同物的全部范围)来限定。Various modifications can be made to the invention, and there are various embodiments of the invention, examples of which will now be provided and described in detail with reference to the accompanying drawings. However, the present invention is not limited thereto, although the exemplary embodiments may be construed to include all modifications, equivalents, or alternatives within the technical idea and technical scope of the present invention. Like reference numbers refer to the same or similar functions in all respects. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the invention, reference is made to the accompanying drawings which show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the disclosure. It should be understood that the various embodiments of the present disclosure, although different, are not necessarily mutually exclusive. For example, the specific features, structures and characteristics described herein in association with one embodiment can be implemented in other embodiments without departing from the spirit and scope of the present disclosure. Furthermore, it should be understood that the position or arrangement of various elements within each disclosed embodiment may be modified without departing from the spirit and scope of the present disclosure. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the disclosure is defined solely by the appended claims (along with the full scope of equivalents to which such claims are entitled, where properly interpreted).

在说明书中使用的术语“第一”、“第二”等可被用于描述各种组件,但这些组件并不被解释为限制于所述术语。所述术语仅被用于将一个组件与其它组件区分开。例如,在不脱离本发明的范围的情况下,“第一”组件可被称为“第二”组件,并且“第二”组件也可被类似地称为“第一”组件。术语“和/或”包括多个项的组合或者是多个项中的任意一项。The terms "first", "second", etc. used in the specification may be used to describe various components, but these components should not be construed as being limited to the terms. The terms are only used to distinguish one component from another. For example, a "first" component could be termed a "second" component, and a "second" component could similarly be termed a "first" component, without departing from the scope of the present invention. The term "and/or" includes combinations of items or any of the items.

将理解的是,在本说明书中,当元件被简单称为“连接到”或“结合到”另一元件而不是“直接连接到”或“直接结合到”另一元件时,它可以“直接连接到”或“直接结合到”另一元件,或者是在其间插入其它元件的情况下连接到或结合到另一元件。相反,应该理解,当元件被称为“直接结合”或“直接连接”到另一元件时,不存在中间元件。It will be understood that in this specification, when an element is simply referred to as being "connected to" or "coupled to" another element rather than being "directly connected to" or "directly coupled to" another element, it may be "directly connected to" or "coupled directly to" another element. Connected to" or "directly coupled to" another element, or connected to or coupled to another element with intervening other elements. In contrast, it will be understood that when an element is referred to as being "directly coupled" or "directly connected" to another element, there are no intervening elements present.

此外,在本发明的实施例中示出的组成部件被独立示出,以便呈现彼此不同的特性功能。因此,这并不意味着每个组成部件以单独的硬件或软件的组成单元被组成。换句话说,为了方便,每个组成部件包括枚举的组成部件中的每一个。因此,每个组成部件中的至少两个组成部件可被组合形成一个组成部件,或者一个组成部件可被划分为多个组成部件以执行每个功能。在没有脱离本发明的本质的情况下,每个组成部件被组合的实施例以及一个组成部件被划分的实施例也被包括在本发明的范围中。Furthermore, the constituent parts shown in the embodiments of the present invention are shown independently so as to exhibit characteristic functions different from each other. Therefore, it does not mean that each constituent element is composed as a separate hardware or software constituent unit. In other words, for convenience, each component includes each of the enumerated components. Accordingly, at least two of each component may be combined to form one component, or one component may be divided into a plurality of components to perform each function. Embodiments in which each constituent element is combined and embodiments in which one constituent element is divided are also included in the scope of the present invention without departing from the essence of the present invention.

在本说明书中使用的术语仅用于描述具体实施例,而不旨在限制本发明。以单数使用的表达包括复数表达,除非它在上下文中具有明显不同的含义。在本说明书中,将理解,诸如“包括...的”、“具有...的”等的术语旨在指明说明书中所公开的特征、数量、步骤、动作、元件、部件、或其组合的存在,而并不旨在排除一个或更多个其它特征、数量、步骤、动作、元件、部件、或其组合可能存在或者可能被添加的可能性。换句话说,当特定元件被称为“被包括”时,除相应元件以外的元件并不被排除,而是,另外的元件可被包括在本发明的实施例中或者是本发明的范围中。The terms used in this specification are only used to describe specific embodiments, and are not intended to limit the present invention. An expression used in the singular includes the plural unless it has a clearly different meaning from the context. In this specification, it will be understood that terms such as "comprising", "having", etc. are intended to designate features, quantities, steps, acts, elements, components, or combinations thereof disclosed in the specification is not intended to exclude the possibility that one or more other features, numbers, steps, acts, elements, components, or combinations thereof may be present or may be added. In other words, when a particular element is referred to as being "included", elements other than the corresponding element are not excluded, but rather, additional elements may be included in embodiments of the present invention or within the scope of the present invention .

此外,一些组成元件可能不是执行本发明的必要功能的不可缺的组成元件,而是仅提升其性能的可选组成元件。可通过仅包括用于实施本发明的实质的不可缺的组成部件而排除在提升性能时使用的组成部件来实施本发明。仅包括所述不可缺的组成部件而排除在仅提升性能时使用的可选组成部件的结构也被包括在本发明的范围中。Furthermore, some constituent elements may not be indispensable constituent elements to perform the necessary functions of the present invention, but optional constituent elements that merely enhance the performance thereof. The present invention can be implemented by including only the essential components for implementing the present invention and excluding components used in improving performance. A structure including only the indispensable constituent parts and excluding optional constituent parts used only when improving performance is also included in the scope of the present invention.

在下文中,将参照附图详细描述本发明的实施例。在描述本发明的示例性实施例时,将不详细描述公知功能或结构,这是因为它们会不必要地模糊对本发明的理解。附图中的相同的组成元件通过相同的参考标号来表示,并且对相同元件的重复描述将被省略。Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing exemplary embodiments of the present invention, well-known functions or constructions will not be described in detail since they would unnecessarily obscure an understanding of the present invention. The same constituent elements in the drawings are denoted by the same reference numerals, and repeated descriptions of the same elements will be omitted.

此外,在下文中,图像可意为构成视频的画面,或者可意为视频本身。例如,“对图像进行编码或解码或者进行两者”可意为“对视频进行编码或解码或者进行两者”,并且可意为“对视频的多个图像之中的一个图像进行编码或解码或者进行两者”。这里,画面和图像可具有相同的含义。Also, hereinafter, an image may mean a picture constituting a video, or may mean a video itself. For example, "encode or decode a picture or both" may mean "encode or decode a video or both" and may mean "encode or decode one of a plurality of pictures of a video" Or do both". Here, the picture and the image may have the same meaning.

术语描述term description

编码器:意为执行编码的设备。Encoder: means a device that performs encoding.

解码器:意为执行解码的设备。Decoder: means a device that performs decoding.

块:是M×N矩阵的样点。这里,M和N意为正整数,并且块可意为二维形式的样点矩阵。块可以是指单元。当前块可意为当编码时成为目标的编码目标块、或者当解码时成为目标的解码目标块。另外,当前块可以是编码块、预测块、残差块和变换块中的至少一个。Blocks: are samples of an MxN matrix. Here, M and N mean positive integers, and block may mean a sample matrix in two-dimensional form. A block can refer to a unit. The current block may mean an encoding target block to be targeted when encoding, or a decoding target block to be targeted when decoding. Also, the current block may be at least one of an encoding block, a prediction block, a residual block, and a transform block.

样点:是构成块的基本单元。样点可被表示为根据比特深度(Bd)而从0至2Bd–1的值。在本发明中,样点可被用作像素的含义。Sample: is the basic unit that makes up a block. A sample can be represented as a value from 0 to 2 Bd -1 according to the bit depth (Bd). In the present invention, a sample point may be used as the meaning of a pixel.

单元:是指编码和解码单元。在对图像进行编码和解码时,单元可以是通过对单个图像进行分区而产生的区域。此外,单元可意为在编码或解码期间当单个图像被分区为多个子划分单元时的子划分单元。在对图像进行编码和解码时,可执行针对每个单元的预定处理。单个单元可被分区为尺寸比该单元的尺寸更小的子单元。依据功能,单元可意为块、宏块、编码树单元、编码树块、编码单元、编码块、预测单元、预测块、残差单元、残差块、变换单元、变换块等。此外,为了将单元与块区分开,单元可包括亮度分量块、与亮度分量块相关联的色度分量块、以及每个颜色分量块的语法元素。单元可具有各种尺寸和形状,具体而言,单元的形状可以是二维几何图形,诸如矩形形状、正方形形状、梯形形状、三角形形状、五边形形状等。此外,单元信息可包括单元类型(指示编码单元、预测单元、变换单元等)、单元尺寸、单元深度、对单元进行编码和解码的顺序等中的至少一个。Unit: Refers to encoding and decoding units. When encoding and decoding images, a cell may be a region created by partitioning a single image. Also, a unit may mean a sub-division unit when a single image is partitioned into a plurality of sub-division units during encoding or decoding. When encoding and decoding an image, predetermined processing for each unit can be performed. A single unit can be partitioned into subunits of smaller size than the size of the unit. By function, a unit may mean a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a residual unit, a residual block, a transform unit, a transform block, or the like. Furthermore, to distinguish a unit from a block, a unit may include a luma component block, a chroma component block associated with the luma component block, and syntax elements for each color component block. The cells may have various sizes and shapes, and in particular, the shapes of the cells may be two-dimensional geometric shapes, such as rectangular shapes, square shapes, trapezoidal shapes, triangular shapes, pentagonal shapes, and the like. Also, the unit information may include at least one of a unit type (indicating a coding unit, a prediction unit, a transform unit, etc.), a unit size, a unit depth, an order in which the units are encoded and decoded, and the like.

编码树单元:被配置有亮度分量Y的单个编码树块以及与色度分量Cb和Cr相关的两个编码树块。另外,编码树单元可意为包括块以及每个块的语法元素。可通过使用四叉树分区方法和二叉树分区方法中的至少一个对每个编码树单元进行分区来构造下层单元,诸如编码单元、预测单元、变换单元等。编码树单元可被用作用于指定当对作为输入图像的图像进行编码/解码时成为处理单元的像素块的术语。Coding tree unit: A single coding tree block configured with luma component Y and two coding tree blocks associated with chroma components Cb and Cr. Additionally, a coding tree unit may be meant to include blocks and syntax elements for each block. Lower layer units, such as coding units, prediction units, transform units, etc., may be constructed by partitioning each coding tree unit using at least one of a quadtree partition method and a binary tree partition method. A coding tree unit may be used as a term for specifying a block of pixels that becomes a processing unit when encoding/decoding an image that is an input image.

编码树块:可被用作用于指定Y编码树块、Cb编码树块和Cr编码树块中的任意一个的术语。Coding tree block: A term that can be used to designate any one of Y coding tree block, Cb coding tree block and Cr coding tree block.

邻近块:意为与当前块相邻的块。与当前块相邻的块可意为与当前块的边界接触的块、或者位于距当前块预定距离内的块。邻近块可意为与当前块的顶点相邻的块。这里,与当前块的顶点相邻的块可意为与水平相邻于当前块的邻近块垂直相邻的块、或者与垂直相邻于当前块的邻近块水平相邻的块。Neighboring block: means a block that is adjacent to the current block. A block adjacent to the current block may mean a block in contact with the boundary of the current block, or a block located within a predetermined distance from the current block. A neighboring block may mean a block that is adjacent to a vertex of the current block. Here, the block adjacent to the vertex of the current block may mean a block that is vertically adjacent to a neighboring block that is horizontally adjacent to the current block, or a block that is horizontally adjacent to a neighboring block that is vertically adjacent to the current block.

重建邻近块:意为与当前块相邻并且已在时间上/空间上被编码或解码的邻近块。这里,重建邻近块可意为重建邻近单元。重建空间邻近块可以是在当前画面内的已经通过编码或解码或者通过编码和解码两者被重建的块。重建时间邻近块是在参考画面内的与当前画面的当前块位于相同位置的块、或者该块的邻近块。Reconstructed neighboring blocks: means neighboring blocks that are adjacent to the current block and have been temporally/spatially encoded or decoded. Here, reconstructing a neighboring block may mean reconstructing a neighboring unit. A reconstructed spatially adjacent block may be a block within the current picture that has been reconstructed by encoding or decoding, or both. A reconstructed temporal neighboring block is a block within the reference picture that is co-located with the current block of the current picture, or a neighboring block to the block.

单元深度:意为单元的被分区程度。在树结构中,根节点可以是最高节点,叶节点可以是最低节点。另外,当单元被表示为树结构时,单元所存在的级别可意为单元深度。Cell Depth: It means the extent to which the cell is partitioned. In a tree structure, the root node can be the highest node and the leaf nodes can be the lowest node. Additionally, when a unit is represented as a tree structure, the level at which the unit exists may mean the unit depth.

比特流:意为包括编码图像信息的比特流。Bitstream: means a bitstream including encoded image information.

参数集:对应于比特流内的结构中的头信息。视频参数集、序列参数集、画面参数集和自适应参数集中的至少一个可被包括在参数集中。此外,参数集可包括条带头和并行块(tile)头信息。Parameter set: Corresponds to the header information in the structure within the bitstream. At least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set may be included in the parameter set. Additionally, the parameter set may include slice header and parallel tile header information.

解析:可意为通过执行熵解码确定语法元素的值,或者可意为熵解码自身。Parsing: may mean determining the value of a syntax element by performing entropy decoding, or may mean entropy decoding itself.

符号:可意为编码/解码目标单元的语法元素、编码参数和变换系数值中的至少一个。另外,符号可意为熵编码目标或熵解码结果。Symbol: may mean at least one of a syntax element, an encoding parameter, and a transform coefficient value of the encoding/decoding target unit. In addition, a symbol may mean an entropy encoding target or an entropy decoding result.

预测单元:意为当执行诸如帧间预测、帧内预测、帧间补偿、帧内补偿和运动补偿的预测时的基本单元。单个预测单元可被分区为具有小尺寸的多个分区,或者可被分区为下级预测单元。Prediction unit: means a basic unit when performing prediction such as inter prediction, intra prediction, inter compensation, intra compensation, and motion compensation. A single prediction unit may be partitioned into multiple partitions having a small size, or may be partitioned into lower-level prediction units.

预测单元分区:意为通过对预测单元进行分区所获得的形状。PU partition: means the shape obtained by partitioning the PU.

参考画面列表:意为包括用于画面间预测或运动补偿的一个或更多个参考画面的列表。LC(List Combined)、L0(List 0)、L1(List 1)、L2(List 2)、L3(List 3)等是参考画面列表的类型。一个或更多个参考画面列表可被用于画面间预测。Reference picture list: means a list including one or more reference pictures used for inter-picture prediction or motion compensation. LC (List Combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3), etc. are types of reference picture lists. One or more reference picture lists may be used for inter-picture prediction.

画面间预测指示符:可意为当前块的画面间预测方向(单向预测、双向预测等)。可选地,画面间预测指示符可意为用于产生当前块的预测块的参考画面的数量。进一步可选地,画面间预测指示符可意为用于针对当前块执行画面间预测或运动补偿的预测块的数量。Inter-picture prediction indicator: may mean the inter-picture prediction direction (unidirectional prediction, bidirectional prediction, etc.) of the current block. Alternatively, the inter-picture prediction indicator may mean the number of reference pictures used to generate the prediction block of the current block. Further optionally, the inter prediction indicator may mean the number of prediction blocks used to perform inter prediction or motion compensation for the current block.

参考画面索引:意为指示参考画面列表中的特定参考画面的索引。Reference picture index: means an index indicating a specific reference picture in the reference picture list.

参考画面:可意为针对画面间预测或运动补偿特定块所参考的画面。Reference picture: may mean a picture referenced by a particular block for inter-picture prediction or motion compensation.

运动矢量:是用于画面间预测或运动补偿的二维矢量,并且可意为参考画面与编码/解码目标画面之间的偏移。例如,(mvX,mvY)可表示运动矢量,mvX可表示水平分量,mvY可表示垂直分量。Motion vector: is a two-dimensional vector used for inter-picture prediction or motion compensation, and may mean an offset between a reference picture and an encoding/decoding target picture. For example, (mvX, mvY) may represent the motion vector, mvX may represent the horizontal component, and mvY may represent the vertical component.

运动矢量候选:可意为当对运动矢量进行预测时成为预测候选的块,或者可意为该块的运动矢量。运动矢量候选可在运动矢量候选列表中被列出。Motion vector candidate: may mean a block that becomes a prediction candidate when a motion vector is predicted, or may mean a motion vector of the block. The motion vector candidates may be listed in a motion vector candidate list.

运动矢量候选列表:可意为运动矢量候选的列表。Motion Vector Candidate List: Can mean a list of motion vector candidates.

运动矢量候选索引:可意为指示运动矢量候选列表中的运动矢量候选的指示符。运动矢量候选索引也被称为运动矢量预测因子的索引。Motion Vector Candidate Index: may mean an indicator that indicates a motion vector candidate in the motion vector candidate list. The motion vector candidate index is also referred to as the index of the motion vector predictor.

运动信息:可意为包括运动矢量、参考画面索引、画面间预测指示符以及以下项中的至少任意一项的信息:参考画面列表信息、参考画面、运动矢量候选、运动矢量候选索引、合并候选和合并索引。Motion information: may mean information including motion vector, reference picture index, inter-picture prediction indicator, and at least any one of the following: reference picture list information, reference picture, motion vector candidate, motion vector candidate index, merge candidate and merged indexes.

合并候选列表:意为由合并候选组成的列表。Merge Candidate List: means a list consisting of merge candidates.

合并候选:意为空间合并候选、时间合并候选、组合合并候选、组合双向预测合并候选、零合并候选等。合并候选可具有画面间预测指示符、用于每个列表的参考画面索引、以及诸如运动矢量的运动信息。Merge candidate: means spatial merge candidate, temporal merge candidate, combined merge candidate, combined bidirectional prediction merge candidate, zero merge candidate, and the like. A merge candidate may have an inter-picture prediction indicator, a reference picture index for each list, and motion information such as a motion vector.

合并索引:意为指示合并候选列表内的合并候选的信息。合并索引可指示与当前块在空间和/或时间上相邻的重建块之中的用于推导合并候选的块。合并索引可指示由合并候选拥有的运动信息中的至少一项。Merge index: means information indicating merge candidates within the merge candidate list. The merge index may indicate a block used to derive a merge candidate among reconstructed blocks that are spatially and/or temporally adjacent to the current block. The merge index may indicate at least one item of motion information owned by the merge candidate.

变换单元:意为当对残差信号执行编码/解码(诸如变换、逆变换、量化、反量化以及变换系数编码/解码)时的基本单元。单个变换单元可被分区为具有小尺寸的多个变换单元。Transform unit: means a basic unit when encoding/decoding such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding/decoding is performed on a residual signal. A single transform unit may be partitioned into multiple transform units having small sizes.

缩放:意为将变换系数等级与因子相乘的处理。可通过对变换系数等级进行缩放来产生变换系数。缩放还可被称为反量化。Scaling: means the process of multiplying transform coefficient levels by factors. Transform coefficients may be generated by scaling transform coefficient levels. Scaling can also be referred to as inverse quantization.

量化参数:可意为在量化期间产生变换系数的变换系数等级时使用的值。量化参数也可以意为在反量化期间通过对变换系数等级进行缩放产生变换系数时使用的值。量化参数可以是被映射在量化步长大小上的值。Quantization parameter: may mean the value used when generating the transform coefficient level of the transform coefficient during quantization. A quantization parameter may also mean a value used in generating transform coefficients by scaling transform coefficient levels during inverse quantization. The quantization parameter may be a value mapped on the quantization step size.

变量增量(Delta)量化参数:意为编码/解码目标单元的量化参数与预测出的量化参数之间的差值。Variable delta (Delta) quantization parameter: means the difference between the quantization parameter of the encoding/decoding target unit and the predicted quantization parameter.

扫描:意为对块或矩阵内的系数进行排序的方法。例如,将系数的二维矩阵改变为一维矩阵的操作可被称为扫描,并且将系数的一维矩阵改变为二维矩阵的操作可被称为扫描或逆扫描。Scan: means a method of ordering the coefficients within a block or matrix. For example, changing a two-dimensional matrix of coefficients to a one-dimensional matrix may be referred to as scanning, and changing a one-dimensional matrix of coefficients to a two-dimensional matrix may be referred to as scanning or inverse scanning.

变换系数:可意为在编码器中执行变换之后产生的系数值。变换系数可意为在解码器中执行了熵解码和反量化中的至少一个之后产生的系数值。通过对变换系数或残差信号进行量化而获得的量化的等级或量化的变换系数等级也可落在变换系数的含义内。Transform coefficients: may mean coefficient values that are generated after transform is performed in the encoder. Transform coefficients may mean coefficient values generated after at least one of entropy decoding and inverse quantization is performed in a decoder. Quantized levels or quantized transform coefficient levels obtained by quantizing transform coefficients or residual signals may also fall within the meaning of transform coefficients.

量化的等级:意为在编码器中通过对变换系数或残差信号进行量化而产生的值。可选地,量化的等级可意为作为在解码器中经历反量化的反量化目标的值。类似地,作为变换和量化的结果的量化的变换系数等级也可落在量化的等级的含义内。Level of quantization: means the value produced by quantizing the transform coefficients or residual signal in the encoder. Alternatively, the level of quantization may mean a value that is an inverse quantization target that undergoes inverse quantization in the decoder. Similarly, quantized transform coefficient levels that are the result of transform and quantization may also fall within the meaning of quantized levels.

非零变换系数:意为值不为0的变换系数,或者意为值不为0的变换系数等级。Non-zero transform coefficient: means a transform coefficient whose value is not 0, or means a transform coefficient level whose value is not 0.

量化矩阵:意为在执行的量化处理或反量化处理中使用以便提高主观图像质量或客观图像质量的矩阵。量化矩阵也可被称为缩放列表。Quantization matrix: means a matrix used in the quantization process or inverse quantization process performed in order to improve the subjective image quality or the objective image quality. The quantization matrix may also be referred to as a scaling list.

量化矩阵系数:意为量化矩阵内的每个元素。量化矩阵系数也可被称为矩阵系数。Quantization matrix coefficients: means to quantize each element in the matrix. The quantized matrix coefficients may also be referred to as matrix coefficients.

默认矩阵:意为在编码器或解码器中被初步定义的预定量化矩阵。Default matrix: means a predetermined quantization matrix that is preliminarily defined in the encoder or decoder.

非默认矩阵:意为在编码器或解码器中未被初步定义但由用户用信号发送的量化矩阵。Non-default matrix: means a quantization matrix not initially defined in the encoder or decoder but signaled by the user.

图1是示出根据被应用了本发明的实施例的编码设备的构造的框图。FIG. 1 is a block diagram showing the configuration of an encoding apparatus according to an embodiment to which the present invention is applied.

编码设备100可以是编码器、视频编码设备或图像编码设备。视频可包括至少一个图像。编码设备100可顺序地对所述至少一个图像进行编码。The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. The video may include at least one image. The encoding apparatus 100 may sequentially encode the at least one image.

参照图1,编码设备100可包括运动预测单元111、运动补偿单元112、帧内预测单元120、切换器115、减法器125、变换单元130、量化单元140、熵编码单元150、反量化单元160、逆变换单元170、加法器175、滤波器单元180以及参考画面缓冲器190。1 , the encoding apparatus 100 may include a motion prediction unit 111 , a motion compensation unit 112 , an intra prediction unit 120 , a switch 115 , a subtractor 125 , a transform unit 130 , a quantization unit 140 , an entropy encoding unit 150 , and an inverse quantization unit 160 , an inverse transform unit 170 , an adder 175 , a filter unit 180 , and a reference picture buffer 190 .

编码设备100可通过使用帧内模式或帧间模式或者是帧内模式和帧间模式两者来对输入画面执行编码。此外,编码设备100可通过对输入画面进行编码来产生比特流,并可输出产生的比特流。产生的比特流可被存储在计算机可读记录介质中,或者可通过有线/无线传输介质被流传输。当帧内模式被用作预测模式时,切换器115可切换到帧内。可选地,当帧间模式被用作预测模式时,切换器115可切换到帧间模式。这里,帧内模式可意为帧内预测模式,帧间模式可意为帧间预测模式。编码设备100可产生输入图像的输入块的预测块。此外,在产生预测块之后,编码设备100可对输入块和预测块之间的残差进行编码。输入图像可被称为作为当前编码目标的当前图像。输入块可被称为作为当前编码目标的当前块或者可被称为编码目标块。The encoding apparatus 100 may perform encoding on the input picture by using the intra mode or the inter mode or both the intra mode and the inter mode. Also, the encoding apparatus 100 may generate a bitstream by encoding an input picture, and may output the generated bitstream. The generated bit stream may be stored in a computer-readable recording medium, or may be streamed through a wired/wireless transmission medium. When the intra mode is used as the prediction mode, the switch 115 may switch to intra. Alternatively, when the inter mode is used as the prediction mode, the switch 115 may switch to the inter mode. Here, the intra mode may mean an intra prediction mode, and the inter mode may mean an inter prediction mode. The encoding apparatus 100 may generate a prediction block of an input block of an input image. Also, after generating the prediction block, the encoding apparatus 100 may encode the residual between the input block and the prediction block. The input image may be referred to as the current image that is the current encoding target. The input block may be referred to as a current block that is a current encoding target or may be referred to as an encoding target block.

当预测模式是帧内模式时,帧内预测单元120可使用与当前块相邻的已编码/解码的块的像素值作为参考像素。帧内预测单元120可通过使用参考像素来执行空间预测,或者可通过执行空间预测来产生输入块的预测样点。这里,帧内预测可意为帧之内的预测。When the prediction mode is the intra mode, the intra prediction unit 120 may use pixel values of encoded/decoded blocks adjacent to the current block as reference pixels. The intra prediction unit 120 may perform spatial prediction by using reference pixels, or may generate prediction samples of the input block by performing spatial prediction. Here, intra prediction may mean prediction within a frame.

当预测模式是帧间模式时,运动预测单元111可在执行运动预测时从参考图像搜索与输入块最匹配的区域,并可通过使用搜索到的区域推导运动矢量。参考图像可被存储在参考画面缓冲器190中。When the prediction mode is the inter mode, the motion prediction unit 111 may search for an area that best matches the input block from a reference image when performing motion prediction, and may derive a motion vector by using the searched area. Reference images may be stored in the reference picture buffer 190 .

运动补偿单元112可通过使用运动矢量执行运动补偿来产生预测块。这里,帧间预测可意为帧之间的预测或运动补偿。Motion compensation unit 112 may generate a prediction block by performing motion compensation using the motion vector. Here, inter prediction may mean prediction or motion compensation between frames.

当运动矢量的值不为整数时,运动预测单元111和运动补偿单元112可通过对参考画面的部分区域应用插值滤波器来产生预测块。为了对编码单元执行画面间预测或运动补偿,可确定跳过模式、合并模式、高级运动矢量预测(AMVP)模式和当前画面参考模式之中的哪种模式被用于相应编码单元中包括的预测单元的运动预测和运动补偿。然后,可根据确定的模式不同地执行画面间预测或运动补偿。When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial region of the reference picture. In order to perform inter-picture prediction or motion compensation on a coding unit, it may be determined which mode among skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and current picture reference mode is used for prediction included in the corresponding coding unit Motion prediction and motion compensation for cells. Then, inter-picture prediction or motion compensation may be differently performed according to the determined mode.

减法器125可通过使用输入块和预测块之间的残差来产生残差块。残差块可被称为残差信号。残差信号可意为原始信号与预测信号之间的差。另外,残差信号可以是通过对原始信号和预测信号之间的差进行变换或量化、或者进行变换和量化而产生的信号。残差块可以是块单元的残差信号。The subtractor 125 may generate a residual block by using the residual between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may mean the difference between the original signal and the predicted signal. In addition, the residual signal may be a signal generated by transforming or quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a block-unit residual signal.

变换单元130可通过对残差块执行变换来产生变换系数,并可输出产生的变换系数。这里,变换系数可以是通过对残差块执行变换而产生的系数值。当变换跳过模式被应用时,变换单元130可跳过对残差块的变换。The transform unit 130 may generate transform coefficients by performing transform on the residual block, and may output the generated transform coefficients. Here, the transform coefficients may be coefficient values generated by performing transform on the residual block. When transform skip mode is applied, transform unit 130 may skip transforming the residual block.

可通过对变换系数或对残差信号应用量化来产生量化的等级。在下文中,在实施例中,量化的等级也可被称为变换系数。The quantized levels may be generated by applying quantization to the transform coefficients or to the residual signal. Hereinafter, in an embodiment, the level of quantization may also be referred to as a transform coefficient.

量化单元140可通过根据参数对变换系数或残差信号进行量化来产生量化的等级,并可输出所产生的量化的等级。这里,量化单元140可通过使用量化矩阵来对变换系数进行量化。The quantization unit 140 may generate a quantized level by quantizing a transform coefficient or a residual signal according to a parameter, and may output the generated quantized level. Here, the quantization unit 140 may quantize the transform coefficients by using a quantization matrix.

熵编码单元150可通过根据概率分布对由量化单元140计算出的值或对在执行编码时计算出的编码参数值执行熵编码来产生比特流,并可输出产生的比特流。熵编码单元150可对图像的像素信息和用于对图像进行解码的信息执行熵编码。例如,用于对图像进行解码的信息可包括语法元素。The entropy encoding unit 150 may generate a bitstream by performing entropy encoding on a value calculated by the quantization unit 140 or an encoding parameter value calculated when encoding is performed according to a probability distribution, and may output the generated bitstream. The entropy encoding unit 150 may perform entropy encoding on pixel information of the image and information for decoding the image. For example, the information used to decode the image may include syntax elements.

当熵编码被应用时,可按照对具有高生成机会的符号分配较少数量的比特并对具有低生成机会的符号分配较多数量的比特方式来表示符号,从而可减小用于将被编码的符号的比特流的大小。熵编码单元150可使用诸如指数哥伦布、上下文自适应变长编码(CAVLC)、上下文自适应二进制算术编码(CABAC)等用于熵编码的编码方法。例如,熵编码单元150可通过使用变长编码/码(VLC)表来执行熵编码。此外,熵编码单元150可推导目标符号的二值化方法以及目标符号/二进制位的概率模型,并且可通过使用推导出的二值化方法和上下文模型来执行算术编码。When entropy coding is applied, symbols can be represented in such a way that a smaller number of bits are allocated to symbols with a high generation chance and a larger number of bits are allocated to symbols with a low generation chance, thereby reducing the amount of time needed to be coded. The size of the bitstream of symbols. The entropy encoding unit 150 may use an encoding method for entropy encoding such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC). For example, the entropy encoding unit 150 may perform entropy encoding by using a variable length coding/code (VLC) table. Also, the entropy encoding unit 150 may derive a binarization method of the target symbol and a probability model of the target symbol/bin, and may perform arithmetic encoding by using the derived binarization method and context model.

为了对变换系数等级进行编码,熵编码单元150可通过使用变换系数扫描方法将二维块形式的系数改变为一维矢量形式。In order to encode the transform coefficient level, the entropy encoding unit 150 may change the coefficients in a two-dimensional block form into a one-dimensional vector form by using a transform coefficient scanning method.

编码参数可包括在编码器中编码并用信号传送到解码器的诸如语法元素的信息(标志、索引等)以及在执行编码或解码时被推导出的信息。编码参数可意为在对图像进行编码或解码时所需的信息。例如,编码参数可包括以下项中的至少一个值或组合形式:单元/块尺寸、单元/块深度、单元/块分区信息、单元/块分区结构、是否进行四叉树形式的分区、是否进行二叉树形式的分区、二叉树形式的分区方向(水平方向或垂直方向)、二叉树形式的分区形式(对称分区或非对称分区)、帧内预测模式/方向、参考样点滤波方法、预测块滤波方法、预测块滤波器抽头、预测块滤波器系数、帧间预测模式、运动信息、运动矢量、参考画面索引、帧间预测角度、帧间预测指示符、参考画面列表、参考画面、运动矢量预测因子候选、运动矢量候选列表、是否使用合并模式、合并候选、合并候选列表、是否使用跳过模式、插值滤波器类型、插值滤波器抽头、插值滤波器系数、运动矢量大小、运动矢量的表示精度、变换类型、变换大小、是否使用初次(首次)变换的信息、是否使用二次变换的信息、初次变换索引、二次变换索引、残差信号是否存在的信息、编码块样式、编码块标志(CBF)、量化参数、量化矩阵、是否应用环路内滤波器、环路内滤波器系数、环路内滤波器抽头、环路内滤波器形状/形式、是否应用去块滤波器、去块滤波器系数、去块滤波器抽头、去块滤波器强度、去块滤波器形状/形式、是否应用自适应样点偏移、自适应样点偏移值、自适应样点偏移类别、自适应样点偏移类型、是否应用自适应环内滤波器、自适应环内滤波器系数、自适应环内滤波器抽头、自适应环内滤波器形状/形式、二值化/反二值化方法、上下文模型确定方法、上下文模型更新方法、是否执行常规模式、是否执行旁路模式、上下文二进制位、旁通二进制位、变换系数、变换系数等级、变换系数等级扫描方法、图像显示/输出顺序、条带识别信息、条带类型、条带分区信息、并行块识别信息、并行块类型、并行块分区信息、画面类型、比特深度、以及亮度信号或色度信号的信息。Encoding parameters may include information such as syntax elements (flags, indices, etc.) encoded in the encoder and signaled to the decoder, as well as information derived when encoding or decoding is performed. Encoding parameters may mean information required when encoding or decoding an image. For example, the encoding parameters may include at least one value or combination of the following: unit/block size, unit/block depth, unit/block partition information, unit/block partition structure, whether to perform quad-tree partitioning, whether to perform Partition in binary tree form, partition direction in binary tree form (horizontal direction or vertical direction), partition form in binary tree form (symmetric partition or asymmetric partition), intra prediction mode/direction, reference sample filtering method, prediction block filtering method, Prediction Block Filter Taps, Prediction Block Filter Coefficients, Inter Prediction Mode, Motion Information, Motion Vector, Reference Picture Index, Inter Prediction Angle, Inter Prediction Indicator, Reference Picture List, Reference Picture, Motion Vector Predictor Candidate , motion vector candidate list, whether to use merge mode, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter tap, interpolation filter coefficient, motion vector size, motion vector representation precision, transform Type, transform size, information on whether to use primary (first) transform, information on whether to use secondary transform, primary transform index, secondary transform index, information on whether residual signal exists, coding block style, coding block flag (CBF) , quantization parameter, quantization matrix, whether to apply in-loop filter, in-loop filter coefficients, in-loop filter taps, in-loop filter shape/form, whether to apply deblocking filter, deblocking filter coefficients , DF tap, DF strength, DF shape/form, whether to apply Adaptive Sample Offset, Adaptive Sample Offset Value, Adaptive Sample Offset Category, Adaptive Sample Offset type, whether to apply adaptive in-loop filter, adaptive in-loop filter coefficients, adaptive in-loop filter taps, adaptive in-loop filter shape/form, binarization/de-binarization method, context Model determination method, context model update method, whether to execute normal mode, whether to execute bypass mode, context bins, bypass bins, transform coefficients, transform coefficient levels, transform coefficient level scan method, image display/output order, stripes Identification information, slice type, slice partition information, parallel block identification information, parallel block type, parallel block partition information, picture type, bit depth, and information of luma signal or chroma signal.

这里,用信号传送标志或索引可意为相应标志或索引被编码器熵编码并包括在比特流中,并且可意为相应标志或索引被解码器从比特流熵解码。Here, signaling a flag or index may mean that the corresponding flag or index is entropy-encoded by the encoder and included in the bitstream, and may mean that the corresponding flag or index is entropy-decoded by the decoder from the bitstream.

当编码设备100通过帧间预测执行编码时,编码的当前图像可被用作针对被随后处理的另一图像的参考图像。因此,编码设备100可对编码的当前图像进行重建或解码,或者可将重建或解码的图像存储为参考图像。When the encoding apparatus 100 performs encoding through inter prediction, the encoded current image may be used as a reference image for another image that is subsequently processed. Accordingly, the encoding apparatus 100 may reconstruct or decode the encoded current image, or may store the reconstructed or decoded image as a reference image.

量化的等级可在反量化单元160中被反量化,或者可在逆变换单元170中被逆变换。可由加法器175将经过反量化或逆变换的系数或者经过反量化和逆变换两者的系数与预测块相加。通过将经过反量化或逆变换的系数或者经过反量化和逆变换两者的系数与预测块相加,可产生重建块。这里,经过反量化或逆变换的系数或者经过反量化和逆变换两者的系数可意为被执行了反量化和逆变换中的至少一个的系数,并且可意为重建残差块。The quantized levels may be inverse quantized in the inverse quantization unit 160 , or may be inversely transformed in the inverse transform unit 170 . The inverse quantized or inverse transformed coefficients or both inverse quantized and inverse transformed coefficients may be added to the prediction block by the adder 175 . A reconstructed block may be generated by adding the inverse quantized or inverse transformed coefficients, or both inverse quantized and inverse transformed coefficients, to the prediction block. Here, the inverse-quantization or inverse-transformed coefficients or both inverse-quantization and inverse-transformation coefficients may mean coefficients on which at least one of inverse quantization and inverse transformation is performed, and may mean a reconstructed residual block.

重建块可通过滤波器单元180。滤波器单元180可向重建块或重建图像应用去块滤波器、样点自适应偏移(SAO)以及自适应环路滤波器(ALF)中的至少一个。滤波器单元180可被称为环内滤波器。The reconstructed block may pass through filter unit 180 . Filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or reconstructed image. Filter unit 180 may be referred to as an in-loop filter.

去块滤波器可去除在块之间的边界处产生的块失真。为了确定是否应用去块滤波器,可基于在包括在块中的若干行或列中所包括的像素来确定是否对当前块应用去块滤波器。当去块滤波器被应用于块时,可根据所需的去块滤波强度来应用另一滤波器。A deblocking filter can remove block distortions generated at boundaries between blocks. In order to determine whether to apply the deblocking filter, whether to apply the deblocking filter to the current block may be determined based on pixels included in several rows or columns included in the block. When a deblocking filter is applied to a block, another filter may be applied according to the desired deblocking filtering strength.

为了对编码误差进行补偿,可通过使用样点自适应偏移将适当偏移值添加到像素值。样点自适应偏移可根据像素单位对经过去块的图像与原始图像的偏移进行校正。可使用考虑关于每个像素的边缘信息来应用偏移的方法,或使用以下方法:将图像的像素分区为预定数量的区域,确定被应用偏移的区域,并对所确定区域应用偏移。To compensate for encoding errors, appropriate offset values can be added to pixel values by using sample adaptive offsets. The sample adaptive offset can correct the offset between the deblocked image and the original image on a pixel-by-pixel basis. A method of applying the offset considering edge information about each pixel may be used, or a method of partitioning the pixels of the image into a predetermined number of areas, determining the area to which the offset is applied, and applying the offset to the determined area.

自适应环路滤波器可基于滤波后的重建图像与原始图像之间的比较结果执行滤波。图像中包括的像素可被分区为预定组,将被应用于每个组的滤波器可被确定,并且不同的滤波可针对每个组被执行。关于是否应用ALF的信息可按照编码单元(CU)被用信号发送,并且将被应用于每个块的ALF的形状和系数可变化。The adaptive loop filter may perform filtering based on a comparison between the filtered reconstructed image and the original image. Pixels included in the image may be partitioned into predetermined groups, filters to be applied to each group may be determined, and different filtering may be performed for each group. Information on whether to apply ALF may be signaled per coding unit (CU), and the shape and coefficients of ALF to be applied to each block may vary.

经过滤波器单元180的重建块或重建图像可被存储在参考画面缓冲器190中。图2是示出根据实施例的被应用了本发明的解码设备的构造的框图。The reconstructed blocks or reconstructed images passed through the filter unit 180 may be stored in the reference picture buffer 190 . FIG. 2 is a block diagram showing the configuration of a decoding apparatus to which the present invention is applied, according to an embodiment.

解码设备200可以是解码器、视频解码设备或图像解码设备。The decoding device 200 may be a decoder, a video decoding device, or an image decoding device.

参照图2,解码设备200可包括熵解码单元210、反量化单元220、逆变换单元230、帧内预测单元240、运动补偿单元250、加法器255、滤波器单元260以及参考画面缓冲器270。2 , the decoding apparatus 200 may include an entropy decoding unit 210 , an inverse quantization unit 220 , an inverse transform unit 230 , an intra prediction unit 240 , a motion compensation unit 250 , an adder 255 , a filter unit 260 , and a reference picture buffer 270 .

解码设备200可接收从编码设备100输出的比特流。解码设备200可接收在计算机可读记录介质中存储的比特流,或者可接收通过有线/无线传输介质被流传输的比特流。解码设备200可通过使用帧内模式或帧间模式对比特流进行解码。此外,解码设备200可产生通过进行解码而产生的重建图像或者解码图像,并可输出重建图像或解码图像。The decoding apparatus 200 may receive the bit stream output from the encoding apparatus 100 . The decoding apparatus 200 may receive a bitstream stored in a computer-readable recording medium, or may receive a bitstream streamed through a wired/wireless transmission medium. The decoding apparatus 200 may decode the bitstream by using the intra mode or the inter mode. Also, the decoding apparatus 200 may generate a reconstructed image or a decoded image generated by performing the decoding, and may output the reconstructed image or the decoded image.

当在解码时使用的预测模式是帧内模式时,切换器可被切换到帧内。可选地,当在解码时使用的预测模式是帧间模式时,切换器可被切换到帧间模式。When the prediction mode used in decoding is intra mode, the switch may be switched to intra. Alternatively, when the prediction mode used in decoding is the inter mode, the switch may be switched to the inter mode.

解码设备200可通过对输入的比特流进行解码来获得重建残差块,并可产生预测块。当重建残差块和预测块被获得时,解码设备200可通过将重建残差块与预测块相加来产生成为解码目标的重建块。解码目标块可被称为当前块。The decoding apparatus 200 may obtain a reconstructed residual block by decoding an input bitstream, and may generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding apparatus 200 may generate a reconstructed block to be a decoding target by adding the reconstructed residual block to the prediction block. The decoding target block may be referred to as a current block.

熵解码单元210可通过根据概率分布对比特流进行熵解码来产生符号。产生的符号可包括量化的等级形式的符号。这里,熵解码方法可以是上述熵编码方法的逆处理。The entropy decoding unit 210 may generate symbols by entropy decoding the bitstream according to the probability distribution. The generated symbols may include quantized, graded symbols. Here, the entropy decoding method may be an inverse process of the entropy encoding method described above.

为了对变换系数等级进行解码,熵解码单元210可通过使用变换系数扫描方法将一维矢量形式的系数改变为二维块形式。In order to decode the transform coefficient level, the entropy decoding unit 210 may change the coefficients in the form of a one-dimensional vector to the form of a two-dimensional block by using a transform coefficient scanning method.

量化的等级可在反量化单元220中被反量化,或者可在逆变换单元230中被逆变换。量化的等级可以是进行反量化或逆变换或者进行反量化和逆变换两者的结果,并且可被产生为重建残差块。这里,反量化单元220可对量化的等级应用量化矩阵。The quantized levels may be inverse quantized in the inverse quantization unit 220 , or may be inversely transformed in the inverse transform unit 230 . The level of quantization may be the result of inverse quantization or inverse transform, or both, and may be produced as a reconstructed residual block. Here, the inverse quantization unit 220 may apply a quantization matrix to the quantized level.

当帧内模式被使用时,帧内预测单元240可通过执行空间预测来产生预测块,其中,空间预测使用与解码目标块相邻的已经被解码的块的像素值。When the intra mode is used, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using pixel values of already decoded blocks adjacent to the decoding target block.

当帧间模式被使用时,运动补偿单元250可通过执行运动补偿来产生预测块,其中,运动补偿使用存储在参考画面缓冲器270中的参考图像以及运动矢量。When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation using a reference image and a motion vector stored in the reference picture buffer 270 .

加法器255可通过将重建残差块与预测块相加来产生重建块。滤波器单元260可对重建块或重建图像应用去块滤波器、样点自适应偏移和自适应环路滤波器中的至少一个。滤波器单元260可输出重建图像。重建块或重建图像可被存储在参考画面缓冲器270中,并可在执行帧间预测时被使用。The adder 255 may generate the reconstructed block by adding the reconstructed residual block to the prediction block. Filter unit 260 may apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or reconstructed image. The filter unit 260 may output the reconstructed image. The reconstructed block or reconstructed image may be stored in the reference picture buffer 270 and may be used when performing inter prediction.

图3是示意性地示出当对图像进行编码和解码时的图像的分区结构的示图。图3示意性地示出将单个单元分区为多个下级单元的示例。FIG. 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded. FIG. 3 schematically shows an example of partitioning a single cell into multiple subordinate cells.

为了对图像进行有效分区,当进行编码和解码时,可使用编码单元(CU)。编码单元可被用作在对图像进行编码/解码时的基本单元。另外,编码单元可被用作在对图像进行编码/解码时用于对帧内模式和帧间模式进行区分的单元。编码单元可以是用于对变换系数进行预测、变换、量化、逆变换、反量化或编码/解码处理的基本单元。For efficient partitioning of images, coding units (CUs) may be used when encoding and decoding. The coding unit may be used as a basic unit when encoding/decoding an image. In addition, the coding unit may be used as a unit for distinguishing intra mode and inter mode when encoding/decoding an image. A coding unit may be a basic unit for predicting, transforming, quantizing, inverse transforming, inverse quantizing, or encoding/decoding processing of transform coefficients.

参照图3,图像300按照最大编码单元(LCU)被顺序地分区,并且LCU单元被确定为分区结构。这里,LCU可以按照与编码树单元(CTU)相同的含义被使用。单元分区可意为对与单元相关联的块进行分区。在块分区信息中,可包括单元深度的信息。深度信息可表示单元被分区的次数或程度或者次数和程度两者。可基于树结构在与深度信息相关联的层中对单个单元进行分区。每个被分区出的下级单元可具有深度信息。深度信息可以是表示CU的尺寸的信息,并且可被存储在每个CU中。Referring to FIG. 3 , a picture 300 is sequentially partitioned according to largest coding units (LCUs), and the LCU units are determined as a partition structure. Here, the LCU may be used in the same meaning as a coding tree unit (CTU). Cell partitioning may mean partitioning the blocks associated with the cell. In the block partition information, information of the unit depth may be included. The depth information may represent the number or extent or both the number and extent of the cell being partitioned. A single unit may be partitioned in layers associated with depth information based on a tree structure. Each partitioned subordinate unit may have depth information. The depth information may be information representing the size of a CU, and may be stored in each CU.

分区结构可意为在LCU 310中的编码单元(CU)的分布。可根据是否将单个CU分区为多个(等于或大于2的正整数,包括2、4、8、16等)CU来确定这样的分布。通过进行分区而产生的CU的水平尺寸和垂直尺寸可分别是CU在进行分区之前的水平尺寸和垂直尺寸的一半,或者根据进行分区的次数可分别具有比分区之前的水平尺寸和垂直尺寸小的尺寸。CU可被递归地分区为多个CU。可递归地对CU执行分区直到预定义深度或预定义尺寸为止。例如,LCU的深度可以是0,并且最小编码单元(SCU)的深度可以是预定义的最大深度。这里,LCU可以是具有最大编码单元尺寸的编码单元,SCU可以是具有如上所述的最小编码单元尺寸的编码单元。从LCU 310开始进行分区,当CU的水平尺寸或垂直尺寸或者水平尺寸和垂直尺寸两者通过进行分区而减小时,CU深度增加1。The partition structure may mean the distribution of coding units (CUs) in the LCU 310 . Such a distribution may be determined depending on whether a single CU is partitioned into multiple (positive integers equal to or greater than 2, including 2, 4, 8, 16, etc.) CUs. The horizontal and vertical sizes of the CU generated by partitioning may be half of the horizontal and vertical sizes of the CU before partitioning, respectively, or may have smaller horizontal and vertical sizes, respectively, than those before partitioning according to the number of partitioning size. A CU may be recursively partitioned into multiple CUs. Partitioning of a CU may be performed recursively up to a predefined depth or a predefined size. For example, the depth of the LCU may be 0, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth. Here, the LCU may be a coding unit having the largest coding unit size, and the SCU may be a coding unit having the smallest coding unit size as described above. Starting from LCU 310 for partitioning, the CU depth is increased by 1 when the horizontal size or vertical size or both of the CU's horizontal size and vertical size are reduced by partitioning.

另外,可通过使用CU的分区信息来表示关于CU是否被分区的信息。分区信息可以是1比特信息。除了SCU之外的所有CU可包括分区信息。例如,当分区信息的值是第一值时,CU可不被分区,当分区信息的值是第二值时,CU可被分区。Also, information on whether the CU is partitioned may be represented by using partition information of the CU. The partition information may be 1-bit information. All CUs except SCUs may include partition information. For example, when the value of the partition information is the first value, the CU may not be partitioned, and when the value of the partition information is the second value, the CU may be partitioned.

参照图3,具有深度0的LCU可以是64×64的块。0可以是最小深度。具有深度3的SCU可以是8×8的块。3可以是最大深度。32×32的块和16×16的块的CU可分别被表示为深度1和深度2。Referring to FIG. 3 , an LCU with depth 0 may be a 64×64 block. 0 can be the minimum depth. An SCU with depth 3 may be an 8x8 block. 3 can be the maximum depth. CUs for a 32x32 block and a 16x16 block may be denoted as depth 1 and depth 2, respectively.

例如,当单个编码单元被分区为四个编码单元时,分区出的四个编码单元的水平尺寸和垂直尺寸可以是CU在被分区之前的水平尺寸和垂直尺寸的一半大小。在一个实施例中,当具有32×32尺寸的编码单元被分区为四个编码单元时,分区出的四个编码单元中的每一个可具有16×16尺寸。当单个编码单元被分区为四个编码单元时,可以称编码单元可被分区为四叉树形式。For example, when a single coding unit is partitioned into four coding units, the horizontal and vertical sizes of the partitioned four coding units may be half the horizontal and vertical sizes of the CU before being partitioned. In one embodiment, when a coding unit having a size of 32×32 is partitioned into four coding units, each of the partitioned four coding units may have a size of 16×16. When a single coding unit is partitioned into four coding units, it may be said that the coding unit may be partitioned into a quad-tree form.

例如,当单个编码单元被分区为两个编码单元时,所述两个编码单元的水平尺寸或垂直尺寸可以是编码单元在被分区之前的水平尺寸或垂直尺寸的一半。例如,当具有32×32尺寸的编码单元按照垂直方向被分区时,分区出的两个编码单元中的每一个可具有16×32的尺寸。当单个编码单元被分区为两个编码单元时,可以称编码单元按照二叉树形式被分区。图3的LCU 320是被应用四叉树形式的分区和二叉树形式的分区两者的LCU的示例。For example, when a single coding unit is partitioned into two coding units, the horizontal or vertical size of the two coding units may be half of the horizontal or vertical size of the coding unit before being partitioned. For example, when a coding unit having a size of 32×32 is partitioned in a vertical direction, each of the partitioned two coding units may have a size of 16×32. When a single coding unit is partitioned into two coding units, the coding unit may be said to be partitioned in a binary tree form. The LCU 320 of FIG. 3 is an example of an LCU to which both quad-tree form partitions and binary tree form partitions are applied.

图4是示出画面间预测处理的实施例的示图。FIG. 4 is a diagram illustrating an example of an inter-picture prediction process.

在图4中,矩形可表示画面。在图4中,箭头指示预测方向。画面可根据画面的编码类型被分类为帧内画面(I画面)、预测画面(P画面)和双向预测画面(B画面)。In FIG. 4, a rectangle may represent a picture. In Fig. 4, arrows indicate prediction directions. The pictures may be classified into intra pictures (I pictures), predictive pictures (P pictures), and bidirectional predictive pictures (B pictures) according to the encoding type of the pictures.

I画面可通过帧内预测被编码,而不需要进行画面间预测。P画面可通过使用关于当前块存在于一个方向(即,前向或后向)上的参考画面经由画面间预测而被编码。B画面可通过使用关于当前块被预设在两个方向(即,前向和后向)的参考画面经由画面间预测而被编码。当画面间预测被使用时,编码器可执行画面间预测或运动补偿,解码器可执行相应的运动补偿。I-pictures can be encoded by intra-frame prediction without inter-picture prediction. A P-picture may be encoded via inter-picture prediction by using a reference picture that exists in one direction (ie, forward or backward) with respect to the current block. A B picture may be encoded via inter-picture prediction by using reference pictures that are preset in two directions (ie, forward and backward) with respect to the current block. When inter-picture prediction is used, the encoder may perform inter-picture prediction or motion compensation, and the decoder may perform corresponding motion compensation.

在下文中,将详细描述画面间预测的实施例。Hereinafter, embodiments of inter-picture prediction will be described in detail.

可使用参考画面和运动信息来执行画面间预测或运动补偿。Inter-picture prediction or motion compensation may be performed using reference pictures and motion information.

可在画面间预测期间由编码设备100和解码设备200中的每一个推导当前块的运动信息。可通过使用重建邻近块的运动信息、同位置块(也称为col块或同位块)和/或与同位块相邻的块的运动信息来推导当前块的运动信息。同位块可意为在先前重建的同位置画面(也称为col画面或同位画面)内在空间上与当前块位于相同位置的块。同位画面可以是在参考画面列表中包括的一个或更多个参考画面之中的一个画面。The motion information of the current block may be derived by each of the encoding apparatus 100 and the decoding apparatus 200 during inter-picture prediction. The motion information of the current block may be derived by using motion information of reconstructed neighboring blocks, co-located blocks (also referred to as col blocks or co-located blocks), and/or motion information of blocks adjacent to the co-located block. A co-located block may mean a block that is spatially co-located with the current block within a previously reconstructed co-located picture (also referred to as a col picture or a co-located picture). The co-located picture may be one picture among one or more reference pictures included in the reference picture list.

推导当前块的运动信息的方法可根据当前块的预测模式而变化。例如,作为用于画面间预测的预测模式,可存在AMVP模式、合并模式、跳过模式、当前画面参考模式等。合并模式可被称为运动合并模式。The method of deriving the motion information of the current block may vary according to the prediction mode of the current block. For example, as prediction modes for inter-picture prediction, there may be AMVP mode, merge mode, skip mode, current picture reference mode, and the like. The merge mode may be referred to as a motion merge mode.

例如,当AMVP被用作预测模式时,可将重建邻近块的运动矢量、同位块的运动矢量、与同位块相邻的块的运动矢量、以及运动矢量(0,0)中的至少一个确定为用于当前块的运动矢量候选,并且通过使用运动矢量候选产生运动矢量候选列表。可通过使用产生的运动矢量候选列表推导当前块的运动矢量候选。可基于推导出的运动矢量候选来确定当前块的运动信息。同位置块的运动矢量或者与同位置块相邻的块的运动矢量可被称为时间运动矢量候选,重建邻近块的运动矢量可被称为空间运动矢量候选。For example, when AMVP is used as a prediction mode, at least one of a motion vector of a reconstructed adjacent block, a motion vector of a co-located block, a motion vector of a block adjacent to the co-located block, and a motion vector (0,0) may be determined. is a motion vector candidate for the current block, and a motion vector candidate list is generated by using the motion vector candidate. The motion vector candidates of the current block may be derived by using the generated motion vector candidate list. The motion information of the current block may be determined based on the derived motion vector candidates. A motion vector of a co-located block or a motion vector of a block adjacent to the co-located block may be referred to as a temporal motion vector candidate, and a motion vector of a reconstructed adjacent block may be referred to as a spatial motion vector candidate.

编码设备100可计算当前块的运动矢量与运动矢量候选之间的运动矢量差(MVD),并且可对运动矢量差(MVD)执行熵编码。另外,编码设备100可对运动矢量候选索引执行熵编码,并产生比特流。运动矢量候选索引可指示在运动矢量候选列表中包括的运动矢量候选之中的最佳运动矢量候选。解码设备可对包括在比特流中的运动矢量候选索引执行熵解码,并且可通过使用熵解码的运动矢量候选索引在运动矢量候选列表中包括的运动矢量候选之中选择解码目标块的运动矢量候选。另外,解码设备200可将熵解码的MVD与通过熵解码提取的运动矢量候选相加,从而推导解码目标块的运动矢量。The encoding apparatus 100 may calculate a motion vector difference (MVD) between the motion vector of the current block and the motion vector candidates, and may perform entropy encoding on the motion vector difference (MVD). Also, the encoding apparatus 100 may perform entropy encoding on the motion vector candidate index and generate a bitstream. The motion vector candidate index may indicate the best motion vector candidate among the motion vector candidates included in the motion vector candidate list. The decoding apparatus may perform entropy decoding on the motion vector candidate index included in the bitstream, and may select the motion vector candidate of the decoding target block from among the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index . In addition, the decoding apparatus 200 may add the entropy-decoded MVD to the motion vector candidates extracted through the entropy decoding, thereby deriving a motion vector of the decoding target block.

比特流可包括指示参考画面的参考画面索引。参考画面索引可被编码设备100熵编码,然后作为比特流被用信号传送到解码设备200。解码设备200可基于推导出的运动矢量和参考画面索引信息产生解码目标块的预测块。The bitstream may include a reference picture index indicating a reference picture. The reference picture index may be entropy encoded by the encoding apparatus 100 and then signaled to the decoding apparatus 200 as a bitstream. The decoding apparatus 200 may generate a prediction block of the decoding target block based on the derived motion vector and reference picture index information.

推导当前块的运动信息的方法的另一示例可以是合并模式。合并模式可意为合并多个块的运动的方法。合并模式可意为从邻近块的运动信息推导当前块的运动信息的模式。当合并模式被应用时,可使用重建邻近块的运动信息和/或同位置块的运动信息来产生合并候选列表。运动信息可包括运动矢量、参考画面索引和画面间预测指示符中的至少一个。预测指示符可指示单向预测(L0预测或L1预测)或双向预测(L0预测和L1预测)。Another example of the method of deriving the motion information of the current block may be merge mode. The merge mode may mean a method of merging motions of a plurality of blocks. The merge mode may mean a mode in which motion information of the current block is derived from motion information of neighboring blocks. When the merge mode is applied, the merge candidate list may be generated using the motion information of the reconstructed neighboring blocks and/or the motion information of the co-located blocks. The motion information may include at least one of a motion vector, a reference picture index, and an inter-picture prediction indicator. The prediction indicator may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).

合并候选列表可以是存储的运动信息的列表。在合并候选列表中包括的运动信息可以是零合并候选和新运动信息中的至少一个,其中,所述新运动信息是与当前块相邻的一个邻近块的运动信息(空间合并候选)、当前块的包括在参考画面中的同位置块的运动信息(时间合并候选)、以及在合并候选列表中存在的运动信息的组合。The merge candidate list may be a list of stored motion information. The motion information included in the merging candidate list may be at least one of a zero merging candidate and new motion information, wherein the new motion information is motion information (spatial merging candidate) of a neighboring block adjacent to the current block, current The block includes a combination of motion information (temporal merging candidates) of co-located blocks in the reference picture, and motion information present in the merging candidate list.

编码设备100可通过对合并标志和合并索引中的至少一个执行熵编码来产生比特流,并且可将比特流用信号传送到解码设备200。合并标志可以是指示是否针对每个块执行合并模式的信息,合并索引可以是指示当前块的邻近块之中的哪个邻近块是合并目标块的信息。例如,当前块的邻近块可包括在当前块左侧的左侧邻近块、位于当前块上方的上方邻近块、以及与当前块在时间上相邻的时间邻近块。The encoding apparatus 100 may generate a bitstream by performing entropy encoding on at least one of the merge flag and the merge index, and may signal the bitstream to the decoding apparatus 200 . The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which adjacent block among adjacent blocks of the current block is a merge target block. For example, neighboring blocks of the current block may include left neighboring blocks to the left of the current block, upper neighboring blocks above the current block, and temporal neighboring blocks temporally neighboring to the current block.

跳过模式可以是将邻近块的运动信息按原样应用于当前块的模式。当跳过模式被应用时,编码设备100可对哪个块的运动信息将被用作当前块的运动信息的事实的信息执行熵编码以产生比特流,并且可将该比特流用信号传送到解码设备200。编码设备100可不将关于运动矢量差信息、编码块标志和变换系数等级中的至少任意一个的语法元素用信号传送到解码设备200。The skip mode may be a mode in which motion information of an adjacent block is applied to the current block as it is. When the skip mode is applied, the encoding apparatus 100 may perform entropy encoding on information of the fact of which block's motion information is to be used as the current block's motion information to generate a bitstream, and may signal the bitstream to the decoding apparatus 200. The encoding apparatus 100 may not signal a syntax element on at least any one of the motion vector difference information, the encoding block flag, and the transform coefficient level to the decoding apparatus 200 .

当前画面参考模式可意为在当前画面内的当前块所属于的先前重建区域被用于预测的预测模式。这里,矢量可被用于指定所述先前重建区域。可通过使用当前块的参考画面索引来对指示当前块是否将以当前画面参考模式被编码的信息进行编码。指示当前块是否是以当前画面参考模式编码的块的标志或索引可被用信号传送,并且可基于当前块的参考画面索引被推导。在当前块以当前画面参考模式被编码的情况下,当前画面可被添加到用于当前块的参考画面列表以便位于参考画面列表中的固定位置或随机位置。所述固定位置可以是例如列表中的由参考画面索引0指示的位置或者最后位置。在当前画面被添加到参考画面列表以便位于所述随机位置时,可用信号传送指示所述随机位置的参考画面索引。The current picture reference mode may mean a prediction mode in which a previously reconstructed region to which the current block within the current picture belongs is used for prediction. Here, a vector may be used to specify the previously reconstructed area. The information indicating whether the current block is to be encoded in the current picture reference mode may be encoded by using the reference picture index of the current block. A flag or index indicating whether the current block is a block encoded in the current picture reference mode may be signaled and may be derived based on the reference picture index of the current block. In the case where the current block is encoded in the current picture reference mode, the current picture may be added to the reference picture list for the current block so as to be at a fixed position or a random position in the reference picture list. The fixed position may be, for example, the position indicated by the reference picture index 0 or the last position in the list. When the current picture is added to the reference picture list so as to be at the random location, a reference picture index indicating the random location may be signaled.

基于以上描述,下面将详细描述根据本发明的实施例的图像编码方法和图像解码方法。Based on the above description, the image encoding method and the image decoding method according to the embodiments of the present invention will be described in detail below.

图5是示出根据本发明的一个实施例的图像编码方法的流程图,图6是示出根据本发明的一个实施例的图像解码方法的流程图。FIG. 5 is a flowchart illustrating an image encoding method according to an embodiment of the present invention, and FIG. 6 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

参照图5,编码设备可推导运动矢量候选(步骤S501),并且可基于推导出的运动矢量候选产生运动矢量候选列表(步骤S502)。在运动矢量候选列表被产生之后,可基于产生的运动矢量候选列表确定运动矢量(步骤S503),并且可基于确定的运动矢量执行运动补偿(步骤S504)。此后,编码设备可对与运动补偿相关联的信息进行编码(步骤S505)。5, the encoding apparatus may derive motion vector candidates (step S501), and may generate a motion vector candidate list based on the derived motion vector candidates (step S502). After the motion vector candidate list is generated, a motion vector may be determined based on the generated motion vector candidate list (step S503 ), and motion compensation may be performed based on the determined motion vector (step S504 ). Thereafter, the encoding apparatus may encode information associated with motion compensation (step S505).

参照图6,解码设备可对从编码设备接收到的与运动补偿相关联的信息执行熵解码(步骤S601),并且可推导运动矢量候选(步骤S602)。解码设备可基于推导出的运动矢量候选产生运动矢量候选列表(步骤S603),并使用产生的运动矢量候选列表确定运动矢量(步骤S604)。此后,解码设备可通过使用确定的运动矢量执行运动补偿(步骤S605)。6, the decoding apparatus may perform entropy decoding on the information associated with motion compensation received from the encoding apparatus (step S601), and may derive motion vector candidates (step S602). The decoding apparatus may generate a motion vector candidate list based on the derived motion vector candidates (step S603 ), and determine a motion vector using the generated motion vector candidate list (step S604 ). Thereafter, the decoding apparatus may perform motion compensation by using the determined motion vector (step S605).

图7是示出根据本发明的另一实施例的图像编码方法的流程图,图8是示出根据本发明的另一实施例的图像解码方法的流程图。FIG. 7 is a flowchart illustrating an image encoding method according to another embodiment of the present invention, and FIG. 8 is a flowchart illustrating an image decoding method according to another embodiment of the present invention.

参照图7,编码设备可推导合并候选(步骤S701),并基于推导出的合并候选产生合并候选列表。在合并候选列表被产生之后,编码设备可使用产生的合并候选列表确定运动信息(步骤S702),并且可使用确定的运动信息对当前块执行运动补偿(步骤S703)。此后,编码设备可对与运动补偿相关联的信息执行熵编码(步骤S704)。Referring to FIG. 7 , the encoding apparatus may derive merge candidates (step S701 ), and generate a merge candidate list based on the derived merge candidates. After the merge candidate list is generated, the encoding apparatus may determine motion information using the generated merge candidate list (step S702 ), and may perform motion compensation on the current block using the determined motion information (step S703 ). Thereafter, the encoding apparatus may perform entropy encoding on the information associated with the motion compensation (step S704).

参照图8,解码设备可对从编码设备接收的与运动补偿相关联的信息执行熵解码(S801),推导合并候选(S802),并基于推导出的合并候选产生合并候选列表。在合并候选列表被产生之后,解码设备可通过使用产生的合并候选列表确定当前块的运动信息(S803)。此后,解码设备可使用运动信息执行运动补偿(S804)。8 , the decoding apparatus may perform entropy decoding on the information associated with motion compensation received from the encoding apparatus ( S801 ), derive merge candidates ( S802 ), and generate a merge candidate list based on the derived merge candidates. After the merging candidate list is generated, the decoding apparatus may determine motion information of the current block by using the generated merging candidate list (S803). Thereafter, the decoding apparatus may perform motion compensation using the motion information (S804).

图5和图6示出了图4中示出的AMVP被应用的示例,图7和图8示出了图4中示出的合并模式被应用的示例。5 and 6 show examples in which the AMVP shown in FIG. 4 is applied, and FIGS. 7 and 8 show examples in which the merge mode shown in FIG. 4 is applied.

在下文中,将描述图5和图6中的每个步骤,然后将描述图7和图8中的每个步骤。然而,将共同地描述与S504、S605、S703和S804相应的运动补偿步骤以及与S505、S601、S704和S801相应的熵编码/解码步骤。Hereinafter, each step in FIGS. 5 and 6 will be described, and then each step in FIGS. 7 and 8 will be described. However, the motion compensation steps corresponding to S504, S605, S703 and S804 and the entropy encoding/decoding steps corresponding to S505, S601, S704 and S801 will be collectively described.

在下文中,下面将详细描述图5和图6中的每个步骤。Hereinafter, each step in FIGS. 5 and 6 will be described in detail below.

首先,将详细描述推导运动矢量候选的步骤(S501、S602)。First, the steps of deriving motion vector candidates (S501, S602) will be described in detail.

当前块的运动矢量候选可包括空间运动矢量候选和时间运动矢量候选之一,或者包括空间运动矢量候选和时间运动矢量候选两者。The motion vector candidates of the current block may include one of spatial motion vector candidates and temporal motion vector candidates, or both spatial motion vector candidates and temporal motion vector candidates.

可从与当前块相邻的重建块推导当前块的空间运动矢量。例如,与当前块相邻的重建块的运动矢量可被确定为当前块的空间运动矢量候选。The spatial motion vector of the current block may be derived from reconstructed blocks adjacent to the current block. For example, motion vectors of reconstructed blocks adjacent to the current block may be determined as spatial motion vector candidates of the current block.

图9是示出推导当前块的空间运动矢量候选的示例的示图。FIG. 9 is a diagram illustrating an example of deriving spatial motion vector candidates of the current block.

参照图9,可从与当前块X相邻的邻近块推导当前块的空间运动矢量候选。与当前块X相邻的邻近块包括与当前块的上端相邻的块B1、与当前块的左端相邻的块A1、与当前块的右上角相邻的块B0、与当前块的左上角相邻的块B2、以及与当前块的左下角相邻的块A0中的至少一个。与当前块相邻的邻近块可具有正方形形状或非正方形形状。当与当前块相邻的多个邻近块中的一个邻近块具有运动矢量时,可将该邻近块的运动矢量确定为当前块的空间运动矢量候选。可基于对邻近块是否存在的确定或者对邻近块是否已通过帧间预测处理被编码的确定,来确定邻近块是否具有运动矢量或者邻近块的运动矢量是否能够被用作当前块的空间运动矢量候选。可按照预定顺序执行对特定邻近块是否具有运动矢量的确定或者对邻近块的运动矢量是否能够被用作当前块的空间运动矢量候选的确定。例如,如图9中所示,可按照块A0、A1、B0、B1和B2的顺序来执行运动矢量的可用性确定。Referring to FIG. 9 , spatial motion vector candidates of the current block may be derived from neighboring blocks adjacent to the current block X. The adjacent blocks adjacent to the current block X include the block B1 adjacent to the upper end of the current block, the block A1 adjacent to the left end of the current block, the block B0 adjacent to the upper right corner of the current block, and the upper left corner of the current block. At least one of the adjacent block B2 and the block A0 adjacent to the lower left corner of the current block. Neighboring blocks adjacent to the current block may have a square shape or a non-square shape. When one adjacent block among a plurality of adjacent blocks adjacent to the current block has a motion vector, the motion vector of the adjacent block may be determined as a spatial motion vector candidate of the current block. Whether the neighboring block has a motion vector or whether the motion vector of the neighboring block can be used as the spatial motion vector of the current block may be determined based on the determination of whether the neighboring block exists or whether the neighboring block has been encoded through the inter prediction process candidate. The determination of whether a particular neighboring block has a motion vector or the determination of whether the motion vector of the neighboring block can be used as a spatial motion vector candidate of the current block may be performed in a predetermined order. For example, as shown in FIG. 9, the availability determination of the motion vector may be performed in the order of blocks A0, A1, B0, B1, and B2.

当当前块的参考画面和具有运动矢量的邻近块的参考画面彼此不同时,邻近块的运动矢量被缩放,然后缩放后的运动矢量可被用作当前块的空间运动矢量候选。可基于当前画面与当前块的参考画面之间的距离以及当前画面与邻近块的参考画面之间的距离中的至少任意一个距离来执行运动矢量缩放。这里,可通过根据当前画面和当前块的参考画面之间的距离与当前画面和邻近块的参考画面之间的距离的比率对邻近块的运动矢量进行缩放来推导当前块的空间运动矢量候选。When the reference picture of the current block and the reference pictures of neighboring blocks having motion vectors are different from each other, the motion vectors of the neighboring blocks are scaled, and then the scaled motion vectors can be used as spatial motion vector candidates of the current block. The motion vector scaling may be performed based on at least any one of a distance between the current picture and a reference picture of the current block and a distance between the current picture and a reference picture of an adjacent block. Here, the spatial motion vector candidate of the current block may be derived by scaling the motion vector of the neighboring block according to the ratio of the distance between the current picture and the reference picture of the current block to the distance between the current picture and the reference picture of the neighboring block.

然而,当当前块的参考画面索引和具有运动矢量的邻近块的参考画面索引不同时,邻近块的缩放后的运动矢量可被确定为当前块的空间运动矢量候选。即使在这种情况下,仍可基于当前画面和当前块的参考画面之间的距离以及当前画面和邻近块的参考画面之间的距离中的至少一个来执行缩放。However, when the reference picture index of the current block and the reference picture index of the neighboring block having the motion vector are different, the scaled motion vector of the neighboring block may be determined as the spatial motion vector candidate of the current block. Even in this case, scaling may be performed based on at least one of the distance between the current picture and the reference picture of the current block and the distance between the current picture and the reference picture of the neighboring block.

关于缩放,可基于由具有预定义值的参考画面索引所指示的参考画面对邻近块的运动矢量进行缩放,并且可将缩放后的运动矢量确定为当前块的空间运动矢量候选。所述预定义值可以是零或正整数。例如,可通过基于当前画面和当前块的由具有预定义值的参考画面索引所指示的参考画面之间的距离与当前画面和邻近块的具有预定义值的参考画面之间的距离的比率对邻近块的运动矢量进行缩放来推导当前块的空间运动矢量候选。Regarding scaling, motion vectors of neighboring blocks may be scaled based on a reference picture indicated by a reference picture index having a predefined value, and the scaled motion vector may be determined as a spatial motion vector candidate of the current block. The predefined value may be zero or a positive integer. For example, the distance between the current picture and the reference picture with the predefined value of the adjacent block may be compared by the ratio between the distance between the current picture and the reference picture of the current block indicated by the reference picture index with the predefined value The motion vectors of neighboring blocks are scaled to derive spatial motion vector candidates for the current block.

可选地,可基于当前块的编码参数中的至少一个来推导当前块的空间运动矢量候选。Alternatively, the spatial motion vector candidate of the current block may be derived based on at least one of the coding parameters of the current block.

可从包括在当前画面的同位画面中的重建块推导当前块的时间运动矢量候选。同位画面是在当前画面之前编码/解码的画面,并且可在时间顺序上与当前画面不同。The temporal motion vector candidates of the current block may be derived from reconstructed blocks included in co-located pictures of the current picture. A co-located picture is a picture encoded/decoded before the current picture, and may be different from the current picture in time order.

图10是示出推导当前块的时间运动矢量候选的示例的示图。FIG. 10 is a diagram illustrating an example of deriving a temporal motion vector candidate of a current block.

参照图10,可从包括当前画面的同位画面(也称为同位置画面)内与当前块X在空间上位于相同位置的块的外部位置的块推导当前块的时间运动矢量候选,或者从包括与当前块X在空间上位于相同位置的块的内部位置的块推导当前块的时间运动矢量候选。这里,时间运动矢量候选可意为当前块的同位块的运动矢量。例如,可从与在空间上与当前块X位于相同位置的块C的左下角相邻的块H推导当前块X的时间运动矢量候选,或者从包括块C的中间位置的块C3推导当前块X的时间运动矢量候选。用于推导当前块的时间运动矢量候选的块H、块C3等被称为同位置块。10, a temporal motion vector candidate for a current block may be derived from a block outside a co-located picture (also referred to as a co-located picture) including the current picture that is spatially co-located with the current block X, or from a block including The temporal motion vector candidate of the current block is derived from a block located inside a block that is spatially co-located with the current block X. Here, the temporal motion vector candidate may mean a motion vector of a co-located block of the current block. For example, the temporal motion vector candidate of the current block X may be derived from the block H adjacent to the lower left corner of the block C that is spatially co-located with the current block X, or the current block may be derived from the block C3 including the middle position of the block C Temporal motion vector candidates for X. Block H, block C3, etc. used for deriving temporal motion vector candidates of the current block are called co-located blocks.

可选地,可基于编码参数中的至少一个来推导时间运动矢量候选、同位画面、同位块、预测列表利用标志、以及参考画面索引中的至少一个。Optionally, at least one of a temporal motion vector candidate, a co-located picture, a co-located block, a prediction list utilization flag, and a reference picture index may be derived based on at least one of the encoding parameters.

当包括当前块的当前画面与当前块的参考画面之间的距离不同于包括同位块的同位画面与同位块的参考画面之间的距离时,可通过对同位块的运动矢量进行缩放来获得当前块的时间运动矢量候选。这里,可基于当前画面与当前块的参考画面之间的距离以及同位画面与同位块的参考画面之间的距离中的至少一个来执行缩放。例如,可通过根据当前画面和当前块的参考画面之间的距离与同位画面和同位块的参考画面之间的距离的比率对同位块的运动矢量进行缩放来推导当前块的时间运动矢量候选。When the distance between the current picture including the current block and the reference picture of the current block is different from the distance between the co-located picture including the co-located block and the reference picture of the co-located block, the current picture may be obtained by scaling the motion vector of the co-located block Temporal motion vector candidates for the block. Here, scaling may be performed based on at least one of the distance between the current picture and the reference picture of the current block and the distance between the co-located picture and the reference picture of the co-located block. For example, the temporal motion vector candidate for the current block may be derived by scaling the motion vector of the co-located block according to the ratio of the distance between the current picture and the reference picture of the current block to the distance between the co-located picture and the reference picture of the co-located block.

下面,将描述基于推导出的运动矢量候选产生运动矢量候选列表的步骤(S502、S503)。Next, the steps of generating a motion vector candidate list based on the derived motion vector candidates (S502, S503) will be described.

产生运动矢量候选列表的步骤可包括将运动矢量候选添加到运动矢量候选列表或者从运动矢量候选列表去除运动矢量候选的处理、以及将组合运动矢量候选添加到运动矢量候选列表的处理。The generating of the motion vector candidate list may include a process of adding or removing motion vector candidates to or from the motion vector candidate list, and a process of adding combined motion vector candidates to the motion vector candidate list.

首先,将描述将推导出的运动矢量候选添加到运动矢量候选列表或者从运动矢量候选列表去除推导出的运动矢量候选的处理。编码设备和解码设备可按照运动矢量候选被推导的顺序将推导出的运动矢量候选添加到运动矢量候选列表。First, a process of adding or removing a derived motion vector candidate to a motion vector candidate list or removing a derived motion vector candidate from the motion vector candidate list will be described. The encoding apparatus and the decoding apparatus may add the derived motion vector candidates to the motion vector candidate list in the order in which the motion vector candidates are derived.

假设运动矢量候选列表mvpListLX可意为与参考画面列表L0、L1、L2和L3相应的运动矢量候选列表。也就是说,可用mvpListL0来表示与参考画面列表L0相应的运动矢量候选列表。It is assumed that the motion vector candidate list mvpListLX may mean a motion vector candidate list corresponding to the reference picture lists L0, L1, L2, and L3. That is, the motion vector candidate list corresponding to the reference picture list L0 can be represented by mvpListL0.

除了空间运动矢量候选和时间运动矢量候选之外,还可以将具有预定值的运动矢量添加到运动矢量候选列表。例如,当运动矢量候选列表中的运动矢量候选的数量小于能够包括在运动矢量候选列表中的运动矢量候选的最大数量时,可将具有值0的运动矢量添加到运动矢量候选列表。In addition to the spatial motion vector candidates and the temporal motion vector candidates, a motion vector having a predetermined value may be added to the motion vector candidate list. For example, when the number of motion vector candidates in the motion vector candidate list is less than the maximum number of motion vector candidates that can be included in the motion vector candidate list, a motion vector having a value of 0 may be added to the motion vector candidate list.

接下来,将描述将组合运动矢量候选添加到运动矢量候选列表的处理。Next, the process of adding the combined motion vector candidate to the motion vector candidate list will be described.

当运动矢量候选列表中的运动矢量候选的数量小于能够包括在运动矢量候选列表中的运动矢量候选的最大数量时,运动矢量候选列表中的一个或更多个运动矢量候选被组合以产生一个或更多个组合运动矢量候选,并且产生的组合运动矢量候选可被添加到运动矢量候选列表。例如,在运动矢量候选列表中包括的空间运动矢量候选、时间运动矢量候选和零运动矢量候选中的至少一个或更多个被用于产生组合运动矢量候选,并且产生的组合运动矢量候选可被添加到运动矢量候选列表。When the number of motion vector candidates in the motion vector candidate list is less than the maximum number of motion vector candidates that can be included in the motion vector candidate list, one or more motion vector candidates in the motion vector candidate list are combined to generate an or More combined motion vector candidates, and the resulting combined motion vector candidates may be added to the motion vector candidate list. For example, at least one or more of spatial motion vector candidates, temporal motion vector candidates, and zero motion vector candidates included in the motion vector candidate list are used to generate combined motion vector candidates, and the generated combined motion vector candidates may be Add to motion vector candidate list.

可选地,可基于编码参数中的至少一个来产生组合运动矢量候选,并且可将基于编码参数中的至少一个所产生的组合运动矢量候选添加到运动矢量候选列表。Alternatively, a combined motion vector candidate may be generated based on at least one of the encoding parameters, and the combined motion vector candidate generated based on the at least one of the encoding parameters may be added to the motion vector candidate list.

接下来,将在下面描述从运动矢量候选列表选择当前块的预测运动矢量的步骤(S503、S604)。Next, the steps of selecting the predicted motion vector of the current block from the motion vector candidate list ( S503 , S604 ) will be described below.

在运动矢量候选列表中包括的运动矢量候选之中,由运动矢量候选索引所指示的运动矢量候选可被确定为当前块的预测运动矢量。Among the motion vector candidates included in the motion vector candidate list, the motion vector candidate indicated by the motion vector candidate index may be determined as the predicted motion vector of the current block.

编码设备可计算当前块的预测运动矢量与运动矢量之间的差,从而产生运动矢量差。解码设备可通过将预测运动矢量与运动矢量差相加来产生当前块的运动矢量。The encoding apparatus may calculate a difference between the predicted motion vector and the motion vector of the current block, thereby generating a motion vector difference. The decoding apparatus may generate the motion vector of the current block by adding the predicted motion vector and the motion vector difference.

稍后将共同描述在图5和图6中示出的执行运动补偿的步骤(S504、S605)和对与运动补偿相关联的信息进行熵编码/解码的步骤(S505、S601)、以及在图7和图8中示出的执行运动补偿的步骤(S703、S804)和熵编码/解码的步骤(S704、S801)。The steps of performing motion compensation ( S504 , S605 ) and the steps of entropy encoding/decoding ( S505 , S601 ) of information associated with motion compensation shown in FIGS. 5 and 6 will be collectively described later, and the steps shown in FIGS. 7 and FIG. 8 show the steps of performing motion compensation (S703, S804) and the steps of entropy encoding/decoding (S704, S801).

下面,将详细描述图7和图8中示出的每个步骤。Hereinafter, each step shown in FIGS. 7 and 8 will be described in detail.

首先,将描述推导合并候选的步骤(S701、S802)。First, the steps of deriving merge candidates ( S701 , S802 ) will be described.

当前块的合并候选可包括空间合并候选、时间合并候选和附加合并候选中的至少一个。这里,表述“推导空间合并候选”意为推导空间合并候选以及将推导出的合并候选添加到合并候选列表的处理。The merging candidates of the current block may include at least one of spatial merging candidates, temporal merging candidates, and additional merging candidates. Here, the expression "deriving a spatial merging candidate" means a process of deriving a spatial merging candidate and adding the derived merging candidate to the merging candidate list.

参照图9,可从与当前块X相邻的邻近块推导当前块的空间合并候选。与当前块X相邻的邻近块可包括与当前块的上端相邻的块B1、与当前块的左端相邻的块A1、与当前块的右上角相邻的块B0、与当前块的左上角相邻的块B2、以及与当前块的左下角相邻的块A0中的至少一个。Referring to FIG. 9 , spatial merging candidates of the current block may be derived from neighboring blocks adjacent to the current block X. The adjacent blocks adjacent to the current block X may include a block B1 adjacent to the upper end of the current block, a block A1 adjacent to the left end of the current block, a block B0 adjacent to the upper right corner of the current block, and a block B0 adjacent to the upper left of the current block. At least one of the block B2 adjacent to the corner, and the block A0 adjacent to the lower left corner of the current block.

为了推导当前块的空间合并候选,确定与当前块相邻的每个邻近块是否可用于对当前块的空间合并候选的推导。可按照预定优先级顺序针对邻近块进行这样的确定。例如,在图9的示例中,可按照块A1、B1、B0、A0和B2的顺序来确定空间合并候选的可用性。基于可用性确定顺序所确定的空间合并候选可被顺序地添加到当前块的合并候选列表。To derive spatial merging candidates for the current block, it is determined whether each neighboring block adjacent to the current block is available for the derivation of spatial merging candidates for the current block. Such determinations may be made for adjacent blocks in a predetermined priority order. For example, in the example of FIG. 9, the availability of spatial merging candidates may be determined in the order of blocks A1, B1, B0, A0, and B2. The spatial merging candidates determined based on the availability determination order may be sequentially added to the merging candidate list of the current block.

图11是示出将空间合并候选添加到合并候选列表的处理的示例的示图。FIG. 11 is a diagram illustrating an example of a process of adding a spatial merging candidate to a merging candidate list.

参照图11,四个空间合并候选从四个邻近块A1、B0、A0和B2被推导,并且推导出的空间合并候选可被顺序地添加到合并候选列表。Referring to FIG. 11, four spatial merging candidates are derived from four adjacent blocks A1, B0, A0, and B2, and the derived spatial merging candidates may be sequentially added to a merging candidate list.

可选地,可基于编码参数中的至少一个来推导空间合并候选。Optionally, spatial merging candidates may be derived based on at least one of the encoding parameters.

这里,空间合并候选的运动信息可包括三条或更多条运动信息,其中,所述三条或更多条运动信息除了包括L0运动信息和L1运动信息之外,还包括L2运动信息和L3运动信息。这里,可存在至少一个参考画面列表,例如包括L0、L1、L2和L3。Here, the motion information of the spatial merging candidate may include three or more pieces of motion information, wherein the three or more pieces of motion information include L2 motion information and L3 motion information in addition to L0 motion information and L1 motion information . Here, there may be at least one reference picture list including, for example, L0, L1, L2, and L3.

接下来,将描述推导当前块的时间合并候选的方法。Next, a method of deriving temporal merging candidates of the current block will be described.

可从当前画面的同位画面中包括的重建块推导当前块的时间合并候选。同位画面可以是在当前画面之前编码/解码的画面,并且可在时间顺序上与当前画面不同。The temporal merging candidates for the current block may be derived from reconstructed blocks included in co-located pictures of the current picture. The co-located picture may be a picture encoded/decoded before the current picture, and may be different from the current picture in time order.

表述“推导时间合并候选”意为推导时间合并候选并将推导出的时间合并候选添加到合并候选列表的处理。The expression "deriving a temporal merging candidate" means a process of deriving a temporal merging candidate and adding the derived temporal merging candidate to a merging candidate list.

参照图10,可从包括当前画面的同位画面(也称为同位置画面)中与当前块X在空间上位于相同位置的块的外部的位置的块推导当前块的时间合并候选,或者可从包括当前画面的同位画面中与当前块X在空间上位于相同位置的块内部的位置的块推导当前块的时间合并候选。术语“时间合并候选”可意为同位块的运动信息。例如,可从与在空间上与当前块X位于相同位置的块C的左下角相邻的块H推导当前块X的时间合并候选,或者从包括块C的中间位置的块C3推导当前块X的时间合并候选。用于推导当前块的时间合并候选的块H、C3等被称为同位块(也称为同位置块)。10, the temporal merging candidate for the current block may be derived from a block in a co-located picture (also referred to as a co-located picture) including the current picture, which is located outside a block that is spatially co-located with the current block X, or may be derived from A block that includes a position inside a block that is spatially co-located with the current block X in a co-located picture of the current picture derives a temporal merging candidate for the current block. The term "temporal merging candidate" may mean motion information of a co-located block. For example, the temporal merging candidate of the current block X may be derived from the block H adjacent to the lower left corner of the block C that is spatially co-located with the current block X, or the current block X may be derived from the block C3 including the middle position of the block C time merging candidates. Blocks H, C3, etc. used to derive temporal merging candidates of the current block are called co-located blocks (also referred to as co-located blocks).

当能够从包括位于块C外部的位置的块H推导当前块的时间合并候选时,块H被设置为当前块的同位块。在这种情况下,可基于块H的运动信息来推导当前块的时间合并候选。相反,当不能从块H推导当前块的时间合并候选时,包括位于块C内部的位置的块C3可被设置为当前块的同位块。在这种情况下,可基于块C3的运动矢量来推导当前块的时间合并候选。当既不能从块H也不能从块C3推导当前块的任何时间合并候选(例如,块H和块C3两者都是帧内编码块)时,可能完全不能推导出当前块的时间合并候选,或者可从除了块H和C3之外的块推导当前块的时间合并候选。When a temporal merging candidate of the current block can be derived from a block H including a location outside of block C, block H is set as a co-located block of the current block. In this case, the temporal merging candidate of the current block may be derived based on the motion information of block H. Conversely, when the temporal merging candidate of the current block cannot be deduced from block H, block C3 including a position located inside block C may be set as a co-located block of the current block. In this case, the temporal merging candidate of the current block may be derived based on the motion vector of block C3. When any temporal merging candidate for the current block cannot be derived from neither block H nor block C3 (eg, both block H and block C3 are intra-coded blocks), the temporal merging candidate for the current block may not be derived at all, Or the temporal merging candidates for the current block may be derived from blocks other than blocks H and C3.

可选地,例如,可从同位画面内包括的多个块推导当前块的多个时间合并候选。也就是说,可从块H、C3等推导当前块的多个时间候选。Alternatively, for example, multiple temporal merging candidates for the current block may be derived from multiple blocks included within a co-located picture. That is, multiple temporal candidates for the current block can be derived from blocks H, C3, and so on.

图12是示出将时间合并候选添加到合并候选列表的处理的示例的示图。FIG. 12 is a diagram illustrating an example of a process of adding a temporal merge candidate to a merge candidate list.

参照图12,当一个时间合并候选从位于位置H1的同位块被推导出时,推导出的时间合并候选可被添加到合并候选列表。Referring to FIG. 12, when a temporal merging candidate is derived from the co-located block located at position H1, the derived temporal merging candidate may be added to the merging candidate list.

当包括当前块的当前画面与当前块的参考画面之间的距离不同于包括同位块的同位画面与同位块的参考画面之间的距离时,可通过对同位块的运动矢量进行缩放来获得当前块的时间合并候选的运动矢量。这里,可基于当前画面与当前块的参考画面之间的距离以及同位画面与同位块的参考画面之间的距离中的至少一个距离来执行对运动矢量的缩放。例如,可通过根据当前画面和当前块的参考画面之间的距离与同位画面和同位块的参考画面之间的距离的比率对同位块的运动矢量进行缩放来推导当前块的时间合并候选的运动矢量。When the distance between the current picture including the current block and the reference picture of the current block is different from the distance between the co-located picture including the co-located block and the reference picture of the co-located block, the current picture may be obtained by scaling the motion vector of the co-located block The motion vector of the block's temporal merging candidate. Here, scaling of the motion vector may be performed based on at least one of the distance between the current picture and the reference picture of the current block and the distance between the co-located picture and the reference picture of the co-located block. For example, the motion of the temporal merging candidate of the current block may be derived by scaling the motion vector of the co-located block according to the ratio of the distance between the current picture and the reference picture of the current block to the distance between the co-located picture and the reference picture of the co-located block vector.

另外,可基于当前块、邻近块或同位块的编码参数中的至少一个来推导时间合并候选、同位画面、同位块、预测列表利用标志和参考画面索引中的至少一个。In addition, at least one of a temporal merging candidate, a co-located picture, a co-located block, a prediction list utilization flag, and a reference picture index may be derived based on at least one of encoding parameters of the current block, neighboring blocks, or co-located blocks.

可通过产生空间合并候选和时间合并候选中的至少一个合并候选并按照推导的顺序将推导出的合并候选顺序地添加到合并候选列表来产生合并候选列表。The merging candidate list may be generated by generating at least one merging candidate of a spatial merging candidate and a temporal merging candidate and sequentially adding the derived merging candidates to the merging candidate list in the derived order.

接下来,将描述推导当前块的附加合并候选的方法。Next, a method of deriving additional merge candidates for the current block will be described.

术语“附加合并候选”可意为修改后的空间合并候选、修改后的时间合并候选、组合合并候选和具有预定运动信息值的预定合并候选中的至少一个。这里,表述“推导附加合并候选”可意为推导附加合并候选并将推导出的附加合并候选添加到合并候选列表的处理。The term "additional merging candidate" may mean at least one of a modified spatial merging candidate, a modified temporal merging candidate, a combined merging candidate, and a predetermined merging candidate having a predetermined motion information value. Here, the expression "derivation of additional merging candidates" may mean a process of deriving additional merging candidates and adding the derived additional merging candidates to the merging candidate list.

修改后的空间合并候选可意为通过对推导出的空间合并候选的运动信息中的至少一项进行修改而获得的合并候选。The modified spatial merging candidate may mean a merging candidate obtained by modifying at least one item of motion information of the derived spatial merging candidate.

修改后的时间合并候选可意为通过对推导出的时间合并候选的运动信息中的至少一项进行修改而获得的修改后的合并候选。The modified temporal merging candidate may mean a modified merging candidate obtained by modifying at least one item of motion information of the derived temporal merging candidate.

组合合并候选可意为通过对空间合并候选、时间合并候选、修改后的空间合并候选、修改后的时间合并候选、组合合并候选、以及具有预定运动信息值的预定合并候选中的至少一个的运动信息进行组合而获得的合并候选,其中,空间合并候选、时间合并候选、修改后的空间合并候选、修改后的时间合并候选、组合合并候选、以及具有预定运动信息值的预定合并候选全部包括在合并候选列表中。Combining the merging candidates may mean by moving at least one of a spatial merging candidate, a temporal merging candidate, a modified spatial merging candidate, a modified temporal merging candidate, a combined merging candidate, and a predetermined merging candidate having a predetermined motion information value A merging candidate obtained by combining information, wherein a spatial merging candidate, a temporal merging candidate, a modified spatial merging candidate, a modified temporal merging candidate, a combined merging candidate, and a predetermined merging candidate with a predetermined motion information value are all included in the Merge candidate list.

可选地,组合合并候选可意为通过对以下合并候选中的至少一个的运动信息进行组合而推导出的合并候选:未包括在合并候选列表中但从能够推导出空间合并候选和时间合并候选中的至少一个的块推导出的空间合并候选和时间合并候选;基于从所述块推导出的空间合并候选和时间合并候选所推导出的修改后的空间合并候选和修改后的时间合并候选;组合合并候选;以及具有预定运动信息值的预定合并候选。Alternatively, a combined merging candidate may mean a merging candidate derived by combining motion information of at least one of the following merging candidates: not included in the merging candidate list but from which a spatial merging candidate and a temporal merging candidate can be derived. A spatial merging candidate and a temporal merging candidate derived from at least one of the blocks; a modified spatial merging candidate and a modified temporal merging candidate derived based on the spatial merging candidate and temporal merging candidate derived from the block; combining merging candidates; and predetermined merging candidates having predetermined motion information values.

可选地,可使用通过在解码器中对比特流执行熵解码而获得的运动信息来推导组合合并候选。在这种情况下,用于推导组合合并候选的运动信息可在编码器中被熵编码为比特流。Alternatively, the combined merge candidates may be derived using motion information obtained by performing entropy decoding on the bitstream in the decoder. In this case, the motion information used to derive the combined merge candidates may be entropy encoded into a bitstream in the encoder.

组合合并候选可意为组合双向合并候选。组合双向合并候选是使用双向预测的合并候选,并且组合双向合并候选可以是具有L0运动信息和L1运动信息的合并候选。Combining merge candidates may mean combining bidirectional merge candidates. The combined bidirectional merge candidate is a merge candidate using bidirectional prediction, and the combined bidirectional merge candidate may be a merge candidate with L0 motion information and L1 motion information.

具有预定运动信息值的合并候选可以是具有运动矢量(0,0)的零合并候选。具有预定运动信息值的合并候选可以被设置使得该合并候选在编码设备和解码设备中具有相同的值。A merge candidate with a predetermined motion information value may be a zero merge candidate with a motion vector (0,0). A merge candidate having a predetermined motion information value may be set such that the merge candidate has the same value in the encoding device and the decoding device.

可基于当前块、邻近块或同位块的编码参数中的至少一个来推导或产生修改后的空间合并候选、修改后的时间合并候选、组合合并候选和具有预定运动信息值的合并候选中的至少一个。另外,可基于当前块、邻近块或同位块的编码参数中的至少一个将修改后的空间合并候选、修改后的时间合并候选、组合合并候选和具有预定运动信息值的合并候选中的至少一个添加到合并候选列表。At least one of a modified spatial merging candidate, a modified temporal merging candidate, a combined merging candidate, and a merging candidate having a predetermined motion information value may be derived or generated based on at least one of coding parameters of the current block, neighboring blocks, or co-located blocks. One. In addition, at least one of the modified spatial merging candidate, the modified temporal merging candidate, the combined merging candidate, and the merging candidate having a predetermined motion information value may be merged based on at least one of coding parameters of the current block, the adjacent block, or the co-located block. Add to the merge candidate list.

合并候选列表的大小可基于当前块、邻近块或同位块的编码参数被确定,并且可根据编码参数而变化。The size of the merge candidate list may be determined based on encoding parameters of the current block, neighboring blocks, or co-located blocks, and may vary according to the encoding parameters.

接下来,将描述使用产生的合并候选列表确定当前块的运动信息的步骤(S702、S803)。Next, the steps of determining the motion information of the current block using the generated merge candidate list (S702, S803) will be described.

编码器可通过运动估计从合并候选列表选择将用于当前块的运动补偿的合并候选,并且可将指示确定的合并候选的合并候选索引merge_idx编码到比特流。The encoder may select a merge candidate to be used for motion compensation of the current block from the merge candidate list through motion estimation, and may encode a merge candidate index merge_idx indicating the determined merge candidate to the bitstream.

为了产生当前块的预测块,编码器可通过使用合并候选索引从合并候选列表选择合并候选,并确定当前块的运动信息。然后,编码器可基于确定的运动信息执行运动补偿,从而产生当前块的预测块。In order to generate the prediction block of the current block, the encoder may select a merge candidate from a merge candidate list by using a merge candidate index, and determine motion information of the current block. Then, the encoder may perform motion compensation based on the determined motion information, thereby generating a prediction block of the current block.

解码器可对接收到的比特流中的合并候选索引进行解码,并确定包括在合并候选列表中的由合并候选索引指示的合并候选。确定的合并候选可被确定为当前块的运动信息。确定的运动信息被用于当前块的运动补偿。这里,术语“运动补偿”可与帧间预测具有相同的含义。The decoder may decode the merge candidate index in the received bitstream and determine the merge candidate indicated by the merge candidate index to be included in the merge candidate list. The determined merge candidate may be determined as motion information of the current block. The determined motion information is used for motion compensation of the current block. Here, the term "motion compensation" may have the same meaning as inter prediction.

接下来,将描述使用运动矢量或运动信息执行运动补偿的步骤(S504、S605、S703、S804)。Next, the steps of performing motion compensation using the motion vector or motion information (S504, S605, S703, S804) will be described.

编码设备和解码设备可通过使用预测运动矢量和运动矢量差来计算当前块的运动矢量。在计算出运动矢量之后,编码设备和解码设备可使用计算出的运动矢量执行帧间预测或运动补偿(S504、S605)。The encoding apparatus and the decoding apparatus may calculate the motion vector of the current block by using the predicted motion vector and the motion vector difference. After calculating the motion vector, the encoding apparatus and the decoding apparatus may perform inter prediction or motion compensation using the calculated motion vector (S504, S605).

编码设备和解码设备可使用确定的运动信息执行帧间预测或运动补偿(S703、S804)。这里,当前块可具有确定的合并候选的运动信息。The encoding apparatus and the decoding apparatus may perform inter prediction or motion compensation using the determined motion information (S703, S804). Here, the current block may have motion information of the determined merge candidate.

根据当前块的预测方向,当前块可具有一(最小值)个至N(最大值)个运动矢量。可使用所述一个至N个运动矢量来产生一(最小值)个至N(最大值)个预测块,并且可在产生的预测块之中选择最终预测块。The current block may have one (minimum value) to N (maximum value) motion vectors according to the prediction direction of the current block. One (minimum value) to N (maximum value) prediction blocks may be generated using the one to N motion vectors, and a final prediction block may be selected among the generated prediction blocks.

例如,当当前块具有一个运动矢量时,将使用该运动矢量(或运动信息)所产生的预测块确定为当前块的最终预测块。For example, when the current block has a motion vector, a prediction block generated using the motion vector (or motion information) is determined as the final prediction block of the current block.

此外,当当前块具有多个运动矢量(或多条运动信息)时,使用所述多个运动矢量(或所述多条运动信息)来产生多个预测块,并且基于所述多个预测块的加权和来确定当前块的最终预测块。分别包括由多个运动矢量(或多条运动信息)分别指示的多个预测块的多个参考画面可在不同的参考画面列表中或者在一个参考画面列表中被列出。Also, when the current block has multiple motion vectors (or pieces of motion information), multiple prediction blocks are generated using the multiple motion vectors (or the multiple pieces of motion information), and based on the multiple prediction blocks to determine the final predicted block of the current block. A plurality of reference pictures respectively including a plurality of prediction blocks respectively indicated by a plurality of motion vectors (or pieces of motion information) may be listed in different reference picture lists or in one reference picture list.

例如,可基于空间运动矢量候选、时间运动矢量候选、具有预定值的运动矢量、以及组合运动矢量候选中的至少一个来产生当前块的多个预测块,并且随后可基于该多个预测块的加权和来确定当前块的最终预测块。For example, a plurality of prediction blocks of the current block may be generated based on at least one of a spatial motion vector candidate, a temporal motion vector candidate, a motion vector having a predetermined value, and a combined motion vector candidate, and then may be based on the prediction blocks of the plurality of prediction blocks. The weighted sum is used to determine the final predicted block for the current block.

可选地,例如,可基于由预设运动矢量候选索引所指示的运动矢量候选来产生当前块的多个预测块,然后可基于该多个预测块的加权和来确定当前块的最终预测块。另外,可基于由预定运动矢量候选索引范围内的索引所指示的运动矢量候选来产生多个预测块,然后可基于该多个预测块的加权和来确定当前块的最终预测块。Alternatively, for example, a plurality of prediction blocks of the current block may be generated based on motion vector candidates indicated by a preset motion vector candidate index, and then a final prediction block of the current block may be determined based on a weighted sum of the plurality of prediction blocks . In addition, a plurality of prediction blocks may be generated based on motion vector candidates indicated by indexes within a predetermined motion vector candidate index range, and then a final prediction block of the current block may be determined based on a weighted sum of the plurality of prediction blocks.

用于各个预测块的权重因子可以相等地是1/N(这里,N是产生的预测块的数量)。例如,当两个预测块被产生时,用于每个预测块的权重因子是1/2。类似地,当三个预测块被产生时,用于每个预测块的权重因子是1/3。当四个预测块被产生时,用于每个预测块的权重因子可以是1/4。可选地,可按照将不同的权重因子应用于各个预测块的方式来确定当前块的最终预测块。The weight factor for each prediction block may be equal to 1/N (where N is the number of generated prediction blocks). For example, when two prediction blocks are generated, the weighting factor for each prediction block is 1/2. Similarly, when three prediction blocks are generated, the weighting factor for each prediction block is 1/3. When four prediction blocks are generated, the weighting factor for each prediction block may be 1/4. Alternatively, the final prediction block of the current block may be determined in a manner of applying different weighting factors to the respective prediction blocks.

用于预测块的权重因子可以不是固定的,而是可变的。用于预测块的权重因子可不相等,而是不同的。例如,当两个预测块被产生时,用于所述两个预测块的权重因子可相等,如(1/2,1/2),或者可不相等,如(1/3,2/3)、(1/4,3/4)、(2/5,3/5)或(3/8,5/8)。权重因子可以是正实数值或负实数值。也就是说,权重因子的值可包括负实数值,如(-1/2,3/2)、(-1/3,4/3)或(1-1/4,5/4)。The weighting factor for the prediction block may not be fixed but variable. The weighting factors used for prediction blocks may not be equal, but different. For example, when two prediction blocks are generated, the weighting factors for the two prediction blocks may be equal, such as (1/2, 1/2), or may be unequal, such as (1/3, 2/3) , (1/4, 3/4), (2/5, 3/5) or (3/8, 5/8). Weighting factors can be positive real-valued or negative real-valued values. That is, the value of the weighting factor may include negative real values, such as (-1/2, 3/2), (-1/3, 4/3) or (1-1/4, 5/4).

为了应用可变的权重因子,可通过比特流用信号传送用于当前块的一条或更多条权重因子信息。权重因子信息可逐预测块地被用信号传送,或者可逐参考画面地被用信号传送。可选地,多个预测块可共享一个权重因子。To apply variable weighting factors, one or more pieces of weighting factor information for the current block may be signaled through the bitstream. The weighting factor information may be signaled per prediction block, or may be signaled per reference picture. Optionally, multiple prediction blocks may share one weighting factor.

编码设备和解码设备可基于预测块列表利用标志来确定是否使用预测运动矢量(或者预测运动信息)。例如,对于每个参考画面列表,当预测块列表利用标志具有第一值一(1)时,编码设备和解码设备可使用当前块的预测运动矢量对当前块执行帧间预测或运动补偿。然而,当预测块列表利用标志具有第二值零(0)时,编码设备和解码设备可不使用当前块的预测运动矢量对当前块执行帧间预测或运动补偿。预测块列表利用标志的第一值和第二值可相反地被分别设置为0和1。表达式3至表达式5是当当前块的帧间预测指示符是PRED_BI、PRED_TRI或PRED_QUAD时并且当每个参考画面列表的预测方向是单向时,产生当前块的最终预测块的方法的示例。The encoding apparatus and the decoding apparatus may use a flag to determine whether to use a predicted motion vector (or predicted motion information) based on the predicted block list. For example, when the prediction block list utilization flag has a first value of one (1) for each reference picture list, the encoding apparatus and the decoding apparatus may perform inter prediction or motion compensation on the current block using the predicted motion vector of the current block. However, when the prediction block list utilization flag has the second value of zero (0), the encoding apparatus and the decoding apparatus may perform inter prediction or motion compensation on the current block without using the predicted motion vector of the current block. The first and second values of the predicted block list utilization flag may be set to 0 and 1, respectively, inversely. Expression 3 to Expression 5 are examples of the method of generating the final prediction block of the current block when the inter prediction indicator of the current block is PRED_BI, PRED_TRI or PRED_QUAD and when the prediction direction of each reference picture list is unidirectional .

[表达式1][expression1]

P_BI=(WF_LO*P_LO+OFFSET_LO+WF_L1*P_L1+OFFSET_L1+RF)>>1P_BI=(WF_LO*P_LO+OFFSET_LO+WF_L1*P_L1+OFFSET_L1+RF)>>1

[表达式2][expression 2]

P_TRI=(WF_LO*P_LO+OFFSET_LO+WF_L1*P_L1+OFFSET_L1+WF_L2*P_L2+OFFSET_L2+RF)/3P_TRI=(WF_LO*P_LO+OFFSET_LO+WF_L1*P_L1+OFFSET_L1+WF_L2*P_L2+OFFSET_L2+RF)/3

[表达式3][expression 3]

P_QUAD=(WF_L0*P_L0+OFFSET_L0+WF_L1*P_L1+OFFSET_L1+WF_L2*P_L2+OFFSET_L2+WF_L3*P_L3+OFFSET_L3+RF)>>2P_QUAD=(WF_L0*P_L0+OFFSET_L0+WF_L1*P_L1+OFFSET_L1+WF_L2*P_L2+OFFSET_L2+WF_L3*P_L3+OFFSET_L3+RF)>>2

在表达式1至表达式3中,P_BI、P_TRI和P_QUAD中的每一个表示当前块的最终预测块,LX(X=0,1,2,3)表示参考画面列表。WF_LX表示使用LX参考画面列表所产生的预测块的权重因子。OFFSET_LX表示用于使用LX参考画面列表所产生的预测块的偏移值。P_LX表示当前块的使用LX参考画面列表的运动矢量(或运动信息)所产生的预测块。RF意为舍入因子,并且它可被设置为0、正整数或负整数。LX参考画面列表可包括以下参考画面中的至少一个:长期参考画面、未经过去过滤波器的参考画面、未经过样点自适应偏移的参考画面、未经过自适应环路滤波器的参考画面、仅经过去块滤波器和自适应偏移的参考画面、仅经过去块滤波器和自适应环路滤波器的参考画面、经过样点自适应偏移和自适应环路滤波器的参考画面、以及经过去块滤波器、样点自适应偏移和自适应环路滤波器全部的参考画面。在这种情况下,LX参考画面列表可以是L2参考画面列表和L3参考画面列表中的至少任意一个。In Expression 1 to Expression 3, each of P_BI, P_TRI, and P_QUAD represents the final prediction block of the current block, and LX (X=0, 1, 2, 3) represents a reference picture list. WF_LX represents the weighting factor of the prediction block generated using the LX reference picture list. OFFSET_LX represents an offset value for a prediction block generated using the LX reference picture list. P_LX represents the prediction block of the current block generated using the motion vector (or motion information) of the LX reference picture list. RF means rounding factor, and it can be set to 0, a positive integer, or a negative integer. The LX reference picture list may include at least one of the following reference pictures: long-term reference pictures, reference pictures without filtering, reference pictures without sample adaptive offset, references without adaptive loop filter Picture, reference picture with only DF and AO, reference picture with DF and AL only, reference with sample Adaptive Offset and AL The picture, and the reference picture all passed through the deblocking filter, sample adaptive offset and adaptive loop filter. In this case, the LX reference picture list may be at least any one of the L2 reference picture list and the L3 reference picture list.

即使针对预定参考画面列表存在多个预测方向,也可基于预测块的加权和来获得当前块的最终预测块。在这种情况下,使用一个参考画面列表所推导出的多个预测块的权重因子可相等,或者可彼此不同。Even if there are multiple prediction directions for the predetermined reference picture list, the final prediction block of the current block may be obtained based on the weighted sum of the prediction blocks. In this case, weighting factors of a plurality of prediction blocks derived using one reference picture list may be equal, or may be different from each other.

多个预测块的至少权重因子WF_LX或偏移OFFSET_LX可以是将被熵编码/解码的编码参数。可选地,例如,可从与当前块相邻的先前编码/解码的邻近块推导权重因子和偏移。这里,与当前块相邻的邻近块可包括用于推导当前块的空间运动矢量候选的块以及用于推导当前块的时间运动矢量候选的块中的至少一个。At least the weight factor WF_LX or the offset OFFSET_LX of the plurality of prediction blocks may be an encoding parameter to be entropy encoded/decoded. Alternatively, for example, the weighting factors and offsets may be derived from previously encoded/decoded neighboring blocks adjacent to the current block. Here, the neighboring blocks adjacent to the current block may include at least one of a block for deriving a spatial motion vector candidate of the current block and a block for deriving a temporal motion vector candidate of the current block.

进一步可选地,例如,可基于当前画面的显示顺序(画面顺序计数(POC))和每一个参考画面的POC来确定权重因子和偏移。在这种情况下,当当前画面与参考画面之间的距离增加时,权重因子或偏移的值可减小。也就是说,当当前画面和参考画面彼此接近时,可将更大的值设置为权重因子或偏移。例如,当当前画面的POC与L0参考画面的POC之间的距离是2时,可将应用于使用L0参考画面而产生的预测块的权重因子的值设置为1/3。同时,当当前画面的POC与L0参考画面的POC之间的差是1时,可将应用于使用L0参考画面而产生的预测块的权重因子的值设置为2/3。如上所述,权重因子或偏移可与当前画面的显示顺序(POC)和参考画面的显示顺序(POC)之间的差成反比。可选地,权重因子或偏移可与当前画面的显示顺序(POC)和参考画面的显示顺序(POC)之间的差成正比。Further alternatively, for example, the weighting factor and offset may be determined based on the display order of the current picture (picture order count (POC)) and the POC of each reference picture. In this case, as the distance between the current picture and the reference picture increases, the value of the weighting factor or offset may decrease. That is, when the current picture and the reference picture are close to each other, a larger value may be set as the weighting factor or offset. For example, when the distance between the POC of the current picture and the POC of the L0 reference picture is 2, the value of the weighting factor applied to the prediction block generated using the L0 reference picture may be set to 1/3. Meanwhile, when the difference between the POC of the current picture and the POC of the L0 reference picture is 1, the value of the weighting factor applied to the prediction block generated using the L0 reference picture may be set to 2/3. As described above, the weighting factor or offset may be inversely proportional to the difference between the display order (POC) of the current picture and the display order (POC) of the reference picture. Alternatively, the weighting factor or offset may be proportional to the difference between the display order (POC) of the current picture and the display order (POC) of the reference picture.

可选地,例如,可基于至少一个编码参数对权重因子和偏移中的至少一个进行熵编码/解码。另外,可基于至少一个编码参数计算预测块的加权和。Optionally, for example, at least one of the weighting factor and the offset may be entropy encoded/decoded based on the at least one encoding parameter. Additionally, a weighted sum of prediction blocks may be calculated based on at least one encoding parameter.

多个预测块的加权和可仅被应用于预测块的部分区域。所述部分区域可以是与每个预测块的边界相邻的边界区域。为了如上所述将加权和仅应用于所述部分区域,可在每个预测块中逐子块地计算加权和。The weighted sum of multiple prediction blocks may be applied to only a partial region of the prediction block. The partial area may be a boundary area adjacent to the boundary of each prediction block. In order to apply the weighted sum to only the partial region as described above, the weighted sum may be calculated sub-block by sub-block in each prediction block.

在具有由区域信息指示的块尺寸的块中,可通过使用相同的预测块或相同的最终预测块针对比所述块小的子块执行帧间预测或运动补偿。In a block having a block size indicated by the region information, inter prediction or motion compensation may be performed for a subblock smaller than the block by using the same prediction block or the same final prediction block.

在具有由区域信息指示的块深度的块中,可通过使用相同的预测块或相同的最终预测块针对具有比所述块的深度深的块深度的子块执行帧间预测或运动补偿。In a block having a block depth indicated by region information, inter prediction or motion compensation may be performed for a subblock having a block depth deeper than that of the block by using the same prediction block or the same final prediction block.

另外,当通过运动矢量预测计算预测块的加权和时,可使用在运动矢量候选列表中包括的运动矢量候选中的至少一个来计算该加权和,并且可将计算结果用作当前块的最终预测块。In addition, when the weighted sum of prediction blocks is calculated by motion vector prediction, the weighted sum may be calculated using at least one of the motion vector candidates included in the motion vector candidate list, and the calculation result may be used as the final prediction of the current block piece.

例如,可仅使用空间运动矢量候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only spatial motion vector candidates, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as the final prediction block of the current block.

例如,可使用空间运动矢量候选和时间运动矢量候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using the spatial motion vector candidate and the temporal motion vector candidate, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as a final prediction block of the current block.

例如,可仅使用组合运动矢量候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only the combined motion vector candidates, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as the final prediction block of the current block.

例如,可仅使用由特定索引指示的运动矢量候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only motion vector candidates indicated by a specific index, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as a final prediction block of the current block.

例如,可仅使用由预定索引范围内的索引所指示的运动矢量候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only motion vector candidates indicated by indexes within a predetermined index range, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as a final prediction block of the current block.

当使用合并模式计算预测块的加权和时,可使用合并候选列表中包括的合并候选之中的至少一个合并候选来计算所述加权和,并且可将计算结果用作当前块的最终预测块。When the weighted sum of the prediction blocks is calculated using the merge mode, the weighted sum may be calculated using at least one merge candidate among the merge candidates included in the merge candidate list, and the calculation result may be used as the final prediction block of the current block.

例如,可仅使用空间合并候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only spatial merging candidates, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as the final prediction block of the current block.

例如,可使用空间合并候选和时间合并候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, the spatial merging candidate and the temporal merging candidate may be used to generate a prediction block, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as the final prediction block of the current block.

例如,可仅使用组合合并候选来产生预测块,可产生预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, the prediction block may be generated using only the combined merge candidates, a weighted sum of the prediction blocks may be generated, and the calculated weighted sum may be used as the final prediction block of the current block.

例如,可仅使用由特定索引指示的合并候选来产生预测块,可产生预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only merge candidates indicated by a specific index, a weighted sum of the prediction blocks may be generated, and the calculated weighted sum may be used as the final prediction block of the current block.

例如,可仅使用由预定索引范围内的索引所指示的合并候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using only merge candidates indicated by indexes within a predetermined index range, a weighted sum of the prediction blocks may be calculated, and the calculated weighted sum may be used as a final prediction block of the current block.

在编码器和解码器中,可使用当前块的运动矢量或运动信息来执行运动补偿。此时,可使用至少一个预测块来确定作为运动补偿的结果的最终预测块。这里,当前块可意为当前编码块和当前预测块中的至少一个。In the encoder and decoder, motion compensation may be performed using the motion vector or motion information of the current block. At this time, at least one prediction block may be used to determine a final prediction block as a result of motion compensation. Here, the current block may mean at least one of a current coding block and a current prediction block.

可通过对当前块的边界区域执行重叠块运动补偿来产生当前块的最终预测块。The final prediction block of the current block may be generated by performing overlapping block motion compensation on the boundary region of the current block.

当前块的边界区域可以是位于当前块内且与当前块和当前块的邻近块之间的边界相邻的区域。当前块的边界区域可包括上边界区域、左边界区域、下边界区域、右边界区域、右上角区域、右下角区域、左上角区域和左下角区域中的至少一个。当前块的边界区域可以是与当前块的预测块的部分相应的区域。The boundary area of the current block may be an area located within the current block and adjacent to a boundary between the current block and neighboring blocks of the current block. The boundary area of the current block may include at least one of an upper boundary area, a left boundary area, a lower boundary area, a right boundary area, an upper right area, a lower right area, an upper left area, and a lower left area. The boundary area of the current block may be an area corresponding to a portion of the prediction block of the current block.

重叠块运动补偿可意为通过计算与当前块的边界区域相应的预测块和使用与当前块相邻的已编码/解码块的运动信息所产生的预测块的加权和来执行运动补偿的处理。Overlapping block motion compensation may mean a process of performing motion compensation by calculating a weighted sum of a prediction block corresponding to a boundary region of the current block and a prediction block generated using motion information of encoded/decoded blocks adjacent to the current block.

可通过将当前块划分为多个子块来逐子块地执行对加权和的计算。也就是说,可使用与当前块相邻的已编码/解码的子块的运动信息逐子块地执行当前块的运动补偿。子块可意为当前块的下级块。The calculation of the weighted sum may be performed sub-block by sub-block by dividing the current block into a plurality of sub-blocks. That is, motion compensation of the current block may be performed sub-block by sub-block using motion information of encoded/decoded sub-blocks adjacent to the current block. A sub-block may mean a subordinate block of the current block.

另外,在计算加权和时,可使用利用当前块的运动信息针对当前块的各个子块产生的第一预测块、以及利用与当前块在空间上相邻的邻近子块的运动信息产生的第二预测块。在这种情况下,表述“使用运动信息”意为“推导运动信息”。第一预测块可意为通过使用当前块内的编码/解码目标子块的运动信息所产生的预测块。第二预测块可以是通过使用与当前块内的编码/解码目标子块在空间上相邻的邻近子块的运动信息所产生的预测块。In addition, when calculating the weighted sum, the first prediction block generated for each sub-block of the current block by using the motion information of the current block, and the first prediction block generated by using the motion information of the adjacent sub-blocks that are spatially adjacent to the current block can be used. Two prediction blocks. In this case, the expression "using motion information" means "deriving motion information". The first prediction block may mean a prediction block generated by using motion information of the encoding/decoding target subblock within the current block. The second prediction block may be a prediction block generated by using motion information of adjacent subblocks that are spatially adjacent to the encoding/decoding target subblock within the current block.

可使用第一预测块和第二预测块的加权和来产生当前块的最终预测块。也就是说,重叠块运动补偿在于使用当前块的运动信息和另一块的运动信息找到当前块的最终预测块。A weighted sum of the first prediction block and the second prediction block may be used to generate a final prediction block of the current block. That is, overlapping block motion compensation consists in finding the final prediction block of the current block using the motion information of the current block and the motion information of another block.

另外,当高级运动矢量预测(AMVP)模式、合并模式、仿射运动补偿模式、解码器侧运动矢量推导模式、自适应运动矢量分辨率模式、局部照度补偿模式、双向光流模式中的至少一个被使用时,可将当前块划分为多个子块,并且可逐子块地执行重叠块运动补偿。In addition, when at least one of Advanced Motion Vector Prediction (AMVP) mode, merge mode, affine motion compensation mode, decoder-side motion vector derivation mode, adaptive motion vector resolution mode, local illumination compensation mode, bidirectional optical flow mode When used, the current block may be divided into sub-blocks, and overlapping block motion compensation may be performed sub-block by sub-block.

当合并模式被用于运动补偿时,可对改进的时间运动矢量预测因子(ATMVP)候选和空间-时间运动矢量预测因子(STMVP)候选中的至少一个执行重叠块运动补偿。When merge mode is used for motion compensation, overlapping block motion compensation may be performed on at least one of improved temporal motion vector predictor (ATMVP) candidates and spatial-temporal motion vector predictor (STMVP) candidates.

随后将参照图13至图24描述重叠块运动补偿的细节。Details of overlapping block motion compensation will be described later with reference to FIGS. 13 to 24 .

接下来,将描述对与运动补偿相关联的信息执行熵编码/熵解码的处理(S505、S601、S704、S801)。Next, the process of performing entropy encoding/entropy decoding on the information associated with motion compensation ( S505 , S601 , S704 , S801 ) will be described.

编码设备可将与运动补偿相关联的信息熵编码到比特流,解码器可对比特流中包括的与运动补偿相关联的信息进行解码。作为熵编码或熵解码的目标的与运动补偿相关联的信息可包括以下项中的至少一项:帧间预测指示符inter_pred_idc、参考画面索引ref_idx_l0、ref_idx_l1、ref_idx_l2和ref_idx_l3、运动矢量候选索引mvp_l0_idx、mvp_l1_idx、mvp_l2_idx和mvp_l3_idx、运动矢量差、跳过模式使用/未使用信息cu_skip_flag、合并模式使用/未使用信息merge_flag、合并索引信息merge_index、权重因子wf_l0、wf_l1、wf_l2和wf_l3、以及偏移值offset_10、offset_11、offset_12和offset_13。The encoding apparatus may entropy encode the information associated with the motion compensation into the bitstream, and the decoder may decode the information associated with the motion compensation included in the bitstream. The information associated with motion compensation that is a target of entropy encoding or entropy decoding may include at least one of the following: inter prediction indicator inter_pred_idc, reference picture indices ref_idx_l0, ref_idx_l1, ref_idx_l2 and ref_idx_l3, motion vector candidate index mvp_l0_idx, mvp_l1_idx, mvp_l2_idx and mvp_l3_idx, motion vector difference, skip mode use/unuse information cu_skip_flag, merge mode use/unuse information merge_flag, merge index information merge_index, weight factors wf_l0, wf_l1, wf_l2 and wf_l3, and offset value offset_10, offset_11, offset_12 and offset_13.

帧间预测指示符可意为在当前块通过帧间预测被编码/解码时的帧间预测的预测方向、预测方向的数量或者帧间预测的预测方向和预测方向的数量两者。例如,帧间预测指示符可指示单向预测或多向预测(诸如双向预测、三向预测和四向预测)。帧间预测指示符可指示用于产生当前块的预测块的参考画面的数量。可选地,一个参考画面可用于多个方向的预测。在这种情况下,M个参考画面被用于执行N个方向(其中,N>M)的预测。帧间预测指示符也可意为用于当前块的帧间预测或运动补偿的预测块的数量。The inter prediction indicator may mean the prediction direction of the inter prediction, the number of prediction directions, or both the prediction direction and the number of prediction directions of the inter prediction when the current block is encoded/decoded by the inter prediction. For example, the inter prediction indicator may indicate unidirectional prediction or multidirectional prediction (such as bidirectional prediction, three-way prediction, and four-way prediction). The inter prediction indicator may indicate the number of reference pictures used to generate the prediction block of the current block. Optionally, one reference picture can be used for prediction in multiple directions. In this case, M reference pictures are used to perform prediction in N directions (where N>M). The inter prediction indicator may also mean the number of prediction blocks used for inter prediction or motion compensation of the current block.

根据当前块的预测方向的数量,参考画面指示符可指示一个方向PRED_LX、两个方向PRED_BI、三个方向PRED_TRI、四个方向PRED_QUAD、或更多个方向。The reference picture indicator may indicate one direction PRED_LX, two directions PRED_BI, three directions PRED_TRI, four directions PRED_QUAD, or more directions according to the number of prediction directions of the current block.

特定参考画面列表的预测列表利用标志指示是否使用参考画面列表产生预测块。The prediction list of a specific reference picture list uses a flag to indicate whether to use the reference picture list to generate the prediction block.

例如,当特定参考画面列表的预测列表利用标志具有第一值一(1)时,这意味着使用参考画面列表产生预测块。当预测列表利用标志具有第二值零(0)时,这意味着不使用参考画面列表产生预测块。这里,预测列表利用标志的第一值和第二值可相反地被分别设置为0和1。For example, when the prediction list utilization flag of a specific reference picture list has a first value of one (1), this means that the prediction block is generated using the reference picture list. When the prediction list utilization flag has the second value zero (0), it means that the prediction block is not generated using the reference picture list. Here, the first value and the second value of the prediction list utilization flag may be set to 0 and 1, respectively, inversely.

也就是说,当特定参考画面列表的预测列表利用标志具有第一值时,可使用与参考画面列表相应的运动信息来产生当前块的预测块。That is, when the prediction list utilization flag of the specific reference picture list has the first value, the prediction block of the current block may be generated using the motion information corresponding to the reference picture list.

参考画面索引可指示存在于参考画面列表中并且被当前块参考的特定参考画面。对于每个参考画面列表,可对一个或更多个参考画面索引进行熵编码/解码。可使用一个或更多个参考画面索引对当前块进行运动补偿。The reference picture index may indicate a specific reference picture that exists in the reference picture list and is referenced by the current block. For each reference picture list, one or more reference picture indices may be entropy encoded/decoded. The current block may be motion compensated using one or more reference picture indices.

运动矢量候选索引指示在为每个参考画面列表或每个参考画面索引准备的运动矢量候选列表中包括的运动矢量候选之中的当前块的运动矢量候选。可针对每个运动矢量候选列表对至少一个或更多个运动矢量候选索引进行熵编码/熵解码。可使用至少一个或更多个运动矢量候选索引对当前块进行运动补偿。The motion vector candidate index indicates the motion vector candidate of the current block among the motion vector candidates included in the motion vector candidate list prepared for each reference picture list or each reference picture index. At least one or more motion vector candidate indices may be entropy encoded/entropy decoded for each motion vector candidate list. The current block may be motion compensated using at least one or more motion vector candidate indices.

运动矢量差表示当前运动矢量与预测运动矢量之间的差。对于针对用于当前块的每个参考画面列表或每个参考画面索引所产生的每个运动矢量候选列表,可对一个或更多个运动矢量差进行熵编码/熵解码。可使用一个或更多个运动矢量差对当前块进行运动补偿。The motion vector difference represents the difference between the current motion vector and the predicted motion vector. For each motion vector candidate list generated for each reference picture list or each reference picture index for the current block, one or more motion vector differences may be entropy encoded/entropy decoded. The current block may be motion compensated using one or more motion vector differences.

关于跳过模式使用/未使用信息cu_skip_flag,当跳过模式使用/未使用信息cu_skip_flag具有第一值一(1)时,可使用跳过模式。相反,当跳过模式使用/未使用信息cu_skip_flag具有第二值零(0)时,可不使用跳过模式。可根据跳过模式使用/未使用信息使用跳过模式对当前块执行运动补偿。Regarding the skip mode use/unuse information cu_skip_flag, when the skip mode use/unuse information cu_skip_flag has a first value of one (1), the skip mode can be used. Conversely, when the skip mode use/unuse information cu_skip_flag has the second value zero (0), the skip mode may not be used. Motion compensation may be performed on the current block using the skip mode according to the skip mode usage/non-use information.

关于合并模式使用/未使用信息merge_flag,当合并模式使用/未使用信息merge_flag具有第一值一(1)时,可使用合并模式。相反,当合并模式使用/未使用信息merge_flag具有第二值零(0)时,可不使用合并模式。可根据合并模式使用/未使用信息使用合并模式对当前块执行运动补偿。Regarding the merge mode use/unuse information merge_flag, when the merge mode use/unuse information merge_flag has a first value of one (1), the merge mode can be used. Conversely, when the merge mode use/unuse information merge_flag has the second value of zero (0), the merge mode may not be used. Motion compensation may be performed on the current block using the merge mode according to the merge mode usage/non-use information.

合并索引信息merge_index可意为指示合并候选列表内的合并候选的信息。The merge index information merge_index may mean information indicating merge candidates within the merge candidate list.

可选地,合并索引信息可意为关于合并索引的信息。Alternatively, the merge index information may mean information about a merge index.

另外,合并索引信息可指示在与当前块在空间/时间上相邻的重建块之中的用于推导合并候选的重建块。In addition, the merge index information may indicate a reconstruction block for deriving a merge candidate among reconstruction blocks that are spatially/temporally adjacent to the current block.

合并索引信息可指示合并候选具有的一条或更多条运动信息。例如,当合并索引信息具有第一值零(0)时,合并索引信息可指示合并候选列表中被列为第一条目的第一合并候选;当合并索引信息具有第二值一(1)时,合并索引信息可指示合并候选列表中被列为第二条目的第二合并候选;当合并索引信息具有第三值二(2)时,合并索引信息指示合并候选列表中被列为第三条目的第三合并候选。类似地,当合并索引信息具有从第四值至第N值的值时,合并索引信息可指示合并候选列表中在根据所述值的顺序的位置所列出的合并候选。这里,N可以是0或正整数。The merge index information may indicate one or more pieces of motion information that the merge candidate has. For example, when the merge index information has a first value of zero (0), the merge index information may indicate the first merge candidate listed as the first entry in the merge candidate list; when the merge index information has a second value of one (1) , the merge index information may indicate the second merge candidate listed as the second entry in the merge candidate list; when the merge index information has a third value of two (2), the merge index information indicates that the merge candidate list is listed as the third item Destination third merge candidate. Similarly, when the merge index information has values from the fourth value to the Nth value, the merge index information may indicate merge candidates listed at positions according to the order of the values in the merge candidate list. Here, N may be 0 or a positive integer.

可基于合并模式索引信息使用合并模式对当前块执行运动补偿。Motion compensation may be performed on the current block using the merge mode based on the merge mode index information.

当两个或更多个预测块在当前块的运动补偿期间被产生时,可基于预测块的加权和来确定当前块的最终预测块。当计算加权和时,可将权重因子、偏移或者权重因子和偏移两者应用于各个预测块。用于计算加权和的加权和因子(例如权重因子和偏移)可按照以下项中的至少一项的数量被熵编码/熵解码或可按照与以下项中的至少一项相应的数量被熵编码/熵解码:参考画面列表、参考画面、运动矢量候选索引、运动矢量差、运动矢量、跳过模式使用/未使用信息、合并模式使用/未使用信息、合并索引信息。另外,可基于帧间预测指示符对用于每个预测块的加权和因子进行熵编码/熵解码。加权和因子可包括权重因子和偏移中的至少一个。When two or more prediction blocks are generated during motion compensation of the current block, a final prediction block of the current block may be determined based on a weighted sum of the prediction blocks. When calculating the weighted sum, the weighting factor, the offset, or both the weighting factor and the offset may be applied to each prediction block. The weighted sum factors (eg weighting factors and offsets) used to calculate the weighted sum may be entropy encoded/entropy decoded in an amount corresponding to at least one of the following items: Encoding/entropy decoding: reference picture list, reference picture, motion vector candidate index, motion vector difference, motion vector, skip mode used/unused information, merge mode used/unused information, merge index information. In addition, the weighted sum factor for each prediction block may be entropy encoded/entropy decoded based on the inter prediction indicator. The weighted sum factor may include at least one of a weighted factor and an offset.

可逐块地对与运动补偿相关联的信息进行熵编码/熵解码,或者可以以上级单元为单位对与运动补偿相关联的信息进行熵编码/熵解码。例如,可逐块(例如逐CTU、逐CU、或逐PU)地对与运动补偿相关联的信息进行熵编码/熵解码。可选地,可以以上级单元(诸如视频参数集、序列参数集、画面参数集、自适应参数集或条带头)为单位对与运动补偿相关联的信息进行熵编码/熵解码。The information associated with motion compensation may be entropy-encoded/entropy-decoded on a block-by-block basis, or may be entropy-encoded/entropy-decoded in units of higher-level units. For example, information associated with motion compensation may be entropy encoded/entropy decoded on a block-by-block basis (eg, CTU-by-CTU, CU-by-CU, or PU-by-PU). Alternatively, the information associated with motion compensation may be entropy-encoded/entropy-decoded in units of higher-level units such as video parameter sets, sequence parameter sets, picture parameter sets, adaptation parameter sets, or slice headers.

可基于运动补偿信息差对与运动补偿相关联的信息进行熵编码/熵解码,其中,运动补偿信息差指示与运动补偿相关联的信息和与运动补偿相关联的信息的预测值之间的差。The information associated with motion compensation may be entropy encoded/entropy decoded based on a difference in motion compensation information, wherein the difference in motion compensation information indicates a difference between the information associated with motion compensation and a predicted value of the information associated with motion compensation .

可将与相邻于当前块的已编码/解码块的运动补偿相关联的信息用作与当前块的运动补偿相关联的信息,代替对与当前块的运动补偿相关联的信息进行熵编码/熵解码。Instead of entropy coding/entropy encoding the information associated with motion compensation of the current block, the information associated with motion compensation of the coded/decoded block adjacent to the current block may be used as the information associated with motion compensation of the current block Entropy decoding.

可基于编码参数中的至少一个来推导至少一条与运动补偿相关联的信息。At least one piece of information associated with motion compensation may be derived based on at least one of the encoding parameters.

可基于编码参数中的至少一个对比特流进行解码来产生至少一条与运动补偿相关联的信息。相反,可基于编码参数中的至少一个将至少一条与运动补偿相关联的信息熵编码到比特流。The bitstream may be decoded based on at least one of the encoding parameters to generate at least one piece of information associated with motion compensation. Instead, at least one piece of information associated with motion compensation may be entropy encoded into the bitstream based on at least one of the encoding parameters.

至少一条与运动补偿相关联的信息可包括运动矢量、运动矢量候选、运动矢量候选索引、运动矢量差、运动矢量预测值、跳过模式使用/未使用信息skip_flag、合并模式使用/未使用信息merge_flag、合并索引信息merge_index、运动矢量分辨率信息、重叠块运动补偿信息、局部照度补偿信息、仿射运动补偿信息、解码器侧运动矢量推导信息和双向光流信息中的至少一个。这里,解码器侧运动矢量推导可意为模式匹配的运动矢量推导。At least one piece of information associated with motion compensation may include motion vector, motion vector candidate, motion vector candidate index, motion vector difference, motion vector predictor, skip mode use/unuse information skip_flag, merge mode use/unuse information merge_flag , at least one of merge index information merge_index, motion vector resolution information, overlapping block motion compensation information, local illumination compensation information, affine motion compensation information, decoder side motion vector derivation information, and bidirectional optical flow information. Here, decoder-side motion vector derivation may mean pattern-matched motion vector derivation.

运动矢量分辨率信息可以是指示哪种特定分辨率被用于运动矢量和运动矢量差中的至少一个的信息。这里,分辨率可意为精度。所述特定分辨率可被设置为16-像素(16-pel)单元、8-像素(8-pel)单元、4-像素(4-pel)单元、整数-像素(整数-pel)单元、1/2-像素(1/2-pel)单元、1/4-像素(1/4-pel)单元、1/8-像素(1/8-pel)单元、1/16-像素(1/16-pel)单元、1/32-像素(1/32-pel)单元以及1/64-像素(1/64-pel)单元中的至少任意一个。The motion vector resolution information may be information indicating which specific resolution is used for at least one of the motion vector and the motion vector difference. Here, resolution can mean precision. The specific resolution can be set to 16-pixel (16-pel) unit, 8-pixel (8-pel) unit, 4-pixel (4-pel) unit, integer-pixel (integer-pel) unit, 1 /2-pixel (1/2-pel) unit, 1/4-pixel (1/4-pel) unit, 1/8-pixel (1/8-pel) unit, 1/16-pixel (1/16 -pel) unit, at least any one of 1/32-pixel (1/32-pel) unit and 1/64-pixel (1/64-pel) unit.

重叠块运动补偿信息可以是指示在当前块的运动补偿期间与当前块在空间上相邻的邻近块的运动矢量是否将被另外用于计算当前块的预测块的加权和的信息。The overlapping block motion compensation information may be information indicating whether motion vectors of neighboring blocks spatially adjacent to the current block are to be additionally used to calculate a weighted sum of prediction blocks of the current block during motion compensation of the current block.

局部照度补偿信息可以是指示当产生当前块的预测块时是否应用权重因子和偏移中的任何一个的信息。这里,权重因子和偏移中的至少一个可以是基于参考块计算的值。The local luminance compensation information may be information indicating whether any one of the weighting factor and the offset is applied when the prediction block of the current block is generated. Here, at least one of the weighting factor and the offset may be a value calculated based on the reference block.

仿射运动补偿信息可以是指示仿射运动模型是否将用于对当前块的运动补偿的信息。这里,仿射运动模型可以是使用多个参数将一个块划分为多个子块并且使用代表性运动矢量计算子块的运动矢量的模型。The affine motion compensation information may be information indicating whether an affine motion model is to be used for motion compensation of the current block. Here, the affine motion model may be a model that divides one block into a plurality of sub-blocks using a plurality of parameters and calculates motion vectors of the sub-blocks using a representative motion vector.

解码器侧运动矢量推导信息可以是指示运动补偿所需的运动矢量是否被解码器推导并随后在解码器中被使用的信息。根据解码器侧运动矢量推导信息,与运动矢量相关联的信息可不被熵编码/熵解码。当解码器侧运动矢量推导信息指示运动矢量被解码器推导并随后在解码器中被使用时,与合并模式相关联的信息可被熵编码/熵解码。也就是说,解码器侧运动矢量推导信息可指示合并模式是否在解码器中被使用。The decoder-side motion vector derivation information may be information indicating whether a motion vector required for motion compensation is derived by the decoder and then used in the decoder. From the decoder side motion vector derivation information, the information associated with the motion vector may not be entropy encoded/entropy decoded. When the decoder-side motion vector derivation information indicates that the motion vector is derived by the decoder and then used in the decoder, the information associated with the merge mode may be entropy encoded/entropy decoded. That is, the decoder-side motion vector derivation information may indicate whether merge mode is used in the decoder.

双向光流信息可以是指示运动矢量是否被逐像素或逐子块地修改并且随后修改后的运动矢量是否被用于运动补偿的信息。根据双向光流信息,运动矢量可不被逐像素或逐子块地熵编码/熵解码。对运动矢量的修改意为将基于块的运动矢量的值转换为基于像素的运动矢量的值或基于子块的运动矢量的值。The bidirectional optical flow information may be information indicating whether the motion vector is modified pixel by pixel or subblock by subblock and then whether the modified motion vector is used for motion compensation. According to the bidirectional optical flow information, the motion vector may not be entropy encoded/entropy decoded on a per-pixel or per-subblock basis. The modification of the motion vector means converting the value of the block-based motion vector to the value of the pixel-based motion vector or the value of the sub-block-based motion vector.

可基于至少一条与运动补偿相关联的信息对当前块进行运动补偿,并且可对所述至少一条与运动补偿相关联的信息进行熵编码/熵解码。The current block may be motion compensated based on at least one piece of information associated with motion compensation, and the at least one piece of information associated with motion compensation may be entropy encoded/entropy decoded.

当与运动补偿相关联的信息被熵编码/熵解码时,可使用二值化方法,诸如截断莱斯二值化方法、K阶指数哥伦布二值化方法、有限K阶指数哥伦布二值化方法、固定长度二值化方法、一元二值化方法和截断一元二值化方法。When the information associated with motion compensation is entropy encoded/entropy decoded, binarization methods such as truncated Rice binarization method, K-order exponential Golomb binarization method, finite K-order exponential Golomb binarization method may be used , fixed-length binarization method, unary binarization method, and truncated unary binarization method.

当与运动补偿相关联的信息被熵编码/熵解码时,可基于以下信息中的至少一个信息来确定上下文模型:与相邻于当前块的邻近块的运动信息或邻近块的区域信息相关联的信息;先前编码/解码的与运动补偿相关联的信息或先前编码/解码的区域信息;关于当前块的深度的信息;关于当前块的尺寸的信息。When the information associated with motion compensation is entropy encoded/entropy decoded, the context model may be determined based on at least one of the following information: associated with motion information of neighboring blocks adjacent to the current block or region information of neighboring blocks information; previously encoded/decoded information associated with motion compensation or previously encoded/decoded region information; information about the depth of the current block; information about the size of the current block.

可选地,当与运动补偿相关联的信息被熵编码/熵解码时,可通过将以下信息中的至少一个信息用作与当前块的运动补偿相关联的信息的预测值来执行熵编码/熵解码:与邻近块的运动补偿相关联的信息、先前编码/解码的与运动补偿相关联的信息、关于当前块的深度的信息和关于当前块的尺寸的信息。Alternatively, when the information associated with motion compensation is entropy encoded/entropy decoded, entropy encoding/entropy may be performed by using at least one of the following information as a predictor of the information associated with motion compensation of the current block. Entropy decoding: information associated with motion compensation of neighboring blocks, previously encoded/decoded information associated with motion compensation, information about the depth of the current block, and information about the size of the current block.

在下文中,可参照图13至图24描述重叠块运动补偿的细节。Hereinafter, details of overlapping block motion compensation may be described with reference to FIGS. 13 to 24 .

图13是示出逐子块地执行重叠块运动补偿的示例的示图。FIG. 13 is a diagram illustrating an example of performing overlapping block motion compensation on a sub-block-by-sub-block basis.

参照图13,阴影块是将被执行重叠块运动补偿的区域。阴影块可包括当前块的位于边界的子块或者当前块中的子块。由粗实线标定的区域可以是当前块。Referring to FIG. 13 , the shaded blocks are the regions where the overlapping block motion compensation is to be performed. The shaded blocks may include sub-blocks of the current block located at the boundary or sub-blocks in the current block. The area demarcated by the thick solid line may be the current block.

箭头指示邻近子块的运动信息被用于当前子块的运动补偿。这里,箭头尾部所位于的区域可意为(1)与当前块相邻的邻近子块或当前块内的与当前子块邻近的邻近子块。箭头头部所位于的区域可意为当前块内的当前子块。Arrows indicate that motion information of neighboring sub-blocks is used for motion compensation of the current sub-block. Here, the area where the tail of the arrow is located may mean (1) the adjacent sub-block adjacent to the current block or the adjacent sub-block adjacent to the current sub-block within the current block. The area where the arrow head is located may mean the current sub-block within the current block.

对于阴影块,可计算第一预测块和第二预测块的加权和。当前块内的当前子块的运动信息可被用作用于产生第一预测块的运动信息。与当前块相邻的邻近子块的运动信息和与当前子块相邻并且包括在当前块中的邻近子块的运动信息中的至少一个或两者可被用作用于产生第二预测块的运动信息。For shadow blocks, a weighted sum of the first prediction block and the second prediction block may be calculated. The motion information of the current sub-block within the current block may be used as motion information for generating the first prediction block. At least one or both of motion information of adjacent sub-blocks adjacent to the current block and motion information of adjacent sub-blocks adjacent to the current sub-block and included in the current block may be used as parameters for generating the second prediction block. sports information.

另外,为了提高编码效率,用于产生第二预测块的运动信息可包括当前块内的当前子块的上方块、左侧块、下方块、右侧块、右上方块、右下方块、左上方块和左下方块中的至少一个的运动信息。可根据当前子块的位置来确定可用于产生第二预测块的邻近子块。例如,当当前子块位于当前块的上边界时,可使用位于当前子块的上侧、右上侧和左上侧的邻近子块之中的至少一个邻近子块。当当前子块位于当前块的左边界时,可使用位于当前子块的左侧、左上侧和左下侧的邻近子块之中的至少一个邻近子块。In addition, in order to improve coding efficiency, the motion information used to generate the second prediction block may include an upper block, a left block, a lower block, a right block, an upper right block, a lower right block, and an upper left block of the current subblock within the current block. and motion information for at least one of the lower left squares. Neighboring sub-blocks that can be used to generate the second prediction block may be determined according to the position of the current sub-block. For example, when the current subblock is located at the upper boundary of the current block, at least one neighboring subblock among neighboring subblocks located on the upper side, the upper right side, and the upper left side of the current subblock may be used. When the current subblock is located at the left boundary of the current block, at least one neighboring subblock among neighboring subblocks located on the left side, the upper left side, and the lower left side of the current subblock may be used.

这里,位于当前子块的上侧、左侧、下侧、右侧、右上侧、右下侧、左上侧和左下侧的块可分别被称为上邻近子块、左邻近子块、下邻子近块、右邻近子块、右上邻近子块、右下邻近子块、左上邻近子块和左下邻近子块。Here, blocks located on the upper side, left side, lower side, right side, upper right side, lower right side, upper left side, and lower left side of the current sub-block may be referred to as upper adjacent sub-block, left adjacent sub-block, lower adjacent sub-block, respectively Sub-near-block, right-adjacent sub-block, upper-right adjacent sub-block, lower-right adjacent sub-block, upper-left adjacent sub-block, and lower-left adjacent sub-block.

同时,为了降低计算复杂度,用于产生第二预测块的运动信息可根据与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块的运动矢量的大小而变化。Meanwhile, in order to reduce the computational complexity, the motion information for generating the second prediction block may be determined according to the size of the motion vector of the adjacent sub-block adjacent to the current block or the adjacent sub-block adjacent to the current sub-block within the current block. Variety.

例如,当邻近子块是双向预测的子块时,对运动矢量的L0方向和L1方向的大小进行比较,并且可仅将较大大小的方向的运动信息用于产生第二预测块。For example, when the adjacent subblock is a bidirectionally predicted subblock, the sizes of the motion vector in the L0 direction and the L1 direction are compared, and only the motion information in the direction of the larger size may be used to generate the second prediction block.

可选地,例如,运动矢量的L0方向的x分量和y分量的绝对值之和以及运动矢量的L1方向的x分量和y分量的绝对值之和被计算。然后,可仅将等于或大于预定值的运动矢量用于产生第二预测块。这里,该预定值可以是0或正整数。该预定值可以是基于从编码器用信号传送到解码器的信息所确定的值。可选地,该预定值可不信号传送,而可以是在编码器和解码器中被相同设置的值。Alternatively, for example, the sum of absolute values of the x component and the y component of the motion vector in the L0 direction and the sum of the absolute values of the x component and the y component of the L1 direction of the motion vector are calculated. Then, only motion vectors equal to or greater than a predetermined value may be used to generate the second prediction block. Here, the predetermined value may be 0 or a positive integer. The predetermined value may be a value determined based on information signaled from the encoder to the decoder. Alternatively, the predetermined value may not be signaled, but may be a value that is identically set in the encoder and decoder.

另外,为了降低计算复杂度,用于产生第二预测块的运动信息可根据当前子块的运动矢量的大小和方向而变化。In addition, in order to reduce computational complexity, the motion information for generating the second prediction block may vary according to the size and direction of the motion vector of the current sub-block.

例如,可对当前子块的运动矢量的x分量和y分量的绝对值进行比较。当x分量的绝对值较大时,当前子块的左侧子块和右侧子块中的至少一个的运动信息可被用于产生第二预测块。For example, the absolute values of the x-component and the y-component of the motion vector of the current subblock may be compared. When the absolute value of the x component is larger, motion information of at least one of the left subblock and the right subblock of the current subblock may be used to generate the second prediction block.

可选地,例如,可对当前子块的运动矢量的x分量和y分量的绝对值进行比较。当y分量的绝对值较大时,当前子块的上方子块和下方子块中的至少一个的运动信息可被用于产生第二预测块。Alternatively, for example, the absolute values of the x-component and the y-component of the motion vector of the current sub-block may be compared. When the absolute value of the y component is larger, the motion information of at least one of the upper sub-block and the lower sub-block of the current sub-block may be used to generate the second prediction block.

可选地,例如,当当前子块的运动矢量的x分量的绝对值等于或大于预定值时,当前子块的左侧子块和右侧子块中的至少一个的运动信息可用于产生第二预测块。这里,该预定值可以是零(0)或正整数。该预定值可基于从编码器用信号传送到解码器的信息被确定,或者可在编码器和解码器中被相同设置。Optionally, for example, when the absolute value of the x-component of the motion vector of the current sub-block is equal to or greater than a predetermined value, the motion information of at least one of the left sub-block and the right sub-block of the current sub-block may be used to generate the first sub-block. Two prediction blocks. Here, the predetermined value may be zero (0) or a positive integer. The predetermined value may be determined based on information signaled from the encoder to the decoder, or may be set identically in the encoder and decoder.

进一步可选地,例如,当当前子块的运动矢量的y分量的绝对值等于或大于预定值时,当前子块的上方子块和下方子块中的至少一个的运动信息可用于产生第二预测块。这里,该预定值可以是零(0)或正整数。该预定值可基于从编码器用信号传送到解码器的信息被确定,或者可在编码器和解码器中被相同设置。Further optionally, for example, when the absolute value of the y-component of the motion vector of the current sub-block is equal to or greater than a predetermined value, the motion information of at least one of the upper sub-block and the lower sub-block of the current sub-block may be used to generate the second sub-block. prediction block. Here, the predetermined value may be zero (0) or a positive integer. The predetermined value may be determined based on information signaled from the encoder to the decoder, or may be set identically in the encoder and decoder.

这里,子块可具有N×M的尺寸,其中,N和M是正整数。N和M可以相等或者可不相等。例如,子块的尺寸可以是4×4或8×8。子块的尺寸的信息可按照序列单元等级被熵编码/熵解码。Here, the sub-block may have a size of N×M, where N and M are positive integers. N and M may or may not be equal. For example, the size of the sub-block may be 4x4 or 8x8. The information of the size of the sub-block may be entropy encoded/entropy decoded at the sequence unit level.

子块的尺寸可基于当前块的尺寸被确定。例如,当当前块的尺寸为K个样点或少于K个样点时,子块的尺寸可以是4×4。同时,当当前块的尺寸大于K个样点时,子块的尺寸可以是8×8。这里,K是正整数,例如256。The size of the sub-block may be determined based on the size of the current block. For example, when the size of the current block is K samples or less, the size of the sub-block may be 4×4. Meanwhile, when the size of the current block is larger than K samples, the size of the sub-block may be 8×8. Here, K is a positive integer such as 256.

这里,子块的尺寸的信息可以以序列、画面、条带、并行块、CTU、CU和PU中的至少任意一个为单位被熵编码/熵解码。另外,子块的尺寸可以是在编码器和解码器中被预设的预定值。Here, the information of the size of the sub-block may be entropy-encoded/entropy-decoded in units of at least any one of a sequence, a picture, a slice, a parallel block, a CTU, a CU, and a PU. In addition, the size of the sub-block may be a predetermined value preset in the encoder and the decoder.

子块可具有正方形形状或矩形形状。例如,当当前块具有正方形形状或矩形形状时,子块可具有正方形形状。The sub-blocks may have a square shape or a rectangular shape. For example, when the current block has a square shape or a rectangular shape, the sub-block may have a square shape.

例如,当当前块具有矩形形状时,子块可具有矩形形状。For example, when the current block has a rectangular shape, the sub-block may have a rectangular shape.

这里,子块的形状的信息可以以序列、画面、条带、并行块、CTU、CU和PU中的至少一个为单位被熵编码/熵解码。另外,子块的形状可以是在编码器和解码器中被预设的预定形状。Here, the information of the shape of the sub-block may be entropy-encoded/entropy-decoded in units of at least one of a sequence, a picture, a slice, a parallel block, a CTU, a CU, and a PU. In addition, the shape of the sub-block may be a predetermined shape preset in the encoder and the decoder.

图14是示出使用同位块的子块的运动信息执行重叠块运动补偿的示例的示图。为了提高编码效率,在同位画面或参考画面中与当前块在空间上位于相同位置的同位子块的运动信息可用于产生第二预测块。FIG. 14 is a diagram illustrating an example of performing overlapping block motion compensation using motion information of sub-blocks of a co-located block. To improve coding efficiency, motion information of co-located sub-blocks that are spatially co-located with the current block in the co-located picture or reference picture may be used to generate the second prediction block.

参照图14,在同位块内与当前块在时间上相邻的子块的运动信息可用于对当前子块进行重叠块运动补偿。箭头尾部所位于的区域可以是同位块内的子块。箭头头部所位于的区域可以是当前块内的当前子块。Referring to FIG. 14 , motion information of sub-blocks that are temporally adjacent to the current block within the co-located block may be used to perform overlapping block motion compensation on the current sub-block. The region in which the tail of the arrow is located may be a sub-block within a co-located block. The area where the arrow head is located may be the current sub-block within the current block.

另外,同位画面中的同位子块、与当前块在空间上相邻的邻近子块、以及当前块内与当前子块在空间上相邻的邻近子块中的至少一个的运动信息可用于产生第二预测块。In addition, motion information for at least one of a collocated sub-block in a collocated picture, a neighboring sub-block that is spatially adjacent to the current block, and a neighboring sub-block that is spatially adjacent to the current sub-block within the current block may be used to generate The second prediction block.

图15是示出使用与参考块的边界相邻的块的运动信息执行重叠块运动补偿的示例的示图。为了提高编码效率,可通过使用当前块的运动矢量和参考画面索引中的至少一个来识别参考画面中的参考块,并且与识别出的参考块的边界相邻的邻近块的运动信息可用于产生第二预测块。这里,邻近块可包括与参考块的位于右边界或左边界的子块相邻的已编码/解码块。FIG. 15 is a diagram illustrating an example of performing overlapping block motion compensation using motion information of blocks adjacent to a boundary of a reference block. To improve coding efficiency, a reference block in a reference picture may be identified by using at least one of a motion vector of the current block and a reference picture index, and motion information of neighboring blocks adjacent to the boundary of the identified reference block may be used to generate The second prediction block. Here, the adjacent blocks may include coded/decoded blocks adjacent to sub-blocks of the reference block located at the right or left boundary.

参照图15,与参考块的下边界或右边界相邻的已编码/解码块的运动信息可用于对当前子块进行重叠块运动补偿。Referring to FIG. 15 , motion information of encoded/decoded blocks adjacent to the lower or right boundary of the reference block may be used to perform overlapping block motion compensation on the current sub-block.

另外,与参考块的下边界或右边界相邻的已编码/解码块的运动信息、与当前块在空间上相邻的邻近子块的运动信息、以及当前块内与当前子块在空间上相邻的邻近子块的运动信息中的至少一个运动信息可用于产生第二预测块。In addition, motion information of coded/decoded blocks adjacent to the lower or right boundary of the reference block, motion information of adjacent sub-blocks that are spatially adjacent to the current block, and spatially adjacent to the current sub-block within the current block At least one of the motion information of adjacent neighboring sub-blocks may be used to generate the second prediction block.

为了提高编码效率,在合并候选列表中包括的多个合并候选中的至少一个合并候选的运动信息可用于产生第二预测块。这里,合并候选列表可以是在多个帧间预测模式之中的合并模式中使用的列表。In order to improve coding efficiency, motion information of at least one merging candidate among a plurality of merging candidates included in the merging candidate list may be used to generate the second prediction block. Here, the merge candidate list may be a list used in a merge mode among a plurality of inter prediction modes.

例如,合并候选列表中的空间合并候选可被用作用于产生第二预测块的运动信息。For example, spatial merging candidates in the merging candidate list may be used as motion information for generating the second prediction block.

可选地,例如,合并候选列表中的时间合并候选可被用作用于产生第二预测块的运动信息。Alternatively, for example, temporal merging candidates in the merging candidate list may be used as motion information for generating the second prediction block.

进一步可选地,例如,合并候选列表中的组合合并候选可被用作用于产生第二预测块的运动信息。Further alternatively, for example, combined merging candidates in the merging candidate list may be used as motion information for generating the second prediction block.

可选地,为了提高编码效率,运动矢量候选列表中包括的多个运动矢量候选中的至少一个运动矢量可被用作用于产生第二预测块的运动矢量。这里,运动矢量候选列表可以是在多个帧间预测模式之中的AMVP模式中使用的列表。Optionally, in order to improve coding efficiency, at least one motion vector among a plurality of motion vector candidates included in the motion vector candidate list may be used as a motion vector for generating the second prediction block. Here, the motion vector candidate list may be a list used in AMVP mode among a plurality of inter prediction modes.

例如,运动矢量候选列表中的空间运动矢量候选可被用作用于产生第二预测块的运动信息。For example, spatial motion vector candidates in the motion vector candidate list may be used as motion information for generating the second prediction block.

可选地,例如,运动矢量候选列表中的时间运动矢量候选可被用作用于产生第二预测块的运动信息。Alternatively, for example, temporal motion vector candidates in the motion vector candidate list may be used as motion information for generating the second prediction block.

当合并候选和运动矢量候选中的至少一个被用作产生第二预测块所需的运动信息时,可不同地设置重叠块运动补偿被应用到的区域。重叠块运动补偿被应用到的区域可以是块的与边界相邻的区域(即,块的位于边界的子块)或者块的不与边界相邻的区域(即,块的不位于边界的子块)。When at least one of a merge candidate and a motion vector candidate is used as motion information required for generating the second prediction block, a region to which the overlapping block motion compensation is applied may be set differently. The area to which the overlapping block motion compensation is applied may be the area of the block that is adjacent to the boundary (ie, the sub-block of the block that is located at the boundary) or the area of the block that is not adjacent to the boundary (ie, the sub-block of the block that is not located at the boundary. piece).

当重叠块运动补偿被应用于块的不与边界相邻的区域时,合并候选和运动矢量候选中的至少一个可被用作产生第二预测块所需的运动信息。When overlapping block motion compensation is applied to a region of a block that is not adjacent to a boundary, at least one of a merge candidate and a motion vector candidate may be used as motion information required for generating the second prediction block.

例如,可通过将空间合并候选或空间运动矢量候选用作运动信息,针对块的不与边界相邻的区域执行重叠块运动补偿。For example, overlapping block motion compensation may be performed for a region of a block that is not adjacent to a boundary by using spatial merging candidates or spatial motion vector candidates as motion information.

可选地,例如,可通过将时间合并候选或时间运动矢量候选用作运动信息,针对块的不与边界相邻的区域执行重叠块运动补偿。Alternatively, for example, overlapping block motion compensation may be performed for an area of a block that is not adjacent to a boundary by using a temporal merge candidate or a temporal motion vector candidate as motion information.

进一步可选地,例如,可通过将空间合并候选或空间运动矢量候选用作运动信息,针对块的与下边界或右边界相邻的区域执行重叠块运动补偿。Further alternatively, for example, overlapping block motion compensation may be performed for a region of the block adjacent to the lower boundary or the right boundary by using spatial merging candidates or spatial motion vector candidates as motion information.

进一步可选地,例如,可通过将时间合并候选或时间运动矢量候选用作运动信息,针对块的与下边界或右边界相邻的区域执行重叠块运动补偿。Further alternatively, for example, overlapping block motion compensation may be performed for a region of the block adjacent to the lower boundary or the right boundary by using a temporal merge candidate or a temporal motion vector candidate as motion information.

另外,为了提高编码效率,在合并候选列表或运动矢量候选列表内的从特定块推导出的运动信息可用于针对特定区域的重叠块运动补偿。In addition, in order to improve coding efficiency, motion information derived from a specific block within a merge candidate list or a motion vector candidate list may be used for overlapping block motion compensation for a specific region.

例如,当当前块的右上方邻近块的运动信息被包括在合并候选列表或运动矢量候选列表中时,该运动信息可用于当前块的右边界区域的重叠块运动补偿。For example, when motion information of the upper-right neighboring block of the current block is included in the merge candidate list or the motion vector candidate list, the motion information may be used for overlapping block motion compensation of the right boundary region of the current block.

可选地,例如,当当前块的左下方邻近块的运动信息被包括在合并候选列表或运动矢量候选列表中时,该运动信息可用于当前块的下边界区域的重叠块运动补偿。Alternatively, for example, when the motion information of the lower left neighboring block of the current block is included in the merge candidate list or the motion vector candidate list, the motion information may be used for overlapping block motion compensation of the lower boundary area of the current block.

图16是示出逐子块组地执行重叠块运动补偿的示例的示图。为了降低计算复杂度,可以以包括一个或更多个子块的子块集为单位来执行基于子块的重叠块运动补偿。子块集的单位可意为子块组的单位。FIG. 16 is a diagram illustrating an example of performing overlapping block motion compensation on a sub-block group-by-sub-block group basis. To reduce computational complexity, sub-block-based overlapping block motion compensation may be performed in units of a sub-block set including one or more sub-blocks. The unit of the sub-block set may mean the unit of the sub-block group.

参照图16,用线标定的阴影区域可被称为子块组。箭头意为相邻的邻近子块的运动信息可用于当前子块组的运动补偿。箭头尾部所位于的区域可以是(1)与当前块相邻的邻近子块、(2)与当前块相邻的邻近子块组、或(3)当前块内的与当前子块相邻的邻近子块组。另外,箭头头部所位于的区域可意为当前块内的当前子块组。Referring to FIG. 16 , the shaded areas marked with lines may be referred to as sub-block groups. Arrows mean that the motion information of adjacent neighboring sub-blocks can be used for motion compensation of the current sub-block group. The area where the tail of the arrow is located may be (1) adjacent sub-blocks adjacent to the current block, (2) adjacent sub-block groups adjacent to the current block, or (3) adjacent sub-blocks within the current block adjacent to the current sub-block. Adjacent sub-block groups. In addition, the area where the arrow head is located may mean the current sub-block group within the current block.

对于每个子块组,可计算第一预测块和第二预测块的加权和。当前块内的当前子块组的运动信息可被用作用于产生第一预测块的运动信息。这里,当前块内的当前子块组的运动信息可以是当前子块组内的每个子块的运动信息的平均值、中值、最小值、最大值和加权和中的任意一个。与当前块相邻的邻近子块的运动信息、与当前块相邻的邻近子块组的运动信息以及当前块内的与当前子块相邻的邻近子块的运动信息中的至少一个可被用作用于产生第二预测块的运动信息。这里,与当前块相邻的邻近子块组的运动信息可以是该在邻近子块组中包括的每个子块的运动信息的平均值、中值、最小值、最大值和加权和中的任意一个。For each sub-block group, a weighted sum of the first prediction block and the second prediction block may be calculated. The motion information of the current sub-block group within the current block may be used as motion information for generating the first prediction block. Here, the motion information of the current sub-block group within the current block may be any one of an average value, a median value, a minimum value, a maximum value, and a weighted sum of the motion information of each sub-block within the current sub-block group. At least one of motion information of adjacent sub-blocks adjacent to the current block, motion information of adjacent sub-block groups adjacent to the current block, and motion information of adjacent sub-blocks adjacent to the current sub-block within the current block may be Used as motion information for generating the second prediction block. Here, the motion information of the adjacent sub-block group adjacent to the current block may be any of the average value, median, minimum value, maximum value and weighted sum of the motion information of each sub-block included in the adjacent sub-block group One.

这里,当前块可包括一个或更多个子块组。一个子块组的水平尺寸可等于或小于一个当前子块的水平尺寸。另外,一个子块组的垂直尺寸可等于或小于一个当前子块的垂直尺寸。另外,可针对当前块的位于上边界和左边界的多个子块中的至少一个子块执行重叠块运动补偿。Here, the current block may include one or more sub-block groups. The horizontal size of one sub-block group may be equal to or smaller than the horizontal size of one current sub-block. In addition, the vertical size of one subblock group may be equal to or smaller than the vertical size of one current subblock. In addition, overlapping block motion compensation may be performed for at least one sub-block among a plurality of sub-blocks of the current block located at the upper boundary and the left boundary.

由于与当前块内的下边界和右边界相邻的块尚未被编码/解码,因此可不针对当前块内位于下边界和右边界的多个子块中的至少一个子块执行重叠块运动补偿。可选地,由于与当前块内的下边界和右边界相邻的块尚未被编码/解码,因此可通过使用当前子块的上方块的运动信息、左侧块的运动信息、左上方块的运动信息、左下方块的运动信息以及右上方块的运动信息中的至少一个,针对当前块内位于左边界和右边界的多个子块中的至少任意一个执行重叠块运动补偿。Since blocks adjacent to the lower and right boundaries within the current block have not been encoded/decoded, overlapping block motion compensation may not be performed for at least one subblock among the plurality of subblocks located at the lower and right boundaries within the current block. Alternatively, since the blocks adjacent to the lower boundary and the right boundary within the current block have not been encoded/decoded, the motion information of the upper block of the current subblock, the motion information of the left block, the motion of the upper left block can be obtained by using the motion information of the current subblock. At least one of the information, the motion information of the lower left block, and the motion information of the upper right block, overlapping block motion compensation is performed for at least any one of a plurality of sub-blocks located at the left and right boundaries within the current block.

另外,当当前块将在合并模式下被预测并且具有改进的时间运动矢量预测候选和空间-时间运动矢量预测候选中的至少一个时,针对当前块内位于下边界和右边界的多个子块中的至少一个子块,可不执行重叠块运动补偿。In addition, when the current block is to be predicted in merge mode and has at least one of an improved temporal motion vector prediction candidate and a spatio-temporal motion vector prediction candidate, for multiple sub-blocks located at the lower boundary and the right boundary within the current block For at least one sub-block of , overlapping block motion compensation may not be performed.

另外,当当前块将在解码器侧运动矢量推导模式或仿射运动补偿模式下被预测时,针对当前块内位于下边界和右边界的多个子块中的至少一个子块,可不执行重叠块运动补偿。In addition, when the current block is to be predicted in the decoder-side motion vector derivation mode or the affine motion compensation mode, overlapping blocks may not be performed for at least one sub-block among a plurality of sub-blocks located at the lower boundary and the right boundary within the current block motion compensation.

另外,可针对当前块的颜色分量中的至少一个执行重叠块运动补偿。颜色分量可包括亮度分量和色度分量中的至少一个。Additionally, overlapping block motion compensation may be performed for at least one of the color components of the current block. The color components may include at least one of a luma component and a chroma component.

可选地,可根据当前块的帧间预测指示符执行重叠块运动补偿。也就是说,当当前块将被单向预测、双向预测、三向预测和/或四向预测时,可执行重叠块运动补偿。可选地,可仅在当前块被单向预测时执行重叠块运动补偿。进一步可选地,可仅在当前块被双向预测时执行重叠块运动补偿。Optionally, overlapping block motion compensation may be performed according to the current block's inter prediction indicator. That is, when the current block is to be uni-predicted, bi-predicted, tri-predicted, and/or quad-predicted, overlapping block motion compensation may be performed. Alternatively, overlapping block motion compensation may be performed only when the current block is uni-directionally predicted. Further alternatively, overlapping block motion compensation may be performed only when the current block is bi-directionally predicted.

图17是示出用于重叠块运动补偿的多条运动信息的示例的示图。FIG. 17 is a diagram illustrating an example of pieces of motion information used for overlapping block motion compensation.

用于产生第二预测块的运动信息的最大条数可以是K。也就是说,最多K个第二预测块可被产生并用于重叠块运动补偿。这里,K可以是零(0)或正整数,例如,1、2、3或4。The maximum number of pieces of motion information for generating the second prediction block may be K. That is, at most K second prediction blocks can be generated and used for overlapping block motion compensation. Here, K may be zero (0) or a positive integer, eg, 1, 2, 3, or 4.

例如,当使用与当前块相邻的邻近子块的运动信息产生第二预测块时,可从上方块和右侧块中的至少一个推导最多两条运动信息。当基于当前块内的与当前子块相邻的邻近子块的运动信息产生第二预测块时,可从当前子块的上方块、左侧块、右侧块、左上方块、右上方块、左下方块和右下方块中的至少一个推导最多四条运动信息。这里,表述“推导运动信息”可意为使用推导出的运动信息产生第二预测块然后使用产生的第二预测块执行重叠块运动补偿的处理。For example, when the second prediction block is generated using motion information of neighboring sub-blocks adjacent to the current block, at most two pieces of motion information may be derived from at least one of the upper block and the right block. When the second prediction block is generated based on the motion information of the adjacent sub-blocks adjacent to the current sub-block in the current block, the upper block, the left block, the right block, the upper-left block, the upper-right block, the lower-left block of the current sub-block may be At least one of the square and the lower right square derives up to four pieces of motion information. Here, the expression "deriving motion information" may mean a process of generating a second prediction block using the derived motion information and then performing overlapping block motion compensation using the generated second prediction block.

参照图17,为了提高编码效率,当针对当前块内位于上边界和左边界的多个子块中的至少一个执行运动补偿时,最多三条运动信息可被推导用于产生第二预测块。也就是说,可基于3连接来推导用于产生第二预测块的运动信息。17 , in order to improve coding efficiency, when motion compensation is performed for at least one of a plurality of sub-blocks located at the upper and left boundaries within the current block, up to three pieces of motion information may be derived for generating the second prediction block. That is, motion information for generating the second prediction block may be derived based on 3 connections.

例如,当针对当前块内位于上边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的上方邻近块、左上方邻近块和右上方邻近块中的至少一个推导运动信息。For example, when motion compensation is performed on a sub-block located at an upper boundary within the current block, it may be derived from at least one of an upper, upper-left, and upper-right adjacent block among adjacent sub-blocks adjacent to the current block sports information.

例如,当针对当前块内位于左边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的左侧邻近块、左上方邻近块和左下方邻近块中的至少一个推导运动信息。For example, when motion compensation is performed on a subblock located at the left boundary within the current block, at least one of a left adjacent block, an upper left adjacent block, and a lower left adjacent block among adjacent subblocks adjacent to the current block may be obtained from at least one Derive motion information.

另外,当针对当前块内位于左上边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的上方邻近块、左侧邻近块和左上方邻近块中的至少一个推导运动信息。In addition, when motion compensation is performed for a subblock located at the upper left boundary within the current block, it may be derived from at least one of an upper adjacent block, a left adjacent block, and an upper left adjacent block among adjacent subblocks adjacent to the current block sports information.

另外,当针对当前块内位于右上边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的上方邻近块、左上方邻近块和右上方邻近块中的至少一个推导运动信息。In addition, when motion compensation is performed for a sub-block located at the upper right boundary within the current block, it may be derived from at least one of an upper adjacent block, an upper left adjacent block, and an upper right adjacent block among adjacent sub-blocks adjacent to the current block sports information.

同时,当针对当前块内位于左下边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的左侧邻近块、左上方邻近块和左下方邻近块中的至少一个推导运动信息。Meanwhile, when motion compensation is performed for a sub-block located at the lower left boundary within the current block, at least one of a left-side adjacent block, an upper-left adjacent block, and a lower-left adjacent block among adjacent sub-blocks adjacent to the current block may be selected from Derive motion information.

可选地,为了提高编码效率,当针对当前块内的不是位于上边界和左边界的多个子块中的至少一个的子块执行运动补偿时,最多8条运动信息可被推导用于产生第二预测块。也就是说,可基于8连接来推导用于产生第二预测块的运动信息。Optionally, in order to improve coding efficiency, when motion compensation is performed for a sub-block within the current block that is not at least one of the multiple sub-blocks located at the upper boundary and the left boundary, a maximum of 8 pieces of motion information may be derived to generate the first sub-block. Two prediction blocks. That is, motion information for generating the second prediction block may be derived based on 8 connections.

例如,对于当前块内的子块,可从包括在当前块内的作为与当前子块相邻的邻近子块中的上方邻近块、左侧邻近块、下方邻近块、右侧邻近块、左上方邻近块、左下方邻近块、右下方邻近块和右上方邻近块中的至少一个推导运动信息。For example, for a subblock within the current block, it can be selected from the upper adjacent block, left adjacent block, lower adjacent block, right adjacent block, upper left adjacent block included in the current block as adjacent subblocks adjacent to the current subblock The motion information is derived from at least one of a square neighbor block, a lower left neighbor block, a lower right neighbor block, and an upper right neighbor block.

另外,可从同位画面内的同位子块推导用于产生第二预测块的运动信息。另外,可从参考画面内的与参考块的下边界和右边界相邻的已编码/解码块推导用于产生第二预测块的运动信息。Additionally, motion information used to generate the second prediction block may be derived from the co-located sub-blocks within the co-located picture. In addition, motion information for generating the second prediction block may be derived from coded/decoded blocks within the reference picture that are adjacent to the lower and right boundaries of the reference block.

另外,为了提高编码效率,可根据运动矢量的大小和方向来确定用于产生第二预测块的运动信息的条数。In addition, in order to improve coding efficiency, the number of pieces of motion information for generating the second prediction block may be determined according to the size and direction of the motion vector.

例如,当运动矢量的x分量和y分量的绝对值之和等于或大于J时,可使用最多L条运动信息。相反,当运动矢量的x分量和y分量的绝对值之和小于J时,可使用最多P条运动信息。在这种情况下,J、L和P是零或正整数。L和P优选为不同的值。然而,L和P可以彼此相等。For example, when the sum of the absolute values of the x-component and the y-component of the motion vector is equal to or greater than J, up to L pieces of motion information may be used. Conversely, when the sum of the absolute values of the x-component and the y-component of the motion vector is less than J, at most P pieces of motion information may be used. In this case, J, L and P are zero or positive integers. L and P are preferably different values. However, L and P may be equal to each other.

另外,当当前块将以合并模式被预测时并且当改进的时间运动矢量预测候选和空间-时间运动矢量预测候选中的至少一个被使用时,最多K条运动信息可被用于产生第二预测块。这里,K可以是零或正整数,例如4。In addition, when the current block is to be predicted in merge mode and when at least one of the improved temporal motion vector prediction candidate and the spatio-temporal motion vector prediction candidate is used, at most K pieces of motion information may be used to generate the second prediction piece. Here, K can be zero or a positive integer, such as 4.

另外,当当前块将以解码器侧运动矢量推导模式被预测时,最多K条运动信息可被用于产生第二预测块。这里,K可以是零或正整数,例如4。In addition, when the current block is to be predicted in the decoder-side motion vector derivation mode, at most K pieces of motion information may be used to generate the second prediction block. Here, K can be zero or a positive integer, such as 4.

另外,当当前块将以仿射运动补偿模式被预测时,最多K条运动信息可被用于产生第二预测块。这里,K可以是零或正整数,例如4。In addition, when the current block is to be predicted in the affine motion compensation mode, at most K pieces of motion information may be used to generate the second prediction block. Here, K can be zero or a positive integer, such as 4.

图18和图19是示出推导用于产生第二预测块的运动信息的顺序的示图。用于产生第二预测块的运动信息可按照在编码器和解码器中预设的预定顺序被推导。18 and 19 are diagrams illustrating an order of deriving motion information for generating a second prediction block. The motion information for generating the second prediction block may be derived in a predetermined order preset in the encoder and the decoder.

参照图18,可按照上方块、左侧块、下方块和右侧块的顺序从当前块的邻近块推导运动信息。Referring to FIG. 18 , motion information may be derived from neighboring blocks of a current block in the order of an upper block, a left block, a lower block, and a right block.

参照图19,为了提高编码效率,可基于当前子块的位置来确定推导用于产生第二预测块的运动信息的顺序。Referring to FIG. 19 , in order to improve coding efficiency, an order of deriving motion information for generating the second prediction block may be determined based on the position of the current subblock.

例如,当针对当前块内位于上边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)上方邻近块、(2)左上方邻近块和(3)右上方邻近块的顺序从邻近子块推导运动信息。For example, when the motion information is derived for a current subblock located at the upper boundary within the current block, it may be in accordance with (1) the upper adjacent block, (2) the upper left adjacent block, and (3) which are adjacent subblocks adjacent to the current block. The order of the upper right neighboring blocks derives motion information from neighboring sub-blocks.

另外,当针对当前块内位于左边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)左侧邻近块、(2)左上方邻近块和(3)左下方邻近块的顺序从邻近子块推导运动信息。In addition, when the motion information is derived for the current sub-block located at the left boundary within the current block, it may be determined as (1) the left-side neighboring block, (2) the upper-left neighboring block, and (3) as neighboring sub-blocks adjacent to the current block. ) The order of the lower left neighboring blocks derives motion information from neighboring sub-blocks.

另外,当针对当前块内位于左上边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)上方邻近块、(2)左侧邻近块和(3)左上方邻近块的顺序从邻近子块推导运动信息。In addition, when the motion information is derived for the current subblock located at the upper left boundary within the current block, it may be in accordance with (1) the upper adjacent block, (2) the left adjacent block, and (3) which are adjacent subblocks adjacent to the current block. The order of the upper left neighboring blocks derives motion information from neighboring sub-blocks.

另外,当针对当前块内位于右上边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)上方邻近块、(2)左上方邻近块和(3)右上方邻近块的顺序从邻近子块推导运动信息。In addition, when the motion information is derived for the current subblock located at the upper right boundary within the current block, it may be in accordance with (1) the upper adjacent block, (2) the upper left adjacent block, and (3) which are adjacent subblocks adjacent to the current block. The order of the upper right neighboring blocks derives motion information from neighboring sub-blocks.

另外,当针对当前块的位于右下边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)左侧邻近块、(2)左上方邻近块和(3)左下方邻近块的顺序从邻近子块推导运动信息。In addition, when the motion information is derived for the current sub-block located at the lower right boundary of the current block, it may be performed according to (1) the left-side neighboring block, (2) the upper-left neighboring block and ( 3) The order of the lower left neighboring blocks derives motion information from neighboring sub-blocks.

如图19的示例中那样,可按照作为与当前子块相邻的邻近子块的(1)上方邻近块、(2)左侧邻近块、(3)下方邻近块、(4)右侧邻近块、(5)左上方邻近块、(6)左下方邻近块、(7)右下方邻近块和(8)右上方邻近块的顺序来推导当前块内的当前子块的运动信息。可选地,可按照与图19中所示出的顺序不同的顺序来推导运动信息。As in the example of FIG. 19 , as adjacent sub-blocks adjacent to the current sub-block, (1) upper adjacent block, (2) left adjacent block, (3) lower adjacent block, (4) right adjacent block The motion information of the current sub-block within the current block is derived from the sequence of block, (5) upper left neighbor block, (6) lower left neighbor block, (7) lower right neighbor block, and (8) upper right neighbor block. Alternatively, the motion information may be derived in a different order than that shown in FIG. 19 .

另一方面,可在与当前子块在空间上相邻的邻近子块的运动信息被推导之后随后推导同位画面内的同位子块的运动信息。可选地,可在推导与当前子块在空间上相邻的邻近子块的运动信息之前推导同位画面内的同位子块的运动信息。On the other hand, motion information for co-located sub-blocks within a co-located picture may be subsequently derived after motion information for neighboring sub-blocks that are spatially adjacent to the current sub-block is derived. Alternatively, motion information for co-located sub-blocks within a co-located picture may be derived prior to deriving motion information for neighboring sub-blocks that are spatially adjacent to the current sub-block.

另外,可在与当前子块在空间上相邻的邻近子块的运动信息被推导之后随后推导参考画面内位于参考块的下边界和右边界的已编码/解码块的运动信息。可选地,可在推导与当前子块在空间上相邻的邻近子块的运动信息之前推导参考画面内位于参考块的下边界和右边界的已编码/解码块的运动信息。In addition, motion information for coded/decoded blocks located at the lower and right boundaries of the reference block within the reference picture may be subsequently derived after motion information for neighboring sub-blocks that are spatially adjacent to the current sub-block is derived. Alternatively, motion information for coded/decoded blocks located at the lower and right boundaries of the reference block within the reference picture may be derived before motion information for neighboring sub-blocks that are spatially adjacent to the current sub-block may be derived.

仅在预定条件被满足时,与当前块相邻的邻近子块的运动信息或者与当前子块相邻的邻近子块的运动信息可被推导作为用于产生第二预测块的运动信息。Only when a predetermined condition is satisfied, motion information of adjacent subblocks adjacent to the current block or motion information of adjacent subblocks adjacent to the current subblock may be derived as motion information for generating the second prediction block.

例如,当与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块中的至少一个存在时,存在的邻近子块的运动信息可被推导作为用于产生第二预测块的运动信息。For example, when at least one of adjacent sub-blocks adjacent to the current block or adjacent sub-blocks within the current block adjacent to the current sub-block exists, the motion information of the existing adjacent sub-blocks may be derived as used for generating the first sub-block. 2. The motion information of the prediction block.

进一步可选地,例如,当与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块中的至少一个以帧间预测模式被预测时,以帧间预测被预测的邻近子块的运动信息可被推导作为用于产生第二预测块的运动信息。同时,当与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块中的至少一个以帧内预测模式被预测时,以帧内预测模式被预测的邻近子块的运动信息可不被推导作为用于产生第二预测块的运动信息,这是因为该邻近子块不具有运动信息。Further optionally, for example, when at least one of the adjacent subblocks adjacent to the current block or the adjacent subblocks within the current block adjacent to the current subblock is predicted in the inter prediction mode, it is predicted in the inter prediction mode. The motion information of the predicted neighboring sub-blocks may be derived as motion information for generating the second prediction block. Meanwhile, when at least one of the adjacent subblocks adjacent to the current block or adjacent subblocks within the current block adjacent to the current subblock is predicted in the intra prediction mode, the adjacent subblocks predicted in the intra prediction mode The motion information of the block may not be derived as motion information for generating the second prediction block, since the neighboring sub-blocks do not have motion information.

另外,当与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块中的至少一个的帧间预测指示符不指示L0预测、L1预测、L2预测、L3预测、单向预测、双向预测、三向预测和四向预测中的至少一个时,可不推导用于产生第二预测块的运动信息。In addition, when the inter prediction indicator of at least one of the adjacent subblock adjacent to the current block or the adjacent subblock adjacent to the current subblock within the current block does not indicate L0 prediction, L1 prediction, L2 prediction, L3 prediction , unidirectional prediction, bidirectional prediction, three-way prediction, and four-way prediction, the motion information for generating the second prediction block may not be derived.

另外,当用于产生第二预测块的帧间预测指示符不同于用于产生第一预测块的帧间预测指示符时,可推导用于产生第二预测块的运动信息。In addition, when the inter prediction indicator used to generate the second prediction block is different from the inter prediction indicator used to generate the first prediction block, motion information used to generate the second prediction block may be derived.

另外,当用于产生第二预测块的运动矢量不同于用于产生第一预测块的运动矢量时,可推导产生第二预测块所需的运动信息。In addition, when the motion vector used for generating the second prediction block is different from the motion vector used for generating the first prediction block, motion information required for generating the second prediction block may be derived.

另外,当用于产生第二预测块的参考画面索引不同于用于产生第一预测块的参考画面索引时,可推导产生第二预测块所需的运动信息。In addition, when the reference picture index used for generating the second prediction block is different from the reference picture index used for generating the first prediction block, motion information required for generating the second prediction block may be derived.

另外,当用于产生第二预测块的运动矢量和参考画面索引中的至少一个不同于用于产生第一预测块的运动矢量和参考画面索引中的至少一个时,可推导产生第二预测块所需的运动信息。In addition, when at least one of the motion vector and the reference picture index used to generate the second prediction block is different from at least one of the motion vector and the reference picture index used to generate the first prediction block, it may be deduced to generate the second prediction block required sports information.

另外,为了降低计算复杂度,在用于产生第一预测块的帧间预测指示符指示单向预测的情况下,当用于产生第二预测块的L0预测方向和L1预测方向的运动矢量和参考画面索引中的至少一个不同于用于产生第一预测块的运动矢量和参考画面索引中的至少一个时,可推导产生第二预测块所需的运动信息。In addition, in order to reduce computational complexity, in the case where the inter prediction indicator used to generate the first prediction block indicates unidirectional prediction, when the motion vector sum of the L0 prediction direction and the L1 prediction direction used to generate the second prediction block When at least one of the reference picture indices is different from at least one of the motion vector and the reference picture index used to generate the first prediction block, motion information required for generating the second prediction block may be derived.

另外,为了降低计算复杂度,基于用于产生第一预测块的帧间预测指示符,在帧间预测指示符指示双向预测的情况下,当用于产生第二预测块的L0预测方向和L1预测方向的运动矢量和参考画面索引的至少一个集合不同于用于产生第一预测块的L0预测方向和L1预测方向的运动矢量和参考画面索引的至少一个集合时,可推导产生第二预测块所需的运动信息。In addition, in order to reduce computational complexity, based on the inter prediction indicator used to generate the first prediction block, in the case where the inter prediction indicator indicates bidirectional prediction, when the L0 prediction direction and L1 used to generate the second prediction block When the at least one set of the motion vector of the prediction direction and the reference picture index is different from the at least one set of the motion vector and the reference picture index of the L0 prediction direction and the L1 prediction direction used to generate the first prediction block, the generation of the second prediction block may be derived required sports information.

另外,为了降低计算复杂度,当用于产生第二预测块的至少一条运动信息不同于用于产生第一预测块的至少一条运动信息时,可推导产生第二预测块所需的运动信息。In addition, in order to reduce computational complexity, when at least one piece of motion information used to generate the second prediction block is different from at least one piece of motion information used to generate the first prediction block, motion information required to generate the second prediction block may be derived.

图20是示出通过将当前子块的参考画面的POC与特定邻近子块的参考画面的POC进行比较来确定所述特定邻近子块的运动信息是否能够被用作用于产生第二预测块的运动信息的示例的示图。20 is a diagram illustrating determining whether motion information of a specific neighboring subblock can be used for generating a second prediction block by comparing the POC of the reference picture of the current subblock with the POC of the reference picture of the specific neighboring subblock Illustration of an example of motion information.

参照图20,为了降低计算复杂度,当当前子块的参考画面的POC等于邻近子块的参考画面的POC时,当前子块的运动信息可被用于产生当前子块的第二预测块。20 , in order to reduce computational complexity, when the POC of the reference picture of the current subblock is equal to the POC of the reference picture of the adjacent subblock, the motion information of the current subblock may be used to generate the second prediction block of the current subblock.

另外,为了降低计算复杂度,如图20的示例中那样,当用于产生第二预测块的参考画面的POC不同于用于产生第一预测块的参考画面的POC时,可推导产生第二预测块所需的运动信息。In addition, in order to reduce the computational complexity, as in the example of FIG. 20 , when the POC of the reference picture used to generate the second prediction block is different from the POC of the reference picture used to generate the first prediction block, it can be deduced to generate the second prediction block. Motion information needed to predict the block.

具体地,当用于产生第二预测块的参考画面的POC不同于用于产生第一预测块的参考画面的POC时,可通过基于参考画面或参考画面的POC对用于产生第一预测块的运动矢量进行缩放来推导用于产生第二预测块的运动矢量。Specifically, when the POC of the reference picture used to generate the second prediction block is different from the POC of the reference picture used to generate the first prediction block, the POC pair based on the reference picture or the reference picture may be used to generate the first prediction block is scaled to derive the motion vector used to generate the second prediction block.

图21是示出当计算第一预测块和第二预测块的加权和时使用权重因子的示例的示图。FIG. 21 is a diagram illustrating an example of using a weighting factor when calculating a weighted sum of the first prediction block and the second prediction block.

当计算第一预测块和第二预测块的加权和时,可将不同的权重因子应用于根据样点在块中的位置而使用的块中的样点。另外,可计算在第一预测块和第二预测块中位于相同位置的样点的加权和。在这种情况下,当加权和被计算以产生最终预测块时,权重因子和偏移中的至少一个可用于该计算。When calculating the weighted sum of the first prediction block and the second prediction block, different weighting factors may be applied to the samples in the block which are used according to their position in the block. In addition, a weighted sum of samples co-located in the first prediction block and the second prediction block may be calculated. In this case, when the weighted sum is calculated to produce the final prediction block, at least one of the weighting factor and the offset may be used for the calculation.

这里,权重因子可以是小于零的负数值或者大于零的正数值。偏移可以是零、小于零的负数值、或大于零的正数值。Here, the weight factor may be a negative value less than zero or a positive value greater than zero. The offset can be zero, a negative value less than zero, or a positive value greater than zero.

当第一预测块和第二预测块的加权和被计算时,可将相同的权重因子应用于每个预测块中的所有样点。When the weighted sum of the first prediction block and the second prediction block is calculated, the same weighting factor may be applied to all samples in each prediction block.

参照图21,例如,可将权重因子{3/4,7/8,15/16和31/32}应用于第一预测块的各个行或列,并且可将权重因子{1/4,1/8,1/16和1/32}应用于第二预测块的各个行或列。在这种情况下,相同行或相同列中的样点可被应用有相同的权重因子。21 , for example, weighting factors {3/4, 7/8, 15/16 and 31/32} may be applied to respective rows or columns of the first prediction block, and weighting factors {1/4, 1 may be applied /8, 1/16 and 1/32} are applied to each row or column of the second prediction block. In this case, the samples in the same row or the same column may be applied with the same weighting factor.

权重因子的值随着距当前子块的边界的距离减小而增大。另外,权重因子可被应用于子块内的所有样点。The value of the weighting factor increases as the distance from the boundary of the current subblock decreases. Additionally, weighting factors can be applied to all samples within a sub-block.

在图21中,(a)、(b)、(c)和(d)示出了通过分别使用上方邻近块的运动信息、下方邻近块的运动信息、左侧邻近块的运动信息和右侧邻近块的运动信息来产生第二预测块的情况。这里,上方第二预测块、下方第二预测块、左侧第二预测块和右侧第二预测块可意为分别基于上方邻近块的运动信息、下方邻近块的运动信息、左侧邻近块的运动信息和右侧邻近块的运动信息而产生的第二预测块。In FIG. 21, (a), (b), (c), and (d) show the motion information of the upper adjacent block, the motion information of the lower adjacent block, the motion information of the left adjacent block, and the right adjacent block by using the motion information of the upper adjacent block, respectively. Motion information of neighboring blocks to generate the second prediction block. Here, the upper second prediction block, the lower second prediction block, the left second prediction block and the right second prediction block may be based on the motion information of the upper adjacent block, the motion information of the lower adjacent block, the left adjacent block, respectively. The second prediction block is generated from the motion information of the right adjacent block and the motion information of the adjacent block to the right.

图22是示出当计算第一预测块和第二预测块的加权和时根据块中的位置将不同权重因子应用于样点的实施例的示图。为了提高编码效率,当第一预测块和第二预测块的加权和被计算时,权重因子可根据样点在块中的位置而变化。也就是说,可利用根据与当前子块在空间上相邻的样点的位置而不同的权重因子来计算加权和。另外,可针对在第一预测块和第二预测块中位于相同位置的样点计算加权和。FIG. 22 is a diagram illustrating an embodiment of applying different weighting factors to samples according to positions in the block when calculating the weighted sum of the first prediction block and the second prediction block. In order to improve coding efficiency, when the weighted sum of the first prediction block and the second prediction block is calculated, the weighting factor may vary according to the position of the sample in the block. That is, the weighted sum may be calculated using different weighting factors according to the positions of the samples that are spatially adjacent to the current sub-block. Additionally, a weighted sum may be calculated for samples co-located in the first prediction block and the second prediction block.

参照图22,在第一预测块中,可根据位置将权重因子{1/2,3/4,7/8,15/16,31/32,63/64,127/128,255/256,511/512和1023/1024}应用于各个样点,并且在第二预测块中,可根据位置将权重因子{1/2,1/4,1/16,1/32,1/64,1/128,1/256,1/512和1/1024}应用于各个样点。这里,在上方第二预测块、左侧第二预测块、下方第二预测块和右侧第二预测块中的至少一个中使用的权重因子可大于在左上方第二预测块、左下方第二预测块、右下方第二预测块和右上方第二预测块中的至少一个中使用的权重因子。22 , in the first prediction block, weight factors {1/2, 3/4, 7/8, 15/16, 31/32, 63/64, 127/128, 255/256, 511/512 and 1023/ 1024} is applied to each sample, and in the second prediction block, weighting factors {1/2, 1/4, 1/16, 1/32, 1/64, 1/128, 1/256 may be applied according to position , 1/512 and 1/1024} are applied to each sample. Here, the weighting factor used in at least one of the upper second prediction block, the left second prediction block, the lower second prediction block, and the right second prediction block may be larger than that used in the upper left second prediction block, the lower left second prediction block A weighting factor used in at least one of the second prediction block, the lower right second prediction block, and the upper right second prediction block.

另外,在上方第二预测块、左侧第二预测块、下方第二预测块和右侧第二预测块中的至少一个中使用的权重因子可等于在左上方第二预测块、左下方第二预测块、右下方第二预测块和右上方第二预测块中的至少一个中使用的权重因子。In addition, the weighting factor used in at least one of the upper second prediction block, the left second prediction block, the lower second prediction block, and the right second prediction block may be equal to that in the upper left second prediction block, the lower left prediction block A weighting factor used in at least one of the second prediction block, the lower right second prediction block, and the upper right second prediction block.

另外,使用同位画面内的同位子块的运动信息而产生的第二预测块内的所有样点的权重因子可相等。In addition, the weighting factors of all samples in the second prediction block generated using the motion information of the co-located sub-blocks in the co-located picture may be equal.

另外,使用同位画面内的同位子块的运动信息而产生的第二预测块内的样点的权重因子可等于第一预测块内的样点的权重因子。In addition, the weighting factor of the samples in the second prediction block generated using the motion information of the co-located sub-blocks in the co-located picture may be equal to the weighting factor of the samples in the first prediction block.

另外,使用参考画面内的与参考块的下边界和右边界相邻的已编码/解码块的运动信息而产生的第二预测块内的所有样点的权重因子可相等。In addition, the weighting factors of all samples in the second prediction block generated using the motion information of the coded/decoded blocks adjacent to the lower and right boundaries of the reference block within the reference picture may be equal.

另外,使用参考画面内的与参考块的下边界和右边界相邻的已编码/解码块的运动信息而产生的第二预测块内的样点的权重因子可等于第一预测块内的样点的权重因子。In addition, the weighting factor of the samples in the second prediction block generated using the motion information of the coded/decoded blocks adjacent to the lower and right boundaries of the reference block within the reference picture may be equal to the samples in the first prediction block Point weighting factor.

为了降低计算复杂度,权重因子可根据与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块的运动矢量的大小而变化。In order to reduce computational complexity, the weighting factor may vary according to the size of the motion vectors of neighboring sub-blocks adjacent to the current block or adjacent sub-blocks within the current block and adjacent to the current sub-block.

例如,当邻近子块的运动矢量的x分量和y分量的绝对值之和等于或大于预定值时,{1/2,3/4,7/8,15/16}可被用作当前子块的权重因子。相反,当邻近子块的运动矢量的x分量和y分量的绝对值之和小于该预定值时,{7/8,15/16,31/32,63/64}可被用作当前子块的权重因子。在这种情况下,该预定值可以是零或正整数。For example, {1/2, 3/4, 7/8, 15/16} may be used as the current sub-block when the sum of the absolute values of the x-component and the y-component of the motion vector of the adjacent sub-block is equal to or greater than a predetermined value Weight factor for the block. Conversely, when the sum of the absolute values of the x-component and the y-component of the motion vector of the adjacent subblock is smaller than the predetermined value, {7/8, 15/16, 31/32, 63/64} may be used as the current subblock weight factor. In this case, the predetermined value may be zero or a positive integer.

另外,为了降低计算复杂度,权重因子可根据当前子块的运动矢量的大小或方向而变化。In addition, in order to reduce computational complexity, the weighting factor may be changed according to the magnitude or direction of the motion vector of the current sub-block.

例如,当当前子块的运动矢量的x分量的绝对值等于或大于预定值时,{1/2,3/4,7/8,15/16}可被用作左侧邻近子块和右侧邻近子块的权重因子。相反,当当前子块的运动矢量的x分量的绝对值小于该预定值时,{7/8,15/16,31/32,63/64}可被用作左侧邻近子块和右侧邻近子块的权重因子。在这种情况下,该预定值可以是零或正整数。For example, when the absolute value of the x-component of the motion vector of the current subblock is equal to or greater than a predetermined value, {1/2, 3/4, 7/8, 15/16} may be used as the left adjacent subblock and the right Weighting factor for side adjacent subblocks. Conversely, when the absolute value of the x-component of the motion vector of the current subblock is smaller than the predetermined value, {7/8, 15/16, 31/32, 63/64} may be used as the left adjacent subblock and the right Weighting factor for adjacent subblocks. In this case, the predetermined value may be zero or a positive integer.

例如,当当前子块的运动矢量的y分量的绝对值等于或大于预定值时,{1/2,3/4,7/8,15/16}可被用作上方邻近子块和下方邻近子块的权重因子。相反,当当前子块的运动矢量的y分量的绝对值小于该预定值时,{7/8,15/16,31/32,63/64}可被用作上方邻近子块和下方邻近子块的权重因子。在这种情况下,该预定值可以是零或正整数。For example, when the absolute value of the y component of the motion vector of the current subblock is equal to or greater than a predetermined value, {1/2, 3/4, 7/8, 15/16} may be used as the upper adjacent subblock and the lower adjacent subblock Weighting factor for subblocks. Conversely, when the absolute value of the y-component of the motion vector of the current sub-block is smaller than the predetermined value, {7/8, 15/16, 31/32, 63/64} may be used as the upper adjacent sub-block and the lower adjacent sub-block Weight factor for the block. In this case, the predetermined value may be zero or a positive integer.

例如,当当前子块的运动矢量的x分量和y分量的绝对值之和等于或大于预定值时,{1/2,3/4,7/8,15/16}可被用作当前子块的权重因子。相反,当当前子块的运动矢量的x分量和y分量的绝对值之和小于该预定值时,{7/8,15/16,31/32,63/64}可被用作当前子块的权重因子。在这种情况下,该预定值可以是零或正整数。For example, when the sum of absolute values of the x component and the y component of the motion vector of the current subblock is equal to or greater than a predetermined value, {1/2, 3/4, 7/8, 15/16} may be used as the current subblock Weight factor for the block. Conversely, when the sum of the absolute values of the x component and the y component of the motion vector of the current subblock is less than the predetermined value, {7/8, 15/16, 31/32, 63/64} may be used as the current subblock weight factor. In this case, the predetermined value may be zero or a positive integer.

可不针对子块内的所有样点计算加权和,而仅针对与每个块边界相邻的K个行/列中的一些样点计算加权和。在这种情况下,K可以是零或正整数,例如1或2。The weighted sum may not be calculated for all samples within a sub-block, but only for some samples in the K rows/columns adjacent to each block boundary. In this case, K can be zero or a positive integer, such as 1 or 2.

另外,当当前块的尺寸小于N×M时,可针对与每个块边界相邻的K个行/列中的样点计算加权和。另外,当当前块被划分为子块并且运动补偿基于子块被执行时,可针对与每个块边界相邻的K个行/列中的样点计算加权和。这里,K可以是零或正整数,例如1或2。另外,N和M可以是正整数。例如,N和M可以是4或大于4以及8或大于8。N和M可以相等或者可以不相等。Additionally, when the size of the current block is smaller than NxM, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary. In addition, when the current block is divided into sub-blocks and motion compensation is performed based on the sub-blocks, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary. Here, K can be zero or a positive integer, such as 1 or 2. In addition, N and M may be positive integers. For example, N and M can be 4 or greater and 8 or greater. N and M may or may not be equal.

可选地,可根据当前块的颜色分量的类型针对与每个块边界相邻的K个行/列中的样点计算加权和。在这种情况下,K可以是零或正整数,例如1或2。当当前块是亮度分量块时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。另一方面,当当前块是色度分量块时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。Optionally, a weighted sum may be calculated for samples in the K rows/columns adjacent to each block boundary according to the type of color components of the current block. In this case, K can be zero or a positive integer, such as 1 or 2. When the current block is a luma component block, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary. On the other hand, when the current block is a chroma component block, a weighted sum may be calculated for samples in a row/column adjacent to each block boundary.

另外,当当前块将以合并模式被预测并且具有改进的时间运动矢量预测候选和空间-时间运动矢量预测候选中的至少一个时,可仅针对与每个块边界相邻的K个行/列中的样点计算加权和。In addition, when the current block is to be predicted in merge mode and has at least one of improved temporal motion vector prediction candidates and spatio-temporal motion vector prediction candidates, only K rows/columns adjacent to each block boundary may be used A weighted sum is calculated for the samples in .

另外,当当前块将以解码器侧运动矢量推导模式被预测时,可针对与每个块边界相邻的K个行/列中的样点计算加权和。另外,当当前块将以仿射运动补偿模式被预测时,可针对与每个块边界相邻的K个行/列中的样点计算加权和。在这些情况下,K可以是零或正整数,例如1或2。Additionally, when the current block is to be predicted in the decoder-side motion vector derivation mode, a weighted sum may be calculated for the samples in the K rows/columns adjacent to each block boundary. Additionally, when the current block is to be predicted in affine motion compensation mode, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary. In these cases, K can be zero or a positive integer, such as 1 or 2.

同时,为了降低计算复杂度,可根据当前块的子块的尺寸,针对与每个块边界相邻的K个行/列中的样点计算加权和。Meanwhile, in order to reduce computational complexity, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary according to the size of sub-blocks of the current block.

例如,当当前块的子块具有4×4的尺寸时,可针对与每个块边界相邻的一个、两个、三个或四个行/列中的样点计算加权和。可选地,当当前块的子块具有8×8的尺寸时,可针对与每个块边界相邻的一个、两个、三个、四个、五个、六个、七个或八个行/列中的样点计算加权和。在这种情况下,K可以是零或正整数。K的最大值可对应于子块中包括的行或列的数量。For example, when the sub-blocks of the current block have a size of 4x4, the weighted sum may be calculated for the samples in one, two, three or four rows/columns adjacent to each block boundary. Optionally, when the sub-blocks of the current block have a size of 8×8, one, two, three, four, five, six, seven or eight adjacent to each block boundary may be A weighted sum is calculated for the samples in the row/column. In this case, K can be zero or a positive integer. The maximum value of K may correspond to the number of rows or columns included in the sub-block.

另外,为了降低计算复杂度,可针对子块内的与每个块边界相邻的一个或两个行/列中的样点计算加权和。Additionally, to reduce computational complexity, a weighted sum may be computed for samples within a sub-block in one or two rows/columns adjacent to each block boundary.

另外,为了降低计算复杂度,可根据用于产生第二预测块的运动信息的条数,针对与每个块边界相邻的K个行/列中的样点计算加权和。这里,K可以是零或正整数。In addition, in order to reduce computational complexity, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary according to the number of pieces of motion information used to generate the second prediction block. Here, K can be zero or a positive integer.

例如,当运动信息的条数小于预定值时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。For example, when the number of pieces of motion information is less than a predetermined value, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary.

另外,当运动信息的条数等于或大于该预定值时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。In addition, when the number of pieces of motion information is equal to or greater than the predetermined value, a weighted sum may be calculated for samples in one row/column adjacent to each block boundary.

另外,为了降低计算复杂度,可根据当前块的帧间预测指示符,针对与每个块边界相邻的K个行/列中的样点计算加权和。K可以是零或正整数。Additionally, to reduce computational complexity, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary according to the current block's inter prediction indicator. K can be zero or a positive integer.

例如,当帧间预测指示符指示单向预测时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。同时,当帧间预测指示符指示双向预测时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。For example, when the inter prediction indicator indicates uni-directional prediction, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary. Meanwhile, when the inter prediction indicator indicates bidirectional prediction, a weighted sum may be calculated for samples in one row/column adjacent to each block boundary.

另外,为了降低计算复杂度,可根据当前块的参考画面的POC,针对与每个块边界相邻的K个行/列中的样点计算加权和。这里,K可以是零或正整数。In addition, in order to reduce computational complexity, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary according to the POC of the reference picture of the current block. Here, K can be zero or a positive integer.

例如,当当前画面的POC与参考画面的POC之间的差小于预定值时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。相反,当当前画面的POC与参考画面的POC之间的差等于或大于该预定值时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。For example, when the difference between the POC of the current picture and the POC of the reference picture is less than a predetermined value, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary. Conversely, when the difference between the POC of the current picture and the POC of the reference picture is equal to or greater than the predetermined value, a weighted sum may be calculated for samples in one row/column adjacent to each block boundary.

另外,为了降低计算复杂度,可根据与当前块相邻的邻近子块的运动矢量或当前块内的与当前子块相邻的邻近子块的运动矢量的大小,针对与每个块边界相邻的K个行/列中的样点计算加权和。这里,K可以是零或正整数。In addition, in order to reduce the computational complexity, according to the size of the motion vector of the adjacent sub-block adjacent to the current block or the motion vector of the adjacent sub-block adjacent to the current sub-block within the current block, for each block boundary A weighted sum is calculated for the samples in the neighboring K rows/columns. Here, K can be zero or a positive integer.

例如,当邻近子块的运动矢量的x分量和y分量的绝对值之和等于或大于预定值时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。相反,当邻近子块的运动矢量的x分量和y分量的绝对值之和小于该预定值时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。在这种情况下,该预定值可以是零或正整数。For example, when the sum of absolute values of the x and y components of the motion vectors of adjacent subblocks is equal to or greater than a predetermined value, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary. Conversely, when the sum of absolute values of the x and y components of the motion vectors of adjacent subblocks is less than the predetermined value, a weighted sum may be calculated for samples in a row/column adjacent to each block boundary. In this case, the predetermined value may be zero or a positive integer.

另外,为了降低计算复杂度,可根据当前子块的运动矢量的大小或方向,针对与每个块边界相邻的K个行/列中的样点计算加权和。这里,K可以是零或正整数。In addition, in order to reduce computational complexity, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary according to the magnitude or direction of the motion vector of the current sub-block. Here, K can be zero or a positive integer.

例如,当当前子块的运动矢量的x分量的绝对值等于或大于预定值时,可针对与左边界和右边界中的每一个相邻的两个行/列中的样点计算加权和。相反,当当前子块的运动矢量的x分量的绝对值小于该预定值时,可针对与左边界和右边界中的每一个相邻的一个行/列中的样点计算加权和。在这种情况下,该预定值可以是零或正整数。For example, when the absolute value of the x-component of the motion vector of the current subblock is equal to or greater than a predetermined value, a weighted sum may be calculated for samples in two rows/columns adjacent to each of the left and right boundaries. Conversely, when the absolute value of the x-component of the motion vector of the current subblock is smaller than the predetermined value, a weighted sum may be calculated for samples in a row/column adjacent to each of the left and right boundaries. In this case, the predetermined value may be zero or a positive integer.

例如,当当前子块的运动矢量的y分量的绝对值等于或大于预定值时,可针对与上边界和下边界中的每一个相邻的两个行/列中的样点计算加权和。相反,当当前子块的运动矢量的y分量的绝对值小于该预定值时,可针对与上边界和下边界相邻的一个行/列中的样点计算加权和。在这种情况下,该预定值可以是零或正整数。For example, when the absolute value of the y component of the motion vector of the current subblock is equal to or greater than a predetermined value, a weighted sum may be calculated for samples in two rows/columns adjacent to each of the upper and lower boundaries. Conversely, when the absolute value of the y component of the motion vector of the current subblock is smaller than the predetermined value, a weighted sum may be calculated for samples in one row/column adjacent to the upper and lower boundaries. In this case, the predetermined value may be zero or a positive integer.

例如,当运动矢量的x分量和y分量的绝对值之和等于或大于预定值时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。相反,当运动矢量的x分量和y分量的绝对值之和小于该预定值时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。在这种情况下,该预定值可以是零或正整数。For example, when the sum of absolute values of the x and y components of the motion vector is equal to or greater than a predetermined value, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary. Conversely, when the sum of the absolute values of the x-component and the y-component of the motion vector is smaller than the predetermined value, a weighted sum may be calculated for the samples in one row/column adjacent to each block boundary. In this case, the predetermined value may be zero or a positive integer.

图23是示出在重叠块运动补偿期间按照预定顺序依次累积地计算第一预测块和第二预测块的加权和的实施例的示图。第一预测块和第二预测块的加权和可按照在编码器和解码器中预设的预定顺序被相加。FIG. 23 is a diagram illustrating an embodiment in which a weighted sum of a first prediction block and a second prediction block is sequentially and cumulatively calculated in a predetermined order during overlapping block motion compensation. The weighted sums of the first prediction block and the second prediction block may be added in a predetermined order preset in the encoder and the decoder.

参照图23,可按照与当前子块相邻的上方块、左侧块和右侧块的顺序从邻近子块推导运动信息;可按照该顺序使用推导出的运动信息来产生第二预测块;可计算第一预测块和第二预测块的加权和。当加权和按照预定顺序被计算时,可按照上述顺序累计加权和,并因此可推导当前块的最终预测块。23, motion information may be derived from adjacent subblocks in the order of an upper block, a left block, and a right block adjacent to the current subblock; the derived motion information may be used in this order to generate a second prediction block; A weighted sum of the first prediction block and the second prediction block may be calculated. When the weighted sums are calculated in a predetermined order, the weighted sums may be accumulated in the above-mentioned order, and thus the final prediction block of the current block may be derived.

如图23的示例中那样,计算第一预测块与使用上方块的运动信息所产生的第二预测块的加权和,使得可产生第一加权和结果块。然后,可计算第一加权和结果块与使用左侧块的运动信息所产生的第二预测块的加权和,使得可产生第二加权和结果块。然后,可计算第二加权和结果块与使用下方块的运动信息所产生的第二预测块的加权和,使得可产生第三加权和结果块。最后,可计算第三加权和结果块与使用右侧块的运动信息所产生的第二预测块的加权和,使得可产生最终预测块。As in the example of FIG. 23 , the weighted sum of the first prediction block and the second prediction block generated using the motion information of the upper block is calculated, so that the first weighted sum result block can be generated. Then, a weighted sum of the first weighted sum result block and the second prediction block generated using the motion information of the left block may be calculated, so that a second weighted sum result block may be generated. Then, a weighted sum of the second weighted sum result block and the second prediction block generated using the motion information of the lower block may be calculated, so that a third weighted sum result block may be generated. Finally, a weighted sum of the third weighted sum result block and the second prediction block generated using the motion information of the right block may be calculated, so that the final prediction block may be generated.

另一方面,推导用于产生第二预测块的运动信息的顺序、以及用于计算第一预测块和第二预测块的加权和的第二预测块的顺序可不同。On the other hand, the order of deriving the motion information for generating the second prediction block and the order of calculating the weighted sum of the first prediction block and the second prediction block may be different.

图24是示出在重叠块运动补偿期间计算第一预测块和第二预测块的加权和的实施例的示图。为了提高编码效率,当加权和被计算时,不依次累积地计算加权和,而是可在不考虑第二预测块被产生的顺序的情况下计算第一预测块与使用上方块、左侧块、下方块和右侧块中的至少一个的运动信息所产生的第二预测块的加权和。FIG. 24 is a diagram illustrating an embodiment of calculating a weighted sum of a first prediction block and a second prediction block during overlapping block motion compensation. In order to improve coding efficiency, when the weighted sum is calculated, the weighted sum is not calculated cumulatively in sequence, but the first prediction block can be calculated without considering the order in which the second prediction block is generated and the use of the upper block and the left block , a weighted sum of the second prediction block generated by the motion information of at least one of the lower block and the right block.

在这种情况下,用于使用上方块、左侧块、下方块和右侧块中的至少一个的运动信息所产生的第二预测块的权重因子可彼此相等。可选地,用于第二预测块的权重因子和用于第一预测块的权重因子可相等。In this case, weighting factors for the second prediction block generated using motion information of at least one of the upper, left, lower, and right blocks may be equal to each other. Alternatively, the weighting factor for the second prediction block and the weighting factor for the first prediction block may be equal.

参照图24,准备与第一预测块和第二预测块的总数相应的多个记录空间,并且在产生最终预测块时,可在针对所有第二预测块使用相等的权重因子的同时计算第一预测块和每个第二预测块的加权和。Referring to FIG. 24 , a plurality of recording spaces corresponding to the total number of the first prediction block and the second prediction block are prepared, and when the final prediction block is generated, the first prediction block may be calculated while using equal weighting factors for all the second prediction blocks. A weighted sum of the predicted block and each second predicted block.

另外,即使对于使用同位画面内的同位子块的运动信息所产生的第二预测块,也可计算第一预测块和第二预测块的加权和。In addition, even for a second prediction block generated using motion information of a co-located subblock within a co-located picture, a weighted sum of the first prediction block and the second prediction block may be calculated.

当当前块的尺寸为K个样点或少于K个样点时,可对确定是否对当前块执行重叠块运动补偿的信息进行熵编码/熵解码。这里,K可以是正整数,例如256。When the size of the current block is K samples or less, entropy encoding/entropy decoding may be performed on information determining whether to perform overlapping block motion compensation on the current block. Here, K can be a positive integer, such as 256.

当当前块的尺寸大于K个样点时或者当当前块将以特定帧间预测模式(例如,合并模式或高级运动矢量预测模式)被预测时,可不对确定是否对当前块执行重叠块运动补偿的信息进行熵编码/熵解码,但是重叠块运动补偿可被实质执行。Whether or not to perform overlapping block motion compensation on the current block may not be determined when the size of the current block is larger than K samples or when the current block is to be predicted in a specific inter prediction mode (eg, merge mode or advanced motion vector prediction mode) Entropy encoding/entropy decoding of the information, but overlapping block motion compensation can be substantially performed.

编码器可在执行运动预测时从当前块的边界区域的原始信号减去第二预测块之后执行预测。在这种情况下,当从原始信号减去第二预测块时,可计算第二预测块与原始信号的加权和。The encoder may perform prediction after subtracting the second prediction block from the original signal of the boundary area of the current block when performing motion prediction. In this case, when the second prediction block is subtracted from the original signal, a weighted sum of the second prediction block and the original signal may be calculated.

针对未被执行重叠块运动补偿的当前块,可不应用增强多重变换(EMT),其中,在增强多重变换(EMT)中,离散余弦变换(DCT)和离散正弦变换(DST)被应用于垂直/水平变换。也就是说,可仅对被执行了重叠块运动补偿的当前块应用增强多重变换。Enhanced Multiple Transform (EMT) may not be applied for the current block for which overlapping block motion compensation is not performed, in which Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST) are applied to vertical/ Horizontal transformation. That is, the enhanced multiple transform may be applied only to the current block on which the overlapping block motion compensation is performed.

图25是示出根据本发明的一个实施例的图像解码方法的流程图。FIG. 25 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

参照图25,可使用当前块的运动信息来产生当前块的第一预测块(步骤S2510)。Referring to FIG. 25, a first prediction block of the current block may be generated using motion information of the current block (step S2510).

接下来,可在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息(步骤S2520)。Next, motion information that can be used to generate the second prediction block may be determined among motion information of at least one neighboring sub-block of the current sub-block (step S2520).

在这种情况下,可基于邻近子块的运动矢量的大小和方向中的至少一个来确定能够用于产生第二预测块的运动信息。In this case, motion information that can be used to generate the second prediction block may be determined based on at least one of the magnitude and direction of motion vectors of adjacent sub-blocks.

在确定能够用于产生第二预测块的运动信息的步骤S2520,可基于邻近子块的参考画面的画面计数(POC)和当前块的参考画面的POC来确定能够用于产生第二预测块的运动信息。具体地,仅当邻近子块的参考画面的POC等于当前块的参考画面的POC时,可将邻近子块的运动信息确定为能够用于产生第二预测块的运动信息。In the step S2520 of determining motion information that can be used to generate the second prediction block, a picture count (POC) that can be used to generate the second prediction block may be determined based on the picture count (POC) of the reference picture of the adjacent sub-block and the POC of the reference picture of the current block. sports information. Specifically, only when the POC of the reference picture of the neighboring sub-block is equal to the POC of the reference picture of the current block, the motion information of the neighboring sub-block may be determined as motion information that can be used to generate the second prediction block.

当前子块具有正方形形状或非正方形形状。The current subblock has a square shape or a non-square shape.

可使用所确定的在步骤S2520确定的运动信息来产生至少一个第二预测块(步骤S2530)。At least one second prediction block may be generated using the determined motion information determined at step S2520 (step S2530).

仅当当前块既不具有运动矢量推导模式也不具有仿射运动补偿模式时,才可使用至少一个邻近子块的运动信息来产生至少一个第二预测块。The at least one second prediction block may be generated using the motion information of at least one neighboring sub-block only when the current block has neither the motion vector derivation mode nor the affine motion compensation mode.

接下来,可基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块(步骤S2540)。Next, a final prediction block may be generated based on the weighted sum of the first prediction block of the current block and the at least one second prediction block of the current sub-block (step S2540).

当当前子块被包括在当前块的边界区域中时,可通过获得第一预测块的与边界相邻的若干行或若干列中的样点以及第二预测块的与边界相邻的若干行或若干列中的样点的加权和来产生最终预测块。When the current sub-block is included in the boundary area of the current block, samples in several rows or columns of the first prediction block adjacent to the boundary and several rows adjacent to the boundary of the second prediction block may be obtained by obtaining or a weighted sum of samples in several columns to produce the final prediction block.

这里,可基于当前子块的块尺寸、当前子块的运动矢量的大小和方向、当前块的帧间预测指示符、以及当前块的参考画面的POC中的至少一个来确定第一预测块的与边界相邻的若干行或若干列中的样点以及第二预测块的与边界相邻的若干行或若干列中的样点。Here, the block size of the first prediction block may be determined based on at least one of a block size of the current subblock, a size and direction of a motion vector of the current subblock, an inter prediction indicator of the current block, and a POC of a reference picture of the current block. Samples in rows or columns adjacent to the boundary and samples in rows or columns adjacent to the boundary of the second prediction block.

在最终预测块产生步骤S2540,可在根据当前子块的运动矢量的大小和方向中的至少一个将不同的权重因子应用于第一预测块和第二预测块中的样点的同时计算加权和。In the final prediction block generation step S2540, the weighted sum may be calculated while applying different weighting factors to the samples in the first prediction block and the second prediction block according to at least one of the size and direction of the motion vector of the current subblock .

图25的图像解码方法的每个步骤可被类似地应用于本发明的图像编码方法的相应步骤。Each step of the image decoding method of FIG. 25 can be similarly applied to the corresponding step of the image encoding method of the present invention.

通过执行根据本发明的图像编码方法而产生的比特流可被记录在记录介质中。A bit stream generated by performing the image encoding method according to the present invention can be recorded in a recording medium.

可在编码器和解码器中按照相同的方法执行以上实施例。The above embodiments can be implemented in the same way in encoders and decoders.

应用于以上实施例的顺序可在编码器和解码器之间不同,或者应用于以上实施例的顺序可在编码器和解码器中相同。The order applied to the above embodiments may differ between the encoder and the decoder, or the order applied to the above embodiments may be the same in the encoder and the decoder.

可对每个亮度信号和色度信号执行以上实施例,或者可对亮度信号和色度信号相同地执行以上实施例。The above embodiments may be performed for each luminance signal and chrominance signal, or may be performed identically for luminance signals and chrominance signals.

本发明的以上实施例被应用到的块形状可具有正方形形状或非正方形形状。The block shape to which the above embodiments of the present invention are applied may have a square shape or a non-square shape.

可根据编码块、预测块、变换块、块、当前块、编码单元、预测单元、变换单元、单元和当前单元中的至少一个的尺寸来应用本发明的以上实施例。这里,所述尺寸可被定义为最小尺寸或最大尺寸或者最小尺寸和最大尺寸两者,使得以上实施例被应用,或者可被定义为以上实施例被应用到的固定尺寸。另外,在以上实施例中,第一实施例可被应用于第一尺寸,第二实施例可被应用于第二尺寸。换句话说,可根据尺寸组合地应用以上实施例。另外,当尺寸等于或大于最小尺寸并且等于或小于最大尺寸时,可应用以上实施例。换句话说,当块尺寸被包括在特定范围内时,可应用以上实施例。The above embodiments of the present invention may be applied according to the size of at least one of a coding block, a prediction block, a transform block, a block, a current block, a coding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size or a maximum size or both, such that the above embodiments are applied, or may be defined as a fixed size to which the above embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size. In other words, the above embodiments may be applied in combination according to the size. In addition, the above embodiments can be applied when the size is equal to or larger than the minimum size and equal to or smaller than the maximum size. In other words, when the block size is included in a specific range, the above embodiments can be applied.

例如,当当前块的尺寸是8×8或者更大时,可应用以上实施例。例如,当当前块的尺寸是4×4或更大时,可应用以上实施例。例如,当当前块的尺寸是16×16或更大时,可应用以上实施例。例如,当当前块的尺寸等于或大于16×16并且等于或小于64×64时,可应用以上实施例。For example, when the size of the current block is 8×8 or larger, the above embodiments may be applied. For example, when the size of the current block is 4×4 or larger, the above embodiments may be applied. For example, when the size of the current block is 16×16 or larger, the above embodiments may be applied. For example, when the size of the current block is equal to or larger than 16×16 and equal to or smaller than 64×64, the above embodiments may be applied.

可根据时间层应用本发明的以上实施例。为了识别以上实施例可被应用到时间层,可用信号传送相应标识符,并且可将以上实施例应用于由相应标识符识别的特定时间层。这里,标识符可被定义为可应用以上实施例的最低层或最高层或者最低层和最高层两者,或者可被定义为指示被应用实施例的特定层。另外,可定义被应用实施例的固定时间层。The above embodiments of the present invention may be applied according to time layers. In order to identify that the above embodiments may be applied to temporal layers, respective identifiers may be signaled, and the above embodiments may be applied to specific temporal layers identified by the respective identifiers. Here, the identifier may be defined as the lowest layer or the highest layer or both the lowest layer and the highest layer to which the above embodiments are applicable, or may be defined as indicating a specific layer to which the embodiment is applied. In addition, a fixed time horizon to which an embodiment is applied may be defined.

例如,当当前图像的时间层是最低层时,可应用以上实施例。例如,当当前图像的时间层标识符是1时,可应用以上实施例。例如,当当前图像的时间层是最高层时,可应用以上实施例。For example, the above embodiment can be applied when the temporal layer of the current image is the lowest layer. For example, when the temporal layer identifier of the current image is 1, the above embodiment can be applied. For example, the above embodiment can be applied when the temporal layer of the current image is the highest layer.

可定义被应用了本发明的以上实施例的条带类型,并且可根据相应条带类型应用以上实施例。The stripe types to which the above embodiments of the present invention are applied may be defined, and the above embodiments may be applied according to the corresponding stripe types.

在上述实施例中,基于具有一系列步骤或单元的流程图描述了所述方法,但本发明不限于所述步骤的顺序,而是,一些步骤可与其它步骤被同时执行,或者可与其它步骤按照不同顺序被执行。此外,本领域普通技术人员应该理解,流程图中的步骤不彼此相斥,并且在不影响本发明的范围的情况下,其它步骤可被添加到流程图中,或者一些步骤可从流程图被删除。In the above-described embodiments, the method is described based on a flowchart having a series of steps or units, but the present invention is not limited to the order of the steps, but rather, some steps may be performed concurrently with other steps, or may be performed with other steps The steps are performed in different orders. Furthermore, it should be understood by those of ordinary skill in the art that the steps in the flowcharts are not mutually exclusive and that other steps may be added to the flowcharts, or some steps may be extracted from the flowcharts, without affecting the scope of the present invention. delete.

实施例包括示例的各种方面。针对各个方面的所有可能组合可不被描述,但本领域技术人员将能够认识到不同组合。因此,本发明可包括权利要求范围内的所有替换形式、修改形式和改变。Embodiments include various aspects of examples. All possible combinations for the various aspects may not be described, but those skilled in the art will be able to recognize different combinations. Accordingly, the present invention may include all alternatives, modifications and changes within the scope of the claims.

本发明的实施例可按照程序指令的形式来实施,其中,所述程序指令可由各种计算机组件来执行,并被记录在计算机可读记录介质上。计算机可读记录介质可包括单独的程序指令、数据文件、数据结构等,或者是程序指令、数据文件、数据结构等的组合。记录在计算机可读记录介质中的程序指令可被特别设计和构造用于本发明,或者对于计算机软件技术领域的普通技术人员而言是已知的。计算机可读记录介质的示例包括:磁记录介质(诸如硬盘、软盘和磁带);光学数据存储介质(诸如CD-ROM或DVD-ROM);磁光介质(诸如软光盘);以及被特别构造用于存储和实施程序指令的硬件装置(诸如只读存储器(ROM)、随机存取存储器(RAM)、闪存存储器等)。程序指令的示例不仅包括由编译器形成的机器语言代码,还包括可由计算机使用解释器实施的高级语言代码。硬件装置可被配置为由一个或更多个软件模块操作以进行根据本发明的处理,反之亦可。Embodiments of the present invention may be implemented in the form of program instructions executable by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc., alone or in combinations of program instructions, data files, data structures, and the like. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention or known to those of ordinary skill in the field of computer software technology. Examples of computer-readable recording media include: magnetic recording media (such as hard disks, floppy disks, and magnetic tapes); optical data storage media (such as CD-ROM or DVD-ROM); magneto-optical media (such as floppy disks); A hardware device (such as read only memory (ROM), random access memory (RAM), flash memory, etc.) for storing and implementing program instructions. Examples of program instructions include not only machine language code formed by a compiler, but also high-level language code that can be implemented by a computer using an interpreter. A hardware device may be configured to be operated by one or more software modules to perform processing in accordance with the present invention, and vice versa.

虽然已根据特定术语(诸如详细元件)以及有限实施例和附图描述了本发明,但它们仅被提供用于帮助更通俗地理解本发明,本发明不限于上述实施例。本发明所属领域的技术人员将理解,可从以上描述做出各种修改和改变。Although the present invention has been described in terms of specific terms, such as detailed elements, and limited embodiments and drawings, they are provided only to assist in a more general understanding of the present invention, and the present invention is not limited to the above-described embodiments. Those skilled in the art to which this invention pertains will appreciate that various modifications and changes can be made from the above description.

因此,本发明的精神不应受限于上述实施例,所附权利要求及其等同物的全部范围将落入本发明的范围和精神之内。Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the full scope of the appended claims and their equivalents are intended to fall within the scope and spirit of the present invention.

工业可用性Industrial Availability

本发明可被应用于对图像进行编码/解码的设备。The present invention can be applied to an apparatus for encoding/decoding an image.

Claims (19)

1.一种用于对图像进行解码的方法,所述方法包括:1. A method for decoding an image, the method comprising: 使用当前块的运动信息产生当前块的第一预测块;generating a first prediction block of the current block using the motion information of the current block; 在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息;determining motion information that can be used to generate the second prediction block among motion information of at least one neighboring sub-block of the current sub-block; 使用确定的运动信息产生当前子块的至少一个第二预测块;以及generating at least one second prediction block of the current subblock using the determined motion information; and 基于当前块的第一预测块与当前子块的所述至少一个第二预测块的加权和来产生最终预测块。A final prediction block is generated based on a weighted sum of the first prediction block of the current block and the at least one second prediction block of the current sub-block. 2.根据权利要求1所述的方法,其中,确定能够用于产生第二预测块的运动信息的步骤包括:2. The method of claim 1, wherein the step of determining motion information that can be used to generate the second prediction block comprises: 基于当前子块的邻近子块的运动矢量的大小和方向中的至少一个来确定所述能够用于产生第二预测块的运动信息。The motion information that can be used to generate the second prediction block is determined based on at least one of magnitude and direction of motion vectors of neighboring subblocks of the current subblock. 3.根据权利要求1所述的方法,其中,确定能够用于产生第二预测块的运动信息的步骤包括:3. The method of claim 1, wherein the step of determining motion information that can be used to generate the second prediction block comprises: 基于所述邻近子块的参考画面的画面计数POC以及当前块的参考画面的POC来确定所述能够用于产生第二预测块的运动信息。The motion information that can be used to generate the second prediction block is determined based on the picture count POC of the reference picture of the neighboring sub-block and the POC of the reference picture of the current block. 4.根据权利要求3所述的方法,其中,在确定能够用于产生第二预测块的运动信息的步骤中,仅当所述邻近子块的参考画面的POC等于当前块的参考画面的POC时,所述邻近子块的运动信息被确定为所述能够用于产生第二预测块的运动信息。4. The method of claim 3, wherein, in the step of determining motion information that can be used to generate the second prediction block, only if the POC of the reference picture of the adjacent sub-block is equal to the POC of the reference picture of the current block , the motion information of the adjacent sub-block is determined as the motion information that can be used to generate the second prediction block. 5.根据权利要求1所述的方法,其中,当前子块具有正方形形状和矩形形状中的至少一种。5. The method of claim 1, wherein the current sub-block has at least one of a square shape and a rectangular shape. 6.根据权利要求1所述的方法,其中,产生至少一个第二预测块的步骤包括:6. The method of claim 1, wherein the step of generating at least one second prediction block comprises: 仅当当前块既不具有运动矢量推导模式也不具有仿射运动补偿模式时,使用当前子块的至少一个邻近子块的运动信息来产生所述至少一个第二预测块。The at least one second prediction block is generated using motion information of at least one neighboring sub-block of the current sub-block only when the current block has neither the motion vector derivation mode nor the affine motion compensation mode. 7.根据权利要求1所述的方法,其中,产生最终预测块的步骤包括:7. The method of claim 1, wherein the step of generating a final prediction block comprises: 当当前子块被包括在当前块的边界区域中时,通过获得第一预测块的与边界相邻的部分行或部分列中的每一个样点以及第二预测块的与边界相邻的部分行或部分列中的每一个样点的加权和来产生最终预测块。When the current sub-block is included in the boundary area of the current block, by obtaining each sample in a part row or part column of the first prediction block adjacent to the boundary and a part adjacent to the boundary of the second prediction block A weighted sum of each sample in a row or partial column produces the final prediction block. 8.根据权利要求7所述的方法,其中,第一预测块的与边界相邻的所述部分行或所述部分列中的样点以及第二预测块的与边界相邻的所述部分行或所述部分列中的样点基于当前子块的块尺寸、当前子块的运动矢量的大小和方向、当前块的帧间预测指示符、以及当前块的参考画面的POC中的至少一个被确定。8. The method of claim 7, wherein samples in the partial row or the partial column of the first prediction block adjacent to the boundary and the part of the second prediction block adjacent to the boundary The samples in the row or the partial column are based on at least one of the block size of the current subblock, the size and direction of the motion vector of the current subblock, the inter prediction indicator of the current block, and the POC of the reference picture of the current block It is determined. 9.根据权利要求1所述的方法,其中,产生最终预测块的步骤包括:9. The method of claim 1, wherein the step of generating a final prediction block comprises: 通过根据当前子块的运动矢量的大小和方向中的至少一个将不同权重因子应用于第一预测块和第二预测块中的样点来获得第一预测块和第二预测块的加权和。The weighted sum of the first prediction block and the second prediction block is obtained by applying different weighting factors to the samples in the first prediction block and the second prediction block according to at least one of the size and the direction of the motion vector of the current subblock. 10.一种用于对图像进行编码的方法,所述方法包括:10. A method for encoding an image, the method comprising: 使用当前块的运动信息产生当前块的第一预测块;generating a first prediction block of the current block using the motion information of the current block; 在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息;determining motion information that can be used to generate the second prediction block among motion information of at least one neighboring sub-block of the current sub-block; 使用确定的运动信息来产生当前子块的至少一个第二预测块;generating at least one second prediction block of the current subblock using the determined motion information; 基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块。A final prediction block is generated based on a weighted sum of the first prediction block of the current block and the at least one second prediction block of the current sub-block. 11.根据权利要求10所述的方法,其中,确定能够用于产生第二预测块的运动信息的步骤包括:11. The method of claim 10, wherein the step of determining motion information that can be used to generate the second prediction block comprises: 基于所述邻近子块的运动矢量的大小和方向中的至少一个来确定所述能够用于产生第二预测块的运动信息。The motion information that can be used to generate the second prediction block is determined based on at least one of a magnitude and a direction of motion vectors of the neighboring sub-blocks. 12.根据权利要求10所述的方法,其中,确定能够用于产生第二预测块的运动信息的步骤包括:12. The method of claim 10, wherein the step of determining motion information that can be used to generate the second prediction block comprises: 基于所述邻近子块的参考画面的POC以及当前块的参考画面的POC来确定所述能够用于产生第二预测块的运动信息。The motion information that can be used to generate the second prediction block is determined based on the POC of the reference picture of the neighboring sub-block and the POC of the reference picture of the current block. 13.根据权利要求12所述的方法,其中,确定能够用于产生第二预测块的运动信息的步骤包括:13. The method of claim 12, wherein the step of determining motion information that can be used to generate the second prediction block comprises: 仅当所述邻近子块的参考画面的POC等于当前块的参考画面的POC时,将所述邻近子块的运动信息确定为所述能够用于产生第二预测块的运动信息。Only when the POC of the reference picture of the neighboring sub-block is equal to the POC of the reference picture of the current block, the motion information of the neighboring sub-block is determined as the motion information that can be used to generate the second prediction block. 14.根据权利要求10所述的方法,其中,当前子块具有正方形形状和矩形形状中的至少一种。14. The method of claim 10, wherein the current sub-block has at least one of a square shape and a rectangular shape. 15.根据权利要求10所述的方法,其中,产生至少一个第二预测块的步骤包括:15. The method of claim 10, wherein the step of generating at least one second prediction block comprises: 仅当当前块既不具有运动矢量推导模式也不具有仿射运动补偿模式时,使用所述至少一个邻近子块的运动信息来产生所述至少一个第二预测块。The at least one second prediction block is generated using the motion information of the at least one neighboring sub-block only when the current block has neither the motion vector derivation mode nor the affine motion compensation mode. 16.根据权利要求10所述的方法,其中,产生最终预测块的步骤包括:16. The method of claim 10, wherein the step of generating a final prediction block comprises: 当当前子块被包括在当前块的边界区域中时,基于第一预测块的与边界相邻的部分行或部分列中的样点以及第二预测块的与边界相邻的部分行或部分列中的样点的加权和来产生最终预测块。When the current sub-block is included in the boundary area of the current block, based on the samples in the partial row or column of the first prediction block adjacent to the boundary and the partial row or part of the second prediction block adjacent to the boundary A weighted sum of the samples in the column to produce the final prediction block. 17.根据权利要求16所述的方法,其中,第一预测块的与边界相邻的所述部分行或所述部分列中的样点以及第二预测块的与边界相邻的所述部分行或所述部分列中的样点基于当前子块的块尺寸、当前子块的运动矢量的大小和方向、当前块的帧间预测指示符、以及当前块的参考画面的POC中的至少一个被确定。17. The method of claim 16, wherein the samples in the partial row or the partial column of the first prediction block adjacent to the boundary and the part of the second prediction block adjacent to the boundary The samples in the row or the partial column are based on at least one of the block size of the current subblock, the size and direction of the motion vector of the current subblock, the inter prediction indicator of the current block, and the POC of the reference picture of the current block It is determined. 18.根据权利要求10所述的方法,其中,产生最终预测块的步骤包括:18. The method of claim 10, wherein the step of generating a final prediction block comprises: 通过根据当前子块的运动矢量的大小和方向中的至少一个将不同权重值应用于第一预测块和第二预测块中的样点来获得所述加权和。The weighted sum is obtained by applying different weight values to the samples in the first prediction block and the second prediction block according to at least one of the magnitude and direction of the motion vector of the current subblock. 19.一种存储通过图像编码方法所产生的比特流的记录介质,所述图像编码方法包括:19. A recording medium storing a bitstream generated by an image encoding method, the image encoding method comprising: 使用当前块的运动信息产生当前块的第一预测块;generating a first prediction block of the current block using the motion information of the current block; 在当前子块的至少一个邻近子块的运动信息之中确定能够用于产生第二预测块的运动信息;determining motion information that can be used to generate the second prediction block among motion information of at least one neighboring sub-block of the current sub-block; 使用确定的运动信息来产生当前子块的至少一个第二预测块;generating at least one second prediction block of the current subblock using the determined motion information; 基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块。A final prediction block is generated based on a weighted sum of the first prediction block of the current block and the at least one second prediction block of the current sub-block.
CN201780073517.5A 2016-11-28 2017-11-28 Method and device for encoding/decoding image and recording medium for storing bit stream Active CN110024394B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202311020975.6A CN116886928A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311021525.9A CN116886929A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311025877.1A CN116866594A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311024704.8A CN116866593A (en) 2016-11-28 2017-11-28 Method and apparatus for encoding/decoding image and recording medium storing bit stream
CN202311023493.6A CN116886930A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20160159507 2016-11-28
KR10-2016-0159507 2016-11-28
PCT/KR2017/013672 WO2018097692A2 (en) 2016-11-28 2017-11-28 Method and apparatus for encoding/decoding image, and recording medium in which bit stream is stored

Related Child Applications (5)

Application Number Title Priority Date Filing Date
CN202311021525.9A Division CN116886929A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311025877.1A Division CN116866594A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311024704.8A Division CN116866593A (en) 2016-11-28 2017-11-28 Method and apparatus for encoding/decoding image and recording medium storing bit stream
CN202311023493.6A Division CN116886930A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311020975.6A Division CN116886928A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream

Publications (2)

Publication Number Publication Date
CN110024394A true CN110024394A (en) 2019-07-16
CN110024394B CN110024394B (en) 2023-09-01

Family

ID=62195247

Family Applications (6)

Application Number Title Priority Date Filing Date
CN202311021525.9A Pending CN116886929A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311025877.1A Pending CN116866594A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN201780073517.5A Active CN110024394B (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding image and recording medium for storing bit stream
CN202311023493.6A Pending CN116886930A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311020975.6A Pending CN116886928A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311024704.8A Pending CN116866593A (en) 2016-11-28 2017-11-28 Method and apparatus for encoding/decoding image and recording medium storing bit stream

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN202311021525.9A Pending CN116886929A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311025877.1A Pending CN116866594A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream

Family Applications After (3)

Application Number Title Priority Date Filing Date
CN202311023493.6A Pending CN116886930A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311020975.6A Pending CN116886928A (en) 2016-11-28 2017-11-28 Method and device for encoding/decoding images and recording medium for storing bit stream
CN202311024704.8A Pending CN116866593A (en) 2016-11-28 2017-11-28 Method and apparatus for encoding/decoding image and recording medium storing bit stream

Country Status (3)

Country Link
KR (3) KR102328179B1 (en)
CN (6) CN116886929A (en)
WO (1) WO2018097692A2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468817A (en) * 2019-09-06 2021-03-09 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113099240A (en) * 2019-12-23 2021-07-09 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113242427A (en) * 2021-04-14 2021-08-10 中南大学 Rapid method and device based on adaptive motion vector precision in VVC (variable valve timing)
CN114982228A (en) * 2020-10-16 2022-08-30 Oppo广东移动通信有限公司 Inter-frame prediction method, encoder, decoder, and computer storage medium

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019234606A1 (en) * 2018-06-05 2019-12-12 Beijing Bytedance Network Technology Co., Ltd. Interaction between ibc and atmvp
EP3788782A1 (en) 2018-06-21 2021-03-10 Beijing Bytedance Network Technology Co. Ltd. Sub-block mv inheritance between color components
CN110636298B (en) 2018-06-21 2022-09-13 北京字节跳动网络技术有限公司 Unified constraints for Merge affine mode and non-Merge affine mode
KR20250036961A (en) * 2018-06-27 2025-03-14 엘지전자 주식회사 Method for processing image on basis of inter-prediction mode and device therefor
BR112021002335A2 (en) 2018-08-09 2021-05-04 Lg Electronics Inc. Image decoding method based on affine motion prediction and device using affine fusion candidate list in image encoding system
CN110876057B (en) * 2018-08-29 2023-04-18 华为技术有限公司 Inter-frame prediction method and device
US10834417B2 (en) * 2018-09-21 2020-11-10 Tencent America LLC Method and apparatus for video coding
WO2020065518A1 (en) 2018-09-24 2020-04-02 Beijing Bytedance Network Technology Co., Ltd. Bi-prediction with weights in video coding and decoding
WO2020089822A1 (en) 2018-10-31 2020-05-07 Beijing Bytedance Network Technology Co., Ltd. Overlapped block motion compensation with derived motion information from neighbors
CN112970262B (en) 2018-11-10 2024-02-20 北京字节跳动网络技术有限公司 Rounding in Triangular Forecast Mode
MX2021007166A (en) 2018-12-21 2021-08-19 Samsung Electronics Co Ltd Image encoding device and image decoding device using triangular prediction mode, and image encoding method and image decoding method performed thereby.
US11546604B2 (en) 2018-12-21 2023-01-03 Vid Scale, Inc. Symmetric motion vector difference coding
US11394999B2 (en) 2019-03-11 2022-07-19 Alibaba Group Holding Limited Method, device, and system for determining prediction weight for merge mode
US11394993B2 (en) * 2019-03-13 2022-07-19 Tencent America LLC Method and apparatus for affine inter prediction with small subblocks
MX2022006128A (en) 2019-11-26 2022-06-16 Electronics & Telecommunications Res Inst METHOD AND APPARATUS FOR IMAGE CODING/DECODING, AND RECORDING MEDIA IN WHICH BIT STREAM IS STORED.
CN113542768B (en) * 2021-05-18 2022-08-09 浙江大华技术股份有限公司 Motion search method, motion search device and computer-readable storage medium
WO2024225705A1 (en) * 2023-04-22 2024-10-31 엘지전자 주식회사 Image encoding/decoding method and apparatus, and recording medium for storing bitstream

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130002243A (en) * 2011-06-28 2013-01-07 주식회사 케이티 Methods of inter prediction using overlapped block and appratuses using the same
WO2013051899A2 (en) * 2011-10-05 2013-04-11 한국전자통신연구원 Scalable video encoding and decoding method and apparatus using same
CN103299642A (en) * 2011-01-07 2013-09-11 Lg电子株式会社 Method for encoding and decoding image information and device using same
CN103444181A (en) * 2011-04-12 2013-12-11 松下电器产业株式会社 Motion-video encoding method, motion-video encoding apparatus, motion-video decoding method, motion-video decoding apparatus, and motion-video encoding/decoding apparatus
CN103828373A (en) * 2011-10-05 2014-05-28 松下电器产业株式会社 Image encoding method, image encoding device, image decoding method, image decoding device, and image encoding/decoding device
KR20140096130A (en) * 2011-11-18 2014-08-04 퀄컴 인코포레이티드 Adaptive overlapped block motion compensation
CN104137549A (en) * 2012-01-18 2014-11-05 韩国电子通信研究院 Method and device for encoding and decoding image
US20150085933A1 (en) * 2012-04-30 2015-03-26 Humax Co., Ltd. Method and apparatus for encoding multi-view images, and method and apparatus for decoding multi-view images
KR20150079742A (en) * 2012-12-28 2015-07-08 니폰 덴신 덴와 가부시끼가이샤 Video coding device and method, video decoding device and method, and programs therefor
CN105075260A (en) * 2013-02-25 2015-11-18 Lg电子株式会社 Method for encoding video of multi-layer structure supporting scalability and method for decoding same and apparatus therefor
WO2015195942A1 (en) * 2014-06-19 2015-12-23 Vid Scale, Inc. Methods and systems for intra block copy coding with block vector derivation
CN105580365A (en) * 2013-09-26 2016-05-11 高通股份有限公司 Sub-prediction unit (pu) based temporal motion vector prediction in hevc and sub-pu design in 3d-hevc
US20160323573A1 (en) * 2013-12-19 2016-11-03 Sharp Kabushiki Kaisha Image decoding device, image coding device, and residual prediction device
US20170019680A1 (en) * 2014-03-06 2017-01-19 Samsung Electronics Co., Ltd. Inter-layer video decoding method and apparatus therefor performing sub-block-based prediction, and inter-layer video encoding method and apparatus therefor performing sub-block-based prediction

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101553850B1 (en) * 2008-10-21 2015-09-17 에스케이 텔레콤주식회사 / Video encoding/decoding apparatus and method and apparatus of adaptive overlapped block motion compensation using adaptive weights
US8837592B2 (en) * 2010-04-14 2014-09-16 Mediatek Inc. Method for performing local motion vector derivation during video coding of a coding unit, and associated apparatus
US9426465B2 (en) * 2013-08-20 2016-08-23 Qualcomm Incorporated Sub-PU level advanced residual prediction

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103299642A (en) * 2011-01-07 2013-09-11 Lg电子株式会社 Method for encoding and decoding image information and device using same
CN103444181A (en) * 2011-04-12 2013-12-11 松下电器产业株式会社 Motion-video encoding method, motion-video encoding apparatus, motion-video decoding method, motion-video decoding apparatus, and motion-video encoding/decoding apparatus
KR20130002243A (en) * 2011-06-28 2013-01-07 주식회사 케이티 Methods of inter prediction using overlapped block and appratuses using the same
WO2013051899A2 (en) * 2011-10-05 2013-04-11 한국전자통신연구원 Scalable video encoding and decoding method and apparatus using same
CN103828373A (en) * 2011-10-05 2014-05-28 松下电器产业株式会社 Image encoding method, image encoding device, image decoding method, image decoding device, and image encoding/decoding device
KR20140096130A (en) * 2011-11-18 2014-08-04 퀄컴 인코포레이티드 Adaptive overlapped block motion compensation
CN104137549A (en) * 2012-01-18 2014-11-05 韩国电子通信研究院 Method and device for encoding and decoding image
US20150085933A1 (en) * 2012-04-30 2015-03-26 Humax Co., Ltd. Method and apparatus for encoding multi-view images, and method and apparatus for decoding multi-view images
KR20150079742A (en) * 2012-12-28 2015-07-08 니폰 덴신 덴와 가부시끼가이샤 Video coding device and method, video decoding device and method, and programs therefor
CN105075260A (en) * 2013-02-25 2015-11-18 Lg电子株式会社 Method for encoding video of multi-layer structure supporting scalability and method for decoding same and apparatus therefor
CN105580365A (en) * 2013-09-26 2016-05-11 高通股份有限公司 Sub-prediction unit (pu) based temporal motion vector prediction in hevc and sub-pu design in 3d-hevc
US20160323573A1 (en) * 2013-12-19 2016-11-03 Sharp Kabushiki Kaisha Image decoding device, image coding device, and residual prediction device
US20170019680A1 (en) * 2014-03-06 2017-01-19 Samsung Electronics Co., Ltd. Inter-layer video decoding method and apparatus therefor performing sub-block-based prediction, and inter-layer video encoding method and apparatus therefor performing sub-block-based prediction
WO2015195942A1 (en) * 2014-06-19 2015-12-23 Vid Scale, Inc. Methods and systems for intra block copy coding with block vector derivation

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
CHUN-CHI CHEN: "CE2: Report of OBMC with Motion Merging", 《JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11》 *
CHUN-CHI CHEN: "CE2: Report of OBMC with Motion Merging", 《JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11》, 22 July 2011 (2011-07-22) *
JIANLE CHEN: "Algorithm Description of Joint Exploration Test Model 3", 《JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 3RD MEETING: GENEVA, CH, 26 MAY – 1 JUNE 2016》 *
PEISONG CHEN: "Overlapped block motion compensation in TMuC", 《JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11》 *
PEISONG CHEN: "Overlapped block motion compensation in TMuC", 《JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11》, 15 October 2010 (2010-10-15) *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468817A (en) * 2019-09-06 2021-03-09 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113709486A (en) * 2019-09-06 2021-11-26 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113709487A (en) * 2019-09-06 2021-11-26 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN112468817B (en) * 2019-09-06 2022-07-29 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113709487B (en) * 2019-09-06 2022-12-23 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113709486B (en) * 2019-09-06 2022-12-23 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113099240A (en) * 2019-12-23 2021-07-09 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN113099240B (en) * 2019-12-23 2022-05-31 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN114982228A (en) * 2020-10-16 2022-08-30 Oppo广东移动通信有限公司 Inter-frame prediction method, encoder, decoder, and computer storage medium
CN113242427A (en) * 2021-04-14 2021-08-10 中南大学 Rapid method and device based on adaptive motion vector precision in VVC (variable valve timing)
CN113242427B (en) * 2021-04-14 2024-03-12 中南大学 Rapid method and device based on adaptive motion vector precision in VVC

Also Published As

Publication number Publication date
WO2018097692A3 (en) 2018-07-26
CN116866594A (en) 2023-10-10
WO2018097692A2 (en) 2018-05-31
CN116886928A (en) 2023-10-13
CN110024394B (en) 2023-09-01
KR20230042673A (en) 2023-03-29
KR20210137982A (en) 2021-11-18
CN116866593A (en) 2023-10-10
CN116886929A (en) 2023-10-13
KR20180061041A (en) 2018-06-07
CN116886930A (en) 2023-10-13
KR102328179B1 (en) 2021-11-18

Similar Documents

Publication Publication Date Title
CN110024394B (en) Method and device for encoding/decoding image and recording medium for storing bit stream
CN111919447B (en) Method and apparatus for encoding/decoding image and recording medium storing bit stream
CN109804627B (en) Image encoding/decoding method and apparatus
CN111164978B (en) Method and apparatus for encoding/decoding image and recording medium for storing bit stream
CN110771169A (en) Video encoding/decoding method and apparatus, and recording medium storing bitstream
CN110024402B (en) Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN117221573A (en) Image decoding method, image encoding method, and method of transmitting bit stream
CN109997363A (en) Image coding/decoding method and device and the recording medium for being stored with bit stream
CN112740697A (en) Image encoding/decoding method and apparatus and recording medium storing bit stream
CN114731409A (en) Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN113228681B (en) Image encoding/decoding method and device and recording medium storing bit stream
CN113841404A (en) Video encoding/decoding method and apparatus, and recording medium storing bitstream
CN118158435A (en) Method of decoding image, method of encoding image, and method of transmitting bit stream generated by method of encoding image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant