[go: up one dir, main page]

CN107277295B - Video synchronization processing device and method - Google Patents

Video synchronization processing device and method Download PDF

Info

Publication number
CN107277295B
CN107277295B CN201710483258.5A CN201710483258A CN107277295B CN 107277295 B CN107277295 B CN 107277295B CN 201710483258 A CN201710483258 A CN 201710483258A CN 107277295 B CN107277295 B CN 107277295B
Authority
CN
China
Prior art keywords
video
header signal
decoding
signal
module
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.)
Active
Application number
CN201710483258.5A
Other languages
Chinese (zh)
Other versions
CN107277295A (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.)
Beijing Digital Video Hardware Technology Co ltd
Sumavision Technologies Co Ltd
Original Assignee
Sumavision Technologies 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 Sumavision Technologies Co Ltd filed Critical Sumavision Technologies Co Ltd
Priority to CN201710483258.5A priority Critical patent/CN107277295B/en
Publication of CN107277295A publication Critical patent/CN107277295A/en
Application granted granted Critical
Publication of CN107277295B publication Critical patent/CN107277295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/04Synchronising
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/04Synchronising
    • H04N5/08Separation of synchronising signals from picture signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/08Systems for the simultaneous or sequential transmission of more than one television signal, e.g. additional information signals, the signals occupying wholly or partially the same frequency band, e.g. by time division

Landscapes

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

Abstract

本发明提供了一种视频同步处理装置及方法,该装置包括:第一提取模块,用于提取解码视频的解码帧头信号,并将解码视频中的视频数据和该解码帧头信号同步发送至时钟同步处理模块;时钟频率恢复模块,用于从参考视频中获取参考时钟频率;时钟同步处理模块,用于同步输出与参考时钟频率一致的视频数据和解码帧头信号至同步输出模块;第二提取模块,用于提取参考视频的参考帧头信号;同步输出模块,用于根据接收的解码帧头信号和参考帧头信号确定接收的视频数据的起始输出时间,并根据起始输出时间输出该视频数据。这样各路解码视频的视频数据均在时钟域和数据域上双重同步,可以保持播出的电视画面稳定,提高人们的观看效果。

The present invention provides a video synchronization processing device and method, the device includes: a first extraction module, used to extract the decoded frame header signal of the decoded video, and synchronously send the video data in the decoded video and the decoded frame header signal to Clock synchronization processing module; Clock frequency recovery module, used to obtain the reference clock frequency from the reference video; Clock synchronization processing module, used to synchronously output video data consistent with the reference clock frequency and decode the frame header signal to the synchronization output module; the second The extraction module is used to extract the reference frame header signal of the reference video; the synchronous output module is used to determine the initial output time of the received video data according to the received decoded frame header signal and the reference frame header signal, and output according to the initial output time the video data. In this way, the video data of each decoded video is double-synchronized in the clock domain and the data domain, which can keep the broadcast TV picture stable and improve people's viewing effect.

Description

视频同步处理装置及方法Video synchronization processing device and method

技术领域technical field

本发明涉及广播电视技术领域,尤其是涉及一种视频同步处理装置及方法。The present invention relates to the technical field of broadcasting and television, in particular to a video synchronization processing device and method.

背景技术Background technique

在广播电视的播出系统中,系统前端输入的多路视频有的来自卫星信号,有的来自转播信号,有的来自录播信号等,这些视频分别经过解码设备解码后,通过SDI接口(Serial Digital Interface,数字分量串行接口)输出。为了在多路解码视频(解码后的视频称为解码视频)之间进行切换,SDI接口的输出端连接有SDI切换器,SDI切换器控制解码视频的输出。In the broadcasting system of radio and television, some of the multi-channel videos input by the front end of the system come from satellite signals, some from rebroadcast signals, and some from recording and broadcasting signals, etc. Digital Interface, digital component serial interface) output. In order to switch between multiple channels of decoded video (decoded video is called decoded video), the output end of the SDI interface is connected to an SDI switcher, which controls the output of the decoded video.

各路解码视频在时钟域或者数据域上可能存在不同步问题,当SDI切换器在不同步的各路解码视频之间进行切换时,会导致播出的电视画面不稳定,例如出现跳跃、闪烁或滚动等,从而影响人们的观看效果。There may be asynchronous problems in the clock domain or data domain of each channel of decoded video. When the SDI switcher switches between the out-of-sync decoded videos, it will cause the broadcasted TV picture to be unstable, such as jumping and flickering Or scrolling, etc., thereby affecting people's viewing effect.

发明内容Contents of the invention

有鉴于此,本发明的目的在于提供一种视频同步处理装置及方法,以使各路解码视频的视频数据在时钟域和数据域上双重同步,从而保持播出的电视画面稳定,提高人们的观看效果。In view of this, the purpose of the present invention is to provide a video synchronization processing device and method, so that the video data of each decoded video is double-synchronized in the clock domain and the data domain, so as to keep the broadcasted TV picture stable and improve people's awareness. Watch the effect.

第一方面,本发明实施例提供了一种视频同步处理装置,所述装置包括第一提取模块、时钟频率恢复模块、时钟同步处理模块、第二提取模块和同步输出模块;In the first aspect, the embodiment of the present invention provides a video synchronization processing device, the device includes a first extraction module, a clock frequency recovery module, a clock synchronization processing module, a second extraction module and a synchronization output module;

所述第一提取模块用于当接收到视频源提供的解码视频时,提取所述解码视频的解码帧头信号,并将所述解码视频中的视频数据和所述解码帧头信号同步发送至所述时钟同步处理模块;其中,所述解码帧头信号用于指示所述解码视频的各个视频帧的帧头位置;The first extracting module is used to extract the decoded frame header signal of the decoded video when receiving the decoded video provided by the video source, and synchronously send the video data in the decoded video and the decoded frame header signal to The clock synchronization processing module; wherein, the decoded frame header signal is used to indicate the frame header position of each video frame of the decoded video;

所述时钟频率恢复模块用于当接收到参考源提供的参考视频时,从所述参考视频中获取参考时钟频率,并将所述参考时钟频率发送至所述时钟同步处理模块,以及将所述参考视频发送至所述第二提取模块;The clock frequency recovery module is configured to obtain a reference clock frequency from the reference video when receiving a reference video provided by a reference source, and send the reference clock frequency to the clock synchronization processing module, and send the reference clock frequency to the clock synchronization processing module. sending the reference video to the second extraction module;

所述时钟同步处理模块用于接收所述视频数据、所述解码帧头信号和所述参考时钟频率,并同步输出与所述参考时钟频率一致的视频数据和解码帧头信号至所述同步输出模块;The clock synchronization processing module is used to receive the video data, the decoded frame header signal and the reference clock frequency, and synchronously output the video data and the decoded frame header signal consistent with the reference clock frequency to the synchronous output module;

所述第二提取模块用于当接收到所述参考视频时,提取所述参考视频的参考帧头信号,并将所述参考帧头信号发送至所述同步输出模块;其中,所述参考帧头信号用于指示所述参考视频的各个视频帧的帧头位置;The second extraction module is used to extract the reference frame header signal of the reference video when receiving the reference video, and send the reference frame header signal to the synchronization output module; wherein, the reference frame The header signal is used to indicate the frame header position of each video frame of the reference video;

所述同步输出模块用于接收所述视频数据、所述解码帧头信号和所述参考帧头信号,根据所述解码帧头信号和所述参考帧头信号确定所述视频数据的起始输出时间,并根据所述起始输出时间输出所述视频数据。The synchronous output module is used to receive the video data, the decoded frame header signal and the reference frame header signal, and determine the initial output of the video data according to the decoded frame header signal and the reference frame header signal time, and output the video data according to the start output time.

结合第一方面,本发明实施例提供了第一方面的第一种可能的实施方式,其中,所述第一提取模块具体用于:With reference to the first aspect, the embodiment of the present invention provides a first possible implementation manner of the first aspect, wherein the first extraction module is specifically configured to:

获取所述解码视频的同步信号,所述同步信号包括水平同步信号、垂直同步信号和场同步信号;根据所述同步信号提取所述解码视频的解码帧头信号。Acquire a synchronous signal of the decoded video, the synchronous signal includes a horizontal synchronous signal, a vertical synchronous signal and a field synchronous signal; extract a decoded frame header signal of the decoded video according to the synchronous signal.

结合第一方面的第一种可能的实施方式,本发明实施例提供了第一方面的第二种可能的实施方式,其中,所述第一提取模块包括:With reference to the first possible implementation manner of the first aspect, the embodiment of the present invention provides a second possible implementation manner of the first aspect, wherein the first extraction module includes:

第一提取单元,用于当所述解码视频为隔行扫描视频时,根据所述场同步信号的变化位置提取所述解码视频的解码帧头信号;A first extracting unit, configured to extract a decoded frame header signal of the decoded video according to a change position of the field synchronization signal when the decoded video is an interlaced scan video;

第二提取单元,用于当所述解码视频为逐行扫描视频时,根据所述垂直同步信号的变化位置和所述水平同步信号提取所述解码视频的解码帧头信号。The second extraction unit is configured to extract the decoded frame header signal of the decoded video according to the change position of the vertical synchronization signal and the horizontal synchronization signal when the decoded video is a progressive scan video.

结合第一方面,本发明实施例提供了第一方面的第三种可能的实施方式,其中,所述时钟同步处理模块包括写入单元、存储单元和读取输出单元;In combination with the first aspect, the embodiment of the present invention provides a third possible implementation manner of the first aspect, wherein the clock synchronization processing module includes a writing unit, a storage unit, and a read output unit;

所述写入单元用于将接收的所述视频数据和所述解码帧头信号同步写入所述存储单元;The writing unit is used to synchronously write the received video data and the decoded frame header signal into the storage unit;

所述存储单元用于存储接收的所述视频数据和所述解码帧头信号;The storage unit is used to store the received video data and the decoded frame header signal;

所述读取输出单元用于根据接收的所述参考时钟频率,同步读取所述存储单元存储的所述视频数据和所述解码帧头信号,并将读取的所述视频数据和所述解码帧头信号同步发送至所述同步输出模块。The read output unit is used for synchronously reading the video data and the decoded frame header signal stored in the storage unit according to the received reference clock frequency, and combining the read video data and the The decoded frame header signal is synchronously sent to the synchronous output module.

结合第一方面的第三种可能的实施方式,本发明实施例提供了第一方面的第四种可能的实施方式,其中,所述写入单元还用于当所述存储单元出现存储上溢时,将所述视频数据的当前视频帧重复写入所述存储单元上溢前的最后一个视频帧对应的存储区域;With reference to the third possible implementation manner of the first aspect, the embodiment of the present invention provides a fourth possible implementation manner of the first aspect, wherein the writing unit is further configured to , repeatedly write the current video frame of the video data into the storage area corresponding to the last video frame before the storage unit overflows;

所述读取输出单元还用于当所述存储单元出现存储下溢时,重复读取所述存储单元下溢前存储的最后一个视频帧。The read output unit is further configured to repeatedly read the last video frame stored before the storage unit underflows when the storage unit underflows.

结合第一方面,本发明实施例提供了第一方面的第五种可能的实施方式,其中,所述同步输出模块具体用于:With reference to the first aspect, the embodiment of the present invention provides a fifth possible implementation manner of the first aspect, wherein the synchronization output module is specifically used for:

同步读取接收的所述视频数据、所述解码帧头信号和所述参考帧头信号;当读取到所述解码帧头信号时,停止读取所述解码视频,继续读取所述参考帧头信号,并将之后读取到所述参考帧头信号的时间确定为所述起始输出时间;根据所述起始输出时间输出所述视频数据。Synchronously read the received video data, the decoded frame header signal and the reference frame header signal; when the decoded frame header signal is read, stop reading the decoded video and continue to read the reference frame header signal, and determine the time when the reference frame header signal is read later as the start output time; output the video data according to the start output time.

结合第一方面,本发明实施例提供了第一方面的第六种可能的实施方式,其中,所述装置还包括延时调节模块;With reference to the first aspect, the embodiment of the present invention provides a sixth possible implementation manner of the first aspect, wherein the device further includes a delay adjustment module;

所述延时调节模块用于调节所述解码帧头信号和所述参考帧头信号之间的相对延时,并将所述相对延时发送至所述同步输出模块;The delay adjustment module is used to adjust the relative delay between the decoded frame header signal and the reference frame header signal, and send the relative delay to the synchronization output module;

所述同步输出模块具体还用于接收所述相对延时,根据所述相对延时确定所述起始输出时间,并根据所述起始输出时间输出所述视频数据。The synchronous output module is further configured to receive the relative delay, determine the start output time according to the relative delay, and output the video data according to the start output time.

第二方面,本发明实施例还提供一种视频同步处理方法,所述方法应用在如第一方面所述的视频同步处理装置上;所述方法包括:In the second aspect, the embodiment of the present invention also provides a video synchronization processing method, the method is applied to the video synchronization processing device as described in the first aspect; the method includes:

当所述第一提取模块接收到视频源提供的解码视频时,提取所述解码视频的解码帧头信号,并将所述解码视频中的视频数据和所述解码帧头信号同步发送至所述时钟同步处理模块;其中,所述解码帧头信号用于指示所述解码视频的各个视频帧的帧头位置;When the first extraction module receives the decoded video provided by the video source, it extracts the decoded frame header signal of the decoded video, and synchronously sends the video data in the decoded video and the decoded frame header signal to the A clock synchronization processing module; wherein, the decoded frame header signal is used to indicate the frame header position of each video frame of the decoded video;

当所述时钟频率恢复模块接收到参考源提供的参考视频时,从所述参考视频中获取参考时钟频率,并将所述参考时钟频率发送至所述时钟同步处理模块,以及将所述参考视频发送至所述第二提取模块;When the clock frequency recovery module receives the reference video provided by the reference source, it obtains the reference clock frequency from the reference video, sends the reference clock frequency to the clock synchronization processing module, and sends the reference video sent to the second extraction module;

所述时钟同步处理模块接收所述视频数据、所述解码帧头信号和所述参考时钟频率,并同步输出与所述参考时钟频率一致的视频数据和解码帧头信号至所述同步输出模块;The clock synchronization processing module receives the video data, the decoded frame header signal and the reference clock frequency, and synchronously outputs the video data and the decoded frame header signal consistent with the reference clock frequency to the synchronization output module;

当所述第二提取模块接收到所述参考视频时,提取所述参考视频的参考帧头信号,并将所述参考帧头信号发送至所述同步输出模块;其中,所述参考帧头信号用于指示所述参考视频的各个视频帧的帧头位置;When the second extraction module receives the reference video, it extracts the reference frame header signal of the reference video, and sends the reference frame header signal to the synchronization output module; wherein, the reference frame header signal Used to indicate the frame header position of each video frame of the reference video;

所述同步输出模块接收所述视频数据、所述解码帧头信号和所述参考帧头信号,根据所述解码帧头信号和所述参考帧头信号确定所述视频数据的起始输出时间,并根据所述起始输出时间输出所述视频数据。The synchronous output module receives the video data, the decoded frame header signal and the reference frame header signal, and determines the start output time of the video data according to the decoded frame header signal and the reference frame header signal, And output the video data according to the start output time.

结合第二方面,本发明实施例提供了第二方面的第一种可能的实施方式,其中,所述当所述第一提取模块接收到视频源提供的解码视频时,提取所述解码视频的解码帧头信号,包括:With reference to the second aspect, the embodiment of the present invention provides a first possible implementation manner of the second aspect, wherein when the first extraction module receives the decoded video provided by the video source, extracts the decoded video Decode frame header signals, including:

当所述第一提取模块接收到视频源提供的解码视频时,获取所述解码视频的同步信号,所述同步信号包括水平同步信号、垂直同步信号和场同步信号;When the first extracting module receives the decoded video provided by the video source, it acquires a synchronous signal of the decoded video, the synchronous signal includes a horizontal synchronous signal, a vertical synchronous signal and a field synchronous signal;

根据所述同步信号提取所述解码视频的解码帧头信号。Extracting a decoded frame header signal of the decoded video according to the synchronization signal.

结合第二方面,本发明实施例提供了第二方面的第二种可能的实施方式,其中,所述根据所述解码帧头信号和所述参考帧头信号确定所述视频数据的起始输出时间,包括:With reference to the second aspect, the embodiment of the present invention provides a second possible implementation manner of the second aspect, wherein the determination of the initial output of the video data according to the decoded frame header signal and the reference frame header signal time, including:

同步读取接收的所述视频数据、所述解码帧头信号和所述参考帧头信号;当读取到所述解码帧头信号时,停止读取所述解码视频,继续读取所述参考帧头信号,并将之后读取到所述参考帧头信号的时间确定为所述起始输出时间。Synchronously read the received video data, the decoded frame header signal and the reference frame header signal; when the decoded frame header signal is read, stop reading the decoded video and continue to read the reference frame header signal, and determine the time when the reference frame header signal is read later as the start output time.

本发明实施例带来了以下有益效果:Embodiments of the present invention bring the following beneficial effects:

本发明实施例中,视频同步处理装置包括第一提取模块、时钟频率恢复模块、时钟同步处理模块、第二提取模块和同步输出模块;第一提取模块用于当接收到视频源提供的解码视频时,提取该解码视频的解码帧头信号,并将该解码视频中的视频数据和该解码帧头信号同步发送至时钟同步处理模块;其中,解码帧头信号用于指示解码视频的各个视频帧的帧头位置;时钟频率恢复模块用于当接收到参考源提供的参考视频时,从该参考视频中获取参考时钟频率,并将该参考时钟频率发送至时钟同步处理模块,以及将该参考视频发送至第二提取模块;时钟同步处理模块用于接收视频数据、解码帧头信号和参考时钟频率,并同步输出与该参考时钟频率一致的视频数据和解码帧头信号至同步输出模块;第二提取模块用于当接收到参考视频时,提取该参考视频的参考帧头信号,并将该参考帧头信号发送至同步输出模块;其中,参考帧头信号用于指示参考视频的各个视频帧的帧头位置;同步输出模块用于接收视频数据、解码帧头信号和参考帧头信号,根据该解码帧头信号和该参考帧头信号确定该视频数据的起始输出时间,并根据该起始输出时间输出该视频数据。时钟同步处理模块根据参考时钟频率可以将解码视频与参考视频在时钟域上同步,进而同步输出模块根据解码帧头信号和参考帧头信号可以将解码视频与参考视频在数据域上同步,从而实现了解码视频与参考视频在时钟域和数据域上的双重同步。由于各路解码视频均与参考视频同步,因此应用本发明实施例提供的视频同步处理装置及方法,输出的各路视频数据均在时钟域和数据域上双重同步,这样保持了播出的电视画面稳定,提高了人们的观看效果。In the embodiment of the present invention, the video synchronization processing device includes a first extraction module, a clock frequency recovery module, a clock synchronization processing module, a second extraction module and a synchronization output module; the first extraction module is used to receive the decoded video provided by the video source , extract the decoded frame header signal of the decoded video, and send the video data in the decoded video and the decoded frame header signal to the clock synchronization processing module synchronously; wherein, the decoded frame header signal is used to indicate each video frame of the decoded video The frame header position; the clock frequency recovery module is used to obtain the reference clock frequency from the reference video when receiving the reference video provided by the reference source, and send the reference clock frequency to the clock synchronization processing module, and the reference video Sent to the second extraction module; the clock synchronization processing module is used to receive video data, decode the frame header signal and the reference clock frequency, and synchronously output the video data consistent with the reference clock frequency and decode the frame header signal to the synchronous output module; the second The extraction module is used to extract the reference frame header signal of the reference video when receiving the reference video, and send the reference frame header signal to the synchronous output module; wherein the reference frame header signal is used to indicate each video frame of the reference video Frame header position; the synchronous output module is used to receive video data, decode frame header signals and reference frame header signals, determine the start output time of the video data according to the decoded frame header signals and the reference frame header signals, and determine the start output time of the video data according to the start The video data is output at the output time. The clock synchronization processing module can synchronize the decoded video with the reference video in the clock domain according to the reference clock frequency, and then the synchronization output module can synchronize the decoded video with the reference video in the data domain according to the decoded frame header signal and the reference frame header signal, thereby realizing Double synchronization of decoded video and reference video in clock domain and data domain. Since each channel of decoded video is synchronized with the reference video, by using the video synchronization processing device and method provided by the embodiment of the present invention, the output video data of each channel is double-synchronized in the clock domain and the data domain, thus maintaining the broadcast TV The picture is stable, which improves people's viewing effect.

本发明的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention 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 specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.

图1为本发明实施例提供的视频同步处理装置的第一种结构示意图;FIG. 1 is a first structural schematic diagram of a video synchronization processing device provided by an embodiment of the present invention;

图2为本发明实施例提供的视频同步处理装置中时钟同步处理模块的单元组成示意图;2 is a schematic diagram of unit composition of a clock synchronization processing module in a video synchronization processing device provided by an embodiment of the present invention;

图3为本发明实施例提供的视频同步处理装置的处理流程示意图;3 is a schematic diagram of a processing flow of a video synchronization processing device provided by an embodiment of the present invention;

图4为本发明实施例提供的视频同步处理装置的第二种结构示意图;FIG. 4 is a second structural schematic diagram of a video synchronization processing device provided by an embodiment of the present invention;

图5为本发明实施例提供的视频同步处理方法的流程示意图。FIG. 5 is a schematic flowchart of a video synchronization processing method provided by an embodiment of the present invention.

图标:icon:

10-第一提取模块;20-时钟频率恢复模块;30-时钟同步处理模块;31-写入单元;32-存储单元;33-读取输出单元;40-第二提取模块;50-同步输出模块;60-延时调节模块。10-first extraction module; 20-clock frequency recovery module; 30-clock synchronization processing module; 31-write unit; 32-storage unit; 33-read output unit; 40-second extraction module; 50-synchronous output module; 60-delay adjustment module.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. the embodiment. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

考虑到当SDI切换器在不同步的各路解码视频之间进行切换时,会导致播出的电视画面不稳定,影响人们的观看效果,本发明实施例提供的一种视频同步处理装置及方法,可以使输出的各路视频数据在时钟域和数据域上双重同步,保持播出的电视画面稳定,提高人们的观看效果。Considering that when the SDI switcher switches between asynchronous decoded videos, the broadcasted TV picture will be unstable and affect people's viewing effect, a video synchronization processing device and method provided by the embodiment of the present invention , can double-synchronize the output video data in the clock domain and data domain, keep the broadcast TV picture stable, and improve people's viewing effect.

为便于对本实施例进行理解,首先对本发明实施例所公开的一种视频同步处理装置进行详细介绍。To facilitate the understanding of this embodiment, a video synchronization processing device disclosed in this embodiment of the present invention is first introduced in detail.

实施例一:Embodiment one:

图1为本发明实施例提供的视频同步处理装置的第一种结构示意图,如图1所示,该装置包括第一提取模块10、时钟频率恢复模块20、时钟同步处理模块30、第二提取模块40和同步输出模块50。Figure 1 is a schematic diagram of the first structure of a video synchronization processing device provided by an embodiment of the present invention. As shown in Figure 1, the device includes a first extraction module 10, a clock frequency recovery module 20, a clock synchronization processing module 30, a second extraction Module 40 and Synchronous Output Module 50.

第一提取模块10用于当接收到视频源提供的解码视频时,提取该解码视频的解码帧头信号,并将该解码视频中的视频数据和该解码帧头信号同步发送至时钟同步处理模块30;其中,解码帧头信号用于指示解码视频的各个视频帧的帧头位置。The first extraction module 10 is used to extract the decoded frame header signal of the decoded video when receiving the decoded video provided by the video source, and synchronously send the video data in the decoded video and the decoded frame header signal to the clock synchronization processing module 30; Wherein, the decoded frame header signal is used to indicate the frame header position of each video frame of the decoded video.

时钟频率恢复模块20用于当接收到参考源提供的参考视频时,从该参考视频中获取参考时钟频率,并将该参考时钟频率发送至时钟同步处理模块30,以及将该参考视频发送至第二提取模块40。Clock frequency recovery module 20 is used for when receiving the reference video that reference source provides, obtains reference clock frequency from this reference video, and this reference clock frequency is sent to clock synchronization processing module 30, and this reference video is sent to the second Two extraction modules 40 .

时钟同步处理模块30用于接收视频数据、解码帧头信号和参考时钟频率,并同步输出与该参考时钟频率一致的视频数据和解码帧头信号至同步输出模块50。The clock synchronization processing module 30 is used to receive video data, decode frame header signals and a reference clock frequency, and synchronously output video data and decoded frame header signals consistent with the reference clock frequency to the synchronization output module 50 .

第二提取模块40用于当接收到参考视频时,提取该参考视频的参考帧头信号,并将该参考帧头信号发送至同步输出模块50;其中,参考帧头信号用于指示参考视频的各个视频帧的帧头位置。The second extraction module 40 is used to extract the reference frame header signal of the reference video when receiving the reference video, and send the reference frame header signal to the synchronous output module 50; wherein, the reference frame header signal is used to indicate the reference frame header signal of the reference video The frame header position of each video frame.

同步输出模块50用于接收视频数据、解码帧头信号和参考帧头信号,根据该解码帧头信号和该参考帧头信号确定该视频数据的起始输出时间,并根据该起始输出时间输出该视频数据。Synchronous output module 50 is used for receiving video data, decoded frame header signal and reference frame header signal, determines the initial output time of this video data according to this decoded frame header signal and this reference frame header signal, and outputs according to this initial output time the video data.

本发明实施例中,视频同步处理装置包括第一提取模块、时钟频率恢复模块、时钟同步处理模块、第二提取模块和同步输出模块,时钟同步处理模块根据参考时钟频率可以将解码视频与参考视频在时钟域上同步,进而同步输出模块根据解码帧头信号和参考帧头信号可以将解码视频与参考视频在数据域上同步,从而实现了解码视频与参考视频在时钟域和数据域上的双重同步。由于各路解码视频均与参考视频同步,因此应用本发明实施例提供的视频同步处理装置,输出的各路视频数据均在时钟域和数据域上双重同步,这样保持了播出的电视画面稳定,提高了人们的观看效果。In the embodiment of the present invention, the video synchronization processing device includes a first extraction module, a clock frequency recovery module, a clock synchronization processing module, a second extraction module and a synchronization output module, and the clock synchronization processing module can compare the decoded video and the reference video according to the reference clock frequency. Synchronized in the clock domain, and then the synchronous output module can synchronize the decoded video and the reference video in the data domain according to the decoded frame header signal and the reference frame header signal, thus realizing the double synchronization of the decoded video and the reference video in the clock domain and the data domain Synchronize. Since each channel of decoded video is synchronized with the reference video, by using the video synchronization processing device provided by the embodiment of the present invention, the output video data of each channel is double-synchronized in the clock domain and the data domain, thus maintaining the stability of the broadcast TV picture , improving people's viewing effect.

上述视频同步处理装置可以依托FPGA(Field Programmable Gate Array,现场可编程门阵列)芯片实现。对于该装置,输入源分为两部分,一个是视频源,一个是参考源。其中,视频源可以但不限于是解码芯片输出的视频数据,前端视频输入源经过解码芯片输出解码后的解码视频,解码视频为数字视频;参考源为外部模拟视频源,输出参考视频,参考视频为模拟视频,该参考视频用于为各个解码视频的同步提供参照物。该装置对这两种输入源是同步处理的,下面具体说明该装置对解码视频和参考视频的处理过程。The above video synchronization processing device can be realized by relying on FPGA (Field Programmable Gate Array, Field Programmable Gate Array) chip. For this device, the input source is divided into two parts, one is the video source and the other is the reference source. Among them, the video source can be but not limited to the video data output by the decoder chip, the front-end video input source outputs the decoded video after decoding through the decoder chip, and the decoded video is a digital video; the reference source is an external analog video source, and the output reference video, the reference video For analog video, this reference video is used to provide a reference for the synchronization of each decoded video. The device processes these two input sources synchronously, and the processing process of the device on the decoded video and the reference video will be described in detail below.

(1)第一提取模块10提取解码视频的解码帧头信号包括:当第一提取模块10接收到解码视频时,获取该解码视频的同步信号,该同步信号包括水平同步信号、垂直同步信号和场同步信号,根据该同步信号提取该解码视频的解码帧头信号,即TOF(Top Of Frame,帧头)信号。(1) the first extraction module 10 extracts the decoding frame header signal of the decoded video and includes: when the first extraction module 10 receives the decoded video, obtains the synchronous signal of the decoded video, the synchronous signal includes a horizontal synchronous signal, a vertical synchronous signal and A field synchronization signal, based on which a decoded frame header signal of the decoded video is extracted, that is, a TOF (Top Of Frame, frame header) signal.

具体地,对于一个完整的解码视频,可以得到它的Hsync信号(水平同步信号)、Vsync信号(垂直同步信号)以及Fsync信号(场同步信号),Hsync信号用于指示解码视频的各个视频帧中各行数据的终点或起点,Vsync信号用于指示解码视频的各个视频帧中各行数据处于场消隐区间或正程区间(有效数据行),Fsync信号用于指示解码视频的各个视频帧中各行数据处于奇场或偶场。根据解码视频的Hsync信号、Vsync信号和Fsync信号可以提取该解码视频的TOF信号。Specifically, for a complete decoded video, its Hsync signal (horizontal synchronization signal), Vsync signal (vertical synchronization signal) and Fsync signal (field synchronization signal) can be obtained, and the Hsync signal is used to indicate that in each video frame of the decoded video The end or starting point of each row of data, the Vsync signal is used to indicate that each row of data in each video frame of the decoded video is in the field blanking interval or the normal interval (effective data row), and the Fsync signal is used to indicate each row of data in each video frame of the decoded video In odd or even field. The TOF signal of the decoded video can be extracted according to the Hsync signal, the Vsync signal and the Fsync signal of the decoded video.

考虑到视频的扫描方式分为隔行扫描和逐行扫描,第一提取模块10包括:第一提取单元,用于当解码视频为隔行扫描视频时,根据场同步信号的变化位置提取解码视频的解码帧头信号;第二提取单元,用于当解码视频为逐行扫描视频时,根据垂直同步信号的变化位置和水平同步信号提取解码视频的解码帧头信号。Considering that the scanning mode of video is divided into interlaced scanning and progressive scanning, the first extraction module 10 includes: a first extraction unit, which is used to extract the decoded video of the decoded video according to the change position of the field synchronization signal when the decoded video is an interlaced video. The frame header signal; the second extracting unit is used to extract the decoded frame header signal of the decoded video according to the change position of the vertical synchronization signal and the horizontal synchronization signal when the decoded video is a progressive scan video.

具体地,对于隔行扫描视频,由于每个视频帧包括两场-奇场和偶场,Fsync信号在奇场和偶场分别为低电平和高电平(或者相反),因此可以根据Fsync信号的电平变化来确定帧头位置,从而提取TOF信号。例如,若解码视频的每个视频帧均先扫描奇场,再扫描偶场,奇场下Fsync信号为低电平,偶场下Fsync信号为高电平,则当Fsync信号从高电平变为低电平时说明当前视频帧的偶场扫描结束,开始扫描下一视频帧的奇场,即可以确定此时对应视频帧的帧头位置,从而提取TOF信号。Specifically, for interlaced scanning video, since each video frame includes two fields-odd field and even field, the Fsync signal is low level and high level (or vice versa) in the odd field and even field respectively, so it can be based on the Fsync signal Level changes to determine the frame header position, thereby extracting the TOF signal. For example, if each video frame of the decoded video scans the odd field first, and then scans the even field, the Fsync signal in the odd field is low level, and the Fsync signal in the even field is high level, then when the Fsync signal changes from high level to When it is low level, it means that the even field scanning of the current video frame ends, and the odd field of the next video frame starts to be scanned, that is, the frame head position of the corresponding video frame can be determined at this time, thereby extracting the TOF signal.

对于逐行扫描视频,Fsync信号不变,此时无法根据Fsync信号提取TOF信号。考虑到逐行扫描视频的每个视频帧都包括场消隐区间、正程区间和场消隐区间三部分,同一视频制式下正程区间后的场消隐区间的行数固定,且Vsync信号在场消隐区间和正程区间分别为高电平和低电平(或者相反),因此通过Vsync信号的电平变化可以确定正程区间的结束位置,再根据Hsync信号确定行数,可以找到下一视频帧的帧头位置,从而提取TOF信号。例如,若解码视频每个视频帧包括750行,第1-25行为场消隐区间,第26-745行为正程区间,第746-750行为场消隐区间,Vsync信号在场消隐区间为高电平,在正程区间为低电平,则当检测到Vsync信号由低电平变为高电平时,可以确定此时正由正程区间扫描至场消隐区间(如第745-746行),再根据Hsync信号确定5行后的位置为下一视频帧的帧头位置,从而提取TOF信号。For progressive scan video, the Fsync signal remains unchanged, and the TOF signal cannot be extracted according to the Fsync signal at this time. Considering that each video frame of progressive scan video includes three parts: field blanking interval, forward interval and vertical blanking interval, the number of lines in the vertical blanking interval after the regular interval in the same video system is fixed, and the Vsync signal The vertical blanking interval and the forward interval are respectively high level and low level (or vice versa), so the end position of the forward interval can be determined by the level change of the Vsync signal, and the next video can be found by determining the number of lines according to the Hsync signal The frame header position of the frame, thereby extracting the TOF signal. For example, if each video frame of the decoded video includes 750 lines, the 1st-25th row is the vertical blanking interval, the 26th-745th row is the normal interval, the 746th-750th row is the vertical blanking interval, and the Vsync signal is high in the vertical blanking interval Level, if it is low level in the forward interval, when it is detected that the Vsync signal changes from low level to high level, it can be determined that it is scanning from the forward interval to the vertical blanking interval (such as lines 745-746 ), and then determine the position after 5 lines as the frame header position of the next video frame according to the Hsync signal, thereby extracting the TOF signal.

(2)时钟频率恢复模块20对参考视频的处理包括:当时钟频率恢复模块20接收到参考源提供的参考视频时,恢复该参考视频的模拟视频源时钟,并将模拟视频源时钟作为解码视频的处理时钟,即获取该参考视频的参考时钟频率,并将该参考时钟频率作为解码视频同步后的时钟频率,进而实现解码视频与参考视频在时钟域上的同步。(2) The processing of the reference video by the clock frequency recovery module 20 includes: when the clock frequency recovery module 20 receives the reference video provided by the reference source, restore the analog video source clock of the reference video, and use the analog video source clock as the decoded video The processing clock of the reference video is to obtain the reference clock frequency of the reference video, and use the reference clock frequency as the clock frequency after the decoded video is synchronized, so as to realize the synchronization of the decoded video and the reference video in the clock domain.

(3)时钟同步处理模块30用于使解码视频和参考视频在时钟域上同步。图2为本发明实施例提供的视频同步处理装置中时钟同步处理模块的单元组成示意图,如图2所示,时钟同步处理模块30包括写入单元31、存储单元32和读取输出单元33。写入单元31用于将接收的视频数据和解码帧头信号同步写入存储单元32;存储单元32用于存储接收的视频数据和解码帧头信号;读取输出单元33用于根据接收的参考时钟频率,同步读取存储单元32存储的视频数据和解码帧头信号,并将读取的视频数据和解码帧头信号同步发送至同步输出模块50。(3) The clock synchronization processing module 30 is used to synchronize the decoded video and the reference video in the clock domain. FIG. 2 is a schematic diagram of the unit composition of the clock synchronization processing module in the video synchronization processing device provided by the embodiment of the present invention. As shown in FIG. Writing unit 31 is used for synchronously writing the received video data and decoded frame header signal into storage unit 32; Storage unit 32 is used for storing received video data and decoded frame header signal; Read output unit 33 is used for according to the reference received Clock frequency, synchronously read the video data and decoded frame header signal stored in the storage unit 32 , and synchronously send the read video data and decoded frame header signal to the synchronous output module 50 .

考虑到解码视频本身的时钟频率与参考时钟频率不一致时,写入单元31的写入速率和读取输出单元33的输出速率不一致,因此利用存储单元32进行视频数据的缓存。时钟同步处理模块30可以但不限于利用DDR进行数据的缓存。DDR的全称为DDR SDRAM(DoubleData Rate SDRAM,双倍速率SDRAM),其中SDRAM为Synchronous Dynamic Random AccessMemory,同步动态随机存储器。Considering that when the clock frequency of the decoded video itself is not consistent with the reference clock frequency, the writing rate of the writing unit 31 is not consistent with the output rate of the reading output unit 33, so the storage unit 32 is used to cache video data. The clock synchronization processing module 30 may, but is not limited to, use DDR to cache data. The full name of DDR is DDR SDRAM (Double Data Rate SDRAM, double rate SDRAM), where SDRAM is Synchronous Dynamic Random Access Memory, Synchronous Dynamic Random Access Memory.

进一步地,考虑到写入速率大于输出速率时,会造成DDR存储上溢,写入单元31还用于当存储单元32出现存储上溢时,将视频数据的当前视频帧重复写入存储单元32上溢前的最后一个视频帧对应的存储区域。考虑到写入速率小于输出速率时,会造成DDR存储下溢,读取输出单元33还用于当存储单元32出现存储下溢时,重复读取存储单元32下溢前存储的最后一个视频帧。这样,保证了从DDR输出的视频数据均是完整的一帧,同时TOF信号也随时钟同步后的视频数据一起输出到同步输出模块50。Further, considering that when the write rate is greater than the output rate, it will cause DDR storage overflow, the write unit 31 is also used to repeatedly write the current video frame of the video data into the storage unit 32 when the storage overflow occurs in the storage unit 32 The storage area corresponding to the last video frame before overflow. Considering that when the write rate is less than the output rate, it will cause DDR storage underflow, and the read output unit 33 is also used to repeatedly read the last video frame stored before the storage unit 32 underflows when the storage unit 32 underflows . In this way, it is ensured that the video data output from the DDR is a complete frame, and at the same time, the TOF signal is also output to the synchronization output module 50 together with the clock-synchronized video data.

(4)第二提取模块40用于提取参考视频的参考帧头信号,即TOF信号。具体地,参考视频本身也携带同步信号:Hsync信号、Vsync信号和Fsync信号,由于参考视频的同步信号为模拟视频同步信号,需要利用模数转换芯片将参考视频的Hsync信号、Vsync信号和Fsync信号转换到数字域,以供第二提取模块40使用。第二提取模块40提取参考视频的TOF信号的过程与第一提取模块10提取解码视频的TOF信号的过程相同,这里不再赘述。(4) The second extraction module 40 is used to extract the reference frame header signal of the reference video, ie the TOF signal. Specifically, the reference video itself also carries synchronization signals: Hsync signal, Vsync signal and Fsync signal. Since the synchronization signal of the reference video is an analog video synchronization signal, it is necessary to use an analog-to-digital conversion chip to convert the Hsync signal, Vsync signal and Fsync signal of the reference video converted to the digital domain for use by the second extraction module 40 . The process of extracting the TOF signal of the reference video by the second extracting module 40 is the same as the process of extracting the TOF signal of the decoded video by the first extracting module 10 , and will not be repeated here.

(5)同步输出模块50具体用于:同步读取接收的视频数据、解码帧头信号和参考帧头信号;当读取到解码帧头信号时,停止读取解码视频,继续读取参考帧头信号,并将之后读取到参考帧头信号的时间确定为起始输出时间;根据该起始输出时间输出该视频数据。同步输出模块50的输出接口可以为SDI接口。这样,就做到了解码视频与参考视频在数据域上的一致。(5) The synchronous output module 50 is specifically used for: synchronously reading received video data, decoded frame header signal and reference frame header signal; when reading the decoded frame header signal, stop reading the decoded video, and continue to read the reference frame header signal, and determine the time when the reference frame header signal is read later as the start output time; output the video data according to the start output time. The output interface of the synchronous output module 50 may be an SDI interface. In this way, the decoded video is consistent with the reference video in the data domain.

图3为本发明实施例提供的视频同步处理装置的处理流程示意图,如图3所示,该装置的处理流程包括以下几个步骤:Fig. 3 is a schematic diagram of the processing flow of the video synchronization processing device provided by the embodiment of the present invention. As shown in Fig. 3, the processing flow of the device includes the following steps:

步骤S301,第一提取模块提取解码视频的TOF信号。Step S301, the first extraction module extracts the TOF signal of the decoded video.

步骤S302,时钟频率恢复模块从参考视频中获取参考时钟频率。In step S302, the clock frequency recovery module acquires a reference clock frequency from a reference video.

步骤S303,第二提取模块提取参考视频的TOF信号。Step S303, the second extraction module extracts the TOF signal of the reference video.

需要说明的是,步骤S301与步骤S302或步骤S303可以同步执行,对步骤S302和步骤S303的执行顺序不作限定,图3中以先执行步骤S302,再执行步骤S303为例进行说明。It should be noted that step S301 and step S302 or step S303 can be executed synchronously, and the execution sequence of step S302 and step S303 is not limited. In FIG. 3 , step S302 is executed first, and then step S303 is executed as an example for illustration.

步骤S304,时钟同步处理模块将接收的解码视频与参考视频进行时钟域同步,并输出至同步输出模块。Step S304, the clock synchronization processing module performs clock domain synchronization on the received decoded video and the reference video, and outputs it to the synchronization output module.

步骤S305,同步输出模块将解码视频与参考视频进行数据域同步,输出与参考视频同步的视频数据。Step S305, the synchronization output module performs data domain synchronization of the decoded video and the reference video, and outputs video data synchronized with the reference video.

上述各个步骤的具体执行过程可以参考前述内容,这里不再赘述。For the specific execution process of the above steps, reference may be made to the foregoing content, and details are not repeated here.

考虑到上述视频同步处理装置输出的视频数据后续会做其他处理,以及存在外部环境的影响,会导致实际的视频数据与参考视频不能在数据域上达到完全同步,如图4所示,在图1的基础上该装置还包括延时调节模块60,延时调节模块60用于调节解码帧头信号和参考帧头信号之间的相对延时,并将该相对延时发送至同步输出模块50。同步输出模块50具体还用于接收该相对延时,根据该相对延时确定起始输出时间,并根据该起始输出时间输出该视频数据。Considering that the video data output by the above-mentioned video synchronization processing device will be processed later, and the influence of the external environment, the actual video data and the reference video cannot be completely synchronized in the data domain, as shown in Figure 4. 1, the device also includes a delay adjustment module 60, the delay adjustment module 60 is used to adjust the relative delay between the decoded frame header signal and the reference frame header signal, and send the relative delay to the synchronization output module 50 . The synchronous output module 50 is also specifically configured to receive the relative delay, determine the start output time according to the relative delay, and output the video data according to the start output time.

具体地,用户可以通过延时调节模块60调节上述相对延时,调节的基本单位是一个参考时钟周期,也就等于一个视频帧的调节,精度很高,其中,参考时钟周期与参考时钟频率对应。这样进一步保证了视频数据与参考视频在数据域上的同步。Specifically, the user can adjust the above-mentioned relative delay through the delay adjustment module 60. The basic unit of adjustment is a reference clock cycle, which is equal to the adjustment of a video frame, and the accuracy is very high. Wherein, the reference clock cycle corresponds to the reference clock frequency . This further ensures the synchronization of the video data and the reference video in the data domain.

考虑到当参考源发生异常或者发生改变时,上述相对延时不是固定的,当多次检测到相对延时变化时,可以采用重同步的方式来保持解码视频与参考视频的实时同步性。Considering that the above-mentioned relative delay is not fixed when the reference source is abnormal or changed, when the relative delay changes are detected multiple times, a resynchronization method can be used to maintain the real-time synchronization between the decoded video and the reference video.

综上可知,本发明实施例提供的视频同步处理装置可以使解码视频的视频数据与参考视频在时钟域和数据域上双重同步,同时保证同步的精度和实时性满足要求。It can be seen from the above that the video synchronization processing device provided by the embodiment of the present invention can double-synchronize the video data of the decoded video and the reference video in the clock domain and the data domain, while ensuring that the synchronization accuracy and real-time performance meet the requirements.

实施例二:Embodiment two:

本实施了提供了一种视频同步处理方法,该方法应用在如实施例一的视频同步处理装置上。图5为本发明实施例提供的视频同步处理方法的流程示意图,如图5所示,该方法包括以下几个步骤:This implementation provides a video synchronization processing method, which is applied to the video synchronization processing device in Embodiment 1. Fig. 5 is a schematic flowchart of a video synchronization processing method provided by an embodiment of the present invention. As shown in Fig. 5, the method includes the following steps:

步骤S501,当第一提取模块接收到视频源提供的解码视频时,提取该解码视频的解码帧头信号,并将该解码视频中的视频数据和该解码帧头信号同步发送至时钟同步处理模块;其中,解码帧头信号用于指示解码视频的各个视频帧的帧头位置。Step S501, when the first extraction module receives the decoded video provided by the video source, extract the decoded frame header signal of the decoded video, and synchronously send the video data in the decoded video and the decoded frame header signal to the clock synchronization processing module ; Wherein, the decoded frame header signal is used to indicate the frame header position of each video frame of the decoded video.

步骤S502,当时钟频率恢复模块接收到参考源提供的参考视频时,从该参考视频中获取参考时钟频率,并将该参考时钟频率发送至时钟同步处理模块,以及将该参考视频发送至第二提取模块。Step S502, when the clock frequency recovery module receives the reference video provided by the reference source, obtain the reference clock frequency from the reference video, and send the reference clock frequency to the clock synchronization processing module, and send the reference video to the second Extract the module.

步骤S503,时钟同步处理模块接收视频数据、解码帧头信号和参考时钟频率,并同步输出与参考时钟频率一致的视频数据和解码帧头信号至同步输出模块。Step S503, the clock synchronization processing module receives the video data, the decoded frame header signal and the reference clock frequency, and synchronously outputs the video data and the decoded frame header signal consistent with the reference clock frequency to the synchronization output module.

步骤S504,当第二提取模块接收到参考视频时,提取该参考视频的参考帧头信号,并将该参考帧头信号发送至同步输出模块;其中,参考帧头信号用于指示参考视频的各个视频帧的帧头位置。Step S504, when the second extraction module receives the reference video, extract the reference frame header signal of the reference video, and send the reference frame header signal to the synchronous output module; wherein, the reference frame header signal is used to indicate each of the reference video The frame header position of the video frame.

步骤S505,同步输出模块接收视频数据、解码帧头信号和参考帧头信号,根据该解码帧头信号和该参考帧头信号确定该视频数据的起始输出时间,并根据该起始输出时间输出该视频数据。Step S505, the synchronous output module receives the video data, the decoded frame header signal and the reference frame header signal, determines the start output time of the video data according to the decoded frame header signal and the reference frame header signal, and outputs according to the start output time the video data.

第一提取模块提取解码视频的解码帧头信号的过程具体为:当第一提取模块接收到视频源提供的解码视频时,获取该解码视频的同步信号,同步信号包括水平同步信号、垂直同步信号和场同步信号;根据该同步信号提取该解码视频的解码帧头信号。The process of the first extracting module extracting the decoded frame header signal of the decoded video is specifically: when the first extracting module receives the decoded video provided by the video source, it obtains the synchronous signal of the decoded video, and the synchronous signal includes a horizontal synchronous signal and a vertical synchronous signal and field synchronous signal; extract the decoded frame header signal of the decoded video according to the synchronous signal.

根据解码帧头信号和参考帧头信号确定视频数据的起始输出时间的过程具体为:同步读取接收的视频数据、解码帧头信号和参考帧头信号;当读取到解码帧头信号时,停止读取解码视频,继续读取参考帧头信号,并将之后读取到参考帧头信号的时间确定为起始输出时间。The process of determining the start output time of video data according to the decoded frame header signal and the reference frame header signal is specifically: synchronously read the received video data, decoded frame header signal and reference frame header signal; when the decoded frame header signal is read , stop reading the decoded video, continue to read the reference frame header signal, and determine the time when the reference frame header signal is read later as the start output time.

本发明实施例中,当第一提取模块接收到视频源提供的解码视频时,提取该解码视频的解码帧头信号,并将该解码视频中的视频数据和该解码帧头信号同步发送至时钟同步处理模块;其中,解码帧头信号用于指示解码视频的各个视频帧的帧头位置。当时钟频率恢复模块接收到参考源提供的参考视频时,从该参考视频中获取参考时钟频率,并将该参考时钟频率发送至时钟同步处理模块,以及将该参考视频发送至第二提取模块。时钟同步处理模块接收视频数据、解码帧头信号和参考时钟频率,并同步输出与参考时钟频率一致的视频数据和解码帧头信号至同步输出模块。当第二提取模块接收到参考视频时,提取该参考视频的参考帧头信号,并将该参考帧头信号发送至同步输出模块;其中,参考帧头信号用于指示参考视频的各个视频帧的帧头位置。同步输出模块接收视频数据、解码帧头信号和参考帧头信号,根据该解码帧头信号和该参考帧头信号确定该视频数据的起始输出时间,并根据该起始输出时间输出该视频数据。时钟同步处理模块根据参考时钟频率可以将解码视频与参考视频在时钟域上同步,进而同步输出模块根据解码帧头信号和参考帧头信号可以将解码视频与参考视频在数据域上同步,从而实现了解码视频与参考视频在时钟域和数据域上的双重同步。由于各路解码视频均与参考视频同步,因此应用本发明实施例提供的视频同步处理方法,输出的各路视频数据均在时钟域和数据域上双重同步,这样保持了播出的电视画面稳定,提高了人们的观看效果。In the embodiment of the present invention, when the first extraction module receives the decoded video provided by the video source, it extracts the decoded frame header signal of the decoded video, and synchronously sends the video data in the decoded video and the decoded frame header signal to the clock A synchronization processing module; wherein, the decoded frame header signal is used to indicate the frame header position of each video frame of the decoded video. When the clock frequency recovery module receives the reference video provided by the reference source, it obtains the reference clock frequency from the reference video, sends the reference clock frequency to the clock synchronization processing module, and sends the reference video to the second extraction module. The clock synchronization processing module receives video data, decoded frame header signal and reference clock frequency, and synchronously outputs video data and decoded frame header signal consistent with the reference clock frequency to the synchronization output module. When the second extracting module receives the reference video, it extracts the reference frame header signal of the reference video, and sends the reference frame header signal to the synchronous output module; wherein, the reference frame header signal is used to indicate each video frame of the reference video frame header position. The synchronous output module receives video data, decoded frame header signal and reference frame header signal, determines the start output time of the video data according to the decoded frame header signal and the reference frame header signal, and outputs the video data according to the start output time . The clock synchronization processing module can synchronize the decoded video with the reference video in the clock domain according to the reference clock frequency, and then the synchronization output module can synchronize the decoded video with the reference video in the data domain according to the decoded frame header signal and the reference frame header signal, thereby realizing Double synchronization of decoded video and reference video in clock domain and data domain. Since each channel of decoded video is synchronized with the reference video, the video synchronization processing method provided by the embodiment of the present invention is applied, and the output video data of each channel is double-synchronized in the clock domain and the data domain, thus maintaining the stability of the broadcast TV picture , improving people's viewing effect.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的方法的具体工作过程,可以参考前述装置实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the method described above can refer to the corresponding process in the foregoing device embodiment, which will not be repeated here.

本发明实施例提供的视频同步处理方法,与上述实施例提供的视频同步处理装置具有相同的技术特征,所以也能解决相同的技术问题,达到相同的技术效果。The video synchronization processing method provided in the embodiment of the present invention has the same technical features as the video synchronization processing device provided in the above embodiment, so it can also solve the same technical problem and achieve the same technical effect.

附图中的流程图和框图显示了根据本发明的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

在本发明的描述中,需要说明的是,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "first", "second", and "third" are used for description purposes only, and should not be understood as indicating or implying relative importance.

本发明实施例所提供的进行视频同步处理方法的计算机程序产品,包括存储了处理器可执行的非易失的程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行前面方法实施例中所述的方法,具体实现可参见方法实施例,在此不再赘述。The computer program product for performing the video synchronization processing method provided by the embodiment of the present invention includes a computer-readable storage medium storing processor-executable non-volatile program code, and the instructions included in the program code can be used to execute the preceding method For the method described in the embodiment, the specific implementation may refer to the method embodiment, and details are not repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that: the above-described embodiments are only specific implementations of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting them, and the scope of protection of the present invention is not limited thereto, although referring to the foregoing The embodiment has described the present invention in detail, and those skilled in the art should understand that any person familiar with the technical field can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention Changes can be easily thought of, or equivalent replacements are made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of the present invention within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1. a kind of audio video synchronization processing unit, which is characterized in that described device includes the first extraction module, clock frequency recovery mould Block, clock synchronization process module, the second extraction module and synchronous output module;
First extraction module is used to extract the decoding of the decoding video when receiving the decoding video of video source offer Header signal, and synchronize to be sent to the clock synchronous by video data and the decoding header signal in the decoding video Processing module;Wherein, the decoding header signal is used to indicate the frame header position of each video frame of the decoding video;
The clock frequency recovery module is used to obtain from the reference video when receiving the reference video of reference source offer It takes reference clock frequency, and the reference clock frequency is sent to the clock synchronization process module, and by the reference Video is sent to second extraction module;
The clock synchronization process module is for receiving the video data, the decoding header signal and reference clock frequency Rate, and synchronism output and the consistent video data of the reference clock frequency and header signal is decoded to the synchronism output mould Block;
Second extraction module is used for when receiving the reference video, extracts the reference frame head letter of the reference video Number, and the synchronous output module is sent to reference to header signal by described;Wherein, described to be used to indicate institute with reference to header signal State the frame header position of each video frame of reference video;
The synchronous output module for receive the video data, the decoding header signal and it is described refer to header signal, According to the decoding header signal and the starting output time for determining the video data with reference to header signal, and according to institute State the starting output time output video data.
2. the apparatus according to claim 1, which is characterized in that first extraction module is specifically used for:
The synchronization signal of the decoding video is obtained, the synchronization signal includes horizontal synchronizing signal, vertical synchronizing signal and field Synchronization signal;The decoding header signal of the decoding video is extracted according to the synchronization signal.
3. the apparatus of claim 2, which is characterized in that first extraction module includes:
First extraction unit is used for when the decoding video is interlaced scanning video, according to the variation of the field sync signal Extract the decoding header signal of the decoding video in position;
Second extraction unit is used for when the decoding video is progressive scanned video, according to the change of the vertical synchronizing signal Change position and the horizontal synchronizing signal extracts the decoding header signal of the decoding video.
4. the apparatus according to claim 1, which is characterized in that the clock synchronization process module includes writing unit, deposits Storage unit and reading output unit;
Said write unit is used to for the received video data and the decoding header signal to be synchronously written the storage single Member;
The storage unit is for storing the received video data and the decoding header signal;
The reading output unit is synchronous to read what the storage unit stored for the reference clock frequency based on the received The video data and the decoding header signal, and by the video data of reading it is synchronous with the decoding header signal hair It send to the synchronous output module.
5. device according to claim 4, which is characterized in that said write unit is also used to occur when the storage unit The last one video when overflow, before the current video frame of the video data to be repeatedly written to the storage unit overflow The corresponding storage region of frame;
The reading output unit is also used to when storage underflow occurs in the storage unit, and repetition is read under the storage unit The last one video frame stored before overflowing.
6. the apparatus according to claim 1, which is characterized in that the synchronous output module is specifically used for:
It is synchronous to read the received video data, the decoding header signal and described with reference to header signal;When reading When stating decoding header signal, stop reading the decoding video, continue to read it is described with reference to header signal, and will after read The time with reference to header signal is determined as the starting output time;The time output video is exported according to the starting Data.
7. the apparatus according to claim 1, which is characterized in that described device further includes delay adjustment module;
The delay adjustment module is used to adjust the decoding header signal and the relative time delay with reference between header signal, And the relative time delay is sent to the synchronous output module;
The synchronous output module is specifically also used to receive the relative time delay, determines that the starting is defeated according to the relative time delay Time out, and the time output video data is exported according to the starting.
8. a kind of audio video synchronization processing method, which is characterized in that the method is applied in such as any one of claims 1 to 7 institute In the audio video synchronization processing unit stated;The described method includes:
When first extraction module receives the decoding video of video source offer, the decoding frame head of the decoding video is extracted Signal, and by video data and the decoding header signal in the decoding video synchronize be sent to the clock synchronization process Module;Wherein, the decoding header signal is used to indicate the frame header position of each video frame of the decoding video;
When the clock frequency recovery module receives the reference video of reference source offer, ginseng is obtained from the reference video It examines clock frequency, and the reference clock frequency is sent to the clock synchronization process module, and by the reference video It is sent to second extraction module;
The clock synchronization process module receives the video data, the decoding header signal and the reference clock frequency, And synchronism output and the consistent video data of the reference clock frequency and header signal is decoded to the synchronous output module;
When second extraction module receives the reference video, the reference header signal of the reference video is extracted, and The synchronous output module is sent to reference to header signal by described;Wherein, described to be used to indicate the ginseng with reference to header signal Examine the frame header position of each video frame of video;
The synchronous output module receives the video data, the decoding header signal and described with reference to header signal, according to The decoding header signal and the starting output time that the video data is determined with reference to header signal, and according to described Begin the output time output video data.
9. according to the method described in claim 8, it is characterized in that, described mention when first extraction module receives video source When the decoding video of confession, the decoding header signal of the decoding video is extracted, comprising:
When first extraction module receives the decoding video of video source offer, the synchronous letter of the decoding video is obtained Number, the synchronization signal includes horizontal synchronizing signal, vertical synchronizing signal and field sync signal;
The decoding header signal of the decoding video is extracted according to the synchronization signal.
10. according to the method described in claim 8, it is characterized in that, described according to the decoding header signal and the reference Header signal determines the starting output time of the video data, comprising:
It is synchronous to read the received video data, the decoding header signal and described with reference to header signal;When reading When stating decoding header signal, stop reading the decoding video, continue to read it is described with reference to header signal, and will after read The time with reference to header signal is determined as the starting output time.
CN201710483258.5A 2017-06-22 2017-06-22 Video synchronization processing device and method Active CN107277295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710483258.5A CN107277295B (en) 2017-06-22 2017-06-22 Video synchronization processing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710483258.5A CN107277295B (en) 2017-06-22 2017-06-22 Video synchronization processing device and method

Publications (2)

Publication Number Publication Date
CN107277295A CN107277295A (en) 2017-10-20
CN107277295B true CN107277295B (en) 2019-10-18

Family

ID=60068125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710483258.5A Active CN107277295B (en) 2017-06-22 2017-06-22 Video synchronization processing device and method

Country Status (1)

Country Link
CN (1) CN107277295B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108089834B (en) * 2017-11-07 2021-04-30 潍坊歌尔电子有限公司 Playing synchronization method and device and USB sound card
CN109644290B (en) * 2018-11-02 2022-03-08 上海极清慧视科技有限公司 Data switching device, data acquisition device, system and method
WO2020087590A1 (en) * 2018-11-02 2020-05-07 上海极清慧视科技有限公司 Data transfer device, data acquisition device, system, and method
CN110636219B (en) * 2019-09-03 2020-12-01 北京三快在线科技有限公司 Video data stream transmission method and device
CN114500986B (en) * 2021-12-20 2024-12-10 北京镁伽科技有限公司 FPGA-based timing synchronization method, device and PG equipment
CN116112615A (en) * 2023-02-08 2023-05-12 北京镁伽机器人科技有限公司 Video frame synchronization method and device under high-speed interface

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1543193A (en) * 2003-03-31 2004-11-03 索尼英国有限公司 video synchronization
CN1588988A (en) * 2004-07-29 2005-03-02 联合信源数字音视频技术(北京)有限公司 Synchronous control device and control method for video elecoding and display
CN1859567A (en) * 2006-03-07 2006-11-08 华为技术有限公司 Digital TV decoding method and system
JP2008022436A (en) * 2006-07-14 2008-01-31 Sony Corp Video signal processing apparatus, and video signal processing method
JP2008148239A (en) * 2006-12-13 2008-06-26 Sony Corp Video equipment and jitter/wander measurement method
CN101924884A (en) * 2010-06-26 2010-12-22 大连捷成实业发展有限公司 Digital video signal switching circuit and switching method
CN103686315A (en) * 2012-09-13 2014-03-26 深圳市快播科技有限公司 Synchronous audio and video playing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1543193A (en) * 2003-03-31 2004-11-03 索尼英国有限公司 video synchronization
CN1588988A (en) * 2004-07-29 2005-03-02 联合信源数字音视频技术(北京)有限公司 Synchronous control device and control method for video elecoding and display
CN1859567A (en) * 2006-03-07 2006-11-08 华为技术有限公司 Digital TV decoding method and system
JP2008022436A (en) * 2006-07-14 2008-01-31 Sony Corp Video signal processing apparatus, and video signal processing method
JP2008148239A (en) * 2006-12-13 2008-06-26 Sony Corp Video equipment and jitter/wander measurement method
CN101924884A (en) * 2010-06-26 2010-12-22 大连捷成实业发展有限公司 Digital video signal switching circuit and switching method
CN103686315A (en) * 2012-09-13 2014-03-26 深圳市快播科技有限公司 Synchronous audio and video playing method and device

Also Published As

Publication number Publication date
CN107277295A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
CN107277295B (en) Video synchronization processing device and method
TWI623225B (en) Video playback method and control terminal thereof
US6429902B1 (en) Method and apparatus for audio and video end-to-end synchronization
US7787578B2 (en) Method and apparatus for synchronizing multimedia data stream
WO2016107496A1 (en) Video frame processing method, video processing chip, motion estimation and motion compensation chip
US20160066055A1 (en) Method and system for automatically adding subtitles to streaming media content
US10887646B2 (en) Live streaming with multiple remote commentators
CN100428798C (en) A digital TV decoding method and system
CN112616062B (en) Subtitle display method and device, electronic equipment and storage medium
CN112601101A (en) Subtitle display method and device, electronic equipment and storage medium
KR101787424B1 (en) Mechanism for clock recovery for streaming content being communicated over a packetized communication network
CN106063283A (en) Method and apparatus for synchronizing playbacks at two electronic devices
CN101076120B (en) Strong system for maintaining audio frequency/video frequency synchronization
KR100864009B1 (en) Audio / Video Synchronization Method
JP4893849B2 (en) Image processing system
JP6127311B2 (en) 3D playback device, television receiver, 3D playback method, program, and storage medium storing program
CN105338426A (en) Correction method for time stamp in transport stream and device thereof
US8855212B2 (en) System and method for AV synchronization of encoder data
CN209881957U (en) Image display device and stereoscopic image processing circuit
JP5632711B2 (en) Transmitting apparatus, receiving apparatus and transmission system
US7600240B2 (en) Data processing apparatus and method
KR102129126B1 (en) Method and apparatus for syncronizing a plurality of videos
CN112188181B (en) Image display device, stereoscopic image processing circuit and synchronization signal correction method thereof
US20060257108A1 (en) Multimedia reproduction apparatus
CN115474065B (en) Subtitle processing method and device, electronic equipment 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250217

Address after: Room 4010, 4th Floor, Building 1, No. 15 Kaituo Road, Shangdi Information Industry Base, Haidian District, Beijing 100080

Patentee after: Beijing Digital Video Hardware Technology Co.,Ltd.

Country or region after: China

Patentee after: BEIJING SUMAVISION TECHNOLOGIES Co.,Ltd.

Address before: 100085 Haidian District, Beijing, Shanghai Information Industry Base Development Road 15, 1 buildings.

Patentee before: BEIJING SUMAVISION TECHNOLOGIES Co.,Ltd.

Country or region before: China