WO2016033725A1 - Block segmentation mode processing method in video coding and relevant apparatus - Google Patents

Block segmentation mode processing method in video coding and relevant apparatus Download PDF

Info

Publication number
WO2016033725A1
WO2016033725A1 PCT/CN2014/085681 CN2014085681W WO2016033725A1 WO 2016033725 A1 WO2016033725 A1 WO 2016033725A1 CN 2014085681 W CN2014085681 W CN 2014085681W WO 2016033725 A1 WO2016033725 A1 WO 2016033725A1
Authority
WO
WIPO (PCT)
Prior art keywords
video frame
block
coding block
region
segmentation
Prior art date
Application number
PCT/CN2014/085681
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Priority to PCT/CN2014/085681 priority Critical patent/WO2016033725A1/en
Priority to CN201480080086.1A priority patent/CN106664404B/en
Publication of WO2016033725A1 publication Critical patent/WO2016033725A1/en

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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

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

Abstract

A block segmentation processing method in video coding and a relevant apparatus. The block segmentation processing method in video coding comprises: acquiring a subdivided region of a video frame, wherein the subdivided region of the video frame comprises at least one of a region of interest of the video frame and a fringe region of the video frame; determining that a first coding block of the video frame contains pixel points in the subdivided region; and segmenting the first coding block into sub-blocks. The solution provided in the embodiments of the present invention facilitates reduction of computation complexity for judging whether a coding block is segmented into sub-blocks.

Description

视频编码中的块分割方式处理方法和相关装置Block division method processing method and related device in video coding 技术领域Technical field
本发明涉及视频编解码技术领域,具体涉及视频编码中的块分割处理方法和相关装置。The present invention relates to the field of video codec technology, and in particular, to a block segmentation processing method and related device in video coding.
背景技术Background technique
自从国际电信联盟(英文:international telegraph union,缩写:ITU)在1984年推出第一个视频编码国际标准H.120以来,视频编码技术已经获得了迅猛蓬勃的发展,已成为了现代信息技术中不可或缺的重要组成部分。随着因特网(英文:internet)、无线通讯网和数字广播网的快速发展,人们对获取多媒体信息的需求日益旺盛,而视频编码技术是有效传输和存储视频信息的关键技术之一。Since the International Telegraph Union (ITU) introduced the first international video coding standard H.120 in 1984, video coding technology has achieved rapid development and has become a modern information technology. An important part of the deficiencies. With the rapid development of the Internet (internet), wireless communication networks and digital broadcasting networks, people are increasingly demanding access to multimedia information, and video coding technology is one of the key technologies for efficient transmission and storage of video information.
视频编码技术的目标是在同样压缩率下取得更好的画面质量,或者是在同样的画质下实现更大的压缩率。可见,压缩率和画质是一对编码技术需要权衡的重要指标,在编码技术一定的条件下,一个指标的提高通常必然带来另一个指标的降低。The goal of video coding technology is to achieve better picture quality at the same compression ratio, or to achieve greater compression ratio under the same picture quality. It can be seen that the compression ratio and image quality are important indicators that need to be weighed by a pair of coding techniques. Under certain conditions of coding technology, the improvement of one index usually leads to the decrease of another index.
画质的评价一般分为主观评价标准和客观评价标准。在目前已发布的主流视频编码技术标准中,主要基于峰值信噪比这一客观参数来作为画质好坏的评价标准,这就是一种客观评价标准。画质好坏最终需要人眼来判断,客观评价标准只是用来在一定程度上模拟人眼对画质的感受,客观评价标准虽然具有一定参考意义,但是客观画质与人眼主观画质之间并不总是保持一致的。例如图1所示的左右画面的峰值信噪比(英文:peak signal to noise ratio,缩写:PSNR)相同,但是右图的主观质量明显要比左图要好,原因就在于右图将比特资源偏重分配于画面中人脸五官所在区域,而人脸部分是人眼较为敏感的区域,这样就较大的提高了人眼对画质的主观感受。这也正是基于视觉感知的视频编码技术的由来。The evaluation of image quality is generally divided into subjective evaluation criteria and objective evaluation criteria. In the current mainstream video coding technology standards, the objective parameter based on the peak signal-to-noise ratio is used as the evaluation standard for the picture quality. This is an objective evaluation standard. The quality of the image quality needs to be judged by the human eye. The objective evaluation standard is only used to simulate the human eye's perception of the image quality to a certain extent. Although the objective evaluation standard has certain reference significance, the objective image quality and the subjective image quality of the human eye. It is not always consistent. For example, the peak signal to noise ratio (PSNR) of the left and right pictures shown in Figure 1 is the same, but the subjective quality of the right picture is obviously better than the left picture. The reason is that the right picture biases the bit resources. It is allocated to the area where the facial features of the face are located in the picture, and the face part is a sensitive area of the human eye, which greatly enhances the subjective feeling of the human eye on the picture quality. This is also the origin of video coding technology based on visual perception.
科学研究发现,人类视觉系统(英文:human visual system,缩写:HVS)对于视频画面中的部分区域或特征较为敏感。根据这一特性研究人员提出了基于视觉感知的视频编码,其目的是利用已知的HVS特性,较大限度消除人眼 无法或难以感知的信息,期望用更少的比特资源提供视觉感知质量更理想的视频帧。Scientific research has found that the human visual system (English: human visual system, abbreviation: HVS) is sensitive to some areas or features in the video picture. According to this characteristic, the researchers proposed video coding based on visual perception, the purpose of which is to eliminate the human eye with a large extent by using the known HVS characteristics. Information that is not or difficult to perceive, it is desirable to provide visually perceived quality video frames with fewer bit resources.
在传统基于视觉感知的视频编码过程中,对于视频帧中的任何一级(即任何一种划分深度)的任何一个编码块(英文:coding unit,缩写:CU),都是通过计算和比较该CU进行子块划分前后的率失真大小,来确定是否对该CU继续进行子块划分,这样导致需要大量的计算资源。In the traditional video-aware video coding process, any coding block (English: coding unit, abbreviation: CU) for any level (ie, any kind of depth) in a video frame is calculated and compared. The CU performs rate distortion before and after sub-block partitioning to determine whether to continue sub-block partitioning for the CU, which results in a large amount of computing resources.
发明内容Summary of the invention
本发明实施例提供视频编码中的块分割处理方法和相关装置,以降低确定编码块是否进行子块分割的计算复杂度。Embodiments of the present invention provide a block segmentation processing method and related apparatus in video coding to reduce computational complexity of determining whether a coded block performs sub-block segmentation.
本发明实施例第一方面提供一种视频编码中的块分割处理方法,包括:A first aspect of the embodiments of the present invention provides a block segmentation processing method in video coding, including:
获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;Obtaining a subdivided region of the video frame, wherein the subdivided region of the video frame includes at least one of a region of interest of the video frame and an edge region of the video frame;
确定所述视频帧的第一编码块包含所述细分区域中的像素点;Determining that the first coded block of the video frame includes pixel points in the subdivided region;
将所述第一编码块进行子块分割。The first coding block is subjected to sub-block division.
结合第一方面,在第一方面的第一种可能的实施方式中,在所述将所述第一编码块进行子块分割之前,所述方法还包括:确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。With reference to the first aspect, in a first possible implementation manner of the first aspect, before the performing the sub-block partitioning on the first coding block, the method further includes: determining a current of the first coding block The segmentation depth is less than a first segmentation depth threshold, wherein the first segmentation depth threshold is less than or equal to a maximum allowable segmentation depth of the video frame.
结合第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述确定所述视频帧的第一编码块包含所述细分区域中的像素点,包括:确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the subdivision region of the video frame includes a region of interest of the video frame and the video frame An edge region; wherein the determining that the first coding block of the video frame includes pixel points in the subdivided region comprises: determining that the first coding block of the video frame includes the region of interest and the edge The pixel of the overlapping area of the area.
结合第一方面的第一种可能的实施方式,在第一方面的第三种可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述确定所述视频帧的第一编码块包含所述细分区域中的像素点,包括:确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块 包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;In conjunction with the first possible implementation of the first aspect, in a third possible implementation of the first aspect, the subdivision region of the video frame includes a region of interest of the video frame and the video frame An edge region, wherein the determining that the first coding block of the video frame includes a pixel in the subdivided region comprises: determining that a first coding block of the video frame includes a pixel in the region of interest And not including a pixel in an edge region of the video frame, or determining a first coding block of the video frame Pixel points in an edge region of the video frame and pixels in the region of interest of the video frame are not included;
其中,所述将所述第一编码块进行子块分割之前,Before the first coding block is divided into sub-blocks,
所述方法还包括:确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The method further includes determining that a rate distortion penalty of the first coding block is greater than a rate distortion penalty of the first coding block for sub-block division.
本发明实施例第二方面提供一种视频编码中的块分割处理装置,包括:A second aspect of the embodiments of the present invention provides a block segmentation processing device in video coding, including:
获取单元,用于获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;An acquiring unit, configured to acquire a subdivided area of the video frame, where the subdivided area of the video frame includes at least one of a region of interest of the video frame and an edge region of the video frame;
确定单元,用于确定所述视频帧的第一编码块包含所述细分区域中的像素点;a determining unit, configured to determine that the first coding block of the video frame includes pixel points in the subdivided region;
分割单元,用于将所述第一编码块进行子块分割。And a dividing unit, configured to perform sub-block segmentation on the first coding block.
结合第二方面,在第二方面的第一种可能的实施方式中,In conjunction with the second aspect, in a first possible implementation of the second aspect,
所述确定单元还用于,在所述将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。The determining unit is further configured to: before the sub-block division of the first coding block, determine that a current segmentation depth of the first coding block is smaller than a first segmentation depth threshold, where the first segmentation depth The threshold is less than or equal to the maximum allowed segmentation depth of the video frame.
结合第二方面的第一种可能的实施方式,在第二方面的第二种可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,在所述确定所述视频帧的第一编码块包含所述细分区域中的像素点的方面,所述确定单元具体用于,确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the subdivision region of the video frame includes a region of interest of the video frame and the video frame An edge region; wherein, in the determining that the first coding block of the video frame includes a pixel point in the subdivided region, the determining unit is specifically configured to determine that the first coding block of the video frame includes a pixel point of the region of interest and the overlapping region of the edge region.
结合第二方面的第一种可能的实施方式,在第二方面的第三种可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,在所述确定所述视频帧的第一编码块包含所述细分区域中的像素点的方面,所述确定单元具体用于,确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the subdivided area of the video frame includes a region of interest of the video frame and the video frame An edge region; wherein, in the determining that the first coding block of the video frame includes a pixel point in the subdivided region, the determining unit is specifically configured to determine that the first coding block of the video frame includes a pixel in the region of interest and not including a pixel in an edge region of the video frame, or determining that a first encoded block of the video frame includes a pixel in an edge region of the video frame and does not include a pixel in a region of interest of the video frame;
其中,所述确定单元还用于,将所述第一编码块进行子块分割之前,确定 所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The determining unit is further configured to: determine, before the sub-block is divided into the first coding block, determine The rate distortion penalty of the first coding block is greater than the rate distortion cost of the first coding block after sub-block division.
本发明实施例第三方面提供一种视频编码装置,包括:A third aspect of the embodiments of the present invention provides a video encoding apparatus, including:
处理器和存储器,Processor and memory,
其中,通过运行所述存储器中存储的指令或代码,所述处理器用于获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;确定所述视频帧的第一编码块包含所述细分区域中的像素点;将所述第一编码块进行子块分割。The processor is configured to acquire a subdivided area of a video frame by running an instruction or code stored in the memory, where a subdivided area of the video frame includes a region of interest of the video frame and the video At least one of edge regions of the frame; determining that the first coded block of the video frame includes pixel points in the subdivided region; and sub-blocking the first coded block.
结合第三方面,在第三方面的第一种可能的实施方式中,所述处理器还用于在所述将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。With reference to the third aspect, in a first possible implementation manner of the third aspect, the processor is further configured to determine, by the first coding block, the first coding block before performing the sub-block division The current segmentation depth is less than a first segmentation depth threshold, wherein the first segmentation depth threshold is less than or equal to a maximum allowable segmentation depth of the video frame.
结合第三方面的第一种可能的实施方式,在第三方面的第二种可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述处理器用于确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the subdivision region of the video frame includes a region of interest of the video frame and the video frame An edge region; wherein the processor is configured to determine that a first coded block of the video frame includes pixel points of the region of interest and an overlap region of the edge region.
结合第三方面的第一种可能的实施方式,在第三方面的第三种可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述处理器用于,确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;With reference to the first possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the subdivision region of the video frame includes a region of interest of the video frame and the video frame An edge region, wherein the processor is configured to determine that a first coding block of the video frame includes a pixel point in the region of interest and does not include a pixel point in an edge region of the video frame, or determine the A first coded block of a video frame includes pixel points in an edge region of the video frame and does not include pixel points in a region of interest of the video frame;
其中,所述处理器还用于,在将所述第一编码块进行子块分割之前,确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The processor is further configured to: before performing the sub-block division on the first coding block, determining that a rate distortion cost of the first coding block is greater than a rate distortion of the first coding block after performing sub-block division cost.
可以看出,本发明一些实施例的技术方案中,在视频编码过程中,在获取视频帧的细分区域之后,当确定所述视频帧的第一编码块包含所述细分区域中的像素点,将所述第一编码块进行子块分割,其中,所述视频帧的细分区域包 括所述视频帧的ROI和所述视频帧的边缘区域中的至少一个,也就是说,视频帧的第一编码块与细分区域之间的相对位置关系可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本发明的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对计算资源的占用。It can be seen that, in the technical solution of some embodiments of the present invention, in the video encoding process, after acquiring the subdivided area of the video frame, when determining that the first coding block of the video frame includes the pixel in the subdivided area Pointing, the first coding block is subjected to sub-block division, wherein the subdivision area packet of the video frame Enclosing at least one of an ROI of the video frame and an edge region of the video frame, that is, a relative positional relationship between the first coding block of the video frame and the subdivision region may determine the number to some extent Whether a coded block performs sub-block partitioning at the current segmentation depth, which is a conventional mechanism for determining whether to continue sub-block partitioning of the current coded block by completely calculating and comparing the rate distortions before and after the current coded block partition. The foregoing technical solution of the present invention is advantageous for reducing the computational complexity of determining whether the current coding block performs sub-block segmentation under the current segmentation depth, thereby facilitating reduction of occupation of computing resources.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following description of the embodiments will be briefly described. It is obvious that the drawings in the following description are only some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1-a为本发明的实施例提供的一种视频编码中的块分割处理方法的流程示意图;FIG. 1 is a schematic flowchart of a block segmentation processing method in video coding according to an embodiment of the present invention;
图1-b为本发明的实施例提供的一种索伯算子的示意图;FIG. 1-b is a schematic diagram of a Sauber operator according to an embodiment of the present invention; FIG.
图1-c为本发明的实施例提供的一种腐蚀模板的示意图;FIG. 1-c is a schematic diagram of an etching template according to an embodiment of the present invention; FIG.
图1-d为本发明的实施例提供的一种腐蚀处理的对比示意图;FIG. 1-d is a schematic diagram of comparison of an etching process according to an embodiment of the present invention; FIG.
图2~图7为本发明的实施例提供的另几种视频编码中的块分割处理方法的流程示意图;2 to FIG. 7 are schematic flowcharts of a method for processing a block division in another video coding according to an embodiment of the present invention;
图8-a为本发明的实施例提供的一种视频编码方法的流程示意图;FIG. 8-a is a schematic flowchart of a video encoding method according to an embodiment of the present invention;
图8-b为本发明的实施例提供的一种生成显著性映射图的示意图;FIG. 8-b is a schematic diagram of generating a saliency map according to an embodiment of the present invention;
图9为本发明实施例提供的一种视频编码中的块分割处理装置的示意图;FIG. 9 is a schematic diagram of a block segmentation processing apparatus in video coding according to an embodiment of the present disclosure;
图10为本发明实施例提供的一种视频编码装置的示意图。FIG. 10 is a schematic diagram of a video encoding apparatus according to an embodiment of the present invention.
具体实施方式detailed description
本发明实施例提供视频编码中的块分割处理方法和相关装置,以降低确定编码块是否进行子块分割的计算复杂度。Embodiments of the present invention provide a block segmentation processing method and related apparatus in video coding to reduce computational complexity of determining whether a coded block performs sub-block segmentation.
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结 合本发明实施例中的附图,对本发明实施例中的技术方案进行描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the objects, features and advantages of the present invention more obvious and easy to understand, the following will be The technical solutions in the embodiments of the present invention are described in the accompanying drawings in the embodiments of the present invention. It is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别不同的对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth" and the like in the specification and claims of the present invention and the above drawings are used to distinguish different objects, and are not intended to describe a specific order. . Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products or equipment.
首先介绍本发明实施例提供的视频编码中的块分割处理方法,本发明实施例提供的视频编码中的块分割处理方法的执行主体可为视频编码装置,该视频编码装置可以是任何需输出、存储视频的装置,例如手机、笔记本电脑、平板电脑或个人电脑等设备。The method for the block division processing in the video coding provided by the embodiment of the present invention is first introduced. The execution body of the block division processing method in the video coding provided by the embodiment of the present invention may be a video coding device, and the video coding device may be any output, A device that stores video, such as a mobile phone, laptop, tablet, or personal computer.
本发明视频编码中的块分割处理方法的一个实施例,其中,一种视频编码中的块分割处理方法可以包括:获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域(英文:region of interest,缩写:ROI)和所述视频帧的边缘区域中的至少一个;确定所述视频帧的第一编码块包含所述细分区域中的像素点;将所述第一编码块进行子块分割。An embodiment of the block segmentation processing method in the video coding of the present invention, wherein the block segmentation processing method in the video coding may include: acquiring a subdivision region of the video frame, where the subdivision region of the video frame includes Determining at least one of a region of interest (ROI) of the video frame and an edge region of the video frame; determining that the first coding block of the video frame includes pixels in the subdivided region Pointing; sub-blocking the first coded block.
请参见图1-a,图1-a为本发明的一个实施例提供的一种视频编码中的块分割处理方法的流程示意图。其中,如图1-a举例所示,本发明的一个实施例提供的一种视频编码中的块分割处理方法可包括:Referring to FIG. 1-a, FIG. 1-a is a schematic flowchart diagram of a block segmentation processing method in video coding according to an embodiment of the present invention. As shown in the example of FIG. 1-a, a block segmentation processing method in video coding provided by an embodiment of the present invention may include:
101、获取视频帧的细分区域。101. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的ROI和所述视频帧的边缘区域中的至少一个。The subdivided area of the video frame includes at least one of an ROI of the video frame and an edge area of the video frame.
其中,获取视频帧的细分区域的具体方式可为多种多样的。在本发明的一些可能的实施方式中,例如可以利用区域匹配算法对视频帧进行匹配处理来获取视频帧的细分区域。具体例如,基于区域匹配算法对视频帧进行匹配处理例 如可以识别出视频帧中的哪些区域为细分区域,哪些区域不是细分区域。The specific manner of obtaining the subdivision area of the video frame may be various. In some possible implementation manners of the present invention, for example, a region matching algorithm may be used to perform matching processing on a video frame to obtain a subdivided region of the video frame. Specifically, for example, a matching processing example of a video frame based on a region matching algorithm For example, it can be identified which areas in the video frame are subdivision areas and which areas are not subdivision areas.
或者本发明的一些可能的实施方式中,还可以根据配置文件中的配置指令来获取视频帧的细分区域。具体例如,配置文件中的配置指令可以具体指定了哪些区域为细分区域,哪些区域不是细分区域。当然亦可通过其他方式获取视频帧的细分区域。Or in some possible implementation manners of the present invention, the subdivided area of the video frame may also be obtained according to a configuration instruction in the configuration file. For example, the configuration instructions in the configuration file may specify which areas are subdivision areas and which areas are not subdivision areas. Of course, the subdivision area of the video frame can also be obtained by other means.
102、确定所述视频帧的第一编码块包含所述细分区域中的像素点。102. Determine that a first coding block of the video frame includes a pixel point in the subdivided region.
其中,所述视频帧的第一编码块为所述视频帧中的任意一个编码块。The first coding block of the video frame is any one of the video frames.
第一编码块的当前分割深度可为小于所述视频帧的最大允许分割深度的任意分割深度,也就是说第一编码块的尺寸可为大于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64,32*32,16*16,或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth that is less than the maximum allowed segmentation depth of the video frame, that is, the size of the first coded block may be any size greater than the allowed minimum coding block size. For example, the size of the first code block may be 64*64, 32*32, 16*16, or other sizes allowed.
103、将所述第一编码块进行子块分割。103. Perform sub-block partitioning on the first coding block.
例如可将所述第一编码块分割为4个子编码块或其他数量的子编码块。For example, the first coding block may be partitioned into 4 sub-coded blocks or other numbers of sub-coded blocks.
其中,视频帧的ROI一般是指视频帧中HVS相对敏感的区域或者HVS主要关注的区域。例如可基于区域匹配算法来确定视频帧的ROI,当然亦可根据配置文件中的配置指令来确定视频帧的ROI。The ROI of the video frame generally refers to a relatively sensitive area of the HVS in the video frame or an area that the HVS mainly focuses on. For example, the ROI of the video frame may be determined based on the region matching algorithm, and of course the ROI of the video frame may be determined according to a configuration instruction in the configuration file.
可以理解,不同视频帧的ROI可能并不相同。例如在视频会议或新闻节目等视频中,HVS通常主要关注视频帧中的人脸、视频帧的中央区域等,因此在这类视频视频帧中的人脸所在区域、视频帧的中央区域等可看做视频帧的ROI。又例如对于监控视频帧等,HVS通常主要关注视频帧中的移动物体,因此在这些视频帧中的移动物体所在区域可看做视频帧的ROI。又例如,在一些比赛视频中,HVS可能比较关注持球队员区域,因此,在这类视频帧中持球队员区域可看做视频帧的ROI。当然也可将视频帧中某个特定区域指定为视频帧的ROI,即使该指定区域可能不包含人脸和/或移动物体等,例如在某些实验场景或嫌疑人监控场景,需重点关注视频帧中的某些特定区域,因此,这些区域可能被设定为ROI。当然,在实际应用中也可能存在通过其他方式来获取视频帧的ROI的情况。It can be understood that the ROI of different video frames may not be the same. For example, in video such as video conferences or news programs, HVS usually focuses on the face in the video frame, the central area of the video frame, etc., so the area of the face in the video video frame, the central area of the video frame, etc. Look at the ROI of the video frame. For example, for monitoring video frames and the like, HVS usually focuses on moving objects in video frames, so the area of the moving objects in these video frames can be regarded as the ROI of the video frame. For another example, in some game videos, HVS may be more concerned with the player area, so the player area in such video frames can be seen as the ROI of the video frame. Of course, a certain area in the video frame may also be designated as the ROI of the video frame, even if the designated area may not include a face and/or a moving object, for example, in some experimental scenarios or suspect monitoring scenes, it is necessary to focus on the video. Some specific areas in the frame, so these areas may be set to ROI. Of course, in actual applications, there may be cases where the ROI of the video frame is obtained by other means.
可以理解,某视频帧的感兴趣区域可能是一个连续的像素区域,也可能包 括多个非连续的像素子区域。It can be understood that the region of interest of a video frame may be a continuous pixel area, or may be packaged. A plurality of non-contiguous pixel sub-regions are included.
其中,视频帧的边缘区域是指视频帧中包含边缘像素点的区域。The edge region of the video frame refers to an area in the video frame that includes edge pixels.
其中,检测视频帧中的边缘像素点的方法之一在于确定视频帧中某像素点的四周是否有剧烈的亮度变化。其中,若视频帧中某像素点的四周有剧烈的亮度变化表示该像素点为边缘像素点;否则表示该像素点不是边缘像素点。其中,整个视频帧对应于一个相同尺寸的二值映射图。其中,边缘像素点的检测算法很多,主要流程包括:确定边缘检测算子;利用边缘检测算子对视频帧进行滤波处理,对进行滤波处理后的视频帧进行后处理。Among them, one of the methods for detecting edge pixel points in a video frame is to determine whether there is a sharp brightness change around a certain pixel point in the video frame. Wherein, if there is a sharp brightness change around a pixel in the video frame, the pixel is an edge pixel; otherwise, the pixel is not an edge pixel. Wherein, the entire video frame corresponds to a binary map of the same size. Among them, there are many detection algorithms for edge pixels. The main process includes: determining the edge detection operator; using the edge detection operator to filter the video frame, and post-processing the video frame after filtering.
其中,边缘检测算子是一组当前像素点与当前像素点的周围像素点作运算的法则。例如图1-b所示的索伯算子,当前像素点经滤波后的像素值为上方3个像素值分别乘以第一排的3个系数加上下方3个像素值分别乘以第三排的3个系数的和的平均值;其中,如果滤波后的值超过阈值t0则判断当前像素点为边缘像素点,否则判断当前像素点不为边缘像素点。The edge detection operator is a set of rules for calculating the current pixel point and the surrounding pixel points of the current pixel point. For example, the Sauber operator shown in Figure 1-b, the filtered pixel value of the current pixel is multiplied by the three coefficients of the first row and the three pixels below are multiplied by the third. The average of the sum of the three coefficients of the row; wherein, if the filtered value exceeds the threshold t0, the current pixel point is determined to be an edge pixel point, otherwise the current pixel point is determined not to be an edge pixel point.
进一步的,可对视频帧中被检测到的边缘像素点进行腐蚀处理以去除视频帧中孤立的、稀疏的边缘像素点。通常认为视频帧中存在的这类孤立的、稀疏的边缘像素点是由于视频帧噪声产生的。其中,腐蚀处理也可以用腐蚀模板或通过滤波来完成,例如,可基于图1-c所示的7*7的腐蚀模板(或其他腐蚀模板)来完成图1-d所示的腐蚀处理,其中,图1-d的左边是腐蚀处理前的状态,右边是腐蚀处理后的状态。腐蚀处理中的滤波过程也是当前像素点的周围像素点与模板中对应位置相乘求和,如果和大于0则像素点滤波后值取1,即表示当前像素点为边缘像素点;否则像素点滤波后值取0,即,表示当前像素点不为边缘像素点。Further, edge pixels detected in the video frame may be etched to remove isolated, sparse edge pixels in the video frame. Such isolated, sparse edge pixels present in video frames are generally considered to be due to video frame noise. Wherein, the etching treatment can also be performed by etching the template or by filtering. For example, the etching treatment shown in FIG. 1-d can be completed based on the 7*7 etching template (or other etching template) shown in FIG. 1-c. Among them, the left side of Figure 1-d is the state before the corrosion treatment, and the right side is the state after the corrosion treatment. The filtering process in the etching process is also multiplied by the surrounding pixel points of the current pixel point and the corresponding positions in the template. If the sum is greater than 0, the filtered value of the pixel point is taken as 1, indicating that the current pixel point is an edge pixel point; otherwise, the pixel point The filtered value takes 0, that is, it indicates that the current pixel point is not an edge pixel point.
可以看出,本实施例视频编码过程中,在获取视频帧的细分区域后,当确定所述视频帧的第一编码块包含所述细分区域中的像素点,将所述第一编码块进行子块分割。其中,所述视频帧的细分区域包括所述视频帧的ROI和所述视频帧的边缘区域中的至少一个。也就是说,视频帧的第一编码块与细分区域之间的相对位置关系可在一定程度上决定第一编码块在当前分割深度下是否进行子块分割。因此,相比于完全通过计算和比较当前编码块划分前和划分前后 的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本发明上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对计算资源的占用。It can be seen that, in the video coding process of this embodiment, after obtaining the subdivision area of the video frame, when determining that the first coding block of the video frame includes the pixel in the subdivision area, the first coding is performed. The block performs sub-block division. The subdivided area of the video frame includes at least one of an ROI of the video frame and an edge area of the video frame. That is to say, the relative positional relationship between the first coding block and the subdivision area of the video frame can determine to some extent whether the first coding block performs sub-block division under the current segmentation depth. Therefore, before and after partitioning before and after the calculation and comparison of the current coding block The above-mentioned technical solution of the present invention is advantageous for reducing the computational complexity of determining whether the current coded block performs sub-block segmentation at the current segmentation depth, thereby facilitating the conventional mechanism of determining whether to perform sub-block partitioning on the current coded block. Reduce the occupation of computing resources.
可选的,在本发明的一些可能的实施方式中,在所述将所述第一编码块进行子块分割之前,所述方法还可包括:确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。其中,可从配置文件中获得第一分割深度阈值。Optionally, in some possible implementation manners of the present disclosure, before the performing the sub-block partitioning on the first coding block, the method may further include: determining that a current segmentation depth of the first coding block is smaller than a first partition depth threshold, wherein the first partition depth threshold is less than or equal to a maximum allowed partition depth of the video frame. Wherein, the first segmentation depth threshold can be obtained from the configuration file.
可选的,在本发明的一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域。其中,所述确定所述视频帧的第一编码块包含所述细分区域中的像素点,可包括:确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。即,当所述视频帧的第一编码块包含了所述感兴趣区域和所述边缘区域的重叠区域的像素点,则可将所述第一编码块进行子块分割,这种情况下可无需参考第一编码块划分前和划分前后的率失真的大小关系来确定是否对第一编码块继续进行子块划分。Optionally, in some possible implementation manners of the present invention, the subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame. The determining that the first coding block of the video frame includes the pixel in the subdivided region may include: determining that the first coding block of the video frame includes the region of interest and the edge region The pixels of the overlapping area. That is, when the first coding block of the video frame includes pixel points of the overlapping area of the region of interest and the edge region, the first coding block may be sub-block divided, in this case It is not necessary to refer to the magnitude relationship of the rate distortion before and after the first coding block division to determine whether to continue the sub-block division for the first coding block.
可选的,在本发明一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述确定所述视频帧的第一编码块包含所述细分区域中的像素点,可以包括:确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点。其中,所述将所述第一编码块进行子块分割之前,所述方法还可包括:确定所述第一编码块的率失真代价大于或者等于所述第一编码块进行子块分割后的率失真代价。即,当所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的非重叠区域的像素点,但所述第一编码块未包含所述感兴趣区域和所述边缘区域的重叠区域的像素点,这种情况下还可进一步参考第一编码块子块划分前后的率失真的大小关系来确定是否对第一编码块继续进行子块划分。Optionally, in some possible implementation manners of the present disclosure, the subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame, where the determining the video frame The first coding block including the pixel in the subdivided region may include: determining that the first coding block of the video frame includes a pixel in the region of interest and does not include an edge region of the video frame a pixel, or determining that the first encoded block of the video frame includes pixel points in an edge region of the video frame and does not include pixel points in the region of interest of the video frame. The method may further include: determining that a rate distortion cost of the first coding block is greater than or equal to a size of the first coding block after sub-block division. Rate distortion cost. That is, when the first coding block of the video frame includes pixel points of the region of interest and the non-overlapping region of the edge region, but the first coding block does not include the region of interest and the edge region The pixel points of the overlapping area, in this case, may further refer to the magnitude relationship of the rate distortion before and after the first coding block sub-block division to determine whether to continue the sub-block division for the first coding block.
可选的,在本发明一些可能的实施方式中,所述将所述第一编码块进行子 块分割之前,所述方法还可进一步包括:确定所述第一编码块的当前分割深度小于第二分割深度阈值,其中,所述第二分割深度阈值小于或者等于所述第一分割深度阈值。也就是说,例如当所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的非重叠区域的像素点,但所述第一编码块未包含所述感兴趣区域和所述边缘区域的重叠区域的像素点,这种情况下还可进一步参考第一编码块的当前分割深度和第二分割深度阈值之间的大小关系来确定是否对第一编码块继续进行子块划分。例如,可以将第一编码块的分割深度限制到第二分割深度阈值之内。其中,可从配置文件中获得第二分割深度阈值。第二分割深度阈值可小于或等于第一分割深度阈值,可根据具体需要来设定第二分割深度阈值的大小。Optionally, in some possible implementation manners of the present disclosure, the performing the first coding block Before the block segmentation, the method may further include: determining that the current segmentation depth of the first coded block is less than a second segmentation depth threshold, wherein the second segmentation depth threshold is less than or equal to the first segmentation depth threshold. That is, for example, when the first coding block of the video frame includes pixel points of the region of interest and the non-overlapping region of the edge region, but the first coding block does not include the region of interest and a pixel point of the overlapping area of the edge region, in this case, further determining whether the first coding block continues to perform sub-block division by referring to a size relationship between the current segmentation depth of the first coding block and the second segmentation depth threshold . For example, the segmentation depth of the first coded block may be limited to within the second segmentation depth threshold. Wherein, the second segmentation depth threshold can be obtained from the configuration file. The second segmentation depth threshold may be less than or equal to the first segmentation depth threshold, and the size of the second segmentation depth threshold may be set according to specific needs.
可选的,在本发明一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域。其中,方法还可包括:确定所述视频帧的第二编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第二编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;确定所述第二编码块的率失真代价小于或等于所述第二编码块进行子块分割后的率失真代价;确定所述第二编码块不进行子块分割。即,当所述视频帧的第二编码块包含所述感兴趣区域和所述边缘区域的非重叠区域的像素点,但所述第二编码块未包含所述感兴趣区域和所述边缘区域的重叠区域的像素点,这种情况下还可进一步参考第二编码块子块划分前后的率失真的大小关系来确定是否对第二编码块继续进行子块划分。Optionally, in some possible implementation manners of the disclosure, the subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame. The method may further include: determining that the second coded block of the video frame includes a pixel point in the region of interest and does not include a pixel point in an edge region of the video frame, or determining a number of the video frame The second coding block includes pixel points in an edge region of the video frame and does not include pixel points in a region of interest of the video frame; determining that a rate distortion cost of the second coding block is less than or equal to the second encoding The block performs rate distortion cost after sub-block division; and determines that the second coding block does not perform sub-block division. That is, when the second coding block of the video frame includes pixel points of the region of interest and the non-overlapping region of the edge region, but the second coding block does not include the region of interest and the edge region The pixel points of the overlapping area, in this case, may further refer to the magnitude relationship of the rate distortion before and after the second coding block sub-block division to determine whether to continue the sub-block division for the second coding block.
其中,视频帧的第二编码块可指所述视频帧中的任意一个编码块。Wherein the second coding block of the video frame may refer to any one of the video frames.
其中,第二编码块的当前分割深度可为小于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第二编码块的尺寸可为大于允许的最小编码块尺寸的任意尺寸。例如第二编码块的尺寸可能是64*64,32*32,16*16,或是允许的其他尺寸。The current segmentation depth of the second coding block may be an arbitrary segmentation depth smaller than the maximum allowed segmentation depth of the video frame, that is, the size of the second coding block may be any size larger than the allowed minimum coding block size. For example, the size of the second code block may be 64*64, 32*32, 16*16, or other sizes allowed.
又可选的,在本发明一些可能的实施方式中,所述方法还可包括:确定所述视频帧的第三编码块不包含所述细分区域中的像素点;确定所述第三编码块 不进行子块分割。也就是说,当所述视频帧的第三编码块不包含所述细分区域中的像素点,可以考虑所述第三编码块不进行子块分割,这种情况下可以不进一步参考第三编码块子块划分前后的率失真的大小关系等条件来确定是否对第三编码块继续进行子块划分。Optionally, in some possible implementation manners of the present disclosure, the method may further include: determining that a third coding block of the video frame does not include a pixel in the subdivided region; determining the third encoding Piece Sub-block splitting is not performed. That is, when the third coding block of the video frame does not include the pixel in the subdivided region, it may be considered that the third coding block does not perform sub-block division. In this case, the third reference may be omitted. A condition such as the magnitude relationship of the rate distortion before and after the block sub-block division is determined to determine whether to continue sub-block division for the third coded block.
进一步可选的,在本发明一些可能的实施方式中,所述确定所述第三编码块不进行子块分割之前,所述方法还包括:确定所述第三编码块的当前分割深度大于或等于第三分割深度阈值,其中,所述第三分割深度阈值小于或等于编码块的最大允许分割深度。也就是说,当第三编码块不包含所述细分区域中的像素点,可以将第三编码块的分割深度限制到第三分割深度阈值之内。可从配置文件中获得第三分割深度阈值。第三分割深度阈值可小于或等于第一分割深度阈值。第三分割深度阈值例如可小于或等于第二分割深度阈值。可根据具体需要来设定第三分割深度阈值的大小。Further, optionally, in some possible implementation manners of the present disclosure, before the determining that the third coding block does not perform sub-block division, the method further includes: determining that a current segmentation depth of the third coding block is greater than or Is equal to a third partition depth threshold, wherein the third partition depth threshold is less than or equal to a maximum allowed partition depth of the coding block. That is, when the third coding block does not include the pixel points in the subdivision area, the division depth of the third coding block may be limited to the third division depth threshold. A third split depth threshold can be obtained from the configuration file. The third segmentation depth threshold may be less than or equal to the first segmentation depth threshold. The third segmentation depth threshold may be, for example, less than or equal to the second segmentation depth threshold. The size of the third segmentation depth threshold can be set according to specific needs.
又进一步可选的,在本发明一些可能的实施方式中,所述确定所述第三编码块不进行子块分割之前,所述方法还可包括:确定所述第三编码块的率失真代价小于或等于所述第三编码块进行子块分割后的率失真代价;确定所述第三编码块的当前分割深度小于第三分割深度阈值,其中,所述第三分割深度阈值小于或等于编码块的最大允许分割深度。即,当第三编码块不包含所述细分区域中的像素点,这种情况下也可同时参考第三编码块划分前和划分前后的率失真大小关系等条件来确定是否对第三编码块继续进行子块划分。Still further optionally, in some possible implementation manners of the present disclosure, before the determining that the third coding block does not perform sub-block segmentation, the method may further include: determining a rate distortion cost of the third coding block. a less than or equal to a rate distortion cost of the third coding block after the sub-block division; determining that the current segmentation depth of the third coding block is smaller than a third segmentation depth threshold, wherein the third segmentation depth threshold is less than or equal to the coding The maximum allowable split depth of the block. That is, when the third coding block does not include the pixel in the subdivided region, in this case, the third coding may be determined by referring to conditions such as the relationship between the third coding block before and after the division. The block continues with sub-block partitioning.
其中,视频帧的第三编码块可指所述视频帧中的任意一个编码块。Wherein the third coding block of the video frame may refer to any one of the video frames.
其中,第三编码块的当前分割深度可为小于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第三编码块的尺寸可为大于允许的最小编码块尺寸的任意尺寸。例如第三编码块的尺寸可能是64*64,32*32,16*16,或是允许的其他尺寸。The current segmentation depth of the third coding block may be an arbitrary segmentation depth smaller than the maximum allowed segmentation depth of the video frame, that is, the size of the third coding block may be any size larger than the allowed minimum coding block size. For example, the size of the third code block may be 64*64, 32*32, 16*16, or other sizes allowed.
可选的,在本发明一些可能的实施方式中,所述方法还可包括:确定所述视频帧的第四编码块不包含所述细分区域中的像素点;确定所述第四编码块的率失真代价大于所述第四编码块进行子块分割后的率失真代价。其中,所述第三分割深度阈值小于或等于所述视频帧的最大允许分割深度;确定所述第四编 码块进行子块分割。进一步的,确定所述第四编码块进行子块分割之前,还可确定所述第四编码块的当前分割深度小于第三分割深度阈值。其中,可从配置文件中获得第三分割深度阈值。第三分割深度阈值可小于或等于第一分割深度阈值。第三分割深度阈值例如可小于或等于第二分割深度阈值。可根据具体需要来设定第三分割深度阈值的大小。Optionally, in some possible implementation manners of the present disclosure, the method may further include: determining that a fourth coding block of the video frame does not include a pixel in the subdivided region; determining the fourth coding block The rate distortion penalty is greater than the rate distortion cost of the fourth code block after sub-block segmentation. The third segmentation depth threshold is less than or equal to a maximum allowable segmentation depth of the video frame; determining the fourth series The code block performs sub-block division. Further, before determining that the fourth coding block performs sub-block division, the current segmentation depth of the fourth coding block may be determined to be smaller than a third segmentation depth threshold. Wherein, the third segmentation depth threshold can be obtained from the configuration file. The third segmentation depth threshold may be less than or equal to the first segmentation depth threshold. The third segmentation depth threshold may be, for example, less than or equal to the second segmentation depth threshold. The size of the third segmentation depth threshold can be set according to specific needs.
其中,视频帧的第四编码块可指所述视频帧中的任意一个编码块。Wherein the fourth coding block of the video frame may refer to any one of the video frames.
其中,第四编码块的当前分割深度可为小于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第四编码块的尺寸可为大于允许的最小编码块尺寸的任意尺寸。例如第四编码块的尺寸可能是64*64,32*32,16*16,或是允许的其他尺寸。The current segmentation depth of the fourth coding block may be an arbitrary segmentation depth smaller than the maximum allowed segmentation depth of the video frame, that is, the size of the fourth coding block may be any size larger than the allowed minimum coding block size. For example, the size of the fourth coding block may be 64*64, 32*32, 16*16, or other sizes allowed.
可以理解的是,视频帧的最大允许分割深度是指可允许的最小编码块所对应的分割深度。也就是说,视频帧的最大允许分割深度是指将可允许的最大尺寸的编码块分割为可允许的最小尺寸的编码块所需的分割次数。而当前分割深度是指将可允许的最大尺寸的编码块分割为当前编码块所需的分割次数。It can be understood that the maximum allowed segmentation depth of the video frame refers to the segmentation depth corresponding to the minimum allowable coding block. That is to say, the maximum allowable segmentation depth of a video frame refers to the number of divisions required to divide the allowable maximum size coded block into the allowable minimum size coded block. The current segmentation depth refers to the number of segments required to divide the maximum allowable coding block into the current coded block.
假设编码块允许的最大尺寸为64*64,编码块允许的最小尺寸为8*8,那么若当前编码块的尺寸为64*64,当前编码块的当前分割深度为0;若当前编码块的尺寸为32*32,当前编码块的当前分割深度为1;若当前编码块的尺寸为16*16,则当前编码块的当前分割深度为2;若当前编码块的尺寸为8*8,则当前编码块的当前分割深度为3。在这种场景下,由于尺寸为64*64的编码块分割为尺寸为8*8的编码块需要进行3次分割,因此,该场景下视频帧的最大允许分割深度为3。Assuming that the maximum size allowed by the coding block is 64*64, and the minimum size allowed for the coding block is 8*8, if the current coding block size is 64*64, the current coding depth of the current coding block is 0; if the current coding block is The size is 32*32, the current segmentation depth of the current coding block is 1; if the current coding block size is 16*16, the current segmentation depth of the current coding block is 2; if the current coding block size is 8*8, then The current segmentation depth of the current coded block is 3. In this scenario, the maximum allowable segmentation depth of the video frame in this scenario is 3 because the coded block of size 64*64 is divided into 8×8 coded blocks.
假设编码块允许的最大尺寸为64*64,编码块允许的最小尺寸为2*2,那么若当前编码块的尺寸为64*64,当前编码块的当前分割深度为0;若当前编码块的尺寸为32*32,则当前编码块的当前分割深度为1;若当前编码块的尺寸为16*16,则当前编码块的当前分割深度为2;若当前编码块的尺寸为8*8,则当前编码块的当前分割深度为3;类似的,若当前编码块的尺寸为4*4,则当前编码块的当前分割深度为4;若当前编码块的尺寸为2*2,则当前编码块的当前分割深度为5。在这种场景下,由于尺寸为64*64的编码块分割为尺寸为2*2的编 码块需要进行5次分割,因此,该场景下视频帧的最大允许分割深度为5。可以理解,编码块允许的最大尺寸和最小尺寸亦可为其他值,在相应场景下,亦可按照类似方式来确定最大允许分割深度和当前分割深度等。Assuming that the maximum size allowed by the coding block is 64*64, and the minimum size allowed for the coding block is 2*2, if the current coding block size is 64*64, the current coding depth of the current coding block is 0; if the current coding block is If the size of the current coding block is 8*8, the current coding block has a current partition depth of 1; if the current coding block has a size of 16*16, the current coding block has a current division depth of 2; The current segmentation depth of the current coding block is 3; similarly, if the current coding block size is 4*4, the current coding block has a current segmentation depth of 4; if the current coding block has a size of 2*2, the current coding The current split depth of the block is 5. In this scenario, the coded block of size 64*64 is divided into 2*2 sizes. The code block needs to be split 5 times. Therefore, the maximum allowable segmentation depth of the video frame in this scenario is 5. It can be understood that the maximum size and the minimum size allowed by the coding block may also be other values. In the corresponding scenario, the maximum allowable segmentation depth and the current segmentation depth may be determined in a similar manner.
在对编码块子块分割时,可将当前编码块分割四个等大的子编码块,例如可将尺寸为64*64的编码块分割为尺寸为32*32的四个编码块,例如可将尺寸为16*16的编码块分割为尺寸为8*8的四个编码块。When the coding block sub-block is divided, the current coding block may be divided into four equal-sized sub-coded blocks. For example, a coding block of size 64*64 may be divided into four coding blocks of size 32*32, for example, The coded block of size 16*16 is divided into four coded blocks of size 8*8.
可以理解,由于所述第一分割深度阈值小于或等于视频帧的最大允许分割深度,因此若最大允许分割深度为5,所述第一分割深度阈值可为5、4、3或2等等;若最大允许分割深度为3,则第一分割深度阈值可为3、2或1等,其他类似场景可以此类推。第一分割深度阈值大于或等于第二分割深度阈值。第一分割深度阈值大于或者等于第三分割深度阈值,因此,当第一分割深度阈值确定之后,可以在小于或等于第一分割深度阈值的取值范围内选取第二分割深度阈值或第三分割深度阈值的具体取值。例如当第一分割深度阈值为3时,第二分割深度阈值的具体取值可为2,第三分割深度阈值的具体取值可为2或1。又例如当第一分割深度阈值为5,第二分割深度阈值的具体取值可以为4或3,第三分割深度阈值的具体取值可为3或2或1等。It can be understood that, since the first segmentation depth threshold is less than or equal to the maximum allowable segmentation depth of the video frame, if the maximum allowable segmentation depth is 5, the first segmentation depth threshold may be 5, 4, 3, or 2, and the like; If the maximum allowable segmentation depth is 3, the first segmentation depth threshold may be 3, 2, or 1, and the like, and other similar scenarios may be deduced. The first segmentation depth threshold is greater than or equal to the second segmentation depth threshold. The first segmentation depth threshold is greater than or equal to the third segmentation depth threshold. Therefore, after the first segmentation depth threshold is determined, the second segmentation depth threshold or the third segment may be selected within a range of values less than or equal to the first segmentation depth threshold. The specific value of the depth threshold. For example, when the first segmentation depth threshold is 3, the specific value of the second segmentation depth threshold may be 2, and the specific value of the third segmentation depth threshold may be 2 or 1. For example, when the first segmentation depth threshold is 5, the specific value of the second segmentation depth threshold may be 4 or 3. The specific value of the third segmentation depth threshold may be 3 or 2 or 1.
可以理解的是,在一些场景下,当第三分割深度阈值等于第二分割深度阈值时,第三分割深度阈值和第二分割深度阈值可看做是同一分割深度阈值。同理,当第二分割深度阈值、第一分割深度阈值和第三分割深度阈值相等时,则第二分割深度阈值、第一分割深度阈值和第三分割深度阈值也可看做是同一分割深度阈值。也就是说,当某几个分割深度阈值相等时,可将相等的这几个分割深度阈值看做是同一分割深度阈值。It can be understood that, in some scenarios, when the third segmentation depth threshold is equal to the second segmentation depth threshold, the third segmentation depth threshold and the second segmentation depth threshold may be regarded as the same segmentation depth threshold. Similarly, when the second segmentation depth threshold, the first segmentation depth threshold, and the third segmentation depth threshold are equal, the second segmentation depth threshold, the first segmentation depth threshold, and the third segmentation depth threshold may also be regarded as the same segmentation depth. Threshold. That is to say, when some segmentation depth thresholds are equal, the equal segmentation depth thresholds can be regarded as the same segmentation depth threshold.
为便于更好的理解和实施本发明实施例的上述方案,下面通过一些具体应用场景进行举例说明。To facilitate a better understanding and implementation of the foregoing solution of the embodiments of the present invention, the following is exemplified by some specific application scenarios.
请参见图2,图2为本发明的另一个实施例提供的另一种视频编码中的块分割处理方法的流程示意图。图2所对应的实施例中,主要参考第一编码块与细分区域之间的相对位置关系、第一分割深度阈值、第二分割深度阈值和第三分割深度阈值等,来确定编码块的分割处理方式。 Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of another method for processing a block division in video coding according to another embodiment of the present invention. In the embodiment corresponding to FIG. 2, the relative positional relationship between the first coding block and the subdivided region, the first segmentation depth threshold, the second segmentation depth threshold, and the third segmentation depth threshold are mainly referenced to determine the coding block. Split processing method.
其中,图2举例所示,本发明的另一个实施例提供的另一种视频编码中的块分割处理方法可包括:The block division processing method in another video coding provided by another embodiment of the present invention may include:
201、获取视频帧的细分区域。201. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域。The subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame.
其中,获取图像的细分区域的具体方式可为多种多样的,具体的可参考步骤101的描述,本实施例在此不再详述。The specific manner of obtaining the subdivided area of the image may be various. For details, refer to the description of step 101. This embodiment is not described in detail herein.
202、确定所述视频帧的第一编码块的当前分割深度是否小于视频帧的最大允许分割深度。202. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a maximum allowed segmentation depth of the video frame.
若是,则执行步骤203。If yes, go to step 203.
若否,则执行步骤208。If no, step 208 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的任意一个编码块。The first coding block of the video frame may refer to any one of the video frames.
第一编码块的当前分割深度可为小于或等于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第一编码块的尺寸可为大于或等于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64、32*32、16*16或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth less than or equal to the maximum allowed segmentation depth of the video frame, that is, the size of the first coding block may be any greater than or equal to the minimum coding block size allowed. size. For example, the size of the first code block may be 64*64, 32*32, 16*16 or other sizes allowed.
203、确定所述视频帧的第一编码块是否包含所述细分区域中的像素点。203. Determine whether a first coding block of the video frame includes a pixel point in the subdivided region.
若是,则执行步骤204。If yes, go to step 204.
若否,则执行步骤207。If no, step 207 is performed.
204、确定所述视频帧的第一编码块是否包含所述视频帧的感兴趣区域和边缘区域的重叠区域中的像素点。204. Determine whether a first coding block of the video frame includes a pixel in an overlap region of a region of interest and an edge region of the video frame.
若是,则执行步骤205。If yes, step 205 is performed.
若否,则执行步骤206。If no, step 206 is performed.
205、确定所述视频帧的第一编码块的当前分割深度是否小于第一分割深度阈值。205. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a first segmentation depth threshold.
此处,第一分割深度阈值小于视频帧的最大允许分割深度,因此,当可以在小于视频帧的最大允许分割深度的取值范围内选取第一分割深度阈值的具体取值。例如当视频帧的最大允许分割深度为3时,第一分割深度阈值的具体 取值可为2。又例如当最大允许分割深度为5,第一分割深度阈值的具体取值可为4或3或2等。Here, the first segmentation depth threshold is smaller than the maximum allowable segmentation depth of the video frame, and therefore, the specific value of the first segmentation depth threshold may be selected within a range of values smaller than the maximum allowable segmentation depth of the video frame. For example, when the maximum allowable segmentation depth of the video frame is 3, the specificity of the first segmentation depth threshold is specific. The value can be 2. For another example, when the maximum allowable segmentation depth is 5, the specific value of the first segmentation depth threshold may be 4 or 3 or 2 or the like.
若是,则执行步骤209。If yes, go to step 209.
若否,则执行步骤208。If no, step 208 is performed.
206、确定所述第一编码块的当前分割深度是否小于第二分割深度阈值。206. Determine whether a current segmentation depth of the first coding block is smaller than a second segmentation depth threshold.
若否,则执行步骤210。If no, step 210 is performed.
若是,则执行步骤208。If yes, step 208 is performed.
其中,第二分割深度阈值主要用于限制所述视频帧中的不包含所述视频帧的感兴趣区域和边缘区域的重叠区域中的像素点,但包含所述视频帧的感兴趣区域和边缘区域的非重叠区域中的像素点的编码块的分割深度。The second segmentation depth threshold is mainly used to limit pixel points in the video frame that do not include the region of interest and the edge region of the video frame, but includes the region of interest and the edge of the video frame. The depth of division of the coded block of the pixel in the non-overlapping region of the region.
其中,第二分割深度阈值小于视频帧的最大允许分割深度,因此,当可以在小于视频帧的最大允许分割深度的取值范围内选取第二分割深度阈值的具体取值。例如当视频帧的最大允许分割深度为3时,第二分割深度阈值的具体取值可为2或1。又例如当第一分割深度阈值为5,第二分割深度阈值的具体取值可为4或3或2或1等。The second segmentation depth threshold is smaller than the maximum allowable segmentation depth of the video frame. Therefore, the specific value of the second segmentation depth threshold may be selected within a range of values smaller than the maximum allowable segmentation depth of the video frame. For example, when the maximum allowable segmentation depth of the video frame is 3, the specific value of the second segmentation depth threshold may be 2 or 1. For another example, when the first segmentation depth threshold is 5, the specific value of the second segmentation depth threshold may be 4 or 3 or 2 or 1 or the like.
207、确定所述第一编码块的当前分割深度是否小于第三分割深度阈值。207. Determine whether a current segmentation depth of the first coding block is smaller than a third segmentation depth threshold.
若否,则执行步骤210。If no, step 210 is performed.
若是,则执行步骤208。If yes, step 208 is performed.
其中,第三分割深度阈值主要用于限制所述视频帧中的不包含细分区域的像素点的编码块的分割深度。The third segmentation depth threshold is mainly used to limit the segmentation depth of the coding block of the pixel in the video frame that does not include the subdivision region.
其中,第三分割深度阈值小于视频帧的最大允许分割深度,因此,当可以在小于视频帧的最大允许分割深度的取值范围内选取第三分割深度阈值的具体取值。例如当视频帧的最大允许分割深度为3时,第三分割深度阈值的具体取值可为2或1。又例如当第一分割深度阈值为5,第三分割深度阈值的具体取值可为4或3或2或1等。第三分割深度阈值小于或等于第二分割深度。The third segmentation depth threshold is smaller than the maximum allowable segmentation depth of the video frame. Therefore, the specific value of the third segmentation depth threshold may be selected within a range of values smaller than the maximum allowable segmentation depth of the video frame. For example, when the maximum allowable segmentation depth of the video frame is 3, the specific value of the third segmentation depth threshold may be 2 or 1. For another example, when the first segmentation depth threshold is 5, the specific value of the third segmentation depth threshold may be 4 or 3 or 2 or 1 or the like. The third segmentation depth threshold is less than or equal to the second segmentation depth.
208、确定所述第一编码块的率失真代价是否大于所述第一编码块进行子块分割后的率失真代价。208. Determine whether a rate distortion cost of the first coding block is greater than a rate distortion cost of the first coding block after sub-block division.
若是,则执行步骤209。 If yes, go to step 209.
若否,则执行步骤210。If no, step 210 is performed.
209、将所述第一编码块进行子块分割。209. Perform sub-block partitioning on the first coding block.
210、确定不对所述第一编码块进行子块分割。210. Determine to not perform sub-block partitioning on the first coding block.
可以理解,对于视频帧中的每个编码块,均可按照图2举例方式来进行子块分割处理。例如视频帧中的编码块CU-1,可按照图2举例方式来进行子块分割处理,假设将编码块CU-1分割为4个编码块,分别为CU-11、CU-12、CU-13和CU-14,那么对于CU-11、CU-12、CU-13和CU-14中的每个编码块,亦可按图2举例方式来进行子块分割处理,例如可能将CU-11割为4个编码块,而CU-12也可能不再进行子块分割,其他场景以此类推。It can be understood that for each coding block in the video frame, the sub-block division processing can be performed by way of example in FIG. For example, the coding block CU-1 in the video frame may be subjected to sub-block division processing according to the example of FIG. 2, and it is assumed that the coding block CU-1 is divided into four coding blocks, which are CU-11, CU-12, CU-, respectively. 13 and CU-14, then for each coding block in CU-11, CU-12, CU-13, and CU-14, sub-block division processing may also be performed according to the example of FIG. 2, for example, CU-11 may be used. Cut into 4 coded blocks, and CU-12 may no longer perform sub-block splitting, and so on.
可以看出,本实施例视频编码过程中,获取视频帧的细分区域之后,当确定视频帧的第一编码块包含视频帧的感兴趣区域和边缘区域的重叠区域中的像素点,且第一编码块当前分割深度小于视频帧的第一分割深度阈值,将所述第一编码块进行子块分割。也就是说,视频帧的第一编码块与感兴趣区域和边缘区域的重叠区域之间的相对位置关系,可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,因此,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, in the video encoding process of this embodiment, after acquiring the subdivided area of the video frame, when determining that the first coding block of the video frame includes the pixel in the overlapping area of the region of interest and the edge region of the video frame, and The current segmentation depth of a coding block is smaller than the first segmentation depth threshold of the video frame, and the first coding block is subjected to sub-block segmentation. That is to say, the relative positional relationship between the first coding block of the video frame and the overlapping area of the region of interest and the edge region can determine to some extent whether the first coding block performs sub-block segmentation under the current segmentation depth. Therefore, the above technical solution of the present embodiment is advantageous in reducing the conventional mechanism of determining whether to continue sub-block division for the current coding block by calculating and comparing the current coding block before and after the division. Determining whether the current coded block performs the computational complexity of the sub-block segmentation under the current segmentation depth, thereby facilitating the reduction of the occupation of the relevant computing resources.
请参见图3,图3为本发明的另一个实施例提供的另一种视频编码中的块分割处理方法的流程示意图。图3所对应的实施例中,主要参考第一编码块与细分区域之间的相对位置关系、第一分割深度阈值(本实施例中以第一分割深度阈值等于视频帧的最大允许分割深度为例)和第三分割深度阈值等,来确定编码块的分割处理方式。Referring to FIG. 3, FIG. 3 is a schematic flowchart diagram of another method for processing a block division in video coding according to another embodiment of the present invention. In the embodiment corresponding to FIG. 3, the relative positional relationship between the first coding block and the subdivided region and the first segmentation depth threshold are mainly referred to (the first segmentation depth threshold is equal to the maximum allowable segmentation depth of the video frame in this embodiment). For example, the third segmentation depth threshold or the like is used to determine the segmentation processing mode of the coding block.
其中,图3举例所示,本发明的另一个实施例提供的另一种视频编码中的块分割处理方法可包括:The block segmentation processing method in another video coding provided by another embodiment of the present invention may include:
301、获取视频帧的细分区域。301. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧 的边缘区域。The subdivided area of the video frame includes a region of interest of the video frame and the video frame The edge area.
其中,获取图像的细分区域的具体方式可为多种多样的,具体的可参考步骤101的描述,本实施例在此不再详述。The specific manner of obtaining the subdivided area of the image may be various. For details, refer to the description of step 101. This embodiment is not described in detail herein.
302、确定所述视频帧的第一编码块的当前分割深度是否小于视频帧的最大允许分割深度。302. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a maximum allowed segmentation depth of the video frame.
若是,则执行步骤303。If yes, go to step 303.
若否,则执行步骤308。If no, step 308 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的任意一个编码块。The first coding block of the video frame may refer to any one of the video frames.
第一编码块的当前分割深度可为小于或等于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第一编码块的尺寸可为大于或等于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64、32*32、16*16或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth less than or equal to the maximum allowed segmentation depth of the video frame, that is, the size of the first coding block may be any greater than or equal to the minimum coding block size allowed. size. For example, the size of the first code block may be 64*64, 32*32, 16*16 or other sizes allowed.
303、确定所述视频帧的第一编码块是否包含所述细分区域中的像素点。303. Determine whether a first coding block of the video frame includes a pixel point in the subdivided region.
若是,则执行步骤304。If yes, go to step 304.
若否,则执行步骤305。If no, step 305 is performed.
304、确定所述视频帧的第一编码块是否包含所述视频帧的感兴趣区域和边缘区域的重叠区域中的像素点。304. Determine whether a first coding block of the video frame includes a pixel in an overlap region of a region of interest and an edge region of the video frame.
若是,则执行步骤307。If yes, go to step 307.
若否,则执行步骤306。If no, step 306 is performed.
305、确定所述第一编码块的当前分割深度是否小于第三分割深度阈值。305. Determine whether a current segmentation depth of the first coding block is smaller than a third segmentation depth threshold.
若否,则执行步骤308。If no, step 308 is performed.
若是,则执行步骤306。If yes, go to step 306.
其中,第三分割深度阈值小于视频帧的最大允许分割深度,因此,当可以在小于视频帧的最大允许分割深度的取值范围内选取第三分割深度阈值的具体取值。例如当视频帧的最大允许分割深度为3时,第三分割深度阈值的具体取值可为2或1。又例如当第一分割深度阈值为5,第三分割深度阈值的具体取值可为4或3或2或1等。The third segmentation depth threshold is smaller than the maximum allowable segmentation depth of the video frame. Therefore, the specific value of the third segmentation depth threshold may be selected within a range of values smaller than the maximum allowable segmentation depth of the video frame. For example, when the maximum allowable segmentation depth of the video frame is 3, the specific value of the third segmentation depth threshold may be 2 or 1. For another example, when the first segmentation depth threshold is 5, the specific value of the third segmentation depth threshold may be 4 or 3 or 2 or 1 or the like.
306、确定所述第一编码块的率失真代价是否大于所述第一编码块进行子 块分割后的率失真代价。306. Determine whether a rate distortion cost of the first coding block is greater than the first coding block. Rate distortion cost after block segmentation.
若是,则执行步骤307。If yes, go to step 307.
若否,则执行步骤308。If no, step 308 is performed.
307、将所述第一编码块进行子块分割。307. Perform sub-block partitioning on the first coding block.
308、确定不对所述第一编码块进行子块分割。308. Determine to not perform sub-block splitting on the first coding block.
可以理解,对于视频帧中的每个编码块,均可按照图3举例方式来进行子块分割处理。It can be understood that for each coding block in the video frame, the sub-block division processing can be performed by way of example in FIG.
可以看出,本实施例视频编码过程中,获取视频帧的细分区域之后,当确定视频帧的第一编码块包含视频帧的感兴趣区域和边缘区域的重叠区域中的像素点,且第一编码块当前分割深度小于视频帧的最大允许分割深度,将所述第一编码块进行子块分割,也就是说,视频帧的第一编码块与感兴趣区域和边缘区域的重叠区域之间的相对位置关系,可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, in the video encoding process of this embodiment, after acquiring the subdivided area of the video frame, when determining that the first coding block of the video frame includes the pixel in the overlapping area of the region of interest and the edge region of the video frame, and The current segmentation depth of a coding block is smaller than the maximum allowed segmentation depth of the video frame, and the first coding block is subjected to sub-block segmentation, that is, between the first coding block of the video frame and the overlapping region of the region of interest and the edge region. The relative positional relationship may determine whether the first coding block performs sub-block segmentation at the current segmentation depth to some extent, compared to completely calculating and comparing the rate distortion of the current coding block before and after the division. The foregoing technical solution of the present embodiment is advantageous for reducing the computational complexity of determining whether the current coding block performs sub-block segmentation at the current segmentation depth, thereby facilitating reduction of correlation. Calculate the occupation of resources.
请参见图4,图4为本发明的另一个实施例提供的一种视频编码中的块分割处理方法的流程示意图。图4所对应的实施例中,主要参考第一编码块与细分区域之间的相对位置关系、第一分割深度阈值(本实施例中以第一分割深度阈值等于视频帧的最大允许分割深度为例)和第三分割深度阈值等,来确定编码块的分割处理方式。其中,图4举例所示,本发明的另一个实施例提供的一种视频编码中的块分割处理方法可包括:Referring to FIG. 4, FIG. 4 is a schematic flowchart diagram of a block segmentation processing method in video coding according to another embodiment of the present invention. In the embodiment corresponding to FIG. 4, the relative positional relationship between the first coding block and the subdivided region and the first segmentation depth threshold are mainly referred to (in the embodiment, the first segmentation depth threshold is equal to the maximum allowable segmentation depth of the video frame). For example, the third segmentation depth threshold or the like is used to determine the segmentation processing mode of the coding block. For example, as shown in FIG. 4, a block segmentation processing method in video coding provided by another embodiment of the present invention may include:
401、获取视频帧的细分区域。401. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个。The subdivided area of the video frame includes at least one of a region of interest of the video frame and an edge region of the video frame.
其中,获取视频帧的细分区域的具体方式可为多种多样的,具体的可参考步骤101的描述,本发明实施例在此不再详述。 The specific manner of obtaining the subdivided area of the video frame may be various. For details, refer to the description of step 101, which is not detailed herein.
402、确定所述视频帧的第一编码块的当前分割深度是否小于视频帧的最大允许分割深度。402. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a maximum allowed segmentation depth of the video frame.
若是,则执行步骤403。If yes, go to step 403.
若否,则执行步骤407。If no, step 407 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的任意一个编码块。The first coding block of the video frame may refer to any one of the video frames.
第一编码块的当前分割深度可为小于或等于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第一编码块的尺寸可为大于或等于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64、32*32、16*16或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth less than or equal to the maximum allowed segmentation depth of the video frame, that is, the size of the first coding block may be any greater than or equal to the minimum coding block size allowed. size. For example, the size of the first code block may be 64*64, 32*32, 16*16 or other sizes allowed.
403、确定所述视频帧的第一编码块是否包含所述细分区域中的像素点。403. Determine whether a first coding block of the video frame includes a pixel point in the subdivided region.
若否,则执行步骤404。If no, step 404 is performed.
若是,则执行步骤406。If yes, step 406 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的其中一个编码块或任意一个编码块。第一编码块的尺寸可能是允许的最大尺寸(例如64*64),或是允许的次大尺寸(例如32*32),或是允许的次次大尺寸(例如16*16),或是允许的其他尺寸。The first coding block of the video frame may refer to one of the coding blocks or any one of the coding blocks. The size of the first code block may be the maximum size allowed (for example, 64*64), or the next largest size allowed (for example, 32*32), or the next large size allowed (for example, 16*16), or Other sizes allowed.
404、确定所述第一编码块的当前分割深度是否小于第三分割深度阈值。404. Determine whether a current segmentation depth of the first coding block is smaller than a third segmentation depth threshold.
若是,则执行步骤405。If yes, go to step 405.
若否,则执行步骤407。If no, step 407 is performed.
其中,第三分割深度阈值小于视频帧的最大允许分割深度,因此,当可以在小于或等于视频帧的最大允许分割深度的取值范围内选取第三分割深度阈值的具体取值。例如当视频帧的最大允许分割深度为3时,第三分割深度阈值的具体取值可为2或1。又例如当第一分割深度阈值为5,第三分割深度阈值的具体取值可为4或3或2或1等。The third segmentation depth threshold is smaller than the maximum allowable segmentation depth of the video frame. Therefore, the specific value of the third segmentation depth threshold may be selected within a range of values less than or equal to the maximum allowable segmentation depth of the video frame. For example, when the maximum allowable segmentation depth of the video frame is 3, the specific value of the third segmentation depth threshold may be 2 or 1. For another example, when the first segmentation depth threshold is 5, the specific value of the third segmentation depth threshold may be 4 or 3 or 2 or 1 or the like.
405、确定所述第一编码块的率失真代价是否大于所述第一编码块进行子块分割后的率失真代价。405. Determine whether a rate distortion cost of the first coding block is greater than a rate distortion cost of the first coding block after performing sub-block division.
若是,则执行步骤406。If yes, step 406 is performed.
若否,则执行步骤407。 If no, step 407 is performed.
406、将所述第一编码块进行子块分割。406. Perform sub-block partitioning on the first coding block.
407、确定不对所述第一编码块进行子块分割。407. Determine to not perform sub-block splitting on the first coding block.
可以理解,对于视频帧中的每个编码块,均可按照图4举例方式来进行子块分割处理。It can be understood that for each coding block in the video frame, the sub-block division processing can be performed by way of example in FIG.
可以看出,本实施例视频编码过程中,获取视频帧的细分区域之后,当确定所述视频帧的第一编码块包含所述细分区域中的像素点,且第一编码块当前分割深度小于视频帧的最大允许分割深度,将第一编码块进行子块分割。也就是说,视频帧的第一编码块与细分区域之间的相对位置关系,可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,因此,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, after acquiring the subdivided area of the video frame in the video encoding process of this embodiment, when determining that the first coding block of the video frame includes the pixel in the subdivided area, and the first coding block is currently segmented The depth is smaller than the maximum allowed segmentation depth of the video frame, and the first coded block is subjected to sub-block segmentation. That is to say, the relative positional relationship between the first coding block and the subdivided region of the video frame can determine to some extent whether the first coding block performs sub-block segmentation under the current segmentation depth, so The above technical solution of the present embodiment is advantageous for reducing the current coding block at the current state by determining the conventional mechanism for determining whether to continue the sub-block division for the current coding block before and after the current coding block partitioning and before and after the division. Whether the computational complexity of sub-block segmentation is performed under the segmentation depth is beneficial to reduce the occupation of related computing resources.
请参见图5,图5为本发明的另一个实施例提供的一种视频编码中的块分割处理方法的流程示意图。图5所对应的实施例中,主要参考第一编码块与细分区域之间的相对位置关系、第一分割深度阈值(本实施例中以第一分割深度阈值等于视频帧的最大允许分割深度为例)和率失真代价等,来确定编码块的分割处理方式。其中,图5举例所示,本发明的另一个实施例提供的一种视频编码中的块分割处理方法可包括:Referring to FIG. 5, FIG. 5 is a schematic flowchart diagram of a block segmentation processing method in video coding according to another embodiment of the present invention. In the embodiment corresponding to FIG. 5, the relative positional relationship between the first coding block and the subdivision area and the first segmentation depth threshold are mainly referred to. In this embodiment, the first segmentation depth threshold is equal to the maximum allowable segmentation depth of the video frame. For example, the rate distortion cost, etc., to determine the segmentation processing mode of the coding block. For example, as shown in FIG. 5, a block segmentation processing method in video coding provided by another embodiment of the present invention may include:
501、获取视频帧的细分区域。501. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域。The subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame.
其中,获取视频帧的细分区域的具体方式可为多种多样的,具体的可参考步骤101的描述,本发明实施例在此不再详述。The specific manner of obtaining the subdivided area of the video frame may be various. For details, refer to the description of step 101, which is not detailed herein.
502、确定所述视频帧的第一编码块的当前分割深度是否小于视频帧的最大允许分割深度。502. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a maximum allowed segmentation depth of the video frame.
若是,则执行步骤503。If yes, go to step 503.
若否,则执行步骤506。 If no, step 506 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的任意一个编码块。The first coding block of the video frame may refer to any one of the video frames.
第一编码块的当前分割深度可为小于或等于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第一编码块的尺寸可为大于或等于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64、32*32、16*16或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth less than or equal to the maximum allowed segmentation depth of the video frame, that is, the size of the first coding block may be any greater than or equal to the minimum coding block size allowed. size. For example, the size of the first code block may be 64*64, 32*32, 16*16 or other sizes allowed.
503、确定所述视频帧的第一编码块是否包含所述视频帧的感兴趣区域和所述边缘区域的重叠区域中的像素点。503. Determine whether a first coding block of the video frame includes a pixel in a region of interest of the video frame and an overlap region of the edge region.
若是,则执行步骤505。If yes, go to step 505.
若否,则执行步骤504。If no, step 504 is performed.
504、确定所述第一编码块的率失真代价是否大于所述第一编码块进行子块分割后的率失真代价。504. Determine whether a rate distortion cost of the first coding block is greater than a rate distortion cost of the first coding block after sub-block division.
若是,则执行步骤505。If yes, go to step 505.
若否,则执行步骤506。If no, step 506 is performed.
505、将所述第一编码块进行子块分割。505. Perform sub-block partitioning on the first coding block.
506、确定不对所述第一编码块进行子块分割。506. Determine to not perform sub-block partitioning on the first coding block.
可以理解,对于视频帧中的每个编码块,均可按照图5举例方式来进行子块分割处理。It can be understood that for each coding block in the video frame, the sub-block division processing can be performed as exemplified in FIG. 5.
可以看出,本实施例视频编码过程中,获取视频帧的细分区域之后,当确定所述视频帧的第一编码块包含所述视频帧的感兴趣区域和边缘区域的重叠区域中的像素点,并且,第一编码块当前分割深度小于视频帧的最大允许分割深度,将所述第一编码块进行子块分割,而当第一编码块不包含所述视频帧的感兴趣区域和边缘区域的重叠区域中的像素点,则可参考所述第一编码块分割前后的率失真代价的大小关系来确定第一编码块是否继续进行子块分割。也就是说,视频帧的第一编码块与感兴趣区域和边缘区域的重叠区域之间的相对位置关系,可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计 算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, after acquiring the subdivided area of the video frame in the video encoding process of this embodiment, when determining that the first coding block of the video frame includes the pixel in the overlapping area of the region of interest and the edge region of the video frame, Point, and the current coding depth of the first coding block is smaller than the maximum allowed division depth of the video frame, and the first coding block is subjected to sub-block division, and when the first coding block does not include the region of interest and the edge of the video frame For the pixel points in the overlapping region of the region, the size relationship of the rate distortion cost before and after the first coding block segmentation may be referenced to determine whether the first coding block continues to perform the sub-block segmentation. That is to say, the relative positional relationship between the first coding block of the video frame and the overlapping area of the region of interest and the edge region can determine to some extent whether the first coding block performs sub-block segmentation under the current segmentation depth. The above technical solution of the present embodiment is advantageous for reducing the current determination, compared to the conventional mechanism for determining whether to continue sub-block division for the current coding block by calculating and comparing the current coding block before and after the division. Whether the coding block performs sub-block division under the current segmentation depth Calculating the complexity, which in turn helps to reduce the occupation of related computing resources.
请参见图6,图6为本发明的另一个实施例提供的一种视频编码中的块分割处理方法的流程示意图。图6所对应的实施例中,主要参考第一编码块与细分区域之间的相对位置关系、第一分割深度阈值(本实施例中以第一分割深度阈值等于视频帧的最大允许分割深度为例)和率失真代价等,来确定编码块的分割处理方式。其中,图6举例所示,本发明的另一个实施例提供的一种视频编码中的块分割处理方法可包括:Referring to FIG. 6, FIG. 6 is a schematic flowchart diagram of a block segmentation processing method in video coding according to another embodiment of the present invention. In the embodiment corresponding to FIG. 6 , the relative positional relationship between the first coding block and the subdivision area and the first segmentation depth threshold are mainly referred to (the first segmentation depth threshold is equal to the maximum allowable segmentation depth of the video frame in this embodiment). For example, the rate distortion cost, etc., to determine the segmentation processing mode of the coding block. For example, as shown in FIG. 6 , a block segmentation processing method in video coding provided by another embodiment of the present invention may include:
601、获取视频帧的细分区域。601. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的边缘区域或感兴趣区域。The subdivided area of the video frame includes an edge area or a region of interest of the video frame.
其中,获取视频帧的细分区域的具体方式可为多种多样的,具体的可参考步骤101的描述,本发明实施例在此不再详述。The specific manner of obtaining the subdivided area of the video frame may be various. For details, refer to the description of step 101, which is not detailed herein.
602、确定所述视频帧的第一编码块的当前分割深度是否小于视频帧的最大允许分割深度。602. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a maximum allowed segmentation depth of the video frame.
若是,则执行步骤603。If yes, step 603 is performed.
若否,则执行步骤606。If no, step 606 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的任意一个编码块。The first coding block of the video frame may refer to any one of the video frames.
第一编码块的当前分割深度可为小于或等于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第一编码块的尺寸可为大于或等于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64、32*32、16*16或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth less than or equal to the maximum allowed segmentation depth of the video frame, that is, the size of the first coding block may be any greater than or equal to the minimum coding block size allowed. size. For example, the size of the first code block may be 64*64, 32*32, 16*16 or other sizes allowed.
603、确定所述视频帧的第一编码块是否包含了所述视频帧的细分区域中的像素点。603. Determine whether a first coding block of the video frame includes a pixel point in a subdivided region of the video frame.
若是,则执行步骤605。If yes, step 605 is performed.
若否,则执行步骤604。If no, step 604 is performed.
604、确定所述第一编码块的率失真代价是否大于所述第一编码块进行子块分割后的率失真代价。604. Determine whether a rate distortion cost of the first coding block is greater than a rate distortion cost of the first coding block after sub-block division.
若是,则执行步骤605。If yes, step 605 is performed.
若否,则执行步骤606。 If no, step 606 is performed.
605、将所述第一编码块进行子块分割。605. Perform sub-block partitioning on the first coding block.
606、确定不对所述第一编码块进行子块分割。606. Determine to not perform sub-block splitting on the first coding block.
可以理解,对于视频帧中的每个编码块,均可按照图6举例方式来进行子块分割处理。It can be understood that for each coding block in the video frame, the sub-block division processing can be performed as exemplified in FIG. 6.
可以看出,本实施例视频编码过程中,获取视频帧的边缘区域或感兴趣区域之后,当确定所述视频帧的第一编码块包含所述视频帧的边缘区域或感兴趣区域中的像素点,且第一编码块当前分割深度小于视频帧的最大允许分割深度,则可将所述第一编码块进行子块分割,当第一编码块不包含所述视频帧的边缘区域或感兴趣区域中的像素点,则可参考第一编码块分割前后的率失真代价的大小关系来确定第一编码块是否继续进行子块分割。也就是说,第一编码块与边缘区域或感兴趣区域之间的相对位置关系,可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, after obtaining the edge region or the region of interest of the video frame in the video encoding process of this embodiment, when determining that the first coding block of the video frame includes an edge region of the video frame or a pixel in the region of interest a point, and the current coding depth of the first coding block is smaller than a maximum allowed division depth of the video frame, the first coding block may be subjected to sub-block division, when the first coding block does not include an edge region of the video frame or is interested For the pixel points in the region, the size relationship of the rate distortion cost before and after the first coding block segmentation may be referenced to determine whether the first code block continues to perform the sub-block segmentation. That is to say, the relative positional relationship between the first coding block and the edge region or the region of interest may determine to some extent whether the first coded block performs sub-block segmentation at the current segmentation depth, which is compared to complete The technical solution of the present embodiment is beneficial to reduce the current coding block at the current segmentation depth by calculating and comparing the current rate of the current coding block before and after the division to determine whether to continue the sub-block division of the current coding block. Whether the computational complexity of sub-block segmentation is performed, thereby reducing the occupation of related computing resources.
请参见图7,图7为本发明的另一个实施例提供的另一种视频编码中的块分割处理方法的流程示意图。图7所对应的实施例中,主要参考第一编码块与细分区域之间的相对位置关系、第一分割深度阈值(本实施例中以第一分割深度阈值等于视频帧的最大允许分割深度为例)和第三分割深度阈值等,来确定编码块的分割处理方式。其中,图7举例所示,本发明的另一个实施例提供的另一种视频编码中的块分割处理方法可包括:Referring to FIG. 7, FIG. 7 is a schematic flowchart diagram of another method for processing a block division in video coding according to another embodiment of the present invention. In the embodiment corresponding to FIG. 7 , the relative positional relationship between the first coding block and the subdivision area and the first segmentation depth threshold are mainly referred to. In this embodiment, the first segmentation depth threshold is equal to the maximum allowable segmentation depth of the video frame. For example, the third segmentation depth threshold or the like is used to determine the segmentation processing mode of the coding block. The block segmentation processing method in another video coding provided by another embodiment of the present invention may include:
701、获取视频帧的细分区域。701. Obtain a subdivision area of the video frame.
其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域。The subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame.
其中,获取视频帧的细分区域的具体方式可为多种多样的,具体的可参考步骤101的描述,本发明实施例在此不再详述。The specific manner of obtaining the subdivided area of the video frame may be various. For details, refer to the description of step 101, which is not detailed herein.
702、确定所述视频帧的第一编码块的当前分割深度是否小于视频帧的最 大允许分割深度。702. Determine whether a current segmentation depth of the first coding block of the video frame is smaller than a video frame. Large allow for segmentation depth.
若是,则执行步骤703。If yes, go to step 703.
若否,则执行步骤708。If no, step 708 is performed.
其中,所述视频帧的第一编码块可指所述视频帧中的任意一个编码块。The first coding block of the video frame may refer to any one of the video frames.
第一编码块的当前分割深度可为小于或等于所述视频帧的最大允许分割深度的任意分割深度,也就是说,第一编码块的尺寸可为大于或等于允许的最小编码块尺寸的任意尺寸。例如第一编码块的尺寸可能是64*64、32*32、16*16或是允许的其他尺寸。The current segmentation depth of the first coding block may be any segmentation depth less than or equal to the maximum allowed segmentation depth of the video frame, that is, the size of the first coding block may be any greater than or equal to the minimum coding block size allowed. size. For example, the size of the first code block may be 64*64, 32*32, 16*16 or other sizes allowed.
703、确定所述视频帧的第一编码块是否包含所述细分区域中的像素点。703. Determine whether a first coding block of the video frame includes a pixel point in the subdivided region.
若是,则执行步骤704。If yes, step 704 is performed.
若否,则执行步骤705。If no, step 705 is performed.
704、确定所述视频帧的第一编码块是否包含了所述视频帧的边缘区域中的像素点。704. Determine whether a first coding block of the video frame includes a pixel point in an edge region of the video frame.
若是,则执行步骤707。If yes, go to step 707.
若否,则执行步骤706。If no, step 706 is performed.
705、确定所述第一编码块的当前分割深度是否小于第三分割深度阈值。705. Determine whether a current segmentation depth of the first coding block is smaller than a third segmentation depth threshold.
若否,则执行步骤708。If no, step 708 is performed.
若是,则执行步骤706。If yes, step 706 is performed.
其中,第三分割深度阈值小于视频帧的最大允许分割深度,因此,当可以在小于或等于视频帧的最大允许分割深度的取值范围内选取第三分割深度阈值的具体取值。例如当视频帧的最大允许分割深度为3时,第三分割深度阈值的具体取值可为2或1。又例如当第一分割深度阈值为5,第三分割深度阈值的具体取值可为4或3或2或1等。The third segmentation depth threshold is smaller than the maximum allowable segmentation depth of the video frame. Therefore, the specific value of the third segmentation depth threshold may be selected within a range of values less than or equal to the maximum allowable segmentation depth of the video frame. For example, when the maximum allowable segmentation depth of the video frame is 3, the specific value of the third segmentation depth threshold may be 2 or 1. For another example, when the first segmentation depth threshold is 5, the specific value of the third segmentation depth threshold may be 4 or 3 or 2 or 1 or the like.
706、确定所述第一编码块的率失真代价是否大于所述第一编码块进行子块分割后的率失真代价。706. Determine whether a rate distortion cost of the first coding block is greater than a rate distortion cost of the first coding block after sub-block division.
若是,则执行步骤707。If yes, go to step 707.
若否,则执行步骤708。If no, step 708 is performed.
707、将所述第一编码块进行子块分割。 707. Perform sub-block partitioning on the first coding block.
708、确定不对所述第一编码块进行子块分割。708. Determine to not perform sub-block partitioning on the first coding block.
可以理解,对于视频帧中的每个编码块,均可按照图7举例方式来进行子块分割处理。It can be understood that for each coding block in the video frame, the sub-block division processing can be performed as exemplified in FIG.
可以看出,本实施例视频编码过程中,在获取视频帧的细分区域后,当确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点,且第一编码块当前分割深度小于视频帧的最大允许分割深度,则可将所述第一编码块进行子块分割,而当第一编码块不包含所述视频帧的边缘区域中的像素点,则可参考所述第一编码块分割前后的率失真代价的大小关系等条件来确定第一编码块是否继续进行子块分割。也就是说,视频帧的第一编码块与边缘区域之间的相对位置关系,可在一定程度上决定所述第一编码块在当前分割深度下是否进行子块分割,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, in the video coding process of the embodiment, after acquiring the subdivided area of the video frame, when determining that the first coding block of the video frame includes a pixel in an edge region of the video frame, and the first coding If the current segmentation depth of the block is smaller than the maximum allowable segmentation depth of the video frame, the first coded block may be divided into sub-blocks, and when the first coded block does not include pixels in the edge region of the video frame, reference may be made. The condition of the rate distortion cost before and after the first coding block is divided to determine whether the first coding block continues to perform sub-block division. That is to say, the relative positional relationship between the first coding block and the edge region of the video frame can determine to some extent whether the first coding block performs sub-block segmentation under the current segmentation depth, which is compared to completely The foregoing technical solution of the present embodiment helps to reduce the current coding block at the current segmentation depth, by calculating and comparing the current rate of the current coding block before and after the division of the coding block to determine whether to continue the sub-block division of the current coding block. Whether the computational complexity of sub-block segmentation is performed, thereby reducing the occupation of related computing resources.
请参见图8-a,图8-a为本发明的另一个实施例提供的另一种视频编码中的块分割处理方法的流程示意图。其中,图8-a举例所示,本发明的另一个实施例提供的另一种视频编码中的块分割处理方法可包括:Referring to FIG. 8-a, FIG. 8-a is a schematic flowchart of another method for processing a block division in video coding according to another embodiment of the present invention. For example, as shown in FIG. 8-a, another method for processing a block division in video coding according to another embodiment of the present invention may include:
801、获取第一视频帧的细分区域。801. Obtain a subdivision area of the first video frame.
其中,第一视频帧的细分区域包括第一视频帧的感兴趣区域和第一视频帧的边缘区域。其中,第一图像组可为码流中的任意一个图像组。第一视频帧属于第一图像组(英文,group of pictures,缩写:GOP)。The subdivided area of the first video frame includes a region of interest of the first video frame and an edge region of the first video frame. The first image group may be any one of the image groups in the code stream. The first video frame belongs to the first image group (English, group of pictures, abbreviated: GOP).
其中,获取第一视频帧的细分区域的具体方式可为多种多样的。在本发明的一些可能的实施方式中,例如可以利用区域匹配算法对第一视频帧进行匹配处理来获取第一视频帧的细分区域,具体例如,基于区域匹配算法对第一视频帧进行匹配处理例如可以识别出第一视频帧中的哪些区域为细分区域,哪些区域不是细分区域。或者,可以根据配置文件中的配置指令来获取第一视频帧的细分区域,具体例如,配置文件中的配置指令可以具体指定了第一视频帧的哪些区域为细分区域,第一视频帧的哪些区域不是细分区域。当然亦可通过其他 方式获取第一视频帧的细分区域。The specific manner of obtaining the subdivision area of the first video frame may be various. In some possible implementation manners of the present invention, the first video frame may be matched by using a region matching algorithm to obtain a subdivided region of the first video frame, for example, matching the first video frame based on the region matching algorithm. The process, for example, can identify which regions in the first video frame are subdivided regions and which regions are not subdivided regions. Alternatively, the subdivision area of the first video frame may be obtained according to the configuration instruction in the configuration file. For example, the configuration instruction in the configuration file may specifically specify which areas of the first video frame are subdivision areas, and the first video frame. Which areas are not subdivisions. Of course, other The method obtains a subdivision area of the first video frame.
802、生成第一视频帧对应的显著性映射图(英文:saliency map)。802. Generate a saliency map corresponding to the first video frame.
其中,生成Saliency map的算法旨在输出例如图8-b中的右图所示的方块化的映射图,图8-b左边为原图,图8-b中的右图的为左图对应saliency map。图8-b中的右图中的每种颜色代表一种权重值。例如显著性映射图中纯白色的编码块的权重值最高,例如5,显著性映射图中纯黑色的编码块的权重值最低,例如可为1。The algorithm for generating the Saliency map is intended to output a block diagram such as the one shown in the right figure in FIG. 8-b. The left side of FIG. 8-b is the original picture, and the right side of FIG. 8-b is the left picture. Saliency map. Each color in the right image in Figure 8-b represents a weight value. For example, the pure white coding block in the saliency map has the highest weight value, for example, 5, and the pure black coding block in the saliency map has the lowest weight value, for example, 1.
在H.264标准中,宏块的大小是确定的(16×16),显著性映射图中的每个宏块对应一个权重值;在H.265标准中,CU的大小是可变的,显著性映射图中的每一个最小的CU覆盖的像素区域(例如8×8)对应一个权重值,对于任何一个确定大小的CU对应的权重值,可以由这个CU所覆盖的像素区域对应的权重值计算得到。例如一个16×16大小的CU的权重值,可以由其覆盖的4个8×8像素区域对应的权重值平均而得。In the H.264 standard, the size of a macroblock is determined (16×16), and each macroblock in the saliency map corresponds to a weight value; in the H.265 standard, the size of the CU is variable. Each of the smallest CU-covered pixel regions (eg, 8×8) in the significance map corresponds to one weight value, and the weight value corresponding to the pixel region covered by the CU may be weighted by the weight value corresponding to any CU of the determined size. The value is calculated. For example, the weight value of a 16×16-sized CU can be averaged by the weight values corresponding to the four 8×8 pixel regions covered by it.
其中,显著性映射图上各编码块的权重值的确定方法可有多种。例如检测到的人员区域可定义为ROI,例如,包含ROI中的像素点的编码块的权重值可设定为2,而不包含ROI中的像素点的编码块权重值可设定为1。The method for determining the weight value of each coding block on the significance map may be various. For example, the detected person area may be defined as an ROI. For example, the weight value of the coded block including the pixel points in the ROI may be set to 2, and the coded block weight value of the pixel point not including the ROI may be set to 1.
或者,也可采用另一方式来确定显著性映射图上各编码块的权重值。具体例如可根据人脸中眼、鼻、口的位置的先验知识,结合人脸的区域信息,得到包含眼、鼻、口的像素点的编码块为最高权重,包含人脸边缘的像素点的编码块的权重次之,其它脸部平坦区域再次之,人脸之外的其它区域可以赋以最低权重。Alternatively, another way may be used to determine the weight value of each code block on the significance map. Specifically, for example, according to prior knowledge of the position of the eyes, nose, and mouth in the face, combined with the area information of the face, the coded block including the pixels of the eyes, nose, and mouth is obtained as the highest weight, and the pixel points including the edge of the face are included. The weight of the coded block is second, and the other face flat areas are again, and other areas outside the face can be assigned the lowest weight.
803、为第一图像组中的各视频帧分配目标比特数。803. Allocate a target number of bits for each video frame in the first image group.
首先根据码率、帧率和第一图像组中视频帧的个数,通过公式(1)计算出第一图像组使用的比特数TGFirst, the number of bits T G used by the first image group is calculated by the formula (1) according to the code rate, the frame rate, and the number of video frames in the first image group.
Figure PCTCN2014085681-appb-000001
Figure PCTCN2014085681-appb-000001
公式(1)中的S表示码率,N表示GOP中帧的个数,fps表示帧率。In the formula (1), S represents a code rate, N represents the number of frames in the GOP, and fps represents a frame rate.
然后,根据TG通过公式(2)计算出给第一图像组中的每个视频帧分配的 比特数Tf,其中,wI是第一图像组中的I帧对应的权值,wB是第一图像组中的B帧对应的权值,wP是第一图像组中的P帧对应的权值,NI是第一图像组中I帧的个数,NB是第一图像组中B帧的个数,NP是第一图像组中P帧的个数。Then, the number of bits T f allocated to each video frame in the first image group is calculated according to T G by equation (2), where w I is the weight corresponding to the I frame in the first image group, w B Is the weight corresponding to the B frame in the first image group, w P is the weight corresponding to the P frame in the first image group, N I is the number of I frames in the first image group, and N B is the first image The number of B frames in the group, N P is the number of P frames in the first image group.
Tf=TG/(wI×NI+wP×NP+wB×NB)×wI    (2)T f =T G /(w I ×N I +w P ×N P +w B ×N B )×w I (2)
804、对第一视频帧中的各编码块进行子块分割。804. Sub-block partitioning is performed on each coding block in the first video frame.
其中,可以基于上述方法实施例所举例的任意一种视频编码中的块分割处理方法来对第一视频帧中的各编码块进行子块分割。当然,第一图像组中的其他视频帧的各编码块进行子块分割的方式可与之类似。The sub-block division may be performed on each coding block in the first video frame according to the block division processing method in any one of the video coding examples exemplified in the foregoing method embodiments. Of course, the manner in which each coding block of another video frame in the first picture group performs sub-block division may be similar.
其中,在进行子块分割过程中可能使用到参数RDCost。计算RDCost可能使用到第一视频帧对应的量化参数(英文:quantization parameter,QP)。例如可指定的第一视频帧的QP,例如指定QP=30。也可以根据上下文预测第一视频帧的QP,具体例如,可以根据公式(3)计算一个GOP中第j个视频帧的量化参数QP(j)。Among them, the parameter RDCost may be used in the process of sub-block segmentation. The calculation of RDCost may use the quantization parameter corresponding to the first video frame (English: quantization parameter, QP). For example, the QP of the first video frame that can be specified, for example, specifies QP=30. The QP of the first video frame may also be predicted according to the context. Specifically, for example, the quantization parameter QP(j) of the jth video frame in one GOP may be calculated according to formula (3).
Figure PCTCN2014085681-appb-000002
Figure PCTCN2014085681-appb-000002
其中,公式(3)中的MADpred(j)表示预测的GOP中的第j视频帧编码前后的最大绝对差。其中,因为第j视频帧当前尚未编码,因此难以得到精确的平均绝对差(英文:mean absolute difference,缩写:MAD),可预测MAD。MAD的预测一般采用前一个编码帧(即第j-1帧)的MAD。MAD代表视频帧的复杂程度,公式(3)中T(j)表示目标码率,目标码率T(j)一定的条件下,MAD越大则QP越大,也就表示视频帧越复杂,编码后视频帧的细节越差。Npixel(j)表示第j视频帧包含的像素总数,α、β是调节参数,α、β通常可设置为1。QP(j)表示第j视频帧的QP。Wherein, MAD pred (j) in the formula (3) represents the maximum absolute difference before and after encoding of the jth video frame in the predicted GOP. Among them, because the jth video frame is not currently encoded, it is difficult to obtain an accurate mean absolute difference (English: mean absolute difference, abbreviation: MAD), which can predict the MAD. The MAD prediction generally uses the MAD of the previous coded frame (ie, the j-1th frame). MAD represents the complexity of the video frame. In the formula (3), T(j) represents the target bit rate. Under the condition that the target bit rate T(j) is constant, the larger the MAD is, the larger the QP is, which means that the more complicated the video frame is, The worse the details of the encoded video frame. Npixel(j) represents the total number of pixels included in the jth video frame, α and β are adjustment parameters, and α and β are usually set to 1. QP(j) represents the QP of the jth video frame.
805、根据第一视频帧中的各CU对应的目标比特数和由saliency map计算得出的各各CU的权重值,计算各CU的QP。805. Calculate a QP of each CU according to a target bit number corresponding to each CU in the first video frame and a weight value of each CU calculated by the saliency map.
例如可基于公式(4)来计算各CU的QP。 For example, the QP of each CU can be calculated based on the formula (4).
Figure PCTCN2014085681-appb-000003
Figure PCTCN2014085681-appb-000003
其中,公式(4)中的k表示第k个CU,wi表示第i个CU的权重值,Ti(j)表示在编码第i个CU时第j视频帧剩余的目标码率,其中,N表示第j视频帧未编码的CU数量,Npixel,i(j)表示第i个CU的像素数量。其中,QPk(j)表示第j视频帧中的第k个的QP。MADpred,k(j)表示预测的GOP中的第j视频帧的第k个CU编码前后的最大绝对差。Where k in equation (4) represents the kth CU, w i represents the weight value of the i th CU, and T i (j) represents the remaining target code rate of the jth video frame when encoding the i th CU, where , N represents the number of uncoded CUs of the jth video frame, and N pixel,i (j) represents the number of pixels of the i th CU. Where QP k (j) represents the kth QP in the jth video frame. MAD pred,k (j) represents the maximum absolute difference before and after the kth CU encoding of the jth video frame in the predicted GOP.
806、根据第一视频帧的各CU的QP对CU编码。806. Encode the CU according to the QP of each CU of the first video frame.
其中,对CU编码主要包括对残差的量化和对编码模式、参数和量化后残差的熵编码等。The CU coding mainly includes quantization of residuals and entropy coding of coding modes, parameters, and quantized residuals.
可以看出,本实施例视频编码过程中,在获取视频帧的细分区域后,根据视频帧的当前编码块与边缘区域之间的相对位置关系等,来确定当前编码块是否继续进行子块分割。也就是说,视频帧的当前编码块与边缘区域之间的相对位置关系,可以在一定程度上决定当前编码块在当前分割深度下是否进行子块分割,这相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本实施例的上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对相关计算资源的占用。It can be seen that, in the video coding process of this embodiment, after acquiring the subdivided area of the video frame, determining whether the current coding block continues to perform the sub-block according to the relative positional relationship between the current coding block and the edge area of the video frame, and the like. segmentation. That is to say, the relative positional relationship between the current coding block and the edge region of the video frame can determine to some extent whether the current coding block performs sub-block segmentation at the current segmentation depth, which is compared to completely calculating and comparing the current The foregoing technical solution of the present embodiment helps to determine whether to determine whether the current coding block performs sub-blocks at the current segmentation depth, and the conventional mechanism for determining whether to perform the sub-block division on the current coding block before and after the block division. The computational complexity of the segmentation, which in turn helps to reduce the occupation of related computing resources.
为便于更好的实施本发明实施例的上述方案,下面还提供一些用于实施上述方案的相关装置。In order to facilitate the implementation of the above solution of the embodiments of the present invention, some related devices for implementing the above solutions are also provided below.
参见图9,本发明实施例提供一种视频编码中的块分割处理装置900,可以包括:获取单元910、确定单元920和分割单元930。Referring to FIG. 9, an embodiment of the present invention provides a block segmentation processing apparatus 900 in video coding, which may include: an obtaining unit 910, a determining unit 920, and a dividing unit 930.
获取单元910,用于获取视频帧的细分区域,The obtaining unit 910 is configured to acquire a subdivision area of the video frame,
其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个。The subdivided area of the video frame includes at least one of a region of interest of the video frame and an edge region of the video frame.
其中,获取单元910获取视频帧的细分区域的方式可为上述实施例举例的任意一种。 The manner in which the obtaining unit 910 obtains the subdivided area of the video frame may be any one of the foregoing embodiments.
确定单元920,用于确定所述视频帧的第一编码块包含所述细分区域中的像素点。The determining unit 920 is configured to determine that the first coding block of the video frame includes pixel points in the subdivided region.
分割单元930,用于将所述第一编码块进行子块分割。The dividing unit 930 is configured to perform sub-block segmentation on the first coding block.
在本发明的一些可能的实施方式中,确定单元920还可用于,在所述将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。In some possible implementation manners of the present disclosure, the determining unit 920 is further configured to: before the performing the sub-block partitioning on the first coding block, determining that a current segmentation depth of the first coding block is smaller than a first segmentation depth a threshold, wherein the first partition depth threshold is less than or equal to a maximum allowed partition depth of the video frame.
在本发明的一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,在所述确定所述视频帧的第一编码块包含所述细分区域中的像素点的方面,确定单元920可具体用于,确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。In some possible implementations of the present invention, the subdivided region of the video frame includes a region of interest of the video frame and an edge region of the video frame; wherein, in the determining the first of the video frame The encoding block includes an aspect of the pixel in the subdivided region, and the determining unit 920 is specifically configured to determine that the first encoding block of the video frame includes the pixel of the overlapping region of the region of interest and the edge region .
在本发明一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,在所述确定所述视频帧的第一编码块包含所述细分区域中的像素点的方面,确定单元920可具体用于,确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;In some possible implementations of the present invention, the subdivided region of the video frame includes a region of interest of the video frame and an edge region of the video frame; wherein the determining the first encoding of the video frame The block includes an aspect of the pixel in the subdivided region, and the determining unit 920 is specifically configured to: determine that the first coding block of the video frame includes a pixel in the region of interest and does not include the video frame a pixel point in the edge region, or determining that the first coded block of the video frame includes a pixel point in an edge region of the video frame and does not include a pixel point in the region of interest of the video frame;
其中,所述确定单元920还可用于,将所述第一编码块进行子块分割之前,确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The determining unit 920 is further configured to: before performing the sub-block partitioning on the first coding block, determining that a rate distortion cost of the first coding block is greater than a rate distortion of the first coding block after sub-block division cost.
在本发明的一些可能的实施方式中,确定单元920还可用于,将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第二分割深度阈值,所述第二分割深度阈值小于所述第一分割深度阈值。In some possible implementation manners of the present disclosure, the determining unit 920 is further configured to: before performing the sub-block partitioning on the first coding block, determining that a current segmentation depth of the first coding block is smaller than a second segmentation depth threshold, The second segmentation depth threshold is smaller than the first segmentation depth threshold.
在本发明的一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;确定单元920还可用于,确定所述视频帧的第二编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第二编码块包含所述视频帧的边 缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;确定所述第二编码块的率失真代价小于或者等于所述第二编码块进行子块分割后的率失真代价;确定所述第二编码块不进行子块分割。In some possible implementations of the present invention, the subdivided area of the video frame includes an area of interest of the video frame and an edge area of the video frame; the determining unit 920 is further configured to determine the video frame. a second coding block comprising pixel points in the region of interest and not including pixel points in an edge region of the video frame, or determining that a second coding block of the video frame includes an edge of the video frame a pixel in the edge region and not including a pixel in the region of interest of the video frame; determining that the rate distortion cost of the second encoding block is less than or equal to the rate distortion of the second encoding block after sub-block segmentation a cost; determining that the second coded block does not perform sub-block splitting.
在本发明的一些可能的实施方式中,确定单元920还可用于,确定所述视频帧的第三编码块不包含所述细分区域中的像素点;确定所述第三编码块不进行子块分割。In some possible implementation manners of the present invention, the determining unit 920 is further configured to: determine that the third coding block of the video frame does not include the pixel point in the subdivision area; and determine that the third coding block does not perform sub Block splitting.
在本发明的一些可能的实施方式中,确定单元920还可用于,在确定所述第三编码块不进行子块分割之前,确定所述第三编码块的当前分割深度等于第三分割深度阈值,其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。In some possible implementation manners of the present disclosure, the determining unit 920 is further configured to: before determining that the third coding block does not perform sub-block segmentation, determine that a current segmentation depth of the third coded block is equal to a third segmentation depth threshold. Wherein the third partition depth threshold is less than a maximum allowed partition depth of the video frame.
在本发明的一些可能的实施方式中,确定单元920还可用于,在确定所述第三编码块不进行子块分割之前,确定所述第三编码块的率失真代价小于或等于所述第三编码块进行子块分割后的率失真代价。In some possible implementation manners of the present invention, the determining unit 920 is further configured to: before determining that the third coding block does not perform sub-block segmentation, determine that a rate distortion cost of the third coding block is less than or equal to the first The rate-distortion cost of the sub-block partitioning by the three-coded block.
在本发明的一些可能的实施方式中,确定单元920还可用于,确定所述视频帧的第四编码块不包含所述细分区域中的像素点;确定所述第四编码块的率失真代价大于所述第四编码块进行子块分割后的率失真代价;In some possible implementation manners of the present invention, the determining unit 920 is further configured to: determine that a fourth coding block of the video frame does not include a pixel point in the subdivided region; determine a rate distortion of the fourth coding block The cost is greater than the rate distortion cost of the fourth coding block after sub-block division;
所述分割单元930还可用于,将所述第四编码块进行子块分割。The dividing unit 930 is further configured to perform sub-block segmentation on the fourth coding block.
在本发明的一些可能的实施方式中,确定单元920还可用于,在所述将所述第四编码块进行子块分割之前,确定所述第四编码块的当前分割深度小于第三分割深度阈值;其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。In some possible implementation manners of the present invention, the determining unit 920 is further configured to: before the sub-block division of the fourth coding block, determine that a current segmentation depth of the fourth coding block is smaller than a third segmentation depth. a threshold; wherein the third partition depth threshold is less than a maximum allowed partition depth of the video frame.
可以理解的是,本实施例的视频编码中的块分割处理装置900的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。视频编码中的块分割处理装置900可集成于视频编码装置中。其中,视频编码装置例如可为任何需要采集,存储或者向外传输音频信号的装置,例如手机,平板电脑,个人电脑,笔记本电脑等等。It can be understood that the functions of the function modules of the block segmentation processing device 900 in the video coding of the embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiments. I will not repeat them here. The block division processing device 900 in video coding can be integrated in the video encoding device. The video encoding device can be any device that needs to collect, store, or transmit audio signals, such as a mobile phone, a tablet computer, a personal computer, a notebook computer, and the like.
可以看出,本实施例视频编码中的块分割处理装置900在获取视频帧的细 分区域后,当确定所述视频帧的第一编码块包含所述细分区域中的像素点,将所述第一编码块进行子块分割。其中,所述视频帧的细分区域包括所述视频帧的ROI和所述视频帧的边缘区域中的至少一个。也就是说,视频帧的第一编码块与细分区域之间的相对位置关系可在一定程度上决定第一编码块在当前分割深度下是否进行子块分割。因此,相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本发明上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对计算资源的占用。It can be seen that the block segmentation processing apparatus 900 in the video coding of this embodiment is acquiring the fineness of the video frame. After the sub-region, when it is determined that the first coding block of the video frame includes pixel points in the subdivided region, the first coding block is subjected to sub-block division. The subdivided area of the video frame includes at least one of an ROI of the video frame and an edge area of the video frame. That is to say, the relative positional relationship between the first coding block and the subdivision area of the video frame can determine to some extent whether the first coding block performs sub-block division under the current segmentation depth. Therefore, the above technical solution of the present invention is advantageous for reducing the determination of the current coding block, compared to the conventional mechanism of determining whether to continue sub-block division for the current coding block by calculating and comparing the current coding block before and before the division. Whether the computational complexity of sub-block segmentation is performed under the current segmentation depth, thereby facilitating the reduction of the occupation of computing resources.
参见图10,图10是本发明另一实施例提供的视频编码装置的结构框图。Referring to FIG. 10, FIG. 10 is a structural block diagram of a video encoding apparatus according to another embodiment of the present invention.
视频编码装置1000可包括:至少1个处理器1001,存储器1005和至少1个通信总线1002。通信总线1002用于实现这些组件之间的连接通信。The video encoding apparatus 1000 may include at least one processor 1001, a memory 1005, and at least one communication bus 1002. Communication bus 1002 is used to implement connection communication between these components.
可选的,该视频编码装置1000还可包括:至少1个网络接口1004和用户接口1003等。其中,可选的,用户接口1003包括显示器(如触摸屏,液晶显示器或者全息成像(英文:Holographic)或者投影(英文:Projector)等等),点击设备(例如鼠标,轨迹球(英文:trackball)触感板或触摸屏等),摄像头和/或拾音装置等。Optionally, the video encoding apparatus 1000 may further include: at least one network interface 1004, a user interface 1003, and the like. Optionally, the user interface 1003 includes a display (such as a touch screen, a liquid crystal display or a holographic image (English: Holographic) or a projection (English: Projector), etc.), and a click device (for example, a mouse, a trackball (English: trackball) touch) Board or touch screen, etc.), camera and / or pickup device.
其中,存储器1005可以包括只读存储器和随机存取存储器,并向处理器1001提供指令和数据。存储器1005中的一部分还可以包括非易失性随机存取存储器。The memory 1005 can include read only memory and random access memory and provides instructions and data to the processor 1001. A portion of the memory 1005 may also include a non-volatile random access memory.
在一些可能的实施方式中,存储器1005存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:获取单元910,确定单元920和分割单元930。In some possible implementations, the memory 1005 stores elements, executable modules or data structures, or a subset thereof, or their extended set: acquisition unit 910, determination unit 920, and partition unit 930.
在本发明实施例中,通过执行存储器1005中的代码或指令,处理器1001用于获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;确定所述视频帧的第一编码块包含所述细分区域中的像素点;将所述第一编码块进行子块分割。In an embodiment of the present invention, the processor 1001 is configured to acquire a subdivided region of a video frame by executing a code or an instruction in the memory 1005, where the subdivided region of the video frame includes a region of interest of the video frame and At least one of edge regions of the video frame; determining that the first coding block of the video frame includes pixel points in the subdivision region; and performing sub-block segmentation on the first coding block.
在本发明的一些可能的实施方式中,处理器1001还用于在所述将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分 割深度。In some possible implementation manners of the present invention, the processor 1001 is further configured to: before the sub-block division of the first coding block, determine that a current segmentation depth of the first coding block is smaller than a first segmentation depth threshold. Where the first partition depth threshold is less than or equal to a maximum allowable score of the video frame Cut depth.
在本发明的一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,处理器1001用于确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。In some possible implementations of the present invention, the subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame; wherein the processor 1001 is configured to determine the video frame The first coding block includes pixel points of the region of interest and the overlapping region of the edge region.
在本发明的一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,处理器1001用于,确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;In some possible implementations of the present invention, the subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame; wherein the processor 1001 is configured to determine the video frame The first coded block includes pixel points in the region of interest and does not include pixel points in an edge region of the video frame, or determines that a first coded block of the video frame includes an edge region of the video frame Pixels and do not include pixels in the region of interest of the video frame;
其中,所述处理器1001还用于,在将所述第一编码块进行子块分割之前,确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The processor 1001 is further configured to: before performing the sub-block partitioning on the first coding block, determining that a rate distortion cost of the first coding block is greater than a rate after the first coding block performs sub-block division Distortion cost.
在本发明的一些可能的实施方式中,处理器1001还用于,在将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第二分割深度阈值,所述第二分割深度阈值小于所述第一分割深度阈值。In some possible implementations of the present invention, the processor 1001 is further configured to: before performing the sub-block partitioning on the first coding block, determining that a current segmentation depth of the first coding block is smaller than a second segmentation depth threshold, The second segmentation depth threshold is less than the first segmentation depth threshold.
在本发明的一些可能的实施方式中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,处理器1001还还用于,确定所述视频帧的第二编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第二编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;确定所述第二编码块的率失真代价小于或者等于所述第二编码块进行子块分割后的率失真代价;确定所述第二编码块不进行子块分割。In some possible implementations of the present invention, the subdivided area of the video frame includes a region of interest of the video frame and an edge region of the video frame; wherein the processor 1001 is further configured to determine the A second coded block of the video frame includes a pixel in the region of interest and does not include a pixel in an edge region of the video frame, or determines that a second encoded block of the video frame includes an edge of the video frame a pixel in the region and not including a pixel in the region of interest of the video frame; determining that a rate distortion penalty of the second encoded block is less than or equal to a rate distortion penalty of the second encoded block for sub-block segmentation Determining that the second coding block does not perform sub-block division.
在本发明的一些可能的实施方式中,处理器1001还用于,确定所述视频帧的第三编码块不包含所述细分区域中的像素点;确定所述第三编码块不进行子块分割。In some possible implementation manners of the present invention, the processor 1001 is further configured to: determine that a third coding block of the video frame does not include a pixel point in the subdivided region; and determine that the third coding block does not perform a sub- Block splitting.
在本发明的一些可能的实施方式中,处理器1001还用于在所述确定所述第三编码块不进行子块分割之前,确定所述第三编码块的当前分割深度等于第三分割深度阈值,其中,所述第三分割深度阈值小于所述视频帧的最大允许分割 深度。In some possible implementation manners of the present invention, the processor 1001 is further configured to: before determining that the third coding block does not perform sub-block segmentation, determining that a current segmentation depth of the third coded block is equal to a third segmentation depth a threshold, wherein the third partition depth threshold is smaller than a maximum allowed segmentation of the video frame depth.
在本发明的一些可能的实施方式中,处理器1001还用于在所述确定所述第三编码块不进行子块分割之前,确定所述第三编码块的率失真代价小于或等于所述第三编码块进行子块分割后的率失真代价。In some possible implementations of the present invention, the processor 1001 is further configured to: before determining that the third coding block does not perform sub-block segmentation, determining that a rate distortion cost of the third coding block is less than or equal to the The third coding block performs rate distortion cost after sub-block division.
在本发明的一些可能的实施方式中,处理器1001还用于确定所述视频帧的第四编码块不包含所述细分区域中的像素点;确定所述第四编码块的率失真代价大于所述第四编码块进行子块分割后的率失真代价;将所述第四编码块进行子块分割。In some possible implementation manners of the present invention, the processor 1001 is further configured to: determine that a fourth coding block of the video frame does not include a pixel point in the subdivision region; and determine a rate distortion cost of the fourth coding block. And a rate distortion cost after the sub-block division is performed by the fourth coding block; and the fourth coding block is subjected to sub-block division.
在本发明的一些可能的实施方式中,处理器1001还用于在所述将所述第四编码块进行子块分割之前,确定所述第四编码块的当前分割深度小于第三分割深度阈值;其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。In some possible implementations of the present invention, the processor 1001 is further configured to: before the sub-block division of the fourth coding block, determine that a current segmentation depth of the fourth coding block is smaller than a third segmentation depth threshold. Wherein the third partition depth threshold is less than a maximum allowed partition depth of the video frame.
可以理解的是,本实施例的视频编码装置1000的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。视频编码装置1000例如可为任何需要采集,存储或者向外传输音频信号的装置,例如手机,平板电脑,个人电脑,笔记本电脑等等。It is to be understood that the functions of the functional modules of the video encoding apparatus 1000 of the present embodiment may be specifically implemented according to the method in the foregoing method embodiments, and the specific implementation process may refer to the related description of the foregoing method embodiments, and details are not described herein again. . The video encoding device 1000 can be, for example, any device that needs to collect, store, or transmit audio signals, such as a mobile phone, a tablet computer, a personal computer, a notebook computer, and the like.
可以看出,本实施例视频编码装置1000在获取视频帧的细分区域后,当确定所述视频帧的第一编码块包含所述细分区域中的像素点,将所述第一编码块进行子块分割。其中,所述视频帧的细分区域包括所述视频帧的ROI和所述视频帧的边缘区域中的至少一个。也就是说,视频帧的第一编码块与细分区域之间的相对位置关系可在一定程度上决定第一编码块在当前分割深度下是否进行子块分割。因此,相比于完全通过计算和比较当前编码块划分前和划分前后的率失真大小来确定是否对当前编码块继续进行子块划分的传统机制,本发明上述技术方案有利于降低确定当前编码块在当前分割深度下是否进行子块分割的计算复杂度,进而有利于减少对计算资源的占用。It can be seen that, after acquiring the subdivided area of the video frame, the first coding block of the video frame includes the pixel points in the subdivided area, and the first coding block is determined. Perform sub-block splitting. The subdivided area of the video frame includes at least one of an ROI of the video frame and an edge area of the video frame. That is to say, the relative positional relationship between the first coding block and the subdivision area of the video frame can determine to some extent whether the first coding block performs sub-block division under the current segmentation depth. Therefore, the above technical solution of the present invention is advantageous for reducing the determination of the current coding block, compared to the conventional mechanism of determining whether to continue sub-block division for the current coding block by calculating and comparing the current coding block before and before the division. Whether the computational complexity of sub-block segmentation is performed under the current segmentation depth, thereby facilitating the reduction of the occupation of computing resources.
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任意一种视频编码中的块分割处理方法的部分或全部步骤。 The embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, where the program includes some or all of the block segmentation processing method in any one of the video encodings described in the foregoing method embodiments. step.
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任意一种视频编码方法的部分或全部步骤。The embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all of the steps of any one of the video encoding methods described in the foregoing method embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以为个人计算机、服务器或者网络设备等,具体可以是计算机设备中的处理器)执行本发明各个实施例所述方法的全部或部分步骤。其中,而前述的存储介质可包括:U盘、移动硬盘、磁碟、光盘、只读存储器(英文:read-only memory,缩写:ROM)或者随机存取存储器(英文:random access memory,缩写:RAM)等各种可以存储程序代码的介质。 The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. The instructions include a plurality of instructions for causing a computer device (which may be a personal computer, server or network device, etc., and in particular a processor in a computer device) to perform all or part of the steps of the methods of the various embodiments of the present invention. Wherein, the foregoing storage medium may include: a U disk, a mobile hard disk, a magnetic disk, an optical disk, a read only memory (English: read-only memory, abbreviation: ROM) or a random access memory (English: random access memory, abbreviation: RAM) and other media that can store program code.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents of the technical solutions of the embodiments of the present invention.

Claims (33)

  1. 一种视频编码中的块分割处理方法,其特征在于,包括:A block segmentation processing method in video coding, comprising:
    获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;Obtaining a subdivided region of the video frame, wherein the subdivided region of the video frame includes at least one of a region of interest of the video frame and an edge region of the video frame;
    确定所述视频帧的第一编码块包含所述细分区域中的像素点;Determining that the first coded block of the video frame includes pixel points in the subdivided region;
    将所述第一编码块进行子块分割。The first coding block is subjected to sub-block division.
  2. 根据权利要求1所述的方法,其特征在于,在所述将所述第一编码块进行子块分割之前,所述方法还包括:确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。The method according to claim 1, wherein before the sub-block segmentation is performed on the first coding block, the method further comprises: determining that a current segmentation depth of the first coding block is smaller than a first segmentation a depth threshold, wherein the first partition depth threshold is less than or equal to a maximum allowed partition depth of the video frame.
  3. 根据权利要求2所述的方法,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述确定所述视频帧的第一编码块包含所述细分区域中的像素点,包括:确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。The method according to claim 2, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame; wherein the determining the video frame is A code block includes pixel points in the subdivided region, including: determining that a first coded block of the video frame includes pixel points of an overlap region of the region of interest and the edge region.
  4. 根据权利要求2所述的方法,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述确定所述视频帧的第一编码块包含所述细分区域中的像素点,包括:确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;The method according to claim 2, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame; wherein the determining the video frame is A code block includes pixel points in the subdivided region, including: determining that a first coded block of the video frame includes a pixel point in the region of interest and does not include a pixel point in an edge region of the video frame Or determining that the first coded block of the video frame includes a pixel point in an edge region of the video frame and does not include a pixel point in a region of interest of the video frame;
    其中,所述将所述第一编码块进行子块分割之前,Before the first coding block is divided into sub-blocks,
    所述方法还包括:确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The method further includes determining that a rate distortion penalty of the first coding block is greater than a rate distortion penalty of the first coding block for sub-block division.
  5. 根据权利要求4所述的方法,其特征在于,The method of claim 4 wherein:
    所述将所述第一编码块进行子块分割之前,所述方法还包括:确定所述第一编码块的当前分割深度小于第二分割深度阈值,所述第二分割深度阈值小于所述第一分割深度阈值。The method further includes: determining that a current segmentation depth of the first coding block is smaller than a second segmentation depth threshold, where the second segmentation depth threshold is smaller than the first A split depth threshold.
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述视频帧的细 分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;The method according to any one of claims 1 to 5, characterized in that the video frame is fine a subregion including a region of interest of the video frame and an edge region of the video frame;
    其中,所述方法还包括:The method further includes:
    确定所述视频帧的第二编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第二编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;确定所述第二编码块的率失真代价小于或者等于所述第二编码块进行子块分割后的率失真代价;确定所述第二编码块不进行子块分割。Determining that a second coded block of the video frame includes a pixel in the region of interest and does not include a pixel in an edge region of the video frame, or determining that a second encoded block of the video frame includes the video a pixel point in an edge region of the frame and not including a pixel point in the region of interest of the video frame; determining that a rate distortion cost of the second coded block is less than or equal to the second code block for sub-block segmentation Rate distortion cost; determining that the second coded block does not perform sub-block segmentation.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,A method according to any one of claims 1 to 6, wherein
    所述方法还包括:The method further includes:
    确定所述视频帧的第三编码块不包含所述细分区域中的像素点;Determining that the third coding block of the video frame does not include pixel points in the subdivided region;
    确定所述第三编码块不进行子块分割。It is determined that the third coding block does not perform sub-block division.
  8. 根据权利要求7所述的方法,其特征在于,所述确定所述第三编码块不进行子块分割之前,所述方法还包括:确定所述第三编码块的当前分割深度等于第三分割深度阈值,其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。The method according to claim 7, wherein before the determining that the third coding block does not perform sub-block segmentation, the method further comprises: determining that a current segmentation depth of the third coding block is equal to a third segmentation a depth threshold, wherein the third partition depth threshold is less than a maximum allowed partition depth of the video frame.
  9. 根据权利要求7或8所述的方法,其特征在于,Method according to claim 7 or 8, characterized in that
    所述确定所述第三编码块不进行子块分割之前,所述方法还包括:确定所述第三编码块的率失真代价小于或等于所述第三编码块进行子块分割后的率失真代价。Before the determining that the third coding block does not perform sub-block division, the method further includes: determining that a rate distortion cost of the third coding block is less than or equal to a rate distortion of the third coding block after sub-block division cost.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,A method according to any one of claims 1 to 9, wherein
    所述方法还包括:确定所述视频帧的第四编码块不包含所述细分区域中的像素点;确定所述第四编码块的率失真代价大于所述第四编码块进行子块分割后的率失真代价;将所述第四编码块进行子块分割。The method further includes: determining that a fourth coding block of the video frame does not include a pixel point in the subdivided region; determining that a rate distortion cost of the fourth coding block is greater than the fourth coding block for sub-block division The subsequent rate distortion penalty; the fourth coding block is subjected to sub-block division.
  11. 根据权利要求10所述的方法,其特征在于,所述将所述第四编码块进行子块分割之前,所述方法还包括:确定所述第四编码块的当前分割深度小于第三分割深度阈值;其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。The method according to claim 10, wherein before the sub-block segmentation is performed on the fourth coding block, the method further comprises: determining that a current segmentation depth of the fourth coding block is smaller than a third segmentation depth a threshold; wherein the third partition depth threshold is less than a maximum allowed partition depth of the video frame.
  12. 一种视频编码中的块分割处理装置,其特征在于,包括: A block segmentation processing device for video coding, comprising:
    获取单元,用于获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;An acquiring unit, configured to acquire a subdivided area of the video frame, where the subdivided area of the video frame includes at least one of a region of interest of the video frame and an edge region of the video frame;
    确定单元,用于确定所述视频帧的第一编码块包含所述细分区域中的像素点;a determining unit, configured to determine that the first coding block of the video frame includes pixel points in the subdivided region;
    分割单元,用于将所述第一编码块进行子块分割。And a dividing unit, configured to perform sub-block segmentation on the first coding block.
  13. 根据权利要求12所述的装置,其特征在于,The device according to claim 12, characterized in that
    所述确定单元还用于,在所述将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。The determining unit is further configured to: before the sub-block division of the first coding block, determine that a current segmentation depth of the first coding block is smaller than a first segmentation depth threshold, where the first segmentation depth The threshold is less than or equal to the maximum allowed segmentation depth of the video frame.
  14. 根据权利要求13所述的装置,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,在所述确定所述视频帧的第一编码块包含所述细分区域中的像素点的方面,所述确定单元具体用于,确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。The apparatus according to claim 13, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame; wherein, in the determining the video frame The first coding block includes an aspect of the pixel in the subdivision region, and the determining unit is specifically configured to: determine that the first coding block of the video frame includes an overlap region of the region of interest and the edge region pixel.
  15. 根据权利要求13所述的装置,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,在所述确定所述视频帧的第一编码块包含所述细分区域中的像素点的方面,所述确定单元具体用于,确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;The apparatus according to claim 13, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame; wherein, in the determining the video frame The first coding block includes an aspect of the pixel in the subdivided region, and the determining unit is specifically configured to: determine that the first coding block of the video frame includes a pixel in the region of interest and does not include the a pixel in an edge region of the video frame, or determining that the first encoded block of the video frame includes pixel points in an edge region of the video frame and does not include pixel points in the region of interest of the video frame;
    其中,所述确定单元还用于,将所述第一编码块进行子块分割之前,确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The determining unit is further configured to: before performing the sub-block partitioning on the first coding block, determining that a rate distortion cost of the first coding block is greater than a rate distortion cost of the first coding block after performing sub-block division .
  16. 根据权利要求15所述的装置,其特征在于,The device of claim 15 wherein:
    所述确定单元还用于,将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第二分割深度阈值,所述第二分割深度阈值小于所述第一分割深度阈值。 The determining unit is further configured to: before the first coding block is divided into sub-blocks, determine that a current segmentation depth of the first coding block is smaller than a second segmentation depth threshold, where the second segmentation depth threshold is smaller than the first A split depth threshold.
  17. 根据权利要求12至16任一项所述的装置,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;The apparatus according to any one of claims 12 to 16, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame;
    所述确定单元还用于,确定所述视频帧的第二编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第二编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;确定所述第二编码块的率失真代价小于或者等于所述第二编码块进行子块分割后的率失真代价;确定所述第二编码块不进行子块分割。The determining unit is further configured to: determine that the second coding block of the video frame includes a pixel point in the region of interest and does not include a pixel point in an edge region of the video frame, or determine the video frame The second coding block includes pixel points in an edge region of the video frame and does not include pixel points in the region of interest of the video frame; determining that the rate distortion cost of the second coding block is less than or equal to the second The coding block performs rate distortion cost after sub-block division; determining that the second coding block does not perform sub-block division.
  18. 根据权利要求12至17任一项所述的装置,其特征在于,所述确定单元还用于,确定所述视频帧的第三编码块不包含所述细分区域中的像素点;确定所述第三编码块不进行子块分割。The apparatus according to any one of claims 12 to 17, wherein the determining unit is further configured to: determine that a third coding block of the video frame does not include a pixel in the subdivision area; The third coding block does not perform sub-block division.
  19. 根据权利要求18所述的装置,其特征在于,所述确定单元还用于在确定所述第三编码块不进行子块分割之前,确定所述第三编码块的当前分割深度等于第三分割深度阈值,其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。The apparatus according to claim 18, wherein the determining unit is further configured to: before determining that the third coding block does not perform sub-block segmentation, determining that a current segmentation depth of the third coding block is equal to a third segmentation a depth threshold, wherein the third partition depth threshold is less than a maximum allowed partition depth of the video frame.
  20. 根据权利要求18或19所述的装置,其特征在于,Device according to claim 18 or 19, characterized in that
    所述确定单元还用于,在确定所述第三编码块不进行子块分割之前,确定所述第三编码块的率失真代价小于或等于所述第三编码块进行子块分割后的率失真代价。The determining unit is further configured to: before determining that the third coding block does not perform sub-block division, determining that a rate distortion cost of the third coding block is less than or equal to a rate of the third coding block after performing sub-block division Distortion cost.
  21. 根据权利要求12至20任一项所述的装置,其特征在于,Apparatus according to any one of claims 12 to 20, wherein
    所述确定单元还用于,确定所述视频帧的第四编码块不包含所述细分区域中的像素点;确定所述第四编码块的率失真代价大于所述第四编码块进行子块分割后的率失真代价;The determining unit is further configured to: determine that a fourth coding block of the video frame does not include a pixel point in the subdivided region; and determine that a rate distortion cost of the fourth coding block is greater than a fourth coding block. Rate distortion cost after block segmentation;
    所述分割单元还用于,将所述第四编码块进行子块分割。The dividing unit is further configured to perform sub-block segmentation on the fourth coding block.
  22. 根据权利要求21所述的装置,其特征在于,The device according to claim 21, wherein
    所述确定单元还用于,在所述将所述第四编码块进行子块分割之前,确定所述第四编码块的当前分割深度小于第三分割深度阈值;其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。 The determining unit is further configured to: before the sub-block division of the fourth coding block, determine that a current segmentation depth of the fourth coding block is smaller than a third segmentation depth threshold; wherein the third segmentation depth The threshold is less than the maximum allowed segmentation depth of the video frame.
  23. 一种视频编码装置,其特征在于,包括:A video encoding apparatus, comprising:
    处理器和存储器,Processor and memory,
    其中,通过运行所述存储器中存储的指令或代码,所述处理器用于获取视频帧的细分区域,其中,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域中的至少一个;确定所述视频帧的第一编码块包含所述细分区域中的像素点;将所述第一编码块进行子块分割。The processor is configured to acquire a subdivided area of a video frame by running an instruction or code stored in the memory, where a subdivided area of the video frame includes a region of interest of the video frame and the video At least one of edge regions of the frame; determining that the first coded block of the video frame includes pixel points in the subdivided region; and sub-blocking the first coded block.
  24. 根据权利要求23所述的视频编码装置,其特征在于,所述处理器还用于在所述将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第一分割深度阈值,其中,所述第一分割深度阈值小于或等于所述视频帧的最大允许分割深度。The video encoding apparatus according to claim 23, wherein the processor is further configured to: before the sub-block division of the first coding block, determine that a current segmentation depth of the first coding block is smaller than a first partition depth threshold, wherein the first partition depth threshold is less than or equal to a maximum allowed partition depth of the video frame.
  25. 根据权利要求24所述的视频编码装置,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述处理器用于确定所述视频帧的第一编码块包含所述感兴趣区域和所述边缘区域的重叠区域的像素点。The video encoding apparatus according to claim 24, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame; wherein the processor is configured to determine The first coded block of the video frame includes pixel points of the region of interest and the overlap region of the edge region.
  26. 根据权利要求24所述的视频编码装置,其特征在于,所述视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;其中,所述处理器用于,确定所述视频帧的第一编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第一编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;The video encoding apparatus according to claim 24, wherein the subdivided area of the video frame comprises a region of interest of the video frame and an edge region of the video frame; wherein the processor is configured to determine a first coding block of the video frame includes a pixel in the region of interest and does not include a pixel in an edge region of the video frame, or determines that a first coding block of the video frame includes the video frame a pixel in the edge region and does not include a pixel in the region of interest of the video frame;
    其中,所述处理器还用于,在将所述第一编码块进行子块分割之前,确定所述第一编码块的率失真代价大于所述第一编码块进行子块分割后的率失真代价。The processor is further configured to: before performing the sub-block division on the first coding block, determining that a rate distortion cost of the first coding block is greater than a rate distortion of the first coding block after performing sub-block division cost.
  27. 根据权利要求26所述的视频编码装置,其特征在于,The video encoding apparatus according to claim 26, wherein
    所述处理器还用于,在将所述第一编码块进行子块分割之前,确定所述第一编码块的当前分割深度小于第二分割深度阈值,所述第二分割深度阈值小于所述第一分割深度阈值。The processor is further configured to: before performing the sub-block division on the first coding block, determining that a current segmentation depth of the first coding block is smaller than a second segmentation depth threshold, where the second segmentation depth threshold is smaller than the The first split depth threshold.
  28. 根据权利要求23至27任一项所述的视频编码装置,其特征在于,所述 视频帧的细分区域包括所述视频帧的感兴趣区域和所述视频帧的边缘区域;A video encoding apparatus according to any one of claims 23 to 27, wherein said said A subdivided region of the video frame includes a region of interest of the video frame and an edge region of the video frame;
    其中,所述处理器还用于,确定所述视频帧的第二编码块包含所述感兴趣区域中的像素点且不包含所述视频帧的边缘区域中的像素点,或者确定所述视频帧的第二编码块包含所述视频帧的边缘区域中的像素点且不包含所述视频帧的感兴趣区域中的像素点;确定所述第二编码块的率失真代价小于或者等于所述第二编码块进行子块分割后的率失真代价;确定所述第二编码块不进行子块分割。The processor is further configured to: determine that a second coding block of the video frame includes a pixel in the region of interest and does not include a pixel in an edge region of the video frame, or determine the video The second coded block of the frame includes pixel points in an edge region of the video frame and does not include pixel points in the region of interest of the video frame; determining that the rate distortion cost of the second coded block is less than or equal to The second coding block performs a rate-distortion penalty after the sub-block division; determining that the second coding block does not perform sub-block division.
  29. 根据权利要求23至28任一项所述的视频编码装置,其特征在于,A video encoding apparatus according to any one of claims 23 to 28, characterized in that
    所述处理器还用于,确定所述视频帧的第三编码块不包含所述细分区域中的像素点;确定所述第三编码块不进行子块分割。The processor is further configured to: determine that the third coding block of the video frame does not include a pixel in the subdivided region; and determine that the third coding block does not perform sub-block segmentation.
  30. 根据权利要求29所述的视频编码装置,其特征在于,所述处理器还用于在所述确定所述第三编码块不进行子块分割之前,确定所述第三编码块的当前分割深度等于第三分割深度阈值,其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。The video encoding apparatus according to claim 29, wherein the processor is further configured to determine a current segmentation depth of the third encoding block before determining that the third encoding block does not perform sub-block segmentation. Is equal to a third partition depth threshold, wherein the third partition depth threshold is smaller than a maximum allowed partition depth of the video frame.
  31. 根据权利要求29或30所述的视频编码装置,其特征在于,A video encoding apparatus according to claim 29 or 30, wherein
    所述处理器还用于在所述确定所述第三编码块不进行子块分割之前,确定所述第三编码块的率失真代价小于或等于所述第三编码块进行子块分割后的率失真代价。The processor is further configured to: before determining that the third coding block does not perform sub-block division, determining that a rate distortion cost of the third coding block is less than or equal to the third coding block after sub-block division Rate distortion cost.
  32. 根据权利要求23至31任一项所述的视频编码装置,其特征在于,A video encoding apparatus according to any one of claims 23 to 31, wherein
    所述处理器还用于确定所述视频帧的第四编码块不包含所述细分区域中的像素点;确定所述第四编码块的率失真代价大于所述第四编码块进行子块分割后的率失真代价;将所述第四编码块进行子块分割。The processor is further configured to: determine that a fourth coding block of the video frame does not include a pixel point in the subdivided region; determine that a rate distortion cost of the fourth coding block is greater than a fourth block to perform a subblock a rate-distortion penalty after segmentation; sub-block segmentation is performed on the fourth coded block.
  33. 根据权利要求32所述的视频编码装置,其特征在于,所述处理器还用于在所述将所述第四编码块进行子块分割之前,确定所述第四编码块的当前分割深度小于第三分割深度阈值;其中,所述第三分割深度阈值小于所述视频帧的最大允许分割深度。 The video encoding apparatus according to claim 32, wherein the processor is further configured to: before the sub-block division of the fourth coding block, determine that a current segmentation depth of the fourth coding block is smaller than a third partition depth threshold; wherein the third partition depth threshold is smaller than a maximum allowed partition depth of the video frame.
PCT/CN2014/085681 2014-09-01 2014-09-01 Block segmentation mode processing method in video coding and relevant apparatus WO2016033725A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2014/085681 WO2016033725A1 (en) 2014-09-01 2014-09-01 Block segmentation mode processing method in video coding and relevant apparatus
CN201480080086.1A CN106664404B (en) 2014-09-01 2014-09-01 Block partitioning scheme processing method and relevant apparatus in Video coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/085681 WO2016033725A1 (en) 2014-09-01 2014-09-01 Block segmentation mode processing method in video coding and relevant apparatus

Publications (1)

Publication Number Publication Date
WO2016033725A1 true WO2016033725A1 (en) 2016-03-10

Family

ID=55438975

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/085681 WO2016033725A1 (en) 2014-09-01 2014-09-01 Block segmentation mode processing method in video coding and relevant apparatus

Country Status (2)

Country Link
CN (1) CN106664404B (en)
WO (1) WO2016033725A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566834A (en) * 2017-10-10 2018-01-09 司马大大(北京)智能系统有限公司 Intraprediction unit division methods, device and electronic equipment
CN110662048A (en) * 2018-06-28 2020-01-07 华为技术有限公司 Image coding method and device
CN112153317A (en) * 2020-09-25 2020-12-29 杭州涂鸦信息技术有限公司 Image quality control method, system and equipment thereof

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116437084A (en) * 2016-11-21 2023-07-14 松下电器(美国)知识产权公司 Image encoding method, image decoding method, and non-transitory storage medium
CN110225355A (en) * 2019-06-22 2019-09-10 衢州光明电力投资集团有限公司赋腾科技分公司 High-performance video coding intra prediction optimization method based on area-of-interest
CN112750127B (en) * 2021-02-04 2022-08-26 深圳市泽峰光电科技有限公司 Image processing method for log end face measurement

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080165861A1 (en) * 2006-12-19 2008-07-10 Ortiva Wireless Intelligent Video Signal Encoding Utilizing Regions of Interest Information
US20110194613A1 (en) * 2010-02-11 2011-08-11 Qualcomm Incorporated Video coding with large macroblocks
CN102792691A (en) * 2010-01-12 2012-11-21 Lg电子株式会社 Processing method and device for video signals
CN103299634A (en) * 2010-11-22 2013-09-11 联发科技(新加坡)私人有限公司 Apparatus and method of constrained partition size for high efficiency video coding
WO2013157820A1 (en) * 2012-04-16 2013-10-24 삼성전자 주식회사 Video coding method and device using high-speed edge detection, and related video decoding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080165861A1 (en) * 2006-12-19 2008-07-10 Ortiva Wireless Intelligent Video Signal Encoding Utilizing Regions of Interest Information
CN102792691A (en) * 2010-01-12 2012-11-21 Lg电子株式会社 Processing method and device for video signals
US20110194613A1 (en) * 2010-02-11 2011-08-11 Qualcomm Incorporated Video coding with large macroblocks
CN103299634A (en) * 2010-11-22 2013-09-11 联发科技(新加坡)私人有限公司 Apparatus and method of constrained partition size for high efficiency video coding
WO2013157820A1 (en) * 2012-04-16 2013-10-24 삼성전자 주식회사 Video coding method and device using high-speed edge detection, and related video decoding method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566834A (en) * 2017-10-10 2018-01-09 司马大大(北京)智能系统有限公司 Intraprediction unit division methods, device and electronic equipment
CN110662048A (en) * 2018-06-28 2020-01-07 华为技术有限公司 Image coding method and device
CN112153317A (en) * 2020-09-25 2020-12-29 杭州涂鸦信息技术有限公司 Image quality control method, system and equipment thereof

Also Published As

Publication number Publication date
CN106664404A (en) 2017-05-10
CN106664404B (en) 2019-10-01

Similar Documents

Publication Publication Date Title
Min et al. Unified blind quality assessment of compressed natural, graphic, and screen content images
WO2016033725A1 (en) Block segmentation mode processing method in video coding and relevant apparatus
US20140321552A1 (en) Optimization of Deblocking Filter Parameters
You et al. Attention modeling for video quality assessment: Balancing global quality and local quality
CN107454413B (en) Video coding method with reserved characteristics
Choi et al. Video quality assessment accounting for temporal visual masking of local flicker
Yuan et al. Low bit-rate compression of underwater image based on human visual system
Nami et al. BL-JUNIPER: A CNN-assisted framework for perceptual video coding leveraging block-level JND
Tandon et al. CAMBI: Contrast-aware multiscale banding index
Wang et al. Perceptual video coding based on saliency and just noticeable distortion for H. 265/HEVC
CN113906762B (en) Pre-processing for video compression
Nur Yilmaz A no reference depth perception assessment metric for 3D video
CN110740316A (en) Data coding method and device
Zhao et al. Fast CU partition decision strategy based on human visual system perceptual quality
CN107509074B (en) Self-adaptive 3D video compression coding and decoding method based on compressed sensing
Farah et al. Full-reference and reduced-reference quality metrics based on SIFT
CN114173131A (en) Video compression method and system based on inter-frame correlation
Khatoonabadi et al. Compressed-domain correlates of fixations in video
KR101358576B1 (en) Video transcoding optimization method using correlation of subjective and objective video quality assessment
TWI226189B (en) Method for automatically detecting region of interest in the image
Wang et al. PVC-STIM: Perceptual video coding based on spatio-temporal influence map
Himawan et al. Impact of automatic region-of-interest coding on perceived quality in mobile video
Fang et al. Review of existing objective QoE methodologies
US10848772B2 (en) Histogram-based edge/text detection
KR101362654B1 (en) Video transcoding optimization method using light intensity analysis

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: 14901226

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: 14901226

Country of ref document: EP

Kind code of ref document: A1