[go: up one dir, main page]

CN115706725A - Method and device for acquiring decoding rendering configuration, electronic equipment and storage medium - Google Patents

Method and device for acquiring decoding rendering configuration, electronic equipment and storage medium Download PDF

Info

Publication number
CN115706725A
CN115706725A CN202110893187.2A CN202110893187A CN115706725A CN 115706725 A CN115706725 A CN 115706725A CN 202110893187 A CN202110893187 A CN 202110893187A CN 115706725 A CN115706725 A CN 115706725A
Authority
CN
China
Prior art keywords
configuration
frame rate
under
threshold
default
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110893187.2A
Other languages
Chinese (zh)
Other versions
CN115706725B (en
Inventor
曹洪彬
王振祥
陈思佳
张佳
黄永铖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110893187.2A priority Critical patent/CN115706725B/en
Publication of CN115706725A publication Critical patent/CN115706725A/en
Application granted granted Critical
Publication of CN115706725B publication Critical patent/CN115706725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

提供了一种解码渲染配置的获取方法、装置、电子设备以及存储介质,涉及图像处理技术中的解码渲染领域,包括:获取默认配置;在该默认配置下,获取视频码流并对该视频码流进行解码渲染,以得到输出帧率和单帧延时;若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,对该默认配置进行调整,以得到最优配置;其中,该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,且该最优配置下的单帧延时小于该第二阈值;本申请提供的方法能够针对一些需要极致体验的业务场景确定出兼顾输出帧率和延时要求的最优配置,以发挥当前设备的极限能力。

Figure 202110893187

Provided are a decoding and rendering configuration acquisition method, device, electronic equipment, and storage medium, relating to the field of decoding and rendering in image processing technology, including: acquiring a default configuration; The stream is decoded and rendered to obtain the output frame rate and single frame delay; if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, and/or, the default The single frame delay under the configuration is greater than or equal to the second threshold, and the default configuration is adjusted to obtain the optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration The value is less than the first threshold, and the single frame delay under the optimal configuration is less than the second threshold; the method provided by this application can determine the optimal frame rate and delay requirements for some business scenarios that require extreme experience. Optimum configuration, in order to give full play to the limit capability of the current equipment.

Figure 202110893187

Description

解码渲染配置的获取方法、装置、电子设备以及存储介质Acquisition method, device, electronic device and storage medium of decoding rendering configuration

技术领域technical field

本申请实施例涉及图像处理技术中的解码渲染领域,并且更具体地,涉及解码渲染配置的获取方法、装置、电子设备以及存储介质。The embodiments of the present application relate to the field of decoding and rendering in image processing technology, and more specifically, relate to a method, device, electronic device and storage medium for acquiring a decoding and rendering configuration.

背景技术Background technique

目前视频应用大体分为三类:视频通话类、视频播放器类、屏幕分享类。视频通话类应用面向低延时场景,对高分辨率和高帧率没有特别要求,更关注单帧解码延时,一般该场景下视频的分辨率在480p至720p,视频的帧率在30fps。而对于单帧解码延时,一般会对比不同解码芯片(H264/H265/…)的单帧解码延时,寻求延时最小的配置;当然,部分解码芯片可能存在解码囤帧的情况,在选择最优配置时也会考虑这个因素。视频播放器类应用面向高分辨率场景,对视频的帧率和单帧解码延时无硬性要求,一般该场景下的视频的帧率只要求到达30fps,而且对芯片解码囤帧并不关心,只要保证解码输出帧率稳定就行;相比于,视频的帧率和单帧解码延时,视频播放器类应用更关注解码芯片(H264/H265/…)支持的最高分辨率。屏幕分享相关应用面向高分辨率和低延时场景,解码帧率一般要求在15fps至30fps。另外,屏幕分享相关应用除了会考虑解码芯片(H264/H265/…)支持的最高分辨率,还会考虑解码芯片的囤帧情况。At present, video applications are roughly divided into three categories: video calls, video players, and screen sharing. Video call applications are oriented to low-latency scenarios and have no special requirements for high resolution and high frame rate. They pay more attention to single-frame decoding delay. Generally, in this scenario, the video resolution is 480p to 720p, and the video frame rate is 30fps. For single-frame decoding delay, generally compare the single-frame decoding delay of different decoding chips (H264/H265/…) to find the configuration with the smallest delay; of course, some decoding chips may have decoding frames. This factor is also taken into account in the optimal configuration. Video player applications are oriented to high-resolution scenarios, and have no hard requirements on the video frame rate and single-frame decoding delay. Generally, the video frame rate in this scenario is only required to reach 30fps, and it does not care about chip decoding and storing frames. As long as the decoding output frame rate is stable; compared to the video frame rate and single frame decoding delay, video player applications pay more attention to the highest resolution supported by the decoding chip (H264/H265/…). Screen sharing-related applications are oriented to high-resolution and low-latency scenarios, and the decoding frame rate is generally required to be between 15fps and 30fps. In addition, screen sharing related applications will not only consider the highest resolution supported by the decoder chip (H264/H265/…), but also consider the frame storage of the decoder chip.

然而,针对某些需要极致体验的业务场景,例如同时对兼顾输出帧率及单帧解码延时有要求的业务场景,以上三种场景的方案均无法满足体验需求。However, for some business scenarios that require an extreme experience, such as a business scenario that requires both the output frame rate and the single-frame decoding delay, none of the above three scenarios can meet the experience requirements.

发明内容Contents of the invention

本申请实施例提供了一种解码渲染配置的获取方法、装置、电子设备以及存储介质,能够确定出兼顾输出帧率和延时要求的最优配置,以发挥当前设备的极限能力。Embodiments of the present application provide a decoding and rendering configuration acquisition method, device, electronic device, and storage medium, which can determine the optimal configuration that takes into account the output frame rate and delay requirements, so as to exert the limit capability of the current device.

一方面,提供了一种解码渲染配置的获取方法,包括:On the one hand, it provides a method for obtaining decoded rendering configuration, including:

获取默认配置;Get the default configuration;

在该默认配置下,获取视频码流并对该视频码流进行解码渲染,以得到输出帧率和单帧延时;Under the default configuration, obtain the video code stream and decode and render the video code stream to obtain the output frame rate and single frame delay;

若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,对该默认配置进行调整,以得到最优配置;其中,该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,且该最优配置下的单帧延时小于该第二阈值。If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, and/or, the single frame delay under the default configuration is greater than or equal to the second threshold, the The default configuration is adjusted to obtain an optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is less than the first threshold, and a single frame under the optimal configuration The delay is less than the second threshold.

另一方面,提供了一种解码渲染配置的获取装置,包括:On the other hand, a device for acquiring a decoding rendering configuration is provided, including:

获取单元,用于获取默认配置;Acquisition unit, used to obtain the default configuration;

解码渲染单元,用于在该默认配置下,获取视频码流并对该视频码流进行解码渲染,以得到输出帧率和单帧延时;The decoding and rendering unit is used to obtain the video code stream and decode and render the video code stream under the default configuration to obtain the output frame rate and single frame delay;

调整单元,用于若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,对该默认配置进行调整,以得到最优配置;其中,该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,且该最优配置下的单帧延时小于该第二阈值。The adjustment unit is used for if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, and/or, the single frame delay under the default configuration is greater than or equal to the first threshold Two thresholds, adjust the default configuration to obtain the optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is less than the first threshold, and the optimal configuration The single frame delay under the configuration is less than the second threshold.

另一方面,提供了一种电子设备,包括:In another aspect, an electronic device is provided, comprising:

处理器和存储器,该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,以执行上述解码渲染配置的获取方法。A processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the above method for obtaining the decoding and rendering configuration.

另一方面,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机指令,该计算机指令被计算机设备的处理器读取并执行时,使得计算机设备执行上述解码渲染配置的获取方法。In another aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. When the computer instructions are read and executed by a processor of a computer device, the computer device executes the acquisition of the decoding and rendering configuration described above. method.

基于以上技术方案,终端设备通过获取默认配置,并在默认配置下对获取的视频码流进行解码渲染,以得到默认配置下的输出帧率和默认配置下的单帧延时,若默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,终端设备对该默认配置进行调整,以得到最优配置,相当于,终端设备先对获取到的默认配置进行探测,得到该默认配置下的输出帧率和单帧延时,再确定该默认配置下得到的输出帧率和单帧延时是否满足最优配置的达标条件,若默认配置下得到的输出帧率和单帧延时都达标,则将该默认配置确定为最优配置,若该默认配置下得到的输出帧率和单帧延时中的任意一个或者二者都不达标,则对该默认配置进行调整,以得到满足输出帧率和单帧延时都达标的最优配置;一方面,由于该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,相当于,考虑到各种需满足帧率需求的解码业务场景,能够确保在最优配置下得到的输出帧率满足预设输出帧率的要求,具有一定的普适性;另一方面,由于该最优配置下的单帧延时小于该第二阈值,相当于,考虑到各种需满足延时需求的解码业务场景,能够确保在最优配置下得到的单帧延时满足预设延时的要求,同样具有一定的普适性。Based on the above technical solution, the terminal device obtains the default configuration, and decodes and renders the acquired video stream under the default configuration to obtain the output frame rate under the default configuration and the single frame delay under the default configuration. The difference between the input frame rate and the output frame rate under the default configuration is greater than or equal to the first threshold, and/or, the single frame delay under the default configuration is greater than or equal to the second threshold, and the terminal device performs the default configuration Adjust to obtain the optimal configuration, which means that the terminal device first detects the obtained default configuration, obtains the output frame rate and single frame delay under the default configuration, and then determines the output frame rate and Whether the single frame delay meets the standard conditions of the optimal configuration. If the output frame rate and single frame delay obtained under the default configuration are both up to standard, then the default configuration is determined as the optimal configuration. If the output frame obtained under the default configuration is If any one or both of the output frame rate and single frame delay is not up to standard, adjust the default configuration to obtain the optimal configuration that meets the output frame rate and single frame delay; on the one hand, due to the optimal The difference between the input frame rate under the configuration and the output frame rate under the optimal configuration is less than the first threshold, which is equivalent to, considering various decoding business scenarios that need to meet the frame rate requirements, it can ensure that the optimal configuration can be obtained The output frame rate of meets the requirements of the preset output frame rate, and has a certain degree of universality; Decoding business scenarios with delay requirements can ensure that the single frame delay obtained under the optimal configuration meets the preset delay requirements, and it also has a certain degree of universality.

即本申请提供的方法通过校验默认配置下得到的输出帧率和单帧延时是否达标,若默认配置下得到的输出帧率和单帧延时中的任意一个或者二者都不达标,则对默认配置进行调整,直至得到满足输出帧率和单帧延时二者都达标的最优配置,相当于,在默认配置下的输出帧率和单帧延时中的任意一个或者二者都不达标的情况下,在默认配置的基础上进行有限次调整,以得到符合输出帧率和单帧延时要求的最优配置,不仅满足一些极致业务对兼顾输出帧率和单帧延时的需求,而且发挥了当前设备的极限能力,提高设备的利用率。That is, the method provided by this application checks whether the output frame rate and single frame delay obtained under the default configuration are up to the standard. If either or both of the output frame rate and single frame delay obtained under the default configuration fail to meet the standard, Then adjust the default configuration until the optimal configuration that satisfies both the output frame rate and single frame delay is obtained, which is equivalent to either or both of the output frame rate and single frame delay under the default configuration If none of them meet the standard, a limited number of adjustments are made on the basis of the default configuration to obtain the optimal configuration that meets the requirements of the output frame rate and single frame delay, which not only meets the requirements of some extreme business pairs but also takes into account the output frame rate and single frame delay demand, and exert the limit capacity of the current equipment to improve the utilization rate of the equipment.

附图说明Description of drawings

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

图1是本申请实施例提供的硬件解码和渲染的静态能力探测说明图。FIG. 1 is an explanatory diagram of static capability detection for hardware decoding and rendering provided by an embodiment of the present application.

图2是对本申请实施例提供的硬件解码和渲染的动态能力探测说明图。FIG. 2 is an explanatory diagram of dynamic capability detection for hardware decoding and rendering provided by the embodiment of the present application.

图3是本申请实施例提供的解码渲染配置的获取方法的示意性流程图。Fig. 3 is a schematic flowchart of a method for acquiring a decoding rendering configuration provided by an embodiment of the present application.

图4是本申请实施例提供的解码渲染配置的获取方法的另一示意性流程图。FIG. 4 is another schematic flow chart of the method for acquiring a decoding rendering configuration provided by an embodiment of the present application.

图5是本申请实施例提供的解码渲染配置的获取装置的示意性框图。Fig. 5 is a schematic block diagram of an apparatus for acquiring a decoding rendering configuration provided by an embodiment of the present application.

图6是本申请实施例提供的电子设备的示意结构图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.

本申请可应用于图像解码领域、视频解码领域、硬件视频解码领域、专用电路视频解码领域、实时视频解码领域。例如,本申请的方案可结合至音视频编码标准(Audio Videocoding Standard,AVS)。例如,H.264/音视频编码(Audio Video coding,AVC)标准,H.265/高效视频编码(High Efficiency Video Coding,HEVC)标准以及H.266/多功能视频编码(Versatile Video Coding,VVC)标准。The application can be applied to the field of image decoding, video decoding, hardware video decoding, dedicated circuit video decoding, and real-time video decoding. For example, the solution of the present application can be combined with the Audio Video Coding Standard (AVS). For example, H.264/Audio Video Coding (AVC) standard, H.265/High Efficiency Video Coding (HEVC) standard and H.266/Versatile Video Coding (VVC) standard.

更具体的,本申请涉及一种解码渲染配置的获取方法,该方法可通过解码渲染配置的获取装置实现。需要说明的是,本申请实施例提供的解码渲染配置的获取装置可集成在终端设备中,该终端设备包括任意集成解码渲染配置的获取装置的、拥有接入互联网能力、通常搭载各种操作系统、具有较强视频处理能力的设备,该终端设备包括但不限于智能移动电话、平板电脑和其他小型个人携带型设备,如掌上电脑(Personal DigitalAssistant,PDA)、电子书(electronic book,E-book)等,本申请对此不作具体限制,当然,本申请实施例提供的装置还可集成在服务器中,服务器可以包括一个独立运行的服务器或者分布式服务器,也可以包括由多个服务器组成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、以及大数据和人工智能平台等基础云计算服务的云服务器,服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。More specifically, the present application relates to a method for obtaining a decoded rendering configuration, which can be implemented by a device for obtaining a decoded rendering configuration. It should be noted that the device for obtaining the decoding and rendering configuration provided in the embodiment of the present application can be integrated in a terminal device, and the terminal device includes any integrated device for obtaining the decoding and rendering configuration, has the ability to access the Internet, and is usually equipped with various operating systems , Devices with strong video processing capabilities, such terminal devices include but are not limited to smart mobile phones, tablet computers and other small personal portable devices, such as handheld computers (Personal Digital Assistant, PDA), electronic books (electronic book, E-book ), etc., the application does not specifically limit this, of course, the device provided by the embodiment of the application can also be integrated in the server, the server can include an independently running server or a distributed server, and can also include a server composed of multiple servers Clusters or distributed systems can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms. The cloud server of the cloud computing service, the server can be connected directly or indirectly through wired or wireless communication, which is not limited in this application.

为便于对本申请方案的理解,下面对本申请涉及的相关术语进行说明。In order to facilitate the understanding of the solution of the present application, the relevant terms involved in the present application are described below.

解码囤帧:指硬件解码器在传入一定数量视频帧以后,才开始有解码图像输出的现象。Decoding hoarding frame: refers to the phenomenon that the hardware decoder starts to output the decoded image after passing in a certain number of video frames.

单帧延时:指硬件解码器传入一帧视频帧到硬件解码器输出该帧视频图像的时间差;对于不囤帧的解码芯片,解码单帧延时即真实解码延时;对于囤帧的解码芯片,解码单帧延时会包含前几帧的囤帧时间。Single frame delay: refers to the time difference between the hardware decoder inputting a frame of video frame and the hardware decoder outputting the frame of video image; for decoding chips that do not store frames, the decoding single frame delay is the real decoding delay; The decoding chip, the delay of decoding a single frame will include the storage time of the previous few frames.

输入帧率:指向解码器送入视频码流的频率。Input frame rate: Points to the frequency of the video stream sent by the decoder.

输出帧率:指解码器输出视频图像帧的频率。Output frame rate: refers to the frequency at which the decoder outputs video image frames.

单帧参考:指视频帧在编码时只会参考当前帧和前一帧的图像内容。Single frame reference: Refers to the image content of the current frame and the previous frame when the video frame is encoded.

多帧参考:指视频帧在编码时会参考当前帧和前几帧的图像内容;对于部分囤帧机型,多帧参考会导致芯片囤帧数量增多。Multi-frame reference: Refers to the image content of the current frame and previous frames when encoding a video frame; for some frame storage models, multi-frame reference will lead to an increase in the number of frames stored by the chip.

为了满足高分辨率、高帧率、低延时的视频应用,需要尝试不同的解码渲染配置,以挖掘设备的最大能力,从而得到最优配置,为便于对本申请方案中解码渲染配置的理解,下面对硬件解码渲染配置进行说明。In order to meet the high-resolution, high frame rate, and low-latency video applications, it is necessary to try different decoding and rendering configurations to tap the maximum capabilities of the device to obtain the optimal configuration. In order to facilitate the understanding of the decoding and rendering configurations in this application scheme, The hardware decoding and rendering configuration is described below.

解码渲染配置可包括:芯片类型、视频码流的分辨率、输入帧率、渲染控件类型、丢帧策略和编码参数的参考方式。The decoding and rendering configuration may include: chip type, resolution of video code stream, input frame rate, rendering control type, frame dropping strategy and reference method of encoding parameters.

其中,芯片类型可包括:H264、H265、VP9、AVS等。Wherein, the chip type may include: H264, H265, VP9, AVS, etc.

视频码流的分辨率可包括:720p、1080p、2K、4K分辨率。The resolution of the video code stream can include: 720p, 1080p, 2K, 4K resolution.

输入帧率可包括:50fps、60fps等。The input frame rate may include: 50fps, 60fps, etc.

渲染控件类型可根据不同系统存在差异,以安卓(Android)平台为例,渲染控件类型可包括表面视图类(Surface View)和纹理视图(Texture View)两种。The type of rendering control may vary according to different systems. Taking the Android platform as an example, the type of rendering control may include Surface View and Texture View.

丢帧策略可包括:丢帧和不丢帧。例如,显示器是根据垂直同步信号进行画面刷新的,对于60Hz的显示设备,垂直同步信号每16ms一次。其中,在丢帧的情况下,即在两个垂直同步信号内连续送入多个视频图像,只显示最后一次送入的视频图像;丢帧的开启会使得画面流畅度降低;需要说明的是,目前大多数显示器的渲染频率是60Hz。在不丢帧的情况下,解码帧率最高只能支持到60fps,但若存在解码抖动或者网络抖动的情况,由于延时累积会使得解码渲染延时逐渐增加,这时也需要开启丢帧,以降低整体低延时。而对于50fps的解码帧率,由于没有达到设备的渲染的上限频率,即便存在解码抖动或者网络抖动的情况,也是不需要开启丢帧的。Frame dropping policies may include: dropping frames and not dropping frames. For example, the display refreshes the screen according to the vertical synchronous signal, and for a 60Hz display device, the vertical synchronous signal is once every 16ms. Among them, in the case of frame loss, that is, multiple video images are continuously sent in two vertical synchronization signals, and only the last video image sent in is displayed; the opening of frame loss will reduce the smoothness of the picture; it should be noted that , the current rendering frequency of most monitors is 60Hz. In the case of no frame loss, the decoding frame rate can only support up to 60fps, but if there is decoding jitter or network jitter, the accumulation of delay will gradually increase the delay of decoding and rendering. At this time, you also need to enable frame loss. To reduce the overall low latency. As for the decoding frame rate of 50fps, since the upper limit frequency of rendering of the device has not been reached, even if there is decoding jitter or network jitter, there is no need to enable frame loss.

编码参数的参考方式可包括:多帧参考和单帧参考。由于特定的编码语义会影响单帧解码延时,对部分芯片而言,编码参考帧数量会影响芯片解码囤帧的数量,从而影响解码延时,因此对这类芯片需要使用单帧参考的方式。The encoding parameter reference manner may include: multi-frame reference and single-frame reference. Since the specific coding semantics will affect the single-frame decoding delay, for some chips, the number of coded reference frames will affect the number of chip decoded frames, thereby affecting the decoding delay, so the single-frame reference method needs to be used for such chips .

可选的,该解码渲染配置为用于硬件解码的解码渲染配置;其中,硬件解码和软件解码不同,软件解码相当于视频播放的时候就是一个解压的过程,可由中央处理器(CPU)负责,但随着分辨率增大,普通CPU已难以支撑数据解压的工作,需要使用显卡(GPU)等来处理这类大数据量的重复解码工作。Optionally, the decoding and rendering configuration is a decoding and rendering configuration for hardware decoding; wherein, hardware decoding is different from software decoding, and software decoding is equivalent to a process of decompression when playing video, which can be handled by a central processing unit (CPU). However, as the resolution increases, it is difficult for ordinary CPUs to support the work of data decompression, and it is necessary to use a graphics card (GPU) to handle such repeated decoding tasks with large amounts of data.

为便于对本申请方案中解码渲染配置的理解,下面将结合图1至图2对解码渲染配置的探测进行详细说明。In order to facilitate the understanding of the decoding and rendering configuration in the solution of the present application, the detection of the decoding and rendering configuration will be described in detail below with reference to FIGS. 1 to 2 .

需要说明的是,解码渲染配置的探测可包括对设备的静态能力的探测和对设备的动态能力的探测。It should be noted that the detection of the decoding rendering configuration may include the detection of the static capability of the device and the detection of the dynamic capability of the device.

图1是本申请实施例提供的静态能力的示意性框图。Fig. 1 is a schematic block diagram of a static capability provided by an embodiment of the present application.

如图1所示,静态能力可包括硬件解码能力和渲染能力;进一步的,硬件解码能力可包括芯片类型和芯片能力。可选的,该芯片能力可以是芯片可支持的分辨率。渲染能力可包括渲染控件类型和渲染控件能力。可选的,渲染控件能力可包括丢帧策略。As shown in FIG. 1 , static capabilities may include hardware decoding capabilities and rendering capabilities; further, hardware decoding capabilities may include chip types and chip capabilities. Optionally, the chip capability may be a resolution supported by the chip. Rendering capabilities may include rendering widget types and rendering widget capabilities. Optionally, the rendering control capability may include a frame dropping policy.

需要说明的是,静态能力探测是指直接从设备的硬件接口获取详细硬件参数信息,即设备可根据静态能力探测的方式获取设备的静态能力。It should be noted that the static capability detection refers to obtaining detailed hardware parameter information directly from the hardware interface of the device, that is, the device can obtain the static capability of the device through the static capability detection method.

例如,芯片类型可包括H264/H265/VP9/AVS等,芯片能力可以是每种芯片可支持的分辨率等参数。例如,渲染控件类型可包括Android平台的Surface View、Texture View等,渲染控件能力可包括控件支持的丢帧策略,其中,丢帧策略可包括丢帧或不丢帧。For example, the chip type may include H264/H265/VP9/AVS, etc., and the chip capability may be parameters such as the resolution supported by each chip. For example, the rendering control type may include Surface View, Texture View, etc. of the Android platform, and the rendering control capability may include a frame dropping policy supported by the control, wherein the frame dropping policy may include frame dropping or no frame dropping.

图2是本申请实施例提供的动态能力的探测方法200的示意性流程图。FIG. 2 is a schematic flowchart of a dynamic capability detection method 200 provided by an embodiment of the present application.

如图2所示,该方法200包括:As shown in Figure 2, the method 200 includes:

S210,设定输入帧率。S210, setting an input frame rate.

S220,设定编码参数的参考方式。S220, setting a reference mode of encoding parameters.

S230,实时探测解码渲染能力。S230, detecting, decoding and rendering capabilities in real time.

具体而言,方法200可在设备已获取静态能力的基础上,基于设定的输入帧率和设定的编码参数的参考方式,以实时探测或获取动态能力。即实时以设定的输入帧率传入视频码流,并以设定的参考方式确定编码参数,对该视频码流进行解码渲染,以实时获取设备的输出帧率和单帧延时等数据,来探测设备的动态能力。由于输入帧率的提升会使得设备运行频率提高,导致解码加快,所以,一般地,大多数设备的单帧延时会随输入帧率发生变化,输入帧率越高、解码速度越快,单帧延时越低。因此,不同输入帧率会有不同的单帧延时,即在设备动态能力探测阶段需要把输入帧率作为一个配置进行探测。Specifically, the method 200 can detect or acquire dynamic capabilities in real time based on the obtained static capabilities of the device, based on the set input frame rate and the set reference mode of encoding parameters. That is, the video code stream is transmitted in real time at the set input frame rate, and the encoding parameters are determined by the set reference method, and the video code stream is decoded and rendered to obtain the output frame rate and single frame delay of the device in real time. , to detect the dynamic capability of the device. Since the increase of the input frame rate will increase the operating frequency of the device, resulting in faster decoding, so, generally, the single frame delay of most devices will change with the input frame rate. The higher the input frame rate, the faster the decoding speed. The lower the frame delay. Therefore, different input frame rates will have different single-frame delays, that is, the input frame rate needs to be detected as a configuration during the device dynamic capability detection stage.

综上所述,结合图1至图2,首先,可先获取设备的静态能力;其次,再对设备的动态能力进行探测,以得到设备的当前配置。To sum up, in combination with FIG. 1 to FIG. 2 , firstly, the static capability of the device can be acquired; secondly, the dynamic capability of the device can be detected to obtain the current configuration of the device.

下边将举例对设备的静态能力的探测和动态能力的探测进行说明。The detection of the static capability and the detection of the dynamic capability of the device will be described with examples below.

例如,在某Android平台的TV设备上,需要找到满足高分辨率、高帧率、低延时的最优配置。For example, on a TV device on an Android platform, it is necessary to find an optimal configuration that satisfies high resolution, high frame rate, and low latency.

该设备的静态能力探测如下:The static capability detection of the device is as follows:

芯片类型支持H264、H265,解码分辨率支持720p和1080p,渲染控件类型包括Surface View和Texture View,丢帧策略支持丢帧和不丢帧,所以共有16种组合。The chip type supports H264 and H265, the decoding resolution supports 720p and 1080p, the rendering control types include Surface View and Texture View, and the frame dropping strategy supports frame dropping and non-dropping, so there are 16 combinations in total.

在设备的动态能力探测阶段,需要探测设备在两种解码输入帧率(50fps和60fps)下的性能,同时还需要探测编码参数的参考方式(单帧参考的方式和多帧参考的方式)的影响,所以结合设备的硬件解码和渲染的静态能力探测的配置整体共有64种组合,为了挖掘芯片的极限解码渲染能力,需要尝试上述所有解码渲染配置。由于完整性探测需要64次才能获取该设备的最优配置,若每种配置探测时间10秒,则整个探测过程需要640秒的时间,效率比较低。In the dynamic capability detection stage of the device, it is necessary to detect the performance of the device at two decoding input frame rates (50fps and 60fps), and at the same time, it is necessary to detect the reference method of the encoding parameters (single-frame reference method and multi-frame reference method) Therefore, there are a total of 64 combinations of static capability detection combined with hardware decoding and rendering of the device. In order to tap the ultimate decoding and rendering capabilities of the chip, it is necessary to try all the above decoding and rendering configurations. Since the integrity detection requires 64 times to obtain the optimal configuration of the device, if the detection time for each configuration is 10 seconds, the entire detection process takes 640 seconds, and the efficiency is relatively low.

基于此,本申请实施例提供了一种解码渲染配置的获取方法、装置、电子设备以及存储介质。在本申请实施例提供的方法中,通过提前对多个设备进行完整的解码渲染配置测试,测试完成后得到默认配置。则新设备在首次启动时,会在默认配置的基础上进行调整,以得到最优配置,并把符合该设备的最优配置存储下来,以便后续正式启动直接使用本地存储的最优配置,即,本申请提供的方法在多个设备中选择出现频率最高的、且解码渲染效果最好的配置,作为默认配置,若默认配置下的输出帧率和默认配置下的单帧延时均不达标时,再对默认配置进行调整,能够减少得到最优配置的探测次数,节约探测时间,提高探测效率。Based on this, embodiments of the present application provide a method, device, electronic device, and storage medium for acquiring a decoded rendering configuration. In the method provided in the embodiment of the present application, a complete decoding and rendering configuration test is performed on multiple devices in advance, and a default configuration is obtained after the test is completed. When the new device starts for the first time, it will be adjusted on the basis of the default configuration to obtain the optimal configuration, and the optimal configuration that matches the device will be stored, so that the subsequent official startup can directly use the optimal configuration stored locally, that is, , the method provided by this application selects the configuration with the highest occurrence frequency and the best decoding and rendering effect among multiple devices as the default configuration, if the output frame rate under the default configuration and the single frame delay under the default configuration are not up to the standard When the default configuration is adjusted, the number of detections to obtain the optimal configuration can be reduced, the detection time can be saved, and the detection efficiency can be improved.

图3是本申请实施例提供的解码渲染配置的获取方法300的示意性流程图。FIG. 3 is a schematic flowchart of a method 300 for acquiring a decoding rendering configuration provided by an embodiment of the present application.

应理解,该解码渲染配置的获取方法可由集成该解码渲染配置的获取装置的终端设备执行,也可由集成该解码渲染配置的获取装置的服务器执行,本申请对此不作具体限制,下边以由集成该解码渲染配置的获取装置的终端设备执行为例,对本申请提供的解码渲染配置的获取方法进行详细说明。It should be understood that the method for acquiring the decoding and rendering configuration may be performed by a terminal device integrated with the acquisition device for the decoding and rendering configuration, or may be performed by a server integrated with the acquisition device for the decoding and rendering configuration. The terminal device implementation of the apparatus for obtaining the decoding and rendering configuration is taken as an example, and the method for obtaining the decoding and rendering configuration provided in this application is described in detail.

S301,获取默认配置;S301, obtaining a default configuration;

S302,在该默认配置下,获取视频码流并对该视频码流进行解码渲染,以得到输出帧率和单帧延时;S302. Under the default configuration, acquire a video code stream and decode and render the video code stream to obtain an output frame rate and a single frame delay;

S303,若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,对该默认配置进行调整,以得到最优配置;其中,该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,且该最优配置下的单帧延时小于该第二阈值。S303, if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, and/or, the single frame delay under the default configuration is greater than or equal to the second threshold, Adjusting the default configuration to obtain an optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is less than the first threshold, and the optimal configuration under the The single frame delay is less than the second threshold.

换言之,终端设备通过获取默认配置,并在默认配置下对获取的视频码流进行解码渲染,以得到默认配置下的输出帧率和默认配置下的单帧延时,若默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,则终端设备对该默认配置进行调整,以得到最优配置。In other words, the terminal device obtains the default configuration, and decodes and renders the obtained video stream under the default configuration to obtain the output frame rate under the default configuration and the single-frame delay under the default configuration. If the input frame under the default configuration rate and the output frame rate under the default configuration is greater than or equal to the first threshold, and/or, the single frame delay under the default configuration is greater than or equal to the second threshold, then the terminal device adjusts the default configuration, to get the optimal configuration.

例如,该第一阈值可在默认配置下的输入帧率的10%范围内取值,若输入帧率为60fps,则第一阈值可以5fps,也可以是3fps,相当于,该最优配置下的输入帧率和输出帧率很接近,可实现最优配置下输出的是高帧率的视频图像;当然,第一阈值也可以根据业务场景的需求设定,不一定实现高帧率,只要满足实际业务场景需求即可,本申请对此不作具体限制。例如,该第二阈值可以为该视频码流的输入帧率的倒数;又如,该第二阈值可以为该视频码流的输入帧率的倒数与对该视频码流进行解码渲染时芯片的屯帧数量的乘积;此外,该默认配置可以是设备中任意组合的配置,也可以是其他设备已探测出的解码渲染效果最好的配置,例如,该默认配置可以是结合图1和图2得到的其他设备的解码渲染效果最好的配置;当然,该默认配置也可以只限定默认配置的部分参数,其余参数通过动态探测确定。例如,存在部分机型,H265解码能力比H264强,但H264/H265的在默认配置下解码输出帧率、单帧解码延时均能达标,则可设置默认配置的芯片类型为未知类型,在动态探测阶段先在该设备上探测最优的解码芯片类型,以确定最优的默认配置,再进行后续的探测逻辑。For example, the first threshold can take a value within 10% of the input frame rate in the default configuration. If the input frame rate is 60fps, the first threshold can be 5fps or 3fps, which is equivalent to the optimal configuration. The input frame rate and the output frame rate are very close, and the video image with a high frame rate can be output under the optimal configuration; of course, the first threshold can also be set according to the needs of the business scene, and the high frame rate may not be achieved, as long as It only needs to meet the requirements of actual business scenarios, and this application does not make specific limitations on this. For example, the second threshold may be the reciprocal of the input frame rate of the video code stream; for another example, the second threshold may be the reciprocal of the input frame rate of the video code stream and the chip's time when the video code stream is decoded and rendered. The product of the number of frames; in addition, the default configuration can be any combination of configurations in the device, and can also be the configuration with the best decoding and rendering effect detected by other devices. For example, the default configuration can be a combination of Figure 1 and Figure 2 The configuration with the best decoding and rendering effect of other devices is obtained; of course, the default configuration can also only limit some parameters of the default configuration, and the remaining parameters are determined through dynamic detection. For example, there are some models whose H265 decoding ability is stronger than H264, but the decoding output frame rate and single frame decoding delay of H264/H265 can meet the standard under the default configuration, you can set the chip type of the default configuration to unknown type, in In the dynamic detection stage, the optimal decoding chip type is first detected on the device to determine the optimal default configuration, and then the subsequent detection logic is performed.

需要说明的是,也基于其他方式对该默认配置进行调整,以得到最优配置;例如,若该默认配置下的分辨率大于第三阈值,对该默认配置进行调整,以得到最优配置;相当于,考虑到业务场景中对分辨率的业务要求,基于此,通过第一阈值、第二阈值、第三阈值可确定出同时符合输出帧率、单帧延时、分辨率的达标条件的解码渲染效果最好的配置,当然,可通过第一阈值、第二阈值、第三阈值的设定,探测出兼顾高帧率、高分辨率、低延时的最优配置,以满足兼顾高输出帧率、低单帧延时和高分辨率的业务需求。It should be noted that the default configuration is also adjusted based on other methods to obtain the optimal configuration; for example, if the resolution under the default configuration is greater than the third threshold, the default configuration is adjusted to obtain the optimal configuration; It is equivalent to, considering the business requirements for resolution in business scenarios, based on this, the first threshold, the second threshold, and the third threshold can be determined to meet the output frame rate, single frame delay, and resolution. Decoding the configuration with the best rendering effect, of course, through the setting of the first threshold, the second threshold, and the third threshold, the optimal configuration that takes into account high frame rate, high resolution, and low delay can be detected to meet the requirements of high Output frame rate, low single frame delay and high resolution business requirements.

基于以上技术方案,终端设备先对获取到的默认配置进行探测,得到该默认配置下的输出帧率和单帧延时,再确定该默认配置下得到的输出帧率和单帧延时是否满足最优配置的达标条件,若默认配置下得到的输出帧率和单帧延时都达标,则将该默认配置确定为最优配置,若该默认配置下得到的输出帧率和单帧延时中的任意一个或者二者都不达标,则对该默认配置进行调整,以得到满足输出帧率和单帧延时都达标的最优配置;一方面,由于该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,相当于,考虑到各种需满足帧率需求的解码业务场景,能够确保在最优配置下得到的输出帧率满足预设输出帧率的要求,具有一定的普适性;另一方面,由于该最优配置下的单帧延时小于该第二阈值,相当于,考虑到各种需满足延时需求的解码业务场景,能够确保在最优配置下得到的单帧延时满足预设延时的要求,同样具有一定的普适性。Based on the above technical solution, the terminal device first detects the obtained default configuration, obtains the output frame rate and single frame delay under the default configuration, and then determines whether the output frame rate and single frame delay obtained under the default configuration meet the The optimal configuration meets the standard conditions. If the output frame rate and single frame delay obtained under the default configuration are up to the standard, the default configuration is determined as the optimal configuration. If the output frame rate and single frame delay obtained under the default configuration are If either or both of them fail to meet the standard, adjust the default configuration to obtain the optimal configuration that meets the output frame rate and single frame delay; on the one hand, due to the input frame rate under the optimal configuration The difference between the output frame rate and the optimal configuration is less than the first threshold, which means that considering various decoding business scenarios that need to meet the frame rate requirements, it can ensure that the output frame rate obtained under the optimal configuration meets the predetermined Assuming that the output frame rate requirement has certain universality; on the other hand, since the single frame delay under the optimal configuration is less than the second threshold, it is equivalent to considering various decoding services that need to meet the delay requirement Scenarios, it can ensure that the single frame delay obtained under the optimal configuration meets the requirements of the preset delay, and it also has a certain degree of universality.

此外,若默认配置为在多个设备中出现频率最高的、且解码渲染效果最好的配置,则相比于尝试所有解码渲染配置确定最优配置,在默认配置的基础上进行有限次探测,以确定出最优配置,可提高探测效率。In addition, if the default configuration is the configuration with the highest frequency of appearance among multiple devices and the best decoding and rendering effect, compared to trying all decoding and rendering configurations to determine the optimal configuration, a limited number of detections are performed on the basis of the default configuration. In order to determine the optimal configuration, the detection efficiency can be improved.

即本申请提供的方法通过校验默认配置下得到的输出帧率和单帧延时是否达标,若默认配置下得到的输出帧率和单帧延时中的任意一个或者二者都不达标,则对默认配置进行调整,直至得到满足输出帧率和单帧延时二者都达标的最优配置,相当于,在默认配置下的输出帧率和单帧延时中的任意一个或者二者都不达标的情况下,在默认配置的基础上进行有限次调整,以得到符合输出帧率和单帧延时要求的最优配置,不仅满足一些极致业务对兼顾输出帧率和单帧延时的需求,而且发挥了当前设备的极限能力,提高设备的利用率。That is, the method provided by this application checks whether the output frame rate and single frame delay obtained under the default configuration are up to the standard. If either or both of the output frame rate and single frame delay obtained under the default configuration fail to meet the standard, Then adjust the default configuration until the optimal configuration that satisfies both the output frame rate and single frame delay is obtained, which is equivalent to either or both of the output frame rate and single frame delay under the default configuration If none of them meet the standard, a limited number of adjustments are made on the basis of the default configuration to obtain the optimal configuration that meets the requirements of the output frame rate and single frame delay, which not only meets the requirements of some extreme business pairs but also takes into account the output frame rate and single frame delay demand, and exert the limit capacity of the current equipment to improve the utilization rate of the equipment.

在本申请的一些实施例中,S303可包括:In some embodiments of the present application, S303 may include:

若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于该第一阈值,则通过调整芯片类型、降低输入帧率以及降低分辨率中的至少一项对该默认配置下的输出帧率进行调整,得到该最优配置;If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, adjust the chip type, reduce the input frame rate and reduce the resolution at least one of the Adjust the output frame rate under the default configuration to get the optimal configuration;

若该默认单帧延时大于或等于该第二阈值,则通过调整渲染控件类型和丢帧策略中的至少一项对该默认配置下的单帧延时进行调整,得到该最优配置。If the default single frame delay is greater than or equal to the second threshold, the optimal configuration is obtained by adjusting at least one of the rendering control type and frame dropping strategy to adjust the single frame delay under the default configuration.

换言之,若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于该第一阈值,则终端设备通过调整芯片类型、降低输入帧率以及降低分辨率中的至少一项对该默认配置下的输出帧率进行调整,直至调整后的配置下的输入帧率和调整后的配置下的输出帧率的差值小于第一阈值,即调整后的配置为最优配置;同理,若该默认单帧延时大于或等于该第二阈值,则终端设备通过调整渲染控件类型和丢帧策略中的至少一项对该默认配置下的单帧延时进行调整,直至调整后的配置下的单帧延时小于第二阈值,即调整后的配置为最优配置。In other words, if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, the terminal device adjusts the chip type, reduces the input frame rate, and reduces the resolution at least One item adjusts the output frame rate under the default configuration until the difference between the input frame rate under the adjusted configuration and the output frame rate under the adjusted configuration is less than the first threshold, that is, the adjusted configuration is optimal configuration; similarly, if the default single-frame delay is greater than or equal to the second threshold, the terminal device adjusts the single-frame delay under the default configuration by adjusting at least one of the rendering control type and the frame loss strategy, Until the single frame delay under the adjusted configuration is less than the second threshold, that is, the adjusted configuration is the optimal configuration.

例如,该芯片类型可以是H264/H265等;又如,Android平台的设备的渲染控件类型可包括Surface View或Texture View;丢帧策略可包括丢帧或不丢帧。For example, the chip type may be H264/H265, etc.; as another example, the rendering control type of an Android platform device may include Surface View or Texture View; the frame dropping policy may include dropping frames or not dropping frames.

在本申请的一些实施例中,S303可包括:In some embodiments of the present application, S303 may include:

若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于该第一阈值,则通过调整该默认配置下的芯片类型,得到第一配置;If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, the first configuration is obtained by adjusting the chip type under the default configuration;

若该第一配置下的输入帧率和该第一配置下的输出帧率的差值小于该第一阈值,将该第一配置确定为该最优配置;If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is less than the first threshold, determine the first configuration as the optimal configuration;

若该第一配置下的输入帧率和该第一配置下的输出帧率的差值大于或等于该第一阈值,对该第一配置下的输出帧率进行调整,以得到该最优配置。If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, adjust the output frame rate under the first configuration to obtain the optimal configuration .

换言之,若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于该第一阈值,则终端设备通过调整该默认配置下的芯片类型,得到第一配置;若该第一配置下的输入帧率和该第一配置下的输出帧率的差值小于该第一阈值,则终端设备将该第一配置确定为该最优配置;若该第一配置下的输入帧率和该第一配置下的输出帧率的差值大于或等于该第一阈值,则终端设备对该第一配置下的输出帧率进行调整,以得到该最优配置。In other words, if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, the terminal device obtains the first configuration by adjusting the chip type under the default configuration; if The difference between the input frame rate under the first configuration and the output frame rate under the first configuration is less than the first threshold, the terminal device determines the first configuration as the optimal configuration; if the first configuration under the If the difference between the input frame rate and the output frame rate under the first configuration is greater than or equal to the first threshold, the terminal device adjusts the output frame rate under the first configuration to obtain the optimal configuration.

在本申请的一些实施例中,若该第一配置下的输入帧率和该第一配置下的输出帧率的差值大于或等于该第一阈值,则将该第一配置下的芯片类型调整为输出帧率最高的芯片类型,以得到第二配置;通过降低输入帧率和降低分辨率中的至少一项对该第二配置下的输出帧率进行调整,以得到该最优配置。In some embodiments of the present application, if the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, the chip type under the first configuration Adjust to the chip type with the highest output frame rate to obtain the second configuration; adjust the output frame rate under the second configuration by reducing at least one of the input frame rate and the resolution to obtain the optimal configuration.

换言之,若该第一配置下的输入帧率和该第一配置下的输出帧率的差值大于或等于该第一阈值,则终端设备将该第一配置下的芯片类型调整为输出帧率最高的芯片类型,以得到第二配置;终端设备再通过降低输入帧率和降低分辨率中的至少一项对该第二配置下的输出帧率进行调整,以得到该最优配置。In other words, if the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, the terminal device adjusts the chip type under the first configuration to the output frame rate The highest chip type to obtain the second configuration; the terminal device then adjusts the output frame rate under the second configuration by reducing at least one of the input frame rate and the resolution to obtain the optimal configuration.

若调整芯片类型已不能满足最优配置下输出帧率和单帧延时的达标条件时,通过将芯片类型调整为输出帧率最高的芯片类型,得到第二配置,并在此第二配置的基础上降低输入帧率和降低分辨率中的至少一项对输出帧率进行调整,以得到最优配置;一方面,相比于已有方案中更多考虑芯片类型对解码配置的影响,本申请提供的方案考虑到了输入帧率和分辨率对解码配置的影响,另一方面,在尝试调整芯片类型后若还不能满足输入帧率和输出帧率的差值小于第一阈值,再将芯片类型调整为输出帧率最高的芯片类型,并在此基础上再降低输入帧率和降低分辨率中的至少一项,相比于直接降低输入帧率或分辨率,能够相对保证输出帧率为高帧率或相对保证视频码流的分辨率为高分辨率。If the adjustment of the chip type can no longer meet the requirements of the output frame rate and single frame delay under the optimal configuration, the second configuration can be obtained by adjusting the chip type to the chip type with the highest output frame rate, and the second configuration On the basis of lowering at least one of the input frame rate and lowering the resolution, the output frame rate is adjusted to obtain the optimal configuration; The solution provided by the application takes into account the impact of the input frame rate and resolution on the decoding configuration. On the other hand, after trying to adjust the chip type, if the difference between the input frame rate and the output frame rate cannot be satisfied. The type is adjusted to the chip type with the highest output frame rate, and on this basis, at least one of the input frame rate and resolution is reduced. Compared with directly reducing the input frame rate or resolution, the output frame rate can be relatively guaranteed. High frame rate or relatively guaranteed video stream resolution is high resolution.

在本申请的一些实施例中,通过至少一次降低该第二配置下的输出帧率进行调整,以得到第三配置;若该第三配置下的输入帧率和该第三配置下的输出帧率的差值小于该第一阈值,则将该第三配置确定为该最优配置;若该第三配置下的输入帧率和该第三配置下的输出帧率的差值大于或等于该第一阈值,则对该第三配置下的输出帧率进行调整,以得到该最优配置。In some embodiments of the present application, adjustment is made by reducing the output frame rate under the second configuration at least once to obtain the third configuration; if the input frame rate under the third configuration and the output frame under the third configuration rate difference is less than the first threshold, then determine the third configuration as the optimal configuration; if the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is greater than or equal to the For the first threshold, the output frame rate under the third configuration is adjusted to obtain the optimal configuration.

换言之,终端设备通过至少一次降低该第二配置下的输入帧率,以得到第三配置;若该第三配置下的输入帧率和该第三配置下的输出帧率的差值小于该第一阈值,则终端设备将该第三配置确定为该最优配置;若该第三配置下的输入帧率和该第三配置下的输出帧率的差值大于或等于该第一阈值,则终端设备对该第三配置下的输出帧率进行调整,以得到该最优配置。In other words, the terminal device obtains the third configuration by reducing the input frame rate under the second configuration at least once; if the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is less than the first A threshold, the terminal device determines the third configuration as the optimal configuration; if the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is greater than or equal to the first threshold, then The terminal device adjusts the output frame rate under the third configuration to obtain the optimal configuration.

在本申请的一些实施例中,通过至少一次降低第二配置下的分辨率,以得到第四配置;若该第四配置下的输入帧率和该第四配置下的输出帧率的差值小于该第一阈值,则将该第四配置确定为该最优配置;若该第四配置下的输入帧率和该第四配置下的输出帧率的差值大于或等于该第一阈值,则对该第四配置下的输出帧率进行调整,以得到该最优配置。In some embodiments of the present application, the fourth configuration is obtained by reducing the resolution under the second configuration at least once; if the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is less than the first threshold, determining the fourth configuration as the optimal configuration; if the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is greater than or equal to the first threshold, Then adjust the output frame rate under the fourth configuration to obtain the optimal configuration.

换言之,终端设备通过至少一次降低第二配置下的分辨率,以得到第四配置;若该第四配置下的输入帧率和该第四配置下的输出帧率的差值小于该第一阈值,则终端设备将该第四配置确定为该最优配置;若该第四配置下的输入帧率和该第四配置下的输出帧率的差值大于或等于该第一阈值,则终端设备对该第四配置下的输出帧率进行调整,以得到该最优配置。In other words, the terminal device reduces the resolution under the second configuration at least once to obtain the fourth configuration; if the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is less than the first threshold , the terminal device determines the fourth configuration as the optimal configuration; if the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is greater than or equal to the first threshold, the terminal device The output frame rate under the fourth configuration is adjusted to obtain the optimal configuration.

在本申请的一些实施例中,依次通过至少一次降低该第二配置下的输入帧率和第二配置下的分辨率,以得到该最优配置;或依次通过至少一次降低该第二配置下的分辨率和该第二配置下的输入帧率,以得到该最优配置。In some embodiments of the present application, the optimal configuration is obtained by sequentially reducing the input frame rate under the second configuration and the resolution under the second configuration at least once; or sequentially reducing the input frame rate under the second configuration at least once resolution and the input frame rate under the second configuration to obtain the optimal configuration.

换言之,终端设备依次通过至少一次先降低第二配置下的输入帧率、再降低第二配置下的分辨率,对该第二配置下的输出帧率进行调整,以得到该最优配置;或终端设备依次通过至少一次先降低第二配置下的分辨率,再降低该第二配置下的输入帧率,对该第二配置下的输出帧率进行调整,以得到该最优配置。In other words, the terminal device adjusts the output frame rate under the second configuration by first reducing the input frame rate under the second configuration at least once, and then reducing the resolution under the second configuration, so as to obtain the optimal configuration; or The terminal device sequentially reduces the resolution under the second configuration at least once, and then reduces the input frame rate under the second configuration, and adjusts the output frame rate under the second configuration to obtain the optimal configuration.

在本申请的一些实施例中,S303可包括:In some embodiments of the present application, S303 may include:

若该默认配置下的单帧延时大于或等于第二阈值,则调整该默认配置下的渲染控件类型,以得到第五配置;If the single frame delay under the default configuration is greater than or equal to the second threshold, adjust the rendering control type under the default configuration to obtain the fifth configuration;

若该第五配置下的单帧延时小于该第二阈值,则将该第五配置确定为该最优配置;If the single frame delay under the fifth configuration is less than the second threshold, then determine the fifth configuration as the optimal configuration;

若该第五配置下的单帧延时大于或等于该第二阈值,对该第五配置进行调整,以得到该最优配置。If the single frame delay under the fifth configuration is greater than or equal to the second threshold, the fifth configuration is adjusted to obtain the optimal configuration.

换言之,若该默认配置下的单帧延时大于或等于第二阈值,则终端设备调整该默认配置下的渲染控件类型,以得到第五配置;若该第五配置下的单帧延时小于该第二阈值,则终端设备将该第五配置确定为该最优配置;若该第五配置下的单帧延时大于或等于该第二阈值,则终端设备对该第五配置进行调整,以得到该最优配置。In other words, if the single frame delay under the default configuration is greater than or equal to the second threshold, the terminal device adjusts the rendering control type under the default configuration to obtain the fifth configuration; if the single frame delay under the fifth configuration is less than The second threshold, the terminal device determines the fifth configuration as the optimal configuration; if the single frame delay under the fifth configuration is greater than or equal to the second threshold, the terminal device adjusts the fifth configuration, to get the optimal configuration.

例如,针对Android平台的设备,该渲染控件类型可以包括Surface View和Texture View,不同的渲染控件配置下渲染的性能会存在差异。For example, for devices on the Android platform, the rendering control type may include Surface View and Texture View, and rendering performance may vary under different rendering control configurations.

需要说明的是,终端设备可提前将渲染控件类型配置至解码渲染设备中,待需要调整渲染控件类型时,终端设备可直接对默认配置下的渲染控件类型进行调整。It should be noted that the terminal device can configure the rendering control type in the decoding rendering device in advance, and when the rendering control type needs to be adjusted, the terminal device can directly adjust the rendering control type under the default configuration.

在对默认配置下的单帧延时进行调整时,本申请提供的方法考虑到了设备的渲染控件可能在当前渲染帧率下性能不足,需切换渲染控件类型,即本申请提供的方案从修改渲染控件类型的角度能够确定出满足延时业务场景需求的最优配置。When adjusting the single frame delay under the default configuration, the method provided by this application takes into account that the rendering control of the device may not have enough performance at the current rendering frame rate, and the rendering control type needs to be switched, that is, the solution provided by this application starts from modifying the rendering The perspective of control type can determine the optimal configuration to meet the needs of delay business scenarios.

在本申请的一些实施例中,S303可包括:In some embodiments of the present application, S303 may include:

若该默认配置下的单帧延时大于或等于第二阈值,则调整该默认配置下的丢帧策略,以得到第六配置;If the single frame delay under the default configuration is greater than or equal to the second threshold, then adjust the frame loss policy under the default configuration to obtain the sixth configuration;

若该第六配置下的单帧延时小于该第二阈值,则将该第六配置确定为该最优配置;If the single frame delay under the sixth configuration is less than the second threshold, then determine the sixth configuration as the optimal configuration;

若该第六配置下的单帧延时大于或等于该第二阈值,对该第六配置进行调整,以得到该最优配置。If the single frame delay under the sixth configuration is greater than or equal to the second threshold, the sixth configuration is adjusted to obtain the optimal configuration.

换言之,若该默认配置下的单帧延时大于或等于第二阈值,则终端设备调整该默认配置下的丢帧策略,以得到第六配置;若该第六配置下的单帧延时小于该第二阈值,则终端设备将该第六配置确定为该最优配置;若该第六配置下的单帧延时大于或等于该第二阈值,则终端设备对该第六配置进行调整,以得到该最优配置。In other words, if the single frame delay under the default configuration is greater than or equal to the second threshold, the terminal device adjusts the frame loss strategy under the default configuration to obtain the sixth configuration; if the single frame delay under the sixth configuration is less than The second threshold, the terminal device determines the sixth configuration as the optimal configuration; if the single frame delay under the sixth configuration is greater than or equal to the second threshold, the terminal device adjusts the sixth configuration, to get the optimal configuration.

需要说明的是,丢帧策略可包括丢帧和不丢帧。另外,由于大部分机型有显示频率60Hz的上限,高帧率场景下往往要求解码帧率60fps,而很多设备的显示频率上限也是60fps,在解码、网络存在抖动的情况下,会造成短时间内解码、渲染频率超过60fps的现象,因此本申请提供的方法考虑到使用适当的渲染丢帧策略,能有效地降低延时,并减少由于网络抖动带来的延时累积效应。需要说明的是,终端设备可提前将丢帧策略配置至解码渲染设备中,待需要调整丢帧策略时,终端设备可直接对默认配置下的丢帧策略进行调整。It should be noted that the frame dropping policy may include frame dropping and no frame dropping. In addition, since most models have a display frequency upper limit of 60Hz, high frame rate scenarios often require a decoding frame rate of 60fps, and the upper limit of display frequency of many devices is also 60fps. The internal decoding and rendering frequency exceeds 60fps. Therefore, the method provided by this application takes into account the use of an appropriate rendering frame loss strategy, which can effectively reduce delay and reduce the cumulative effect of delay caused by network jitter. It should be noted that the terminal device can configure the frame dropping policy in the decoding and rendering device in advance, and when the frame dropping policy needs to be adjusted, the terminal device can directly adjust the frame dropping policy under the default configuration.

在对默认配置下的单帧延时进行调整时,本申请提供的方法考虑到了设备可能出现渲染瓶颈,需调整丢帧策略,即本申请提供的方案从调整丢帧策略的角度能够确定出满足延时业务场景需求的最优配置,而且通过调整丢帧策略还可以减少由于网络抖动带来的延时累积效应。When adjusting the single frame delay under the default configuration, the method provided by this application takes into account that the device may have a rendering bottleneck, and the frame loss strategy needs to be adjusted, that is, the solution provided by this application can determine the satisfaction of The optimal configuration required by the delay business scenario, and the cumulative effect of delay caused by network jitter can also be reduced by adjusting the frame loss strategy.

在本申请的一些实施例中,方法300还可包括:In some embodiments of the present application, method 300 may further include:

若该最优配置下的芯片为屯帧芯片,则基于多帧参考的方式确定编码参数;If the chip under the optimal configuration is a frame chip, the encoding parameters are determined based on multi-frame reference;

若该最优配置下的芯片为非屯帧芯片,则基于单帧参考的方式确定该编码参数。If the chip under the optimal configuration is a non-frame chip, the encoding parameter is determined based on a single frame reference.

例如,针对Android平台,对于大部分屯帧芯片,特定的编码语义(例如,参考帧的数量)会影响芯片解码囤帧的数量,对于部分囤帧芯片,使用单帧参考的方式会比使用多帧参考的方式有更少的囤帧,从而单帧解码延时更低;而对于不囤帧的芯片,为了更好的视频画质,可使用多帧参考的方式确定编码参数。For example, for the Android platform, for most frame chips, specific coding semantics (for example, the number of reference frames) will affect the number of frames decoded by the chip. The frame reference method has fewer stored frames, so that the decoding delay of a single frame is lower; and for chips that do not store frames, for better video quality, the multi-frame reference method can be used to determine the encoding parameters.

需要说明的是,Windows端和Mac端一般无囤帧现象,但仍存在不同编码参数影响解码渲染性能的现象,此时仍需要在此环节探测最优的编码参数。It should be noted that there is generally no frame hoarding phenomenon on the Windows and Mac terminals, but there are still phenomena that different encoding parameters affect the decoding and rendering performance. At this time, it is still necessary to detect the optimal encoding parameters in this link.

通过在最优配置下,考虑到编码参数对设备解码渲染能力的影响,确定出最优的编码配置,最终实现兼顾编码、解码、渲染的最优配置。By considering the impact of encoding parameters on the decoding and rendering capabilities of the device under the optimal configuration, the optimal encoding configuration is determined, and finally the optimal configuration that takes into account encoding, decoding, and rendering is realized.

在本申请的一些实施例中,S301之前,该方法还可包括:In some embodiments of the present application, before S301, the method may further include:

将多个配置中的出现频率最高的配置确定为该默认配置;该多个配置包括针对多个设备中的每一个设备进行解码渲染测试时的解码渲染效果最好的配置。The configuration with the highest occurrence frequency among the multiple configurations is determined as the default configuration; the multiple configurations include the configuration with the best decoding and rendering effect when performing a decoding and rendering test for each of the multiple devices.

示例性的,要选定Android平台的TV设备的默认配置,需要提前对一定范围的Android平台的TV设备进行完整性测试,选择出现频率最高的解码渲染效果最好的配置作为Android平台的TV设备的默认配置;例如,该默认配置可以是H264+1080p+60fps+SurfaceView+不丢帧+视频编码多帧参考;其中H264为默认配置下的芯片类型,1080p为默认配置下的视频码流的分辨率,60fps为默认配置下的输入帧率,Surface View为默认配置下的控件类型,不丢帧为默认配置下的丢帧策略,视频编码多帧参考为默认配置下的编码参数的参考方式。Exemplarily, to select the default configuration of the TV device on the Android platform, it is necessary to conduct an integrity test on a certain range of TV devices on the Android platform in advance, and select the configuration with the highest frequency of occurrence and the best decoding and rendering effect as the TV device on the Android platform The default configuration; for example, the default configuration can be H264+1080p+60fps+SurfaceView+no frame loss+video encoding multi-frame reference; where H264 is the chip type under the default configuration, and 1080p is the resolution of the video stream under the default configuration , 60fps is the input frame rate under the default configuration, Surface View is the control type under the default configuration, no frame loss is the frame loss strategy under the default configuration, and video encoding multi-frame reference is the reference method of encoding parameters under the default configuration.

由于将多个设备对应的多个解码渲染效果最好的配置中的出现频率最高的配置确定为该默认配置,即默认配置是根据一定数量的设备总结得到的,具有一定的普适性,对于大多数设备默认配置就是最优配置;而对于剩余设备,只需要在默认配置上做部分配置调整,即可找到最优配置,所以,通过将多个设备对应的多个解码渲染效果最好的配置中的出现频率最高的配置确定为该默认配置,能够减少探测最优配置的探测次数,提高探测效率。Since the configuration with the highest frequency of occurrence among the configurations with the best decoding and rendering effects corresponding to multiple devices is determined as the default configuration, that is, the default configuration is obtained based on a certain number of devices and has certain universality. The default configuration of most devices is the optimal configuration; for the rest of the devices, only some configuration adjustments need to be made on the default configuration to find the optimal configuration. The configuration with the highest occurrence frequency in the configurations is determined as the default configuration, which can reduce the number of detection times for detecting the optimal configuration and improve detection efficiency.

在本申请的一些实施例中,该第二阈值为该视频码流的输入帧率的倒数;或该第二阈值为该视频码流的输入帧率的倒数与对该视频码流进行解码渲染时芯片的屯帧数量的乘积。In some embodiments of the present application, the second threshold is the reciprocal of the input frame rate of the video code stream; or the second threshold is the reciprocal of the input frame rate of the video code stream and the decoding and rendering of the video code stream The product of the number of frames of the time chip.

换言之,对于解码不囤帧的芯片,第二阈值可以为1/输入帧率;对于解码囤帧的芯片,单帧延时需要考虑芯片的囤帧数量。例如,解码囤3帧的芯片,只有输入第n+4帧的视频码流,第n帧的视频图像才会从解码器输出,因为此时单帧延时会额外计算之前3帧的囤帧时间,即1/输入帧率*3,即第二阈值可以是1/解码输入帧率*(1+囤帧数量)。In other words, for a chip that does not decode frames, the second threshold can be 1/input frame rate; for a chip that decodes frames, the single frame delay needs to consider the number of frames stored by the chip. For example, for a chip that decodes 3 frames, the video image of the nth frame will be output from the decoder only when the video code stream of the n+4th frame is input, because the single frame delay at this time will additionally calculate the previous 3 frame frames Time, that is, 1/input frame rate*3, that is, the second threshold may be 1/decoding input frame rate*(1+number of stored frames).

通过将第二阈值确定为该视频码流的输入帧率的倒数;或将该第二阈值确定为该视频码流的输入帧率的倒数与对该视频码流进行解码渲染时芯片的屯帧数量的乘积,相当于,该最优配置下的单帧延时小于硬件解码器传入一帧视频到硬件解码器输出该帧视频的时间差的理论值,即在该最优配置下实现低延时,可满足极致业务场景中低延时的业务需求。By determining the second threshold as the reciprocal of the input frame rate of the video code stream; or determining the second threshold as the reciprocal of the input frame rate of the video code stream and the seven frames of the chip when the video code stream is decoded and rendered The product of the number is equivalent to that the single frame delay under the optimal configuration is less than the theoretical value of the time difference between the hardware decoder passing in a frame of video and the hardware decoder outputting the frame of video, that is, achieving low latency under the optimal configuration It can meet the low-latency business requirements in extreme business scenarios.

图4是本申请实施例提供的解码渲染配置的获取方法400的另一示意性流程图。应理解,该解码渲染配置的获取方法可由集成该解码渲染配置的获取装置的终端设备执行,也可由集成该解码渲染配置的获取装置的服务器执行,本申请对此不作具体限制,下边以由集成该解码渲染配置的获取装置的终端设备执行为例,对本申请提供的解码渲染配置的获取方法的另一示意性流程进行详细说明。FIG. 4 is another schematic flowchart of a method 400 for acquiring a decoding rendering configuration provided by an embodiment of the present application. It should be understood that the method for acquiring the decoding and rendering configuration may be performed by a terminal device integrated with the acquisition device for the decoding and rendering configuration, or may be performed by a server integrated with the acquisition device for the decoding and rendering configuration. The implementation of the terminal device of the apparatus for obtaining a decoding and rendering configuration is taken as an example, and another schematic flow of the method for obtaining a decoding and rendering configuration provided in this application is described in detail.

S401,终端设备获取默认配置。S401. The terminal device obtains a default configuration.

S402,终端设备获取默认配置下的输出帧率和默认配置下的单帧延时。S402. The terminal device obtains the output frame rate under the default configuration and the single frame delay under the default configuration.

S403,终端设备确定默认配置下的输入帧率和默认配置下的输出帧率的差值是否小于第一阈值?在默认配置下的输入帧率和默认配置下的输出帧率的差值大于或等于第一阈值时,执行S404;在默认配置下的输入帧率和默认配置下的输出帧率的差值小于第一阈值时,执行S411。S403. The terminal device determines whether the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is smaller than a first threshold? When the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, execute S404; the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is less than When the first threshold is reached, execute S411.

S404,终端设备调整默认配置下的芯片类型,得到第一配置。S404. The terminal device adjusts the chip type under the default configuration to obtain the first configuration.

S405,终端设备确定第一配置下的输入帧率和第一配置下的输出帧率的差值是否小于第一阈值?在第一配置下的输入帧率和第一配置下的输出帧率的差值大于或等于第一阈值时,执行S406;在第一配置下的输入帧率和第一配置下的输出帧率的差值小于第一阈值是,执行S411。S405. The terminal device determines whether the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is smaller than a first threshold? When the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, execute S406; the input frame rate under the first configuration and the output frame rate under the first configuration If the difference is smaller than the first threshold, execute S411.

S406,终端设备将第一配置下的芯片类型调整为输出帧率最高的芯片类型,得到第二配置。S406. The terminal device adjusts the chip type under the first configuration to the chip type with the highest output frame rate to obtain the second configuration.

S407,终端设备降低当前配置下的输入帧率。S407. The terminal device reduces the input frame rate under the current configuration.

S408,终端设备确定降低输入帧率后的配置下的输入帧率和降低输入帧率后的配置下的输出帧率的差值是否小于第一阈值?在降低输入帧率后的配置下的输入帧率和降低输入帧率后的配置下的输出帧率的差值大于或等于第一阈值时,执行S409;在降低输入帧率后的配置下的输入帧率和降低输入帧率后的配置下的输出帧率的差值小于第一阈值时,执行S411。S408. The terminal device determines whether the difference between the input frame rate under the configuration after the input frame rate is reduced and the output frame rate under the configuration after the input frame rate is reduced is smaller than a first threshold? When the difference between the input frame rate under the configuration after the input frame rate is reduced and the output frame rate under the configuration after the input frame rate is reduced is greater than or equal to the first threshold, execute S409; When the difference between the input frame rate and the output frame rate under the configuration after the input frame rate is reduced is smaller than the first threshold, execute S411.

S409,降低降低输入帧率后的配置下的分辨率,得到新的当前配置。S409, reducing the resolution under the configuration after the input frame rate is reduced, to obtain a new current configuration.

S410,终端设备确定新的当前配置下的输入帧率和新的当前配置下的输出帧率的差值是否小于第一阈值?在新的当前配置下的输入帧率和新的当前配置下的输出帧率的差值大于或等于第一阈值时,将新的当前配置确定为当前配置,执行S407;在新的当前配置下的输入帧率和新的当前配置下的输出帧率的差值小于第一阈值时,执行S411。S410. The terminal device determines whether the difference between the input frame rate under the new current configuration and the output frame rate under the new current configuration is smaller than a first threshold? When the difference between the input frame rate under the new current configuration and the output frame rate under the new current configuration is greater than or equal to the first threshold, determine the new current configuration as the current configuration, and perform S407; under the new current configuration When the difference between the input frame rate and the output frame rate under the new current configuration is smaller than the first threshold, execute S411.

S411,终端设备确定默认配置下的单帧延时是否小于第二阈值;在默认配置下的单帧延时大于或等于第二阈值时,执行S412;在默认配置下的单帧延时小于第二阈值时,则默认配置为最优配置,执行S415。S411, the terminal device determines whether the single frame delay under the default configuration is less than the second threshold; when the single frame delay under the default configuration is greater than or equal to the second threshold, execute S412; the single frame delay under the default configuration is less than the second threshold When the threshold is two, the default configuration is the optimal configuration, and S415 is executed.

S412,终端设备调整渲染控件类型和丢帧策略,得到第六配置。S412. The terminal device adjusts the rendering control type and the frame dropping strategy to obtain the sixth configuration.

S413,终端设备确定第六配置下的单帧延时是否小于第二阈值?若第六配置下的单帧延时小于第二阈值,则第六配置为最优配置,执行S415;若第六配置下的单帧延时大于或等于第二阈值时,则执行S414。S413. The terminal device determines whether the single frame delay under the sixth configuration is smaller than the second threshold? If the single frame delay under the sixth configuration is less than the second threshold, then the sixth configuration is the optimal configuration, and execute S415; if the single frame delay under the sixth configuration is greater than or equal to the second threshold, execute S414.

S414,终端设备对第六配置进行调整,以得到最优配置。S414. The terminal device adjusts the sixth configuration to obtain an optimal configuration.

S415,终端设备确定最优配置下的编码参数的参考方式是否需要修改?若最优配置下的编码参数的参考方式需要修改,则执行S416;若最优配置下的编码参数的参考方式不需要修改,则执行S417。S415. Does the terminal device need to modify the reference method for determining the coding parameters under the optimal configuration? If the reference mode of the encoding parameter under the optimal configuration needs to be modified, execute S416; if the reference mode of the encoding parameter under the optimal configuration does not need to be modified, execute S417.

S416,终端设备修改编码参数的参考方式。S416, the terminal device modifies the reference mode of the encoding parameter.

S417,终端设备得到兼顾编码、解码、渲染三者都最优的最优配置。S417, the terminal device obtains an optimal configuration that takes into account the optimal configuration of encoding, decoding, and rendering.

换言之,终端设备首先探测默认配置,获取默认配置下的输出帧率和单帧延时。如果默认配置下得到的输出帧率和单帧延时两者均达标,则默认配置为最优配置,并在最优配置的基础上探测出最优的编码参数。若默认配置下的输出帧率达标、默认配置下的单帧解码延时不达标,则需要修改支持渲染能力的配置参数。若默认配置下的解码输出帧率不达标,则首先修改默认配置下的解码芯片类型、再降低解码输入帧率、再降低解码分辨率,直至探测到满足最优配置的条件的解码输出帧率。In other words, the terminal device first detects the default configuration to obtain the output frame rate and single frame delay under the default configuration. If both the output frame rate and single frame delay obtained under the default configuration meet the standard, the default configuration is the optimal configuration, and the optimal encoding parameters are detected on the basis of the optimal configuration. If the output frame rate under the default configuration meets the standard, and the single-frame decoding delay under the default configuration does not meet the standard, you need to modify the configuration parameters that support rendering capabilities. If the decoding output frame rate under the default configuration does not meet the standard, first modify the decoding chip type under the default configuration, then reduce the decoding input frame rate, and then reduce the decoding resolution until the decoding output frame rate that meets the conditions of the optimal configuration is detected. .

需要说明的是,该默认配置可以为多个设备对应的多个解码渲染效果最好的配置中出现频率最高的配置。例如,在某Android平台的TV设备上,需要探测的配置如:芯片类型包括H264和H265,解码的分辨率包括1080p和720p,输入帧率包括60fps和50fps,渲染控件类型包括Surface View和Texture View,渲染丢帧策略包括丢帧和不丢帧,编码参数的参考方式包括单帧参考的方式和多帧参考的方式,一共有64中组合,完全探测需要64次。但在该默认配置可以为多个设备对应的多个解码渲染效果最好的配置中出现频率最高的配置该默认配置下,首次默认配置探测完成,大多数设备的结果均是输出帧率达标、单帧延时达标、解码无囤帧现象,此时默认配置即为最优配置,即此时只需要一次探测。在最优配置的基础上,对于囤帧芯片,需要额外增加一次编码参数参考方式的探测,总共需要两次探测。在输出帧率达标、单帧延时不达标(即解码能力足够、渲染性能不足)的情况下,也只需额外多增加3次探测(调整渲染控件类型需探测一次、调整丢帧策略需探测一次、对于屯帧芯片增加编码参数的参考方式探测一次),选出最优的渲染配置。即使在最坏的情况下(输出帧率和单帧延时均不达标),也远远低于完全探测的64次。It should be noted that the default configuration may be the configuration with the highest occurrence frequency among the configurations with the best decoding and rendering effects corresponding to multiple devices. For example, on a TV device on an Android platform, configurations that need to be detected include: chip types include H264 and H265, decoding resolutions include 1080p and 720p, input frame rates include 60fps and 50fps, and rendering control types include Surface View and Texture View , The rendering frame loss strategy includes frame loss and no frame loss, and the reference methods of encoding parameters include single frame reference and multi-frame reference. There are 64 combinations in total, and 64 times are required for complete detection. However, under this default configuration, the configuration with the highest frequency among the configurations with the best decoding and rendering effects corresponding to multiple devices, the first detection of the default configuration is completed, and the results of most devices are that the output frame rate reaches the standard, If the delay of a single frame meets the standard and there is no frame hoarding phenomenon in decoding, the default configuration is the optimal configuration at this time, that is, only one detection is required at this time. On the basis of the optimal configuration, for the frame storage chip, an additional detection of the encoding parameter reference mode is required, and a total of two detections are required. In the case that the output frame rate is up to the standard and the single frame delay is not up to the standard (that is, the decoding ability is sufficient and the rendering performance is insufficient), it only needs to add 3 additional detections (one detection is required to adjust the rendering control type, and one detection is required to adjust the frame loss strategy. Once, for the frame chip to increase the reference mode detection of encoding parameters once), and select the optimal rendering configuration. Even in the worst case (both the output frame rate and the single frame delay are not up to standard), it is far below the 64 times of full detection.

基于以上技术方案,终端设备先对获取到的默认配置进行探测,得到该默认配置下的输出帧率和单帧延时,再确定该默认配置下得到的输出帧率和单帧延时是否达标,若二者都达标,则将该默认配置确定为最优配置,若该默认配置下得到的输出帧率和单帧延时中的任意一个或者二者都不达标,则对该默认配置进行调整,以得到满足输出帧率和单帧延时都达标的最优配置;一方面,由于该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,相当于,考虑到各种需满足帧率需求的解码业务场景,能够确保在最优配置下得到的输出帧率满足预设输出帧率的要求,具有一定的普适性;另一方面,由于该最优配置下的单帧延时小于该第二阈值,相当于,考虑到各种需满足延时需求的解码业务场景,能够确保在最优配置下得到的单帧延时满足预设延时的要求,同样具有一定的普适性。Based on the above technical solution, the terminal device first detects the obtained default configuration, obtains the output frame rate and single frame delay under the default configuration, and then determines whether the output frame rate and single frame delay obtained under the default configuration meet the standard , if both of them meet the standard, the default configuration is determined as the optimal configuration, if either or both of the output frame rate and single frame delay obtained under the default configuration are not up to standard, then the default configuration is determined Adjust to obtain the optimal configuration that meets the output frame rate and single frame delay; on the one hand, because the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is less than the first The threshold is equivalent to, considering various decoding business scenarios that need to meet the frame rate requirements, it can ensure that the output frame rate obtained under the optimal configuration meets the preset output frame rate requirements, and has a certain degree of universality; on the other hand , since the single frame delay under the optimal configuration is less than the second threshold, it is equivalent to, considering various decoding business scenarios that need to meet the delay requirements, it can ensure that the single frame delay obtained under the optimal configuration meets the predetermined The requirement of delay time also has a certain degree of universality.

此外,若默认配置为在多个设备中出现频率最高的、且解码渲染效果最好的配置,则相比于尝试所有解码渲染配置确定最优配置,在默认配置的基础上进行有限次探测,以确定出最优配置,可提高探测效率。In addition, if the default configuration is the configuration with the highest frequency of appearance among multiple devices and the best decoding and rendering effect, compared to trying all decoding and rendering configurations to determine the optimal configuration, a limited number of detections are performed on the basis of the default configuration. In order to determine the optimal configuration, the detection efficiency can be improved.

即本申请提供的方法通过校验默认配置下得到的输出帧率和单帧延时是否达标,若默认配置下得到的输出帧率和单帧延时中的任意一个或者二者都不达标,则对默认配置进行调整,直至得到满足输出帧率和单帧延时二者都达标的最优配置,相当于,在默认配置下的输出帧率和单帧延时中的任意一个或者二者都不达标的情况下,在默认配置的基础上进行有限次调整,以得到符合输出帧率和单帧延时要求的最优配置,不仅满足一些极致业务对兼顾输出帧率和单帧延时的需求,而且发挥了当前设备的极限能力,提高设备的利用率。That is, the method provided by this application checks whether the output frame rate and single frame delay obtained under the default configuration are up to the standard. If either or both of the output frame rate and single frame delay obtained under the default configuration fail to meet the standard, Then adjust the default configuration until the optimal configuration that satisfies both the output frame rate and single frame delay is obtained, which is equivalent to either or both of the output frame rate and single frame delay under the default configuration If none of them meet the standard, a limited number of adjustments are made on the basis of the default configuration to obtain the optimal configuration that meets the requirements of the output frame rate and single frame delay, which not only meets the requirements of some extreme business pairs but also takes into account the output frame rate and single frame delay demand, and exert the limit capacity of the current equipment to improve the utilization rate of the equipment.

需要说明的是,在以上的描述中,所涉及的“达标”包括“输出帧率达标”、“单帧延时达标”;“输出帧率达标”为若某一配置下的输入帧率和该配置下的输出帧率的差值小于第一阈值时,则该配置下的输出帧率达标;同理,“单帧延时达标”为某一配置下的单帧延时小于第二阈值,则该配置下的单帧延时达标。It should be noted that in the above description, the "standard" involved includes "output frame rate up to standard" and "single frame delay up to standard"; "output frame rate up to standard" means that if the input frame rate and When the difference of the output frame rate under this configuration is less than the first threshold, the output frame rate under this configuration meets the standard; similarly, "single frame delay meets the standard" means that the single frame delay under a certain configuration is less than the second threshold , then the single frame delay under this configuration meets the standard.

需要说明的是,在以上的描述中,所涉及的术语“第一\第二\第三\第四\第五\第六”仅仅是区别类似的对象,不代表针对对象的特定排序,应理解,“第一\第二\第三\第四\第五\第六”在允许的情况下可以互换特定的顺序或先后次序,不应成为本申请的限制。It should be noted that in the above description, the terms "first\second\third\fourth\fifth\sixth" are only used to distinguish similar objects, and do not represent a specific ordering of objects. It is understood that "first\second\third\fourth\fifth\sixth" can be exchanged for a specific order or sequence if allowed, and should not be a limitation of this application.

需要说明的是,本发明实施例中,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。具体地,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be noted that, in the embodiment of the present invention, the term "and/or" is only an association relationship describing associated objects, indicating that there may be three relationships. Specifically, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.

以上结合附图详细描述了本申请的优选实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。The preferred embodiments of the present application have been described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present application, various simple modifications can be made to the technical solutions of the present application. These simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific implementation manners can be combined in any suitable manner if there is no contradiction. Separately. As another example, any combination of various implementations of the present application can also be made, as long as they do not violate the idea of the present application, they should also be regarded as the content disclosed in the present application.

还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that in the various method embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not be used in this application. The implementation of the examples constitutes no limitation.

上文对本申请实施例提供的方法进行了说明,下面对本申请实施例提供的装置进行说明。The method provided by the embodiment of the present application is described above, and the device provided by the embodiment of the present application is described below.

图5是本申请实施例提供的解码渲染配置的获取装置500的示意性框图。FIG. 5 is a schematic block diagram of an apparatus 500 for acquiring a decoding rendering configuration provided by an embodiment of the present application.

如图5所示,该解码渲染配置的获取装置500可包括但不限于:As shown in FIG. 5, the acquisition device 500 of the decoded rendering configuration may include but not limited to:

获取单元510,用于获取默认配置;An acquisition unit 510, configured to acquire a default configuration;

解码渲染单元520,用于在该默认配置下,获取视频码流并对该视频码流进行解码渲染,以得到输出帧率和单帧延时;The decoding and rendering unit 520 is configured to obtain the video code stream and decode and render the video code stream under the default configuration, so as to obtain the output frame rate and single frame delay;

调整单元530,用于若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于第一阈值,和/或,该默认配置下的单帧延时大于或等于第二阈值,对该默认配置进行调整,以得到最优配置;其中,该最优配置下的输入帧率和该最优配置下的输出帧率的差值小于该第一阈值,且该最优配置下的单帧延时小于该第二阈值。The adjustment unit 530 is configured to if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to a first threshold, and/or, the single frame delay under the default configuration is greater than or equal to The second threshold is to adjust the default configuration to obtain an optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is smaller than the first threshold, and the optimal The single frame delay under the optimal configuration is less than the second threshold.

在本申请的一些实施例中,调整单元530可用于:In some embodiments of the present application, the adjustment unit 530 can be used to:

若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于该第一阈值,则通过调整芯片类型、降低输入帧率以及降低分辨率中的至少一项对该默认配置下的输出帧率进行调整,得到该最优配置;If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, adjust the chip type, reduce the input frame rate and reduce the resolution at least one of the Adjust the output frame rate under the default configuration to get the optimal configuration;

若该默认单帧延时大于或等于该第二阈值,则通过调整渲染控件类型和丢帧策略中的至少一项对该默认配置下的单帧延时进行调整,得到该最优配置。If the default single frame delay is greater than or equal to the second threshold, the optimal configuration is obtained by adjusting at least one of the rendering control type and frame dropping strategy to adjust the single frame delay under the default configuration.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

若该默认配置下的输入帧率和该默认配置下的输出帧率的差值大于或等于该第一阈值,则通过调整该默认配置下的芯片类型,得到第一配置;If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, the first configuration is obtained by adjusting the chip type under the default configuration;

若该第一配置下的输入帧率和该第一配置下的输出帧率的差值小于该第一阈值,则将该第一配置确定为该最优配置;If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is less than the first threshold, then determine the first configuration as the optimal configuration;

若该第一配置下的输入帧率和该第一配置下的输出帧率的差值大于或等于该第一阈值,则对该第一配置下的输出帧率进行调整,以得到该最优配置。If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, then adjust the output frame rate under the first configuration to obtain the optimal configuration.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

若该第一配置下的输入帧率和该第一配置下的输出帧率的差值大于或等于该第一阈值,将该第一配置下的芯片类型调整为输出帧率最高的芯片类型,以得到第二配置;If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, adjust the chip type under the first configuration to the chip type with the highest output frame rate, to get the second configuration;

通过降低输入帧率和降低分辨率中的至少一项对该第二配置下的输出帧率进行调整,以得到该最优配置。The output frame rate under the second configuration is adjusted by reducing at least one of the input frame rate and the resolution, so as to obtain the optimal configuration.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

通过至少一次降低该第二配置下的输入帧率,以得到第三配置;Obtaining a third configuration by reducing the input frame rate under the second configuration at least once;

若该第三配置下的输入帧率和该第三配置下的输出帧率的差值小于该第一阈值,则将该第三配置确定为该最优配置;If the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is less than the first threshold, then determine the third configuration as the optimal configuration;

若该第三配置下的输入帧率和该第三配置下的输出帧率的差值大于或等于该第一阈值,则对该第三配置下的输出帧率进行调整,以得到该最优配置。If the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is greater than or equal to the first threshold, then adjust the output frame rate under the third configuration to obtain the optimal configuration.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

通过至少一次降低该第二配置下的分辨率,以得到第四配置;obtaining a fourth configuration by reducing the resolution under the second configuration at least once;

若该第四配置下的输入帧率和该第四配置下的输出帧率的差值小于该第一阈值,则将该第四配置确定为该最优配置;If the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is less than the first threshold, then determine the fourth configuration as the optimal configuration;

若该第四配置下的输入帧率和该第四配置下的输出帧率的差值大于或等于该第一阈值,则对该第四配置下的输出帧率进行调整,以得到该最优配置。If the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is greater than or equal to the first threshold, then adjust the output frame rate under the fourth configuration to obtain the optimal configuration.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

依次通过至少一次降低该第二配置下的输入帧率和该第二配置下的分辨率,以得到该最优配置;或The optimal configuration is obtained by sequentially reducing the input frame rate under the second configuration and the resolution under the second configuration at least once; or

依次通过至少一次降低该第二配置下的分辨率和该第二配置下的输入帧率,以得到该最优配置。The optimal configuration is obtained by sequentially reducing the resolution under the second configuration and the input frame rate under the second configuration at least once.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

若该默认配置下的单帧延时大于或等于第二阈值,则调整该默认配置下的渲染控件类型,以得到第五配置;If the single frame delay under the default configuration is greater than or equal to the second threshold, adjust the rendering control type under the default configuration to obtain the fifth configuration;

若该第五配置下的单帧延时小于该第二阈值,则将该第五配置确定为该最优配置;If the single frame delay under the fifth configuration is less than the second threshold, then determine the fifth configuration as the optimal configuration;

若该第五配置下的单帧延时大于或等于该第二阈值,则对该第五配置进行调整,以得到该最优配置。If the single frame delay under the fifth configuration is greater than or equal to the second threshold, the fifth configuration is adjusted to obtain the optimal configuration.

在本申请的一些实施例中,调整单元530还可用于:In some embodiments of the present application, the adjustment unit 530 can also be used to:

若该默认配置下的单帧延时大于或等于第二阈值,则调整该默认配置下的丢帧策略,以得到第六配置;If the single frame delay under the default configuration is greater than or equal to the second threshold, then adjust the frame loss policy under the default configuration to obtain the sixth configuration;

若该第六配置下的单帧延时小于该第二阈值,则将该第六配置确定为该最优配置;If the single frame delay under the sixth configuration is less than the second threshold, then determine the sixth configuration as the optimal configuration;

若该第六配置下的单帧延时大于或等于该第二阈值,则对该第六配置进行调整,以得到该最优配置。If the single frame delay under the sixth configuration is greater than or equal to the second threshold, the sixth configuration is adjusted to obtain the optimal configuration.

在本申请的一些实施例中,装置500还可包括:In some embodiments of the present application, the device 500 may further include:

确定单元,具体用于若该最优配置下的芯片为屯帧芯片,则基于多帧参考的方式确定编码参数;若该最优配置下的芯片为非屯帧芯片,则基于单帧参考的方式确定该编码参数。The determination unit is specifically used to determine the encoding parameters based on multi-frame reference if the chip under the optimal configuration is a frame chip; if the chip under the optimal configuration is a non-frame chip, then based on single frame reference way to determine the encoding parameters.

在本申请的一些实施例中,确定单元还可用于:In some embodiments of the present application, the determination unit can also be used for:

将多个配置中的出现频率最高的配置确定为该默认配置;该多个配置包括针对多个设备中的每一个设备进行解码渲染测试时的解码渲染效果最好的配置。The configuration with the highest occurrence frequency among the multiple configurations is determined as the default configuration; the multiple configurations include the configuration with the best decoding and rendering effect when performing a decoding and rendering test for each of the multiple devices.

在本申请的一些实施例中,确定单元还可用于:该第二阈值为该视频码流的输入帧率的倒数;或该第二阈值为该视频码流的输入帧率的倒数与对该视频码流进行解码渲染时芯片的屯帧数量的乘积。In some embodiments of the present application, the determining unit can also be used for: the second threshold is the reciprocal of the input frame rate of the video code stream; or the second threshold is the reciprocal of the input frame rate of the video code stream The product of the number of frames of the chip when the video code stream is decoded and rendered.

应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。例如,该装置500可以对应于执行本申请实施例的方法300至400中的的相应主体,并且该装置500中的各个单元分别为了实现方法300至400中的相应流程。为了简洁,在此不再赘述。It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, details are not repeated here. For example, the apparatus 500 may correspond to a corresponding body that executes the methods 300 to 400 in the embodiments of the present application, and each unit in the apparatus 500 is to implement the corresponding processes in the methods 300 to 400 respectively. For the sake of brevity, details are not repeated here.

还应当理解,本申请实施例涉及的该装置500中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,该装置500也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。根据本申请的另一个实施例,可以通过在包括例如中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的通用计算机的通用计算设备上运行能够执行相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造本申请实施例涉及的该装置500,以及来实现本申请实施例的解码渲染配置的获取方法。其中,计算机程序可以记载于例如计算机可读存储介质上,并通过计算机可读存储介质装载于电子设备中,并在其中运行,来实现本申请实施例的相应方法。It should also be understood that the various units in the device 500 involved in the embodiment of the present application may be separately or all combined into one or several other units to form, or one (some) of the units may be further divided into functional Multiple smaller units can realize the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the apparatus 500 may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units. According to another embodiment of the present application, a general-purpose computing device including a general-purpose computer such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element Run a computer program (including program code) capable of executing each step involved in the corresponding method on the computer to construct the device 500 involved in the embodiment of the present application, and implement the method for obtaining the decoding and rendering configuration in the embodiment of the present application. Wherein, the computer program may be recorded in, for example, a computer-readable storage medium, loaded in the electronic device through the computer-readable storage medium, and run therein, to implement the corresponding method of the embodiment of the present application.

换言之,上文涉及的单元可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过软硬件结合的形式实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件组合执行完成。可选地,软件可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。In other words, the units mentioned above can be implemented in the form of hardware, can also be implemented by instructions in the form of software, and can also be implemented in the form of a combination of software and hardware. Specifically, each step of the method embodiment in the embodiment of the present application can be completed by an integrated logic circuit of the hardware in the processor and/or instructions in the form of software, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as hardware The execution of the decoding processor is completed, or the combination of hardware and software in the decoding processor is used to complete the execution. Optionally, the software may be located in mature storage media in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above method embodiments in combination with its hardware.

图6是本申请实施例提供的电子设备600的示意结构图。FIG. 6 is a schematic structural diagram of an electronic device 600 provided by an embodiment of the present application.

如图6所示,该电子设备600至少包括处理器610以及计算机可读存储介质620。其中,处理器610以及计算机可读存储介质620可通过总线或者其它方式连接。计算机可读存储介质620用于存储计算机程序621,计算机程序621包括计算机指令,处理器610用于执行计算机可读存储介质620存储的计算机指令。处理器610是电子设备600的计算核心以及控制核心,其适于实现一条或多条计算机指令,具体适于加载并执行一条或多条计算机指令从而实现相应方法流程或相应功能。As shown in FIG. 6 , the electronic device 600 includes at least a processor 610 and a computer-readable storage medium 620 . Wherein, the processor 610 and the computer-readable storage medium 620 may be connected through a bus or in other ways. The computer-readable storage medium 620 is used for storing a computer program 621 , and the computer program 621 includes computer instructions, and the processor 610 is used for executing the computer instructions stored in the computer-readable storage medium 620 . The processor 610 is the calculation core and the control core of the electronic device 600, which is suitable for implementing one or more computer instructions, specifically for loading and executing one or more computer instructions so as to realize corresponding method procedures or corresponding functions.

作为示例,处理器610也可称为中央处理器(Central Processing Unit,CPU)。处理器610可以包括但不限于:通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。As an example, the processor 610 may also be called a central processing unit (Central Processing Unit, CPU). The processor 610 may include but not limited to: a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

作为示例,计算机可读存储介质620可以是高速RAM存储器,也可以是非不稳定的存储器(Non-VolatileMemory),例如至少一个磁盘存储器;可选的,还可以是至少一个位于远离前述处理器610的计算机可读存储介质。具体而言,计算机可读存储介质620包括但不限于:易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double DataRate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。As an example, the computer-readable storage medium 620 can be a high-speed RAM memory, or a non-volatile memory (Non-VolatileMemory), such as at least one disk memory; computer readable storage medium. Specifically, the computer-readable storage medium 620 includes, but is not limited to: volatile memory and/or non-volatile memory. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. The volatile memory can be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double DataRate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synch link DRAM, SLDRAM ) and direct memory bus random access memory (Direct Rambus RAM, DR RAM).

在一种实现方式中,该电子设备600可以是图5所示的解码渲染配置的获取装置500;该计算机可读存储介质620中存储有计算机指令;由处理器610加载并执行计算机可读存储介质620中存放的计算机指令,以实现图3至图4所示方法实施例中的相应步骤;具体实现中,计算机可读存储介质620中的计算机指令由处理器610加载并执行相应步骤,为避免重复,此处不再赘述。In one implementation, the electronic device 600 may be the acquiring device 500 for decoding and rendering configuration shown in FIG. 5; computer instructions are stored in the computer-readable storage medium 620; The computer instructions stored in the medium 620 are used to implement the corresponding steps in the method embodiments shown in FIGS. To avoid repetition, I won't repeat them here.

根据本申请的另一方面,本申请实施例还提供了一种计算机可读存储介质(Memory),计算机可读存储介质是电子设备600中的记忆设备,用于存放程序和数据。例如,计算机可读存储介质620。可以理解的是,此处的计算机可读存储介质620既可以包括电子设备600中的内置存储介质,当然也可以包括电子设备600所支持的扩展存储介质。计算机可读存储介质提供存储空间,该存储空间存储了电子设备600的操作系统。并且,在该存储空间中还存放了适于被处理器610加载并执行的一条或多条的计算机指令,这些计算机指令可以是一个或多个的计算机程序621(包括程序代码)。According to another aspect of the present application, the embodiment of the present application further provides a computer-readable storage medium (Memory). The computer-readable storage medium is a storage device in the electronic device 600 and is used to store programs and data. For example, computer readable storage medium 620 . It can be understood that the computer-readable storage medium 620 here may include a built-in storage medium in the electronic device 600 , and of course may also include an extended storage medium supported by the electronic device 600 . The computer-readable storage medium provides storage space, and the storage space stores the operating system of the electronic device 600 . Moreover, one or more computer instructions adapted to be loaded and executed by the processor 610 are also stored in the storage space, and these computer instructions may be one or more computer programs 621 (including program codes).

该电子设备600还可包括:收发器630,该收发器630可连接至该处理器610或计算机可读存储介质620。The electronic device 600 may further include: a transceiver 630 , and the transceiver 630 may be connected to the processor 610 or the computer-readable storage medium 620 .

其中,计算机可读存储介质620可以控制该收发器630与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。收发器630可以包括发射机和接收机。收发器630还可以进一步包括天线,天线的数量可以为一个或多个。Wherein, the computer-readable storage medium 620 can control the transceiver 630 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices. Transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include antennas, and the number of antennas may be one or more.

根据本申请的另一方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。例如,计算机程序621。此时,电子设备600可以是计算机,处理器610从计算机可读存储介质620读取该计算机指令,处理器610执行该计算机指令,使得该计算机执行上述各种可选方式中提供的解码渲染配置的获取方法。According to another aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. For example, computer program 621 . At this time, the electronic device 600 may be a computer, the processor 610 reads the computer instructions from the computer-readable storage medium 620, and the processor 610 executes the computer instructions, so that the computer executes the decoding and rendering configurations provided in the above-mentioned various optional ways method of obtaining .

换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地运行本申请实施例的流程或实现本申请实施例的功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质进行传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。In other words, when implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the procedures of the embodiments of the present application are run in whole or in part or the functions of the embodiments of the present application are realized. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, from a website, computer, server, or data center via Wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元以及流程步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and process steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

最后需要说明的是,以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。Finally, it should be noted that the above is only a specific embodiment of the application, but the scope of protection of the application is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in this application. Replacement should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (15)

1.一种解码渲染配置的获取方法,其特征在于,包括:1. A method for acquiring a decoding rendering configuration, comprising: 获取默认配置;Get the default configuration; 在所述默认配置下,获取视频码流并对所述视频码流进行解码渲染,以得到输出帧率和单帧延时;Under the default configuration, acquire a video code stream and decode and render the video code stream to obtain an output frame rate and a single frame delay; 若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于第一阈值,和/或,所述默认配置下的单帧延时大于或等于第二阈值,对所述默认配置进行调整,以得到最优配置;其中,所述最优配置下的输入帧率和所述最优配置下的输出帧率的差值小于所述第一阈值,且所述最优配置下的单帧延时小于所述第二阈值。If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to a first threshold, and/or, the single frame delay under the default configuration is greater than or equal to a second threshold , adjust the default configuration to obtain an optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is less than the first threshold, and the The single frame delay under the optimal configuration is less than the second threshold. 2.根据权利要求1所述的方法,其特征在于,所述若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于第一阈值,和/或,若所述默认配置下的单帧延时大于或等于第二阈值,则对所述默认配置进行调整,以得到最优配置,包括:2. The method according to claim 1, wherein if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to a first threshold, and/or , if the single frame delay under the default configuration is greater than or equal to the second threshold, then adjust the default configuration to obtain an optimal configuration, including: 若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于所述第一阈值,则通过调整芯片类型、降低输入帧率以及降低分辨率中的至少一项对所述默认配置下的输出帧率进行调整,得到所述最优配置;If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, at least one of adjusting the chip type, reducing the input frame rate, and reducing the resolution Item adjusts the output frame rate under the default configuration to obtain the optimal configuration; 若所述默认单帧延时大于或等于所述第二阈值,则通过调整渲染控件类型和丢帧策略中的至少一项对所述默认配置下的单帧延时进行调整,得到所述最优配置。If the default single-frame delay is greater than or equal to the second threshold, adjust the single-frame delay under the default configuration by adjusting at least one of the rendering control type and the frame loss strategy to obtain the maximum Optimal configuration. 3.根据权利要求1所述的方法,其特征在于,所述若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于第一阈值,和/或,若所述默认配置下的单帧延时大于或等于第二阈值,则对所述默认配置进行调整,以得到最优配置,包括:3. The method according to claim 1, wherein if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to a first threshold, and/or , if the single frame delay under the default configuration is greater than or equal to the second threshold, then adjust the default configuration to obtain an optimal configuration, including: 若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于所述第一阈值,则通过调整所述默认配置下的芯片类型,得到第一配置;If the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first threshold, the first configuration is obtained by adjusting the chip type under the default configuration; 若所述第一配置下的输入帧率和所述第一配置下的输出帧率的差值小于所述第一阈值,则将所述第一配置确定为所述最优配置;If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is less than the first threshold, then determine the first configuration as the optimal configuration; 若所述第一配置下的输入帧率和所述第一配置下的输出帧率的差值大于或等于所述第一阈值,则对所述第一配置下的输出帧率进行调整,以得到所述最优配置。If the difference between the input frame rate under the first configuration and the output frame rate under the first configuration is greater than or equal to the first threshold, then adjust the output frame rate under the first configuration to get the optimal configuration. 4.根据权利要求3所述的方法,其特征在于,所述对所述第一配置下的输出帧率进行调整,以得到所述最优配置,包括:4. The method according to claim 3, wherein the adjusting the output frame rate under the first configuration to obtain the optimal configuration comprises: 将所述第一配置下的芯片类型调整为输出帧率最高的芯片类型,以得到第二配置;adjusting the chip type under the first configuration to the chip type with the highest output frame rate to obtain a second configuration; 通过降低输入帧率和降低分辨率中的至少一项对所述第二配置下的输出帧率进行调整,以得到所述最优配置。Adjusting the output frame rate under the second configuration by reducing at least one of the input frame rate and the resolution, so as to obtain the optimal configuration. 5.根据权利要求4所述的方法,其特征在于,所述通过降低输入帧率和降低分辨率中的至少一项对所述第二配置下的输出帧率进行调整,以得到所述最优配置,包括:5. The method according to claim 4, wherein the output frame rate under the second configuration is adjusted by reducing at least one of the input frame rate and the resolution, so as to obtain the optimum Optimal configuration, including: 通过至少一次降低所述第二配置下的输入帧率,以得到第三配置;obtaining a third configuration by reducing the input frame rate under the second configuration at least once; 若所述第三配置下的输入帧率和所述第三配置下的输出帧率的差值小于所述第一阈值,则将所述第三配置确定为所述最优配置;If the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is smaller than the first threshold, then determine the third configuration as the optimal configuration; 若所述第三配置下的输入帧率和所述第三配置下的输出帧率的差值大于或等于所述第一阈值,则对所述第三配置下的输出帧率进行调整,以得到所述最优配置。If the difference between the input frame rate under the third configuration and the output frame rate under the third configuration is greater than or equal to the first threshold, then adjust the output frame rate under the third configuration, so that get the optimal configuration. 6.根据权利要求4所述的方法,其特征在于,所述通过降低输入帧率和降低分辨率中的至少一项对所述第二配置下的输出帧率进行调整,以得到所述最优配置,包括:6. The method according to claim 4, wherein the output frame rate under the second configuration is adjusted by reducing at least one of the input frame rate and the resolution, so as to obtain the optimum Optimal configuration, including: 通过至少一次降低所述第二配置下的分辨率,以得到第四配置;obtaining a fourth configuration by reducing the resolution under the second configuration at least once; 若所述第四配置下的输入帧率和所述第四配置下的输出帧率的差值小于所述第一阈值,则将所述第四配置确定为所述最优配置;If the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is smaller than the first threshold, then determine the fourth configuration as the optimal configuration; 若所述第四配置下的输入帧率和所述第四配置下的输出帧率的差值大于或等于所述第一阈值,则对所述第四配置下的输出帧率进行调整,以得到所述最优配置。If the difference between the input frame rate under the fourth configuration and the output frame rate under the fourth configuration is greater than or equal to the first threshold, then adjust the output frame rate under the fourth configuration, so that get the optimal configuration. 7.根据权利要求4所述的方法,其特征在于,所述通过降低输入帧率和降低分辨率中的至少一项对所述第二配置下的输出帧率进行调整,以得到所述最优配置,包括:7. The method according to claim 4, wherein the output frame rate under the second configuration is adjusted by reducing at least one of the input frame rate and the resolution, so as to obtain the optimum Optimal configuration, including: 依次通过至少一次降低所述第二配置下的输入帧率和所述第二配置下的分辨率,以得到所述最优配置;或The optimal configuration is obtained by sequentially reducing the input frame rate under the second configuration and the resolution under the second configuration at least once; or 依次通过至少一次降低所述第二配置下的分辨率和所述第二配置下的输入帧率,以得到所述最优配置。The optimal configuration is obtained by sequentially reducing the resolution under the second configuration and the input frame rate under the second configuration at least once. 8.根据权利要求1至7中任一项所述的方法,其特征在于,所述若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于第一阈值,和/或,若所述默认配置下的单帧延时大于或等于第二阈值,则对所述默认配置进行调整,以得到最优配置,包括:8. The method according to any one of claims 1 to 7, wherein if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first A threshold, and/or, if the single frame delay under the default configuration is greater than or equal to a second threshold, then adjust the default configuration to obtain an optimal configuration, including: 若所述默认配置下的单帧延时大于或等于第二阈值,则调整所述默认配置下的渲染控件类型,以得到第五配置;If the single frame delay under the default configuration is greater than or equal to the second threshold, then adjust the rendering control type under the default configuration to obtain a fifth configuration; 若所述第五配置下的单帧延时小于所述第二阈值,则将所述第五配置确定为所述最优配置;If the single frame delay under the fifth configuration is less than the second threshold, then determine the fifth configuration as the optimal configuration; 若所述第五配置下的单帧延时大于或等于所述第二阈值,则对所述第五配置进行调整,以得到所述最优配置。If the single frame delay under the fifth configuration is greater than or equal to the second threshold, then adjust the fifth configuration to obtain the optimal configuration. 9.根据权利要求1至7中任一项所述的方法,其特征在于,所述若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于第一阈值,和/或,若所述默认配置下的单帧延时大于或等于第二阈值,则对所述默认配置进行调整,以得到最优配置,包括:9. The method according to any one of claims 1 to 7, wherein if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to the first A threshold, and/or, if the single frame delay under the default configuration is greater than or equal to a second threshold, then adjust the default configuration to obtain an optimal configuration, including: 若所述默认配置下的单帧延时大于或等于第二阈值,则调整所述默认配置下的丢帧策略,以得到第六配置;If the single frame delay under the default configuration is greater than or equal to the second threshold, then adjust the frame loss strategy under the default configuration to obtain the sixth configuration; 若所述第六配置下的单帧延时小于所述第二阈值,则将所述第六配置确定为所述最优配置;If the single frame delay under the sixth configuration is less than the second threshold, then determine the sixth configuration as the optimal configuration; 若所述第六配置下的单帧延时大于或等于所述第二阈值,则对所述第六配置进行调整,以得到所述最优配置。If the single frame delay under the sixth configuration is greater than or equal to the second threshold, then adjust the sixth configuration to obtain the optimal configuration. 10.根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:10. The method according to any one of claims 1 to 7, further comprising: 若所述最优配置下的芯片为屯帧芯片,则基于多帧参考的方式确定编码参数;If the chip under the optimal configuration is a frame chip, then determine the coding parameters based on multi-frame reference; 若所述最优配置下的芯片为非屯帧芯片,则基于单帧参考的方式确定所述编码参数。If the chip under the optimal configuration is a non-frame chip, then determine the encoding parameters based on a single frame reference. 11.根据权利要求1至7中任一项所述的方法,其特征在于,所述获取默认配置之前,所述方法还包括:11. The method according to any one of claims 1 to 7, wherein, before obtaining the default configuration, the method further comprises: 将多个配置中的出现频率最高的配置确定为所述默认配置;所述多个配置包括针对多个设备中的每一个设备进行解码渲染测试时的解码渲染效果最好的配置。Determining the configuration with the highest occurrence frequency among the multiple configurations as the default configuration; the multiple configurations include the configuration with the best decoding and rendering effect when performing a decoding and rendering test for each of the multiple devices. 12.根据权利要求1至7中任一项所述的方法,其特征在于,所述第二阈值为所述视频码流的输入帧率的倒数;或所述第二阈值为所述视频码流的输入帧率的倒数与对所述视频码流进行解码渲染时芯片的屯帧数量的乘积。12. The method according to any one of claims 1 to 7, wherein the second threshold is the reciprocal of the input frame rate of the video code stream; or the second threshold is the video code stream The product of the reciprocal of the input frame rate of the stream and the number of frames of the chip when decoding and rendering the video code stream. 13.一种解码渲染配置的获取装置,其特征在于,包括:13. An acquisition device for decoding and rendering configuration, comprising: 获取单元,用于获取默认配置;Acquisition unit, used to obtain the default configuration; 解码渲染单元,用于在所述默认配置下,获取视频码流并对所述视频码流进行解码渲染,以得到输出帧率和单帧延时;A decoding and rendering unit, configured to obtain a video code stream and decode and render the video code stream under the default configuration, so as to obtain an output frame rate and a single frame delay; 调整单元,用于若所述默认配置下的输入帧率和所述默认配置下的输出帧率的差值大于或等于第一阈值,和/或,所述默认配置下的单帧延时大于或等于第二阈值,对所述默认配置进行调整,以得到最优配置;其中,所述最优配置下的输入帧率和所述最优配置下的输出帧率的差值小于所述第一阈值,且所述最优配置下的单帧延时小于所述第二阈值。An adjustment unit, configured to if the difference between the input frame rate under the default configuration and the output frame rate under the default configuration is greater than or equal to a first threshold, and/or, the single frame delay under the default configuration is greater than or equal to the second threshold, the default configuration is adjusted to obtain an optimal configuration; wherein, the difference between the input frame rate under the optimal configuration and the output frame rate under the optimal configuration is less than the first A threshold, and the single frame delay under the optimal configuration is less than the second threshold. 14.一种电子设备,其特征在于,包括:14. An electronic device, characterized in that it comprises: 处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求1至12中任一项所述的方法。A processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 12. 15.一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至12中任一项所述的方法。15. A computer-readable storage medium, characterized by being used for storing a computer program, the computer program causing a computer to execute the method according to any one of claims 1 to 12.
CN202110893187.2A 2021-08-04 2021-08-04 Method, device, electronic device and storage medium for obtaining decoding and rendering configuration Active CN115706725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110893187.2A CN115706725B (en) 2021-08-04 2021-08-04 Method, device, electronic device and storage medium for obtaining decoding and rendering configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110893187.2A CN115706725B (en) 2021-08-04 2021-08-04 Method, device, electronic device and storage medium for obtaining decoding and rendering configuration

Publications (2)

Publication Number Publication Date
CN115706725A true CN115706725A (en) 2023-02-17
CN115706725B CN115706725B (en) 2025-06-10

Family

ID=85178745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110893187.2A Active CN115706725B (en) 2021-08-04 2021-08-04 Method, device, electronic device and storage medium for obtaining decoding and rendering configuration

Country Status (1)

Country Link
CN (1) CN115706725B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024188034A1 (en) * 2023-03-10 2024-09-19 腾讯科技(深圳)有限公司 Device configuration adjustment method and apparatus, storage medium, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6031584A (en) * 1997-09-26 2000-02-29 Intel Corporation Method for reducing digital video frame frequency while maintaining temporal smoothness
CN103051899A (en) * 2012-12-31 2013-04-17 青岛中星微电子有限公司 Method and device for video decoding
CN111541919A (en) * 2020-05-13 2020-08-14 北京百度网讯科技有限公司 Video frame transmission method and device, electronic equipment and readable storage medium
KR20210051903A (en) * 2019-10-31 2021-05-10 삼성에스디에스 주식회사 Method and apparatus for game streaming

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6031584A (en) * 1997-09-26 2000-02-29 Intel Corporation Method for reducing digital video frame frequency while maintaining temporal smoothness
CN103051899A (en) * 2012-12-31 2013-04-17 青岛中星微电子有限公司 Method and device for video decoding
KR20210051903A (en) * 2019-10-31 2021-05-10 삼성에스디에스 주식회사 Method and apparatus for game streaming
CN111541919A (en) * 2020-05-13 2020-08-14 北京百度网讯科技有限公司 Video frame transmission method and device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024188034A1 (en) * 2023-03-10 2024-09-19 腾讯科技(深圳)有限公司 Device configuration adjustment method and apparatus, storage medium, and electronic device

Also Published As

Publication number Publication date
CN115706725B (en) 2025-06-10

Similar Documents

Publication Publication Date Title
CN114501062B (en) Video rendering coordination method, device, equipment and storage medium
CN112235626B (en) Video rendering method and device, electronic equipment and storage medium
CN109688465B (en) Video enhancement control method, device and electronic device
WO2020248909A1 (en) Video decoding method and apparatus, computer device, and storage medium
CN109151966B (en) Terminal control method, device, terminal device and storage medium
CN109640179B (en) Video decoding control method, device and electronic device
US20170195617A1 (en) Image processing method and electronic device
CN109361950B (en) Video processing method, device, electronic device and storage medium
US11562772B2 (en) Video processing method, electronic device, and storage medium
CN114339412B (en) Video quality enhancement method, mobile terminal, storage medium and device
CN112203034A (en) Frame rate control method and device and electronic equipment
US10462200B2 (en) System for cloud streaming service, method for still image-based cloud streaming service and apparatus therefor
CN115706725A (en) Method and device for acquiring decoding rendering configuration, electronic equipment and storage medium
CN109587555B (en) Video processing method, device, electronic device and storage medium
US20240098316A1 (en) Video encoding method and apparatus, real-time communication method and apparatus, device, and storage medium
CN116257195A (en) Screen projection method and device, storage medium and electronic equipment
CN107004018B (en) Data processing method and device
WO2020107970A1 (en) Video decoding method and apparatus, electronic device, and storage medium
CN109120979B (en) Video enhancement control method and device and electronic equipment
HK40081314A (en) Method, apparatus, electronic device and storage medium for acquiring decoding and rendering configuration
CN105657070A (en) Method and server for providing picture data to computing terminal
CN116567242A (en) Image processing method, device and equipment
CN116567319A (en) Hardware decoding capability detection method and device, storage medium and computer equipment
US10025550B2 (en) Fast keyboard for screen mirroring
CN114040227B (en) Audio and video playback control method, device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40081314

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant