Method for synchronizing multiple decoding devices based on time codes
Through a time code-based method, multiple decoding devices are numbered and synchronized, which solves the problems of complexity and high cost of synchronization of multiple devices in the prior art, and realizes full frame synchronization and low-cost multi-device management.
Patent Information
- Application Number
- CN202411279182.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-20
AI Technical Summary
The prior art is difficult to achieve full frame synchronization of multiple decoding devices, and requires additional master device management, which increases system complexity and cost.
Using a time code-based method, the decoding device is numbered and synchronized through external or internal clocks, the smallest time code among all devices is found, and the time code synchronization of each video is realized, thus realizing multiple videos. Device synchronization.
Complete frame synchronization of multiple decoding devices is achieved, reducing system complexity and cost, and avoiding the need for additional device management.
Smart Images

Figure CN119172587A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of video processing, and in particular to a synchronization method for multiple decoding devices based on time codes. Background Art
[0002] At present, the requirements for video synchronization in the video field are getting higher and higher. In some scenes, complete synchronization is required. The difference can be seen with a single frame, which directly affects the visual experience. The output video ports of general decoding devices are limited, which is far from meeting the needs of dozens of video synchronization. Therefore, multiple devices are needed, but most devices cannot achieve synchronization, or can only synchronize a few frames, and cannot achieve complete frame synchronization.
[0003] Time code is a system used to mark and track individual frames or moments in a video sequence. That is, each frame in the video has a corresponding time code. Based on the characteristics of the time code, images corresponding to the same time are of the same scene, so synchronization can be achieved by using time code.
[0004] Synchronization between multiple devices is a difficult point. Each device is independent of each other and generally requires an additional master device to manage and schedule, which invisibly increases the complexity of the system and also increases costs. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a method for synchronizing multiple decoding devices based on time codes, which can achieve synchronization of multiple devices without the need for additional master device management, greatly reducing the complexity and cost of the system.
[0006] The technical solution adopted by the present invention to solve the technical problem is:
[0007] A method for synchronizing multiple decoding devices based on time codes, wherein the decoding devices are numbered 0, 1, 2, 3, ..., n in sequence;
[0008] Each decoding device has an external clock input port and a clock output port. The input port is connected to the upstream device, and the output port is connected to the downstream device. Each decoding device detects whether there is a clock input at the external clock input port. If there is, the external clock input is transparently transmitted to the clock output port, and the external input clock is used as the reference clock of the output video interface SDI or HDMI. If there is no external clock input, the internal clock of the device is used as the reference clock of the output video interface SDI or HDMI.
[0009] Find the minimum time code value among all devices, and send the minimum time code to each device in the order of device number n, ..., 2, 1, 0;
[0010] A decoding device has multiple SDI or HDMI video output interfaces. Each video channel corresponds to a set of time codes. Synchronization is performed based on the difference between the time code of each video channel and the minimum time code, thereby synchronizing multiple decoding devices.
[0011] Furthermore, the specific process of numbering the decoding devices is as follows:
[0012] Determine whether encoding device A has an external clock. If there is no external clock, the number is 0;
[0013] Send the number 0 of the upstream device A to the connected device B through the I2C communication interface;
[0014] Device B automatically adds 1 to the number received from device A and transmits it to downstream device C, and establishes the number of device B as 1;
[0015] Device C automatically adds 1 to the number of device B it receives and transmits it to downstream device D, and establishes the number of device C as 2;
[0016] According to the above numbering method, the encoding devices are numbered 0, 1, 2, 3, ..., n in sequence.
[0017] Furthermore, the specific process of finding the minimum time code value of all devices is:
[0018] Each decoding device first determines its own minimum time code, which is TC_min_0, TC_min_1, TC_min_2, ..., TC_min_n. Assume that TC_min_0 <TC_min_1<TC_min_2<…<TC_min_n;
[0019] The minimum time code TC_min_0 of device number 0 is transmitted to device number 1 via I2C;
[0020] After comparing TC_min_0 and TC_min_1, device No. 1 transmits the minimum value TC_min_0 to device No. 2;
[0021] Device No. 2 compares TC_min_0 and TC_min_2 and transmits the minimum value TC_min_0 to device No. 3;
[0022] According to the above comparison method, the minimum time code is determined as TC_min_0 in the device numbered n.
[0023] Furthermore, the specific process of synchronizing according to the difference between the time code of each video and the minimum time code is as follows:
[0024] After the frame pulse is detected, the time code is read from the time code buffer, and the minimum time code is found first. If multiple devices are cascaded, the minimum time code TC_min among all devices is found, and then the TC_gap of the difference between the time code of each video output port and the minimum time code is calculated;
[0025] Assuming the frame number of the write video cache is n, the frame number of the read video cache is n-1-TC_gap;
[0026] Each device is equipped with a flow control mechanism. When the video with the preset flow rate is cached, the decoding module will suspend decoding first, and then start decoding when the video in the cache decreases.
[0027] Technical effects of the present invention:
[0028] Compared with the prior art, the present invention is a method for synchronizing multiple decoding devices based on time codes. Each device shares the same source clock, which can achieve complete frame synchronization and achieve the effect of synchronizing multiple decoding devices without the need for additional device management. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The present invention is a flow chart of a method for synchronizing multiple decoding devices based on time codes.
[0030] Figure 2 This is a schematic diagram of clock synchronization of video interfaces of multiple devices according to the present invention.
[0031] Figure 3 It is a schematic diagram of two-channel video synchronization of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention is clearly and completely described below in conjunction with the accompanying drawings.
[0033] Embodiment 1:
[0034] like Figure 1 As shown, this embodiment involves a method for synchronizing multiple decoding devices based on time codes, including numbering decoding devices, realizing clock synchronization of video interfaces of multiple devices, finding the minimum value of the time code among all devices, and synchronization between different devices and different video output ports of the same device.
[0035] 1. Number the decoding devices:
[0036] Determine whether encoding device A has an external clock. If there is no external clock, the number is 0;
[0037] Send the number 0 of the upstream device A to the connected device B through the I2C communication interface;
[0038] Device B automatically adds 1 to the number received from device A and transmits it to downstream device C, and establishes the number of device B as 1;
[0039] Device C automatically adds 1 to the number of device B it receives and transmits it to downstream device D, and establishes the number of device C as 2;
[0040] According to the above numbering method, the encoding devices are numbered 0, 1, 2, 3...n in sequence.
[0041] 2. Realize the clock synchronization of video interfaces of multiple devices:
[0042] Each decoding device has an external clock input port and a clock output port. The input port is connected to the upstream device, and the output port is connected to the downstream device. Each decoding device detects whether there is a clock input at the external clock input port. If so, the external clock input is transparently transmitted to the clock output port, and the external input clock is used as the reference clock of the output video interface SDI or HDMI. If there is no external clock input, the internal clock of the device is used as the reference clock of the output video interface SDI or HDMI.
[0043] 3. Find the minimum time code value among all devices:
[0044] Each decoding device first determines its own minimum time code, which is TC_min_0, TC_min_1, TC_min_2…TC_min_n. Assume that TC_min_0 <TC_min_1<TC_min_2<…<TC_min_n;
[0045] The minimum time code TC_min_0 of device number 0 is transmitted to device number 1 via I2C;
[0046] After comparing TC_min_0 and TC_min_1, device No. 1 transmits the minimum value TC_min_0 to device No. 2;
[0047] Device No. 2 compares TC_min_0 and TC_min_2 and transmits the minimum value TC_min_0 to device No. 3;
[0048] According to the above comparison method, the minimum time code is determined as TC_min_0 in the device numbered n.
[0049] The minimum time code is transmitted to each device in the order of device number n…2, 1, 0.
[0050] 4. Synchronization between different devices and different video output ports of the same device:
[0051] A decoding device has multiple SDI or HDMI video output interfaces. Each video channel corresponds to a set of time codes. The time code of each video channel is synchronized according to the difference between the time code of each video channel and the minimum time code, so that multiple decoding devices are synchronized. This embodiment takes the synchronization of two videos as an example. The synchronization process of multiple videos is similar to that of two videos. Figure 2 In the sync process, the four colors represent the four-frame buffer area, and the frame numbers 0, 1, 2, and 3 represent the four-frame buffer area. The numbers in the buffer (10, 11...) represent the images corresponding to the time code. The specific synchronization process is as follows:
[0052] After the frame pulse is detected, the time code is read from the time code buffer, and the minimum time code is found first. If multiple devices are cascaded, the minimum time code TC_min among all devices is found, and then the TC_gap of the difference between the time code of each video output port and the minimum time code is calculated;
[0053] Assuming the frame number of the write video cache is n, the frame number of the read video cache is n-1-TC_gap;
[0054] Since each device works independently, it is inevitable that some decode faster than others. If no control is done, the cache used to store the decoded video will overflow, causing the picture to be out of sync. The data before decoding will be much smaller than the data after decoding. Therefore, each device has a flow control mechanism. When a predetermined amount of video is in the cache, the decoding module will suspend decoding first, and then start decoding when the video in the cache is reduced.
[0055] The above-mentioned specific implementation modes are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementation modes. Any appropriate changes or modifications made thereto by any ordinary technician in the technical field in accordance with the claims of the present invention shall fall within the patent protection scope of the present invention.
Claims
1. A method for synchronizing multiple decoding devices based on time code, characterized in that: include: Number the decoding devices in sequence as 0, 1, 2, 3, ..., n; Each decoding device has an external clock input port and a clock output port. The input port is connected to the upstream device, and the output port is connected to the downstream device. Each decoding device detects whether there is a clock input at the external clock input port. If there is, the external clock input is transparently transmitted to the clock output port, and the external input clock is used as the reference clock of the output video interface SDI or HDMI; if there is no external clock input, the internal clock of the device is used as the reference clock of the output video interface SDI or HDMI; Find the minimum time code value among all devices, and send the minimum time code to each device in the order of device number n, ..., 2, 1, 0; A decoding device has multiple SDI or HDMI video output interfaces. Each video channel corresponds to a set of time codes. Synchronization is performed based on the difference between the time code of each video channel and the minimum time code, thereby synchronizing multiple decoding devices.
2. The method for synchronizing multiple decoding devices based on time code according to claim 1, characterized in that: The specific process of numbering the decoding devices is as follows: Determine whether encoding device A has an external clock. If there is no external clock, the number is 0; Send the number 0 of the upstream device A to the connected device B through the I2C communication interface; Device B automatically adds 1 to the number received from device A and transmits it to downstream device C, and establishes the number of device B as 1; Device C automatically adds 1 to the number of device B it receives and transmits it to downstream device D, and establishes the number of device C as 2; According to the above numbering method, the encoding devices are numbered 0, 1, 2, 3, ..., n in sequence.
3. The method for synchronizing multiple decoding devices based on time code according to claim 1, characterized in that: The specific process of finding the minimum time code value among all devices is: Each decoding device first determines its own minimum time code, which is TC_min_0, TC_min_1, TC_min_2, ..., TC_min_n. Assume that TC_min_0 <TC_min_1<TC_min_2<…<TC_min_n; The minimum time code TC_min_0 of device number 0 is transmitted to device number 1 via I2C; After comparing TC_min_0 and TC_min_1, device No. 1 transmits the minimum value TC_min_0 to device No. 2; Device No. 2 compares TC_min_0 and TC_min_2 and transmits the minimum value TC_min_0 to device No. 3; According to the above comparison method, the minimum time code is determined as TC_min_0 in the device numbered n.
4. The method for synchronizing multiple decoding devices based on time code according to claim 1, 2 or 3, characterized in that: The specific process of synchronization based on the difference between the time code of each video and the minimum time code is as follows: After the frame pulse is detected, the time code is read from the time code buffer, and the minimum time code is found first. If multiple devices are cascaded, the minimum time code TC_min among all devices is found, and then the TC_gap of the difference between the time code of each video output port and the minimum time code is calculated; Assuming the frame number of the write video cache is n, the frame number of the read video cache is n-1-TC_gap; Each device is equipped with a flow control mechanism. When the video with the preset flow rate is cached, the decoding module will suspend decoding first, and then start decoding when the video in the cache decreases.
