[go: up one dir, main page]

CN110024402B - Image encoding/decoding method and apparatus, and recording medium storing bit stream - Google Patents

Image encoding/decoding method and apparatus, and recording medium storing bit stream Download PDF

Info

Publication number
CN110024402B
CN110024402B CN201780073915.7A CN201780073915A CN110024402B CN 110024402 B CN110024402 B CN 110024402B CN 201780073915 A CN201780073915 A CN 201780073915A CN 110024402 B CN110024402 B CN 110024402B
Authority
CN
China
Prior art keywords
block
current
prediction
sub
subblock
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.)
Active
Application number
CN201780073915.7A
Other languages
Chinese (zh)
Other versions
CN110024402A (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 CN202310971657.1A priority Critical patent/CN116781894A/en
Priority to CN202310974535.8A priority patent/CN116896631A/en
Priority to CN202310973482.8A priority patent/CN116896630A/en
Priority to CN202310977570.5A priority patent/CN116915980A/en
Priority to CN202310977671.2A priority patent/CN116915981A/en
Publication of CN110024402A publication Critical patent/CN110024402A/en
Application granted granted Critical
Publication of CN110024402B publication Critical patent/CN110024402B/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/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
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • 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/11Selection of coding mode or of prediction mode among a plurality of spatial 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/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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

Landscapes

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

Abstract

The present invention relates to an image encoding/decoding method. To this end, the image decoding method may include the steps of: generating a first prediction block of the current block by using motion information of the current block; generating a second prediction block of the at least one current subordinate block by using motion information of at least one neighboring subordinate block of the current subordinate block; and generating a final prediction block based on a weighted sum of the first prediction block of the current block and the second prediction block of the at least one current lower block.

Description

图像编码/解码方法和装置以及存储有比特流的记录介质Image encoding/decoding method and device, and recording medium storing bitstream

技术领域technical field

本发明涉及一种用于对图像进行编码/解码的方法和设备以及存储比特流的记录介质。更具体地讲,本发明涉及一种用于使用重叠块运动补偿对图像进行编码/解码的方法和设备。The present invention relates to a method and apparatus for encoding/decoding images and a recording medium storing a bit stream. 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 with conventional image data. Therefore, when image data is transmitted by using a medium such as a conventional wired broadband network or a wireless broadband network, or when image data is stored in a conventional storage medium, transmission costs and storage costs 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-frame prediction technique for predicting pixel values included in a current picture from previous or subsequent pictures of the current picture; predicting pixel values included in the current picture by using pixel information in the current picture Intra-prediction techniques for pixel values; entropy coding techniques that assign short codes to high-occurrence values and long codes to low-occurrence values; and the like. By using such an image compression technique, image data can be efficiently compressed, and the compressed image data is transmitted or stored.

传统图像编码/解码方法和设备针对重叠块运动补偿使用仅有限数量的邻近块的运动信息。因此,编码效率的提高存在限制。Conventional image encoding/decoding methods and apparatuses use motion information of only a limited number of neighboring blocks for overlapping block motion compensation. Therefore, there is a limit to the improvement of coding efficiency.

发明内容Contents of the invention

技术问题technical problem

本发明的目标在于提供一种用于使用数量增加的邻近块的运动信息执行重叠块运动补偿以提高图像编码/解码效率的方法和设备。An object of the present invention is to provide a method and apparatus for performing overlapping block motion compensation using motion information of an increased number of adjacent blocks to improve image encoding/decoding efficiency.

解决方案solution

本发明提供了一种图像解码方法,所述图像解码方法包括:使用当前块的运动信息产生当前块的第一预测块;使用当前块的当前子块的至少一个邻近子块的运动信息来产生当前块的当前子块的至少一个第二预测块;以及基于当前块的第一预测块与当前子块的所述至少一个第二预测块的加权和来产生当前块的最终预测块。The present invention provides an image decoding method. The image decoding method includes: using the motion information of the current block to generate a first prediction block of the current block; using the motion information of at least one adjacent sub-block of the current sub-block of the current block to generate at least one second prediction block of the current sub-block of the current block; and generating a final prediction block of the current block 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.

在图像解码方法中,所述至少一个邻近子块可包括与当前块在时间上相应的同位块的子块的邻近子块。In the image decoding method, the at least one adjacent sub-block may include an adjacent sub-block of a sub-block of a co-located block temporally corresponding to the current block.

在图像解码方法中,产生至少一个第二预测块的步骤可包括:当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用所述同位块的所述子块的至少一个邻近子块的运动信息来产生所述至少一个第二预测块。In the image decoding method, the step of generating at least one second prediction block may include: when the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the The at least one second prediction block is generated by using motion information of at least one adjacent sub-block of the sub-block of the co-located block.

在图像解码方法中,产生至少一个第二预测块的步骤可包括:当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用在当前块的合并列表和运动矢量列表中的至少一个列表中所包括的运动信息来产生所述至少一个第二预测块。In the image decoding method, the step of generating at least one second prediction block may include: when the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the The motion information included in at least one of the list and the motion vector list of the current block is combined to generate the at least one second prediction block.

在图像解码方法中,产生至少一个第二预测块的步骤可包括:仅当当前子块被包括在当前块的左边界区域和上边界区域中的至少一个中时,使用至少一个邻近子块的运动信息来产生所述至少一个第二预测块。In the image decoding method, the step of generating at least one second predicted block may include: only when the current sub-block is included in at least one of the left boundary area and the upper boundary area of the current block, using at least one adjacent sub-block motion information to generate the at least one second prediction block.

在图像解码方法中,产生至少一个第二预测块的步骤可包括:当当前子块被包括在当前块的左边界区域中时,使用当前子块的邻近子块之中的左侧邻近子块、左上方邻近子块和左下方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块;以及当当前子块被包括在当前块的上边界区域中时,使用当前子块的邻近子块之中的上方邻近子块、左上方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。In the image decoding method, the step of generating at least one second predicted block may include: when the current subblock is included in the left boundary area of the current block, using a left adjacent subblock among adjacent subblocks of the current subblock , the motion information of at least one of the upper-left adjacent sub-block and the lower-left adjacent sub-block to generate the at least one second prediction block; and when the current sub-block is included in the upper boundary area of the current block, using the current sub-block The at least one second prediction block is generated by using motion information of at least one of an upper adjacent sub-block, an upper left adjacent sub-block, and an upper right adjacent sub-block among adjacent sub-blocks of the block.

在图像解码方法中,产生至少一个第二预测块的步骤可包括:当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用当前子块的上方邻近子块、左侧邻近子块、下方邻近子块、右侧邻近子块、左上方邻近子块、左下方邻近子块、右下方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。In the image decoding method, the step of generating at least one second prediction block may include: when the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the current of the subblock's upper, left, lower, right, upper left, lower left, lower right, and upper right adjacent subblocks of the subblock At least one piece of motion information is used to generate the at least one second prediction block.

在图像解码方法中,产生至少一个第二预测块的步骤可包括:按照所述邻近子块的预定顺序从当前子块的至少一个邻近子块推导运动信息;以及使用至少一条推导出的运动信息来产生所述至少一个第二预测块。In the image decoding method, the step of generating at least one second prediction block may include: deriving motion information from at least one adjacent sub-block of the current sub-block in a predetermined order of the adjacent sub-blocks; and using at least one piece of derived motion information to generate the at least one second prediction block.

在图像解码方法中,产生最终预测块的步骤可包括:在根据被用于产生第二预测块的邻近子块的位置将不同的权重因子应用于第一预测块和第二预测块内的样点的情况下获得第一预测块和第二预测块的加权和。In the image decoding method, the step of generating the final prediction block may include: applying different weighting factors to samples in the first prediction block and the second prediction block according to the positions of adjacent sub-blocks used to generate the second prediction block The weighted sum of the first prediction block and the second prediction block is obtained in the case of a point.

在图像解码方法中,在产生最终预测块的步骤中,当当前子块的第二预测块的数量是2或更多时,可通过整体地计算当前块的第一预测块和当前子块的第二预测块的加权和来产生最终预测块。In the image decoding method, in the step of generating the final predicted block, when the number of the second predicted block of the current sub-block is 2 or more, the first predicted block of the current block and the number of the current sub-block can be calculated as a whole The weighted sum of the second prediction block to produce the final prediction block.

本发明提供一种图像编码方法,所述图像编码方法包括:使用当前块的运动信息产生当前块的第一预测块;使用当前块的当前子块的至少一个邻近子块的运动信息产生当前块的当前子块的至少一个第二预测块;以及基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生当前块的最终预测块。The present invention provides an image coding method. The image coding method includes: using motion information of the current block to generate a first prediction block of the current block; using motion information of at least one adjacent sub-block of the current sub-block of the current block to generate the current block at least one second prediction block of the current sub-block; and generating a final prediction block of the current block 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.

在图像编码方法中,所述至少一个邻近子块可包括与当前块在时间上相应的同位块的子块的邻近子块。In the image encoding method, the at least one adjacent sub-block may include an adjacent sub-block of a sub-block of a co-located block temporally corresponding to the current block.

在图像编码方法中,产生至少一个第二预测块的步骤可包括:当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用所述同位块的所述子块的至少一个邻近子块的运动信息来产生所述至少一个第二预测块。In the image coding method, the step of generating at least one second prediction block may include: when the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the The at least one second prediction block is generated by using motion information of at least one adjacent sub-block of the sub-block of the co-located block.

在图像编码方法中,产生至少一个第二预测块的步骤可包括:当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用在当前块的合并列表和运动矢量列表中的至少一个列表中所包括的运动信息来产生所述至少一个第二预测块。In the image coding method, the step of generating at least one second prediction block may include: when the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the The motion information included in at least one of the list and the motion vector list of the current block is combined to generate the at least one second prediction block.

在图像编码方法中,产生至少一个第二预测块的步骤可包括:仅当当前子块被包括在当前块的左边界区域和上边界区域中的至少一个中时,使用至少一个邻近子块的运动信息来产生所述至少一个第二预测块。In the image coding method, the step of generating at least one second prediction block may include: using at least one adjacent subblock only when the current subblock is included in at least one of the left boundary area and the upper boundary area of the current block. motion information to generate the at least one second prediction block.

在图像编码方法中,产生至少一个第二预测块的步骤可包括:当当前子块被包括在当前块的左边界区域中时,使用当前子块的邻近子块之中的左侧邻近子块、左上方邻近子块和左下方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块;以及当当前子块被包括在当前块的上边界区域中时,使用当前子块的邻近子块之中的上方邻近子块、左上方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。In the image coding method, the step of generating at least one second predicted block may include: when the current subblock is included in the left boundary area of the current block, using a left adjacent subblock among adjacent subblocks of the current subblock , the motion information of at least one of the upper-left adjacent sub-block and the lower-left adjacent sub-block to generate the at least one second prediction block; and when the current sub-block is included in the upper boundary area of the current block, using the current sub-block The at least one second prediction block is generated by using motion information of at least one of an upper adjacent sub-block, an upper left adjacent sub-block, and an upper right adjacent sub-block among adjacent sub-blocks of the block.

在图像编码方法中,产生至少一个第二预测块的步骤可包括:当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用当前子块的上方邻近子块、左侧邻近子块、下方邻近子块、右侧邻近子块、左上方邻近子块、左下方邻近子块、右下方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。In the image coding method, the step of generating at least one second prediction block may include: when the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the current of the subblock's upper, left, lower, right, upper left, lower left, lower right, and upper right adjacent subblocks of the subblock At least one piece of motion information is used to generate the at least one second prediction block.

在图像编码方法中,产生至少一个第二预测块的步骤可包括:按照所述邻近子块的预定顺序从当前子块的至少一个邻近子块推导运动信息;并使用至少一条推导出的运动信息来产生所述至少一个第二预测块。In the image coding method, the step of generating at least one second prediction block may include: deriving motion information from at least one adjacent sub-block of the current sub-block in a predetermined order of the adjacent sub-blocks; and using at least one piece of derived motion information to generate the at least one second prediction block.

在图像编码方法中,产生最终预测块的步骤可包括:在根据被用于产生第二预测块的邻近子块的位置将不同的权重因子应用于第一预测块和第二预测块内的样点的情况下获得第一预测块和第二预测块的加权和。In the image coding method, the step of generating the final prediction block may include: applying different weighting factors to samples in the first prediction block and the second prediction block according to the positions of adjacent sub-blocks used to generate the second prediction block The weighted sum of the first prediction block and the second prediction block is obtained in the case of a point.

在图像编码方法中,在产生最终预测块的步骤中,当当前子块的第二预测块的数量是2或更多时,可通过整体地计算当前块的第一预测块和当前子块的第二预测块的加权和来产生最终预测块。In the image coding method, in the step of generating the final prediction block, when the number of the second prediction blocks of the current sub-block is 2 or more, the first prediction block of the current block and the number of the current sub-block can be calculated as a whole The weighted sum of the second prediction block to produce the final prediction block.

本发明提供一种存储通过图像编码方法所产生的比特流的记录介质,所述图像编码方法包括:使用当前块的运动信息产生当前块的第一预测块;使用当前块的当前子块的至少一个邻近子块的运动信息来产生当前块的当前子块的至少一个第二预测块;以及基于当前块的第一预测块与当前子块的所述至少一个第二预测块的加权和来产生当前块的最终预测块。The present invention provides a recording medium for storing a bit stream generated by an image coding method. The image coding method includes: using motion information of the current block to generate a first prediction block of the current block; using at least generating at least one second prediction block of the current subblock of the current block based on motion information of a neighboring subblock; and generating 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 subblock The final predicted block of the current block.

有益效果Beneficial effect

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

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

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

附图说明Description of drawings

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

图2是示出根据被应用了本发明的一个实施例的解码设备的构造的框图;FIG. 2 is a block diagram showing a configuration of a decoding device 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是示出根据本发明的一个实施例的图像编码方法的流程图;FIG. 5 is a flowchart illustrating an image encoding method according to an embodiment of the present invention;

图6是示出根据本发明的一个实施例的图像解码方法的流程图;FIG. 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 of a current block;

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

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

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

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

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

图15是示出使用与参考块的边界相邻的块的运动信息来执行重叠块运动补偿的示例的示图;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;

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

图17是示出用于重叠块运动补偿的运动信息的条数的示例的示图;17 is a diagram illustrating an example of the number of pieces of motion information used 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进行比较来确定邻近子块的运动信息是否是可用于产生第二预测块的信息的示例的示图;FIG. 20 is a diagram illustrating determining whether motion information of an adjacent 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 the adjacent subblocks of the current subblock. An illustration of an example;

图21是示出当计算第一预测块和第二预测块的加权和时应用权重因子的实施例的示图;21 is a diagram illustrating an embodiment of applying a weight 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 weight factors to samples according to their positions in the block when calculating a weighted sum of a first prediction block and a second prediction block;

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

图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 with reference to the accompanying drawings and will be described in detail. However, the present invention is not limited thereto although the exemplary embodiments can be construed to include all modifications, equivalents or replacements within the technical idea and technical scope of the present invention. Like reference numerals refer to identical or similar functions in various 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 that 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, certain features, structures and characteristics described herein in connection with one embodiment may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. In addition, it is to be understood that the location or arrangement of individual elements within each disclosed embodiment may be modified without departing from the spirit and scope of the disclosure. Accordingly, the following detailed description is not to be taken in a limiting sense, with the scope of the present disclosure being defined only by the appended claims (together, where properly interpreted, along with the full scope of equivalents to which the claims claim).

在说明书中使用的术语“第一”、“第二”等可被用于描述各种组件,但这些组件并不被解释为限制于所述术语。所述术语仅被用于将一个组件与其它组件区分开。例如,在不脱离本发明的范围的情况下,“第一”组件可被称为“第二”组件,并且“第二”组件也可被类似地称为“第一”组件。术语“和/或”包括多个项的组合或者是多个项中的任意一项。The terms 'first', 'second', etc. used in the specification may be used to describe various components, but the components are not construed as being limited to the terms. The terms are only used to distinguish one component from other components. For example, a 'first' component may be called a 'second' component, and a 'second' component may be similarly called a 'first' component, without departing from the scope of the present invention. The term "and/or" includes a combination of multiple items or any one of multiple 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 "directly connected to" or "directly coupled to" another element, it may be "directly connected to" or "directly coupled to" another element. connected to" or "directly coupled to" another element, or is connected or coupled to another element with other elements interposed therebetween. 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, constituent elements shown in the embodiments of the present invention are shown independently so as to exhibit characteristic functions different from each other. Therefore, this does not mean that each constituent element is constituted as a constituent unit of separate hardware or software. In other words, each constituent part includes each of the enumerated constituent parts for convenience. Accordingly, at least two of each constituent part may be combined to form one constituent part, or one constituent part may be divided into a plurality of constituent parts to perform each function. An embodiment in which each constituent part is combined and an embodiment in which one constituent part 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 for describing specific embodiments only, and are not intended to limit the present invention. An expression used in the singular includes a plural expression unless it has a clearly different meaning in the context. In this specification, it will be understood that terms such as "comprising of", "having" and the like are intended to indicate the features, numbers, steps, actions, elements, parts, or combinations thereof disclosed in the specification It is not intended to exclude the possibility that one or more other features, quantities, steps, actions, elements, components, or combinations thereof may exist or may be added. In other words, when specific elements are said to be "included", elements other than the corresponding elements are not excluded, but additional elements may be included in the embodiments of the present invention or within the scope of the present invention .

此外,一些组成元件可能不是执行本发明的必要功能的不可缺的组成元件,而是仅提升其性能的可选组成元件。可通过仅包括用于实施本发明的实质的不可缺的组成部件而排除在提升性能时使用的组成部件来实施本发明。仅包括所述不可缺的组成部件而排除在仅提升性能时使用的可选组成部件的结构也被包括在本发明的范围中。In addition, some constituent elements may not be indispensable constituent elements to perform essential functions of the present invention, but optional constituent elements that merely enhance performance thereof. The present invention can be implemented by including only essential constituent elements for carrying out the essence of the present invention and excluding constituent elements used in enhancing performance. A structure including only the indispensable constituent parts and excluding optional constituent parts used only to improve 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 the understanding of the invention. The same constituent elements in the drawings are denoted by the same reference numerals, and repeated description of the same elements will be omitted.

此外,在下文中,图像可意为构成视频的画面,或者可意为视频本身。例如,“对图像进行编码或解码或者进行两者”可意为“对视频进行编码或解码或者进行两者”,并且可意为“对视频的多个图像之中的一个图像进行编码或解码或者进行两者”。这里,画面和图像可具有相同的含义。Also, hereinafter, an image may mean a picture constituting a video, or may mean the video itself. For example, "encode or decode an image or both" could mean "encode or decode a video or both" and could mean "encode or decode one of the images of a video Or do both". Here, a picture and an 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意为正整数,并且块可意为二维形式的样点矩阵。块可以是指单元。当前块可意为当编码时成为目标的编码目标块、或者当解码时成为目标的解码目标块。另外,当前块可以是编码块、预测块、残差块和变换块中的至少一个。Block: is the sample point of M×N matrix. Here, M and N mean positive integers, and a block may mean a sample matrix in a two-dimensional form. A block may refer to a unit. The current block may mean an encoding target block targeted when encoding, or a decoding target block targeted when decoding. Also, the current block may be at least one of a coding block, a prediction block, a residual block, and a transformation block.

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

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

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

编码树块:可被用作用于指定Y编码树块、Cb编码树块和Cr编码树块中的任意一个的术语。Coding tree block: Can be used as a term for designating any one of Y coding tree block, Cb coding tree block, and Cr coding tree block.

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

重建邻近块:意为与当前块相邻并且已在时间上/空间上被编码或解码的邻近块。这里,重建邻近块可意为重建邻近单元。重建空间邻近块可以是在当前画面内的已经通过编码或解码或者通过编码和解码两者被重建的块。重建时间邻近块是在参考画面内的与当前画面的当前块位于相同位置的块、或者该块的邻近块。Reconstructed adjacent blocks: means adjacent blocks that are adjacent to the current block and have been temporally/spatially encoded or decoded. Here, reconstructing neighboring blocks may mean reconstructing neighboring cells. The reconstructed spatial neighboring blocks may be blocks within the current picture that have 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 of the block.

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

比特流:意为包括编码图像信息的比特流。Bitstream: means a bitstream including coded 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. Also, the parameter set may include slice header and 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 an encoding/decoding target unit. Additionally, a symbol may mean an entropy encoded target or an entropy decoded 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 a plurality of partitions having a small size, or may be partitioned into lower-level prediction units.

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

参考画面列表:意为包括用于画面间预测或运动补偿的一个或更多个参考画面的列表。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 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 prediction.

画面间预测指示符:可意为当前块的画面间预测方向(单向预测、双向预测等)。可选地,画面间预测指示符可意为用于产生当前块的预测块的参考画面的数量。进一步可选地,画面间预测指示符可意为用于针对当前块执行画面间预测或运动补偿的预测块的数量。Inter-prediction indicator: may mean the inter-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-picture prediction indicator may mean the number of prediction blocks for performing inter-picture 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 that a particular block is referenced 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 can mean an offset between a reference picture and an encoding/decoding target picture. For example, (mvX, mvY) may represent a motion vector, mvX may represent a horizontal component, and mvY may represent a 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. Motion vector candidates may be listed in a motion vector candidate list.

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

运动矢量候选索引:可意为指示运动矢量候选列表中的运动矢量候选的指示符。运动矢量候选索引也被称为运动矢量预测因子的索引。Motion Vector Candidate Index: May mean an indicator indicating a motion vector candidate in a 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 vectors, reference picture indexes, inter-picture prediction indicators, and at least any one of: reference picture list information, reference pictures, motion vector candidates, motion vector candidate indexes, merge candidates and merged indexes.

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

合并候选:意为空间合并候选、时间合并候选、组合合并候选、组合双向预测合并候选、零合并候选等。合并候选可具有画面间预测指示符、用于每个列表的参考画面索引、以及诸如运动矢量的运动信息。Merge candidate: means a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-predictive merge candidate, a 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 spatially and/or temporally adjacent to the current block. The merge index may indicate at least one item of motion information possessed 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 transformation unit may be partitioned into a plurality of transformation units having a small size.

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

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

变量增量(Delta)量化参数:意为编码/解码目标单元的量化参数与预测出的量化参数之间的差值。Variable 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 sorting coefficients within a block or matrix. For example, an operation of changing a two-dimensional matrix of coefficients into a one-dimensional matrix may be called scanning, and an operation of changing a one-dimensional matrix of coefficients into a two-dimensional matrix may be called scanning or inverse scanning.

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

量化的等级:意为在编码器中通过对变换系数或残差信号进行量化而产生的值。可选地,量化的等级可意为作为在解码器中经历反量化的反量化目标的值。类似地,作为变换和量化的结果的量化的变换系数等级也可落在量化的等级的含义内。Level of quantization: means a value generated by quantizing transform coefficients or residual signals in an encoder. Alternatively, the level of quantization may mean a value that is an inverse quantization target subjected to inverse quantization in a decoder. Similarly, quantized transform coefficient levels as a 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 quantization processing or dequantization processing performed in order to improve subjective image quality or objective image quality. Quantization matrices may also be referred to as scaling lists.

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

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

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

图1是示出根据被应用了本发明的实施例的编码设备的构造的框图。FIG. 1 is a block diagram showing the configuration of an encoding device 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. A 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。Referring to FIG. 1 , an encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switcher 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 an input image by using an intra mode or an inter mode, or both of the intra mode and the inter mode. Also, the encoding apparatus 100 may generate a bitstream by encoding an input image, 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 switcher 115 may switch to intra. Alternatively, when the inter mode is used as the prediction mode, the switcher 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 a residual between the input block and the prediction block. The input image may be referred to as a current image that is a 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 an 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. The reference picture may be stored in the reference picture buffer 190 .

运动补偿单元112可通过使用运动矢量执行运动补偿来产生预测块。这里,帧间预测可意为帧之间的预测或运动补偿。The motion compensation unit 112 may generate a prediction block by performing motion compensation using a 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 a 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 Unit motion prediction and motion compensation. Then, inter prediction or motion compensation may be performed differently according to the determined mode.

减法器125可通过使用输入块和预测块之间的残差来产生残差块。残差块可被称为残差信号。残差信号可意为原始信号与预测信号之间的差。另外,残差信号可以是通过对原始信号和预测信号之间的差进行变换或量化、或者进行变换和量化而产生的信号。残差块可以是块单元的残差信号。The subtracter 125 may generate a residual block by using a residual between the input block and the prediction block. A 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. Also, the residual signal may be a signal generated by transforming or quantizing, or transforming and quantizing, a difference between an original signal and a predicted signal. The residual block may be a residual signal in block units.

变换单元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 coefficient may be a coefficient value generated by performing transform on the residual block. When the transform skip mode is applied, the transform unit 130 may skip transforming the residual block.

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

量化单元140可通过根据参数对变换系数或残差信号进行量化来产生量化的等级,并可输出所产生的量化的等级。这里,量化单元140可通过使用量化矩阵来对变换系数进行量化。The quantization unit 140 may generate quantized levels by quantizing transform coefficients or residual signals according to parameters, and may output the generated quantized levels. Here, the quantization unit 140 may quantize the transform coefficient 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 on 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 an image and information for decoding the image. For example, information used to decode an image may include syntax elements.

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

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

编码参数可包括在编码器中编码并用信号传送到解码器的诸如语法元素的信息(标志、索引等)以及在执行编码或解码时被推导出的信息。编码参数可意为在对图像进行编码或解码时所需的信息。例如,编码参数可包括以下项中的至少一个值或组合形式:单元/块尺寸、单元/块深度、单元/块分区信息、单元/块分区结构、是否进行四叉树形式的分区、是否进行二叉树形式的分区、二叉树形式的分区方向(水平方向或垂直方向)、二叉树形式的分区形式(对称分区或非对称分区)、帧内预测模式/方向、参考样点滤波方法、预测块滤波方法、预测块滤波器抽头、预测块滤波器系数、帧间预测模式、运动信息、运动矢量、参考画面索引、帧间预测角度、帧间预测指示符、参考画面列表、参考画面、运动矢量预测因子候选、运动矢量候选列表、是否使用合并模式、合并候选、合并候选列表、是否使用跳过模式、插值滤波器类型、插值滤波器抽头、插值滤波器系数、运动矢量大小、运动矢量的表示精度、变换类型、变换大小、是否使用初次(首次)变换的信息、是否使用二次变换的信息、初次变换索引、二次变换索引、残差信号是否存在的信息、编码块样式、编码块标志(CBF)、量化参数、量化矩阵、是否应用环路内滤波器、环路内滤波器系数、环路内滤波器抽头、环路内滤波器形状/形式、是否应用去块滤波器、去块滤波器系数、去块滤波器抽头、去块滤波器强度、去块滤波器形状/形式、是否应用自适应样点偏移、自适应样点偏移值、自适应样点偏移类别、自适应样点偏移类型、是否应用自适应环内滤波器、自适应环内滤波器系数、自适应环内滤波器抽头、自适应环内滤波器形状/形式、二值化/反二值化方法、上下文模型确定方法、上下文模型更新方法、是否执行常规模式、是否执行旁路模式、上下文二进制位、旁通二进制位、变换系数、变换系数等级、变换系数等级扫描方法、图像显示/输出顺序、条带识别信息、条带类型、条带分区信息、并行块识别信息、并行块类型、并行块分区信息、画面类型、比特深度、以及亮度信号或色度信号的信息。The encoding parameters may include information such as syntax elements (flags, indices, etc.) encoded in the encoder and signaled to the decoder, and 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 a combination of the following items: unit/block size, unit/block depth, unit/block partition information, unit/block partition structure, whether to perform quadtree 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 Modes, Motion Information, Motion Vectors, Reference Picture Indexes, Inter Prediction Angles, Inter Prediction Indicators, Reference Picture Lists, Reference Pictures, Motion Vector Predictor Candidates , 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, representation accuracy of motion vector, transformation Type, transformation size, whether to use the information of the first (first) transformation, whether to use the information of the second transformation, the index of the first transformation, the index of the second transformation, the information of whether the residual signal exists, the coding block style, the coding block flag (CBF) , quantization parameter, quantization matrix, whether to apply in-loop filter, in-loop filter coefficient, in-loop filter tap, in-loop filter shape/form, whether to apply deblocking filter, deblocking filter coefficient , DF taps, DF strength, DF shape/form, ASO applied or not, ASO value, ASO category, ASO offset type, adaptive in-loop filter applied or not, adaptive in-loop filter coefficients, adaptive in-loop filter taps, adaptive in-loop filter shape/form, binarization/debinarization method, context Model determination method, context model update method, whether to execute normal mode, whether to execute bypass mode, context bin, bypass bin, transformation coefficient, transformation coefficient level, transformation coefficient level scanning method, image display/output order, banding identification information, slice type, slice partition information, tile identification information, tile type, tile partition information, picture type, bit depth, and information of luma signal or chrominance signal.

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

当编码设备100通过帧间预测执行编码时,编码的当前图像可被用作针对被随后处理的另一图像的参考图像。因此,编码设备100可对编码的当前图像进行重建或解码,或者可将重建或解码的图像存储为参考图像。When the encoding apparatus 100 performs encoding through inter prediction, an 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 inversely quantized in the inverse quantization unit 160 or may be inversely transformed in the inverse transform unit 170 . 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 dequantized or inverse transformed coefficients, or both dequantized and inverse transformed coefficients, to the prediction block. Here, dequantized or inversely transformed coefficients or both dequantized and inversely transformed coefficients may mean coefficients on which at least one of inverse quantization and inverse transform is performed, and may mean reconstructed residual blocks.

重建块可通过滤波器单元180。滤波器单元180可向重建块或重建图像应用去块滤波器、样点自适应偏移(SAO)以及自适应环路滤波器(ALF)中的至少一个。滤波器单元180可被称为环内滤波器。The reconstructed block may pass through a filter unit 180 . The 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 the reconstructed image. The filter unit 180 may be referred to as an in-loop filter.

去块滤波器可去除在块之间的边界处产生的块失真。为了确定是否应用去块滤波器,可基于在包括在块中的若干行或列中所包括的像素来确定是否对当前块应用去块滤波器。当去块滤波器被应用于块时,可根据所需的去块滤波强度来应用另一滤波器。A deblocking filter may remove block distortion 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 depending on the desired deblocking filtering strength.

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

自适应环路滤波器可基于滤波后的重建图像与原始图像之间的比较结果执行滤波。图像中包括的像素可被分区为预定组,将被应用于每个组的滤波器可被确定,并且不同的滤波可针对每个组被执行。关于是否应用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 an image may be partitioned into predetermined groups, a filter to be applied to each group may be determined, and different filtering may be performed for each group. Information on whether to apply the ALF may be signaled per coding unit (CU), and the shape and coefficient of the ALF to be applied to each block may vary.

经过滤波器单元180的重建块或重建图像可被存储在参考画面缓冲器190中。图2是示出根据实施例的被应用了本发明的解码设备的构造的框图。The reconstructed block or reconstructed image 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 device 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。Referring to FIG. 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 device 200 may receive the bitstream output from the encoding device 100 . The decoding device 200 may receive a bit stream stored in a computer-readable recording medium, or may receive a bit stream streamed through a wired/wireless transmission medium. The decoding apparatus 200 may decode a bitstream by using an intra mode or an inter mode. Also, the decoding apparatus 200 may generate a reconstructed image or a decoded image generated by performing decoding, and may output the reconstructed image or the decoded image.

当在解码时使用的预测模式是帧内模式时,切换器可被切换到帧内。可选地,当在解码时使用的预测模式是帧间模式时,切换器可被切换到帧间模式。When the prediction mode used in decoding is the intra mode, the switcher may be switched to intra. Alternatively, when the prediction mode used at the time of decoding is the inter mode, the switcher 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 predicted block are obtained, the decoding apparatus 200 may generate a reconstructed block which becomes a decoding target by adding the reconstructed residual block to the predicted block. A decoding target block may be referred to as a current block.

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

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

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

当帧内模式被使用时,帧内预测单元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 stored in the reference picture buffer 270 and a motion vector.

加法器255可通过将重建残差块与预测块相加来产生重建块。滤波器单元260可对重建块或重建图像应用去块滤波器、样点自适应偏移和自适应环路滤波器中的至少一个。滤波器单元260可输出重建图像。重建块或重建图像可被存储在参考画面缓冲器270中,并可在执行帧间预测时被使用。The adder 255 may generate a reconstructed block by adding the reconstructed residual block to the predicted block. The 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 the reconstructed image. The filter unit 260 may output a reconstructed image. A reconstructed block or reconstructed image may be stored in the reference picture buffer 270, and may be used when inter prediction is performed.

图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 unit into multiple lower-level units.

为了对图像进行有效分区,当进行编码和解码时,可使用编码单元(CU)。编码单元可被用作在对图像进行编码/解码时的基本单元。另外,编码单元可被用作在对图像进行编码/解码时用于对帧内模式和帧间模式进行区分的单元。编码单元可以是用于对变换系数进行预测、变换、量化、逆变换、反量化或编码/解码处理的基本单元。In order to efficiently partition an image, a coding unit (CU) may be used when encoding and decoding. A coding unit may be used as a basic unit in encoding/decoding an image. Also, a coding unit may be used as a unit for distinguishing an intra mode from an 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 on a transform coefficient.

参照图3,图像300按照最大编码单元(LCU)被顺序地分区,并且LCU单元被确定为分区结构。这里,LCU可以按照与编码树单元(CTU)相同的含义被使用。单元分区可意为对与单元相关联的块进行分区。在块分区信息中,可包括单元深度的信息。深度信息可表示单元被分区的次数或程度或者次数和程度两者。可基于树结构在与深度信息相关联的层中对单个单元进行分区。每个被分区出的下级单元可具有深度信息。深度信息可以是表示CU的尺寸的信息,并且可被存储在每个CU中。Referring to FIG. 3 , an image 300 is sequentially partitioned by largest coding unit (LCU), and the LCU unit is determined as a partition structure. Here, an LCU may be used in the same meaning as a Coding Tree Unit (CTU). Cell partitioning may mean partitioning blocks associated with a cell. In the block partition information, information of a cell depth may be included. Depth information may represent the number of times or the degree to which a cell is partitioned or both. A single unit may be partitioned in layers associated with depth information based on a tree structure. Each partitioned lower unit may have depth information. 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 distribution of coding units (CUs) in the LCU 310 . Such a distribution may be determined according to whether a single CU is partitioned into multiple (a positive integer equal to or greater than 2, including 2, 4, 8, 16, etc.) CUs. The horizontal size and vertical size of the CU generated by performing partitioning may be half of the horizontal size and vertical size of the CU before partitioning, respectively, or may have a smaller horizontal size and vertical size than the horizontal size and vertical size before partitioning according to the number of times partitioning is performed, respectively. size. A CU can be recursively partitioned into multiple CUs. Partitioning may be performed recursively on a CU up to a predefined depth or a predefined size. For example, the depth of an LCU may be 0, and the depth of a minimum 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. Partitioning is performed starting from the LCU 310 , and when the horizontal size or the vertical size or both of the horizontal size and the vertical size of the CU is reduced by performing partitioning, the depth of the CU is increased by 1.

另外,可通过使用CU的分区信息来表示关于CU是否被分区的信息。分区信息可以是1比特信息。除了SCU之外的所有CU可包括分区信息。例如,当分区信息的值是第一值时,CU可不被分区,当分区信息的值是第二值时,CU可被分区。In addition, information on whether a CU is partitioned may be represented by using partition information of the CU. Partition information may be 1-bit information. All CUs except the SCU 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 having a depth of 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. A CU of a 32×32 block and a 16×16 block may be represented 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 size and the vertical size of the partitioned four coding units may be half of the horizontal size and the vertical size 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 can be said that the coding unit can be partitioned into a quadtree 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 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 two partitioned coding units may have a size of 16×32. When a single coding unit is partitioned into two coding units, it can be said that the coding unit is partitioned in a binary tree form. The LCU 320 of FIG. 3 is an example of an LCU to which both quadtree-form partitioning and binary-tree-form partitioning are applied.

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

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

I画面可通过帧内预测被编码,而不需要进行画面间预测。P画面可通过使用关于当前块存在于一个方向(即,前向或后向)上的参考画面经由画面间预测而被编码。B画面可通过使用关于当前块被预设在两个方向(即,前向和后向)的参考画面经由画面间预测而被编码。当画面间预测被使用时,编码器可执行画面间预测或运动补偿,解码器可执行相应的运动补偿。I-pictures can be coded by intra-prediction instead of inter-picture prediction. A P picture may be encoded through inter-picture prediction by using a reference picture existing in one direction (ie, forward or backward) with respect to a current block. The B picture may be encoded via inter-picture prediction by using reference pictures 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, an embodiment of inter-picture prediction will be described in detail.

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

可在画面间预测期间由编码设备100和解码设备200中的每一个推导当前块的运动信息。可通过使用重建邻近块的运动信息、同位置块(也称为col块或同位块)和/或与同位块相邻的块的运动信息来推导当前块的运动信息。同位块可意为在先前重建的同位置画面(也称为col画面或同位画面)内在空间上与当前块位于相同位置的块。同位画面可以是在参考画面列表中包括的一个或更多个参考画面之中的一个画面。Motion information of a current block may be derived by each of the encoding apparatus 100 and the decoding apparatus 200 during inter-picture prediction. Motion information of a current block may be derived by using motion information of a reconstructed neighboring block, a co-located block (also referred to as a col block or co-located block), and/or motion information of a block adjacent to the co-located block. A co-located block may mean a block that is spatially co-located with a 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模式、合并模式、跳过模式、当前画面参考模式等。合并模式可被称为运动合并模式。A method of deriving motion information of a current block may vary according to a 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. Merge mode may be referred to as motion merge mode.

例如,当AMVP被用作预测模式时,可将重建邻近块的运动矢量、同位块的运动矢量、与同位块相邻的块的运动矢量、以及运动矢量(0,0)中的至少一个确定为用于当前块的运动矢量候选,并且通过使用运动矢量候选产生运动矢量候选列表。可通过使用产生的运动矢量候选列表推导当前块的运动矢量候选。可基于推导出的运动矢量候选来确定当前块的运动信息。同位置块的运动矢量或者与同位置块相邻的块的运动矢量可被称为时间运动矢量候选,重建邻近块的运动矢量可被称为空间运动矢量候选。For example, when AMVP is used as the prediction mode, at least one of the motion vector of the reconstructed adjacent block, the motion vector of the co-located block, the motion vector of the block adjacent to the co-located block, and the motion vector (0,0) may be determined is a motion vector candidate for a current block, and a motion vector candidate list is generated by using the motion vector candidate. Motion vector candidates of the current block may be derived by using the generated motion vector candidate list. Motion information for 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 neighboring 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 a motion vector of a current block and a motion vector candidate, 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 motion vector candidates included in the motion vector candidate list. The decoding apparatus may perform entropy decoding on a motion vector candidate index included in a bitstream, and may select a motion vector candidate of a decoding target block among motion vector candidates included in a motion vector candidate list by using the entropy-decoded motion vector candidate index. . Also, the decoding apparatus 200 may add the entropy-decoded MVD to the motion vector candidate extracted by the entropy decoding, thereby deriving the 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 a decoding target block based on the derived motion vector and reference picture index information.

推导当前块的运动信息的方法的另一示例可以是合并模式。合并模式可意为合并多个块的运动的方法。合并模式可意为从邻近块的运动信息推导当前块的运动信息的模式。当合并模式被应用时,可使用重建邻近块的运动信息和/或同位置块的运动信息来产生合并候选列表。运动信息可包括运动矢量、参考画面索引和画面间预测指示符中的至少一个。预测指示符可指示单向预测(L0预测或L1预测)或双向预测(L0预测和L1预测)。Another example of a method of deriving motion information of a current block may be a merge mode. Merge mode may mean a method of merging motions of multiple blocks. The merge mode may mean a mode in which motion information of a current block is derived from motion information of neighboring blocks. When the merge mode is applied, the motion information of reconstructed neighboring blocks and/or the motion information of co-located blocks may be used to generate a merge candidate list. 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 zero merging candidates and new motion information, wherein the new motion information is motion information (spatial merging candidates) of a neighboring block adjacent to the current block, the current A combination of motion information (temporal merging candidates) of a block including a co-located block in a reference picture, and motion information present in a merging candidate list.

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

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

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

基于以上描述,下面将详细描述根据本发明的实施例的图像编码方法和图像解码方法。Based on the above description, an image encoding method and an image decoding method according to an embodiment 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)。Referring to FIG. 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 device may encode information associated with motion compensation (step S505).

参照图6,解码设备可对从编码设备接收到的与运动补偿相关联的信息执行熵解码(步骤S601),并且可推导运动矢量候选(步骤S602)。解码设备可基于推导出的运动矢量候选产生运动矢量候选列表(步骤S603),并使用产生的运动矢量候选列表确定运动矢量(步骤S604)。此后,解码设备可通过使用确定的运动矢量执行运动补偿(步骤S605)。Referring to FIG. 6 , the decoding device may perform entropy decoding on information associated with motion compensation received from the encoding device (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 device 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 a merge candidate (step S701), and generate a merge candidate list based on the derived merge candidate. 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 a current block using the determined motion information (step S703). Thereafter, the encoding apparatus may perform entropy encoding on information associated with motion compensation (step S704).

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

可从与当前块相邻的重建块推导当前块的空间运动矢量。例如,与当前块相邻的重建块的运动矢量可被确定为当前块的空间运动矢量候选。A spatial motion vector for the current block may be derived from reconstructed blocks neighboring 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 a spatial motion vector candidate of a 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 a current block X may be derived from neighboring blocks adjacent to the current block X. Referring to FIG. Adjacent blocks to the current block X include block B1 adjacent to the upper end of the current block, block A1 adjacent to the left end of the current block, block B0 adjacent to the upper right corner of the current block, and block B0 adjacent to 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 neighboring block among a plurality of neighboring blocks adjacent to the current block has a motion vector, the motion vector of the neighboring 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 coded through the inter prediction process candidate. The determination of whether a specific neighboring block has a motion vector or whether the motion vector of a 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 , availability determination of motion vectors may be performed in the order of blocks A0, A1, B0, B1, and B2.

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

然而,当当前块的参考画面索引和具有运动矢量的邻近块的参考画面索引不同时,邻近块的缩放后的运动矢量可被确定为当前块的空间运动矢量候选。即使在这种情况下,仍可基于当前画面和当前块的参考画面之间的距离以及当前画面和与邻近块的参考画面之间的距离中的至少一个来执行缩放。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 a 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 blocks.

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

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

可从包括在当前画面的同位画面中的重建块推导当前块的时间运动矢量候选。同位画面是在当前画面之前编码/解码的画面,并且可在时间顺序上与当前画面不同。A temporal motion vector candidate of a current block may be derived from a reconstructed block included in a co-located picture of the current picture. The 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 temporal motion vector candidates of a current block.

参照图10,可从包括当前画面的同位画面(也称为同位置画面)内与当前块X在空间上位于相同位置的块的外部位置的块推导当前块的时间运动矢量候选,或者从包括与当前块X在空间上位于相同位置的块的内部位置的块推导当前块的时间运动矢量候选。这里,时间运动矢量候选可意为当前块的同位块的运动矢量。例如,可从与在空间上与当前块X位于相同位置的块C的右下角相邻的块H推导当前块X的时间运动矢量候选,或者从包括块C的中间位置的块C3推导当前块X的时间运动矢量候选。用于推导当前块的时间运动矢量候选的块H、块C3等被称为同位置块。Referring to FIG. 10 , a temporal motion vector candidate of the current block may be derived from a block at a position outside of a block spatially co-located with the current block X within a co-located picture (also referred to as a co-located picture) including the current picture, or from a block including The temporal motion vector candidate of the current block is derived from a block at an inner position of a block 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, a temporal motion vector candidate for the current block X may be derived from a block H adjacent to the lower right corner of a block C that is spatially co-located with the current block X, or from a block C3 that includes the middle position of the block C The temporal motion vector candidate for X. Block H, block C3, etc. used to derive temporal motion vector candidates for the current block are referred to as 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 frame can be obtained by scaling the motion vector of the co-located block. Temporal motion vector candidates for blocks. Here, scaling may be performed based on at least one of a distance between the current picture and the reference picture of the current block and a distance between the co-located picture and the reference picture of the co-located block. For example, the temporal motion vector 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.

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

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

首先,将描述将推导出的运动矢量候选添加到运动矢量候选列表或者从运动矢量候选列表去除推导出的运动矢量候选的处理。编码设备和解码设备可按照运动矢量候选被推导的顺序将推导出的运动矢量候选添加到运动矢量候选列表。First, a process of adding 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 device and the decoding device 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, a process of adding combined motion vector candidates 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 one 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 a combined motion vector candidate, and the generated combined motion vector candidate may be Add to motion vector candidate list.

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

接下来,将在下面描述从运动矢量候选列表选择当前块的预测运动矢量的步骤(S503、S604)。Next, the step 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 a predicted motion vector and a motion vector of a 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 information associated with motion compensation (S505, S601) shown in FIGS. 7 and 8 shown in the steps of performing motion compensation (S703, S804) and the steps of entropy encoding/decoding (S704, S801).

下面,将详细描述图7和图8中示出的每个步骤。Next, 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 a current block X may be derived from neighboring blocks adjacent to the current block X. Referring to FIG. Adjacent blocks adjacent to the current block X may include block B1 adjacent to the upper end of the current block, block A1 adjacent to the left end of the current block, block B0 adjacent to the upper right corner of the current block, and block B0 adjacent to the upper left end of the current block. At least one of the corner adjacent block B2, and the block A0 adjacent to the lower left corner of the current block.

为了推导当前块的空间合并候选,确定与当前块相邻的每个邻近块是否可用于对当前块的空间合并候选的推导。可按照预定优先级顺序针对邻近块进行这样的确定。例如,在图9的示例中,可按照块A1、B1、B0、A0和B2的顺序来确定空间合并候选的可用性。基于可用性确定顺序所确定的空间合并候选可被顺序地添加到当前块的合并候选列表。In order to derive spatial merging candidates for the current block, it is determined whether each neighboring block adjacent to the current block is available for derivation of spatial merging candidates for the current block. Such a determination may be made for neighboring 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 spatial merging candidates to a merging candidate list.

参照图11,四个空间合并候选从四个邻近块A1、B0、A0和B2被推导,并且推导出的空间合并候选可被顺序地添加到合并候选列表。Referring to FIG. 11 , four spatial merging candidates are derived from four neighboring 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 spatial merging candidates 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.

可从当前画面的同位画面中包括的重建块推导当前块的时间合并候选。同位画面可以是在当前画面之前编码/解码的画面,并且可在时间顺序上与当前画面不同。A temporal merging candidate of a current block may be derived from a reconstructed block included in a co-located picture 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 the merging candidate list.

参照图10,可从包括当前画面的同位画面(也称为同位置画面)中与当前块X在空间上位于相同位置的块的外部的位置的块推导当前块的时间合并候选,或者可从包括当前画面的同位画面中与当前块X在空间上位于相同位置的块内部的位置的块推导当前块的时间合并候选。术语“时间合并候选”可意为同位块的运动信息。例如,可从与在空间上与当前块X位于相同位置的块C的右下角相邻的块H推导当前块X的时间合并候选,或者从包括块C的中间位置的块C3推导当前块X的时间合并候选。用于推导当前块的时间合并候选的块H、C3等被称为同位块(也称为同位置块)。Referring to FIG. 10 , a temporal merge candidate of the current block may be derived from a block at a position outside of a block spatially co-located with the current block X among co-located pictures (also referred to as co-located pictures) including the current picture, or may be derived from Temporal merging candidates of the current block are derived from blocks including positions inside blocks spatially co-located with the current block X in co-located pictures of the current picture. The term "temporal merge candidate" may mean motion information of a co-located block. For example, the temporal merge candidate of the current block X can be derived from the block H adjacent to the lower right corner of the block C that is spatially co-located with the current block X, or the current block X can be derived from the block C3 including the middle position of the block C time to merge candidates. The blocks H, C3, etc. used to derive temporal merging candidates for the current block are called co-located blocks (also called 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 position outside the block C, the block H is set as a co-located block of the current block. In this case, temporal merging candidates of the current block may be derived based on motion information of the block H. On the contrary, when a temporal merge candidate of the current block cannot be derived from the block H, a block C3 including a position located inside the block C may be set as a co-located block of the current block. In this case, temporal merging candidates of the current block may be derived based on motion information of the block C3. When no temporal merging candidate for the current block can be derived from neither block H nor block C3 (e.g., block H and block C3 are both intra-coded blocks), it may not be possible to derive a temporal merging candidate for the current block at all, Or the temporal merging candidates of the current block may be derived from blocks other than block H and block C3.

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

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

参照图12,当一个时间合并候选从位于位置H1的同位块被推导出时,推导出的时间合并候选可被添加到合并候选列表。Referring to FIG. 12 , when a temporal merging candidate is derived from a co-located block located at a position H1, the derived temporal merging candidate may be added to a 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 frame can be obtained by scaling the motion vector of the co-located block. The motion vectors of the temporal merging candidates for the block. Here, the 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 can 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 a current block, a neighboring block, or a co-located block.

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

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

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

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

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

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

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

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

具有预定运动信息值的合并候选可以是具有运动矢量(0,0)的零合并候选。具有预定运动信息值的合并候选可以被设置使得该合并候选在编码设备和解码设备中具有相同的值。A merge candidate having a predetermined motion information value may be a zero merge candidate having 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 encoding parameters of a current block, an adjacent block, or a co-located block. one. In addition, at least one of a modified spatial merging candidate, a modified temporal merging candidate, a combined merging candidate, and a merging candidate with a predetermined motion information value may be combined based on at least one of encoding parameters of the current block, an adjacent block, or a co-located block. Add to 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 step of determining motion information of the current block using the generated merging candidate list (S702, S803) will be described.

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

为了产生当前块的预测块,编码器可通过使用合并候选索引从合并候选列表选择合并候选,并确定当前块的运动信息。然后,编码器可基于确定的运动信息执行运动补偿,从而产生当前块的预测块。In order to generate a prediction block of a current block, the encoder may select a merging candidate from a merging candidate list by using a merging 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 a merge candidate indicated by the merge candidate index included in the merge candidate list. The determined merging candidates 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, steps of performing motion compensation using motion vectors or motion information (S504, S605, S703, S804) will be described.

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

编码设备和解码设备可使用确定的运动信息执行帧间预测或运动补偿(S703、S804)。这里,当前块可具有确定的合并候选的运动信息。The encoding device and the decoding device 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 merging candidates.

根据当前块的预测方向,当前块可具有一(最小值)个至N(最大值)个运动矢量。可使用所述一个至N个运动矢量来产生一(最小值)个至N(最大值)个预测块,并且可在产生的预测块之中选择最终预测块。Depending on the prediction direction of the current block, the current block may have one (minimum) to N (maximum) motion vectors. 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 one motion vector, the prediction block generated using the motion vector (or motion information) is determined as the final prediction block of the current block.

此外,当当前块具有多个运动矢量(或多条运动信息)时,使用所述多个运动矢量(或所述多条运动信息)来产生多个预测块,并且基于所述多个预测块的加权和来确定当前块的最终预测块。分别包括由多个运动矢量(或多条运动信息)分别指示的多个预测块的多个参考画面可在不同的参考画面列表中或者在一个参考画面列表中被列出。In addition, when the current block has a plurality of motion vectors (or pieces of motion information), the plurality of motion vectors (or the pieces of motion information) are used to generate a plurality of prediction blocks, and based on the plurality of prediction blocks to determine the final prediction 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 weighted sum to determine the final prediction block for the current block.

可选地,例如,可基于由预设运动矢量候选索引所指示的运动矢量候选来产生当前块的多个预测块,然后可基于该多个预测块的加权和来确定当前块的最终预测块。另外,可基于由预定运动矢量候选索引范围内的索引所指示的运动矢量候选来产生多个预测块,然后可基于该多个预测块的加权和来确定当前块的最终预测块。Optionally, 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 the 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。可选地,可按照将不同的权重因子应用于各个预测块的方式来确定当前块的最终预测块。A weighting factor for each prediction block may be equally 1/N (here, N is the number of generated prediction blocks). For example, when two prediction blocks are generated, the weight 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. Optionally, the final prediction block of the current block may be determined in a manner of applying different weight factors to each prediction block.

用于预测块的权重因子可以不是固定的,而是可变的。用于预测块的权重因子可不相等,而是不同的。例如,当两个预测块被产生时,用于所述两个预测块的权重因子可相等,如(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)。Weighting factors for predicting blocks may not be fixed but variable. The weighting factors for predicting 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 not be equal, 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. That is, the value of the weighting factor may include a negative real value, such as (-1/2, 3/2), (-1/3, 4/3) or (1-1/4, 5/4).

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

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

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 a final prediction block of a current block, and LX (X=0, 1, 2, 3) represents a reference picture list. WF_LX indicates the weight factor of the prediction block generated using the LX reference picture list. OFFSET_LX indicates an offset value for a prediction block generated using the LX reference picture list. P_LX indicates a prediction block generated using a motion vector (or motion information) of the LX reference picture list of the current block. 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 picture, reference picture without filter, reference picture without sample adaptive offset, reference picture without adaptive loop filter picture, reference picture with DF and AO only, reference picture with DF and ALF only, reference with SAO and ALF picture, and all reference pictures that have passed through DF, SAO and ALF. In this case, the LX reference picture list may be at least any one of an L2 reference picture list and an L3 reference picture list.

即使针对预定参考画面列表存在多个预测方向,也可基于预测块的加权和来获得当前块的最终预测块。在这种情况下,使用一个参考画面列表所推导出的多个预测块的权重因子可相等,或者可彼此不同。Even if a plurality of prediction directions exist for a predetermined reference picture list, a final prediction block of a current block may be obtained based on a weighted sum of 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 a weight factor WF_LX or an offset OFFSET_LX of a plurality of prediction blocks may be an encoding parameter to be entropy encoded/decoded. Alternatively, weighting factors and offsets may be derived from previously encoded/decoded neighboring blocks adjacent to the current block, for example. 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 the 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, when 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 weight factor or offset. For example, when the difference 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. Also, 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 presentation order (POC) of the current picture and the presentation order (POC) of the reference picture.

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

多个预测块的加权和可仅被应用于预测块的部分区域。所述部分区域可以是与每个预测块的边界相邻的边界区域。为了如上所述将加权和仅应用于所述部分区域,可在每个预测块中逐子块地计算加权和。A weighted sum of a plurality of prediction blocks may be applied to only a partial area of the prediction block. The partial area may be a boundary area adjacent to a 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 subblock by subblock in each prediction block.

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

另外,当通过运动矢量预测计算预测块的加权和时,可使用在运动矢量候选列表中包括的运动矢量候选中的至少一个来计算该加权和,并且可将计算结果用作当前块的最终预测块。Also, when the weighted sum of the prediction block 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 a final prediction block of the current block.

例如,可使用空间运动矢量候选和时间运动矢量候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using spatial motion vector candidates and temporal motion vector candidates, 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 combined motion vector candidates, 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 a motion vector candidate 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 predicted block is calculated using the merge mode, the weighted sum may be calculated using at least one merge candidate among merge candidates included in the merge candidate list, and the calculation result may be used as a final predicted 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 a final prediction block of the current block.

例如,可使用空间合并候选和时间合并候选来产生预测块,可计算预测块的加权和,并且可将计算出的加权和用作当前块的最终预测块。For example, a prediction block may be generated using spatial merging candidates and temporal merging candidates, 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 combined merging candidates, a weighted sum of the prediction blocks may be generated, 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 a merging candidate indicated by a specific index, a weighted sum of the prediction blocks may be generated, 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 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 an encoder and a decoder, motion compensation may be performed using a motion vector or motion information of a 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 encoding 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 area 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.

重叠块运动补偿可意为通过计算与当前块的边界区域相应的预测块和使用与当前块相邻的已编码/解码块的运动信息所产生的预测块的加权和来执行运动补偿的处理。The overlapped 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 a current block and a prediction block generated using motion information of encoded/decoded blocks adjacent to the current block.

可通过将当前块划分为多个子块来逐子块地执行对加权和的计算。也就是说,可使用与当前块相邻的已编码/解码的子块的运动信息逐子块地执行当前块的运动补偿。子块可意为当前块的下级块。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 subblock by subblock using motion information of encoded/decoded subblocks adjacent to the current block. A sub-block may mean a lower-level block of a current block.

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

可使用第一预测块和第二预测块的加权和来产生当前块的最终预测块。也就是说,重叠块运动补偿在于使用当前块的运动信息和另一块的运动信息找到当前块的最终预测块。A final prediction block of the current block may be generated using a weighted sum of the first prediction block and the second prediction 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, bi-directional optical flow mode When used, the current block may be divided into sub-blocks, and overlapping block motion compensation may be performed on a sub-block basis.

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

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

接下来,将描述对与运动补偿相关联的信息执行熵编码/熵解码的处理(S505、S601、S704、S801)。Next, a process of performing entropy encoding/entropy decoding on 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 device may entropy encode information associated with motion compensation to a bitstream, and the decoding device may decode information associated with motion compensation included in the bitstream. The information associated with motion compensation that is the 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 a prediction direction of inter prediction, the number of prediction directions, or both of the prediction direction and the number of prediction directions of inter prediction when the current block is encoded/decoded by inter prediction. For example, an inter-prediction indicator may indicate uni-directional prediction or multi-directional prediction such as bi-prediction, tri-prediction, and quad-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、或更多个方向。According to the number of prediction directions of the current block, 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.

特定参考画面列表的预测列表利用标志指示是否使用参考画面列表产生预测块。The prediction list utilization flag for a particular reference picture list indicates whether the reference picture list is used 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), it means that the prediction block is generated using the reference picture list. When the prediction list utilization flag has a second value of zero (0), it means that the prediction block is not generated using the reference picture list. Here, the first and second values of the prediction list utilization flag may be set to 0 and 1, respectively, instead.

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

参考画面索引可指示存在于参考画面列表中并且被当前块参考的特定参考画面。对于每个参考画面列表,可对一个或更多个参考画面索引进行熵编码/解码。可使用一个或更多个参考画面索引对当前块进行运动补偿。The reference picture index may indicate a specific reference picture that exists in the reference picture list and is referred to 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 a motion vector candidate of a current block among motion vector candidates included in a 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/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/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/non-use information cu_skip_flag, when the skip mode use/non-use information cu_skip_flag has a first value of one (1), the skip mode may be used. On the contrary, when the skip mode use/non-use information cu_skip_flag has a second value of 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 use/non-use information.

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

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

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

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

合并索引信息可指示合并候选具有的一条或更多条运动信息。例如,当合并索引信息具有第一值零(0)时,合并索引信息可指示合并候选列表中被列为第一条目的第一合并候选;当合并索引信息具有第二值一(1)时,合并索引信息可指示合并候选列表中被列为第二条目的第二合并候选;当合并索引信息具有第三值二(2)时,合并索引信息指示合并候选列表中被列为第三条目的第三合并候选。类似地,当合并索引信息具有从第四值至第N值的值时,合并索引信息可指示合并候选列表中在根据所述值的顺序的位置所列出的合并候选。这里,N可以是0或正整数。Merge index information may indicate one or more pieces of motion information that a 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 entry 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 the merge candidates listed in the merge candidate list at positions according to the order of the values. Here, N can be 0 or a positive integer.

可基于合并索引信息使用合并模式对当前块执行运动补偿。Motion compensation may be performed on the current block using a merge mode based on the merge 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, a weight factor, an offset, or both a weight factor and an offset may be applied to each prediction block. The weighted sum factors (for example, weight factors and offsets) used to calculate the weighted sum may be entropy encoded/entropy decoded by an amount corresponding to at least one of the following items or may be entropy encoded by an amount corresponding to at least one of the following items Coding/entropy decoding: reference picture list, reference picture, motion vector candidate index, motion vector difference, motion vector, skip mode use/unuse information, merge mode use/unuse information, merge index information. In addition, the weight 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 weight factor and an offset.

可逐块地对与运动补偿相关联的信息进行熵编码/熵解码,或者可以以上级单元为单位对与运动补偿相关联的信息进行熵编码/熵解码。例如,可逐块(例如,逐CTU、逐CU、或逐PU)地对与运动补偿相关联的信息进行熵编码/熵解码。可选地,可以以上级单元(诸如视频参数集、序列参数集、画面参数集、自适应参数集或条带头)为单位对与运动补偿相关联的信息进行熵编码/熵解码。Information associated with motion compensation may be entropy encoded/decoded block by block, or may be entropy encoded/entropy decoded in units of higher-level units. For example, information associated with motion compensation may be entropy encoded/decoded on a block-by-block basis (eg, CTU-by-CTU, CU-by-CU, or PU-by-PU). Alternatively, information associated with motion compensation may be entropy encoded/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/decoded based on a motion compensation information difference indicating a difference between the information associated with motion compensation and a predicted value of the information associated with motion compensation .

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

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

可基于编码参数中的至少一个对比特流进行解码来产生至少一条与运动补偿相关联的信息。相反,可基于编码参数中的至少一个将至少一条与运动补偿相关联的信息熵编码到比特流。At least one piece of information associated with motion compensation may be generated by decoding the bitstream based on at least one of the encoding parameters. 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 , 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 may mean precision. The specified resolution can be set in 16-pixel (16-pel) units, 8-pixel (8-pel) units, 4-pixel (4-pel) units, integer-pixel (integer-pel) units, 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, 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 will be additionally used to calculate a weighted sum of prediction blocks of the current block during motion compensation of the current block.

局部照度补偿信息可以是指示当产生当前块的预测块时是否应用权重因子和偏移中的任何一个的信息。这里,权重因子和偏移中的至少一个可以是基于参考块计算的值。The local illumination compensation information may be information indicating whether any one of a weight factor and an offset is applied when generating a prediction block of a current block. Here, at least one of the weight 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 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 representative motion vectors.

解码器侧运动矢量推导信息可以是指示运动补偿所需的运动矢量是否被解码器推导并随后在解码器中被使用的信息。根据解码器侧运动矢量推导信息,与运动矢量相关联的信息可不被熵编码/熵解码。当解码器侧运动矢量推导信息指示运动矢量被解码器推导并随后在解码器中被使用时,与合并模式相关联的信息可被熵编码/熵解码。也就是说,解码器侧运动矢量推导信息可指示合并模式是否在解码器中被使用。The decoder-side motion vector derivation information may be information indicating whether a motion vector necessary for motion compensation is derived by the decoder and then used in the decoder. The information associated with the motion vector may not be entropy encoded/entropy decoded by deriving the information from the decoder side motion vector. 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 a motion vector is modified pixel by pixel or subblock by subblock and then the modified motion vector is used for motion compensation. According to bidirectional optical flow information, motion vectors may not be entropy encoded/entropy decoded pixel by pixel or subblock by subblock. 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.

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

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

当与运动补偿相关联的信息被熵编码/熵解码时,可基于以下信息中的至少一个信息来确定上下文模型:与相邻于当前块的邻近块的运动信息或邻近块的区域信息相关联的信息;先前编码/解码的与运动补偿相关联的信息或先前编码/解码的区域信息;关于当前块的深度的信息;关于当前块的尺寸的信息。When information associated with motion compensation is entropy encoded/entropy decoded, the context model may be determined based on at least one of 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 information associated with motion compensation is entropy encoded/entropy decoded, entropy encoding/decoding may be performed by using at least one of the following information as a predictive value of 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 basis.

参照图13,阴影块是将被执行重叠块运动补偿的区域。阴影块可包括当前块的位于边界的子块或者当前块中的子块。由粗实线标定的区域可以是当前块。Referring to FIG. 13 , shaded blocks are regions where overlapping block motion compensation will be performed. The shaded block may include a sub-block located on a boundary of the current block or a sub-block in the current block. An area marked by a 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) a neighboring sub-block adjacent to the current block or a neighboring sub-block adjacent to the current sub-block within the current block. The area where the head of the arrow is located may mean the current sub-block within the current block.

对于阴影块,可计算第一预测块和第二预测块的加权和。当前块内的当前子块的运动信息可被用作用于产生第一预测块的运动信息。与当前块相邻的邻近子块的运动信息和与当前子块相邻并且包括在当前块中的邻近子块的运动信息中的至少一个或两者可被用作用于产生第二预测块的运动信息。For shaded blocks, a weighted sum of the first prediction block and the second prediction block may be calculated. Motion information of a 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 subblocks adjacent to the current block and motion information of adjacent subblocks adjacent to the current subblock and included in the current block may be used as a parameter for generating the second prediction block. Sports information.

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

此外,为了降低计算复杂度,用于产生第二预测块的运动信息可根据与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块的运动矢量的大小而变化。In addition, in order to reduce the computational complexity, the motion information used to generate the second prediction block can 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 neighboring subblock is a bidirectionally predicted subblock, the magnitudes of the motion vector in the L0 direction and the L1 direction are compared, and only the motion information of the larger magnitude direction may be used to generate the second prediction block.

可选地,例如,运动矢量的L0方向的x分量和y分量的绝对值之和以及运动矢量的L1方向的x分量和y分量的绝对值之和被计算。然后,可仅将等于或大于预定值的运动矢量用于产生第二预测块。这里,该预定值可以是0或正整数。该预定值可以是基于从编码器用信号传送到解码器的信息所确定的值。可选地,该预定值可不用信号传送,而可以是在编码器和解码器中被相同设置的值。Alternatively, for example, the sum of the absolute values of the x and y components in the L0 direction of the motion vector and the sum of the absolute values of the x and y components in 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 set identically in the encoder and decoder.

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

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

可选地,例如,可对当前子块的运动矢量的x分量和y分量的绝对值进行比较。当y分量的绝对值较大时,当前子块的上方子块和下方子块中的至少一个的运动信息可被用于产生第二预测块。Optionally, for example, the absolute values of the x-component and y-component of the motion vector of the current sub-block may be compared. When the absolute value of the y component is large, motion information of at least one of the upper subblock and the lower subblock of the current subblock 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 subblock is equal to or greater than a predetermined value, 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 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 subblock is equal to or greater than a predetermined value, the motion information of at least one of the upper subblock and the lower subblock of the current subblock may be used to generate the second 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 a sub-block may be 4x4 or 8x8. The information of the size of the sub-block may be entropy-encoded/entropy-decoded at a 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. In addition, when the size of the current block is greater 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 sequence, picture, slice, tile, CTU, CU, and PU. In addition, the size of the sub-block may be a predetermined size preset in the encoder and the decoder.

子块可具有正方形形状或矩形形状。例如,当当前块具有正方形形状或矩形形状时,子块可具有正方形形状。A sub-block 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 sequence, picture, slice, tile, CTU, CU, and 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 a sub-block of a co-located block. In order to improve coding efficiency, the motion information of the co-located sub-block spatially co-located with the current block in the co-located picture or the reference picture can be used to generate the second prediction block.

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

另外,同位画面中的同位子块、与当前块在空间上相邻的邻近子块、以及当前块内与当前子块在空间上相邻的邻近子块中的至少一个的运动信息可用于产生第二预测块。In addition, motion information of at least one of the co-located sub-blocks in the co-located picture, the spatially adjacent sub-blocks adjacent to the current block, and the spatially adjacent sub-blocks within the current block and the current sub-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. In order to improve coding efficiency, a reference block in a reference picture can be identified by using at least one of the motion vector of the current block and the reference picture index, and the motion information of adjacent blocks adjacent to the boundary of the identified reference block can be used to generate the second prediction block. Here, the adjacent block may include an encoded/decoded block adjacent to a sub-block of the reference block located at a right boundary or a left boundary.

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

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

为了提高编码效率,在合并候选列表中包括的多个合并候选中的至少一个合并候选的运动信息可用于产生第二预测块。这里,合并候选列表可以是在多个帧间预测模式之中的合并模式中使用的列表。In order to improve encoding 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 a 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 optionally, 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 encoding 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 the merge candidate and the motion vector candidate is used as motion information required to generate the second prediction block, a region to which the overlapping block motion compensation is applied may be set differently. The area to which overlapping block motion compensation is applied can be an area of the block that is adjacent to the boundary (i.e., a sub-block of the block that lies on the boundary) or an area of the block that is not adjacent to the boundary (i.e., a sub-block that is not located on the boundary of the block). 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 to generate a second prediction block.

例如,可通过将空间合并候选或空间运动矢量候选用作运动信息,针对块的不与边界相邻的区域执行重叠块运动补偿。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 spatial merging candidate or a spatial motion vector candidate as motion information.

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

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

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

另外,为了提高编码效率,在合并候选列表或运动矢量候选列表内的从特定块推导出的运动信息可用于针对特定区域的重叠块运动补偿。In addition, in order to improve encoding 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 the 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 area of the current block.

可选地,例如,当当前块的左下方邻近块的运动信息被包括在合并候选列表或运动矢量候选列表中时,该运动信息可用于当前块的下边界区域的重叠块运动补偿。Optionally, 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 subblock group basis. In order to reduce computational complexity, subblock-based overlapping block motion compensation may be performed in units of subblock sets including one or more subblocks. A unit of a subchunk set may mean a unit of a subchunk group.

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

对于每个子块组,可计算第一预测块和第二预测块的加权和。当前块内的当前子块组的运动信息可被用作用于产生第一预测块的运动信息。这里,当前块内的当前子块组的运动信息可以是当前子块组内的每个子块的运动信息的平均值、中值、最小值、最大值和加权和中的任意一个。与当前块相邻的邻近子块的运动信息、与当前块相邻的邻近子块组的运动信息以及当前块内的与当前子块相邻的邻近子块的运动信息中的至少一个可被用作用于产生第二预测块的运动信息。这里,与当前块相邻的邻近子块组的运动信息可以是在该邻近子块组中包括的每个子块的运动信息的平均值、中值、最小值、最大值和加权和中的任意一个。For each subblock group, a weighted sum of the first prediction block and the second prediction block may be calculated. Motion information of a current subblock group within a current block may be used as motion information for generating the first prediction block. Here, the motion information of the current sub-block group in the current block may be any one of the average value, median value, minimum value, maximum value and weighted sum of the motion information of each sub-block in the current sub-block group. At least one of motion information of adjacent subblocks adjacent to the current block, motion information of adjacent subblock groups adjacent to the current block, and motion information of adjacent subblocks within the current block adjacent to the current subblock 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 one of the average value, median value, 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 a subblock group may be equal to or smaller than the horizontal size of a current subblock. In addition, the vertical size of a subblock group may be equal to or smaller than the vertical size of a current subblock. In addition, overlapping block motion compensation may be performed on at least one sub-block of a plurality of sub-blocks located at the upper boundary and the left boundary of the current block.

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

另外,可针对当前块的颜色分量中的至少一个执行重叠块运动补偿。颜色分量可包括亮度分量和色度分量中的至少一个。In addition, overlapping block motion compensation may be performed for at least one of 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 inter prediction indicator of the current block. That is, overlapping block motion compensation may be performed when the current block is to be uni-predicted, bi-predicted, tri-predicted, and/or quad-predicted. Alternatively, overlapping block motion compensation may be performed only when the current block is unidirectionally predicted. Further optionally, overlapping block motion compensation may be performed only when the current block is bi-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, a maximum of K second prediction blocks can be generated and used for overlapping block motion compensation. Here, K may be zero (0) or a positive integer such as 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 adjacent sub-blocks adjacent to the current sub-block in the current block, the upper block, left block, right block, upper-left block, upper-right block, and lower-left block of the current sub-block can be selected. At least one of the square and the bottom 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连接来推导用于产生第二预测块的运动信息。Referring to FIG. 17 , in order to improve encoding efficiency, when motion compensation is performed on at least one of a plurality of subblocks located at an upper boundary and a left boundary within a current block, up to three pieces of motion information may be derived for generating a second prediction block. That is, motion information for generating the second prediction block may be derived based on 3-connection.

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

另外,当针对当前块内位于左上边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的上方邻近块、左侧邻近块和左上方邻近块中的至少一个推导运动信息。In addition, when motion compensation is performed on a sub-block 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 sub-blocks adjacent to the current block. Sports information.

另外,当针对当前块内位于右上边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的上方邻近块、左上方邻近块和右上方邻近块中的至少一个推导运动信息。In addition, when motion compensation is performed on a subblock 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 subblocks adjacent to the current block. Sports information.

此外,当针对当前块内位于左下边界的子块执行运动补偿时,可从与当前块相邻的邻近子块之中的左侧邻近块、左上方邻近块和左下方邻近块中的至少一个推导运动信息。In addition, when motion compensation is performed on a sub-block located at the lower-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 sub-blocks adjacent to the current block may be Deriving motion information.

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

例如,对于当前块内的子块,可从包括在当前块内的作为与当前子块相邻的邻近子块的上方邻近块、左侧邻近块、下方邻近块、右侧邻近块、左上方邻近块、左下方邻近块、右下方邻近块和右上方邻近块中的至少一个推导运动信息。For example, for a sub-block within the current block, it can be selected from the upper adjacent block, the left adjacent block, the lower adjacent block, the right adjacent block, the upper left At least one of the neighboring block, the lower left neighboring block, the lower right neighboring block, and the upper right neighboring block derives motion information.

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

另外,为了提高编码效率,可根据运动矢量的大小和方向来确定用于产生第二预测块的运动信息的条数。In addition, in order to improve encoding efficiency, the number of pieces of motion information used to generate the second prediction block may be determined according to the magnitude 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 y-component of the motion vector is equal to or greater than J, up to L pieces of motion information can be used. On the contrary, when the sum of the absolute values of the x component and the y component of the motion vector is less than J, a maximum of P pieces of motion information can 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 space-temporal motion vector prediction candidate is used, up to 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, up to 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. 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 encoding efficiency, an order of deriving motion information for generating a second prediction block may be determined based on a position of a current subblock.

例如,当针对当前块内位于上边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)上方邻近块、(2)左上方邻近块和(3)右上方邻近块的顺序从邻近子块推导运动信息。For example, when deriving the motion information for the current sub-block located on the upper boundary within the current block, the motion information can be derived according to (1) the upper adjacent block, (2) the upper-left adjacent block, and (3) the adjacent sub-blocks adjacent to the current block. The sequence of top right neighbors derives motion information from neighboring sub-blocks.

另外,当针对当前块内位于左边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)左侧邻近块、(2)左上方邻近块和(3)左下方邻近块的顺序从邻近子块推导运动信息。In addition, when deriving motion information for a current subblock located at the left boundary within the current block, it may be based on (1) the left adjacent block, (2) the upper left adjacent block, and (3) the adjacent subblocks adjacent to the current block. ) order to the lower left neighboring block 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 upper-left boundary within the current block, it may be based on (1) the upper adjacent block, (2) the left adjacent block, and (3) the adjacent sub-blocks adjacent to the current block. The order of the top-left neighbors derives motion information from neighboring sub-blocks.

另外,当针对当前块内位于右上边界的当前子块推导运动信息时,可按照作为与当前块相邻的邻近子块的(1)上方邻近块、(2)左上方邻近块和(3)右上方邻近块的顺序从邻近子块推导运动信息。In addition, when deriving the motion information for the current subblock located at the upper right boundary within the current block, it can be based on (1) the upper adjacent block, (2) the upper left adjacent block, and (3) the adjacent subblocks adjacent to the current block. The sequence of top right neighbors 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 can be derived according to (1) the left adjacent block, (2) the upper left adjacent 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 , the following subblocks adjacent to the current subblock can be selected in order of (1) upper adjacent block, (2) left adjacent block, (3) lower adjacent block, (4) right adjacent block block, (5) upper-left adjacent block, (6) lower-left adjacent block, (7) lower-right adjacent block, and (8) upper-right adjacent block to derive the motion information of the current sub-block within the current block. Alternatively, motion information may be derived in an order different from that shown in FIG. 19 .

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

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

仅在预定条件被满足时,与当前块相邻的邻近子块的运动信息或者与当前子块相邻的邻近子块的运动信息可被推导作为用于产生第二预测块的运动信息。Only when a predetermined condition is satisfied, motion information of neighboring subblocks adjacent to the current block or motion information of neighboring 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 subblocks adjacent to the current block or adjacent subblocks adjacent to the current subblock within the current block exists, motion information of the existing adjacent subblocks may be derived as 2. Predict the motion information of the block.

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

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

另外,当用于产生第二预测块的帧间预测指示符不同于用于产生第一预测块的帧间预测指示符时,可推导用于产生第二预测块的运动信息。Also, 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 for generating the second prediction block may be derived.

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

另外,当用于产生第二预测块的参考画面索引不同于用于产生第一预测块的参考画面索引时,可推导产生第二预测块所需的运动信息。In addition, when the reference picture index used to generate the second prediction block is different from the reference picture index used to generate the first prediction block, motion information required to generate 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 predictive block is different from at least one of the motion vector and the reference picture index used to generate the first predictive block, generating the second predictive block may be derived desired exercise 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 index 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 to generate the second prediction block may be derived.

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

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

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

参照图20,为了降低计算复杂度,当当前子块的参考画面的POC等于邻近子块的参考画面的POC时,邻近子块的运动信息可被用于产生当前子块的第二预测块。Referring to FIG. 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 neighboring subblock, the motion information of the neighboring subblock may be used to generate the second prediction block of the current subblock.

另外,为了降低计算复杂度,如图20的示例中那样,当用于产生第二预测块的参考画面的POC不同于用于产生第一预测块的参考画面的POC时,可推导产生第二预测块所需的运动信息。In addition, in order to reduce 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, the generation of the second prediction block can be derived. Motion information needed to predict a 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, it can be used to generate the first prediction block based on the reference picture or the POC pair of the reference picture The motion vector for generating the second prediction block is derived by scaling the motion vector.

图21是示出当计算第一预测块和第二预测块的加权和时使用权重因子的示例的示图。FIG. 21 is a diagram illustrating an example of using a weight factor when calculating a weighted sum of a first prediction block and a 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 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 weight factor and the offset may be used in the calculation.

这里,权重因子可以是小于零的负数值或者大于零的正数值。偏移可以是零、小于零的负数值、或大于零的正数值。Here, the weighting 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 weight 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}应用于第二预测块的各个行或列。在这种情况下,相同行或相同列中的样点可被应用有相同的权重因子。Referring to FIG. 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 /8, 1/16 and 1/32} apply to each row or column of the second prediction block. In this case, 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 sub-block decreases. Additionally, weighting factors may be applied to all samples within a sub-block.

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

图22是示出当计算第一预测块和第二预测块的加权和时根据块中的位置将不同权重因子应用于样点的实施例的示图。为了提高编码效率,当第一预测块和第二预测块的加权和被计算时,权重因子可根据样点在块中的位置而变化。也就是说,可利用根据与当前子块在空间上相邻的样点的位置而不同的权重因子来计算加权和。另外,可针对在第一预测块和第二预测块中位于相同位置的样点计算加权和。FIG. 22 is a diagram illustrating an embodiment in which different weight factors are applied to samples according to positions in a block when calculating a weighted sum of a first prediction block and a 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 weight factor can be changed according to the positions of the samples in the block. That is, the weighted sum may be calculated using weight factors that differ according to positions of samples spatially adjacent to the current subblock. In addition, a weighted sum may be calculated for co-located samples 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/8,1/16,1/32,1/64,1/128,1/256,1/512和1/1024}应用于各个样点。这里,在上方第二预测块、左侧第二预测块、下方第二预测块和右侧第二预测块中的至少一个中使用的权重因子可大于在左上方第二预测块、左下方第二预测块、右下方第二预测块和右上方第二预测块中的至少一个中使用的权重因子。Referring to FIG. 22, in the first prediction block, weighting factors {1/2, 3/4, 7/8, 15/16, 31/32, 63/64, 127/128, 255/256, 511/512 and 1023/ 1024} applied to each sample point, and in the second prediction block, weighting factors {1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128 can be applied according to the position , 1/256, 1/512 and 1/1024} are applied to each sample point. 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 prediction block, and the lower left prediction block. A weighting factor used in at least one of the second prediction block, the second lower right prediction block, and the second upper right prediction block.

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

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

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

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

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

为了降低计算复杂度,权重因子可根据与当前块相邻的邻近子块或当前块内的与当前子块相邻的邻近子块的运动矢量的大小而变化。In order to reduce computational complexity, the weighting factor may vary according to the magnitude of the motion vectors of adjacent subblocks adjacent to the current block or adjacent subblocks adjacent to the current subblock within the current 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 y-component of the motion vector of the adjacent sub-block is equal to or greater than a predetermined value. The weighting factor for the block. On the contrary, when the sum of the absolute values of the x component and the y component of the motion vector of the neighboring subblock is less than the predetermined value, {7/8, 15/16, 31/32, 63/64} can 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 the computational complexity, the weight factor may vary 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} can be used as the left adjacent subblock and the right Weighting factor for side adjacent subblocks. On the contrary, 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} can be used as the left adjacent subblock and the right Weighting factor for neighboring 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} can be used as the upper and lower adjacent subblocks Weight factor for subblocks. On the contrary, when the absolute value of the y component of the motion vector of the current subblock is smaller than the predetermined value, {7/8, 15/16, 31/32, 63/64} can be used as the upper and lower adjacent subblocks The weighting 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, {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 y-component of the motion vector of the current sub-block is equal to or greater than a predetermined value. The weighting factor for the block. On the contrary, 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} can 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可以相等或者可以不相等。In addition, when the size of the current block is smaller than N×M, a weighted sum may be calculated for samples in K rows/columns adjacent to each block boundary. Also, when a current block is divided into sub-blocks and motion compensation is performed on a sub-block basis, 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. Also, N and M may be positive integers. For example, N and M may 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 K rows/columns adjacent to each block boundary according to the color component type 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 one 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 space-temporal motion vector prediction candidates, only K rows/columns adjacent to each block boundary can be Calculate the weighted sum of the samples in .

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

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

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

另外,为了降低计算复杂度,可根据用于产生第二预测块的运动信息的条数,针对与每个块边界相邻的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 may 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可以是零或正整数。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 inter prediction indicator of the current block. K can be zero or a positive integer.

例如,当帧间预测指示符指示单向预测时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。此外,当帧间预测指示符指示双向预测时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。For example, when the inter prediction indicator indicates unidirectional prediction, a weighted sum may be calculated for samples in two rows/columns adjacent to each block boundary. Furthermore, when the inter-prediction indicator indicates bi-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 may 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. On the contrary, 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 The weighted sum is calculated for the sample points in the adjacent K rows/columns. Here, K may be zero or a positive integer.

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

例如,当运动矢量的x分量和y分量的绝对值之和等于或大于预定值时,可针对与每个块边界相邻的两个行/列中的样点计算加权和。相反,当运动矢量的x分量和y分量的绝对值之和小于该预定值时,可针对与每个块边界相邻的一个行/列中的样点计算加权和。在这种情况下,该预定值可以是零或正整数。For example, when the sum of the absolute values of the x-component and y-component 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 y-component of the motion vector is smaller than the predetermined value, a weighted sum may be calculated for 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,可按照与当前子块相邻的上方块、左侧块和右侧块的顺序从邻近子块推导运动信息;可按照该顺序使用推导出的运动信息来产生第二预测块;可计算第一预测块和第二预测块的加权和。当加权和按照预定顺序被计算时,可按照上述顺序累计加权和,并因此可推导当前块的最终预测块。Referring to FIG. 23 , motion information may be derived from adjacent subblocks in the order of the upper block, left block, and 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 a final prediction block of the current block may be derived.

如图23的示例中那样,计算第一预测块与使用上方块的运动信息所产生的第二预测块的加权和,使得可产生第一加权和结果块。然后,可计算第一加权和结果块与使用左侧块的运动信息所产生的第二预测块的加权和,使得可产生第二加权和结果块。然后,可计算第二加权和结果块与使用下方块的运动信息所产生的第二预测块的加权和,使得可产生第三加权和结果块。最后,可计算第三加权和结果块与使用右侧块的运动信息所产生的第二预测块的加权和,使得可产生最终预测块。As in the example of FIG. 23 , a weighted sum of a first predicted block and a second predicted block generated using motion information of an upper block is calculated so that a first weighted sum resultant block may be generated. Then, a weighted sum of the first weighted-sum result block and a second prediction block generated using the motion information of the left block may be calculated so that the 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 predicted block generated using the motion information of the right block may be calculated so that a final predicted 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 the second prediction block for 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 sequentially and cumulatively calculated, but the first prediction block can be calculated regardless of the order in which the second prediction block is generated using the upper block, left block , the 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 block, the left block, the lower block, and the right block may be equal to each other. Optionally, 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 generating the final prediction block, the second prediction block may be calculated using equal weighting factors for all second prediction blocks. A weighted sum of a prediction block and each second prediction block.

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

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

当当前块的尺寸大于K个样点时或者当当前块将以特定帧间预测模式(例如,合并模式或高级运动矢量预测模式)被预测时,可不对确定是否对当前块执行重叠块运动补偿的信息进行熵编码/熵解码,但是重叠块运动补偿可被实质执行。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 (e.g., merge mode or advanced motion vector prediction mode), it is optional to determine whether to perform overlapping block motion compensation on the current block Entropy encoding/entropy decoding of the information is performed, 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), in which Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST) are applied to the vertical/ Horizontal transformation. That is, enhanced multiple transform may be applied only to a current block on which motion compensation of overlapping blocks is performed.

图25是示出根据本发明的另一个实施例的图像解码方法的流程图。FIG. 25 is a flowchart illustrating an image decoding method according to another 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, at least one second prediction block of the current subblock may be generated using motion information of at least one neighboring subblock of the current subblock (step S2520). The adjacent sub-blocks may include adjacent sub-blocks of the sub-blocks of the co-located block temporally corresponding to the current block.

当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,可使用同位块的子块的至少一个邻近子块的运动信息来产生至少一个第二预测块。When the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, motion information of at least one adjacent sub-block of the sub-block of the co-located block may be used to generate at least one the second prediction block.

当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,可使用在当前块的合并列表和运动矢量列表中的至少一个列表中包括的运动信息来产生第二预测块。When the current subblock is neither included in the left boundary area nor in the upper boundary area of the current block, the current subblock included in at least one of the merge list and the motion vector list may be used motion information to generate a second prediction block.

仅当当前子块被包括在当前块的左边界区域和上边界区域中的至少一个中时,才可使用当前子块的至少一个邻近子块的运动信息来产生至少一个第二预测块。Only when the current subblock is included in at least one of the left boundary area and the upper boundary area of the current block, at least one second prediction block may be generated using motion information of at least one neighboring subblock of the current subblock.

当当前子块被包括在当前块的左邻近区域中时,可使用当前子块的左侧邻近子块、左上方邻近子块和左下方邻近子块中的至少一个的运动信息来产生至少一个第二预测块。当当前子块被包括在当前块的上边界区域中时,可使用当前子块的上方邻近子块、左上方邻近子块和右上方邻近子块中的至少一个的运动信息来产生至少一个第二预测块。When the current subblock is included in the left neighboring region of the current block, at least one the second prediction block. When the current sub-block is included in the upper boundary region of the current block, at least one first adjacent sub-block may be generated using motion information of at least one of an upper adjacent sub-block, an upper-left adjacent sub-block, and an upper-right adjacent sub-block of the current sub-block. Two prediction blocks.

此外,当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,可使用当前子块的上方邻近子块、左侧邻近子块、下方邻近子块、右侧邻近子块、左上方邻近子块、左下方邻近子块、右上方邻近子块和右下方邻近子块中的至少一个的运动信息来产生至少一个第二预测块。In addition, when the current subblock is neither included in the left boundary area nor in the upper boundary area of the current block, the upper adjacent subblock, the left adjacent subblock, the lower adjacent subblock of the current subblock may be used. The motion information of at least one of the adjacent sub-block, the right adjacent sub-block, the upper-left adjacent sub-block, the lower-left adjacent sub-block, the upper-right adjacent sub-block, and the lower-right adjacent sub-block is used to generate at least one second prediction block.

可按照预定顺序推导当前子块的邻近子块的运动信息,并且可使用推导出的至少一个运动信息来产生至少一个第二预测块。Motion information of neighboring subblocks of the current subblock may be derived in a predetermined order, and at least one second prediction block may be generated using the derived at least one piece of motion information.

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

在这种情况下,可通过根据被用于产生第二预测块的邻近子块的位置将不同的权重因子应用于第一预测块中的样点和第二预测块中的样点来计算所述加权和。In this case, the calculated weight factor can be calculated by applying different weighting factors to the samples in the first prediction block and the samples in the second prediction block according to the position of the neighboring sub-blocks used to generate the second prediction block. The above weighted sum.

在产生最终预测块的步骤S2530,当针对当前子块产生了多个第二预测块时,可整个地通过当前块的第一预测块和当前子块的所有第二预测块的加权和来产生当前块的最终预测块。In the step S2530 of generating the final prediction block, when multiple second prediction blocks are generated for the current sub-block, it can be generated entirely by the weighted sum of the first prediction block of the current block and all second prediction blocks of the current sub-block The final predicted block of the current block.

图25的图像解码方法的每个步骤可基本上与根据本发明的图像编码方法的每个步骤相同。Each step of the image decoding method of FIG. 25 may be substantially the same as each step of the image encoding method according to the present invention.

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

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

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

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

本发明的以上实施例被应用到的块形状可具有正方形形状或非正方形形状。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 a size of at least one of a coding block, a prediction block, a transformation block, a block, a current block, a coding unit, a prediction unit, a transformation 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 can be applied to the first size, and the second embodiment can be applied to the second size. In other words, the above embodiments may be applied in combination according to size. In addition, the above embodiments are applicable when the size is equal to or larger than the minimum size and equal to or smaller than the maximum size. In other words, the above embodiments are applicable when the block size is included within a certain range.

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

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

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

可定义被应用本发明的以上实施例的条带类型,并且可根据相应条带类型应用以上实施例。A stripe type 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 type.

在上述实施例中,基于具有一系列步骤或单元的流程图描述了所述方法,但本发明不限于所述步骤的顺序,而是,一些步骤可与其它步骤被同时执行,或者可与其它步骤按照不同顺序被执行。此外,本领域普通技术人员应该理解,流程图中的步骤不彼此相斥,并且在不影响本发明的范围的情况下,其它步骤可被添加到流程图中,或者一些步骤可从流程图被删除。In the above-mentioned embodiments, the method has been 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 some steps may be performed simultaneously with other steps, or may be combined with other steps. The steps are performed in a different order. Furthermore, those of ordinary skill in the art should understand that the steps in the flowchart are not mutually exclusive, and that other steps may be added to the flowchart, or some steps may be copied from the flowchart, 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, which may be executed by various computer components and recorded on a computer-readable recording medium. A computer-readable recording medium may include program instructions, data files, data structures, etc. alone, or a combination 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); and Hardware devices (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 codes formed by a compiler but also high-level language codes 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 for processing according to 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 help understand the present invention more generally and the present invention is not limited to the above-described embodiments. Those skilled in the art to which the 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 will fall within the scope and spirit of the present invention.

工业可用性industrial availability

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

Claims (20)

1.一种用于对图像进行解码的方法,所述方法包括:1. 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; 使用当前块的当前子块的至少一个邻近子块的运动信息来产生当前块的当前子块的至少一个第二预测块;以及generating at least one second prediction block of the current subblock of the current block using motion information of at least one neighboring subblock of the current subblock of the current block; and 基于当前块的第一预测块与当前子块的所述至少一个第二预测块的加权和来产生最终预测块;generating a final prediction block 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; 其中,第一预测块是使用用于当前块的合并候选列表中的第一合并候选来产生的,wherein the first predicted block is generated using the first merging candidate in the merging candidate list for the current block, 所述至少一个第二预测块是使用用于当前块的所述合并候选列表中的第二合并候选来产生的,并且said at least one second predicted block is generated using a second merge candidate in said merge candidate list for the current block, and 第一合并候选和第二合并候选彼此不同。The first merge candidate and the second merge candidate are different from each other. 2.根据权利要求1所述的方法,其中,所述至少一个邻近子块包括与当前块在时间上相应的同位块的子块的邻近子块。2. The method of claim 1, wherein the at least one neighboring sub-block comprises a neighboring sub-block of a sub-block of a co-located block corresponding in time to the current block. 3.根据权利要求2所述的方法,其中,产生至少一个第二预测块的步骤包括:3. The method according to claim 2, wherein the step of generating at least one second prediction block comprises: 当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用所述同位块的所述子块的至少一个邻近子块的运动信息来产生所述至少一个第二预测块。When the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the motion information of at least one adjacent sub-block of the sub-block of the co-located block to The at least one second prediction block is generated. 4.根据权利要求1所述的方法,其中,产生至少一个第二预测块的步骤包括:4. The method according to claim 1, wherein the step of generating at least one second prediction block comprises: 当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用在当前块的所述合并候选列表和运动矢量列表中的至少一个列表中所包括的运动信息来产生所述至少一个第二预测块。used in at least one of the merge candidate list and the motion vector list of the current block when the current subblock is neither included in the left border area nor in the upper border area of the current block The included motion information is used to generate the at least one second prediction block. 5.根据权利要求1所述的方法,其中,产生至少一个第二预测块的步骤包括:5. The method according to 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 subblock only when the current subblock is included in at least one of a left boundary region and an upper boundary region of the current block. 6.根据权利要求1所述的方法,其中,产生至少一个第二预测块的步骤包括:6. The method according to claim 1, wherein the step of generating at least one second prediction block comprises: 当当前子块被包括在当前块的左边界区域中时,使用当前子块的邻近子块之中的左侧邻近子块、左上方邻近子块和左下方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块;以及When the current subblock is included in the left boundary area of the current block, using the motion of at least one of the left adjacent subblock, the upper left adjacent subblock, and the lower left adjacent subblock among the adjacent subblocks of the current subblock information to generate the at least one second prediction block; and 当当前子块被包括在当前块的上边界区域中时,使用当前子块的邻近子块之中的上方邻近子块、左上方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。When the current subblock is included in the upper boundary area of the current block, motion information of at least one of an upper adjacent subblock, an upper left adjacent subblock, and an upper right adjacent subblock among adjacent subblocks of the current subblock is used to generate the at least one second prediction block. 7.根据权利要求1所述的方法,其中,产生至少一个第二预测块的步骤包括:7. The method according to claim 1, wherein the step of generating at least one second prediction block comprises: 当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用当前子块的上方邻近子块、左侧邻近子块、下方邻近子块、右侧邻近子块、左上方邻近子块、左下方邻近子块、右下方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。When the current subblock is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, the upper adjacent subblock, the left adjacent subblock, and the lower adjacent subblock of the current subblock are used , the right adjacent sub-block, the upper left adjacent sub-block, the lower left adjacent sub-block, the lower right adjacent sub-block and the upper right adjacent sub-block to generate the at least one second prediction block. 8.根据权利要求1所述的方法,其中,产生至少一个第二预测块的步骤包括:8. The method according to claim 1, wherein the step of generating at least one second prediction block comprises: 按照所述邻近子块的预定顺序推导当前子块的至少一个邻近子块的运动信息;以及deriving motion information of at least one neighboring sub-block of the current sub-block in a predetermined order of the neighboring sub-blocks; and 使用至少一条推导出的运动信息来产生所述至少一个第二预测块。The at least one second prediction block is generated using at least one piece of derived motion information. 9.根据权利要求1所述的方法,其中,产生最终预测块的步骤包括:9. The method of claim 1, wherein the step of generating the final prediction block comprises: 在根据被用于产生所述至少一个第二预测块的邻近子块的位置将不同的权重因子应用于第一预测块和所述至少一个第二预测块内的样点的情况下获得第一预测块和所述至少一个第二预测块的加权和,The first is obtained when different weighting factors are applied to samples within the first predictive block and the at least one second predictive block according to the positions of neighboring sub-blocks used to generate the at least one second predictive block. a weighted sum of the prediction block and the at least one second prediction block, 其中,所述加权和仅被应用于当前块的部分区域。Wherein, the weighted sum is only applied to a partial area of the current block. 10.根据权利要求1所述的方法,其中,在产生最终预测块的步骤中,当当前子块的所述至少一个第二预测块的数量是2或更多时,通过整体地计算当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块。10. The method according to claim 1, wherein, in the step of generating the final prediction block, when the number of the at least one second prediction block of the current sub-block is 2 or more, by calculating the current block as a whole A weighted sum of the first prediction block of the current sub-block and the at least one second prediction block of the current sub-block to generate a final prediction block. 11.一种用于对图像进行编码的方法,所述方法包括:11. 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; 使用当前块的当前子块的至少一个邻近子块的运动信息来产生当前块的当前子块的至少一个第二预测块;以及generating at least one second prediction block of the current subblock of the current block using motion information of at least one neighboring subblock of the current subblock of the current block; and 基于当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块,generating a final prediction block 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, 其中,从多个权重对之中针对所述加权和选择一个权重对,wherein a weight pair is selected for said weighted sum from among a plurality of weight pairs, 选择的权重对中的第一权重被应用于第一预测块的每个样点,并且the first weight of the selected pair of weights is applied to each sample of the first prediction block, and 选择的权重对中的第二权重被应用于第二预测块的每个样点。The second weight of the selected pair of weights is applied to each sample of the second prediction block. 12.根据权利要求11所述的方法,其中,所述至少一个邻近子块包括与当前块在时间上相应的同位块的子块的邻近子块。12. The method of claim 11, wherein the at least one neighboring sub-block comprises a neighboring sub-block of a sub-block of a co-located block corresponding in time to the current block. 13.根据权利要求12所述的方法,其中,产生至少一个第二预测块的步骤包括:13. The method according to claim 12, wherein the step of generating at least one second prediction block comprises: 当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用所述同位块的所述子块的至少一个邻近子块的运动信息来产生所述至少一个第二预测块。When the current sub-block is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, using the motion information of at least one adjacent sub-block of the sub-block of the co-located block to The at least one second prediction block is generated. 14.根据权利要求11所述的方法,其中,产生至少一个第二预测块的步骤包括:14. The method according to claim 11, wherein the step of generating at least one second prediction block comprises: 当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用在当前块的合并列表和运动矢量列表中的至少一个列表中所包括的运动信息来产生所述至少一个第二预测块。When the current sub-block is neither included in the left boundary area nor in the upper boundary area of the current block, use the one included in at least one of the merge list and the motion vector list of the current block motion information to generate the at least one second prediction block. 15.根据权利要求11所述的方法,其中,产生至少一个第二预测块的步骤包括:15. The method according to claim 11, 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 subblock only when the current subblock is included in at least one of a left boundary region and an upper boundary region of the current block. 16.根据权利要求11所述的方法,其中,产生至少一个第二预测块的步骤包括:16. The method according to claim 11, wherein the step of generating at least one second prediction block comprises: 当当前子块被包括在当前块的左边界区域中时,使用当前子块的邻近子块之中的左侧邻近子块、左上方邻近子块和左下方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块;以及When the current subblock is included in the left boundary area of the current block, using the motion of at least one of the left adjacent subblock, the upper left adjacent subblock, and the lower left adjacent subblock among the adjacent subblocks of the current subblock information to generate the at least one second prediction block; and 当当前子块被包括在当前块的上边界区域中时,使用当前子块的邻近子块之中的上方邻近子块、左上方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。When the current subblock is included in the upper boundary area of the current block, motion information of at least one of an upper adjacent subblock, an upper left adjacent subblock, and an upper right adjacent subblock among adjacent subblocks of the current subblock is used to generate the at least one second prediction block. 17.根据权利要求11所述的方法,其中,产生至少一个第二预测块的步骤包括:17. The method according to claim 11, wherein the step of generating at least one second prediction block comprises: 当当前子块既没有被包括在当前块的左边界区域中也没有被包括在当前块的上边界区域中时,使用当前子块的上方邻近子块、左侧邻近子块、下方邻近子块、右侧邻近子块、左上方邻近子块、左下方邻近子块、右下方邻近子块和右上方邻近子块中的至少一个的运动信息来产生所述至少一个第二预测块。When the current subblock is neither included in the left boundary area of the current block nor in the upper boundary area of the current block, the upper adjacent subblock, the left adjacent subblock, and the lower adjacent subblock of the current subblock are used , the right adjacent sub-block, the upper left adjacent sub-block, the lower left adjacent sub-block, the lower right adjacent sub-block and the upper right adjacent sub-block to generate the at least one second prediction block. 18.根据权利要求11所述的方法,其中,产生最终预测块的步骤包括:18. The method of claim 11 , wherein the step of generating the final prediction block comprises: 在根据被用于产生所述至少一个第二预测块的邻近子块的位置将不同的权重因子应用于第一预测块和所述至少一个第二预测块内的样点的情况下获得第一预测块和所述至少一个第二预测块的加权和。The first is obtained when different weighting factors are applied to samples within the first predictive block and the at least one second predictive block according to the positions of neighboring sub-blocks used to generate the at least one second predictive block. A weighted sum of the prediction block and the at least one second prediction block. 19.根据权利要求11所述的方法,其中,在产生最终预测块的步骤中,当当前子块的所述至少一个第二预测块的数量是2或更多时,通过整体地计算当前块的第一预测块和当前子块的所述至少一个第二预测块的加权和来产生最终预测块。19. The method according to claim 11, wherein, in the step of generating the final prediction block, when the number of the at least one second prediction block of the current sub-block is 2 or more, by calculating the current block as a whole A weighted sum of the first prediction block of the current sub-block and the at least one second prediction block of the current sub-block to generate a final prediction block. 20.一种存储包括计算机可执行代码的比特流的可读记录介质,所述计算机可执行代码在被视频解码设备的处理器执行时,促使所述处理器执行以下步骤:20. A readable recording medium storing a bitstream comprising computer executable code which, when executed by a processor of a video decoding device, causes the processor to perform the following steps: 使用当前块的运动信息产生当前块的第一预测块;generating a first prediction block of the current block using motion information of the current block; 使用当前块的当前子块的至少一个邻近子块的运动信息来产生当前块的当前子块的至少一个第二预测块;以及generating at least one second prediction block of the current subblock of the current block using motion information of at least one neighboring subblock of the current subblock of the current block; and 基于当前块的第一预测块与当前子块的所述至少一个第二预测块的加权和来产生最终预测块,generating a final prediction block 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, 其中,所述计算机可执行代码中的第一合并索引指示用于当前块的合并候选列表中的第一合并候选,Wherein, the first merge index in the computer-executable code indicates the first merge candidate in the merge candidate list for the current block, 第一预测块是使用用于当前块的所述合并候选列表中的第一合并候选来产生的,the first predicted block is generated using a first merging candidate in said merging candidate list for the current block, 所述计算机可执行代码中的第二合并索引指示用于当前块的所述合并候选列表中的第二合并候选,a second merge index in the computer-executable code indicates a second merge candidate in the list of merge candidates for the current block, 所述至少一个第二预测块是使用用于当前块的所述合并候选列表中的第二合并候选来产生的,并且said at least one second predicted block is generated using a second merge candidate in said merge candidate list for the current block, and 第一合并候选和第二合并候选彼此不同。The first merge candidate and the second merge candidate are different from each other.
CN201780073915.7A 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream Active CN110024402B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202310971657.1A CN116781894A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310974535.8A CN116896631A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310973482.8A CN116896630A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream
CN202310977570.5A CN116915980A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310977671.2A CN116915981A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20160159903 2016-11-29
KR10-2016-0159903 2016-11-29
PCT/KR2017/013678 WO2018101700A1 (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device, and recording medium having stored bitstream therein

Related Child Applications (5)

Application Number Title Priority Date Filing Date
CN202310977671.2A Division CN116915981A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream
CN202310973482.8A Division CN116896630A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream
CN202310971657.1A Division CN116781894A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310977570.5A Division CN116915980A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310974535.8A Division CN116896631A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream

Publications (2)

Publication Number Publication Date
CN110024402A CN110024402A (en) 2019-07-16
CN110024402B true CN110024402B (en) 2023-08-22

Family

ID=62241587

Family Applications (6)

Application Number Title Priority Date Filing Date
CN202310977570.5A Pending CN116915980A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310973482.8A Pending CN116896630A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream
CN202310974535.8A Pending CN116896631A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310971657.1A Pending CN116781894A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN201780073915.7A Active CN110024402B (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310977671.2A Pending CN116915981A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream

Family Applications Before (4)

Application Number Title Priority Date Filing Date
CN202310977570.5A Pending CN116915980A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310973482.8A Pending CN116896630A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream
CN202310974535.8A Pending CN116896631A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN202310971657.1A Pending CN116781894A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and apparatus, and recording medium storing bit stream

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202310977671.2A Pending CN116915981A (en) 2016-11-29 2017-11-28 Image encoding/decoding method and device and recording medium storing bit stream

Country Status (3)

Country Link
KR (5) KR20180061042A (en)
CN (6) CN116915980A (en)
WO (1) WO2018101700A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI822838B (en) * 2018-08-24 2023-11-21 大陸商北京字節跳動網絡技術有限公司 Overlapped block motion compensation using spatial neighbors
CN110944205A (en) * 2018-09-23 2020-03-31 北京字节跳动网络技术有限公司 8-parameter affine mode
CN112422971B (en) * 2019-08-23 2022-04-26 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
JP6960969B2 (en) * 2019-09-20 2021-11-05 Kddi株式会社 Image decoding device, image decoding method and program
CN119031142A (en) * 2020-07-20 2024-11-26 浙江大华技术股份有限公司 Angle mode inter-frame prediction method, encoder and storage medium
KR20230146480A (en) * 2022-04-12 2023-10-19 한국전자통신연구원 Method, apparatus and recording medium for encoding/decoding image
KR20230147901A (en) * 2022-04-15 2023-10-24 삼성전자주식회사 Video encoding/decoding method and apparatus
CN115049674B (en) * 2022-08-17 2022-12-13 南通万格环境科技有限公司 Industrial sewage treatment method and system based on big data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008084817A1 (en) * 2007-01-09 2008-07-17 Kabushiki Kaisha Toshiba Image encoding and decoding method and device
CN101491107A (en) * 2006-07-07 2009-07-22 艾利森电话股份有限公司 Video data management
CN101766030A (en) * 2007-07-31 2010-06-30 三星电子株式会社 Use video coding and the coding/decoding method and the equipment of weight estimation
CN102484699A (en) * 2009-06-23 2012-05-30 法国电信 Method for encoding and decoding images, corresponding apparatus for encoding and decoding, and computer program
KR20130059288A (en) * 2011-11-28 2013-06-05 에스케이텔레콤 주식회사 Video coding method and apparatus using improved merge
KR20140077825A (en) * 2012-11-27 2014-06-24 경희대학교 산학협력단 Method and apparatus for encoding and decoding based on merge
CN104137549A (en) * 2012-01-18 2014-11-05 韩国电子通信研究院 Method and device for encoding and decoding image
CN106063271A (en) * 2013-12-26 2016-10-26 三星电子株式会社 Inter-layer video decoding method for performing subblock-based prediction and apparatus therefor, and inter-layer video encoding method for performing subblock-based prediction and apparatus therefor

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101043758B1 (en) * 2009-03-24 2011-06-22 중앙대학교 산학협력단 An image encoding apparatus and method, an image decoding apparatus, and a recording medium having recorded thereon a program for executing the method on a computer
KR20110135471A (en) * 2010-06-11 2011-12-19 (주)휴맥스 Apparatus and method for image coding / decoding using block merging
US20120300850A1 (en) * 2010-02-02 2012-11-29 Alex Chungku Yie Image encoding/decoding apparatus and method
KR101791242B1 (en) * 2010-04-16 2017-10-30 에스케이텔레콤 주식회사 Video Coding and Decoding Method and Apparatus
EP4525447A2 (en) * 2010-05-25 2025-03-19 LG Electronics, Inc. New planar prediction mode
KR101263090B1 (en) * 2010-11-08 2013-05-09 성균관대학교산학협력단 Methods of encoding and decoding using multi-level prediction and apparatuses for using the same
US9462272B2 (en) * 2010-12-13 2016-10-04 Electronics And Telecommunications Research Institute Intra prediction method and apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101491107A (en) * 2006-07-07 2009-07-22 艾利森电话股份有限公司 Video data management
WO2008084817A1 (en) * 2007-01-09 2008-07-17 Kabushiki Kaisha Toshiba Image encoding and decoding method and device
CN101766030A (en) * 2007-07-31 2010-06-30 三星电子株式会社 Use video coding and the coding/decoding method and the equipment of weight estimation
CN102484699A (en) * 2009-06-23 2012-05-30 法国电信 Method for encoding and decoding images, corresponding apparatus for encoding and decoding, and computer program
KR20130059288A (en) * 2011-11-28 2013-06-05 에스케이텔레콤 주식회사 Video coding method and apparatus using improved merge
CN104137549A (en) * 2012-01-18 2014-11-05 韩国电子通信研究院 Method and device for encoding and decoding image
KR20140077825A (en) * 2012-11-27 2014-06-24 경희대학교 산학협력단 Method and apparatus for encoding and decoding based on merge
CN106063271A (en) * 2013-12-26 2016-10-26 三星电子株式会社 Inter-layer video decoding method for performing subblock-based prediction and apparatus therefor, and inter-layer video encoding method for performing subblock-based prediction and apparatus therefor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Weighted prediction for intra block copy;Vadim Seregin等;《Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 22nd Meeting: Geneva, CH, 15–21 Oct. 2015;JCTVC-V0044》;第1-5页 *

Also Published As

Publication number Publication date
KR20240005637A (en) 2024-01-12
KR20180061042A (en) 2018-06-07
KR20220050871A (en) 2022-04-25
CN116896630A (en) 2023-10-17
KR102619133B1 (en) 2023-12-29
CN116915981A (en) 2023-10-20
KR102390452B1 (en) 2022-04-22
KR20210082421A (en) 2021-07-05
CN116915980A (en) 2023-10-20
CN116781894A (en) 2023-09-19
WO2018101700A1 (en) 2018-06-07
KR102511581B1 (en) 2023-03-21
KR20230038691A (en) 2023-03-21
CN116896631A (en) 2023-10-17
CN110024402A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110024394B (en) Method and device for encoding/decoding image and recording medium for 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
CN110024402B (en) Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN112740697A (en) Image encoding/decoding method and apparatus and recording medium storing bit stream
CN113875235B (en) Image encoding/decoding method and device and recording medium storing bit stream
CN114731409A (en) Image encoding/decoding method and apparatus, and recording medium storing bit stream
CN113196758B (en) Image encoding/decoding method and device and recording medium storing bit stream
CN113228681B (en) Image encoding/decoding method and device and recording medium storing bit stream
CN118158438A (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