Time sequence protection method and device for video image transmission and electronic equipment
By acquiring and comparing timing signal parameters in the video image transmission system, the lack of inspection of complex timing conditions of ISP and multi-sensors in the prior art is solved, and effective inspection of timing signals and stable operation of the system is realized.
Patent Information
- Application Number
- CN202510143656.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-27
AI Technical Summary
There is a lack of special timing checking methods for ISP timing and complex timing conditions of multiple sensors in the prior art, resulting in image frame drops, poor display effects or internal modules stuck.
By obtaining the Nth frame timing data of the video, the timing signal parameters are obtained using the counter count, and compared with the parameters in the configurable parameter table to check the correctness of the timing signal parameters. In case of incomplete correctness, the timing data output of the latest or specified image sensor is read out from memory, or the timing data output is paused.
It realizes effective inspection of ISP timing and complex timing conditions of multiple sensors, avoids the problems of image frame drop and poor display effect, and ensures the stable operation of the system.
Smart Images

Figure CN120223980A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and more particularly, to a timing protection method, device, and electronic device for video image transmission. Background Art
[0002] In a traditional ISP chip, if the timing signal input to the ISP system is interfered with, resulting in the transmission of data signals that do not conform to the standard protocol, the ISP system has no dedicated means to handle this situation, which may lead to image frame loss, poor display effects, or even the internal modules freeze and stop working.
[0003] In traditional timing protection designs, there is no timing protection for the internal ISP system in digital circuit designs. For analog circuit designs, the structure is relatively simple and cannot be applied to digital circuits. Some patents detect timing signals from the outside of the digital circuit. When an error is detected, a reset signal for the entire digital circuit system is given, and only single regular level signals such as clock signals and strobe signals can be checked. There is no dedicated timing check for ISP timing and complex multi-sensor timing situations. Summary of the Invention
[0004] Embodiments of the present invention provide a timing protection method, device, and electronic device for video image transmission, so as to at least solve the problem in the prior art that there is no dedicated timing check for ISP timing and complex multi-sensor timing situations.
[0005] According to one aspect of the embodiments of the present invention, a timing protection method for video image transmission is provided, including: obtaining the timing data of the Nth frame of a video, where the timing data includes image data and related signals; counting the timing data of the Nth frame by a counter to obtain the timing signal parameters corresponding to the timing data of the Nth frame; comparing the timing signal parameters corresponding to the timing data of the Nth frame with the corresponding timing signal parameters in a configurable parameter table, where the configurable parameter table is written with the timing signal parameters corresponding to X image sensors, and X is less than N, to check the correctness of the timing signal parameters corresponding to the timing data of the Nth frame; in the case where the timing signal parameters corresponding to the timing data of the Nth frame are not completely correct, reading out the timing data of the Mth frame from the memory for output, where the timing data of the Mth frame is the latest frame of timing data saved in the memory, or the timing data of the Mth frame is the latest frame of timing data corresponding to a specified image sensor saved in the memory; or, pausing the output of timing data.
[0006] Optionally, before obtaining the timing data of the Nth frame of the video, the method further includes: obtaining the timing data of the first Y frames of the video, and obtaining the timing signal parameters corresponding to X image sensors according to the timing data of the first Y frames and storing them in the configurable parameter table, where the timing signal parameters corresponding to different image sensors are different.
[0007] Optionally, the timing data corresponding to X image sensors in the timing data of the first Y frames is stored in X address spaces in the memory.
[0008] Optionally, the method further includes: when the timing signal parameters corresponding to the timing data of the Nth frame are correct, writing the timing data of the Nth frame into a specified address space in the memory.
[0009] Optionally, the specified address space is the address space in the X address spaces that stores the target timing data, and the target timing data corresponds to the same image sensor as the timing data of the Nth frame.
[0010] Optionally, after obtaining the timing data of the Nth frame of the video, the method further includes: writing the timing data of the Nth frame into a specified address space in the memory; when the timing signal parameters corresponding to the timing data of the Nth frame are not completely correct, deleting the timing data of the Nth frame from the specified address space; when the timing signal parameters corresponding to the timing data of the Nth frame are correct, deleting the target timing data from the memory, where the target timing data corresponds to the same image sensor as the timing data of the Nth frame.
[0011] Optionally, X + 1 address spaces in the memory are used to store the timing data of the video, and the specified address space is the idle address space among the X + 1 address spaces.
[0012] Optionally, each address space corresponds to a counter respectively, and the count value of the counter is used to indicate the image sensor currently corresponding to the address space, and the count value of the counter corresponding to the idle address space is 0.
[0013] According to another aspect of the embodiments of the present application, a timing protection device for video image transmission is provided, including: an acquisition unit configured to acquire the timing data of the Nth frame of a video, where the timing data includes image data and related signals; a counting unit configured to count the timing data of the Nth frame through a counter to obtain the timing signal parameters corresponding to the timing data of the Nth frame; an inspection unit configured to compare the timing signal parameters corresponding to the timing data of the Nth frame with the corresponding timing signal parameters in a configurable parameter table to check the correctness of the timing signal parameters corresponding to the timing data of the Nth frame, where the configurable parameter table is written with the timing signal parameters corresponding to X image sensors, and X is less than N; a processing unit configured to, when the timing signal parameters corresponding to the timing data of the Nth frame are not completely correct, read out the timing data of the Mth frame from the memory for output, where the timing data of the Mth frame is the latest frame of timing data saved in the memory, or the timing data of the Mth frame is the latest frame of timing data corresponding to a specified image sensor saved in the memory; or, pause the output of the timing data.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, characterized in that a computer program is stored in the storage medium, and the computer program is configured to execute the above-mentioned timing protection method for video image transmission when running.
[0015] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned timing protection method for video image transmission.
[0016] In an embodiment of the present invention, the Nth frame of timing data of a video is obtained, where the timing data includes image data and related signals; the Nth frame of timing data is counted by a counter to obtain timing signal parameters corresponding to the Nth frame of timing data; the timing signal parameters corresponding to the Nth frame of timing data are compared with the corresponding timing signal parameters in a configurable parameter table to check the correctness of the timing signal parameters corresponding to the Nth frame of timing data. The timing signal parameters of X image sensors are written in the configurable parameter table, and X is less than N; in the case where the timing signal parameters corresponding to the Nth frame of timing data are not completely correct, the Mth frame of timing data is read out from the memory for output, where the Mth frame of timing data is the latest frame of timing data saved in the memory, or the Mth frame of timing data is the latest frame of timing data corresponding to a specified image sensor saved in the memory; or, the output of timing data is paused. By making full use of the counter and the configurable parameter table inside the digital circuit, the conventional ISP timing signals can be checked, and other non-conventional signals can be checked through parameter configuration, so as to realize the check of the timing signals in the complex situation of multiple sensors, thus solving the problem in the prior art that there is no special timing check for ISP timing and the complex timing situation of multiple sensors. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0018] Figure 1 is a hardware structure block diagram of a mobile terminal for an optional timing protection method for video image transmission according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of an optional timing protection method for video image transmission according to an embodiment of the present invention;
[0020] Figure 3 is a working principle diagram of an optional timing protection device for ISP out-of-order transmission according to an embodiment of the present invention;
[0021] Figure 4 is an optional timing protection device diagram for video image transmission according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0024] The embodiment of the timing protection method for video image transmission provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the operation on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a timing protection method of video image transmission according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal 10 may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal 10 may further include more or fewer components than those Figure 1 shown in the figure, or have a different configuration from that Figure 1 shown in the figure.
[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the timing protection method for video image transmission in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the mobile terminal 10 through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0026] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the mobile terminal 10. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a timing protection method for video image transmission is also provided. Figure 2 is a flowchart of the timing protection method for video image transmission according to the embodiments of the present invention, as Figure 2 shown, the process of the timing protection method for video image transmission includes the following steps:
[0028] Step S202, obtain the timing data of the Nth frame of the video, and the timing data includes image data and related signals.
[0029] Step S204, count the timing data of the Nth frame through a counter to obtain the timing signal parameters corresponding to the timing data of the Nth frame.
[0030] Step S206, compare the timing signal parameters corresponding to the timing data of the Nth frame with the corresponding timing signal parameters in the configurable parameter table to check the correctness of the timing signal parameters corresponding to the timing data of the Nth frame. The timing signal parameters corresponding to X image sensors are written in the configurable parameter table, and X is less than N.
[0031] Step S208, when the timing signal parameters corresponding to the Nth-frame timing data are not completely correct, read out the Mth-frame timing data from the memory for output. The Mth-frame timing data is the latest frame of timing data stored in the memory, or the Mth-frame timing data is the latest frame of timing data corresponding to the specified image sensor stored in the memory; or, when the timing signal parameters corresponding to the Nth-frame timing data are not completely correct, suspend the output of the timing data.
[0032] Among them, a fixed image sensor can be specified in advance, or other strategies can be used to determine the specified sensor, and this embodiment does not limit this.
[0033] Among them, if the timing signal parameters corresponding to the Nth-frame timing data are the same as a certain timing signal parameter in the configurable parameter table, it means that the timing signal parameters corresponding to the Nth-frame timing data are correct, and it can be determined that the image sensor corresponding to the timing signal parameter successfully matched in the configurable parameter table is the image sensor corresponding to the Nth-frame timing data. If the timing signal parameters corresponding to the Nth-frame timing data are not completely the same as any timing signal parameter in the configurable parameter table, it means that the timing signal parameters corresponding to the Nth-frame timing data are not completely correct, and at this time, the image sensor corresponding to the Nth-frame timing data cannot be determined.
[0034] It should be noted that there can be multiple types of timing signal parameters. Then, each type of timing signal parameter corresponds to a counter.
[0035] In this embodiment, the timing protection method for video image transmission includes but is not limited to being applied to: image processing IP, image processing chips, and other products related to ISP.
[0036] The above configurable parameter table can be used to configure the timing signal parameters, and the timing signal parameters are used to check the correctness of the timing signal parameters.
[0037] In this embodiment, the value of X can be 4, that is, a configurable parameter table corresponding to 4 sensors can be configured. If the relevant accurate parameters of the timing signal are given in advance, the self-check function of the parameters is turned off (because the parameters are given in advance, so there is no need to enable the parameter self-check), and at the same time, relevant parameters are configured in the parameter table. According to which frame the input data is, the register parameter information of the corresponding sensor is selected to compare with the input timing signal; if the relevant accurate parameters of the timing are not given, the self-check function of the parameters is enabled, and the parameter self-check module will check the timing parameter information of the first 4 frames and fill in the configurable parameter table. The data of the first four frames is not output, and the timing signals of the subsequent frames are checked.
[0038] Configure the inspection items and specific parameters of the ISP timing signal using a configurable parameter table and a counter, so as to check various parameters of the timing signal instead of just whether a single-level signal is stable, and realize the inspection of the timing signal in the complex situation of multiple sensors.
[0039] Through the embodiments provided in this application, obtain the timing data of the Nth frame of the video. The timing data includes image data and related signals; count the timing data of the Nth frame through a counter to obtain the timing signal parameters corresponding to the timing data of the Nth frame; compare the timing signal parameters corresponding to the timing data of the Nth frame with the corresponding timing signal parameters in the configurable parameter table to check the correctness of the timing signal parameters corresponding to the timing data of the Nth frame. The timing signal parameters corresponding to X image sensors are written into the configurable parameter table, where X is less than N; in the case where the timing signal parameters corresponding to the timing data of the Nth frame are not completely correct, read out the timing data of the Mth frame from the memory and output it. The timing data of the Mth frame is the latest frame of timing data saved in the memory, or the timing data of the Mth frame is the latest frame of timing data corresponding to the specified image sensor saved in the memory; or, pause the output of the timing data. By making full use of the counter and the configurable parameter table inside the digital circuit, it is possible to check the conventional ISP timing signal, and check other non-conventional signals through parameter configuration, so as to realize the inspection of the timing signal in the complex situation of multiple sensors, thus solving the problem in the prior art that there is no dedicated timing inspection for ISP timing and the complex timing situation of multiple sensors.
[0040] Optionally, before obtaining the timing data of the Nth frame of the video, the above method may further include: obtaining the timing data of the first Y frames of the video, and obtaining the timing signal parameters corresponding to X image sensors according to the timing data of the first Y frames and storing them in the configurable parameter table, where the timing signal parameters corresponding to different image sensors are different.
[0041] Among them, the timing data corresponding to X image sensors in the first Y frames of timing data is stored in X address spaces in the memory.
[0042] Among them, the value of Y can be determined according to the actual situation. Suppose the maximum number of channels supported in the actual operation scenario (or configuration before leaving the factory) is 4, that is, at most 4 channels of image sensor image data are supported. Then, the value of Y can be 4. If only 2 image sensors are applicable in the actual scenario, the value of X is 2. Correspondingly, the minimum value of N can be 5, that is, the timing detection starts from the 5th frame.
[0043] Optionally, the above method may further include: in the case where the timing signal parameters corresponding to the timing data of the Nth frame are correct, write the timing data of the Nth frame into the specified address space in the memory.
[0044] Among them, the specified address space is the address space for storing the target timing data among X address spaces, and the target timing data corresponds to the same image sensor as the Nth frame of timing data.
[0045] In this embodiment, only X address spaces are used to store the timing data. When it is determined that the Nth frame of timing data is correct, it is stored in the memory in a covering manner.
[0046] Optionally, after obtaining the Nth frame of timing data of the video, the above method may further include: writing the Nth frame of timing data into the specified address space in the memory; deleting the Nth frame of timing data from the specified address space when the timing signal parameters corresponding to the Nth frame of timing data are not completely correct; deleting the target timing data from the memory when the timing signal parameters corresponding to the Nth frame of timing data are correct, and the target timing data corresponds to the same image sensor as the Nth frame of timing data.
[0047] Among them, X + 1 address spaces in the memory are used to store the timing data of the video, and the specified address space is the free address space among the X + 1 address spaces.
[0048] Each address space corresponds to a counter respectively, and the count value of the counter is used to indicate the image sensor currently corresponding to the address space, and the count value of the counter corresponding to the free address space is 0.
[0049] The address space for deleting the timing data is the free address space.
[0050] As an optional embodiment, the present application also provides a timing protection device for ISP out-of-order transmission. As Figure 3 shown, the working principle diagram of the timing protection device for ISP out-of-order transmission.
[0051] The device for executing the timing protection method for ISP out-of-order transmission includes: a parameter self-checking module, a timing judgment module, a ddr read / write control module, and an output logic control module.
[0052] Parameter self-checking module: The external signal inputs the ISP timing to this module, which can check the configuration of the relevant signal parameters of the isp timing, configure the timing parameters of 4 sensors to the configurable parameter table, and can also customize the relevant parameters of the input signal, configure the relevant timing parameters using the configurable parameter table, and can also use the counter inside the parameter self-checking module to check the relevant isp timing parameters. As shown in Table 1, the parameter configuration table for a single sensor.
[0053]
[0054]
[0055] Table 1 Parameter configuration table for a single sensor
[0056] The above Table 1 is the configurable parameter table for a single sensor. In this embodiment, there are 4 configurable parameter tables corresponding to 4 sensors. If the relevant accurate parameters of the timing are given in advance, the parameter self-check function is turned off, and at the same time, relevant parameters are configured in the parameter table. According to which frame the input data is, the register parameter information of the corresponding sensor is selected to be compared with the input timing signal. If the relevant accurate parameters of the timing are not given, the self-check function of the parameters is enabled. The parameter self-check module will check the timing parameter information of the first 4 frames and fill in the configurable parameter table. The data of the first four frames is not output, and the timing signals of the subsequent frames are checked.
[0057] In this embodiment, the main contents checked by the parameter self-check module include: the correctness of the frame synchronization signal and whether there are bubbles. The correctness of the line synchronization signal, the rising time point, the duration of the high level, and whether the total number of hsync in one frame of image is correct. The correctness of the data valid signal and whether there are bubbles in the valid signal. The correctness of the data signal. The correctness of the custom signal.
[0058] The inspection items of the timing signal are listed in the parameter configuration table in Step 1, and whether any item is inspected can be configured; the timing information of 4 sensors is supported to be configured. The inspection of the timing correctness is mainly to count the parameters of the current frame timing signal data through a counter inside the module and compare them with the corresponding parameters in the configurable parameter table.
[0059] Timing judgment logic module: Obtains signals from the parameter self-check module and is responsible for using counters and comparators to check the correctness of the frame synchronization signal, line synchronization signal, and related data transmission signal parameters (such as data valid signal and data signal, etc.) in the isp timing.
[0060] Among them, there are two modes of timing inspection: ddr mode and no_ddr mode.
[0061] The ddr mode specifically includes:
[0062] First, it is determined whether the input signal is the first-frame image signal. If so, while the module checks whether the isp signal is correct, it writes data to the ddr. If it is detected that the isp signal of this frame is incorrect, the module stops writing data to the ddr, clears the addr (address), and at the same time does not output any data to other modules; if the data is correct, the time_right_flag signal sent by the ddr read / write control module and the output logic control module is pulled high. When the second-frame data is input into the timing logic judgment module, the isp data in the ddr is read out (the data read at this time is the correct isp timing data of the first frame just checked); if the input signal is not the first frame, if the data is correct, the judgment logic is the same as that of the first frame; if the data is incorrect, the time_right_flag signal sent by the ddr read / write control module is pulled low, and the correct signal of the previous frame stored in the ddr is read out when the next-frame signal is input.
[0063] The no_ddr mode specifically includes:
[0064] In this mode, the ddr read / write control module does not work; the timing judgment logic module instantaneously checks the isp timing signal in this mode. If the timing is correctly transmitted, the time_right_flag signal sent to the output logic control module is pulled high, and the signal is instantaneously output without a one-frame delay. If a dvp timing error occurs, the time_right_flag signal sent to the output logic control module is pulled low until it is checked that the entire frame of dvp signal is correct, and then the time_right_flag signal is directly pulled high for the next frame.
[0065] It should be noted that the time when time_right_flag is pulled low is after checking the end of a complete frame. Because if checks on hsync, data quantity, etc. are enabled, the result can only be obtained after counting a complete frame.
[0066] The ddr read / write control module: When to write data to the ddr is controlled by the timing judgment logic, and when to read data is controlled by the output logic. The timing judgment logic writes the completely correct timing signal into the ddr cache; when the timing judgment logic module detects that the input isp timing is incorrect, according to the output mode configured by the output logic control module, the correct data is read out from the ddr cache as the output of the isp signal.
[0067] In this embodiment, the ddr read / write control module only takes effect when it is set to the ddr mode in step two.
[0068] The DDR cache needs to store data for two frames. Therefore, two address spaces 1 and 2 are reserved. One frame of data stored in address space 1 is the completely correct ISP data of the previous frame of the image, and one frame of data stored in address space 2 is the current frame data. When storing the current frame data, if a timing error is immediately detected, the address of storage space 2 is cleared. If the current frame data is correct (when it is determined that the current frame data is correct, the data in the address space storing the current frame has already been stored), that is, when the time_right_flag signal is pulled high, the address of storage space 1 (the data storing the correct signal of the previous frame is cleared because the correct data of the current frame has been saved, and even if the signal of the next frame is out of order, only the correct signal of the current frame will be used) is cleared. The ISP data of the next frame is stored in address space 1, and so on in a cycle.
[0069] Among them, the write of the DDR is controlled by the timing judgment logic, and the read is controlled by the output logic. The timing judgment logic will write the completely correct timing signal into the DDR; when the timing judgment logic module finds that the input ISP timing is incorrect, it reads the data from the DDR according to the set output mode.
[0070] Output logic control module: The input signal of this module is connected to the timing judgment logic and the DDR read / write control module to control the output ISP timing.
[0071] In this embodiment, this module selects different output methods according to the configured output mode. When the output logic control module needs to read data from the DDR, it sends a read request signal to the DDR read / write control module.
[0072]
[0073] In this embodiment, the inspection items and specific parameters of the ISP timing signal are configured by using the configurable parameter table and the parameter self-check module, so as to realize the inspection of various parameters of the timing signal rather than whether a single-level signal is stable, and realize the inspection of the timing signal in the complex situation of multiple sensors.
[0074] The DDR is used to cache the timing signal, and the timing can be correctly output even when the ISP is out of order, maintaining the image display effect.
[0075] The time_right_flag signal and the no_DDR mode make an immediate judgment and output of the timing signal, without using the DDR cache, saving resources.
[0076] In this embodiment, the correctness of the ISP timing signal is checked. By making full use of the counter and configurable parameter table inside the digital circuit, not only can the conventional ISP timing signal be checked, but also other non-conventional signals can be checked through parameter configuration. It can also check the same timing signal under different timing parameter standards for different sensors. For different delay and timing requirements, there are two timing protection modes. One is a working mode that utilizes the ddr cache, enabling the timing to be transmitted normally even when an error occurs. The other is a resource-saving working mode that masks the timing signal when the timing is in error.
[0077] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0078] In this embodiment, a timing protection device for video image transmission is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0079] Figure 4 is a structural block diagram of a timing protection device for video image transmission according to an embodiment of the present invention. As Figure 4 shown, the timing protection device for video image transmission includes:
[0080] An acquisition unit 41, configured to acquire the timing data of the Nth frame of the video, where the timing data includes image data and related signals.
[0081] A counting unit 43, configured to count the timing data of the Nth frame through a counter to obtain the timing signal parameters corresponding to the timing data of the Nth frame.
[0082] An inspection unit 45, configured to compare the timing signal parameters corresponding to the timing data of the Nth frame with the corresponding timing signal parameters in the configurable parameter table to check the correctness of the timing signal parameters corresponding to the timing data of the Nth frame. The timing signal parameters corresponding to X image sensors are written in the configurable parameter table, and X is less than N.
[0083] A processing unit 47, configured to read out and output the M-th frame of timing data from the memory when the timing signal parameters corresponding to the N-th frame of timing data of the video are not completely correct, where the M-th frame of timing data is the latest frame of timing data stored in the memory, or the M-th frame of timing data is the latest frame of timing data corresponding to a specified image sensor stored in the memory; or, pause the output of the timing data.
[0084] Through the embodiments provided in this application, an acquisition unit 41 acquires the N-th frame of timing data of a video, where the timing data includes image data and related signals; a counting unit 43 counts the N-th frame of timing data through a counter to obtain the timing signal parameters corresponding to the N-th frame of timing data; an inspection unit 45 compares the timing signal parameters corresponding to the N-th frame of timing data with the corresponding timing signal parameters in a configurable parameter table to check the correctness of the timing signal parameters corresponding to the N-th frame of timing data, and the timing signal parameters corresponding to X image sensors are written in the configurable parameter table, where X is less than N; when the timing signal parameters corresponding to the N-th frame of timing data are not completely correct, the processing unit 47 reads out and outputs the M-th frame of timing data from the memory, where the M-th frame of timing data is the latest frame of timing data stored in the memory, or the M-th frame of timing data is the latest frame of timing data corresponding to a specified image sensor stored in the memory; or, pause the output of the timing data. By making full use of the counter and the configurable parameter table inside the digital circuit, the conventional ISP timing signals can be inspected, and other non-conventional signals can be inspected through parameter configuration, so as to realize the inspection of the timing signals in the complex situation of multiple sensors, thereby solving the technical problem in the prior art that there is no dedicated timing inspection for ISP timing and the complex timing situation of multiple sensors.
[0085] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.
[0086] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0087] Optionally, in this embodiment, the above storage medium can be configured to store a computer program for executing the following steps:
[0088] S1, acquire the N-th frame of timing data of a video, where the timing data includes image data and related signals;
[0089] S2. Count the Nth frame of timing data through a counter to obtain the timing signal parameters corresponding to the Nth frame of timing data;
[0090] S3. Compare the timing signal parameters corresponding to the Nth frame of timing data with the corresponding timing signal parameters in the configurable parameter table to check the correctness of the timing signal parameters corresponding to the Nth frame of timing data. The timing signal parameters corresponding to X image sensors are written in the configurable parameter table, where X is less than N;
[0091] S4. In the case where the timing signal parameters corresponding to the Nth frame of timing data are not completely correct, read out the Mth frame of timing data from the memory for output. The Mth frame of timing data is the latest frame of timing data saved in the memory, or the Mth frame of timing data is the latest frame of timing data corresponding to the specified image sensor saved in the memory; or, pause the output of the timing data.
[0092] Optionally, in this embodiment, the above storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk, or optical disc, etc., various media that can store computer programs.
[0093] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0094] Optionally, the above electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0095] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0096] S1. Obtain the Nth frame of timing data of the video, where the timing data includes image data and related signals;
[0097] S2. Count the Nth frame of timing data through a counter to obtain the timing signal parameters corresponding to the Nth frame of timing data;
[0098] S3. Compare the timing signal parameters corresponding to the Nth frame of timing data with the corresponding timing signal parameters in the configurable parameter table to check the correctness of the timing signal parameters corresponding to the Nth frame of timing data. The timing signal parameters corresponding to X image sensors are written in the configurable parameter table, where X is less than N;
[0099] S4. When the timing signal parameters corresponding to the timing data of the Nth frame are not completely correct, read out the timing data of the Mth frame from the memory for output. The timing data of the Mth frame is the latest frame of timing data stored in the memory, or the timing data of the Mth frame is the latest frame of timing data corresponding to the specified image sensor stored in the memory; or, suspend the output of the timing data.
[0100] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.
[0101] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A timing protection method for video image transmission, characterized in that: include: Acquire the Nth frame of time series data of the video, wherein the time series data includes image data and related signals; Counting the Nth frame of timing data by a counter to obtain a timing signal parameter corresponding to the Nth frame of timing data; Compare the timing signal parameters corresponding to the Nth frame timing data with the corresponding timing signal parameters in a configurable parameter table to check the correctness of the timing signal parameters corresponding to the Nth frame timing data, wherein the timing signal parameters corresponding to X image sensors are written into the configurable parameter table, and X is less than N; When the timing signal parameters corresponding to the Nth frame timing data are not completely correct, the Mth frame timing data is read out from the memory for output, the Mth frame timing data is the latest frame timing data stored in the memory, or the Mth frame timing data is the latest frame timing data corresponding to the specified image sensor stored in the memory; or, the timing data output is paused.
2. The method according to claim 1, characterized in that Before obtaining the Nth frame timing data of the video, the method further includes: The first Y frames of timing data of the video are obtained, and timing signal parameters corresponding to X image sensors are obtained according to the first Y frames of timing data and stored in the configurable parameter table, wherein the timing signal parameters corresponding to different image sensors are different.
3. The method according to claim 2, characterized in that The time series data corresponding to X image sensors in the first Y frames of time series data are stored in X address spaces in the memory.
4. The method according to claim 3, characterized in that The method further comprises: When the timing signal parameters corresponding to the Nth frame timing data are correct, the Nth frame timing data is written into a designated address space in the memory.
5. The method according to claim 4, characterized in that The designated address space is an address space in the X address spaces that stores target timing data, and the target timing data and the Nth frame timing data correspond to the same image sensor.
6. The method according to claim 3, characterized in that After obtaining the Nth frame time sequence data of the video, the method further includes: Writing the Nth frame of timing data into a specified address space in the memory; When the timing signal parameters corresponding to the Nth frame timing data are not completely correct, deleting the Nth frame timing data from the designated address space; In a case where the timing signal parameters corresponding to the Nth frame timing data are correct, the target timing data is deleted from the memory, and the target timing data and the Nth frame timing data correspond to the same image sensor.
7. The method according to claim 4 or 6, characterized in that: The X+1 address spaces in the memory are used to store the timing data of the video, and the designated address space is a free address space in the X+1 address spaces.
8. The method according to claim 7, characterized in that Each address space corresponds to a counter. The count value of the counter is used to indicate the image sensor currently corresponding to the address space. The count value of the counter corresponding to the idle address space is 0.
9. A timing protection device for video image transmission, characterized in that: include: An acquisition unit, used to acquire the Nth frame time series data of the video, wherein the time series data includes image data and related signals; A counting unit, configured to count the N-th frame of timing data through a counter to obtain a timing signal parameter corresponding to the N-th frame of timing data; a checking unit, configured to compare the timing signal parameters corresponding to the N-th frame timing data with the corresponding timing signal parameters in a configurable parameter table, to check the correctness of the timing signal parameters corresponding to the N-th frame timing data, wherein the timing signal parameters corresponding to X image sensors are written into the configurable parameter table, and X is less than N; A processing unit is used to read out the Mth frame timing data from the memory and output it when the timing signal parameters corresponding to the Nth frame timing data are not completely correct, the Mth frame timing data is the latest frame timing data stored in the memory, or the Mth frame timing data is the latest frame timing data corresponding to the specified image sensor stored in the memory; or, suspend the output of timing data.
10. An electronic device for timing protection of video image transmission, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.