[go: up one dir, main page]

CN118803252A - Image encoding method, image decoding method, image processing device, and storage medium - Google Patents

Image encoding method, image decoding method, image processing device, and storage medium Download PDF

Info

Publication number
CN118803252A
CN118803252A CN202310420115.5A CN202310420115A CN118803252A CN 118803252 A CN118803252 A CN 118803252A CN 202310420115 A CN202310420115 A CN 202310420115A CN 118803252 A CN118803252 A CN 118803252A
Authority
CN
China
Prior art keywords
block
template
target
fusion
matching reference
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.)
Pending
Application number
CN202310420115.5A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202310420115.5A priority Critical patent/CN118803252A/en
Priority to PCT/CN2023/119773 priority patent/WO2024212443A1/en
Publication of CN118803252A publication Critical patent/CN118803252A/en
Pending legal-status Critical Current

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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/192Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Landscapes

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

Abstract

The embodiment of the application provides an image coding method, which comprises the following steps: acquiring a to-be-predicted coding block and a predicted coding block in an image frame, wherein a region corresponding to the predicted coding block is a reconstructed region; determining a plurality of target templates corresponding to the coding blocks to be predicted; determining a matched reference block corresponding to each target template in the reconstructed region, and fusing at least one matched reference block to obtain a predicted value corresponding to the to-be-predicted coding block; obtaining a residual value according to the original value of the coding block to be predicted and the predicted value; and coding the residual error value and writing coding bits into a code stream, so that the accuracy of an intra-frame prediction result can be improved.

Description

图像编码方法、图像解码方法、图像处理装置、存储介质Image encoding method, image decoding method, image processing device, and storage medium

技术领域Technical Field

本申请实施例涉及图像处理领域,特别涉及一种图像编码方法、图像解码方法、图像处理装置、计算机可读存储介质及计算机程序产品。The embodiments of the present application relate to the field of image processing, and in particular to an image encoding method, an image decoding method, an image processing device, a computer-readable storage medium, and a computer program product.

背景技术Background Art

伴随着视频质量的不断提升以及视频应用场景的不断扩展,视频传输与视频储存的数据量也极大增加,而为了提高视频的传输与存储效率,提出了视频编码技术,即通过各种编码工具尽可能去除原始视频中的空间冗余信息和时间冗余信息,在保证视频质量的同时,有效降低视频的数据量。With the continuous improvement of video quality and the continuous expansion of video application scenarios, the amount of data for video transmission and video storage has also greatly increased. In order to improve the efficiency of video transmission and storage, video coding technology has been proposed. That is, various coding tools are used to remove spatial redundant information and temporal redundant information in the original video as much as possible, thereby effectively reducing the amount of video data while ensuring video quality.

相关技术中,利用帧内预测技术去除视频图像的空间相关性,也就是利用帧内已编码的相邻重构块像素信息预测当前待预测编码块像素值。其中,帧内模板匹配预测(IntraTMP,Intra Template Matching Prediction)技术是利用预设模板在设定的搜索区域内进行模板匹配,即通过搜索与预设模板相似的匹配模板,并将匹配模板的对应块作为当前待预测编码块的预测值。然而,在实际应用中,可能搜索不到最佳匹配参考块或搜索到多个最佳匹配参考块,也可能搜索到的匹配参考块未必是最佳匹配参考块,这就导致帧内预测结果不够准确。因此,如何提高帧内预测结果的准确性,是当下亟待解决的问题。In the related art, intra-frame prediction technology is used to remove the spatial correlation of video images, that is, to use the pixel information of adjacent reconstructed blocks encoded in the frame to predict the pixel value of the current coding block to be predicted. Among them, the intra-frame template matching prediction (IntraTMP, Intra Template Matching Prediction) technology uses a preset template to perform template matching in a set search area, that is, by searching for a matching template similar to the preset template, and using the corresponding block of the matching template as the prediction value of the current coding block to be predicted. However, in actual applications, the best matching reference block may not be found or multiple best matching reference blocks may be found, and the matching reference block found may not be the best matching reference block, which leads to inaccurate intra-frame prediction results. Therefore, how to improve the accuracy of intra-frame prediction results is a problem that needs to be solved urgently.

发明内容Summary of the invention

本申请实施例提供一种图像编码方法、图像解码方法、图像处理装置、计算机可读存储介质及计算机程序产品,旨在提高帧内预测结果的准确性以及帧内预测的效率。The embodiments of the present application provide an image encoding method, an image decoding method, an image processing device, a computer-readable storage medium and a computer program product, which are intended to improve the accuracy of intra-frame prediction results and the efficiency of intra-frame prediction.

第一方面,本申请实施例提供了一种图像编码方法,包括:获取图像帧中的待预测编码块与已预测编码块,其中,所述已预测编码块对应的区域为已重建区域;确定所述待预测编码块对应的多个目标模板;在所述已重建区域中确定每个所述目标模板对应的匹配参考块,并对至少一个所述匹配参考块进行融合,得到所述待预测编码块对应的预测值;根据所述待预测编码块的原始值与所述预测值,得到残差值;对所述残差值进行编码,并将编码比特写入码流。In a first aspect, an embodiment of the present application provides an image coding method, comprising: obtaining a to-be-predicted coding block and a predicted coding block in an image frame, wherein an area corresponding to the predicted coding block is a reconstructed area; determining multiple target templates corresponding to the to-be-predicted coding block; determining a matching reference block corresponding to each of the target templates in the reconstructed area, and fusing at least one of the matching reference blocks to obtain a prediction value corresponding to the to-be-predicted coding block; obtaining a residual value based on the original value of the to-be-predicted coding block and the predicted value; encoding the residual value, and writing the coded bits into a bitstream.

第二方面,本申请实施例提供了一种图像解码方法,包括:解析码流,得到待预测解码块对应的残差值;根据多个目标模板,在已重建区域中确定每个所述目标模板对应的匹配参考块,并对至少一个所述匹配参考块进行融合,得到所述待预测解码块对应的预测值;其中,已预测解码块对应的区域为已重建区域;根据所述待预测解码块的预测值与所述残差值,得到所述待预测解码块对应的解码值;根据所述解码值获得所述待预测解码块的解码恢复值。In a second aspect, an embodiment of the present application provides an image decoding method, comprising: parsing a bit stream to obtain a residual value corresponding to a to-be-predicted decoding block; determining, in a reconstructed area, a matching reference block corresponding to each of the target templates according to a plurality of target templates, and fusing at least one of the matching reference blocks to obtain a prediction value corresponding to the to-be-predicted decoding block; wherein the area corresponding to the predicted decoding block is a reconstructed area; obtaining, according to the prediction value of the to-be-predicted decoding block and the residual value, a decoding value corresponding to the to-be-predicted decoding block; and obtaining a decoding recovery value of the to-be-predicted decoding block according to the decoding value.

第三方面,本申请实施例提供了一种图像处理装置,包括:至少一个处理器;至少一个存储器,用于存储至少一个程序;当至少一个所述程序被至少一个所述处理器执行时实现如第一方面所述的图像编码方法,或,如第二方面所述的图像解码方法。In a third aspect, an embodiment of the present application provides an image processing device, comprising: at least one processor; at least one memory for storing at least one program; when at least one of the programs is executed by at least one of the processors, an image encoding method as described in the first aspect, or an image decoding method as described in the second aspect is implemented.

第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有处理器可执行的程序,所述处理器可执行的程序被处理器执行时用于实现如第一方面所述的图像编码方法,或,如第二方面所述的图像解码方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a program executable by a processor, and when the program executable by the processor is executed by the processor, it is used to implement the image encoding method as described in the first aspect, or the image decoding method as described in the second aspect.

第五方面,本申请实施例提供了一种计算机程序产品,包括计算机程序或计算机指令,其中,所述计算机程序或所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所述计算机可读存储介质读取所述计算机程序或所述计算机指令,所述处理器执行所述计算机程序或所述计算机指令,使得所述计算机设备执行如第一方面所述的图像编码方法,或,如第二方面所述的图像解码方法。In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device performs the image encoding method as described in the first aspect, or the image decoding method as described in the second aspect.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请提供的基于块的混合编码框架;FIG1 is a block-based hybrid coding framework provided by the present application;

图2为本申请提供的IntraTMP技术的原理示意图;FIG2 is a schematic diagram of the principle of the IntraTMP technology provided by the present application;

图3为本申请提供的IntraTMP技术中三种模板示意图;FIG3 is a schematic diagram of three templates in the IntraTMP technology provided in this application;

图4是本申请实施例提供的一种视频图像传输系统架构示意图;FIG4 is a schematic diagram of a video image transmission system architecture provided by an embodiment of the present application;

图5为本申请实施例提供的一种图像编码方法的流程图;FIG5 is a flowchart of an image encoding method provided by an embodiment of the present application;

图6为本申请实施例提供的确定每个目标模板对应的匹配参考块的方法的流程图;FIG6 is a flowchart of a method for determining a matching reference block corresponding to each target template provided by an embodiment of the present application;

图7为本申请实施例提供的IntraTMP BV示意图;FIG7 is a schematic diagram of the IntraTMP BV provided in an embodiment of the present application;

图8为本申请实施例提供的确定每个目标模板对应的匹配参考块的方法的流程图;FIG8 is a flowchart of a method for determining a matching reference block corresponding to each target template provided by an embodiment of the present application;

图9为本申请示例提供的编码端IntraTMP-fusion方案流程示意图;FIG9 is a schematic diagram of the IntraTMP-fusion solution flow chart of the encoding end provided in the example of this application;

图10为本申请示例提供的多模式IntraTMP-fusion方案的融合过程示意图;FIG10 is a schematic diagram of the fusion process of the multi-mode IntraTMP-fusion solution provided in the example of this application;

图11为本申请示例提供的基于位置依赖的融合方案的模板SAD;FIG11 is a template SAD of a location-dependent fusion solution provided in an example of this application;

图12为本申请实施例提供的一种图像解码方法的流程图;FIG12 is a flowchart of an image decoding method provided by an embodiment of the present application;

图13为本申请示例提供的编码端IntraTMP-fusion方案流程示意图;FIG13 is a schematic diagram of the process flow of the IntraTMP-fusion solution provided by the encoding end of the present application example;

图14为本申请示例提供的一种语法结构示意图;FIG14 is a schematic diagram of a grammatical structure provided by an example of this application;

图15为本申请示例提供的一种语法结构示意图;FIG15 is a schematic diagram of a grammatical structure provided by an example of this application;

图16为本申请示例提供的一种语法结构示意图;FIG16 is a schematic diagram of a grammatical structure provided by an example of this application;

图17为本申请实施例中提供的一种图像处理装置结构示意图。FIG. 17 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

本申请实施例中,“进一步地”、“示例性地”或者“可选地”等词用于表示作为例子、例证或说明,不应被解释为比其它实施例或设计方案更优选或更具有优势。使用“进一步地”、“示例性地”或者“可选地”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, the words "further", "exemplarily" or "optionally" are used to indicate examples, illustrations or descriptions, and should not be interpreted as being more preferred or more advantageous than other embodiments or designs. The use of the words "further", "exemplarily" or "optionally" is intended to present related concepts in a specific way.

当今世界是一个被图像、视频包围的多媒体社会,比如随处可见的广告、医疗、安防、娱乐、会议电视等领域,无一不涉及图像、视频等媒体内容。同时,随着视频质量的提升,从高清视频逐渐转向4K、8K等超高清视频,屏幕内容、全景视频等多种视频类型的增加,以及网络流媒体和实时通信的广泛应用,极大地增加了视频传输或存储的数据量,因而也对视频传输带宽提出了更高的要求。而为了提高视频的传输与存储效率,就需要降低视频的数据量,因此视频压缩技术被提出。视频压缩技术也称为视频编码技术,是一种利用各种编码工具尽可能去除原始视频中的空间冗余信息和时间冗余信息的技术,能够在保证视频质量的同时,有效降低视频的数据量,因此,视频编码技术是目前多媒体技术研究领域热门的研究方向之一。Today's world is a multimedia society surrounded by images and videos. For example, the fields of advertising, medical treatment, security, entertainment, and conference television that can be seen everywhere all involve media content such as images and videos. At the same time, with the improvement of video quality, the gradual shift from high-definition video to ultra-high-definition video such as 4K and 8K, the increase in various video types such as screen content and panoramic video, as well as the widespread application of network streaming and real-time communication, have greatly increased the amount of data transmitted or stored in the video, and thus put forward higher requirements for the video transmission bandwidth. In order to improve the transmission and storage efficiency of the video, it is necessary to reduce the amount of video data, so video compression technology is proposed. Video compression technology, also known as video coding technology, is a technology that uses various coding tools to remove spatial redundant information and temporal redundant information in the original video as much as possible. It can effectively reduce the amount of video data while ensuring the quality of the video. Therefore, video coding technology is one of the hot research directions in the field of multimedia technology research.

由国际标准化组织(ISO)及国际电工委员会(IEC)的动态图像专家组(MPEG,Moving Pictures Experts Group)和国际电信联盟电信标准化部门ITU-T的视频编码专家组(VCEG,Video Code Expert Group)的联合专家组(JVET,Joint Video Expert Teams)发布了通用视频编码标准(H.266/VVC,Versatile Video Coding),此标准可以更好地支持8K超高清、屏幕内容、高动态和360°全景视频等多种新视频类型,以及自适应带宽和分辨率的流媒体和实时通信等应用。此后联合专家组继续探索新一代视频编码标准,推出了继VVC的另一个高级标准(ECM,Enhanced Compression Model)。The Joint Video Expert Teams (JVET) of the Moving Pictures Experts Group (MPEG) of the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) and the Video Code Expert Group (VCEG) of the International Telecommunication Union Telecommunication Standardization Sector ITU-T released the Versatile Video Coding standard (H.266/VVC), which can better support a variety of new video types such as 8K ultra-high definition, screen content, high dynamic and 360° panoramic video, as well as streaming media and real-time communication applications with adaptive bandwidth and resolution. Since then, the Joint Expert Team has continued to explore the next generation of video coding standards and launched another advanced standard (ECM, Enhanced Compression Model) after VVC.

ECM标准沿用了H.266/VVC的编码框架:基于块的混合编码框架。图1为本申请提供的基于块的混合编码框架,参照图1,混合编码框架主要包括帧内预测、帧间预测、变换、量化、熵编码以及环路滤波等模块,每个模块都涵盖了多种新的编码技术,因此ECM标准需要极大的内存,但与H.266/VVC相比,进一步提高了编码增益。The ECM standard uses the coding framework of H.266/VVC: a block-based hybrid coding framework. Figure 1 shows the block-based hybrid coding framework provided by this application. Referring to Figure 1, the hybrid coding framework mainly includes modules such as intra-frame prediction, inter-frame prediction, transformation, quantization, entropy coding, and loop filtering. Each module covers a variety of new coding technologies. Therefore, the ECM standard requires a large amount of memory, but compared with H.266/VVC, it further improves the coding gain.

下面简要介绍H.266/VVC编码框架的各个模块:帧内预测模块主要去除视频图像的空间相关性,利用帧内已编码的相邻重构块像素信息预测当前待预测编码块像素值,压缩率较低;帧间预测模块主要去除视频图像的时间相关性,将帧间已编码图像作为当前帧的参考图像,以此来获取当前帧各个块的运动信息,可采用单向和双向的参考图像进行预测,一般而言压缩率高于帧内预测编码。视频图像经过帧内/帧间预测模块后得到当前待预测编码块的预测值,将原始图像块与预测块相减可得到图像块的残差数据,对残差数据进行变换可有效去除图像的频域相关性,通过从像素形式描述的时域变换到频域,使得图像能量集中在低频区域,即变换系数的相关性较小;通常变换之后的系数存在较大的动态范围,需要借助量化模块减小动态范围,实现更好地压缩;熵编码模块将帧内预测数据、运动信息、量化系数以及编码控制等数据编码成二进制流,实现存储或传输,即熵编码的输出数据就是原始视频压缩后的码流。The following is a brief introduction to the various modules of the H.266/VVC coding framework: the intra-frame prediction module mainly removes the spatial correlation of video images, and uses the pixel information of adjacent reconstructed blocks encoded within the frame to predict the pixel value of the current predicted coding block, with a low compression rate; the inter-frame prediction module mainly removes the temporal correlation of video images, and uses the inter-frame encoded image as the reference image of the current frame to obtain the motion information of each block in the current frame. One-way and two-way reference images can be used for prediction. Generally speaking, the compression rate is higher than that of intra-frame prediction coding. After the video image passes through the intra-frame/inter-frame prediction module, the prediction value of the current block to be predicted is obtained. The residual data of the image block can be obtained by subtracting the original image block from the prediction block. Transforming the residual data can effectively remove the frequency domain correlation of the image. By transforming from the time domain described in pixel form to the frequency domain, the image energy is concentrated in the low-frequency area, that is, the correlation of the transformation coefficients is small; usually the coefficients after transformation have a large dynamic range, and the quantization module is needed to reduce the dynamic range and achieve better compression; the entropy coding module encodes intra-frame prediction data, motion information, quantization coefficients, coding control and other data into a binary stream for storage or transmission, that is, the output data of the entropy coding is the compressed bitstream of the original video.

此外,在混合编码框架中为了构建解码图像缓存,供帧间预测作为参考图像,还实现了图像重建过程,主要包括反量化、反变换和环路滤波模块,具体过程是对量化后的变换系数进行反量化和反变换得到残差数据,再与预测信息相加即为重建图像数据。由于视频编码是基于块进行的,通常重建图像会出现方块效应、振铃效应等现象,需要引入环路滤波模块提高图像的主观质量和压缩效率,较少解码误差。H.266/VVC的环路滤波模块主要包含以下滤波技术:亮度映射和色度缩放(LMCS,Luma Mapping Chroma Scaling)、去方块滤波(DBF,Deblocking Filter)、样点自适应补偿(SAO,Sample Adaptive Offset)和自适应环路滤波(ALF,Adaptive Loop Filter),其中亮度映射和色度缩放是对动态范围内信息重新分配码字,可提高压缩效率;去方块滤波是对块边界进行平滑滤波,可有效降低、去除方块效应;样点自适应补偿是对不同类别的重建像素使用不同补偿值,可改善高频信息丢失带来的振铃效应,有效提高重建图像的主客观质量;自适应环路滤波是对重建图像像素进行维纳滤波,可有效减少解码误差。In addition, in the hybrid coding framework, in order to build a decoded image cache for inter-frame prediction as a reference image, an image reconstruction process is also implemented, which mainly includes inverse quantization, inverse transformation and loop filtering modules. The specific process is to inverse quantize and inverse transform the quantized transform coefficients to obtain residual data, and then add it to the prediction information to reconstruct the image data. Since video encoding is block-based, the reconstructed image usually has block effects, ringing effects and other phenomena. It is necessary to introduce a loop filtering module to improve the subjective quality and compression efficiency of the image and reduce decoding errors. The loop filter module of H.266/VVC mainly includes the following filtering technologies: Luma Mapping Chroma Scaling (LMCS), Deblocking Filter (DBF), Sample Adaptive Offset (SAO) and Adaptive Loop Filter (ALF). Luma mapping and chroma scaling are to redistribute codewords for information within the dynamic range, which can improve compression efficiency; deblocking filtering is to smooth the block boundary, which can effectively reduce and remove the block effect; sample adaptive offset uses different compensation values for different categories of reconstructed pixels, which can improve the ringing effect caused by the loss of high-frequency information and effectively improve the subjective and objective quality of the reconstructed image; adaptive loop filtering is to perform Wiener filtering on the pixels of the reconstructed image, which can effectively reduce decoding errors.

编码端整体框架流程如下:The overall framework process of the encoding end is as follows:

输入的视频帧(图像)进行块划分:先将帧划分成多个编码树单元(CTUs,CodingTree Units),每个CTU可按四叉树划分成4个相同大小的编码单元(CUs,Coding Units),也可按多类型树(MTT,Multiple Type Trees),即二叉树或三叉树结构递归划分成不同尺寸的CUs。CTU包含所有颜色通道,即一个CTU由一个亮度CTB(Coding Tree Block)和两个色度CTB构成;CU是视频编码的基本单位,亮度CU的最大尺寸是128*128,最小尺寸是4*4,色度CU的最大尺寸是64*64,最小尺寸是2*2;最终划分成编码单元CU的尺寸大小与视频图像内容有关。The input video frame (image) is divided into blocks: the frame is first divided into multiple coding tree units (CTUs, Coding Tree Units), each CTU can be divided into 4 coding units (CUs, Coding Units) of the same size according to the quadtree, or can be recursively divided into CUs of different sizes according to the multi-type tree (MTT, Multiple Type Trees), that is, a binary tree or ternary tree structure. CTU contains all color channels, that is, a CTU consists of a luminance CTB (Coding Tree Block) and two chrominance CTBs; CU is the basic unit of video coding, the maximum size of the luminance CU is 128*128, the minimum size is 4*4, the maximum size of the chrominance CU is 64*64, and the minimum size is 2*2; the size of the coding unit CU finally divided is related to the content of the video image.

通过帧内/帧间预测模式决策确定编码块进行帧内预测编码还是帧间预测编码,其中帧内预测编码主要目的是去除图像的空间相关性;帧间预测编码主要目的是去除图像的时间相关性。The intra/inter prediction mode decision determines whether the coding block is to be intra-frame prediction coded or inter-frame prediction coded. The main purpose of intra-frame prediction coding is to remove the spatial correlation of the image; the main purpose of inter-frame prediction coding is to remove the temporal correlation of the image.

将帧内/帧间编码得到的预测块与原始编码块相减得到当前待预测编码块的残差数据,对残差数据进行变换、量化,可去除频域相关性,实现图像残差数据的有损压缩,进一步提升压缩效率。The prediction block obtained by intra-frame/inter-frame coding is subtracted from the original coding block to obtain the residual data of the current coding block to be predicted. The residual data is transformed and quantized to remove the frequency domain correlation, realize lossy compression of image residual data, and further improve compression efficiency.

对量化后的二维变换系数进行Z扫描和游程编码得到一维变换系数,最后将变换系数、编码控制信息、预测数据、运动矢量数据等信息作为熵编码模块的输入,编码成二进制流,即原始视频压缩后的码流,进行存储或传输。The quantized two-dimensional transform coefficients are Z-scanned and run-length encoded to obtain one-dimensional transform coefficients. Finally, the transform coefficients, coding control information, prediction data, motion vector data and other information are used as the input of the entropy coding module and encoded into a binary stream, that is, the compressed bit stream of the original video, for storage or transmission.

将量化后的变换系数经过反量化、反变换可得到重建块的残差数据,再与帧内/帧间编码得到的预测值相加即为编码块的重建值,从而得到重建图像。The quantized transform coefficients are dequantized and inversely transformed to obtain the residual data of the reconstructed block, which is then added to the predicted value obtained by intra-frame/inter-frame coding to obtain the reconstructed value of the coding block, thereby obtaining the reconstructed image.

重建图像需经过环路滤波模块实现滤波操作,才能得到最终的重建图像,构建解码图像缓存,作为帧间预测的参考图像。The reconstructed image needs to be filtered through the loop filter module to obtain the final reconstructed image and build a decoded image cache as a reference image for inter-frame prediction.

实际上,混合编码框架的图像重建过程即图像解码过程,只是在解码端增加了解析码流环节。In fact, the image reconstruction process of the hybrid coding framework is the image decoding process, except that a bitstream parsing step is added at the decoding end.

在2021年1月的JVET-U次会议上,帧内模板匹配预测(IntraTMP,Intra TemplateMatching Prediction)技术被首次提出,紧接着在下次会议中被纳入了ECM 1.0。IntraTMP是一种特殊的帧内预测编码工具,最初仅适用于屏幕内容编码(SCC,Screen ContentsCoding),对于自然序列(Camera Captured Contents)虽然压缩率存在较好增益,但复杂度过高,严重影响编码时效;之后改进了IntraTMP中模板匹配的搜索过程,大大降低了复杂度,使得该技术适用于全序列内容。At the JVET-U meeting in January 2021, the intra-frame template matching prediction (IntraTMP) technology was first proposed and then incorporated into ECM 1.0 at the next meeting. IntraTMP is a special intra-frame prediction coding tool that was originally only applicable to screen content coding (SCC). Although it has a good compression rate gain for natural sequences (Camera Captured Contents), its complexity is too high, which seriously affects the coding timeliness. Later, the template matching search process in IntraTMP was improved, which greatly reduced the complexity and made the technology applicable to the entire sequence content.

图2为本申请提供的IntraTMP技术的原理示意图。如图2所示,由当前待预测块210的上方区域220和左侧区域230以及左上角区域240构成L-shape模板,编码器通过L-shape模板在设定的搜索区域内(当前帧已重建区域)进行模板匹配,搜索与此模板最相似的模板,即当前待预测编码块模板和参考模板的绝对误差和(SAD,Sum of AbsoluteDifferences)最小,并以搜索到的相似模板的对应块250作为当前待预测编码块的预测值。其中预设定的搜索区域为图2中R1、R2、R3和R4,R1是当前待预测编码块所在CTU内部,R2~R4均在当前CTU的外部,且可包含多个CTUs,即R2位于当前CTU外部的左上区域(Top-left),R3位于当前CTU外部的上方区域(Above),R4位于当前CTU外部的左边区域(Left)。FIG2 is a schematic diagram of the principle of the IntraTMP technology provided by the present application. As shown in FIG2, the upper area 220, the left area 230 and the upper left corner area 240 of the current block to be predicted 210 constitute an L-shape template. The encoder uses the L-shape template to perform template matching in the set search area (the reconstructed area of the current frame), searches for the template most similar to this template, that is, the absolute error sum (SAD, Sum of AbsoluteDifferences) between the current coding block template to be predicted and the reference template is the smallest, and the corresponding block 250 of the searched similar template is used as the prediction value of the current coding block to be predicted. The preset search areas are R1, R2, R3 and R4 in FIG2, R1 is inside the CTU where the current coding block to be predicted is located, R2 to R4 are all outside the current CTU, and may include multiple CTUs, that is, R2 is located in the upper left area (Top-left) outside the current CTU, R3 is located in the upper area (Above) outside the current CTU, and R4 is located in the left area (Left) outside the current CTU.

如果当前待预测编码块的帧内预测模式启用了IntraTMP,那么编码器需要标识此编码工具的语法元素tmp_enabled_flag,并传输到解码端;解码器会执行与编码器相同的操作:在预定义的四个区域中(R1~R4)搜索与当前待预测编码块的L-shape模板最相似的模板,即具有最小SAD的模板,以其对应块作为当前待预测编码块的预测。If IntraTMP is enabled in the intra-frame prediction mode of the current coding block to be predicted, the encoder needs to identify the syntax element tmp_enabled_flag of this coding tool and transmit it to the decoding end; the decoder will perform the same operation as the encoder: search for the template that is most similar to the L-shape template of the current coding block to be predicted in the predefined four areas (R1~R4), that is, the template with the smallest SAD, and use its corresponding block as the prediction of the current coding block to be predicted.

在搜索最相似的L-shape模板的过程中,即模板匹配过程,设定的四个搜索区域是一个粗略的范围,针对每个区域的搜索宽度(SearchRange_w)和高度(SearchRange_h)也做了限定,若当前待预测块的宽度和高度分别为(BlkW,BlkH),那么搜索宽度/高度的当前待预测编码块宽度/高度的5倍:(a=5)In the process of searching for the most similar L-shape template, i.e., the template matching process, the four search areas set are a rough range, and the search width (SearchRange_w) and height (SearchRange_h) of each area are also limited. If the width and height of the current block to be predicted are (BlkW, BlkH) respectively, then the search width/height is 5 times the width/height of the current block to be predicted: (a=5)

SearchRange_w=a*BlkWSearchRange_w=a*BlkW

SearchRange_h=a*BlkHSearchRange_h=a*BlkH

具体搜索过程分两步进行:The specific search process is divided into two steps:

在R1~R4这4个区域进行粗搜索,搜索步长即下采样系数为2;粗搜索结束后会得到此时的最佳“匹配参考块”,即“最相似模板”的对应块;A rough search is performed in the four regions R1 to R4, with a search step length, i.e., a downsampling factor of 2. After the rough search is completed, the best "matching reference block" at this time, i.e., the corresponding block of the "most similar template", is obtained;

在粗搜索阶段得到的最佳“匹配参考块”周围进行细搜索,搜索范围是min(BlkW,BlkH)/2,搜索步长为1,即整像素搜索,最终得到的最佳匹配参考块作为当前待预测编码块的预测。A fine search is performed around the best "matching reference block" obtained in the coarse search stage. The search range is min(BlkW, BlkH)/2, and the search step is 1, that is, an integer pixel search. The best matching reference block finally obtained is used as the prediction of the current coding block to be predicted.

目前,IntraTMP技术采用的模板包括L-shape、Above和Left三种形状,其中Above模板宽度与当前待预测编码块宽度相同,高度与L-shape模板的上方区域相同;Left模板高度与当前待预测编码块高度相同,宽度与L-shape模板的左边区域相同。图3为本申请提供的三种IntraTMP模式示意图,如图3所示,三种不同形状的模板得到三种不同IntraTMP模式:L-shape IntraTMP、Above IntraTMP和Left IntraTMP,而相关技术中最终只选择其中一种模板搜索最佳匹配参考块,即当前待预测编码块仅采用一种IntraTMP模式,这可能导致搜索到的最佳匹配参考块并非是最佳的;此外,对于某些视频内容可能无法找到最佳匹配参考块,或找到多个最佳匹配参考块等,而相关技术需要根据模板匹配过程直接输出一个最佳匹配参考块,这就导致无法输出搜索到的最佳匹配参考块,进而严重影响了IntraTMP编码工具的性能。At present, the templates used in the IntraTMP technology include three shapes: L-shape, Above and Left. The width of the Above template is the same as the width of the current coding block to be predicted, and the height is the same as the upper area of the L-shape template; the height of the Left template is the same as the height of the current coding block to be predicted, and the width is the same as the left area of the L-shape template. Figure 3 is a schematic diagram of three IntraTMP modes provided by this application. As shown in Figure 3, three different shapes of templates obtain three different IntraTMP modes: L-shape IntraTMP, Above IntraTMP and Left IntraTMP, while the related technology ultimately selects only one of the templates to search for the best matching reference block, that is, the current coding block to be predicted only uses one IntraTMP mode, which may result in the searched best matching reference block not being the best; in addition, for some video content, the best matching reference block may not be found, or multiple best matching reference blocks may be found, etc., and the related technology needs to directly output a best matching reference block according to the template matching process, which results in the inability to output the searched best matching reference block, which seriously affects the performance of the IntraTMP encoding tool.

基于此,本申请实施例提供一种图像编码方法、图像解码方法、图像处理装置、计算机可读存储介质及计算机程序产品,编码端获取图像帧中的待预测编码块与已预测编码块,其中,已预测编码块对应的区域为已重建区域,然后确定待预测编码块对应的多个目标模板,并在已重建区域中确定每个目标模板对应的匹配参考块,接着对至少一个匹配参考块进行融合,得到待预测编码块对应的帧内预测值,然后根据待预测编码块的原始值与帧内预测值,得到残差值,再对残差值进行编码,并将编码比特写入码流,发送给解码端。通过上述图像编码方法,能够提高帧内预测结果的准确性以及帧内预测的效率。Based on this, the embodiments of the present application provide an image encoding method, an image decoding method, an image processing device, a computer-readable storage medium and a computer program product, wherein the encoding end obtains the to-be-predicted coding block and the predicted coding block in the image frame, wherein the area corresponding to the predicted coding block is the reconstructed area, and then determines multiple target templates corresponding to the to-be-predicted coding block, and determines the matching reference block corresponding to each target template in the reconstructed area, and then fuses at least one matching reference block to obtain the intra-frame prediction value corresponding to the to-be-predicted coding block, and then obtains the residual value according to the original value of the to-be-predicted coding block and the intra-frame prediction value, and then encodes the residual value, and writes the encoding bit into the bitstream and sends it to the decoding end. Through the above-mentioned image encoding method, the accuracy of the intra-frame prediction result and the efficiency of the intra-frame prediction can be improved.

图4是本申请实施例提供的一种视频图像传输系统架构示意图。如图4所示,视频图像传输系统包括编码端410以及解码端420,编码端410在获得视频图像后,会对视频图像进行编码处理,然后将比特流发送给解码端420,解码端420在接收到比特流后,会进行解码处理,得到视频图像并进行显示播放。Fig. 4 is a schematic diagram of a video image transmission system architecture provided by an embodiment of the present application. As shown in Fig. 4, the video image transmission system includes an encoding end 410 and a decoding end 420. After obtaining the video image, the encoding end 410 will encode the video image and then send the bit stream to the decoding end 420. After receiving the bit stream, the decoding end 420 will decode the video image and display it.

本申请实施例中,编码端或解码端可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmentedreality,AR)终端、物联网(internet of things,IoT)终端设备、工业控制(industrialcontrol)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remotemedical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportationsafety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、用户设备(user equipment,UE),车载通信装置、车载通信芯片、路侧单元或路侧单元中的通信装置等。还可以是可穿戴设备/穿戴式智能设备,如手环、眼镜、手套、手表、服饰等整合到用户的衣服或配件的便携式设备。In the embodiment of the present application, the encoding end or the decoding end may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, an Internet of Things (IoT) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a user equipment (UE), a vehicle communication device, a vehicle communication chip, a roadside unit or a communication device in a roadside unit, etc. It may also be a wearable device/wearable smart device, such as a portable device integrated into a user's clothes or accessories, such as a bracelet, glasses, gloves, watches, and clothing.

为详尽阐述本技术方案,对本申请实施例的图像编码方法做进一步说明。In order to fully explain the technical solution, the image encoding method of the embodiment of the present application is further described.

图5为本申请实施例提供的一种图像编码方法的流程图。如图5所示,图像编码方法包括但不限于S100、S200、S300、S400以及S500。需要说明的是,本申请实施例不对下述步骤做严格限定。Fig. 5 is a flow chart of an image coding method provided in an embodiment of the present application. As shown in Fig. 5, the image coding method includes but is not limited to S100, S200, S300, S400 and S500. It should be noted that the embodiment of the present application does not strictly limit the following steps.

S100:获取图像帧中的待预测编码块与已预测编码块,其中,已预测编码块对应的区域为已重建区域。S100: Acquire a block to be predicted and a predicted block in an image frame, wherein an area corresponding to the predicted block is a reconstructed area.

在本步骤中,在原始视频被输入到编码端的混合编码框架后,将图像帧划分成多个CTUs,CTUs的大小可以根据实际需求进行设置,然后每个CTU可根据需求被继续划分成编码块CU或者不再继续划分。获取图像帧中的待预测编码块与已预测编码块,其中,已预测编码块就是已经完成预测的编码块,其对应的区域就是已重建区域,待预测编码块就是未完成预测的编码块,本申请实施例提供了待预测编码块的帧内预测方法。In this step, after the original video is input into the hybrid coding framework of the encoding end, the image frame is divided into multiple CTUs, the size of the CTUs can be set according to actual needs, and then each CTU can be further divided into coding blocks CU according to needs or no longer divided. Obtain the coding block to be predicted and the predicted coding block in the image frame, wherein the predicted coding block is the coding block that has completed the prediction, and its corresponding area is the reconstructed area, and the coding block to be predicted is the coding block that has not completed the prediction. The embodiment of the present application provides an intra-frame prediction method for the coding block to be predicted.

在一实施例中,一帧图像被划分成大小为128*128的CTUs,然后每个CTU根据四叉树或多类型树递归结构划分成编码块CU,CU的大小为64*64。In one embodiment, a frame of image is divided into CTUs of size 128*128, and then each CTU is divided into coding blocks CU according to a quadtree or multi-type tree recursive structure, and the size of CU is 64*64.

在另一实施例中,一帧图像被划分成大小为128*128的CTUs,且不再继续对CTU进行划分,也就是说,在本实施例中,CU大小与CTU相同,均为128*128。In another embodiment, a frame of image is divided into CTUs of size 128*128, and the CTU is no longer divided. That is, in this embodiment, the CU size is the same as the CTU size, both of which are 128*128.

需要说明的是,IntraTMP编码工具对CU大小有要求,即CU的宽度和高度均小于或等于64,因此,是否对CTU进行进一步划分得到尺寸更小的CU取决于编码工具的实际需求。It should be noted that the IntraTMP encoding tool has requirements on the CU size, that is, the width and height of the CU are both less than or equal to 64. Therefore, whether to further divide the CTU to obtain a smaller CU depends on the actual needs of the encoding tool.

S200:确定待预测编码块对应的多个目标模板。S200: Determine multiple target templates corresponding to the to-be-predicted coding block.

在本步骤中,首先需要对当前待预测编码块进行帧内或帧间预测模式决策,在确定了对当前待预测编码块采用帧内预测编码后,进一步确定帧内预测的编码工具。In this step, it is first necessary to make an intra-frame or inter-frame prediction mode decision for the current block to be predicted. After it is determined that the intra-frame prediction coding is adopted for the current block to be predicted, a coding tool for the intra-frame prediction is further determined.

在一实施例中,确定当前待预测编码块的帧内预测启用IntraTMP编码工具,具体的确定方法,就是判断语法元素tmp_enabled_flag是否标识为开启。最新的ECM标准包含了多种帧内预测工具,比如:解码端帧内模式推导(DIMD,Decoder Side Intra ModeDerivation)、基于模板的帧内模式推导融合(TIMD,Fusion for Template-based IntraMode Derivation)、空域几何划分模式(SGPM,Spatial Geometric Partitioning Mode)、卷积跨分量帧内预测模型(CCCM,Convolutional Cross-Component Intra PredictionModel)等。在确定当前待预测编码块的帧内预测启用IntraTMP编码工具后,就可以确定当前待预测编码块对应的三种形状的目标模板,分别为L-shape模板、Above模板和Left模板。In one embodiment, it is determined that the IntraTMP coding tool is enabled for intra prediction of the current coding block to be predicted. The specific determination method is to determine whether the syntax element tmp_enabled_flag is marked as on. The latest ECM standard includes a variety of intra prediction tools, such as: Decoder Side Intra Mode Derivation (DIMD), Template-based Intra Mode Derivation Fusion (TIMD), Spatial Geometric Partitioning Mode (SGPM), Convolutional Cross-Component Intra Prediction Model (CCCM), etc. After determining that the IntraTMP coding tool is enabled for intra prediction of the current coding block to be predicted, the three shapes of target templates corresponding to the current coding block to be predicted can be determined, namely, L-shape template, Above template and Left template.

需要说明的是,本申请实施例中采用三种形状的目标模板为例进行说明,但是在实际使用中,可能会采用其他形状的目标模板,或者,同时使用小于三种或者超过三种的目标模板进行预测,本申请实施例在此不做限制。It should be noted that the embodiment of the present application uses target templates of three shapes as an example for illustration, but in actual use, target templates of other shapes may be used, or less than three or more than three target templates may be used for prediction at the same time, and the embodiment of the present application does not limit this.

S300:在已重建区域中确定每个目标模板对应的匹配参考块,并对至少一个匹配参考块进行融合,得到待预测编码块对应的预测值。S300: determining a matching reference block corresponding to each target template in the reconstructed area, and fusing at least one matching reference block to obtain a prediction value corresponding to the to-be-predicted coding block.

在本步骤中,利用在步骤S200中确定的多个目标模板,在已重建区域中确定每个目标模板对应的匹配参考块,由于目标模板具有多个,因此得到的匹配参考块就有多个。匹配参考块可以理解为是目标模板对应的最佳“匹配参考块”,根据不同的需求和定义,最佳“匹配参考块”的确定方法可能不同,在确定了每个目标模板对应的匹配参考块后,也可能需要对这些匹配参考块进行筛选,以获得满足融合条件的匹配参考块,而那些不满足融合条件的匹配参考块,就会被舍弃。接着,对这些满足融合条件的匹配参考块进行融合,得到待预测编码块对应的帧内预测值。In this step, the matching reference blocks corresponding to each target template are determined in the reconstructed area using the multiple target templates determined in step S200. Since there are multiple target templates, there are multiple matching reference blocks. The matching reference block can be understood as the best "matching reference block" corresponding to the target template. According to different requirements and definitions, the method for determining the best "matching reference block" may be different. After determining the matching reference block corresponding to each target template, it may also be necessary to screen these matching reference blocks to obtain matching reference blocks that meet the fusion conditions, and those matching reference blocks that do not meet the fusion conditions will be discarded. Next, these matching reference blocks that meet the fusion conditions are fused to obtain the intra-frame prediction value corresponding to the coding block to be predicted.

下面对如何确定每个目标模板对应的匹配参考块进行具体说明,图6为本申请实施例提供的确定每个目标模板对应的匹配参考块的方法的流程图。如图6所示,方法包括但不限于S310、S320。需要说明的是,本申请实施例不对下述步骤做严格限定。The following specifically describes how to determine the matching reference block corresponding to each target template. FIG6 is a flow chart of a method for determining the matching reference block corresponding to each target template provided in an embodiment of the present application. As shown in FIG6 , the method includes but is not limited to S310 and S320. It should be noted that the embodiment of the present application does not strictly limit the following steps.

S310:在已重建区域中确定每个目标模板对应的至少一个参考模板。S310: Determine at least one reference template corresponding to each target template in the reconstructed area.

在本步骤中,在已重建区域中,每个目标模板一般能够找到其对应的多个参考模板,对于参考模板的搜索策略可以有多种。In this step, in the reconstructed area, each target template can generally find multiple corresponding reference templates, and there may be multiple search strategies for the reference templates.

S320:确定每个参考模板对应的候选参考块。S320: Determine a candidate reference block corresponding to each reference template.

在本步骤中,在搜索到每个参考模板后,会对参考模板与其目标模板的相似程度进行计算,相似程度用于筛选哪些参考模板对应的候选参考块是匹配参考块。In this step, after searching for each reference template, the similarity between the reference template and its target template is calculated, and the similarity is used to screen which candidate reference blocks corresponding to the reference template are matching reference blocks.

S330:根据候选参考块,为每个目标模板确定一个匹配参考块。S330: Determine a matching reference block for each target template based on the candidate reference blocks.

在本步骤中,通过对在步骤S320中得到的候选参考块进一步筛选,进一步确定匹配参考块。In this step, the candidate reference blocks obtained in step S320 are further screened to further determine the matching reference blocks.

需要注意的是,最终得到的每个目标模板对应的匹配参考块可以是从候选参考块中直接选择得到的,也可以是对候选参考块进行进一步处理后得到的。It should be noted that the matching reference block corresponding to each target template finally obtained can be directly selected from the candidate reference blocks, or can be obtained after further processing of the candidate reference blocks.

在一实施例中,先在已重建区域中进行确定步长的搜索,得到多个候选参考块,然后再对候选参考块的匹配程度进行计算,从中选择一个作为匹配参考块。In one embodiment, a search with a determined step length is first performed in the reconstructed area to obtain a plurality of candidate reference blocks, and then the matching degrees of the candidate reference blocks are calculated, and one of them is selected as a matching reference block.

在另一实施例中,采用IntraTMP现有的搜索策略,先在已重建区域中进行步长为2的粗搜索,初步确定此粗搜索过程对应的中间过程匹配参考块,然后在确定的中间过程匹配参考块周围进行步长为1的细搜索,此时搜索区域限定为当前待预测编码块一半宽度或高度的最小值:min(BlkW,BlkH)/2,确定最终的匹配参考块,也就是目标模板对应的匹配参考块。In another embodiment, the existing search strategy of IntraTMP is adopted, and a coarse search with a step size of 2 is first performed in the reconstructed area to preliminarily determine the intermediate process matching reference block corresponding to this coarse search process, and then a fine search with a step size of 1 is performed around the determined intermediate process matching reference block. At this time, the search area is limited to the minimum value of half the width or height of the current predicted coding block: min(BlkW, BlkH)/2, and the final matching reference block, that is, the matching reference block corresponding to the target template, is determined.

在另一实施例中,在确定每个目标模板对应的多个候选参考块后,根据这些候选参考块,构建每个目标模板对应的候选列表,每个目标模板的候选列表允许存在多个候选块向量IntraTMP BVs,其中IntraTMP BV是由当前待预测编码块指向的匹配参考块的矢量。图7是本申请实施例提供的IntraTMP BV示意图,如图7所示,不同IntraTMP BV对应于不同的参考块,这意味着每种目标模板能搜索或保存多个候选参考块,同时每个候选列表中的候选IntraTMP BVs按照模板SAD升序排列。然后对每个候选列表中块向量指向的候选参考块进行率失真决策,确定每个目标模板对应的匹配参考块。In another embodiment, after determining the multiple candidate reference blocks corresponding to each target template, a candidate list corresponding to each target template is constructed based on these candidate reference blocks. The candidate list of each target template allows the existence of multiple candidate block vectors IntraTMP BVs, where IntraTMP BV is a vector of a matching reference block pointed to by the current coding block to be predicted. Figure 7 is a schematic diagram of the IntraTMP BV provided in an embodiment of the present application. As shown in Figure 7, different IntraTMP BVs correspond to different reference blocks, which means that each target template can search or save multiple candidate reference blocks, and the candidate IntraTMP BVs in each candidate list are arranged in ascending order according to the template SAD. Then, a rate-distortion decision is made on the candidate reference blocks pointed to by the block vector in each candidate list to determine the matching reference blocks corresponding to each target template.

需要说明的是,绝对误差和SAD是图像块之间的相似度的量度。通过取原始块中的每个像素与用于比较的块中的相应像素之间的绝对差来计算。将这些差值相加以创建块相似度的简单度量,差异图像的L1范数或两个图像块之间的曼哈顿距离。绝对差的和可以用于各种目的,例如对象识别,立体图像的视差图的生成以及用于视频压缩的运动估计。在本申请实施例中,采用计算SAD值来进行块之间相似度的度量仅为示例性说明,在实际应用场景中,还可以采用其他度量算法,例如误差的平方和(SSD,sum of squared differences)算法或半全局匹配(SGM,semi—global matching)算法等,本申请实施例在此不做限制。It should be noted that the absolute error and SAD are measures of similarity between image blocks. It is calculated by taking the absolute difference between each pixel in the original block and the corresponding pixel in the block used for comparison. These differences are added to create a simple measure of block similarity, the L1 norm of the difference image or the Manhattan distance between two image blocks. The sum of absolute differences can be used for various purposes, such as object recognition, generation of disparity maps for stereo images, and motion estimation for video compression. In the embodiment of the present application, the use of calculating the SAD value to measure the similarity between blocks is only an exemplary explanation. In actual application scenarios, other measurement algorithms can also be used, such as the sum of squared differences (SSD) algorithm or the semi-global matching (SGM) algorithm, etc., and the embodiment of the present application is not limited here.

在另一实施例中,在确定每个目标模板对应的多个候选参考块后,根据这些候选参考块,构建每个目标模板对应的候选列表,每个目标模板的候选列表允许存在多个候选块向量IntraTMP BVs,其中IntraTMP BV是由当前待预测编码块指向的匹配参考块的矢量。与上一实施例的区别之处在于,在本实施例中,先对每个候选列表中块向量指向的候选参考块进行融合,将融合后得到的参考块确定为每个目标模板对应的匹配参考块。In another embodiment, after determining multiple candidate reference blocks corresponding to each target template, a candidate list corresponding to each target template is constructed based on these candidate reference blocks, and the candidate list of each target template allows the existence of multiple candidate block vectors IntraTMP BVs, where IntraTMP BV is a vector of a matching reference block pointed to by the current coding block to be predicted. The difference from the previous embodiment is that in this embodiment, the candidate reference blocks pointed to by the block vectors in each candidate list are first fused, and the reference blocks obtained after fusion are determined as matching reference blocks corresponding to each target template.

在确定每个目标模板对应的匹配参考块后,需要对这些匹配参考块进行融合,进而得到待预测参考块对应的帧内预测值,而在融合之前,需要选定满足融合条件的匹配参考块,并将这些满足融合条件的匹配参考块称为待融合参考块。After determining the matching reference blocks corresponding to each target template, these matching reference blocks need to be fused to obtain the intra-frame prediction values corresponding to the reference blocks to be predicted. Before fusion, matching reference blocks that meet the fusion conditions need to be selected, and these matching reference blocks that meet the fusion conditions are called reference blocks to be fused.

下面对如何确定待融合参考块进行具体说明。The following is a detailed description of how to determine the reference block to be fused.

在一实施例中,根据所有目标模板匹配得到的所有匹配参考块均相同,在此种情况下,可以选择任意一个匹配参考块作为待融合参考块,换句话说,可以无需融合,而按照传统IntraTMP处理。In one embodiment, all matching reference blocks obtained by matching all target templates are the same. In this case, any matching reference block can be selected as the reference block to be fused. In other words, there is no need for fusion and traditional IntraTMP processing can be used.

在另一实施例中,存在至少两个匹配参考块不相同,在此种情况下,根据预设算法,确定至少两个不相同的匹配参考块对应的目标模板之间的差异程度,并根据差异程度,选择至少一个匹配参考块作为待融合参考块。In another embodiment, there are at least two different matching reference blocks. In this case, according to a preset algorithm, the degree of difference between the target templates corresponding to the at least two different matching reference blocks is determined, and according to the degree of difference, at least one matching reference block is selected as the reference block to be fused.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,两个匹配参考块相同,另一个不同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:确定两个不相同的匹配参考块对应的目标模板为待比较模板,然后分别确定两个待比较模板对应的绝对误差和,且两个待比较模板对应的绝对误差和的差异程度大于预设阈值,在此种情况下,选择两个匹配参考块共同作为待融合参考块。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, two matching reference blocks are the same and the other is different. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, an absolute error sum algorithm is used to measure the degree of difference. The specific process includes: determining the target templates corresponding to the two different matching reference blocks as the templates to be compared, and then respectively determining the absolute error sums corresponding to the two templates to be compared, and the degree of difference between the absolute error sums corresponding to the two templates to be compared is greater than a preset threshold. In this case, the two matching reference blocks are selected together as the reference blocks to be fused.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,两个匹配参考块相同,另一个不同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:确定两个不相同的匹配参考块对应的目标模板为待比较模板,然后分别确定两个待比较模板对应的绝对误差和,且两个待比较模板对应的绝对误差和的差异程度小于预设阈值,在此种情况下,选择一个匹配参考块共同作为待融合参考块。可以理解的是,在实际应用场景中,往往会选择SAD值更小的模板对应的匹配参考块作为待融合参考块,也就是说,SAD值更大的模板对应的匹配参考块被放弃,不参与融合。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, two matching reference blocks are the same and the other is different. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, the absolute error sum algorithm is used to measure the degree of difference. The specific process includes: determining the target templates corresponding to the two different matching reference blocks as the templates to be compared, and then respectively determining the absolute error sums corresponding to the two templates to be compared, and the degree of difference between the absolute error sums corresponding to the two templates to be compared is less than a preset threshold. In this case, a matching reference block is selected as the reference block to be fused. It can be understood that in actual application scenarios, the matching reference block corresponding to the template with a smaller SAD value is often selected as the reference block to be fused, that is, the matching reference block corresponding to the template with a larger SAD value is abandoned and does not participate in the fusion.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,三个匹配参考块相互之间均不相同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:在所有不相同的匹配参考块对应的目标模板中,确定一个基准模板与剩余多个非基准模板,然后确定基准模板与每个非基准模板对应的绝对误差和,接着将基准模板对应的绝对误差和与每个非基准模板对应的绝对误差和进行逐一比对,得出两者对应的绝对误差和的差异程度大于预设阈值,在此种情况下,将基准模板与非基准模板对应的匹配参考块作为待融合参考块。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, the three matching reference blocks are different from each other. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, an absolute error sum algorithm is used to measure the degree of difference. The specific process includes: among the target templates corresponding to all the different matching reference blocks, a reference template and the remaining multiple non-reference templates are determined, and then the absolute error sum corresponding to the reference template and each non-reference template is determined, and then the absolute error sum corresponding to the reference template and the absolute error sum corresponding to each non-reference template are compared one by one, and it is obtained that the difference degree of the absolute error sum corresponding to the two is greater than a preset threshold. In this case, the matching reference blocks corresponding to the reference template and the non-reference template are used as reference blocks to be fused.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,三个匹配参考块相互之间均不相同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:在所有不相同的匹配参考块对应的目标模板中,确定一个基准模板与剩余多个非基准模板,然后确定基准模板与每个非基准模板对应的绝对误差和,接着将基准模板对应的绝对误差和与每个非基准模板对应的绝对误差和进行逐一比对,得出两者对应的绝对误差和的差异程度小于预设阈值,在此种情况下,仅将基准模板对应的匹配参考块作为待融合参考块,也就是说,非基准模板对应的匹配参考块被放弃,不参与融合。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, the three matching reference blocks are different from each other. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, an absolute error sum algorithm is used to measure the degree of difference. The specific process includes: among the target templates corresponding to all the different matching reference blocks, a reference template and the remaining multiple non-reference templates are determined, and then the absolute error sum corresponding to the reference template and each non-reference template is determined, and then the absolute error sum corresponding to the reference template and the absolute error sum corresponding to each non-reference template are compared one by one, and it is obtained that the difference degree of the absolute error sum corresponding to the two is less than a preset threshold. In this case, only the matching reference block corresponding to the reference template is used as the reference block to be fused, that is, the matching reference block corresponding to the non-reference template is abandoned and does not participate in the fusion.

可以理解的是,上述实施例中,通过筛选出满足融合条件的待融合参考块,在一些情形中可以减少融合的匹配参考块的数量,能够整体提升融合效率。It can be understood that in the above embodiments, by screening out reference blocks to be fused that meet the fusion conditions, the number of matching reference blocks to be fused can be reduced in some cases, which can improve the overall fusion efficiency.

在确定待融合参考块以后,可以开启参考块的融合。下面对如何融合这些待融合参考块进行具体说明,图8为本申请实施例提供的确定每个目标模板对应的匹配参考块的方法的流程图。如图8所示,方法包括但不限于S340、S350。需要说明的是,本申请实施例不对下述步骤做严格限定。After determining the reference blocks to be fused, the fusion of the reference blocks can be enabled. The following is a detailed description of how to fuse these reference blocks to be fused. FIG8 is a flow chart of a method for determining a matching reference block corresponding to each target template provided in an embodiment of the present application. As shown in FIG8 , the method includes but is not limited to S340 and S350. It should be noted that the embodiment of the present application does not strictly limit the following steps.

S340:根据帧内模板融合权重,确定每个目标模板对应的目标融合权重。S340: Determine a target fusion weight corresponding to each target template according to the intra-frame template fusion weight.

在一实施例中,可以为每个目标模板确定固定的目标融合权重,例如,为每个目标模板设置确定的预设目标融合权重,预设目标融合权重可以为常见系数值,如L-shape、Above和Left三种模式对应的权重为{22/64,21/64,21/64}。In one embodiment, a fixed target fusion weight may be determined for each target template. For example, a certain preset target fusion weight may be set for each target template. The preset target fusion weight may be a common coefficient value, such as {22/64, 21/64, 21/64} corresponding to the three modes of L-shape, Above and Left.

在另一实施例中,可以根据目标模板包括的样本数量,确定预设目标融合权重,这里的样本数量,可以理解为像素数量,例如,L-shape、Above和Left三种模式对应的目标融合权重为:其中W表示L-shape模板的宽度,即当前待预测编码块或Above模板的宽度,H表示L-shape模板的高度,即当前待预测编码块或Left模板的高度。In another embodiment, the preset target fusion weight may be determined according to the number of samples included in the target template. The number of samples here may be understood as the number of pixels. For example, the target fusion weights corresponding to the three modes of L-shape, Above and Left are: Wherein W represents the width of the L-shape template, that is, the width of the current coding block to be predicted or the Above template, and H represents the height of the L-shape template, that is, the height of the current coding block to be predicted or the Left template.

在另一实施例中,帧内模板融合权重可以根据目标模板对应的绝对误差和以及样本数量确定,具体过程包括:分别确定每个目标模板对应的目标绝对误差和以及每个目标模板包括的目标样本数量,然后根据目标模板的SAD与目标样本数量,对每个目标模板对应的SAD进行归一化处理,得到每个目标模板对应的归一化SAD,然后对所有归一化SAD求和得到归一化绝对误差总和,接着根据每个目标模板对应的归一化SAD与归一化绝对误差总和,确定每个目标模板对应的目标融合权重。其中,每个目标模板对应的归一化SAD可以根据目标模板的SAD与目标样本数量的比值得到。可以理解的是,对每个目标模板SAD进行归一化处理能够使得SAD值不受到模板中包含的样本数量的影响,从而保证权重计算的准确性。In another embodiment, the intra-frame template fusion weight can be determined according to the absolute error and the number of samples corresponding to the target template. The specific process includes: respectively determining the target absolute error and the target number of samples included in each target template, and then normalizing the SAD corresponding to each target template according to the SAD of the target template and the target number of samples to obtain the normalized SAD corresponding to each target template, and then summing all normalized SADs to obtain the normalized absolute error sum, and then determining the target fusion weight corresponding to each target template according to the normalized SAD corresponding to each target template and the normalized absolute error sum. Among them, the normalized SAD corresponding to each target template can be obtained according to the ratio of the SAD of the target template to the target number of samples. It can be understood that normalizing the SAD of each target template can make the SAD value not affected by the number of samples contained in the template, thereby ensuring the accuracy of the weight calculation.

在另一实施例中,帧内模板融合权重可以根据待预测编码块中的待预测像素与目标模本之间的位置关系确定,具体过程包括:确定每个目标模板对应的目标绝对误差和,并根据目标绝对误差和确定每个目标模板对应的权重基值,然后确定待预测像素与每个目标模板之间的目标位置关系,并根据目标位置关系确定每个目标模板对应的权重相对值,接着根据权重基值与权重相对值,确定每个目标模板对应的目标融合权重。In another embodiment, the intra-frame template fusion weight can be determined based on the positional relationship between the pixel to be predicted in the coding block to be predicted and the target template. The specific process includes: determining the target absolute error sum corresponding to each target template, and determining the weight base value corresponding to each target template based on the target absolute error sum, and then determining the target position relationship between the pixel to be predicted and each target template, and determining the weight relative value corresponding to each target template based on the target position relationship, and then determining the target fusion weight corresponding to each target template based on the weight base value and the weight relative value.

S350:根据每个目标模板对应的目标融合权重,对所有目标模板对应的待融合参考块进行加权计算,得到待预测编码块对应的帧内预测值。S350: performing weighted calculation on the reference blocks to be fused corresponding to all target templates according to the target fusion weight corresponding to each target template, to obtain an intra-frame prediction value corresponding to the coding block to be predicted.

在本步骤中,将在步骤330中得到的每个目标模板对应的目标融合权重与匹配参考块进行加权计算,得到待预测编码块对应的帧内预测值。In this step, the target fusion weight corresponding to each target template obtained in step 330 is weightedly calculated with the matching reference block to obtain the intra-frame prediction value corresponding to the coding block to be predicted.

S400:根据待预测编码块的原始值与预测值,得到残差值。S400: Obtain a residual value according to the original value and the predicted value of the coding block to be predicted.

S500:对残差值进行编码,并将编码比特写入码流。S500: Encode the residual value and write the encoded bits into the bitstream.

步骤S400与S500不是本申请实施例所要重点说明的内容,因此不做赘述。Steps S400 and S500 are not the key points of the embodiment of the present application, and thus will not be described in detail.

根据本申请实施例提供的图像编码方法,编码端在传输用于帧内模板融合的指示信息时,会分成两种主要情形:一种是隐式融合,即无需传输块级帧内模板融合标识给解码端,另一种是非隐式融合,即需要传输块级帧内模板融合标识给解码端。下面针对两种指示融合的方式进行详细说明。According to the image encoding method provided by the embodiment of the present application, when the encoding end transmits the indication information for intra-frame template fusion, there are two main situations: one is implicit fusion, that is, there is no need to transmit the block-level intra-frame template fusion identifier to the decoding end, and the other is non-implicit fusion, that is, it is necessary to transmit the block-level intra-frame template fusion identifier to the decoding end. The following describes in detail the two ways of indicating fusion.

下面先对隐式融合进行说明:The following is an explanation of implicit fusion:

在一实施例中,在确定匹配参考块时,采用从多个候选参考块中直接选择一个作为目标模板对应的匹配参考块的方法,编码端可以不传输任何信息给解码端,解码端就可以自动采用同样的方法去确定匹配参考块,从而完成解码。In one embodiment, when determining a matching reference block, a method is adopted in which one is directly selected from a plurality of candidate reference blocks as a matching reference block corresponding to a target template. The encoding end need not transmit any information to the decoding end, and the decoding end can automatically adopt the same method to determine the matching reference block, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对列表中块向量指向的候选参考块的再决策确定匹配参考块的方法,编码端可以传输块向量索引值给解码端,解码端就可以根据此块向量索引值确定匹配参考块,从而完成解码。In one embodiment, when determining the matching reference block, a candidate list corresponding to each target template is constructed, and a method of re-deciding the matching reference block based on the candidate reference block pointed to by the block vector in the list is adopted. The encoding end can transmit the block vector index value to the decoding end, and the decoding end can determine the matching reference block based on the block vector index value, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对每个候选列表中块向量指向的候选参考块进行融合,从而确定匹配参考块的方法,编码端可以传输帧内模板参考块向量融合标识给解码端,解码端就可以根据此帧内模板参考块向量融合标识确定是否开启候选参考块的融合,从而完成解码。In one embodiment, when determining a matching reference block, a method is adopted for determining a matching reference block by constructing a candidate list corresponding to each target template and fusing the candidate reference blocks pointed to by the block vector in each candidate list. The encoding end can transmit an intra-frame template reference block vector fusion identifier to the decoding end, and the decoding end can determine whether to enable the fusion of the candidate reference blocks based on the intra-frame template reference block vector fusion identifier, thereby completing decoding.

上述实施例提供的采用隐式融合的图像编码方法能够在一定程度上节约传输比特。The image coding method using implicit fusion provided in the above embodiment can save transmission bits to a certain extent.

下面先对非隐式融合进行说明:The following first explains non-implicit fusion:

在一实施例中,在确定匹配参考块时,采用从多个候选参考块中直接选择一个作为目标模板对应的匹配参考块的方法,编码端通过传输高层语法元素融合标识与块级帧内模板融合标识来指示解码端进行解码,具体过程包括:编码端将高层语法元素融合标识与块级帧内模板融合标识均设置为开启状态,解码端在接收并解析到高层语法元素融合标识时,会首先判断高层语法元素融合标识是否为开启状态,并在当高层语法元素融合标识为开启状态时,继续检查块级帧内模板融合标识是否为开启状态,如果块级帧内模板融合标识为开启状态,则采用与编码端相同的方式确定匹配参考块并且融合,从而完成解码。In one embodiment, when determining a matching reference block, a method of directly selecting one from multiple candidate reference blocks as a matching reference block corresponding to a target template is adopted, and the encoding end instructs the decoding end to perform decoding by transmitting a high-level syntax element fusion flag and a block-level intra-frame template fusion flag. The specific process includes: the encoding end sets both the high-level syntax element fusion flag and the block-level intra-frame template fusion flag to an on state, and when the decoding end receives and parses the high-level syntax element fusion flag, it first determines whether the high-level syntax element fusion flag is in an on state, and when the high-level syntax element fusion flag is in an on state, continues to check whether the block-level intra-frame template fusion flag is in an on state, and if the block-level intra-frame template fusion flag is in an on state, the matching reference block is determined and fused in the same manner as the encoding end, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对列表中块向量指向的候选参考块的再决策确定匹配参考块的方法,编码端通过传输高层语法元素融合标识、块级帧内模板融合标识与块向量索引值来指示解码端进行解码,具体过程包括:编码端将高层语法元素融合标识与块级帧内模板融合标识均设置为开启状态,解码端在接收并解析到高层语法元素融合标识时,会首先判断高层语法元素融合标识是否为开启状态,并在当高层语法元素融合标识为开启状态时,继续检查块级帧内模板融合标识是否为开启状态,如果块级帧内模板融合标识为开启状态,则根据块向量索引值确定匹配参考块并且融合,从而完成解码。In one embodiment, when determining a matching reference block, a candidate list corresponding to each target template is constructed, and a method of re-deciding the matching reference block for the candidate reference block pointed to by the block vector in the list is adopted. The encoder instructs the decoder to perform decoding by transmitting a high-level syntax element fusion flag, a block-level intra-frame template fusion flag and a block vector index value. The specific process includes: the encoder sets both the high-level syntax element fusion flag and the block-level intra-frame template fusion flag to an on state. When the decoder receives and parses the high-level syntax element fusion flag, it first determines whether the high-level syntax element fusion flag is in an on state, and when the high-level syntax element fusion flag is in an on state, it continues to check whether the block-level intra-frame template fusion flag is in an on state. If the block-level intra-frame template fusion flag is in an on state, the matching reference block is determined and fused according to the block vector index value, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对每个候选列表中块向量指向的候选参考块进行融合,从而确定匹配参考块的方法,编码端通过传输高层语法元素融合标识、块级帧内模板融合标识与帧内模板参考块向量融合标识来指示解码端进行解码,具体过程包括:编码端将高层语法元素融合标识与块级帧内模板融合标识均设置为开启状态,解码端在接收并解析到高层语法元素融合标识时,会首先判断高层语法元素融合标识是否为开启状态,并在当高层语法元素融合标识为开启状态时,继续检查块级帧内模板融合标识是否为开启状态,如果块级帧内模板融合标识为开启状态,再继续检测帧内模板参考块向量融合标识是否为开启状态,如果内模板参考块向量融合标识为开启状态,则解码端对候选参考块先融合得到匹配参考块,然后再对匹配参考块进行融合,从而完成解码。In one embodiment, when determining a matching reference block, a method is adopted in which a candidate list corresponding to each target template is constructed, and the candidate reference blocks pointed to by the block vector in each candidate list are merged to determine the matching reference block. The encoder instructs the decoder to perform decoding by transmitting a high-level syntax element fusion flag, a block-level intra-frame template fusion flag, and an intra-frame template reference block vector fusion flag. The specific process includes: the encoder sets both the high-level syntax element fusion flag and the block-level intra-frame template fusion flag to an on state. When the decoder receives and parses the high-level syntax element fusion flag, it first determines whether the high-level syntax element fusion flag is in an on state, and when the high-level syntax element fusion flag is in an on state, it continues to check whether the block-level intra-frame template fusion flag is in an on state. If the block-level intra-frame template fusion flag is in an on state, it continues to detect whether the intra-frame template reference block vector fusion flag is in an on state. If the intra-template reference block vector fusion flag is in an on state, the decoder first merges the candidate reference blocks to obtain a matching reference block, and then merges the matching reference block to complete decoding.

通过本申请实施例提供的图像编码方法,能够提高IntraTMP预测的准确度,解决了某些视频内容无法应用IntraTMP编码工具的问题,并且不增加过多额外传输的比特。The image encoding method provided by the embodiment of the present application can improve the accuracy of IntraTMP prediction, solve the problem that the IntraTMP encoding tool cannot be applied to certain video content, and does not increase too many additional transmission bits.

为了进一步阐述本申请实施例提供的图像编码方法,采用下述示例进行详细说明。In order to further illustrate the image encoding method provided in the embodiment of the present application, the following example is used for detailed description.

示例1Example 1

本示例详细阐述了图像编码端进行图像编码的全流程,且在后续示例中,均采用该流程进行编码。This example describes in detail the entire process of image encoding at the image encoding end, and this process is used for encoding in subsequent examples.

图9为本申请示例提供的编码端IntraTMP-fusion方案流程示意图,如图所示,编码端IntraTMP-fusion流程包括步骤S910-S970:。具体为:FIG9 is a schematic diagram of the IntraTMP-fusion solution flow of the encoding end provided by the example of this application. As shown in the figure, the IntraTMP-fusion flow of the encoding end includes steps S910-S970:. Specifically:

S910:输入视频图像,划分为编码块。S910: Input a video image and divide it into coding blocks.

将原始视频输入到混合编码框架,首先将一帧图像划分成128*128的CTUs,然后每个CTU根据四叉树或多类型树递归结构划分成编码块CU,也可以不再划分,即CU大小与CTU相同。但有两点值得注意:第一,使用多类型树递归结构划分后不可以再进行四叉树划分;第二,IntraTMP编码工具对CU大小有要求,即CU的宽度和高度均小于等于64,否则无法启用IntraTMP。Input the original video into the hybrid coding framework, first divide a frame into 128*128 CTUs, then each CTU is divided into coding blocks CU according to the quadtree or multi-type tree recursive structure, or no further division, that is, the CU size is the same as the CTU. However, there are two points worth noting: first, quadtree division cannot be performed after division using the multi-type tree recursive structure; second, the IntraTMP coding tool has requirements for the CU size, that is, the width and height of the CU are both less than or equal to 64, otherwise IntraTMP cannot be enabled.

S920:确定当前待预测编码块的帧内预测启用IntraTMP编码工具。S920: Determine whether to enable the IntraTMP coding tool for intra-frame prediction of the current block to be predicted and coded.

对当前待预测编码块进行帧内/帧间预测模式决策,确定当前待预测编码块采用帧内或帧间预测编码,若当前待预测块使用帧内预测编码,则进一步确定帧内预测的编码工具。最新的ECM标准包含了多种帧内预测工具,比如:解码端帧内模式推导(DIMD,DecoderSide Intra Mode Derivation)、基于模板的帧内模式推导融合(TIMD,Fusion forTemplate-based Intra Mode Derivation)、空域几何划分模式(SGPM,Spatial GeometricPartitioning Mode)、卷积跨分量帧内预测模型(CCCM,Convolutional Cross-ComponentIntra Prediction Model)等。确定当前待预测编码块是否启用了IntraTMP工具,即语法元素tmp_enabled_flag是否标识为开启。Make intra/inter prediction mode decision for the current block to be predicted, determine whether the current block to be predicted uses intra or inter prediction coding, and if the current block to be predicted uses intra prediction coding, further determine the coding tool for intra prediction. The latest ECM standard includes a variety of intra prediction tools, such as: decoder side intra mode derivation (DIMD), template-based intra mode derivation fusion (TIMD), spatial geometric partitioning mode (SGPM), convolutional cross-component intra prediction model (CCCM), etc. Determine whether the IntraTMP tool is enabled for the current block to be predicted, that is, whether the syntax element tmp_enabled_flag is marked as on.

步骤S930、S940、S950为并列步骤,也就是说,在实际应用中,只会采取其中一种方法确定匹配参考块。但是本领域技术人员可以理解,同时采用S930、S940、S950中的两种或三种方法确定匹配参考块也在本申请实施例的保护范围之内。Steps S930, S940, and S950 are parallel steps, that is, in actual applications, only one of the methods will be used to determine the matching reference block. However, those skilled in the art will appreciate that simultaneously using two or three of the methods S930, S940, and S950 to determine the matching reference block is also within the protection scope of the embodiments of the present application.

步骤S930:启用多模式IntraTMP-fusion方法,以常规搜索策略分别确定不同模板的匹配参考块。Step S930: Enable the multi-mode IntraTMP-fusion method to determine matching reference blocks of different templates respectively using a conventional search strategy.

步骤S940:启用多模式多候选IntraTMP-fusion方法1,以各模板式候选列表的某一候选项,分别确定不同模板的匹配参考块。Step S940: Activate the multi-mode multi-candidate IntraTMP-fusion method 1, and use a candidate item in each template candidate list to determine matching reference blocks of different templates.

步骤S950:启用多模式多候选IntraTMP-fusion方法2,通过各模板式候选列表的候选项的融合,分别确定不同模板的匹配参考块。Step S950: Activate the multi-mode multi-candidate IntraTMP-fusion method 2, and determine the matching reference blocks of different templates respectively by fusing the candidates in each template-based candidate list.

步骤S960:以选定的融合方式对不同模式的匹配参考块进行融合,得到最终匹配参考块,作为当前待预测编码块的预测值。Step S960: Fusing the matching reference blocks of different modes in a selected fusion manner to obtain a final matching reference block as a prediction value of the current coding block to be predicted.

步骤S970:将启用的IntraTMP-fusion方法相关语法元素传输至解码端。Step S970: Transmitting the enabled IntraTMP-fusion method related syntax elements to the decoding end.

示例2Example 2

本示例详细阐述了图像编码过程中的一种帧内预测方法,并将该种帧内预测方法称之为多模式IntraTMP-fusion方法,概括而言,本方法首先根据三种IntraTMP模式的不同形状模板:L-shape、Above和Left分别搜索各自的最佳“匹配参考块”,然后以某种最佳融合方式对三个最佳“匹配参考块”进行融合,得到最终的匹配参考块,作为当前待预测编码块的预测,从而提高预测的准确度。This example elaborates on an intra-frame prediction method in the image coding process, and calls this intra-frame prediction method a multi-mode IntraTMP-fusion method. In summary, this method first searches for the best "matching reference block" of each of the three IntraTMP modes according to different shape templates: L-shape, Above, and Left, and then fuses the three best "matching reference blocks" in a certain optimal fusion method to obtain the final matching reference block as the prediction of the current coding block to be predicted, thereby improving the prediction accuracy.

具体的实现过程如下:The specific implementation process is as follows:

步骤1:输入视频图像,划分成编码块CU。Step 1: Input video image and divide it into coding blocks CU.

步骤2:确定当前待预测编码块的帧内预测启用IntraTMP编码工具。Step 2: Determine that the intra-frame prediction of the current block to be predicted and coded uses the IntraTMP coding tool.

步骤3:对当前待预测编码块启用多模式IntraTMP-fusion方法,以常规搜索策略分别确定不同模式对应的最佳“匹配参考块”。Step 3: Enable the multi-mode IntraTMP-fusion method for the current block to be predicted and use a conventional search strategy to determine the best “matching reference block” corresponding to different modes.

当前待预测编码块启用多模式IntraTMP-fusion方法后,分别搜索L-shape、Above和Left三种模板对应的最佳“匹配参考块”,若某种模式的最佳“匹配参考块”不可用,则舍弃该匹配参考块。After the multi-mode IntraTMP-fusion method is enabled for the current predicted coding block, the best "matching reference blocks" corresponding to the three templates of L-shape, Above and Left are searched respectively. If the best "matching reference block" of a certain mode is not available, the matching reference block is discarded.

搜索策略和传统IntraTMP一致,即先在R1~R4这四个搜索区域进行步长为2的粗搜索,初步确定此时的最佳匹配参考块,然后在确定的最佳匹配参考块周围进行步长为1的细搜索,确定最佳“匹配参考块”,此时搜索区域限定为当前待预测编码块一半宽度或高度的最小值:min(BlkW,BlkH)/2。The search strategy is consistent with the traditional IntraTMP, that is, a coarse search with a step size of 2 is first performed in the four search areas R1 to R4 to preliminarily determine the best matching reference block at this time, and then a fine search with a step size of 1 is performed around the determined best matching reference block to determine the best "matching reference block". At this time, the search area is limited to the minimum value of half the width or height of the current predicted coding block: min(BlkW,BlkH)/2.

步骤4:以某种最佳融合方式对不同模式的最佳匹配参考块进行融合,得到最终的匹配参考块,作为当前待预测编码块的预测;Step 4: Fusing the best matching reference blocks of different modes in a certain optimal fusion method to obtain a final matching reference block as a prediction of the current coding block to be predicted;

在融合不同模式的最佳“匹配参考块”之前,需要判断匹配参考块是否满足融合条件,主要有以下三种情况:Before fusing the best "matching reference blocks" of different modes, it is necessary to determine whether the matching reference blocks meet the fusion conditions. There are mainly three situations:

(1)若这些匹配参考块都是相同的,则无需融合,按照传统IntraTMP处理;(1) If these matching reference blocks are the same, there is no need to merge them and they are processed according to the traditional IntraTMP method;

(2)若这些匹配参考块存在2个相同块,另一个不同,则需要比较2个不同匹配参考块的模板SAD,若两者比值大于某阈值,则两个匹配参考块满足融合条件;否则无需融合,选择其中一个匹配参考块按照传统IntraTMP处理;(2) If there are two identical blocks and one different block among these matching reference blocks, it is necessary to compare the template SADs of the two different matching reference blocks. If the ratio of the two is greater than a certain threshold, the two matching reference blocks meet the fusion condition; otherwise, no fusion is required, and one of the matching reference blocks is selected and processed according to the traditional IntraTMP method.

(3)若这些匹配参考块各不相同,即3个匹配参考块均不同,则默认L-shapeIntraTMP模板对应参考块满足融合条件,然后比较Above模板SAD和L-shape模板上边区域的SAD,若两者比值大于某阈值,则Above模板对应参考块满足融合条件,否则无需融合;以及比较Left模板SAD和L-shape模板左边区域的SAD,若两者比值大于某阈值,则Left模板对应参考块满足融合条件;否则无需融合。(3) If these matching reference blocks are different, that is, the three matching reference blocks are all different, then the reference block corresponding to the L-shapeIntraTMP template meets the fusion condition by default, and then the SAD of the Above template is compared with the SAD of the upper area of the L-shape template. If the ratio of the two is greater than a certain threshold, the reference block corresponding to the Above template meets the fusion condition, otherwise no fusion is required; and the SAD of the Left template is compared with the SAD of the left area of the L-shape template. If the ratio of the two is greater than a certain threshold, the reference block corresponding to the Left template meets the fusion condition; otherwise no fusion is required.

以某种融合方式对满足融合条件的最佳“匹配参考块”进行融合,得到最终的匹配参考块,即当前待预测编码块的预测。融合方式可以有多种选择,比如:基于预定义的固定权重、基于模板匹配的SAD、基于位置依赖等。The best "matching reference blocks" that meet the fusion conditions are fused in a certain fusion method to obtain the final matching reference block, that is, the prediction of the current coding block to be predicted. There are many options for fusion methods, such as: based on predefined fixed weights, based on template matching SAD, based on position dependency, etc.

不同模式最佳“匹配参考块”的融合过程可由以下公式表示:The fusion process of the best “matching reference blocks” of different modes can be expressed by the following formula:

其中,n表示用于融合的最佳匹配参考块数,可以为2或3,表示不同IntraTMP模式(默认为L-shape、Above和Left IntraTMP)对应的最佳“匹配参考块”,wi表示相应模式下最佳匹配参考块的权重系数,如图10所示。Wherein, n represents the number of best matching reference blocks for fusion, which can be 2 or 3, indicating the best “matching reference blocks” corresponding to different IntraTMP modes (the default is L-shape, Above, and Left IntraTMP), and wi represents the weight coefficient of the best matching reference block in the corresponding mode, as shown in FIG10 .

步骤5:将多模式IntraTMP-fusion方法相关的语法元素传输至解码端。Step 5: Transmit the syntax elements related to the multi-mode IntraTMP-fusion method to the decoding end.

多模式IntraTMP-fusion方法的标识是intra_tmp_template_fusion_flag,位于CU级,此标识为1则启用多模式IntraTMP-fusion方法,否则启用传统IntraTMP。The identifier of the multi-mode IntraTMP-fusion method is intra_tmp_template_fusion_flag, which is located at the CU level. If this identifier is 1, the multi-mode IntraTMP-fusion method is enabled, otherwise the traditional IntraTMP is enabled.

另外在视频参数集(VPS,Video parameter set)、序列参数集(SPS,Sequenceparameter set)、图像参数集(PPS,Picture parameter set)、自适应参数集(APS,Adaptive parameter set)或SEI(Supplemental enhancement information)中的任一个或多个可增加额外的高层语法元素fusion_enabled,控制是否启用融合,比如:若在SPS增加sps_fusion_enabled融合标识,则可在序列级判断是否开启融合,若sps_fusion_enabled为0,则此序列的所有编码块都禁止启用融合,无需进一步判断CU级标识;若sps_fusion_enabled为1,则对每个编码块需要根据CU级标识intra_tmp_template_fusion_flag是否启用融合。In addition, an additional high-level syntax element fusion_enabled may be added to any one or more of the video parameter set (VPS), sequence parameter set (SPS), picture parameter set (PPS), adaptive parameter set (APS) or SEI (Supplemental enhancement information) to control whether fusion is enabled. For example, if the sps_fusion_enabled fusion flag is added to the SPS, it can be determined whether fusion is turned on at the sequence level. If sps_fusion_enabled is 0, fusion is prohibited for all coding blocks of this sequence, and there is no need to further determine the CU-level flag. If sps_fusion_enabled is 1, it is necessary to enable fusion for each coding block based on the CU-level flag intra_tmp_template_fusion_flag.

码流中需要传输这些语法元素给解码端,解码端接收到相关标识后,可以确定是否启用多模式IntraTMP-fusion方法,并按照编码端相同的操作完成正确的解码过程。These syntax elements need to be transmitted to the decoder in the bitstream. After receiving the relevant identifier, the decoder can determine whether to enable the multi-mode IntraTMP-fusion method and complete the correct decoding process according to the same operation as the encoder.

示例3:Example 3:

本示例详细阐述了图像编码过程中的另一种帧内预测方法,并将该种帧内预测方法称之为多模式多候选IntraTMP-fusion方法1,概括而言,首先对三种IntraTMP模式(L-shape、Above和Left)分别构造候选列表,每种模式的候选列表允许存在多个候选IntraTMPBVs,其中IntraTMP BV是由当前待预测编码块指向最佳对应参考块的矢量,参考图7,即不同IntraTMP BV对应于不同的参考块,这意味着每种模式能搜索或保存多个参考匹配参考块,同时每个候选列表中的候选IntraTMP BVs按照模板SAD升序排列。然后从不同模式的候选列表中分别选择一个最佳IntraTMP BV,以IntraTMP BV在候选列表中的索引进行标识,得到三种模式下的最佳“匹配参考块”;最后以某种最佳融合方式对不同模式的最佳“匹配参考块”进行融合,得到最终的匹配参考块,作为当前待预测编码块的预测。This example elaborates another intra-frame prediction method in the image coding process, and calls this intra-frame prediction method a multi-mode multi-candidate IntraTMP-fusion method 1. In summary, firstly, candidate lists are constructed for three IntraTMP modes (L-shape, Above and Left) respectively. The candidate list of each mode allows multiple candidate IntraTMPBVs, where IntraTMP BV is a vector pointing from the current coding block to the best corresponding reference block. Refer to Figure 7, that is, different IntraTMP BVs correspond to different reference blocks, which means that each mode can search or save multiple reference matching reference blocks, and the candidate IntraTMP BVs in each candidate list are arranged in ascending order according to the template SAD. Then, one best IntraTMP BV is selected from the candidate lists of different modes respectively, and the index of IntraTMP BV in the candidate list is used to identify it, and the best "matching reference block" in the three modes is obtained; finally, the best "matching reference blocks" of different modes are fused in a certain best fusion mode to obtain the final matching reference block as the prediction of the current coding block to be predicted.

步骤1:输入视频图像,划分成编码块CU。Step 1: Input video image and divide it into coding blocks CU.

步骤2:确定当前待预测编码块的帧内预测启用IntraTMP编码工具。Step 2: Determine that the intra-frame prediction of the current block to be predicted and coded uses the IntraTMP coding tool.

步骤3:对当前待预测编码块启用多模式多候选IntraTMP-fusion方法1,分别构建不同模式的候选列表。Step 3: Enable the multi-mode multi-candidate IntraTMP-fusion method 1 for the current block to be predicted and construct candidate lists of different modes respectively.

确定当前待预测编码块已经启用了IntraTMP编码工具后,对当前待预测编码块采用多模式多候选IntraTMP-fusion方法1,分别构建L-shape、Above和Left三种模板下的候选列表,构建候选列表时采用的搜索策略与传统IntraTMP一致,具体过程如下:After determining that the IntraTMP coding tool has been enabled for the current coding block to be predicted, the multi-mode multi-candidate IntraTMP-fusion method 1 is used for the current coding block to be predicted, and candidate lists under three templates of L-shape, Above and Left are constructed respectively. The search strategy used when constructing the candidate list is consistent with the traditional IntraTMP. The specific process is as follows:

首先在图2所示的R1~R4四个搜索区域中进行步长为2的粗搜索,计算参考块与当前待预测编码块的模板SAD,并以升序排列,搜索结束时初步确定前25个模板SAD较小的参考块,以IntraTMP BVs表示;然后对25个IntraTMP BVs指向的参考块逐一进行步长为1的细搜索,同样计算此时参考块与当前待预测编码块的模板SAD,并以升序排列,选择前10个IntraTMP BVs构建候选列表,这10个IntraTMP BVs指向的参考块即相应模式下的多个候选匹配参考块。需要注意的是,在选择前10个IntraTMP BVs时,若存在IntraTMP BV指向的参考块不可用,则应舍弃此IntraTMP BV,并从后续BVs中增加一个作为补充。First, a coarse search with a step length of 2 is performed in the four search areas R1 to R4 shown in Figure 2, and the template SAD of the reference block and the current coding block to be predicted is calculated and arranged in ascending order. At the end of the search, the first 25 reference blocks with smaller template SADs are preliminarily determined and represented by IntraTMP BVs; then a fine search with a step length of 1 is performed on the reference blocks pointed to by the 25 IntraTMP BVs one by one, and the template SAD of the reference block and the current coding block to be predicted is also calculated at this time, and arranged in ascending order, and the first 10 IntraTMP BVs are selected to build a candidate list. The reference blocks pointed to by these 10 IntraTMP BVs are multiple candidate matching reference blocks in the corresponding mode. It should be noted that when selecting the first 10 IntraTMP BVs, if there is a reference block pointed to by the IntraTMP BV that is unavailable, this IntraTMP BV should be discarded, and one should be added from the subsequent BVs as a supplement.

步骤4:根据候选BVs指向的参考块RDO决策,从不同模式的候选列表中分别选择一个最佳IntraTMP BV,确定相应模式的最佳匹配参考块。Step 4: According to the reference block RDO decision pointed to by the candidate BVs, select a best IntraTMP BV from the candidate lists of different modes respectively, and determine the best matching reference block of the corresponding mode.

在不同模式下构建完候选列表之后,需要对这10个IntraTMP BVs指向的参考块进行RDO决策,选择其中一个最佳IntraTMP BV,以其指向的参考块作为相应模式的最佳“匹配参考块”;同时需要在码流传输该最佳IntraTMP BV在候选列表中的索引intra_tmp_template_candidates1_idx,以此标识选择的最佳IntraTMP BV,便于解码端选择同样的IntraTMP BV完成解码。After building the candidate lists in different modes, it is necessary to make RDO decisions on the reference blocks pointed to by these 10 IntraTMP BVs, select one of the best IntraTMP BVs, and use the reference block it points to as the best "matching reference block" for the corresponding mode; at the same time, it is necessary to transmit the index intra_tmp_template_candidates1_idx of the best IntraTMP BV in the candidate list in the bitstream to identify the selected best IntraTMP BV, so that the decoding end can select the same IntraTMP BV to complete decoding.

步骤5:以某种最佳融合方式对最佳匹配参考块进行融合,作为当前待预测编码块的预测。Step 5: The best matching reference block is fused in some optimal fusion mode as the prediction of the current coding block to be predicted.

在融合不同模式的最佳“匹配参考块”之前,同样需要判断这些匹配参考块是否满足融合条件,主要有三种情况,与示例2的步骤4相同,此处不再赘述。Before fusing the best "matching reference blocks" of different modes, it is also necessary to determine whether these matching reference blocks meet the fusion conditions. There are mainly three situations, which are the same as step 4 of Example 2 and will not be repeated here.

以某种最佳融合方式对这些匹配参考块进行融合,得到的最终匹配参考块作为当前待预测编码块的预测,可参考后文示例5、6、7的实施方式,融合方式也有多种选择,这里也不再赘述。These matching reference blocks are fused in some optimal fusion method, and the final matching reference block obtained is used as the prediction of the current coding block to be predicted. Please refer to the implementation methods of Examples 5, 6, and 7 below. There are also many options for fusion methods, which will not be repeated here.

步骤6:将多模式多候选IntraTMP-fusion方法1相关的语法元素传输至解码端。Step 6: Transmit the syntax elements related to the multi-mode multi-candidate IntraTMP-fusion method 1 to the decoding end.

多模式多候选IntraTMP-fusion方法1涉及到以下语法元素:模式标识intra_tmp_template_candidates1_fusion_flag和不同模式候选列表中最佳IntraTMP BV的索引标识:intra_tmp_template_candidates1_LA_idx、intra_tmp_template_candidates1_A_idx以及intra_tmp_template_candidates1_L_idx,模式标识和索引标识均位于CU级,此模式标识为1则启用多模式多候选IntraTMP-fusion方法1,否则启用传统IntraTMP;索引标识是为了让解码端确定不同模式的最佳“匹配参考块”。The multi-mode multi-candidate IntraTMP-fusion method 1 involves the following syntax elements: mode identifier intra_tmp_template_candidates1_fusion_flag and index identifier of the best IntraTMP BV in different mode candidate lists: intra_tmp_template_candidates1_LA_idx, intra_tmp_template_candidates1_A_idx and intra_tmp_template_candidates1_L_idx. The mode identifier and index identifier are both at the CU level. If the mode identifier is 1, the multi-mode multi-candidate IntraTMP-fusion method 1 is enabled, otherwise the traditional IntraTMP is enabled; the index identifier is to allow the decoding end to determine the best "matching reference block" for different modes.

另外在VPS、SPS、PPS、APS或SEI中的任一个或多个可增加额外的高层语法元素fusion_enabled,控制是否启用融合,参考示例2的步骤5。In addition, an additional high-level syntax element fusion_enabled may be added to any one or more of VPS, SPS, PPS, APS or SEI to control whether fusion is enabled, refer to step 5 of Example 2.

码流中需传输这些语法元素,解码端接收到相关标识后,可以确定是否启用多模式多候选IntraTMP-fusion方法1,若启用则先根据三个索引标识确定不同模式的最佳“匹配参考块”,然后按照编码端相同的操作完成正确的解码过程。These syntax elements need to be transmitted in the bitstream. After receiving the relevant identifier, the decoder can determine whether to enable the multi-mode multi-candidate IntraTMP-fusion method 1. If enabled, the best "matching reference block" of different modes is first determined according to the three index identifiers, and then the correct decoding process is completed according to the same operation as the encoder.

示例4:Example 4:

本示例详细阐述了图像编码过程中的另一种帧内预测方法,并将该种帧内预测方法称之为多模式多候选IntraTMP-fusion方法2,概括而言,首先对三种IntraTMP模式(L-shape、Above和Left)分别构造候选列表,每种模式的候选列表允许存在多个候选IntraTMPBVs,同时每个候选列表中的候选IntraTMP BVs按照模板SAD升序排列;然后将同一候选列表的多个IntraTMP BVs指向的参考块进行融合,融合后的参考块作为相应模式的最佳“匹配参考块”;最后以某种最佳的融合方式实现不同模式最佳“匹配参考块”的融合,得到最终的匹配参考块,作为当前待预测编码块的预测。This example elaborates on another intra-frame prediction method in the image coding process, and calls this intra-frame prediction method a multi-mode multi-candidate IntraTMP-fusion method 2. In summary, firstly, candidate lists are constructed for the three IntraTMP modes (L-shape, Above and Left) respectively. The candidate list of each mode allows multiple candidate IntraTMPBVs, and the candidate IntraTMP BVs in each candidate list are arranged in ascending order according to the template SAD; then, the reference blocks pointed to by multiple IntraTMP BVs in the same candidate list are fused, and the fused reference block is used as the best "matching reference block" of the corresponding mode; finally, the best "matching reference blocks" of different modes are fused in an optimal fusion manner to obtain the final matching reference block as the prediction of the current coding block to be predicted.

步骤1:输入视频图像,划分成编码块CU。Step 1: Input video image and divide it into coding blocks CU.

步骤2:确定当前待预测编码块的帧内预测启用IntraTMP编码工具。Step 2: Determine that the intra-frame prediction of the current block to be predicted and coded uses the IntraTMP coding tool.

步骤3:对当前待预测编码块启用多模式多候选IntraTMP-fusion方法2,分别构建不同模式下的候选列表。Step 3: Enable the multi-mode multi-candidate IntraTMP-fusion method 2 for the current block to be predicted and construct candidate lists under different modes respectively.

候选列表的构建方式与多模式多候选IntraTMP-fusion方法1的步骤3基本相同,唯一的区别是:细搜索阶段只选择前5个IntraTMP BVs构建候选列表,这5个IntraTMP BVs指向的参考块即相应模式下的多个候选匹配参考块。The candidate list is constructed in the same way as step 3 of the multi-mode multi-candidate IntraTMP-fusion method 1. The only difference is that in the fine search stage, only the first five IntraTMP BVs are selected to construct the candidate list. The reference blocks pointed to by these five IntraTMP BVs are the multiple candidate matching reference blocks in the corresponding mode.

步骤4:融合不同模式候选列表的IntraTMP BVs指向的参考块,确定相应模式最佳匹配参考块。Step 4: Fuse the reference blocks pointed to by the IntraTMP BVs of different mode candidate lists to determine the best matching reference block for the corresponding mode.

对不同模式候选列表中的5个IntraTMP BVs指向的参考块分别进行融合,其结果作为相应模式的最佳“匹配参考块”。The reference blocks pointed to by the five IntraTMP BVs in the candidate lists of different modes are fused separately, and the results are used as the best “matching reference blocks” of the corresponding modes.

步骤5:以某种最佳融合方式,对最佳匹配参考块进行融合得到最终匹配参考块,作为当前待预测编码块的预测。Step 5: In some optimal fusion method, the best matching reference blocks are fused to obtain the final matching reference block as the prediction of the current coding block to be predicted.

在融合不同模式的最佳“匹配参考块”之前,同样需要判断这些匹配参考块是否满足融合条件,主要有三种情况,与示例2的步骤4相同,此处不再赘述。Before fusing the best "matching reference blocks" of different modes, it is also necessary to determine whether these matching reference blocks meet the fusion conditions. There are mainly three situations, which are the same as step 4 of Example 2 and will not be repeated here.

以某种最佳融合方式对这些匹配参考块进行融合,得到的最终匹配参考块作为当前待预测编码块的预测,可参考后文示例5、6、7的实施方式,融合方式也有多种选择,这里也不再赘述。These matching reference blocks are fused in some optimal fusion method, and the final matching reference block obtained is used as the prediction of the current coding block to be predicted. Please refer to the implementation methods of Examples 5, 6, and 7 below. There are also many options for fusion methods, which will not be repeated here.

步骤6:将多模式多候选IntraTMP-fusion方法2相关的语法元素传输至解码端。Step 6: Transmit syntax elements related to the multi-mode multi-candidate IntraTMP-fusion method 2 to the decoding end.

多模式多候选IntraTMP-fusion方法2涉及到以下语法元素:模式标识intra_tmp_template_candidates2_fusion_flag和候选项IntraTMP BVs的融合标识intra_tmp_template_bv_fusion_flag,模式标识和候选项融合标识均位于CU级,此模式标识为1则启用多模式多候选IntraTMP-fusion方法2,否则启用传统IntraTMP;候选项融合标识是为了指示解码端要对各模式候选项进行融合,确定不同模式的最佳“匹配参考块”。The multi-mode multi-candidate IntraTMP-fusion method 2 involves the following syntax elements: mode identifier intra_tmp_template_candidates2_fusion_flag and the fusion identifier of the candidate IntraTMP BVs intra_tmp_template_bv_fusion_flag. The mode identifier and the candidate fusion identifier are both at the CU level. If the mode identifier is 1, the multi-mode multi-candidate IntraTMP-fusion method 2 is enabled, otherwise the traditional IntraTMP is enabled; the candidate fusion identifier is to instruct the decoding end to fuse the mode candidates and determine the best "matching reference block" for different modes.

另外在VPS、SPS、PPS、APS或SEI中的任一个或多个可增加额外的高层语法元素fusion_enabled,控制是否启用融合,参考示例2的步骤5。In addition, an additional high-level syntax element fusion_enabled may be added to any one or more of VPS, SPS, PPS, APS or SEI to control whether fusion is enabled, refer to step 5 of Example 2.

码流中需传输这些语法元素,解码端接收到相关标识后,可以确定是否启用多模式多候选IntraTMP-fusion方法2,若启用则按照编码端相同的操作构建候选列表,并进行候选项指向参考块的融合,以及实现不同模式下最佳“匹配参考块”的融合,完成正确的解码过程。These syntax elements need to be transmitted in the bitstream. After receiving the relevant identifier, the decoder can determine whether to enable the multi-mode multi-candidate IntraTMP-fusion method 2. If enabled, the candidate list is constructed according to the same operation as the encoder, and the fusion of the candidate items pointing to the reference blocks is performed, and the fusion of the best "matching reference blocks" in different modes is realized to complete the correct decoding process.

示例5:Example 5:

本示例详细阐述了帧内预测方法中每个目标模板对应权重的确定过程。This example describes in detail the process of determining the weight corresponding to each target template in the intra-frame prediction method.

在本示例中,基于固定权重的融合是对三种模式下的最佳匹配参考块按照预定义的固定权重进行融合,最终得到用于预测当前待预测编码块的最佳匹配参考块,采用固定权重方法无需进行繁琐的权重计算,可大大减少复杂度。In this example, fixed-weight-based fusion is to fuse the best matching reference blocks in three modes according to predefined fixed weights, and finally obtain the best matching reference block for predicting the current coding block to be predicted. The fixed-weight method does not require tedious weight calculations and can greatly reduce complexity.

固定权重的设定有两种方式:There are two ways to set fixed weights:

基于模板的参考样本数确定固定权重,L-shape、Above和Left三种模式对应的权重为:其中W表示L-shape模板的宽度,即当前待预测编码块或Above模板的宽度,H表示L-shape模板的高度,即当前待预测编码块或Left模板的高度;The fixed weight is determined based on the number of reference samples of the template. The weights corresponding to the three modes of L-shape, Above and Left are: Where W represents the width of the L-shape template, that is, the width of the current coding block to be predicted or the Above template, and H represents the height of the L-shape template, that is, the height of the current coding block to be predicted or the Left template;

以常见系数值作为固定权重,比如:L-shape、Above和Left三种模式对应的权重为{22/64,21/64,21/64}。Use common coefficient values as fixed weights. For example, the weights corresponding to the three modes L-shape, Above, and Left are {22/64, 21/64, 21/64}.

示例6:Example 6:

本示例详细阐述了帧内预测方法中每个目标模板对应权重的确定过程。This example describes in detail the process of determining the weight corresponding to each target template in the intra-frame prediction method.

在本示例中,基于模板匹配SAD的融合是根据三种模板(L-shape、Above、Left)在当前待预测编码块和搜索区域的参考块之间的模板SAD来确定权重,令L-shape IntraTMP的SAD表示为Sad_LA,Above IntraTMP的SAD表示为Sad_A,Left IntraTMP的SAD表示为Sad_L,三种模式的模板样本数分别表示为n_LA、n_A和n_L,然后将三种模式的模板SAD基于各自的参考样本数量进行归一化,因为模板样本数会影响SAD值,归一化过程如下:In this example, the fusion based on template matching SAD determines the weight according to the template SAD of the three templates (L-shape, Above, Left) between the current coding block to be predicted and the reference block in the search area. Let the SAD of L-shape IntraTMP be Sad_LA, the SAD of Above IntraTMP be Sad_A, and the SAD of Left IntraTMP be Sad_L. The number of template samples of the three modes are n_LA, n_A, and n_L, respectively. Then, the template SADs of the three modes are normalized based on the number of their respective reference samples, because the number of template samples will affect the SAD value. The normalization process is as follows:

SAD1=Sad_LA/n_LASAD1=Sad_LA/n_LA

SAD2=Sad_A/n_ASAD2=Sad_A/n_A

SAD3=Sad_L/n_LSAD3=Sad_L/n_L

完成归一化之后,可由下式确定各自模板的权重:After normalization, the weight of each template can be determined by the following formula:

其中n表示用于融合的最佳匹配参考块数,可以为2或3,表示不同模式下的归一化模板SAD,表示相应模式下的权重系数;另外计算权重时涉及除法操作,为了减少复杂度采用查表法代替除法操作。Where n represents the number of best matching reference blocks for fusion, which can be 2 or 3, represents the normalized template SAD under different modes, and represents the weight coefficient under the corresponding mode. In addition, the calculation of weights involves division operations. In order to reduce the complexity, a table lookup method is used instead of a division operation.

示例7:Example 7:

本示例详细阐述了帧内预测方法中每个目标模板对应权重的确定过程。This example describes in detail the process of determining the weight corresponding to each target template in the intra-frame prediction method.

在本示例中,基于位置依赖的融合是考虑到预测像素位置距离模板远近的影响,若某预测像素的位置距离当前待预测编码块上方区域更近,即更靠近Above模板,则需要将Above模板对应参考块的权重赋予更大的系数值,相应地需要同步减小L-shape模板上方区域的权重系数,这意味着该预测像素更加依赖Above模板;反之,即某预测像素位置距离当前待预测编码块上方区域更远,则Above模板对应参考块的权重需要赋予更小的系数值,且同步增大L-shape模板上方区域的权重系数。同理,若某预测像素的位置距离当前待预测编码块左侧区域更近,即更靠近Left模板,则需要将Left模板对应参考块的权重赋予更大的系数值,相应地同步减小L-shape模板左侧区域的权重系数;反之,即某预测像素位置距离当前待预测编码块左侧区域更远,则Left模板对应参考块的权重需要赋予更小的系数值,且同步增大L-shape模板左侧区域的权重系数。In this example, the fusion based on position dependence takes into account the influence of the distance between the predicted pixel position and the template. If the position of a certain predicted pixel is closer to the area above the current block to be predicted, that is, closer to the Above template, the weight of the reference block corresponding to the Above template needs to be assigned a larger coefficient value, and the weight coefficient of the area above the L-shape template needs to be reduced synchronously, which means that the predicted pixel is more dependent on the Above template; on the contrary, that is, the position of a certain predicted pixel is farther from the area above the current block to be predicted, the weight of the reference block corresponding to the Above template needs to be assigned a smaller coefficient value, and the weight coefficient of the area above the L-shape template needs to be increased synchronously. Similarly, if the position of a certain predicted pixel is closer to the left area of the current block to be predicted, that is, closer to the Left template, the weight of the reference block corresponding to the Left template needs to be assigned a larger coefficient value, and the weight coefficient of the area on the left of the L-shape template needs to be reduced synchronously; on the contrary, that is, the position of a certain predicted pixel is farther from the left area of the current block to be predicted, the weight of the reference block corresponding to the Left template needs to be assigned a smaller coefficient value, and the weight coefficient of the area on the left of the L-shape template needs to be increased synchronously.

需要注意的是,预测像素的位置是二维的,即包含水平位置(x,即距离当前待预测编码块左侧边界的位置)和垂直位置(y,即距离当前待预测编码块上方边界的位置),这意味着对于某预测像素而言,需要同时考虑垂直距离和水平距离对权重的影响,即需要分别讨论预测像素依赖于Above模板和Left模板的程度,确定L-shape、Above和Left不同模板相应的权重系数,最后选择最佳的融合方式实现不同模式(通常为三个模式)对应参考块的融合,作为当前待预测编码块的预测。It should be noted that the position of the predicted pixel is two-dimensional, that is, it includes the horizontal position (x, that is, the position from the left boundary of the current coding block to be predicted) and the vertical position (y, that is, the position from the upper boundary of the current coding block to be predicted). This means that for a certain predicted pixel, it is necessary to consider the influence of vertical distance and horizontal distance on the weight at the same time, that is, it is necessary to discuss the degree to which the predicted pixel depends on the Above template and the Left template respectively, determine the corresponding weight coefficients of different templates of L-shape, Above and Left, and finally select the best fusion method to realize the fusion of reference blocks corresponding to different modes (usually three modes) as the prediction of the current coding block to be predicted.

具体步骤如下:The specific steps are as follows:

步骤一:确定不同模式(通常为三种模式:L-shape、Above和Left IntraTMP)的模板SAD;Step 1: Determine the template SAD of different modes (usually three modes: L-shape, Above, and Left IntraTMP);

在搜索不同IntraTMP模式的最佳“匹配参考块”时,可以得知各模式参考匹配参考块模板与当前待预测编码块模板之间的SAD,如图11所示,令a0表示L-shape IntraTMP模式上边区域的模板SAD,b0表示L-shape IntraTMP模式左边区域的模板SAD,a1表示AboveIntraTMP模式的模板SAD,b1表示Left IntraTMP模式的模板SAD。When searching for the best "matching reference block" of different IntraTMP modes, the SAD between the reference matching reference block template of each mode and the current coding block template to be predicted can be obtained, as shown in Figure 11, let a0 represent the template SAD of the upper area of the L-shape IntraTMP mode, b0 represent the template SAD of the left area of the L-shape IntraTMP mode, a1 represent the template SAD of the AboveIntraTMP mode, and b1 represent the template SAD of the Left IntraTMP mode.

首先,根据以上不同模式的模板SAD得到L-shape、Above和Left模板的基础权重值,作为基于location-dependent融合的权重基值:First, according to the SAD of the templates in different modes above, the basic weight values of the L-shape, Above and Left templates are obtained as the weight base values based on location-dependent fusion:

步骤二:由预测像素位置确定不同模式对应的权重值;Step 2: Determine the weight values corresponding to different modes based on the predicted pixel positions;

若预测像素位置为(x,y),其中x表示此像素位置与当前待预测编码块左侧边界的距离,即与Left模板区域的距离,y表示此像素位置与当前待预测编码块上方边界的距离,即与Above模板区域的距离,那么依赖于L-shape、Above和Left模板的权重分别为:If the predicted pixel position is (x, y), where x represents the distance between the pixel position and the left boundary of the current block to be predicted, that is, the distance from the Left template area, and y represents the distance between the pixel position and the upper boundary of the current block to be predicted, that is, the distance from the Above template area, then the weights that depend on the L-shape, Above, and Left templates are:

其中BlkH和BlkW分别表示当前待预测编码块的高度和宽度,Δi是一个预定义的范围,与基础权重值和位置依赖权重部分的偏差有关,比如:wLAbase和wLAloc的偏差,Δi值越大,表示当前待预测编码块依赖位置的权重越大。Where BlkH and BlkW represent the height and width of the current coding block to be predicted, respectively. Δi is a predefined range related to the deviation between the base weight value and the position-dependent weight part, such as the deviation between w LAbase and w LAloc . The larger the Δi value, the greater the weight of the current coding block to be predicted that depends on the position.

考虑到不同IntraTMP模式均受到基础权重的影响,因此三种不同模式下(L-shape、Above和Left IntraTMP模式)依赖于位置的权重分别为:Considering that different IntraTMP modes are affected by the basic weight, the position-dependent weights in the three different modes (L-shape, Above, and Left IntraTMP modes) are:

步骤三:计算不同模式下的参考块与相应权重系数值的融合,作为当前待预测编码块的预测。Step 3: Calculate the fusion of reference blocks in different modes and corresponding weight coefficient values as the prediction of the current coding block to be predicted.

由三种模式对应的参考块和相应的权重系数值进行融合,实现当前待预测编码块的预测:The reference blocks corresponding to the three modes and the corresponding weight coefficient values are fused to achieve the prediction of the current coding block to be predicted:

pfusion=wLA*pL-shape+wA*pAbove+wL*pLeft p fusion =w LA *p L-shape +w A *p Above +w L *p Left

在本申请前述实施例中,描述了编码端执行的图像编码过程,对应的,在本申请下述实施例中,将描述解码端执行的图像解码过程。In the aforementioned embodiments of the present application, the image encoding process performed by the encoding end is described. Correspondingly, in the following embodiments of the present application, the image decoding process performed by the decoding end will be described.

图12为本申请实施例提供的一种图像解码方法的流程图。如图12所示,图像编码方法包括但不限于S600、S700、S800、S900。需要说明的是,本申请实施例不对下述步骤做严格限定。Fig. 12 is a flow chart of an image decoding method provided by an embodiment of the present application. As shown in Fig. 12, the image encoding method includes but is not limited to S600, S700, S800, and S900. It should be noted that the embodiment of the present application does not strictly limit the following steps.

S600:解析码流,得到待预测解码块对应的残差值。S600: Parse the bitstream to obtain a residual value corresponding to the to-be-predicted decoding block.

在本步骤中,解码器读取码流(比特流),处理网络适配层(NAL,NetworkAbstraction Layer)进行网络适配层单元(NALU,Network Abstraction Layer Unit)的读取,检查NALU是否正常,若正常表示码流中输入一帧新图片,需要解码新图像;否则表示没有输入新图像。当读取到有待解码的新图像时,能够获得用于图像重建的残差值,残差值的获取过程不是本申请重点说明的内容,因此在此不做赘述。In this step, the decoder reads the code stream (bit stream), processes the network adaptation layer (NAL, Network Abstraction Layer) to read the network adaptation layer unit (NALU, Network Abstraction Layer Unit), and checks whether the NALU is normal. If it is normal, it means that a new frame of picture is input into the code stream and the new image needs to be decoded; otherwise, it means that no new image is input. When a new image to be decoded is read, the residual value for image reconstruction can be obtained. The process of obtaining the residual value is not the focus of this application, so it will not be described here.

解码器对解码出的一帧进行环路滤波,以及一系列析构操作,并根据不同NAL类型进行不同类型的解码;解码器对一帧图片解码时,先遍历slice再遍历各个CTU,针对每个CTU需要进行划分得到编码块CUs。在对每个CU进行解码前,需要检查当前CU是否为Skip模式、调色板模式,是否为帧内或帧间等预测模式;确定当前CU使用帧内预测模式后,检查传统IntraTMP模式的CU级标识是否启用。在确定当前CU启用传统IntraTMP模式后,即tmp_enabled_flag=1;再检查当前CU启用了哪一种IntraTMP-fusion方法,这可由该方法的相关语法元素确定。在确定当前待预测编码块的帧内预测启用IntraTMP编码工具后,就可以确定对当前待预测编码块对应的三种形状的目标模板,分别为L-shape模板、Above模板和Left模板。The decoder performs loop filtering and a series of decomposition operations on the decoded frame, and performs different types of decoding according to different NAL types; when the decoder decodes a frame of an image, it first traverses the slice and then traverses each CTU, and each CTU needs to be divided to obtain coding blocks CUs. Before decoding each CU, it is necessary to check whether the current CU is in Skip mode, palette mode, intra-frame or inter-frame prediction mode; after determining that the current CU uses intra-frame prediction mode, check whether the CU-level flag of the traditional IntraTMP mode is enabled. After determining that the current CU enables the traditional IntraTMP mode, that is, tmp_enabled_flag = 1; then check which IntraTMP-fusion method is enabled for the current CU, which can be determined by the relevant syntax elements of the method. After determining that the IntraTMP encoding tool is enabled for the intra-frame prediction of the current coding block to be predicted, the three shapes of target templates corresponding to the current coding block to be predicted can be determined, namely L-shape template, Above template and Left template.

需要说明的是,本申请实施例中采用三种形状的目标模板为例进行说明,但是在实际使用中,可能会采用其他形状的目标模板,或者,同时使用小于三种或者超过三种的目标模板进行预测,本申请实施例在此不做限制。It should be noted that the embodiment of the present application uses target templates of three shapes as an example for illustration, but in actual use, target templates of other shapes may be used, or less than three or more than three target templates may be used for prediction at the same time, and the embodiment of the present application does not limit this.

S700:根据多个目标模板,在已重建区域中确定每个模板对应的匹配参考块,并对至少一个参考块进行融合,得到测解码块对应的预测值;其中,已预测解码块对应的区域为已重建区域。S700: According to multiple target templates, determine a matching reference block corresponding to each template in the reconstructed area, and fuse at least one reference block to obtain a prediction value corresponding to the predicted decoding block; wherein the area corresponding to the predicted decoding block is the reconstructed area.

在本步骤中,利用确定的多个目标模板,在已重建区域中确定每个目标模板对应的匹配参考块,由于目标模板具有多个,因此得到的匹配参考块就有多个。匹配参考块可以理解为是目标模板对应的最佳“匹配参考块”,根据不同的需求和定义,最佳“匹配参考块”的确定方法可能不同,在确定了每个目标模板对应的匹配参考块后,也可能需要对这些匹配参考块进行筛选,以获得满足融合条件的匹配参考块,而那些不满足融合条件的匹配参考块,就会被舍弃。接着,对这些满足融合条件的匹配参考块进行融合,得到待预测编码块对应的帧内预测值。In this step, the matching reference blocks corresponding to each target template are determined in the reconstructed area using the determined multiple target templates. Since there are multiple target templates, there are multiple matching reference blocks. The matching reference block can be understood as the best "matching reference block" corresponding to the target template. According to different requirements and definitions, the method for determining the best "matching reference block" may be different. After determining the matching reference block corresponding to each target template, it may also be necessary to screen these matching reference blocks to obtain matching reference blocks that meet the fusion conditions, and those matching reference blocks that do not meet the fusion conditions will be discarded. Next, these matching reference blocks that meet the fusion conditions are fused to obtain the intra-frame prediction value corresponding to the coding block to be predicted.

需要说明的是,解码端的匹配参考块的确定过程以及匹配参考块的融合过程与编码端相同,因此,采用下述实施例进行简要说明。It should be noted that the process of determining the matching reference block and the process of fusing the matching reference blocks at the decoding end are the same as those at the encoding end, and therefore, the following embodiment is used for a brief description.

首先,在已重建区域中,每个目标模板一般能够找到其对应的多个参考模板,对于参考模板的搜索策略可以有多种。的然后在搜索到每个参考模板后,会对参考模板与其目标模板的相似程度进行计算,相似程度用于筛选哪些参考模板对应的候选参考块是匹配参考块。最后,通过对候选参考块进一步筛选,为每个目标模板确定一个匹配参考块。需要注意的是,最终得到的每个目标模板对应的匹配参考块可以是从候选参考块中直接选择得到的,也可以是对候选参考块进行进一步处理后得到的。First, in the reconstructed area, each target template can generally find multiple reference templates corresponding to it, and there can be multiple search strategies for reference templates. Then, after searching for each reference template, the similarity between the reference template and its target template is calculated, and the similarity is used to screen which candidate reference blocks corresponding to the reference template are matching reference blocks. Finally, by further screening the candidate reference blocks, a matching reference block is determined for each target template. It should be noted that the matching reference block corresponding to each target template obtained in the end can be directly selected from the candidate reference blocks, or it can be obtained after further processing of the candidate reference blocks.

在一实施例中,先在已重建区域中进行确定步长的搜索,得到多个候选参考块,然后再对候选参考块的匹配程度进行计算,从中选择一个作为匹配参考块。In one embodiment, a search with a determined step length is first performed in the reconstructed area to obtain a plurality of candidate reference blocks, and then the matching degrees of the candidate reference blocks are calculated, and one of them is selected as a matching reference block.

在另一实施例中,采用IntraTMP现有的搜索策略,先在已重建区域中进行步长为2的粗搜索,初步确定此粗搜索过程对应的中间过程匹配参考块,然后在确定的中间过程匹配参考块周围进行步长为1的细搜索,此时搜索区域限定为当前待预测编码块一半宽度或高度的最小值:min(BlkW,BlkH)/2,确定最终的匹配参考块,也就是目标模板对应的匹配参考块。In another embodiment, the existing search strategy of IntraTMP is adopted, and a coarse search with a step size of 2 is first performed in the reconstructed area to preliminarily determine the intermediate process matching reference block corresponding to this coarse search process, and then a fine search with a step size of 1 is performed around the determined intermediate process matching reference block. At this time, the search area is limited to the minimum value of half the width or height of the current predicted coding block: min(BlkW, BlkH)/2, and the final matching reference block, that is, the matching reference block corresponding to the target template, is determined.

在另一实施例中,在确定每个目标模板对应的多个候选参考块后,根据这些候选参考块,构建每个目标模板对应的候选列表,每个目标模板的候选列表允许存在多个候选块向量IntraTMP BVs,其中IntraTMP BV是由当前待预测编码块指向的匹配参考块的矢量。不同IntraTMP BV对应于不同的参考块,这意味着每种目标模板能搜索或保存多个候选参考块,同时每个候选列表中的候选IntraTMP BVs按照模板SAD升序排列。然后对每个候选列表中块向量指向的候选参考块进行率失真决策,确定每个目标模板对应的匹配参考块。In another embodiment, after determining a plurality of candidate reference blocks corresponding to each target template, a candidate list corresponding to each target template is constructed based on these candidate reference blocks, and the candidate list of each target template allows the existence of multiple candidate block vectors IntraTMP BVs, where IntraTMP BV is a vector of a matching reference block pointed to by the current coding block to be predicted. Different IntraTMP BVs correspond to different reference blocks, which means that each target template can search or save multiple candidate reference blocks, and the candidate IntraTMP BVs in each candidate list are arranged in ascending order according to the template SAD. Then, a rate-distortion decision is made for the candidate reference blocks pointed to by the block vector in each candidate list to determine the matching reference blocks corresponding to each target template.

需要说明的是,绝对误差和SAD是图像块之间的相似度的量度。通过取原始块中的每个像素与用于比较的块中的相应像素之间的绝对差来计算。将这些差值相加以创建块相似度的简单度量,差异图像的L1范数或两个图像块之间的曼哈顿距离。绝对差的和可以用于各种目的,例如对象识别,立体图像的视差图的生成以及用于视频压缩的运动估计。在本申请实施例中,采用计算SAD值来进行块之间相似度的度量仅为示例性说明,在实际应用场景中,还可以采用其他度量算法,例如误差的平方和(SSD,sum of squared differences)算法或半全局匹配(SGM,semi—global matching)算法等,本申请实施例在此不做限制。It should be noted that the absolute error and SAD are measures of similarity between image blocks. It is calculated by taking the absolute difference between each pixel in the original block and the corresponding pixel in the block used for comparison. These differences are added to create a simple measure of block similarity, the L1 norm of the difference image or the Manhattan distance between two image blocks. The sum of absolute differences can be used for various purposes, such as object recognition, generation of disparity maps for stereo images, and motion estimation for video compression. In the embodiment of the present application, the use of calculating the SAD value to measure the similarity between blocks is only an exemplary explanation. In actual application scenarios, other measurement algorithms can also be used, such as the sum of squared differences (SSD) algorithm or the semi-global matching (SGM) algorithm, etc., and the embodiment of the present application is not limited here.

在另一实施例中,在确定每个目标模板对应的多个候选参考块后,根据这些候选参考块,构建每个目标模板对应的候选列表,每个目标模板的候选列表允许存在多个候选块向量IntraTMP BVs,其中IntraTMP BV是由当前待预测编码块指向的匹配参考块的矢量。与上一实施例的区别之处在于,在本实施例中,先对每个候选列表中块向量指向的候选参考块进行融合,将融合后的得到的参考块确定为每个目标模板对应的匹配参考块。In another embodiment, after determining multiple candidate reference blocks corresponding to each target template, a candidate list corresponding to each target template is constructed based on these candidate reference blocks, and the candidate list of each target template allows the existence of multiple candidate block vectors IntraTMP BVs, where IntraTMP BV is a vector of a matching reference block pointed to by the current coding block to be predicted. The difference from the previous embodiment is that in this embodiment, the candidate reference blocks pointed to by the block vectors in each candidate list are first fused, and the fused reference blocks are determined as matching reference blocks corresponding to each target template.

在确定每个目标模板对应的匹配参考块后,需要对这些匹配参考块进行融合,进而得到待预测参考块对应的帧内预测值,而在融合之前,需要选定满足融合条件的匹配参考块,并将这些满足融合条件的匹配参考块称为待融合参考块。After determining the matching reference blocks corresponding to each target template, these matching reference blocks need to be fused to obtain the intra-frame prediction values corresponding to the reference blocks to be predicted. Before fusion, matching reference blocks that meet the fusion conditions need to be selected, and these matching reference blocks that meet the fusion conditions are called reference blocks to be fused.

下面对如何确定待融合参考块进行具体说明。The following is a detailed description of how to determine the reference block to be fused.

在一实施例中,根据所有目标模板匹配得到的所有匹配参考块均相同,在此种情况下,可以选择任意一个匹配参考块作为待融合参考块,换句话说,可以无需融合,而按照传统IntraTMP处理。In one embodiment, all matching reference blocks obtained by matching all target templates are the same. In this case, any matching reference block can be selected as the reference block to be fused. In other words, there is no need for fusion and traditional IntraTMP processing can be used.

在另一实施例中,存在至少两个匹配参考块不相同,在此种情况下,根据预设算法,确定至少两个不相同的匹配参考块对应的目标模板之间的差异程度,并根据差异程度,选择至少一个匹配参考块作为待融合参考块。In another embodiment, there are at least two different matching reference blocks. In this case, according to a preset algorithm, the degree of difference between the target templates corresponding to the at least two different matching reference blocks is determined, and according to the degree of difference, at least one matching reference block is selected as the reference block to be fused.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,两个匹配参考块相同,另一个不同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:确定两个不相同的匹配参考块对应的目标模板为待比较模板,然后分别确定两个待比较模板对应的绝对误差和,且两个待比较模板对应的绝对误差和的差异程度大于预设阈值,在此种情况下,选择两个匹配参考块共同作为待融合参考块。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, two matching reference blocks are the same and the other is different. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, an absolute error sum algorithm is used to measure the degree of difference. The specific process includes: determining the target templates corresponding to the two different matching reference blocks as the templates to be compared, and then respectively determining the absolute error sums corresponding to the two templates to be compared, and the degree of difference between the absolute error sums corresponding to the two templates to be compared is greater than a preset threshold. In this case, the two matching reference blocks are selected together as the reference blocks to be fused.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,两个匹配参考块相同,另一个不同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:确定两个不相同的匹配参考块对应的目标模板为待比较模板,然后分别确定两个待比较模板对应的绝对误差和,且两个待比较模板对应的绝对误差和的差异程度小于预设阈值,在此种情况下,选择一个匹配参考块共同作为待融合参考块。可以理解的是,在实际应用场景中,往往会选择SAD值更小的模板对应的匹配参考块作为待融合参考块,也就是说,SAD值更大的模板对应的匹配参考块被放弃,不参与融合。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, two matching reference blocks are the same and the other is different. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, the absolute error sum algorithm is used to measure the degree of difference. The specific process includes: determining the target templates corresponding to the two different matching reference blocks as the templates to be compared, and then respectively determining the absolute error sums corresponding to the two templates to be compared, and the degree of difference between the absolute error sums corresponding to the two templates to be compared is less than a preset threshold. In this case, a matching reference block is selected as the reference block to be fused. It can be understood that in actual application scenarios, the matching reference block corresponding to the template with a smaller SAD value is often selected as the reference block to be fused, that is, the matching reference block corresponding to the template with a larger SAD value is abandoned and does not participate in the fusion.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,三个匹配参考块相互之间均不相同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:在所有不相同的匹配参考块对应的目标模板中,确定一个基准模板与剩余多个非基准模板,然后确定基准模板与每个非基准模板对应的绝对误差和,接着将基准模板对应的绝对误差和与每个非基准模板对应的绝对误差和进行逐一比对,得出两者对应的绝对误差和的差异程度大于预设阈值,在此种情况下,将基准模板与非基准模板对应的匹配参考块作为待融合参考块。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, the three matching reference blocks are different from each other. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, an absolute error sum algorithm is used to measure the degree of difference. The specific process includes: among the target templates corresponding to all the different matching reference blocks, a reference template and the remaining multiple non-reference templates are determined, and then the absolute error sum corresponding to the reference template and each non-reference template is determined, and then the absolute error sum corresponding to the reference template and the absolute error sum corresponding to each non-reference template are compared one by one, and it is obtained that the difference degree of the absolute error sum corresponding to the two is greater than a preset threshold. In this case, the matching reference blocks corresponding to the reference template and the non-reference template are used as reference blocks to be fused.

在一个更为具体的实施例中,在三个目标模板对应的三个匹配参考块中,三个匹配参考块相互之间均不相同,为了比较不相同的匹配参考块对应的目标模板之间的差异程度,采用绝对误差和算法对差异程度进行度量,具体过程包括:在所有不相同的匹配参考块对应的目标模板中,确定一个基准模板与剩余多个非基准模板,然后确定基准模板与每个非基准模板对应的绝对误差和,接着将基准模板对应的绝对误差和与每个非基准模板对应的绝对误差和进行逐一比对,得出两者对应的绝对误差和的差异程度小于预设阈值,在此种情况下,仅将基准模板对应的匹配参考块作为待融合参考块,也就是说,非基准模板对应的匹配参考块被放弃,不参与融合。In a more specific embodiment, among the three matching reference blocks corresponding to the three target templates, the three matching reference blocks are different from each other. In order to compare the degree of difference between the target templates corresponding to the different matching reference blocks, an absolute error sum algorithm is used to measure the degree of difference. The specific process includes: among the target templates corresponding to all the different matching reference blocks, a reference template and the remaining multiple non-reference templates are determined, and then the absolute error sum corresponding to the reference template and each non-reference template is determined, and then the absolute error sum corresponding to the reference template and the absolute error sum corresponding to each non-reference template are compared one by one, and it is obtained that the difference degree of the absolute error sum corresponding to the two is less than a preset threshold. In this case, only the matching reference block corresponding to the reference template is used as the reference block to be fused, that is, the matching reference block corresponding to the non-reference template is abandoned and does not participate in the fusion.

可以理解的是,上述实施例中,通过筛选出满足融合条件的待融合参考块,在一些情形中可以减少融合的匹配参考块的数量,能够整体提升融合效率。It can be understood that in the above embodiments, by screening out reference blocks to be fused that meet the fusion conditions, the number of matching reference blocks to be fused can be reduced in some cases, which can improve the overall fusion efficiency.

在确定待融合参考块以后,可以开启参考块的融合。下面对如何融合这些待融合参考块进行具体说明。After determining the reference blocks to be fused, the fusion of the reference blocks can be started. The following is a detailed description of how to fuse these reference blocks to be fused.

首先,根据帧内模板融合权重,确定每个目标模板对应的目标融合权重。First, the target fusion weight corresponding to each target template is determined according to the intra-frame template fusion weight.

在一实施例中,可以为每个目标模板确定固定的目标融合权重,例如,为每个目标模板设置确定的预设目标融合权重,预设目标融合权重可以为常见系数值,如L-shape、Above和Left三种模式对应的权重为{22/64,21/64,21/64}。In one embodiment, a fixed target fusion weight may be determined for each target template. For example, a certain preset target fusion weight may be set for each target template. The preset target fusion weight may be a common coefficient value, such as {22/64, 21/64, 21/64} corresponding to the three modes of L-shape, Above and Left.

在另一实施例中,可以根据目标模板包括的样本数量,确定预设目标融合权重,这里的样本数量,可以理解为像素数量,例如,L-shape、Above和Left三种模式对应的目标融合权重为:其中W表示L-shape模板的宽度,即当前待预测解码块或Above模板的宽度,H表示L-shape模板的高度,即当前待预测解码块或Left模板的高度。In another embodiment, the preset target fusion weight may be determined according to the number of samples included in the target template. The number of samples here may be understood as the number of pixels. For example, the target fusion weights corresponding to the three modes of L-shape, Above and Left are: Where W represents the width of the L-shape template, that is, the width of the current decoding block to be predicted or the Above template, and H represents the height of the L-shape template, that is, the height of the current decoding block to be predicted or the Left template.

在另一实施例中,帧内模板融合权重可以根据目标模板对应的绝对误差和以及样本数量确定,具体过程包括:分别确定每个目标模板对应的目标绝对误差和以及每个目标模板包括的目标样本数量,然后根据目标模板的SAD与目标样本数量,对每个目标模板对应的SAD进行归一化处理,得到每个目标模板对应的归一化SAD,然后对所有归一化SAD求和得到归一化绝对误差总和,接着根据每个目标模板对应的归一化SAD与归一化绝对误差总和,确定每个目标模板对应的目标融合权重。其中,每个目标模板对应的归一化SAD可以根据目标模板的SAD与目标样本数量的比值得到。可以理解的是,对每个目标模板SAD进行归一化处理能够使得SAD值不受到模板中包含的样本数量的影响,从而保证权重计算的准确性。In another embodiment, the intra-frame template fusion weight can be determined according to the absolute error and the number of samples corresponding to the target template. The specific process includes: respectively determining the target absolute error and the target number of samples included in each target template, and then normalizing the SAD corresponding to each target template according to the SAD of the target template and the target number of samples to obtain the normalized SAD corresponding to each target template, and then summing all normalized SADs to obtain the normalized absolute error sum, and then determining the target fusion weight corresponding to each target template according to the normalized SAD corresponding to each target template and the normalized absolute error sum. Among them, the normalized SAD corresponding to each target template can be obtained according to the ratio of the SAD of the target template to the target number of samples. It can be understood that normalizing the SAD of each target template can make the SAD value not affected by the number of samples contained in the template, thereby ensuring the accuracy of the weight calculation.

在另一实施例中,帧内模板融合权重可以根据待预测解码块中的待预测像素与目标模本之间的位置关系确定,具体过程包括:确定每个目标模板对应的目标绝对误差和,并根据目标绝对误差和确定每个目标模板对应的权重基值,然后确定待预测像素与每个目标模板之间的目标位置关系,并根据目标位置关系确定每个目标模板对应的权重相对值,接着根据权重基值与权重相对值,确定每个目标模板对应的目标融合权重。In another embodiment, the intra-frame template fusion weight can be determined based on the positional relationship between the pixel to be predicted in the decoded block to be predicted and the target template. The specific process includes: determining the target absolute error sum corresponding to each target template, and determining the weight base value corresponding to each target template based on the target absolute error sum, and then determining the target positional relationship between the pixel to be predicted and each target template, and determining the weight relative value corresponding to each target template based on the target positional relationship, and then determining the target fusion weight corresponding to each target template based on the weight base value and the weight relative value.

接下来,根据每个目标模板对应的目标融合权重,对所有目标模板对应的待融合参考块进行加权计算,得到待预测解码块对应的帧内预测值。Next, according to the target fusion weight corresponding to each target template, weighted calculation is performed on the reference blocks to be fused corresponding to all target templates to obtain the intra-frame prediction value corresponding to the decoded block to be predicted.

S800:根据待预测参考块的预测值与残差值,得到待预测解码块对应的解码值。S800: Obtain a decoding value corresponding to a decoding block to be predicted according to a prediction value and a residual value of a reference block to be predicted.

S900:根据解码值获得待预测解码块的解码恢复值。S900: Obtain a decoding recovery value of a to-be-predicted decoding block according to the decoding value.

步骤S800与S900不是本申请实施例所要重点说明的内容,因此不做赘述。Steps S800 and S900 are not the key points of the embodiment of the present application, and thus will not be described in detail.

根据本申请实施例提供的图像编码方法,编码端在传输用于帧内模板融合的指示信息时,会分成两种主要情形:一种是隐式融合,即无需传输块级帧内模板融合标识给解码端,另一种是传输块级帧内模板融合标识给解码端。下面针对两种指示融合的方式进行详细说明。According to the image encoding method provided by the embodiment of the present application, when the encoder transmits the indication information for intra-frame template fusion, there are two main situations: one is implicit fusion, that is, there is no need to transmit the block-level intra-frame template fusion identifier to the decoding end, and the other is to transmit the block-level intra-frame template fusion identifier to the decoding end. The following describes in detail the two ways of indicating fusion.

下面先对隐式融合进行说明:The following is an explanation of implicit fusion:

在一实施例中,在确定匹配参考块时,采用从多个候选参考块中直接选择一个作为目标模板对应的匹配参考块的方法,编码端可以不传输任何信息给解码端,解码端就可以自动采用同样的方法去确定匹配参考块,从而完成解码。In one embodiment, when determining a matching reference block, a method is adopted in which one is directly selected from a plurality of candidate reference blocks as a matching reference block corresponding to a target template. The encoding end need not transmit any information to the decoding end, and the decoding end can automatically adopt the same method to determine the matching reference block, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对列表中块向量指向的候选参考块的再决策确定匹配参考块的方法,编码端可以传输块向量索引值给解码端,解码端就可以根据此块向量索引值确定匹配参考块,从而完成解码。In one embodiment, when determining the matching reference block, a candidate list corresponding to each target template is constructed, and a method of re-deciding the matching reference block based on the candidate reference block pointed to by the block vector in the list is adopted. The encoding end can transmit the block vector index value to the decoding end, and the decoding end can determine the matching reference block based on the block vector index value, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对每个候选列表中块向量指向的候选参考块进行融合,从而确定匹配参考块的方法,编码端可以传输帧内模板参考块向量融合标识给解码端,解码端就可以根据此帧内模板参考块向量融合标识确定是否开启候选参考块的融合,从而完成解码。In one embodiment, when determining a matching reference block, a method is adopted for determining a matching reference block by constructing a candidate list corresponding to each target template and fusing the candidate reference blocks pointed to by the block vector in each candidate list. The encoding end can transmit an intra-frame template reference block vector fusion identifier to the decoding end, and the decoding end can determine whether to enable the fusion of the candidate reference blocks based on the intra-frame template reference block vector fusion identifier, thereby completing decoding.

上述实施例提供的采用隐式融合的图像编码方法能够在一定程度上节约传输比特。The image coding method using implicit fusion provided in the above embodiment can save transmission bits to a certain extent.

下面先对非隐式融合进行说明:The following first explains non-implicit fusion:

在一实施例中,在确定匹配参考块时,采用从多个候选参考块中直接选择一个作为目标模板对应的匹配参考块的方法,编码端通过传输高层语法元素融合标识与块级帧内模板融合标识来指示解码端进行解码,具体过程包括:编码端将高层语法元素融合标识与块级帧内模板融合标识均设置为开启状态,解码端在接收并解析到高层语法元素融合标识时,会首先判断高层语法元素融合标识是否为开启状态,并在当高层语法元素融合标识为开启状态时,继续检查块级帧内模板融合标识是否为开启状态,如果块级帧内模板融合标识为开启状态,则采用与编码端相同的方式确定匹配参考块并且融合,从而完成解码。In one embodiment, when determining a matching reference block, a method of directly selecting one from multiple candidate reference blocks as a matching reference block corresponding to a target template is adopted, and the encoding end instructs the decoding end to perform decoding by transmitting a high-level syntax element fusion flag and a block-level intra-frame template fusion flag. The specific process includes: the encoding end sets both the high-level syntax element fusion flag and the block-level intra-frame template fusion flag to an on state, and when the decoding end receives and parses the high-level syntax element fusion flag, it first determines whether the high-level syntax element fusion flag is in an on state, and when the high-level syntax element fusion flag is in an on state, continues to check whether the block-level intra-frame template fusion flag is in an on state, and if the block-level intra-frame template fusion flag is in an on state, the matching reference block is determined and fused in the same manner as the encoding end, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对列表中块向量指向的候选参考块的再决策确定匹配参考块的方法,编码端通过传输高层语法元素融合标识、块级帧内模板融合标识与块向量索引值来指示解码端进行解码,具体过程包括:编码端将高层语法元素融合标识与块级帧内模板融合标识均设置为开启状态,解码端在接收并解析到高层语法元素融合标识时,会首先判断高层语法元素融合标识是否为开启状态,并在当高层语法元素融合标识为开启状态时,继续检查块级帧内模板融合标识是否为开启状态,如果块级帧内模板融合标识为开启状态,则根据块向量索引值确定匹配参考块并且融合,从而完成解码。In one embodiment, when determining a matching reference block, a candidate list corresponding to each target template is constructed, and a method of re-deciding the matching reference block for the candidate reference block pointed to by the block vector in the list is adopted. The encoder instructs the decoder to perform decoding by transmitting a high-level syntax element fusion flag, a block-level intra-frame template fusion flag and a block vector index value. The specific process includes: the encoder sets both the high-level syntax element fusion flag and the block-level intra-frame template fusion flag to an on state. When the decoder receives and parses the high-level syntax element fusion flag, it first determines whether the high-level syntax element fusion flag is in an on state, and when the high-level syntax element fusion flag is in an on state, it continues to check whether the block-level intra-frame template fusion flag is in an on state. If the block-level intra-frame template fusion flag is in an on state, the matching reference block is determined and fused according to the block vector index value, thereby completing decoding.

在一实施例中,在确定匹配参考块时,采用构建每个目标模板对应的候选列表,并对每个候选列表中块向量指向的候选参考块进行融合,从而确定匹配参考块的方法,编码端通过传输高层语法元素融合标识、块级帧内模板融合标识与帧内模板参考块向量融合标识来指示解码端进行解码,具体过程包括:编码端将高层语法元素融合标识与块级帧内模板融合标识均设置为开启状态,解码端在接收并解析到高层语法元素融合标识时,会首先判断高层语法元素融合标识是否为开启状态,并在当高层语法元素融合标识为开启状态时,继续检查块级帧内模板融合标识是否为开启状态,如果块级帧内模板融合标识为开启状态,再继续检测帧内模板参考块向量融合标识是否为开启状态,如果内模板参考块向量融合标识为开启状态,则解码端对候选参考块先融合得到匹配参考块,然后再对匹配参考块进行融合,从而完成解码。In one embodiment, when determining a matching reference block, a method is adopted in which a candidate list corresponding to each target template is constructed, and the candidate reference blocks pointed to by the block vector in each candidate list are merged to determine the matching reference block. The encoder instructs the decoder to perform decoding by transmitting a high-level syntax element fusion flag, a block-level intra-frame template fusion flag, and an intra-frame template reference block vector fusion flag. The specific process includes: the encoder sets both the high-level syntax element fusion flag and the block-level intra-frame template fusion flag to an on state. When the decoder receives and parses the high-level syntax element fusion flag, it first determines whether the high-level syntax element fusion flag is in an on state, and when the high-level syntax element fusion flag is in an on state, it continues to check whether the block-level intra-frame template fusion flag is in an on state. If the block-level intra-frame template fusion flag is in an on state, it continues to detect whether the intra-frame template reference block vector fusion flag is in an on state. If the intra-template reference block vector fusion flag is in an on state, the decoder first merges the candidate reference blocks to obtain a matching reference block, and then merges the matching reference block to complete decoding.

通过本申请实施例提供的图像解码方法,能够提高IntraTMP预测的准确度,解决了某些视频内容无法应用IntraTMP编码工具的问题,并且不增加过多额外传输的比特。The image decoding method provided by the embodiment of the present application can improve the accuracy of IntraTMP prediction, solve the problem that the IntraTMP encoding tool cannot be applied to certain video content, and does not increase too many additional transmission bits.

示例8Example 8

本示例详细阐述了图像解码端进行图像解码的全流程,且在后续示例中,均采用该流程进行解码。This example describes in detail the entire process of image decoding at the image decoding end, and this process is used for decoding in subsequent examples.

图13为本申请示例提供的编码端IntraTMP-fusion方案流程示意图,如图所示,编码端IntraTMP-fusion流程包括步骤S1310-S1350。具体为:FIG13 is a schematic diagram of the IntraTMP-fusion solution flow of the encoding end provided by the example of this application. As shown in the figure, the IntraTMP-fusion flow of the encoding end includes steps S1310-S1350. Specifically:

S1310:解析码流,确定当前待预测解码块的IntraTMP-fusion解码类型。S1310: Parse the bitstream and determine the IntraTMP-fusion decoding type of the current block to be predicted and decoded.

在本步骤中,解码器读取码流(比特流),处理网络适配层(NAL,NetworkAbstraction Layer)进行网络适配层单元(NALU,Network Abstraction Layer Unit)的读取,检查NALU是否正常,若正常表示码流中输入一帧新图片,需要解码新图像;否则表示没有输入新图像。当读取到有待解码的新图像时,能够获得用于图像重建的残差值,残差值的获取过程不是本申请重点说明的内容,因此在此不做赘述。In this step, the decoder reads the code stream (bit stream), processes the network adaptation layer (NAL, Network Abstraction Layer) to read the network adaptation layer unit (NALU, Network Abstraction Layer Unit), and checks whether the NALU is normal. If it is normal, it means that a new frame of picture is input into the code stream and the new image needs to be decoded; otherwise, it means that no new image is input. When a new image to be decoded is read, the residual value for image reconstruction can be obtained. The process of obtaining the residual value is not the focus of this application, so it will not be described here.

解码器对解码出的一帧进行环路滤波,以及一系列析构操作,并根据不同NAL类型进行不同类型的解码;解码器对一帧图片解码时,先遍历slice再遍历各个CTU,针对每个CTU需要进行划分得到编码块CUs。在对每个CU进行解码前,需要检查当前CU是否为Skip模式、调色板模式,是否为帧内或帧间等预测模式;确定当前CU使用帧内预测模式后,检查传统IntraTMP模式的CU级标识是否启用。在确定当前CU启用传统IntraTMP模式后,即tmp_enabled_flag=1;再检查当前CU启用了哪一种IntraTMP-fusion方法,这可由该方法的相关语法元素确定。在确定当前待预测编码块的帧内预测启用IntraTMP编码工具后,就可以确定对当前待预测编码块对应的三种形状的目标模板,分别为L-shape模板、Above模板和Left模板。The decoder performs loop filtering and a series of decomposition operations on the decoded frame, and performs different types of decoding according to different NAL types; when the decoder decodes a frame of an image, it first traverses the slice and then traverses each CTU, and each CTU needs to be divided to obtain coding blocks CUs. Before decoding each CU, it is necessary to check whether the current CU is in Skip mode, palette mode, intra-frame or inter-frame prediction mode; after determining that the current CU uses intra-frame prediction mode, check whether the CU-level flag of the traditional IntraTMP mode is enabled. After determining that the current CU enables the traditional IntraTMP mode, that is, tmp_enabled_flag = 1; then check which IntraTMP-fusion method is enabled for the current CU, which can be determined by the relevant syntax elements of the method. After determining that the IntraTMP encoding tool is enabled for the intra-frame prediction of the current coding block to be predicted, the three shapes of target templates corresponding to the current coding block to be predicted can be determined, namely L-shape template, Above template and Left template.

需要说明的是,本申请实施例中采用三种形状的目标模板为例进行说明,但是在实际使用中,可能会采用其他形状的目标模板,或者,同时使用小于三种或者超过三种的目标模板进行预测,本申请实施例在此不做限制。It should be noted that the embodiment of the present application uses target templates of three shapes as an example for illustration, but in actual use, target templates of other shapes may be used, or less than three or more than three target templates may be used for prediction at the same time, and the embodiment of the present application does not impose any restrictions on this.

S1320:多模式IntraTMP-fusion方法:以常规搜索策略分别确定不同模式对应的匹配参考块。S1320: Multi-mode IntraTMP-fusion method: Use conventional search strategies to determine matching reference blocks corresponding to different modes.

S1330:多模式多候选IntraTMP-fusion方法1:由不同模式的候选索引标识确定相应模式的匹配参考块。S1330: Multi-mode multi-candidate IntraTMP-fusion method 1: Determine the matching reference block of the corresponding mode by the candidate index identifiers of different modes.

S1340:多模式多候选IntraTMP-fusior方法2:融合不同模式的候选项,确定相应模式的匹配参考块。S1340: Multi-mode multi-candidate IntraTMP-fusior method 2: Fusion of candidates from different modes to determine matching reference blocks of corresponding modes.

步骤S1320、S1330、S1340为并列步骤,也就是说,在实际应用中,只会采取其中一种方法确定匹配参考块。但是本领域技术人员可以理解,同时采用S1320、S1330、S1340中的两种或三种方法确定匹配参考块也在本申请实施例的保护范围之内。Steps S1320, S1330, and S1340 are parallel steps, that is, in actual applications, only one of the methods will be used to determine the matching reference block. However, those skilled in the art will appreciate that simultaneously using two or three of the methods S1320, S1330, and S1340 to determine the matching reference block is also within the protection scope of the embodiments of the present application.

S1350:以编码端的融合方式对不同模式的匹配参考块进行融合,作为当前待预测解码块的预测值。S1350: Fusing the matching reference blocks of different modes in a fusion manner at the encoding end to serve as a prediction value of the current decoding block to be predicted.

解码端的融合方式可参考本申请中编码端的实施例,因此在此不做赘述。The fusion method at the decoding end can refer to the embodiment of the encoding end in this application, so it will not be described here in detail.

示例9Example 9

本示例提供一种用于视频解码过程中的帧内预测方法,是示例2多模式IntraTMP-fusion方法的解码过程,描述了码流中与所述方法相关的语法元素。This example provides an intra-frame prediction method for a video decoding process, which is the decoding process of the multi-mode IntraTMP-fusion method of Example 2, and describes the syntax elements in the bitstream related to the method.

解码器先判断码流中是否存在高层语法元素,指示当前序列或图像是否开启融合;在高层开启的前提下,进一步检查多模式IntraTMP-fusion方法的CU级标识是否开启,且多模式IntraTMP-fusion方法被认为是传统IntraTMP模式的一种子集,即只有在当前待预测解码块启用传统IntraTMP时,才决定多模式IntraTMP-fusion是否启用,语法结构如图14所示。The decoder first determines whether there are high-level syntax elements in the bitstream, indicating whether fusion is enabled for the current sequence or image; if the high-level syntax elements are enabled, it further checks whether the CU-level flag of the multi-mode IntraTMP-fusion method is enabled, and the multi-mode IntraTMP-fusion method is considered to be a subset of the traditional IntraTMP mode, that is, only when the traditional IntraTMP is enabled for the current predicted decoding block, is it decided whether the multi-mode IntraTMP-fusion is enabled. The syntax structure is shown in Figure 14.

语义解释:Semantic explanation:

intra_tmp_template_fusion_flag:等于1表示当前编码块启用多模式IntraTMP-fusion方法,等于0表示当前编码块不启用多模式IntraTMP-fusion方法。intra_tmp_template_fusion_flag: equal to 1 indicates that the current coding block enables the multi-mode IntraTMP-fusion method, and equal to 0 indicates that the current coding block does not enable the multi-mode IntraTMP-fusion method.

解码端采用与编码端相同的搜索方式推导出预测块,具体的实现过程如下:The decoding end uses the same search method as the encoding end to derive the prediction block. The specific implementation process is as follows:

步骤2:以常规搜索策略分别确定不同模式对应的最佳匹配参考块。Step 2: Use conventional search strategies to determine the best matching reference blocks corresponding to different modes.

当CU标识intra_tmp_template_fusion_flag为1时,按照多模式IntraTMP-fusion方法完成解码,搜索策略参考示例2的步骤3,否则按照传统IntraTMP模式解码。When the CU flag intra_tmp_template_fusion_flag is 1, decoding is performed according to the multi-mode IntraTMP-fusion method, and the search strategy refers to step 3 of Example 2, otherwise decoding is performed according to the traditional IntraTMP mode.

步骤3:以编码端的融合方式对不同模式的最佳“匹配参考块”进行融合,确定当前解码块的预测。Step 3: The best “matching reference blocks” of different modes are fused in the fusion mode of the encoding end to determine the prediction of the current decoding block.

融合前的检查与编码端相同,也需要判断这三个最佳“匹配参考块”是否满足融合条件,参考示例2的步骤4;解码端的融合方式根据编码端选择的融合方式来确定。The check before fusion is the same as that at the encoding end. It is also necessary to determine whether the three best "matching reference blocks" meet the fusion conditions, refer to step 4 of Example 2; the fusion method at the decoding end is determined according to the fusion method selected by the encoding end.

示例10Example 10

本实施例提供一种用于视频解码过程中的帧内预测方法,是示例3中多模式多候选IntraTMP-fusion方法1的解码过程,描述了码流中与所述方法相关的语法元素。This embodiment provides an intra-frame prediction method for a video decoding process, which is the decoding process of the multi-mode multi-candidate IntraTMP-fusion method 1 in Example 3, and describes the syntax elements related to the method in the bitstream.

解码器先判断码流中是否存在高层语法元素,指示当前序列或图像是否开启融合;在高层开启的前提下,进一步检查多模式多候选IntraTMP-fusion方法1的CU级标识是否开启,且多模式多候选IntraTMP-fusion方法1被认为是传统IntraTMP模式的一种子集,即只有在当前待预测解码块启用传统IntraTMP时,才决定多模式多候选IntraTMP-fusion方法1是否启用;确定启用之后再根据不同模式候选列表中最佳IntraTMP BV的索引标识确定各模式指向的最佳“匹配参考块”,语法结构如图15所示:The decoder first determines whether there are high-level syntax elements in the bitstream, indicating whether fusion is enabled for the current sequence or image; under the premise that the high-level is enabled, it further checks whether the CU-level flag of the multi-mode multi-candidate IntraTMP-fusion method 1 is enabled, and the multi-mode multi-candidate IntraTMP-fusion method 1 is considered to be a subset of the traditional IntraTMP mode, that is, only when the traditional IntraTMP is enabled for the current predicted decoding block, it is determined whether the multi-mode multi-candidate IntraTMP-fusion method 1 is enabled; after determining to enable, the best "matching reference block" pointed to by each mode is determined according to the index flag of the best IntraTMP BV in the candidate list of different modes. The syntax structure is shown in Figure 15:

语义解释:Semantic explanation:

intra_tmp_template_candidates1_fusion_flag:等于1表示当前编码块启用多模式多候选IntraTMP-fusion方法1,等于0表示当前编码块不启用此方法。intra_tmp_template_candidates1_fusion_flag: equal to 1 indicates that the current coding block enables multi-mode multi-candidate IntraTMP-fusion method 1, and equal to 0 indicates that the current coding block does not enable this method.

intra_tmp_template_candidates1_LA_idx:表示当前编码块在L-shapeIntraTMP模式候选列表中的最佳IntraTMP BV索引值。intra_tmp_template_candidates1_LA_idx: indicates the best IntraTMP BV index value of the current coding block in the L-shapeIntraTMP mode candidate list.

intra_tmp_template_candidates1_A_idx:表示当前编码块在Above IntraTMP模式候选列表中的最佳IntraTMP BV索引值。intra_tmp_template_candidates1_A_idx: indicates the best IntraTMP BV index value of the current coding block in the Above IntraTMP mode candidate list.

intra_tmp_template_candidates1_L_idx:表示当前编码块在Left IntraTMP模式候选列表中的最佳IntraTMP BV索引值。intra_tmp_template_candidates1_L_idx: indicates the best IntraTMP BV index value of the current coding block in the Left IntraTMP mode candidate list.

解码端采用与编码端相同的实现操作推导出预测块,具体的实现过程如下:The decoding end uses the same implementation operation as the encoding end to derive the prediction block. The specific implementation process is as follows:

步骤2:分别构建各模式的候选列表,并由各模式的候选索引标识确定不同模式的最佳匹配参考块。Step 2: Construct candidate lists for each mode respectively, and determine the best matching reference blocks of different modes by the candidate index identifiers of each mode.

当CU标识intra_tmp_template_candidates1_fusion_flag为1时,按照多模式多候选IntraTMP-fusion方法1完成解码,先构建候选列表,构建过程参考示例3中多模式多候选IntraTMP-fusion方法1的步骤3;否则按照传统IntraTMP模式解码。When the CU flag intra_tmp_template_candidates1_fusion_flag is 1, decoding is completed according to the multi-mode multi-candidate IntraTMP-fusion method 1. First, a candidate list is constructed. The construction process refers to step 3 of the multi-mode multi-candidate IntraTMP-fusion method 1 in Example 3; otherwise, decoding is performed according to the traditional IntraTMP mode.

由各模式候选列表的最佳IntraTMP BV索引标识指向的参考块确定相应模式的最佳“匹配参考块”。The reference block pointed to by the best IntraTMP BV index identifier in each mode candidate list determines the best "matching reference block" for the corresponding mode.

步骤3:以编码端的融合方式对不同模式的最佳“匹配参考块”进行融合,确定当前解码块的预测。Step 3: The best “matching reference blocks” of different modes are fused in the fusion mode of the encoding end to determine the prediction of the current decoding block.

融合前的检查与编码端相同,也需要判断这三个最佳“匹配参考块”是否满足融合条件,参考示例2的步骤4;解码端的融合方式根据编码端选择的融合方式来确定。The check before fusion is the same as that at the encoding end. It is also necessary to determine whether the three best "matching reference blocks" meet the fusion conditions, refer to step 4 of Example 2; the fusion method at the decoding end is determined according to the fusion method selected by the encoding end.

示例11Example 11

本实施例提供一种用于视频解码过程中的帧内预测方法,是示例4中多模式多候选IntraTMP-fusion方法2的解码过程,描述了码流中与所述方法相关的语法元素。This embodiment provides an intra-frame prediction method for a video decoding process, which is the decoding process of the multi-mode multi-candidate IntraTMP-fusion method 2 in Example 4, and describes the syntax elements related to the method in the bitstream.

解码器先判断码流中是否存在高层语法元素,指示当前序列或图像是否开启融合;在高层开启的前提下,进一步检查多模式多候选IntraTMP-fusion方法2的CU级标识是否开启,且多模式多候选IntraTMP-fusion方法2被认为是传统IntraTMP模式的一种子集,即只有在当前待预测解码块启用传统IntraTMP时,才决定多模式多候选IntraTMP-fusion方法2是否启用;确定启用之后再根据候选IntraTMP BVs的融合标识确定不同模式的最佳“匹配参考块”,语法结构如图16所示:The decoder first determines whether there are high-level syntax elements in the bitstream, indicating whether fusion is enabled for the current sequence or image; under the premise that the high-level is enabled, it further checks whether the CU-level flag of the multi-mode multi-candidate IntraTMP-fusion method 2 is enabled, and the multi-mode multi-candidate IntraTMP-fusion method 2 is considered to be a subset of the traditional IntraTMP mode, that is, only when the traditional IntraTMP is enabled for the current predicted decoding block, it is determined whether the multi-mode multi-candidate IntraTMP-fusion method 2 is enabled; after determining that it is enabled, the best "matching reference block" of different modes is determined according to the fusion flag of the candidate IntraTMP BVs. The syntax structure is shown in Figure 16:

语义:Semantics:

intra_tmp_template_candidates2_fusion_flag:等于1表示当前编码块启用多模式多候选IntraTMP-fusion方法2,等于0表示当前编码块不启用此方法。intra_tmp_template_candidates2_fusion_flag: equal to 1 indicates that the current coding block enables multi-mode multi-candidate IntraTMP-fusion method 2, and equal to 0 indicates that the current coding block does not enable this method.

intra_tmp_template_bv_fusion_flag:等于1表示当前编码块需要对多模式候选列表中的候选IntraTMP BVs进行融合,作为相应模式的最佳“匹配参考块”,等于0表示当前编码块无需进行候选IntraTMP BVs的融合。intra_tmp_template_bv_fusion_flag: equal to 1 indicates that the current coding block needs to fuse the candidate IntraTMP BVs in the multi-mode candidate list as the best "matching reference block" of the corresponding mode; equal to 0 indicates that the current coding block does not need to fuse the candidate IntraTMP BVs.

解码端采用与编码端相同的实现操作推导出预测块,具体的实现过程如下:The decoding end uses the same implementation operation as the encoding end to derive the prediction block. The specific implementation process is as follows:

步骤2:分别构建各模式的候选列表,并融合不同模式候选项指向的参考块,确定不同模式的最佳匹配参考块。Step 2: Construct candidate lists for each mode respectively, and fuse the reference blocks pointed to by candidates of different modes to determine the best matching reference blocks of different modes.

当CU标识intra_tmp_template_candidates2_fusion_flag为1时,按照多模式多候选IntraTMP-fusion方法2完成解码,先构建候选列表,构建过程参考示例4中多模式多候选IntraTMP-fusion方法2的步骤3;否则按照传统IntraTMP模式解码。When the CU flag intra_tmp_template_candidates2_fusion_flag is 1, decoding is completed according to the multi-mode multi-candidate IntraTMP-fusion method 2. First, a candidate list is constructed. The construction process refers to step 3 of the multi-mode multi-candidate IntraTMP-fusion method 2 in Example 4; otherwise, decoding is performed according to the traditional IntraTMP mode.

由候选IntraTMP BVs融合标识intra_tmp_template_bv_fusion_flag确定当前CU是否需要对多模式候选列表的候选项进行融合,进而得到相应模式的最佳“匹配参考块”。The candidate IntraTMP BVs fusion flag intra_tmp_template_bv_fusion_flag determines whether the current CU needs to fuse the candidates in the multi-mode candidate list to obtain the best "matching reference block" for the corresponding mode.

步骤3:以编码端的融合方式对不同模式的最佳“匹配参考块”进行融合,确定当前解码块的预测;Step 3: The best “matching reference blocks” of different modes are fused in the fusion mode of the encoding end to determine the prediction of the current decoding block;

融合前的检查与编码端相同,也需要判断这三个最佳“匹配参考块”是否满足融合条件,参考实示例2的步骤4;解码端的融合方式根据编码端选择的融合方式来确定。The check before fusion is the same as that at the encoding end. It is also necessary to determine whether the three best "matching reference blocks" meet the fusion conditions, refer to step 4 of Example 2; the fusion method at the decoding end is determined according to the fusion method selected by the encoding end.

图17是本申请实施例中提供的一种图像处理装置结构示意图,如图17所示,该图像处理装置包括处理器1710、存储器1720。处理器1710、存储器1720的数量可以是一个或多个,图17中以一个处理器1710和一个存储器1720为例;设备中的处理器1710和存储器1720可以通过总线或其他方式连接,图17中以通过总线连接为例。FIG17 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. As shown in FIG17 , the image processing device includes a processor 1710 and a memory 1720. The number of the processor 1710 and the memory 1720 may be one or more. FIG17 takes one processor 1710 and one memory 1720 as an example. The processor 1710 and the memory 1720 in the device may be connected via a bus or other means. FIG17 takes the connection via a bus as an example.

本申请一实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,该计算机可执行指令用于执行如本申请编码端实施例提供的图像编码方法,或,本申请解码端实施例提供的图像解码方法。An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions for executing an image encoding method as provided in an encoding end embodiment of the present application, or an image decoding method as provided in a decoding end embodiment of the present application.

本申请一实施例还提供了一种计算机程序产品,包括计算机程序或计算机指令,该计算机程序或计算机指令存储在计算机可读存储介质中,计算机设备的处理器从计算机可读存储介质读取计算机程序或计算机指令,处理器执行计算机程序或计算机指令,使得计算机设备执行如本申请编码端实施例提供的图像编码方法,或,本申请解码端实施例提供的图像解码方法。An embodiment of the present application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the image encoding method provided in the encoding end embodiment of the present application, or the image decoding method provided in the decoding end embodiment of the present application.

本申请实施例描述的系统架构以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着系统架构的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules/units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。In hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程或执行线程中,部件可位于一个计算机上或分布在2个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自于自与本地系统、分布式系统或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地或远程进程来通信。The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process or an execution thread, and a component may be located on a computer or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may communicate, for example, through local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems through signals).

以上参照附图说明了本申请的一些实施例,并非因此局限本申请的权利范围。本领域技术人员不脱离本申请的范围和实质内所作的任何修改、等同替换和改进,均应在本申请的权利范围之内。The above describes some embodiments of the present application with reference to the accompanying drawings, but does not limit the scope of the present application. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application shall be within the scope of the present application.

Claims (28)

1.一种图像编码方法,包括:1. An image encoding method, comprising: 获取图像帧中的待预测编码块与已预测编码块,其中,所述已预测编码块对应的区域为已重建区域;Acquire a block to be predicted and a predicted block in an image frame, wherein an area corresponding to the predicted block is a reconstructed area; 确定所述待预测编码块对应的多个目标模板;Determine a plurality of target templates corresponding to the coding block to be predicted; 在所述已重建区域中确定每个所述目标模板对应的匹配参考块,并对至少一个所述匹配参考块进行融合,得到所述待预测编码块对应的预测值;Determine a matching reference block corresponding to each of the target templates in the reconstructed area, and fuse at least one of the matching reference blocks to obtain a prediction value corresponding to the to-be-predicted coding block; 根据所述待预测编码块的原始值与所述预测值,得到残差值;Obtaining a residual value according to the original value of the to-be-predicted coding block and the predicted value; 对所述残差值进行编码,并将编码比特写入码流。The residual value is encoded, and the encoded bits are written into a bitstream. 2.根据权利要求1所述的图像编码方法,其特征在于,所述在所述已重建区域中确定每个所述目标模板对应的匹配参考块,包括:2. The image encoding method according to claim 1, wherein determining a matching reference block corresponding to each target template in the reconstructed area comprises: 在所述已重建区域中确定每个所述目标模板对应的至少一个参考模板;Determine at least one reference template corresponding to each of the target templates in the reconstructed area; 确定每个参考模板对应的候选参考块;Determine a candidate reference block corresponding to each reference template; 根据所述候选参考块,为每个所述目标模板确定一个匹配参考块。A matching reference block is determined for each target template based on the candidate reference blocks. 3.根据权利要求2所述的图像编码方法,其特征在于,所述根据所述候选参考块,为每个所述目标模板确定一个匹配参考块,包括:3. The image encoding method according to claim 2, wherein determining a matching reference block for each target template based on the candidate reference blocks comprises: 从所述候选参考块中选择一个候选参考块作为所述目标模板对应的匹配参考块。A candidate reference block is selected from the candidate reference blocks as a matching reference block corresponding to the target template. 4.根据权利要求2所述的图像编码方法,其特征在于,所述根据所述候选参考块,为每个所述目标模板确定一个匹配参考块,包括:4. The image encoding method according to claim 2, wherein determining a matching reference block for each target template based on the candidate reference blocks comprises: 根据所述目标模板对应的至少一个所述候选参考块,构建每个所述目标模板对应的候选列表;Constructing a candidate list corresponding to each target template according to at least one candidate reference block corresponding to the target template; 对每个所述候选列表中块向量指向的所述候选参考块进行率失真决策,确定每个所述目标模板对应的匹配参考块。A rate-distortion decision is performed on each candidate reference block pointed to by the block vector in the candidate list to determine a matching reference block corresponding to each target template. 5.根据权利要求4所述的图像编码方法,其特征在于,所述方法还包括:5. The image encoding method according to claim 4, characterized in that the method further comprises: 将每个所述目标模板对应的匹配参考块的块向量索引值确定为所述待预测编码块对应的帧内模板融合信息;Determine the block vector index value of the matching reference block corresponding to each of the target templates as the intra-frame template fusion information corresponding to the to-be-predicted coding block; 对所述块向量索引值进行编码,并将编码比特写入码流。The block vector index value is encoded, and the encoded bits are written into a bitstream. 6.根据权利要求2所述的图像编码方法,其特征在于,所述根据所述候选参考块,为每个所述目标模板确定一个匹配参考块,包括:6. The image encoding method according to claim 2, wherein determining a matching reference block for each target template based on the candidate reference blocks comprises: 根据所述目标模板对应的至少一个所述候选参考块,构建每个所述目标模板对应的候选列表;Constructing a candidate list corresponding to each target template according to at least one candidate reference block corresponding to the target template; 对每个所述候选列表中块向量指向的所述候选参考块进行融合,确定每个所述目标模板对应的匹配参考块。The candidate reference blocks pointed to by the block vectors in each of the candidate lists are merged to determine a matching reference block corresponding to each of the target templates. 7.根据权利要求6所述的图像编码方法,其特征在于,所述方法还包括:7. The image encoding method according to claim 6, characterized in that the method further comprises: 将帧内模板参考块向量融合标识确定为所述待预测编码块对应的帧内模板融合信息;Determine the intra-frame template reference block vector fusion identifier as the intra-frame template fusion information corresponding to the to-be-predicted coding block; 对所述帧内模板参考块向量融合标识进行编码,并将编码比特写入码流。The intra-frame template reference block vector fusion identifier is encoded, and the encoded bits are written into a bitstream. 8.根据权利要求1所述的图像编码方法,其特征在于,所述对至少一个所述匹配参考块进行融合,得到所述待预测编码块对应的预测值,包括:8. The image coding method according to claim 1, wherein the step of fusing at least one of the matching reference blocks to obtain a prediction value corresponding to the block to be predicted comprises: 选择至少一个所述匹配参考块作为待融合参考块;Selecting at least one of the matching reference blocks as a reference block to be fused; 对所有所述待融合参考块进行融合,得到所述待预测编码块对应的帧内预测值。All the reference blocks to be merged are merged to obtain the intra-frame prediction value corresponding to the coding block to be predicted. 9.根据权利要求8所述的图像编码方法,其特征在于,所述选择至少一个所述匹配参考块作为待融合参考块,包括:9. The image encoding method according to claim 8, characterized in that the selecting at least one of the matching reference blocks as the reference block to be fused comprises: 在所有所述匹配参考块均相同的情况下,选择任意一个匹配参考块作为待融合参考块;When all the matching reference blocks are the same, select any matching reference block as the reference block to be fused; 在存在至少两个所述匹配参考块不相同的情况下,根据预设算法,确定至少两个不相同的所述匹配参考块对应的所述参考模板之间的差异程度,并根据所述差异程度,选择至少一个所述匹配参考块作为待融合参考块。In the case that there are at least two different matching reference blocks, the degree of difference between the reference templates corresponding to the at least two different matching reference blocks is determined according to a preset algorithm, and at least one of the matching reference blocks is selected as the reference block to be fused according to the degree of difference. 10.根据权利要求9所述的图像编码方法,其特征在于,存在两个所述匹配参考块不相同,所述预设算法包括绝对误差和算法;所述根据预设算法,确定至少两个不相同的所述匹配参考块对应的所述参考模板之间的差异程度,并根据所述差异程度,选择至少一个所述匹配参考块作为待融合参考块,包括:10. The image encoding method according to claim 9, wherein there are two different matching reference blocks, and the preset algorithm includes an absolute error sum algorithm; determining the difference between the reference templates corresponding to at least two different matching reference blocks according to the preset algorithm, and selecting at least one matching reference block as a reference block to be fused according to the difference, comprises: 确定两个所述匹配参考块对应的所述参考模板为待比较模板;Determining the reference templates corresponding to the two matching reference blocks as templates to be compared; 确定两个所述待比较模板对应的绝对误差和;Determine the sum of absolute errors corresponding to the two templates to be compared; 在两个所述待比较模板对应的绝对误差和的差异程度大于预设阈值的情况下,选择两个所述匹配参考块作为待融合参考块;When the difference between the sum of absolute errors corresponding to the two templates to be compared is greater than a preset threshold, selecting the two matching reference blocks as reference blocks to be fused; 在两个所述待比较模板对应的绝对误差和的差异程度小于或等于预设阈值的情况下,选择一个所述匹配参考块作为待融合参考块。When the difference between the sums of absolute errors corresponding to the two templates to be compared is less than or equal to a preset threshold, one of the matching reference blocks is selected as a reference block to be fused. 11.根据权利要求9所述的图像编码方法,其特征在于,存在至少三个所述匹配参考块互不相同,所述预设算法包括绝对误差和算法;所述根据预设算法,确定至少两个不相同的所述匹配参考块对应的所述参考模板之间的差异程度,并根据所述差异程度,选择至少一个所述匹配参考块作为待融合参考块,包括:11. The image encoding method according to claim 9, characterized in that there are at least three matching reference blocks that are different from each other, and the preset algorithm includes an absolute error sum algorithm; determining the difference between the reference templates corresponding to at least two different matching reference blocks according to the preset algorithm, and selecting at least one matching reference block as a reference block to be fused according to the difference, comprises: 在所有不相同的所述匹配参考块对应的所述参考模板中,确定一个基准模板与剩余多个非基准模板;Determine a reference template and the remaining plurality of non-reference templates among the reference templates corresponding to all the different matching reference blocks; 确定所述基准模板与每个所述非基准模板对应的绝对误差和;Determine the sum of absolute errors corresponding to the reference template and each of the non-reference templates; 将所述基准模板对应的绝对误差和与每个所述非基准模板对应的绝对误差和进行逐一比对,在两者对应的绝对误差和的差异程度大于预设阈值的情况下,将所述基准模板与所述非基准模板对应的所述匹配参考块作为待融合参考块;在两者对应的绝对误差和的差异程度小于或等于预设阈值的情况下,将所述基准模板对应的所述匹配参考块作为待融合参考块。The absolute error sum corresponding to the reference template is compared with the absolute error sum corresponding to each of the non-reference templates one by one. When the difference between the absolute error sums corresponding to the two is greater than a preset threshold, the matching reference block corresponding to the reference template and the non-reference template is used as the reference block to be fused; when the difference between the absolute error sums corresponding to the two is less than or equal to the preset threshold, the matching reference block corresponding to the reference template is used as the reference block to be fused. 12.根据权利要求8所述的图像编码方法,其特征在于,所述对至少一个所述匹配参考块进行融合,得到所述待预测编码块对应的帧内预测值,包括:12. The image encoding method according to claim 8, wherein the step of fusing at least one of the matching reference blocks to obtain an intra-frame prediction value corresponding to the block to be predicted comprises: 根据帧内模板融合权重,确定每个所述目标模板对应的目标融合权重;Determine the target fusion weight corresponding to each target template according to the intra-frame template fusion weight; 根据每个所述目标模板对应的目标融合权重,对所有所述目标模板对应的匹配参考块进行加权计算,得到所述待预测编码块对应的帧内预测值。According to the target fusion weight corresponding to each of the target templates, weighted calculation is performed on the matching reference blocks corresponding to all the target templates to obtain the intra-frame prediction value corresponding to the to-be-predicted coding block. 13.根据权利要求12所述的图像编码方法,其特征在于,所述帧内模板融合权重包括预设目标融合权重;所述预设目标融合权重的确定过程包括:13. The image encoding method according to claim 12, wherein the intra-frame template fusion weight comprises a preset target fusion weight; and the process of determining the preset target fusion weight comprises: 根据所述目标模板包括的样本数量,确定预设目标融合权重;Determining a preset target fusion weight according to the number of samples included in the target template; 或,or, 为每个所述目标模板设置确定的预设目标融合权重。A predetermined preset target fusion weight is set for each target template. 14.根据权利要求12所述的图像编码方法,其特征在于,所述帧内模板融合权重根据所述目标模板对应的绝对误差和以及样本数量确定;所述根据帧内模板融合权重,确定每个所述目标模板对应的目标融合权重,包括:14. The image encoding method according to claim 12, characterized in that the intra-frame template fusion weight is determined according to the absolute error sum and sample quantity corresponding to the target template; the target fusion weight corresponding to each target template is determined according to the intra-frame template fusion weight, comprising: 确定每个所述目标模板对应的目标绝对误差和以及每个所述目标模板包括的目标样本数量;Determine the target absolute error corresponding to each target template and the number of target samples included in each target template; 根据所述目标模板的绝对误差和与所述目标样本数量,对每个所述目标模板对应的绝对误差和进行归一化处理,得到每个所述目标模板对应的归一化绝对误差和,并根据所有所述归一化绝对误差和得到归一化绝对误差总和;According to the absolute error sum of the target template and the number of target samples, the absolute error sum corresponding to each target template is normalized to obtain the normalized absolute error sum corresponding to each target template, and the normalized absolute error sum is obtained according to all the normalized absolute error sums; 根据每个所述目标模板对应的所述归一化绝对误差和与所述归一化绝对误差总和,确定每个所述目标模板对应的目标融合权重。The target fusion weight corresponding to each target template is determined according to the normalized absolute error corresponding to each target template and the sum of the normalized absolute errors. 15.根据权利要求12所述的图像编码方法,其特征在于,所述帧内模板融合权重根据所述待预测编码块中的待预测像素与所述目标模本之间的位置关系确定;所述根据帧内模板融合权重,确定每个所述目标模板对应的目标融合权重,包括:15. The image coding method according to claim 12, characterized in that the intra-frame template fusion weight is determined according to the positional relationship between the pixel to be predicted in the to-be-predicted coding block and the target template; and the target fusion weight corresponding to each target template is determined according to the intra-frame template fusion weight, comprising: 确定每个所述目标模板对应的目标绝对误差和,并根据所述目标绝对误差和确定每个所述目标模板对应的权重基值;Determine a target absolute error sum corresponding to each of the target templates, and determine a weight base value corresponding to each of the target templates according to the target absolute error sum; 确定所述待预测像素与每个所述目标模板之间的目标位置关系,并根据所述目标位置关系确定每个所述目标模板对应的权重相对值;Determining a target position relationship between the pixel to be predicted and each of the target templates, and determining a relative weight value corresponding to each of the target templates according to the target position relationship; 根据所述权重基值与所述权重相对值,确定每个所述目标模板对应的目标融合权重。The target fusion weight corresponding to each target template is determined according to the weight base value and the weight relative value. 16.根据权利要求1至15任一项所述的图像编码方法,其特征在于,所述目标模板包括L-shape模板、Above模板、Left模板中的至少一个。16 . The image encoding method according to claim 1 , wherein the target template comprises at least one of an L-shape template, an Above template, and a Left template. 17.根据权利要求1至15任一项所述的图像编码方法,其特征在于,所述方法还包括:17. The image encoding method according to any one of claims 1 to 15, characterized in that the method further comprises: 将高层语法元素融合标识设置为开启状态;Setting the high-level syntax element fusion flag to on; 将置为开启状态的所述高层语法元素融合标识进行编码,并将编码比特写入码流。The high-level syntax element fusion flag set to the on state is encoded, and the encoded bits are written into the bitstream. 18.根据权利要求17所述的图像编码方法,其特征在于,所述方法还包括:18. The image encoding method according to claim 17, characterized in that the method further comprises: 将块级帧内模板融合标识设置为开启状态;Set the block-level intra-frame template fusion flag to on; 将置为开启状态的所述块级帧内模板融合标识进行编码,并将编码比特写入码流。The block-level intra-frame template fusion flag set to the on state is encoded, and the encoded bits are written into the bitstream. 19.根据权利要求1至15任一项所述的图像编码方法,其特征在于,所述方法还包括:19. The image encoding method according to any one of claims 1 to 15, characterized in that the method further comprises: 将块级帧内模板融合标识设置为开启状态;Set the block-level intra-frame template fusion flag to on; 将置为开启状态的所述块级帧内模板融合标识进行编码,并将编码比特写入码流。The block-level intra-frame template fusion flag set to the on state is encoded, and the encoded bits are written into the bitstream. 20.一种图像解码方法,包括:20. An image decoding method, comprising: 解析码流,得到待预测解码块对应的残差值;Parse the bitstream to obtain the residual value corresponding to the decoded block to be predicted; 根据多个目标模板,在已重建区域中确定每个所述目标模板对应的匹配参考块,并对至少一个所述匹配参考块进行融合,得到所述待预测解码块对应的预测值;其中,已预测解码块对应的区域为已重建区域;According to the multiple target templates, a matching reference block corresponding to each target template is determined in the reconstructed area, and at least one matching reference block is fused to obtain a prediction value corresponding to the to-be-predicted decoding block; wherein the area corresponding to the predicted decoding block is the reconstructed area; 根据所述待预测解码块的预测值与所述残差值,得到所述待预测解码块对应的解码值;Obtaining a decoding value corresponding to the to-be-predicted decoding block according to the prediction value of the to-be-predicted decoding block and the residual value; 根据所述解码值获得所述待预测解码块的解码恢复值。A decoding recovery value of the to-be-predicted decoding block is obtained according to the decoding value. 21.根据权利要求20所述的图像解码方法,其特征在于,所述在已重建区域中确定每个所述目标模板对应的匹配参考块,包括:21. The image decoding method according to claim 20, wherein determining the matching reference block corresponding to each target template in the reconstructed area comprises: 在所述已重建区域中确定每个所述目标模板对应的至少一个参考模板;Determine at least one reference template corresponding to each of the target templates in the reconstructed area; 确定每个参考模板对应的候选参考块;Determine a candidate reference block corresponding to each reference template; 根据所述候选参考块,为每个所述目标模板确定一个匹配参考块。A matching reference block is determined for each target template based on the candidate reference blocks. 22.根据权利要求21所述的图像解码方法,其特征在于,所述根据所述候选参考块,为每个所述目标模板确定一个匹配参考块,包括:22. The image decoding method according to claim 21, characterized in that the step of determining a matching reference block for each target template based on the candidate reference blocks comprises: 从每个所述目标模板对应的所述候选参考块中选择一个候选参考块作为所述目标模板对应的匹配参考块。A candidate reference block is selected from the candidate reference blocks corresponding to each of the target templates as a matching reference block corresponding to the target template. 23.根据权利要求21所述的图像解码方法,其特征在于,所述根据所述候选参考块,为每个所述目标模板确定一个匹配参考块,包括:23. The image decoding method according to claim 21, wherein determining a matching reference block for each target template based on the candidate reference blocks comprises: 根据所述目标模板对应的至少一个候选参考块,构建每个所述目标模板对应的候选列表;Constructing a candidate list corresponding to each target template according to at least one candidate reference block corresponding to the target template; 对每个所述候选列表中块向量指向的所述候选参考块进行率失真决策,确定每个所述目标模板对应的匹配参考块。A rate-distortion decision is performed on each candidate reference block pointed to by the block vector in the candidate list to determine a matching reference block corresponding to each target template. 24.根据权利要求21所述的图像解码方法,其特征在于,所述根据所述候选参考块,为每个所述目标模板确定一个匹配参考块,包括:24. The image decoding method according to claim 21, wherein determining a matching reference block for each target template based on the candidate reference blocks comprises: 根据所述目标模板对应的至少一个候选参考块,构建每个所述目标模板对应的候选列表;Constructing a candidate list corresponding to each target template according to at least one candidate reference block corresponding to the target template; 对每个所述候选列表中块向量指向的所述候选参考块进行融合,确定每个所述目标模板对应的匹配参考块。The candidate reference blocks pointed to by the block vectors in each of the candidate lists are merged to determine a matching reference block corresponding to each of the target templates. 25.根据权利要求20所述的图像解码方法,其特征在于,所述对至少一个所述匹配参考块进行融合,得到所述待预测解码块对应的预测值,包括:25. The image decoding method according to claim 20, wherein the step of fusing at least one of the matching reference blocks to obtain a prediction value corresponding to the to-be-predicted decoding block comprises: 选择至少一个所述匹配参考块作为待融合参考块;Selecting at least one of the matching reference blocks as a reference block to be fused; 对所有所述待融合参考块进行融合,得到所述待预测解码块对应的帧内预测值。All the reference blocks to be merged are merged to obtain the intra-frame prediction value corresponding to the decoded block to be predicted. 26.一种图像处理装置,其特征在于,包括:26. An image processing device, comprising: 至少一个处理器;at least one processor; 至少一个存储器,用于存储至少一个程序;at least one memory for storing at least one program; 当至少一个所述程序被至少一个所述处理器执行时实现如权利要求1至19任一项所述的图像编码方法,或,如权利要求20至32任一项所述的图像解码方法。When at least one of the programs is executed by at least one of the processors, the image encoding method according to any one of claims 1 to 19, or the image decoding method according to any one of claims 20 to 32 is implemented. 27.一种计算机可读存储介质,其特征在于,其中存储有处理器可执行的程序,所述处理器可执行的程序被处理器执行时用于实现如权利要求1至19任意一项所述的图像编码方法,或,如权利要求20至25任意一项所述的图像解码方法。27. A computer-readable storage medium, characterized in that a processor-executable program is stored therein, and when the processor-executable program is executed by the processor, it is used to implement the image encoding method as described in any one of claims 1 to 19, or the image decoding method as described in any one of claims 20 to 25. 28.一种计算机程序产品,包括计算机程序或计算机指令,其特征在于,所述计算机程序或所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所述计算机可读存储介质读取所述计算机程序或所述计算机指令,所述处理器执行所述计算机程序或所述计算机指令,使得所述计算机设备执行如权利要求1至19任意一项所述的图像编码方法,或,如权利要求20至25任意一项所述的图像解码方法。28. A computer program product, comprising a computer program or a computer instruction, characterized in that the computer program or the computer instruction is stored in a computer-readable storage medium, a processor of a computer device reads the computer program or the computer instruction from the computer-readable storage medium, and the processor executes the computer program or the computer instruction, so that the computer device executes the image encoding method as described in any one of claims 1 to 19, or the image decoding method as described in any one of claims 20 to 25.
CN202310420115.5A 2023-04-14 2023-04-14 Image encoding method, image decoding method, image processing device, and storage medium Pending CN118803252A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310420115.5A CN118803252A (en) 2023-04-14 2023-04-14 Image encoding method, image decoding method, image processing device, and storage medium
PCT/CN2023/119773 WO2024212443A1 (en) 2023-04-14 2023-09-19 Image encoding method, image decoding method, image processing apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310420115.5A CN118803252A (en) 2023-04-14 2023-04-14 Image encoding method, image decoding method, image processing device, and storage medium

Publications (1)

Publication Number Publication Date
CN118803252A true CN118803252A (en) 2024-10-18

Family

ID=93034386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310420115.5A Pending CN118803252A (en) 2023-04-14 2023-04-14 Image encoding method, image decoding method, image processing device, and storage medium

Country Status (2)

Country Link
CN (1) CN118803252A (en)
WO (1) WO2024212443A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130329800A1 (en) * 2012-06-07 2013-12-12 Samsung Electronics Co., Ltd. Method of performing prediction for multiview video processing
WO2017201141A1 (en) * 2016-05-17 2017-11-23 Arris Enterprises Llc Template matching for jvet intra prediction
US10448026B1 (en) * 2018-07-09 2019-10-15 Tencent America LLC Method and apparatus for block vector signaling and derivation in intra picture block compensation
CN111050177B (en) * 2018-10-15 2021-07-20 腾讯科技(深圳)有限公司 Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
WO2024212443A1 (en) 2024-10-17

Similar Documents

Publication Publication Date Title
US11575926B2 (en) Enhanced decoder side motion vector refinement
CN113039798B (en) Decoding method realized by decoding equipment and decoder
TWI846835B (en) Method, device, and system for determining prediction weight for merge mode
CN114009040B (en) Encoder, decoder and corresponding methods
CN112673633B (en) Encoder, decoder and corresponding methods for merging modes
TW202041024A (en) Signalling for merge mode with motion vector differences in video coding
CN112823518A (en) Apparatus and method for inter prediction of triangularly partitioned blocks of coded blocks
CN110326295A (en) Obtain the method and apparatus of video image motion vector
TW201838415A (en) Determining neighboring samples for bilateral filtering in video coding
TW201743619A (en) Confusion of multiple filters in adaptive loop filtering in video coding
CN113796071A (en) Encoder, decoder and corresponding methods for IBC fused lists
CN114402617A (en) Affine Decoding Using Vector Clipping
CN113170212B (en) Decoding method, device and system with merging mode
KR20240164589A (en) Motion vector predictor index coding for video coding
KR102407912B1 (en) Bidirectional intra prediction signaling
CN117880499A (en) Deblocking filtering adaptive encoder, decoder and corresponding methods
CN118614060A (en) Method and apparatus for using adaptive hybrid geometric partitioning mode
WO2020143585A1 (en) Video encoder, video decoder, and corresponding method
CN114079782B (en) Video image reconstruction method, device, computer equipment and storage medium
WO2020063687A1 (en) Video decoding method and video decoder
CN119788875A (en) Method, device and equipment for constructing motion information list in video coding and decoding
US20240406403A1 (en) Method and device for image coding based on decoder-side motion vector refinement
CN110944184A (en) Video decoding method and video decoder
WO2024212443A1 (en) Image encoding method, image decoding method, image processing apparatus, and storage medium
KR20230081711A (en) Motion Coding Using Geometric Models for Video Compression

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication