Sequence adjustment method, device, computer-readable storage medium, and electronic device

The sequence adjustment method using a Kalman filter algorithm addresses the DP protocol's clock frequency mismatch, ensuring accurate image restoration by adjusting the output clock to match the source clock frequency, thereby preventing distortion and abnormal output.

JP2025541628AActive Publication Date: 2025-12-23ANALOGIX (SHANGHAI) SEMICONDUCTOR CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024542913
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-02
Filing Date
2023-11-21
Publication Date
2025-12-23
Estimated Expiration
2043-11-21

AI Technical Summary

Technical Problem

The DP protocol results in distorted images at the receiving end due to mismatched clock frequencies, leading to inaccurate image restoration and abnormal output.

Method used

A sequence adjustment method using a Kalman filter algorithm to determine and adjust the output clock based on the first line period, converting it to a second line period that reflects the pixel line length of the transmitting side, ensuring the adjusted output clock frequency matches the source clock frequency.

Benefits of technology

Ensures accurate and reliable image data restoration by matching the output clock frequency with the source clock frequency, preventing distortion and abnormal output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025541628000001_ABST
    Figure 2025541628000001_ABST
Patent Text Reader

Abstract

The present disclosure provides a sequence adjustment method, an apparatus, a computer-readable storage medium, and an electronic device. The sequence adjustment method includes the steps of: upon receiving a data stream output from a DisplayPort transmitter, determining a first line period based on the data stream, where the first line period is a line period of an output clock of the data stream, the output clock being a clock domain of the DisplayPort receiver; processing the first line period using at least a Kalman filter algorithm to obtain a second line period, where the second line period is a line period of a source clock of the data stream, the source clock being a clock domain of the transmitter; and adjusting the output clock based on the second line period. The present disclosure solves the problem in the prior art that image data restored at the DP receiver is distorted and cannot be output normally.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This disclosure claims priority to a Chinese patent application bearing application number 202311453271.8 and entitled "Sequence Adjustment Method, Apparatus, Computer-Readable Storage Medium, and Electronic Device," filed with the China Patent Office on November 2, 2023, the entire contents of which are incorporated herein by reference. [Technical Field]

[0002] The present disclosure relates to the field of data transmission technology, and in particular to a sequence adjustment method, apparatus, computer-readable storage medium and electronic device. [Background technology]

[0003] The DP (Display Port) protocol generates transmission sequence information on the Main Link according to the content of image data. At the DP transmitting end, the image data resolution and refresh rate are constant, and a stable pixel clock corresponds to a stable line length time, so the line length time corresponding to each line of image data obtained is constant. Due to clock domain changes, when the image sequence is restored at the DP receiving end, the line length may become too large or too small, and the resolution of each line may not be consistent, resulting in distorted or inaccurate images being converted downstream. Summary of the Invention [Problem to be solved by the invention]

[0004] The main objective of the present disclosure is to provide a sequence adjustment method, device, computer-readable storage medium and electronic device, and to solve the problem that at least in the prior art, the restored image data on the DP receiving side is distorted and therefore cannot be output normally. [Means for solving the problem]

[0005] To achieve the above object, according to one aspect of the present disclosure, a sequence adjustment method is provided, which includes the steps of: when receiving a data stream output from a transmitting side of a DisplayPort, determining a first line period based on the data stream, where the first line period is a line period of an output clock of the data stream, and the output clock is a clock domain of the receiving side of the DisplayPort; processing the first line period using at least a Kalman filter algorithm to obtain a second line period, where the second line period is a line period of a source clock of the data stream, and the source clock is a clock domain of the transmitting side; and adjusting the output clock based on the second line period.

[0006] Preferably, the step of determining a first line period based on the data stream includes the steps of: restoring the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifications from the image data, wherein the blanking identifications include at least one of a blanking start identification and a blanking end identification; and determining the clock period in the output clock of the two adjacent identical blanking identifications as the first line period.

[0007] Preferably, the transmitting side outputs the data stream via at least one link, one of the links corresponding to at least one first FIFO queue and at least one second FIFO queue, and the step of processing the first line period using at least a Kalman filter algorithm to obtain a second line period comprises the steps of: writing the first line period into the first FIFO queue corresponding to the link based on the link corresponding to the first line period; and, if the first FIFO queue is not empty, reading the first line period from the first FIFO queue and inputting the first line period to a Kalman filter; the second initial line period is composed of the second line period and a plurality of fractional data; writing the second initial line period into the corresponding second FIFO queue; reading the second initial line period from the second FIFO queue and inputting the second initial line period to the Kalman filter for iterative calculation; truncating a portion of the fractional data of the second initial line period, convolution-processing the truncated fractional data, and generating and outputting the second line period based on the truncated second initial line period and an accumulated error obtained by the convolution-processing.

[0008] Preferably, the step of inputting the first line period to a Kalman filter and having the Kalman filter output a second initial line period includes the step of inputting the first line period to the Kalman filter and having the Kalman filter predict a system state based on the first line period to obtain the second initial line period, wherein the system state is clock periods of the source clock of two adjacent identical blanking identifications in the data stream, and the blanking identifications include at least one of a blanking start identification and a blanking end identification.

[0009] Preferably, the step of writing the first line period to the first FIFO queue corresponding to the link includes the step of writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt if a first interrupt is triggered, the first interrupt including an interrupt number generated based on the link and the data stream number; and the step of reading the second initial line period from the second FIFO queue includes the step of reading the second line period from the second FIFO queue according to a predetermined algorithm if a second interrupt is triggered, and terminating the second interrupt, the predetermined algorithm including one of a circular scheduling algorithm and a priority scheduling algorithm, and the second interrupt including the interrupt number.

[0010] Preferably, the source clock is a line clock or a pixel clock, and if the source clock is the line clock, after processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes the step of performing clock domain conversion on the second line period to obtain a line period in a pixel clock of the first line period, and if the source clock is the pixel clock, before processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes the step of performing clock domain conversion on the first line period to obtain a line period in the pixel clock of the first line period.

[0011] Preferably, the step of adjusting the output clock based on the second line period includes the steps of: calculating a division ratio based on the second line period and a reference clock period in a phase-locked loop; and controlling the phase-locked loop based on the division ratio to generate a corresponding adjusted clock signal, thereby restoring at least one of the phase and frequency of the output clock.

[0012] According to another aspect of the present disclosure, a sequence adjustment device is provided, including: a determination unit configured to, when receiving a data stream output from a transmitting side of a DisplayPort, determine a first line period based on the data stream, where the first line period is a line period of an output clock of the data stream, the output clock being a clock domain of the receiving side of the DisplayPort; a processing unit configured to process the first line period using at least a Kalman filter algorithm to obtain a second line period, where the second line period is a line period of a source clock of the data stream, the source clock being a clock domain of the transmitting side; and an adjustment unit configured to adjust the output clock based on the second line period.

[0013] According to another aspect of the present disclosure, there is provided a computer-readable storage medium including a program stored therein, the program, when executed, controlling a device in which the computer-readable storage medium is located to perform any of the methods.

[0014] According to another aspect of the present disclosure, there is provided an electronic device including one or more processors, a memory, and one or more programs, the one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform any of the methods. [Effects of the Invention]

[0015] According to the technical solution of the present disclosure, a second line period is predicted and estimated based on the first line period using at least a Kalman filter algorithm to obtain a second line period that stably reflects the pixel line length of the sending side, and the estimated second line period is then used to adjust the output clock to ensure that the adjusted output clock frequency basically matches the source clock frequency, thereby ensuring that the image data restored based on the adjusted output clock basically matches the original data, and avoiding the problem of the restored image data being distorted and therefore unable to be output normally. [Brief explanation of the drawings]

[0016] The drawings constituting a part of this disclosure are used to provide a further understanding of the disclosure, and the exemplary embodiments of the disclosure and their descriptions are used to interpret the disclosure and are not intended to unduly limit the disclosure. [Figure 1] 1 illustrates a block diagram of a hardware structure of a mobile terminal that executes a sequence adjustment method according to an embodiment of the present disclosure; [Figure 2] 1 shows a flow diagram of a sequence adjustment method according to an embodiment of the present disclosure. [Figure 3] 1 shows a schematic diagram of a software and hardware implementation of a Kalman filter according to an embodiment of the present disclosure; [Figure 4] 1 illustrates a flow diagram of a Kalman filter algorithm according to an embodiment of the present disclosure. [Figure 5] 1 illustrates a flowchart of the operation of a first FIFO queue according to an embodiment of the present disclosure. [Figure 6] 10 illustrates a flowchart of the operation of a second FIFO queue according to an embodiment of the present disclosure. [Figure 7] 1 shows a schematic diagram of sequence adjustment on the receiver side according to an embodiment of the present disclosure. [Figure 8] 1 illustrates another schematic diagram of sequence adjustment on the receiver side according to an embodiment of the present disclosure. [Figure 9] 1 shows a flow diagram of sequence adjustment according to an embodiment of the present disclosure. [Figure 10] 1 shows a structural block diagram of a sequence adjustment device according to an embodiment of the present disclosure; [Explanation of symbols]

[0017] 102, processor, 104, memory, 106, transmission equipment, 108, input / output equipment. DETAILED DESCRIPTION OF THE INVENTION

[0018] It should be noted that, unless inconsistent, the embodiments and features of the embodiments in the present disclosure may be combined with each other. Hereinafter, the present disclosure will be described in detail based on the embodiments with reference to the drawings.

[0019] In order to help those skilled in the art to better understand the solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be described below clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without any creative efforts shall fall within the protection scope of the present disclosure.

[0020] It should be noted that the terms "first," "second," etc. in the description and claims of this disclosure and in the drawings are used to distinguish between similar objects and are not necessarily used to describe a particular order or chronology. It should be understood that the data used in this manner may be interchanged with one another where appropriate for the embodiments of the present disclosure described herein. Furthermore, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusions; for example, a process, method, system, product, or apparatus comprising a series of steps or units need not be limited to the explicitly recited steps or units, but may include other steps or units not explicitly recited or inherent in the process, method, product, or apparatus.

[0021] As introduced in the background art, in the prior art, there is a problem that the clock frequencies of the DP transmitting side and the DP receiving side do not match, resulting in distortion of the restored image data at the DP receiving side and therefore being unable to be output normally. To solve the above technical problem, the embodiments of the present disclosure provide a sequence adjustment method, device, computer-readable storage medium and electronic device.

[0022] Hereinafter, the technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure.

[0023] An embodiment of the method according to the present disclosure may be implemented in a mobile terminal, a computer terminal, or a similar computing device. Taking the implementation in a mobile terminal as an example, FIG. 1 is a block diagram of a hardware structure of a mobile terminal for implementing the sequence adjustment method according to the present disclosure. As shown in FIG. 1, the mobile terminal may include one or more (only one is shown in FIG. 1) processors 102 (processors 102 may include, but are not limited to, processing devices such as microprocessors MCUs or programmable logic devices FPGAs) and memory 104 for storing data. The mobile terminal may further include transmission equipment 106 and input / output equipment 108 for communication functions. As will be appreciated by those skilled in the art, the structure shown in FIG. 1 is merely schematic and does not limit the structure of the mobile terminal. For example, the mobile terminal may further include more or fewer assemblies than those shown in FIG. 1, or may have a different arrangement than those shown in FIG. 1.

[0024] The memory 104 is used to store computer programs, such as software programs and modules of application software, such as a computer program corresponding to the sequence adjustment method of the embodiment of the present disclosure. The processor 102 executes the computer programs stored in the memory 104 to perform various functional applications and data processing, i.e., to realize the method. The memory 104 may include a high-speed random memory and may further include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal via a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. An example of the network may include a wireless network provided by the mobile terminal's carrier. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0025] In this embodiment, a sequence adjustment method is provided that is executed on a mobile terminal, computer terminal, processor or similar computing device, and it is noted that the steps shown in the flowcharts of the drawings may be executed, for example, in a computer system of a set of computer-executable instructions, and that although a logical order is shown in the flowcharts, in some cases the steps shown or described may be executed in a different order than that shown or described herein.

[0026] 2 is a flowchart of a sequence adjustment method according to an embodiment of the present disclosure. As shown in FIG. 2, the method includes the following steps:

[0027] In step S201, when receiving a data stream output from a transmitting side of a DisplayPort, determining a first line period based on the data stream, the first line period being a line period of an output clock of the data stream, and the output clock being a clock domain of the receiving side of the DisplayPort; Specifically, the line period is the time required to scan one line of pixels, i.e., the number of pixels in one line, and is also called the line length. The receiving side samples the received signal driven by the output clock and recovers a pixel clock that matches the clock of the transmitting side, thereby recovering accurate data. In general, the receiving side samples the received signal at the rising edge or falling edge of the output clock. The clock domain of the receiving side is generally the line clock (Link Clock).

[0028] In step S202, processing the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; Specifically, the clock domain of the source clock is generally a Main Link domain.

[0029] In step S203, the output clock is adjusted based on the second line period.

[0030] In the above embodiment, first, a first line period of an output clock of the data stream is determined based on the data stream transmitted from the DisplayPort transmitter, then the first line period is processed using at least a Kalman filter algorithm to obtain a second line period of a source clock of the data stream, and finally, the output clock is adjusted based on the obtained second line period. Compared to the problem in the prior art where the clock frequencies of the DP transmitter and the DP receiver do not match, resulting in distortion of the restored image data at the DP receiver and therefore in an abnormal output, the present disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm to obtain the second line period that stably reflects the pixel line length at the transmitter, and then adjusts the output clock using the estimated second line period to ensure that the adjusted output clock frequency basically matches the source clock frequency, thereby ensuring that the image data restored based on the adjusted output clock basically matches the original data, and avoiding the problem of distortion of the restored image data and therefore in an abnormal output.

[0031] In one preferred means, the step of determining a first line period based on the data stream includes the steps of: restoring the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifications from the image data, where the blanking identifications include at least one of a blanking start (abbreviated as BS) identification and a blanking end (abbreviated as BE) identification; and determining the clock period of the output clock of the two adjacent identical blanking identifications as the first line period.

[0032] In the above embodiment, the received data stream is first restored to obtain image data and an output clock including blanking identifications, and then the number of clock periods in the output clock of two adjacent blanking start identifications or two adjacent blanking end identifications is used to evaluate the line length of the image data to obtain the first line period, so that the first line period corresponding to the data stream can be accurately obtained, and accurate data support can be provided for the subsequent estimation of the second line period.

[0033] Specifically, the image data generally includes a BS identifier, a vertical blanking identifier, a timer's possible value, a virtual display, a BE identifier, pixel data, a fill start identifier, fill data, and a fill end identifier.

[0034] In one exemplary embodiment, processing the first line period using at least a Kalman filter algorithm to obtain a second line period includes processing the first line period using a Kalman filter algorithm to obtain a system state characterizing clock periods in the source clock of two adjacent identical blanking identifications in the data stream, the system state being the second line period.

[0035] Of course, in addition to the above embodiment, those skilled in the art can realize the determination of the second line period in other ways. In the present disclosure, the sending side outputs the data stream through at least one link, that is, the sending side transmits the data stream using a single-stream transmission mode (abbreviated as SST) or a multi-stream transmission mode (abbreviated as MST), and one of the links corresponds to at least one first FIFO queue and at least one second FIFO queue. As shown in Figures 3 and 4, in step S202, the first line period is processed using at least a Kalman filter algorithm to obtain a second line period, and the specific steps include:

[0036] In step S2021, based on the link corresponding to the first line period, writing the first line period to the first FIFO queue corresponding to the link; Specifically, the link corresponding to the first line cycle is a link that transmits the data stream of the first line cycle. The first FIFO queue and the second FIFO queue may be FIFOs designed in hardware or software.

[0037] In step S2022, if the first FIFO queue is not empty, read the first line period from the first FIFO queue and input the first line period to a Kalman filter, causing the Kalman filter to output a second initial line period, the second initial line period being composed of the second line period and a plurality of fractional data; Specifically, the Kalman filter is used to execute a Kalman filter algorithm, and may be a device designed in hardware or software, and the second initial line period is an original period value of the source clock of the data stream estimated using the Kalman filter algorithm, and the second initial line period is a fractional number, and the fractional data is a data value after the fractional point of the second initial line period.

[0038] In step S2023, writing the second initial line period into the corresponding second FIFO queue; In step S2024, the second initial line period is read from the second FIFO queue, and the second initial line period is input to the Kalman filter for iterative calculation; Specifically, the Kalman filter algorithm uses the system state at the previous time and the measurement value at the current time to obtain an optimal estimate of the system state at the current time of the dynamic system, so that after obtaining the second initial line period, the second initial line period needs to be fed back to the input end of the Kalman filter again.

[0039] In step S2025, a portion of the fractional data of the second initial line period is truncated and the truncated fractional data is subjected to superposition processing, and the second line period is generated and output based on the truncated second initial line period and the accumulated error obtained by the superposition processing.

[0040] Specifically, since the Kalman filter algorithm is a cyclic iterative algorithm, the Kalman filter algorithm performs one truncation every time it obtains one second line period, obtains one corresponding truncated fractional data, and obtains an accumulated error by superimposing these truncated fractional data.

[0041] In the above embodiment, the Kalman filter algorithm dynamically filters the first line period, ensuring that the second line period consistently reflects the pixel line length at the transmitting end and achieving sequence adjustment at the receiving end, thereby ensuring that the image data restored at the receiving end is more accurate and reliable. Because the Kalman filter algorithm is an iterative algorithm, it requires calculating the current system state based on the system state calculated at the previous time and the current measurement value. The present disclosure provides a two-stage FIFO queue to balance the difference between the measurement interval and the system state interval, essentially equating them and facilitating the execution of the Kalman filter algorithm. The present disclosure also allocates a first FIFO queue and a second FIFO queue to the transmission link of each data stream, allowing multiple transmission links to share Kalman filter computation resources and time-sharing the iterative calculation of the data streams on each link to obtain the second line period corresponding to each link. This avoids the problem of designing each link with its own computational resource, which would result in wasted resources.

[0042] Naturally, the provision of the first and second FIFO queues can further prevent the problem of multi-link data being lost during the input and output process, and can also avoid frequent bus operations, reducing the burden on the processor.

[0043] In order to further ensure the flexibility of sequence adjustment, in one preferred method, the Kalman filter is a device that implements a Kalman filter algorithm, and the first FIFO queue and the second FIFO queue are implemented by software. The present disclosure provides the ability to later programmably change and update the dynamic filter algorithm by combining software and hardware, compared to a simple hardware implementation.

[0044] In addition, the step of generating and outputting the second line period based on the truncated second initial line period and the accumulated error obtained by the superposition process specifically includes: if the accumulated error is greater than a threshold, modifying the truncated second initial line period based on the accumulated error to obtain the second line period; if the accumulated error is equal to or less than a threshold, directly outputting the truncated second initial line period as the second line period.

[0045] Further, the step of correcting the truncated second initial line period based on the accumulated error to obtain the second line period includes the step of adding an average value of the accumulated error to the truncated second initial line period to obtain the second line period.

[0046] Step S2025 can be implemented by software, hardware, or a combination of software and hardware. In embodiments requiring hardware implementation, the number of bits of the truncated fractional data is determined based on the number of fractional bits that the hardware-generated logic itself can store. That is, based on the number of bits of the fractional part that the hardware-generated logic can store, the number of fractional bits that exceeds the number of bits of the fractional part of the hardware-generated logic is truncated, and the resulting data is superimposed using an error accumulation method, and the fractional part that matches the hardware-generated logic is repeatedly output. The truncation process can be implemented by hardware, and the accumulation process of the fractional part can be implemented by software, thereby achieving the goal of cooperation between software and hardware.

[0047] According to some other embodiments of the present disclosure, the step of inputting the first line period to a Kalman filter and having the Kalman filter output a second initial line period includes the steps of inputting the first line period to the Kalman filter and having the Kalman filter predict a system state based on the first line period to obtain the second initial line period, wherein the system state is a clock period of the source clock of two adjacent identical blanking identifications in the data stream, and the blanking identifications include at least one of a blanking start identification and a blanking end identification. The present disclosure defines system states and measurement values ​​on both the transmitting side and the receiving side of a DisplayPort, respectively, and dynamically filters to estimate a system state characterizing a line period on the transmitting side from a measurement value characterizing a line period on the receiving side, thereby obtaining a system state output that stably reflects the line period on the transmitting side.

[0048] Specifically, the specific process of constructing the Kalman filter and performing dynamic filtering using the Kalman filter may be as follows. The initial state at time T0 is defined as Z = Z[0], X = X[0], H = h0, P = P[0], R = r0, and Q = q0. Here, the initial value Z[0] of the measurement value Z represents the measurement value at time T0. For example, it can be the number of line periods of the line clock in the interval between two adjacent BEs, the number of line periods of the line clock in the interval between two adjacent BSs, the number of line periods of the pixel clock in the interval between two adjacent BEs, or the number of line periods of the pixel clock in the interval between two adjacent BSs. The initial state X[0] of the system state X is selected, and the observed value of the system state, such as the observed value of the system state at time T0, or another valid estimate of the system state, can be selected. The observation coefficient H, i.e., the ratio of the relationship between the measurement value and the system state, is selected as the constant h0. From a measurement perspective, the measurement value can have a certain linear ratio relationship with the system state, and can be calculated by accumulating the line periods of multiple pixel lines within a certain time. For example, a line period of five lines can be selected to observe that the system state obtained by the BS interval calculation, i.e., one-fifth of the measurement value, is the system state obtained. Select the initial states q0 and r0 for the error coefficients Q and R. The error coefficients can be kept unchanged after selecting the starting state, which allows the user to modify the Kalman filter calculation process and adjust it based on the actual system. Select the intermediate value P of the calculation process, the initial value P[0], for example, select the state 0.

[0049] As shown in Figure 4, the calculation is performed iteratively at each iteration time k, and the system state X at iteration time k is obtained based on the calculation result. The iteration interval is the measurement interval. The calculation process is as follows: X[k]=X[k-1], P[k]=P[k-1]+q0, temp=(P[k]×h0 / (P[k]×h0×h0+r0)), X[k]=X[k]+temp×(Z[k]-h0×X[k]), P[k]=(1-temp×h0)×P[k].

[0050] In step S2021 of the present disclosure, the step of writing the first line period to the first FIFO queue corresponding to the link specifically includes the step of writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt if a first interrupt is triggered, the first interrupt including an interrupt number generated based on the link and data stream number. The interrupt number is used to characterize the link and data stream corresponding to the first line period and is the unique number of the first line period. In step S2024 of the present disclosure, the step of reading the second initial line period from the second FIFO queue specifically includes the step of reading the second line period from the second FIFO queue according to a predetermined algorithm if a second interrupt is triggered and terminating the second interrupt, the predetermined algorithm including one of a circular scheduling algorithm and a priority scheduling algorithm, and the second interrupt including the interrupt number. The present disclosure combines FIFO queues and interrupts to meet real-time processing requirements and further improve sequence adjustment efficiency. And by using a circular scheduling or priority scheduling method, the second line period can be read from the second FIFO queue, and the parallel circular iterations can be distributed to multiple threads, further accelerating the sequence adjustment progress of each link.

[0051] In addition, in step S2022, the specific implementation method for reading the first line period from the first FIFO queue is the same as the implementation method in step S2024, and in step S2023, the specific implementation method for writing the second initial line period into the corresponding second FIFO queue is the same as the specific implementation method in step S2021, so the description is omitted here.

[0052] In one specific embodiment, as shown in Figure 5, when the first line period of the nth link is obtained, a first interrupt corresponding to the nth link is triggered, measurement values ​​are counted, the first line period corresponding to the nth link is read and written to a first FIFO queue, and the first interrupt corresponding to the nth link is terminated. As shown in Figure 6, when the system status of the nth link is written to the second FIFO, a second interrupt corresponding to the nth link is triggered, system status values ​​are counted, the system status is read from the second FIFO, and the second line period generation logic is updated based on the system status, i.e., the output of the second line period is updated, and the second interrupt corresponding to the nth link is terminated.

[0053] In actual application, the source clock is a line clock or a pixel clock, i.e., the system state of the Kalman filter may be a clock period of two adjacent identical blanking discrimination intervals in the clock domain of the transmitting line clock, or a clock period of two adjacent identical blanking discrimination intervals in the clock domain of the transmitting pixel clock. To further achieve accurate adjustment of the output clock sequence corresponding to these two situations, in some preferred embodiments of the present disclosure, if the source clock is the line clock, after processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes: performing clock domain conversion on the second line period to obtain a line period in the pixel clock of the first line period; if the source clock is the pixel clock, before processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes: performing clock domain conversion on the first line period to obtain a line period in the pixel clock of the first line period.

[0054] That is, as shown in Figure 7, when the system state is a clock period in the clock domain of the line clock on the transmitting side, the measurement value input to the Kalman filter on one side of the receiving side is a clock period in the clock domain of the line clock of image data, and the output of the Kalman filter is still a clock period estimated in the clock domain of the line clock, which is further converted across clock domains and then converted to a clock period in the clock domain of the pixel clock. As shown in Figure 8, when the system state is a clock period in the clock domain of the pixel clock on the transmitting side, the measurement value input to the Kalman filter on one side of the receiving side is a clock period in the clock domain of the pixel clock of image data, which is obtained by clock conversion from the clock domain of the line clock, and the output of the Kalman filter is a clock period estimated in the clock domain of the pixel clock.

[0055] To further solve the problem of the clock frequency mismatch between the DP sending end and the DP receiving end resulting in distortion of the restored image data at the DP receiving end and therefore inability to output the data normally, preferably, the step of adjusting the output clock based on the second line period includes the steps of calculating a division ratio based on the second line period and a reference clock period in a phase-locked loop, and controlling the phase-locked loop (PLL) based on the division ratio to generate a corresponding adjusted clock signal to restore at least one of the phase and frequency of the output clock. Calculating a fractional division ratio between the second line period and the reference clock period in the phase-locked loop, and then controlling the PLL based on the fractional division ratio to generate the adjusted clock signal to restore the image data further ensures that the resolution of the restored image data is basically consistent with that at the sending end, and further ensures the accuracy and reliability of the restored image data.

[0056] This embodiment relates to a specific sequence adjustment method, which, as shown in FIG. 9, includes the following steps: In step S1, receive a data stream from a main link of a transmitting side, and obtain two adjacent clock periods with the same blanking identification obtained by observing the main link through recovery, and obtain a first line period; In step S2, trigger the Kalman filter circuit, perform dynamic filtering calculation for the first line period, and obtain two adjacent clock periods with the same blanking discrimination based on the sender side as the second line period; In step S3, combine the reference clock period in the PLL according to the second line period, control the frequency adjustment circuit to perform frequency adjustment calculation, output a dynamically changing frequency, and control the fractional frequency division ratio; In step S4, the PLL is controlled based on the fractional division ratio to generate an adjusted clock signal for the corresponding image pixel, which is used to restore the image data and is simultaneously fed back to the frequency adjustment circuit for dynamic adjustment reference.

[0057] It should be noted that the steps depicted in the flowcharts of the figures may be performed, for example, in a computer system as a set of computer-executable instructions, and that although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than shown or described herein.

[0058] The embodiments of the present disclosure further provide a sequence adjustment device, which can be used to implement the sequence adjustment method provided in the embodiments of the present disclosure. This device is used to implement the above-described embodiments and preferred embodiments, and the description above will be omitted. As used below, the term "module" refers to a combination of software and / or hardware that can implement a given function. While the devices described in the following embodiments are preferably implemented in software, hardware implementations or a combination of software and hardware are also possible and envisioned.

[0059] The sequence adjustment device provided in the embodiment of the present disclosure will be introduced below.

[0060] 10 is a schematic diagram of a sequence adjustment device according to an embodiment of the present disclosure. As shown in FIG. 10, the device includes: the determining unit 10 is configured to, when receiving a data stream output from a transmitting side of a DisplayPort, determine a first line period based on the data stream, the first line period being a line period of an output clock of the data stream, the output clock being a clock domain of the receiving side of the DisplayPort; Specifically, the line period is the time required to scan one line of pixels, i.e., the number of pixels in one line, and is also called the line length. The receiving side samples the received signal under the drive of the output clock, recovers a pixel clock that matches the clock of the transmitting side, and thereby recovers accurate data. In general, the receiving side samples the received signal at the rising edge or falling edge of the output clock. The clock domain of the receiving side is generally the line clock.

[0061] the processing unit 20 is configured to process the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; The adjusting unit 30 is configured to adjust the output clock based on the second line period.

[0062] In the above embodiment, the determining unit determines a first line period of the output clock of the data stream based on the data stream transmitted from the DisplayPort transmitting side, the processing unit processes the first line period using at least a Kalman filter algorithm to obtain a second line period of the source clock of the data stream, and the adjusting unit adjusts the output clock based on the obtained second line period. Compared to the problem in the prior art that the clock frequencies of the DP transmitting side and the DP receiving side do not match, resulting in distortion of the restored image data at the DP receiving side and therefore in an abnormal output, the present disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm to obtain the second line period that stably reflects the pixel line length of the transmitting side, and then adjusts the output clock using the estimated second line period to ensure that the adjusted output clock frequency basically matches the source clock frequency, thereby ensuring that the image data restored based on the adjusted output clock basically matches the original data, and avoiding the problem of distortion of the restored image data and therefore in an abnormal output.

[0063] In one preferred means, the determination unit includes: a restoration module configured to restore the data stream and obtain image data and the output clock; an extraction module configured to extract two adjacent identical blanking identifications from the image data, where the blanking identifications include at least one of a blanking start identification and a blanking end identification; and a determination module configured to determine the clock period in the output clock of the two adjacent identical blanking identifications as the first line period.

[0064] In the above embodiment, the received data stream is restored to obtain image data and an output clock including blanking identifications, and the number of clock periods in the output clock of two adjacent blanking start identifications or two adjacent blanking end identifications is used to evaluate the line length of the image data to obtain the first line period, so that the first line period corresponding to the data stream can be accurately obtained, and accurate data support is provided for estimating the subsequent second line period.

[0065] Specifically, the image data generally includes a BS identifier, a vertical blanking identifier, a timer's possible value, a virtual display, a BE identifier, pixel data, a fill start identifier, fill data, and a fill end identifier.

[0066] In one exemplary embodiment, the processing unit includes a processing module configured to process the first line period using a Kalman filter algorithm to obtain a system state characterizing clock periods in the source clock of two adjacent identical blanking identifications in the data stream, the system state being the second line period.

[0067] Of course, in addition to the above embodiment, those skilled in the art can realize the determination of the second line period in other ways. In the present disclosure, the sending side outputs the data stream through at least one link, that is, the sending side transmits the data stream using a single-stream transmission mode or a multi-stream transmission mode, and one of the links corresponds to at least one first FIFO queue and at least one second FIFO queue, and the processing unit includes: a first write module configured to write the first line period to the first FIFO queue corresponding to the link based on the link corresponding to the first line period; Specifically, the link corresponding to the first line cycle is a link that transmits the data stream of the first line cycle. The first FIFO queue and the second FIFO queue may be FIFOs designed in hardware or software.

[0068] a first read module configured to read the first line period from the first FIFO queue when the first FIFO queue is not empty, and input the first line period to a Kalman filter, causing the Kalman filter to output a second initial line period, the second initial line period consisting of the second line period and a plurality of fractional data; Specifically, the Kalman filter is used to execute a Kalman filter algorithm, and may be a device designed in hardware or software, and the second initial line period is an original period value of the source clock of the data stream estimated using the Kalman filter algorithm, and the second initial line period is a fractional number, and the fractional data is a data value after the fractional point of the second initial line period.

[0069] a second write module configured to write the second initial line period to a corresponding second FIFO queue; a second read module configured to read the second initial line period from the second FIFO queue and input the second initial line period to the Kalman filter for iterative calculation; Specifically, the Kalman filter algorithm uses the system state at the previous time and the measurement value at the current time to obtain an optimal estimate of the system state at the current time of the dynamic system, so that after obtaining the second initial line period, the second initial line period needs to be fed back to the input end of the Kalman filter again.

[0070] The truncation module is configured to truncate a portion of the fractional data of the second initial line period, perform a convolution process on the truncated fractional data, and generate and emit the second line period based on the truncated second initial line period and an accumulated error obtained by the convolution process.

[0071] Specifically, since the Kalman filter algorithm is a cyclic iterative algorithm, the Kalman filter algorithm performs one truncation every time it obtains one second line period, obtains one corresponding truncated fractional data, and obtains an accumulated error by superimposing these truncated fractional data.

[0072] In the above embodiment, the Kalman filter algorithm dynamically filters the first line period, ensuring that the second line period consistently reflects the pixel line length at the transmitting end and achieving sequence adjustment at the receiving end, thereby ensuring that the image data restored at the receiving end is more accurate and reliable. Because the Kalman filter algorithm is an iterative algorithm, it requires calculating the current system state based on the system state calculated at the previous time and the current measurement value. The present disclosure provides a two-stage FIFO queue to balance the difference between the measurement interval and the system state interval, essentially equating them and facilitating the execution of the Kalman filter algorithm. The present disclosure also allocates a first FIFO queue and a second FIFO queue to the transmission link of each data stream, allowing multiple transmission links to share Kalman filter computation resources and time-sharing the iterative calculation of the data streams on each link to obtain the second line period corresponding to each link. This avoids the problem of designing each link with its own computational resource, which would result in wasted resources.

[0073] Naturally, the provision of the first and second FIFO queues can further prevent the problem of multi-link data being lost during the input and output process, and can also avoid frequent bus operations, reducing the burden on the processor.

[0074] In order to further ensure flexibility in sequence adjustment, in a preferred method, the Kalman filter is a device that implements a Kalman filter algorithm, and the first FIFO queue and the second FIFO queue are implemented by software. The present disclosure provides the ability to later programmably change and update the dynamic filter algorithm by combining software and hardware, compared to a simple hardware implementation.

[0075] In addition, the truncation module may specifically include: a correction sub-module configured to correct the truncated second initial line period based on the accumulated error to obtain the second line period when the accumulated error is greater than a threshold; and an output sub-module configured to directly output the truncated second initial line period as the second line period when the accumulated error is equal to or less than a threshold.

[0076] Furthermore, the correction sub-module is configured to add the average value of the accumulated error to the further truncated second initial line period to obtain the second line period.

[0077] The truncation module can be implemented in software, hardware, or a combination of software and hardware. In embodiments requiring hardware implementation, the number of bits of the truncated fractional data is determined based on the number of fractional bits that the hardware-generated logic itself can store. That is, based on the number of bits of the fractional part that the hardware-generated logic can store, the number of fractional bits that exceeds the number of bits of the fractional part of the hardware-generated logic is truncated, and the error accumulation process is performed to repeatedly output the fractional part that matches the hardware-generated logic each time. The truncation process can be implemented in hardware, and the fractional part accumulation process can be implemented in software, thereby achieving the purpose of cooperation between software and hardware.

[0078] According to some other embodiments of the present disclosure, the first read module includes an input sub-module configured to input the first line period to the Kalman filter, cause the Kalman filter to predict a system state based on the first line period, and obtain the second initial line period, wherein the system state is a clock period of the source clock of two adjacent identical blanking identifications in the data stream, and the blanking identifications include at least one of a blanking start identification and a blanking end identification. The present disclosure defines system states and measurement values ​​on both the transmit side and the receive side of a DisplayPort, respectively, and estimates a system state characterizing a line period on a transmit side from a measurement value characterizing a line period on a receive side by dynamic filtering, thereby achieving a system state output that stably reflects the line period on a transmit side.

[0079] Specifically, the specific process of constructing the Kalman filter and performing dynamic filtering using the Kalman filter may be as follows. The initial state at time T0 is defined as Z = Z[0], X = X[0], H = h0, P = P[0], R = r0, and Q = q0. Here, the initial value Z[0] of the measurement value Z represents the measurement value at time T0. For example, it can be the number of line periods of the line clock in the interval between two adjacent BEs, the number of line periods of the line clock in the interval between two adjacent BSs, the number of line periods of the pixel clock in the interval between two adjacent BEs, or the number of line periods of the pixel clock in the interval between two adjacent BSs. The initial state X[0] of the system state X is selected, and the observed value of the system state, such as the observed value of the system state at time T0, or another valid estimate of the system state, can be selected. The observation coefficient H, i.e., the ratio of the relationship between the measurement value and the system state, is selected as the constant h0. From a measurement perspective, the measurement value can have a certain linear ratio relationship with the system state, and can be calculated by accumulating the line periods of multiple pixel lines within a certain time. For example, a line period of five lines can be selected to observe that the system state obtained by the BS interval calculation, i.e., one-fifth of the measurement value, is the system state obtained. Select the initial states q0 and r0 for the error coefficients Q and R. The error coefficients can be kept unchanged after selecting the starting state, which allows the user to modify the Kalman filter calculation process and adjust it based on the actual system. Select the intermediate value P of the calculation process, the initial value P[0], for example, select the state 0.

[0080] The calculation is performed in an iterative manner at each iteration time k, and the system state X at iteration time k is obtained based on the calculation result. The iteration interval is the measurement interval. The calculation process is as follows: X[k]=X[k-1], P[k]=P[k-1]+q0, temp=(P[k]×h0 / (P[k]×h0×h0+r0)), X[k]=X[k]+temp×(Z[k]-h0×X[k]), P[k]=(1-temp×h0)×P[k].

[0081] The first write module of the present disclosure specifically includes a write sub-module configured to, when triggering a first interrupt, write the first line period to the first FIFO queue corresponding to the link and terminate the first interrupt, the first interrupt including an interrupt number generated based on the link and data stream number. The interrupt number is used to characterize the link and data stream corresponding to the first line period and is the unique number of the first line period. The second read module of the present disclosure specifically includes a read sub-module configured, when triggering a second interrupt, read the second line period from the second FIFO queue according to a predetermined algorithm and terminate the second interrupt, the predetermined algorithm including one of a circular scheduling algorithm and a priority scheduling algorithm. The present disclosure combines FIFO queues and interrupts to meet real-time processing requirements and further improve sequence adjustment efficiency. And by using a circular scheduling or priority scheduling method, the second line period can be read from the second FIFO queue, and the parallel circular iterations can be distributed to multiple threads, further accelerating the sequence adjustment progress of each link.

[0082] In addition, in the first reading module, the specific implementation method for reading the first line period from the first FIFO queue is the same as that of the second reading module, and in the second writing module, the specific implementation method for writing the second initial line period to the corresponding second FIFO queue is the same as that of the first writing module, and the description thereof is omitted here.

[0083] In one specific embodiment, as shown in Figure 5, when the first line period of the nth link is obtained, a first interrupt corresponding to the nth link is triggered, measurement values ​​are counted, the first line period corresponding to the nth link is read and written to a first FIFO queue, and the first interrupt corresponding to the nth link is terminated. As shown in Figure 6, when the system status of the nth link is written to the second FIFO, a second interrupt corresponding to the nth link is triggered, system status values ​​are counted, the system status is read from the second FIFO, and the second line period generation logic is updated based on the system status, i.e., the output of the second line period is updated, and the second interrupt corresponding to the nth link is terminated.

[0084] In actual application, the source clock is a line clock or a pixel clock, i.e., the system state of the Kalman filter may be a clock period of two adjacent identical blanking discrimination intervals in the clock domain of the transmitting line clock, or a clock period of two adjacent identical blanking discrimination intervals in the clock domain of the transmitting pixel clock. To further achieve accurate adjustment of the output clock sequence corresponding to these two situations, in some preferred embodiments of the present disclosure, the device further includes a first conversion unit configured, when the source clock is the line clock, to process the first line period using a Kalman filter algorithm to obtain a second line period, and then perform clock domain conversion on the second line period to obtain a line period in the pixel clock of the first line period. When the source clock is the pixel clock, the device further includes a second conversion unit configured, when the source clock is the pixel clock, to process the first line period using a Kalman filter algorithm to obtain a second line period, and then perform clock domain conversion on the first line period to obtain a line period in the pixel clock of the first line period.

[0085] That is, as shown in Figure 7, when the system state is a clock period in the clock domain of the line clock on the transmitting side, the measurement value input to the Kalman filter on one side of the receiving side is a clock period in the clock domain of the line clock of image data, and the output of the Kalman filter is still a clock period estimated in the clock domain of the line clock, which is further converted across clock domains and then converted to a clock period in the clock domain of the pixel clock. As shown in Figure 8, when the system state is a clock period in the clock domain of the pixel clock on the transmitting side, the measurement value input to the Kalman filter on one side of the receiving side is a clock period in the clock domain of the pixel clock of image data, which is obtained by clock conversion from the clock domain of the line clock, and the output of the Kalman filter is a clock period estimated in the clock domain of the pixel clock.

[0086] To further solve the problem that the clock frequencies of the DP sending side and the DP receiving side do not match, resulting in distortion of the restored image data at the DP receiving side and therefore inability to output the data normally, the adjustment unit preferably includes: a calculation module configured to calculate a division ratio based on the second line period and a reference clock period in a phase-locked loop, and a control module configured to control the phase-locked loop to generate a corresponding adjusted clock signal based on the division ratio, thereby restoring at least one of the phase and frequency of the output clock. Calculating a fractional division ratio of the second line period and the reference clock period in the phase-locked loop, and then controlling the PLL to generate the adjusted clock signal based on the fractional division ratio to restore the image data, further ensures that the resolution of the restored image data is basically consistent with that at the sending side, and further ensures the accuracy and reliability of the restored image data.

[0087] The sequence adjustment device includes a processor and a memory, and the determination unit, the processing unit, and the adjustment unit are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize the corresponding functions. The modules are all located in the same processor, or the modules are located in different processors in any combination.

[0088] The processor includes a kernel, which calls the corresponding program units from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problem of the DP receiving side being distorted and unable to output the restored image data normally in the prior art can be solved.

[0089] The memory may include volatile memory, random access memory (RAM), and / or non-volatile memory in a computer-readable medium, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

[0090] An embodiment of the present disclosure provides a computer-readable storage medium, the computer-readable storage medium including a program stored therein, wherein the program, when executed, controls a device in which the computer-readable storage medium is located to perform the sequence adjustment method.

[0091] Specifically, the sequence adjustment method includes: In step S201, when receiving a data stream output from a transmitting side of a DisplayPort, determining a first line period based on the data stream, the first line period being a line period of an output clock of the data stream, and the output clock being a clock domain of the receiving side of the DisplayPort; Specifically, the line period is the time required to scan one line of pixels, i.e., the number of pixels in one line, and is also called the line length. The receiving side samples the received signal under the drive of the output clock, recovers a pixel clock that matches the clock of the transmitting side, and thereby recovers accurate data. In general, the receiving side samples the received signal at the rising edge or falling edge of the output clock. The clock domain of the receiving side is generally the line clock.

[0092] In step S202, processing the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; Specifically, the clock domain of the source clock is generally the main link domain.

[0093] In step S203, the output clock is adjusted based on the second line period.

[0094] Preferably, the step of determining a first line period based on the data stream includes the steps of: restoring the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifications from the image data, wherein the blanking identifications include at least one of a blanking start identification and a blanking end identification; and determining the clock period in the output clock of the two adjacent identical blanking identifications as the first line period.

[0095] Preferably, the transmitting side outputs the data stream via at least one link, one of the links corresponding to at least one first FIFO queue and at least one second FIFO queue, and the step of processing the first line period using at least a Kalman filter algorithm to obtain a second line period comprises the steps of: writing the first line period into the first FIFO queue corresponding to the link based on the link corresponding to the first line period; and, if the first FIFO queue is not empty, reading the first line period from the first FIFO queue and inputting the first line period to a Kalman filter; the second initial line period is composed of the second line period and a plurality of fractional data; writing the second initial line period into the corresponding second FIFO queue; reading the second initial line period from the second FIFO queue and inputting the second initial line period to the Kalman filter for iterative calculation; truncating a portion of the fractional data of the second initial line period, convolution-processing the truncated fractional data, and generating and outputting the second line period based on the truncated second initial line period and an accumulated error obtained by the convolution-processing.

[0096] Preferably, the step of inputting the first line period to a Kalman filter and having the Kalman filter output a second initial line period includes the step of inputting the first line period to the Kalman filter and having the Kalman filter predict a system state based on the first line period to obtain the second initial line period, wherein the system state is clock periods of the source clock of two adjacent identical blanking identifications in the data stream, and the blanking identifications include at least one of a blanking start identification and a blanking end identification.

[0097] Preferably, the step of writing the first line period to the first FIFO queue corresponding to the link includes the step of writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt if a first interrupt is triggered, the first interrupt including an interrupt number generated based on the link and the data stream number; and the step of reading the second initial line period from the second FIFO queue includes the step of reading the second line period from the second FIFO queue according to a predetermined algorithm if a second interrupt is triggered, and terminating the second interrupt, the predetermined algorithm including one of a circular scheduling algorithm and a priority scheduling algorithm, and the second interrupt including the interrupt number.

[0098] Preferably, the source clock is a line clock or a pixel clock, and if the source clock is the line clock, after processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes the step of performing clock domain conversion on the second line period to obtain a line period in a pixel clock of the first line period, and if the source clock is the pixel clock, before processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes the step of performing clock domain conversion on the first line period to obtain a line period in the pixel clock of the first line period.

[0099] Preferably, the step of adjusting the output clock based on the second line period includes the steps of: calculating a division ratio based on the second line period and a reference clock period in a phase-locked loop; and controlling the phase-locked loop based on the division ratio to generate a corresponding adjusted clock signal, thereby restoring at least one of the phase and frequency of the output clock.

[0100] An embodiment of the present disclosure provides a processor configured to execute a program, which, when executed, performs the sequence adjustment method.

[0101] An embodiment of the present disclosure provides an apparatus including a processor, a memory, and a program stored in the memory and executable by the processor, which performs at least the following steps when the processor executes the program. In step S201, when receiving a data stream output from a transmitting side of a DisplayPort, determining a first line period based on the data stream, the first line period being a line period of an output clock of the data stream, and the output clock being a clock domain of the receiving side of the DisplayPort; In step S202, processing the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; In step S203, the output clock is adjusted based on the second line period.

[0102] The device in this specification may be a server, a PC, a PAD, a mobile phone, or the like.

[0103] The device may specifically be an image adapter or a docking station that includes a display port.

[0104] The present disclosure further provides a computer program product adapted to execute a program which, when executed on a data processing device, initiates at least the following method steps: In step S201, when receiving a data stream output from a transmitting side of a DisplayPort, determining a first line period based on the data stream, the first line period being a line period of an output clock of the data stream, and the output clock being a clock domain of the receiving side of the DisplayPort; In step S202, processing the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; In step S203, the output clock is adjusted based on the second line period.

[0105] As will be apparent to those skilled in the art, each module or step of the present disclosure can be implemented on a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices, can be implemented in executable program code on a computing device, and can be stored in a storage device and executed on a computing device, and in some cases, can execute the steps shown or described in a different order than in this specification, or can be fabricated in respective integrated circuit modules, or multiple modules or steps can be fabricated and implemented in a single integrated circuit module. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0106] As will be appreciated by those skilled in the art, embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. The present disclosure may also take the form of a computer program product embodied in one or more computer-usable storage media (including, but not limited to, magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0107] The present disclosure will be described with reference to flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, and the instructions executed by the processor of the computer or other programmable data processing device generate an apparatus for implementing the function(s) specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0108] These computer program instructions can be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, causing the instructions stored in the computer-readable memory to produce an article of manufacture that includes an instruction apparatus that implements the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.

[0109] These computer program instructions can be uploaded to a computer or other programmable data processing device and cause the computer or other programmable device to perform a series of operational steps to generate a computer-implemented process, whereby the instructions executed by the computer or other programmable device provide steps for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.

[0110] In one typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0111] The memory may include volatile memory, random access memory (RAM), and / or non-volatile memory in the form of a computer-readable medium, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0112] Computer-readable media include both non-volatile and volatile media, and both portable and non-portable media may implement information storage in any manner or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only memory disks (CD-ROMs), digital multifunction disks (DVDs) or other optical storage, magnetic tape cartridges, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory storage computer-readable media, such as modulated data signals and carrier waves.

[0113] Still further, the terms "comprise," "contain," or any other variation thereof, are intended to include a non-exclusive inclusion, whereby a process, method, product, or device of a list of elements not only includes those elements, but also includes other elements not expressly listed or that are inherent in such process, method, product, or device. Absent more limitations, elements qualified by the phrase "comprises a ..." do not exclude the presence of additional identical elements beyond the process, method, product, or device containing the element.

[0114] As can be seen from the above description, the embodiments of the present disclosure achieve the following technical effects. 1) The sequence adjustment method of the present disclosure first determines a first line period of an output clock of the data stream based on a data stream transmitted from a DisplayPort transmitter, then processes the first line period using at least a Kalman filter algorithm to obtain a second line period of a source clock of the data stream, and finally adjusts the output clock based on the obtained second line period. Compared to the prior art, where the clock frequencies of the DP transmitter and the DP receiver do not match, resulting in distortion of the restored image data at the DP receiver, the present disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm to obtain a second line period that stably reflects the pixel line length at the transmitter, and then adjusts the output clock using the estimated second line period, ensuring that the adjusted output clock frequency basically matches the source clock frequency, thereby ensuring that the image data restored based on the adjusted output clock basically matches the original data, and avoiding the problem of distortion of the restored image data that cannot be output normally.

[0115] 2) In the sequence adjustment device of the present disclosure, the determining unit determines a first line period of the output clock of the data stream based on the data stream transmitted from the DisplayPort transmitting side, the processing unit processes the first line period using at least a Kalman filter algorithm to obtain a second line period of the source clock of the data stream, and the adjusting unit adjusts the output clock based on the obtained second line period. Compared to the problem in the prior art where the clock frequencies of the DP transmitting side and the DP receiving side do not match, resulting in distortion of the restored image data at the DP receiving side and therefore unable to be output normally, the present disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm to obtain the second line period that stably reflects the pixel line length at the transmitting side, and then adjusts the output clock using the estimated second line period, ensuring that the adjusted output clock frequency basically matches the source clock frequency, thereby ensuring that the image data restored based on the adjusted output clock basically matches the original data, and avoiding the problem of distortion of the restored image data and therefore unable to be output normally.

[0116] The above description is merely a preferred embodiment of the present disclosure, and does not limit the present disclosure, and those skilled in the art can make various modifications and changes to the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. When receiving a data stream output from a transmitting side of a DisplayPort, determining a first line period based on the data stream, the first line period being a line period of an output clock of the data stream, the output clock being a clock domain of the receiving side of the DisplayPort; processing the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; and adjusting the output clock based on the second line period.

2. determining a first line period based on the data stream, recovering the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifications from the image data, the blanking identifications including at least one of a blanking start identification and a blanking end identification; and determining a clock period of the output clock for two adjacent identical blanking identifications as the first line period.

3. The sender outputs the data stream via at least one link, one of the links corresponding to at least one first FIFO queue and at least one second FIFO queue, and the step of processing the first line period using at least a Kalman filter algorithm to obtain a second line period includes: writing the first line period into the first FIFO queue corresponding to the link based on the link corresponding to the first line period; If the first FIFO queue is not empty, reading the first line period from the first FIFO queue and inputting the first line period to a Kalman filter, causing the Kalman filter to output a second initial line period, the second initial line period consisting of the second line period and a plurality of fractional data; writing the second initial line period into a corresponding second FIFO queue; reading the second initial line period from the second FIFO queue and inputting the second initial line period into the Kalman filter for iterative calculation; 2. The method of claim 1, further comprising the steps of: truncating a portion of the fractional data of the second initial line period, performing a convolution process on the truncated fractional data, and generating and issuing the second line period based on the truncated second initial line period and an accumulated error obtained by the convolution process.

4. inputting the first line period into a Kalman filter and causing the Kalman filter to output a second initial line period; 4. The method of claim 3, further comprising the steps of: inputting the first line period into the Kalman filter; and causing the Kalman filter to predict a system state based on the first line period to obtain the second initial line period, wherein the system state is clock periods of the source clock of two adjacent identical blanking identifications in the data stream, and the blanking identifications include at least one of a blanking start identification and a blanking end identification.

5. writing the first line period to the first FIFO queue corresponding to the link includes, if triggering a first interrupt, writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt, the first interrupt including an interrupt number generated based on the link and the data stream number; 4. The method of claim 3, wherein reading the second initial line period from the second FIFO queue includes, if triggering a second interrupt, reading the second line period from the second FIFO queue according to a predetermined algorithm and terminating the second interrupt, wherein the predetermined algorithm includes one of a circular scheduling algorithm and a priority scheduling algorithm, and the second interrupt includes the interrupt number.

6. the source clock is a line clock or a pixel clock; If the source clock is the line clock, after processing the first line period using a Kalman filter algorithm to obtain a second line period, the method further includes performing a clock domain transformation on the second line period to obtain a line period in a pixel clock of the first line period; 2. The method of claim 1, wherein if the source clock is the pixel clock, before processing the first line period with a Kalman filter algorithm to obtain a second line period, the method further comprises performing a clock domain conversion on the first line period to obtain a line period in the pixel clock of the first line period.

7. adjusting the output clock based on the second line period; calculating a division ratio based on the second line period and a reference clock period in a phase-locked loop; and controlling the phase-locked loop to generate a corresponding adjusted clock signal based on the division ratio to restore at least one of a phase of the output clock and a frequency of the output clock.

8. a determining unit configured to, when receiving a data stream output from a transmitting side of a DisplayPort, determine a first line period based on the data stream, wherein the first line period is a line period of an output clock of the data stream, the output clock being a clock domain of the receiving side of the DisplayPort; a processing unit configured to process the first line period using at least a Kalman filter algorithm to obtain a second line period, the second line period being a line period of a source clock of the data stream, the source clock being a clock domain of the sender; an adjusting unit configured to adjust the output clock based on the second line period.

9. 8. A computer-readable storage medium comprising a program stored thereon, the program, when executed, controlling a device in which the computer-readable storage medium is located to perform the method of any one of claims 1 to 7.

10. 8. An electronic device comprising one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform a method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Methods for controlling a video interface, methods for operating a video interface, face orientation detector, and video conferencing server

    JP2015517239A

  • Transfer of compressed blanking periods over multimedia links

    JP2017512030A

  • Stream clock generator and embedded DisplayPort system including the same

    US11294418B2

  • Data conversion and high definition multimedia interface receiving device

    US20220124282A1