CN116250240A - Image coding method, image decoding method and related device - Google Patents
Image coding method, image decoding method and related device Download PDFInfo
- Publication number
- CN116250240A CN116250240A CN202180060486.6A CN202180060486A CN116250240A CN 116250240 A CN116250240 A CN 116250240A CN 202180060486 A CN202180060486 A CN 202180060486A CN 116250240 A CN116250240 A CN 116250240A
- Authority
- CN
- China
- Prior art keywords
- intra
- block
- prediction
- frame prediction
- mode
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 144
- 238000001914 filtration Methods 0.000 claims abstract description 209
- 238000012545 processing Methods 0.000 claims abstract description 41
- 238000009499 grossing Methods 0.000 claims abstract description 15
- 238000004891 communication Methods 0.000 claims description 28
- 238000013139 quantization Methods 0.000 claims description 22
- 230000009466 transformation Effects 0.000 claims description 18
- 230000005540 biological transmission Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 14
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 claims description 11
- 238000005516 engineering process Methods 0.000 description 72
- 230000008569 process Effects 0.000 description 35
- 230000006870 function Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 24
- 238000012805 post-processing Methods 0.000 description 9
- 238000013500 data storage Methods 0.000 description 7
- 230000006835 compression Effects 0.000 description 6
- 238000007906 compression Methods 0.000 description 6
- 238000012360 testing method Methods 0.000 description 6
- 241000023320 Luma <angiosperm> Species 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 description 5
- 230000003044 adaptive effect Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 230000018109 developmental process Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000007667 floating Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000010348 incorporation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods 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
Description
本申请涉及电子设备技术领域,具体涉及一种图像编码方法、图像解码方法及相关装置。The present application relates to the technical field of electronic equipment, and in particular to an image encoding method, an image decoding method, and related devices.
数字视频能力可并入到大范围的装置中,包含数字电视、数字直播系统、无线广播系统、个人数字助理(personal digital assistant,PDA)、膝上型或桌上型计算机、平板计算机、电子书阅读器、数码相机、数字记录装置、数字媒体播放器、视频游戏装置、视频游戏控制台、蜂窝式或卫星无线电电话、视频会议装置、视频流装置等等。Digital video capabilities can be incorporated into a wide range of devices, including digital television, digital broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, electronic books Readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones, video conferencing devices, video streaming devices, and more.
数字视频装置实施视频压缩技术,例如由动态图像专家组(Moving Picture Experts Group,MPEG)-2、MPEG-4、ITU-TH.263、ITU-TH.264/MPEG-4第10部分高级视频编解码(advanced video coding,AVC)、ITU-TH.265高效率视频编解码(high efficiency video coding,HEVC)标准定义的标准和所述标准的扩展部分中所描述的那些视频压缩技术,从而更高效地发射及接收数字视频信息。视频装置可通过实施这些视频编解码技术来更高效地发射、接收、编码、解码和/或存储数字视频信息。Digital video devices implement video compression techniques such as those described in Moving Picture Experts Group (MPEG)-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding Decoding (advanced video coding, AVC), ITU-TH.265 high efficiency video coding (high efficiency video coding, HEVC) standards defined in the standard and those video compression techniques described in the extensions of the standard, so that more efficient transmit and receive digital video information. Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video codec techniques.
随着互联网视频的激增,尽管数字视频压缩技术不断演进,但仍然对视频压缩比提出更高要求。With the rapid increase of Internet video, despite the continuous evolution of digital video compression technology, higher requirements are still placed on the video compression ratio.
发明内容Contents of the invention
本申请实施例提供了一种图像编码方法、图像解码方法及相关装置,以期为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。The embodiment of the present application provides an image encoding method, an image decoding method, and related devices, in order to provide options for operations such as smoothing or local blurring for intra prediction. For the part of the image texture that does not need to be sharpened, use this The technology makes the predicted pixels smoother, and the predicted blocks are closer to the original image, which will eventually improve the coding efficiency.
第一方面,本申请实施例提供一种图像编码方法,包括:In the first aspect, the embodiment of the present application provides an image coding method, including:
确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;Determine the intra-frame prediction filtering indication information of the current coding block, the intra-frame prediction filtering indication information includes first indication information and second indication information, and the first indication information is used to indicate whether the first intra-frame prediction filtering mode is allowed to be used , the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;If it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode, set the first use flag of the first intra-frame prediction filtering mode of the current coding block bit is set to the first value;
将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;Writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode, and the first use flag into a code stream;
根据所述第一帧内预测滤波模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the first intra-frame prediction filtering mode, the current coded block is predicted to obtain a predicted block, the predicted block is coded, and the coded result is written into a code stream.
相比于现有技术,本申请方案为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。Compared with the existing technology, the solution of this application provides options for intra-frame prediction that require smoothing or local blurring. For the part of the image texture that does not need to be sharpened, using this technology makes the prediction pixels smoother and the prediction block more accurate. Closer to the original image, which will eventually improve coding efficiency.
第二方面,本申请实施例提供一种图像解码方法,包括:In a second aspect, an embodiment of the present application provides an image decoding method, including:
解析码流,确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;Parsing the code stream to determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, the intra-frame prediction indication information includes the first indication information and the second indication information, and the first indication information is used to indicate whether The first intra-frame prediction filtering mode is allowed to be used, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode, and the second A use flag bit is the use flag bit of the first intra-frame prediction filtering mode;
根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。According to the intra-frame prediction filtering indication information and the first use flag, determine to use the first frame rate prediction filtering mode to predict the current decoding block, and obtain a prediction block of the current decoding block.
相比于现有技术,本申请方案为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。Compared with the existing technology, the solution of this application provides options for intra-frame prediction that require smoothing or local blurring. For the part of the image texture that does not need to be sharpened, using this technology makes the prediction pixels smoother and the prediction block more accurate. Closer to the original image, which will eventually improve coding efficiency.
第三方面,本申请实施例提供一种图像编码装置,包括:In a third aspect, the embodiment of the present application provides an image encoding device, including:
确定单元,用于确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;A determining unit, configured to determine intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, and the first indication information is used to indicate whether the first indication information is allowed to be used. Intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is intra-frame prediction filtering IPF mode;
设置单元,用于若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;a setting unit, configured to set the first intra prediction filtering mode of the current coding block to The first use identification bit of is set to the first value;
传输单元,用于将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;A transmission unit, configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode, and the first usage flag into a code stream;
叠加单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。A superposition unit, configured to determine to use the first frame rate predictive filter mode to predict the current decoded block according to the intra-frame predictive filter indication information and the first use flag, to obtain the current decoded block prediction block.
第四方面,本申请实施例提供一种图像解码装置,包括:In a fourth aspect, the embodiment of the present application provides an image decoding device, including:
解析单元,用于确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;The parsing unit is configured to determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first usage flag is the usage flag of the first intra prediction filtering mode;
确定单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。A determining unit, configured to determine to use the first frame rate predictive filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block prediction block.
第五方面,本申请实施例提供了一种编码器,包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行上述第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides an encoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the first aspect above.
第六方面,本申请实施例提供了一种解码器,包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行上述第二方面所述的方法。In a sixth aspect, an embodiment of the present application provides a decoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the second aspect above.
第七方面,本申请实施例提供了一种终端,所述终端包括:一个或多个处理器、存储器和通信接口;所述存储器、所述通信接口与所述一个或多个处理器连接;所述终端通过所述通信接口与其他设备通信,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述一个或多个处理器执行所述指令时,所述终端执行如第一方面或第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface; the memory and the communication interface are connected to the one or more processors; The terminal communicates with other devices through the communication interface, and the memory is used to store computer program codes, the computer program codes include instructions, and when the one or more processors execute the instructions, the terminal executes The method as described in the first aspect or the second aspect.
第八方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。In the eighth aspect, the embodiment of the present application provides a computer-readable storage medium, and instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer executes the above-mentioned first aspect or the second aspect. method described in the aspect.
第九方面,本申请实施例提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。In a ninth aspect, the embodiments of the present application provide a computer program product containing instructions, which, when run on a computer, cause the computer to execute the method described in the first aspect or the second aspect.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本申请实施例中编码树单元的一种示意性框图;FIG. 1 is a schematic block diagram of a coding tree unit in an embodiment of the present application;
图2为本申请实施例中CTU和编码块CU的一种示意性框图;FIG. 2 is a schematic block diagram of a CTU and a coding block CU in an embodiment of the present application;
图3为本申请实施例中颜色格式的一种示意性框图;FIG. 3 is a schematic block diagram of a color format in an embodiment of the present application;
图4为本申请实施例中IPF示意图;Fig. 4 is the schematic diagram of IPF in the embodiment of the present application;
图5为本申请实施例中帧内预测滤波示意图;FIG. 5 is a schematic diagram of intra-frame prediction filtering in an embodiment of the present application;
图6为本申请实施例中视频译码系统的一种示意性框图;FIG. 6 is a schematic block diagram of a video decoding system in an embodiment of the present application;
图7为本申请实施例中视频编码器的一种示意性框图;FIG. 7 is a schematic block diagram of a video encoder in an embodiment of the present application;
图8为本申请实施例中视频解码器的一种示意性框图;FIG. 8 is a schematic block diagram of a video decoder in an embodiment of the present application;
图9为本申请实施例中一种图像编码方法的流程示意图;FIG. 9 is a schematic flowchart of an image encoding method in an embodiment of the present application;
图10为本申请实施例中一种图像解码方法的流程示意图;FIG. 10 is a schematic flowchart of an image decoding method in an embodiment of the present application;
图11A为本申请实施例中预测块的一种填充示意图;FIG. 11A is a schematic diagram of a filling of the prediction block in the embodiment of the present application;
图11B为本申请实施例中预测块的另一种填充示意图;FIG. 11B is another schematic diagram of filling the prediction block in the embodiment of the present application;
图12为本申请实施例中图像编码装置的一种功能单元框图;FIG. 12 is a block diagram of a functional unit of an image encoding device in an embodiment of the present application;
图13为本申请实施例中图像编码装置的另一种功能单元框图;FIG. 13 is a block diagram of another functional unit of an image encoding device in an embodiment of the present application;
图14为本申请实施例中图像解码装置的一种功能单元框图;FIG. 14 is a block diagram of a functional unit of an image decoding device in an embodiment of the present application;
图15为本申请实施例中图像解码装置的另一种功能单元框图。FIG. 15 is a block diagram of another functional unit of an image decoding device in an embodiment of the present application.
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It can be understood that the terms "first", "second", etc. used in the present invention may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first client could be termed a second client, and, similarly, a second client could be termed a first client, without departing from the scope of the present invention. Both the first client and the second client are clients, but they are not the same client.
首先介绍一下本申请实施例中用到的术语。Firstly, the terms used in the embodiments of this application are introduced.
对于图像的划分,为了更加灵活的表示视频内容,高效率视频编解码(High Efficiency Video Coding standard,HEVC)技术中定义了编码树单元(coding tree unit,CTU)、编码块(Coding Unit,CU)、预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。CTU、CU、PU和TU均为图像块。For image division, in order to more flexibly represent video content, High Efficiency Video Coding standard (HEVC) technology defines coding tree unit (coding tree unit, CTU), coding block (Coding Unit, CU) , a prediction unit (Prediction Unit, PU) and a transformation unit (Transform Unit, TU). CTU, CU, PU, and TU are image blocks.
编码树单元CTU,一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域,包含这个图像区域中的亮度像素和色度像素(或者也可以只包含亮度像素,或者也可以只包含色度像素);CTU中还包含语法元素,这些语法元素指示如何将CTU划分成至少一个编码块(coding unit,CU),以及解码每个编码块得到重建图像的方法。如图1所示,图像10由多个CTU构成(包括CTU A、CTU B、CTU C等)。与某一CTU对应的编码信息包含与该CTU对应的方形图像区域中的像素的亮度值和/或色度值。此外,与某一CTU对应的编码信息还可以包含语法元素,这些语法元素指示如何将该CTU划分成至少一个CU,以及解码每个CU以得到重建图像的方法。一个CTU对应的图像区域可以包括64×64、128×128或256×256个像素。在一个示例中,64×64个像素的CTU包含由64列、每列64个像素的矩形像素点阵,每个像素包含亮度分量和/或色度分量。CTU也可以对应矩形图像区域或者其它形状的图像区域,一个CTU对应的图像区域也可以是水平方向的像素点的数量与竖直方向的像素点数量不同的图像区域,例如包括64×128个像素。Coding tree unit CTU, an image is composed of multiple CTUs, and a CTU usually corresponds to a square image area, including luma pixels and chrominance pixels in this image area (or may only contain luma pixels, or may only contain Chroma pixels); the CTU also contains syntax elements, which indicate how to divide the CTU into at least one coding unit (coding unit, CU), and a method for decoding each coding block to obtain a reconstructed image. As shown in FIG. 1 , an image 10 is composed of multiple CTUs (including CTU A, CTU B, CTU C, etc.). The coding information corresponding to a certain CTU includes luminance values and/or chrominance values of pixels in the square image area corresponding to the CTU. In addition, the coding information corresponding to a certain CTU may further include syntax elements, which indicate how to divide the CTU into at least one CU, and a method of decoding each CU to obtain a reconstructed image. The image area corresponding to one CTU may include 64×64, 128×128 or 256×256 pixels. In one example, a CTU of 64×64 pixels includes a rectangular pixel matrix consisting of 64 columns of 64 pixels each, and each pixel includes a luma component and/or a chrominance component. A CTU can also correspond to a rectangular image area or an image area of other shapes, and an image area corresponding to a CTU can also be an image area in which the number of pixels in the horizontal direction is different from the number of pixels in the vertical direction, for example, including 64×128 pixels .
编码块CU,如图2所示,一个编码树单元CTU可以进一步划分为编码块CU,通常对应于图像中一个A×B的矩形区域,包含A×B亮度像素或/和它对应的色度像素,A为矩形的宽,B为矩形的高,A和B可以相同也可以不同,A和B的取值通常为2的整数次幂,例如128、64、32、16、8、4。其中,本申请实施例中涉及到的宽是指图1示出的二维直角坐标系XoY中沿X轴方向(水平方向)的长度,高是指图1示出的二维直角坐标系XoY中沿Y轴方向(竖直方向)的长度。一个CU的重建图像可以通过预测图像与残差图像相加得到,预测图像通过帧内预测或帧间预测生成,具体可以由一个或多个预测块(prediction block,PB)构成,残差图像通过对变换系数进行反量化和反变换处理生成,具体可以由一个或多个变换块(transform block,TB)构成。具体的,一个CU包含编码信息,编码信息包括预测模式、变换系数等信息,按照这些编码信息对CU进行相应的预测、反量化、反变换等解码处理,产生这个CU对应的重建图像。编码树单元与编码块关系如图3所示。Coding block CU, as shown in Figure 2, a coding tree unit CTU can be further divided into coding blocks CU, usually corresponding to an A×B rectangular area in the image, including A×B luma pixels or/and its corresponding chrominance Pixels, A is the width of the rectangle, B is the height of the rectangle, A and B can be the same or different, the value of A and B is usually an integer power of 2, such as 128, 64, 32, 16, 8, 4. Wherein, the width involved in the embodiment of the present application refers to the length along the X-axis direction (horizontal direction) in the two-dimensional rectangular coordinate system XoY shown in Figure 1, and the height refers to the two-dimensional rectangular coordinate system XoY shown in Figure 1 The length along the Y-axis direction (vertical direction). The reconstructed image of a CU can be obtained by adding the predicted image and the residual image. The predicted image is generated by intra-frame prediction or inter-frame prediction. Specifically, it can be composed of one or more prediction blocks (prediction blocks, PB). The residual image is obtained by The transform coefficients are generated by inverse quantization and inverse transform processing, and may specifically be composed of one or more transform blocks (transform block, TB). Specifically, a CU includes encoding information, and the encoding information includes information such as prediction mode and transformation coefficient. According to the encoding information, corresponding decoding processes such as prediction, inverse quantization, and inverse transformation are performed on the CU to generate a reconstructed image corresponding to the CU. The relationship between coding tree units and coding blocks is shown in FIG. 3 .
预测单元PU,是帧内预测、帧间预测的基本单元。定义图像块的运动信息包含帧间预测方向、参考帧、运动矢量等,正在进行编码处理的图像块称为当前编码块(current coding block,CCB),正在进行解码处理的图像块称为当前解码块(current decoding block,CDB),例如正在对一个图像块进行预测处理时,当前编码块或者当前解码块为预测块;正在对一个图像块进行残差处理时,当前编码块或者当前解码块为变换块。当前编码块或当前解码块所在的图像称为当前帧。当前帧中,位于当前块的左侧或上侧(以图1坐标系为准,左侧是指X轴负向,上侧是指Y轴正向)的图像块可能处于当前帧内部并且已经完成了编码/解码处理,得到了重建图像,它们称为重构块;重构块的编码模式、重建像素等信息是可以获得的(available)。在当前帧进行编码/解码之前已经完成编码/解码处理的帧称为重建帧。当前帧为单向预测帧(P帧)或双向预测帧(B帧)时,它分别具有一个或两个参考帧列表,两个列表分别称为L0和L1,每个列表中包含至少一个重建帧,称为当前帧的参考帧。参考帧为当前帧的帧间预测提供参考像素。The prediction unit PU is the basic unit of intra prediction and inter prediction. The motion information defining the image block includes inter-frame prediction direction, reference frame, motion vector, etc. The image block being encoded is called the current coding block (CCB), and the image block being decoded is called the current decoding block. block (current decoding block, CDB), for example, when an image block is being predicted, the current coding block or the current decoding block is the prediction block; when the residual processing is being performed on an image block, the current coding block or the current decoding block is Transform blocks. The picture in which the current coding block or the current decoding block is located is called the current frame. In the current frame, the image block located on the left or upper side of the current block (based on the coordinate system in Figure 1, the left side refers to the negative direction of the X axis, and the upper side refers to the positive direction of the Y axis) may be inside the current frame and has After the encoding/decoding process is completed, reconstructed images are obtained, which are called reconstructed blocks; information such as the encoding mode and reconstructed pixels of the reconstructed blocks are available. A frame that has been encoded/decoded before the current frame is encoded/decoded is called a reconstructed frame. When the current frame is a unidirectional predictive frame (P frame) or a bidirectional predictive frame (B frame), it has one or two reference frame lists respectively, the two lists are called L0 and L1, and each list contains at least one reconstruction frame, called the reference frame of the current frame. The reference frame provides reference pixels for the inter prediction of the current frame.
变换单元TU,对原始图像块和预测图像块的残差进行处理。The transform unit TU processes the residual of the original image block and the predicted image block.
像素(又称为像素点),是指图像中的像素点,如编码块中的像素点、亮度分量像素块中的像素点(又称为亮度像素)、色度分量像素块中的像素点(又称为色度像素)等。A pixel (also known as a pixel point) refers to a pixel point in an image, such as a pixel point in a coding block, a pixel point in a luminance component pixel block (also called a luminance pixel), or a pixel point in a chrominance component pixel block (Also known as chroma pixels) and so on.
样本(又称为像素值、样本值),是指像素点的像素值,该像素值在亮度分量域具体是指亮度(即灰阶值),该像素值在在色度分量域具体是指色度值(即色彩和饱和度),按照处理阶段的不同,一个像素的样本具体包括原始样本、预测样本和重构样本。Sample (also known as pixel value, sample value) refers to the pixel value of a pixel point. The pixel value specifically refers to brightness (that is, gray scale value) in the luminance component domain, and the pixel value specifically refers to Chroma values (ie, color and saturation), according to different processing stages, a pixel sample specifically includes an original sample, a predicted sample, and a reconstructed sample.
方向说明:水平方向,例如:如图1所述的二维直角坐标系XoY中沿X轴方向、垂直方向,例如:如图1所示的二维直角坐标系XoY中沿Y轴负向方向。Direction Description: Horizontal direction, for example: in the two-dimensional Cartesian coordinate system XoY as shown in Figure 1, along the X-axis direction, vertical direction, for example: in the two-dimensional Cartesian coordinate system XoY shown in Figure 1, along the negative direction of the Y-axis .
帧内预测,根据当前块的空间相邻像素,产生当前块的预测图像。一种帧内预测模式对应于一种生成预测图像的方法。帧内预测单元的划分包括2N×2N划分方式和N×N划分方式,2N×2N划分方式为对图像块不进行划分;N×N划分方式为将图像块划分为四个等大的子图像块。Intra-frame prediction generates a predicted image of the current block based on the spatially adjacent pixels of the current block. An intra prediction mode corresponds to a method of generating a predicted image. The division of the intra prediction unit includes 2N×2N division method and N×N division method. The 2N×2N division method does not divide the image block; the N×N division method divides the image block into four sub-images of equal size. piece.
通常,数字视频压缩技术作用于颜色编码方法为YCbCr,也可称为YUV,颜色格式为4:2:0、4:2:2或4:4:4的视频序列。其中,Y表示明亮度(Luminance或Luma),也就是灰阶值,Cb表示蓝色色度分量,Cr表示红色色度分量,U和V表示色度(Chrominance或Chroma),用于描述色彩及饱和度。在颜色格式上,4:2:0表示每4个像素有4个亮度分量,2个色度分量(YYYYCbCr),4:2:2表示每4个像素有4个亮度分量,4个色度分量(YYYYCbCrCbCr),而4:4:4表示全像素显示(YYYYCbCrCbCrCbCrCbCr),图3展示了不同颜色格式下的各分量分布图,其中白色圆形为Y分量,灰色圆形为UV分量。Usually, digital video compression technology works on video sequences whose color encoding method is YCbCr, also called YUV, and the color format is 4:2:0, 4:2:2 or 4:4:4. Among them, Y represents the brightness (Luminance or Luma), that is, the gray scale value, Cb represents the blue chroma component, Cr represents the red chroma component, U and V represent the chroma (Chrominance or Chroma), which are used to describe color and saturation Spend. In terms of color format, 4:2:0 means that every 4 pixels have 4 luminance components and 2 chroma components (YYYYCbCr), 4:2:2 means that every 4 pixels have 4 luminance components and 4 chroma components Component (YYYYCbCrCbCr), and 4:4:4 means full-pixel display (YYYYCbCrCbCrCbCrCbCr), Figure 3 shows the distribution of each component in different color formats, where the white circle is the Y component, and the gray circle is the UV component.
数字视频编解码中的帧内预测部分,主要参考当前帧的相邻块图像信息对当前编码单元块进行预测,将预测块与原始图像块计算残差得到残差信息后,经由变换与量化等过程,将残差信息传输到解码端。解码端接收并解析码流后,经过反变换与反量化等步骤得到残差信息,将解码端预测得到的预测图像块叠加残差信息后,得到重建图像块。在此过程中,帧内预测通常借助各自角度模式与非角度模式对当前编码块进行预测得到预测块,根据预测块与原始块计算得到的率失真信息,筛选出当前编码单元最优的预测模式,后将该预测模式写入码流到解码端。解码端解析出预测模式,预测得到当前解码块的预测图像并叠加写入码流而来的残差像素,即可得到重建图像。The intra-frame prediction part in digital video coding and decoding mainly refers to the adjacent block image information of the current frame to predict the current coding unit block. process, and transmit the residual information to the decoder. After receiving and parsing the code stream, the decoding end obtains the residual information through steps such as inverse transformation and inverse quantization, and superimposes the residual information on the predicted image block predicted by the decoding end to obtain the reconstructed image block. In this process, intra-frame prediction usually predicts the current coding block with the help of respective angle mode and non-angle mode to obtain the prediction block, and selects the optimal prediction mode of the current coding unit according to the rate-distortion information calculated by the prediction block and the original block , and then write the prediction mode into the code stream to the decoder. The decoding end analyzes the prediction mode, predicts the predicted image of the current decoded block, and superimposes the residual pixels written into the code stream to obtain the reconstructed image.
经过历代的数字视频编解码标准发展,非角度模式保持相对稳定,有均值模式和平面模式;角度模式则随着数字视频编解码标准的演进而不断增加,以国际数字视频编码标准H系列为例,H.264/AVC标准仅有8种角度预测模式和1种非角度预测模式;H.265/HEVC扩展到33种角度预测模式和2种非角度预测模式;以及目前最新通用视频编码标准H.266/VVC采用了67种预测模式,其中保留2种非角度预测模式,将角度模式从H.265的33种扩展到了65种。毋庸置疑,随着角度模式的增加,帧内预测将会更加精确,也更加符合当前社会对高清以及超高清视频发展的需求。不仅国际标准如此,国内数字音视频编码标准AVS3也继续扩展了角度模式和非角度模式,超高清数字视频的发展对帧内预测提出了更高的要求,不能仅仅只是依靠单纯地增加角度预测模式,扩展宽角度来提交编码效率。因此,国内数字音视频编码标准AVS3采纳了帧内预测滤波技术(IPF,intra prediction filter),帧内预测滤波技术指出当前的帧内角度预测中并没有采用全部的参考像素,容易忽略一些像素与当前编码单元之间的关联性,帧内预测滤波技术通过点对点的滤波提升像素预测精度,可以有效地增强空间关联性,从而提升帧内预测精度。IPF技术以AVS3中自右上向左下的预测模式为例,具体如图4所示,其中,URB表示左侧相邻块的靠近当前编码单元的边界像素,MRB表示上侧相邻块的靠近当前编码单元的边界像素,filter direction表示滤波方向。该预测模式方向从右上到左下,生成的当前编码单元预测值主要使用上方MRB这一行相邻块的参考像素点,即当前编码单元的预测像素并没有参考到左侧相邻块的重建像素,然而当前编码单元与左侧重建块为空间相邻关系,若只参考上侧MRB像素而不参考左侧URB像素则容易缺失空间关联性导致预测效果较差。After the development of digital video coding and decoding standards in the past, the non-angle mode remains relatively stable, and there are mean mode and flat mode; the angle mode continues to increase with the evolution of digital video coding and decoding standards. Take the international digital video coding standard H series as an example , the H.264/AVC standard only has 8 angle prediction modes and 1 non-angle prediction mode; H.265/HEVC is extended to 33 angle prediction modes and 2 non-angle prediction modes; and the latest general video coding standard H .266/VVC adopts 67 prediction modes, among which 2 non-angle prediction modes are reserved, and the angle modes are extended from 33 to 65 in H.265. Undoubtedly, with the increase of the angle mode, the intra-frame prediction will be more accurate, and it will be more in line with the current society's demand for high-definition and ultra-high-definition video development. Not only the international standard, but the domestic digital audio and video coding standard AVS3 also continues to expand the angle mode and non-angle mode. The development of ultra-high-definition digital video puts forward higher requirements for intra-frame prediction, and we cannot just rely on simply increasing the angle prediction mode. , extending the wide angle to commit coding efficiency. Therefore, the domestic digital audio and video coding standard AVS3 adopts the intra prediction filter technology (IPF, intra prediction filter). The correlation between the current coding units, the intra-frame prediction filtering technology improves the pixel prediction accuracy through point-to-point filtering, which can effectively enhance the spatial correlation, thereby improving the intra-frame prediction accuracy. The IPF technology takes the prediction mode from upper right to lower left in AVS3 as an example, as shown in Figure 4, where URB indicates the boundary pixel of the left adjacent block close to the current coding unit, and MRB indicates the boundary pixel of the upper adjacent block close to the current coding unit. The boundary pixel of the coding unit, filter direction indicates the filtering direction. The direction of the prediction mode is from upper right to lower left, and the generated prediction value of the current coding unit mainly uses the reference pixel points of the adjacent block in the upper MRB row, that is, the prediction pixel of the current coding unit does not refer to the reconstructed pixel of the adjacent block on the left, However, the current coding unit and the reconstruction block on the left are spatially adjacent. If only the upper MRB pixels are referred to instead of the left URB pixels, the spatial correlation is likely to be lost and the prediction effect will be poor.
IPF技术应用于帧内预测的所有预测模式中,是一种提高帧内预测精度的滤波方法。IPF技术主要通过以下流程实现:The IPF technology is applied to all prediction modes of intra-frame prediction, and is a filtering method to improve the accuracy of intra-frame prediction. IPF technology is mainly implemented through the following processes:
a)IPF技术对该编码单元的当前预测模式进行判断,划分为水平类角度预测模式、垂直类角度预测模式和非角度预测模式;a) IPF technology judges the current prediction mode of the coding unit, and divides it into horizontal angle prediction mode, vertical angle prediction mode and non-angle prediction mode;
b)根据不同类别的预测模式,IPF技术采用不同的滤波器对输入像素进行滤波;b) According to different types of prediction modes, the IPF technology uses different filters to filter the input pixels;
c)根据当前像素到参考像素的距离不同,IPF技术采用不同的滤波系数对输入像素进行滤波;c) According to the different distances from the current pixel to the reference pixel, the IPF technology uses different filter coefficients to filter the input pixels;
IPF技术的输入像素为各个预测模式下得到的预测像素,输出像素为IPF后的最终预测像素。The input pixels of the IPF technology are predicted pixels obtained in each prediction mode, and the output pixels are the final predicted pixels after IPF.
IPF技术有允许标识位ipf_enable_flag,二值变量,值为‘1’表示可使用帧内预测滤波;值为‘0’表示不应使用帧内预测滤波。同时IPF技术还有使用标识位ipf_flag,二值变量,值为‘1’表示应使用帧内预测滤波;值为‘0’表示不应使用帧内预测滤波,如果码流中不存在标识位ipf_flag,则默认为0。The IPF technology has an enable flag ipf_enable_flag, a binary variable, a value of '1' indicates that intra-frame prediction filtering can be used; a value of '0' indicates that intra-frame prediction filtering should not be used. At the same time, IPF technology also uses the identification bit ipf_flag, a binary variable, the value of '1' indicates that intra-frame prediction filtering should be used; the value of '0' indicates that intra-frame prediction filtering should not be used, if the identification bit ipf_flag does not exist in the code stream , the default is 0.
语法元素IPF_flag,如下:The syntax element IPF_flag is as follows:
上述IPF技术将预测模式0、1和2归类为非角度预测模式,使用第一三抽头滤波器对预测像素进行滤波;The above-mentioned IPF technique classifies
将预测模式3至预测模式18、预测模式34至预测模式50归类为垂直类角度预测模式,使用第一两抽头滤波器对预测像素进行滤波;Classify prediction modes 3 to 18, prediction modes 34 to 50 as vertical angle prediction modes, and use the first two-tap filter to filter the prediction pixels;
将预测模式19至预测模式32、预测模式51至预测模式65归类为水平类角度预测模式,使用第二两抽头滤波器对预测像素进行滤波。Prediction modes 19 to 32 and prediction modes 51 to 65 are classified as horizontal angle prediction modes, and the second two-tap filter is used to filter the prediction pixels.
上述适用于IPF技术的第一三抽头滤波器,滤波公式如下:The above-mentioned first three-tap filter applicable to IPF technology, the filtering formula is as follows:
P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)P'(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P( x,y)
上述适用于IPF技术的第一两抽头滤波器,滤波公式如下:The above-mentioned first two-tap filter applicable to IPF technology, the filtering formula is as follows:
P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
上述适用于IPF技术的第二两抽头滤波器,滤波公式如下:The above-mentioned second two-tap filter applicable to IPF technology, the filtering formula is as follows:
P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)P'(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
上述式子中,P′(x,y)为当前色度预测块位于(x,y)位置像素的最终预测值,f(x)与f(y)分别为参考左侧相邻块重建像素的水平滤波系数与参考上侧相邻块重建像素的垂直滤波系数,P(-1,y)与P(x,-1)分别为位于y行的左侧重建像素与位于x列的上侧重建像素,P(x,y)为当前色度分量预测块里的原始预测像素值。其中,x与y的值均不超过当前编码单元块的宽与高取值范围。In the above formula, P'(x, y) is the final prediction value of the pixel at (x, y) position of the current chroma prediction block, and f(x) and f(y) are the reconstructed pixels referring to the left adjacent block P(-1,y) and P(x,-1) are the left reconstruction pixel in row y and the upper focus pixel in column x, respectively. P(x,y) is the original predicted pixel value in the current chroma component prediction block. Wherein, the values of x and y do not exceed the value ranges of the width and height of the current coding unit block.
上述水平滤波系数与垂直滤波系数的取值与当前编码单元块的尺寸以及当前预测块中预测像素到左侧重建像素点、上侧重建像素点的距离有关。上述水平滤波系数与垂直滤波系数的取值还与当前编码块的尺寸有关,根据当前编码单元块的大小划分成不同滤波器系数组。The values of the above-mentioned horizontal filter coefficients and vertical filter coefficients are related to the size of the current coding unit block and the distance from the prediction pixel in the current prediction block to the reconstruction pixel on the left and the reconstruction pixel on the upper side. The values of the above-mentioned horizontal filter coefficients and vertical filter coefficients are also related to the size of the current coding block, and are divided into different filter coefficient groups according to the size of the current coding unit block.
表1给出了IPF技术的滤波系数。Table 1 shows the filter coefficients of IPF technology.
表1 帧内色度预测滤波系数Table 1 Intra-frame chroma prediction filter coefficients
图5展示了帧内预测滤波的三种滤波情况示意图,分别仅参考了上侧参考像素对当前编码单元中的预测值进行滤波;仅参考了左侧参考像素对当前编码单元预中的测值进行滤波;以及都参考了上侧与左侧参考像素对当前编码单元块中的预测值进行滤波。Figure 5 shows the schematic diagrams of three filtering situations of intra prediction filtering, which only refer to the upper reference pixel to filter the predicted value in the current coding unit; only refer to the left reference pixel to predict the measured value of the current coding unit performing filtering; and filtering the predicted value in the current coding unit block with reference to the upper and left reference pixels.
图6为本申请实施例中所描述的一种实例的视频译码系统1的框图。如本文所使用,术语“视频译码器”一般是指视频编码器和视频解码器两者。在本申请中,术语“视频译码”或“译码”可一般地指代视频编码 或视频解码。视频译码系统1的视频编码器100和视频解码器200用于实现本申请提出的图像编码方法。FIG. 6 is a block diagram of an example
如图6中所示,视频译码系统1包含源装置10和目的装置20。源装置10产生经编码视频数据。因此,源装置10可被称为视频编码装置。目的装置20可对由源装置10所产生的经编码的视频数据进行解码。因此,目的装置20可被称为视频解码装置。源装置10、目的装置20或两个的各种实施方案可包含一或多个处理器以及耦合到所述一或多个处理器的存储器。所述存储器可包含但不限于RAM、ROM、EEPROM、快闪存储器或可用于以可由计算机存取的指令或数据结构的形式存储所要的程序代码的任何其它媒体,如本文所描述。As shown in FIG. 6 , a
源装置10和目的装置20可以包括各种装置,包含桌上型计算机、移动计算装置、笔记型(例如,膝上型)计算机、平板计算机、机顶盒、例如所谓的“智能”电话等电话手持机、电视机、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机或其类似者。Source device 10 and destination device 20 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, etc. , televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
目的装置20可经由链路30从源装置10接收经编码视频数据。链路30可包括能够将经编码视频数据从源装置10移动到目的装置20的一或多个媒体或装置。在一个实例中,链路30可包括使得源装置10能够实时将经编码视频数据直接发射到目的装置20的一或多个通信媒体。在此实例中,源装置10可根据通信标准(例如无线通信协议)来调制经编码视频数据,且可将经调制的视频数据发射到目的装置20。所述一或多个通信媒体可包含无线和/或有线通信媒体,例如射频(RF)频谱或一或多个物理传输线。所述一或多个通信媒体可形成基于分组的网络的一部分,基于分组的网络例如为局域网、广域网或全球网络(例如,因特网)。所述一或多个通信媒体可包含路由器、交换器、基站或促使从源装置10到目的装置20的通信的其它设备。在另一实例中,可将经编码数据从输出接口140输出到存储装置40。Destination device 20 may receive encoded video data from source device 10 via
本申请的图像编解码技术可应用于视频编解码以支持多种多媒体应用,例如空中电视广播、有线电视发射、卫星电视发射、串流视频发射(例如,经由因特网)、用于存储于数据存储媒体上的视频数据的编码、存储在数据存储媒体上的视频数据的解码,或其它应用。在一些实例中,视频译码系统1可用于支持单向或双向视频传输以支持例如视频流式传输、视频回放、视频广播和/或视频电话等应用。The image coding and decoding technology of the present application can be applied to video coding and decoding to support various multimedia applications, such as over-the-air TV broadcasting, cable TV transmission, satellite TV transmission, streaming video transmission (for example, via the Internet), for storing in data storage Encoding of video data on a medium, decoding of video data stored on a data storage medium, or other applications. In some examples, the
图6中所说明的视频译码系统1仅为实例,并且本申请的技术可适用于未必包含编码装置与解码装置之间的任何数据通信的视频译码设置(例如,视频编码或视频解码)。在其它实例中,数据从本地存储器检索、在网络上流式传输等等。视频编码装置可对数据进行编码并且将数据存储到存储器,和/或视频解码装置可从存储器检索数据并且对数据进行解码。在许多实例中,由并不彼此通信而是仅编码数据到存储器和/或从存储器检索数据且解码数据的装置执行编码和解码。The
在图6的实例中,源装置10包含视频源120、视频编码器100和输出接口140。在一些实例中,输出接口140可包含调节器/解调器(调制解调器)和/或发射器。视频源120可包括视频捕获装置(例如,摄像机)、含有先前捕获的视频数据的视频存档、用以从视频内容提供者接收视频数据的视频馈入接口,和/或用于产生视频数据的计算机图形系统,或视频数据的此些来源的组合。In the example of FIG. 6 , source device 10 includes
视频编码器100可对来自视频源120的视频数据进行编码。在一些实例中,源装置10经由输出接口140将经编码视频数据直接发射到目的装置20。在其它实例中,经编码视频数据还可存储到存储装置40上,供目的装置20以后存取来用于解码和/或播放。
在图6的实例中,目的装置20包含输入接口240、视频解码器200和显示装置220。在一些实例中,输入接口240包含接收器和/或调制解调器。输入接口240可经由链路30和/或从存储装置40接收经编码视频数据。显示装置220可与目的装置20集成或可在目的装置20外部。一般来说,显示装置220显示经解码视频数据。显示装置220可包括多种显示装置,例如,液晶显示器(LCD)、等离子显示器、有机发光二极管(OLED)显示器或其它类型的显示装置。In the example of FIG. 6 , the destination device 20 includes an
尽管图6中未图示,但在一些方面,视频编码器100和视频解码器200可各自与音频编码器和解码器集成,且可包含适当的多路复用器-多路分用器单元或其它硬件和软件,以处置共同数据流或单独数据流中的音频和视频两者的编码。Although not shown in FIG. 6 , in some
视频编码器100和视频解码器200各自可实施为例如以下各项的多种电路中的任一者:一或多个微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、离散逻辑、硬件或其任何组合。如果部分地以软件来实施本申请,那么装置可将用于软件的指令存储在合适的非易失性计算机可读存储媒体中,且可使用一或多个处理器在硬件中执行所述指令从而实施本申请技术。前述内容(包含硬件、软件、硬件与软件的组合等)中的任一者可被视为一或多个处理器。视频编码器100和视频解码器200中的 每一者可包含在一或多个编码器或解码器中,所述编码器或解码器中的任一者可集成为相应装置中的组合编码器/解码器(编码解码器)的一部分。
图7为本申请实施例中所描述的一种视频编码器100的示例框图。视频编码器100用于将视频输出到后处理实体41。后处理实体41表示可处理来自视频编码器100的经编码视频数据的视频实体的实例,例如媒体感知网络元件(MANE)或拼接/编辑装置。在一些情况下,后处理实体41可为网络实体的实例。在一些视频编码系统中,后处理实体41和视频编码器100可为单独装置的若干部分,而在其它情况下,相对于后处理实体41所描述的功能性可由包括视频编码器100的相同装置执行。在某一实例中,后处理实体41是图1的存储装置40的实例。Fig. 7 is an example block diagram of a
在图7的实例中,视频编码器100包括预测处理单元108、滤波器单元106、存储器107、求和器112、变换器101、量化器102和熵编码器103。预测处理单元108包括帧间预测器110和帧内预测器109。为了图像块重构,视频编码器100还包含反量化器104、反变换器105和求和器111。滤波器单元106表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)和样本自适应偏移(SAO)滤波器。尽管在图7中将滤波器单元106示出为环路内滤波器,但在其它实现方式下,可将滤波器单元106实施为环路后滤波器。在一种示例下,视频编码器100还可以包括视频数据存储器、分割单元(图中未示意)。In the example of FIG. 7 ,
视频编码器100接收视频数据,并将所述视频数据存储在视频数据存储器中。分割单元将所述视频数据分割成若干图像块,而且这些图像块可以被进一步分割为更小的块,例如基于四叉树结构或者二叉树结构的图像块分割。预测处理单元108可选择用于当前图像块的多个可能的译码模式中的一者,例如多个帧内译码模式中的一者或多个帧间译码模式中的一者。预测处理单元108可将所得经帧内、帧间译码的块提供给求和器112以产生残差块,且提供给求和器111以重构用作参考图像的经编码块。预测处理单元108内的帧内预测器109可相对于与待编码当前块在相同帧或条带中的一或多个相邻编码块执行当前图像块的帧内预测性编码,以去除空间冗余。预测处理单元108内的帧间预测器110可相对于一或多个参考图像中的一或多个预测块执行当前图像块的帧间预测性编码以去除时间冗余。预测处理单元108将指示当前图像块的所选帧内或帧间预测模式的信息提供到熵编码器103,以便于熵编码器103编码指示所选帧间预测模式的信息。
在预测处理单元108经由帧间预测/帧内预测产生当前图像块的预测块之后,视频编码器100通过从待编码的当前图像块减去所述预测块来形成残差图像块。求和器112表示执行此减法运算的一或多个组件。所述残差块中的残差视频数据可包含在一或多个TU中,并应用于变换器101。变换器101使用例如离散余弦变换(DCT)或概念上类似的变换等变换将残差视频数据变换成残差变换系数。变换器101可将残差视频数据从像素值域转换到变换域,例如频域。After the
变换器101可将所得变换系数发送到量化器102。量化器102量化所述变换系数以进一步减小位码率。在一些实例中,量化器102可接着执行对包含经量化的变换系数的矩阵的扫描。或者,熵编码器103可执行扫描。Transformer 101 may send the resulting transform coefficients to
在量化之后,熵编码器103对经量化变换系数进行熵编码。举例来说,熵编码器103可执行上下文自适应可变长度编码(CAVLC)、上下文自适应二进制算术编码(CABAC)、基于语法的上下文自适应二进制算术编码(SBAC)、概率区间分割熵(PIPE)编码或另一熵编码方法或技术。在由熵编码器103熵编码之后,可将经编码码流发射到视频解码器200,或经存档以供稍后发射或由视频解码器200检索。熵编码器103还可对待编码的当前图像块的语法元素进行熵编码。After quantization, the
反量化器104和反变换器105分别应用逆量化和逆变换以在像素域中重构所述残差块,例如以供稍后用作参考图像的参考块。求和器111将经重构的残差块添加到由帧间预测器110或帧内预测器109产生的预测块,以产生经重构图像块。滤波器单元106可以适用于经重构图像块以减小失真,诸如方块效应(block artifacts)。然后,该经重构图像块作为参考块存储在存储器107中,可由帧间预测器110用作参考块以对后续视频帧或图像中的块进行帧间预测。The
视频编码器100将输入视频划分成若干个编码树单元,每个编码树单元又划分成若干个或矩形或方形的编码块。在当前编码块选择帧内预测模式进行编码时,对当前编码块的亮度分量进行若干种预测模式的计算遍历并根据率失真代价选择最优预测模式,对当前编码块的色度分量进行若干种预测模式的计算遍历并根据率失真代价选择最优预测模式。之后,计算原始视频块与预测块之间的残差,该残差后续一路经过变化与量化、熵编码等形成输出码流,另一路经过反变换与反量化、环路滤波等形成重构样本作为后续视 频压缩的参考信息。The
目前IPF技术在视频编码器100的具体实现如下。The specific implementation of the current IPF technology in the
输入数字视频信息在编码端被划分成若干个编码树单元,每个编码树单元又被划分成若干个或矩形或方形的编码单元,每个编码单元分别进行帧内预测过程计算预测块。The input digital video information is divided into several coding tree units at the coding end, and each coding tree unit is divided into several or rectangular or square coding units, and each coding unit performs intra-frame prediction process to calculate the predicted block.
在当前编码单元中,In the current code unit,
①若IPF的允许标识位为‘1’则进行如下所有步骤;① If the allowable flag of IPF is '1', perform all the following steps;
②若IPF的允许标识位为‘0’则仅进行a1)、b1)、f1和g1)步骤。② If the permission flag of IPF is '0', only a1), b1), f1 and g1) steps are performed.
a1)帧内预测首先对所有预测模式进行遍历,计算每一种帧内预测模式下的预测像素,并根据原始像素计算率失真代价;a1) Intra prediction first traverses all prediction modes, calculates the predicted pixels in each intra prediction mode, and calculates the rate-distortion cost based on the original pixels;
b1)根据上述所有预测模式率失真代价最小原则,选择出当前编码单元的最优预测模式,记录最优预测模式信息和与之对应的率失真代价信息;b1) Select the optimal prediction mode of the current coding unit according to the minimum rate-distortion cost principle of all the above-mentioned prediction modes, and record the optimal prediction mode information and the corresponding rate-distortion cost information;
c1)对所有帧内预测模式再次进行遍历,此过程开启IPF技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;c1) Traversing all intra prediction modes again, this process starts the IPF technology, first calculates the prediction pixels in each intra prediction mode, and obtains the prediction block of the current coding unit;
d1)对当前编码单元的预测块进行IPF,根据当前预测模式选择与之相对应的滤波器,根据当前编码单元尺寸选择相对应的滤波系数组,具体对应关系可查表1;d1) Perform IPF on the predicted block of the current coding unit, select the corresponding filter according to the current prediction mode, and select the corresponding filter coefficient group according to the size of the current coding unit. The specific corresponding relationship can be found in Table 1;
e1)根据上述经过IPF技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;e1) Calculate the rate-distortion cost information of each prediction mode according to the final prediction pixel and original pixel obtained by the above-mentioned IPF technology, and record the prediction mode and corresponding cost value of the minimum rate-distortion cost information;
f1)若IPF允许标识位为‘0’,则将b1)中记录的预测模式索引写入码流给解码端;f1) If the IPF allows the identification bit to be '0', then write the prediction mode index recorded in b1) into the code stream to the decoder;
若IPF允许标识位为‘1’,则将b1)中记录的最小代价值与e1)中记录的最小代价值进行比较,If the IPF allows the flag to be '1', compare the minimum cost value recorded in b1) with the minimum cost value recorded in e1),
若b1)中的率失真代价更小,则将b1)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元标识位置使用标志位置否,表示不使用IPF技术,也写入码流给解码端;If the rate-distortion cost in b1) is smaller, then encode the prediction mode index recorded in b1) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and use the flag position of the current coding unit of IPF to identify the position No , indicating that the IPF technology is not used, and the code stream is also written to the decoder;
若e1)中的率失真更小,则将e1)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元标识位置使用标志位置真,表示使用IPF技术,也写入码流给解码端。If the rate-distortion in e1) is smaller, then encode the prediction mode index recorded in e1) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, set the current coding unit identification position of IPF to true, Indicates that IPF technology is used, and the code stream is also written to the decoder.
g)之后,将预测值与变换与量化等操作后的残差信息叠加,得到当前编码单元的重建块作为后续编码单元的参考信息。g) Afterwards, the prediction value is superimposed on the residual information after operations such as transformation and quantization to obtain the reconstructed block of the current coding unit as reference information of the subsequent coding unit.
帧内预测器109还可将指示当前编码块所选帧内预测模式的信息提供到熵编码器103,以便熵编码器103编码指示所选帧内预测模式的信息。The
图8为本申请实施例中所描述的一种视频解码器200的示例框图。在图8的实例中,视频解码器200包括熵解码器203、预测处理单元208、反量化器204、反变换器205、求和器211、滤波器单元206以及存储器207。预测处理单元208可以包括帧间预测器210和帧内预测器209。在一些实例中,视频解码器200可执行大体上与相对于来自图7的视频编码器100描述的编码过程互逆的解码过程。FIG. 8 is an example block diagram of a
在解码过程中,视频解码器200从视频编码器100接收表示经编码视频条带的图像块和相关联的语法元素的经编码视频码流。视频解码器200可从网络实体42接收视频数据,可选的,还可以将所述视频数据存储在视频数据存储器(图中未示意)中。视频数据存储器可存储待由视频解码器200的组件解码的视频数据,例如经编码视频码流。存储在视频数据存储器中的视频数据,例如可从存储装置40、从相机等本地视频源、经由视频数据的有线或无线网络通信或者通过存取物理数据存储媒体而获得。视频数据存储器可作为用于存储来自经编码视频码流的经编码视频数据的经解码图像缓冲器(CPB)。During decoding,
网络实体42可例如为服务器、MANE、视频编辑器/剪接器,或用于实施上文所描述的技术中的一或多者的其它此装置。网络实体42可包括或可不包括视频编码器,例如视频编码器100。在网络实体42将经编码视频码流发送到视频解码器200之前,网络实体42可实施本申请中描述的技术中的部分。在一些视频解码系统中,网络实体42和视频解码器200可为单独装置的部分,而在其它情况下,相对于网络实体42描述的功能性可由包括视频解码器200的相同装置执行。
视频解码器200的熵解码器203对码流进行熵解码以产生经量化的系数和一些语法元素。熵解码器203将语法元素转发到预测处理单元208。视频解码器200可接收在视频条带层级和/或图像块层级处的语法元素。当视频条带被解码为经帧内解码(I)条带时,预测处理单元208的帧内预测器209基于发信号通知的帧 内预测模式和来自当前帧或图像的先前经解码块的数据而产生当前视频条带的图像块的预测块。当视频条带被解码为经帧间解码(即,B或P)条带时,预测处理单元208的帧间预测器210可基于从熵解码器203接收到的语法元素,确定用于对当前视频条带的当前图像块进行解码的帧间预测模式,基于确定的帧间预测模式,对所述当前图像块进行解码(例如执行帧间预测)。The entropy decoder 203 of the
反量化器204将在码流中提供且由熵解码器203解码的经量化变换系数逆量化,即去量化。逆量化过程可包括:使用由视频编码器100针对视频条带中的每个图像块计算的量化参数来确定应施加的量化程度以及同样地确定应施加的逆量化程度。反变换器205将逆变换应用于变换系数,例如逆DCT、逆整数变换或概念上类似的逆变换过程,以便产生像素域中的残差块。The
在帧间预测器210产生用于当前图像块或当前图像块的子块的预测块之后,视频解码器200通过将来自反变换器205的残差块与由帧间预测器210产生的对应预测块求和以得到重建的块,即经解码图像块。求和器211表示执行此求和操作的组件。在需要时,还可使用环路滤波器(在解码环路中或在解码环路之后)来使像素转变平滑或者以其它方式改进视频质量。滤波器单元206可以表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)以及样本自适应偏移(SAO)滤波器。尽管在图8中将滤波器单元206示出为环路内滤波器,但在其它实现方式中,可将滤波器单元206实施为环路后滤波器。After the
视频解码器200具体执行的图像解码方法包括,输入码流在进行解析、反变换和反量化后,得到当前编码块的预测模式索引。若当前编码块色度分量的预测模式索引为增强型两步跨分量预测模式,则根据索引值选择仅取来自当前编码块的上侧或者左侧相邻像素的重构样本进行线性模型的计算,根据线性模型计算得到当前编码块的色度分量的原始预测块,降采样、并针对降采样后的预测块进行基于正交方向的边界相邻像素的相关性的预测修正,得到最终的色度分量的最终预测块。后续码流一路作为后续视频解码的参考信息,一路经过后滤波处理输出视频信号。The image decoding method specifically executed by the
目前IPF技术在视频解码器200端具体实现如下。At present, the specific implementation of the IPF technology at the
解码端获取码流并解析得到数字视频序列信息,解析得到当前视频序列的IPF允许标识位、当前解码单元编码模式为帧内预测编码模式和当前解码单元的IPF使用标识位。The decoding end obtains the code stream and analyzes to obtain the digital video sequence information, and obtains the IPF permission flag of the current video sequence, the intra prediction coding mode of the current decoding unit and the IPF usage flag of the current decoding unit.
在当前解码单元中,In the current decoding unit,
①若IPF的允许标识位为‘1’则进行如下所有步骤;① If the allowable flag of IPF is '1', perform all the following steps;
②若IPF的允许标识位为‘0’则仅进行a2)、b2)和e2)步骤:②If the allowed flag of IPF is '0', only a2), b2) and e2) steps are performed:
a2)获取码流信息,解析当前解码单元的残差信息,经过反变换与反量化过程得到时域残差信息;a2) Obtain the code stream information, analyze the residual information of the current decoding unit, and obtain the residual information in the time domain through the process of inverse transformation and inverse quantization;
b2)解析码流并获取当前解码单元的预测模式索引,根据相邻重建块与预测模式索引,计算得到当前解码单元的预测块;b2) Parse the code stream and obtain the prediction mode index of the current decoding unit, and calculate the prediction block of the current decoding unit according to the adjacent reconstruction block and the prediction mode index;
c2)解析并获取IPF的使用标识位,若IPF的使用标识位为‘0’,则不对当前预测块做额外操作;若IPF的使用标识位为‘1’,则执行d2);c2) Parsing and obtaining the use flag of IPF, if the use flag of IPF is '0', then no additional operation is performed on the current prediction block; if the use flag of IPF is '1', then execute d2);
d2)根据当前解码单元的预测模式归类信息选择相对应的滤波器,根据当前解码单元的尺寸大小选择相对应的滤波器系数组,之后对预测块内各个像素进行滤波得到最终预测块;d2) Select the corresponding filter according to the prediction mode classification information of the current decoding unit, select the corresponding filter coefficient group according to the size of the current decoding unit, and then filter each pixel in the prediction block to obtain the final prediction block;
e2)将预测块叠加还原后的残差信息得到当前解码单元的重建块,经后处理输出;e2) Obtaining the reconstructed block of the current decoding unit by superimposing and restoring the residual information of the predicted block, and outputting it after post-processing;
应当理解的是,视频解码器200的其它结构变化可用于解码经编码视频码流。例如,视频解码器200可以不经滤波器单元206处理而生成输出视频流;或者,对于某些图像块或者图像帧,视频解码器200的熵解码器203没有解码出经量化的系数,相应地不需要经反量化器204和反变换器205处理。It should be understood that other structural variations of the
上述帧内预测技术中,现有IPF技术能够有效提升帧内预测的编码效率,大大增强了帧内预测的空间关联性,很好地解决了帧内预测过程中,仅用单一参考像素行或列,而忽略了某些像素对预测值的影响。但当帧内预测过程如需要平滑处理的部分时,IPF技术和目前帧内预测模式都不能很好地解决类似问题,逐像素的根据参考像素滤波可以提高预测块与参考块的关联性,却无法解决预测块内部的平滑问题。Among the above-mentioned intra-frame prediction technologies, the existing IPF technology can effectively improve the coding efficiency of intra-frame prediction, greatly enhance the spatial correlation of intra-frame prediction, and solve the problem of using only a single reference pixel row or column, while ignoring the influence of certain pixels on the predicted value. However, when the intra prediction process needs to be smoothed, neither the IPF technology nor the current intra prediction mode can solve similar problems well. The pixel-by-pixel filtering based on the reference pixel can improve the correlation between the prediction block and the reference block. Unable to resolve smoothing inside prediction blocks.
根据单一预测模式计算所得的预测块通常在纹理比较清晰的图像当中会体现出较好的预测效果,残差因此也会变得更小更少,编码效率得以提升。但在纹理比较模糊的图像块中,过于锐化的预测可能会导致残差增加和变大,预测效果不好,编码效率下降。The prediction block calculated according to a single prediction mode usually shows a better prediction effect in images with clearer textures, so the residual error will become smaller and less, and the coding efficiency will be improved. However, in image blocks with blurred textures, over-sharp prediction may lead to increased and larger residuals, poor prediction performance, and reduced coding efficiency.
针对上述问题,本申请实施例针对一些需要平滑处理的图像块,提出一种基于平滑处理的IPF技术,对根据帧内预测模式得到的预测块直接滤波。In view of the above problems, the embodiment of the present application proposes an IPF technology based on smoothing processing for some image blocks that need to be smoothed, and directly filters the predicted blocks obtained according to the intra prediction mode.
图9为本申请实施例中图像编码方法的一种流程示意图,该图像编码方法可以应用于图6示出的视频 译码系统1中的源装置10或图7示出的视频编码器100。图9示出的流程以执行主体为图7示出的视频编码器100为例进行说明。如图9所示,本申请实施例提供的图像编码方法包括:FIG. 9 is a schematic flowchart of an image encoding method in an embodiment of the present application. The image encoding method can be applied to the source device 10 in the
步骤110,确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;
步骤120,若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值,所述第一数值用于指示使用所述第一帧内预测滤波模式;Step 120: If it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode, set the first intra-frame prediction filtering mode of the current coding block to A use flag is set to a first value, and the first value is used to indicate the use of the first intra-frame prediction filtering mode;
步骤130,将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;
步骤140,根据所述第一帧内预测滤波模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。Step 140: According to the first intra-frame prediction filtering mode, predict the current coded block to obtain a predicted block, code the predicted block, and write the coded result into a code stream.
在一些实施例中,所述方法还包括:将所述当前编码块的预测块和经反变换、反量化后得到的残差块叠加,得到重建后的重建块,作为下一个编码块的预测参考块。In some embodiments, the method further includes: superimposing the prediction block of the current coding block and the residual block obtained after inverse transformation and inverse quantization to obtain a reconstructed reconstruction block as the prediction of the next coding block Reference block.
本技术方案1在编码端帧内预测部分具体实现如下:The specific implementation of the
编码器获取编码信息,包括帧内预测滤波允许标识位以及本技术方案的帧内预测平滑滤波(后续简称为IPS)允许标识位等,获取图像信息后将图像划分成若干个CTU,进一步再划分成若干个CU,每个独立CU都进行帧内预测;The encoder obtains encoding information, including the intra-frame predictive filtering permission flag and the intra-frame predictive smoothing filter (hereinafter referred to as IPS) permission flag of this technical solution, etc. After obtaining the image information, the image is divided into several CTUs, and further subdivided into several CUs, and each independent CU performs intra-frame prediction;
在帧内预测过程中,During the intra prediction process,
①若IPF允许标识位和IPS允许标识位都为‘1’,则执行如下所有步骤;① If both the IPF permission flag and the IPS permission flag are '1', perform all the following steps;
②若IPF允许标识位为‘1’、且IPS允许标识位为‘0’,则仅执行a3)、b3)、c3)、d3)、e3)、和i3)、j3);② If the IPF allows the flag to be '1' and the IPS allows the flag to be '0', only a3), b3), c3), d3), e3), and i3), j3) are executed;
③若IPF允许标识位为‘0’、且IPS允许标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执行a3)、b3)、f3)、g3)、h3)、和i3)、j3);③ If the IPF allowed flag is '0', and the IPS allowed flag is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute a3), b3), f3), g3), h3), and i3), j3);
④若IPF允许标识位和IPS允许标识位都为‘0’,则仅执行a3)、b3)和i3)、j3):④ If both the IPF permission flag and the IPS permission flag are '0', only a3), b3) and i3), j3) are executed:
a3)当前编码单元遍历所有帧内预测模式,计算得到每一种预测模式下的预测块,根据原始块计算得到当前预测模式的率失真代价信息;a3) The current coding unit traverses all intra-frame prediction modes, calculates the prediction block in each prediction mode, and calculates the rate-distortion cost information of the current prediction mode according to the original block;
b3)根据上述所有预测模式率失真代价最小原则,选择出当前编码单元的最优预测模式,记录最优预测模式信息和与之对应的率失真代价信息;b3) According to the minimum rate-distortion cost principle of all the above-mentioned prediction modes, select the optimal prediction mode of the current coding unit, and record the optimal prediction mode information and the corresponding rate-distortion cost information;
c3)对所有帧内预测模式进行第二次遍历,此过程开启IPF技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;c3) Perform a second traversal on all intra-frame prediction modes. This process starts the IPF technology, and first calculates the predicted pixels in each intra-frame prediction mode to obtain the predicted block of the current coding unit;
d3)对当前编码单元的预测块进行IPF滤波,根据当前预测模式选择与之相对应的滤波器,根据当前编码单元尺寸选择相对应的滤波系数组,具体对应关系可查表1;d3) Perform IPF filtering on the prediction block of the current coding unit, select the filter corresponding to it according to the current prediction mode, and select the corresponding filter coefficient group according to the size of the current coding unit, the specific corresponding relationship can be found in Table 1;
e3)根据上述经过IPF技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;e3) Calculate the rate-distortion cost information of each prediction mode according to the final prediction pixel and the original pixel obtained by the above-mentioned IPF technology, and record the prediction mode and the corresponding cost value of the minimum rate-distortion cost information;
f3)对所有帧内预测模式进行第三次遍历,此过程开启IPS技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;f3) The third traversal is performed on all intra prediction modes. This process starts the IPS technology, and first calculates the prediction pixels in each intra prediction mode to obtain the prediction block of the current coding unit;
g3)对当前编码单元的预测块进行两次IPS得到最终预测块;g3) Performing IPS twice on the prediction block of the current coding unit to obtain the final prediction block;
h3)根据上述经过IPS技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;h3) Calculate the rate-distortion cost information of each prediction mode according to the final prediction pixel and the original pixel obtained by the above-mentioned IPS technology, and record the prediction mode and corresponding cost value of the minimum rate-distortion cost information;
i3)若IPF允许标识位为‘0’且IPS允许标识位为‘0’,则将b3)中记录的预测模式索引写入码流给解码端;i3) If the IPF allows the flag to be '0' and the IPS allows the flag to be '0', then write the prediction mode index recorded in b3) into the code stream to the decoder;
若IPF允许标识位为‘1’且IPS允许标识位为‘0’,则将b3)中记录的最小代价值与e3)中记录的最小代价值进行比较,If the IPF allows the flag to be '1' and the IPS allows the flag to be '0', then compare the minimum cost value recorded in b3) with the minimum cost value recorded in e3),
若b3)中的率失真代价更小,则将b3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元使用标志位置‘0’,表示不使用IPF技术,也写入码流给解码端;If the rate-distortion cost in b3) is smaller, encode the prediction mode index recorded in b3) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and use the flag position '0' for the current coding unit of IPF , indicating that the IPF technology is not used, and the code stream is also written to the decoder;
若e3)中的率失真更小,则将e3)中记录的预测模式索引编码作为当前编码单元的最优预测 模式写入码流给解码端,将IPF当前编码单元使用标志位置‘1’,表示使用IPF技术,也写入码流给解码端;If the rate-distortion in e3) is smaller, encode the prediction mode index recorded in e3) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoding end, and use the flag position '1' for the current coding unit of IPF, Indicates that IPF technology is used, and the code stream is also written to the decoder;
若IPF允许标识位为‘0’且IPS允许标识位为‘1’,则将b3)中记录的最小代价值与h)中记录的最小代价值进行比较,If the IPF allows the flag to be '0' and the IPS allows the flag to be '1', then compare the minimum cost value recorded in b3) with the minimum cost value recorded in h),
若b3)中的率失真代价更小,则将b3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘0’(即第二值),表示不使用该技术,也写入码流给解码端;If the rate-distortion cost in b3) is smaller, encode the prediction mode index recorded in b3) as the optimal prediction mode of the current coding unit and write the code stream to the decoder, and set the IPS usage flag position of the current coding unit to '0' ' (that is, the second value), indicating that this technology is not used, and the code stream is also written to the decoder;
若h3)中的率失真更小,则将h3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘1’,表示使用该技术,也写入码流给解码端;If the rate-distortion in h3) is smaller, encode the prediction mode index recorded in h3) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPS use flag position of the current coding unit to '1' , indicating that this technology is used, and the code stream is also written to the decoder;
若IPF允许标识位为‘1’且IPS允许标识位为‘1’,则将b3)、e3)和h3)中记录的最小代价值进行比较,If the IPF allows the flag to be '1' and the IPS allows the flag to be '1', then compare the minimum cost values recorded in b3), e3) and h3),
若b3)中的率失真代价更小,则将b3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标识位和IPF使用标志位置‘0’,表示均不使用,也写入码流给解码端;If the rate-distortion cost in b3) is smaller, then encode the prediction mode index recorded in b3) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and use the IPS usage flag and IPF of the current coding unit Use the flag position '0', which means that none of them are used, and the code stream is also written to the decoder;
若e3)中的率失真更小,则将e3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘1’且不传输IPS标识位,表示使用IPF技术而不使用IPS技术,也写入码流给解码端;If the rate-distortion in e3) is smaller, encode the prediction mode index recorded in e3) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPF usage flag position of the current coding unit to '1' And the IPS flag is not transmitted, which means that IPF technology is used instead of IPS technology, and the code stream is also written to the decoding end;
若h3)中的率失真更小,则将h3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘0’且IPS使用标志位置‘1’,表示不使用IPF技术而使用IPS技术,也写入码流给解码端。If the rate-distortion in h3) is smaller, encode the prediction mode index recorded in h3) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPF usage flag position of the current coding unit to '0' And IPS uses the flag position '1', indicating that IPS technology is used instead of IPF technology, and the code stream is also written to the decoder.
j3)后将预测块和反变换、反量化后的残差叠加得到重建后的编码单元块,作为下一个编码单元的预测参考块。j3) Afterwards, the predicted block is superimposed with the residual after inverse transformation and inverse quantization to obtain a reconstructed coding unit block, which is used as a prediction reference block of the next coding unit.
本技术方案2在编码端帧内预测部分具体实现如下:The technical solution 2 is specifically implemented in the intra-frame prediction part of the encoding end as follows:
编码器获取编码信息,包括帧内预测滤波允许标识位以及本技术方案的帧内预测平滑滤波(后续简称为IPS)允许标识位等,获取图像信息后将图像划分成若干个CTU,进一步再划分成若干个CU,每个独立CU都进行帧内预测;The encoder obtains encoding information, including the intra-frame predictive filtering permission flag and the intra-frame predictive smoothing filter (hereinafter referred to as IPS) permission flag of this technical solution, etc. After obtaining the image information, the image is divided into several CTUs, and further subdivided into several CUs, and each independent CU performs intra-frame prediction;
在帧内预测过程中,During the intra prediction process,
①若IPF允许标识位和IPS允许标识位都为‘1’,则执行如下所有步骤;① If both the IPF permission flag and the IPS permission flag are '1', perform all the following steps;
②若IPF允许标识位为‘1’、且IPS允许标识位为‘0’,则仅执行a4)、b4)、c4)、d4)、e4)、和i4)、j4);② If the IPF allows the flag to be '1' and the IPS allows the flag to be '0', only a4), b4), c4), d4), e4), and i4), j4) are executed;
③若IPF允许标识位为‘0’、且IPS允许标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执行a4)、b4)、f4)、g4)、h4)、和i4)、j4);③ If the IPF allowed flag is '0', and the IPS allowed flag is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute a4), b4), f4), g4), h4), and i4), j4);
④若IPF允许标识位和IPS允许标识位都为‘0’,则仅执行a4)、b4)和i4)、j4):④ If both the IPF permission flag and the IPS permission flag are '0', only execute a4), b4) and i4), j4):
a4)当前编码单元遍历所有帧内预测模式,计算得到每一种预测模式下的预测块,根据原始块计算得到当前预测模式的率失真代价信息;a4) The current coding unit traverses all intra-frame prediction modes, calculates the prediction block in each prediction mode, and calculates the rate-distortion cost information of the current prediction mode according to the original block;
b4)根据上述所有预测模式率失真代价最小原则,选择出当前编码单元的最优预测模式,记录最优预测模式信息和与之对应的率失真代价信息;b4) According to the principle of minimum rate-distortion cost of all the above-mentioned prediction modes, select the optimal prediction mode of the current coding unit, and record the optimal prediction mode information and the corresponding rate-distortion cost information;
c4)对所有帧内预测模式进行第二次遍历,此过程开启IPF技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;c4) Perform a second traversal on all intra-frame prediction modes. This process starts the IPF technology, and first calculates the predicted pixels in each intra-frame prediction mode to obtain the predicted block of the current coding unit;
d4)对当前编码单元的预测块进行IPF滤波,根据当前预测模式选择与之相对应的滤波器,根据当前编码单元尺寸选择相对应的滤波系数组,具体对应关系可查表1;d4) Perform IPF filtering on the prediction block of the current coding unit, select the corresponding filter according to the current prediction mode, and select the corresponding filter coefficient group according to the size of the current coding unit, the specific corresponding relationship can be checked in Table 1;
e4)根据上述经过IPF技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;e4) Calculate the rate-distortion cost information of each prediction mode according to the final prediction pixel and original pixel obtained by the above-mentioned IPF technology, and record the prediction mode and corresponding cost value of the minimum rate-distortion cost information;
f4)对所有帧内预测模式进行第三次遍历,此过程开启IPS技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;f4) A third traversal is performed on all intra prediction modes. This process starts the IPS technology, and first calculates the prediction pixels in each intra prediction mode to obtain the prediction block of the current coding unit;
g4)对当前编码单元的预测块进行一次IPS得到最终预测块;g4) performing an IPS on the prediction block of the current coding unit to obtain the final prediction block;
h4)根据上述经过IPS技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;h4) Calculate the rate-distortion cost information of each prediction mode according to the final prediction pixel and the original pixel obtained by the above-mentioned IPS technology, and record the prediction mode and corresponding cost value of the minimum rate-distortion cost information;
i4)若IPF允许标识位为‘0’且IPS允许标识位为‘0’,则将b4)中记录的预测模式索引写入码流给解码端;i4) If the IPF allows the flag to be '0' and the IPS allows the flag to be '0', then write the prediction mode index recorded in b4) into the code stream to the decoder;
若IPF允许标识位为‘1’且IPS允许标识位为‘0’,则将b4)中记录的最小代价值与e)中记录的最小代价值进行比较,If the IPF allows the flag to be '1' and the IPS allows the flag to be '0', then compare the minimum cost value recorded in b4) with the minimum cost value recorded in e),
若b4)中的率失真代价更小,则将b4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元使用标志位置‘0’,表示不使用IPF技术,也写入码流给解码端;If the rate-distortion cost in b4) is smaller, encode the prediction mode index recorded in b4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and use the flag position '0' for the current coding unit of IPF , indicating that the IPF technology is not used, and the code stream is also written to the decoder;
若e4)中的率失真更小,则将e4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元使用标志位置‘1’,表示使用IPF技术,也写入码流给解码端;If the rate-distortion in e4) is smaller, encode the prediction mode index recorded in e4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoding end, and use the flag position '1' for the current coding unit of IPF, Indicates that IPF technology is used, and the code stream is also written to the decoder;
若IPF允许标识位为‘0’且IPS允许标识位为‘1’,则将b4)中记录的最小代价值与h)中记录的最小代价值进行比较,If the IPF allows the flag to be '0' and the IPS allows the flag to be '1', then compare the minimum cost value recorded in b4) with the minimum cost value recorded in h),
若b4)中的率失真代价更小,则将b4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘0’(第二值),表示不使用该技术,也写入码流给解码端;If the rate-distortion cost in b4) is smaller, encode the prediction mode index recorded in b4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPS usage flag position of the current coding unit to '0' '(second value), which means that this technology is not used, and the code stream is also written to the decoder;
若h4)中的率失真更小,则将h4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘1’,表示使用该技术,也写入码流给解码端;If the rate-distortion in h4) is smaller, encode the prediction mode index recorded in h4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPS use flag position of the current coding unit to '1' , indicating that this technology is used, and the code stream is also written to the decoder;
若IPF允许标识位为‘1’且IPS允许标识位为‘1’,则将b4)、e4)和h4)中记录的最小代价值进行比较,If the IPF allows the flag to be '1' and the IPS allows the flag to be '1', then compare the minimum cost values recorded in b4), e4) and h4),
若b4)中的率失真代价更小,则将b4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标识位和IPF使用标志位置‘0’,表示均不使用,也写入码流给解码端;If the rate-distortion cost in b4) is smaller, then encode the prediction mode index recorded in b4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and use the IPS usage flag and IPF of the current coding unit Use the flag position '0', which means that none of them are used, and the code stream is also written to the decoder;
若e4)中的率失真更小,则将e4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘1’且不传输IPS标识位,表示使用IPF技术而不使用IPS技术,也写入码流给解码端;If the rate-distortion in e4) is smaller, encode the prediction mode index recorded in e4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPF usage flag position of the current coding unit to '1' And the IPS flag is not transmitted, which means that IPF technology is used instead of IPS technology, and the code stream is also written to the decoding end;
若h4)中的率失真更小,则将h4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘0’且IPS使用标志位置‘1’,表示不使用IPF技术而使用IPS技术,也写入码流给解码端。If the rate-distortion in h4) is smaller, encode the prediction mode index recorded in h4) as the optimal prediction mode of the current coding unit and write it into the code stream to the decoder, and set the IPF usage flag position of the current coding unit to '0' And IPS uses the flag position '1', indicating that IPS technology is used instead of IPF technology, and the code stream is also written to the decoder.
j4)后将预测块和反变换、反量化后的残差叠加得到重建后的编码单元块,作为下一个编码单元的预测参考块。j4) Afterwards, the predicted block is superimposed with the residual after inverse transformation and inverse quantization to obtain a reconstructed coding unit block, which is used as a prediction reference block of the next coding unit.
与图9所述的图像编码方法对应的,图10为本申请实施例中图像解码方法的一种流程示意图,该图像解码方法可以应用于图6示出的视频译码系统1中的目的装置20或图8示出的视频解码器200。图10示出的流程以执行主体为图8示出的视频编码器200为例进行说明。如图10所示,本申请实施例提供的图像解码方法包括:Corresponding to the image encoding method described in FIG. 9 , FIG. 10 is a schematic flowchart of an image decoding method in an embodiment of the present application, and the image decoding method can be applied to the target device in the
步骤210,解析码流,确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;
步骤220,根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。Step 220: Determine to use the first frame rate predictive filtering mode to predict the current decoded block according to the intra-frame predictive filter indication information and the first usage flag, and obtain a predictive block of the current decoded block .
本技术方案1在解码端帧内预测具体流程如下:The specific process of the intra-frame prediction at the decoding end of the
解码器获取码流,解析码流得到当前视频序列的IPF允许标识位和IPS允许标识位,解析码流并对得到的残差信息进行反变换和反量化。The decoder obtains the code stream, analyzes the code stream to obtain the IPF permission flag and the IPS permission flag of the current video sequence, parses the code stream, and performs inverse transformation and inverse quantization on the obtained residual information.
在帧内预测解码过程中,During the intra prediction decoding process,
①若IPF的允许标识位和IPS的标识位都为‘1’,则执行如下所有步骤;① If the allowable flag of IPF and the flag of IPS are both '1', perform all the following steps;
②若IPF的允许标识位为‘1’且IPS的标识位为‘0’,则仅执行a5)、b5)、c5)、d5)和g5)步骤;② If the allow flag of IPF is '1' and the flag of IPS is '0', only execute a5), b5), c5), d5) and g5) steps;
③若IPF的允许标识位为‘0’且IPS的标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执 行a5)、b5)、e5)、f5)和g5)步骤;③ If the allowed flag of IPF is '0' and the flag of IPS is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute steps a5), b5), e5), f5) and g5) ;
④若IPF的允许标识位和IPS的标识位都为‘0’,则仅执行a5)、b5)和g5)步骤;4. If the allowed identification bit of IPF and the identification bit of IPS are '0', only carry out a5), b5) and g5) steps;
a5)获取码流并解码得到残差信息,经过反变换与反量化等过程得到时域残差信息;a5) Obtain the code stream and decode it to obtain the residual information, and obtain the residual information in the time domain through processes such as inverse transformation and inverse quantization;
b5)解析码流得到当前解码单元的预测模式,根据当前解码单元的预测模式和相邻重建块计算得到预测块;b5) Analyzing the code stream to obtain the prediction mode of the current decoding unit, and calculating the prediction block according to the prediction mode of the current decoding unit and adjacent reconstruction blocks;
c5)解析并获取IPF的使用标识位,c5) parsing and obtaining the use identification bit of IPF,
若IPF的使用标识位为‘0’,则不对当前预测块做额外操作,并跳过d5)步骤;If the use flag of the IPF is '0', no additional operation is performed on the current prediction block, and step d5) is skipped;
若IPF的使用标识位为‘1’,则执行d5);If the usage flag of IPF is '1', execute d5);
d5)根据当前解码单元的预测模式归类信息选择相对应的滤波器,根据当前解码单元的尺寸大小选择相对应的滤波器系数组,之后对预测块内各个像素进行滤波得到预测块;d5) Select the corresponding filter according to the prediction mode classification information of the current decoding unit, select the corresponding filter coefficient group according to the size of the current decoding unit, and then filter each pixel in the prediction block to obtain the prediction block;
e5)获取IPF的使用标识位,e5) Obtain the use identification bit of IPF,
若IPF的使用标识位为‘1’,则跳过本步骤剩余过程,并跳过f5)步骤;If the use flag of IPF is '1', then skip the remaining process of this step, and skip f5) step;
若IPF的使用标识位为‘0’,则解析并获取IPS的使用标识位。If the use identification bit of IPF is '0', then parse and obtain the use identification bit of IPS.
若IPS的使用标识位为‘0’,则不对当前预测块做额外操作;If the use flag of the IPS is '0', no additional operations are performed on the current prediction block;
若IPS的使用标识位为‘1’,则执行f5);If the use flag of IPS is '1', then execute f5);
f5)使用IPS器对输入的预测块进行两次滤波,得到滤波后的当前解码单元预测块;f5) using the IPS device to filter the input prediction block twice to obtain the filtered prediction block of the current decoding unit;
g5)将预测块叠加还原后的残差信息得到当前解码单元的重建块,经后处理输出;g5) Obtain the reconstructed block of the current decoding unit by superimposing and restoring the residual information of the predicted block, and output it after post-processing;
本技术方案2在解码端帧内预测具体流程如下:The specific process of the intra-frame prediction at the decoding end of the technical solution 2 is as follows:
解码器获取码流,解析码流得到当前视频序列的IPF允许标识位和IPS允许标识位,解析码流并对得到的残差信息进行反变换和反量化。The decoder obtains the code stream, analyzes the code stream to obtain the IPF permission flag and the IPS permission flag of the current video sequence, parses the code stream, and performs inverse transformation and inverse quantization on the obtained residual information.
在帧内预测解码过程中,During the intra prediction decoding process,
①若IPF的允许标识位和IPS的标识位都为‘1’,则执行如下所有步骤;① If the allowable flag of IPF and the flag of IPS are both '1', perform all the following steps;
②若IPF的允许标识位为‘1’且IPS的标识位为‘0’,则仅执行a6)、b6)、c6)、d6)和g6)步骤;② If the allowed flag of IPF is '1' and the flag of IPS is '0', only a6), b6), c6), d6) and g6) steps are performed;
③若IPF的允许标识位为‘0’且IPS的标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执行a6)、b6)、e6)、f6)和g6)步骤;③ If the allowed flag of IPF is '0' and the flag of IPS is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute steps a6), b6), e6), f6) and g6) ;
④若IPF的允许标识位和IPS的标识位都为‘0’,则仅执行a6)、b6)和g6)步骤;4. If the allowed identification bit of IPF and the identification bit of IPS are '0', only carry out a6), b6) and g6) steps;
a6)获取码流并解码得到残差信息,经过反变换与反量化等过程得到时域残差信息;a6) Obtain the code stream and decode it to obtain the residual information, and obtain the residual information in the time domain through processes such as inverse transformation and inverse quantization;
b6)解析码流得到当前解码单元的预测模式,根据当前解码单元的预测模式和相邻重建块计算得到预测块;b6) Analyzing the code stream to obtain the prediction mode of the current decoding unit, and calculating the prediction block according to the prediction mode of the current decoding unit and adjacent reconstruction blocks;
c6)解析并获取IPF的使用标识位,c6) parsing and obtaining the use identification bit of IPF,
若IPF的使用标识位为‘0’,则不对当前预测块做额外操作,并跳过d6)步骤;If the use flag of the IPF is '0', no additional operation is performed on the current prediction block, and step d6) is skipped;
若IPF的使用标识位为‘1’,则执行d6);If the usage flag of IPF is '1', execute d6);
d6)根据当前解码单元的预测模式归类信息选择相对应的滤波器,根据当前解码单元的尺寸大小选择相对应的滤波器系数组,之后对预测块内各个像素进行滤波得到预测块;d6) Select the corresponding filter according to the prediction mode classification information of the current decoding unit, select the corresponding filter coefficient group according to the size of the current decoding unit, and then filter each pixel in the prediction block to obtain the prediction block;
e6)获取IPF的使用标识位,e6) Obtain the use identification bit of IPF,
若IPF的使用标识位为‘1’,则跳过本步骤剩余过程,并跳过f6)步骤;If the use flag of IPF is '1', then skip the remaining process of this step, and skip f6) step;
若IPF的使用标识位为‘0’,则解析并获取IPS的使用标识位。If the use identification bit of IPF is '0', then parse and obtain the use identification bit of IPS.
若IPS的使用标识位为‘0’,则不对当前预测块做额外操作;If the use flag of the IPS is '0', no additional operations are performed on the current prediction block;
若IPS的使用标识位为‘1’,则执行f6);If the usage flag of IPS is '1', then execute f6);
f6)使用IPS器对输入的预测块进行一次滤波,得到滤波后的当前解码单元预测块;f6) Use the IPS device to perform a filter on the input prediction block to obtain the filtered current decoding unit prediction block;
g6)将预测块叠加还原后的残差信息得到当前解码单元的重建块,经后处理输出;g6) Obtain the reconstructed block of the current decoding unit by superimposing and restoring the residual information of the predicted block, and output it after post-processing;
本技术方案作用在编解码框架中的帧内预测部分。上述使用IPS技术对当前编码单元或解码单元进行滤波时,需要先对当前块进行填充,步骤如下:This technical solution acts on the intra-frame prediction part in the coding and decoding framework. When the IPS technology is used to filter the current coding unit or decoding unit, the current block needs to be filled first, and the steps are as follows:
a7)若当前预测块外的左侧和上侧的参考像素可用,即左侧和上侧有重建像素,则左侧一列和上侧一行使用重建像素进行填充;a7) If the left and upper reference pixels outside the current prediction block are available, that is, there are reconstructed pixels on the left and upper sides, then the left column and the upper row are filled with reconstructed pixels;
b7)若当前预测块外的左侧或上侧的参考像素不可用,即左侧或上侧没有重建像素,则没有重建像素的一侧使用当前预测块最靠近那一侧的行或列进行填充;b7) If the reference pixels on the left or upper side outside the current prediction block are not available, that is, there are no reconstructed pixels on the left or upper side, then the side without reconstructed pixels uses the row or column closest to that side of the current prediction block filling;
c7)对当前预测块外的右侧相邻列使用当前预测块的最右列预测值进行填充;c7) filling the right adjacent column outside the current prediction block with the predicted value of the rightmost column of the current prediction block;
d7)对当前预测块外的下侧相邻行使用当前预测块的最下行预测值进行填充;d7) filling the lower adjacent row outside the current prediction block with the lowest predicted value of the current prediction block;
对当前预测块外的右上角像素点使用当前预测块外上侧已填充的最右侧像素点进行填充,对当前预测块外的右下角像素点使用当前预测块外下侧已填充的最右侧像素点进行填充,对当前预测块外的左下角像素点使用当前预测块外左侧已填充填充额的最下侧像素点进行填充。Fill the upper right pixel outside the current prediction block with the rightmost pixel that has been filled on the upper side outside the current prediction block, and use the rightmost pixel that has been filled on the lower side outside the current prediction block for the lower right pixel outside the current prediction block The side pixels are filled, and the bottom left pixel outside the current prediction block is filled with the bottommost pixel of the filled amount on the left side outside the current prediction block.
图11A给出了预测块的一种填充示意图,其中,Pred.Pixel表示预测块的像素,Recon.Pixel表示填充的像素。FIG. 11A shows a schematic diagram of filling a prediction block, where Pred.Pixel represents a pixel of a prediction block, and Recon.Pixel represents a filled pixel.
图11B给出了预测块的另一种填充示意图,其中,Pred.Pixel表示预测块的像素,Recon.Pixel表示填充的像素。FIG. 11B shows another schematic diagram of filling the prediction block, where Pred.Pixel represents the pixel of the prediction block, and Recon.Pixel represents the filled pixel.
上述IPS技术采用简化的高斯卷积核对预测块进行滤波,滤波器共有9个抽头,9个不同滤波系数,如下所示:The above IPS technology uses a simplified Gaussian convolution kernel to filter the prediction block. The filter has 9 taps and 9 different filter coefficients, as shown below:
filter_coefficients表示滤波器系数。filter_coefficients represents the filter coefficients.
对预测块中的每个预测像素进行滤波,滤波公式如下:Each prediction pixel in the prediction block is filtered, and the filtering formula is as follows:
P′(x,y)=c 1·P(x-1,y-1)+c 2·P(x,y-1)+c 1·P(x+1,y-1)+c 1·P(x-1,y)+c 3·P(x,y)+c 2·P(x+1,y)+c 1·P(x-1,y+1)+c 2·P(x,y+1)+c 1·P(x+1,y+1) P'(x,y)=c 1 ·P(x-1,y-1)+c 2 ·P(x,y-1)+c 1 ·P(x+1,y-1)+c 1 P(x-1,y)+c 3 P(x,y)+c 2 P(x+1,y)+c 1 P(x-1,y+1)+c 2 P (x,y+1)+c 1 P(x+1,y+1)
上述式子中,P′(x,y)为当前编码单元(x,y)处的最终预测值,c 1、c 2和c 3分别为上述滤波器中的系数,在上述近似高斯卷积核系数中,c 1为0075,c 2为0.124,c 3为0.204。P(x,y)与其他如P(x-1,y-1)为位于当前编码单元(x,y)与(x-1,y-1)处的预测值,其中x与y的取值范围均不超过当前编码单元块的宽与高。 In the above formula, P′(x, y) is the final prediction value at the current coding unit (x, y), c 1 , c 2 and c 3 are the coefficients in the above filter respectively, and in the above approximate Gaussian convolution Among the kernel coefficients, c 1 is 0075, c 2 is 0.124, and c 3 is 0.204. P(x,y) and others such as P(x-1,y-1) are the predicted values at the current coding unit (x,y) and (x-1,y-1), where x and y are taken The range of values does not exceed the width and height of the current coding unit block.
上述IPS技术所采用的卷积核系数可以近似为整数且所有系数和为2的指数幂,既可以避免计算机的浮点计算又可以避免除法运算,大大减少了计算复杂度,如下所示:The coefficients of the convolution kernel used in the above-mentioned IPS technology can be approximated as integers and the sum of all coefficients is a power of 2, which can avoid both the floating point calculation of the computer and the division operation, greatly reducing the computational complexity, as shown below:
上述滤波系数总和为64,即计算得到的预测值需要向右移6位。The sum of the above filter coefficients is 64, that is, the calculated predicted value needs to be shifted to the right by 6 bits.
上述技术方案2中IPS技术采用简化的高斯卷积核对预测块进行滤波,滤波器共有25个抽头,6个不同滤波系数,如下所示:The IPS technology in the above technical solution 2 uses a simplified Gaussian convolution kernel to filter the prediction block. The filter has a total of 25 taps and 6 different filter coefficients, as shown below:
对预测块中的每个预测像素进行滤波,滤波公式如下:Each prediction pixel in the prediction block is filtered, and the filtering formula is as follows:
P′(x,y)=c 1·P(x-2,y-2)+c 2·P(x-1,y-2)+c 3·P(x,y-2)+c 2·P(x+1,y-2)+c 1·P(x+2,y-2)+c 2·P(x-2,y-1)+c 4·P(x-1,y-1)+c 5·P(x,y-1)+c 4·P(x+1,y-1)+c 2·P(x+2,y-1)+c 3·P(x-2,y)+c 5·P(x-1,y)+c 6·P(x,y)+c 5·P(x+1,y)+c 3·P(x+2,y)+c 2·P(x-2,y+1)+c 4·P(x-1,y+1)+c 5·P(x,y+1)+c 4·P(x+1,y+1)+c 2·P(x+2,y+1)+c 1·P(x-2,y+2)+c 2·P(x-1,y+2)+c 3·P(x,y+2)+c 2·P(x+1,y+2)+c 1·P(x+2,y+2) P'(x,y)=c 1 ·P(x-2,y-2)+c 2 ·P(x-1,y-2)+c 3 ·P(x,y-2)+c 2 P(x+1,y-2)+c 1 P(x+2,y-2)+c 2 P(x-2,y-1)+c 4 P(x-1,y -1)+c 5 P(x,y-1)+c 4 P(x+1,y-1)+c 2 P(x+2,y-1)+c 3 P(x -2,y)+c 5 P(x-1,y)+c 6 P(x,y)+c 5 P(x+1,y)+c 3 P(x+2,y )+c 2 P(x-2,y+1)+c 4 P(x-1,y+1)+c 5 P(x,y+1)+c 4 P(x+1 ,y+1)+c 2 P(x+2,y+1)+c 1 P(x-2,y+2)+c 2 P(x-1,y+2)+c 3 P(x,y+2)+c 2 P(x+1,y+2)+c 1 P(x+2,y+2)
上述式子中,P′(x,y)为当前编码单元(x,y)处的最终预测值,c 1、c 2、c 3、c 4、c 5和c 6分别为上述滤波器中的系数,在上述近似高斯卷积核系数中,c 1为0.0030,c 2为0.0133,c 3为0.0219,c 4为0.0596,c 5为0.0983,c 6为0.1621。P(x,y)与其他如P(x-1,y-1)为位于当前编码单元(x,y)与(x-1,y-1)处的预测值,其中x与y的取值范围均不超过当前编码单元块的宽与高。 In the above formula, P′(x, y) is the final prediction value at the current coding unit (x, y), and c 1 , c 2 , c 3 , c 4 , c 5 and c 6 are the In the coefficients of the approximate Gaussian convolution kernel mentioned above, c 1 is 0.0030, c 2 is 0.0133, c 3 is 0.0219, c 4 is 0.0596, c 5 is 0.0983, and c 6 is 0.1621. P(x,y) and others such as P(x-1,y-1) are the predicted values at the current coding unit (x,y) and (x-1,y-1), where x and y are taken The range of values does not exceed the width and height of the current coding unit block.
上述IPS技术所采用的卷积核系数可以近似为整数且所有系数和为2的指数幂,既可以避免计算机的浮点计算又可以避免除法运算,大大减少了计算复杂度,如下所示:The coefficients of the convolution kernel used in the above-mentioned IPS technology can be approximated as integers and the sum of all coefficients is a power of 2, which can avoid both the floating point calculation of the computer and the division operation, greatly reducing the computational complexity, as shown below:
上述滤波系数总和为1024,即计算得到的预测值需要向右移10位。The sum of the above filter coefficients is 1024, that is, the calculated predicted value needs to be shifted to the right by 10 bits.
上述技术方案2中IPS技术还可以采用简化的高斯卷积核对预测块进行滤波,滤波器共有13个抽头,4个不同滤波系数,如下所示:The IPS technology in the above technical solution 2 can also use a simplified Gaussian convolution kernel to filter the prediction block. The filter has a total of 13 taps and 4 different filter coefficients, as shown below:
对预测块中的每个预测像素进行滤波,滤波公式如下:Each prediction pixel in the prediction block is filtered, and the filtering formula is as follows:
滤波公式如下:The filtering formula is as follows:
P′(x,y)=c 1·P(x,y-2)+c 2·P(x-1,y-1)+c 3·P(x,y)+c 2·P(x+1,y-1)+c 1·P(x-2,y)+c 3·P(x-1,y)+c 4·P(x,y)+c 3·P(x+1,y)+c 1·P(x+2,y)+c 2·P(x-1,y+1)+c 3·P(x,y+1)+c 2·P(x+1,y+1)+c 1·P(x,y+2) P'(x,y)=c 1 ·P(x,y-2)+c 2 ·P(x-1,y-1)+c 3 ·P(x,y)+c 2 ·P(x +1,y-1)+c 1 P(x-2,y)+c 3 P(x-1,y)+c 4 P(x,y)+c 3 P(x+1 ,y)+c 1 P(x+2,y)+c 2 P(x-1,y+1)+c 3 P(x,y+1)+c 2 P(x+1 ,y+1)+c 1 P(x,y+2)
上述式子中,P′(x,y)为当前编码单元(x,y)处的最终预测值,c 1、c 2、c 3和c 4分别为上述滤波器中的系数,在上述近似高斯卷积核系数中,c 1为13,c 2为18,c 3为25,c 4为32。P(x,y)与其他如P(x-1,y-1)为位于当前编码单元(x,y)与(x-1,y-1)处的预测值,其中x与y的取值范围均不超过当前编码单元块的宽与高。 In the above formula, P′(x, y) is the final prediction value at the current coding unit (x, y), c 1 , c 2 , c 3 and c 4 are the coefficients in the above filter respectively, and in the above approximation Among the Gaussian convolution kernel coefficients, c 1 is 13, c 2 is 18, c 3 is 25, and c 4 is 32. P(x,y) and others such as P(x-1,y-1) are the predicted values at the current coding unit (x,y) and (x-1,y-1), where x and y are taken The range of values does not exceed the width and height of the current coding unit block.
上述滤波系数总和为256,即计算得到的预测值需要向右移8位。The sum of the above filter coefficients is 256, that is, the calculated predicted value needs to be shifted to the right by 8 bits.
本技术方案将适用于帧内预测编解码部分,为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。This technical solution will be applicable to the encoding and decoding part of intra-frame prediction, providing options for smoothing or local blurring for intra-frame prediction. For the part of the image texture that does not need to be sharpened, use this technology to make the predicted pixels smoother. The predicted block is closer to the original image, which will eventually improve the coding efficiency.
技术方案1在AVS的官方仿真平台HPM7.0上进行了测试,对帧内预测块进行平滑滤波,在全帧内测试条件和随机接入条件下,测试结果如表2和表3所示。
表2 All Intra测试结果Table 2 All Intra test results
表3 Random Access测试结果Table 3 Random Access test results
从表2和表3种可以看出,本方案在两种测试条件下都具有不错的性能提升。It can be seen from Table 2 and Table 3 that this scheme has a good performance improvement under the two test conditions.
在AI测试条件下,亮度分量具有0.42%的BDBR节省,UV分量各有0.51%和0.66%的BDBR节省,能够明显看出具有较高的性能,有效提升编码器的编码效率。Under AI test conditions, the luminance component has a BDBR saving of 0.42%, and the UV component has a BDBR saving of 0.51% and 0.66%, respectively. It can be clearly seen that it has higher performance and effectively improves the coding efficiency of the encoder.
从各个分辨率来看,本方案在4K分辨率的视频上均具有较大的编码性能提升,这将有利于未来超高清视频的发展,为超高分辨率视频节省更多码率,节省更多带宽。From the point of view of various resolutions, this solution has a large coding performance improvement on 4K resolution video, which will benefit the development of ultra-high-definition video in the future, save more bit rates for ultra-high-resolution videos, and save more Multiple bandwidths.
本方案提出在帧内预测过程中,对帧内预测模式计算得到的预测块进行平滑滤波,提高帧内预测精度,有效提升编码效率,具体如下:This solution proposes that during the intra prediction process, the prediction block calculated by the intra prediction mode is smoothed and filtered to improve the accuracy of the intra prediction and effectively improve the coding efficiency. The details are as follows:
1.提出对帧内编码的预测块进行平滑滤波;1. Proposed smoothing and filtering of intra-coded prediction blocks;
2.提出IPS技术与IPF在两个技术的允许标识位均为‘1’的情况下,同一编码单元中IPF与IPS不会同时被确定使用;2. It is proposed that in the case of IPS technology and IPF, when the allowable flags of the two technologies are both '1', IPF and IPS will not be determined to be used at the same time in the same coding unit;
3.提出编码器决定对当前编码单元使用IPF技术时,不传输IPS的标识位,解码器不需要解析IPS的使用标识位;3. It is proposed that when the encoder decides to use IPF technology for the current coding unit, the IPS flag is not transmitted, and the decoder does not need to parse the IPS usage flag;
编码器决定对当前编码单元不使用IPF技术时,需要传输IPS的标识位,解码器需要解析IPS的使用标识位;When the encoder decides not to use IPF technology for the current coding unit, it needs to transmit the IPS flag, and the decoder needs to parse the IPS usage flag;
4.提出IPS卷积核为简化的9抽头滤波高斯卷积核;4. The IPS convolution kernel is proposed as a simplified 9-tap filter Gaussian convolution kernel;
5.提出对浮点数的卷积核进行近似取值,对滤波系数取整以避免浮点计算,滤波系数总和为2的指数幂以移位操作代替除法运算,节省计算资源和降低复杂度;5. It is proposed to approximate the value of the convolution kernel of floating-point numbers, round the filter coefficients to avoid floating-point calculations, and replace the division operations with shift operations to save computing resources and reduce complexity when the sum of filter coefficients is an exponential power of 2;
6.提出9抽头整数高斯卷积核滤波器系数为,第一滤波系数为5,第二滤波系数为8以及第三滤波系数为12,经过滤波后的预测值需要向右移6位;6. The filter coefficient of the 9-tap integer Gaussian convolution kernel is proposed, the first filter coefficient is 5, the second filter coefficient is 8, and the third filter coefficient is 12. The predicted value after filtering needs to be shifted to the right by 6 bits;
7.提出25抽头与13抽头滤波器。7. Propose 25-tap and 13-tap filters.
本申请还可以从以下方向进行进一步扩展。This application can also be further expanded from the following directions.
扩展方案1:将本技术方案中的9抽头高斯卷积核替换成更多抽头的滤波卷积核,以达到更好的平滑滤波效果。Extension 1: The 9-tap Gaussian convolution kernel in this technical solution is replaced with a filter convolution kernel with more taps to achieve a better smoothing filtering effect.
扩展方案2:将本技术方案中的亮度分量和色度分量分别使用独立标识位表示IPS的使用与否。Extension solution 2: the brightness component and the chrominance component in this technical solution respectively use independent identification bits to indicate whether the IPS is used or not.
扩展方案3:将本技术方案中的使用范围进行限制,对于预测块面积较小的单元不使用IPS技术,以减少传输标识位和降低计算复杂度。Extension 3: Limit the scope of use in this technical solution, and do not use IPS technology for units with a small prediction block area, so as to reduce transmission identification bits and computational complexity.
扩展方案4:将本技术方案中的使用范围进行限制,对于当前编码单元的预测模式进行筛选,若为均值模式,则不使用IPS技术,以减少传输标识位和降低计算复杂度。Extension 4: Limit the scope of use in this technical solution, and filter the prediction mode of the current coding unit. If it is the mean value mode, the IPS technology is not used to reduce the number of transmission identification bits and computational complexity.
本申请实施例提供一种图像编码装置,该图像编码装置可以为视频解码器或视频编码器。具体的,图像编码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的图像编码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an image encoding device, and the image encoding device may be a video decoder or a video encoder. Specifically, the image coding device is configured to perform the steps performed by the video decoder in the above decoding method. The image encoding device provided in the embodiment of the present application may include modules corresponding to corresponding steps.
本申请实施例可以根据上述方法示例对图像编码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional modules of the image encoding device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. The division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图12示出上述实施例中所涉及的图像编码装置的一种可能的结构示意图。如图12所示,图像编码装置12包括确定单元120、设置单元121、传输单元122、叠加单元123。In the case of dividing each functional module corresponding to each function, FIG. 12 shows a possible structural diagram of the image encoding device involved in the above embodiment. As shown in FIG. 12 , the image encoding device 12 includes a
确定单元120,用于确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;The determining
设置单元121,用于若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;The setting unit 121 is configured to set the first intra prediction filtering mode of the current coding block if it is determined according to the intra prediction filtering indication information that the current coding block needs to use the first intra prediction filtering mode. The first use flag of the mode is set to the first value;
传输单元122,用于将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;A transmission unit 122, configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode, and the first usage flag into a code stream;
叠加单元123叠加单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。The superposition unit 123 is a superposition unit, configured to determine to use the first frame rate prediction filtering mode to predict the current decoded block according to the intra-frame prediction filtering indication information and the first usage flag, to obtain the current The predicted block for the decoded block.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的图像编码装置包括但不限于上述模块,例如:图像编码装置还可以包括存储单元。存储单元可以用于存储该图像编码装置的程序代码和数据。Wherein, all relevant content of each step involved in the above-mentioned method embodiment can be referred to the function description of the corresponding function module, and will not be repeated here. Of course, the image encoding device provided in the embodiment of the present application includes but is not limited to the above-mentioned modules, for example, the image encoding device may further include a storage unit. The storage unit can be used to store program codes and data of the image encoding device.
在采用集成的单元的情况下,本申请实施例提供的图像编码装置的结构示意图如图13所示。在图13中,图像编码装置13包括:处理模块130和通信模块131。处理模块130用于对图像编码装置的动作进行控制管理,例如,执行确定单元120、设置单元121、传输单元122、叠加单元123执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块131用于支持图像编码装置与其他设备之间的交互。如图13所示,图像编码装置还可以包括存储模块132,存储模块132用于存储图像编码装置的程序代码和数据,例如存储上述存储单元所保存的内容。In the case of using an integrated unit, a schematic structural diagram of the image encoding device provided in the embodiment of the present application is shown in FIG. 13 . In FIG. 13 , the image encoding device 13 includes: a
其中,处理模块130可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性 的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块131可以是收发器、RF电路或通信接口等。存储模块132可以是存储器。Wherein, the
其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述图像编码装置可执行上述图像编码方法,图像编码装置具体可以是视频图像编码装置或者其他具有视频编码功能的设备。Wherein, all relevant content of each scenario involved in the above method embodiment may be referred to the function description of the corresponding functional module, and will not be repeated here. The above-mentioned image coding device may execute the above-mentioned image coding method, and the image coding device may specifically be a video image coding device or other equipment with a video coding function.
本申请还提供一种视频编码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的图像编码方法。The present application also provides a video encoder, including a non-volatile storage medium, and a central processing unit, the non-volatile storage medium stores an executable program, and the central processing unit and the non-volatile storage media connection, and execute the executable program to implement the image coding method of the embodiment of the present application.
本申请实施例提供一种图像解码装置,该图像解码装置可以为视频解码器或视频解码器。具体的,图像解码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的图像解码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an image decoding device, and the image decoding device may be a video decoder or a video decoder. Specifically, the image decoding device is configured to perform the steps performed by the video decoder in the above decoding method. The image decoding device provided in the embodiment of the present application may include modules corresponding to corresponding steps.
本申请实施例可以根据上述方法示例对图像解码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional modules of the image decoding device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. The division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图14示出上述实施例中所涉及的图像解码装置的一种可能的结构示意图。如图14所示,图像解码装置14包括解析单元140、确定单元141。Fig. 14 shows a possible structural diagram of the image decoding device involved in the above-mentioned embodiment in the case of dividing each functional module corresponding to each function. As shown in FIG. 14 , the image decoding device 14 includes an
解析单元,用于确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;The parsing unit is configured to determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first usage flag is the usage flag of the first intra prediction filtering mode;
确定单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。A determining unit, configured to determine to use the first frame rate predictive filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block prediction block.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的图像解码装置包括但不限于上述模块,例如:图像解码装置还可以包括存储单元。存储单元可以用于存储该图像解码装置的程序代码和数据。Wherein, all relevant content of each step involved in the above-mentioned method embodiment can be referred to the function description of the corresponding function module, and will not be repeated here. Of course, the image decoding device provided in the embodiment of the present application includes but is not limited to the above-mentioned modules, for example, the image decoding device may further include a storage unit. The storage unit can be used to store program codes and data of the image decoding device.
在采用集成的单元的情况下,本申请实施例提供的图像解码装置的结构示意图如图15所示。在图15中,图像解码装置15包括:处理模块150和通信模块151。处理模块150用于对图像解码装置的动作进行控制管理,例如,执行解析单元140、确定单元141执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块151用于支持图像解码装置与其他设备之间的交互。如图13所示,图像解码装置还可以包括存储模块152,存储模块152用于存储图像解码装置的程序代码和数据,例如存储上述存储单元所保存的内容。In the case of using an integrated unit, a schematic structural diagram of an image decoding device provided in an embodiment of the present application is shown in FIG. 15 . In FIG. 15 , the image decoding device 15 includes: a
其中,处理模块150可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块151可以是收发器、RF电路或通信接口等。存储模块152可以是存储器。Wherein, the
其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述图像解码装置可执行上述图像解码方法,图像解码装置具体可以是视频图像解码装置或者其他具有视频解码功能的设备。Wherein, all relevant content of each scenario involved in the above method embodiment may be referred to the function description of the corresponding functional module, and will not be repeated here. The above-mentioned image decoding device may execute the above-mentioned image decoding method, and the image decoding device may specifically be a video image decoding device or other equipment with a video decoding function.
本申请还提供一种视频解码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的图像解码方法。The present application also provides a video decoder, including a non-volatile storage medium, and a central processing unit, the non-volatile storage medium stores an executable program, and the central processing unit and the non-volatile storage media connection, and execute the executable program to implement the image decoding method of the embodiment of the present application.
本申请还提供一种终端,该终端包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处 理器执行指令时,终端执行本申请实施例的图像编码和/或图像解码方法。这里的终端可以是视频显示设备,智能手机,便携式电脑以及其它可以处理视频或者播放视频的设备。The present application also provides a terminal, which includes: one or more processors, memory, and a communication interface. The memory and the communication interface are coupled with one or more processors; the memory is used to store computer program codes, the computer program codes include instructions, and when the one or more processors execute the instructions, the terminal executes the image encoding and/or the embodiment of the present application or image decoding method. The terminal here can be a video display device, a smart phone, a portable computer and other devices that can process or play video.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括一个或多个程序代码,该一个或多个程序包括指令,当解码设备中的处理器在执行该程序代码时,该解码设备执行本申请实施例的图像编码方法、图像解码方法。Another embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes one or more program codes, the one or more programs include instructions, when the processor in the decoding device executes the program When encoding, the decoding device executes the image encoding method and the image decoding method of the embodiment of the present application.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;解码设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得终端实施执行本申请实施例的图像编码方法、图像解码方法。In another embodiment of the present application, a computer program product is also provided, the computer program product includes computer-executable instructions stored in a computer-readable storage medium; at least one processor of the decoding device can read from the computer The readable storage medium reads the computer-executable instructions, and at least one processor executes the computer-executable instructions so that the terminal implements the image encoding method and the image decoding method of the embodiments of the present application.
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。In the above embodiments, all or part of the implementation may be implemented by software, hardware, firmware or any combination thereof. When implemented using a software program, it may appear in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) means.
所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application should be covered within the protection scope of the application . Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (30)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010748924.5A CN114071162A (en) | 2020-07-29 | 2020-07-29 | Image encoding method, image decoding method and related device |
CN2020107489245 | 2020-07-29 | ||
PCT/CN2021/109173 WO2022022622A1 (en) | 2020-07-29 | 2021-07-29 | Image coding method, image decoding method, and related apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116250240A true CN116250240A (en) | 2023-06-09 |
Family
ID=80037645
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010748924.5A Withdrawn CN114071162A (en) | 2020-07-29 | 2020-07-29 | Image encoding method, image decoding method and related device |
CN202180060486.6A Pending CN116250240A (en) | 2020-07-29 | 2021-07-29 | Image coding method, image decoding method and related device |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010748924.5A Withdrawn CN114071162A (en) | 2020-07-29 | 2020-07-29 | Image encoding method, image decoding method and related device |
Country Status (2)
Country | Link |
---|---|
CN (2) | CN114071162A (en) |
WO (1) | WO2022022622A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025059901A1 (en) * | 2023-09-20 | 2025-03-27 | Oppo广东移动通信有限公司 | Encoding method, decoding method, encoders, decoders and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114567775B (en) * | 2022-04-29 | 2022-09-09 | 中国科学技术大学 | Image division method and device |
WO2024145745A1 (en) * | 2023-01-03 | 2024-07-11 | Oppo广东移动通信有限公司 | Coding method and apparatus, decoding method and apparatus, coding device, decoding device, and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103200400B (en) * | 2012-01-09 | 2018-03-16 | 中兴通讯股份有限公司 | A kind of decoding method, codec and the electronic equipment of image layer and sliced layer |
CN105141948A (en) * | 2015-09-22 | 2015-12-09 | 天津师范大学 | Improved HEVC sample point self-adaption compensation method |
CN110650349B (en) * | 2018-06-26 | 2024-02-13 | 中兴通讯股份有限公司 | Image encoding method, decoding method, encoder, decoder and storage medium |
CN109889852B (en) * | 2019-01-22 | 2021-11-05 | 四川大学 | An optimization method for HEVC intra-frame coding based on neighboring values |
-
2020
- 2020-07-29 CN CN202010748924.5A patent/CN114071162A/en not_active Withdrawn
-
2021
- 2021-07-29 CN CN202180060486.6A patent/CN116250240A/en active Pending
- 2021-07-29 WO PCT/CN2021/109173 patent/WO2022022622A1/en active Application Filing
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025059901A1 (en) * | 2023-09-20 | 2025-03-27 | Oppo广东移动通信有限公司 | Encoding method, decoding method, encoders, decoders and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114071162A (en) | 2022-02-18 |
TW202209878A (en) | 2022-03-01 |
WO2022022622A1 (en) | 2022-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114501010B (en) | Image coding method, image decoding method and related device | |
WO2021238540A1 (en) | Image encoding method, image decoding method, and related apparatuses | |
CN113497937B (en) | Image coding method, image decoding method and related device | |
CN114071161B (en) | Image encoding method, image decoding method and related devices | |
CN111277828B (en) | Video encoding and decoding method, video encoder and video decoder | |
CN111385572B (en) | Method and device for determining prediction mode, encoding device and decoding device | |
WO2022037300A1 (en) | Encoding method, decoding method, and related devices | |
CN114157864B (en) | Image prediction method, device, equipment, system and storage medium | |
WO2022022622A1 (en) | Image coding method, image decoding method, and related apparatus | |
CN111355951A (en) | Video decoding method, device and decoding device | |
CN115348449B (en) | Encoders, decoders and corresponding methods for using compressed MV storage | |
CN118101967A (en) | Position dependent spatially varying transform for video coding | |
WO2021244197A1 (en) | Image encoding method, image decoding method, and related apparatuses | |
CN112135128B (en) | Image prediction method, coding tree node division method and device thereof | |
CN111327894B (en) | Block division method, video coding and decoding method and video coder and decoder | |
CN111901593B (en) | Image dividing method, device and equipment | |
WO2020143684A1 (en) | Image prediction method, device, apparatus and system and storage medium | |
CN113965764B (en) | Image encoding method, image decoding method and related device | |
TWI882138B (en) | Image encoding method, image decoding method and related device | |
WO2023092256A1 (en) | Video encoding method and related apparatus therefor | |
TWI882120B (en) | Image encoding method, image decoding method and related device | |
CN111669583A (en) | Image prediction method, apparatus, device, system and storage medium | |
CN115002485B (en) | Image encoding method, image decoding method and related devices | |
WO2020119742A1 (en) | Block division method, video encoding and decoding method, and video codec |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |