CN113286108B - Interface mode configuration method and device, electronic equipment and storage medium - Google Patents

Interface mode configuration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113286108B
CN113286108B CN202110413731.9A CN202110413731A CN113286108B CN 113286108 B CN113286108 B CN 113286108B CN 202110413731 A CN202110413731 A CN 202110413731A CN 113286108 B CN113286108 B CN 113286108B
Authority
CN
China
Prior art keywords
video
target
interface mode
video format
received
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
CN202110413731.9A
Other languages
Chinese (zh)
Other versions
CN113286108A (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.)
Shenzhen Pango Microsystems Co Ltd
Original Assignee
Shenzhen Pango Microsystems 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 Shenzhen Pango Microsystems Co Ltd filed Critical Shenzhen Pango Microsystems Co Ltd
Priority to CN202110413731.9A priority Critical patent/CN113286108B/en
Publication of CN113286108A publication Critical patent/CN113286108A/en
Application granted granted Critical
Publication of CN113286108B publication Critical patent/CN113286108B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • 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/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses an interface mode configuration method and device, electronic equipment and a storage medium, and relates to the field of data transmission. Wherein, the method comprises the following steps: acquiring the rate of video data received by a receiving end; determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode; determining whether a video format of the video data and the target video format are synchronized; and if the video format of the video data is synchronous with the target video format, configuring the interface mode of the receiving end into the target interface mode. According to the method and the device, when the video data are changed, the receiving end is self-adaptively switched to the interface mode matched with the rate according to the rate of the video data, the video format of the mode of the target interface is kept synchronous with the video format of the video data, and then the normal transmission of the video data is guaranteed.

Description

Interface mode configuration method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data transmission, and in particular, to an interface mode configuration method and apparatus, an electronic device, and a storage medium.
Background
A Digital component Serial Interface (SDI) is used to transmit uncompressed and unencrypted Digital video signals, while it may also transmit other auxiliary data such as audio signals during the video blanking interval.
However, the SDI interface has more and more complex digital video signals to be transmitted due to the various frame rate types of the digital video signals, and cannot normally transmit the digital video signals when the digital video signals are changed.
Disclosure of Invention
In view of the foregoing problems, the present application provides an interface mode configuration method, apparatus, electronic device and storage medium to solve or partially solve the foregoing problems.
In a first aspect, an embodiment of the present application provides an interface mode configuration method, where the method includes: acquiring the rate of video data received by a receiving end; determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode; determining whether a video format of the video data and the target video format are synchronized; and if the video format of the video data is synchronous with the target video format, configuring the interface mode of the receiving end into the target interface mode.
In a second aspect, an embodiment of the present application provides an interface mode configuration apparatus, where the interface mode configuration apparatus includes: the device comprises a rate acquisition module, a target video format acquisition module, a synchronization determination module and a configuration module. Wherein: the rate acquisition module is used for acquiring the rate of the video data received by the receiving end; the target video format acquisition module is used for determining a target interface mode according to the rate and acquiring a target video format corresponding to the target interface mode; the synchronization determining module is used for determining whether the video format of the video data and the target video format are synchronous; the configuration module is configured to configure the interface mode of the receiving end to the target interface mode if the video format of the video data and the target video format synchronize the video data and the target interface mode.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the interface mode configuration method of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the interface mode configuration method according to the first aspect.
According to the interface mode configuration method, the interface mode configuration device, the electronic equipment and the storage medium, the rate of video data received by a receiving end is obtained, a target interface mode is determined according to the rate, and a target video format corresponding to the target interface mode is obtained; then determining whether the video format of the video data and the target video format are synchronous; if the video format of the video data is synchronous with the target video format, the interface mode of the receiving end is configured to be the target interface mode, so that when the video data is changed, the receiving end can adaptively switch the interface mode according to the rate of the video data, and keep the video format corresponding to the target interface mode synchronous with the video format of the video data, thereby ensuring that the video data can be normally and stably transmitted in the target interface mode.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an application environment of an interface mode configuration method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating an interface mode configuration method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating an interface mode configuration method according to another embodiment of the present application.
Fig. 4 is a flow chart of a method for providing one embodiment of S203 in the interface mode configuration method shown in fig. 3 according to the present invention.
Fig. 5 is a diagram illustrating a complete timing sequence of a video frame according to an embodiment of the present application.
Fig. 6 is a diagram illustrating a relationship between states in a frame synchronization state machine according to an embodiment of the present application.
Fig. 7 is a flowchart illustrating an interface mode configuration method according to another embodiment of the present application.
Fig. 8 is a flowchart illustrating an interface mode configuration method according to still another embodiment of the present application.
Fig. 9 is a functional block diagram of an interface mode configuration apparatus according to an embodiment of the present application.
Fig. 10 shows a block diagram of an electronic device provided according to an embodiment of the present application.
Fig. 11 illustrates a storage medium provided according to an embodiment of the present application and used for storing or carrying program codes for implementing an interface mode configuration method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In digital communication systems, a digital component serial interface is typically employed to transmit uncompressed and unencrypted digital video signals.
The inventor finds that, at present, the interface protocols and frame rates of digital video signals are various, which causes the process of transmitting digital video signals by the digital component serial interface to become more and more complex, for example, in the process of transmitting digital video signals, if the interface protocols or frame rates are switched and changed, a video format that can be received by a receiving end and a video format of video data actually received by the receiving end may be out of synchronization, which causes that the transmitting end and the receiving end cannot meet the requirement of frame synchronization. The frame synchronization is to search and identify the synchronous code word from the received data stream, and the time slot is used as the head of a frame, so that the frame structure of the receiving end is completely consistent with that of the transmitting end, thereby ensuring that two switches can work synchronously, and realizing correct receiving and switching of digital information.
Therefore, in the process of transmitting the digital video signal, if the interface protocol or the frame rate is changed, the digital component serial interface cannot normally transmit the digital video signal.
Therefore, in view of the above problems, the inventor proposes an interface mode configuration method, an apparatus, an electronic device, and a storage medium in this embodiment of the application, in which when video data changes, a receiving end adaptively switches to an interface mode matched with a rate according to the rate of the video data, and keeps a video format of a mode of a target interface synchronized with a video format of the video data, thereby ensuring normal transmission of the video data.
Referring to fig. 1 again, fig. 1 is a schematic diagram illustrating an application environment of the interface mode configuration method according to the embodiment of the present application, where the application environment may be a video data transmission system 100, and the video data transmission system 100 may include a sending end 110 and a receiving end 120, where data transmission may be performed between the sending end 110 and the receiving end 120, and the receiving end 120 is configured with an SDI interface, and may receive video data sent by the sending end 110 through the SDI interface. The SDI interface may have a plurality of interface modes, such as HD-SDI interface mode, 3G-SDI interface mode, SD-SDI interface mode, and the like.
Alternatively, the sender 110 and the recipient 120 may be various electronic devices with functions of displaying, data transmitting, supporting data inputting, and the like, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, wearable electronic devices, and the like.
Referring to fig. 2, fig. 2 shows an interface mode configuration method according to an embodiment of the present application, where the method may be applied to the video data transmission system 100 shown in fig. 1, and specifically may be applied to the receiving end 120 of the video data transmission system 100, and the interface mode configuration method may include:
s101, acquiring the rate of the video data received by the receiving end.
The video data may be one or more frames of video images, i.e., video frames.
The rate of the video data is a transmission rate of the video data between the sending end and the receiving end, and may also be regarded as a rate of the receiving end receiving the video data.
In some embodiments, the SDI interface configured at the receiving end may detect a rate of receiving the video data, thereby obtaining the rate of the video data.
And S102, determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode.
In some embodiments, the different rates correspond to different interface modes in advance, for example, the interface modes of the SDI interface include standard definition SD-SDI, high definition standard HD-SDI, and 3G-SDI, wherein the SD-SDI interface mode corresponds to a rate of 270Mb/s, the HD-SDI interface mode corresponds to a rate of 1.485Gb/s, and the 3G-SDI interface mode corresponds to a rate of 2.97Gb/s. After the rate of the video data is obtained, the corresponding interface mode can be directly determined according to the rate of the video data, so that the target interface mode is obtained. As an example, when the receiving end receives video data with a rate of 1.485Gb/s, for example, it determines the HD-SDI interface mode as the target interface mode. And when video data with the rate of 2.97Gb/s is received, determining that the 3G-SDI interface mode is the target interface mode.
The video format may include a resolution and a frame rate of the video data, for example, the video format may be 1920 × 1080p, and the frame rate may be 50Hz.
Since different interface modes can transmit different video formats, after the target interface mode is determined, the video format corresponding to the target interface mode can be determined. For example, the HD-SDI interface can output an image with a resolution of 1920 × 1080 and a frame rate of 50Hz. Therefore, when the target interface mode is the HD-SDI interface mode, the target video format may be determined to have a resolution of 1920 × 1080p and a frame rate of 50hz.
In other embodiments, after obtaining the rate of the video data, the SDI interface of the receiving end may increase the rate by a specified multiple and output the increased rate. Optionally, the SDI interface may further detect whether the rate of the video data is a specified multiple of the rate corresponding to the preset interface mode, and if so, determine that the preset interface mode is the target interface mode according to the rate. As an example, for example, a speed of 1/1.001 times is specified, and when video data at a rate of 1.485/1.001Gb/s is received, since the rate corresponding to the HD-SDI interface mode is 1.485Gb/s, the rate of the video data is exactly 1/1.001 times the rate corresponding to the HD-SDI interface mode. It is possible to determine the HD-SDI interface mode as the target interface mode.
In practical application, as an example, for example, the SDI can automatically switch to an interface mode corresponding to 4 speeds of 1.485Gb/s, 1.485/1.001Gb/s, 2.97Gb/s, and 2.97/1.001Gb/s according to a video data automatic switching mode received by the receiving end, and if signals of two speeds of 1.485/1.001Gb/s or 2.97/1.001Gb/s are received, output a speed indication of 1/1.001 speed to increase the speed. And when receiving the 1.485Gb/s and 1.485/1.001Gb/s rate signals, outputting an HD-SDI indication to determine the HD-SDI interface mode as the target interface mode, and when receiving the 2.97Gb/s and 2.97/1.001Gb/s rate signals, outputting a 3G-SDI indication to determine the 3G-SDI interface mode as the target interface mode.
S103, determining whether the video format of the video data and the target video format are synchronous.
As an example, if the target video format is 1920 × 1080p, and the frame rate is 50Hz, it may be determined that the video format of the video data is synchronized with the target video format if it is detected that the video format of the video data is 1920 × 1080p, and the frame rate is 50Hz. If it is detected that the video format of the video data is switched to the video format with the resolution of 1920 × 1080p and the frame rate of 60Hz, it may be determined that the video format of the video data is not synchronized with the target video format, and at this time, the frame rate of the video data is switched, which causes that the video format of the video data is not synchronized with the video format that can be output by the target interface mode, so that the SDI interface cannot normally output the video data in the target interface mode.
And S104, if the video format of the video data is synchronous with the target video format, configuring the interface mode of the receiving end into a target interface mode.
When the video format of the video data is synchronous with the target video format, the video data can be normally output by the SDI interface in the target interface mode, so that the interface mode of the receiving end can be configured to be the target interface mode, and the video data can be normally and stably output by the SDI interface in the target interface mode.
Therefore, in this embodiment, the rate of the video data received by the receiving end is obtained, the target interface mode is determined according to the rate, and the target video format corresponding to the target interface mode is obtained; then determining whether the video format of the video data and the target video format are synchronous; if the video format of the video data is synchronous with the target video format, the interface mode of the receiving end is configured to be the target interface mode, so that when the video data is changed, the receiving end can adaptively switch the interface mode according to the rate of the video data, and the video format corresponding to the target interface mode is kept synchronous with the video format of the video data, thereby ensuring that the video data can be normally and stably transmitted in the target interface mode.
Referring to fig. 3, fig. 3 shows an interface mode configuration method according to another embodiment of the present application, where the method may be applied to the video data transmission system 100 shown in fig. 1, and specifically may be applied to the receiving end 120 of the video data transmission system 100, and the interface mode configuration method may include:
s201, acquiring the rate of the video data received by the receiving end, wherein the video data comprises the current video frame.
S202, determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode.
The embodiments of S201 to S202 can be similar to those of S101 to S102, and are not described herein.
S203, determining whether a target instruction is received, wherein the target instruction comprises at least one of a switching instruction and a resetting instruction.
In some embodiments, the receiving end may be configured with a frame synchronization state machine, and the SDI interface may detect whether the video format of the video data and the video format corresponding to the interface mode are synchronized, i.e., perform frame synchronization. The target instruction may be an instruction for starting a frame synchronization state machine for synchronization detection. The frame synchronization state machine may detect in real time whether a target instruction is received, and optionally, the target instruction may be automatically generated when the SDI interface meets a specified condition, or may be automatically input by a user. The switching instruction may be an instruction for instructing the SDI interface to perform interface mode switching, for example, video data is switched from the 3G-SDI to the HD-SDI, or the HD-SDI is switched to the 3G-SDI. The reset instruction may be an instruction for instructing the frame synchronization state machine to reset.
In other embodiments, as shown in fig. 4, S203 may include the following steps:
s2031, acquiring the current interface mode of the receiving end.
As one way, the receiving end may detect data output by the SDI interface in the current interface mode, and determine the current interface mode according to a video format of the data output by the current interface mode. As an example, for example, if the output video format is 1920 × 1080p in resolution and the frame rate is 50Hz, it may be determined that the current interface mode is the HD-SDI interface mode.
S2032, if the current interface mode is inconsistent with the target interface mode, determining that a switching instruction is received.
In the above example, if the target interface mode determined from the video data is the 3G-SDI interface mode, it indicates that the receiving end needs to switch the SDI interface from the HD-SDI interface mode to the 3G-SDI interface mode, and therefore, a switching instruction is generated to instruct only the SDI interface to switch from the HD-SDI interface mode to the 3G-SDI interface mode, so that it may be determined that the switching instruction is received.
In this embodiment, by acquiring the current interface mode of the receiving end, and determining that the switching instruction is received if the current interface mode is inconsistent with the target interface mode, the frame synchronization state machine can be started more flexibly and effectively.
S204, if the target instruction is received, whether a start mark of the current video frame is received or not is determined.
Referring to fig. 5, in fig. 5, a complete timing sequence of a video frame is shown, wherein the video frame includes a start flag (hereinafter referred to as SAV), an end flag (hereinafter referred to as EAV), active video, and blank video, wherein the blank video is not displayed, and when a receiving end receives a correct SAV and a correct EAV, it can be determined that a video frame is received. When the receiving end receives the target instruction, it may detect whether the start flag of the current video frame is received. If the start mark is received, it can be determined that the receiving end starts to receive the current video frame.
S205, if the start flag of the current video frame is received, determining whether the effective length of the current video frame exceeds a first length threshold and whether the end flag of the current video frame is received.
Referring to fig. 5 again, the effective length is the effective video length in fig. 5. It is understood that the length refers to the number of pixels. Specifically, the effective length may be represented by m, which represents that the effective length is m pixel points. The total length of the current video frame can be obtained by adding the effective video length of the current video frame to the blanking video length, and the total length can be represented by n, which represents that the total length is n pixel points.
It is understood that the video format of the video frame can be determined according to the effective length and the total length, for example, when n =2640, m =1920, the video format can be determined as a resolution 1920 × 1080p frame rate 50Hz, that is, the resolution 1920 × 1080p, the frame rate 50Hz corresponds to the effective length =2640, and the total length =1920, so that different video formats can correspond to different effective lengths and total lengths.
The first length threshold may be an effective length +4 corresponding to a video format with a largest effective length in all video formats that can be supported by the SDI interface. If the effective length of the current video frame does not exceed the first length threshold, the effective length of the current video frame can be ensured to have a video format which can be supported.
When the end mark of the current video frame is received, the current video frame can be determined to be completely received; when the end flag of the current video frame is not received, it may be determined that the current video frame is not completely received.
S206, if the effective length does not exceed the first length threshold and the end mark of the current video frame is received, determining the total length of the current video frame according to the start mark and the end mark.
In some embodiments, an interface counter may be configured in the SDI interface, and the interface counter may record the number of pixels, see fig. 5 again, since the current video frame is divided into the active video and the blanking video by the start flag and the end flag. The interface counter can record the number of pixel points, so that the start mark and the end mark can be combined, for example, the value of the effective length m can be determined by using the interface counter and eav, and the value of the total length n can be determined by using the interface counter and sav.
And S207, if the effective length and the total length are matched with the target video format, determining that the video format of the video data is synchronous with the target video format.
Following the above example, for example, the target video format is 1920 × 1080p, the frame rate is 50Hz, and if the effective length n =2640 and the total length m =1920, it may be determined that the effective length and the total length match the target video format, and then it may be determined that the video format of the video data is synchronized with the target video format.
And S208, if the effective length and the total length are not matched with the target video format, determining that the video format of the video data is not synchronous with the target video format.
In some embodiments, the video format of the video data and the target video format are determined to be out of synchronization if the total length of the current video frame exceeds the second length threshold.
The second length threshold may be a total length corresponding to a video format with a largest effective length among all video formats that can be supported by the SDI interface. If the total length of the current video frame does not exceed the second length threshold, it can be ensured that the total length of the current video frame has a video format that can be supported.
Therefore, when the total length of the current video frame exceeds the second length threshold, it may be determined that the total length of the current video frame does not have a supportable video format, so that the target video format cannot be supported, and it is determined that the video format of the video data is not synchronous with the target video format.
In this embodiment, if the total length of the current video frame exceeds the second length threshold, it is determined that the video format of the video data and the target video format are not synchronized, so that whether the video format of the video data and the target video format are synchronized can be quickly and effectively detected.
In some embodiments, if the video format of the video data and the target video format are not synchronized, the operation of determining whether the target instruction is received is returned. Therefore, the frame synchronization state machine can circularly detect whether the video format of the received new video data is synchronous with the target video format or not, and automatically configure the interface mode of the receiving end into the target interface mode until the video format is synchronous with the target video format, so that the video data can be normally output in the target interface mode.
S209, if the video format of the video data is synchronous with the target video format, configuring the interface mode of the receiving end as the target interface mode.
The specific implementation of S209 may refer to S104, and therefore is not described herein.
In practical applications, as shown in fig. 6, as an example, the Frame synchronization state machine may be a Frame Align FSM state machine, the Frame synchronization state machine may have 4 states, respectively UNLOCK, SAV, EAV and LOCKED, and specifically, the transition relationship between the 4 states of the Frame synchronization state machine may be as shown in table 1:
TABLE 1
Figure BDA0003025042460000111
Wherein in the conversion condition, "(| rstn) | | change" indicates that a reset instruction or a switch instruction is received; "sav" indicates that a start flag (sav) is received; MAX _ M represents the maximum effective length value of +4 for supporting video formats; MAX _ N represents the maximum overall length value supporting the video format; trs _ cnt (M) < = MAX _ M & & eav denotes that an end flag (eav) is received, and the value of the effective length M actually collected by the interface counter does not exceed MAX _ M; trs _ cnt > MAX _ M & (| sav) indicates that the end flag (eav) is not received and the value of the effective length M actually collected by the interface counter exceeds MAX _ M; else represents others; and trs _ cnt (N) > MAX _ N represents that the value of the total length N actually acquired by the interface counter exceeds MAX _ N. the value collected by the sav and eav timing error counter represented by trs _ err _ cnt is used to count the number of consecutive sav and eav timing errors in LOCKED state, and trs _ err _ cnt = =4 indicates that 4 error flags are detected in total, for example, 2 consecutive start flags and 2 consecutive end flags are detected as timing errors, that is, the video formats of two consecutive video frames received by the receiving end are not synchronous with the target video format, and at this time, it is necessary to return to UNLOCK state and re-search for a reset instruction or a switch instruction.
When the frame synchronization state machine is in a LOCKED state, it can be indicated that the video format of the video data is synchronized with the target video format, and the SDI interface can normally output the video data in the target interface mode.
When video data are normally transmitted, the SDI interface is configured to automatically detect the state of an interface Mode, the video data are switched from a 3G format to an HD format, the Mode Scan FSM state machine outputs a change indication signal, at the moment, a lock signal of the Frame Align FSM state machine is pulled down, then an sav signal is received, the value of the total length n is determined, then an eav signal is received, the value of the effective length m is determined, if the value of n and the value of m can be matched with the HD-SDI format, the lock signal is pulled up, the Frame synchronization state machine enters a LOCKED state, and the digital video signals can be normally transmitted.
In the present embodiment, by determining whether a target instruction is received; if a target instruction is received, determining whether a starting mark of a current video frame is received; if a start mark of the current video frame is received, determining whether the effective length of the current video frame exceeds a first length threshold value and whether an end mark of the current video frame is received; if the effective length does not exceed the first length threshold and an end mark of the current video frame is received, determining the total length of the current video frame according to the start mark and the end mark; if the effective length and the total length are matched with the target video format, the video format of the video data is determined to be synchronous with the target video format, so that whether the data format of the video data is synchronous with the target video format or not can be accurately and effectively detected by using a start mark, an end mark, the effective length and the total length in the video data.
Referring to fig. 7, fig. 7 shows an interface mode configuration method according to another embodiment of the present application, which may be applied to the video data transmission system 100 shown in fig. 1, and in particular, may be applied to the receiving end 120 of the video data transmission system 100, and the interface mode configuration method may include:
s301, acquiring the rate of the video data received by the receiving end, wherein the video data comprises a current video frame and a plurality of video frames received after the current video frame.
S302, determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode.
S303, determining whether a target instruction is received, wherein the target instruction comprises at least one of a switching instruction and a resetting instruction.
S304, if the target instruction is received, determining whether a start mark of the current video frame is received.
S305, if the start flag of the current video frame is received, determine whether the effective length of the current video frame exceeds a first length threshold and whether the end flag of the current video frame is received.
S306, if the effective length exceeds the first length threshold and the end mark of the current video frame is received, determining the total length of the current video frame according to the start mark and the end mark.
S307, if the effective length and the total length are matched with the target video format, the video format of the video data is determined to be synchronous with the target video format.
The embodiments of S301 to S307 refer to S201 to S207, and therefore are not described herein.
S308, if the video format of the video data is synchronous with the target video format, acquiring the continuous specified number of video frames received by the receiving end after the current video frame.
As an example, for example, the video data includes a first video frame, a second video frame, a third video frame, and a fourth video frame, wherein the first video frame is a current video frame, and the specified number is 2, the second video frame and the third video frame can be taken out from the four video frames.
S309, it is determined whether the video formats of the consecutive specified number of video frames are synchronized with the target video format.
For carrying out the above example, it may be determined whether the video formats of the second video frame and the third video frame are synchronized with the target video format, respectively, where an implementation of determining whether the video formats of the second video frame and the third video frame are synchronized with the target video format may refer to the above determined implementation of whether the video formats of the current video frame and the target video format are synchronized, and specifically refer to S204 to S207, which is not described herein again.
S310, if the video formats of the consecutive specified number of video frames are not synchronized with the target video format, returning to perform the operation of determining whether a start flag of new video data is received.
Taking the above example as a support, if the video format of the second video frame and the video format of the third video frame are not synchronized with the target video format, the operation of determining whether to receive the start flag of the new video data may be performed in return, i.e., the operations S304 to S310 may be performed in return, and this is circulated until the video formats of a specified number of consecutive video frames in the new video data received by the receiving end are synchronized with the target video format.
S311, if the video formats of the consecutive specified number of video frames are synchronized with the target video format, configuring the interface mode of the receiving end as the target interface mode.
In practical applications, when determining whether the video formats of a specified number of consecutive video frames are synchronized with the target video format, it may be determined whether the number of timing errors of the start flag and the end flag exceeds a threshold number of times, and since one video frame includes one start flag and one end flag, when the timing of one start flag and the timing of one end flag in succession is erroneous, it may indicate that the one video frame is not synchronized with the target video format. Therefore, when the number of times of the sequential errors of the start flag and the end flag is continuously detected to be twice the designated number, it can be determined that the video format of the video frames of the designated number is not synchronized with the target video format. Wherein the number threshold is twice the specified number.
As an example, take table 1 as an example, where the sav and eav timing error counter of trs _ err _ cnt is used to count consecutive sav and eav timing errors in LOCKED state. While waiting for the LOCKED state sav, when trs _ cnt (n) = n1 and sav! Tr _ err _ cnt is incremented by 1 when =1, and is cleared when trs _ cnt (n) = n1 and sav = 1. While waiting for the LOCKED state eav, when trs _ cnt (m) = m1 and eav! Trs _ err _ cnt is incremented by 1 if 1, and is cleared when trs _ cnt (m) = m1 and eav = 1. Wherein n1 is the total length corresponding to the target video format, and m1 is the effective length corresponding to the target video format.
Alternatively, when the number of timing errors exceeds the number threshold, it may return to performing the operation of determining whether the start flag of new video data is received; and if the time sequence error frequency does not exceed the frequency threshold value, configuring the interface mode of the receiving end into a target interface mode.
In consideration of the situation that the video data fluctuates in the actual transmission process, in this embodiment, if the video format of the video data is synchronous with the target video format, the specified number of consecutive video frames received by the receiving end after the current video frame is obtained; determining whether a video format of a specified number of consecutive video frames is synchronized with a target video format; if the video formats of the continuous specified number of video frames are not synchronous with the target video format, returning to execute the operation of determining whether a start mark of new video data is received; if the video formats of the continuous specified number of video frames are synchronous with the target video format, the interface mode of the receiving end is configured to be the target interface mode, so that whether the video formats of the video data are synchronous with the target video format or not is continuously detected, and the stable and normal transmission of the video data is further ensured.
Referring to fig. 8, fig. 8 shows an interface mode configuration method according to still another embodiment of the present application, which may be applied to the video data transmission system 100 shown in fig. 1, and in particular, may be applied to the receiving end 120 of the video data transmission system 100, and the interface mode configuration method may include:
s401, acquiring the rate of the video data received by the receiving end.
S402, determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode.
S403, it is determined whether the video format of the video data and the target video format are synchronized.
S404, if the video format of the video data is synchronous with the target video format, the interface mode of the receiving end is configured to be the target interface mode.
The specific implementation of S401 to S404 can refer to S101 to S104, and therefore, is not described herein.
S405, if the video format of the video data is not synchronous with the target video format, a standby interface mode is obtained, wherein the video format corresponding to the standby interface mode is different from the video format corresponding to the target interface mode.
As an example, for example, the SDI interface of the receiving end has an HD-SDI interface mode, a 3G-SDI interface mode, and if the target interface mode is the HD-SDI interface mode, the 3G-SDI interface mode is the standby interface mode.
S406, whether the video format of the video data and the video format corresponding to the standby interface mode are synchronous is determined.
For a specific implementation of determining whether the video format of the video data and the video format corresponding to the standby interface mode are synchronous, reference may be made to the implementation of determining whether the video format of the video data and the video format corresponding to the target interface mode are synchronous in the foregoing embodiment, which is not described herein again.
And S407, if the video format of the video data is synchronous with the video format corresponding to the standby interface mode, configuring the interface mode of the receiving end into the standby interface mode.
In practical applications, as an example, when the SDI interface is configured to automatically detect the SDI mode, for example, the HD-SDI interface mode may be detected first by default, a receiver clock of the SDI interface is configured to be 74.25MHz, whether a video format corresponding to the HD-SDI interface mode is synchronized with a video format of the received video data, that is, whether the HD-SDI video format is supported by the video data, is detected by a frame synchronization state machine, a frame synchronization indication signal is output if the video data is detected to be a legal HD-SDI video format, the receiver clock of the SDI interface is configured to be 148.5MHz if a frame synchronization duration threshold is exceeded, the video format corresponding to the 3G-SDI interface mode is detected to be synchronized with the video format of the received video data, that is, that the 3G-SDI video format is supported by the video data, and the frame synchronization indication signal is output if the video data is detected to be a legal 3G-SDI video format; and if the frame synchronization time length threshold is exceeded, configuring the SDI IP receiving end clock to be 74.25MHz, detecting whether the newly received video data support the HD-SDI video format, and circulating.
In this embodiment, if the video format of the video data is not synchronous with the target video format, the standby interface mode is obtained, where the video format corresponding to the standby interface mode is different from the video format corresponding to the target interface mode; determining whether the video format of the video data and the video format corresponding to the standby interface mode are synchronous; if the video format of the video data is synchronous with the video format corresponding to the standby interface mode, the interface mode of the receiving end is configured to be the standby interface mode, so that the interface mode of the SDI interface can be adaptively adjusted when the video data is switched, the synchronous condition of the video format is detected, and the switched video data can be normally transmitted.
Referring to fig. 9, which shows an interface mode configuration apparatus 500 according to an embodiment of the present application, the interface mode configuration apparatus 500 includes: a rate acquisition module 510, a target video format acquisition module 520, a synchronization determination module 530, and a configuration module 540. Wherein:
a rate obtaining module 510, configured to obtain a rate of the video data received by the receiving end.
The target video format obtaining module 520 is configured to determine a target interface mode according to the rate, and obtain a target video format corresponding to the target interface mode.
A synchronization determining module 530 for determining whether the video format of the video data and the target video format are synchronized.
The configuration module 540 is configured to configure the interface mode of the receiving end as the target interface mode if the video format of the video data and the target video format synchronization video data are synchronized with the target interface mode.
Optionally, the video data includes a current video frame, and the synchronization determining module 530 includes:
and the target instruction receiving submodule is used for determining whether a target instruction is received, and the target instruction comprises at least one of a switching instruction and a resetting instruction.
And the starting mark receiving submodule is used for determining whether the starting mark of the current video frame is received or not if the target instruction is received.
And the end mark receiving submodule is used for determining whether the effective length of the current video frame exceeds a first length threshold value and whether an end mark of the current video frame is received if the start mark of the current video frame is received.
And the total length determining submodule is used for determining the total length of the current video frame according to the starting mark and the ending mark if the effective length does not exceed the first length threshold and the ending mark of the current video frame is received.
And the matching determination sub-module is also used for determining the video format of the video data to be synchronous with the target video format if the effective length and the total length are matched with the target video format.
And the synchronization determining submodule is used for determining that the video format of the video data is not synchronous with the target video format if the effective length and the total length are not matched with the target video format.
Optionally, the synchronization determining sub-module is further configured to determine that the video format of the video data is not synchronized with the target video format if the total length of the current video frame exceeds the second length threshold.
Optionally, the interface mode configuration apparatus 500 further includes:
and the return execution module is used for returning and executing the operation of determining whether the target instruction is received or not if the video format of the video data is asynchronous with the target video format.
Optionally, configuring module 540, comprising:
and the video frame acquisition sub-module is used for acquiring the continuous specified number of video frames received by the receiving end after the current video frame if the video format of the video data is synchronous with the target video format.
And the video frame synchronization determining sub-module is used for determining whether the video formats of the continuous specified number of video frames are synchronized with the target video format.
And the return execution sub-module is used for returning and executing the operation of determining whether the start mark of the new video data is received or not if the video formats of the continuous specified number of video frames are not synchronous with the target video format.
And the configuration submodule is used for configuring the interface mode of the receiving end into a target interface mode if the video formats of the continuous specified number of video frames are synchronous with the target video format.
Optionally, the target instruction receiving submodule is further configured to obtain a current interface mode of the receiving end; and if the current interface mode is inconsistent with the target interface mode, determining that a switching instruction is received.
Optionally, the interface mode configuration apparatus 500 further includes:
and the standby interface mode acquisition module is used for acquiring a standby interface mode if the video format of the video data is asynchronous with the target video format, wherein the video format corresponding to the standby interface mode is different from the video format corresponding to the target interface mode.
A standby interface mode synchronization determining module 530, configured to determine whether a video format of the video data and a video format corresponding to the standby interface mode are synchronized.
The standby interface mode configuring module 540 is configured to configure the interface mode of the receiving end as the standby interface mode if the video format of the video data is synchronous with the video format corresponding to the standby interface mode.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 10, a block diagram of an electronic device provided in an embodiment of the present application is shown. The electronic device 600 may be the electronic device 600 capable of running the program in the foregoing embodiments. The electronic device 600 in the present application may include one or more of the following components: a processor 610, a memory 620, and one or more programs, wherein the one or more programs may be stored in the memory 620 and configured to be executed by the one or more processors 610, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
The processor 610 may include one or more processing cores. The processor 610 interfaces with various components throughout the electronic device 600 using various interfaces and circuitry to perform various functions of the electronic device 600 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 620 and invoking data stored in the memory 620. The processor 610 may be disposed at the receiving end 120 shown in fig. 1 and electrically connected to the SDI interface to control an interface mode of the SDI interface.
The Memory 620 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 620 may be used to store instructions, programs, code sets, or instruction sets. The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, and the like. The storage data area may also store data created by the terminal in use, and the like.
Referring to fig. 11, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer readable medium 700 has stored therein a program code 710, the program code 710 being capable of being invoked by a processor to perform the methods described in the method embodiments above.
The computer-readable storage medium 700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer readable storage medium has storage space for program code for performing any of the method steps of the above-described method. The program code can be read from or written to one or more computer program products. The program code may be compressed, for example, in a suitable form.
To sum up, according to the interface mode configuration method, the interface mode configuration device, the electronic device, and the storage medium provided in the embodiments of the present application, a rate of video data received by a receiving end is obtained, a target interface mode is determined according to the rate, and a target video format corresponding to the target interface mode is obtained; then determining whether the video format of the video data and the target video format are synchronous; if the video format of the video data is synchronous with the target video format, the interface mode of the receiving end is configured to be the target interface mode, so that when the video data is changed, the receiving end can adaptively switch the interface mode according to the rate of the video data, the video format corresponding to the target interface mode is kept synchronous with the video format of the video data, and the video data can be transmitted normally and stably in the target interface mode.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (9)

1. An interface mode configuration method, comprising:
acquiring the rate of video data received by a receiving end, wherein the video data comprises a current video frame;
determining a target interface mode according to the rate, and acquiring a target video format corresponding to the target interface mode;
determining whether a target instruction is received, wherein the target instruction comprises at least one of a switching instruction and a resetting instruction;
if the target instruction is received, determining whether a starting mark of the current video frame is received;
if the start mark of the current video frame is received, determining whether the effective length of the current video frame exceeds a first length threshold value and whether an end mark of the current video frame is received;
if the effective length does not exceed the first length threshold and an end mark of the current video frame is received, determining the total length of the current video frame according to the start mark and the end mark;
if the effective length and the total length are matched with the target video format, determining that the video format of the video data is synchronous with the target video format;
if the effective length and the total length are not matched with the target video format, determining that the video format of the video data is not synchronous with the target video format;
and if the video format of the video data is synchronous with the target video format, configuring the interface mode of the receiving end into the target interface mode.
2. The method of claim 1, further comprising:
and if the total length of the current video frame exceeds a second length threshold, determining that the video format of the video data is not synchronous with the target video format.
3. The method of claim 1, further comprising:
and if the video format of the video data is not synchronous with the target video format, returning to execute the operation of determining whether the target instruction is received.
4. The method according to claim 1, wherein the configuring the interface mode of the receiving end to the target interface mode if the video format of the video data is synchronized with the target video format comprises:
if the video format of the video data is synchronous with the target video format, acquiring continuous specified number of video frames received by the receiving end after the current video frame;
determining whether the video format of the specified number of consecutive video frames is synchronized with the target video format;
if the video formats of the continuous specified number of video frames are not synchronous with the target video format, returning to execute the operation of determining whether a start mark of a new current video frame is received;
and if the video formats of the continuous specified number of video frames are synchronous with the target video format, configuring the interface mode of the receiving end into the target interface mode.
5. The method of claim 1, wherein the determining whether a target instruction is received comprises:
acquiring a current interface mode of the receiving end;
and if the current interface mode is not consistent with the target interface mode, determining that a switching instruction is received.
6. The method according to any one of claims 1 to 5, further comprising:
if the video format of the video data is not synchronous with the target video format, acquiring a standby interface mode, wherein the video format corresponding to the standby interface mode is different from the video format corresponding to the target interface mode;
determining whether the video format of the video data and the video format corresponding to the standby interface mode are synchronous;
and if the video format of the video data is synchronous with the video format corresponding to the standby interface mode, configuring the interface mode of the receiving end into the standby interface mode.
7. An interface mode configuration apparatus, characterized in that the interface mode configuration apparatus comprises:
the system comprises a rate acquisition module, a rate acquisition module and a rate conversion module, wherein the rate acquisition module is used for acquiring the rate of video data received by a receiving end, and the video data comprises a current video frame;
the target video format acquisition module is used for determining a target interface mode according to the rate and acquiring a target video format corresponding to the target interface mode;
a synchronization determination module to:
determining whether a target instruction is received, wherein the target instruction comprises at least one of a switching instruction and a resetting instruction;
if the target instruction is received, determining whether a starting mark of the current video frame is received;
if the start mark of the current video frame is received, determining whether the effective length of the current video frame exceeds a first length threshold value and whether an end mark of the current video frame is received;
if the effective length does not exceed the first length threshold and an end mark of the current video frame is received, determining the total length of the current video frame according to the start mark and the end mark;
if the effective length and the total length are matched with the target video format, determining that the video format of the video data is synchronous with the target video format;
if the effective length and the total length are not matched with the target video format, determining that the video format of the video data is not synchronous with the target video format;
a configuration module, configured to configure the interface mode of the receiving end as the target interface mode if the video format of the video data and the target video format synchronize the video data and the target interface mode.
8. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that a program code is stored in the computer-readable storage medium, which program code can be called by a processor to execute the method according to any one of claims 1 to 6.
CN202110413731.9A 2021-04-16 2021-04-16 Interface mode configuration method and device, electronic equipment and storage medium Active CN113286108B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110413731.9A CN113286108B (en) 2021-04-16 2021-04-16 Interface mode configuration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110413731.9A CN113286108B (en) 2021-04-16 2021-04-16 Interface mode configuration method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113286108A CN113286108A (en) 2021-08-20
CN113286108B true CN113286108B (en) 2023-04-07

Family

ID=77276896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110413731.9A Active CN113286108B (en) 2021-04-16 2021-04-16 Interface mode configuration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113286108B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1647895B1 (en) * 2004-10-14 2010-03-24 Sony Corporation Video apparatus, video output control method, and reproduction control method
CN101764921A (en) * 2009-12-25 2010-06-30 大连科迪视频技术有限公司 3G-SDI digital video frame synchronization system
CN104703028B (en) * 2013-12-10 2017-09-12 深圳市朗驰欣创科技有限公司 A kind of frame of video correcting method, apparatus and system
CN105828012A (en) * 2016-03-31 2016-08-03 乐视控股(北京)有限公司 HDMI automatic configuration method, and correlation apparatus
CN112565204A (en) * 2020-11-19 2021-03-26 北京融讯科创技术有限公司 Control method and device for video data transmission and computer readable storage medium

Also Published As

Publication number Publication date
CN113286108A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN107087132B (en) Receiver and signal transmission method
CN103546453A (en) Cross-device multimedia playing method and device
EP1533708A2 (en) Signal transmitting apparatus and method
US8913196B2 (en) Video processing device and video processing method including deserializer
US8509315B1 (en) Maintaining synchronization of compressed data and associated metadata
EP2733619A1 (en) Electronic device with Thunderbolt interface, connecting method thereof, and docking apparatus
CN112422888B (en) Video splicing method and device, electronic equipment and computer readable storage medium
CN113286108B (en) Interface mode configuration method and device, electronic equipment and storage medium
CN112306932B (en) Method and chip for multiplexing interface protocol
CN113132552B (en) Video stream processing method and device
KR20210156768A (en) Image processing method, device, electronic equipment and readable storage medium
US10148934B2 (en) Image process apparatus and image process method
US20200374098A1 (en) Electronic apparatus and method for controlling the same, and non-transitory computer-readable storage medium
CN109672838B (en) Data conversion device and image transmission system
US20060077201A1 (en) Synchronous image-switching device and method thereof
CN113612938A (en) Multi-type adaptive resolution image conversion method and device
CN101502036A (en) Semiconductor integrated circuit and transmitter apparatus having the same
CN113031895A (en) Screen projection control method and device and electronic equipment
US6798922B1 (en) Image transmission method and image transmission device for realizing the same
JP4266477B2 (en) Information processing apparatus and control method thereof
JP6261696B2 (en) Image processing apparatus and control method thereof
CN217825156U (en) Image display system
JP6027739B2 (en) Video processing apparatus, video processing method, video processing system, and program
US8200873B2 (en) Editing system, computer, timing notice apparatus, computer program, and method for acquiring timing
KR100830457B1 (en) Image Decoder of Image Processor System

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