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

The sequence adjustment method using a Kalman filter addresses the DP protocol's clock frequency mismatch by predicting and adjusting the output clock, ensuring accurate image data restoration and output.

JP7869862B2Active Publication Date: 2026-06-03ANALOGIX (SHANGHAI) SEMICONDUCTOR CO LTD +1

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
ANALOGIX (SHANGHAI) SEMICONDUCTOR CO LTD
Filing Date
2023-11-21
Publication Date
2026-06-03

AI Technical Summary

Technical Problem

The DP protocol results in distorted image data restoration due to mismatched clock frequencies between the transmitter and receiver, leading to inaccurate output.

Method used

A sequence adjustment method using a Kalman filter algorithm to determine and adjust the output clock based on the source clock, ensuring the restored image data matches the original data by predicting a second line period that reflects the pixel line length.

Benefits of technology

The method ensures accurate and reliable image data output by aligning the output clock frequency with the source clock frequency, preventing distortion and ensuring proper image data restoration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007869862000001
    Figure 0007869862000001
  • Figure 0007869862000002
    Figure 0007869862000002
  • Figure 0007869862000003
    Figure 0007869862000003
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 with application number 202311453271.8 and application title "Sequence Adjustment Method, Apparatus, Computer-Readable Storage Medium, and Electronic Device", filed with the Chinese Patent Office on November 2, 2023, the entire content of which is incorporated herein by reference.

Technical Field

[0002] This disclosure relates to the field of data transmission technology, and more specifically, to a sequence adjustment method, apparatus, computer-readable storage medium, and electronic device.

Background Art

[0003] In the DP (Display Port) protocol, transmission sequence information in the Main Link is generated according to the content of image data. On the DP transmission side, the resolution and refresh rate of image data are fixed values, corresponding to a stable pixel clock for a stable line length time, and the line length time corresponding to the image data of each line obtained is constant. Due to changes in the clock domain, when the image sequence is restored on the DP reception side, the line length may increase or decrease, and the consistency of the resolution of each line cannot be maintained, resulting in distorted or inaccurate output of the converted outgoing image.

Summary of the Invention

Problems to be Solved by the Invention

[0004] The main object of this disclosure is to provide a sequence adjustment method, apparatus, computer-readable storage medium, and electronic device, which solves at least the problem that the image data restored on the DP reception side in the prior art is distorted and thus cannot be output normally.

Means for Solving the Problems

[0005] To achieve the above objective, according to one aspect of the present disclosure, a sequence adjustment method is provided, which, upon receiving a data stream output from the transmitter of a display port, includes the steps of: determining a first line period based on the data stream, wherein the first line period is the line period in the output clock of the data stream, and the output clock is the clock domain of the receiver of the display port; processing the first line period using at least a Kalman filter algorithm to obtain a second line period, wherein the second line period is the line period in the source clock of the data stream, and the source clock is the clock domain of the transmitter; 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 identifiers from the image data, wherein the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier; and determining the clock period in the output clock of the two adjacent identical blanking identifiers as the first line period.

[0007] Preferably, the transmitting side outputs the data stream via at least one link, the one link 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 to 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 the Kalman filter, and the Kalman filter A step of causing the logarithm to output a second initial line period, the second initial line period comprising the second line period and a plurality of decimal data; writing the second initial line period to the corresponding second FIFO queue; reading the second initial line period from the second FIFO queue, inputting the second initial line period to the Kalman filter and performing iterative calculations; and truncating a portion of the decimal data of the second initial line period, superimposing the truncated decimal data, and generating and outputting the second line period based on the truncated second initial line period and the cumulative error obtained by the superimposing process.

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

[0009] Preferably, the step of writing the first line period to the first FIFO queue corresponding to the link triggers a first interrupt, the step of writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt, wherein the first interrupt includes a step of including an interrupt number generated based on the numbers of the link and the data stream; and the step of reading the second initial line period from the second FIFO queue triggers a second interrupt, the step of 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 cyclic scheduling algorithm and a priority scheduling algorithm, and the second interrupt includes a step of including the interrupt number.

[0010] Preferably, the source clock is a line clock or a pixel clock, and if the source clock is a line clock, the method further includes the step of processing the first line period using a Kalman filter algorithm to obtain a second line period, and then performing a clock domain transformation on the second line period to obtain the line period in the pixel clock of the first line period, and if the source clock is a 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 a clock domain transformation on the first line period to obtain the 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 the phase-locked loop; and controlling the phase-locked loop based on the division ratio to generate a corresponding adjustment clock signal to restore at least one of the phase of the output clock and the frequency of the output clock.

[0012] According to another aspect of the present disclosure, a sequence adjustment device is provided, comprising: a determination unit configured to determine a first line period based on a data stream output from the transmitter side of a display port, wherein the first line period is the line period in the output clock of the data stream, and the output clock is the clock domain of the receiver side of the display port; a processing unit configured to process the first line period using at least a Kalman filter algorithm to obtain a second line period, wherein the second line period is the line period in the source clock of the data stream, and the source clock is the clock domain of the transmitter 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, a computer-readable storage medium is provided, the computer-readable storage medium includes a stored program, and when the program is executed, the device on which the computer-readable storage medium is located is controlled to perform any of the aforementioned methods.

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

[0015] According to the technical solution of this disclosure, a second line period is predicted and estimated based on a 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 transmitting side, and the output clock is adjusted 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 the restored image data being distorted and therefore unable to be output properly. [Brief explanation of the drawing]

[0016] The drawings, which constitute part of this disclosure, are used to provide a further understanding of this disclosure, and the exemplary embodiments and descriptions thereof are used to interpret this disclosure and are not intended to unduly limit this disclosure. [Figure 1] A block diagram of the hardware structure of a mobile terminal that performs the sequence adjustment method according to an embodiment of this disclosure is shown. [Figure 2] A schematic flowchart of the sequence adjustment method according to the embodiments of this disclosure is shown. [Figure 3] A schematic diagram of the software and hardware implementation structure of the Kalman filter according to the embodiments of this disclosure is shown. [Figure 4] A schematic flow diagram of the Kalman filter algorithm according to the embodiment of this disclosure is shown. [Figure 5] A flowchart illustrating the operation of the first FIFO queue according to an embodiment of this disclosure is shown. [Figure 6] A flowchart illustrating the operation of the second FIFO queue according to an embodiment of the present disclosure is shown. [Figure 7] A schematic diagram showing sequence adjustment performed on the receiving side according to an embodiment of this disclosure is shown. [Figure 8] Another schematic diagram showing sequence adjustment performed on the receiving side according to an embodiment of this disclosure is shown. [Figure 9] A schematic diagram of the sequence adjustment flow according to the embodiments of this disclosure is shown. [Figure 10] A structural block diagram of a sequence adjustment device according to an embodiment of the present disclosure is shown.

Explanation of Reference Numerals

[0017] 102, processor, 104, memory, 106, transmission device, 108, input / output device.

Embodiments for Carrying Out the Invention

[0018] In addition, when there is no contradiction, the embodiments and features in the embodiments in the present disclosure can 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 for those skilled in the art to better understand the solutions of the present disclosure, hereinafter, referring to the drawings in the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts should belong to the protection scope of the present disclosure.

[0020] In addition, the terms "first", "second", etc. in the description, claims and the above drawings of the present disclosure are used to distinguish similar objects and do not necessarily need to be used to explain a specific order or sequence. It should be understood that such data may be exchanged with each other when appropriate for the embodiments of the present disclosure described in this specification. Also, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to the clearly listed steps or units, and may include other steps or units not clearly listed or inherent to those processes, methods, products or devices.

[0021] As described in the background information, in the conventional technology, the clock frequencies of the DP transmitter and DP receiver do not match, resulting in a problem where the image data restored on the DP receiver is distorted and cannot be output correctly. To solve the above technical problem, the embodiments of this disclosure provide a sequence adjustment method, apparatus, computer-readable storage medium, and electronic device.

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

[0023] Embodiments of the methods according to the embodiments of the present disclosure can be implemented in a mobile terminal, a computer terminal, or a similar computing device. Taking implementation in a mobile terminal as an example, Figure 1 is a block diagram of the hardware structure of a mobile terminal for the sequence adjustment method of an embodiment of the present disclosure. As shown in Figure 1, the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (the processors 102 include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and memory 104 for storing data, wherein the mobile terminal may further include transmission equipment 106 and input / output equipment 108 for communication functions. As will be understood by those skilled in the art, the structure shown in Figure 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 Figure 1, or may have a different arrangement than that shown in Figure 1.

[0024] Memory 104 is used to store computer programs, such as software programs and modules of application software, including a computer program corresponding to a sequence adjustment method in an embodiment of the disclosure. The processor 102 executes various functional applications and data processing, i.e., implements the method, by executing the computer programs stored in memory 104. Memory 104 may include 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, memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the network include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. Transmission equipment 106 is used to receive or transmit data over one network. Specific examples of the network may include a wireless network provided by the mobile terminal's communication carrier. In one example, transmission equipment 106 includes a Network Interface Controller (NIC), which can communicate with the Internet via a base station and other network equipment. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0025] This embodiment provides a sequence adjustment method to be performed on a mobile terminal, computer terminal, processor, or similar arithmetic unit. The steps shown in the flowchart of the drawings can be performed, for example, on a computer system of a set of computer-executable instructions. Although the flowchart shows a logical order, in some cases the steps shown or described may be performed in a different order than specified herein.

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

[0027] In step S201, when a data stream output from the transmitting side of the display port is received, a first line period is determined based on the data stream, the first line period being the line period in the output clock of the data stream, and the output clock being the clock domain of the receiving side of the display port. 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, reconstructs a pixel clock that matches the transmitting side's clock, and thereby reconstructs accurate data. In most cases, the receiving side samples the received signal on the rising 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, the first line period is processed using at least a Kalman filter algorithm to obtain a second line period, the second line period being the line period in the source clock of the data stream, and the source clock being the clock domain of the transmitting side. Specifically, the clock domain of the source clock is generally the 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 in the output clock of the data stream is determined based on the data stream transmitted from the DisplayPort transmitter. Subsequently, the first line period is processed using at least a Kalman filter algorithm to obtain a second line period in the source clock of the data stream. Finally, the output clock is adjusted based on the obtained second line period. In the prior art, the clock frequencies of the DP transmitter and DP receiver do not match, resulting in distortion of the image data restored to the DP receiver and consequently, the inability to output it correctly. In contrast, this disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm, obtains a second line period that stably reflects the pixel line length of the transmitter, and further adjusts the output clock using the estimated second line period. This ensures that the adjusted output clock frequency fundamentally matches the source clock frequency, thereby ensuring that the image data restored based on the adjusted output clock fundamentally matches the original data, thus avoiding the problem of distortion of the restored image data and consequently, the inability to output it correctly.

[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 identifiers from the image data, wherein the blanking identifier includes at least one of a Blanking Start (BS) identifier and a Blanking End (BE) identifier; and determining the clock period in the output clock of the two adjacent identical blanking identifiers as the first line period.

[0032] In the above embodiment, first, the received data stream is restored to obtain image data including blanking identifiers and an output clock. Furthermore, the line length of the image data is evaluated using the number of clock periods in the output clocks of two adjacent blanking start identifiers or two adjacent blanking end identifiers to obtain the first line period. This allows for the accurate acquisition of the first line period corresponding to the data stream, providing accurate data support for the subsequent estimation of the second line period.

[0033] Specifically, the image data generally includes BS identification, vertical blanking identification, possible values ​​for the timer, virtual display, BE identification, pixel data, filling start identification, filling data, and filling end identification.

[0034] In one exemplary embodiment, the step of processing the first line period using at least a Kalman filter algorithm to obtain a second line period includes the step of processing the first line period using a Kalman filter algorithm to obtain a system state that characterizes the clock periods in the source clock for two adjacent identical blanking identifiers in the data stream, wherein the system state is the second line period.

[0035] Naturally, in addition to the embodiments described above, those skilled in the art can determine the second line period in other ways, in this disclosure the transmitting side outputs the data stream over at least one link, that is, the transmitting side transmits the data stream using single-stream transport (SST) or multi-stream transport (MST), one of the links corresponds to at least one first FIFO queue and at least one second FIFO queue, and 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 the second line period, and the following specific steps are included.

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

[0037] In step S2022, if the first FIFO queue is not empty, the first line period is read from the first FIFO queue and input to the 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 decimal data. Specifically, the Kalman filter is used to execute the Kalman filter algorithm, and it may be a hardware-designed device or a software-designed device, the second initial line period is the original period value in the source clock of the data stream obtained by estimation using the Kalman filter algorithm, and the second initial line period is a decimal number. The decimal data is the data value of the decimal part of the second initial line period.

[0038] In step S2023, the second initial line period is written to 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 to perform iterative calculations. Specifically, the Kalman filter algorithm uses the system state at the previous time and the measured value at the current time to obtain the optimal estimate of the system state of the dynamic system at the current time. To do this, it is necessary to obtain the second initial line period and then feed back this second initial line period to the input terminal of the Kalman filter.

[0039] In step S2025, a portion of the decimal data of the second initial line period is truncated, the truncated decimal data is superimposed, and the second line period is generated and output based on the truncated second initial line period and the cumulative error obtained by the superimposition process.

[0040] Specifically, since the Kalman filter algorithm is a cyclic iterative algorithm, each time the Kalman filter algorithm obtains one second line period, it performs one truncation operation, obtaining one truncated decimal data point, and then superimposes these truncated decimal data points to obtain the cumulative error.

[0041] In the above embodiment, the Kalman filter algorithm performs dynamic filtering on the first line period, further ensuring that a second line period that stably reflects the pixel line length on the transmitting side is obtained, and further ensuring that sequence adjustments are made to the receiving end, thereby ensuring that the image data restored on the receiving side is more accurate and reliable. Furthermore, since the Kalman filter algorithm is an iterative algorithm, it is necessary to calculate the system state at the current time using the system state calculated at the previous time and the measured value at the current time. This disclosure balances the difference between the measured value interval and the system state interval by setting up a two-stage FIFO queue, making the two basically the same, and further facilitating the execution of the Kalman filter algorithm. In addition, this disclosure assigns a first FIFO queue and a second FIFO queue to the transmission link of each data stream, allows multiple transmission links to share Kalman filter computation resources, and realizes that the iterative calculation of the data stream for each link is performed in time division, thereby obtaining the second line period corresponding to each link, and avoids the problem of resource waste caused by designing separate computation resources for each link.

[0042] Naturally, by installing the first and second FIFO queues, it is possible to prevent the loss of multilink data during input and output processes, avoid frequent bus operations, and reduce the processor load.

[0043] Furthermore, to ensure flexibility in sequence adjustment, in one preferred method, the Kalman filter is a device that implements the Kalman filter algorithm, and the first and second FIFO queues are implemented by software. This disclosure, through an implementation combining software and hardware, can provide the ability to later programmatically modify and update the dynamic filter algorithm compared to an implementation by a simple hardware method.

[0044] Furthermore, the step of generating and outputting the second line period based on the truncated second initial line period and the cumulative error obtained by the superposition process specifically involves, if the cumulative error is greater than a threshold, correcting the truncated second initial line period based on the cumulative error to obtain the second line period, and if the cumulative error is less than or equal to the threshold, directly outputting the truncated second initial line period as the second line period.

[0045] Furthermore, the step of correcting the second initial line period, which has been truncated based on the cumulative error, to obtain the second line period includes the step of adding the average value of the cumulative error to the truncated second initial line period to obtain the second line period.

[0046] Furthermore, step S2025 can be implemented using a software method, a hardware method, or a method that combines software and hardware. In the embodiment where implementation by a hardware method is necessary, the number of bits of the truncated fractional data is specifically determined based on the number of fractional bits that the hardware generation logic itself can store. That is, based on the number of bits of the fractional part that the hardware generation logic can store, fractional bits exceeding the number of fractional bits of the hardware generation logic are truncated, and superimposed using an error accumulation method, and the fractional part that matches the hardware generation logic each time is repeatedly output. The truncation process can be implemented by hardware, and the fractional part accumulation process can be implemented by software, thus achieving the objective of cooperation between software and hardware.

[0047] According to some other embodiments of the present disclosure, the step of inputting the first line period into a Kalman filter and causing the Kalman filter to output a second initial line period is a step 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 the clock period in the source clock of two adjacent identical blanking identifiers in the data stream, and the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier. The present disclosure defines system states and measurements on both the transmitting and receiving sides of a display port, respectively, and estimates a system state characterizing the transmitting line period from measurements characterizing the receiving line period by dynamic filtering, thereby obtaining a system state output that more stably reflects the transmitting line period.

[0048] Specifically, the 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 measured value Z represents the measured value at time T0. For example, this could 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 here an observed value of the system state, for example, the observed value of the system state at time T0, or another effective estimate of the system state can be selected. The observation coefficient H, i.e., the ratio of the relationship between the measured value and the system state, is selected as a constant h0. From the perspective of the measurement, the measured value can have a constant linear proportional relationship with the system state, and the line periods of multi-pixel lines within a certain time can be accumulated and selected as the measured value for calculation. For example, the line periods of 5 lines are selected and observed to be one-fifth of the system state obtained by the BS interval calculation, i.e., the measured value. The initial states q0 and r0 of the error coefficients Q and R are selected. The error coefficients can be modified to correct the Kalman filter calculation process, allowing the user to adjust them based on the actual system, or they can be kept unchanged after being selected in the starting state. An intermediate value P and an initial value P[0] of the calculation process are selected, for example, state 0 is generally selected.

[0049] As shown in Figure 4, the calculation employs an iterative method, performing calculations at each iteration time k, and obtaining the system state X at iteration time k from the calculation results. 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 is, specifically, 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 includes a step of including an interrupt number generated based on the numbers of the link and the data stream. The interrupt number is used to characterize the link and data stream corresponding to the first line period and is the sole 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 is, specifically, the step of reading the second line period from the second FIFO queue and terminating the second interrupt if a second interrupt is triggered, the step of reading the second line period from the second FIFO queue according to a predetermined algorithm, the predetermined algorithm includes one of a cyclic scheduling algorithm and a priority scheduling algorithm, and the second interrupt includes a step of including the interrupt number. The present disclosure combines FIFO queues and interrupts to satisfy real-time processing requirements and further improve sequence coordination efficiency. Furthermore, by using a cyclic scheduling or priority scheduling method, the second line period can be read from the second FIFO queue, the iterations of the parallel cycle can be distributed to multiple threads, and the sequence adjustment progress of each link can be accelerated.

[0051] Furthermore, the specific implementation method for reading the first line period from the first FIFO queue in step S2022 is the same as the implementation method in step S2024, and the specific implementation method for writing the second initial line period to the corresponding second FIFO queue in step S2023 is the same as the specific implementation method in step S2021, and therefore the explanation 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, the measured values ​​are counted, the first line period corresponding to the nth link is read, and it is written to the first FIFO queue, and the first interrupt corresponding to the nth link is terminated. As shown in Figure 6, when the system state of the nth link is written to the second FIFO, a second interrupt corresponding to the nth link is triggered, the system state values ​​are counted, the system state is read from the second FIFO, the generation logic of the second line period is updated based on the system state, 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 processes, the source clock may be a line clock or a pixel clock, i.e., the system state of the Kalman filter may be the clock period of two adjacent identical blanking identification intervals in the clock domain of the transmitting line clock, or the clock period of two adjacent identical blanking identification intervals in the clock domain of the transmitting pixel clock, and in order to further realize the precise adjustment of the output clock sequence corresponding to these two situations, in some further preferred embodiments of the present disclosure, when the source clock is the line clock, the method further includes the step of processing the first line period using a Kalman filter algorithm to obtain a second line period, and then performing a clock domain transformation on the second line period to obtain the line period in the pixel clock of the first line period. When 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 a clock domain transformation on the first line period to obtain the line period in the pixel clock of the first line period.

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

[0055] To further solve the problem that the image data restored to the DP receiver is distorted and therefore cannot be output properly because the clock frequencies of the DP transmitter and DP receiver do not match, 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 the reference clock period in the phase-locked loop; and controlling the phase-locked loop (PLL) based on the division ratio to generate a corresponding adjustment clock signal to restore at least one of the phase of the output clock and the frequency of the output clock. By calculating a fractional division ratio of the second line period and the reference clock period in the phase-locked loop, and further controlling the PLL based on the fractional division ratio to generate the adjustment clock signal and restore the image data, it is further ensured that the resolution of the restored image data and the transmitter side are basically the same, and further the accuracy and reliability of the restored image data are ensured.

[0056] This embodiment relates to a specific sequence adjustment method and includes the following steps, as shown in Figure 9. In step S1, the data stream from the transmitting side's main link is received, and by reconstruction, the clock periods of two adjacent identical blanking identifiers observed from the main link are obtained, and the first line period is obtained. In step S2, the Kalman filter circuit is triggered, dynamic filtering calculations are performed on the first line period, and the clock periods of two adjacent identical blanking identifiers with a transmitter reference are obtained as the second line period. In step S3, the reference clock period in the PLL is coupled based on the second line period, the frequency adjustment circuit is controlled to perform frequency adjustment calculations, and the dynamically changing frequency is output to control the fractional frequency ratio. In step S4, based on the fractional frequency ratio, the PLL is controlled to generate an adjustment clock signal for the corresponding image pixel, which is used to restore the image data and simultaneously fed back to the frequency adjustment circuit for dynamic adjustment reference.

[0057] Furthermore, the steps shown in the flowchart can be executed, for example, in a computer system with a set of computer-executable instructions, and although the flowchart shows a logical order, in some cases the steps shown or described may be executed in a different order.

[0058] Embodiments of this disclosure further provide sequence adjustment devices, which can be used to perform sequence adjustment methods provided in embodiments of this disclosure. Such devices are used to implement the above embodiments and preferred embodiments, and further details have been omitted. As used below, the term “module” can implement a combination of software and / or hardware with a predetermined function. The devices described in the following embodiments are preferably implemented in software, but are also conceived as hardware, or a combination of software and hardware.

[0059] The sequence adjustment device provided in the embodiments of this disclosure is described below.

[0060] Figure 10 is a schematic diagram of a sequence adjustment device according to an embodiment of the present disclosure. As shown in Figure 10, the device includes the following: The determination unit 10 is configured to determine a first line period based on the data stream when it receives a data stream output from the transmitter side of the display port, wherein the first line period is the line period in the output clock of the data stream, and the output clock is the clock domain of the receiver side of the display port. 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, reconstructs a pixel clock that matches the transmitting side's clock, and thereby reconstructs accurate data. In most cases, the receiving side samples the received signal on the rising 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, wherein the second line period is the line period in the source clock of the data stream, and the source clock is the clock domain of the transmitting side. The adjustment unit 30 is configured to adjust the output clock based on the second line period.

[0062] In the above embodiment, a determination unit determines a first line period in the output clock of a data stream based on a data stream transmitted from the transmitter side of a DisplayPort, a processing unit processes the first line period using at least a Kalman filter algorithm to obtain a second line period in the source clock of the data stream, and an adjustment unit adjusts the output clock based on the obtained second line period. In the prior art, the clock frequencies of the DP transmitter and DP receiver do not match, which causes distortion and ultimately prevents the image data restored to the DP receiver from being output correctly. In contrast, this disclosure predicts and estimates a 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 of the transmitter, and further 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 thus avoids the problem of distortion and ultimately prevent the restored image data from being output correctly.

[0063] In one preferred means, the decision 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 identifiers from the image data, wherein the blanking identifiers include at least one of a blanking start identifier and a blanking end identifier; and a decision module configured to determine the clock period in the output clock of two adjacent identical blanking identifiers as the first line period.

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

[0065] Specifically, the image data generally includes BS identification, vertical blanking identification, possible values ​​for the timer, virtual display, BE identification, pixel data, filling start identification, filling data, and filling end identification.

[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 characterized by the clock periods in the source clock of two adjacent identical blanking identifiers in the data stream, wherein the system state is the second line period.

[0067] Naturally, in addition to the embodiments described above, those skilled in the art can determine the second line period by other means, in this disclosure the transmitting side outputs the data stream via at least one link, that is, the transmitting side transmits the data stream using a single-stream transmission mode or a multi-stream transmission mode, one of the links corresponds to at least one first FIFO queue and at least one second FIFO queue, and the processing unit includes the following: The first writing module is 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 period is a link that transmits the data stream of the first line period. The first FIFO queue and the second FIFO queue may be hardware-designed FIFOs or software-designed FIFOs.

[0068] The first reading module is configured to read the first line period from the first FIFO queue if the first FIFO queue is not empty, input the first line period to the Kalman filter, and cause 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 decimal data, Specifically, the Kalman filter is used to execute the Kalman filter algorithm, and it may be a hardware-designed device or a software-designed device, the second initial line period is the original period value in the source clock of the data stream obtained by estimation using the Kalman filter algorithm, and the second initial line period is a decimal number. The decimal data is the data value of the decimal part of the second initial line period.

[0069] The second writing module is configured to write the second initial line period to the corresponding second FIFO queue. The second reading module is configured to read the second initial line period from the second FIFO queue and input the second initial line period to the Kalman filter to perform iterative calculations. Specifically, the Kalman filter algorithm uses the system state at the previous time and the measured value at the current time to obtain the optimal estimate of the system state of the dynamic system at the current time. To do this, it is necessary to obtain the second initial line period and then feed back this second initial line period to the input terminal of the Kalman filter.

[0070] The truncation module is configured to truncate a portion of the decimal data of the second initial line period, superimpose the truncated decimal data, and generate and output the second line period based on the truncated second initial line period and the cumulative error obtained by the superimposition process.

[0071] Specifically, since the Kalman filter algorithm is a cyclic iterative algorithm, each time the Kalman filter algorithm obtains one second line period, it performs one truncation operation, obtaining one truncated decimal data point, and then superimposes these truncated decimal data points to obtain the cumulative error.

[0072] In the above embodiment, the Kalman filter algorithm performs dynamic filtering on the first line period, further ensuring that a second line period that stably reflects the pixel line length on the transmitting side is obtained, and further ensuring that sequence adjustments are made to the receiving end, thereby ensuring that the image data restored on the receiving side is more accurate and reliable. Furthermore, since the Kalman filter algorithm is an iterative algorithm, it is necessary to calculate the system state at the current time using the system state calculated at the previous time and the measured value at the current time. This disclosure balances the difference between the measured value interval and the system state interval by setting up a two-stage FIFO queue, making the two basically the same, and further facilitating the execution of the Kalman filter algorithm. In addition, this disclosure assigns a first FIFO queue and a second FIFO queue to the transmission link of each data stream, allows multiple transmission links to share Kalman filter computation resources, and realizes that the iterative calculation of the data stream for each link is performed in time division, thereby obtaining the second line period corresponding to each link, and avoids the problem of resource waste caused by designing separate computation resources for each link.

[0073] Naturally, by installing the first and second FIFO queues, it is possible to prevent the loss of multilink data during input and output processes, avoid frequent bus operations, and reduce the processor load.

[0074] Furthermore, to ensure flexibility in sequence adjustment, in a preferred manner, the Kalman filter is a device that implements the Kalman filter algorithm, and the first and second FIFO queues are implemented by software. This disclosure, by combining software and hardware implementation, can provide the ability to later programmatically modify and update the dynamic filter algorithm compared to implementation by a simple hardware method.

[0075] Furthermore, the truncation module may specifically include a correction submodule configured to correct the second initial line period, which has been truncated based on the cumulative error, if the cumulative error is greater than a threshold, in order to obtain the second line period, and an output submodule configured to output the directly truncated second initial line period as the second line period if the cumulative error is less than or equal to the threshold.

[0076] Furthermore, the modification submodule is configured to add the average value of the cumulative error to the second initial line period, which has been further truncated, in order to obtain the second line period.

[0077] The truncation module can be implemented using a software method, a hardware method, or a method that combines software and hardware. In the embodiment where implementation by hardware is necessary, the number of bits of the truncated fractional data is determined based on the number of fractional bits that the hardware generation logic itself can store. Specifically, based on the number of fractional bits that the hardware generation logic can store, fractional bits exceeding the number of fractional bits of the hardware generation logic are truncated, and the fractional part that matches the hardware generation logic is repeatedly output. The truncation process can be implemented by hardware, and the fractional part accumulation process can be implemented by software, thus achieving the objective of cooperation between software and hardware.

[0078] According to some other embodiments of the present disclosure, the first read module is an input submodule configured to input the first line period to the Kalman filter, 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 the clock period in the source clock of two adjacent identical blanking identifiers in the data stream, and the blanking identifier includes an input submodule that includes at least one of a blanking start identifier and a blanking end identifier. The present disclosure defines system states and measurements on both the transmitting and receiving sides of a display port, respectively, and estimates the system state characterizing the transmitting line period from the measurements characterizing the receiving line period by dynamic filtering, thereby obtaining a system state output that more stably reflects the transmitting line period.

[0079] Specifically, the 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 measured value Z represents the measured value at time T0. For example, this could 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 here an observed value of the system state, for example, the observed value of the system state at time T0, or another effective estimate of the system state can be selected. The observation coefficient H, i.e., the ratio of the relationship between the measured value and the system state, is selected as a constant h0. From the perspective of the measurement, the measured value can have a constant linear proportional relationship with the system state, and the line periods of multi-pixel lines within a certain time can be accumulated and selected as the measured value for calculation. For example, the line periods of 5 lines are selected and observed to be one-fifth of the system state obtained by the BS interval calculation, i.e., the measured value. The initial states q0 and r0 of the error coefficients Q and R are selected. The error coefficients can be modified to correct the Kalman filter calculation process, allowing the user to adjust them based on the actual system, or they can be kept unchanged after being selected in the starting state. An intermediate value P and an initial value P[0] of the calculation process are selected, for example, state 0 is generally selected.

[0080] The calculation employs an iterative approach, performing a calculation at each iteration time k, and obtaining the system state X at iteration time k from 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 is specifically a write submodule configured to write the first line period to the first FIFO queue corresponding to the link and terminate the first interrupt when it triggers a first interrupt, wherein the first interrupt includes a write submodule which includes an interrupt number generated based on the numbers of the link and the data stream. 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 is specifically a read submodule configured to read the second line period from the second FIFO queue and terminate the second interrupt when it triggers a second interrupt, wherein the predetermined algorithm includes one of a cyclic scheduling algorithm and a priority scheduling algorithm, and the second interrupt includes a read submodule which includes the interrupt number. The present disclosure combines FIFO queues and interrupts to satisfy real-time processing requirements and further improve sequence coordination efficiency. Furthermore, by using a cyclic scheduling or priority scheduling method, the second line period can be read from the second FIFO queue, the iterations of the parallel cycle can be distributed to multiple threads, and the sequence adjustment progress of each link can be accelerated.

[0082] Furthermore, the specific implementation method for reading the first line period from the first FIFO queue in the first read module is the same as the implementation method for the second read module, and the specific implementation method for writing the second initial line period to the corresponding second FIFO queue in the second write module is the same as the specific implementation method for the first write module, and therefore, an explanation 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, the measured values ​​are counted, the first line period corresponding to the nth link is read, and it is written to the first FIFO queue, and the first interrupt corresponding to the nth link is terminated. As shown in Figure 6, when the system state of the nth link is written to the second FIFO, a second interrupt corresponding to the nth link is triggered, the system state values ​​are counted, the system state is read from the second FIFO, the generation logic of the second line period is updated based on the system state, 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 processes, the source clock may be a line clock or a pixel clock, i.e., the system state of the Kalman filter may be the clock period of two adjacent identical blanking identification intervals in the clock domain of the transmitting line clock, or the clock period of two adjacent identical blanking identification intervals in the clock domain of the transmitting pixel clock, and in order to further realize the precise adjustment of the output clock sequence corresponding to these two situations, in some further preferred embodiments of the present disclosure, the apparatus further includes a first conversion unit configured to process the first line period using a Kalman filter algorithm to obtain a second line period, and then perform a clock domain conversion on the second line period to obtain the line period of the first line period in the pixel clock, when the source clock is the line clock. The apparatus further includes a second conversion unit configured to perform a clock domain conversion on the first line period before processing the first line period using a Kalman filter algorithm to obtain the line period of the first line period in the pixel clock, when the source clock is the pixel clock.

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

[0086] To further solve the problem that the image data restored to the DP receiver is distorted and therefore cannot be output properly because the clock frequencies of the DP transmitter and DP receiver do not match, preferably the adjustment unit includes a calculation module configured to calculate a division ratio based on the second line period and the reference clock period in the phase-locked loop, and a control module configured to control the phase-locked loop based on the division ratio to generate a corresponding adjustment clock signal to restore at least one of the phase of the output clock and the frequency of the output clock. By calculating a fractional division ratio of the second line period and the reference clock period in the phase-locked loop, and further controlling the PLL based on the fractional division ratio to generate the adjustment clock signal and restore the image data, it is further ensured that the resolution of the restored image data and the transmitter side are basically the same, and further the accuracy and reliability of the restored image data are ensured.

[0087] The sequence adjustment device includes a processor and memory, and the decision unit, processing unit, and adjustment unit are all stored in memory as program units, and the processor realizes the corresponding functions by executing the program units stored in memory. The modules are all located on the same processor, or the modules are located on different processors in any combination.

[0088] The processor includes a kernel, which calls corresponding program units from memory. One or more kernels can be installed, and by adjusting the kernel parameters, the problem of image data restored to the DP receiver being distorted and therefore unable to be output correctly, as in conventional technology, can be solved.

[0089] 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 memory may include at least one memory chip.

[0090] Embodiments of the present disclosure provide a computer-readable storage medium containing a stored program, wherein the device on which the computer-readable storage medium is located is controlled during execution of the program to execute the sequence adjustment method.

[0091] Specifically, the sequence adjustment method includes the following: In step S201, when a data stream output from the transmitting side of the display port is received, a first line period is determined based on the data stream, the first line period being the line period in the output clock of the data stream, and the output clock being the clock domain of the receiving side of the display port. 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, reconstructs a pixel clock that matches the transmitting side's clock, and thereby reconstructs accurate data. In most cases, the receiving side samples the received signal on the rising or falling edge of the output clock. The clock domain of the receiving side is generally the line clock.

[0092] In step S202, the first line period is processed using at least a Kalman filter algorithm to obtain a second line period, the second line period being the line period in the source clock of the data stream, and the source clock being the clock domain of the transmitting side. 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 identifiers from the image data, wherein the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier; and determining the clock period in the output clock of the two adjacent identical blanking identifiers as the first line period.

[0095] Preferably, the transmitting side outputs the data stream via at least one link, the one link 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 to 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 the Kalman filter, and the Kalman filter A step of causing the logarithm to output a second initial line period, the second initial line period comprising the second line period and a plurality of decimal data; writing the second initial line period to the corresponding second FIFO queue; reading the second initial line period from the second FIFO queue, inputting the second initial line period to the Kalman filter and performing iterative calculations; and truncating a portion of the decimal data of the second initial line period, superimposing the truncated decimal data, and generating and outputting the second line period based on the truncated second initial line period and the cumulative error obtained by the superimposing process.

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

[0097] Preferably, the step of writing the first line period to the first FIFO queue corresponding to the link triggers a first interrupt, the step of writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt, wherein the first interrupt includes a step of including an interrupt number generated based on the numbers of the link and the data stream; and the step of reading the second initial line period from the second FIFO queue triggers a second interrupt, the step of 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 cyclic scheduling algorithm and a priority scheduling algorithm, and the second interrupt includes a step of including the interrupt number.

[0098] Preferably, the source clock is a line clock or a pixel clock, and if the source clock is a line clock, the method further includes the step of processing the first line period using a Kalman filter algorithm to obtain a second line period, and then performing a clock domain transformation on the second line period to obtain the line period in the pixel clock of the first line period, and if the source clock is a 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 a clock domain transformation on the first line period to obtain the 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 the phase-locked loop; and controlling the phase-locked loop based on the division ratio to generate a corresponding adjustment clock signal to restore at least one of the phase of the output clock and the frequency of the output clock.

[0100] Embodiments of the present disclosure provide a processor configured to execute a program, and during the execution of the program, execute the sequence adjustment method.

[0101] Embodiments of this disclosure provide a device including a processor, memory, and a program stored in memory and executable by the processor, which achieves at least the following steps when the processor executes the program. In step S201, when a data stream output from the transmitting side of the display port is received, a first line period is determined based on the data stream, the first line period being the line period in the output clock of the data stream, and the output clock being the clock domain of the receiving side of the display port. In step S202, the first line period is processed using at least a Kalman filter algorithm to obtain a second line period, the second line period being the line period in the source clock of the data stream, and the source clock being the clock domain of the transmitting side. In step S203, the output clock is adjusted based on the second line period.

[0102] The devices referred to in this specification may include servers, PCs, tablets, mobile phones, and the like.

[0103] The aforementioned device may specifically be an image adapter or docking station including a DisplayPort.

[0104] This disclosure further provides computer program products suitable for executing a program that, when executed on a data processing device, initializes at least the following method steps. In step S201, when a data stream output from the transmitting side of the display port is received, a first line period is determined based on the data stream, the first line period being the line period in the output clock of the data stream, and the output clock being the clock domain of the receiving side of the display port. In step S202, the first line period is processed using at least a Kalman filter algorithm to obtain a second line period, the second line period being the line period in the source clock of the data stream, and the source clock being the clock domain of the transmitting side. In step S203, the output clock is adjusted based on the second line period.

[0105] Clearly, as those skilled in the art will see, each module or step of the present disclosure can be implemented on a general-purpose computer, they can be concentrated on a single computer or distributed across a network of multiple computers, they can be implemented in executable program code for a computer, thereby being stored in a memory device and executed on the computer, in some cases performing steps shown or described in a different order than herein, or being fabricated on each integrated circuit module, or several of these modules or steps being fabricated on a single integrated circuit module. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0106] As those skilled in the art will see, embodiments of the present disclosure may be provided as methods, systems, or computer program products. Accordingly, the present disclosure may take the form of complete hardware embodiments, complete software embodiments, or embodiments combining software and hardware. The present disclosure may also take the form of computer program products implemented on a computer-available storage medium (including, but not limited to, magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-available program code for one or more computers.

[0107] This disclosure will be described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of this disclosure. It should be understood that computer program instructions can realize each flow and / or block in the flowcharts and / or block diagrams, and the combinations of flows and / or blocks in the flowcharts and / or block diagrams. These computer program instructions can be provided to the processor of a general-purpose computer, a dedicated 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 a device for realizing the functions specified in one flow of a flowchart or one or more blocks of multiple flows and / or block diagrams.

[0108] These computer program instructions can be stored in computer-readable memory that can guide a computer or other programmable data processing device to operate in a particular manner, and the instructions stored in the computer-readable memory generate a product including an instruction unit, which implements the functions specified in one or more flows of a flowchart and / or one or more blocks of a block diagram.

[0109] These computer program instructions can be uploaded to a computer or other programmable data processing device, causing the computer or other programmable device to execute a series of operational steps to generate processing realized by the computer, thereby providing steps to realize a function specified in one or more flows of a flowchart and / or one or more blocks of a block diagram.

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

[0111] Memory can include various forms of computer-readable media, such as volatile memory, random access memory (RAM), and / or non-volatile memory, for example, read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

[0112] Computer-readable media include non-volatile and volatile media, and portable and non-portable media can store information by any method or technique. Information may be computer-readable instructions, data structures, program modules, or other data. 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-ROM), 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, which can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient storage computer-readable media, such as modulated data signals and carrier waves.

[0113] Furthermore, the terms “include,” “contain,” or any other variation thereof are intended to include non-exclusive inclusion, thereby including not only those elements but also other elements not explicitly listed, or elements specific to such a process, method, product, or device. Unless further restricted, the elements limited by the phrase “include one…” are not excluded from the existence of other identical elements beyond those included in the process, method, product, or device of the element.

[0114] As can be seen from the above description, the embodiments of this disclosure achieve the following technical effects. 1) The sequence adjustment method of this disclosure first determines a first line period in the output clock of a data stream based on a data stream transmitted from the transmitter side of a DisplayPort, then processes the first line period using at least a Kalman filter algorithm to obtain a second line period in the source clock of the data stream, and finally adjusts the output clock based on the obtained second line period. In the prior art, the clock frequencies of the DP transmitter and DP receiver do not match, which causes distortion and ultimately prevents the image data restored on the DP receiver side from being output correctly. In contrast, this disclosure predicts and estimates a 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 of the transmitter side, and further 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 thus avoids the problem of distortion and ultimately prevent the restored image data from being output correctly.

[0115] 2) The sequence adjustment device of the present disclosure determines a first line period in the output clock of a data stream based on a data stream transmitted from the transmitter side of a display port by a determination unit, processes the first line period using at least a Kalman filter algorithm by a processing unit to obtain a second line period in the source clock of the data stream, and adjusts the output clock based on the obtained second line period by an adjustment unit. In the prior art, the clock frequencies of the DP transmitter and DP receiver do not match, which causes distortion and ultimately prevents the restored image data from being output normally. In contrast, the present disclosure predicts and estimates a second line period based on the first line period using at least a Kalman filter algorithm, obtains a second line period that stably reflects the pixel line length of the transmitter, and further 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 avoids the problem of distortion and ultimately prevent the restored image data from being output normally.

[0116] The foregoing describes only preferred embodiments of the Disclosure and does not limit it, and various modifications and changes are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the Disclosure should be within the scope of protection of the Disclosure.

Claims

1. When a data stream output from the transmitting side of a DisplayPort is received, the step of determining a first line period based on the data stream, wherein the first line period is the line period in the output clock of the data stream, and the output clock is the clock domain of the receiving side of the DisplayPort; A step of processing the first line period using at least a Kalman filter algorithm to obtain a second line period, wherein the second line period is the line period in the source clock of the data stream, and the source clock is the clock domain of the transmitting side. The process includes the step of adjusting the output clock based on the second line period, The transmitting side outputs the data stream via at least one link, the one link 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 is: A step of writing the first line period to 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, the first line period is read from the first FIFO queue, and the first line period is input to the Kalman filter, causing the Kalman filter to output a second initial line period, wherein the second initial line period consists of the second line period and a plurality of decimal data. The steps include writing the second initial line period to the corresponding second FIFO queue, The steps include reading the second initial line period from the second FIFO queue, inputting the second initial line period to the Kalman filter, and performing iterative calculations. A sequence adjustment method characterized by comprising the steps of: truncating a portion of the decimal data of the second initial line period, superimposing the truncated decimal data, and generating and outputting the second line period based on the truncated second initial line period and the cumulative error obtained by the superimposing process.

2. The step of determining the first line period based on the aforementioned data stream is: The steps include restoring the data stream and obtaining image data and the output clock, A step of extracting two adjacent identical blanking identifiers from the image data, wherein the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier. The method according to claim 1, comprising the step of determining the clock period in the output clock of two adjacent identical blanking identifiers as the first line period.

3. The step of inputting the first line period into the Kalman filter and causing the Kalman filter to output a second initial line period is: The method according to claim 1, comprising the steps of inputting the first line period to the Kalman filter, causing the Kalman filter to predict a system state based on the first line period, and obtaining the second initial line period, wherein the system state is the clock period in the source clock of two adjacent identical blanking identifiers in the data stream, and the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier.

4. The step of writing the first line period to the first FIFO queue corresponding to the link, if a first interrupt is triggered, includes the step of writing the first line period to the first FIFO queue corresponding to the link and terminating the first interrupt, wherein the first interrupt includes the step of including an interrupt number generated based on the numbers of the link and the data stream. The method according to claim 1, wherein the step of reading the second initial line period from the second FIFO queue triggers a second interrupt, the step of 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 cyclic scheduling algorithm and a priority scheduling algorithm, and the second interrupt includes the step of including the interrupt number.

5. The aforementioned source clock is a line clock or a pixel clock. If the source clock is the line clock, the sequence adjustment method further includes the step of processing the first line period using a Kalman filter algorithm to obtain a second line period, and then performing a clock domain conversion on the second line period to obtain the line period in the pixel clock of the first line period. The method according to claim 1, wherein, when the source clock is the pixel clock, the sequence adjustment method further includes the step of performing a clock domain conversion on the first line period to obtain the line period of the first line period in the pixel clock, before processing the first line period using a Kalman filter algorithm to obtain the second line period.

6. The step of adjusting the output clock based on the second line period is: The steps include calculating the frequency division ratio based on the second line period and the reference clock period in the phase-locked loop, The method according to claim 1, comprising the step of controlling the phase-locked loop based on the frequency division ratio to generate a corresponding adjustment clock signal, thereby restoring at least one of the phase of the output clock and the frequency of the output clock.

7. A determination unit configured to determine a first line period based on a data stream output from the transmitter side of a DisplayPort, wherein the first line period is the line period in the output clock of the data stream, and the output clock is the clock domain of the receiver 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, wherein the second line period is the line period in the source clock of the data stream, and the source clock is the clock domain of the transmitting side. The system includes an adjustment unit configured to adjust the output clock based on the second line period, The transmitting side outputs the data stream via at least one link, the one link corresponding to at least one first FIFO queue and at least one second FIFO queue, and the processing unit, A first writing module is 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, A first reading module is configured to read the first line period from the first FIFO queue if the first FIFO queue is not empty, input the first line period to a Kalman filter, and cause the Kalman filter to output a second initial line period, wherein the second initial line period is composed of the second line period and a plurality of decimal data, A second writing module configured to write the second initial line period to the corresponding second FIFO queue, A second reading module is configured to read the second initial line period from the second FIFO queue and input the second initial line period to the Kalman filter to perform iterative calculations, A sequence adjustment device comprising: a truncation module configured to truncate a portion of the decimal data of the second initial line period, superimpose the truncated decimal data, and generate and output the second line period based on the truncated second initial line period and the cumulative error obtained by the superimposition process.

8. A computer-readable storage medium, comprising a stored program, characterized in that when the program is executed, the location device of the computer-readable storage medium is controlled to perform the method according to any one of claims 1 to 6.

9. An electronic device comprising one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the method according to any one of claims 1 to 6.