Method and terminal for controlling image display and computer readable storage medium
By sending instructions in the first time period of the image signal and reading image data from the buffer in the second time period, the image tearing problem is solved, the image display effect is improved, and the display module can read the complete image data .
Patent Information
- Application Number
- CN202411206265.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-13
AI Technical Summary
In image processing technology, when the display driver chip reads image data from the buffer, the inconsistency with the command sent by the main control platform leads to image tearing, and the complete frame of the image cannot be displayed.
By sending instructions in the first time period of any frame of image signal and reading image data from the buffer in the second time period, ensuring that the image display operation is performed after the instruction is sent, avoiding the instructions and reading image data at the same time. Thus, complete image data is gradually written.
It effectively avoids image tearing, improves image display effect, and ensures that the display module can read complete image data in the buffer without reading empty data or image data from the previous frame.
Smart Images

Figure CN119135821A_ABST
Abstract
Description
Technical Field
[0001] The present application generally relates to the field of image processing technology. More specifically, the present application relates to a method for controlling image display, a terminal and a computer-readable storage medium. Background Art
[0002] In the field of image processing technology, the display driver (Display Drive Integrated Circuit, DDIC) chip is used to receive instructions sent by the main control platform AP (Application Platform) and start to perform corresponding operations according to the received instructions to control the image display. When displaying a frame of image, if the image data read from the buffer by the DDIC chip is inconsistent with the image data of the frame, the complete image of the frame is displayed, causing the image on the screen to be misaligned or broken, that is, image tearing occurs.
[0003] If the AP writes only part of the image data in a frame of image into the buffer during the display period of a frame of image signal, the DDIC chip cannot read the complete image data of the frame when reading the image data of the frame from the buffer, resulting in the inability to display a complete frame of image, causing image tearing.
[0004] In view of this, there is an urgent need to provide a method for controlling image display to avoid image tearing and improve image display effect. Summary of the invention
[0005] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a method, a terminal and a computer-readable storage medium for controlling image display in multiple aspects.
[0006] In a first aspect, the present application provides a method for controlling image display, which is applied to a main control platform, and the method includes: sending an instruction in a first time period within an image signal of any frame; wherein the first time period and the second time period are staggered with each other, and the second time period is a time period for a display module to read second image data from a buffer to display an image; in response to the end time of the first time period, if the instruction has not been sent completely, stopping sending the instruction, and continuing to send the instruction of the unsent part of the instruction in the first time period of the subsequent one or more frames of the image signal until the instruction is sent completely, so that the display module executes the instruction after the instruction is sent completely.
[0007] In some embodiments, the image signal of each frame includes a high level period and a low level period, and wherein the first time period is during the high level period of the image signal of the frame, and the second time period is during the low level period of the image signal of the frame.
[0008] In some embodiments, the high-level period includes a first high-level period and a second high-level period, the first high-level period is located at the initial segment of the image signal of the frame, the second high-level period is located at the end segment of the image signal of the frame, and the low-level period is between the first high-level period and the second high-level period; and wherein, the first time period is in the first high-level period and / or the second high-level period; wherein, when the first time period is in the second high-level period, the start time of the first time period is the same as the start time of the second high-level period, and wherein the start time of the second high-level period is the rising edge time of the image signal of the frame.
[0009] In some embodiments, the first high level period includes a first sub-period and a second sub-period, the first sub-period is located in the initial segment of the first high level period, the second sub-period is located in the end segment of the first high level period, and wherein, when the first time period is in the first high level period, the first time period is in the second sub-period.
[0010] In some embodiments, the method further includes: when the first time period is in the second sub-period, the start time of the first time period is the same as the start time of the second sub-period, and wherein the end time of the second sub-period is the end time of the first high level period, and the end time of the first high level period is the falling edge time of the image signal of the frame.
[0011] In some embodiments, the method further includes: sending first image data to the buffer in a third time period; wherein the first time period does not overlap with the third time period; and wherein the start time of the third time period is earlier than the start time of the second time period, and the second image data is part or all of the image data in the first image data.
[0012] In some embodiments, the instructions include control instructions and non-control instructions.
[0013] In some embodiments, before sending the instruction, the method further includes:
[0014] The sending time required to send the instruction is determined according to the length of the instruction and the speed of sending the instruction; in response to the sending time exceeding a preset threshold, the control instruction is used as the instruction.
[0015] In some embodiments, the working mode of the display screen to which the method is applied is a video mode. In the video mode, whenever any frame of image is displayed, the display screen refreshes the display content.
[0016] In a second aspect, the present application provides a method for controlling image display, which is applied to a display module, and the method comprises: receiving an instruction in a first time period within an image signal of any frame, wherein the instruction is sent by a method for controlling image display described in the first aspect; reading second image data from a buffer in a second time period for image display; wherein the first time period and the second time period are staggered with each other; and executing the instruction after the instruction is received.
[0017] In a third aspect, the present application provides a method for controlling image display, comprising: within an image signal of any frame, a main control platform sends an instruction to a display module in a first time period; the display module reads second image data from a buffer for display in a second time period, wherein the first time period and the second time period are staggered with each other; the main control platform responds to the end time of the first time period, and if the instruction has not been sent completely, stops sending the instruction, and continues to send instructions for the unsent part of the instruction in the first time period of the subsequent one or more frames of the image signal until the instruction is sent completely; after the instruction is sent completely, the display module performs image control according to the instruction.
[0018] In a fourth aspect, the present application provides a terminal for controlling image display, comprising: a main control platform for implementing a method for controlling image display described in the first aspect of the present application; and a display module for implementing the method for controlling image display described in the second aspect of the present application.
[0019] In a fifth aspect, the present application provides a computer-readable storage medium, on which is stored a computer program for controlling image display. When the computer program is executed by a processor, a method for controlling image display as described in the first aspect of the present application and a method for controlling image display as described in the second aspect of the present application are implemented.
[0020] The present application is arranged to send instructions only within a first time period of an image signal of any frame, and read second image data from a buffer in a second time period to realize image display. The first time period and the second time period are staggered to avoid sending instructions and reading second image data from the buffer at the same time, thereby avoiding the situation where image data cannot be written to the buffer due to the fact that instructions are still being sent while image data is being read from the buffer. Therefore, while reading image data of a frame from the buffer, complete image data of the frame can be gradually written to the buffer. In this way, when gradually reading the written image data from the buffer, empty data will not be read or the image data of the previous frame will not be read, thereby avoiding image tearing and improving the image display effect.
[0021] Moreover, if the completion instruction cannot be sent within the first time period of an image signal of one frame, the partial instructions that have not been sent will continue to be sent in the first time period of the image signal of the subsequent frame or multiple frames until the instruction sending is completed. This can achieve the situation where the sending of instructions and the reading of the second image data from the buffer are avoided at the same time, and the complete instructions can be sent completely. In this way, the complete instructions can be sent completely without image tearing, so that the display module can perform the corresponding image display operation according to the instructions that have been sent and taken effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0023] Figure 1a An exemplary application scenario of an embodiment of the present application is shown;
[0024] Figure 1b A schematic diagram showing the occurrence of image tearing.
[0025] Figure 2 An exemplary flow chart showing a method for controlling image display according to some embodiments of the present application is shown;
[0026] Figure 3a A timing diagram of image signals according to some embodiments of the present application is shown;
[0027] Figure 3b A timing diagram of image signals according to other embodiments of the present application is shown;
[0028] Figure 4 A schematic diagram showing the timing of reading and writing image data in some embodiments of the present application is shown;
[0029] Figure 5 An exemplary flow chart showing a method for controlling image display according to another embodiment of the present application is shown;
[0030] Figure 6 An exemplary flow chart of a method for controlling image display according to an embodiment of the present application is shown;
[0031] Figure 7 An exemplary block diagram of a terminal for controlling image display according to some embodiments of the present application is shown. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0033] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present application indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0034] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0035] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0036] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.
[0037] In some embodiments, Figure 1a An implementation scenario in which the embodiments of the present application can be applied is shown. Figure 1a As shown, the main control platform AP (Application Platform) writes image data to the buffer, and AP can send instructions to the display driver integrated circuit (DDIC) chip at any time. Among them, AP is the upper layer medium of the DDIC chip, and AP cannot send instructions and image data at the same time, that is, AP can only send instructions or image data at the same time. The DDIC chip receives the instructions sent by AP, and the DDIC chip reads the written image data from the buffer.
[0038] Since the AP can only send instructions or write image data to the buffer at the same time, if the AP starts sending instructions after writing part of the image data in a frame of image to the buffer, the AP will not write image data to the buffer while sending instructions. At this time, the DDIC chip starts to continuously read the written image data from the buffer. After a period of time, the DDIC chip may have read all the written image data in the buffer, while the AP is still sending instructions and has not written the remaining image data of the frame of image to the buffer. This will cause the DDIC chip to be unable to read the remaining image data of the frame of image when continuing to read the image data, and will read empty data or part of the image data of the previous frame of image, resulting in the screen being unable to display a complete frame of image or displaying part of the data of two adjacent frames of image in the same screen, and then horizontal lines or distorted screens will appear, causing display abnormalities, that is, image tearing. Figure 1b FIG. 1 is a schematic diagram showing the occurrence of image tearing. Figure 1b As shown in FIG. 1 , the first part is the face part in the previous frame image, and the second part is the upper body part of the human body in the current frame image. At this time, parts of two frames of images are displayed in the same picture, and image tearing occurs.
[0039] In view of this, an embodiment of the present application provides a solution for controlling image display, which can avoid display anomalies or image tearing. Specifically, for example, it is assumed that the main control platform sends instructions in the first time period within any frame of the image signal, and the display module reads the second image data from the buffer in the second time period to display the image. By staggering the first time period and the second time period, it is avoided that the instructions are sent and the second image data is read from the buffer at the same time, thereby avoiding the situation where the display module cannot write image data to the buffer while reading image data from the buffer because the main control platform is still sending instructions. Therefore, while the display module reads a frame of image data from the buffer, the main control platform can gradually write the complete image data of the frame to the buffer, so that the complete frame of image data that has been written can be gradually read from the buffer without reading empty data or reading the image data of the previous frame, thereby avoiding image tearing and improving the image display effect.
[0040] Moreover, if the completion instruction cannot be sent within the first time period of an image signal of one frame, the unsent partial instructions continue to be sent in the first time period of the image signal of one or more subsequent frames until the instruction sending is completed. This can achieve the situation where all instructions are sent without sending instructions and reading the second image data from the buffer at the same time. This can ensure that the instructions are sent completely without image tearing, so that the display module can execute corresponding image control according to the instructions that have been sent and taken effect.
[0041] For example, when the instruction is to set the refresh rate to 120hz, after the instruction is fully sent and takes effect, the DDIC chip adjusts the refresh rate according to the instruction to set the refresh rate to 120hz. The instruction includes but is not limited to adjusting the brightness, flipping the image horizontally or vertically, etc. That is, the instruction can be set according to the needs or scenarios, and those skilled in the art can understand that the embodiments of the present application are not limited in this regard.
[0042] In a first aspect, the present application provides a method for controlling image display. Figure 2 An exemplary flow chart 200 of a method for controlling image display in some embodiments of the present application is shown, wherein the method is applied to an application processor or a main control platform AP.
[0043] like Figure 2 As shown, in any frame of the image signal, in step S210, an instruction is sent in a first time period; wherein the first time period and the second time period are staggered, and the second time period is a time period in which the display module reads the second image data from the buffer to display the image.
[0044] In step S220, in response to the end of the first time period, if the instruction has not been sent completely, the instruction sending is stopped, and in the first time period of the subsequent one or more frames of the image signal, the unsent part of the instruction continues to be sent until the instruction is sent completely, so that the display module executes the instruction after the instruction is sent completely.
[0045] In an embodiment of the present application, the first time period in step S210 is a time period within an image signal of any frame, and the duration of the first time period can be set as needed, and the duration of the first time period in each frame of the image signal and the position in the image signal can be the same or different, and can be set as needed. Among them, the image signal of any frame includes but is not limited to a tearing (TearingEffect, referred to as TE) signal. Since the AP can only send instructions or write image data to the buffer at the same time, and the AP sends instructions in the first time, therefore, in the first time period, the AP only sends instructions and does not write image data to the buffer. In addition, the image signal of each frame includes but is not limited to a vertical synchronization signal. Among them, the display module includes a DDIC chip for reading image data and displaying it.
[0046] It should be noted that within the first time period of a frame of image signal, the number of instructions sent by the application processor or the main control platform AP includes one or more, that is, the number of instructions can be set according to needs. Those skilled in the art can understand that the embodiments of the present application are not limited in this regard.
[0047] In an embodiment of the present application, the instructions in step S210 refer to a series of instructions used to guide the algorithm to perform specific operations during the image processing or generation process. Among them, the instructions include control instructions and non-control instructions. Control instructions are instructions used to control images. The functions of control instructions are but not limited to controlling the image display of the display screen, adjusting the brightness, color, and performing various display control functions. For example, the DDIC chip may stop compensation operations according to the stop compensation instructions issued by the AP to optimize the display effect and reduce power consumption. Non-control instructions include but are not limited to query instructions, which are used to query the working status of the DDIC chip. Those skilled in the art will understand that the embodiments of the present application are not limited in this regard.
[0048] In an embodiment of the present application, the second time period is a time period in the TE signal. The second time period is an active display area (ActiveArea, referred to as AA), which is used to indicate the time for a frame of image to be effectively displayed. In the second time period, the display module or DDIC chip reads the second image data from the buffer to realize image display. The time for a frame of image to be effectively displayed includes at least one of the time for a frame of image to be transformed, the time for a frame of image to be continuously displayed, and the time for a frame of image to be switched.
[0049] In the embodiment of the present application, in step S210, the first time period and the second time period are staggered, so that when the AP sends the instruction, the display module or the DDIC chip does not read the second image data from the buffer. When the AP gradually writes the image data into the buffer, the display module or the DDIC chip can gradually read the second image data from the buffer.
[0050] Among them, since the AP can only choose one step to execute between sending instructions and sending image data at the same time, in step S210, the AP only sends instructions in the first time period of the tearing signal of a frame of image, and does not continue to send instructions while the display module or DDIC chip reads image data from the buffer. Therefore, the time when the AP sends instructions will not overlap with the time when the image is effectively displayed, that is, the time when the AP sends instructions will not occupy the time when the image is effectively displayed, thereby avoiding that the AP cannot write image data to the buffer at this time because the AP continues to send instructions while the display module or DDIC chip reads image data from the buffer. In this way, while the DDIC chip reads image data from the buffer, the AP can continue to write image data to the buffer instead of just sending instructions, so that the DDIC chip can read the image data that the AP has sent and written from the buffer, thereby avoiding the DDIC chip reading empty data or the image data of the previous frame, that is, avoiding image tearing.
[0051] In some embodiments of the present application, in response to the end of the first time period, if the instruction has been sent, the AP may start writing image data into the buffer.
[0052] In an embodiment of the present application, in step S220, within an image signal of one frame, if the AP does not send a completion instruction within the first time period, but only sends part of the instruction, then the sending of the instruction will be stopped immediately at the end of the first time period, and the unsent part of the instruction will continue to be sent in the first time period of the image signal of the next frame, and this iteration will be repeated until the instruction is sent. This ensures that the AP sends the instruction only within the first time period of each frame of the image signal, thereby avoiding sending the instruction and reading the image data from the buffer at the same time, and the complete instruction is sent after one or more subsequent frames of image signals, so that the display module or DDIC chip executes the instruction.
[0053] It should be noted that there is an end flag at the end of the command to indicate the end of the command. When the AP sends the end flag, it means that the complete command has been sent. At this time, the command takes effect immediately, and the DDIC chip performs the corresponding operation according to the effective command.
[0054] In the embodiment of the present application, according to the above description, through step S220, a longer instruction can be sent within the image signal cycle of one or more frames, and take effect immediately after all the instructions are sent, so that the DDIC chip performs the corresponding operation according to the effective instruction. In addition, the longer instruction needs to go through the display cycle of one or more frames of images before it can take effect. Since the display cycle of one or more frames of images takes less time, the time accuracy is usually at the millisecond level. Therefore, the longer instruction can take effect after only a short time, and the user experience will not be affected by the delay in taking effect.
[0055] In other embodiments of the present application, it is necessary to first determine the total time required to send the instruction, determine how many frames are required to complete the instruction sending based on the length of the first time period in the image signal of each frame, and then send the instruction completely after the corresponding number of frames.
[0056] In some embodiments of the present application, before sending an instruction, the method for controlling image display also includes: determining the sending time required to send the instruction based on the length of the instruction and the speed of sending the instruction; in response to the sending time exceeding a preset threshold, treating the control instruction as an instruction.
[0057] Since the length of the first time period in each frame of the image signal is fixed, therefore, in the above embodiment, the sending time required to send the instruction can be determined based on the length of the instruction or the speed of sending the instruction. Among them, if the sending time exceeds the preset threshold, it means that the instruction is too long and the time required to send the instruction is too long; therefore, it will take more frames of the first time period of the image signal to send the complete instruction, which means that it will take more frames for the instruction to take effect, resulting in a higher delay in executing the instruction. At this time, only the control instruction in the instruction is sent, which can reduce the time required to send the instruction, so that the instruction can be sent after fewer frames of image signal cycles, reducing the delay in the effectiveness of the instruction and the response delay in executing the instruction.
[0058] For example, the preset threshold is 100ms, the length of the first time period is 50ms, the length of instruction A to be sent is 150 bytes, the length of control instruction a1 in instruction A is 90 bytes, and the speed of AP sending instructions is 1 byte / ms. Then, according to the length of instruction A and the speed of sending instructions, it is determined that the time required to send instruction A is 150ms. At this time, 150ms is greater than 100ms, that is, the time required to send instruction A exceeds the preset threshold. If instruction A is sent according to the method in the above embodiment, it takes 3 frames of image signal cycles to send it. At this time, if only control instruction a1 in instruction A is sent, the time required to send control instruction a1 is 90ms, and it takes 2 frames of image signal cycles to send control instruction a1, which reduces the time required to wait for the execution of the control instruction, thereby reducing the response delay of executing the control instruction for image control.
[0059] According to the description of the above embodiment, it can be known that through steps S210 to S220, it is set to send instructions only within the first time period of the image signal of each frame, and read the second image data from the buffer in the second time period to realize image display. By staggering the first time period and the second time period, it is avoided that the sending of instructions and the reading of the second image data from the buffer are performed simultaneously, thereby avoiding the situation where the image data cannot be written to the buffer due to the control instructions being still being sent while the image data is being read from the buffer. Therefore, while reading the image data of a frame from the buffer, the complete image data of the frame can be gradually written to the buffer. In this way, when the written image data is gradually read from the buffer, empty data will not be read or the image data of the previous frame will not be read, thereby avoiding image tearing and improving the image display effect.
[0060] Moreover, if the completion instruction cannot be sent within the first time period of an image signal of one frame, the unsent partial instructions will continue to be sent in the first time period of the image signal of one or more subsequent frames until the instruction sending is completed. This can achieve the situation where the sending of instructions and the reading of image data from the buffer are avoided at the same time and all the complete instructions can be sent. In this way, the complete instructions can be sent without image tearing, so that the display module can perform the corresponding image display operation according to the instructions that have been sent and taken effect.
[0061] In some embodiments of the present application, the image signal of each frame includes a high level period and a low level period, and wherein the first time period is during the high level period of the image signal of the frame, and the second time period is during the low level period of the image signal of the frame.
[0062] In some embodiments of the present application, the high level period includes a first high level period and a second high level period, the first high level period is located at the initial segment of the image signal of the frame, the second high level period is located at the end segment of the image signal of the frame, and the low level period is between the first high level period and the second high level period.
[0063] Figure 3a FIG. 1 shows a timing diagram of image signals in some embodiments of the present application. Figure 3a As shown, the image signal of each frame is a torn TE signal, and the timing of the TE signal of each frame includes a high level period and a low level period. In two adjacent frames, the second high level period in the image signal of the previous frame is connected to the first high level period in the image signal of the next frame.
[0064] In some embodiments of the present application, the second high level period is the vertical back porch (VerticalBackPorch, VBP), where VBP represents the number of rows between the end of the vertical synchronization signal of each frame and the beginning of the next frame image. In VBP, the image position is usually adjusted or the screen is refreshed.
[0065] In some embodiments of the present application, the first time period is in the first high level period and / or the second high level period. When the first time period is in the first high level period, the start time of the first time period is the same as the start time of the first high level period; when the second time period is in the second high level period, the start time of the first time period is the same as the start time of the second high level period, and the start time of the second high level period is the rising edge time of the image signal of the frame.
[0066] In combination with the above description, it can be known that the AP can send instructions during the first high level period, or send instructions during the second high level period, or send instructions during both the first high level period and the second high level period. When the first time period is during the first high level period, the duration of the first time period is less than or equal to the duration of the first high level period. When the first time period is during the second high level period, the duration of the first time period is less than or equal to the duration of the second high level period. When the first time period is during the first high level period and the second high level period, the first time period includes a first sub-time period and a second sub-time period, wherein the first sub-time period is during the first high level period, the second sub-time period is during the second high level period, and the duration of the first sub-time period is less than or equal to the duration of the first high level period, and the duration of the second sub-time period is less than or equal to the duration of the second high level period.
[0067] In some embodiments of the present application, the starting time of the first high-level period is also the starting time of a frame of the image signal. Since when the first time period is in the first high-level period, the starting time of the first time period is the same as the starting time of the first high-level period, therefore, when the first time period is in the first high-level period, the starting time of the first time period is the starting time of the image signal of a frame.
[0068] In some embodiments of the present application, the starting time of the second high level period is the rising edge time of the image signal of the frame. Therefore, when the first time period is in the second high level period, it means that whenever the rising edge time of the image signal of the frame is encountered, the AP starts sending instructions until the second high level period of the frame ends.
[0069] In an embodiment of the present application, the first high level period includes a first sub-period and a second sub-period, the first sub-period is located in the initial segment of the first high level period, the second sub-period is located in the end segment of the first high level period, and wherein, when the first time period is in the first high level period, the first time period is in the second sub-period.
[0070] Figure 3b FIG. 2 shows a timing diagram of image signals of other embodiments of the present application. Figure 3b As shown, in the above embodiment, during the first high level period of the image signal, the first high level period includes a first sub-period and a second sub-period, the first sub-period is located at the initial segment of the first high level period, the second sub-period is located at the end segment of the first high level period, and wherein, when the first time period is in the first high level period, the first time period is in the second sub-period.
[0071] In some embodiments of the present application, the first sub-period is a vertical synchronization activation period (Vertical sync active, referred to as VSA), wherein a vertical synchronization operation is usually performed during the vertical synchronization activation period. The duration of the vertical synchronization activation period is usually too short, and may even be shorter than a pulse cycle. Therefore, it is impossible to send instructions through a complete pulse cycle during the vertical synchronization activation period. Therefore, when the first time period is in the first high level period, the first time period is only in the second sub-period of the first high level period, that is, the AP does not send instructions during the vertical synchronization activation period.
[0072] In some embodiments of the present application, the second sub-period is a vertical front porch (VerticalFrontPorch, referred to as VFP), and VFP is the time from the end of a frame of data output to the beginning of the vertical synchronization period of the next frame. When the first time period is in the first high level period, the first time period is only in the second sub-period, which means that the AP sends instructions in the VFP.
[0073] In some embodiments of the present application, when the first time period is in the second sub-period, the start time of the first time period is the same as the start time of the second sub-period, and wherein the end time of the second sub-period is the end time of the first high level period, and the end time of the first high level period is the falling edge time of the image signal of the frame.
[0074] Combined with the above description, it can be seen that the end time of the second sub-period is the end time of the first high-level period, and the end time of the first high-level period is the falling edge time of the image signal of the frame. Therefore, the end time of the first time period is the falling edge time of the image signal of the frame, which means that whenever the falling edge time of the image signal of the frame is encountered, the AP stops sending instructions.
[0075] In some embodiments of the present application, first image data is sent to a buffer in a third time period; wherein the first time period and the third time period are staggered with each other; and wherein the start time of the third time period is earlier than the start time of the second time period, and the second image data is part or all of the image data in the first image data.
[0076] Figure 4 The timing diagram of reading and writing image data in some embodiments of the present application is shown. The first time period, the second time period and the third time period are all within the period of a frame of image signal. Figure 4 The timing diagram for reading and writing image data is only shown for example, and the order of the first time period and the third time period can be adjusted and exchanged according to different scenarios. Figure 4As shown, the first time period, the second time period and the third time period are shown in ascending order from left to back, wherein the first time period is the time period when the main control platform sends instructions, the second time period is the time period when the main control platform sends the first image data to the buffer, and the third time period is the time period when the display module reads the second image data from the buffer. The first time period is staggered with the second time period, the first time period is staggered with the third time period, the start time of the third time period is earlier than the start time of the second time period, and the third time period and the second time period have a partial overlap.
[0077] It should be noted that the AP not only sends instructions, but also sends and writes image data to the buffer. In the third time period, the AP sends the first image data to the buffer, so that the DDIC chip can read the written image data from the buffer for display. Among them, since the AP cannot send instructions and image data at the same time, the first time period does not overlap with the third time period. Among them, while the AP sends and writes image data to the buffer, the DDIC chip can read image data from the buffer.
[0078] Moreover, the start time of the third time period is earlier than the start time of the second time period, which means that the DDIC chip starts to read the second image data from the buffer after the AP sends and writes the first image data to the buffer. The second image data is part or all of the image data in the first image data, which means that the image data read from the buffer by the DDIC chip is part or all of the image data written to the buffer by the AP, so as to avoid the DDIC chip starting to read the image data from the buffer before the AP writes the image data to the buffer, thereby avoiding the DDIC chip reading empty data or the image data of the previous frame, and further avoiding image tearing.
[0079] In some embodiments of the present application, the duration of the first time period is less than or equal to the duration of the high level period. The high level period includes the first time period and part of the third time period. Through the method described in the above embodiment, it is possible to have a part of the third time period in addition to the first time period during the high level period, which is used to write image data into the buffer. Among them, if the display module reads the image data from the buffer too fast, it is necessary for the AP to write part of the image data into the buffer in advance before the display module reads the image data from the buffer. Otherwise, due to the slow speed of writing the image data by the AP, it may cause the display module to have read all the image data written in the buffer, and the AP has not yet written the image data that the display module needs to read next into the buffer. Therefore, through the method described in the above embodiment, a longer third time period can be reserved during the high level period for the AP to write more image data into the buffer in advance, thereby avoiding image tearing caused by the display module reading the image data too fast, and improving the display effect.
[0080] It should be noted that control instructions and image data are transmitted through the mobile industry processor interface MIPI (Mobile Industry Processor Interface) bus. The transmission mode of the MIPI bus is serial communication. Control instructions and image data cannot be transmitted at the same time. Only control instructions or image data can be transmitted at the same time.
[0081] Among them, the working mode of the display screen includes a video mode and a command mode according to the interface. In an embodiment of the present application, the display mode is a video mode. In the video mode, regardless of whether the current display image is updated, image data will be sent, and no buffer is set in the DDIC chip for storing the read image data. Therefore, the DDIC chip periodically reads image data from an external buffer.
[0082] In a second aspect, the present application provides another method for controlling image display. Figure 5 An exemplary flow chart 500 of a method for controlling image display according to another embodiment of the present application is shown, wherein the method is applied to a display module.
[0083] like Figure 5 As shown, in an image signal of any frame, in step S510, an instruction is received in a first time period, wherein the instruction is sent by any one of the methods for controlling image display described in the first aspect of the embodiment.
[0084] In step S520, after the instruction is received, the instruction is executed.
[0085] In step S530, in a second time period, second image data is read from the buffer to display the image, wherein the first time period and the second time period are staggered.
[0086] In some embodiments of the present application, the instruction is sent through any one of the methods for controlling image display described in the embodiments provided in the first aspect above, which will not be described in detail here.
[0087] In an embodiment of the present application, a display module includes a DDIC chip for image display. An application processor or a main control platform sends instructions to the DDIC chip, and after receiving the instructions and taking effect, the DDIC chip executes the effective instructions to perform corresponding image display operations. For example, when the received instruction is to adjust the brightness, the DDIC chip performs a corresponding transformation on the pixel value of the image, thereby adjusting the display brightness of the screen. In an embodiment of the present application, if no instructions need to be sent, the application processor or the main control platform may not send instructions to the DDIC chip.
[0088] In the above-mentioned embodiment of the present application, through steps S510 - S530 , the DDIC chip can perform corresponding operations according to the received and effective instructions to realize display control of the image.
[0089] In a third aspect, the present application provides a method for controlling image display. Figure 6 An exemplary flow chart 600 of a method for controlling image display according to an embodiment of the present application is shown. Figure 6 As shown, in step S610, the main control platform sends a command to the display module in a first time period.
[0090] In step S620, the display module reads the second image data from the buffer for display in a second time period, wherein the first time period and the second time period are staggered.
[0091] In step S630, the main control platform stops sending instructions in response to the end of the first time period if the instructions have not been sent completely, and continues sending instructions during the high level period of the image signal of the next one or more frames until the instructions are sent completely.
[0092] In step S640 , the display module executes the command after the command is sent.
[0093] In the embodiment of the present application, the main control platform AP is the upper layer medium of the chip. The chip is a chip used for image control and display, which includes but is not limited to a DDIC chip.
[0094] In an embodiment of the present application, step S610 is the same as step S210 in the above-mentioned first aspect, step S620 is the same as step S520 in the above-mentioned second aspect, step S630 is the same as step S220 in the above-mentioned first aspect, and step S630 is the same as step S520 in the above-mentioned second aspect, which will not be repeated here.
[0095] In another implementation, the instructions may be sent to the display module or the DDIC chip via the application processor.
[0096] According to the description of the above embodiment, it can be known that through steps S610-S630, the main control platform only sends instructions within the first time period of the image signal of each frame, and the display module reads the second image data from the buffer in the second time period to realize image display. By staggering the first time period and the second time period to avoid sending instructions and reading the second image data from the buffer at the same time, it is avoided that the display module cannot write image data to the buffer while the chip reads image data from the buffer because the main control platform is still sending instructions. Therefore, while the chip reads image data of a frame from the buffer, the main control platform can gradually write complete image data of the frame to the buffer. In this way, the chip will not read empty data or read image data of the previous frame when the chip gradually reads the written image data from the buffer, thereby avoiding image tearing and improving image display effects.
[0097] Moreover, if the main control platform cannot send a completion instruction within the first time period of a frame of image signal, it will continue to send instructions for the unsent part in the first time period of the next frame of image signal until the instructions are sent. This allows the sending of all instructions to be completed when sending instructions and reading image data from the buffer are not performed at the same time, and the corresponding operations can be executed according to the instructions to perform image control.
[0098] In a fourth aspect, an embodiment of the present application further provides a terminal 700 for controlling image display. Figure 7 FIG. 1 shows an exemplary block diagram of a terminal for controlling image display in some embodiments of the present application. Figure 7 As shown, the terminal 700 for controlling image display includes:
[0099] The main control platform 701 is used to implement a method for controlling image display provided by the present application in the first aspect. The method includes steps S210-S220, which will not be described in detail here.
[0100] The chip 702 is used to implement another method for controlling image display provided by the present application in the second aspect. The method includes steps S510-S520, which will not be described in detail here.
[0101] In some embodiments of the present application, the chip 702 includes but is not limited to a DDIC chip.
[0102] In some embodiments of the present application, the terminal 700 for controlling image display further includes a buffer for storing image data. The buffer is arranged outside the DDIC chip.
[0103] In summary, in a terminal for controlling image display provided in an embodiment of the present application, the main control platform sends instructions only within the first time period of the image signal of each frame, and the display module reads the second image data from the buffer in the second time period to realize image display. By avoiding overlap between the first time period and the second time period, it is avoided that the sending of instructions and the reading of the second image data from the buffer are performed simultaneously, thereby avoiding the situation where the image data cannot be written to the buffer because the main control platform is still sending instructions while the display module is reading the image data from the buffer. Therefore, while the display module is reading the image data of a frame from the buffer, the main control platform can gradually write the complete image data of the frame to the buffer. In this way, the display module will not read empty data or read the image data of the previous frame when gradually reading the written image data from the buffer, thereby avoiding image tearing and improving the image display effect.
[0104] Moreover, if the completion instruction cannot be sent within the first time period of an image signal of one frame, the instructions for the unsent part will continue to be sent in the first time period of the image signal of the subsequent frame or multiple frames until the instructions are sent. This can achieve the situation where the main control platform sends instructions and the display module reads image data from the buffer at different times, and all instructions are sent, and the display module starts to execute corresponding operations according to the instructions that have been sent to perform image control.
[0105] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium. The storage medium stores a computer program for controlling image display, and when the computer program is executed by a processor, the method for controlling image display as described in any of the above embodiments is implemented.
[0106] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for controlling image display, applied to a main control platform, the method comprising: In any frame of image signal, In the first time period, sending instructions; The first time period and the second time period are staggered with each other, and the second time period is a time period in which the display module reads the second image data from the buffer to display the image; In response to the end moment of the first time period, if the instruction has not been sent completely, the sending of the instruction is stopped, and in the first time period of the subsequent one or more frames of the image signal, the part of the instruction that has not been sent completely continues to be sent until the instruction is sent completely, so that the display module executes the instruction after the instruction is sent completely.
2. The method according to claim 1, wherein: The image signal of each frame includes a high level period and a low level period, and the first time period is in the high level period of the image signal of the frame, and the second time period is in the low level period of the image signal of the frame.
3. The method according to claim 2, wherein: The high level period includes a first high level period and a second high level period, the first high level period is located at the initial segment of the image signal of the frame, the second high level period is located at the end segment of the image signal of the frame, and the low level period is between the first high level period and the second high level period; And wherein, the first time period is during the first high level period and / or the second high level period; When the first time period is in the second high level period, the start time of the first time period is the same as the start time of the second high level period, wherein the start time of the second high level period is the rising edge time of the image signal of the frame.
4. The method according to claim 3, wherein: The first high level period includes a first sub-period and a second sub-period, the first sub-period is located in the initial segment of the first high level period, the second sub-period is located in the end segment of the first high level period, and wherein, when the first time period is in the first high level period, the first time period is in the second sub-period.
5. The method according to claim 4, further comprising: When the first time period is in the second sub-period, the start time of the first time period is the same as the start time of the second sub-period, and the end time of the second sub-period is the end time of the first high-level period, and the end time of the first high-level period is the falling edge time of the image signal of the frame.
6. The method according to claim 1, further comprising: In a third time period, sending the first image data to the buffer; wherein the first time period and the third time period are staggered with each other; And wherein, the start time of the third time period is earlier than the start time of the second time period, and the second image data is part or all of the image data in the first image data.
7. The method according to claim 1, wherein: The instructions include control instructions and non-control instructions.
8. The method according to claim 7, wherein: Before sending the instruction, the method further includes: Determine the time required to send the instruction according to the length of the instruction or the speed of sending the instruction; In response to the sending duration exceeding a preset threshold, the control instruction is used as the instruction.
9. The method according to any one of claims 1 to 8, wherein: The working mode of the display screen to which the method is applied is a video mode. In the video mode, whenever any frame of image is displayed, the display screen refreshes the display content.
10. A method for controlling image display, applied to a display module, the method comprising: In any frame of image signal, In a first time period, receiving an instruction, wherein the instruction is sent by the method according to any one of claims 1 to 9; after the instruction is received, executing the instruction; In a second time period, second image data is read from the buffer to display the image, wherein the first time period and the second time period are staggered with each other.
11. A method for controlling image display, comprising: In any frame of image signal, The main control platform sends a command to the display module in the first time period; The display module reads second image data from the buffer for display in a second time period, wherein the first time period and the second time period are staggered; The main control platform stops sending the instruction in response to the end time of the first time period if the instruction has not been sent completely, and continues to send the unsent part of the instruction in the first time period of the subsequent one or more frames of image signals until the instruction is sent completely; The display module executes the instruction after the instruction is sent.
12. A terminal for controlling image display, comprising: A main control platform, used to implement the method for controlling image display according to any one of claims 1 to 9; A display module, used to implement the method for controlling image display described in claim 10.
13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program for controlling image display. When the computer program is executed by a processor, the method for controlling image display according to any one of claims 1 to 10 is implemented.
