WO2021120614A1 - 二次编码优化方法 - Google Patents

二次编码优化方法 Download PDF

Info

Publication number
WO2021120614A1
WO2021120614A1 PCT/CN2020/102635 CN2020102635W WO2021120614A1 WO 2021120614 A1 WO2021120614 A1 WO 2021120614A1 CN 2020102635 W CN2020102635 W CN 2020102635W WO 2021120614 A1 WO2021120614 A1 WO 2021120614A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
coding
current frame
encoding
encoder
Prior art date
Application number
PCT/CN2020/102635
Other languages
English (en)
French (fr)
Inventor
朱策
郭红伟
刘宇洋
叶茂
Original Assignee
电子科技大学
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 电子科技大学 filed Critical 电子科技大学
Publication of WO2021120614A1 publication Critical patent/WO2021120614A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/19Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding using optimisation based on Lagrange multipliers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the invention belongs to the technical field of coding, and specifically relates to a secondary coding optimization method.
  • the first-generation video coding standard H.261 which was released in the 1980s, adopted a hybrid video coding framework containing multiple compression tools such as prediction, transformation, quantization, and entropy coding. It can effectively remove the time domain, Spatial, visual, information entropy and other redundancy to achieve efficient video data compression. Therefore, the hybrid video coding structure has been used in every subsequent generation of video coding standards.
  • the quantization parameter (QP) and the Lagrangian multiplier ⁇ determine the distortion of the coded video and the number of bits required for coding, and there is a close relationship between them.
  • the GOP size is 4, and the corresponding ⁇ QP values are 3, 2, 3, and 1, respectively.
  • the Lagrangian multiplier used in the encoding is calculated by QP HM: W L here is a weighting factor related to the level to which the coded frame belongs, and its value takes into account the importance of rate-distortion of coded frames at different levels to a certain extent.
  • the present invention optimizes the allocation of coding bit resources by the utilization rate distortion dependence relationship, and proposes a secondary coding optimization method.
  • the secondary coding optimization method includes the following steps:
  • the encoder reads a frame to be encoded in a GOP
  • First encoding The current frame is encoded for the first time using the quantization parameter QP HM,i set by HEVC's default setting to obtain the frame-level time-domain influence factor k i of the current frame and the values of all 16 ⁇ 16 pixel blocks in the frame.
  • Block-level time-domain impact factor k B,j Block-level time-domain impact factor k B,j :
  • step S5. Determine whether the scene is switched, if yes, go to step S6, if not, go to step S7; the judgment method is: if And p i > 10, it is determined that scene switching has occurred in the current frame, where p i is the average absolute motion compensation prediction error of the current frame, Is the average value of the absolute error of the average motion compensation prediction of the previous 6 frames;
  • QP HM,i is the quantization parameter set in the original encoder for the current frame
  • Round( ⁇ ) is the rounding operator
  • M is the number of 16 ⁇ 16 pixel blocks included in the nth CTU
  • N is the number of CTUs in the coded frame
  • w n is the number of CTUs in the coded frame
  • W n are intermediate variables
  • the calculated Lagrangian multiplier ⁇ n and the quantization parameter QP n are used to encode each CTU in the current frame, and the code stream is output and the reconstructed image is stored in the default mode of the encoder
  • the difference between the solution of the present invention and the traditional method includes: proposing a frame-level time-domain influencing factor k i and a block-level time-domain influencing factor k B,j to measure rate-distortion dependence.
  • the encoding quality of the I frame determines the maximum rate-distortion performance that can be achieved by subsequent P/B frame encoding. Appropriate improvement of the I-frame quality can bring a certain rate-distortion performance improvement to the entire encoded video. Since the rate-distortion dependency is weak at high bit rates and stronger at low bit rates, the present invention sets the I frame quantization parameter QP I according to the range of the input quantization parameter QP 0 of the encoder.
  • a simplified encoding process is adopted to obtain the frame-level time-domain impact factor k i and the block-level time-domain impact factor k B,j .
  • the RDO mode selection process of the first encoding skips most of the mode judgments, and only uses 64 ⁇ 64, 32 ⁇ 32, and 16 ⁇ 16 inter-frame prediction modes. According to whether scene switching occurs, different optimization strategies are adopted for the coded frame.
  • the rate-distortion dependence strength between the current frame and the reference frame is obtained, as well as the importance of the rate-distortion of each encoding block in the current frame to the subsequent encoding process, which is then used to guide the frame-level sum of the second encoding.
  • the present invention achieves average results in low-latency B-frame (LDB) and low-latency P-frame (LDP) encoding configurations with an average increase in coding complexity of 23%. 5.1% and 5.3% bit rate savings.
  • LLB low-latency B-frame
  • LDP low-latency P-frame
  • Figure 1 is the main flow chart of the present invention
  • Fig. 2 is a schematic diagram of an example of reference relationships in HEVC low-latency coding
  • Fig. 3 is a statistical diagram of frame-level time-domain influence factor k i in the present invention.
  • Fig. 4 is a schematic diagram of an example in which the block-level time-domain impact factor k B,j can be videoized in the present invention
  • Figure 5 is a schematic diagram of the comparison of rate-distortion curves
  • Fig. 6 is a schematic diagram of the increase of coding time and the saving of code rate relative to the HEVC encoder of the present invention.
  • the embodiment adopts the development environment of Visual Studio 2013, and the embodiment is implemented based on the HEVC reference software HM-16.7.
  • Figure 1 is a flowchart of the main steps of the secondary encoding optimization method, specifically including:
  • Step 1 Optimize the starting frame of the video sequence.
  • Step 2 Read in a GOP frame to be coded in the default mode of HM-16.7.
  • Step 3 Use a simplified encoding process for the first encoding.
  • Step 4 Restore the reference list and other information.
  • the first encoding does not output the code stream of the current frame and store the reconstructed image.
  • After encoding reset the image linked list in the encoder to the state before encoding the current frame, including restoring the reference frame identifier in the image linked list.
  • Step 5 Determine the scene switching, if yes, go to step 6, otherwise go to step 7.
  • the scene switching judgment method is: if And p i >10, it is determined that the scene switch has occurred in the i-th frame, where p i is the average absolute motion compensation prediction error of the current frame, It is the average value of the absolute error of the average motion compensation prediction of the previous 6 frames.
  • Step 7 Set the current frame quantization parameters
  • QP HM,i is the quantization parameter set in the original HEVC encoder HM for the current frame
  • Round( ⁇ ) is the rounding operator. It should be noted that the above-mentioned quantization parameter setting only operates on coded frames with levels 2 and 3, and the quantization parameter of the key frame keeps the setting in the original HEVC encoder.
  • M is the number of 16 ⁇ 16 pixel blocks included in the nth CTU
  • N is the number of CTUs in the coded frame.
  • Step 8 Determine whether the encoded frame is the last frame of the video sequence. "Yes” means encoding ends; “No” means determining whether the encoded frame is the last frame in the current GOP. “Yes” skips to step 2 to read the next GOP data; “no” skips to step 3 to encode the next frame in the current GOP.
  • the bitstream generated by encoding in the present invention conforms to the syntax format of the HEVC standard, and the generated bitstream can be decoded by a standard HEVC decoder. Encoding experiments were carried out according to HEVC general test conditions, and two encoder configurations of LDB and LDP were tested. The reference relationship is shown in Figure 2. It can be seen from FIG. 3 and FIG. 4 that the frame-level time-domain influence factor k i and the block-level time-domain influence factor k B,j proposed by the present invention effectively represent the rate-distortion dependence.
  • Figure 5 is a comparison of the rate-distortion curves of the test sequence PartyScene in LDB and LDP encoding configurations. It can be seen that the rate-distortion performance of the present invention is better than the original HEVC encoder HM-16.7 at both low and high bit rates.
  • Fig. 6 is a schematic diagram of the increase in coding time and the saving of code rate of the original HEVC encoder HM-16.7 of the present invention. It can be seen that with an average increase in coding complexity of 23%, the present invention achieves the results in the LDB and LDP configurations respectively. The average code rate savings of 5.1% and 5.3% show a larger rate-distortion performance improvement.

Landscapes

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

Abstract

本发明属于编码技术领域,具体涉及一种二次编码优化方法。本发明的方法主要包括:根据编码器输入量化参数QP0的范围设置视频序列起始I帧的量化参数,采用简化的方法进行第一次编码,同时计算当前帧的帧级时域影响因子ki和帧内所有16×16像素块的块级时域影响因子kB,j,第一次编码结束后恢复编码器的参考列表信息,然后判断场景是否切换,根据场景是否切换采用不同的策略设置量化参数进行第二次编码。本发明的有益效果是:通过简化的第一次编码得到当前帧与参考帧之间的率失真依赖强度,以及当前帧中各编码块对后续编码过程的率失真重要程度,进而用于指导第二次编码的帧级和CTU级编码资源优化。

Description

二次编码优化方法 技术领域
本发明属于编码技术领域,具体涉及一种二次编码优化方法。
背景技术
随着电子信息技术的高速发展和各种视频数据采集方式的使用,数字视频成为了多媒体信息的主要载体,然而未经压缩的数字视频数据量非常巨大,例如分辨率为1920×1080的8比特RGB彩色视频,帧率为30Hz,则其每小时的数据量高达4.89TB。如此之大的数据量给视频的传输和存储带来巨大的挑战,因此自上世纪80年代以来,视频压缩技术持续成为国内外研究和应用的热点领域。随着数字视频编解码技术的发展,数字视频的应用涵盖了电视广播、数字电影、远程教育、远程医疗、视频监控、视频会话和流媒体传输等各个领域,出现了许多知名的视频应用企业。为了保证不同厂商编解码产品之间的互操作性,催生了相应的视频编码标准。
由于数字视频中存在着多种冗余数据,任何一种编码工具都不可能单独地实现高效的视频压缩。上世纪80年代发布的第一代视频编码标准H.261采用了一个包含预测、变换、量化和熵编码等多种压缩工具的混合视频编码框架,其能有效地去除数字视频中的时域、空域、视觉、信息熵等冗余,实现高效的视频数据压缩。因此,混合视频编码结构被后续每一代视频编码标准沿用至今。由国际电信联盟-电信标准化组织(International Telecommunication Union-Telecommunication standardization sector,ITU-T)的视频编码专家组(Video Coding Experts Group,VCEG)和国际标准化组织/国际电工委员会(International Organization for Standardization/International Electrotechnical Commission,ISO/IEC)的运动图像专家组(Moving Picture Experts Group,MPEG)同共成立的视频编码联合工作组(Joint Collaborative Team on Video Coding,JCT-VC)于2013年发布了高效视频编码(High Efficiency Video Coding,HEVC)标准第一版,其压缩性能较上一代标准H.264/AVC提高了一倍,目前HEVC的市场份额在逐年增加,过去几年已出现了一些针对HEVC编码器的编码优化方法。
视频编码中,量化参数(Quantization Parameter,QP)和拉格朗日乘子λ决定着编码视频的失真以及编码所需的比特数,它们之间有着紧密的关系。HEVC编码器采用分级的编码结构,编码帧的量化参数由其在图像组(Group of Picture,GOP)中的位置和编码器输入量化参 数QP 0确定:QP HM=QP 0+ΔQP。HEVC低延时编码配置中,GOP大小为4,相应的ΔQP取值分别为3、2、3和1。然后,编码中采用的拉格朗日乘子由QP HM计算得到:
Figure PCTCN2020102635-appb-000001
这里的W L是一个与编码帧所属层级相关的权重因子,其取值一定程度上考虑了不同层级编码帧的率失真重要性。另外,在HEVC的R-λ码率控制算法中,首先确定待编码帧或编码树单元(Coding Tree Unit,CTU)的拉格朗日乘子;然后量化参数由拉格朗日乘子λ计算:QP=4.2005×ln(λ)+13.7122。
混合视频编码框架下,预测编码技术为编码器实现高效视频压缩作出了非常大的贡献,帧内预测和帧间预测有效地去除了视频数据中的空域和时域冗余,然而预测编码也造成了编码帧之间以及基本编码单元之间产生极大的率失真依赖性,即当前的编码决策会影响到后续编码过程可达到的最大率失真性能。有效地利用上述率失真依赖性进行自适应的比特资源分配能进一步提升编码器压缩性能,而比特资源分配可以通过调节编码过程中的量化参数和拉格朗日乘子来实现。
发明内容
本发明利用率失真依赖关系优化编码比特资源分配,提出了一种二次编码优化方法。
本发明的技术方案为:
二次编码优化方法,包括以下步骤:
S1、设置视频序列起始帧为I帧,层级设为Level 0,并作为一个单独的GOP;对起始帧I帧进行优化,具体为根据编码器的输入量化参数QP 0范围设置I帧量化参数QP I
Figure PCTCN2020102635-appb-000002
S2、编码器读入一个GOP的待编码帧;
S3、第一次编码:采用HEVC默认设置的量化参数QP HM,i对当前帧进行第一次编码,以得到当前帧的帧级时域影响因子k i和帧内所有16×16像素块的块级时域影响因子k B,j
Figure PCTCN2020102635-appb-000003
Figure PCTCN2020102635-appb-000004
D i
Figure PCTCN2020102635-appb-000005
分别是当前帧的编码失真和运动补偿预测误差;D B,j
Figure PCTCN2020102635-appb-000006
分别是当前帧中第j个16×16像素块的编码失真和运动补偿预测误差;
S4、第一次编码结束后恢复编码器的参考列表信息,即第一次编码不输出当前帧的码流和存储重建图像,编码后重置编码器中图像链表到编码当前帧之前的状态,包括恢复图像链表中的参考帧标识;
S5、判断场景是否切换,若是,则进入步骤S6,若否,则进入步骤S7;判断方法是:若
Figure PCTCN2020102635-appb-000007
并且p i>10,则判定当前帧发生了场景切换,其中p i是当前帧的平均运动补偿预测绝对误差,
Figure PCTCN2020102635-appb-000008
是之前6帧的平均运动补偿预测绝对误差的均值;
S6、设置当前帧量化参数QP i=QP 0,然后进行编码,并按编码器默认的方式输出码流和存储重建图像,进入步骤S8;
S7、设置当前帧量化参数
Figure PCTCN2020102635-appb-000009
其中QP HM,i是当前帧在原始编码器中设置的量化参数,Round(·)为四舍五入运算符;若当前帧是关键帧,则增大QP i造成的编码质量损失会因为关键帧对后续多帧的直接失真传播被成倍放大,从而节省的比特数不足以抵消编码质量的总损失,最终可能造成编码性能下降,因此当前步骤不对关键帧的量化参数进行调整;
由QP i计算得到帧级拉格朗日乘子λ p后,通过下面公式得到编码当前帧中每一个CTU的拉格朗日乘子λ n和量化参数QP n
Figure PCTCN2020102635-appb-000010
Figure PCTCN2020102635-appb-000011
Figure PCTCN2020102635-appb-000012
Figure PCTCN2020102635-appb-000013
QP n=4.2005×ln(λ n)+13.7122
其中M是第n个CTU中包括的16×16像素块个数,N是编码帧中CTU的个数,w n
Figure PCTCN2020102635-appb-000014
和W n为中间变量,采用计算得到的拉格朗日乘子λ n以及量化参数QP n编码当前帧中的每个CTU,并按编码器默认的方式输出码流和存储重建图像;
S8、判断被编码帧是否为视频序列最后一帧,若是,则编码结束;否则继续判断被编码帧是否为当前GOP中的最后一帧,若是,则回到步骤S2,否则回到步骤S3。
本发明的方案与传统方法的区别点包括:提出帧级时域影响因子k i和块级时域影响因子k B,j以度量率失真依赖性。优化视频序列起始I帧,I帧的编码质量决定了后续P/B帧编码可达到的最大率失真性能,适当改善I帧质量能为整个编码视频带来一定的率失真性能提升。由于高码率时率失真依赖性较弱,低码率时率失真依赖性较强,本发明根据编码器的输入量化参数QP 0范围设置I帧量化参数QP I。采用简化的编码过程获得帧级时域影响因子k i和块级时域影响因子k B,j。为了降低运算复杂度,第一次编码的RDO模式选择过程跳过了大部分模式判断,仅采用64×64、32×32和16×16的帧间预测模式。根据是否发生场景切换,对编码帧采用不同的优化策略。
本发明的有益效果是:
通过简化的第一次编码得到当前帧与参考帧之间的率失真依赖强度,以及当前帧中各编码块对后续编码过程的率失真重要程度,进而用于指导第二次编码的帧级和CTU级编码资源优化。在HEVC编码器HM-16.7中,本发明在编码复杂度平均增加23%的情况下,在低延时B帧(LDB)和低延时P帧(LDP)两种编码配置中分别获得了平均5.1%和5.3%的码率节省。
附图说明
图1是本发明的主要的流程图;
图2是HEVC低延时编码中的参考关系举例示意图;
图3是本发明中的帧级时域影响因子k i统计图;
图4是本发明中的块级时域影响因子k B,j可视频化示例示意图;
图5是率失真曲线对比示意图;
图6是本发明相对HEVC编码器的编码时间增加和码率节省示意图。
具体实施方式
下面结合附图和仿真示例对本发明作进一步说明,并指出本发明的有效性。
实施例
实施例采用开发环境为Visual Studio 2013,实施例基于HEVC参考软件HM-16.7实现。
图1是二次编码优化方法的主要步骤流程图,具体而言包括:
步骤1:视频序列起始帧优化。根据编码器的输入量化参数QP 0范围设置I帧量化参数QP I
Figure PCTCN2020102635-appb-000015
步骤2:以HM-16.7默认的方式读入一个GOP的待编码帧。
步骤3:采用简化的编码过程进行第一次编码。使用HEVC默认的量化参数设置和拉格朗日乘子计算方式对当前帧进行第一次编码,从而获得帧级和16×16像素块级的运动补偿预测误差、编码失真等信息,然后根据公式计算当前帧的帧级时域影响因子k i和帧内所有16×16像素块的块级时域影响因子k B,j
步骤4:恢复参考列表等信息。第一次编码不输出当前帧的码流和存储重建图像,编码后重置编码器中图像链表到编码当前帧之前的状态,包括恢复图像链表中的参考帧标识。
步骤5:判断场景切换,若是则进入步骤6,否则进入步骤7。场景切换判断方法为:若
Figure PCTCN2020102635-appb-000016
并且p i>10,则判定为第i帧发生了场景切换,其中p i是当前帧的平均运动补偿预测绝对误差,
Figure PCTCN2020102635-appb-000017
是之前6帧的平均运动补偿预测绝对误差的均值。
步骤6:设置当前帧量化参数QP i=QP 0,然后进行编码,并按编码器默认的方式输出码流和存储重建图像。
步骤7:设置当前帧量化参数
Figure PCTCN2020102635-appb-000018
其中QP HM,i是当前帧在原始HEVC编码器HM中设置的量化参数,Round(·)为四舍五入运算符。需要说明的是,上述量化参数设置只对层级为2和3的编码帧操作,关键帧的量化参数保持原始HEVC编码器中的设置。
由QP i计算得到帧级拉格朗日乘子λ p后,通过下面公式得到编码当前帧中每一个CTU的拉格朗日乘子λ n和量化参数QP n
Figure PCTCN2020102635-appb-000019
Figure PCTCN2020102635-appb-000020
Figure PCTCN2020102635-appb-000021
Figure PCTCN2020102635-appb-000022
QP n=4.2005×ln(λ n)+13.7122
其中M是第n个CTU中包括的16×16像素块个数,N是编码帧中CTU的个数。最终,对于没有发生场景切换的情况,采用上述计算的拉格朗日乘子λ n和量化参数QP n编码当前帧中的每个CTU,并按编码器默认的方式输出码流和存储重建图像。
步骤8:判断被编码帧是否为视频序列最后一帧。“是”则编码结束;“不是”则判断被编码帧是否为当前GOP中的最后一帧。“是”则跳转至步骤2读取下一个GOP数据;“不是”则跳转至步骤3编码当前GOP中的下一帧。
本发明编码生成的比特流符合HEVC标准的句法格式,生成的比特流均可以被标准的HEVC解码器解码。按照HEVC通用测试条件进行编码实验,测试了LDB和LDP两种 编码器配置,其参考关系如图2所示。从图3和图4可以看出,本发明提出的帧级时域影响因子k i和块级时域影响因子k B,j有效地表示了率失真依赖性。
图5为测试序列PartyScene在LDB和LDP编码配置中的率失真曲线对比,可以看出,本发明的率失真性能在低码率和高码率时都优于原始HEVC编码器HM-16.7。
图6为本发明相对原始HEVC编码器HM-16.7的编码时间增加和码率节省示意图,可以看出,在编码复杂度平均增加23%的情况下,本发明在LDB和LDP配置下分别获得了平均5.1%和5.3%的码率节省,显示了较大的率失真性能提升。

Claims (1)

  1. 二次编码优化方法,其特征在于,包括以下步骤:
    S1、设置视频序列起始帧为I帧,层级设为Level 0,并作为一个单独的GOP;对起始帧I帧进行优化,具体为根据编码器的输入量化参数QP 0范围设置I帧量化参数QP I
    Figure PCTCN2020102635-appb-100001
    S2、编码器读入一个GOP的待编码帧;
    S3、第一次编码:采用HEVC默认设置的量化参数QP HM,i对当前帧进行第一次编码,以得到当前帧的帧级时域影响因子k i和帧内所有16×16像素块的块级时域影响因子k B,j
    Figure PCTCN2020102635-appb-100002
    Figure PCTCN2020102635-appb-100003
    D i
    Figure PCTCN2020102635-appb-100004
    分别是当前帧的编码失真和运动补偿预测误差;D B,j
    Figure PCTCN2020102635-appb-100005
    分别是当前帧中第j个16×16像素块的编码失真和运动补偿预测误差;
    S4、第一次编码结束后恢复编码器的参考列表信息,即第一次编码不输出当前帧的码流和存储重建图像,编码后重置编码器中图像链表到编码当前帧之前的状态,包括恢复图像链表中的参考帧标识;
    S5、判断场景是否切换,若是,则进入步骤S6,若否,则进入步骤S7;判断方法是:若
    Figure PCTCN2020102635-appb-100006
    并且p i>10,则判定当前帧发生了场景切换,其中p i是当前帧的平均运动补偿预测绝对误差,p是之前6帧的平均运动补偿预测绝对误差的均值;
    S6、设置当前帧量化参数QP i=QP 0,然后进行编码,并按编码器默认的方式输出码流和存储重建图像,进入步骤S8;
    S7、设置当前帧量化参数
    Figure PCTCN2020102635-appb-100007
    其中QP HM,i是当前帧在原始编码器中设置的量化参数,Round(·)为四舍五入运算符;
    由QP i计算得到帧级拉格朗日乘子λ p后,通过下面公式得到编码当前帧中每一个CTU的拉格朗日乘子λ n和量化参数QP n
    Figure PCTCN2020102635-appb-100008
    Figure PCTCN2020102635-appb-100009
    Figure PCTCN2020102635-appb-100010
    Figure PCTCN2020102635-appb-100011
    QP n=4.2005×ln(λ n)+13.7122
    其中M是第n个CTU中包括的16×16像素块个数,N是编码帧中CTU的个数,w n
    Figure PCTCN2020102635-appb-100012
    和W n为中间变量,采用计算得到的拉格朗日乘子λ n以及量化参数QP n编码当前帧中的每个CTU,并按编码器默认的方式输出码流和存储重建图像;
    S8、判断被编码帧是否为视频序列最后一帧,若是,则编码结束;否则继续判断被编码帧是否为当前GOP中的最后一帧,若是,则回到步骤S2,否则回到步骤S3。
PCT/CN2020/102635 2019-12-16 2020-07-17 二次编码优化方法 WO2021120614A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911292705.4A CN110933430B (zh) 2019-12-16 2019-12-16 二次编码优化方法
CN201911292705.4 2019-12-16

Publications (1)

Publication Number Publication Date
WO2021120614A1 true WO2021120614A1 (zh) 2021-06-24

Family

ID=69862713

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/102635 WO2021120614A1 (zh) 2019-12-16 2020-07-17 二次编码优化方法

Country Status (3)

Country Link
US (1) US11240503B2 (zh)
CN (1) CN110933430B (zh)
WO (1) WO2021120614A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933430B (zh) * 2019-12-16 2022-03-25 电子科技大学 二次编码优化方法
CN113747154B (zh) * 2021-08-27 2024-06-21 杭州当虹科技股份有限公司 码率控制方法及编码器
CN114422783B (zh) * 2021-12-07 2024-04-12 网宿科技股份有限公司 视频编码方法、电子设备及存储介质
CN114554211A (zh) * 2022-01-14 2022-05-27 百果园技术(新加坡)有限公司 内容自适应视频编码方法、装置、设备和存储介质
CN116567242A (zh) * 2022-01-27 2023-08-08 腾讯科技(深圳)有限公司 图像处理方法、装置及设备
CN115695801A (zh) * 2022-10-18 2023-02-03 电子科技大学 一种考虑时域失真传播的低复杂度全景视频编码方法
US12120311B2 (en) * 2023-02-08 2024-10-15 Realtek Semiconductor Corp. Encoder and associated signal processing method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079933A (zh) * 2014-07-09 2014-10-01 上海君观信息技术有限公司 适用于hevc的低延时码率控制方法及比特数分配方法
CN104125469A (zh) * 2014-07-10 2014-10-29 中山大学 一种用于hevc的快速编码方法
CN107040782A (zh) * 2017-04-21 2017-08-11 上海电力学院 基于拉格朗日方法的视频编码全局率失真优化方法
US20180324426A1 (en) * 2017-05-03 2018-11-08 Novatek Microelectronics Corp. Video processing method
CN108900838A (zh) * 2018-06-08 2018-11-27 宁波大学 一种基于hdr-vdp-2失真准则的率失真优化方法
CN110933430A (zh) * 2019-12-16 2020-03-27 电子科技大学 二次编码优化方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1206864C (zh) * 2002-07-22 2005-06-15 中国科学院计算技术研究所 结合率失真优化的码率控制的方法及其装置
US8135063B2 (en) * 2006-09-08 2012-03-13 Mediatek Inc. Rate control method with frame-layer bit allocation and video encoder
JP5188875B2 (ja) * 2007-06-04 2013-04-24 株式会社エヌ・ティ・ティ・ドコモ 画像予測符号化装置、画像予測復号装置、画像予測符号化方法、画像予測復号方法、画像予測符号化プログラム、及び画像予測復号プログラム
CN102780886B (zh) * 2012-07-23 2016-02-03 深圳广晟信源技术有限公司 一种率失真优化方法
CN105992004B (zh) * 2015-02-13 2019-03-22 北京博雅华录视听技术研究院有限公司 基于视频编码标准的图像编码码率控制方法
CN106657998B (zh) * 2016-09-20 2019-04-16 杭州比特瑞旺电脑有限公司 一种kvm视频编码量化参数范围控制方法
US10674158B2 (en) * 2017-06-15 2020-06-02 Beamr Imaging Ltd Method and system of video coding optimization
US10469854B2 (en) * 2017-06-21 2019-11-05 Intel Corporation Content, psychovisual, region of interest, and persistence based adaptive quantization for video coding
CN111164980A (zh) * 2017-11-30 2020-05-15 深圳市大疆创新科技有限公司 用于控制图像帧内的视频编码的系统和方法
WO2019104635A1 (en) * 2017-11-30 2019-06-06 SZ DJI Technology Co., Ltd. System and method for controlling video coding at frame level
EP3725081A4 (en) * 2017-12-13 2021-08-18 Nokia Technologies Oy APPARATUS, METHOD AND COMPUTER PROGRAM FOR CODING AND DECODING OF VIDEO

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079933A (zh) * 2014-07-09 2014-10-01 上海君观信息技术有限公司 适用于hevc的低延时码率控制方法及比特数分配方法
CN104125469A (zh) * 2014-07-10 2014-10-29 中山大学 一种用于hevc的快速编码方法
CN107040782A (zh) * 2017-04-21 2017-08-11 上海电力学院 基于拉格朗日方法的视频编码全局率失真优化方法
US20180324426A1 (en) * 2017-05-03 2018-11-08 Novatek Microelectronics Corp. Video processing method
CN108900838A (zh) * 2018-06-08 2018-11-27 宁波大学 一种基于hdr-vdp-2失真准则的率失真优化方法
CN110933430A (zh) * 2019-12-16 2020-03-27 电子科技大学 二次编码优化方法

Also Published As

Publication number Publication date
CN110933430A (zh) 2020-03-27
US11240503B2 (en) 2022-02-01
CN110933430B (zh) 2022-03-25
US20210185318A1 (en) 2021-06-17

Similar Documents

Publication Publication Date Title
WO2021120614A1 (zh) 二次编码优化方法
KR102468143B1 (ko) 이산 여현 변환/이산 정현 변환을 선택적으로 이용하는 부호화/복호화 장치 및 방법
US8582904B2 (en) Method of second order prediction and video encoder and decoder using the same
TWI626842B (zh) Motion picture coding device and its operation method
CN103959774B (zh) 用于高效视频编码的运动信息的有效存储
US20070274396A1 (en) Complexity adaptive skip mode estimation for video encoding
CA2886995C (en) Rate-distortion optimizers and optimization techniques including joint optimization of multiple color components
KR20110071231A (ko) 부호화 방법, 복호화 방법 및 장치
KR20090099234A (ko) 영상의 부호화, 복호화 방법 및 장치
WO2012159306A1 (zh) 一种预测编码的方法及装置
CN101984665A (zh) 一种视频传输质量评测的方法与系统
WO2018120797A1 (zh) 一种用于帧间预测帧中的帧内预测方法
CN106937112A (zh) 基于h.264视频压缩标准的码率控制方法
CN102271256A (zh) 基于模式决策的自适应帧组分布式视频编码和解码方法
WO2024082580A1 (zh) 一种考虑时域失真传播的低复杂度全景视频编码方法
CN110351552B (zh) 视频编码中一种快速编码方法
CN110365975A (zh) 一种avs2视频编解码标准优化方案
CN103581682B (zh) 一种hevc帧内编码的快速模式决策算法及其应用
CN116055726A (zh) 一种低延迟分层视频编码方法、计算机设备及介质
CN110300302B (zh) 一种视频编码方法、装置和存储介质
CN101867818B (zh) 宏块模式的选择方法和装置
CN115002482B (zh) 使用结构性保持运动估计的端到端视频压缩方法及系统
KR20110099554A (ko) 영상의 복잡도를 이용한 h.264/avc 부호화기의 양자화 파라미터 결정 방법 및 이를 구현하는 h.264/avc 부호화기
CN114827616B (zh) 一种基于时空信息平衡的压缩视频质量增强方法
CN112887714B (zh) 一种视频编码比特资源重分配方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20901067

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20901067

Country of ref document: EP

Kind code of ref document: A1