The invention provides an electronic apparatus. In one embodiment, the electronic apparatus is coupled to a display device, and comprises a memory, a data transmission interface, and a control module. The memory comprises a virtual frame buffer for storing data to be transmitted to the display device. The data transmission interface performs data transmission between the electronic apparatus and the display device. The control module stores a current character image corresponding to a current character in the virtual frame buffer when users input the current character to an input device, determines whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer, determines whether the current character image matches the prior image, and combines the prior image with the current character image to obtain a combined image in place of the prior image when the current character image matches the prior image.
|
10. A method for data transmission from an electronic apparatus to a display device, comprising:
when a user inputs a current character to an input device, storing a current character image corresponding to the current character in a virtual frame buffer,
determining whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer;
determining whether the current character image matches the prior image, wherein determination of whether the current character image matches the prior image comprising:
when an abscissa value of the upper-left corner of the current character image is equal to the sum of the abscissa value of the upper-left corner of the prior image and the width of the prior image, the ordinate value of the upper-left corner of the prior image is equal to the ordinate value of the upper-left corner of the current character image, and the height of the prior image is equal to the height of the current character image, determining that the current character image matches the prior image; and
when the current character image matches the prior image, combining the prior image with the current character image to obtain a combined image in place of the prior image.
1. An electronic apparatus, coupled to a display device, comprising:
a memory, comprising a virtual frame buffer for storing data to be transmitted to the display device;
a data transmission interface, performing data transmission between the electronic apparatus and the display device; and
a control module, storing a current character image corresponding to a current character in the virtual frame buffer when a user inputs the current character to an input device, determining whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer, determining whether the current character image matches the prior image, and combining the prior image with the current character image to obtain a combined image in place of the prior image when the current character image matches the prior image, wherein when an abscissa value of the upper-left corner of the current character image is equal to the sum of the abscissa value of the upper-left corner of the prior image and the width of the prior image, the ordinate value of the upper-left corner of the prior image is equal to the ordinate value of the upper-left corner of the current character image, and the height of the prior image is equal to the height of the current character image, the control module determines that the current character image matches the prior image.
20. A method for data transmission from an electronic apparatus to a display device, comprising:
when a user inputs a current character to an input device, storing a current character image corresponding to the current character in a virtual frame buffer,
determining whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer;
determining whether the current character image matches the prior image;
when the current character image matches the prior image, combining the prior image with the current character image to obtain a combined image in place of the prior image; and
when the current character image does not match the prior image, triggering execution of a first delay job corresponding to the prior image to transmit the prior image to the display device via the data transmission interface, wherein execution of the first delay job comprises:
calculating a first data amount for respectively transmitting a plurality of rows of pixels of the prior image to the display device;
calculating a second data amount for transmitting a whole row image comprising the prior image to the display device;
when the second data amount is greater than the first data amount, respectively transmitting the rows of pixels of the prior image to the display device; and
when the first data amount is greater than the second data amount, transmitting the whole row image comprising the prior image to the display device.
19. An electronic apparatus, coupled to a display device, comprising:
a memory, comprising a virtual frame buffer for storing data to be transmitted to the display device;
a data transmission interface, performing data transmission between the electronic apparatus and the display device; and
a control module, storing a current character image corresponding to a current character in the virtual frame buffer when a user inputs the current character to an input device, determining whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer, determining whether the current character image matches the prior image, and combining the prior image with the current character image to obtain a combined image in place of the prior image when the current character image matches the prior image, wherein when the current character image does not match the prior image, the control module triggers execution of a first delay job corresponding to the prior image to transmit the prior image to the display device via the data transmission interface, wherein execution of the first delay job comprises:
calculating a first data amount for respectively transmitting a plurality of rows of pixels of the prior image to the display device by the control module;
calculating a second data amount for transmitting a whole row image comprising the prior image to the display device by the control module;
when the second data amount is greater than the first data amount, respectively transmitting the rows of pixels of the prior image to the display device via the data transmission interface; and
when the first data amount is greater than the second data amount, transmitting the whole row image comprising the prior image to the display device via the data transmission interface.
2. The electronic apparatus as claimed in
3. The electronic apparatus as claimed in
4. The electronic apparatus as claimed in
calculating a first data amount for respectively transmitting a plurality of rows of pixels of the prior image to the display device by the control module;
calculating a second data amount for transmitting a whole row image comprising the prior image to the display device by the control module;
when the second data amount is greater than the first data amount, respectively transmitting the rows of pixels of the prior image to the display device via the data transmission interface; and
when the first data amount is greater than the second data amount, transmitting the whole row image comprising the prior image to the display device via the data transmission interface.
5. The electronic apparatus as claimed in
Q1=rect.h×(rect.w×bpp+const) wherein Q1 is the first data amount, rect.h is the height of the prior image, rect.w is the width of the prior image, bpp is the number of bits per pixel, and const is the data amount of protocol packets;
and the second data amount is calculated according to the following equation:
Q2=rect.h×pitch×bpp+const; wherein Q2 is the second data amount, rect.h is the width of the prior image, pitch is the width of the whole row image or a screen, bpp is the number of bits per pixel, and const is the data amount of protocol packets.
6. The electronic apparatus as claimed in
a universal serial bus (USB) interface, receiving the prior image from the electronic apparatus according to USB protocol;
a USB-to-PCI bridge, coupled to the USB interface, converting the data of the prior image from a USB format to a peripheral component interconnect (PCI) format; and
a PCI graphic card, coupled to the USB-to-PCI bridge, storing the prior image to a frame buffer.
7. The electronic apparatus as claimed in
8. The electronic apparatus as claimed in
9. The electronic apparatus as claimed in
11. The method as claimed in
when the current character image does not match the prior image, triggering execution of a first delay job corresponding to the prior image to transmit the prior image to the display device via the data transmission interface.
12. The method as claimed in
after execution of the first delay job corresponding to the prior image is completed, deleting the first delay job and then generating a second delay job for transmitting the current character image to the display device.
13. The method as claimed in
calculating a first data amount for respectively transmitting a plurality of rows of pixels of the prior image to the display device;
calculating a second data amount for transmitting a whole row image comprising the prior image to the display device;
when the second data amount is greater than the first data amount, respectively transmitting the rows of pixels of the prior image to the display device; and
when the first data amount is greater than the second data amount, transmitting the whole row image comprising the prior image to the display device.
14. The method as claimed in
Q1=rect.h×(rect.w×bpp+const) wherein Q1 is the first data amount, rect.h is the height of the prior image, rect.w is the width of the prior image, bpp is the number of bits per pixel, and const is the data amount of protocol packets;
and the second data amount is calculated according to the following equation:
Q2=rect.h×pitch×bpp+const; wherein Q2 is the second data amount, rect.h is the width of the prior image, pitch is the width of the whole row image or a screen, bpp is the number of bits per pixel, and const is the data amount of protocol packets.
15. The method as claimed in
when the prior image does not exist in the virtual frame buffer, halting transmission of the current character image and generating a second delay job for transmitting the current character image to the display device.
16. The method as claimed in
when the current data block is full, searching the data blocks of the data block pool for at least one target block with no valid page;
putting the target block to the spare block pool; and
incrementing an erase count of the target block by one.
17. The method as claimed in
after the erase count of the target block is incremented, if the erase count of the target block is greater than a jail threshold, determining the target block to be a jail block and putting the target block to a jail pool.
18. The method as claimed in
after the erase count of the target block is incremented, if the erase count of the target block is greater than a hot threshold, determining the target block as a hot spare block and incrementing the hot spare block number by one.
|
This Application claims priority of China Patent Application No. 201210144153.4, filed on May 10, 2012, the entirety of which is incorporated by reference herein.
1. Field of the Invention
The invention relates to data communication, and more particularly to communication of image data.
2. Description of the Related Art
Ordinarily, a memory of a host comprises a virtual frame buffer for storing all pixel data to be displayed on a screen. A graphic card corresponding to the screen also comprises a frame buffer for storing all pixel data to be displayed on the screen. When a user of the host inputs a character via a keyboard, because a character image corresponding to the input character must be shown on the screen, the host must first store the character image to the virtual frame buffer of the host, and then transmit the character image from the host to the graphic card to be stored to the frame buffer of the graphic card.
Referring to
First, a user inputs a character to an input device (such as a keyboard) of a host (step 202). The host then stores a character image 112 corresponding to the character to a virtual frame buffer 110 of the host (step 204). Because the character image has a height of h pixels, the host divides the character image into h rows of pixels, and each row comprises w pixels (step 206). The host then transmits a first row of pixels of the character image to the display device to be stored in the frame buffer 120 with a starting address of offset0 (step 211). Assume that the width of the screen is pitch. The host then transmits a second row of pixels of the character image to the display device to be stored in the frame buffer 120 with a starting address of (offset0+pitch) (step 212). Each row of pixels of the character image is then respectively transmitted to the frame buffer of the display device, until an h-th row of pixels of the character image is transmitted to the display device to be stored in the frame buffer 120 with a starting address of (offset0+(h−1)×pitch) (step 21h).
The aforementioned data transmission method has deficiencies. Because each data transmission must transmit a plurality of protocol packets comprising sync packets, command packets, and frame packets according to a USB protocol, when the frequencies of data transmission is greater, the data amount of the protocol packets to be transmitted is greater, and the data processing load of the host is heavier. For example, when a character image is divided into a plurality of rows of pixels to be transmitted to the frame buffer, the efficiency of data transmission is lowered due to the protocol packets to be transmitted. In addition, when a user inputs a character, the host directly transmits the character image to the display device. If the user continuously inputs a series of characters, the host transmits the characters to the display device, and the efficiency of data transmission is further reduced. In addition, each USB data transmission must initiate software and hardware on transmission terminals and receiving terminals, and a delay is therefore caused. Thus, a method for transmitting data from an electronic apparatus to a display device is therefore required to improve the efficiency of data transmission.
The invention provides an electronic apparatus. In one embodiment, the electronic apparatus is coupled to a display device, and comprises a memory, a data transmission interface, and a control module. The memory comprises a virtual frame buffer for storing data to be transmitted to the display device. The data transmission interface performs data transmission between the electronic apparatus and the display device. The control module stores a current character image corresponding to a current character in the virtual frame buffer when a user inputs the current character to an input device, determines whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer, determines whether the current character image matches the prior image, and combines the prior image with the current character image to obtain a combined image in place of the prior image when the current character image matches the prior image.
The invention also provides a method for data transmission from an electronic apparatus to a display device. First, when a user inputs a current character to an input device, a current character image corresponding to the current character is stored in a virtual frame buffer. Whether a prior image which has not been transmitted to the display device exists in the virtual frame buffer is then determined. Whether the current character image matches the prior image is then determined. When the current character image matches the prior image, the prior image is combined with the current character image to obtain a combined image in place of the prior image.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
Referring to
In one embodiment, the USB display device 304 comprises a USB interface 322, a USB-to-PCI bridge 324, and a PCI graphic card 326. The USB interface 322 receives USB data from the host 302 according to a USB protocol. The USB-to-PCI bridge 324 then converts the USB data from the USB format to a PCI format according to a peripheral component interconnect (PCI) protocol. Finally, the PCI graphic card 326 receives data from the USB-to-PCI bridge 324 and then stores the data to a frame buffer 320.
When a user inputs a current character to the input device, the control module 314 does not directly sends a current character image corresponding to the current character to the display device 304. The control module 314 keeps the current character image in the virtual frame buffer 310 during a delay period (such as 5 ms). During the delay period, if the user continues to input a plurality of subsequent characters, and the location of the subsequent characters are connected to the location of the current character on the screen, the control module 314 combines the current character image with the images of the subsequent characters to obtain a combined image. After the delay period is passed, the control module 314 transmits the combined image to the USB display device 304. The data amount of protocol packets to be also transmitted is therefore reduced, and the efficiency of data transmission is therefore improved.
Referring to
If the prior image exists in the virtual frame buffer 310 (step 406), the control module 314 further determines whether the prior image matches the current character image (step 408). If the boundary of the current character image is next to the boundary of the prior image, the current character image is determined to match the prior image. In one embodiment, when the abscissa value of the upper-left corner of the current character image is equal to a sum of the abscissa value of the upper-left corner of the prior image and the width of the prior image, the ordinate value of the upper-left corner of the prior image is equal to the ordinate value of the upper-left corner of the current character image, and the height of the prior image is equal to the height of the current character image, the control module determines that the current character image matches the prior image. If the prior image matches the current character image (step 408), the control module 314 combines the prior image with the current character image to obtain a combined image in place of the prior image (step 410). Because the current character image is combined with the prior image, after the delay period corresponding to the prior image has passed, the host 302 then sends the combined image comprising the current character image and the prior image to the USB display device 304.
If the prior image does not match the current character image (step 408), the boundary of the prior image is not next to the boundary of the current character image, and the current character image cannot be combined with the prior image. The control module 314 then directly triggers the delay job corresponding to the prior image to transmit the prior image to the USB display device 304 (step 412). Because the prior image has been transmitted to the USB display device 304, the control module 314 therefore deletes the delay job corresponding to the prior image (step 414). The control module 314 then generates a delay job corresponding to the current character image (step 416). In other words, the control module 314 transmits the current character image to the USB display device 304 after the delay period (5 ms) has passed. If the user inputs a new character (step 402), the current character image becomes a prior image corresponding to the new character (step 406), and the control module 314 continues to determine whether the image of the new character can be combined with the prior image (step 408).
Referring to
Q1=rect.h×(rect.w×bpp+const);
The control module 314 then determines a whole row image comprising the prior image (step 506), and calculates a second data amount for transmitting the whole row image (step 508). In one embodiment, the second data amount is calculated according to the following equation:
Q2=rect.h×pitch×bpp+const;
The control module 314 then determines whether the second data amount is greater than the first data amount (step 510). If the second data amount is greater than the first data amount, the control module 314 controls the USB interface 315 to respectively transmit h rows of pixels of the target image to the USB display device 304 (step 512). If the first data amount is greater than the second data amount, the control module 314 controls the USB interface 316 to transmit the whole row image comprising the target image to the USB display device 304 (step 514).
Referring to
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5526440, | Nov 30 1989 | SONY CORPORATION, A CORP OF JAPAN | Hand-written character recognition apparatus |
5533204, | Apr 18 1994 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Split transaction protocol for the peripheral component interconnect bus |
7564995, | Mar 07 2000 | Apple Inc | Method and apparatus for acquiring and organizing ink information in pen-aware computer systems |
20040117538, | |||
20080097806, | |||
20100097398, | |||
20130039423, | |||
EP1677547, | |||
EP1742479, | |||
EP2053863, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jul 03 2012 | LIU, JIN-YUN | SILICON MOTION, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 028571 | /0500 | |
Jul 17 2012 | Silicon Motion, Inc. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Sep 27 2018 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Feb 04 2023 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Date | Maintenance Schedule |
Sep 15 2018 | 4 years fee payment window open |
Mar 15 2019 | 6 months grace period start (w surcharge) |
Sep 15 2019 | patent expiry (for year 4) |
Sep 15 2021 | 2 years to revive unintentionally abandoned end. (for year 4) |
Sep 15 2022 | 8 years fee payment window open |
Mar 15 2023 | 6 months grace period start (w surcharge) |
Sep 15 2023 | patent expiry (for year 8) |
Sep 15 2025 | 2 years to revive unintentionally abandoned end. (for year 8) |
Sep 15 2026 | 12 years fee payment window open |
Mar 15 2027 | 6 months grace period start (w surcharge) |
Sep 15 2027 | patent expiry (for year 12) |
Sep 15 2029 | 2 years to revive unintentionally abandoned end. (for year 12) |