CN114153414A - Image anti-tearing method and related device - Google Patents

Image anti-tearing method and related device Download PDF

Info

Publication number
CN114153414A
CN114153414A CN202111426750.1A CN202111426750A CN114153414A CN 114153414 A CN114153414 A CN 114153414A CN 202111426750 A CN202111426750 A CN 202111426750A CN 114153414 A CN114153414 A CN 114153414A
Authority
CN
China
Prior art keywords
frame
frame rate
image
input
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111426750.1A
Other languages
Chinese (zh)
Inventor
白颂荣
张海越
陈锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xihua Technology Co Ltd
Original Assignee
Shenzhen Xihua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xihua Technology Co Ltd filed Critical Shenzhen Xihua Technology Co Ltd
Priority to CN202111426750.1A priority Critical patent/CN114153414A/en
Publication of CN114153414A publication Critical patent/CN114153414A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • G09G5/393Arrangements for updating the contents of the bit-mapped memory
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • G09G5/395Arrangements specially adapted for transferring the contents of the bit-mapped memory to the screen
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/02Improving the quality of display appearance
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2360/00Aspects of the architecture of display systems
    • G09G2360/12Frame memory handling

Abstract

The embodiment of the application discloses an image anti-tearing method and a related device, which are applied to electronic equipment, and the method comprises the following steps: in an image mode, reading and synchronizing an input frame tail at a second frame rate from a second frame image cache through a first frame image cache at a first frame rate, wherein the first frame image cache is used for reading operation, the second frame image cache is used for writing operation, and the first frame rate is greater than or equal to the second frame rate; determining grouping parameters of the input frame according to the difference value between the first frame rate and the second frame rate; and performing frame dropping operation on the input frame according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent. By adopting the image tearing method and device, the problem of image tearing can be solved.

Description

Image anti-tearing method and related device
Technical Field
The application relates to the technical field of display screen display, in particular to an image anti-tearing method and a related device.
Background
In the prior art, a general Frame Buffer (Frame Buffer) control flow is similar to First Input First Output (FIFO) control, and the Frame Buffer read-write speed is controlled so that read overflow or write overflow is avoided. When the Frame Buffer writing speed is faster than the reading speed and the writing pointer catches up with the reading pointer, or the Frame Buffer reading speed is faster than the writing speed and the reading pointer catches up with the writing pointer, a phenomenon that a new picture and an old picture respectively display a part appears on a display picture, and the phenomenon is tearing. Therefore, how to solve the problem of image tearing needs to be solved.
Disclosure of Invention
The embodiment of the application provides an image anti-tearing method and a related device, which can be used for solving the problem of image tearing.
In a first aspect, an embodiment of the present application provides an image anti-tearing method, which is applied to an electronic device, and the method includes:
in an image mode, reading and synchronizing an input frame tail at a second frame rate from a second frame image cache through a first frame image cache at a first frame rate, wherein the first frame image cache is used for reading operation, the second frame image cache is used for writing operation, and the first frame rate is greater than or equal to the second frame rate;
determining grouping parameters of the input frame according to the difference value between the first frame rate and the second frame rate;
and performing frame dropping operation on the input frame according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent.
In a second aspect, an embodiment of the present application provides an image anti-tearing device, which is applied to an electronic device, and the device includes: a transmitting unit, a receiving unit and a determining unit, wherein,
the sending unit is used for sending preset test image data to a display screen to be tested and indicating the display screen to be tested to display the preset test image data to obtain display effect data;
the receiving unit is used for receiving the display effect data fed back by the display screen to be tested;
and the determining unit is used for determining the test result of the display screen to be tested according to the display effect data.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the image anti-tearing method and the related apparatus described in the embodiments of the present application are applied to an electronic device, and in an image mode, a first frame image buffer is used for reading and synchronizing a frame end written and input at a second frame rate from a second frame image buffer at a first frame rate, the first frame image buffer is used for reading operation, the second frame image buffer is used for writing operation, the first frame rate is greater than or equal to the second frame rate, a grouping parameter of a frame written and input is determined according to a difference between the first frame rate and the second frame rate, and a frame dropping operation is performed on the frame written and input according to the grouping parameter, so as to ensure that an input frame number and an output frame number of each group are consistent, and double buffer control is introduced, which can solve the problem of image tearing.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic flowchart of an image anti-tearing method provided in an embodiment of the present application;
fig. 1B is a schematic illustration showing a dual buffer control method according to an embodiment of the present application;
fig. 1C is a schematic illustration showing another dual buffer control method provided in the embodiment of the present application;
FIG. 1D is a schematic diagram illustrating another dual buffer control method according to an embodiment of the present disclosure;
fig. 1E is a schematic illustration showing another dual buffer control method provided in the embodiment of the present application;
FIG. 1F is a schematic illustration of another dual buffer control method provided in the embodiments of the present application;
FIG. 2 is a schematic flow chart of another image anti-tearing method provided in the embodiments of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a block diagram of functional units of an image anti-tearing device according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device related to the embodiment of the present application may be an electronic device with a display function, and the electronic device may include various handheld devices (such as a Mobile phone and a tablet computer) with a wireless communication function, a vehicle-mounted device (a car recorder, a camera in a car, a car speaker, etc.), a wearable device (smart glasses, a smart bracelet, a smart watch, etc.), a test box, a computing device, or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), a Mobile Station (MS), a terminal device (terminal device), and the like.
The following describes embodiments of the present application in detail.
Referring to fig. 1A, fig. 1A is a schematic flow chart of an image anti-tearing method according to an embodiment of the present disclosure, where the image anti-tearing method includes:
101. in the image mode, an input frame tail is read and synchronized at a first frame rate from a second frame image buffer at a second frame rate through a first frame image buffer, the first frame image buffer is used for reading operation, the second frame image buffer is used for writing operation, and the first frame rate is greater than or equal to the second frame rate.
In the embodiment of the present application, the image mode may be understood as meaning that display data is transmitted from the host processor to the peripheral in the form of a real-time pixel stream.
The first frame rate and the second frame rate can be preset or default, and the first frame rate is greater than or equal to the second frame rate.
In practical application, due to single buffer, namely, one frame image buffer cannot solve the image tearing problem. As shown in FIG. 1B, FIG. 1B is an example of a 90 degree rotation of an image, the implementation arrows are in the order of writing the Frame buffer, and the image is scanned from left to right and from top to bottom. The dashed arrows are the image reading order and need to scan from top to bottom and from left to right. Because the reading and writing are in the same frame, it must happen that the pixel read at a certain moment is not written into the buffer yet, and tearing must occur. This time, a double buffer control technique is needed.
In the embodiment of the present application, because the time when each Frame is input by an Application Processor (AP) is basically predictable, it can be ensured that the read and write pointers cannot catch up with each other by controlling the timing of the Frame buffer read and write start and an appropriate Frame dropping mechanism. The problem of image rotation in the image mode is solved by using double-buffer flow (namely, the first frame image cache and the second frame image cache) control, corresponding double-buffer flow control is performed aiming at the input formats in various image modes of the mobile phone, and various input frame rate conversion in the market has corresponding control mechanisms, so that the tearing phenomenon is avoided, and the images can be smoothly displayed.
102. And determining grouping parameters of the input frame according to the difference value between the first frame rate and the second frame rate.
The different difference values may correspond to different grouping parameters, that is, a difference value between the first frame rate and the second frame rate, where a mapping relationship exists between the difference value and the grouping parameters.
Optionally, in step 102, determining a grouping parameter of the frame to be written according to a difference between the first frame rate and the second frame rate may include the following steps:
21. determining a target difference value between the first frame rate and the second frame rate;
22. and determining the grouping parameters of the write-in frame corresponding to the target difference according to the mapping relation between the preset difference and the grouping parameters.
In the embodiment of the present application, a mapping relationship between a preset difference and a grouping parameter may be pre-stored, and in a specific implementation, a target difference between a first frame rate and a second frame rate may be determined, and then a grouping parameter of a frame written with an input corresponding to the target difference is determined according to the mapping relationship, so that it is helpful to accurately determine the number of subsequent frame losses, so as to ensure that the number of input frames is consistent with the number of output frames, thereby avoiding an image tearing phenomenon.
103. And performing frame dropping operation on the input frame according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent.
Different grouping parameters can correspond to different frame loss numbers, further, a mapping relation between preset grouping parameters and the frame loss numbers can be stored in advance, and then, the corresponding frame loss numbers are determined based on the mapping relation, so that the input frame number and the output frame number of each group are ensured to be consistent.
In the embodiment of the present application, LCDC: the LCDC is a part of an AP side display subsystem and is responsible for processing data and controlling signals; like the function of a display card in a computer, the display card is mainly responsible for acquiring image/video data from a memory or an FIFO channel, superposing and mixing the image/video data in a certain mode, sending a final image to an external liquid crystal display for displaying, and generating necessary LCD control signals.
Fig. 1C to 1F illustrate the following description, in fig. 1C to 1F, bold oblique lines represent read waveforms of the first frame image buffer, non-bold oblique lines represent write waveforms of the second frame image buffer, oblique broken lines represent a frame loss situation, Lcdc _ frame _ start represents a start time of the first frame image buffer, FB1 represents an input frame, and FB2 represents an output frame. And in fig. 1C-1F, the slope of the waveform represents the data read/write speed transmission rate, and the larger the slope, the faster the read/write rate. The method comprises the following specific steps:
optionally, when the first frame rate is 60HZ and the second frame rate is 60HZ, in step 102, the grouping parameter of the frame to be written in is determined according to the difference between the first frame rate and the second frame rate, which may be implemented as follows:
determining that the difference value between the first frame rate and the second frame rate is 0HZ, and determining that the grouping parameter is 1 according to the mapping relation;
then, in step 103, performing frame dropping operation on the write-in frame according to the grouping parameter, which may be implemented as follows:
and performing 0 frame missing operation on the frame of the write input.
Specifically, as shown in fig. 1C, for example, in a 60Hz- >60Hz display application, the first frame image buffer starts to synchronize the end of frame from the second frame image buffer, because the display frame rate is slightly higher than 60Hz, the display ends before the synchronization signal of the next AP input frame comes, and no tearing is caused.
Optionally, when the first frame rate is 90HZ and the second frame rate is 60HZ, in step 102, the grouping parameter of the frame to be written in is determined according to the difference between the first frame rate and the second frame rate, which may be implemented as follows:
determining that the difference value between the first frame rate and the second frame rate is 30HZ, and determining that the grouping parameter is 3 according to the mapping relation;
then, in step 103, performing a frame dropping operation on the write-in frame according to the grouping parameter, which may be implemented as follows:
and performing frame loss 1 operation on the frame of the write input.
Specifically, as shown in fig. 1D, taking a 90Hz- >60Hz display application as an example, the first frame image buffer starts to synchronize the frame end from the second frame image buffer input, because the display frame rate is lower than the input frame rate, each 3 frames of input is a group, and each group drops one frame, so that the input frame number and the output frame number of each group are consistent, and no tearing is caused.
Optionally, when the first frame rate is 120HZ and the second frame rate is 60HZ, in step 102, the grouping parameter of the frame to be written in is determined according to the difference between the first frame rate and the second frame rate, which may be implemented as follows:
determining that the difference value between the first frame rate and the second frame rate is 60HZ, and determining that the grouping parameter is 2 according to the mapping relation;
then, in step 103, performing a frame dropping operation on the write-in frame according to the grouping parameter, which may be implemented as follows:
and performing frame loss 1 operation on the frame of the write input.
Specifically, as shown in fig. 1E, taking 120Hz- >60Hz display application as an example, the first frame image buffer starts to synchronize the frame end from the second frame image buffer input, because the display frame rate is lower than the input frame rate, one group is input every 2 frames, and 1 frame is dropped out from each group, so as to ensure that the input frame number and the output frame number of each group are consistent, and no tearing is caused.
Optionally, when the first frame rate is 144HZ and the second frame rate is 57.6HZ, in step 102, the grouping parameter of the frame to be written in is determined according to the difference between the first frame rate and the second frame rate, which may be implemented as follows:
determining that the difference value between the first frame rate and the second frame rate is 82.4HZ, and determining that the grouping parameter is 5 according to the mapping relation;
then, the step 103, performing a frame dropping operation on the write-in frame according to the grouping parameter, may be implemented according to the following steps:
and performing 3-frame missing operation on the frame of the write input.
Specifically, as shown in fig. 1F, taking a 144Hz- >60Hz display application as an example, the first frame image buffer starts to synchronize the frame end from the input of the first frame image buffer, because the display frame rate is lower than the input frame rate (the actual display frame rate is 57.6Hz), every 5 frames of input are a group, and 3 frames are dropped from each group, so as to ensure that the input frame number and the output frame number of each group are consistent, and no tearing is caused.
Optionally, the method may further include the following steps:
a1, detecting whether the image in the image mode has rotation operation;
a2, when the image in the image mode has rotation operation, executing the step of reading synchronous frame end written from the second frame image buffer at the second frame rate through the first frame image buffer at the first frame rate.
Whether the image in the image mode has the rotation operation or not can be detected, when the image in the image mode has the rotation operation, the step 101 is executed, otherwise, the display operation can be performed in other modes.
In the embodiment of the application, in an image mode, an AP sends an image to a Frame Buffer according to a fixed Frame rate, different groups are divided according to a difference between an AP input Frame rate and a display output Frame rate, a Frame Buffer start reading synchronization signal in each group is from a received write input Frame tail end signal, a Frame Buffer start reading synchronization signal in a group is from a Frame tail end signal read from a previous Frame in the same group, and the display is output according to the fixed Frame rate.
Based on the embodiment of the application, the single buffer can not solve the problem of image tearing in image rotation application, in order to solve the problem of image tearing in the application, double buffer control is introduced, and the problem of image rotation in an image mode is solved to ensure that an image can be normally displayed and the quality is not lost too much.
It can be seen that the image anti-tearing method described in the embodiment of the present application is applied to an electronic device, and in an image mode, a first frame image buffer is used for reading and synchronizing a frame tail written and input at a second frame rate from a second frame image buffer at a first frame rate, the first frame image buffer is used for reading operation, the second frame image buffer is used for writing operation, the first frame rate is greater than or equal to the second frame rate, a grouping parameter of the written and input frame is determined according to a difference between the first frame rate and the second frame rate, and a frame dropping operation is performed on the written and input frame according to the grouping parameter, so as to ensure that an input frame number and an output frame number of each group are consistent, and a double buffer control is introduced, so that the problem of image tearing can be solved.
Referring to fig. 2, fig. 2 is a schematic flow chart of an image anti-tearing method according to an embodiment of the present application, where the image anti-tearing method includes:
201. in an image mode, whether a rotation operation occurs to an image in the image mode is detected.
202. When the image in the image mode has rotation operation, a first frame image buffer is used for reading operation at a first frame rate, and a second frame image buffer is used for writing operation at a second frame rate, and the first frame rate is greater than or equal to the second frame rate.
203. And determining grouping parameters of the input frame according to the difference value between the first frame rate and the second frame rate.
204. And performing frame dropping operation on the input frame according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent.
The specific description of the steps 201 to 204 may refer to the corresponding steps of the image anti-tearing method described in the above fig. 1A, and will not be described herein again.
It can be seen that the image anti-tearing method described in the embodiments of the present application, applied to electronic devices, in the image mode, whether the image in the image mode has the rotation operation is detected, and when the image in the image mode has the rotation operation, reading synchronization of an input frame end at a second frame rate from a second frame image buffer by a first frame image buffer for a read operation and a second frame image buffer for a write operation, the first frame rate being greater than or equal to the second frame rate, determining grouping parameters of the write-in frame according to the difference value between the first frame rate and the second frame rate, performing frame dropping operation on the write-in frame according to the grouping parameters, so as to ensure that the input frame number and the output frame number of each group are consistent, double buffer control is introduced, and the image can be normally displayed without much loss of quality by solving the problem of image rotation in the image mode.
In accordance with the foregoing embodiments, please refer to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, and the processor may be an application processor, and in an embodiment of the present application, the program includes instructions for performing the following steps:
in an image mode, reading and synchronizing an input frame tail at a second frame rate from a second frame image cache through a first frame image cache at a first frame rate, wherein the first frame image cache is used for reading operation, the second frame image cache is used for writing operation, and the first frame rate is greater than or equal to the second frame rate;
determining grouping parameters of the input frame according to the difference value between the first frame rate and the second frame rate;
and performing frame dropping operation on the input frame according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent.
Optionally, in the aspect of determining the grouping parameter of the frame writing input according to the difference value between the first frame rate and the second frame rate, the program includes instructions for performing the following steps:
determining a target difference value between the first frame rate and the second frame rate;
and determining the grouping parameters of the write-in frame corresponding to the target difference according to the mapping relation between the preset difference and the grouping parameters.
Optionally, when the first frame rate is 60HZ and the second frame rate is 60 HZ;
in the aspect of determining the grouping parameter of the frame writing input according to the difference value between the first frame rate and the second frame rate, the program comprises instructions for:
determining that the difference value between the first frame rate and the second frame rate is 0HZ, and determining that the grouping parameter is 1 according to the mapping relation;
in the aspect of performing a frame dropping operation on the write-in frame according to the grouping parameter, the program includes instructions for performing the following steps:
and performing 0 frame missing operation on the frame of the write input.
Optionally, when the first frame rate is 90HZ and the second frame rate is 60 HZ;
in the aspect of determining the grouping parameter of the frame writing input according to the difference value between the first frame rate and the second frame rate, the program comprises instructions for:
determining that the difference value between the first frame rate and the second frame rate is 30HZ, and determining that the grouping parameter is 3 according to the mapping relation;
in the aspect of performing a frame dropping operation on the write-in frame according to the grouping parameter, the program includes instructions for performing the following steps:
and performing frame loss 1 operation on the frame of the write input.
Optionally, when the first frame rate is 120HZ and the second frame rate is 60 HZ;
in the aspect of determining the grouping parameter of the frame writing input according to the difference value between the first frame rate and the second frame rate, the program comprises instructions for:
determining that the difference value between the first frame rate and the second frame rate is 60HZ, and determining that the grouping parameter is 2 according to the mapping relation;
in the aspect of performing a frame dropping operation on the write-in frame according to the grouping parameter, the program includes instructions for performing the following steps:
and performing frame loss 1 operation on the frame of the write input.
Optionally, when the first frame rate is 144HZ and the second frame rate is 57.6 HZ;
in the aspect of determining the grouping parameter of the frame writing input according to the difference value between the first frame rate and the second frame rate, the program comprises instructions for:
determining that the difference value between the first frame rate and the second frame rate is 82.4HZ, and determining that the grouping parameter is 5 according to the mapping relation;
in the aspect of performing a frame dropping operation on the write-in frame according to the grouping parameter, the program includes instructions for performing the following steps:
and performing 3-frame missing operation on the frame of the write input.
Optionally, the program further includes instructions for performing the following steps:
detecting whether the image in the image mode has rotation operation or not;
and when the image in the image mode has rotation operation, executing the step of reading and synchronizing the input frame end from the second frame image buffer at the second frame rate through the first frame image buffer at the first frame rate.
It can be seen that, in the electronic device described in the embodiment of the present application, in the image mode, the first frame image buffer reads and synchronizes the frame end written and input at the second frame rate from the second frame image buffer at the first frame rate, the first frame image buffer is used for reading operation, the second frame image buffer is used for writing operation, the first frame rate is greater than or equal to the second frame rate, the grouping parameter of the frame written and input is determined according to the difference between the first frame rate and the second frame rate, the frame dropping operation is performed on the frame written and input according to the grouping parameter, so as to ensure that the input frame number and the output frame number of each group are consistent, and double buffer control is introduced, which can solve the problem of image tearing.
Fig. 4 is a block diagram of functional units of an image anti-tear device 400 according to an embodiment of the present application. The image tearing-prevention device 400 is applied to an electronic device, and the device 400 comprises: a synchronization unit 401, a determination unit 402, and a frame processing unit 403, wherein,
the synchronization unit 401 is configured to, in an image mode, read and synchronize, at a first frame rate, a frame end written at a second frame rate from a second frame image buffer by using a first frame image buffer, where the first frame image buffer is used for read operation, the second frame image buffer is used for write operation, and the first frame rate is greater than or equal to the second frame rate;
the determining unit 402 is configured to determine a grouping parameter of a frame to be written according to a difference between the first frame rate and the second frame rate;
the frame processing unit 403 is configured to perform a frame dropping operation on the write-in frame according to the grouping parameter, so as to ensure that the number of input frames of each group is consistent with the number of output frames.
Optionally, in the aspect of determining the grouping parameter of the frame to be written according to the difference between the first frame rate and the second frame rate, the determining unit 402 is specifically configured to:
determining a target difference value between the first frame rate and the second frame rate;
and determining the grouping parameters of the write-in frame corresponding to the target difference according to the mapping relation between the preset difference and the grouping parameters.
Optionally, when the first frame rate is 60HZ and the second frame rate is 60 HZ;
in the aspect of determining the grouping parameter of the frame to be written according to the difference between the first frame rate and the second frame rate, the determining unit 402 is specifically configured to:
determining that the difference value between the first frame rate and the second frame rate is 0HZ, and determining that the grouping parameter is 1 according to the mapping relation;
in the aspect of performing a frame dropping operation on the write-in frame according to the grouping parameter, the frame processing unit 403 is specifically configured to:
and performing 0 frame missing operation on the frame of the write input.
Optionally, when the first frame rate is 90HZ and the second frame rate is 60 HZ;
in the aspect of determining the grouping parameter of the frame to be written according to the difference between the first frame rate and the second frame rate, the determining unit 402 is specifically configured to:
determining that the difference value between the first frame rate and the second frame rate is 30HZ, and determining that the grouping parameter is 3 according to the mapping relation;
in terms of the frame dropping operation performed on the write-in frame according to the grouping parameter, the frame processing unit 403:
and performing frame loss 1 operation on the frame of the write input.
Optionally, when the first frame rate is 120HZ and the second frame rate is 60 HZ;
in the aspect of determining the grouping parameter of the frame to be written according to the difference between the first frame rate and the second frame rate, the determining unit 402 is specifically configured to:
determining that the difference value between the first frame rate and the second frame rate is 60HZ, and determining that the grouping parameter is 2 according to the mapping relation;
in terms of the frame dropping operation performed on the write-in frame according to the grouping parameter, the frame processing unit 403:
and performing frame loss 1 operation on the frame of the write input.
Optionally, when the first frame rate is 144HZ and the second frame rate is 57.6 HZ;
optionally, in the aspect of determining the grouping parameter of the frame to be written according to the difference between the first frame rate and the second frame rate, the determining unit 402 is specifically configured to:
determining that the difference value between the first frame rate and the second frame rate is 82.4HZ, and determining that the grouping parameter is 5 according to the mapping relation;
in terms of the frame dropping operation performed on the write-in frame according to the grouping parameter, the frame processing unit 403:
and performing 3-frame missing operation on the frame of the write input.
Optionally, the synchronization unit 401 is further specifically configured to:
detecting whether the image in the image mode has rotation operation or not;
and when the image in the image mode has rotation operation, executing the step of reading and synchronizing the input frame end from the second frame image buffer at the second frame rate through the first frame image buffer at the first frame rate.
It can be seen that the image anti-tearing device described in the embodiment of the present application is applied to an electronic device, and in an image mode, a first frame image buffer is used for reading and synchronizing a frame tail written and input at a second frame rate from a second frame image buffer at a first frame rate, the first frame image buffer is used for reading operation, the second frame image buffer is used for writing operation, the first frame rate is greater than or equal to the second frame rate, a grouping parameter of the written and input frame is determined according to a difference between the first frame rate and the second frame rate, and a frame dropping operation is performed on the written and input frame according to the grouping parameter, so as to ensure that an input frame number and an output frame number of each group are consistent, and a double buffer control is introduced, so that the problem of image tearing can be solved.
It can be understood that the functions of each program module of the image anti-tearing device in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An image anti-tearing method is applied to an electronic device, and comprises the following steps:
in an image mode, reading and synchronizing an input frame tail at a second frame rate from a second frame image cache through a first frame image cache at a first frame rate, wherein the first frame image cache is used for reading operation, the second frame image cache is used for writing operation, and the first frame rate is greater than or equal to the second frame rate;
determining grouping parameters of the input frame according to the difference value between the first frame rate and the second frame rate;
and performing frame dropping operation on the input frame according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent.
2. The method of claim 1, wherein determining grouping parameters for the frame to be written according to the difference between the first frame rate and the second frame rate comprises:
determining a target difference value between the first frame rate and the second frame rate;
and determining the grouping parameters of the write-in frame corresponding to the target difference according to the mapping relation between the preset difference and the grouping parameters.
3. The method of claim 2, wherein when the first frame rate is 60HZ and the second frame rate is 60 HZ;
the determining a grouping parameter of a frame which is input by writing according to the difference value between the first frame rate and the second frame rate comprises:
determining that the difference value between the first frame rate and the second frame rate is 0HZ, and determining that the grouping parameter is 1 according to the mapping relation;
the performing frame loss operation on the write-in frame according to the grouping parameter includes:
and performing 0 frame missing operation on the frame of the write input.
4. The method of claim 2, wherein when the first frame rate is 90HZ and the second frame rate is 60 HZ;
the determining a grouping parameter of a frame which is input by writing according to the difference value between the first frame rate and the second frame rate comprises:
determining that the difference value between the first frame rate and the second frame rate is 30HZ, and determining that the grouping parameter is 3 according to the mapping relation;
the performing frame loss operation on the write-in frame according to the grouping parameter includes:
and performing frame loss 1 operation on the frame of the write input.
5. The method of claim 2, wherein when the first frame rate is 120HZ and the second frame rate is 60 HZ;
the determining a grouping parameter of a frame which is input by writing according to the difference value between the first frame rate and the second frame rate comprises:
determining that the difference value between the first frame rate and the second frame rate is 60HZ, and determining that the grouping parameter is 2 according to the mapping relation;
the performing frame loss operation on the write-in frame according to the grouping parameter includes:
and performing frame loss 1 operation on the frame of the write input.
6. The method of claim 2, wherein when the first frame rate is 144HZ and the second frame rate is 57.6 HZ;
the determining a grouping parameter of a frame which is input by writing according to the difference value between the first frame rate and the second frame rate comprises:
determining that the difference value between the first frame rate and the second frame rate is 82.4HZ, and determining that the grouping parameter is 5 according to the mapping relation;
the performing frame loss operation on the write-in frame according to the grouping parameter includes:
and performing 3-frame missing operation on the frame of the write input.
7. The method according to any one of claims 1-6, further comprising:
detecting whether the image in the image mode has rotation operation or not;
and when the image in the image mode has rotation operation, executing the step of reading and synchronizing the input frame end from the second frame image buffer at the second frame rate through the first frame image buffer at the first frame rate.
8. An image anti-tearing device applied to electronic equipment, the device comprising: a synchronization unit, a determination unit and a frame processing unit, wherein,
the synchronization unit is used for reading and synchronizing the frame tail written and input by a second frame rate from a first frame image buffer at a first frame rate through the first frame image buffer in an image mode, wherein the first frame image buffer is used for reading operation, the second frame image buffer is used for writing operation, and the first frame rate is greater than or equal to the second frame rate;
the determining unit is used for determining grouping parameters of the input frames according to the difference value between the first frame rate and the second frame rate;
and the frame processing unit is used for performing frame dropping operation on the write-in frames according to the grouping parameters so as to ensure that the input frame number and the output frame number of each group are consistent.
9. An electronic device comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202111426750.1A 2021-11-27 2021-11-27 Image anti-tearing method and related device Pending CN114153414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111426750.1A CN114153414A (en) 2021-11-27 2021-11-27 Image anti-tearing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111426750.1A CN114153414A (en) 2021-11-27 2021-11-27 Image anti-tearing method and related device

Publications (1)

Publication Number Publication Date
CN114153414A true CN114153414A (en) 2022-03-08

Family

ID=80457823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111426750.1A Pending CN114153414A (en) 2021-11-27 2021-11-27 Image anti-tearing method and related device

Country Status (1)

Country Link
CN (1) CN114153414A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115766677A (en) * 2023-01-09 2023-03-07 深圳曦华科技有限公司 Frame rate conversion method and device for video mode

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6054980A (en) * 1999-01-06 2000-04-25 Genesis Microchip, Corp. Display unit displaying images at a refresh rate less than the rate at which the images are encoded in a received display signal
CN102402409A (en) * 2010-09-07 2012-04-04 无锡中星微电子有限公司 Screen refreshing method and device
CN103310820A (en) * 2012-03-14 2013-09-18 三星电子(中国)研发中心 Method for optimizing multimedia player
CN107743223A (en) * 2017-10-31 2018-02-27 歌尔科技有限公司 Image write-in control method, device and electronic equipment
CN113132553A (en) * 2020-01-16 2021-07-16 京东方科技集团股份有限公司 Novel source end synchronous display method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6054980A (en) * 1999-01-06 2000-04-25 Genesis Microchip, Corp. Display unit displaying images at a refresh rate less than the rate at which the images are encoded in a received display signal
CN102402409A (en) * 2010-09-07 2012-04-04 无锡中星微电子有限公司 Screen refreshing method and device
CN103310820A (en) * 2012-03-14 2013-09-18 三星电子(中国)研发中心 Method for optimizing multimedia player
CN107743223A (en) * 2017-10-31 2018-02-27 歌尔科技有限公司 Image write-in control method, device and electronic equipment
CN113132553A (en) * 2020-01-16 2021-07-16 京东方科技集团股份有限公司 Novel source end synchronous display method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115766677A (en) * 2023-01-09 2023-03-07 深圳曦华科技有限公司 Frame rate conversion method and device for video mode

Similar Documents

Publication Publication Date Title
US10613812B2 (en) System, control apparatus and control method for distributed video display
CN112004086B (en) Video data processing method and device
US20170118442A1 (en) Apparatus and method for converting a frame rate
US20150163450A1 (en) Video display system, source device, sink device, and video display method
CN114205485B (en) Method and device for sending image data
EP4270963A1 (en) Startup display control method and apparatus, and device and storage medium
CN114153414A (en) Image anti-tearing method and related device
CN110798682B (en) Time delay test system
CN113205779A (en) Multi-screen synchronous control method, device and system suitable for electronic ink screen
CN114189732B (en) Method and related device for controlling reading and writing of image data
CN1957323B (en) Display apparatus and display system using the same
CN114153408B (en) Image display control method and related equipment
CN111984181A (en) Picture refreshing method and device, terminal equipment and storage medium
CN113424487A (en) Method, apparatus and computer storage medium for video display
CN114153415A (en) Image frame rate control method and related product
CN116027930B (en) Dynamic frame rate control method and device
CN114727051B (en) Media resource transmission device, system and method
CN111625311B (en) Control method, control device, electronic equipment and storage medium
JPH09274475A (en) A plurality of display devices capable of connecting to one computer
CN115831074B (en) Frame rate conversion method and device based on single buffer mode
CN114153416B (en) Display control method and related device
CN111818380B (en) Interactive synchronous image display method and system for micro display unit
CN116320248B (en) Memory chip sharing system, method, related device and storage medium
CN114035758B (en) Image mosaic display system and image mosaic display method
CN209851869U (en) Printed calendar with augmented reality

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220308

RJ01 Rejection of invention patent application after publication