CN103092578A - Displaying method under embedded Linux platform - Google Patents
Displaying method under embedded Linux platform Download PDFInfo
- Publication number
- CN103092578A CN103092578A CN2011103351190A CN201110335119A CN103092578A CN 103092578 A CN103092578 A CN 103092578A CN 2011103351190 A CN2011103351190 A CN 2011103351190A CN 201110335119 A CN201110335119 A CN 201110335119A CN 103092578 A CN103092578 A CN 103092578A
- Authority
- CN
- China
- Prior art keywords
- storage space
- video
- embedded linux
- display
- graph
- 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
Links
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The invention relates to a displaying method under an embedded Linux platform. The displaying method under the embedded Linux platform includes the steps of setting an outputting resolution rate of a display card; calculating size of a storage space for storing graphs and videos according to the resolution rate, a graph displaying format and a video displaying format; dividing the storage space into a graph level storage space and a video level storage space; configuring a register for the display card so as to separate the graph level storage space and the video level storage space; accessing the display card by a displaying entity of a user in an embedded Linux system, and reading and writing graph data from the graph level storage space and video data from the video level storage space. Via the displaying method under the embedded Linux platform, the graph level is separated from the video level, and displaying equipment at a user level can independently control every level, complexity of a system is greatly reduced, and stability and reliability are improved.
Description
Technical field
The present invention relates to the display packing of a kind of figure and video, be specifically related to the display packing under a kind of embedded Linux platform.
Background technology
Embedded Linux technology is efficient with it, stable and take the characteristics such as resource is few and be widely used in the fields such as consumer electronics, multimedia terminal.All the time, how graphic user interface (GUI) can be shown efficiently is the large weakness of one under embedded Linux platform.Traditional display packing is based on X Window system, as shown in Figure 1.X window adopts the Client/Server pattern, and bottom and input-output device drive into Serial Communication, as keyboard, mouse and video card; The middle layer is X Server, and it is the core of X window system, and the upper strata is X Client end one by one, can be an independently application program, as browser, can be also a shape library, such as Qt, GTK storehouse etc.X Client communicates by letter with X Server and follows the X11 agreement, and simply, X Server monitors the figure output request that X Client end sends over, and is responsible for completing corresponding operation, gives at last X Client end a response.
Because X window system is too huge and complicated, and be not suitable for being applied in embedded Linux system, although can carry out cutting to it, the cutting difficulty is not little, and stability also can't be guaranteed.In addition, X window system shows that owing to adopting C/S model go through extra copy cost, greatly reduces the real-time of demonstration.
Simultaneously, X window does not provide the separation mechanism of graph layer and video layer, application layer viewer is display graphics layer and video layer simultaneously, because occupied same storage space, when browser shows at sequential access storage space reading out data, video layer covers graph layer the preceding, and perhaps graph layer has covered video layer the preceding, is not namely " transparent ".But in the application of reality, the user often wishes mixed display video data and figure GUI, a kind of method that therefore needs graph layer and video layer to show when irrelevant disturbing each other.
Summary of the invention
In order to carry out efficiently the demonstration of figure and video under embedded Linux platform, the invention provides the display packing under a kind of embedded Linux platform, comprising:
The resolution of video card output is set;
According to described resolution, graph layer display format and video layer display format, calculate the size of the storage space that is used for storage figure and video;
Described storage space is divided into graph layer storage space and video layer storage space;
The register of configuration video card is so that can described graph layer storage space and the separating of described video layer storage space;
The display entity accessing display card of user in embedded Linux system is from described graph layer storage space read-write graph data, from described video layer storage space read-write video data.
Can obtain following useful technique effect after adopting the technical program:
1) get around X window system, greatly reduce the complicacy of system, increased Stability and dependability;
2) because the direct display entity by the user will show that data directly write in the buffer memory of video card, avoided the data copy of intermediate link, display performance and real-time greatly improve;
3) graphic entity and the video entity separation with video card comes, and user's display entity can independently be controlled graphic entity and video entity.
Description of drawings
Fig. 1 is the display packing of the employing X Window system of prior art.
Fig. 2 is the process flow diagram of the display packing under embedded Linux platform of the present invention.
Embodiment
On the whole, technical scheme of the present invention relates to the video card of embedded Linux kernel layer and display entity two parts of user.As shown in Figure 2, in embedded Linux system, calculate according to resolution, graph layer display format and the video layer display format of video card the storage size that is used for storage figure and video, alternatively, also can calculate storage space according to one that takes up room larger in two kinds of display formats.Graph layer display format and video layer display format can adopt same form.This storage space is divided into graph layer storage space and video layer storage space.These two storage spaces are not overlapping, and can be adjacency.The size of described graph layer storage space is set according to a shared byte of pixel of graph layer display format, and the size of described video layer storage space is set according to a shared byte of pixel of video layer display format.User's display entity accessing display card in embedded Linux system, from described graph layer storage space read-write graph data, from described video layer storage space read-write video data, also can be toward data writing in above-mentioned two storage spaces.
Take video card with frame buffer function as example, frame buffer is mapped to user's display entity, this display entity just can will show as the mode of writing internal memory that data are written in the frame buffer of video card, and perhaps reading out data shows from frame buffer.Simultaneously, revising the driving parameter of video card, relevant register is set, the graph layer of video card is separated with video layer, particularly, is that separately storage space is separated, and no longer takies one section identical storage space.After separation, the graph layer storage space is different from the start address of video layer storage space in frame buffer and can not be overlapping, for user's display entity, just can independently control output and the input of graph layer and the video layer of video card like this.
The below introduces the performing step of technical scheme of the present invention take the CPU of Intel Sandy Bridge platform i5-2300 as example (video card is integrated in CPU):
1) the resolution setting of video card output is set in the GRUB of video card start-up parameter, such as video=VGA-1:1280x1024@60;
2) setting in the previous GRUB of basis in kernel video driver parameter, calculate the spatial dimension of frame buffer, in the situation of 1280x1024 such as resolution, and there are graph layer and video layer, each pixel represents according to the ARGB form, take 4 bytes, the byte number that takies altogether of graph layer and video layer is: 1280x1024x4x2.If video layer adopts the YUYV form, the byte number that takies altogether of graph layer and video layer is 1280x1024x4+1280x1024x2.Then, adopt the ioremap_wc function that the video card video memory of big or small like this byte space is shone upon out, the virtual address that obtains is namely the first address of frame buffer;
3) related register of graph layer and video layer is set respectively, to enable graph layer and video layer, described related register comprises: initial address register, stride register, display format register (display format generally comprises ARGB and YUYV etc.) and key color register, so that graph layer and video layer are for can be " transparent " each other, particularly dynamic video layer data can be by the graph layer data cover, and can't show.
According to different manufacturer's chips, the register that arranges is also different, specifically need to configure according to the user manual of register, but ultimate principle is exactly to enable separating of graph layer storage space and video layer storage space, such as key color register in Intel i5-2300CPU is defined as:
Bit | Describe |
31∶24 | Keep the position |
23∶16 | The target fiducial value of R passage in the RGB passage |
15∶8 | The target fiducial value of G passage in the RGB passage |
7∶0 | The target fiducial value of B passage in the RGB passage |
In top register, the R channel value is a if arrange, and the G channel value is b, and the B channel value is c, so graph layer pixel point value for (a<<16|b<<8|c) to name a person for a particular job be transparent, namely its image of showing is the value of this position of video layer.
4) when above-mentioned register is set, for graph layer, select the display format of ARGB, and for video layer, the general YUYV form of selecting, so not only can avoid format conversion (because general output of decoding the storehouse is exactly the YV12 form), can also reduce the data volume of going in the storage space that need to copy video card to;
5) be that application entity creates "/dev/fb0 " device tree file at client layer;
6) user's application entity reads the parameter in the GRUB configuration file, utilize the mmap function that "/dev/fb0 " carried out memory-mapped, the address that obtains is namely the start address that frame buffer can be employed entities access, the size space is noted earlier consistent, i.e. graph layer storage space+video layer storage space.Graph layer storage space and video layer storage space are continuous, and start address so separately is:
Graph layer space start address=frame buffer start address;
Video layer space start address=frame buffer start address+graph layer space size.
User's display entity carries out respectively refreshing of graph data and video data according to the start address in graph layer space and video layer space.
So, like this for user's application entity, just can independently control figure and the video output of video card.
Above-described embodiment is used for the present invention that explains, rather than limits the invention, and in the protection domain of spirit of the present invention and claim, any modification and change to the present invention makes all fall into protection scope of the present invention.
Claims (8)
1. the display packing under an embedded Linux platform, is characterized in that, comprising:
The resolution of video card output is set;
According to described resolution, graph layer display format and video layer display format, calculate the size of the storage space that is used for storage figure and video;
Described storage space is divided into graph layer storage space and video layer storage space;
The register of configuration video card is so that can described graph layer storage space and the separating of described video layer storage space;
The display entity accessing display card of user in embedded Linux system is from described graph layer storage space read-write graph data, from described video layer storage space read-write video data.
2. the display packing under embedded Linux platform according to claim 1, is characterized in that,
The size of described graph layer storage space is set according to a shared byte of pixel of graph layer display format,
The size of described video layer storage space is set according to a shared byte of pixel of video layer display format.
3. the display packing under embedded Linux platform according to claim 1, is characterized in that, described graph layer storage space and described video layer storage space are adjacency.
4. the display packing under embedded Linux platform according to claim 1, is characterized in that, described storage space is arranged in the frame buffer of embedded Linux platform.
5. the display packing under embedded Linux platform according to claim 4, is characterized in that, adopts the ioremap_wc function that the described storage space of video card video memory is shone upon out, obtains the first address of frame buffer.
6. the display packing under embedded Linux platform according to claim 5, is characterized in that, utilizes the mmap function frame buffer to be mapped as user's the addressable start address of display entity.
7. the display packing under embedded Linux platform according to claim 1, is characterized in that, described graph layer display format is ARGB, and described video layer display format is YUYV.
8. the display packing under embedded Linux platform according to claim 1, is characterized in that, described register comprises: initial address register, stride register, display format register and key color register.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011103351190A CN103092578A (en) | 2011-10-28 | 2011-10-28 | Displaying method under embedded Linux platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011103351190A CN103092578A (en) | 2011-10-28 | 2011-10-28 | Displaying method under embedded Linux platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103092578A true CN103092578A (en) | 2013-05-08 |
Family
ID=48205195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011103351190A Pending CN103092578A (en) | 2011-10-28 | 2011-10-28 | Displaying method under embedded Linux platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103092578A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106155801A (en) * | 2015-03-27 | 2016-11-23 | 华为技术有限公司 | A kind of method of equipment transportation and resource management center |
CN109284151A (en) * | 2017-07-19 | 2019-01-29 | 龙芯中科技术有限公司 | Display methods, display device and readable storage medium storing program for executing |
CN112616083A (en) * | 2020-12-11 | 2021-04-06 | 湖南国科微电子股份有限公司 | Video display layer superposition processing method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0381651A2 (en) * | 1989-01-26 | 1990-08-08 | International Business Machines Corporation | Managing method and apparatus for data storage |
CN1501712A (en) * | 2002-11-12 | 2004-06-02 | 北京中视联数字系统有限公司 | A method for implementing graphics context hybrid display |
CN101488332A (en) * | 2009-01-06 | 2009-07-22 | 东莞康特尔电子有限公司 | Screen display accelerated mixing system and method based on WinCE system |
-
2011
- 2011-10-28 CN CN2011103351190A patent/CN103092578A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0381651A2 (en) * | 1989-01-26 | 1990-08-08 | International Business Machines Corporation | Managing method and apparatus for data storage |
CN1501712A (en) * | 2002-11-12 | 2004-06-02 | 北京中视联数字系统有限公司 | A method for implementing graphics context hybrid display |
CN101488332A (en) * | 2009-01-06 | 2009-07-22 | 东莞康特尔电子有限公司 | Screen display accelerated mixing system and method based on WinCE system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106155801A (en) * | 2015-03-27 | 2016-11-23 | 华为技术有限公司 | A kind of method of equipment transportation and resource management center |
CN106155801B (en) * | 2015-03-27 | 2019-06-28 | 华为技术有限公司 | A kind of method and resource management center of equipment transportation |
CN109284151A (en) * | 2017-07-19 | 2019-01-29 | 龙芯中科技术有限公司 | Display methods, display device and readable storage medium storing program for executing |
CN109284151B (en) * | 2017-07-19 | 2022-06-07 | 龙芯中科技术股份有限公司 | Display method, display device and readable storage medium |
CN112616083A (en) * | 2020-12-11 | 2021-04-06 | 湖南国科微电子股份有限公司 | Video display layer superposition processing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102073502B (en) | Method for rendering page frame by WEB primary layout and device thereof | |
CN109032722B (en) | Method, device, equipment and medium for updating display effect of UI component | |
CN105302550A (en) | Method and system for converting page into layout data stream file | |
CN107450897B (en) | Cross-platform migration method and device for graphic engine | |
CN105335445A (en) | Layout display method and device | |
CN110392904A (en) | The method to be remapped using the dynamic image color of alpha blended | |
CN104995622A (en) | Compositor support for graphics functions | |
CN109636885B (en) | Sequential frame animation production method and system for H5 page | |
CN111459501A (en) | SVG-based Web configuration picture storage and display system, method and medium | |
CN104111913B (en) | A kind of processing method and processing device of streaming document | |
US10311060B2 (en) | Glyph management in texture atlases | |
CN107636654A (en) | It is HTML content by generating instruction list by FLASH Content Transformations | |
CN103092578A (en) | Displaying method under embedded Linux platform | |
CN103049430A (en) | Page display method based on IDF (interactive document format) files | |
US10496735B2 (en) | Object interaction preservation from design to digital publication | |
US20150310833A1 (en) | Displaying Hardware Accelerated Video on X Window Systems | |
CN104915198B (en) | A kind of flexibly SCADA host computer man-machine interfaces of definition and layout and content | |
CN107391175A (en) | Control data collocation method and computer-readable recording medium | |
US10529100B2 (en) | Interaction-driven format for graph visualization | |
CN102253841B (en) | Small-scale graphical user interface system | |
US20170031657A1 (en) | Unified modeling language (uml) analysis system and method | |
US20160014348A1 (en) | Optimized Algorithm for Construction of Composite Video from a Set of Discrete Video Sources | |
CN115691772A (en) | Operation visualization system and corresponding computer device and storage medium | |
EP2761396A1 (en) | Displaying hardware accelerated video on x window systems | |
CN102902534A (en) | Transparent OSD (Optical Scanning Device) software realization method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130508 |