WO2021196994A1 - Encoding method and apparatus, terminal, and storage medium - Google Patents

Encoding method and apparatus, terminal, and storage medium Download PDF

Info

Publication number
WO2021196994A1
WO2021196994A1 PCT/CN2021/079799 CN2021079799W WO2021196994A1 WO 2021196994 A1 WO2021196994 A1 WO 2021196994A1 CN 2021079799 W CN2021079799 W CN 2021079799W WO 2021196994 A1 WO2021196994 A1 WO 2021196994A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
video image
screen
image
video
Prior art date
Application number
PCT/CN2021/079799
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 北京字节跳动网络技术有限公司
Publication of WO2021196994A1 publication Critical patent/WO2021196994A1/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/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/136Incoming video signal characteristics or properties
    • 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]

Definitions

  • the screen video content is the video content captured directly from the image display of the terminal such as computer mobile phone, mainly including computer graphics, text documents, natural video and graphic text mixed images, computer-generated images, etc.
  • Screen video has broad application prospects in desktop sharing, video conferencing, online education, cloud gaming and other fields.
  • the present disclosure provides an encoding method and device, terminal and storage medium.
  • N is a positive integer
  • the determining module is configured to determine, according to the statistical result, whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
  • the memory is used to store program code
  • the processor is used to call the program code stored in the memory to execute the above-mentioned method.
  • the present disclosure provides a storage medium, the storage medium is used to store program code, and the program code is used to execute the above-mentioned method.
  • the type of the Nth frame of video image is the key frame
  • a screen encoding tool is turned on for at least one frame of video image after the Nth frame of video image, and the screen encoding tool is used for at least one frame based on the screen encoding tool.
  • Video images are encoded.
  • the at least one frame of video image mentioned here includes M+1 frames of continuous video images composed of the Nth frame of video images and subsequent M frames of non-key frame video images, and M is a positive integer.
  • the at least one frame of video image may not include the Nth frame of video image, or only include the Nth frame of video image.
  • the proportion mentioned here refers to the ratio of the number of image blocks using the screen encoding mode for a certain frame of image to the number of all image blocks included in the frame of image.
  • the embodiments of the present disclosure may include statistical results in two forms of numerical value and ratio. If the statistical result is a numerical value, the number of image blocks in each frame of video image obtained as described above that adopts the screen encoding mode is the statistical result; if the statistical result is a ratio, the number obtained above can be divided by the frame The total number of image blocks in the video image can be used to obtain the proportion of image blocks in the frame of video image that use the screen encoding mode.
  • the screen encoding mode includes at least one of the following:
  • an encoding device including:
  • the determining module is configured to determine, according to the statistical result, whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.

Abstract

The present application provides an encoding method and apparatus, a terminal, and a storage medium. The encoding method comprises: obtaining an N-th video image frame in a video; detecting the type of the N-th video image frame; if the type of the N-th video image frame is a keyframe, starting a screen encoding tool for at least one video image frame after the N-th video image frame, and encoding the at least one video image frame on the basis of the screen encoding tool; counting the number of image blocks, which use a screen encoding mode, in each video image frame in the at least one video image frame to obtain a counting result; and determining, according to the counting result, whether to use the screen coding tool for continuous non-keyframe video images after the at least one video image frame before the arrival of a next keyframe. The encoding method in the present application allows adaptively deciding whether to open a screen encoding tool.

Description

编码的方法及装置、终端和存储介质Encoding method and device, terminal and storage medium
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202010240984.6、申请日为2020年3月31日,名称为“编码的方法及装置、终端及存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on the Chinese patent application with the application number 202010240984.6, the filing date of March 31, 2020, and the title "Encoding method and device, terminal and storage medium", and claims the priority of the Chinese patent application. The entire content of the patent application is incorporated herein by reference.
技术领域Technical field
本公开的实施例涉及计算机技术领域,尤其涉及一种编码的方法及装置、终端和存储介质。The embodiments of the present disclosure relate to the field of computer technology, and in particular, to an encoding method and device, a terminal, and a storage medium.
背景技术Background technique
屏幕视频内容是直接从计算机手机等终端的图像显示器中捕捉到的视频内容,主要包括计算机图形,文字文档,自然视频与图形文字混合图像,计算机生成图像等。屏幕视频在桌面共享、视频会议、在线教育、云游戏等领域有广泛应用前景。The screen video content is the video content captured directly from the image display of the terminal such as computer mobile phone, mainly including computer graphics, text documents, natural video and graphic text mixed images, computer-generated images, etc. Screen video has broad application prospects in desktop sharing, video conferencing, online education, cloud gaming and other fields.
发明内容Summary of the invention
为解决现有问题,本公开提供一种编码的方法及装置、终端和存储介质。In order to solve the existing problems, the present disclosure provides an encoding method and device, terminal and storage medium.
本公开采用以下的技术方案。The present disclosure adopts the following technical solutions.
在一些实施例中,本公开提供一种编码的方法,包括:In some embodiments, the present disclosure provides an encoding method, including:
获取视频中的第N帧视频图像;其中,N为正整数;Obtain the Nth frame of video image in the video; where N is a positive integer;
检测所述第N帧视频图像的类型;其中,所述类型包括关键帧和非关键帧;Detecting the type of the Nth frame of video image; wherein, the type includes key frames and non-key frames;
在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏幕编码工具对所述至少一帧视频图像进行编码;When the type of the Nth frame of video image is the key frame, a screen encoding tool is turned on for at least one frame of video image after the Nth frame of video image, and the screen encoding tool is used for the at least Encode one frame of video image;
统计所述至少一帧视频图像中各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果;及Counting the number of image blocks in each frame of video image in the at least one frame of video image that adopt the screen encoding mode to obtain a statistical result; and
根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。According to the statistical result, it is determined whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
在一些实施例中,本公开提供一种编码的装置,包括:In some embodiments, the present disclosure provides an encoding device, including:
获取模块,用于获取视频中的第N帧视频图像;其中,N为正整数;The acquisition module is used to acquire the Nth frame of video image in the video; where N is a positive integer;
检测模块,用于检测所述第N帧视频图像的类型;其中,所述类型包括关键帧和非关键帧;The detection module is used to detect the type of the Nth frame of video image; wherein, the type includes key frames and non-key frames;
操作模块,用于在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏幕编码工具对所述至少一帧视频图像进行编码;An operation module, configured to enable a screen encoding tool for at least one frame of video image after the Nth frame of video image when the type of the Nth frame of video image is the key frame, and based on the screen encoding The tool encodes the at least one frame of video image;
统计模块,用于统计所述至少一帧视频图像中各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果;及A statistics module, configured to count the number of image blocks in each frame of the video image in the at least one frame of video image that adopt the screen encoding mode, and obtain a statistical result; and
确定模块,用于根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。The determining module is configured to determine, according to the statistical result, whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
在一些实施例中,本公开提供一种终端,包括:至少一个存储器和至少一个处理器;In some embodiments, the present disclosure provides a terminal, including: at least one memory and at least one processor;
其中,存储器用于存储程序代码,处理器用于调用所述存储器所存储的程序代码执行上述的方法。Wherein, the memory is used to store program code, and the processor is used to call the program code stored in the memory to execute the above-mentioned method.
在一些实施例中,本公开提供一种存储介质,所述存储介质用于存储程序代码,所述程序代码用于执行上述的方法。In some embodiments, the present disclosure provides a storage medium, the storage medium is used to store program code, and the program code is used to execute the above-mentioned method.
本公开提供的编码方案能够有效区分屏幕视频内容和非屏幕视频内容;对于屏幕视频,能保证屏幕编码工具的编码效率;对于非屏幕视频内容,自适应关闭屏幕编码工具,加快编码速度,节省计算资源。The coding scheme provided by the present disclosure can effectively distinguish screen video content and non-screen video content; for screen video, the coding efficiency of the screen coding tool can be guaranteed; for non-screen video content, the screen coding tool is adaptively turned off to speed up the coding speed and save calculations resource.
附图说明Description of the drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent in conjunction with the accompanying drawings and with reference to the following specific implementations. Throughout the drawings, the same or similar reference signs indicate the same or similar elements. It should be understood that the drawings are schematic and elements and elements are not necessarily drawn to scale.
图1是本公开实施例的编码方法的流程图。Fig. 1 is a flowchart of an encoding method according to an embodiment of the present disclosure.
图2是本公开实施例的编码方法的示意图。Fig. 2 is a schematic diagram of an encoding method of an embodiment of the present disclosure.
图3是本公开实施例的编码装置的结构示意图。Fig. 3 is a schematic structural diagram of an encoding device according to an embodiment of the present disclosure.
图4是本公开另一实施例的编码装置的结构示意图。Fig. 4 is a schematic structural diagram of an encoding device according to another embodiment of the present disclosure.
图5是本公开实施例的电子设备的结构示意图。Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Hereinafter, embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided for Have a more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are only used for exemplary purposes, and are not used to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the steps described in the method embodiments of the present disclosure can be executed in parallel and/or in parallel. In addition, method implementations may include additional steps and/or omit to perform the illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。The term "including" and its variations as used herein are open-ended includes, that is, "including but not limited to". The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." Related definitions of other terms will be given in the following description.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that the concepts of “first” and “second” mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units. Or interdependence.
需要注意,本公开中提及的“一个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modification of "a" mentioned in the present disclosure is illustrative and not restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
人们在实际应用中接触到的视频,都是压缩过的视频。这是因为未经压缩的原始视频的数据量是惊人的,根本无法直接用于实际的传输或存储。因此,视频应用的一项关键技术就是视频编码(Video Coding),也称视频压缩,其目的是尽可能去除视频数据中的冗余成分,减少表征视频的数据量。高效视频编码(High Efficiency Video Coding,HEVC)屏幕内容编码(Screen Content Coding,SCC)在HEVC/H.265上针对屏幕视频内容提出拓展提案。对于典型的屏幕视频 内容,HEVC SCC能提升50%左右的编码效率,同时也增加了编码复杂度。SCC仅对典型的桌面视频有较好的编码效率,但不能提升对于类似摄像机采集的自然场景序列的编码压缩效率,而且会大幅增加编码复杂度。此外,屏幕视频内容也有很多自然序列的场景,比如播放摄像机采集的电影电视剧等。UGC用户生产的内容中有很多摄像机采集的自然场景视频,也有很多类似于ppt、文档录屏、硬字幕等屏幕视屏内容,如果对所有的视频都打开屏幕编码工具,会造成计算能力的浪费。The videos that people come into contact with in practical applications are all compressed videos. This is because the data volume of uncompressed original video is amazing and cannot be directly used for actual transmission or storage. Therefore, a key technology for video applications is video coding (Video Coding), also known as video compression, whose purpose is to remove redundant components in video data as much as possible and reduce the amount of data that characterizes the video. High Efficiency Video Coding (HEVC) Screen Content Coding (SCC) proposes an expansion proposal for screen video content on HEVC/H.265. For typical screen video content, HEVC SCC can improve coding efficiency by about 50%, while also increasing coding complexity. SCC only has good coding efficiency for typical desktop videos, but it cannot improve the coding and compression efficiency of natural scene sequences captured by similar cameras, and it will greatly increase the coding complexity. In addition, the screen video content also has many natural sequence scenes, such as playing movies and TV series collected by cameras. The content produced by UGC users includes many natural scene videos captured by cameras, as well as many screen contents such as ppt, document recording, and hard subtitles. If the screen encoding tool is turned on for all videos, it will waste computing power.
针对上述情况,发明人提出本申请,以下将结合附图,对本申请实施例提供的方案进行详细描述。In view of the above situation, the inventor filed this application, and the solutions provided by the embodiments of this application will be described in detail below in conjunction with the accompanying drawings.
如图1所示,图1是本公开实施例的编码方法的流程图,包括如下步骤。As shown in Fig. 1, Fig. 1 is a flowchart of an encoding method according to an embodiment of the present disclosure, which includes the following steps.
S100,获取视频中的第N帧视频图像,其中,N为正整数。具体地,N为从1开始递增的正整数。S100. Acquire an Nth frame of video image in the video, where N is a positive integer. Specifically, N is a positive integer increasing from 1.
如今的视频通常是数字视频,从本质上讲是一系列内容连续的数字图像,按时间顺序排列而成。由于人眼有视觉暂留机理,连续播放的图像会形成平滑连续的视觉效果,当播放速度足够快时,人眼不再分辨出每一幅图像,而是在脑海中形成连续的视频。因此,图像是视频信号的基本单位。为了与静止图像相区别,视频中完整图像通常被称为帧(Frame),由许多帧按照时间顺序组成的视频被称为视频序列(Video Sequence)。而一帧图像又可以被分割为多个图像块。Today's video is usually digital video, which is essentially a series of digital images with continuous content arranged in chronological order. Because the human eye has a persistence mechanism of vision, the continuously played images will form a smooth and continuous visual effect. When the playback speed is fast enough, the human eye no longer distinguishes each image, but forms a continuous video in the mind. Therefore, the image is the basic unit of the video signal. To distinguish it from a still image, a complete image in a video is usually called a frame (Frame), and a video composed of many frames in a time sequence is called a video sequence (Video Sequence). And a frame of image can be divided into multiple image blocks.
S200,检测第N帧视频图像的类型;其中,类型包括关键帧和非关键帧。S200: Detect the type of the Nth frame of video image, where the type includes a key frame and a non-key frame.
具体地,视频序列由若干个小的图像组(Group Of Pictures,GOP)组成,各个GOP之间独立编解码。每一个GOP以关键帧(I帧)图像开始,后续图像为非关键帧,例如P帧和B帧。其中,I帧不需要参考其它的帧,而P帧和B帧需要参考I帧。从关键帧图像开始,可以独立解码该图像以及在它后面的图像,无须依赖码流中的任何先于它的图像。在编码流中,关键帧图像的出现既标志前面图像组的结束,也标志新的图像组的开始。Specifically, a video sequence is composed of several small groups of pictures (Group Of Pictures, GOP), and each GOP is independently coded and decoded. Each GOP starts with a key frame (I frame) image, and subsequent images are non-key frames, such as P frames and B frames. Among them, the I frame does not need to refer to other frames, while the P frame and B frame need to refer to the I frame. Starting from the key frame image, the image and the images behind it can be decoded independently, without relying on any images that precede it in the code stream. In the coded stream, the appearance of a key frame image not only marks the end of the previous group of pictures, but also the beginning of a new group of pictures.
S300,在所述第N帧视频图像的所述类型为所述关键帧时,对第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏幕编码工具对至少一帧视频图像进行编码。其中,此处提到的至少一帧视频图像包括所述第N 帧视频图像以及后续的M帧非关键帧视频图像组成的M+1帧连续的视频图像,M为正整数。当然,该至少一帧视频图像也可以不包括第N帧视频图像,或者仅包括该第N帧视频图像。S300. When the type of the Nth frame of video image is the key frame, a screen encoding tool is turned on for at least one frame of video image after the Nth frame of video image, and the screen encoding tool is used for at least one frame based on the screen encoding tool. Video images are encoded. Wherein, the at least one frame of video image mentioned here includes M+1 frames of continuous video images composed of the Nth frame of video images and subsequent M frames of non-key frame video images, and M is a positive integer. Of course, the at least one frame of video image may not include the Nth frame of video image, or only include the Nth frame of video image.
具体地,在检测到关键帧(I帧)视频图像时,本公开实施例可对该关键帧视频图像及其后连续的M帧非关键帧视频图像进行编码。如图2所示,图2是本公开实施例的编码方法的示意图。图2示出了一个GOP中的视频图像帧,例如其中第一帧的序号为N,取从第N帧开始的连续的后M帧视频图像,即从第N帧到第(N+M)帧进行例如编码操作。可以理解,其中M的取值为小于该GOP中帧的总数的正整数,具体取值可根据实际情况确定。更具体地,每一帧视频图像又可分为若干图像块;其中,不同图像块可编码为不同的模式,其可包括屏幕视频编码模式和常规模式。Specifically, when a key frame (I frame) video image is detected, the embodiments of the present disclosure may encode the key frame video image and subsequent M consecutive non-key frame video images. As shown in FIG. 2, FIG. 2 is a schematic diagram of an encoding method according to an embodiment of the present disclosure. Figure 2 shows video image frames in a GOP. For example, the sequence number of the first frame is N, and the continuous last M frames of video images starting from the Nth frame are taken, that is, from the Nth frame to the (N+M)th frame. The frame performs, for example, an encoding operation. It can be understood that the value of M is a positive integer smaller than the total number of frames in the GOP, and the specific value can be determined according to actual conditions. More specifically, each frame of video image can be divided into several image blocks; among them, different image blocks can be encoded into different modes, which can include a screen video encoding mode and a regular mode.
S400,统计该至少一帧视频图像中分别在各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果。S400: Count the number of image blocks in the at least one frame of video image that use the screen encoding mode in each frame of video image to obtain a statistical result.
可选地,在本申请实施例中,在所述至少一帧视频图像中的所述各帧视频图像中采用所述屏幕编码模式的所述图像块的数量大于或等于第一预设值和/或占比大于或等于第二预设值时,确定对所述连续非关键帧视频图像使用所述屏幕编码工具;否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。Optionally, in the embodiment of the present application, the number of the image blocks using the screen encoding mode in each frame of the video image in the at least one frame of video image is greater than or equal to a first preset value and /Or when the proportion is greater than or equal to the second preset value, it is determined to use the screen coding tool for the continuous non-key frame video image; otherwise, it is determined not to use the screen coding tool for the continuous non-key frame video image.
其中,此处提到的占比是指针对某帧图像,采用屏幕编码模式的图像块的数量与该帧图像包括的全部图像块的数量的比值。Among them, the proportion mentioned here refers to the ratio of the number of image blocks using the screen encoding mode for a certain frame of image to the number of all image blocks included in the frame of image.
可选地,针对不同帧的视频图像,第一预设值和/或第二预设值可以相同,也可以不相同。Optionally, for video images of different frames, the first preset value and/or the second preset value may be the same or different.
具体地,本公开实施例可定义所述至少一帧视频图像的数量为M+1,且该至少一帧视频图像包括第N帧视频图像;基于所述屏幕编码工具对所述第N帧视频图像中的第一图像区域进行编码,获得所述第一图像区域中采用所述屏幕编码模式的第一图像块的数量;基于所述屏幕编码工具对所述第(N+i)帧视频图像中的第(i+1)图像区域依次进行编码,分别获得所述第(i+1)图像区域中采用所述屏幕编码模式的第(i+1)图像块的数量;其中,i为从1递增至M的整数;及依次分别获得在所述第一图像区域中采用所述屏幕编码模式的所述第 一图像块的第一占比,直到在所述第(M+1)图像区域中采用所述屏幕编码模式的第(M+1)图像块的第(M+1)占比;其中,所述统计结果包括从所述第一占比至所述第(M+1)占比的(M+1)个占比。其中,此处提到的图像区域可以为整帧图像,也可以由一帧图像划分所得的。也就是说,一帧图像也可以包括至少一个图像区域。Specifically, the embodiment of the present disclosure may define that the number of the at least one frame of video image is M+1, and the at least one frame of video image includes the Nth frame of video image; based on the screen encoding tool, the number of the Nth frame of video The first image area in the image is encoded to obtain the number of first image blocks in the first image area using the screen encoding mode; based on the screen encoding tool, the (N+i)th frame of video image The (i+1)th image area in the image area is coded sequentially, and the number of the (i+1)th image block in the (i+1)th image area using the screen coding mode is obtained respectively; where i is from 1 is an integer incremented to M; and sequentially obtain the first proportions of the first image blocks that adopt the screen encoding mode in the first image area until the (M+1)th image area The (M+1)th proportion of the (M+1)th image block in which the screen encoding mode is adopted in the screen encoding mode; wherein the statistical result includes the proportion from the first proportion to the (M+1)th proportion (M+1) ratio of the ratio. Among them, the image area mentioned here can be a whole frame of image, or can be obtained by dividing a frame of image. In other words, one frame of image may also include at least one image area.
更具体地,仍以图2为例,假设分别对第N帧至第(N+M)帧视频图像进行编码,对于每一帧视频图像,其中不同的图像块可能会被编码成不同模式。例如,在第N帧视频图像中可包括三个图像块,假如其中两个图像块被编码为屏幕编码模式,则可获知采样屏幕编码模式的图像块的数量为2,比值即为2/3。同理,在其它帧视频图像中,也可获得各自的采用屏幕编码模式的图像块的数量。其中,屏幕编码模式包括帧内块拷贝(Intra block copy,IBC)模式、基于哈希hash的运算搜索(Hash me)模式、调色板编码(Palette)模式和自适应颜色空间转换(Adaptive color transform,ACT)模式中的至少一种。本公开实施例可包括数值和比值两种形式的统计结果。如统计结果为数值,则如上所述的获得的每一帧视频图像中采用屏幕编码模式的图像块的数量即为统计结果;如统计结果为比值,则可将上述获得的数量除以该帧视频图像中图像块的总数,即可得到该帧视频图像中采用屏幕编码模式的图像块的占比。More specifically, still taking FIG. 2 as an example, it is assumed that video images from the Nth frame to the (N+M)th frame are respectively encoded. For each frame of video image, different image blocks may be encoded into different modes. For example, three image blocks can be included in the Nth frame of video image. If two of the image blocks are encoded in the screen encoding mode, then the number of image blocks in the sampling screen encoding mode can be known to be 2, and the ratio is 2/3 . In the same way, in other frames of video images, the number of respective image blocks using the screen encoding mode can also be obtained. Among them, the screen encoding modes include Intra block copy (IBC) mode, Hash me mode, Palette mode, and Adaptive color transform (Adaptive color transform). , ACT) at least one of the modes. The embodiments of the present disclosure may include statistical results in two forms of numerical value and ratio. If the statistical result is a numerical value, the number of image blocks in each frame of video image obtained as described above that adopts the screen encoding mode is the statistical result; if the statistical result is a ratio, the number obtained above can be divided by the frame The total number of image blocks in the video image can be used to obtain the proportion of image blocks in the frame of video image that use the screen encoding mode.
S500,根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。S500: Determine, according to the statistical result, whether to use the screen coding tool for continuous non-key frame video images after the at least one frame of video image before the arrival of the next key frame.
具体地,当统计结果是占比时,如从所述第一占比至所述第(M+1)占比的所述(M+1)个占比中的每个占比都大于或等于预设比值时,本公开实施例可确定对所述连续非关键帧视频图像使用所述屏幕编码工具;否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。当统计结果是数值时,在所述第N帧视频图像和所述至少一帧视频图像中的所述各每帧视频图像中采用所述屏幕编码模式的所述图像块的数量大于或等于预设值时,确定对所述连续非关键帧视频图像使用所述屏幕编码工具;否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。更具体地,本公开实施例采用的设定标准既可以是预设值,也可以是预设比例。具体的取值可根据需求确定,例如50%、80%等,本公开实施例中不做限定。再参见图2,从第N帧到第(N+M)帧视 频图像共计(M+1)帧,相当于在这个GOP中取样(M+1)帧视频图像,根据取样结果决定从第(N+M+1)帧开始是否开启屏幕编码工具,如图2中虚线所示。本公开实施例可将每个采样帧中的屏幕视频编码模式的图像块数量/占比和阈值(数值或比例)比较,如果每一帧中的数量/占比都大于一定阈值,则继续开启屏幕编码工具;否则关闭屏幕编码工具,并选择传统编码工具。换言之,如大于或等于预设值,该图像组中的视频图像为屏幕视频内容;如小于预设值,该图像组中的视频图像为非屏幕视频内容。可以理解,本公开实施例还可以是当采样视频图像帧中全部采用屏幕编码模式的图像块与全部图像块的比例大于一个阈值,而不用每个帧对应的占比均要大于一个阈值,即可选择继续开启屏幕编码工具。Specifically, when the statistical result is the proportion, each of the (M+1) proportions from the first proportion to the (M+1)th proportion is greater than or When the ratio is equal to the preset ratio, the embodiment of the present disclosure may determine to use the screen encoding tool for the continuous non-key frame video image; otherwise, determine not to use the screen encoding tool for the continuous non-key frame video image. When the statistical result is a numerical value, the number of the image blocks using the screen encoding mode in each of the Nth frame of video image and the at least one frame of video image is greater than or equal to the predetermined number. When setting the value, it is determined to use the screen coding tool for the continuous non-key frame video image; otherwise, it is determined not to use the screen coding tool for the continuous non-key frame video image. More specifically, the setting standard adopted in the embodiments of the present disclosure may be a preset value or a preset ratio. The specific value can be determined according to requirements, such as 50%, 80%, etc., which are not limited in the embodiment of the present disclosure. Refer to Figure 2 again, from the Nth frame to the (N+M)th frame of video images totaling (M+1) frames, which is equivalent to sampling (M+1) frames of video images in this GOP. N+M+1) Whether to start the screen coding tool at the beginning of the frame, as shown by the dotted line in Figure 2. The embodiments of the present disclosure can compare the number/proportion of image blocks of the screen video encoding mode in each sample frame with a threshold (value or ratio), and if the number/proportion in each frame is greater than a certain threshold, continue to turn on Screen coding tool; otherwise, close the screen coding tool and select the traditional coding tool. In other words, if it is greater than or equal to the preset value, the video image in the image group is screen video content; if it is less than the preset value, the video image in the image group is non-screen video content. It can be understood that the embodiment of the present disclosure can also be used when the ratio of all image blocks in the screen encoding mode to all image blocks in the sampled video image frames is greater than a threshold, instead of the proportion corresponding to each frame being greater than a threshold, that is, You can choose to continue to open the screen encoding tool.
此外,在确定不对非关键帧视频图像使用所述屏幕编码工具时,本公开实施例可关闭已开启的所述屏幕编码工具,直到检测到下一个类型为所述关键帧的视频图像帧时再开启所述屏幕编码工具。即在下一个图像组中重复上述S100~S500的步骤,具体可参照上述说明,这里不再赘述。In addition, when it is determined not to use the screen encoding tool for non-key frame video images, the embodiment of the present disclosure may turn off the screen encoding tool that has been turned on until the next type of video image frame of the key frame is detected. Turn on the screen coding tool. That is, repeat the steps from S100 to S500 in the next image group. For details, please refer to the above description, which will not be repeated here.
本公开实施例以每个I帧间隔中的前几帧作为采样帧,以采样帧的视频编码模式占比来判断当前I帧间隔内的帧是否需要开启屏幕编码工具。每个I帧编码到来时,先开启屏幕编码工具,连续编码几帧,然后统计其中最终编码为SCC模式(IBC,Hash me,Palette,ACT等)图像块的占比。如果占比大于某个阈值,则判断到下一个I帧到来前的若干帧为屏幕视频内容,开启屏幕视频编码工具;如果占比不大于某个阈值,则判断到下一个I帧到来前的若干帧为自然内容,关闭屏幕编码工具。即以采样帧的SCC模式占比作为判断依据,决定当前I帧间隔内的帧是否需要开启屏幕编码工具。其中,视频编码模式可指当前编码块的编码模式,其会被写到码流中;当解码器接收码流后,可解析编码模式,从而恢复原始图像。例如,图像块可编码为帧内(Intra)、帧间(inter)、skip等。文字图形等典型的屏幕视频内容往往会编码为屏幕视频编码模式,但也可编码为常规模式。具体地,如果当前帧为I帧,帧号为N,则开启屏幕视频编码工具,在当前采样帧编码结束后统计编码为SCC模式的占比p[0];如果当前帧为非I帧,帧号为K,且此GOP中第一帧序号为N,如果K-N小于M,开启屏幕视频编码工具,当前采样帧编码结束后统计编码为SCC模式的占比p[i](i=1…M); 当K-N等于M时,统计p[i](i=0,1,…M),如果对于每一个i,p[i]>thresh(预设阈值),则判断当前帧到下一个I帧到来之前的帧都是SCC内容,打开屏幕编码工具,否则,关闭屏幕编码工具;当K-N大于M时,根据前述结果,判断是否打开屏幕编码工具。循环以上步骤完成所有帧编码。In the embodiments of the present disclosure, the first few frames in each I-frame interval are used as sampling frames, and the video encoding mode ratio of the sampling frames is used to determine whether the frames in the current I-frame interval need to start the screen encoding tool. When each I frame encoding arrives, first turn on the screen encoding tool, encode several frames continuously, and then count the proportion of image blocks that are finally encoded in SCC mode (IBC, Hashme, Palette, ACT, etc.). If the proportion is greater than a certain threshold, it is determined that several frames before the arrival of the next I frame are screen video content, and the on-screen video encoding tool is turned on; if the proportion is not greater than a certain threshold, it is determined that the frames before the arrival of the next I frame Several frames are natural content, turn off the screen encoding tool. That is, the SCC mode ratio of the sampled frame is used as the judgment basis to determine whether the frame in the current I frame interval needs to be turned on the screen encoding tool. Among them, the video coding mode can refer to the coding mode of the current coding block, which will be written into the code stream; when the decoder receives the code stream, the coding mode can be parsed to restore the original image. For example, image blocks can be coded as intra (Intra), inter (inter), skip, and so on. Typical screen video content such as text and graphics is often encoded as a screen video encoding mode, but it can also be encoded as a regular mode. Specifically, if the current frame is an I frame and the frame number is N, then the screen video encoding tool is started, and after the encoding of the current sample frame is finished, the proportion of the encoding in the SCC mode p[0] is counted; if the current frame is a non-I frame, The frame number is K, and the sequence number of the first frame in this GOP is N. If KN is less than M, start the screen video coding tool. After the current sample frame is coded, the proportion of the coding in SCC mode is counted p[i](i=1... M); When KN is equal to M, count p[i](i=0,1,...M), if for each i, p[i]>thresh (preset threshold), then judge the current frame to the next The frames before the arrival of the I frame are all SCC content, open the screen coding tool, otherwise, close the screen coding tool; when KN is greater than M, judge whether to open the screen coding tool according to the aforementioned results. Repeat the above steps to complete all frame encoding.
本公开能通过检测视频的类型,判断其是否为典型屏幕视频内容;如是,则开启屏幕编码工具,提升编码效率;如果不是,则关闭屏幕编码工具,减少编码复杂度。对比屏幕编码工具一直打开的设定,本公开能有效减少编码时间,同时保证屏幕视频内容的编码压缩效率。The present disclosure can determine whether it is a typical screen video content by detecting the type of the video; if it is, the screen coding tool is turned on to improve coding efficiency; if it is not, the screen coding tool is turned off to reduce coding complexity. Compared with the setting that the screen encoding tool is always turned on, the present disclosure can effectively reduce the encoding time while ensuring the encoding and compression efficiency of the screen video content.
如图3所示,本公开实施例还提供一种编码的装置10,包括获取模块11、检测模块13、操作模块15、统计模块17和确定模块19。其中,获取模块11可用于获取视频中的第N帧视频图像;其中,N为正整数,具体地,N为从1开始递增的正整数。检测模块13可用于检测第N帧视频图像的类型。操作模块15可用于在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏幕编码工具对所述至少一帧视频图像进行编码。统计模块17可用于统计所述至少一帧视频图像中分别在各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果。确定模块19可用于根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。As shown in FIG. 3, an embodiment of the present disclosure also provides an encoding device 10, which includes an acquisition module 11, a detection module 13, an operation module 15, a statistics module 17 and a determination module 19. Wherein, the acquiring module 11 can be used to acquire the Nth frame of video image in the video; wherein, N is a positive integer, specifically, N is a positive integer increasing from 1. The detection module 13 can be used to detect the type of the Nth frame of video image. The operation module 15 may be configured to enable a screen encoding tool for at least one frame of video image after the Nth frame of video image when the type of the Nth frame of video image is the key frame, and based on the screen encoding The tool encodes the at least one frame of video image. The statistics module 17 may be used to count the number of image blocks in the at least one frame of video image that adopt the screen encoding mode in each frame of the video image to obtain a statistical result. The determining module 19 may be configured to determine, according to the statistical result, whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the next key frame arrives.
如图4所示,本公开实施例还提供一种编码的装置30。区别于上述实施例的装置10,本公开实施例的装置30还包括开关模块36,可用于在确定不对所述连续非关键帧视频图像使用所述屏幕编码工具时,关闭已开启的所述屏幕编码工具,直到检测到下一个类型为所述关键帧的视频图像帧时再开启所述屏幕编码工具。As shown in FIG. 4, an embodiment of the present disclosure also provides an encoding device 30. Different from the device 10 of the foregoing embodiment, the device 30 of the embodiment of the present disclosure further includes a switch module 36, which can be used to turn off the screen when it is determined not to use the screen encoding tool for the continuous non-key frame video image. The coding tool is not started until the next video image frame whose type is the key frame is detected.
对于装置的实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离模块说明的模块可以是或者也可以不是分开的。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can refer to the part of the description of the method embodiment. The device embodiments described above are merely illustrative, and the modules described as separate modules may or may not be separate. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
以上,基于实施例和应用例说明了本公开的编码方法及装置。此外,本公 开还提供一种终端及存储介质,以下说明这些终端和存储介质。Above, the encoding method and device of the present disclosure have been described based on the embodiments and application examples. In addition, this publication also provides a terminal and storage medium, which are described below.
下面参考图5,其示出了适于用来实现本公开实施例的电子设备(例如终端设备或服务器)800的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Next, refer to FIG. 5, which shows a schematic structural diagram of an electronic device (such as a terminal device or a server) 800 suitable for implementing the embodiments of the present disclosure. Terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图5所示,电子设备800可以包括处理装置(例如中央处理器、图形处理器等)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储装置808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM803中,还存储有电子设备800操作所需的各种程序和数据。处理装置801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。As shown in FIG. 5, the electronic device 800 may include a processing device (such as a central processing unit, a graphics processor, etc.) 801, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 802 or from a storage device 808 The program in the memory (RAM) 803 executes various appropriate actions and processing. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
通常,以下装置可以连接至I/O接口805:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置806;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置807;包括例如磁带、硬盘等的存储装置808;以及通信装置809。通信装置809可以允许电子设备800与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备800,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 805: including input devices 806 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 807 such as a device; a storage device 808 such as a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to perform wireless or wired communication with other devices to exchange data. Although FIG. 5 shows an electronic device 800 having various devices, it should be understood that it is not required to implement or have all of the illustrated devices. It may be implemented alternatively or provided with more or fewer devices.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置809从网络上被下载和安装,或者从存储装置808被安装,或者从ROM 802被安装。在该计算机程序被处理装置801执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例 如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above, for example. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and server can communicate with any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium. Communication (e.g., communication network) interconnects. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), as well as any currently known or future research and development network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述的本公开的方法。The aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device is caused to execute the aforementioned method of the present disclosure.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算 机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof. The above-mentioned programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language. The program code may be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logic function. Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in the present disclosure can be implemented in software or hardware. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above in this document may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器 (EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium, which may contain or store a program for use by the instruction execution system, apparatus, or device or in combination with the instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,提供了一种编码的方法,包括:According to one or more embodiments of the present disclosure, there is provided an encoding method, including:
获取视频中的第N帧视频图像;其中,N为正整数,具体地,N从1开始递增的正整数;Acquire the Nth frame of video image in the video; where N is a positive integer, specifically, N is a positive integer that increases from 1;
检测所述第N帧视频图像的类型;其中,所述类型包括关键帧和非关键帧;Detecting the type of the Nth frame of video image; wherein, the type includes key frames and non-key frames;
在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏幕编码工具对所述至少一帧视频图像进行编码;When the type of the Nth frame of video image is the key frame, a screen encoding tool is turned on for at least one frame of video image after the Nth frame of video image, and the screen encoding tool is used for the at least Encode one frame of video image;
统计所述至少一帧视频图像中分别在各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果;及Counting the number of image blocks in the at least one frame of video image that adopt the screen encoding mode in each frame of video image to obtain a statistical result; and
根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。According to the statistical result, it is determined whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
根据本公开的一个或多个实施例,提供了一种方法,其特征在于,所述至少一帧视频图像包括所述第N帧视频图像以及后续的M帧非关键帧视频图像组成的(M+1)帧连续的视频图像,所述M为正整数。According to one or more embodiments of the present disclosure, there is provided a method, wherein the at least one frame of video image includes the Nth frame of video image and subsequent M frames of non-key frame video images (M +1) Frames of continuous video images, the M is a positive integer.
根据本公开的一个或多个实施例,提供了一种方法,其特征在于,所述统计所述至少一帧视频图像中各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果包括:According to one or more embodiments of the present disclosure, there is provided a method, characterized in that the number of image blocks in each frame of the video image in the at least one frame of video image that adopts the screen encoding mode is counted to obtain a statistical result include:
基于所述屏幕编码工具对所述第N帧视频图像进行编码,获得所述第N帧视频图像的第一图像区域中采用所述屏幕编码模式的第一图像块的数量;Encoding the Nth frame of video image based on the screen encoding tool to obtain the number of first image blocks that adopt the screen encoding mode in the first image area of the Nth frame of video image;
基于所述屏幕编码工具对所述第(N+i)帧视频图像中的第(i+1)图像区域依次进行编码,分别获得所述第(i+1)图像区域中采用所述屏幕编码模式的第(i+1)图像块的数量;其中,i为从1递增至M的整数;及Based on the screen coding tool, sequentially encode the (i+1)th image area in the (N+i)th frame of video image, and obtain the screen coding in the (i+1)th image area respectively The number of (i+1)th image blocks in the pattern; where i is an integer increasing from 1 to M; and
依次分别获得在所述第一图像区域中采用所述屏幕编码模式的所述第一图像块的第一占比,直到在所述第(M+1)图像区域中采用所述屏幕编码模式的第(M+1)图像块的第(M+1)占比;And sequentially obtain the first proportions of the first image blocks that adopt the screen encoding mode in the first image area until the screen encoding mode is adopted in the (M+1)th image area. The (M+1)th proportion of the (M+1)th image block;
其中,所述统计结果包括从所述第一占比至所述第(M+1)占比的(M+1)个占比。Wherein, the statistical result includes (M+1) proportions from the first proportion to the (M+1)th proportion.
根据本公开的一个或多个实施例,提供了一种方法,其特征在于,所述根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具包括:According to one or more embodiments of the present disclosure, there is provided a method, characterized in that, according to the statistical result, it is determined whether to determine whether to determine whether the next key frame before the arrival of the next key frame is continuous after the at least one frame of video image. The use of the screen encoding tools for non-key frame video images includes:
如从所述第一占比至所述第(M+1)占比的所述(M+1)个占比中的每个占比都大于或等于预设比值时,确定对所述连续非关键帧视频图像使用所述屏幕编码工具;If each of the (M+1) proportions from the first proportion to the (M+1)th proportion is greater than or equal to the preset proportion, it is determined that the continuous Using the screen coding tool for non-key frame video images;
否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。Otherwise, it is determined not to use the screen encoding tool for the continuous non-key frame video image.
根据本公开的一个或多个实施例,提供了一种方法,其特征在于,所述根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具,还包括:According to one or more embodiments of the present disclosure, there is provided a method, characterized in that, according to the statistical result, it is determined whether to determine whether to determine whether the next key frame before the arrival of the next key frame is continuous after the at least one frame of video image. The non-key frame video image using the screen encoding tool also includes:
在所述至少一帧视频图像中的所述各帧视频图像中采用所述屏幕编码模式的所述图像块的数量大于或等于第一预设值和/或占比大于或等于第二预设值时,确定对所述连续非关键帧视频图像使用所述屏幕编码工具;In the at least one frame of video image, the number of the image blocks using the screen encoding mode in each frame of the video image is greater than or equal to the first preset value and/or the proportion is greater than or equal to the second preset Value, determine to use the screen coding tool for the continuous non-key frame video image;
否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。Otherwise, it is determined not to use the screen encoding tool for the continuous non-key frame video image.
根据本公开的一个或多个实施例,提供了一种方法,其特征在于,所述方法还包括:According to one or more embodiments of the present disclosure, there is provided a method, characterized in that the method further includes:
在确定不对所述连续非关键帧视频图像使用所述屏幕编码工具时,关闭已开启的所述屏幕编码工具,直到检测到下一个类型为所述关键帧的视频图像帧时再开启所述屏幕编码工具。When it is determined not to use the screen encoding tool for the continuous non-key frame video image, turn off the screen encoding tool that has been turned on, and turn on the screen until the next type of video image frame of the key frame is detected Coding tools.
根据本公开的一个或多个实施例,提供了一种方法,其特征在于,所述屏幕编码模式包括以下中的至少一种:According to one or more embodiments of the present disclosure, there is provided a method, wherein the screen encoding mode includes at least one of the following:
帧内块拷贝模式、基于哈希的运算搜索模式、调色板编码模式和自适应颜色空间转换模式。Intra-frame block copy mode, hash-based arithmetic search mode, palette coding mode and adaptive color space conversion mode.
根据本公开的一个或多个实施例,提供了一种编码的装置,包括:According to one or more embodiments of the present disclosure, there is provided an encoding device, including:
获取模块,用于获取视频中的第N帧视频图像;其中,N为正整数,具体地,为从1开始递增的正整数;The obtaining module is used to obtain the Nth frame of video image in the video; wherein, N is a positive integer, specifically, a positive integer increasing from 1;
检测模块,用于检测所述第N帧视频图像的类型;The detection module is used to detect the type of the Nth frame of video image;
操作模块,用于在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏 幕编码工具对所述至少一帧视频图像进行编码;An operation module, configured to enable a screen encoding tool for at least one frame of video image after the Nth frame of video image when the type of the Nth frame of video image is the key frame, and based on the screen encoding The tool encodes the at least one frame of video image;
统计模块,用于统计所述至少一帧视频图像中分别在各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果;及A statistics module, configured to count the number of image blocks in the at least one frame of video image that adopt the screen coding mode in each frame of video image to obtain a statistical result; and
确定模块,用于根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。The determining module is configured to determine, according to the statistical result, whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
根据本公开的一个或多个实施例,提供了一种终端,包括:至少一个存储器和至少一个处理器;According to one or more embodiments of the present disclosure, there is provided a terminal, including: at least one memory and at least one processor;
其中,所述至少一个存储器用于存储程序代码,所述至少一个处理器用于调用所述至少一个存储器所存储的程序代码执行上述中任一项所述的方法。The at least one memory is used to store program code, and the at least one processor is used to call the program code stored in the at least one memory to execute the method described in any one of the above.
根据本公开的一个或多个实施例,提供了一种存储介质,所述存储介质用于存储程序代码,所述程序代码用于执行上述的方法。According to one or more embodiments of the present disclosure, a storage medium is provided, the storage medium is used to store program code, and the program code is used to execute the above-mentioned method.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover the above technical features or technical solutions without departing from the above disclosed concept. Other technical solutions formed by arbitrarily combining the equivalent features. For example, the above-mentioned features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form a technical solution.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, although the operations are depicted in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or logical actions of the method, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely exemplary forms of implementing the claims.

Claims (10)

  1. 一种编码方法,包括:An encoding method including:
    获取视频中的第N帧视频图像,其中,所述N为正整数;Acquiring the Nth frame of video image in the video, where the N is a positive integer;
    检测所述第N帧视频图像的类型;其中,所述类型包括关键帧和非关键帧;Detecting the type of the Nth frame of video image; wherein, the type includes key frames and non-key frames;
    在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所述屏幕编码工具对所述至少一帧视频图像进行编码;When the type of the Nth frame of video image is the key frame, a screen encoding tool is turned on for at least one frame of video image after the Nth frame of video image, and the screen encoding tool is used for the at least Encode one frame of video image;
    统计所述至少一帧视频图像中各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果;及Counting the number of image blocks in each frame of video image in the at least one frame of video image that adopt the screen encoding mode to obtain a statistical result; and
    根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。According to the statistical result, it is determined whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具包括:The method according to claim 1, wherein the determining whether to use the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame according to the statistical result Screen coding tools include:
    在所述至少一帧视频图像中的所述各帧视频图像中采用所述屏幕编码模式的所述图像块的数量大于或等于第一预设值和/或占比大于或等于第二预设值时,确定对所述连续非关键帧视频图像使用所述屏幕编码工具;In the at least one frame of video image, the number of the image blocks using the screen encoding mode in each frame of the video image is greater than or equal to the first preset value and/or the proportion is greater than or equal to the second preset Value, determine to use the screen coding tool for the continuous non-key frame video image;
    否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。Otherwise, it is determined not to use the screen encoding tool for the continuous non-key frame video image.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    在确定不对所述连续非关键帧视频图像使用所述屏幕编码工具时,关闭已开启的所述屏幕编码工具,直到检测到下一个类型为所述关键帧的视频图像帧时再开启所述屏幕编码工具。When it is determined not to use the screen encoding tool for the continuous non-key frame video image, turn off the screen encoding tool that has been turned on, and turn on the screen until the next type of video image frame of the key frame is detected Coding tools.
  4. 根据权利要求1所述的方法,其特征在于,所述至少一帧视频图像包括所述第N帧视频图像以及后续的M帧非关键帧视频图像组成的(M+1)帧连续的视频图像,所述M为正整数。The method according to claim 1, wherein the at least one frame of video image includes (M+1) frames of continuous video images composed of the Nth frame of video images and subsequent M frames of non-key frame video images , The M is a positive integer.
  5. 根据权利要求4所述的方法,其特征在于,所述统计所述至少一帧视 频图像中各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果包括:The method according to claim 4, wherein the counting the number of image blocks in each frame of the video image in the at least one frame of video image that adopts the screen encoding mode, and obtaining the statistical result comprises:
    基于所述屏幕编码工具对所述第N帧视频图像进行编码,获得所述第N帧视频图像的第一图像区域中采用所述屏幕编码模式的第一图像块的数量;Encoding the Nth frame of video image based on the screen encoding tool to obtain the number of first image blocks that adopt the screen encoding mode in the first image area of the Nth frame of video image;
    基于所述屏幕编码工具对所述第(N+i)帧视频图像中的第(i+1)图像区域依次进行编码,分别获得所述第(i+1)图像区域中采用所述屏幕编码模式的第(i+1)图像块的数量;其中,i为从1递增至M的整数;及Based on the screen coding tool, sequentially encode the (i+1)th image area in the (N+i)th frame of video image, and obtain the screen coding in the (i+1)th image area respectively The number of (i+1)th image blocks in the pattern; where i is an integer increasing from 1 to M; and
    依次分别获得在所述第一图像区域中采用所述屏幕编码模式的所述第一图像块的第一占比,直到在所述第(M+1)图像区域中采用所述屏幕编码模式的第(M+1)图像块的第(M+1)占比;And sequentially obtain the first proportions of the first image blocks using the screen encoding mode in the first image area until the screen encoding mode is used in the (M+1)th image area. The (M+1)th proportion of the (M+1)th image block;
    其中,所述统计结果包括从所述第一占比至所述第(M+1)占比的(M+1)个占比。Wherein, the statistical result includes (M+1) proportions from the first proportion to the (M+1)th proportion.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具还包括:The method according to claim 5, characterized in that, according to the statistical result, it is determined whether to use the continuous non-key frame video image after the at least one frame of video image before the next key frame. Screen coding tools also include:
    如从所述第一占比至所述第(M+1)占比的所述(M+1)个占比中的每个占比都大于或等于预设比值时,确定对所述连续非关键帧视频图像使用所述屏幕编码工具;If each of the (M+1) proportions from the first proportion to the (M+1)th proportion is greater than or equal to the preset proportion, it is determined that the continuous Using the screen coding tool for non-key frame video images;
    否则,确定不对所述连续非关键帧视频图像使用所述屏幕编码工具。Otherwise, it is determined not to use the screen encoding tool for the continuous non-key frame video image.
  7. 根据权利要求1所述的方法,其特征在于,所述屏幕编码模式包括以下中的至少一种:The method according to claim 1, wherein the screen encoding mode comprises at least one of the following:
    帧内块拷贝模式、基于哈希的运算搜索模式、调色板编码模式和自适应颜色空间转换模式。Intra-frame block copy mode, hash-based arithmetic search mode, palette coding mode and adaptive color space conversion mode.
  8. 一种编码的装置,包括:An encoding device includes:
    获取模块,用于获取视频中的第N帧视频图像;其中,所述N为正整数;The obtaining module is used to obtain the Nth frame of video image in the video; wherein, the N is a positive integer;
    检测模块,用于检测所述第N帧视频图像的类型;其中,所述类型包括关键帧和非关键帧;The detection module is used to detect the type of the Nth frame of video image; wherein, the type includes key frames and non-key frames;
    操作模块,用于在所述第N帧视频图像的所述类型为所述关键帧时,对所述第N帧视频图像之后的至少一帧视频图像开启屏幕编码工具,并基于所 述屏幕编码工具对所述至少一帧视频图像进行编码;An operation module, configured to enable a screen encoding tool for at least one frame of video image after the Nth frame of video image when the type of the Nth frame of video image is the key frame, and based on the screen encoding The tool encodes the at least one frame of video image;
    统计模块,用于统计所述至少一帧视频图像中各帧视频图像中采用屏幕编码模式的图像块的数量,得到统计结果;及A statistics module, configured to count the number of image blocks in each frame of the video image in the at least one frame of video image that adopt the screen encoding mode, and obtain a statistical result; and
    确定模块,用于根据所述统计结果,确定是否对下一关键帧到来之前的在所述至少一帧视频图像后的连续非关键帧视频图像使用所述屏幕编码工具。The determining module is configured to determine, according to the statistical result, whether to use the screen encoding tool for the continuous non-key frame video image after the at least one frame of video image before the arrival of the next key frame.
  9. 一种终端,包括:A terminal, including:
    至少一个存储器和至少一个处理器;At least one memory and at least one processor;
    其中,所述至少一个存储器用于存储程序代码,所述至少一个处理器用于调用所述至少一个存储器所存储的程序代码执行权利要求1至7中任一项所述的方法。The at least one memory is used to store program code, and the at least one processor is used to call the program code stored in the at least one memory to execute the method according to any one of claims 1 to 7.
  10. 一种存储介质,所述存储介质用于存储程序代码,所述程序代码用于执行权利要求1至7中任一项所述的方法。A storage medium, the storage medium is used to store program code, and the program code is used to execute the method according to any one of claims 1 to 7.
PCT/CN2021/079799 2020-03-31 2021-03-09 Encoding method and apparatus, terminal, and storage medium WO2021196994A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010240984.6 2020-03-31
CN202010240984.6A CN111526363A (en) 2020-03-31 2020-03-31 Encoding method and apparatus, terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2021196994A1 true WO2021196994A1 (en) 2021-10-07

Family

ID=71910602

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/079799 WO2021196994A1 (en) 2020-03-31 2021-03-09 Encoding method and apparatus, terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN111526363A (en)
WO (1) WO2021196994A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222124A (en) * 2021-11-29 2022-03-22 广州波视信息科技股份有限公司 Encoding and decoding method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111526363A (en) * 2020-03-31 2020-08-11 北京字节跳动网络技术有限公司 Encoding method and apparatus, terminal and storage medium
CN116962696A (en) * 2022-04-19 2023-10-27 华为技术有限公司 Image coding method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517077A (en) * 2012-12-14 2014-01-15 深圳百科信息技术有限公司 Method and device for rapidly selecting prediction mode
US20180262760A1 (en) * 2017-03-10 2018-09-13 Intel Corporation Screen content detection for adaptive encoding
CN110312134A (en) * 2019-08-06 2019-10-08 杭州微帧信息科技有限公司 A kind of screen video coding method based on image procossing and machine learning
CN110418138A (en) * 2019-07-29 2019-11-05 北京奇艺世纪科技有限公司 Method for processing video frequency, device, electronic equipment and storage medium
CN111526363A (en) * 2020-03-31 2020-08-11 北京字节跳动网络技术有限公司 Encoding method and apparatus, terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517077A (en) * 2012-12-14 2014-01-15 深圳百科信息技术有限公司 Method and device for rapidly selecting prediction mode
US20180262760A1 (en) * 2017-03-10 2018-09-13 Intel Corporation Screen content detection for adaptive encoding
CN110418138A (en) * 2019-07-29 2019-11-05 北京奇艺世纪科技有限公司 Method for processing video frequency, device, electronic equipment and storage medium
CN110312134A (en) * 2019-08-06 2019-10-08 杭州微帧信息科技有限公司 A kind of screen video coding method based on image procossing and machine learning
CN111526363A (en) * 2020-03-31 2020-08-11 北京字节跳动网络技术有限公司 Encoding method and apparatus, terminal and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222124A (en) * 2021-11-29 2022-03-22 广州波视信息科技股份有限公司 Encoding and decoding method and device

Also Published As

Publication number Publication date
CN111526363A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
WO2021196994A1 (en) Encoding method and apparatus, terminal, and storage medium
WO2022037331A1 (en) Video processing method, video processing apparatus, storage medium, and electronic device
CN112437345B (en) Video double-speed playing method and device, electronic equipment and storage medium
WO2020097888A1 (en) Video processing method and apparatus, electronic device, and computer-readable storage medium
WO2022135092A1 (en) Screen sharing display method and apparatus, device, and storage medium
WO2021197157A1 (en) Video stream processing method and apparatus, and electronic device and computer-readable medium
CN112203085B (en) Image processing method, device, terminal and storage medium
WO2023207872A1 (en) Video encoding and decoding method, video codec and electronic device
CN103108186A (en) Method of achieving high-definition transmission of videos
CN114584736A (en) Sharing method and device based on video conference, electronic equipment and computer medium
CN112969075A (en) Frame supplementing method and device in live broadcast process and computing equipment
CN113099272A (en) Video processing method and device, electronic equipment and storage medium
CN113906764B (en) Method, apparatus and computer readable medium for transcoding video
CN111385576B (en) Video coding method and device, mobile terminal and storage medium
CN114363649B (en) Video processing method, device, equipment and storage medium
CN111405358A (en) Cache-based video frame extraction method, apparatus, medium, and system
CN113225585A (en) Video definition switching method and device, electronic equipment and storage medium
CN112203086B (en) Image processing method, device, terminal and storage medium
CN114567812A (en) Audio playing method, device, system, electronic equipment and storage medium
WO2024022391A1 (en) Multimedia data transmission method and apparatus, and electronic device and storage medium
CN113259729B (en) Data switching method, server, system and storage medium
US20140099039A1 (en) Image processing device, image processing method, and image processing system
US10356439B2 (en) Flexible frame referencing for display transport
CN112291483B (en) Video pushing method and system, electronic equipment and readable storage medium
He et al. FPGA-based high definition image processing system

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03/02/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21780832

Country of ref document: EP

Kind code of ref document: A1