The present invention relates to a method and apparatus utilized in a wireless communications system, and more particularly, to a method and apparatus of capturing an image in a transmitter in a wireless communication system.
Wireless Fidelity (Wi-Fi) Display specification is a standard for a Wi-Fi technology and used in a latency-aware application for streaming in a short distance. In the Wi-Fi Display application, a connection is established between a source device and a sink device. The source device encodes video contents into encoded video bit streams and sends the encoded video bit streams to the sink device. The sink device further decodes the received video bit streams and recovers to the video contents. Therefore, a user can watch the video contents via a suitable display of the sink device for the user's purpose than a display of the source device. For example, a user shares a video from a notebook computer to a large screen television so that people can comfortably watch the video on the television together. In this scenario, the notebook computer is the source device and the television is the sink device (assuming the television supports Wi-Fi Display specifications), and the source device transmits video contents to the sink device for playback on a display of the sink device.
In order to encode video contents into encoded video bit streams and send the encoded video bit streams to the sink device, the source device should use an external graphic card to capture the video content and perform the relevant operations. Besides, the source device duplicates the encoded video bit streams to show the video contents in the source device and the sink device simultaneously.
Therefore, how to accurately perform the abovementioned operations in the source device and further speed up the display in the sink device is a goal in the industry.
The present invention therefore provides a method and apparatus for capturing an image in a transmitter of a wireless communications system, to enhance display performance in a receiver of the wireless communications system.
A method for capturing an image in a transmitter of a wireless communications system is disclosed. The method comprises controlling a graphic processing unit (GPU) of a graphic card to move frames corresponding to the image from a graphic card frame buffer to a buffer which is accessible by a central processing unit (CPU) of the transmitter when a specified condition is detected; controlling the GPU to release a control for the frames to the CPU; encoding the frames in the buffer which is accessible by the CPU; and transmitting the encoded frames to a receiver of the wireless communications system; wherein the graphic card is connected to the transmitter.
A communication apparatus for a wireless communications system is disclosed. The communication apparatus comprises a processing means; a storage unit; and a program code, stored in the storage unit, wherein the program code instructs the processing means to execute the following steps: controlling a graphic processing unit (GPU) of a graphic card to move frames corresponding to the image from a graphic card frame buffer to a buffer which is accessible by the processing means when a specified condition is detected; controlling the GPU to release a control for the frames to the processing means; controlling an encoding unit to encode the frames in the buffer which is accessible by the processing means; and controlling a communication interfacing module to transmit the encoded frames to a receiver of the wireless communications system; wherein the graphic card is connected to the communication apparatus.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Please refer to
Please refer to
Step 200: Start.
Step 202: Control a graphic processing unit (GPU) of a graphic card to move frames corresponding to the image from a graphic card frame buffer to a buffer which is accessible by the processing means 104 when a specified condition is detected.
Step 204: Control the GPU to release a control for the frames to the processing means 104.
Step 206: Control an encoding unit to encode the frames.
Step 208: Control the communication interfacing module 108 to transmit the encoded frames to the second communication apparatus 102.
Step 210: End.
According to the process 20, the first communication apparatus 100 controls the GPU to move the frames to the buffer which can be accessible by the processing means 104 and release the control for the frames to the processing means 104, so that the processing means 104 can take replace of the GPU to perform relevant operations for the frames in the application layer. Therefore, the speed of display operation in the second communication apparatus 102 is increased.
In Steps 202 and 204, the first communication apparatus 100 may use an application programming interface with a graphic programming language to access the GPU graphic card and control the GPU to move the frames to the buffer which can be accessible by the processing means 104 and release the control for the frames to the processing means 104, wherein the graphic card may be externally connected to the first communication apparatus 100. Besides, in Step 206, since the GPU releases a control for the frames to the processing means 104, the processing means 104 can control the following operations for the frames, such as encoding operation. In Step 208, the first communication apparatus 100 transmits the encoded frames to the second communication apparatus 102 via the communication interfacing module 108, so that the second communication apparatus 102 can display the image.
In brief, since the processing means 104 cannot directly access the graphic card frame buffer, the processing means 104 is allowed to handle the frames via the moving and releasing operations of the GPU. Therefore, the first communication apparatus 100 performs relevant operations for the frames in the application layer so as to speed up the display operations of the second communication apparatus 102.
Note that, the process 20 is an example of the present invention, and those skilled in the art should readily make combinations, modifications and/or alterations on the abovementioned description and examples. For example, the application programming interface may be any programming interface capable of accessing the graphic card, such as Microsoft DirectX 11 or its updated version. The graphic programming language may be high level shader language (HLSL). Besides, the encoding unit is included in the first communication apparatus 100 and may be Intel H.264 encoder. In addition, the specified condition may be that the image changes or the image displays over a specific time. The specific time may be a pre-defined value. In other words, when the image being shown in a display of the first communication apparatus 100 or the second communication apparatus 102 is changed or the displaying operation of the image lasts over the specific time, the processing means 104 starts to control the GPU to move the frames from the graphic card frame buffer to the buffer which is accessible by the processing means 104 and follows to handle the frames. In another aspect, the graphic card frame buffer and the buffer which is accessible by the processing means 104 may be two independent memories, i.e. the graphic card frame buffer is allocated in the graphic card and the buffer which is accessible by the processing means 104 is allocated in the first communication apparatus 100. The graphic card frame buffer and the buffer which is accessible by the processing means 104 may also share the same memory in the first communication apparatus 100, but not limited herein.
In the present invention, the first communication apparatus controls the GPU to move the frames to the buffer which can be accessible by the processing means and release the control for the frames to the processing means. In other words, the first communication apparatus is allowed to handle the frames in the application layer due to the moving and releasing operations of the GPU, so that the speed of display operation in the second communication apparatus is increased.
To sum up, the present invention provides a method and an apparatus for capturing image, to enhance the display performance.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
This application claims the benefit of U.S. Provisional Application No. 61/748,450, filed on Jan. 3, 2013, entitled “Miracast screen capture system and method, using High Level Shader Language and Direct X11”, the contents of which are incorporated herein in their entirety.
Number | Date | Country | |
---|---|---|---|
61748450 | Jan 2013 | US |