[go: up one dir, main page]

CN115348454A - A video transmission processing method and terminal equipment - Google Patents

A video transmission processing method and terminal equipment Download PDF

Info

Publication number
CN115348454A
CN115348454A CN202211264205.1A CN202211264205A CN115348454A CN 115348454 A CN115348454 A CN 115348454A CN 202211264205 A CN202211264205 A CN 202211264205A CN 115348454 A CN115348454 A CN 115348454A
Authority
CN
China
Prior art keywords
frame
video
display
time point
nth
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
CN202211264205.1A
Other languages
Chinese (zh)
Other versions
CN115348454B (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.)
This chip technology group Co.,Ltd.
Original Assignee
This Core Technology Shanghai 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 This Core Technology Shanghai Co ltd filed Critical This Core Technology Shanghai Co ltd
Priority to CN202211264205.1A priority Critical patent/CN115348454B/en
Publication of CN115348454A publication Critical patent/CN115348454A/en
Application granted granted Critical
Publication of CN115348454B publication Critical patent/CN115348454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/44Receiver circuitry for the reception of television signals according to analogue transmission standards

Landscapes

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

Abstract

The application provides a video transmission processing method and terminal equipment, and relates to the technical field of video transmission. Firstly, acquiring initialization parameters, wherein the initialization parameters comprise an n-1 frame parameter, an nth frame parameter, a decoder parameter and a display parameter; wherein, the n-1 th frame is a decoded video frame, the n-th frame is a video frame to be decoded, and n is more than or equal to 2; then, determining a target segment suggestion value of the nth frame according to the initialization parameter, and generating a time point for controlling a display to read the nth frame video frame from a cache according to the target segment suggestion value; the video decoder decodes the video frames to be decoded according to the segments, and each frame of the video frames to be decoded is divided into a plurality of segments. The video transmission processing method and the terminal equipment have the advantage of shortening video transmission delay.

Description

一种视频传输处理方法与终端设备A video transmission processing method and terminal equipment

技术领域technical field

本申请涉及视频传输技术领域,具体而言,涉及一种视频传输处理方法与终端设备。The present application relates to the technical field of video transmission, and in particular, to a video transmission processing method and terminal equipment.

背景技术Background technique

随着网络传输速度以及视频处理技术的快速发展,远程桌面,云电脑,云游戏等应用逐渐普及,这对缩短视频传输和显示延迟有了更高的要求。远程视频传输到终端设备后需要经过视频解码处理器解码后写到缓存(DMA-buffer),然后通知显示处理器读取缓存并显示。图像从解码到显示的延迟是终端设备所重点关注的地方。除了单方面的提高解码速度外,图像从解码器到显示器的通知和传输也是一个新的突破点。With the rapid development of network transmission speed and video processing technology, applications such as remote desktop, cloud computer, and cloud game are gradually popularized, which has higher requirements for shortening video transmission and display delay. After the remote video is transmitted to the terminal device, it needs to be decoded by the video decoding processor and then written to the cache (DMA-buffer), and then the display processor is notified to read the cache and display it. The delay from decoding to displaying images is a key concern of terminal equipment. In addition to unilaterally improving the decoding speed, the notification and transmission of images from the decoder to the display is also a new breakthrough point.

现有技术中,图像从解码器传输到显示器通常需要等到解码完整帧并写到缓存后才通过上层软件通知显示端,因此,从视频解码到显示会出现至少一帧的延迟。In the prior art, the transmission of the image from the decoder to the display usually needs to wait until the complete frame is decoded and written to the buffer before notifying the display terminal through the upper layer software. Therefore, there will be a delay of at least one frame from video decoding to display.

综上,现有技术中存在视频传输延迟较大的问题。To sum up, there is a problem of relatively large video transmission delay in the prior art.

发明内容Contents of the invention

本申请的目的在于提供一种视频传输处理方法与终端设备,以解决现有技术中存在的视频传输延迟较大的问题。The purpose of the present application is to provide a video transmission processing method and terminal equipment to solve the problem of relatively large video transmission delay in the prior art.

为了实现上述目的,本申请实施例采用的技术方案如下:In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

第一方面,本申请实施例提供了一种视频传输处理方法,应用于终端设备的调控模块,所述终端设备还包括视频解码器、缓存以及显示器,所述缓存分别与所述解码器、所述显示器连接,所述调控模块分别与所述解码器、所述显示器通信连接;所述方法包括:In the first aspect, the embodiment of the present application provides a video transmission processing method, which is applied to the control module of the terminal device, and the terminal device also includes a video decoder, a cache, and a display, and the cache is connected to the decoder, the The display is connected, and the control module is respectively connected to the decoder and the display in communication; the method includes:

获取初始化参数,其中,所述初始化参数包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,第n-1帧为已解码视频帧,第n帧为待解码视频帧,且n≥2;Obtain initialization parameters, wherein the initialization parameters include n-1th frame parameters, nth frame parameters, decoder parameters and display parameters; wherein, the n-1th frame is a decoded video frame, and the nth frame is a video to be decoded frame, and n≥2;

依据所述初始化参数确定第n帧的目标片段建议值,并依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧的时间点;其中,所述视频解码器按片段对待解码视频帧进行解码,且每帧待解码视频帧均划分为多个片段。Determine the suggested value of the target segment of the nth frame according to the initialization parameters, and generate a time point for controlling the display to read the video frame of the nth frame from the buffer according to the suggested value of the target segment; wherein, the video decoding The device decodes the video frames to be decoded by segments, and each video frame to be decoded is divided into multiple segments.

可选地,所述目标片段建议值满足公式:Optionally, the suggested value of the target segment satisfies the formula:

VSn=f(VBn-1,VSn-1,VSEn-1,VEn-1,DSn-1,DVn-1,DBn-1,Tn-1,Tn);VSn=f(VBn-1, VSn-1, VSEn-1, VEn-1, DSn-1, DVn-1, DBn-1, Tn-1, Tn);

其中,f()表示函数,VSn表示第n帧的目标片段建议值,VBn-1表示第n-1帧开始解码的时间点,VSn-1表示第n-1帧的目标片段建议值,VSEn-1表示第n-1帧的目标片段完成解码的时间点,VEn-1表示第n-1帧完成解码的时间点,DSn-1表示控制所述显示器从所述缓存中读取第n-1帧视频帧片段的时间点;DVn-1表示显示器实际开始从所述缓存中读取第n-1帧视频帧的时间点,DBn-1表示第n-1帧开始显示图像数据的时间点,Tn-1表示第n-1帧的实际解码时间,Tn表示第n帧的预测解码时间。Among them, f() represents a function, VSn represents the proposed value of the target segment of the nth frame, VBn-1 represents the time point when the decoding of the n-1th frame starts, VSn-1 represents the proposed value of the target segment of the n-1th frame, VSEn -1 indicates the time point when the decoding of the target segment of the n-1th frame is completed, VEn-1 indicates the time point when the decoding of the n-1th frame is completed, and DSn-1 indicates that the display is controlled to read the n-th from the buffer The time point of 1 video frame segment; DVn-1 indicates the time point when the display actually starts to read the n-1th video frame from the buffer, and DBn-1 indicates the time point when the n-1th frame begins to display image data , Tn-1 represents the actual decoding time of the n-1th frame, and Tn represents the predicted decoding time of the nth frame.

可选地,所述第n帧的预测解码时间满足公式:Optionally, the predicted decoding time of the nth frame satisfies the formula:

Tn=f(Cn-1,Cn,Tn-1,Pn-1,Pn,F)Tn=f(Cn-1, Cn, Tn-1, Pn-1, Pn, F)

其中,Tn表示第n帧的预测解码时间,Cn-1表示第n-1帧的压缩码流的大小,Cn表示第n帧压缩码流的大小,Pn-1表示第n-1帧的类型,Pn表示第n帧的类型,F表示视频解码器的类型。Among them, Tn represents the predicted decoding time of frame n, Cn-1 represents the size of the compressed code stream of frame n-1, Cn represents the size of the compressed code stream of frame n, and Pn-1 represents the type of frame n-1 , Pn represents the type of the nth frame, and F represents the type of video decoder.

可选地,依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点的步骤包括:Optionally, the step of generating a time point for controlling the display to read the nth video frame segment from the buffer according to the target segment suggestion value includes:

将所述目标片段建议值发送至所述视频解码器;sending the target segment suggestion value to the video decoder;

当接收到所述视频解码器发送的目标片段解码完成信号时,确定控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点。When the decoding completion signal of the target segment sent by the video decoder is received, the time point for controlling the display to read the nth video frame segment from the buffer is determined.

可选地,控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点满足公式:Optionally, the time point at which the display is controlled to read the nth video frame segment from the cache satisfies the formula:

DSn=f(VSn,DSn-1,DVn-1)DSn=f(VSn, DSn-1, DVn-1)

其中,DSn表示控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点,VSn表示接收到第n帧目标片段解码完成信号的时间点,DSn-1表示控制所述显示器从所述缓存中读取第n-1帧视频帧片段的时间点,DVn-1表示显示器实际开始从所述缓存中读取第n-1帧视频帧的时间点。Among them, DSn represents the time point for controlling the display to read the nth video frame segment from the buffer, VSn represents the time point for receiving the decoding completion signal of the nth frame target segment, and DSn-1 represents the time point for controlling the display to read from the cache The time point at which the n-1th video frame segment is read from the cache, and DVn-1 represents the time point at which the display actually starts to read the n-1th video frame from the cache.

可选地,在依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点的步骤之后,所述方法还包括:Optionally, after the step of generating a time point for controlling the display to read the nth video frame segment from the buffer according to the target segment suggestion value, the method further includes:

当接收到视频解码器发送的第n帧完成解码信号时,判断是否存在下一待解码视频帧;When receiving the nth frame sent by the video decoder to complete the decoding signal, it is judged whether there is a next video frame to be decoded;

如果是,则重复执行获取初始化参数并依据所述初始化参数确定第n帧的目标片段建议值的步骤,直至所有待解码视频帧解码完成。If so, repeat the steps of obtaining the initialization parameters and determining the suggested value of the target segment of the nth frame according to the initialization parameters until all video frames to be decoded are decoded.

可选地,在所述获取初始化参数的步骤之前,所述方法还包括:Optionally, before the step of obtaining initialization parameters, the method further includes:

判断当前待解码视频帧是否为第一帧;如果否,则执行获取初始化参数的步骤;如果是,则按预设值生成当前的目标片段建议值。Judging whether the current video frame to be decoded is the first frame; if not, performing the step of obtaining initialization parameters; if yes, generating the current suggested value of the target segment according to the preset value.

另一方面,本申请实施例还提供了一种终端设备,所述终端设备包括视频解码器、缓存、显示器以及调控模块,所述缓存分别与所述解码器、所述显示器连接,所述调控模块分别与所述解码器、所述显示器通信连接;其中,On the other hand, the embodiment of the present application also provides a terminal device, the terminal device includes a video decoder, a cache, a display, and a control module, the cache is respectively connected to the decoder and the display, and the control The modules are respectively connected in communication with the decoder and the display; wherein,

所述视频解码器用于对待解码视频帧按片段进行解码;The video decoder is used to decode the video frame to be decoded by segment;

所述调控模块用于获取初始化参数,依据所述初始化参数确定第n帧的目标片段建议值,并依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧的时间点;其中,所述初始化参数配置包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,n≥2;The control module is used to obtain initialization parameters, determine the suggested value of the target segment of the nth frame according to the initialization parameters, and generate and control the display to read the nth frame of video from the buffer according to the suggested value of the target segment. time point; wherein, the initialization parameter configuration includes the n-1th frame parameter, the nth frame parameter, the decoder parameter and the display parameter; wherein, n≥2;

所述显示器用于依据所述调控模块的时间点信号从所述缓存中开始读取第n帧视频帧。The display is used to start reading the nth video frame from the buffer according to the time point signal of the control module.

可选地,每个所述视频帧片段均包括16a行,其中,a≥1。Optionally, each of the video frame segments includes 16a rows, where a≥1.

可选地,所述调控模块包括计算单元、第一通信单元、第二通信单元以及控制单元,所述控制单元分别与所述计算单元、所述第一通信单元以及所述第二通信单元连接,所述第一通信单元用于连接视频解码器,所述第二通信单元用于连接显示器。Optionally, the regulating module includes a computing unit, a first communication unit, a second communication unit, and a control unit, and the control unit is connected to the computing unit, the first communication unit, and the second communication unit respectively , the first communication unit is used to connect to a video decoder, and the second communication unit is used to connect to a display.

相对于现有技术,本申请具有以下有益效果:Compared with the prior art, the present application has the following beneficial effects:

本申请提供了一种视频传输处理方法与终端设备,该视频传输处理方法应用于终端设备的调控模块,终端设备还包括视频解码器、缓存以及显示器,缓存分别与解码器、显示器连接,调控模块分别与解码器、显示器通信连接,首先获取初始化参数,其中,初始化参数包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,第n-1帧为已解码视频帧,第n帧为待解码视频帧,且n≥2;然后依据初始化参数确定第n帧的目标片段建议值,并依据目标片段建议值生成控制显示器从缓存中读取第n帧视频帧的时间点;其中,视频解码器按片段对待解码视频帧进行解码,且每帧待解码视频帧均划分为多个片段。一方面,由于本申请将待解码视频帧分为多个片段进行解码,因此其能够将延时从帧级别缩短至片段级别,有效缩短了视频传输延时。另一方面,通过增设调控模块,实时调控显示器从缓存中读取已解码视频帧的时间点,保证了视频帧读取时的连续性,避免出现超前读写或覆盖写入的情况,提升了视频显示的质量。The present application provides a video transmission processing method and a terminal device. The video transmission processing method is applied to the control module of the terminal device. The terminal device also includes a video decoder, a cache and a display. The cache is respectively connected to the decoder and the display. The control module Communicate with the decoder and the display respectively, and first obtain initialization parameters, wherein the initialization parameters include the n-1th frame parameter, the nth frame parameter, the decoder parameter and the display parameter; wherein, the n-1th frame is a decoded video frame , the nth frame is the video frame to be decoded, and n≥2; then determine the suggested value of the target segment of the nth frame according to the initialization parameters, and generate the time to control the display to read the nth video frame from the buffer according to the suggested value of the target segment point; wherein, the video decoder decodes the video frame to be decoded by segments, and each frame of the video frame to be decoded is divided into multiple segments. On the one hand, since the application divides the video frame to be decoded into multiple segments for decoding, it can shorten the delay from the frame level to the segment level, effectively shortening the video transmission delay. On the other hand, by adding a control module, the time point at which the display reads the decoded video frame from the cache is regulated in real time, which ensures the continuity of the video frame reading, avoids the situation of advanced reading and writing or overwriting, and improves the The quality of the video display.

为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned purpose, features and advantages of the present application more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.

附图说明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 accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.

图1为现有技术中提供的终端设备的模块示意图。Fig. 1 is a schematic block diagram of a terminal device provided in the prior art.

图2为本申请实施例提供的终端设备的模块示意图。FIG. 2 is a schematic diagram of modules of a terminal device provided in an embodiment of the present application.

图3本申请实施例提供的视频传输处理方法的示例性流程图。FIG. 3 is an exemplary flowchart of a video transmission processing method provided by an embodiment of the present application.

图4本申请实施例提供的终端设备的信号传输示意图。FIG. 4 is a schematic diagram of signal transmission of a terminal device provided by an embodiment of the present application.

110-调控模块;120-视频解码器;130-显示器;140缓存。110-control module; 120-video decoder; 130-display; 140 cache.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. The components of the embodiments of the application generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations.

因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。Accordingly, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second" and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

在本申请的描述中,需要说明的是,术语“上”、“下”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,或者是该申请产品使用时惯常摆放的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。In the description of the present application, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer" etc. is based on the orientation or positional relationship shown in the drawings, or the The usual orientation or positional relationship of the application product when used is only for the convenience of describing the application and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, therefore It should not be construed as a limitation of the application.

在本申请的描述中,还需要说明的是,除非另有明确的规定和限定,术语“设置”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。In the description of this application, it should also be noted that, unless otherwise clearly stipulated and limited, the terms "setting" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection, or Integral connection; it can be mechanical connection or electrical connection; it can be direct connection or indirect connection through an intermediary, and it can be the internal communication of two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in this application in specific situations.

下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some implementations of the present application will be described in detail below in conjunction with the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.

正如背景技术中所述,现有技术中在进行视频传输时,图像从解码器传输到显示器通常需要等到解码完整帧并写到缓存后才通过上层软件通知显示端,因此,从视频解码到显示会出现至少一帧的延迟。As mentioned in the background technology, when video transmission is performed in the prior art, the image is transmitted from the decoder to the display, and it usually needs to wait until the complete frame is decoded and written to the buffer before notifying the display terminal through the upper layer software. Therefore, from video decoding to display There will be a delay of at least one frame.

例如,请参阅图1,在图像传输过程中,当终端设备接收到视频信号后,需要先经过视频解码处理器将视频数据进行解码,其中,视频数据包括未解码图像帧1、未解码图像帧2、未解码图像帧3…,当视频解码处理器解码后,需要将解码后的图像帧写到缓存,然后由显示器从缓存中依次读取已解码的图像帧1、图像帧2、图像帧3…。For example, please refer to Figure 1. During the image transmission process, when the terminal device receives the video signal, it needs to decode the video data through the video decoding processor first, wherein the video data includes undecoded image frame 1, undecoded image frame 2. Undecoded image frame 3... When the video decoding processor decodes, it needs to write the decoded image frame to the cache, and then the display reads the decoded image frame 1, image frame 2, and image frame sequentially from the cache 3….

在此基础上,现有技术中,对于图像帧的读写方式一般以帧为单位,即当视频解码处理器解码图像帧1时,此时显示器无法从缓存中读取数据,当视频解码处理器已经解码图像帧1后,将解码后的图像帧1写入缓存,同时开始继续解码图像帧2,此时,显示器才从缓存中读取图像帧1进行显示;而当视频解码处理器已经解码图像帧2后,将解码后的图像帧2写入缓存,同时开始继续解码图像帧3,此时,显示器才从缓存中读取图像帧2进行显示,以此类推。On this basis, in the prior art, the way of reading and writing image frames is generally in units of frames, that is, when the video decoding processor decodes image frame 1, the display cannot read data from the cache at this time, and when the video decoding process After the device has decoded image frame 1, it writes the decoded image frame 1 into the cache, and starts to continue decoding image frame 2 at the same time. At this time, the display reads image frame 1 from the cache for display; and when the video decoding processor has already After the image frame 2 is decoded, the decoded image frame 2 is written into the cache, and at the same time, the image frame 3 continues to be decoded. At this time, the display reads the image frame 2 from the cache for display, and so on.

可见,现有技术中的视频帧读写方式,至少存在一帧的延时,加之数据读写本身还存在一定延时、数据传输也存在一定延时,因此实际应用中,在视频帧读写过程中,其延时会大于一帧,导致延迟较大。It can be seen that there is at least one frame delay in the video frame reading and writing method in the prior art, and there is also a certain delay in data reading and writing itself, and a certain delay in data transmission. Therefore, in practical applications, when reading and writing video frames In the process, the delay will be greater than one frame, resulting in a large delay.

目前,也有一些针对图像解码和显示同步进行的方案,但是在同步机制方面只是根据读写指针的地址进行检查和控制,对通知显示的时间点没有进行精确的计算,在不同的视频场景下容易出现超前读写或者覆盖写入的情况,也没有最大可能的缩短通知显示的延迟。At present, there are also some schemes for image decoding and display synchronization, but in terms of synchronization mechanism, it is only checked and controlled according to the address of the read and write pointer, and the time point of notification display is not accurately calculated, which is easy in different video scenarios. In the case of advanced reading and writing or overwriting, there is no maximum possible delay in shortening the notification display.

有鉴于此,本申请实施例提供了一种视频传输处理方法,通过将每个视频帧均划分为多个片段,并同时设置调控模块控制显示器从缓存中读取视频帧片段的时间点的方式,缩短视频读写的延时,且不会出现超前读写或覆盖写入的情况。In view of this, the embodiment of the present application provides a video transmission processing method, by dividing each video frame into multiple segments, and setting the control module to control the time point at which the display reads the video frame segments from the cache , to shorten the delay of video reading and writing, and there will be no situation of advanced reading and writing or overwriting.

需要说明的是,该视频传输处理方法可以应用于终端设备的调控模块,请参阅图2,终端设备还包括视频解码器、缓存以及显示器,缓存分别与解码器、显示器连接,调控模块分别与解码器、显示器通信连接。其中,视频帧可以拆分成多个片段,视频解码器可以对视频帧按照片段进行解析,进而可以将视频传输处理过程中的读写延时从帧级别降低为片段级别。It should be noted that this video transmission processing method can be applied to the control module of the terminal device, please refer to Figure 2, the terminal device also includes a video decoder, a cache and a display, the cache is connected to the decoder and the display respectively, and the control module is connected to the decoding device, display communication connection. Among them, the video frame can be split into multiple fragments, and the video decoder can analyze the video frame according to the fragments, and then can reduce the read and write delay in the video transmission process from the frame level to the fragment level.

如图2中,将待解码图像帧n拆分为5个片段,分别为片段0、片段1、片段2、片段3以及片段4,当视频解码器将片段0解码后,将片段0存入缓存,同时继续解码片段1,显示器可以从缓存中读取已解码的数据进行显示。As shown in Figure 2, the image frame n to be decoded is split into 5 segments, which are segment 0, segment 1, segment 2, segment 3, and segment 4. After the video decoder decodes segment 0, segment 0 is stored in cache, while continuing to decode segment 1, the display can read the decoded data from the cache for display.

理论上,若视频解码器解码片段1时,显示器从缓存中读取片段0开始显示,则其延时仅为1个片段,当待解码图像帧n拆分为5个片段时,其延时可以缩短80%,大幅缩短了读写过程的延时。同时,视频解码器和显示器共用一个缓存,进而可以减少不必要的数据拷贝和延迟。Theoretically, if the video decoder decodes segment 1, and the monitor reads segment 0 from the cache and starts to display, the delay is only 1 segment. When the image frame n to be decoded is split into 5 segments, the delay It can be shortened by 80%, greatly shortening the delay of the reading and writing process. At the same time, the video decoder and display share a buffer, thereby reducing unnecessary data copying and delay.

作为一种实现方式,每个片段的行数需要与解码块的行数对齐,其行数可以为16a行,a≥1,例如,在将一帧图像拆分为多个片段时,每个片段可以为16行,也可以为32行,或者64行等,在此不做限定。可以理解地,每个片段的行数越小,其读写过程中延时可以达到更低。因此,本申请提供的每个片段的行数设置为16。在此基础上,当每个片段的行数设置后,每帧视频帧拆分的片段也固定,例如,每帧视频帧拆分的片段固定为400个。As an implementation, the number of lines of each segment needs to be aligned with the number of lines of the decoding block, and its number of lines can be 16a lines, a≥1. For example, when splitting a frame of image into multiple segments, each The segment can be 16 lines, 32 lines, or 64 lines, etc., which is not limited here. It can be understood that the smaller the number of rows in each segment, the lower the latency in the read and write process. Therefore, the number of rows of each fragment provided in this application is set to 16. On this basis, when the number of rows of each segment is set, the segments divided into each video frame are also fixed, for example, the number of segments divided into each video frame is fixed at 400.

虽然每帧拆分的片段数量相同,但是,由于每帧类型的差异,每帧视频帧的压缩码流大小也并不相同,因此,每个片段需要解析的时长也并不相同,例如,对于I帧中每个片段解析所需时长需要大于P帧中每个片段的时长。Although the number of fragments divided into each frame is the same, due to the difference in the type of each frame, the size of the compressed code stream of each video frame is also different. Therefore, the time required to parse each fragment is also different. For example, for The time required for parsing each segment in the I frame needs to be longer than the time length of each segment in the P frame.

在此基础上,若按照固定的延时控制显示器从缓存中读取已经解析的片段进行显示,显然并不能满足实际需求。例如,按照延时一个片段的方式控制显示器从缓存中读取数据,由于延时较短,因此若在某一帧中的解析中,某一片段的解析时长较长,则会导致其写入至缓存中时间点滞后,此过程中显示器无法从缓存中读取视频帧片段进行显示,导致显示过程不连续,容易出现花屏等情况。例如,片段A、片段B与片段C连续,设置的延时为1个片段,当解析片段A时,耗时1ms,当解析片段2时,耗时也是1ms,然而,片段C的数据量较大,解析耗时较长,其需要耗时3ms,因此,当显示器从缓存中读取数据时,第1ms时读取的片段A并进行显示,第2ms时读取的片段B并进行显示,而第3ms时,由于此时视频解码器正在对片段C进行解析,因此导致了显示器读取数据的中断,最终可能出现花屏的情况。On this basis, if the monitor is controlled to read the parsed fragments from the cache for display according to a fixed delay, it obviously cannot meet the actual demand. For example, control the display to read data from the cache by delaying a segment. Since the delay is short, if the resolution of a segment in a certain frame takes a long time, it will cause its write The time point in the cache is lagging behind. During this process, the display cannot read video frame fragments from the cache for display, resulting in discontinuous display process and prone to blurred screens. For example, Fragment A, Fragment B, and Fragment C are continuous, and the delay is set to 1 fragment. When parsing Fragment A, it takes 1ms, and when parsing Fragment 2, it also takes 1ms. However, the data volume of Fragment C is relatively large. It takes a long time to parse, and it takes 3ms. Therefore, when the display reads data from the cache, read fragment A at the 1st millisecond and display it, and read fragment B at the 2nd millisecond and display it. At the 3rd millisecond, because the video decoder is analyzing the segment C at this time, the reading data of the display is interrupted, and a blurred screen may eventually appear.

若延时设置得过长,虽然能够保证显示器从缓存中连续读取已解析的视频帧片段,但可能其延时也已经接近帧级别,对于延时的缩短已无明显效果,且还容易出现覆盖写入的情况。If the delay is set too long, although it can ensure that the monitor can continuously read the parsed video frame fragments from the cache, the delay may be close to the frame level, which has no obvious effect on shortening the delay, and it is easy to appear The case of overwriting.

因此,本申请通过设置调控模块,并利用调控模块控制显示器从缓存中读取已解码视频帧片段的时间点的方式,保证在不出现超前读写或者覆盖写入的情况下,尽可能地提前通知显示,以此达到缩短延迟的目的。Therefore, the present application sets up a control module, and uses the control module to control the display to read the time point of the decoded video frame segment from the cache, so as to ensure that there is no advance reading or writing or overwriting, as far in advance as possible Notifications are displayed to reduce latency.

下面对本申请提供的视频处理方法进行示例性说明:The following is an exemplary description of the video processing method provided by this application:

作为一种可选的实现方式,请参阅图3,该视频处理方法包括:As an optional implementation, please refer to Figure 3, the video processing method includes:

S102,获取初始化参数,其中,初始化参数包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,第n-1帧为已解码视频帧,第n帧为待解码视频帧,且n≥2;S102. Obtain initialization parameters, where the initialization parameters include n-1th frame parameters, nth frame parameters, decoder parameters, and display parameters; where n-1th frame is a decoded video frame, and nth frame is a video to be decoded frame, and n≥2;

S104,依据初始化参数确定第n帧的目标片段建议值,并依据目标片段建议值生成控制显示器从缓存中读取第n帧视频帧的时间点;其中,视频解码器按片段对待解码视频帧进行解码,且每帧待解码视频帧均划分为多个片段。S104, determine the suggested value of the target segment of the nth frame according to the initialization parameter, and generate a time point for controlling the display to read the video frame of the nth frame from the cache according to the suggested value of the target segment; wherein, the video decoder performs decoding on the video frame by segment Decoding, and each video frame to be decoded is divided into multiple segments.

即本申请中,实际为通过调控模块获取相关初始化参数,然后根据初始化参数估算当前帧解码所需时长,并据此确定显示器从缓存中读取视频帧片段的时间点,以此尽可能的缩短延时。例如,当视频解码器解码第n-1帧时,需要花费3ms,则在视频解码器解码至第10个片段时,调控模块控制显示器从缓存中开始读取已解码的视频片段并显示;当视频解码器解码第n帧时,需要花费9ms,则在视频解码器解码至第30个片段时,调控模块控制显示器从缓存中开始读取已解码的视频片段并显示。通过实时调控显示器从缓存中开始读取数据的时间点,保证在不出现超前读写或者覆盖写入的情况下,尽可能地提前通知显示,进而缩短视频传输延时。That is to say, in this application, the relevant initialization parameters are actually obtained through the control module, and then the time required for decoding the current frame is estimated according to the initialization parameters, and the time point at which the display reads the video frame fragment from the cache is determined accordingly, so as to shorten as much as possible delay. For example, when the video decoder decodes the n-1th frame, it takes 3ms, then when the video decoder decodes to the 10th segment, the control module controls the display to read and display the decoded video segment from the cache; when It takes 9ms for the video decoder to decode the nth frame, and when the video decoder decodes to the 30th segment, the control module controls the display to read the decoded video segment from the cache and display it. By adjusting the time point when the display starts to read data from the cache in real time, it is ensured that the display is notified in advance as much as possible without advanced reading or writing or overwriting, thereby shortening the video transmission delay.

需要说明的是,一方面,由于调控模块分别与视频解码器与缓存器直接通信连接,因此可以直接进行数据传输,减少了数据同步过程中可能出现的延时,有利于进一步缩短视频传输处理的延时。另一方面,本申请提供的调控模块,可以为软件调控模块,也可以为硬件调控模块,在此不做限定。It should be noted that, on the one hand, since the control module is directly connected to the video decoder and the buffer, data transmission can be performed directly, which reduces the possible delay in the data synchronization process, and is conducive to further shortening the processing time of video transmission. delay. On the other hand, the control module provided in the present application may be a software control module or a hardware control module, which is not limited here.

在一种可选的实现方式中,目标片段建议值满足公式:In an optional implementation, the target fragment suggestion value satisfies the formula:

VSn=f(VBn-1,VSn-1,VSEn-1,VEn-1,DSn-1,DVn-1,DBn-1,Tn-1,Tn);VSn=f(VBn-1, VSn-1, VSEn-1, VEn-1, DSn-1, DVn-1, DBn-1, Tn-1, Tn);

其中,f()表示函数,VSn表示第n帧的目标片段建议值,VBn-1表示第n-1帧开始解码的时间点,VSn-1表示第n-1帧的目标片段建议值,VSEn-1表示第n-1帧的目标片段完成解码的时间点,VEn-1表示第n-1帧完成解码的时间点,DSn-1表示控制显示器从缓存中读取第n-1帧视频帧片段的时间点;DVn-1表示显示器实际开始从缓存中读取第n-1帧视频帧的时间点,DBn-1表示第n-1帧开始显示图像数据的时间点,Tn-1表示第n-1帧的实际解码时间,Tn表示第n帧的预测解码时间。Among them, f() represents a function, VSn represents the proposed value of the target segment of the nth frame, VBn-1 represents the time point when the decoding of the n-1th frame starts, VSn-1 represents the proposed value of the target segment of the n-1th frame, VSEn -1 indicates the time point when the target fragment of the n-1th frame is decoded, VEn-1 indicates the time point when the n-1th frame is decoded, and DSn-1 indicates that the display is controlled to read the n-1th frame video frame from the cache The time point of the segment; DVn-1 indicates the time point when the display actually starts to read the n-1th frame of video frame from the cache, DBn-1 indicates the time point when the n-1th frame starts to display image data, and Tn-1 indicates the time point of the n-1th frame The actual decoding time of n-1 frame, Tn represents the predicted decoding time of the nth frame.

即本申请所述的目标片段建议值VSn分别与VBn-1,VSn-1,VSEn-1,VEn-1,DSn-1,DVn-1,DBn-1,Tn-1,Tn关联。在此基础上,当视频解码器需要解码视频帧时,会先将视频帧的相关信息发送至调控模块,以使调控模块参照上一帧的工作情况,结合当前帧的实际出参数,预估在当前帧处理时,显示器开始从缓存中读取数据的时间点。That is, the target segment suggestion value VSn described in this application is associated with VBn-1, VSn-1, VSEn-1, VEn-1, DSn-1, DVn-1, DBn-1, Tn-1, Tn respectively. On this basis, when the video decoder needs to decode the video frame, it will first send the relevant information of the video frame to the control module, so that the control module can refer to the working conditions of the previous frame and combine the actual output parameters of the current frame to estimate The point at which the display starts reading data from the buffer while the current frame is being processed.

具体地,当视频解码器开始解码时,会向调控模块发送开始解码信号VBn,调控模块以接收到开始解码信号的时间点作为第n帧开始解码的时间点。同时,当第n帧解码完成后,会向调控模块发送完成解码信号,同理地,调控模块以接收到完成解码的时间点作为第n帧完成解码的时间点。Specifically, when the video decoder starts decoding, it sends a decoding start signal VBn to the control module, and the control module takes the time point when it receives the decoding start signal as the time point when the nth frame starts decoding. At the same time, when the decoding of the nth frame is completed, a decoding completion signal will be sent to the control module, and similarly, the control module will use the time point when the decoding is completed as the time point when the decoding of the nth frame is completed.

并且,第n帧的预测解码时间满足公式:And, the predicted decoding time of the nth frame satisfies the formula:

Tn=f(Cn-1,Cn,Tn-1,Pn-1,Pn,F)Tn=f(Cn-1, Cn, Tn-1, Pn-1, Pn, F)

其中,Tn表示第n帧的预测解码时间,Cn-1表示第n-1帧的压缩码流的大小,Cn表示第n帧压缩码流的大小,Pn-1表示第n-1帧的类型,Pn表示第n帧的类型,F表示视频解码器的类型。Among them, Tn represents the predicted decoding time of frame n, Cn-1 represents the size of the compressed code stream of frame n-1, Cn represents the size of the compressed code stream of frame n, and Pn-1 represents the type of frame n-1 , Pn represents the type of the nth frame, and F represents the type of video decoder.

即预测解码时间与压缩码流的大小、视频帧类型以及解码器类型关联。其中,视频帧类型包括I帧、B帧以及P帧(以H264为例),一般而言,I帧、B帧以及P帧的压缩码流大小不同,因此其解码所需时间不同,一般地,解码所需时间的关系为I帧>B帧>P帧。解码器的类型包括H264、HEVC、AV1等,针对不同类型,上述公式的函数关系可能不同。That is, the predicted decoding time is associated with the size of the compressed code stream, the video frame type, and the decoder type. Among them, the video frame types include I frame, B frame and P frame (take H264 as an example). Generally speaking, the compressed code stream sizes of I frame, B frame and P frame are different, so the time required for decoding is different. , the relationship of time required for decoding is I frame>B frame>P frame. The types of decoders include H264, HEVC, AV1, etc. For different types, the functional relationship of the above formula may be different.

例如,在某一解码器工作时,P帧的压缩码流大小为20K,解码需要2ms,I帧的压缩码流大小为30K,解码需要3ms。For example, when a certain decoder is working, the compressed code stream size of P frame is 20K, and decoding takes 2ms; the compressed code stream size of I frame is 30K, and decoding needs 3ms.

并且,作为一种实现方式,依据目标片段建议值生成控制显示器从缓存中读取第n帧视频帧片段的时间点的步骤包括:And, as an implementation, the step of generating the time point for controlling the display to read the nth video frame segment from the cache according to the target segment suggestion value includes:

S1041,将目标片段建议值发送至视频解码器。S1041. Send the suggested value of the target segment to the video decoder.

S142,当接收到视频解码器发送的目标片段解码完成信号时,确定控制显示器从缓存中读取第n帧视频帧片段的时间点。S142, when receiving the decoding completion signal of the target segment sent by the video decoder, determine the time point for controlling the display to read the nth video frame segment from the cache.

其中,调控模块在获取初始化参数后,会生成目标片段建议值VSn,并将目标片段建议值VSn发送至视频解码器,在视频解码器解码时,当解码至该目标片段时,则向调控模块发送目标片段完成解码信号VSEn,调控模块将接收到目标片段完成解码信号VSEn的时间点作为第n帧的目标片段完成解码的时间点,并向显示器发送控制信号DSn,以控制显示器从缓存中读取数据。Wherein, after the control module obtains the initialization parameters, it will generate the suggested value VSn of the target segment, and send the suggested value VSn of the target segment to the video decoder. Send the target segment to complete the decoding signal VSEn, the control module will receive the time point of the target segment to complete the decoding signal VSEn as the time point when the target segment of the nth frame completes decoding, and send a control signal DSn to the display to control the display to read from the buffer. fetch data.

可选地,控制显示器从缓存中读取第n帧视频帧片段的时间点满足公式:Optionally, the time point at which the control display reads the nth video frame segment from the cache satisfies the formula:

DSn=f(VSn,DSn-1,DVn-1)DSn=f(VSn, DSn-1, DVn-1)

其中,DSn表示控制显示器从缓存中读取第n帧视频帧片段的时间点,即显示切换时间点,VSn表示接收到第n帧目标片段解码完成信号的时间点,DSn-1表示控制显示器从缓存中读取第n-1帧视频帧片段的时间点,DVn-1表示显示器实际开始从缓存中读取第n-1帧视频帧的时间点。Among them, DSn indicates the time point when the control display reads the nth video frame segment from the buffer, that is, the display switching time point, VSn indicates the time point when the decoding completion signal of the nth frame target segment is received, and DSn-1 indicates that the control display device starts from The time point at which the n-1th video frame segment is read from the cache, and DVn-1 indicates the time point at which the display actually starts to read the n-1th video frame from the cache.

其中,显示器在接收到控制信号DSn后,会在下一个VSYNC时从缓存中读取第n帧视频帧片段,可以理解地,由于显示第n-1帧需要一定时间,因此,虽然DSn表示的时间点与DVn表示的时间点相近但仍有一定的时间间隔,例如,DVn表示的时间点比DSn表示的时间点延后了零点几毫秒。在显示器的边框处,仍有一定黑框,因此,开始显示图像数据的时间点会晚于DVn表示的时间点,即DBn表示的时间点会晚于DVn表示的时间点。Among them, after receiving the control signal DSn, the display will read the nth video frame segment from the cache at the next VSYNC. Understandably, since it takes a certain amount of time to display the n-1th frame, although the time indicated by DSn The time point represented by DVn is close to the time point represented by DVn but there is still a certain time interval. For example, the time point represented by DVn is delayed by a few tenths of milliseconds from the time point represented by DSn. There is still a certain black frame at the border of the display, therefore, the time point at which the image data starts to be displayed will be later than the time point represented by DVn, that is, the time point represented by DBn will be later than the time point represented by DVn.

作为一种实现方式,在104之后,该方法还包括:As an implementation, after step 104, the method also includes:

S106,当接收到视频解码器发送的第n帧完成解码信号时,判断是否存在下一待解码视频帧;S106, when receiving the decoding signal of the nth frame sent by the video decoder, judging whether there is a next video frame to be decoded;

如果是,则重复执行获取初始化参数并依据初始化参数确定第n帧的目标片段建议值的步骤,直至所有待解码视频帧解码完成。If so, repeat the steps of obtaining the initialization parameters and determining the suggested value of the target segment of the nth frame according to the initialization parameters until all video frames to be decoded are decoded.

作为一种实现方式,在获取初始化参数的步骤之前,方法还包括:As an implementation, before the step of obtaining initialization parameters, the method further includes:

S101-1,判断当前待解码视频帧是否为第一帧;如果否,则执行获取初始化参数的步骤;如果是,执行S101-2。S101-1. Determine whether the current video frame to be decoded is the first frame; if not, execute the step of acquiring initialization parameters; if yes, execute S101-2.

S101-2,按预设值生成当前的目标片段建议值。S101-2. Generate the current suggested value of the target segment according to a preset value.

基于上述实现方式,本申请实施例还提供了一种终端设备,该终端设备包括视频解码器、缓存、显示器以及调控模块,缓存分别与解码器、显示器连接,调控模块分别与解码器、显示器通信连接;其中,视频解码器用于对待解码视频帧按片段进行解码;调控模块用于获取初始化参数,依据初始化参数确定第n帧的目标片段建议值,并依据目标片段建议值生成控制显示器从缓存中读取第n帧视频帧的时间点;其中,初始化参数配置包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,n≥2;显示器用于依据调控模块的时间点信号从缓存中开始读取第n帧视频帧。Based on the above implementation, the embodiment of the present application also provides a terminal device, the terminal device includes a video decoder, a cache, a display and a control module, the cache is connected to the decoder and the display respectively, and the control module communicates with the decoder and the display respectively Connection; wherein, the video decoder is used to decode the video frame to be decoded by segment; the control module is used to obtain the initialization parameters, determine the suggested value of the target segment of the nth frame according to the initialization parameter, and generate the control display from the buffer according to the suggested value of the target segment Read the time point of the nth video frame; wherein, the initialization parameter configuration includes the n-1th frame parameter, the nth frame parameter, the decoder parameter and the display parameter; wherein, n≥2; the display is used to control the time of the module The dot signal starts reading the nth video frame from the buffer.

可选地,每个视频帧片段均包括16a行,其中,a≥1。Optionally, each video frame segment includes 16a rows, where a≥1.

并且,调控模块包括计算单元、第一通信单元、第二通信单元以及控制单元,控制单元分别与计算单元、第一通信单元以及第二通信单元连接,第一通信单元用于连接视频解码器,第二通信单元用于连接显示器。And, the control module includes a calculation unit, a first communication unit, a second communication unit and a control unit, the control unit is respectively connected to the calculation unit, the first communication unit and the second communication unit, the first communication unit is used to connect the video decoder, The second communication unit is used to connect the display.

综上,本申请提供了一种视频传输处理方法与终端设备,该视频传输处理方法应用于终端设备的调控模块,终端设备还包括视频解码器、缓存以及显示器,缓存分别与解码器、显示器连接,调控模块分别与解码器、显示器通信连接,首先获取初始化参数,其中,初始化参数包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,第n-1帧为已解码视频帧,第n帧为待解码视频帧,且n≥2;然后依据初始化参数确定第n帧的目标片段建议值,并依据目标片段建议值生成控制显示器从缓存中读取第n帧视频帧片段的时间点;其中,视频解码器按片段对待解码视频帧进行解码,且每帧待解码视频帧均划分为多个片段。一方面,由于本申请将待解码视频帧分为多个片段进行解码,因此其能够将延时从帧级别缩短至片段级别,有效缩短了视频传输延时。另一方面,通过增设调控模块,实时调控显示器从缓存中读取已解码视频帧的时间点,保证了视频帧读取时的连续性,避免出现超前读写或覆盖写入的情况,提升了视频显示的质量。To sum up, the present application provides a video transmission processing method and a terminal device. The video transmission processing method is applied to the control module of the terminal device. The terminal device also includes a video decoder, a cache and a display, and the cache is connected to the decoder and the display respectively. , the control module communicates with the decoder and the display respectively, and first obtains the initialization parameters, wherein the initialization parameters include the n-1th frame parameters, the nth frame parameters, the decoder parameters and the display parameters; wherein, the n-1th frame is Decode the video frame, the nth frame is the video frame to be decoded, and n≥2; then determine the suggested value of the target segment of the nth frame according to the initialization parameters, and generate and control the monitor to read the nth frame of video from the cache according to the suggested value of the target segment The time point of the frame segment; wherein, the video decoder decodes the video frame to be decoded by segment, and each frame of the video frame to be decoded is divided into multiple segments. On the one hand, since the application divides the video frame to be decoded into multiple segments for decoding, it can shorten the delay from the frame level to the segment level, effectively shortening the video transmission delay. On the other hand, by adding a control module, the time point at which the display reads the decoded video frame from the cache is regulated in real time, which ensures the continuity of the video frame reading, avoids the situation of advanced reading and writing or overwriting, and improves the The quality of the video display.

以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, there may be various modifications and changes in the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the protection scope of this application.

对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其它的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be regarded as exemplary and not restrictive in all points of view, and the scope of the application is defined by the appended claims rather than the foregoing description, and it is intended that the scope of the present application be defined by the appended claims rather than by the foregoing description. All changes within the meaning and range of equivalents of the elements are embraced in this application. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1.一种视频传输处理方法,其特征在于,应用于终端设备的调控模块,所述终端设备还包括视频解码器、缓存以及显示器,所述缓存分别与所述解码器、所述显示器连接,所述调控模块分别与所述解码器、所述显示器通信连接;所述方法包括:1. A video transmission processing method, characterized in that, it is applied to a control module of a terminal device, and the terminal device also includes a video decoder, a buffer and a display, and the buffer is connected to the decoder and the display respectively, The control module is respectively connected to the decoder and the display in communication; the method includes: 获取初始化参数,其中,所述初始化参数包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,第n-1帧为已解码视频帧,第n帧为待解码视频帧,且n≥2;Obtain initialization parameters, wherein the initialization parameters include n-1th frame parameters, nth frame parameters, decoder parameters and display parameters; wherein, the n-1th frame is a decoded video frame, and the nth frame is a video to be decoded frame, and n≥2; 依据所述初始化参数确定第n帧的目标片段建议值,并依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧的时间点;其中,所述视频解码器按片段对待解码视频帧进行解码,且每帧待解码视频帧均划分为多个片段。Determine the suggested value of the target segment of the nth frame according to the initialization parameters, and generate a time point for controlling the display to read the video frame of the nth frame from the buffer according to the suggested value of the target segment; wherein, the video decoding The device decodes the video frames to be decoded by segments, and each video frame to be decoded is divided into multiple segments. 2.如权利要求1所述的视频传输处理方法,其特征在于,所述目标片段建议值满足公式:2. The video transmission processing method according to claim 1, wherein the suggested value of the target segment satisfies the formula: VSn=f(VBn-1,VSn-1,VSEn-1,VEn-1,DSn-1,DVn-1,DBn-1,Tn-1,Tn);VSn=f(VBn-1, VSn-1, VSEn-1, VEn-1, DSn-1, DVn-1, DBn-1, Tn-1, Tn); 其中,f()表示函数,VSn表示第n帧的目标片段建议值,VBn-1表示第n-1帧开始解码的时间点,VSn-1表示第n-1帧的目标片段建议值,VSEn-1表示第n-1帧的目标片段完成解码的时间点,VEn-1表示第n-1帧完成解码的时间点,DSn-1表示控制所述显示器从所述缓存中读取第n-1帧视频帧片段的时间点;DVn-1表示显示器实际开始从所述缓存中读取第n-1帧视频帧的时间点,DBn-1表示第n-1帧开始显示图像数据的时间点,Tn-1表示第n-1帧的实际解码时间,Tn表示第n帧的预测解码时间。Among them, f() represents a function, VSn represents the proposed value of the target segment of the nth frame, VBn-1 represents the time point when the decoding of the n-1th frame starts, VSn-1 represents the proposed value of the target segment of the n-1th frame, VSEn -1 indicates the time point when the decoding of the target segment of the n-1th frame is completed, VEn-1 indicates the time point when the decoding of the n-1th frame is completed, and DSn-1 indicates that the display is controlled to read the n-th from the buffer The time point of 1 video frame segment; DVn-1 indicates the time point when the display actually starts to read the n-1th video frame from the buffer, and DBn-1 indicates the time point when the n-1th frame begins to display image data , Tn-1 represents the actual decoding time of the n-1th frame, and Tn represents the predicted decoding time of the nth frame. 3.如权利要求2所述的视频传输处理方法,其特征在于,所述第n帧的预测解码时间满足公式:3. The video transmission processing method according to claim 2, wherein the predicted decoding time of the nth frame satisfies the formula: Tn=f(Cn-1,Cn,Tn-1,Pn-1,Pn,F)Tn=f(Cn-1, Cn, Tn-1, Pn-1, Pn, F) 其中,Tn表示第n帧的预测解码时间,Cn-1表示第n-1帧的压缩码流的大小,Cn表示第n帧压缩码流的大小,Pn-1表示第n-1帧的类型,Pn表示第n帧的类型,F表示视频解码器的类型。Among them, Tn represents the predicted decoding time of frame n, Cn-1 represents the size of the compressed code stream of frame n-1, Cn represents the size of the compressed code stream of frame n, and Pn-1 represents the type of frame n-1 , Pn represents the type of the nth frame, and F represents the type of video decoder. 4.如权利要求1所述的视频传输处理方法,其特征在于,依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点的步骤包括:4. The video transmission processing method according to claim 1, wherein the step of generating and controlling the display to read the nth frame video frame segment from the cache according to the target segment suggestion value comprises: 将所述目标片段建议值发送至所述视频解码器;sending the target segment suggestion value to the video decoder; 当接收到所述视频解码器发送的目标片段解码完成信号时,确定控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点。When the decoding completion signal of the target segment sent by the video decoder is received, the time point for controlling the display to read the nth video frame segment from the buffer is determined. 5.如权利要求4所述的视频传输处理方法,其特征在于,控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点满足公式:5. The video transmission processing method as claimed in claim 4, characterized in that, the time point for controlling the display to read the nth frame video frame segment from the cache satisfies the formula: DSn=f(VSn,DSn-1,DVn-1)DSn=f(VSn, DSn-1, DVn-1) 其中,DSn表示控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点,VSn表示接收到第n帧目标片段解码完成信号的时间点,DSn-1表示控制所述显示器从所述缓存中读取第n-1帧视频帧片段的时间点,DVn-1表示显示器实际开始从所述缓存中读取第n-1帧视频帧的时间点。Among them, DSn represents the time point for controlling the display to read the nth video frame segment from the buffer, VSn represents the time point for receiving the decoding completion signal of the nth frame target segment, and DSn-1 represents the time point for controlling the display to read from the cache The time point at which the n-1th video frame segment is read from the cache, and DVn-1 represents the time point at which the display actually starts to read the n-1th video frame from the cache. 6.如权利要求1所述的视频传输处理方法,其特征在于,在依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧片段的时间点的步骤之后,所述方法还包括:6. The video transmission processing method according to claim 1, characterized in that, after the step of generating and controlling the display to read the nth video frame segment from the buffer according to the target segment suggestion value , the method also includes: 当接收到视频解码器发送的第n帧完成解码信号时,判断是否存在下一待解码视频帧;When receiving the nth frame sent by the video decoder to complete the decoding signal, it is judged whether there is a next video frame to be decoded; 如果是,则重复执行获取初始化参数并依据所述初始化参数确定第n帧的目标片段建议值的步骤,直至所有待解码视频帧解码完成。If so, repeat the steps of obtaining the initialization parameters and determining the suggested value of the target segment of the nth frame according to the initialization parameters until all video frames to be decoded are decoded. 7.如权利要求1所述的视频传输处理方法,其特征在于,在所述获取初始化参数的步骤之前,所述方法还包括:7. The video transmission processing method according to claim 1, wherein, before the step of obtaining initialization parameters, the method further comprises: 判断当前待解码视频帧是否为第一帧;如果否,则执行获取初始化参数的步骤;如果是,则按预设值生成当前的目标片段建议值。Judging whether the current video frame to be decoded is the first frame; if not, performing the step of obtaining initialization parameters; if yes, generating the current suggested value of the target segment according to the preset value. 8.一种终端设备,其特征在于,所述终端设备包括视频解码器、缓存、显示器以及调控模块,所述缓存分别与所述解码器、所述显示器连接,所述调控模块分别与所述解码器、所述显示器通信连接;其中,8. A terminal device, characterized in that the terminal device comprises a video decoder, a cache, a display and a control module, the cache is connected to the decoder and the display respectively, and the control module is connected to the control module respectively The decoder and the display are connected in communication; wherein, 所述视频解码器用于对待解码视频帧按片段进行解码;The video decoder is used to decode the video frame to be decoded by segment; 所述调控模块用于获取初始化参数,依据所述初始化参数确定第n帧的目标片段建议值,并依据所述目标片段建议值生成控制所述显示器从所述缓存中读取第n帧视频帧的时间点;其中,所述初始化参数配置包括第n-1帧参数、第n帧参数、解码器参数以及显示器参数;其中,n≥2;The control module is used to obtain initialization parameters, determine the suggested value of the target segment of the nth frame according to the initialization parameters, and generate and control the display to read the nth frame of video from the buffer according to the suggested value of the target segment. time point; wherein, the initialization parameter configuration includes the n-1th frame parameter, the nth frame parameter, the decoder parameter and the display parameter; wherein, n≥2; 所述显示器用于依据所述调控模块的时间点信号从所述缓存中开始读取第n帧视频帧。The display is used to start reading the nth video frame from the buffer according to the time point signal of the control module. 9.如权利要求8所述的终端设备,其特征在于,每个所述视频帧片段均包括16a行,其中,a≥1。9. The terminal device according to claim 8, wherein each of the video frame segments comprises 16a lines, where a≥1. 10.如权利要求8所述的终端设备,其特征在于,所述调控模块包括计算单元、第一通信单元、第二通信单元以及控制单元,所述控制单元分别与所述计算单元、所述第一通信单元以及所述第二通信单元连接,所述第一通信单元用于连接视频解码器,所述第二通信单元用于连接显示器。10. The terminal device according to claim 8, wherein the control module comprises a computing unit, a first communication unit, a second communication unit, and a control unit, and the control unit communicates with the computing unit, the The first communication unit is connected to the second communication unit, the first communication unit is used to connect to a video decoder, and the second communication unit is used to connect to a display.
CN202211264205.1A 2022-10-17 2022-10-17 Video transmission processing method and terminal equipment Active CN115348454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211264205.1A CN115348454B (en) 2022-10-17 2022-10-17 Video transmission processing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211264205.1A CN115348454B (en) 2022-10-17 2022-10-17 Video transmission processing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN115348454A true CN115348454A (en) 2022-11-15
CN115348454B CN115348454B (en) 2022-12-20

Family

ID=83957208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211264205.1A Active CN115348454B (en) 2022-10-17 2022-10-17 Video transmission processing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN115348454B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701282A (en) * 2023-06-12 2023-09-05 深圳市安保医疗科技股份有限公司 VCP data transmission method, device, equipment and medium
CN117793367A (en) * 2024-02-26 2024-03-29 此芯科技(上海)有限公司 Image coding method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002354380A (en) * 2001-05-29 2002-12-06 Mitsubishi Electric Corp Digital video recording/reproducing device
JP2003059189A (en) * 2001-08-10 2003-02-28 Matsushita Electric Ind Co Ltd Buffer management method
US20030156650A1 (en) * 2002-02-20 2003-08-21 Campisano Francesco A. Low latency video decoder with high-quality, variable scaling and minimal frame buffer memory
CN1536891A (en) * 2003-02-05 2004-10-13 ���µ�����ҵ��ʽ���� Image signal reproduction device and image signal reproduction method
EP1654874A2 (en) * 2004-04-30 2006-05-10 Microsoft Corporation Frame-accurate editing methods and systems
JP2011217082A (en) * 2010-03-31 2011-10-27 Jvc Kenwood Corp Image encoder, image encoding method, image encoding program, image decoder, image decoding method and image decoding program
CN102665056A (en) * 2012-04-28 2012-09-12 青岛海信信芯科技有限公司 Display method for videos and images in display terminals
US20130051478A1 (en) * 2011-08-31 2013-02-28 Microsoft Corporation Memory management for video decoding
CN109005447A (en) * 2018-08-10 2018-12-14 高新兴科技集团股份有限公司 A kind of video recording of security protection high definition falls broadcasting method and device
CN112468875A (en) * 2020-11-30 2021-03-09 展讯通信(天津)有限公司 Display output control method and device of video decoding frame, storage medium and terminal
WO2022144244A1 (en) * 2020-12-28 2022-07-07 Koninklijke Kpn N.V. Partial output of a decoded picture buffer in video coding

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002354380A (en) * 2001-05-29 2002-12-06 Mitsubishi Electric Corp Digital video recording/reproducing device
JP2003059189A (en) * 2001-08-10 2003-02-28 Matsushita Electric Ind Co Ltd Buffer management method
US20030156650A1 (en) * 2002-02-20 2003-08-21 Campisano Francesco A. Low latency video decoder with high-quality, variable scaling and minimal frame buffer memory
CN1536891A (en) * 2003-02-05 2004-10-13 ���µ�����ҵ��ʽ���� Image signal reproduction device and image signal reproduction method
EP1654874A2 (en) * 2004-04-30 2006-05-10 Microsoft Corporation Frame-accurate editing methods and systems
JP2011217082A (en) * 2010-03-31 2011-10-27 Jvc Kenwood Corp Image encoder, image encoding method, image encoding program, image decoder, image decoding method and image decoding program
US20130051478A1 (en) * 2011-08-31 2013-02-28 Microsoft Corporation Memory management for video decoding
CN102665056A (en) * 2012-04-28 2012-09-12 青岛海信信芯科技有限公司 Display method for videos and images in display terminals
CN109005447A (en) * 2018-08-10 2018-12-14 高新兴科技集团股份有限公司 A kind of video recording of security protection high definition falls broadcasting method and device
CN112468875A (en) * 2020-11-30 2021-03-09 展讯通信(天津)有限公司 Display output control method and device of video decoding frame, storage medium and terminal
WO2022144244A1 (en) * 2020-12-28 2022-07-07 Koninklijke Kpn N.V. Partial output of a decoded picture buffer in video coding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
曾义芳编著: "《DSP开发应用技术》", 31 January 2008, 北京:北京航空航天大学出版社 *
阳富民等: "嵌入式浏览器图像处理技术研究", 《计算机工程与设计》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701282A (en) * 2023-06-12 2023-09-05 深圳市安保医疗科技股份有限公司 VCP data transmission method, device, equipment and medium
CN116701282B (en) * 2023-06-12 2024-08-09 深圳市安保医疗科技股份有限公司 VCP data transmission method, device, equipment and medium
CN117793367A (en) * 2024-02-26 2024-03-29 此芯科技(上海)有限公司 Image coding method and system
CN117793367B (en) * 2024-02-26 2024-06-04 此芯科技(上海)有限公司 Image coding method and system

Also Published As

Publication number Publication date
CN115348454B (en) 2022-12-20

Similar Documents

Publication Publication Date Title
CN115348454B (en) Video transmission processing method and terminal equipment
CN107493448B (en) Image processing system, image display method and display device
US11212540B2 (en) Video data processing system
US20210350518A1 (en) Method and Apparatus for Determining Experience Quality of VR Multimedia
US12106008B2 (en) Screen sharing display method and apparatus, device, and storage medium
EP3828812A1 (en) Electronic apparatus and control method thereof
EP3886447A1 (en) Video enhancement control method and apparatus, electronic device, and storage medium
US12334035B2 (en) Image display method and apparatus, and medium
WO2016165594A1 (en) Parameter adjustment method and device
CN112948151A (en) Program interface image transmission method, substrate management controller and remote control equipment
WO2021120124A1 (en) Method and apparatus for video display, and computer storage medium
WO2018129924A1 (en) Image processing method and electronic device
CN112584228A (en) Low-delay screen projection method and system based on WEB
JP2014075735A (en) Image processor and image processing method
TW202002664A (en) Video processing method and device thereof
CN109587555B (en) Video processing method, device, electronic device and storage medium
CN114071190B (en) Cloud application video stream processing method, related device and computer program product
CN115460419A (en) Image processing method, image processing device, electronic equipment and storage medium
JP4675944B2 (en) Image processing apparatus, image processing method, and image processing program
CN111953992A (en) Decoding method and device
KR100750096B1 (en) Pre / Post Processing Method and Efficient Pre / Post Processing System for Image Processing
WO2024244224A1 (en) Video synchronous display method and apparatus, device and medium
WO2018000567A1 (en) Frame rate adjustment method and device
CN116866658A (en) Video data processing method, device, equipment and medium
US8237859B2 (en) Method for video conversion of video stream and apparatus thereof

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building C, No.888, Huanhu West 2nd Road, Lingang New District, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 201203

Patentee after: This chip technology group Co.,Ltd.

Country or region after: China

Address before: 13101, Building 13, No. 498, Guoshoujing Road, Pudong New Area, Shanghai, 200000

Patentee before: This Core Technology (Shanghai) Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address