CN102207839A - Method and system for eliminating horizontal image tearing - Google Patents

Method and system for eliminating horizontal image tearing Download PDF

Info

Publication number
CN102207839A
CN102207839A CN2011100786913A CN201110078691A CN102207839A CN 102207839 A CN102207839 A CN 102207839A CN 2011100786913 A CN2011100786913 A CN 2011100786913A CN 201110078691 A CN201110078691 A CN 201110078691A CN 102207839 A CN102207839 A CN 102207839A
Authority
CN
China
Prior art keywords
read
frame buffer
write
view data
time
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.)
Granted
Application number
CN2011100786913A
Other languages
Chinese (zh)
Other versions
CN102207839B (en
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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN 201110078691 priority Critical patent/CN102207839B/en
Publication of CN102207839A publication Critical patent/CN102207839A/en
Application granted granted Critical
Publication of CN102207839B publication Critical patent/CN102207839B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention relates to a method for eliminating horizontal image tearing. The method comprises the following steps: (S1) constructing at least three frame buffers in a display card, and respectively setting one read-write mutual exclusion marker and a time marker in each frame buffer; (S2) setting the read-write mutual exclusion marker of the frame buffer in a write operation state and at the same time writing image data into the frame buffer, setting the time value of the time marker as the time moment when the write-in operation is completed and simultaneously setting the read-write mutual exclusion marker in an idle state; and (S3) setting the read-write mutual exclusion marker of the frame buffer in a read operation state, reading the image data in the frame buffer and outputting the image data to a display, setting the read-write mutual exclusion marker in the idle state after completing the reading operation, and simultaneously keeping the value of the time marker invariant. The invention also provides a system for eliminating horizontal image tearing. The method provided by the invention can not only eliminate the horizontal image tearing, but also ensure the frame rate for image rendering while displaying images.

Description

The method and system that the removal of images level is torn
Technical field
The present invention relates to image display technology, particularly the removal of images level method and system of tearing.
Background technology
In present image demonstration field, for the level of eliminating picture is torn phenomenon, we will open the vertical synchronization of video card usually; And the vertical synchronization of having opened video card can cause that again image plays up the rapid decline of frame per second.As shown in Figure 1, Fig. 1 opens the synoptic diagram that vertical synchronization causes that frame per second sharply descends, and under the situation of not opening vertical synchronization, a/b/c/d/e/f/g/h/i/j/k totally 11 frames can be played up and show to video card, but in use, the phenomenon that image level is torn may appear.In " the vertical synchronization time of video card ", each bar black vertical line is represented a vertical synchronization, and the time between the vertical synchronization is uniform; In " not opening the render time of vertical synchronization time frame ", each vertical line is represented the demonstration time of each frame; In " picture frame render time ", the needed time of each frame is played up in each square frame representative, and playing up of each frame starts from after the previous frame image vertical synchronization demonstration; The time of each frame actual displayed was described in " picture frame shows the time ".As shown in the drawing, frame a, the b as shown in " picture frame render time ", c, d, e, f show at time a, b, c, d, e, the f as shown in " picture frame shows the time " respectively.As we can see from the figure, in time of arrival during f, open under the situation of vertical synchronization, only shown a/b/c/d/e/f totally 5 frames, so, can the removal of images level tear phenomenon though open vertical synchronization, but can cause frame per second sharply to descend, influence the effect that shows.
Summary of the invention
The invention provides the method and system that a kind of removal of images level is torn, both eliminated image level and torn, guaranteed the frame per second that image is played up again.
The method that a kind of removal of images level is torn may further comprise the steps:
S1, set up at least three frame buffers in that video card is inner, a read-write mutex device and a time identification marker are set respectively in each described frame buffer;
The state of described read-write mutex device mark is write operation, read operation or free time;
The time of described time identification marker mark is that write operation is finished the time constantly;
S2, to read and write the mutex device be that the read-write mutex device of idle condition and time identification marker frame buffer the earliest is set to the write operation state, simultaneously view data is write described frame buffer, after writing described view data and finishing, the time identification marker time value is set to write to be finished the time constantly, and described simultaneously read-write mutex device is set to idle condition;
The described read-write mutex device of S3, time identification marker time value frame buffer the latest is set to the read operation state, the view data that reads in the described frame buffer exports display to, after reading described view data and finishing, described read-write mutex device is set to idle condition, keeps the value of described time identification marker constant simultaneously.
The system that the present invention also provides a kind of removal of images level to tear comprises: at least three frame buffers that are respectively arranged with a read-write mutex device and a time identification marker, writing unit, reading unit;
Described frame buffer is used to store the video card rendered image data, and the view data of each frame buffer can be shown device and read;
Described read-write mutex device, being used for the described frame buffer of mark is to be in write operation, read operation or idle condition;
Described time identification marker is used for the described view data of mark and is written into finishing the time constantly of described frame buffer;
The said write unit, the read-write mutex device that is used for read-write mutex device and is idle condition and the frame buffer that does not have view data is set to the write operation state, simultaneously view data is write described frame buffer, finish constantly writing described view data, the time identification marker time value is set to finish the time constantly, and described simultaneously read-write mutex device is set to idle condition;
Described reading unit, the described read-write mutex device that is used for time identification marker time value described frame buffer the latest is set to the read operation state, the view data that reads in the described frame buffer exports display to, finish constantly reading described view data, described read-write mutex device is set to idle condition, keeps the value of described time identification marker constant simultaneously.
Compared with prior art, the present invention is by being provided with a plurality of frame buffers in video card inside, revise simultaneously and write and read mechanism, with the view data ablation process of frame buffer with read process and carry out mutual exclusion, make frame buffer phenomenon can not occur writing simultaneously and reading, eliminated image level and torn, the setting of simultaneously a plurality of frame buffers can guarantee the frame per second that image is played up again.
Description of drawings
Fig. 1 opens the synoptic diagram that vertical synchronization causes that frame per second sharply descends;
Fig. 2 is the schematic flow sheet of a kind of removal of images level of the present invention method of tearing;
Fig. 3 is a step S2 specific operation process schematic flow sheet among the embodiment;
Fig. 4 is a step S3 specific operation process schematic flow sheet among the embodiment;
Fig. 5 is the structural representation of the system that tears of a kind of removal of images level of the present invention.
Embodiment
Below in conjunction with drawings and Examples technology of the present invention is done detailed description.
As shown in Figure 1, the removal of images level of the present invention method of tearing comprises:
S1, set up at least three frame buffers in that video card is inner, a read-write mutex device and a time identification marker are set respectively in frame buffer; Wherein, each frame buffer can be shown device and read, and the state of read-write mutex device mark is write operation, read operation or idle three kinds, when frame buffer does not carry out read-write operation, read-write mutex device is labeled as idle condition, and any moment is merely able to that all a kind of state is arranged; The time identification marker time value is the time in frame buffer moment of finishing when carrying out write operation.
S2, to read and write the mutex device be that the read-write mutex device of idle condition and time identification marker frame buffer the earliest is set to the write operation state, simultaneously view data is write described frame buffer, after writing view data, the time identification marker time value is set to finish the time constantly, reads and writes the mutex device simultaneously and is set to idle condition.
The read-write mutex device of S3, time identification marker time value frame buffer the latest is set to the read operation state, the view data that reads in this frame buffer exports display to, after reads image data is finished, its read-write mutex device is set to idle condition, and the value of retention time marker is constant simultaneously.
In order further clearly to describe method of the present invention, below set forth the preferred embodiment of the inventive method.
For step S1, at least three frame buffers of the inner foundation of video card, a read-write mutex device and a time identification marker are set respectively in frame buffer; When original state, the read-write mutex device of frame buffer is set to idle condition, and the time identification marker note is set to 0.
For step S2, as shown in Figure 3, specifically comprise:
S201, image are played up process and are generated view data;
S202, arranging according to the frame buffer in the video card, travel through frame buffer from top to bottom, is idle condition and time identification marker frame buffer the earliest up to finding read-write mutex device;
The read-write mutex device of S203, this frame buffer is set to the write operation state, simultaneously view data is write frame buffer;
S204, finish write the view data process after, the time value of time identification marker is set to finish the time constantly, reads and writes the mutex device simultaneously and is set to idle condition;
Behind completing steps S204, promptly return step S201, the view data of next frame is written in the time identification marker frame buffer the earliest, playing up of view data need not to wait for vertical synchronizing signal, guaranteed the frame per second of playing up.
For step S3, as shown in Figure 4, particularly, comprising:
S301, arranging according to the frame buffer in the video card, travel through frame buffer from top to bottom, is idle condition and time identification marker time value frame buffer the latest up to finding read-write mutex device;
The read-write mutex device of S302, this frame buffer is set to the read operation state, and reads image data exports display to then;
S303, after finishing reads image data, the read-write mutex device of this frame buffer is set to idle condition, simultaneously the time of retention time marker constant, guaranteed when screen-refresh, can also continue to read.
Above-mentioned read operation process, be with fixing frame per second regularly with the image data transmission of the frame buffer of up-to-date (the time identification marker time value the latest) to display, abandon the view data (these frame buffers are used to write the view data of new frame) of old frame buffer; Wherein, frame per second can be set according to actual conditions by this patent user.
In the method for the invention, can find that the phenomenon of " read-write " simultaneously can not take place frame buffer again, the level that image also just can not occur is torn phenomenon; Simultaneously,, guaranteed the frame per second that video card is played up, reached and the removal of images level to tear, can guarantee that again image plays up the purpose of frame per second because a plurality of frames buffering is set.
Accordingly, provide the specific embodiment of the system that the removal of images level tears below in conjunction with Fig. 5.
As shown in Figure 5, this system comprises: at least three frame buffers that are respectively arranged with a read-write mutex device and a time identification marker, writing unit, reading unit;
Frame buffer is used to store the video card rendered image data, and the view data of each frame buffer can be shown device and reads; Read-write mutex device is used for current write operation, read operation or the idle condition of being in of marker frame impact damper, and time identification marker is used for the deadline that marked image data is written into described frame buffer;
Its principle of work is: it is that the read-write mutex device of idle condition and time identification marker frame buffer the earliest is set to the write operation state that writing unit is read and write the mutex device, simultaneously view data is write this frame buffer, finish constantly writing described view data then, time identification marker is set to finish the time constantly, reads and writes the mutex device simultaneously and is set to idle condition.
The read-write mutex device of reading unit time identification marker time value frame buffer the latest is set to the read operation state, the view data that reads then in this 4 frame buffer exports display to, finish constantly reading described view data, read and write the mutex device and be set to idle condition, the value of retention time marker is constant simultaneously.
In order further clearly to describe system of the present invention, below set forth the preferred embodiment of system of the present invention.
This system also comprises initialization module, is used for when original state, and the read-write mutex device of frame buffer is set to idle condition, and time identification marker is set to 0.
For writing unit, specifically comprise: the view data generation module, first frame buffer is searched module, and first marker is provided with module, the view data writing module;
Its principle of work is: the view data generation module generates view data; First frame buffer is searched module and is arranged according to the frame buffer in the video card, travels through frame buffer from top to bottom, is idle condition and time identification marker frame buffer the earliest up to finding read-write mutex device; The read-write mutex device that first marker is provided with this frame buffer of module is set to the write operation state, and the view data writing module writes frame buffer with view data simultaneously; Finish write the view data process after, the time value that first marker is provided with the module time identification marker is set to finish the time constantly, reads and writes the mutex device simultaneously and is set to idle condition.
For reading unit, specifically comprise: second frame buffer is searched module, and second marker is provided with module, the view data read module;
Its principle of work is: second frame buffer is searched module and is arranged according to the frame buffer in the video card, travels through frame buffer from top to bottom, is idle condition and time identification marker time value frame buffer the latest up to finding read-write mutex device; The read-write mutex device that second marker is provided with this frame buffer of module is set to the read operation state, and view data read module reads image data exports display to then; After finishing reads image data, the read-write mutex device that second marker is provided with this frame buffer of module is set to idle condition, and the time of retention time marker is constant simultaneously.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (8)

1. the method that the removal of images level is torn is characterized in that, may further comprise the steps:
S1, set up at least three frame buffers in that video card is inner, a read-write mutex device and a time identification marker are set respectively in each described frame buffer;
The state of described read-write mutex device mark is write operation, read operation or free time;
The time of described time identification marker mark is that write operation is finished the time constantly;
S2, to read and write the mutex device be that the read-write mutex device of idle condition and time identification marker frame buffer the earliest is set to the write operation state, simultaneously view data is write described frame buffer, after writing described view data and finishing, the time identification marker time value is set to write to be finished the time constantly, and described simultaneously read-write mutex device is set to idle condition;
The described read-write mutex device of S3, time identification marker time value frame buffer the latest is set to the read operation state, the view data that reads in the described frame buffer exports display to, after reading described view data and finishing, described read-write mutex device is set to idle condition, keeps described time identification marker time value constant simultaneously.
2. the method for elimination of level picture break-up according to claim 1 is characterized in that, described step S1 also comprises: when original state, the read-write mutex device of described frame buffer is set to idle condition, and described time identification marker is set to 0.
3. the method for elimination of level picture break-up according to claim 1 and 2 is characterized in that, described S2 specifically comprises:
S201, image are played up process and are generated view data;
S202, travel through described frame buffer, finding read-write mutex device is idle condition and time identification marker frame buffer the earliest;
The read-write mutex device of S203, this frame buffer is set to the write operation state, then described view data is write frame buffer;
S204, finish constantly described view data being write this frame buffer, the value of described time identification marker is set to finish the time constantly, reads and writes the mutex device simultaneously and is set to idle condition.
4. the method for elimination of level picture break-up according to claim 3 is characterized in that, described S3 specifically comprises:
S301, travel through described frame buffer, finding read-write mutex device is idle condition and time identification marker time value frame buffer the latest;
The read-write mutex device of S302, this frame buffer is set to the read operation state, reads described view data then and exports display to;
S303, finish constantly reading described view data, the read-write mutex device of this frame buffer is set to idle condition, and the value of retention time marker is constant simultaneously.
5. the system that the removal of images level is torn is characterized in that, comprising: at least three frame buffers that are respectively arranged with a read-write mutex device and a time identification marker, writing unit, reading unit;
Described frame buffer is used to store the video card rendered image data, and the view data in each frame buffer can be shown device and read;
Described read-write mutex device, being used for the described frame buffer of mark is to be in write operation, read operation or idle condition;
Described time identification marker is used for the described view data of mark and is written into finishing the time constantly of described frame buffer;
The said write unit, the read-write mutex device that is used for read-write mutex device and is idle condition and time identification marker frame buffer the earliest is set to the write operation state, simultaneously view data is write described frame buffer, finish constantly writing described view data, the time identification marker time value is set to finish the time constantly, and described simultaneously read-write mutex device is set to idle condition;
Described reading unit, the described read-write mutex device that is used for time identification marker time value described frame buffer the latest is set to the read operation state, the view data that reads in the described frame buffer exports display to, finish constantly reading described view data, described read-write mutex device is set to idle condition, keeps described time identification marker time value constant simultaneously.
6. the system of elimination of level picture break-up according to claim 5 is characterized in that, also comprises initialization module;
Described initialization module is used for when original state, and the read-write mutex device of described frame buffer is set to idle condition, and described time identification marker is set to 0.
7. according to the system of claim 5 or 6 described elimination of level picture break-ups, it is characterized in that the said write unit specifically comprises: the view data generation module, first frame buffer is searched module, and first marker is provided with module, the view data writing module;
Described view data generation module is used to generate view data;
Described first frame buffer is searched module, is used to travel through described frame buffer, and finding read-write mutex device is idle condition and time identification marker frame buffer the earliest;
Described first marker is provided with module, is used to be provided with the value of described read-write mutex device and time identification marker;
Described view data writing module is used for described view data is write frame buffer.
8. the system of elimination of level picture break-up according to claim 7 is characterized in that, described reading unit specifically comprises: second frame buffer is searched module, and second marker is provided with module, the view data read module;
Described second frame buffer is searched module, is used to travel through described frame buffer, find be mounted with view data, read-write mutex device is the value frame buffer the latest of idle condition and time identification marker;
Described second marker is provided with module, is used to be provided with the value of described read-write mutex device and time identification marker;
Described view data read module is used to read described view data and exports display to.
CN 201110078691 2011-03-30 2011-03-30 Method and system for eliminating horizontal image tearing Expired - Fee Related CN102207839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110078691 CN102207839B (en) 2011-03-30 2011-03-30 Method and system for eliminating horizontal image tearing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110078691 CN102207839B (en) 2011-03-30 2011-03-30 Method and system for eliminating horizontal image tearing

Publications (2)

Publication Number Publication Date
CN102207839A true CN102207839A (en) 2011-10-05
CN102207839B CN102207839B (en) 2013-08-21

Family

ID=44696693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110078691 Expired - Fee Related CN102207839B (en) 2011-03-30 2011-03-30 Method and system for eliminating horizontal image tearing

Country Status (1)

Country Link
CN (1) CN102207839B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107748439A (en) * 2017-10-19 2018-03-02 成都虚拟世界科技有限公司 A kind of display control method and wear display device
CN110148391A (en) * 2019-03-29 2019-08-20 珠海亿智电子科技有限公司 A kind of method and terminal device avoiding image display tearing
CN114153416A (en) * 2021-11-27 2022-03-08 深圳曦华科技有限公司 Display control method and related device
CN115103229A (en) * 2022-06-22 2022-09-23 深圳市腾客科技有限公司 Real-time display method of high-frame-rate video

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538736A (en) * 2003-04-18 2004-10-20 成都威斯达芯片有限责任公司 Method of conversing image framel field frequency in video signal processing
US20060170691A1 (en) * 2005-01-28 2006-08-03 Ruen-Rone Lee Apparatus and method for frame buffer control
CN101266761A (en) * 2007-03-16 2008-09-17 联发科技股份有限公司 Memory buffer access method and image displaying method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538736A (en) * 2003-04-18 2004-10-20 成都威斯达芯片有限责任公司 Method of conversing image framel field frequency in video signal processing
US20060170691A1 (en) * 2005-01-28 2006-08-03 Ruen-Rone Lee Apparatus and method for frame buffer control
CN101266761A (en) * 2007-03-16 2008-09-17 联发科技股份有限公司 Memory buffer access method and image displaying method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107748439A (en) * 2017-10-19 2018-03-02 成都虚拟世界科技有限公司 A kind of display control method and wear display device
CN110148391A (en) * 2019-03-29 2019-08-20 珠海亿智电子科技有限公司 A kind of method and terminal device avoiding image display tearing
CN114153416A (en) * 2021-11-27 2022-03-08 深圳曦华科技有限公司 Display control method and related device
CN114153416B (en) * 2021-11-27 2024-02-23 深圳曦华科技有限公司 Display control method and related device
CN115103229A (en) * 2022-06-22 2022-09-23 深圳市腾客科技有限公司 Real-time display method of high-frame-rate video
CN115103229B (en) * 2022-06-22 2023-03-14 深圳市腾客科技有限公司 Real-time display method of high-frame-rate video

Also Published As

Publication number Publication date
CN102207839B (en) 2013-08-21

Similar Documents

Publication Publication Date Title
CN101976183B (en) Method and device for updating images when simultaneously updating multi-window images
CN100592379C (en) Apparatuses and methods for switching between buffers using a video frame buffer flip queue
CN102207839B (en) Method and system for eliminating horizontal image tearing
CN101601084B (en) Image display device and image display method
US20170148422A1 (en) Refresh control method and apparatus of display device
WO2006113905A3 (en) Displaying and image using memory control unit
CN100385498C (en) Control device for display panel and display apparatus having same
CN104063198A (en) Multi-screen synchronous subtitle overlaying method and equipment
CN101980072A (en) Android system-based electronic ink screen refresh control system and method
CN103021378A (en) Method and device for multi-screen mosaic display
CN102473393B (en) Display device
CN104363508A (en) Image stitching method and device for preventing video rollback
CN103617031A (en) Image rendering method and image rendering device
CN106293578A (en) Video card, image display device, method for displaying image and system
TW201028994A (en) Device and method for controlling input/output frame
CN102663987B (en) Display driving method and display driving device of dual-channel video signals
CN101448055A (en) Display control apparatus and image forming apparatus employing same
JP2004320215A5 (en)
US8305384B2 (en) System and method for storing and accessing pixel data in a graphics display device
CN101271357B (en) Content recording method and device of writing board
JP3384659B2 (en) Reduced video signal processing circuit
TWI426499B (en) System and method for storing and accessing pixel data in a graphics display device
CN201956048U (en) Multifunctional display control device for TFT (thin film transistor) liquid crystal screen
CN101866634B (en) Display system for displaying code stream and control method
CN102184724B (en) Method and device for displaying images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 510670 Guangdong city of Guangzhou province Kezhu Guangzhou high tech Industrial Development Zone, Road No. 233

Patentee after: VTRON GROUP Co.,Ltd.

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: VTRON TECHNOLOGIES Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130821