[go: up one dir, main page]

CN103916676B - A kind of boundary intensity determines method, block-eliminating effect filtering method and device - Google Patents

A kind of boundary intensity determines method, block-eliminating effect filtering method and device Download PDF

Info

Publication number
CN103916676B
CN103916676B CN201210592468.5A CN201210592468A CN103916676B CN 103916676 B CN103916676 B CN 103916676B CN 201210592468 A CN201210592468 A CN 201210592468A CN 103916676 B CN103916676 B CN 103916676B
Authority
CN
China
Prior art keywords
boundary
adjacent image
boundary strength
image blocks
strength
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210592468.5A
Other languages
Chinese (zh)
Other versions
CN103916676A (en
Inventor
宋建斌
杨海涛
姜东�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210592468.5A priority Critical patent/CN103916676B/en
Priority to PCT/CN2013/087494 priority patent/WO2014101590A1/en
Publication of CN103916676A publication Critical patent/CN103916676A/en
Application granted granted Critical
Publication of CN103916676B publication Critical patent/CN103916676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability

Landscapes

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

Abstract

本发明实施例公开了一种边界强度确定方法、去块效应滤波方法、及装置,其中方法包括:确定DBF的可能滤波边界;获取所述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;当所述相邻的图像块的编码模式均不是Intra模式,且所述相邻的图像块的编码模式中至少包括一个BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值。当相邻的图像块的编码模式均不是Intra模式,且相邻的图像块的编码模式中至少包括一个BaseLayer模式,则将可能的滤波边界的BS设置为不同的边界强度值,BS的设置不再全部设置成相同强度,使BS的设置更加合理,进而提升编码效率。

The embodiment of the present invention discloses a boundary strength determination method, a deblocking filter method, and a device, wherein the method includes: determining a possible filtering boundary of a DBF; acquiring the encoding mode of adjacent image blocks on both sides of the possible filtering boundary; and Encoding information; when the encoding modes of the adjacent image blocks are not Intra mode, and the encoding modes of the adjacent image blocks include at least one BaseLayer mode, the possible filtering boundaries are set according to the encoding information The boundary strength BS is set to a different boundary strength value. When the encoding modes of adjacent image blocks are not Intra mode, and the encoding modes of adjacent image blocks include at least one BaseLayer mode, the BS of the possible filtering boundary is set to different boundary strength values, and the setting of BS is different. Then all are set to the same strength to make the setting of BS more reasonable, thereby improving the coding efficiency.

Description

一种边界强度确定方法、去块效应滤波方法、及装置Method for determining boundary strength, deblocking filter method, and device

技术领域technical field

本发明涉及通信技术领域,特别涉及一种边界强度确定方法、去块效应滤波方法、及装置。The invention relates to the field of communication technology, in particular to a boundary strength determination method, a deblocking filtering method, and a device.

背景技术Background technique

随着互联网的迅猛发展以及人们物质精神文化的日益丰富,在互联网中针对视频的应用需求尤其是针对高清视频的应用需求越来越多,而高清视频的数据量非常大,要想高清视频能在带宽有限的互联网中传输,必须首先解决的问题就是高清视频压缩编码问题。目前,国际上有两个国际组织专门进行视频编码标准的制定工作,即:ISO(International Organization forStandardization,国际标准化组织)/IEC(Inter nationalElectrotechnicalCommission,国际电工委员会)下的MPEG(Motion Picture ExpertsGroup,运动图像专家组)和ITU-T(Inter national TelecommunicationUnion-Telecommunication standardization sector,国际电信联盟电信标准化组)的VCEG(Video Coding Experts Group,视频编码专家组)。With the rapid development of the Internet and the increasingly rich material and spiritual culture of people, there are more and more requirements for video applications on the Internet, especially for high-definition video applications, and the data volume of high-definition videos is very large. For transmission in the Internet with limited bandwidth, the problem that must be solved first is the problem of high-definition video compression and encoding. At present, there are two international organizations dedicated to the formulation of video coding standards, namely: MPEG (Motion Picture Experts Group, motion picture Expert Group) and VCEG (Video Coding Experts Group, Video Coding Experts Group) of ITU-T (International Telecommunication Union-Telecommunication standardization sector, International Telecommunication Union Telecommunication Standardization Group).

成立于1986年的MPEG专门负责制定多媒体领域内的相关标准,主要应用于存储、广播电视、因特网或无线网上的流媒体等。ITU-T则主要制定面向实时视频通信领域的视频编码标准,如视频电话、视频会议等应用。在过去的几十年里,国际上已经成功制定了面向各种应用的视频编码标准,主要包括:用于VCD(Video Compact Disc,影音光碟)的MPEG-1标准,用于DVD(Digital Versatic Disc,数字多功能光盘)和DVB(Digital VideoBroadcasting,数字视频广播)的MPEG-2标准,用于视频会议的H.261标准以及H.263标准,允许对任意形状的对象编码的MPEG-4标准,国际上最近制定的H.264/AVC(Advanced VideoCoding,先进视频编码)标准,以及正在制定的HEVC(High Efficiency Video Coding,高性能视频编码)标准。Founded in 1986, MPEG is responsible for formulating relevant standards in the multimedia field, which are mainly used in storage, broadcasting, streaming media on the Internet or wireless networks, etc. ITU-T mainly formulates video coding standards for real-time video communication, such as video telephony, video conferencing and other applications. In the past few decades, video coding standards for various applications have been successfully formulated internationally, mainly including: MPEG-1 standard for VCD (Video Compact Disc, audio and video disc), and MPEG-1 standard for DVD (Digital Versatic Disc , Digital Versatile Disc) and DVB (Digital Video Broadcasting, Digital Video Broadcasting) MPEG-2 standards, H.261 and H.263 standards for video conferencing, MPEG-4 standards that allow encoding of objects of arbitrary shape, The H.264/AVC (Advanced Video Coding, Advanced Video Coding) standard recently developed internationally, and the HEVC (High Efficiency Video Coding, High Efficiency Video Coding) standard being developed.

在网络环境里(比如互联网),由于网络带宽是有限的,终端设备以及用户的需求都是不同的,所以为了某种特定的应用而一次压缩的码流并不是令人满意和有效的,对一些特定的用户或设备而言,甚至是没有意义的。解决这个问题的一个有效的方法就是SVC(Scalable Video Coding,可伸缩视频编码),JVT(Joint Video Team,联合视频编码组)已经则将SVC纳入到H.264/AVC标准的扩展中,现已被正式接受为国际标准,并且指定了H.264/AVC对应的SVC码流的解码语法结构,包含一个H.264/AVC对应的SVC所用编码技术的简要介绍。为了适应实际需要,在HEVC于2012年2月CD(COMPACT DISK,光盘)标准之后,发展HEVC的SVC是一件迫在眉睫的事情。2012年10月召开的JCT-VC会议则将基于HEVC的SVC称作SHVC(Scalable Highefficiency Video Coding,可伸缩高性能视频编码),开始测试工作。In the network environment (such as the Internet), because the network bandwidth is limited, the needs of terminal equipment and users are different, so it is not satisfactory and effective to compress the code stream for a specific application. For some specific users or devices, it may not even make sense. An effective way to solve this problem is SVC (Scalable Video Coding, scalable video coding), JVT (Joint Video Team, joint video coding group) has incorporated SVC into the extension of the H.264/AVC standard, and now It is officially accepted as an international standard, and specifies the decoding syntax structure of the SVC code stream corresponding to H.264/AVC, including a brief introduction of the encoding technology used by SVC corresponding to H.264/AVC. In order to meet the actual needs, after the HEVC CD (COMPACT DISK, optical disc) standard was issued in February 2012, it is an urgent matter to develop HEVC SVC. The JCT-VC conference held in October 2012 called HEVC-based SVC SHVC (Scalable Highefficiency Video Coding, scalable high-performance video coding), and began testing.

以H.264/AVC和HEVC为代表的主要视频编码标准都采用基于预测编码、变换编码和统计编码的混合编码框架。在该框架下,对预测后残差单元的量化操作是造成视频编码质量下降的主要原因。预测后相邻单元间信息量区别越大(即:残差差别越大),越有可能经过量化/反量化,在块的边界上引入突变,并因此出现方块效应。H.264/AVC引入环路滤波技术,去除重建图像中的方块效应。最新的HEVC标准,有两项视频后处理技术,一项是去块效应滤波(Deblocking Filtering,DBF)技术,另一项是像素自适应偏移技术(SampleAdaptive Offset,SAO),用于提高重建图像的质量。块效应一般出现在预测边界或者变换边界上,DBF根据编码模式、量化参数大小和残差系数情况确定该边界是否滤波以及滤波时的强度进行相应的操作,达到平滑图像的操作。DBF在增加编解码端计算复杂度的情况下能够有效提高视频的主客观质量。Major video coding standards represented by H.264/AVC and HEVC all adopt a hybrid coding framework based on predictive coding, transform coding and statistical coding. Under this framework, the quantization operation on the post-prediction residual unit is the main reason for the degradation of video coding quality. The greater the difference in information between adjacent units after prediction (that is, the greater the difference in residuals), the more likely it will be quantized/dequantized, and mutations will be introduced on the boundary of the block, and thus block effects will appear. H.264/AVC introduces loop filtering technology to remove the block effect in the reconstructed image. The latest HEVC standard has two video post-processing technologies, one is Deblocking Filtering (DBF) technology, and the other is Pixel Adaptive Offset (Sample Adaptive Offset, SAO), which is used to improve the reconstructed image. the quality of. The block effect generally appears on the prediction boundary or the transformation boundary. DBF determines whether the boundary is filtered or not and the strength of the filter according to the coding mode, quantization parameter size and residual coefficient, and performs corresponding operations to achieve smooth image operation. DBF can effectively improve the subjective and objective quality of video while increasing the computational complexity of the codec.

而现有技术中DBF中由于对图像块的边界强度(Boundary Strength,BS)的赋值不精确导致增强层编码效率不能进一步提高。However, in the prior art, due to inaccurate assignment of the boundary strength (Boundary Strength, BS) of the image block in the DBF, the coding efficiency of the enhancement layer cannot be further improved.

发明内容Contents of the invention

本发明实施例提供了一种边界强度确定方法、去块效应滤波方法、及装置,用于提升编码效率。Embodiments of the present invention provide a boundary strength determination method, a deblocking filtering method, and a device for improving coding efficiency.

本发明实施例一方面提供了一种边界强度BS确定方法,包括:On the one hand, an embodiment of the present invention provides a method for determining a boundary strength BS, including:

确定去块效应滤波DBF的可能滤波边界;Determining the possible filtering boundaries of the deblocking filter DBF;

获取所述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the possible filtering boundary;

当所述相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值。When the encoding modes of the adjacent image blocks are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one base layer BaseLayer mode, then according to the encoding information, the possible filtering The border strength BS of the border is set to different border strength values.

结合一方面的实现方式,在第一种可能的实现方式中,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;With reference to an implementation manner in one aspect, in a first possible implementation manner, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient;

所述获取所述可能滤波边界两侧相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes:

获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值,所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The different boundary strength values include a first boundary strength value and a second boundary strength value, the second boundary strength value is greater than the first boundary strength value, and the possible filter The boundary strength BS of the boundary is set to different boundary strength values, including:

若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。If the encoding modes of the adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that none of the adjacent image blocks have quantization coefficients, then set the boundary strength BS of the possible filtering boundary as the first boundary strength.

结合一方面的实现方式,在第二种可能的实现方式中,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;With reference to an implementation manner in one aspect, in a second possible implementation manner, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and motion vectors of the adjacent image blocks;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes:

根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Set the reference image of the image block whose encoding mode is the BaseLayer mode according to the preset rules and set the motion vector of the image block whose encoding mode is the BaseLayer mode to correspond to when the block at the same position in the reference image is stationary parameter;

获取所述可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary, reference images of the adjacent image blocks, and motion vectors of the adjacent image blocks;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度具体包括:The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the possible filtering according to the encoding information The boundary strength BS of the boundary is set to different boundary strengths, including:

若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is smaller than a preset threshold, then set the boundary strength BS of the possible filtering boundary as the first boundary strength.

结合一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度还包括:With reference to the second possible implementation manner in one aspect, in a third possible implementation manner, setting the boundary strength BS of the possible filtering boundary to a different boundary strength according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the adjacent image blocks move If the vector difference is greater than or equal to a preset threshold, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合一方面的实现方式,在第四种可能的实现方式中,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;With reference to an implementation manner in one aspect, in a fourth possible implementation manner, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes:

获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度具体包括:The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the possible filtering according to the encoding information The boundary strength BS of the boundary is set to different boundary strengths, including:

若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, then set the boundary strength BS of the possible filtering boundary as the second boundary strength.

结合一方面的第四种可能的实现方式,在第五种可能的实现方式中,所述编码信息还包括所述相邻的图像块的参考图像;With reference to the fourth possible implementation manner in one aspect, in a fifth possible implementation manner, the encoding information further includes a reference image of the adjacent image block;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes:

根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;Set the reference image of the image block whose encoding mode is BaseLayer mode according to the preset rule; obtain the reference image of the adjacent image block on both sides of the possible filtering boundary;

所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为第不同的边界强度还包括:The setting the boundary strength BS of the possible filtering boundary as the second different boundary strength according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have different reference images, then set the boundary strength BS of the possible filtering boundary as the second boundary strength.

结合一方面的第五种可能的实现方式,在第六种可能的实现方式中,所述编码信息还包括所述相邻的图像块的运动向量;With reference to the fifth possible implementation manner in one aspect, in a sixth possible implementation manner, the encoding information further includes a motion vector of the adjacent image block;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes:

将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;Set the motion vector of the image block whose encoding mode is BaseLayer mode as the parameter corresponding to when the block at the same position in the reference image is still;

获取所述可能滤波边界两侧的相邻的图像块的运动向量;Acquiring motion vectors of adjacent image blocks on both sides of the possible filtering boundary;

所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为第不同的边界强度值还包括:The setting the boundary strength BS of the possible filtering boundary as the first different boundary strength value according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or is equal to the preset threshold, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合一方面的第六种可能的实现方式,在第七种可能的实现方式中,所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度还包括:With reference to the sixth possible implementation manner in one aspect, in a seventh possible implementation manner, setting the boundary strength BS of the possible filtering boundary to a different boundary strength according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。If the quantization coefficient flag indicates that there are no quantization coefficients in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than If the threshold is preset, the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

结合一方面的第一种到第六种任意一项可能的实现方式,在第八种可能的实现方式中,所述第一边界强度为0,所述第二边界强度为1。With reference to any one of the first to sixth possible implementation manners in one aspect, in an eighth possible implementation manner, the first boundary strength is 0, and the second boundary strength is 1.

本发明实施例二方面提供了一种去块效应的滤波方法,包括:The second aspect of the embodiment of the present invention provides a filtering method for deblocking effect, including:

确定去块效应滤波DBF的可能滤波边界;Determining the possible filtering boundaries of the deblocking filter DBF;

获取所述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the possible filtering boundary;

当所述相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值;When the encoding modes of the adjacent image blocks are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one base layer BaseLayer mode, then according to the encoding information, the possible filtering The border strength BS of the border is set to different border strength values;

将所述确定的边界强度值作为一个参考因子用于获取第一阈值及第二阈值,所述第一阈值用于确定是否对所述可能的滤波边界进行滤波,所述第二阈值用于确定对需要进行滤波的所述可能的滤波边界进行滤波的滤波强度;Using the determined boundary strength value as a reference factor to obtain a first threshold and a second threshold, the first threshold is used to determine whether to filter the possible filtering boundary, and the second threshold is used to determine a filtering strength for filtering the possible filtering boundaries that need to be filtered;

按照所述可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和所述第一阈值确定是否需要对所述可能的滤波边界进行滤波;Determine whether the possible filtering boundary needs to be filtered according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the possible filtering boundary and the first threshold;

若确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并使用所确定滤波器执行对所述需要进行滤波的所述可能的滤波边界进行滤波处理。If it is determined that filtering is required, the filter for performing filtering is determined according to the relationship between the gradient of pixels in the predetermined range and the second threshold value in adjacent image blocks on both sides of the possible filtering boundary, and the determined filter is used to perform the necessary filtering. Filtering is performed on the possible filtering boundaries of the filtering.

结合二方面的实现方式,在第一种可能的实现方式中,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;In combination with the implementation manners of the two aspects, in a first possible implementation manner, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient;

所述获取所述可能滤波边界两侧相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes:

获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the possible filtering according to the encoding information The boundary strength BS of the boundary is set to different boundary strength values, including:

若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。If the encoding modes of the adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that none of the adjacent image blocks have quantization coefficients, then set the boundary strength BS of the possible filtering boundary as the first boundary strength.

结合二方面的实现方式,在第二种可能的实现方式中,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;Combining the implementation manners of the two aspects, in a second possible implementation manner, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and motion vectors of the adjacent image blocks;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes:

根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Set the reference image of the image block whose encoding mode is the BaseLayer mode according to the preset rules and set the motion vector of the image block whose encoding mode is the BaseLayer mode to correspond to when the block at the same position in the reference image is stationary parameter;

获取所述可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary, reference images of the adjacent image blocks, and motion vectors of the adjacent image blocks;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为第不同的边界强度值具体包括:The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the possible filtering according to the encoding information The boundary strength BS of the boundary is set to the first different boundary strength values specifically including:

若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is smaller than a preset threshold, then set the boundary strength BS of the possible filtering boundary as the first boundary strength.

结合二方面的第二种可能的实现方式,在第三种可能的实现方式中,所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为第一边界强度或第二边界强度还包括:In combination with the second possible implementation manner of the two aspects, in a third possible implementation manner, the boundary strength BS of the possible filtering boundary is set as the first boundary strength or the second boundary strength BS according to the encoding information Strength also includes:

若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the adjacent image blocks move If the vector difference is greater than or equal to a preset threshold, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合二方面的实现方式,在第四种可能的实现方式中,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;In combination with the implementation of the second aspect, in a fourth possible implementation, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes:

获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the possible filtering according to the encoding information The boundary strength BS of the boundary is set to different boundary strength values, including:

若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, then set the boundary strength BS of the possible filtering boundary as the second boundary strength.

结合二方面的第四种可能的实现方式,在第五种可能的实现方式中,所述编码信息还包括所述相邻的图像块的参考图像;With reference to the fourth possible implementation manner of the two aspects, in a fifth possible implementation manner, the encoding information further includes a reference image of the adjacent image block;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes:

根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;Set the reference image of the image block whose encoding mode is BaseLayer mode according to the preset rule; obtain the reference image of the adjacent image block on both sides of the possible filtering boundary;

所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为第一边界强度或第二边界强度还包括:The setting the boundary strength BS of the possible filtering boundary as the first boundary strength or the second boundary strength according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have different reference images, then set the boundary strength BS of the possible filtering boundary as the second boundary strength.

结合二方面的第五种可能的实现方式,在第六种可能的实现方式中,所述编码信息还包括所述相邻的图像块的运动向量;With reference to the fifth possible implementation manner of the two aspects, in a sixth possible implementation manner, the encoding information further includes a motion vector of the adjacent image block;

所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes:

将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取所述可能滤波边界两侧的相邻的图像块的运动向量;Set the motion vector of the image block whose encoding mode is BaseLayer mode as the parameter corresponding to when the block at the same position in the reference image is still; obtain the motion vector of the adjacent image block on both sides of the possible filtering boundary ;

所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为第一边界强度或第二边界强度还包括:The setting the boundary strength BS of the possible filtering boundary as the first boundary strength or the second boundary strength according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or is equal to the preset threshold, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合二方面的第六种可能的实现方式,在第七种可能的实现方式中,所述根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:In combination with the sixth possible implementation manner of the two aspects, in the seventh possible implementation manner, setting the boundary strength BS of the possible filtering boundary to different boundary strength values according to the encoding information further includes:

若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。If the quantization coefficient flag indicates that there are no quantization coefficients in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than If the threshold is preset, the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

结合二方面的第一种到第六种任意一项可能的实现方式,在第八种可能的实现方式中,所述第一边界强度为0,所述第二边界强度为1。With reference to any one of the first to sixth possible implementation manners of the two aspects, in an eighth possible implementation manner, the first boundary strength is 0, and the second boundary strength is 1.

本发明实施例三方面提供了一种边界强度BS确定装置,包括:Three aspects of the embodiment of the present invention provide a boundary strength BS determination device, including:

第一边界确定单元,用于确定去块效应滤波DBF的可能滤波边界;A first boundary determining unit, configured to determine possible filtering boundaries of the deblocking filter DBF;

第一信息获取单元,用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块的编码模式以及编码信息;A first information acquiring unit, configured to acquire the encoding mode and encoding information of the adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determining unit;

第一BS确定单元,用于当所述第一信息获取单元获取的相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值。The first BS determining unit is configured to be used when none of the encoding modes of the adjacent image blocks acquired by the first information acquiring unit is Intra mode, and the encoding modes of the adjacent image blocks include at least one basic layer BaseLayer mode, set the boundary strength BS of the possible filtering boundary to different boundary strength values according to the encoding information.

结合三方面的实现方式,在第一种可能的实现方式中,所述第一信息获取单元,具体用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;In combination with the implementation manners of the three aspects, in a first possible implementation manner, the first information acquisition unit is specifically configured to acquire whether the adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determination unit have Quantization coefficient identifier of the quantization coefficient;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值,所述第一BS确定单元,具体用于若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。The different boundary strength values include a first boundary strength value and a second boundary strength value, the second boundary strength value is greater than the first boundary strength value, and the first BS determination unit is specifically configured to If the encoding modes of the adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that the adjacent image blocks have no quantization coefficients, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

结合三方面的实现方式,在第二种可能的实现方式中,所述第一信息获取单元,具体用于获取所述编码信息中包括的标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;In combination with the implementation manners of the three aspects, in a second possible implementation manner, the first information acquisition unit is specifically configured to acquire the quantization information included in the encoding information that marks whether the adjacent image blocks have quantization coefficients. A coefficient identifier, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

所述第一BS确定单元包括:第一参数设置单元、第一参数获取单元以及第一BS确定子单元;The first BS determination unit includes: a first parameter setting unit, a first parameter acquisition unit, and a first BS determination subunit;

所述第一参数设置单元,用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;The first parameter setting unit is configured to set the reference image of the image block whose encoding mode is BaseLayer mode according to a preset rule and set the motion vector of the image block whose encoding mode is BaseLayer mode to be relative to the reference image The corresponding parameters when the block at the same position in the image is still;

所述第一参数获取单元,用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;The first parameter acquisition unit is configured to acquire quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determination unit, and reference images of the adjacent image blocks, and the Motion vectors of adjacent image blocks;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述第一BS确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the first BS determination subunit is used to determine if the The quantization coefficient identifier indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than a preset threshold, Then the boundary strength BS of the possible filtering boundaries is set as the first boundary strength.

结合三方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第一BS确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。With reference to the second possible implementation manner of the three aspects, in a third possible implementation manner, the first BS determination subunit is further configured to, if the quantization coefficient identifier indicates that at least If one of the image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the difference between the motion vectors of the adjacent image blocks is greater than or equal to a preset threshold, then the possible The boundary strength BS of the filter boundary is set to the second boundary strength.

结合三方面的实现方式,在第四种可能的实现方式中,所述第一信息获取单元,具体用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;In combination with the implementation manners of the three aspects, in a fourth possible implementation manner, the first information acquisition unit is specifically configured to acquire whether there are adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determination unit Quantization coefficient identifier of the quantization coefficient;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述第一BS确定单元,具体用于若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the first BS determination unit is specifically configured to if the The quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合三方面的第四种可能的实现方式,在第五种可能的实现方式中,所述第一信息获取单元,还用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;In combination with the fourth possible implementation of the three aspects, in the fifth possible implementation, the first information acquisition unit is further configured to set the reference of the image block whose encoding mode is BaseLayer mode according to a preset rule image; acquiring reference images of adjacent image blocks on both sides of the possible filtering boundary;

所述第一BS确定单元,还用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。The first BS determination unit is further configured to set the possible The boundary strength BS of the filtered boundary is set to the second boundary strength.

结合三方面的第五种可能的实现方式,在第六种可能的实现方式中,所述第一信息获取单元,还用于获取所述编码信息中包括的所述相邻的图像块的运动向量;With reference to the fifth possible implementation manner of the three aspects, in a sixth possible implementation manner, the first information acquiring unit is further configured to acquire the motion of the adjacent image block included in the encoding information vector;

所述第一BS确定单元包括:第二参数设置单元、第二参数获取单元以及第二BS确定子单元;The first BS determination unit includes: a second parameter setting unit, a second parameter acquisition unit, and a second BS determination subunit;

所述第二参数设置单元,用于将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;The second parameter setting unit is configured to set the motion vector of the image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still;

所述第二参数获取单元,用于获取所述可能滤波边界两侧的相邻的图像块的运动向量;The second parameter acquisition unit is configured to acquire motion vectors of adjacent image blocks on both sides of the possible filtering boundary;

所述第二BS确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。The second BS determination subunit is configured to if the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the adjacent If the difference between the image block motion vectors is greater than or equal to a preset threshold, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合三方面的第六种可能的实现方式,在第七种可能的实现方式中,所述第二BS确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。With reference to the sixth possible implementation manner of the three aspects, in a seventh possible implementation manner, the second BS determining subunit is further configured to: There is no quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the possible filtering boundary is set to Set to the first boundary strength.

结合三方面的第一种到第六种任意一项可能的实现方式,在第八种可能的实现方式中,所述的第一边界强度为0,所述的第二边界强度为1。In combination with any one of the first to sixth possible implementation manners of the three aspects, in an eighth possible implementation manner, the first boundary strength is 0, and the second boundary strength is 1.

本发明实施例四方面提供了一种去块效应的滤波装置,包括:The fourth aspect of the embodiment of the present invention provides a filtering device for deblocking effect, including:

第二边界确定单元,用于确定去块效应滤波DBF的可能滤波边界;The second boundary determining unit is used to determine possible filtering boundaries of the deblocking filter DBF;

第二信息获取单元,用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块的编码模式以及编码信息;A second information acquisition unit, configured to acquire the encoding mode and encoding information of image blocks adjacent to both sides of the possible filtering boundary determined by the second boundary determination unit;

第二BS确定单元,用于当所述第二信息获取单元获取的相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度BS设置为不同的边界强度值;The second BS determination unit is configured to be used when none of the encoding modes of the adjacent image blocks acquired by the second information acquisition unit is Intra mode, and the encoding modes of the adjacent image blocks include at least one basic layer In BaseLayer mode, set the boundary strength BS of the possible filtering boundary to different boundary strength values according to the encoding information;

阈值获取单元,用于将所述确定的边界强度BS值作为一个参考因子用于获取第一阈值及第二阈值,所述第一阈值用于确定是否对所述可能的滤波边界进行滤波,所述第二阈值用于确定对需要进行滤波的所述可能的滤波边界进行滤波的滤波强度;a threshold acquisition unit, configured to use the determined boundary strength BS value as a reference factor to acquire a first threshold and a second threshold, and the first threshold is used to determine whether to filter the possible filtering boundaries, so The second threshold is used to determine the filtering strength for filtering the possible filtering boundaries that need to be filtered;

滤波判决单元,用于按照所述第二边界确定单元确定的可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和所述第一阈值确定是否需要对所述可能的滤波边界进行滤波;A filtering decision unit, configured to determine whether the possible filtering boundary needs to be adjusted according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determining unit and the first threshold value filter;

滤波器控制单元,用于若滤波判决单元确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并使用所确定滤波器执行对所述需要进行滤波的所述可能的滤波边界进行滤波处理。The filter control unit is used to determine the filter for performing filtering according to the relationship between the pixel gradient in the predetermined range and the second threshold value in the adjacent image blocks on both sides of the possible filtering boundary if the filtering decision unit determines that filtering is required, and use The determined filter performs filtering processing on the possible filtering boundaries that need to be filtered.

结合四方面的实现方式,在第一种可能的实现方式中,所述第二信息获取单元,具体用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;In combination with the implementation manners of the four aspects, in a first possible implementation manner, the second information acquisition unit is specifically configured to acquire whether there are adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determination unit Quantization coefficient identifier of the quantization coefficient;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述第二BS确定单元,具体用于若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the second BS determination unit is specifically configured to if the If the encoding modes of the adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that the adjacent image blocks have no quantization coefficients, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

结合四方面的实现方式,在第二种可能的实现方式中,所述第二信息获取单元,具体用于获取所述编码信息中包括的标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;In combination with the implementation manners of the four aspects, in a second possible implementation manner, the second information acquisition unit is specifically configured to acquire the quantization information included in the encoding information that marks whether the adjacent image blocks have quantization coefficients. A coefficient identifier, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

所述第二BS确定单元包括:第三参数设置单元、第三参数获取单元以及第三BS确定子单元;The second BS determination unit includes: a third parameter setting unit, a third parameter acquisition unit, and a third BS determination subunit;

第三参数设置单元,用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;The third parameter setting unit is used to set the reference image of the image block whose encoding mode is BaseLayer mode according to preset rules and set the motion vector of the image block whose encoding mode is BaseLayer mode relative to the reference image The corresponding parameters when the block at the same position is stationary;

所述第三参数获取单元,用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;The third parameter acquisition unit is configured to acquire quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determination unit, and reference images of the adjacent image blocks, and the Motion vectors of adjacent image blocks;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述第三BS确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the third BS determination subunit is used to determine if the The quantization coefficient identifier indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than a preset threshold, Then the boundary strength BS of the possible filtering boundaries is set as the first boundary strength.

结合四方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第三BS确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。With reference to the second possible implementation manner of the fourth aspect, in a third possible implementation manner, the third BS determining subunit is further configured to: if the quantization coefficient identifier indicates that at least If one of the image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the difference between the motion vectors of the adjacent image blocks is greater than or equal to a preset threshold, then the possible The boundary strength BS of the filter boundary is set to the second boundary strength.

结合四方面的实现方式,在第四种可能的实现方式中,所述第二信息获取单元,具体用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;In combination with the implementation manners of the fourth aspect, in a fourth possible implementation manner, the second information acquisition unit is specifically configured to acquire whether there are adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determination unit Quantization coefficient identifier of the quantization coefficient;

所述不同的边界强度值包括第一边界强度值和第二边界强度值,所述第二边界强度值大于所述的第一边界强度值;所述第二BS确定单元,具体用于若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。The different boundary strength values include a first boundary strength value and a second boundary strength value, and the second boundary strength value is greater than the first boundary strength value; the second BS determination unit is specifically configured to if the The quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合四方面的第四种可能的实现方式,在第五种可能的实现方式中,所述第二信息获取单元,还用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;In combination with the fourth possible implementation of the four aspects, in a fifth possible implementation, the second information acquisition unit is further configured to set the reference of the image block whose encoding mode is BaseLayer mode according to a preset rule image; acquiring reference images of adjacent image blocks on both sides of the possible filtering boundary;

所述第二BS确定单元,还用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。The second BS determining unit is further configured to set the possible The boundary strength BS of the filtered boundary is set to the second boundary strength.

结合四方面的第五种可能的实现方式,在第六种可能的实现方式中,所述第额信息获取单元,还用于获取所述编码信息中包括的所述相邻的图像块的运动向量;With reference to the fifth possible implementation manner of the four aspects, in a sixth possible implementation manner, the first information acquiring unit is further configured to acquire the motion of the adjacent image block included in the encoding information vector;

所述第二BS确定单元包括:第四参数设置单元、第四参数获取单元以及第四BS确定子单元;The second BS determination unit includes: a fourth parameter setting unit, a fourth parameter acquisition unit, and a fourth BS determination subunit;

所述第四参数设置单元,用于将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;The fourth parameter setting unit is configured to set the motion vector of the image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still;

所述第四参数获取单元,用于获取所述可能滤波边界两侧的相邻的图像块的运动向量;The fourth parameter acquisition unit is configured to acquire motion vectors of adjacent image blocks on both sides of the possible filtering boundary;

所述第四BS确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第二边界强度。The fourth BS determination subunit is configured to if the quantization coefficient flag indicates that none of the adjacent image blocks has quantization coefficients, and the adjacent image blocks have the same reference image, and the adjacent If the difference between the image block motion vectors is greater than or equal to a preset threshold, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

结合四方面的第六种可能的实现方式,在第七种可能的实现方式中,所述第四BS确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度BS设置为第一边界强度。With reference to the sixth possible implementation manner of the four aspects, in a seventh possible implementation manner, the fourth BS determining subunit is further configured to: There is no quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the possible filtering boundary is set to Set to the first boundary strength.

结合四方面的第一种到第六种任意一项可能的实现方式,在第八种可能的实现方式中,所述的第一边界强度为0,所述的第二边界强度为1。In combination with any one of the first to sixth possible implementation manners of the four aspects, in an eighth possible implementation manner, the first boundary strength is 0, and the second boundary strength is 1.

从以上技术方案可以看出,本发明实施例具有以下优点:当相邻的图像块的编码模式均不是Intra模式,且相邻的图像块的编码模式中至少包括一个BaseLayer模式,则将可能的滤波边界的边界强度BS设置为不同的边界强度值,BS的设置不再全部设置成相同强度,使BS的设置更加合理,进而提升编码效率。It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages: when the encoding modes of adjacent image blocks are not Intra mode, and the encoding modes of adjacent image blocks include at least one BaseLayer mode, then possible The boundary strength BS of the filtering boundary is set to different boundary strength values, and the BS settings are no longer all set to the same strength, which makes the BS setting more reasonable, thereby improving the coding efficiency.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面则将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1A为本发明实施例第一方法中的第一种方法流程示意图;Fig. 1A is a schematic flow chart of the first method in the first method of the embodiment of the present invention;

图1A-1为本发明实施例图像块结构示意图;FIG. 1A-1 is a schematic diagram of an image block structure according to an embodiment of the present invention;

图1A-2为本发明实施例预测块结构示意图;FIG. 1A-2 is a schematic diagram of a prediction block structure according to an embodiment of the present invention;

图1A-3为本发明实施例变换块结构示意图;1A-3 are schematic diagrams of the structure of a transform block according to an embodiment of the present invention;

图1A-4为本发明实施例可能进行DBF的边界结构示意图;Figure 1A-4 is a schematic diagram of a boundary structure where DBF may be performed in an embodiment of the present invention;

图1A-5为本发明实施例第一方法中的第二种方法流程示意图;1A-5 are schematic flowcharts of the second method in the first method of the embodiment of the present invention;

图1A-6为本发明实施例第一方法中的第三种方法流程示意图;1A-6 are schematic flowcharts of the third method in the first method of the embodiment of the present invention;

图1A-7为本发明实施例第一方法中的第四种方法流程示意图;1A-7 are schematic flowcharts of the fourth method in the first method of the embodiment of the present invention;

图1A-8为本发明实施例第一方法中的第五种方法流程示意图;1A-8 are schematic flow charts of the fifth method in the first method of the embodiment of the present invention;

图1A-9为本发明实施例第一方法中的第六种方法流程示意图;1A-9 are schematic flowcharts of the sixth method in the first method of the embodiment of the present invention;

图1A-10为本发明实施例第一方法中的第七种方法流程示意图;1A-10 are schematic flowcharts of the seventh method in the first method of the embodiment of the present invention;

图1A-11为本发明实施例第一方法中的第八种方法流程示意图;1A-11 are schematic flowcharts of the eighth method in the first method of the embodiment of the present invention;

图1B为本发明实施例第二方法流程示意图;Fig. 1B is a schematic flow chart of the second method of the embodiment of the present invention;

图2为本发明实施例第三方法流程示意图;Fig. 2 is a schematic flow chart of the third method of the embodiment of the present invention;

图3为本发明实施例第四方法流程示意图;Fig. 3 is a schematic flow chart of the fourth method of the embodiment of the present invention;

图4为本发明实施例像素梯度示意图;Fig. 4 is a schematic diagram of a pixel gradient according to an embodiment of the present invention;

图5为本发明实施例第一装置结构示意图;5 is a schematic structural diagram of a first device according to an embodiment of the present invention;

图6为本发明实施例第二装置结构示意图;6 is a schematic structural diagram of a second device according to an embodiment of the present invention;

图7为本发明实施例第三装置结构示意图;7 is a schematic structural diagram of a third device according to an embodiment of the present invention;

图8为本发明实施例第五装置结构示意图;Fig. 8 is a schematic structural diagram of a fifth device according to the embodiment of the present invention;

图9为本发明实施例第六装置结构示意图;Fig. 9 is a schematic structural diagram of a sixth device according to an embodiment of the present invention;

图10为本发明实施例第七装置结构示意图;Fig. 10 is a schematic structural diagram of a seventh device according to an embodiment of the present invention;

图11为本发明实施例第一设备结构示意图;Fig. 11 is a schematic structural diagram of the first device according to the embodiment of the present invention;

图12为本发明实施例第二设备结构示意图;Fig. 12 is a schematic structural diagram of a second device according to an embodiment of the present invention;

图13为本发明实施例以手机为例的设备结构示意图。FIG. 13 is a schematic diagram of a device structure of an embodiment of the present invention taking a mobile phone as an example.

具体实施方式detailed description

为了使本发明的目的、技术方案和优点更加清楚,下面则将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。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. Obviously, the described embodiments are only some embodiments of the present invention, rather than all implementations. example. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

发明人首先对DBF的方案进行了分析,请参阅如下:The inventor first analyzed the scheme of DBF, please refer to the following:

基于HEVC的可伸缩视频编码SHVC采用DBF去除增强层重建图像的块效应,以提高其主客观质量。DBF是一种在重建图像的亮度分量和色度分量上分别进行的像素滤波技术,对重建图像中的每个图像块依次进行,先对垂直边界进行滤波,再对水平边界滤波。对一个图像块进行DBF操作包括如下三个步骤:HEVC-based scalable video coding (SHVC) uses DBF to remove the blocking effect of the reconstructed image in the enhancement layer to improve its subjective and objective quality. DBF is a pixel filtering technique that is performed on the luminance component and chrominance component of the reconstructed image separately. It performs sequentially on each image block in the reconstructed image, first filters the vertical boundary, and then filters the horizontal boundary. Performing a DBF operation on an image block includes the following three steps:

(1)确定DBF的可能滤波边界。上述确定DBF的滤波边界是根据图像块中包含的预测单元边界和变换单元边界确定进行DBF滤波的边界。(1) Determine the possible filtering boundaries of the DBF. The aforementioned determination of the filtering boundary of the DBF is to determine the boundary for performing DBF filtering according to the boundary of the prediction unit and the boundary of the transformation unit included in the image block.

上述预测单元是指一个图像块编码时可能被划分成多个单元分别进行预测,每个单元称作预测单元,相邻预测单元间的边界就叫做预测单元边界。上述变换单元是指图像块被预测后的残差被划分成不同的单元进行变换,每个单元称作变换单元,相邻变换单元间的边界就叫做变换单元边界。预测单元边界或者变换单元边界就是DBF的可能滤波边界。The prediction unit mentioned above means that an image block may be divided into multiple units for prediction when encoding, and each unit is called a prediction unit, and the boundary between adjacent prediction units is called a prediction unit boundary. The above transformation unit means that the predicted residual of the image block is divided into different units for transformation. Each unit is called a transformation unit, and the boundary between adjacent transformation units is called a transformation unit boundary. A prediction unit boundary or a transform unit boundary is a possible filtering boundary of the DBF.

(2)确定BS(Boundary Strength,边界强度)。上述确定BS就是根据图像块编码模式、运动信息和量化系数对BS值进行赋值。(2) Determine BS (Boundary Strength, boundary strength). The above determination of the BS is to assign the BS value according to the image block coding mode, motion information and quantization coefficient.

上述确定BS就是根据图像块编码模式、运动信息以及量化系数确定边界强度。上述BS用于表征DBF滤波边界的边界突兀程度,SHVC中BS取值0,1和2三个值。其中编码模式包括Intra(帧内)模式,BaseLayer(基本层)模式和Inter(帧间)模式。运动信息主要包括图像块在时间域预测时的预测方向、参考图像的索引以及运动向量。The above determination of the BS is to determine the boundary strength according to the coding mode of the image block, the motion information and the quantization coefficient. The above BS is used to characterize the abruptness of the boundary of the DBF filter boundary. In SHVC, the BS takes three values: 0, 1 and 2. The encoding modes include Intra (intra-frame) mode, BaseLayer (basic layer) mode and Inter (inter-frame) mode. The motion information mainly includes the prediction direction of the image block in time domain prediction, the index of the reference image and the motion vector.

在以上流程的步骤(2)中,BS赋值的具体实现如下:为了描述方便,假设P是可能滤波边界的左边(上边)图像块,Q是可能滤波边界的右边(下边)图像块。目前一般确定BS的过程为:如果P或者Q的编码模式是Intra模式或者是BaseLayer模式,则赋值BS=2;否则如果P或者Q有非零量化系数(non-0coeffs),则赋值BS=1;否则如果P和Q的参考帧不同(differentref),则赋值BS=1;否则如果P和Q的运动向量的水平分量的差值绝对值大于等于4或者垂直分量的差值绝对值大于等于4,则赋值BS=1;否则赋值BS=0。In step (2) of the above process, the specific implementation of BS assignment is as follows: for the convenience of description, it is assumed that P is the left (upper) image block of the possible filtering boundary, and Q is the right (lower) image block of the possible filtering boundary. At present, the general process of determining BS is: if the encoding mode of P or Q is Intra mode or BaseLayer mode, assign BS=2; otherwise, if P or Q has non-zero quantization coefficients (non-0coeffs), assign BS=1 ;Otherwise, if the reference frames of P and Q are different (differentref), assign BS=1; otherwise, if the absolute value of the difference between the horizontal components of the P and Q motion vectors is greater than or equal to 4 or the absolute value of the difference between the vertical components is greater than or equal to 4 , then assign BS=1; otherwise assign BS=0.

(3)滤波强度判决。上述滤波强度判决就是根据BS和QP(QuantizationParameter,量化参数)确定该边界是否进行滤波,如果滤波,确定采用强滤波器还是弱滤波器进行滤波。(3) Judgment of filtering strength. The above filtering strength judgment is to determine whether the boundary is to be filtered according to BS and QP (QuantizationParameter, quantization parameter). If filtering, determine whether to use a strong filter or a weak filter for filtering.

在DBF中还定义了参数β和tc,进行滤波强度的判决,具体包括该边界是否进行滤波,如果滤波采用强滤波还是弱滤波。其中β和tc是根据BS和QP推导得到的一组具体数字。目前一般根据边界上像素的梯度变化以及与β和tc的关系决定是否进行滤波,决定滤波时滤波的强弱强度。在滤波强度确定后调用相应的滤波器对边界两侧各三排像素进行滤波处理,达到平滑边界的目的。The parameters β and t c are also defined in the DBF to judge the filtering strength, specifically including whether to filter at the boundary, and if the filtering adopts strong filtering or weak filtering. Among them, β and t c are a set of specific numbers derived from BS and QP. At present, it is generally determined whether to perform filtering according to the gradient change of pixels on the boundary and the relationship with β and tc , and the strength of filtering during filtering is determined. After the filtering intensity is determined, the corresponding filter is called to filter the three rows of pixels on both sides of the boundary to achieve the purpose of smoothing the boundary.

基于以上描述,BS值的大小对于滤波强度的选择以及编解码复杂度具有重要的影响。Intra模式利用当前预测单元空间相邻像素进行预测,BaseLayer模式利用基本层上采样后的同位置图像对预测单元进行预测,Inter模式是指利用时间域上的图像对预测单元进行预测。目前在确定BS值过程中则将BaseLayer模式与Intra模式划为一类,使BaseLayer模式图像块和Intra模式图像块滤波强度相同,边界强度BS一律设定为2,即:滤波强度相同,导致BS设定不够准确,进而影响增强层编码效率。Based on the above description, the size of the BS value has an important impact on the selection of filtering strength and the complexity of encoding and decoding. The Intra mode uses the spatially adjacent pixels of the current prediction unit to predict the prediction unit. The BaseLayer mode uses the same position image sampled on the base layer to predict the prediction unit. The Inter mode refers to using the image in the time domain to predict the prediction unit. At present, in the process of determining the BS value, the BaseLayer mode and the Intra mode are classified into one category, so that the image blocks of the BaseLayer mode and the Intra mode have the same filter strength, and the boundary strength BS is set to 2, that is, the filter strength is the same, resulting in BS The setting is not accurate enough, which affects the coding efficiency of the enhancement layer.

基于以上分析,本发明实施例提供了一种边界强度BS确定方法,如图1A所示,包括:Based on the above analysis, an embodiment of the present invention provides a method for determining a boundary strength BS, as shown in FIG. 1A , including:

101A:确定去块效应滤波DBF的可能滤波边界;101A: Determine possible filtering boundaries of the deblocking filter DBF;

确定图像块进行DBF的可能边界的具体方案可以是:A specific solution for determining the possible boundaries of image blocks for DBF may be:

获取图像块中的预测块,上述预测块是指上述图像块分成一个或者多个的图像单元;图像块如图1A-1所示的方形图像块,预测块如图1A-2所示的两个横向长方形预测块;图1A-2所示是将图像块分为两个预测块,图像块分为多少个预测块是可以任意设置的,本发明实施例不予限定;Obtain the prediction block in the image block, the above prediction block refers to the above image block divided into one or more image units; the image block is a square image block as shown in Figure 1A-1, and the prediction block is two as shown in Figure 1A-2 A horizontal rectangular prediction block; Figure 1A-2 shows that the image block is divided into two prediction blocks, and how many prediction blocks the image block is divided into can be set arbitrarily, and the embodiments of the present invention are not limited;

获取图像块中的变换块,上述变换块是指对图像块对应的残差单元分成一个或者多个更小的残差单元,上述残差单元是指所有预测块按照不同编码模式预测后的残差;变换块如图1A-3所示的两个纵向的长方形变换块;图1A-3所示是将图像块分为两个变换块,变换块分为多少个预测块是可以任意设置的,本发明实施例不予限定;Obtain the transformation block in the image block. The above transformation block refers to dividing the residual unit corresponding to the image block into one or more smaller residual units. The above residual unit refers to the residual of all prediction blocks predicted according to different coding modes. difference; the transform block is two vertical rectangular transform blocks as shown in Figure 1A-3; as shown in Figure 1A-3, the image block is divided into two transform blocks, and how many prediction blocks the transform block is divided into can be set arbitrarily , the embodiment of the present invention is not limited;

上述预测块和上述变换块的所有边界就组成了该图像块可能进行DBF的边界。请对照图1A-2和图1A-3,如图1A-4所示的虚线部分即为可能进行DBF的边界,图1A-2和图1A-3的所有边界,即为上述虚线部分。All the boundaries of the above-mentioned prediction block and the above-mentioned transformation block constitute the boundary where DBF may be performed on the image block. Please compare Figure 1A-2 and Figure 1A-3, the dotted line shown in Figure 1A-4 is the boundary where DBF may be performed, and all the boundaries in Figure 1A-2 and Figure 1A-3 are the dotted line above.

102A:获取上述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;102A: Obtain the encoding mode and encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

上述编码信息包括以下信息中的至少一种或者多种的组合,具体如下:标记上述相邻的图像块是否有量化系数的量化系数标识、上述相邻的图像块的参考图像、上述相邻的图像块的运动向量。The above encoding information includes at least one or a combination of multiple of the following information, specifically as follows: a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient, a reference image of the above-mentioned adjacent image block, the above-mentioned adjacent image block The motion vector of the image block.

103A:当上述相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值。103A: When the encoding modes of the above-mentioned adjacent image blocks are not intra-frame Intra mode, and the encoding modes of the above-mentioned adjacent image blocks include at least one base layer BaseLayer mode, then according to the above-mentioned coding information, the above-mentioned possible filtering boundary The boundary strength BS is set to different boundary strength values.

本发明实施例,当相邻的图像块的编码模式均不是Intra模式,且相邻的图像块的编码模式中至少包括一个BaseLayer模式,则将可能的滤波边界的边界强度BS设置为不同的边界强度值,BS的设置不再全部设置成相同强度,使BS的设置更加合理,进而提升编码效率。上述103A中不同的边界强度值包括第一边界强度和第二边界强度,上述第二边界强度大于上述的第一边界强度;第一边界强度可以是0,将边界强度设置为0的结果将是滤波强度为0,也即:不滤波;第一边界强度也可以是接近于0的,即滤波强度较低。具体第一边界强度的取值可以按照对滤波强度的需求以及设备处理能力等因素来设置,具体的设置值本发明实施例不作限定。In the embodiment of the present invention, when the encoding modes of adjacent image blocks are not Intra mode, and the encoding modes of adjacent image blocks include at least one BaseLayer mode, the boundary strength BS of the possible filtering boundary is set to a different boundary Intensity value, the BS settings are no longer all set to the same intensity, which makes the BS settings more reasonable, thereby improving the coding efficiency. The different boundary strength values in the above 103A include the first boundary strength and the second boundary strength, the above second boundary strength is greater than the above first boundary strength; the first boundary strength can be 0, the result of setting the boundary strength to 0 will be The filtering strength is 0, that is, no filtering; the first boundary strength may also be close to 0, that is, the filtering strength is low. The specific value of the first boundary strength may be set according to factors such as requirements for filtering strength and device processing capability, and the specific setting value is not limited in this embodiment of the present invention.

进一步地,上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;如图1A-5所示,本实施例的方案具体如下:Further, the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient; as shown in Figure 1A-5, the scheme of this embodiment is specifically as follows:

在执行完101A,确定去块效应滤波DBF的可能滤波边界之后,对应,上述102A中,获取上述可能滤波边界两侧相邻的图像块的编码信息具体包括:After executing 101A and determining the possible filtering boundary of the deblocking filter DBF, correspondingly, in the above 102A, obtaining the encoding information of the adjacent image blocks on both sides of the above possible filtering boundary specifically includes:

102A-1:获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;102A-1: Obtain the quantization coefficient identification of whether the adjacent image blocks on both sides of the above possible filtering boundary have quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值,对应,上述103A中,根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value. Correspondingly, in the above-mentioned 103A, the above-mentioned possible filtering boundary The boundary strength BS is set to different boundary strength values specifically including:

103A-1:若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。103A-1: If the encoding modes of the above-mentioned adjacent image blocks are both BaseLayer mode and the quantization coefficient flag indicates that the above-mentioned adjacent image blocks have no quantization coefficients, then set the boundary strength BS of the above-mentioned possible filtering boundary to the first boundary strength .

以上方案中,BS的设置不仅不再全部设置成相同强度,还进一步考虑了量化系数对BS设定的影响,在相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数时,将BS设置为滤波强度较小的的第一边界强度,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。In the above schemes, the BS settings are not all set to the same intensity, but the impact of the quantization coefficient on the BS setting is further considered. The encoding modes of adjacent image blocks are BaseLayer mode and the quantization coefficient identifier indicates the above-mentioned adjacent When there are no quantization coefficients in the image block, set BS to the first boundary strength with a smaller filtering strength, so that the BS value setting is more reasonable, and the calculation of the codec, especially the decoder, can be reduced without affecting the filtering effect. complexity and improve coding efficiency.

进一步地,上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;如图1A-6所示,本实施例的方案具体如下:Further, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and a motion vector of the adjacent image block; as shown in FIG. 1A-6 Show, the scheme of this embodiment is specifically as follows:

在执行完101A,确定去块效应滤波DBF的可能滤波边界之后,对应,上述102A获取上述可能滤波边界两侧的相邻的图像块的编码信息具体包括:After executing 101A and determining the possible filtering boundaries of the deblocking filter DBF, correspondingly, the above-mentioned 102A obtains the encoding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundaries, specifically including:

102A-2:根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;102A-2: Set the reference image of the above image block whose encoding mode is BaseLayer mode according to the preset rules and set the motion vector of the above image block whose encoding mode is BaseLayer mode to correspond to when the same position block in the reference image is still parameters;

获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the above-mentioned possible filtering boundary, reference images of the above-mentioned adjacent image blocks, and motion vectors of the above-mentioned adjacent image blocks;

对应,上述103A中,根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:Correspondingly, in the above-mentioned 103A, setting the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned encoding information specifically includes:

103A-2:若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。103A-2: If the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than the preset threshold, then set the boundary strength BS of the above possible filtering boundary as the first boundary strength.

以上方案中,BS的设置不仅不再全部设置成相同强度,还进一步考虑了量化系数、参考图像以及相邻的图像块的运动矢量的差值对BS设定的影响,在量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。In the above solution, the BS setting is not only no longer set to the same strength, but also further considers the influence of the difference between the quantization coefficient, the reference image and the motion vector of the adjacent image block on the BS setting, and the quantization coefficient flag indicates the above Adjacent image blocks have no quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is less than the preset threshold, then the boundary of the above-mentioned possible filtering boundary The strength BS is set to the first boundary strength, which makes the BS value setting more reasonable, which can reduce the computational complexity of the codec, especially the decoder, and improve the coding efficiency without affecting the filtering effect.

进一步地,如图1A-7所示,在执行完101A,确定去块效应滤波DBF的可能滤波边界,以及102A-2,根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量之后,上述103A中,根据上述103A中,编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:Further, as shown in FIG. 1A-7, after 101A is executed, the possible filtering boundaries of the deblocking filter DBF are determined, and 102A-2, the encoding mode is set to the reference image of the above-mentioned image block in BaseLayer mode according to preset rules and Set the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode as the parameter corresponding to when the block at the same position in the reference image is still; obtain the quantization coefficient identification of the adjacent image block on both sides of the above-mentioned possible filtering boundary, and the above-mentioned After the reference image of the adjacent image block and the motion vector of the above-mentioned adjacent image block, in the above-mentioned 103A, according to the above-mentioned 103A, the encoding information sets the boundary strength BS of the above-mentioned possible filtering boundary to a different boundary strength value or include:

103A-3:若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。103A-3: If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the motion vector of the adjacent image blocks If the difference is greater than or equal to the preset threshold, then the boundary strength BS of the above possible filtering boundary is set as the second boundary strength.

以上方案在前一实施例的基础上还给出了第二边界强度的设置情况,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。The above scheme also provides the setting of the second boundary strength on the basis of the previous embodiment, which makes the BS value setting more reasonable, and can reduce the calculation complexity of the codec, especially the decoder, without affecting the filtering effect degree, improving the coding efficiency.

进一步地,上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;如图1A-8所示,本实施例的方案具体如下:Further, the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image blocks have quantization coefficients; as shown in Figure 1A-8, the scheme of this embodiment is specifically as follows:

在执行完101A,确定去块效应滤波DBF的可能滤波边界之后,对应,上述102A,获取上述可能滤波边界两侧的相邻的图像块的编码信息具体包括:After executing 101A, after determining the possible filtering boundaries of the deblocking filter DBF, corresponding to the above-mentioned 102A, obtaining the encoding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundaries specifically includes:

102A-4:获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;102A-4: Obtain the quantization coefficient identification of whether the adjacent image blocks on both sides of the above possible filtering boundary have quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述103A中,根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, in the above-mentioned 103A, the above-mentioned possible filtering boundary The boundary strength BS is set to different boundary strength values specifically including:

103A-4:若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。103A-4: If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, set the boundary strength BS of the possible filtering boundary as the second boundary strength.

以上方案中,BS的设置不仅不再全部设置成相同强度,还进一步考虑了量化系数对BS设定的影响,在量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。In the above solution, the BS setting is not only no longer set to the same intensity, but also further considers the influence of the quantization coefficient on the BS setting, and the quantization coefficient indicator indicates that at least one of the above-mentioned adjacent image blocks has a quantization coefficient , then set the boundary strength BS of the above-mentioned possible filtering boundary as the second boundary strength, so that the BS value setting is more reasonable, and can reduce the computational complexity of the codec, especially the decoder, without affecting the filtering effect, and improve coding efficiency.

进一步地,上述编码信息还包括上述相邻的图像块的参考图像;如图1A-9所示,本实施例的方案具体如下:Further, the above encoding information also includes reference images of the above adjacent image blocks; as shown in Figure 1A-9, the solution of this embodiment is specifically as follows:

在执行完101A,确定去块效应滤波DBF的可能滤波边界之后,对应,上述102A,除了执行102A-4中获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识以外,获取上述可能滤波边界两侧的相邻的图像块的编码信息还包括:After executing 101A and determining the possible filtering boundary of the deblocking filter DBF, corresponding to the above-mentioned 102A, in addition to performing 102A-4 to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficient identifiers of quantization coefficients, Obtaining the encoding information of the adjacent image blocks on both sides of the above possible filtering boundary also includes:

102A-5:根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;102A-5: Set the reference image of the above image block whose encoding mode is BaseLayer mode according to the preset rule; acquire the reference image of the adjacent image block on both sides of the above possible filtering boundary;

对应,上述103A中,根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:Correspondingly, in the above-mentioned 103A, setting the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned coding information also includes:

103A-5:若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。103A-5: If the above-mentioned quantization coefficient flag indicates that none of the above-mentioned adjacent image blocks have quantization coefficients, and the above-mentioned adjacent image blocks have different reference images, then set the boundary strength BS of the above-mentioned possible filtering boundary as the second boundary strength.

以上方案中,BS的设置不仅不再全部设置成相同强度,还进一步考虑了量化系数以及相邻的图像块的参考图像对BS设定的影响,在量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。In the above schemes, the BS settings are not all set to the same intensity, but the influence of the quantization coefficient and the reference image of the adjacent image block on the BS setting is further considered. If there is no quantization coefficient, and the above-mentioned adjacent image blocks have different reference images, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength, so that the BS value setting is more reasonable, and the premise of not affecting the filtering effect can be The reduction reduces the computational complexity of the codec, especially the decoder, and improves the coding efficiency.

进一步地,上述编码信息还包括上述相邻的图像块的运动向量;如图1A-10所示,本实施例的方案具体如下:Further, the above encoding information also includes the motion vectors of the above adjacent image blocks; as shown in Figure 1A-10, the solution of this embodiment is specifically as follows:

在执行完101A,确定去块效应滤波DBF的可能滤波边界之后,对应,上述102A,除了执行102A-4中获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识,以及102A-5中,根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像以外,获取上述可能滤波边界两侧的相邻的图像块的编码信息还包括:After executing 101A, after determining the possible filtering boundary of the deblocking filter DBF, corresponding to the above 102A, in addition to performing 102A-4 to obtain whether the adjacent image blocks on both sides of the above possible filtering boundary have quantization coefficient identifiers of quantization coefficients, and In 102A-5, set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to the preset rule; besides obtaining the reference image of the adjacent image block on both sides of the above-mentioned possible filtering boundary, obtain the corresponding image on both sides of the above-mentioned possible filtering boundary. The coding information of adjacent image blocks also includes:

102A-6:将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量;102A-6: Set the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode as the parameter corresponding to when the block at the same position in the reference image is still; obtain the motion of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary vector;

对应,上述103A中,根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:Correspondingly, in the above-mentioned 103A, setting the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned coding information also includes:

103A-6:若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。103A-6: If the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or is equal to the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

以上方案中,BS的设置不仅不再全部设置成相同强度,还进一步考虑了量化系数、相邻的图像块的参考图像以及相邻的图像块运动矢量之间的差值对BS设定的影响,在量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。In the above scheme, the BS setting is not only no longer set to the same strength, but also further considers the influence of the quantization coefficient, the reference image of the adjacent image block, and the difference between the motion vector of the adjacent image block on the BS setting , the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or equal to the preset threshold , then set the boundary strength BS of the above-mentioned possible filtering boundary as the second boundary strength, so that the BS value setting is more reasonable, and can reduce the computational complexity of the codec, especially the decoder, without affecting the filtering effect, and improve coding efficiency.

进一步地,如图1A-11所示,本实施例的方案具体如下:Further, as shown in Figure 1A-11, the solution of this embodiment is specifically as follows:

在执行完101A,确定去块效应滤波DBF的可能滤波边界,对应102A,除了执行102A-4中获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识,102A-5中,根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像以外,以及102A-6中,将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量以外,对应上述103A中,根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:After executing 101A, determine the possible filtering boundary of the deblocking filter DBF, corresponding to 102A, in addition to performing 102A-4 to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficient identifiers of quantization coefficients, in 102A-5 , according to preset rules, set the encoding mode to the reference image of the above image block in BaseLayer mode; obtain the reference images of adjacent image blocks on both sides of the above possible filtering boundary, and in 102A-6, set the above encoding mode to BaseLayer mode The motion vector of the above-mentioned image block is set as the corresponding parameter when the block at the same position in the reference image is still; except for obtaining the motion vector of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary, corresponding to the above-mentioned 103A, according to the above-mentioned encoding Information to set the boundary strength BS of the above possible filtering boundaries to different boundary strength values also includes:

103A-7:若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。103A-7: If the quantization coefficient flag indicates that there are no quantization coefficients in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than If the threshold is preset, then the boundary strength BS of the above possible filtering boundary is set as the first boundary strength.

以上方案在前一实施例的基础上还给出了如何设置第一边界强度这一较低滤波强度的方案,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。On the basis of the previous embodiment, the above solution also gives a solution of how to set the first boundary strength, which is a lower filtering strength, so that the BS value setting is more reasonable, and the codec can be reduced without affecting the filtering effect. Especially the computational complexity of the decoder improves the coding efficiency.

本发明实施例还提供了一种去块效应的滤波方法,如图1B所示,包括:The embodiment of the present invention also provides a deblocking filtering method, as shown in FIG. 1B, including:

101B:确定去块效应滤波DBF的可能滤波边界;101B: Determine the possible filtering boundaries of the deblocking filter DBF;

102B:获取上述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;102B: Obtain the encoding mode and encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

上述编码信息包括以下信息中的至少一种或者多种的组合,具体如下:标记上述相邻的图像块是否有量化系数的量化系数标识、上述相邻的图像块的参考图像、上述相邻的图像块的运动向量。The above encoding information includes at least one or a combination of multiple of the following information, specifically as follows: a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient, a reference image of the above-mentioned adjacent image block, the above-mentioned adjacent image block The motion vector of the image block.

103B:当上述相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值。103B: When the encoding modes of the adjacent image blocks are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one base layer BaseLayer mode, then according to the above encoding information, the above possible filtering boundaries The boundary strength BS is set to different boundary strength values.

上述不同的边界强度值可以是第一边界强度值和第二边界强度值,其中,上述第二边界强度值可以大于上述的第一边界强度值;上述第一边界强度值可以是0,将边界强度值设置为0的结果将是滤波强度为0,也即:不滤波;第一边界强度值也可以是接近于0的,即滤波强度较低。The above-mentioned different boundary strength values may be a first boundary strength value and a second boundary strength value, wherein the above-mentioned second boundary strength value may be greater than the above-mentioned first boundary strength value; the above-mentioned first boundary strength value may be 0, and the boundary The result of setting the strength value to 0 is that the filtering strength is 0, that is, no filtering; the first boundary strength value can also be close to 0, that is, the filtering strength is low.

104B:将上述确定的BS作为一个参考因子用于获取第一阈值及第二阈值,上述第一阈值用于确定是否对上述可能的滤波边界进行滤波,上述第二阈值用于确定对需要进行滤波的上述可能的滤波边界进行滤波的滤波强度;104B: Use the above-mentioned determined BS as a reference factor to obtain a first threshold and a second threshold, the above-mentioned first threshold is used to determine whether to filter the above-mentioned possible filtering boundaries, and the above-mentioned second threshold is used to determine whether to filter The filtering strength of the above-mentioned possible filtering boundaries for filtering;

105B:按照上述可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和上述第一阈值确定是否需要对上述可能的滤波边界进行滤波;105B: Determine whether the above-mentioned possible filtering boundary needs to be filtered according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the above-mentioned possible filtering boundary and the above-mentioned first threshold;

上述105B中,相邻预定范围可以是当前图像块左右三个,第一阈值和第二阈值可以是β和tc,在后续实施例中将就以此为例进行更详细的说明。In the above 105B, the adjacent predetermined range may be three left and right of the current image block, and the first threshold and the second threshold may be β and t c , which will be described in more detail in subsequent embodiments as an example.

106B:若确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并使用所确定滤波器执行对上述需要进行滤波的上述可能的滤波边界进行滤波处理。106B: If it is determined that filtering is required, determine the filter for performing filtering according to the relationship between the gradient of pixels within a predetermined range and the second threshold in adjacent image blocks on both sides of the possible filtering boundary, and use the determined filter to perform filtering for the above needs The above-mentioned possible filtering boundaries for filtering are subjected to filtering processing.

本发明实施例,当相邻的图像块的编码模式均不是Intra模式,且相邻的图像块的编码模式中至少包括一个BaseLayer模式,则将可能的滤波边界的边界强度BS设置为不同的边界强度值,BS的设置不再全部设置成相同强度,使BS的设置更加合理,进而提升编码效率。In the embodiment of the present invention, when the encoding modes of adjacent image blocks are not Intra mode, and the encoding modes of adjacent image blocks include at least one BaseLayer mode, the boundary strength BS of the possible filtering boundary is set to a different boundary Intensity value, the BS settings are no longer all set to the same intensity, which makes the BS settings more reasonable, thereby improving the coding efficiency.

进一步地,上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, the above encoding information includes a quantization coefficient identification marking whether the above adjacent image blocks have quantization coefficients;

对应,上述获取上述可能滤波边界两侧相邻的图像块的编码信息具体包括:Correspondingly, the acquisition of the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary specifically includes:

获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Obtain the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned boundary strength of the above-mentioned possible filtering boundary according to the above-mentioned coding information BS is set to different boundary strength values specifically including:

若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。If the encoding modes of the adjacent image blocks are both BaseLayer mode and the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, then set the boundary strength BS of the possible filtering boundary as the first boundary strength.

以上方案中,BS的设置不仅不再全部设置成相同强度,还进一步考虑了量化系数对BS设定的影响,在相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数时,将BS设置为滤波强度较小的的第一边界强度,使BS值设置更加合理,可以在不影响滤波效果的前提下降低降低编解码器尤其是解码器的计算复杂度,提高了编码效率。In the above schemes, the BS settings are not all set to the same intensity, but the impact of the quantization coefficient on the BS setting is further considered. The encoding modes of adjacent image blocks are BaseLayer mode and the quantization coefficient identifier indicates the above-mentioned adjacent When there are no quantization coefficients in the image block, set BS to the first boundary strength with a smaller filtering strength, so that the BS value setting is more reasonable, and the calculation of the codec, especially the decoder, can be reduced without affecting the filtering effect. complexity and improve coding efficiency.

进一步地,上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

对应,上述获取上述可能滤波边界两侧的相邻的图像块的编码信息还包括:Correspondingly, the acquisition of the encoding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary further includes:

根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Setting the encoding mode as the reference image of the above-mentioned image block of the BaseLayer mode according to the preset rules and setting the motion vector of the above-mentioned image block of the above-mentioned encoding mode as the BaseLayer mode as parameters corresponding to when the block at the same position in the reference image is stationary;

获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the above-mentioned possible filtering boundary, reference images of the above-mentioned adjacent image blocks, and motion vectors of the above-mentioned adjacent image blocks;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned boundary strength of the above-mentioned possible filtering boundary according to the above-mentioned coding information BS is set to different boundary strength values specifically including:

若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than a preset threshold, then the The boundary strength BS of the aforementioned possible filtering boundaries is set to the first boundary strength.

进一步地,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:Further, the above-mentioned setting of the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned encoding information specifically includes:

若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the difference between the motion vectors of the adjacent image blocks is greater than or is equal to the preset threshold, then the boundary strength BS of the above possible filtering boundary is set as the second boundary strength.

进一步地,上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, the above encoding information includes a quantization coefficient identification marking whether the above adjacent image blocks have quantization coefficients;

对应,上述获取上述可能滤波边界两侧的相邻的图像块的编码信息具体包括:Correspondingly, the acquisition of the encoding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary specifically includes:

获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Obtain the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned boundary strength of the above-mentioned possible filtering boundary according to the above-mentioned coding information BS is set to different boundary strength values specifically including:

若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

进一步地,上述编码信息还包括上述相邻的图像块的参考图像:Further, the above encoding information also includes reference images of the above adjacent image blocks:

对应,上述获取上述可能滤波边界两侧的相邻的图像块的编码信息具体包括:Correspondingly, the acquisition of the encoding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary specifically includes:

根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to the preset rule; obtain the reference image of the adjacent image block on both sides of the above-mentioned possible filtering boundary;

对应,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值具体包括:Correspondingly, the above-mentioned setting of the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned encoding information specifically includes:

若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have different reference images, then set the boundary strength BS of the possible filtering boundary as the second boundary strength.

进一步地,上述编码信息还包括上述相邻的图像块的运动向量;Further, the above-mentioned coding information also includes the motion vectors of the above-mentioned adjacent image blocks;

对应,上述获取上述可能滤波边界两侧的相邻的图像块的编码信息具体包括:Correspondingly, the acquisition of the encoding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary specifically includes:

将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量;Set the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still; obtain the motion vector of the adjacent image block on both sides of the above-mentioned possible filtering boundary;

对应,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:Correspondingly, the above-mentioned setting of the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned coding information also includes:

若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or equal to a preset threshold , then set the boundary strength BS of the above possible filtering boundary as the second boundary strength.

进一步地,上述根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值还包括:Further, the above-mentioned setting of the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned coding information also includes:

若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。If the quantization coefficient flag indicates that there are no quantization coefficients in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than a preset threshold, Then set the boundary strength BS of the above-mentioned possible filtering boundary as the first boundary strength.

后续实施例将以HEVC相关协议场景为例,对以上方案进行更详细的举例说明。Subsequent embodiments will use HEVC-related protocol scenarios as an example to illustrate the above solutions in more detail.

本发明实施例在编码端和解码端实现过程完全一样,均不涉及对码流结构的修改,若从解码端描述本发明实施例技术的具体实现方法。本发明实施例方案为:在解码端解码出一个完整重建图像后进行DBF。上述重建图像是由多个重建图像块组成的(不致引起混淆的情况下,下文将重建图像块称作图像块)。重建图像中图像块按照从左到右,从上到下依次进行DBF操作,当所有的图像块执行完DBF操作,那么也就完成了对重建图像的DBF操作。The implementation process of the embodiment of the present invention is exactly the same at the encoding end and the decoding end, and does not involve modification of the code stream structure. The specific implementation method of the technology of the embodiment of the present invention is described from the decoding end. The solution of the embodiment of the present invention is: perform DBF after decoding a complete reconstructed image at the decoding end. The above-mentioned reconstructed image is composed of multiple reconstructed image blocks (the reconstructed image blocks will be referred to as image blocks hereinafter without causing confusion). The image blocks in the reconstructed image are subjected to DBF operations sequentially from left to right and from top to bottom. When all image blocks have performed DBF operations, the DBF operation on the reconstructed image is also completed.

以下实施例,将分别就:确定DBF的可能滤波边界、确定BS值、滤波强度判决三个方面进行举例说明如下:In the following embodiments, the three aspects of determining the possible filtering boundary of the DBF, determining the BS value, and determining the filtering strength will be illustrated as follows:

一、确定DBF的可能滤波边界:1. Determine the possible filtering boundaries of DBF:

确定图像块进行DBF的可能边界的具体方案可以是:A specific solution for determining the possible boundaries of image blocks for DBF may be:

获取图像块中预测块,上述预测块是指一个图像块分成一个或者多个的图像单元;图像块如图1A-1所示的方形图像块,预测块如图1A-2所示的两个横向长方形预测块;图1A-2所示是将图像块分为两个预测块,图像块分为多少个预测块是可以任意设置的,本发明实施例不予限定;Obtain the prediction block in the image block. The above prediction block refers to an image block divided into one or more image units; the image block is a square image block as shown in Figure 1A-1, and the prediction block is two as shown in Figure 1A-2. A horizontal rectangular prediction block; as shown in Figure 1A-2, the image block is divided into two prediction blocks, and the number of prediction blocks that the image block is divided into can be set arbitrarily, and the embodiment of the present invention is not limited;

获取图像块中变换块,上述变换块是指对图像块对应的残差单元分成一个或者多个更小的残差单元,上述残差单元是指所有预测块按照不同编码模式预测后的残差。变换块如图1A-3所示的两个纵向的长方形变换块;图1A-3所示是将图像块分为两个变换块,变换块分为多少个预测块是可以任意设置的,本发明实施例不予限定;Obtain the transformation block in the image block. The above transformation block refers to dividing the residual unit corresponding to the image block into one or more smaller residual units. The above residual unit refers to the residual after all prediction blocks are predicted according to different coding modes. . The transformation block is shown in Figure 1A-3 as two vertical rectangular transformation blocks; as shown in Figure 1A-3, the image block is divided into two transformation blocks, and the number of prediction blocks into which the transformation block is divided can be set arbitrarily. The embodiment of the invention is not limited;

上述预测块和上述变换块的所有边界就组成了该图像块可能进行DBF的边界。请对照图1A-2和图1A-3,如图1A-4所示的虚线部分即为可能进行DBF的边界,图1A-2和图1A-3的所有边界,即为上述虚线部分。All the boundaries of the above-mentioned prediction block and the above-mentioned transformation block constitute the boundary where DBF may be performed on the image block. Please compare Figure 1A-2 and Figure 1A-3, the dotted line shown in Figure 1A-4 is the boundary where DBF may be performed, and all the boundaries in Figure 1A-2 and Figure 1A-3 are the dotted line above.

二、确定BS值:Second, determine the BS value:

本发明实施例提供了两种可供选择的方案确定BS值,请分别参阅图2和图3。The embodiment of the present invention provides two alternative solutions for determining the BS value, please refer to FIG. 2 and FIG. 3 respectively.

可选方案A,请参阅图2:Option A, see Figure 2:

为描述方便起见,假定垂直边界左边的图像块为P,右边的图像块为Q或者水平边界下边的图像块为P,上边的图像块为Q;那么,在DBF中,边界强度BS表示处在边界两边的P和Q的突兀程度,该值越大表示边界像素值的落差越大。BS用于判断边界是否滤波以及滤波时滤波程度的强弱,因此,BS值的确定是DBF中非常重要的一个环节。边界两边图像块的编码信息可以反映出边界落差的大小。上述编码信息包括对应基本层(较低层)预测块的编码模式信息,还可以包括量化系数标识,还可以包括参考图像信息以及运动矢量。上述量化系数标识指示图像块有无量化系数。上述参考图像信息包括参考图像预测方向和参考图像索引。上述参考图像预测方向可分为前向预测、后向预测和双向预测。上述参考图像索引指示参考图像在参考图像列表中的位置。上述运动矢量表示当前块相对与参考图像中同位置块的运动偏移,每一个运动矢量包括水平方向分量x和垂直方向分量y。相对与参考图像中同位置块,运动矢量的水平和垂直分量都没有偏移时,称作静止。上述图像块的编码模式就是图像块在预测时采用的方式,包括Intra模式,BaseLayer模式和Inter模式。上述Intra模式是指利用当前图像块空间相邻的像素进行预测的编码模式。上述BaseLayer模式是指利用基本层(较低层)上采样后的同位置图像进行预测的编码模式。上述Inter模式是指利用时间域上的图像进行预测的编码模式。For the convenience of description, it is assumed that the image block on the left side of the vertical boundary is P, and the image block on the right is Q; or the image block below the horizontal boundary is P, and the image block above is Q; then, in DBF, the boundary strength BS represents the The abruptness of P and Q on both sides of the border, the larger the value, the larger the drop of the border pixel value. BS is used to judge whether the boundary is filtered or not and the degree of filtering during filtering. Therefore, the determination of BS value is a very important link in DBF. The coding information of the image blocks on both sides of the boundary can reflect the size of the boundary drop. The above coding information includes coding mode information corresponding to the prediction block of the base layer (lower layer), may also include quantization coefficient identifiers, and may also include reference image information and motion vectors. The quantization coefficient flag indicates whether the image block has quantization coefficients. The above reference picture information includes a reference picture prediction direction and a reference picture index. The aforementioned reference picture prediction directions can be classified into forward prediction, backward prediction and bi-directional prediction. The aforementioned reference picture index indicates the position of the reference picture in the reference picture list. The motion vector above represents the motion offset of the current block relative to the co-located block in the reference image, and each motion vector includes a horizontal component x and a vertical component y. When the horizontal and vertical components of the motion vector have no offset relative to the same position block in the reference image, it is called static. The encoding mode of the above image block is the manner adopted by the image block during prediction, including Intra mode, BaseLayer mode and Inter mode. The above-mentioned Intra mode refers to a coding mode in which spatial adjacent pixels of the current image block are used for prediction. The above-mentioned BaseLayer mode refers to a coding mode for predicting by using the upsampled image at the same position of the base layer (lower layer). The aforementioned Inter mode refers to a coding mode in which prediction is performed using images in the time domain.

与HEVC相比,在SHVC的增强层中增加了BaseLayer模式,该模式是将基本层(较低层)的图像上采样后,以相同位置的图像单元作为参考单元进行预测,Inter模式是以时间域的图像单元作为参考单元进行预测。与Intra模式形成的参考单元相比,BaseLayer模式和Inter模式的参考图像更加接近自然采集图像,具有更强的预测能力。实验证明BaseLayer模式的残差按照Inter模式的残差编码效率更高。总之,从参考单元的形成方式以及大量的实验数据得出,BaseLayer模式的预测能力接近于Inter模式,因此,本发明实施例在BS决策过程中,将BaseLayer模式和Inter模式划为一类处理。此外,如果边界两侧图像块的模式都是BaseLayer模式,且两者的量化系数都为0(即:没有量化系数),表示边界两侧的图像块预测都来自基本层,预测后又没有量化系数,具有较大的预测相似性,不易产生边界效应,因此,在这种情况下,本发明实施例不进行滤波。以图像块为例描述DBF的过程具体,请参阅图2,如下:Compared with HEVC, the BaseLayer mode is added to the enhancement layer of SHVC. This mode is to upsample the image of the base layer (lower layer) and use the image unit at the same position as the reference unit for prediction. The Inter mode is based on time Image units in the domain are used as reference units for prediction. Compared with the reference unit formed by the Intra mode, the reference images of the BaseLayer mode and the Inter mode are closer to the natural acquisition image and have stronger predictive ability. Experiments have proved that the residuals of BaseLayer mode are more efficiently encoded according to the residuals of Inter mode. In short, from the formation of reference units and a large amount of experimental data, the predictive ability of the BaseLayer mode is close to that of the Inter mode. Therefore, in the BS decision-making process, the BaseLayer mode and the Inter mode are classified as one type of processing in the embodiment of the present invention. In addition, if the modes of the image blocks on both sides of the boundary are BaseLayer mode, and the quantization coefficients of both are 0 (that is, there is no quantization coefficient), it means that the prediction of the image blocks on both sides of the boundary comes from the base layer, and there is no quantization after prediction. The coefficients have a relatively large prediction similarity and are not likely to produce boundary effects. Therefore, in this case, the embodiment of the present invention does not perform filtering. Taking the image block as an example to describe the specific process of DBF, please refer to Figure 2, as follows:

本部分是关于对可能进行滤波的边界进行BS计算的介绍。描述方便起见,定义垂直边界左边的图像块为P,右边的图像块为Q或者水平边界下边的图像块为P,上边的图像块为Q。BS设置为第一边界强度、第二边界强度和第三边界强度分别对应BS=0,BS=1,BS=2。在本实施例中BS=0时不进行滤波。对上述编码模式为BaseLayer模式的图像块的参考图像赋值是指指定BaseLayer模式图像块的参考图像的索引,本实施例指定BaseLayer模式图像块的参考图像索引为当前图像的索引。对上述编码模式为BaseLayer模式的图像块的运动矢量赋静止对应的参数是指将BaseLayer模式的图像块的运动矢量的水平运动分量和垂直运动分量的值都指定为0。This section is an introduction to BS calculations for possible filtered boundaries. For the convenience of description, define the image block on the left of the vertical boundary as P and the image block on the right as Q or the image block below the horizontal boundary as P and the image block above as Q. The BS is set as the first boundary strength, the second boundary strength and the third boundary strength corresponding to BS=0, BS=1 and BS=2 respectively. In this embodiment, no filtering is performed when BS=0. The assignment of the reference image of the image block whose encoding mode is the BaseLayer mode refers to specifying the index of the reference image of the image block in the BaseLayer mode. In this embodiment, the index of the reference image of the image block in the BaseLayer mode is designated as the index of the current image. Assigning static corresponding parameters to the motion vector of the image block whose encoding mode is BaseLayer mode refers to specifying the values of the horizontal motion component and the vertical motion component of the motion vector of the image block in BaseLayer mode as 0.

首先,获取P和Q的编码信息,包括编码模式,量化标识,参考图像和运动矢量。First, the encoding information of P and Q is obtained, including encoding mode, quantization flag, reference image and motion vector.

如果P或者Q中至少有一个的编码模式Intra模式,根据预测模式确定BS值。这种情况表明P或者Q的残差可能较大,进过量化操作后容易产生较大的边界效应,BS设定为2。If at least one of P or Q is Intra mode, determine the BS value according to the prediction mode. This situation indicates that the residual error of P or Q may be large, and it is easy to produce a large boundary effect after the over-quantization operation, and BS is set to 2.

在如果P和Q都不是Intra模式编码模式的情况下,当P或者Q中至少有一个的编码模式为BaseLayer模式时,根据预测模式、量化系数和运动信息确定BS值。这种情况表明P和Q都是BaseLayer模式或者一个是BaseLayer模式,另一个是Inter模式。当P和Q都是BaseLayer模式且都没有量化系数时(或者说有0量化系数),表明P和Q具有相似的预测来源和预测效果,不易产生边界效应,BS设定为0。当一个是BaseLayer模式,另一个是Inter模式时,前已述及BaseLayer模式和Inter模式的预测能力相当且好于Intra模式的预测能力,如果P和Q都没有量化系数且具有相同的参考图像且具有较小差别的运动矢量,则BS设定为0;否则设定为1。上述具有较小差别的运动矢量是指运动矢量的x分量和y分量的绝对值小于4。If neither P nor Q is an Intra mode coding mode, when at least one of P or Q has a coding mode of BaseLayer mode, determine the BS value according to the prediction mode, quantization coefficient and motion information. This situation indicates that both P and Q are in BaseLayer mode or one is in BaseLayer mode and the other is in Inter mode. When both P and Q are in BaseLayer mode and have no quantization coefficient (or 0 quantization coefficient), it indicates that P and Q have similar prediction sources and prediction effects, and are not easy to produce boundary effects, and BS is set to 0. When one is BaseLayer mode and the other is Inter mode, as mentioned above, the predictive ability of BaseLayer mode and Inter mode is equivalent and better than that of Intra mode, if both P and Q have no quantized coefficients and have the same reference image and For motion vectors with small differences, BS is set to 0; otherwise it is set to 1. The aforementioned motion vector with a small difference means that the absolute value of the x component and the y component of the motion vector is less than 4.

如果P和Q都是Inter模式时,主要根据运动信息和量化系数确定BS值。当P或者Q有量化系数时,可能存在较弱的边界效应,设置BS为1。否则如果P和Q有不同的参考图像时,设置BS为1。或者它们的运动矢量的x分量(y分量)的绝对值大于等于4,设置BS为1。否则,P和Q在都无量化系数,具有相同的参考图像,具有较小差别的运动矢量的情况下,不易产生边界效应,BS为0。If both P and Q are in Inter mode, the BS value is mainly determined based on motion information and quantization coefficients. When P or Q has quantized coefficients, there may be weak boundary effects, set BS to 1. Otherwise, set BS to 1 if P and Q have different reference images. Or the absolute value of the x component (y component) of their motion vector is greater than or equal to 4, set BS to 1. Otherwise, when P and Q have no quantization coefficients, have the same reference image, and have motion vectors with small differences, boundary effects are not likely to occur, and BS is 0.

以下实施例就实现以上判断的具体判断流程进行详细说明,需要说明的是,具体执行判断的顺序是可以调整的,并不一定严格按照图2所示的顺序,以图2所示方案为例,具体如下:The following embodiments describe in detail the specific judgment process for realizing the above judgments. It should be noted that the order of specific execution of judgments can be adjusted, and does not necessarily follow the order shown in Figure 2. Take the scheme shown in Figure 2 as an example ,details as follows:

201:判断P or Q(P或者Q)是帧内模式?即:判断P或Q是否有一个为Intra模式),如果是,进入207,如果否,进入202;201: Determine whether P or Q (P or Q) is an intra-frame mode? That is: judge whether one of P or Q is Intra mode), if yes, go to 207, if not, go to 202;

202:判断P or Q是基本层模式?即:判断P或Q是否有一个为BaseLayer模式,如果是,进入203;如果否,进入204;202: Determine whether P or Q is the basic layer mode? That is: judge whether one of P or Q is BaseLayer mode, if yes, enter 203; if not, enter 204;

203:判断P&Q都是基本层模式,并且没有量化系数(或者说量化系数为0)?即:判断P和Q是否都是BaseLayer模式并且量化系数为0;如果是,进入209;如果否,进入210;203: Judging that both P&Q are in the basic layer mode, and there is no quantization coefficient (or the quantization coefficient is 0)? That is: judge whether P and Q are both in BaseLayer mode and the quantization coefficient is 0; if yes, go to 209; if not, go to 210;

204:判断P or Q有非零量化系数?即:判断P或Q中是否有非零量化系数,如果是,进入208;如果否,进入205;204: Determine whether P or Q has a non-zero quantization coefficient? That is: judge whether there is a non-zero quantization coefficient in P or Q, if yes, enter 208; if not, enter 205;

205:判断P&Q有不同的ref?即:判断P和Q是否有不同的ref,如果是,进入208;如果否,进入206;205: Judging that P&Q have different refs? That is: judge whether P and Q have different refs, if yes, go to 208; if not, go to 206;

上述ref是用来标识图像块编码时的参考图像信息(reference frame)。上述参考图像信息包含参考图像的预测方向以及参考图像的索引标号。上述参考图像方向包括前向参考、后向参考和双向参考。上述参考图像索引是指参考图像在参考图像列表中的位置。The above ref is used to identify the reference image information (reference frame) when encoding the image block. The above reference image information includes the prediction direction of the reference image and the index number of the reference image. The above reference image directions include forward reference, backward reference and bidirectional reference. The aforementioned reference image index refers to the position of the reference image in the reference image list.

206:判断|MV_Ph-MV_Qh|≥4or|MV_Pv-MV_Qv|≥4是否成立?即:判断P和Q的运动矢量的x分量(或y分量)的绝对值是否大于等于4;如果是,进入208;如果否,进入209;206: Determine whether |MV_Ph-MV_Qh|≥4or|MV_Pv-MV_Qv|≥4 is established? That is: judge whether the absolute value of the x component (or y component) of the motion vectors of P and Q is greater than or equal to 4; if yes, enter 208; if not, enter 209;

该步骤206即为确定相邻图像块相对运动幅度在预定方向上是否大于等于预定值;其中,相邻图像块为P和Q;预定方向为x轴方向,即水平方向,或者y轴方向,即垂直方向;预定值设置为4;需要说明的是,预定值还可以是其它值,例如接近于4的值或者其它值,技术人员可以根据实际需求进行微调,本发明实施例对于其具体的取值不予限定。This step 206 is to determine whether the relative motion amplitude of adjacent image blocks is greater than or equal to a predetermined value in a predetermined direction; wherein, the adjacent image blocks are P and Q; the predetermined direction is the x-axis direction, that is, the horizontal direction, or the y-axis direction, That is, the vertical direction; the predetermined value is set to 4; it should be noted that the predetermined value can also be other values, such as a value close to 4 or other values, and technicians can fine-tune according to actual needs. The value is not limited.

207:赋值操作:BS=2,然后结束。207: Assignment operation: BS=2, then end.

208:赋值操作:BS=1,然后结束。208: Assignment operation: BS=1, then end.

209:赋值操作:BS=0,然后结束。209: Assignment operation: BS=0, then end.

210:将ref和MV(Motion Vector,运动矢量)赋默认值,然后进入211;其中ref在后续实施例中将进行详细说明。210: Assign default values to ref and MV (Motion Vector, motion vector), and then go to 211; ref will be described in detail in subsequent embodiments.

211:确认P or Q是否有非零量化系数,P&Q是否有不同的ref并且P和Q运动矢量相似;如果是,进入209,否则进入208。211: Confirm whether P or Q has non-zero quantization coefficients, whether P&Q has different refs and P and Q motion vectors are similar; if yes, go to 209, otherwise go to 208.

可选方案B,请参阅图3:Option B, see Figure 3:

与HEVC相比,在SHVC的增强层中增加了BaseLayer模式,该模式是将基本层(较低层)的图像上采样后,以相同位置的图像块作为参考单元进行预测,Inter模式是以时间域的图像块进行预测。与Intra模式形成的参考单元相比,BaseLayer模式和Inter模式的参考图像更加接近自然采集图像,具有更强的预测能力。实验证明BaseLayer模式的残差按照Inter模式的残差编码效率更高。总之,从参考单元的形成方式以及大量的实验数据得出,BaseLayer模式的预测能力接近Inter模式,因此,本发明在BS决策过程中,将BaseLayer模式和Inter模式划为一类处理。Compared with HEVC, the BaseLayer mode is added to the enhancement layer of SHVC. This mode is to upsample the image of the base layer (lower layer) and use the image block at the same position as the reference unit for prediction. The Inter mode is based on time domain image blocks for prediction. Compared with the reference unit formed by the Intra mode, the reference images of the BaseLayer mode and the Inter mode are closer to the natural acquisition image and have stronger predictive ability. Experiments have proved that the residuals of BaseLayer mode are more efficiently encoded according to the residuals of Inter mode. In conclusion, from the formation of reference units and a large amount of experimental data, the prediction ability of the BaseLayer mode is close to that of the Inter mode. Therefore, in the BS decision-making process, the present invention classifies the BaseLayer mode and the Inter mode into one category.

上述BaseLayer模式是指利用基本层(较低层)上采样后的同位置图像对预测块信息进行预测的编码模式。上述预测块信息包括对应基本层(较低层)预测块的纹理信息或模式信息或运动信息。The above-mentioned BaseLayer mode refers to a coding mode for predicting prediction block information by using an upsampled image at the same position on the base layer (lower layer). The aforementioned prediction block information includes texture information or mode information or motion information of a corresponding base layer (lower layer) prediction block.

可选方案B中,在BS决策时把BaseLayer模式的预测能力与Inter模式的预测能力划分为一类。具体的BS确定过程如下:In option B, the prediction ability of the BaseLayer mode and the prediction ability of the Inter mode are classified into one category when making BS decisions. The specific BS determination process is as follows:

本部分是关于对可能进行DBF的边界进行BS计算的介绍。描述方便起见,定义垂直边界左边的图像块为P,右边的图像块为Q或者水平边界下边的图像块为P,上边的图像块为Q。设置为第一边界强度、第二边界强度和第三边界强度分别对应BS=0,BS=1,BS=2。在本实施例中BS=0时不进行滤波。对上述编码模式为BaseLayer模式的图像块的参考图像赋值是指对BaseLayer模式图像块的参考图像的预测方向和索引赋值。本实施例指定BaseLayer模式图像块的参考方向为前向参考,参考图图像索引为当前图像前向参考的第一个参考帧对应的索引。对上述编码模式为BaseLayer模式的图像块的运动矢量赋静止对应的参数是指将BaseLayer模式的图像块的运动矢量的水平运动分量和垂直运动分量的值都指定为0。需要说明的是,上述赋值还可以是其它值,本发明对于其具体的取值不予限定。This part is about the introduction of BS calculation on the boundaries of possible DBF. For the convenience of description, define the image block on the left of the vertical boundary as P and the image block on the right as Q or the image block below the horizontal boundary as P and the image block above as Q. Set the first boundary strength, second boundary strength and third boundary strength to correspond to BS=0, BS=1, BS=2 respectively. In this embodiment, no filtering is performed when BS=0. Assigning a value to a reference image of an image block whose encoding mode is the BaseLayer mode refers to assigning a prediction direction and an index to a reference image of an image block in the BaseLayer mode. In this embodiment, the reference direction of the image block in the BaseLayer mode is designated as forward reference, and the reference image index is the index corresponding to the first reference frame of the current image forward reference. Assigning static corresponding parameters to the motion vector of the image block whose encoding mode is BaseLayer mode refers to specifying the values of the horizontal motion component and the vertical motion component of the motion vector of the image block in BaseLayer mode as 0. It should be noted that the above assigned values may also be other values, and the present invention does not limit the specific values.

首先,获取P和Q的编码信息,包括编码模式,量化标识,参考图像和运动矢量。First, the encoding information of P and Q is obtained, including encoding mode, quantization flag, reference image and motion vector.

如果P或者Q中至少有一个的编码模式是Intra模式,根据预测模式确定BS值。这种情况表明P或者Q的残差可能较大,进过量化操作后容易产生较大的边界效应,BS设定为2。If the encoding mode of at least one of P or Q is Intra mode, determine the BS value according to the prediction mode. This situation indicates that the residual error of P or Q may be large, and it is easy to produce a large boundary effect after the over-quantization operation, and BS is set to 2.

如果P或者Q中至少有一个的编码模式是BaseLayer模式,则将编码模式是BaseLayer模式的P或者Q的ref和MV(Motion Vector,运动矢量)赋默认值。具体的赋值可以是:Ref设置成前向参考的第一个参考帧,MV的水平运动分量设置为0,垂直运动分量设置成0。If the encoding mode of at least one of P or Q is the BaseLayer mode, the ref and MV (Motion Vector, motion vector) of P or Q whose encoding mode is the BaseLayer mode are assigned default values. The specific assignment may be: Ref is set to the first reference frame of the forward reference, the horizontal motion component of MV is set to 0, and the vertical motion component is set to 0.

接下来,根据运动信息和量化系数确定BS值,具体如下:Next, determine the BS value according to the motion information and the quantization coefficient, as follows:

当P或者Q有量化系数时,可能存在较弱的边界效应,设置BS为1。When P or Q has quantized coefficients, there may be weak boundary effects, set BS to 1.

否则,如果P或者Q根据不同的参考图像进行预测,容易产生边界,设置BS为1。否则,如果P和Q的运动矢量的x分量(y分量)的绝对值大于等于4,在同一参考图像中运动矢量差别较大,易产生边界效应,设置BS为1。否则,P和Q在都无量化系数,具有相同的参考图像,具有较小差别的运动矢量的情况下,不易产生边界效应,设置BS为0。Otherwise, if P or Q is predicted according to different reference images, it is easy to generate boundaries, set BS to 1. Otherwise, if the absolute value of the x component (y component) of the P and Q motion vectors is greater than or equal to 4, the motion vectors in the same reference image are quite different, and boundary effects are likely to occur, so set BS to 1. Otherwise, when P and Q have no quantization coefficients, have the same reference image, and have motion vectors with small differences, boundary effects are not easy to occur, and BS is set to 0.

以下实施例就实现以上判断的具体判断流程进行详细说明,需要说明的是,具体执行判断的顺序是可以调整的,并不一定严格按照图3所示的顺序,以图3所示方案为例,具体如下:The following embodiments describe in detail the specific judgment process for realizing the above judgments. It should be noted that the order of specific execution of judgments can be adjusted, and does not necessarily follow the order shown in Figure 3. Take the scheme shown in Figure 3 as an example ,details as follows:

301:判断P or Q(P或者Q)是帧内模式?即:判断P或Q是否有一个为Intra模式),如果是,进入307,如果否,进入302;301: Determine whether P or Q (P or Q) is an intra-frame mode? That is: judge whether one of P or Q is Intra mode), if yes, enter 307, if not, enter 302;

302:判断P or Q是基本层模式?即:判断P或Q是否有一个为BaseLayer模式,如果是,进入303;如果否,进入304;302: Determine whether P or Q is the basic layer mode? That is: judge whether one of P or Q is BaseLayer mode, if yes, enter 303; if not, enter 304;

303:将编码模式是BaseLayer模式的P或者Q的ref和MV(MotionVector,运动矢量)赋默认值。具体的赋值可以是:Ref设置成前向参考的第一个参考帧,MV的水平运动分量设置为0(设置为0可以用于表示不运动或静止),垂直运动分量设置成0,然后进入304;303: Assign default values to ref and MV (MotionVector, motion vector) of P or Q whose encoding mode is BaseLayer mode. The specific assignment can be: Ref is set to the first reference frame of the forward reference, the horizontal motion component of MV is set to 0 (setting to 0 can be used to indicate no motion or stillness), the vertical motion component is set to 0, and then enter 304;

304:判断P or Q有非零量化系数?即:判断P或Q中是否有非零量化系数,如果是,进入308;如果否,进入305;304: Determine whether P or Q has a non-zero quantization coefficient? That is: judge whether there is a non-zero quantization coefficient in P or Q, if yes, enter 308; if not, enter 305;

305:判断P&Q有不同的ref?即:判断P和Q是否有不同的ref,如果是,进入308;如果否,进入306;305: Judging that P&Q have different refs? That is: judge whether P and Q have different refs, if yes, go to 308; if not, go to 306;

上述ref是用来标识图像块编码时的参考图像信息(referenceframe)。上述参考图像信息包含参考图像的方向以及参考图像标号。上述参考图像方向包括前向参考、后向参考和双向参考。上述参考图像的索引是指参考图像在参考图像列表中的位置。在后续实施例中,将就其如何得到的进行更详细的说明。The above ref is used to identify the reference image information (reference frame) when encoding the image block. The above reference image information includes the direction of the reference image and the reference image label. The above reference image directions include forward reference, backward reference and bidirectional reference. The above index of the reference picture refers to the position of the reference picture in the reference picture list. In the subsequent embodiments, how to obtain it will be described in more detail.

306:判断|MV_Ph-MV_Qh|≥4or|MV_Pv-MV_Qv|≥4是否成立?即:判断P和Q的运动矢量的x分量(或y分量)的绝对值是否大于等于4;如果是,进入308;如果否,进入309;306: Determine whether |MV_Ph-MV_Qh|≥4or|MV_Pv-MV_Qv|≥4 is established? That is: determine whether the absolute value of the x component (or y component) of the motion vectors of P and Q is greater than or equal to 4; if yes, enter 308; if not, enter 309;

该步骤306即为确定相邻图像块相对运动幅度在预定方向上是否大于等于预定值;其中,相邻图像块为P和Q;预定方向为x轴方向,即水平方向,或者y轴方向,即垂直方向;预定值设置为4;需要说明的是,预定值还可以是其它值,例如接近于4的值或者其它值,技术人员可以根据实际需求进行微调,本发明实施例对于其具体的取值不予限定。This step 306 is to determine whether the relative motion amplitude of adjacent image blocks is greater than or equal to a predetermined value in a predetermined direction; wherein, the adjacent image blocks are P and Q; the predetermined direction is the x-axis direction, that is, the horizontal direction, or the y-axis direction, That is, the vertical direction; the predetermined value is set to 4; it should be noted that the predetermined value can also be other values, such as a value close to 4 or other values, and technicians can fine-tune according to actual needs. The value is not limited.

307:赋值操作:BS=2,然后结束。307: Assignment operation: BS=2, then end.

308:赋值操作:BS=1,然后结束。308: Assignment operation: BS=1, then end.

309:赋值操作:BS=0,然后结束。309: Assignment operation: BS=0, then end.

三、滤波强度判决:3. Judgment of filtering strength:

本方案解决的问题是判断边界是否滤波以及滤波的强度,具体地:根据P和Q的QP值,得到平均QP值Ag_QP,Ag_QP的计算式如下:Avg_QP=((QPp+QPq+1)>>1),其中,“>>”为右移运算符,QPp是P块的量化参数,QPq是Q块的量化参数。根据Avg_QP和BS值,读取阈值β和阈值tc。其中,β和tc是根据Avg_QP和BS推导得到的一组具体数字。如图4所示,在判决过程中,首先得到可能滤波边界两边虚线框内的像素梯度dpi(i=0,3)和dqi(i=0,3),具体的dp0=|P2,0–2*P1,0+P0,0|,dp3=|P2,3–2*P1,3+P0,3|,dq0=|q2,0–2*q1,0+q0,0|,dq3=q2,3–2*q1,3+q0,3|。根据dpi,dqi,β和tc的关系决定是否进行滤波,如果滤波,决定采用强滤波器还是弱滤波器。在滤波强度确定后调用相应的滤波器对边界两侧各三排像素进行滤波处理,达到平滑边界的目的。The problem solved by this solution is to judge whether the boundary is filtered and the strength of the filter. Specifically: according to the QP values of P and Q, the average QP value Ag_QP is obtained. The calculation formula of Ag_QP is as follows: Avg_QP=((QP p +QP q +1) >>1), wherein, ">>" is a right shift operator, QP p is a quantization parameter of P block, and QP q is a quantization parameter of Q block. According to Avg_QP and BS value, read threshold β and threshold t c . Among them, β and t c are a set of specific numbers derived from Avg_QP and BS. As shown in Figure 4, in the decision process, first obtain the pixel gradient dpi (i=0,3) and dqi(i=0,3) in the dotted line box on both sides of the possible filtering boundary, specifically dp0=|P 2,0 –2*P 1,0 +P 0,0 |,dp3=|P 2,3 –2*P 1,3 +P 0,3 |,dq0=|q 2,0 –2*q 1,0 + q 0,0 |, dq3=q 2,3 -2*q 1,3 +q 0,3 |. According to the relationship between dpi, dqi, β and tc , it is decided whether to perform filtering, and if it is filtered, it is decided whether to use a strong filter or a weak filter. After the filter intensity is determined, the corresponding filter is called to filter the three rows of pixels on both sides of the boundary to achieve the purpose of smoothing the boundary.

以上实施例中,阈值β是依据一组Avg_QP对应预设的一组具体值,不同的Avg_QP值分别对应一个β值。确定的Avg_QP对应确定的β值,根据该β值与边界像素梯度的大小关系,决定P和Q的边界是否滤波。In the above embodiments, the threshold β is based on a group of Avg_QP corresponding to a set of preset specific values, and different Avg_QP values correspond to a β value respectively. The determined Avg_QP corresponds to the determined β value, and according to the relationship between the β value and the gradient of the boundary pixel, it is determined whether to filter the boundary between P and Q.

以上实施例中,阈值tc是依据一组Avg_QP对应预设的一组具体值,不同的Avg_QP值分别对应一个tc值。当BS值小于等于1时,依据确定的Avg_QP取得对应确定的tc值,当BS大于1时,依据确定的(Avg_QP+2)值取对应确定的tc值。在确定的Avg_QP和BS下取得对应的β值和tc时,根据该β值和tc值与边界像素梯度的大小关系判断P和Q边界是采用强滤波还是采用弱滤波。In the above embodiments, the threshold tc is based on a group of Avg_QP corresponding to a set of preset specific values, and different Avg_QP values correspond to a tc value respectively. When the BS value is less than or equal to 1, the corresponding determined t c value is obtained according to the determined Avg_QP, and when the BS is greater than 1, the corresponding determined t c value is obtained according to the determined (Avg_QP+2) value. When the corresponding β value and t c are obtained under the determined Avg_QP and BS, judge whether to use strong filtering or weak filtering at the P and Q boundaries according to the relationship between the β value and t c value and the gradient of the boundary pixel.

本发明实施例本方明充分利用图像块的编码模式、运动信息和量化系数,改变了DBF中BS值的确定过程。本发明实施例使BaseLayer模式图像块与Inter模式图像块的滤波强度相一致,当边界两边图像块都采用BaseLayer模式且无量化系数时不进行滤波,BS值设置更加合理,降低了编解码器尤其是解码器的计算复杂度,提高了编码效率。Embodiments of the present invention This invention makes full use of the encoding mode, motion information and quantization coefficients of the image block, and changes the determination process of the BS value in the DBF. In the embodiment of the present invention, the filtering intensity of the BaseLayer mode image block is consistent with that of the Inter mode image block. When the image blocks on both sides of the boundary adopt the BaseLayer mode and have no quantization coefficients, no filtering is performed, and the BS value setting is more reasonable, reducing the cost of the codec. is the computational complexity of the decoder, improving the coding efficiency.

本发明实施例提供了一种边界强度BS确定装置,如图5所示,包括:An embodiment of the present invention provides a boundary strength BS determining device, as shown in FIG. 5, including:

第一边界确定单元501,用于确定去块效应滤波DBF的可能滤波边界;The first boundary determining unit 501 is configured to determine a possible filtering boundary of the deblocking filter DBF;

第一信息获取单元502,用于获取上述第一边界确定单元501确定的可能滤波边界两侧相邻的图像块的编码模式以及编码信息;The first information acquiring unit 502 is configured to acquire the encoding mode and encoding information of the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned first boundary determining unit 501;

第一BS确定单元503,用于当上述第一信息获取单元502获取的相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值。The first BS determination unit 503 is configured to: when the encoding modes of the adjacent image blocks acquired by the first information acquiring unit 502 are not Intra mode, and the encoding modes of the adjacent image blocks include at least one basic layer In the BaseLayer mode, set the boundary strength BS of the above-mentioned possible filtering boundary to different boundary strength values according to the above-mentioned coding information.

本发明实施例,当相邻的图像块的编码模式均不是Intra模式,且相邻的图像块的编码模式中至少包括一个BaseLayer模式,则将可能的滤波边界的边界强度BS不同的边界强度值,BS的设置不再全部设置成相同强度,使BS的设置更加合理,进而提升编码效率。In the embodiment of the present invention, when the encoding modes of adjacent image blocks are not Intra mode, and the encoding modes of adjacent image blocks include at least one BaseLayer mode, the boundary strength values of the possible filtering boundaries BS different boundary strength values , the BS settings are no longer all set to the same strength, which makes the BS settings more reasonable, thereby improving the coding efficiency.

进一步地,上述第一信息获取单元502,具体用于获取上述第一边界确定单元501确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Further, the above-mentioned first information obtaining unit 502 is specifically configured to obtain quantization coefficient identifiers of whether the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned first boundary determination unit 501 have quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值,上述第一BS确定单元503,具体用于若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value, and the above-mentioned first BS determining unit 503 is specifically configured to If the encoding modes of the blocks are all BaseLayer modes and the quantization coefficient identifier indicates that none of the adjacent image blocks have quantization coefficients, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

进一步地,如图6所示,上述第一信息获取单元502,具体用于获取上述编码信息中包括的标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, as shown in FIG. 6, the above-mentioned first information obtaining unit 502 is specifically configured to obtain the quantization coefficient identifier indicating whether the above-mentioned adjacent image block has a quantization coefficient included in the above-mentioned encoding information, and the above-mentioned adjacent image block a reference image, and motion vectors of the aforementioned adjacent image blocks;

上述第一BS确定单元503包括:第一参数设置单元601、第一参数获取单元602以及第一BS确定子单元603;The above-mentioned first BS determination unit 503 includes: a first parameter setting unit 601, a first parameter acquisition unit 602, and a first BS determination subunit 603;

上述第一参数设置单元601,用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;The above-mentioned first parameter setting unit 601 is configured to set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to preset rules and set the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode to be relative to the same reference image in the reference image. The corresponding parameters when the position block is stationary;

上述第一参数获取单元602,用于获取上述第一边界确定单元501确定的可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;The above-mentioned first parameter obtaining unit 602 is configured to obtain the quantization coefficient identification of the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned first boundary determining unit 501, the reference image of the above-mentioned adjacent image blocks, and the above-mentioned adjacent The motion vector of the image block;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;上述第一BS确定子单元603,用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; the above-mentioned first BS determination subunit 603 is configured to if the above-mentioned quantization coefficient identification Indicates that none of the above-mentioned adjacent image blocks have quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is smaller than the preset threshold, then the above-mentioned possible filtering boundary The boundary strength BS is set to the first boundary strength.

进一步地,上述第一BS确定子单元603,还用于若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Further, the first BS determining subunit 603 is further configured to: if the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference image, or the difference between the above-mentioned adjacent image block motion vectors is greater than or equal to a preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

进一步地,上述第一信息获取单元502,还用于获取上述第一边界确定单元501确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Further, the above-mentioned first information obtaining unit 502 is also used to obtain whether the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned first boundary determining unit 501 have quantization coefficient identifiers of quantization coefficients;

上述第一BS确定单元503,具体用于若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above first BS determination unit 503 is specifically configured to set the boundary strength BS of the above possible filtering boundary as the second boundary if the above quantization coefficient identifier indicates that at least one of the above image blocks among the above adjacent image blocks has a quantization coefficient strength.

进一步地,上述第一信息获取单元502,具体用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Further, the above-mentioned first information obtaining unit 502 is specifically configured to set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to preset rules; obtain the reference image of the adjacent image block on both sides of the above-mentioned possible filtering boundary;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;上述第一BS确定单元503,具体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; the above-mentioned first BS determination unit 503 is specifically configured to if Indicating that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have different reference images, then the boundary strength BS of the possible filtering boundary is set as the second boundary strength.

进一步地,如图7所示,上述第一信息获取单元502,还用于获取上述编码信息中包括的上述相邻的图像块的运动向量;Further, as shown in FIG. 7, the above-mentioned first information obtaining unit 502 is further configured to obtain the motion vectors of the above-mentioned adjacent image blocks included in the above-mentioned encoding information;

上述第一BS确定单元503包括:第二参数设置单元701、第二参数获取单元702以及第二BS确定子单元703;The first BS determination unit 503 includes: a second parameter setting unit 701, a second parameter acquisition unit 702, and a second BS determination subunit 703;

上述第二参数设置单元701,用于将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;The second parameter setting unit 701 is configured to set the motion vector of the image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still;

上述第二参数获取单元702,用于获取上述可能滤波边界两侧的相邻的图像块的运动向量;The second parameter acquisition unit 702 is configured to acquire motion vectors of adjacent image blocks on both sides of the possible filtering boundary;

上述第二BS确定子单元703,用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The second BS determining subunit 703 is configured to: if the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the motion vector of the adjacent image blocks If the difference between them is greater than or equal to the preset threshold, then the boundary strength BS of the above possible filtering boundary is set as the second boundary strength.

进一步地,上述第二BS确定子单元703,还用于若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。Further, the second BS determining subunit 703 is further configured to: if the quantization coefficient identifier indicates that there is no quantization coefficient in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the adjacent The difference between the motion vectors of the image blocks is smaller than the preset threshold, then the boundary strength BS of the above possible filtering boundary is set as the first boundary strength.

本发明实施例还提供了一种去块效应的滤波装置,如图8所示,包括:The embodiment of the present invention also provides a filtering device for deblocking effect, as shown in FIG. 8 , including:

第二边界确定单元801,用于确定去块效应滤波DBF的可能滤波边界;The second boundary determining unit 801 is configured to determine a possible filtering boundary of the deblocking filter DBF;

第二信息获取单元802,用于获取上述第二边界确定单元801确定的可能滤波边界两侧相邻的图像块的编码模式以及编码信息;The second information acquiring unit 802 is configured to acquire the encoding mode and encoding information of the adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determining unit 801;

第二BS确定单元803,用于当上述第二信息获取单元802获取的相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值;The second BS determining unit 803 is configured to be used when the encoding modes of the adjacent image blocks acquired by the second information acquiring unit 802 are not Intra mode, and the encoding modes of the adjacent image blocks include at least one basic layer BaseLayer mode, set the boundary strength BS of the above possible filtering boundary to different boundary strength values according to the above encoding information;

阈值获取单元804,用于将上述确定的边界强度BS值作为一个参考因子用于获取第一阈值及第二阈值,上述第一阈值用于确定是否对上述可能的滤波边界进行滤波,上述第二阈值用于确定对需要进行滤波的上述可能的滤波边界进行滤波的滤波强度;The threshold acquisition unit 804 is configured to use the determined boundary strength BS value as a reference factor to acquire a first threshold and a second threshold, the first threshold is used to determine whether to filter the possible filtering boundaries, and the second threshold The threshold is used to determine the filtering strength for filtering the above-mentioned possible filtering boundaries that need to be filtered;

滤波判决单元805,用于按照上述第二边界确定单元801确定的可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和上述第一阈值确定是否需要对上述可能的滤波边界进行滤波;The filtering decision unit 805 is configured to determine whether the above-mentioned possible filtering boundary needs to be determined according to the gradient of pixels within a predetermined range in the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned second boundary determining unit 801 and the above-mentioned first threshold. filtering;

滤波器控制单元806,用于若滤波判决单元805确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并使用所确定滤波器执行对上述需要进行滤波的上述可能的滤波边界进行滤波处理。The filter control unit 806 is configured to, if the filtering decision unit 805 determines that filtering is required, determine the filter for performing filtering according to the relationship between the gradient of pixels within a predetermined range and the second threshold in adjacent image blocks on both sides of the possible filtering boundary, And use the determined filter to perform filtering processing on the above-mentioned possible filtering boundaries that need to be filtered.

进一步地,第二信息获取单元802,具体用于获取上述第二边界确定单元801确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Further, the second information acquiring unit 802 is specifically configured to acquire whether the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned second boundary determining unit 801 have quantization coefficient identifiers of quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;上述第二BS确定单元803,具体用于若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; the above-mentioned second BS determination unit 803 is specifically configured to if the above-mentioned adjacent image If the encoding modes of the blocks are all BaseLayer modes and the quantization coefficient identifier indicates that none of the adjacent image blocks have quantization coefficients, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

进一步地,如图9所示,上述第二信息获取单元802,具体用于获取上述编码信息中包括的标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, as shown in FIG. 9, the above-mentioned second information obtaining unit 802 is specifically configured to obtain the quantization coefficient identifier indicating whether the above-mentioned adjacent image block has a quantization coefficient included in the above-mentioned encoding information, and the above-mentioned adjacent image block a reference image, and motion vectors of the aforementioned adjacent image blocks;

上述第二BS确定单元803包括:第三参数设置单元901、第三参数获取单元902以及第三BS确定子单元903;The second BS determination unit 803 includes: a third parameter setting unit 901, a third parameter acquisition unit 902, and a third BS determination subunit 903;

上述第三参数设置单元901,用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;The above-mentioned third parameter setting unit 901 is configured to set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to preset rules and set the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode to be relative to the same in the reference image. The corresponding parameters when the position block is stationary;

上述第三参数获取单元902,用于获取上述第二边界确定单元801确定的可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;The above-mentioned third parameter obtaining unit 902 is configured to obtain the quantization coefficient identification of the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned second boundary determining unit 801, the reference image of the above-mentioned adjacent image blocks, and the above-mentioned adjacent The motion vector of the image block;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;上述第三BS确定子单元903,用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; the above-mentioned third BS determination subunit 903 is configured to if the above-mentioned quantization coefficient identification Indicates that none of the above-mentioned adjacent image blocks have quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is smaller than the preset threshold, then the above-mentioned possible filtering boundary The boundary strength BS is set to the first boundary strength.

进一步地,上述第三BS确定子单元903,还用于若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Further, the third BS determining subunit 903 is further configured to if the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference image, or the difference between the above-mentioned adjacent image block motion vectors is greater than or equal to a preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

进一步地,上述第二信息获取单元802,具体用于获取上述第二边界确定单元801确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Further, the above-mentioned second information obtaining unit 802 is specifically configured to obtain whether the adjacent image blocks on both sides of the possible filtering boundary determined by the above-mentioned second boundary determining unit 801 have quantization coefficient identifiers of quantization coefficients;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;上述第二BS确定单元803,具体用于若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; the above-mentioned second BS determining unit 803 is specifically configured to if the above-mentioned quantization coefficient identification Indicating that at least one of the adjacent image blocks has a quantization coefficient, then setting the boundary strength BS of the possible filtering boundary as the second boundary strength.

进一步地,上述第二信息获取单元802,还用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Further, the above-mentioned second information obtaining unit 802 is also used to set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to the preset rule; obtain the reference image of the adjacent image block on both sides of the above-mentioned possible filtering boundary;

上述第二BS确定单元803,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The second BS determination unit 803 is further configured to set the boundaries of the possible filtering boundaries to The strength BS is set to the second boundary strength.

进一步地,如图10所示,上述第额信息获取单元,还用于获取上述编码信息中包括的上述相邻的图像块的运动向量;Further, as shown in FIG. 10, the above-mentioned first information obtaining unit is further configured to obtain the motion vector of the above-mentioned adjacent image block included in the above-mentioned encoding information;

上述第二BS确定单元803包括:第四参数设置单元1001、第四参数获取单元1002以及第四BS确定子单元1003;The second BS determination unit 803 includes: a fourth parameter setting unit 1001, a fourth parameter acquisition unit 1002, and a fourth BS determination subunit 1003;

上述第四参数设置单元1001,用于将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;The above-mentioned fourth parameter setting unit 1001 is configured to set the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still;

上述第四参数获取单元1002,用于获取上述可能滤波边界两侧的相邻的图像块的运动向量;The fourth parameter acquisition unit 1002 is configured to acquire motion vectors of adjacent image blocks on both sides of the possible filtering boundary;

上述第四BS确定子单元1003,用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The fourth BS determining subunit 1003 is configured to: if the quantization coefficient flag indicates that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the motion vector of the adjacent image blocks If the difference between them is greater than or equal to the preset threshold, then the boundary strength BS of the above possible filtering boundary is set as the second boundary strength.

进一步地,上述第四BS确定子单元1003,还用于若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。Further, the fourth BS determination subunit 1003 is further configured to if the quantization coefficient identifier indicates that there is no quantization coefficient in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the adjacent The difference between the motion vectors of the image blocks is smaller than the preset threshold, then the boundary strength BS of the above possible filtering boundary is set as the first boundary strength.

本发明实施例还提供了另一种边界强度BS确定设备,如图11所示,包括:接收设备1101、发送设备1102、处理器1104以及存储设备1103;The embodiment of the present invention also provides another boundary strength BS determination device, as shown in FIG. 11 , including: a receiving device 1101, a sending device 1102, a processor 1104, and a storage device 1103;

其中,上述处理器1104,用于确定去块效应滤波DBF的可能滤波边界;Wherein, the above-mentioned processor 1104 is configured to determine a possible filtering boundary of the deblocking filter DBF;

获取上述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

当上述相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值。When the encoding modes of the above-mentioned adjacent image blocks are not Intra mode, and the encoding modes of the above-mentioned adjacent image blocks include at least one base layer BaseLayer mode, then according to the above-mentioned encoding information, the boundary strength of the above-mentioned possible filtering boundary BS is set to different boundary strength values.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient;

对应,上述处理器1104用于获取上述可能滤波边界两侧相邻的图像块的编码信息;上述处理器1104,用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1104 is used to obtain the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1104 is used to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficients logo;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度设置为不同的边界强度值包括:具体用于若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1104 is configured to convert the above-mentioned possible Setting the boundary strength of the filtering boundary to different boundary strength values includes: if the encoding modes of the above-mentioned adjacent image blocks are both BaseLayer mode and the quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, then the above-mentioned possible The boundary strength BS of the filter boundary is set to the first boundary strength.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, if the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

对应,上述处理器1104具体用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1104,还用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Correspondingly, the above-mentioned processor 1104 is specifically used to obtain the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1104 is also used to set the encoding mode as the reference of the above-mentioned image blocks in the BaseLayer mode according to preset rules. Image and the motion vector of the above-mentioned image block whose encoding mode is BaseLayer mode is set as the parameter corresponding to when the block at the same position in the reference image is still;

获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the above-mentioned possible filtering boundary, reference images of the above-mentioned adjacent image blocks, and motion vectors of the above-mentioned adjacent image blocks;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1104,具体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1104 is configured to convert the above-mentioned possible Filtering different boundary strength values of the boundary strength BS of the boundary; the above-mentioned processor 1104 is specifically configured to if the above-mentioned quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, And the difference between the motion vectors of the adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

进一步地,对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1104,还用于若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Further, correspondingly, the above-mentioned processor 1104 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strength values according to the above-mentioned coding information; At least one of the aforementioned image blocks in the block has a quantization coefficient, or the aforementioned adjacent image blocks have different reference images, or the difference between the aforementioned adjacent image block motion vectors is greater than or equal to the preset threshold, then the aforementioned possible The boundary strength BS of the filtered boundary is set to the second boundary strength.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient;

对应,上述处理器1104用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1104,还用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1104 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1104 is also used to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficients Quantization coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1104,具体用于若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1104 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the processor 1104 is specifically configured to set the possible filtering boundary The boundary strength BS is set to the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的参考图像:Further, if the above encoding information also includes reference images of the above adjacent image blocks:

对应,上述处理器1104用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1104,还用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Correspondingly, the processor 1104 is used to obtain the encoding information of the adjacent image blocks on both sides of the possible filtering boundary; the processor 1104 is also used to set the reference image of the image block whose encoding mode is BaseLayer mode according to the preset rules ; Obtain reference images of adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1104,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1104 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strength values according to the above-mentioned encoding information; quantization coefficients, and the above-mentioned adjacent image blocks have different reference images, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的运动向量;Further, if the above coding information also includes the motion vector of the above adjacent image block;

对应,上述处理器1104用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1104,还用于将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量;Correspondingly, the above-mentioned processor 1104 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1104 is also used to set the motion vector of the above-mentioned image block whose coding mode is BaseLayer mode to be relative to The parameters corresponding to when the block at the same position in the reference image is still; obtaining the motion vectors of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1104,具体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1104 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strengths BS according to the above-mentioned encoding information; quantized coefficients, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is greater than or equal to the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set to Second boundary strength.

进一步地,对应,上述处理器1104用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1104,还用于若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。Further, correspondingly, the above-mentioned processor 1104 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strength values according to the above-mentioned coding information; There is no quantization coefficient in any block, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is Set to the first boundary strength.

本发明实施例还提供了一种去块效应的滤波设备,如图12所示,包括:接收设备1201、发送设备1202、处理器1204以及存储设备1203;The embodiment of the present invention also provides a deblocking filter device, as shown in FIG. 12 , including: a receiving device 1201, a sending device 1202, a processor 1204, and a storage device 1203;

其中,处理器1204,用于确定去块效应滤波DBF的可能滤波边界;Wherein, the processor 1204 is configured to determine possible filtering boundaries of the deblocking filter DBF;

获取上述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

当上述相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值;When the encoding modes of the above-mentioned adjacent image blocks are not Intra mode, and the encoding modes of the above-mentioned adjacent image blocks include at least one base layer BaseLayer mode, then according to the above-mentioned encoding information, the boundary strength of the above-mentioned possible filtering boundary BS set to different border strength values;

将上述确定的边界强度BS值作为一个参考因子用于获取第一阈值及第二阈值,上述第一阈值用于确定是否对上述可能的滤波边界进行滤波,上述第二阈值用于确定对需要进行滤波的上述可能的滤波边界进行滤波的滤波强度;The above-mentioned determined boundary strength BS value is used as a reference factor to obtain the first threshold and the second threshold, the above-mentioned first threshold is used to determine whether to filter the above-mentioned possible filtering boundary, and the above-mentioned second threshold is used to determine the need to filter The filtering strength of the above-mentioned possible filtering boundaries for filtering;

按照上述可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和上述第一阈值确定是否需要对上述可能的滤波边界进行滤波;Determine whether the above-mentioned possible filtering boundary needs to be filtered according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the above-mentioned possible filtering boundary and the above-mentioned first threshold;

若确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并指示所确定滤波器执行对上述需要进行滤波的上述可能的滤波边界进行滤波处理。If it is determined that filtering is required, the filter for performing filtering is determined according to the relationship between the gradient of pixels within a predetermined range and the second threshold value in adjacent image blocks on both sides of the possible filtering boundary, and the determined filter is instructed to perform filtering for the above-mentioned needs The above possible filtering boundaries are filtered.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient;

对应,上述处理器1204用于获取上述可能滤波边界两侧相邻的图像块的编码信息;上述处理器1204,还用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1204 is used to obtain the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1204 is also used to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficient coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,具体用于若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1204 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the above-mentioned processor 1204 is specifically configured to if the encoding modes of the above-mentioned adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, then The boundary strength BS of the aforementioned possible filter boundaries is set as the first boundary strength.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, if the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

对应,上述处理器1204用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1204,具体于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Correspondingly, the above-mentioned processor 1204 is used to obtain the coding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1204 is specifically configured to set the coding mode as the reference image of the above-mentioned image block in the BaseLayer mode according to the preset rules and The motion vector of the above-mentioned image block whose above-mentioned encoding mode is BaseLayer mode is set as the parameter corresponding to when the block at the same position in the reference image is stationary;

获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the above-mentioned possible filtering boundary, reference images of the above-mentioned adjacent image blocks, and motion vectors of the above-mentioned adjacent image blocks;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,具体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1204 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the above-mentioned processor 1204 is specifically configured to if the above-mentioned quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, And the difference between the motion vectors of the adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

进一步地,对应上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,还用于若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Further, corresponding to the above-mentioned processor 1204, which is used to set the boundary strength values of the above-mentioned possible filtering boundaries according to the above-mentioned encoding information; At least one of the above-mentioned image blocks has a quantization coefficient, or the above-mentioned adjacent image blocks have different reference images, or the difference between the motion vectors of the above-mentioned adjacent image blocks is greater than or equal to the preset threshold, then the above-mentioned possible filtering The border strength BS of the border is set to the second border strength.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient;

对应,上述处理器1204用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1204,具体用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1204 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1204 is specifically used to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficients Quantization coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,具体用于若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1204 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the processor 1204 is specifically configured to: if the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, the above possible filtering boundary The boundary strength BS is set to the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的参考图像:Further, if the above encoding information also includes reference images of the above adjacent image blocks:

对应,上述处理器1204用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1204,还用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Correspondingly, the above-mentioned processor 1204 is used to obtain the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1204 is also used to set the reference image of the above-mentioned image block whose encoding mode is BaseLayer mode according to the preset rules ; Obtain reference images of adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1204 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strengths BS according to the above-mentioned encoding information; quantization coefficients, and the above-mentioned adjacent image blocks have different reference images, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的运动向量;Further, if the above coding information also includes the motion vector of the above adjacent image block;

对应,上述处理器1204用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1204,还用于将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量;Correspondingly, the above-mentioned processor 1204 is used to acquire the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1204 is also used to set the motion vector of the above-mentioned image block whose coding mode is BaseLayer The parameters corresponding to when the block at the same position in the reference image is still; obtaining the motion vectors of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1204 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strengths BS according to the above-mentioned encoding information; quantized coefficients, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is greater than or equal to the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set to Second boundary strength.

进一步地,对应上述处理器1204用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1204,还用于若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。Further, corresponding to the above-mentioned processor 1204, which is used to set the boundary strength values of the above-mentioned possible filtering boundaries according to the above-mentioned encoding information; There are no quantization coefficients in the above-mentioned adjacent image blocks, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set to is the first boundary strength.

图13示出了本发明实施例提供的边界强度BS确定装置或去块效应的滤波装置的结构,并且以终端为例的结构,本发明实施提供的终端可以用于实施本发明实施提供的方法,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。Figure 13 shows the structure of the boundary strength BS determination device or the deblocking filter device provided by the embodiment of the present invention, and the structure of the terminal is taken as an example, the terminal provided by the implementation of the present invention can be used to implement the method provided by the implementation of the present invention , for ease of description, only the parts related to the embodiments of the present invention are shown, and for specific technical details not disclosed, please refer to the method part of the embodiments of the present invention.

该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等终端设备,以终端为手机为例,图13示出的是与本发明实施例提供的终端相关的手机1300的部分结构的框图。参考图13,手机1300包括RF(Radio Frequency,射频)电路1310、存储器1320、输入单元1330、显示单元1340、传感器1350、音频电路1360、WiFi(wirelessdelity,无线保真)模块1370、处理器1380、以及电源1390等部件。本领域技术人员可以理解,图13中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The terminal can be a terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales, a sales terminal), a vehicle-mounted computer, etc. Taking the terminal as a mobile phone as an example, FIG. 13 shows A block diagram of a partial structure of the mobile phone 1300 related to the terminal provided by the embodiment of the present invention. Referring to FIG. 13 , the mobile phone 1300 includes an RF (Radio Frequency, radio frequency) circuit 1310, a memory 1320, an input unit 1330, a display unit 1340, a sensor 1350, an audio circuit 1360, a WiFi (wirelessdelity, wireless fidelity) module 1370, a processor 1380, And power supply 1390 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 13 does not constitute a limitation to the mobile phone, and may include more or less components than shown in the figure, or combine some components, or arrange different components.

下面结合图13对手机1300的各个构成部件进行具体的介绍:The components of the mobile phone 1300 are specifically introduced below in conjunction with FIG. 13 :

RF电路1310可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1380处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路1310还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System ofMobilecommunication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(WidebandCode Division Multiple Access,宽带码分多址)、LTE(LongTerm Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。The RF circuit 1310 can be used for sending and receiving information or receiving and sending signals during a call. In particular, after receiving the downlink information from the base station, it is processed by the processor 1380; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, an LNA (Low Noise Amplifier, low noise amplifier), a duplexer, and the like. In addition, RF circuitry 1310 may also communicate with networks and other devices via wireless communications. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, Global System for Mobile Communication), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, code division Multiple access), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), LTE (LongTerm Evolution, long-term evolution), email, SMS (Short Messaging Service, short message service), etc.

存储器1320可用于存储软件程序以及模块,处理器1380通过运行存储在存储器1320的软件程序以及模块,从而执行手机1300的各种功能应用以及数据处理。存储器1320可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机1300的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1320可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1320 can be used to store software programs and modules, and the processor 1380 executes various functional applications and data processing of the mobile phone 1300 by running the software programs and modules stored in the memory 1320 . Memory 1320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); The data created by the use of the mobile phone 1300 (such as audio data, phone book, etc.) and the like. In addition, the memory 1320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

输入单元1330可用于接收输入的数字或字符信息,以及产生与手机1300的用户设置以及功能控制有关的键信号输入。具体地,输入单元1330可包括触控面板1331以及其他输入设备1332。触控面板1331,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1331上或在触控面板1331附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1331可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1380,并能接收处理器1380发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1331。除了触控面板1331,输入单元1330还可以包括其他输入设备1332。具体地,其他输入设备1332可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1330 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile phone 1300 . Specifically, the input unit 1330 may include a touch panel 1331 and other input devices 1332 . The touch panel 1331, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 1331 or near the touch panel 1331). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 1331 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 1380, and can receive and execute commands sent by the processor 1380. In addition, the touch panel 1331 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1331 , the input unit 1330 may also include other input devices 1332 . Specifically, other input devices 1332 may include but not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, and the like.

显示单元1340可用于显示由用户输入的信息或提供给用户的信息以及手机1300的各种菜单。显示单元1340可包括显示面板1341,可选的,可以采用LCD(Liquid CrystalDisplay,液晶显示器)、OLED(Organic Light-EmittingDiode,有机发光二极管)等形式来配置显示面板1341。进一步的,触控面板1331可覆盖显示面板1341,当触控面板1331检测到在其上或附近的触摸操作后,传送给处理器1380以确定触摸事件的类型,随后处理器1380根据触摸事件的类型在显示面板1341上提供相应的视觉输出。虽然在图13中,触控面板1331与显示面板1341是作为两个独立的部件来实现手机1300的输入和输入功能,但是在某些实施例中,可以将触控面板1331与显示面板1341集成而实现手机1300的输入和输出功能。The display unit 1340 may be used to display information input by or provided to the user and various menus of the mobile phone 1300 . The display unit 1340 may include a display panel 1341. Optionally, the display panel 1341 may be configured in the form of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode), and the like. Furthermore, the touch panel 1331 can cover the display panel 1341, and when the touch panel 1331 detects a touch operation on or near it, it sends it to the processor 1380 to determine the type of the touch event, and then the processor 1380 determines the type of the touch event according to the The type provides a corresponding visual output on the display panel 1341 . Although in FIG. 13, the touch panel 1331 and the display panel 1341 are used as two independent components to realize the input and input functions of the mobile phone 1300, in some embodiments, the touch panel 1331 and the display panel 1341 can be integrated. And the input and output functions of the mobile phone 1300 are realized.

手机1300还可包括至少一种传感器1350,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1341的亮度,接近传感器可在手机1300移动到耳边时,关闭显示面板1341和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机1300还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Cell phone 1300 may also include at least one sensor 1350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1341 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1341 and the display panel 1341 when the mobile phone 1300 is moved to the ear. / or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the posture of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Let me repeat.

音频电路1360、扬声器1361,传声器1362可提供用户与手机1300之间的音频接口。音频电路1360可将接收到的音频数据转换后的电信号,传输到扬声器1361,由扬声器1361转换为声音信号输出;另一方面,传声器1362将收集的声音信号转换为电信号,由音频电路1360接收后转换为音频数据,再将音频数据输出处理器1380处理后,经RF电路1310以发送给比如另一手机,或者将音频数据输出至存储器1320以便进一步处理。The audio circuit 1360 , the speaker 1361 and the microphone 1362 can provide an audio interface between the user and the mobile phone 1300 . The audio circuit 1360 can transmit the electrical signal converted from the received audio data to the speaker 1361, and the speaker 1361 converts it into an audio signal for output; After being received, it is converted into audio data, and then the audio data is processed by the output processor 1380, and then sent to another mobile phone through the RF circuit 1310, or the audio data is output to the memory 1320 for further processing.

WiFi属于短距离无线传输技术,手机1300通过WiFi模块1370可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图13示出了WiFi模块1370,但是可以理解的是,其并不属于手机1300的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone 1300 can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1370, which provides users with wireless broadband Internet access. Although FIG. 13 shows a WiFi module 1370, it can be understood that it is not an essential component of the mobile phone 1300, and can be completely omitted as required without changing the essence of the invention.

处理器1380是手机1300的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1320内的软件程序和/或模块,以及调用存储在存储器1320内的数据,执行手机1300的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1380可包括一个或多个处理单元;优选的,处理器1380可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1380中。The processor 1380 is the control center of the mobile phone 1300, using various interfaces and lines to connect various parts of the entire mobile phone, by running or executing software programs and/or modules stored in the memory 1320, and calling data stored in the memory 1320, Execute various functions and process data of the mobile phone 1300, so as to monitor the mobile phone as a whole. Optionally, the processor 1380 may include one or more processing units; preferably, the processor 1380 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1380 .

手机1300还包括给各个部件供电的电源1390(比如电池),优选的,电源可以通过电源管理系统与处理器1380逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 1300 also includes a power supply 1390 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1380 through a power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system.

尽管未示出,手机1300还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone 1300 may also include a camera, a Bluetooth module, etc., which will not be repeated here.

在本发明实施例中,该终端所包括的处理器1380还具有如下功能:In the embodiment of the present invention, the processor 1380 included in the terminal also has the following functions:

上述处理器1304,用于确定去块效应滤波DBF的可能滤波边界;The above-mentioned processor 1304 is configured to determine a possible filtering boundary of the deblocking filter DBF;

获取上述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

当上述相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值。When the encoding modes of the above-mentioned adjacent image blocks are not Intra mode, and the encoding modes of the above-mentioned adjacent image blocks include at least one base layer BaseLayer mode, then according to the above-mentioned encoding information, the boundary strength of the above-mentioned possible filtering boundary BS is set to different boundary strength values.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient;

对应,上述处理器1304用于获取上述可能滤波边界两侧相邻的图像块的编码信息;上述处理器1304,具体用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1304 is used to obtain the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is specifically used to obtain the quantization coefficient coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值,对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值包括:具体用于若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value. Correspondingly, the above-mentioned processor 1304 is configured to convert the above-mentioned possible The different boundary strength values of the boundary strength BS of the filtering boundary include: if the encoding modes of the above-mentioned adjacent image blocks are both BaseLayer mode and the quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, then the above-mentioned possible The boundary strength BS of the filtered boundary is set to the first boundary strength.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, if the encoding information includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,具体用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Correspondingly, the above-mentioned processor 1304 is used to acquire the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is specifically used to set the coding mode to the reference image of the above-mentioned image block in BaseLayer mode according to preset rules And the motion vector of the above-mentioned image block of the above-mentioned encoding mode being BaseLayer mode is set as the parameter corresponding to when the block at the same position in the reference image is stationary;

获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the above-mentioned possible filtering boundary, reference images of the above-mentioned adjacent image blocks, and motion vectors of the above-mentioned adjacent image blocks;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值,对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value. Correspondingly, the above-mentioned processor 1304 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the above-mentioned processor 1304 is specifically configured to if the above-mentioned quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, And the difference between the motion vectors of the adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

进一步地,对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Further, correspondingly, the above-mentioned processor 1304 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strength values according to the above-mentioned encoding information; At least one of the aforementioned image blocks in the block has a quantization coefficient, or the aforementioned adjacent image blocks have different reference images, or the difference between the aforementioned adjacent image block motion vectors is greater than or equal to the preset threshold, then the aforementioned possible The boundary strength BS of the filtered boundary is set to the second boundary strength.

进一步地,若上述编码信息包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information includes a quantization coefficient identifier marking whether the above-mentioned adjacent image block has a quantization coefficient;

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,具体用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1304 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is specifically used to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficients Quantization coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1304 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the processor 1304 is specifically configured to set the possible filtering boundary The boundary strength BS is set to the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的参考图像:Further, if the above encoding information also includes reference images of the above adjacent image blocks:

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,还用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Correspondingly, the above-mentioned processor 1304 is used to acquire the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is also used to set the coding mode as the reference image of the above-mentioned image block in BaseLayer mode according to the preset rules ; Obtain reference images of adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1304 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strengths BS according to the above-mentioned encoding information; quantization coefficients, and the above-mentioned adjacent image blocks have different reference images, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的运动向量;Further, if the above coding information also includes the motion vector of the above adjacent image block;

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,还用于将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量;Correspondingly, the above-mentioned processor 1304 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is also used to set the motion vector of the above-mentioned image block whose coding mode is BaseLayer mode to be relative to The parameters corresponding to when the block at the same position in the reference image is still; obtaining the motion vectors of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,还体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1304 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strength values according to the above-mentioned coding information; There is no quantization coefficient, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the above-mentioned adjacent image block motion vectors is greater than or equal to the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set to is the second boundary strength.

进一步地,对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,还用于若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。Further, correspondingly, the above-mentioned processor 1304 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strength values according to the above-mentioned encoding information; There is no quantization coefficient in any block, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is Set to the first boundary strength.

若上述手机作为去块效应的滤波设备,在本发明实施例中,该终端所包括的处理器1380还具有如下功能:If the above-mentioned mobile phone is used as a filtering device for deblocking, in the embodiment of the present invention, the processor 1380 included in the terminal also has the following functions:

上述处理器1304,用于确定去块效应滤波DBF的可能滤波边界;The above-mentioned processor 1304 is configured to determine a possible filtering boundary of the deblocking filter DBF;

获取上述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

当上述相邻的图像块的编码模式均不是帧内Intra模式,且上述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据上述编码信息将上述可能的滤波边界的边界强度BS设置为不同的边界强度值;When the encoding modes of the above-mentioned adjacent image blocks are not Intra mode, and the encoding modes of the above-mentioned adjacent image blocks include at least one base layer BaseLayer mode, then according to the above-mentioned encoding information, the boundary strength of the above-mentioned possible filtering boundary BS set to different border strength values;

将上述确定的BS作为一个参考因子用于获取第一阈值及第二阈值,上述第一阈值用于确定是否对上述可能的滤波边界进行滤波,上述第二阈值用于确定对需要进行滤波的上述可能的滤波边界进行滤波的滤波强度;The above-mentioned determined BS is used as a reference factor to obtain a first threshold and a second threshold, the above-mentioned first threshold is used to determine whether to filter the above-mentioned possible filtering boundaries, and the above-mentioned second threshold is used to determine the above-mentioned The filtering strength for filtering on possible filtering boundaries;

按照上述可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和上述第一阈值确定是否需要对上述可能的滤波边界进行滤波;Determine whether the above-mentioned possible filtering boundary needs to be filtered according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the above-mentioned possible filtering boundary and the above-mentioned first threshold;

若确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并指示所确定滤波器执行对上述需要进行滤波的上述可能的滤波边界进行滤波处理。If it is determined that filtering is required, the filter for performing filtering is determined according to the relationship between the gradient of pixels within a predetermined range and the second threshold value in adjacent image blocks on both sides of the possible filtering boundary, and the determined filter is instructed to perform filtering for the above-mentioned needs The above possible filtering boundaries are filtered.

进一步地,若上述编码信息还包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information also includes a quantization coefficient identification marking whether the above-mentioned adjacent image blocks have quantization coefficients;

对应,上述处理器1304用于获取上述可能滤波边界两侧相邻的图像块的编码信息;上述处理器1304,具体用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1304 is used to obtain the encoding information of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is specifically used to obtain the quantization coefficient coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示上述相邻的图像块均无量化系数,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1304 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the above-mentioned processor 1304 is specifically configured to if the encoding modes of the above-mentioned adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, then The boundary strength BS of the aforementioned possible filter boundaries is set as the first boundary strength.

进一步地,若上述编码信息还包括标记上述相邻的图像块是否有量化系数的量化系数标识,上述相邻的图像块的参考图像,以及上述相邻的图像块的运动向量;Further, if the encoding information further includes a quantization coefficient identifier marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and a motion vector of the adjacent image block;

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,具体用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像并且将上述编码模式为BaseLayer模式的上述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Correspondingly, the above-mentioned processor 1304 is used to acquire the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is specifically used to set the coding mode to the reference image of the above-mentioned image block in BaseLayer mode according to preset rules And the motion vector of the above-mentioned image block of the above-mentioned encoding mode being BaseLayer mode is set as the parameter corresponding to when the block at the same position in the reference image is stationary;

获取上述可能滤波边界两侧相邻的图像块的量化系数标识,以及上述相邻的图像块的参考图像,以及上述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the above-mentioned possible filtering boundary, reference images of the above-mentioned adjacent image blocks, and motion vectors of the above-mentioned adjacent image blocks;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有相同的参考图像,并且上述相邻的图像块的运动矢量的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1304 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the above-mentioned processor 1304 is specifically configured to if the above-mentioned quantization coefficient identifier indicates that the above-mentioned adjacent image blocks have no quantization coefficients, and the above-mentioned adjacent image blocks have the same reference image, And the difference between the motion vectors of the adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the possible filtering boundary is set as the first boundary strength.

进一步地,对应上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述量化系数标识指示上述相邻的图像块中至少有一个上述的图像块有量化系数,或上述相邻的图像块具有不同的参考图像,或者上述相邻的图像块运动矢量的差值大于或等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Further, corresponding to the above-mentioned processor 1304, which is used to set the boundary strength values of the above-mentioned possible filtering boundaries according to the above-mentioned encoding information; At least one of the above-mentioned image blocks has a quantization coefficient, or the above-mentioned adjacent image blocks have different reference images, or the difference between the motion vectors of the above-mentioned adjacent image blocks is greater than or equal to the preset threshold, then the above-mentioned possible filtering The border strength BS of the border is set to the second border strength.

进一步地,若上述编码信息还包括标记上述相邻的图像块是否有量化系数的量化系数标识;Further, if the above-mentioned encoding information also includes a quantization coefficient identification marking whether the above-mentioned adjacent image blocks have quantization coefficients;

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,具体用于获取上述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Correspondingly, the above-mentioned processor 1304 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is specifically used to obtain whether the adjacent image blocks on both sides of the above-mentioned possible filtering boundary have quantization coefficients Quantization coefficient identification;

上述不同的边界强度值包括第一边界强度值和第二边界强度值,上述第二边界强度值大于上述的第一边界强度值;对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,具体用于若上述量化系数标识指示上述相邻的图像块中至少一个上述的图像块有量化系数,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。The above-mentioned different boundary strength values include a first boundary strength value and a second boundary strength value, and the above-mentioned second boundary strength value is greater than the above-mentioned first boundary strength value; correspondingly, the above-mentioned processor 1304 is configured to convert the above-mentioned possible The boundary strength BS of the filtering boundary is different from the boundary strength value; the processor 1304 is specifically configured to set the possible filtering boundary The boundary strength BS is set to the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的参考图像:Further, if the above encoding information also includes reference images of the above adjacent image blocks:

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,还用于根据预设规则设置编码模式为BaseLayer模式的上述图像块的参考图像;获取上述可能滤波边界两侧的相邻的图像块的参考图像;Correspondingly, the above-mentioned processor 1304 is used to acquire the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is also used to set the coding mode as the reference image of the above-mentioned image block in BaseLayer mode according to the preset rules ; Obtain reference images of adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块具有不同的参考图像,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1304 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strengths BS according to the above-mentioned encoding information; quantization coefficients, and the above-mentioned adjacent image blocks have different reference images, then the boundary strength BS of the above-mentioned possible filtering boundary is set as the second boundary strength.

进一步地,若上述编码信息还包括上述相邻的图像块的运动向量;Further, if the above coding information also includes the motion vector of the above adjacent image block;

对应,上述处理器1304用于获取上述可能滤波边界两侧的相邻的图像块的编码信息;上述处理器1304,还用于将上述编码模式为BaseLayer模式的上述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取上述可能滤波边界两侧的相邻的图像块的运动向量;Correspondingly, the above-mentioned processor 1304 is used to obtain the coding information of adjacent image blocks on both sides of the above-mentioned possible filtering boundary; the above-mentioned processor 1304 is also used to set the motion vector of the above-mentioned image block whose coding mode is BaseLayer mode to be relative to The parameters corresponding to when the block at the same position in the reference image is still; obtaining the motion vectors of the adjacent image blocks on both sides of the above-mentioned possible filtering boundary;

对应,上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,还用于若上述量化系数标识指示上述相邻的图像块均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第二边界强度。Correspondingly, the above-mentioned processor 1304 is configured to set the boundary strength values of the above-mentioned possible filtering boundaries to different boundary strengths BS according to the above-mentioned encoding information; quantized coefficients, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is greater than or equal to the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set to Second boundary strength.

进一步地,对应上述处理器1304用于根据上述编码信息将上述可能的滤波边界的边界强度BS不同的边界强度值;上述处理器1304,还用于若上述量化系数标识指示上述相邻的图像块中均无量化系数,并且上述相邻的图像块有相同的参考图像,并且上述相邻的图像块运动矢量之间的差值小于预设阈值,则将上述可能的滤波边界的边界强度BS设置为第一边界强度。Further, corresponding to the above-mentioned processor 1304, which is used to set the boundary strength values of the above-mentioned possible filtering boundaries according to the above-mentioned encoding information; There are no quantization coefficients in the above-mentioned adjacent image blocks, and the above-mentioned adjacent image blocks have the same reference image, and the difference between the motion vectors of the above-mentioned adjacent image blocks is smaller than the preset threshold, then the boundary strength BS of the above-mentioned possible filtering boundary is set to is the first boundary strength.

值得注意的是,上述装置实施例中,所包括的各个单元只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。It is worth noting that in the above-mentioned device embodiments, the units included are only divided according to functional logic, but are not limited to the above-mentioned divisions, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit It is only for the convenience of distinguishing each other, and is not used to limit the protection scope of the present invention.

另外,本领域普通技术人员可以理解实现上述各方法实施例中的全部或部分步骤是可以通过程序来指令相关的硬件完成,相应的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。In addition, those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned method embodiments can be completed by instructing related hardware through programs, and the corresponding programs can be stored in a computer-readable storage medium. The storage medium can be read-only memory, magnetic disk or optical disk and so on.

以上仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明实施例揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above are only preferred specific implementation modes of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present invention. , should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (36)

1.一种边界强度确定方法,其特征在于,包括:1. A boundary strength determination method, characterized in that, comprising: 确定去块效应滤波DBF的可能滤波边界;Determining the possible filtering boundaries of the deblocking filter DBF; 获取所述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the possible filtering boundary; 当所述相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度。When the encoding modes of the adjacent image blocks are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one base layer BaseLayer mode, then according to the encoding information, the possible filtering The border strength of the border is set to a different border strength. 2.根据权利要求1所述的方法,其特征在于,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;2. The method according to claim 1, wherein the encoding information includes a quantization coefficient identification marking whether the adjacent image block has a quantization coefficient; 所述获取所述可能滤波边界两侧相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes: 获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度,所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度具体包括:The different boundary strengths include a first boundary strength and a second boundary strength, the second boundary strength is greater than the first boundary strength, and the boundary strength of the possible filtering boundary is set according to the encoding information Specifics for different boundary strengths include: 若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度设置为第一边界强度。If the encoding modes of the adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that none of the adjacent image blocks have quantization coefficients, then set the boundary strength of the possible filtering boundary as the first boundary strength. 3.根据权利要求1所述的方法,其特征在于,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;3. The method according to claim 1, wherein the encoding information includes a quantization coefficient identification marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and the The motion vector of the adjacent image block; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes: 根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Set the reference image of the image block whose encoding mode is the BaseLayer mode according to the preset rules and set the motion vector of the image block whose encoding mode is the BaseLayer mode to correspond to when the block at the same position in the reference image is stationary parameter; 获取所述可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary, reference images of the adjacent image blocks, and motion vectors of the adjacent image blocks; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度具体包括:The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; and setting the boundary strengths of the possible filtering boundaries according to the encoding information Specifics for different boundary strengths include: 若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is smaller than a preset threshold, then set the boundary strength of the possible filtering boundary as the first boundary strength. 4.根据权利要求3所述的方法,其特征在于,所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度还包括:4. The method according to claim 3, wherein, setting the boundary strength of the possible filtering boundary to different boundary strengths according to the encoding information further comprises: 若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the adjacent image blocks move If the vector difference is greater than or equal to the preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 5.根据权利要求1所述的方法,其特征在于,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;5. The method according to claim 1, wherein the encoding information includes a quantization coefficient identification marking whether the adjacent image block has a quantization coefficient; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes: 获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度具体包括:The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; and setting the boundary strengths of the possible filtering boundaries according to the encoding information Specifics for different boundary strengths include: 若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, then set the boundary strength of the possible filtering boundary as a second boundary strength. 6.根据权利要求5所述的方法,其特征在于,所述编码信息还包括所述相邻的图像块的参考图像;6. The method according to claim 5, wherein the encoding information further comprises reference images of the adjacent image blocks; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes: 根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;Set the reference image of the image block whose encoding mode is BaseLayer mode according to the preset rule; obtain the reference image of the adjacent image block on both sides of the possible filtering boundary; 所述根据所述编码信息将所述可能的滤波边界的边界强度设置为第不同的边界强度还包括:The setting the boundary strength of the possible filtering boundary as the second different boundary strength according to the encoding information further includes: 若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have different reference images, then set the boundary strength of the possible filtering boundary to the second boundary strength . 7.根据权利要求6所述的方法,其特征在于,所述编码信息还包括所述相邻的图像块的运动向量;7. The method according to claim 6, wherein the encoding information further comprises motion vectors of the adjacent image blocks; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes: 将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;Set the motion vector of the image block whose encoding mode is BaseLayer mode as the parameter corresponding to when the block at the same position in the reference image is still; 获取所述可能滤波边界两侧的相邻的图像块的运动向量;Acquiring motion vectors of adjacent image blocks on both sides of the possible filtering boundary; 所述根据所述编码信息将所述可能的滤波边界的边界强度设置为第不同的边界强度还包括:The setting the boundary strength of the possible filtering boundary as the second different boundary strength according to the encoding information further includes: 若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or is equal to the preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 8.根据权利要求7所述的方法,其特征在于,所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度还包括:8. The method according to claim 7, wherein said setting the boundary strength of said possible filtering boundary to different boundary strengths according to said encoding information further comprises: 若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。If the quantization coefficient flag indicates that there are no quantization coefficients in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than If the threshold is preset, the boundary strength of the possible filtering boundary is set as the first boundary strength. 9.根据权利要求2至8任意一项所述的方法,其特征在于,所述第一边界强度为0,所述第二边界强度为1。9. The method according to any one of claims 2 to 8, wherein the first boundary strength is 0, and the second boundary strength is 1. 10.一种去块效应的滤波方法,其特征在于,包括:10. A filtering method for deblocking effect, comprising: 确定去块效应滤波DBF的可能滤波边界;Determining the possible filtering boundaries of the deblocking filter DBF; 获取所述可能滤波边界两侧相邻的图像块的编码模式以及编码信息;Obtain the coding mode and coding information of the adjacent image blocks on both sides of the possible filtering boundary; 当所述相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度;When the encoding modes of the adjacent image blocks are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one base layer BaseLayer mode, then according to the encoding information, the possible filtering The border strength of the border is set to a different border strength; 将所述确定的边界强度作为一个参考因子用于获取第一阈值及第二阈值,所述第一阈值用于确定是否对所述可能的滤波边界进行滤波,所述第二阈值用于确定对需要进行滤波的所述可能的滤波边界进行滤波的滤波强度;Using the determined boundary strength as a reference factor to obtain a first threshold and a second threshold, the first threshold is used to determine whether to filter the possible filtering boundaries, and the second threshold is used to determine whether to filter the possible filtering boundaries. The filtering strength of the possible filtering boundaries that need to be filtered; 按照所述可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和所述第一阈值确定是否需要对所述可能的滤波边界进行滤波;Determine whether the possible filtering boundary needs to be filtered according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the possible filtering boundary and the first threshold; 若确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并使用所确定滤波器执行对所述需要进行滤波的所述可能的滤波边界进行滤波处理。If it is determined that filtering is required, the filter for performing filtering is determined according to the relationship between the gradient of pixels in the predetermined range and the second threshold value in adjacent image blocks on both sides of the possible filtering boundary, and the determined filter is used to perform the necessary filtering. Filtering is performed on the possible filtering boundaries of the filtering. 11.根据权利要求10所述的方法,其特征在于,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;11. The method according to claim 10, wherein the encoding information includes a quantization coefficient flag marking whether the adjacent image block has a quantization coefficient; 所述获取所述可能滤波边界两侧相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes: 获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度具体包括:The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; and setting the boundary strengths of the possible filtering boundaries according to the encoding information Specifics for different boundary strengths include: 若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度设置为第一边界强度。If the encoding modes of the adjacent image blocks are all BaseLayer modes and the quantization coefficient identifier indicates that none of the adjacent image blocks have quantization coefficients, then set the boundary strength of the possible filtering boundary as the first boundary strength. 12.根据权利要求10所述的方法,其特征在于,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;12. The method according to claim 10, wherein the encoding information includes a quantization coefficient identification marking whether the adjacent image block has a quantization coefficient, a reference image of the adjacent image block, and the The motion vector of the adjacent image block; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes: 根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;Set the reference image of the image block whose encoding mode is the BaseLayer mode according to the preset rules and set the motion vector of the image block whose encoding mode is the BaseLayer mode to correspond to when the block at the same position in the reference image is stationary parameter; 获取所述可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;Obtain quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary, reference images of the adjacent image blocks, and motion vectors of the adjacent image blocks; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述根据所述编码信息将所述可能的滤波边界的边界强度设置为第不同的边界强度具体包括:The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; and setting the boundary strengths of the possible filtering boundaries according to the encoding information Specifically for the different boundary strengths include: 若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is smaller than a preset threshold, then set the boundary strength of the possible filtering boundary as the first boundary strength. 13.根据权利要求12所述的方法,其特征在于,所述根据所述编码信息将所述可能的滤波边界的边界强度设置为第一边界强度或第二边界强度还包括:13. The method according to claim 12, wherein the setting the boundary strength of the possible filtering boundary as the first boundary strength or the second boundary strength according to the encoding information further comprises: 若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different reference images, or the adjacent image blocks move If the vector difference is greater than or equal to the preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 14.根据权利要求10所述的方法,其特征在于,所述编码信息包括标记所述相邻的图像块是否有量化系数的量化系数标识;14. The method according to claim 10, wherein the encoding information includes a quantization coefficient identification marking whether the adjacent image block has a quantization coefficient; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息具体包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary specifically includes: 获取所述可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;Acquiring the quantization coefficient identification of whether the adjacent image blocks on both sides of the possible filtering boundary have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度具体包括:The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; and setting the boundary strengths of the possible filtering boundaries according to the encoding information Specifics for different boundary strengths include: 若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient identifier indicates that at least one of the adjacent image blocks has a quantization coefficient, then set the boundary strength of the possible filtering boundary as a second boundary strength. 15.根据权利要求14所述的方法,其特征在于,所述编码信息还包括所述相邻的图像块的参考图像;15. The method according to claim 14, wherein the encoding information further comprises reference images of the adjacent image blocks; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes: 根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;Set the reference image of the image block whose encoding mode is BaseLayer mode according to the preset rule; obtain the reference image of the adjacent image block on both sides of the possible filtering boundary; 所述根据所述编码信息将所述可能的滤波边界的边界强度设置为第一边界强度或第二边界强度还包括:The setting the boundary strength of the possible filtering boundary as the first boundary strength or the second boundary strength according to the encoding information further includes: 若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have different reference images, then set the boundary strength of the possible filtering boundary to the second boundary strength . 16.根据权利要求15所述的方法,其特征在于,所述编码信息还包括所述相邻的图像块的运动向量;16. The method according to claim 15, wherein the encoding information further comprises motion vectors of the adjacent image blocks; 所述获取所述可能滤波边界两侧的相邻的图像块的编码信息还包括:The acquiring the encoding information of adjacent image blocks on both sides of the possible filtering boundary further includes: 将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;获取所述可能滤波边界两侧的相邻的图像块的运动向量;Set the motion vector of the image block whose encoding mode is BaseLayer mode as the parameter corresponding to when the block at the same position in the reference image is still; obtain the motion vector of the adjacent image block on both sides of the possible filtering boundary ; 所述根据所述编码信息将所述可能的滤波边界的边界强度设置为第一边界强度或第二边界强度还包括:The setting the boundary strength of the possible filtering boundary as the first boundary strength or the second boundary strength according to the encoding information further includes: 若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。If the quantization coefficient flag indicates that none of the adjacent image blocks has a quantization coefficient, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is greater than or is equal to the preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 17.根据权利要求16所述的方法,其特征在于,所述根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度还包括:17. The method according to claim 16, characterized in that, setting the boundary strength of the possible filtering boundaries to different boundary strengths according to the encoding information further comprises: 若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。If the quantization coefficient flag indicates that there are no quantization coefficients in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than If the threshold is preset, the boundary strength of the possible filtering boundary is set as the first boundary strength. 18.根据权利要求11至17任意一项所述的方法,其特征在于,所述第一边界强度为0,所述第二边界强度为1。18. The method according to any one of claims 11-17, wherein the first boundary strength is 0, and the second boundary strength is 1. 19.一种边界强度确定装置,其特征在于,包括:19. A device for determining boundary strength, comprising: 第一边界确定单元,用于确定去块效应滤波DBF的可能滤波边界;A first boundary determining unit, configured to determine possible filtering boundaries of the deblocking filter DBF; 第一信息获取单元,用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块的编码模式以及编码信息;A first information acquiring unit, configured to acquire the encoding mode and encoding information of the adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determining unit; 第一边界强度确定单元,用于当所述第一信息获取单元获取的相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度。The first boundary strength determination unit is used for when the encoding modes of the adjacent image blocks acquired by the first information acquiring unit are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one basic layer BaseLayer mode, set the boundary strengths of the possible filtering boundaries to different boundary strengths according to the encoding information. 20.根据权利要求19所述的装置,其特征在于,20. The apparatus of claim 19, wherein: 所述第一信息获取单元,具体用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;The first information acquisition unit is specifically configured to acquire quantization coefficient identifiers of whether the adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determination unit have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度,所述第一边界强度确定单元,具体用于若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度设置为第一边界强度。The different boundary strengths include a first boundary strength and a second boundary strength, the second boundary strength is greater than the first boundary strength, and the first boundary strength determining unit is specifically configured to if the adjacent image If the encoding modes of the blocks are all BaseLayer modes and the quantization coefficient identifier indicates that the adjacent image blocks have no quantization coefficients, then the boundary strength of the possible filtering boundary is set as the first boundary strength. 21.根据权利要求19所述的装置,其特征在于,21. The device of claim 19, wherein: 所述第一信息获取单元,具体用于获取所述编码信息中包括的标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;The first information acquisition unit is specifically configured to acquire the quantization coefficient identifier indicating whether the adjacent image block has a quantization coefficient included in the encoding information, the reference image of the adjacent image block, and the Motion vectors of adjacent image blocks; 所述第一边界强度确定单元包括:第一参数设置单元、第一参数获取单元以及第一边界强度确定子单元;The first boundary strength determination unit includes: a first parameter setting unit, a first parameter acquisition unit, and a first boundary strength determination subunit; 所述第一参数设置单元,用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;The first parameter setting unit is configured to set the reference image of the image block whose encoding mode is BaseLayer mode according to a preset rule and set the motion vector of the image block whose encoding mode is BaseLayer mode to be relative to the reference image The corresponding parameters when the block at the same position in the image is still; 所述第一参数获取单元,用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;The first parameter acquisition unit is configured to acquire quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determination unit, and reference images of the adjacent image blocks, and the Motion vectors of adjacent image blocks; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述第一边界强度确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; the first boundary strength determination subunit is configured to identify indicating that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than a preset threshold, then the The boundary strength of the possible filter boundaries is set to the first boundary strength. 22.根据权利要求21所述的装置,其特征在于,22. The device of claim 21, wherein: 所述第一边界强度确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。The first boundary strength determining subunit is further configured to if the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different , or the difference between the motion vectors of the adjacent image blocks is greater than or equal to a preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 23.根据权利要求19所述的装置,其特征在于,23. The apparatus of claim 19, wherein: 所述第一信息获取单元,具体用于获取所述第一边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;The first information acquisition unit is specifically configured to acquire quantization coefficient identifiers of whether the adjacent image blocks on both sides of the possible filtering boundary determined by the first boundary determination unit have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述第一边界强度确定单元,具体用于若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度设置为第二边界强度。The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; the first boundary strength determining unit is specifically configured to if the quantization coefficient identifies Indicating that at least one of the adjacent image blocks has a quantization coefficient, then setting the boundary strength of the possible filtering boundary as the second boundary strength. 24.根据权利要求23所述的装置,其特征在于,24. The apparatus of claim 23, wherein: 所述第一信息获取单元,还用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;The first information acquisition unit is further configured to set the encoding mode as the reference image of the image block in BaseLayer mode according to preset rules; acquire the reference images of adjacent image blocks on both sides of the possible filtering boundary; 所述第一边界强度确定单元,还用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度设置为第二边界强度。The first boundary strength determination unit is further configured to set the possible The boundary strength of the filter boundary is set to the second boundary strength. 25.根据权利要求24所述的装置,其特征在于,25. The device of claim 24, wherein: 所述第一信息获取单元,还用于获取所述编码信息中包括的所述相邻的图像块的运动向量;The first information acquiring unit is further configured to acquire motion vectors of the adjacent image blocks included in the encoding information; 所述第一边界强度确定单元包括:第二参数设置单元、第二参数获取单元以及第二边界强度确定子单元;The first boundary strength determination unit includes: a second parameter setting unit, a second parameter acquisition unit, and a second boundary strength determination subunit; 所述第二参数设置单元,用于将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;The second parameter setting unit is configured to set the motion vector of the image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still; 所述第二参数获取单元,用于获取所述可能滤波边界两侧的相邻的图像块的运动向量;The second parameter acquisition unit is configured to acquire motion vectors of adjacent image blocks on both sides of the possible filtering boundary; 所述第二边界强度确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度边界强度设置为第二边界强度。The second boundary strength determination subunit is configured to if the quantization coefficient flag indicates that none of the adjacent image blocks has quantization coefficients, and the adjacent image blocks have the same reference image, and the adjacent If the difference between the image block motion vectors is greater than or equal to a preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 26.根据权利要求25所述的装置,其特征在于,26. The device of claim 25, wherein: 所述第二边界强度确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。The second boundary strength determination subunit is further configured to if the quantization coefficient flag indicates that there is no quantization coefficient in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the If the difference between motion vectors of adjacent image blocks is smaller than a preset threshold, then the boundary strength of the possible filtering boundary is set as the first boundary strength. 27.根据权利要求20至26任意一项所述的装置,其特征在于,所述的第一边界强度为0,所述的第二边界强度为1。27. The device according to any one of claims 20-26, wherein the first boundary strength is 0, and the second boundary strength is 1. 28.一种去块效应的滤波装置,其特征在于,包括:28. A filtering device for deblocking effect, comprising: 第二边界确定单元,用于确定去块效应滤波DBF的可能滤波边界;The second boundary determining unit is used to determine possible filtering boundaries of the deblocking filter DBF; 第二信息获取单元,用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块的编码模式以及编码信息;A second information acquisition unit, configured to acquire the encoding mode and encoding information of image blocks adjacent to both sides of the possible filtering boundary determined by the second boundary determination unit; 第二边界强度确定单元,用于当所述第二信息获取单元获取的相邻的图像块的编码模式均不是帧内Intra模式,且所述相邻的图像块的编码模式中至少包括一个基本层BaseLayer模式,则根据所述编码信息将所述可能的滤波边界的边界强度设置为不同的边界强度;The second boundary strength determination unit is used for when the encoding modes of the adjacent image blocks acquired by the second information acquiring unit are not intra-frame Intra mode, and the encoding modes of the adjacent image blocks include at least one basic layer BaseLayer mode, then set the boundary strength of the possible filtering boundary to different boundary strengths according to the encoding information; 阈值获取单元,用于将所述确定的边界强度作为一个参考因子用于获取第一阈值及第二阈值,所述第一阈值用于确定是否对所述可能的滤波边界进行滤波,所述第二阈值用于确定对需要进行滤波的所述可能的滤波边界进行滤波的滤波强度;A threshold acquisition unit, configured to use the determined boundary strength as a reference factor to acquire a first threshold and a second threshold, the first threshold is used to determine whether to filter the possible filtering boundaries, and the second The second threshold is used to determine the filtering strength for filtering the possible filtering boundaries that need to be filtered; 滤波判决单元,用于按照所述第二边界确定单元确定的可能的滤波边界两侧相邻的图像块中预定范围内的像素梯度和所述第一阈值确定是否需要对所述可能的滤波边界进行滤波;A filtering decision unit, configured to determine whether the possible filtering boundary needs to be adjusted according to the gradient of pixels within a predetermined range in adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determining unit and the first threshold value filter; 滤波器控制单元,用于若滤波判决单元确定需要进行滤波,则按照可能滤波边界两侧相邻的图像块中预定范围内的像素梯度与第二阈值的关系确定执行滤波的滤波器,并使用所确定滤波器执行对所述需要进行滤波的所述可能的滤波边界进行滤波处理。The filter control unit is used to determine the filter for performing filtering according to the relationship between the pixel gradient in the predetermined range and the second threshold value in the adjacent image blocks on both sides of the possible filtering boundary if the filtering decision unit determines that filtering is required, and use The determined filter performs filtering processing on the possible filtering boundaries that need to be filtered. 29.根据权利要求28所述的装置,其特征在于,29. The device of claim 28, wherein: 所述第二信息获取单元,具体用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;The second information acquisition unit is specifically configured to acquire quantization coefficient identifiers of whether the adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determination unit have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述第二边界强度确定单元,具体用于若所述相邻图像块的编码模式均是BaseLayer模式并且量化系数标识指示所述相邻的图像块均无量化系数,则将所述可能的滤波边界的边界强度设置为第一边界强度。The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; the second boundary strength determination unit is specifically configured to if the adjacent image If the encoding modes of the blocks are all BaseLayer modes and the quantization coefficient identifier indicates that the adjacent image blocks have no quantization coefficients, then the boundary strength of the possible filtering boundary is set as the first boundary strength. 30.根据权利要求29所述的装置,其特征在于,30. The device of claim 29, wherein: 所述第二信息获取单元,具体用于获取所述编码信息中包括的标记所述相邻的图像块是否有量化系数的量化系数标识,所述相邻的图像块的参考图像,以及所述相邻的图像块的运动向量;The second information acquisition unit is specifically configured to acquire the quantization coefficient identifier indicating whether the adjacent image block has a quantization coefficient included in the encoding information, the reference image of the adjacent image block, and the Motion vectors of adjacent image blocks; 所述第二边界强度确定单元包括:第三参数设置单元、第三参数获取单元以及第三边界强度确定子单元;The second boundary strength determination unit includes: a third parameter setting unit, a third parameter acquisition unit, and a third boundary strength determination subunit; 第三参数设置单元,用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像并且将所述编码模式为BaseLayer模式的所述图像块的运动矢量设置为相对于参考图像中同位置块静止时所对应的参数;The third parameter setting unit is used to set the reference image of the image block whose encoding mode is BaseLayer mode according to preset rules and set the motion vector of the image block whose encoding mode is BaseLayer mode relative to the reference image The corresponding parameters when the block at the same position is stationary; 所述第三参数获取单元,用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块的量化系数标识,以及所述相邻的图像块的参考图像,以及所述相邻的图像块的运动矢量;The third parameter acquisition unit is configured to acquire quantization coefficient identifiers of adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determination unit, and reference images of the adjacent image blocks, and the Motion vectors of adjacent image blocks; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述第三边界强度确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有相同的参考图像,并且所述相邻的图像块的运动矢量的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; the third boundary strength determination subunit is configured to identify indicating that none of the adjacent image blocks have quantization coefficients, and the adjacent image blocks have the same reference image, and the difference between the motion vectors of the adjacent image blocks is less than a preset threshold, then the The boundary strength of the possible filter boundaries is set to the first boundary strength. 31.根据权利要求30所述的装置,其特征在于,31. The device of claim 30, wherein: 所述第三边界强度确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中至少有一个所述的图像块有量化系数,或所述相邻的图像块具有不同的参考图像,或者所述相邻的图像块运动矢量的差值大于或等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。The third boundary strength determination subunit is further configured to if the quantization coefficient flag indicates that at least one of the adjacent image blocks has a quantization coefficient, or the adjacent image blocks have different , or the difference between the motion vectors of the adjacent image blocks is greater than or equal to a preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 32.根据权利要求28所述的装置,其特征在于,32. The device of claim 28, wherein: 所述第二信息获取单元,具体用于获取所述第二边界确定单元确定的可能滤波边界两侧相邻的图像块是否有量化系数的量化系数标识;The second information acquisition unit is specifically configured to acquire quantization coefficient identifiers of whether the adjacent image blocks on both sides of the possible filtering boundary determined by the second boundary determination unit have quantization coefficients; 所述不同的边界强度包括第一边界强度和第二边界强度,所述第二边界强度大于所述的第一边界强度;所述第二边界强度确定单元,具体用于若所述量化系数标识指示所述相邻的图像块中至少一个所述的图像块有量化系数,则将所述可能的滤波边界的边界强度边界强度设置为第二边界强度。The different boundary strengths include a first boundary strength and a second boundary strength, and the second boundary strength is greater than the first boundary strength; the second boundary strength determination unit is specifically configured to if the quantization coefficient identifies Indicating that at least one of the adjacent image blocks has a quantization coefficient, then setting the boundary strength of the possible filtering boundary as the second boundary strength. 33.根据权利要求32所述的装置,其特征在于,33. The device of claim 32, wherein: 所述第二信息获取单元,还用于根据预设规则设置编码模式为BaseLayer模式的所述图像块的参考图像;获取所述可能滤波边界两侧的相邻的图像块的参考图像;The second information acquisition unit is further configured to set the encoding mode as the reference image of the image block in BaseLayer mode according to preset rules; acquire the reference images of adjacent image blocks on both sides of the possible filtering boundary; 所述第二边界强度确定单元,还用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块具有不同的参考图像,则将所述可能的滤波边界的边界强度边界强度设置为第二边界强度。The second boundary strength determining unit is further configured to set the possible The boundary strength of the filter boundary boundary strength is set to the second boundary strength. 34.根据权利要求33所述的装置,其特征在于,34. The device of claim 33, wherein: 所述第二信息获取单元,还用于获取所述编码信息中包括的所述相邻的图像块的运动向量;The second information acquiring unit is further configured to acquire motion vectors of the adjacent image blocks included in the coding information; 所述第二边界强度确定单元包括:第四参数设置单元、第四参数获取单元以及第四边界强度确定子单元;The second boundary strength determination unit includes: a fourth parameter setting unit, a fourth parameter acquisition unit, and a fourth boundary strength determination subunit; 所述第四参数设置单元,用于将所述编码模式为BaseLayer模式的所述图像块的运动向量设置为相对于参考图像中同位置块静止时所对应的参数;The fourth parameter setting unit is configured to set the motion vector of the image block whose encoding mode is BaseLayer mode as a parameter corresponding to when the block at the same position in the reference image is still; 所述第四参数获取单元,用于获取所述可能滤波边界两侧的相邻的图像块的运动向量;The fourth parameter acquisition unit is configured to acquire motion vectors of adjacent image blocks on both sides of the possible filtering boundary; 所述第四边界强度确定子单元,用于若所述量化系数标识指示所述相邻的图像块均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值大于或者等于预设阈值,则将所述可能的滤波边界的边界强度设置为第二边界强度。The fourth boundary strength determining subunit is configured to if the quantization coefficient flag indicates that none of the adjacent image blocks has quantization coefficients, and the adjacent image blocks have the same reference image, and the adjacent If the difference between the image block motion vectors is greater than or equal to a preset threshold, then the boundary strength of the possible filtering boundary is set as the second boundary strength. 35.根据权利要求34所述的装置,其特征在于,35. The device of claim 34, wherein: 所述第四边界强度确定子单元,还用于若所述量化系数标识指示所述相邻的图像块中均无量化系数,并且所述相邻的图像块有相同的参考图像,并且所述相邻的图像块运动矢量之间的差值小于预设阈值,则将所述可能的滤波边界的边界强度设置为第一边界强度。The fourth boundary strength determining subunit is further configured to if the quantization coefficient flag indicates that there is no quantization coefficient in the adjacent image blocks, and the adjacent image blocks have the same reference image, and the If the difference between motion vectors of adjacent image blocks is smaller than a preset threshold, then the boundary strength of the possible filtering boundary is set as the first boundary strength. 36.根据权利要求29至35任意一项所述的装置,其特征在于,所述的第一边界强度为0,所述的第二边界强度为1。36. The device according to any one of claims 29-35, wherein the first boundary strength is 0, and the second boundary strength is 1.
CN201210592468.5A 2012-12-31 2012-12-31 A kind of boundary intensity determines method, block-eliminating effect filtering method and device Active CN103916676B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210592468.5A CN103916676B (en) 2012-12-31 2012-12-31 A kind of boundary intensity determines method, block-eliminating effect filtering method and device
PCT/CN2013/087494 WO2014101590A1 (en) 2012-12-31 2013-11-20 Boundary strength determination method, deblocking filtering method, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210592468.5A CN103916676B (en) 2012-12-31 2012-12-31 A kind of boundary intensity determines method, block-eliminating effect filtering method and device

Publications (2)

Publication Number Publication Date
CN103916676A CN103916676A (en) 2014-07-09
CN103916676B true CN103916676B (en) 2017-09-29

Family

ID=51019861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210592468.5A Active CN103916676B (en) 2012-12-31 2012-12-31 A kind of boundary intensity determines method, block-eliminating effect filtering method and device

Country Status (2)

Country Link
CN (1) CN103916676B (en)
WO (1) WO2014101590A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107925773B (en) * 2015-06-11 2022-06-07 杜比实验室特许公司 Method and apparatus for encoding and decoding images using adaptive deblocking filtering
CN107027040B9 (en) 2016-01-29 2020-08-28 华为技术有限公司 A kind of filtering method and device for removing block effect
CN109257605B (en) * 2017-07-13 2021-11-19 华为技术有限公司 Image processing method, device and system
CN110988888B (en) * 2019-11-08 2021-10-29 中科长城海洋信息系统有限公司 Method and device for acquiring seabed information
CN112514390B (en) * 2020-03-31 2023-06-20 深圳市大疆创新科技有限公司 Video coding method and device
CN114584790B (en) * 2022-01-21 2024-05-17 百果园技术(新加坡)有限公司 Video brightness filtering method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101379511A (en) * 2005-03-18 2009-03-04 夏普株式会社 Methods and systems for extended spatial scalability with picture-level adaptation
CN102316318A (en) * 2010-07-07 2012-01-11 中国科学院微电子研究所 A deblocking filter boundary strength calculation device and method based on H.264 standard

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI375470B (en) * 2007-08-03 2012-10-21 Via Tech Inc Method for determining boundary strength
EP2263381A1 (en) * 2008-04-11 2010-12-22 Thomson Licensing Deblocking filtering for displaced intra prediction and template matching
US9185430B2 (en) * 2010-03-15 2015-11-10 Mediatek Singapore Pte. Ltd. Deblocking filtering method and deblocking filter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101379511A (en) * 2005-03-18 2009-03-04 夏普株式会社 Methods and systems for extended spatial scalability with picture-level adaptation
CN102316318A (en) * 2010-07-07 2012-01-11 中国科学院微电子研究所 A deblocking filter boundary strength calculation device and method based on H.264 standard

Also Published As

Publication number Publication date
WO2014101590A1 (en) 2014-07-03
CN103916676A (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN103916676B (en) A kind of boundary intensity determines method, block-eliminating effect filtering method and device
US10986332B2 (en) Prediction mode selection method, video encoding device, and storage medium
US9129409B2 (en) System and method of compressing video content
CN115834897B (en) Processing method, processing apparatus, and storage medium
CN115988206B (en) Image processing method, processing apparatus, and storage medium
CN112532975B (en) Video encoding method, video encoding device, computer equipment and storage medium
CN103119943B (en) Method for encoding images and picture decoding method
CN109996080A (en) Prediction technique, device and the codec of image
MX2015006474A (en) Image processing device and method.
CN116847088B (en) Image processing method, processing device and storage medium
WO2024260142A1 (en) Image processing method, and processing device and storage medium
JP2021526338A (en) Motion vector acquisition method and device
CN115955565B (en) Processing method, processing apparatus, and storage medium
CN115379214B (en) Image processing method, intelligent terminal and storage medium
CN113709504B (en) Image processing method, intelligent terminal and readable storage medium
CN103891286A (en) Image processing device and method
CN116939205A (en) Image processing method, processing apparatus, and storage medium
CN113873236B (en) Decoding and encoding method based on adaptive intra-frame refreshing mechanism and related equipment
WO2020134817A1 (en) Method and device for determining prediction mode, coding device, and decoding device
WO2024212191A1 (en) Image processing method, processing device, and storage medium
HK40064906B (en) Decoding and coding methods based on self-adaptive intra-frame refresh mechanism, and related equipment
WO2023019567A1 (en) Image processing method, mobile terminal and storage medium
WO2025065572A1 (en) Image processing method, smart terminal, and storage medium
WO2025107200A1 (en) Processing method, processing device, and storage medium
WO2025147920A1 (en) Processing method, processing device and storage medium

Legal Events

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