A kind of window images of digital television set-top box disposal route and system
Technical field
The present invention relates to the digital TV set-top box technology, relate in particular to a kind of window images of digital television set-top box disposal route and system.
Background technology
In recent years, the Digital Television develop rapidly, set-top box has entered huge numbers of families.Along with becoming increasingly abundant of digital television function, also have benefited from the develop rapidly of chip technology simultaneously, integrated more complicated graphics system has become inevitable on set-top box.At present, popular window system is only supported the cut out areas of rectangle mostly, and is for example shown in Figure 1, and the situation when being added on the window 11 for window 12 has the background of a rectangle, thereby influences the effect of whole interface; Be illustrated in figure 2 as the situation that does not have the rectangle background, as can be seen, display effect can be got well a lot.
Therefore, along with the continuous development of digital TV set-top box technology, complicated interface how to handle the digital TV set-top box window shows, demonstration problem such as irregularly shaped window, it is better to make that picture quality shows, makes product have more the market competitiveness, becomes problem anxious to be solved.
Summary of the invention
The object of the present invention is to provide a kind of image processing method and system of digital television roof window mouth, improve the display quality at TV set-top box complex window interface.
For solving technical matters of the present invention, the present invention discloses a kind of window images of digital television set-top box disposal route, wherein, comprising:
Create window and cover plate, create window after, set up the illiteracy plate that a size equates with the wide of window and height, the byte-sized of region of memory is that the wide height that multiply by of window is again divided by 8;
Set up one and cut out the district of cutting out that district's chained list is used to preserve window, each node of chained list all is one and covers plate that the start node of chained list is the copy that window covers plate;
Using stacked system to cover plate cuts out;
Draw window, window judges according to cutting out the value pointwise that district's chained list respectively covers the plate corresponding positions when drawing, and is to draw this point at 1 o'clock, is then not draw in 0 o'clock;
Wherein, by changing the value of covering the plate corresponding positions, can create the cut out areas of arbitrary shape.
More excellent, each binary digit correspondence of described illiteracy plate the pixel of window relevant position, and its value is 1 o'clock, represents that this pixel needs to show; Be 0 o'clock, this pixel does not need to show.
More excellent, also comprise: the volume bar of picture partly is set to 1, and the frame branch is set to 0.
More excellent, described use stacked system covers plate and cuts out and be specially:
After first window is cut out by second window, described illiteracy plate is divided into 5 parts, the illiteracy plate of described second window remains unchanged, wherein, first, second, third and fourth covers plate and inherits the value that former described first window covers the plate appropriate section, described the 5th illiteracy plate is that the value of described first window illiteracy plate appropriate section deducts the value that described second window covers plate, be that a lot of are cut out districts if first window or second window have been tailored, then first window each node of cutting out district's chained list all will be done above-mentioned computing with all nodes that second window be cut out district's chained list.
More excellent, the subtraction rule of described illiteracy plate is: have only when described first value of covering plate be 1 and described second value of covering plate when being 0, the value that the result covers plate just is 1; Other situations all are 0.
For solving technical matters of the present invention, the present invention also discloses a kind of window images of digital television set-top box treating apparatus, wherein, comprising:
Creation module is used to create window and covers plate, create window after, set up the illiteracy plate that a size equates with the wide of window and height, the byte-sized of region of memory is that the wide height that multiply by of window is again divided by 8; Set up one and cut out the district of cutting out that district's chained list is used to preserve window, each node of chained list all is one and covers plate that the start node of chained list is the copy that window covers plate;
Cut out module, be used to use stacked system to cover plate and cut out;
Drafting module is used to draw window, and window judges according to cutting out the value pointwise that district's chained list respectively covers the plate corresponding positions when drawing, and is to draw this point at 1 o'clock, is then not draw in 0 o'clock;
Wherein, by changing the value of covering the plate corresponding positions, can create the cut out areas of arbitrary shape.
More excellent, described creation module also is used to be provided with each binary digit correspondence of described illiteracy plate and the pixel of window relevant position, and its value is 1 o'clock, represents that this pixel needs to show; Be 0 o'clock, this pixel does not need to show; Window is set cuts out the copy that the start node of district's chained list is a window illiteracy plate;
More excellent, described creation module also is used for the volume bar of picture partly is set to 1, and the frame branch is set to 0.
More excellent, the described module of cutting out also is used for described illiteracy plate is divided into 5 parts, the illiteracy plate of described second window remains unchanged, wherein, first, second, third and fourth covers plate and inherits the value that former described first window covers the plate appropriate section, described the 5th illiteracy plate is that the value of described first window illiteracy plate appropriate section deducts the value that described second window covers plate, be that a lot of are cut out districts if first window or second window have been tailored, then first window each node of cutting out district's chained list all will be done above-mentioned computing with all nodes that second window be cut out district's chained list.
More excellent, the subtraction rule of described illiteracy plate is: have only when described first value of covering plate be 1 and described second value of covering plate when being 0, the value that the result covers plate just is 1; Other situations all are 0.
Compared with prior art, the present invention has following beneficial effect:
According to window images of digital television set-top box disposal route disclosed by the invention and system, cut out mechanism according to this kind window, can realize the demonstration of some the complicated shape windows in the set-top box application at an easy rate, as quiet, new mail prompting etc., with great universalization of the demonstration of these information and simplification, this programme supports the stack of multiwindow to show.
Description of drawings
Fig. 1 is the synoptic diagram of superimpose rectangles volume window on other interfaces of prior art;
Fig. 2 is superpose on other interfaces synoptic diagram of non-rectangle volume window of the embodiment of the invention;
Fig. 3 is the amplification effect figure of the volume video in window of the embodiment of the invention;
Fig. 4 cuts out the window stacking diagram for the embodiment of the invention;
Fig. 5 is the synoptic diagram behind the window cut out of the embodiment of the invention;
Fig. 6 is the synoptic diagram of the value of cutting out of the illiteracy plate 1 of the embodiment of the invention;
Fig. 7 is the synoptic diagram of the value of cutting out of the illiteracy plate 2 of the embodiment of the invention;
Fig. 8 is the illiteracy plate 1 of the embodiment of the invention and covers the result schematic diagram that plate 2 subtracts each other;
Fig. 9 is a kind of window images of digital television set-top box disposal system structural representation of the embodiment of the invention.
Embodiment
The present invention discloses a kind of window images of digital television set-top box disposal route and system, improves the display quality at TV set-top box complex window interface, and following embodiment is that example is elaborated with non-rectangle volume window just.
As described in Figure 2, be the superpose synoptic diagram of non-rectangle volume window of the embodiment of the invention on other interfaces, 21 comprise a non-rectangle volume window 22 in the viewing area.
As shown in Figure 3, be the amplification effect figure of volume video in window, comprise volume window 31 and volume bar 32, for realizing the non-rectangle display effect, a kind of window images of digital television set-top box disposal route of the embodiment of the invention can comprise the steps.
Step 1 is created window and is covered plate and initially cut out the district;
After creating window, set up the illiteracy plate (region of memory) that a size equates with the wide of window and height, the byte-sized of region of memory is that the wide height that multiply by of window is again divided by 8.This each binary digit correspondence of covering plate the pixel of window relevant position, and its value is 1 o'clock, represents that this pixel needs to show; Be 0 o'clock, this pixel does not need to show.By changing the value of covering the plate corresponding positions, can create the cut out areas of arbitrary shape.Corresponding to the volume window of Fig. 3, the volume bar part 32 of picture can be set to 1, framework part 31 is set to 0.Set up one and cut out district's chained list, the start node of chained list is the copy that this window covers plate.
Step 2 is used stacked system to cover plate and is cut out;
As described in Figure 4, for the embodiment of the invention cut out the window stacking diagram, cover the mode that plate cuts out and be: window 2 is added on the window 1.
After window 1 (or being referred to as first window) was cut out by window 2 (or being referred to as second window), it covered plate and is divided into 5 parts, and as shown in Figure 5, the illiteracy plate of window 2 remains unchanged.Wherein, illiteracy plate 1,2,3,4 (or being referred to as first, second, third, fourth illiteracy plate respectively) is inherited the value that parent window 1 covers the plate appropriate section, and illiteracy plate 5 (or being referred to as the 5th illiteracy plate) is that the value of window 1 illiteracy plate appropriate section deducts the value that window 2 covers plates.Be that a lot of are cut out districts if first window or second window have been tailored, then first window each node of cutting out district's chained list all will be done above-mentioned computing with all nodes that second window be cut out district's chained list.
For example, same size cover plate the subtraction rule can for:
A、1-0=1
B、1-1=0
C、0-1=0
D、0-0=0
But this rule simplified summary is: have only when the value of covering plate 1 be 1 and the value of covering plate 2 when being 0, the value that the result covers plate just is 1; Other situations all are 0.According to above-mentioned rule, the result that illiteracy plate 1 (Fig. 6) and illiteracy plate 2 (Fig. 7) subtract each other as shown in Figure 8.
Step 3 is drawn window
Window judges according to cutting out the value pointwise that district's chained list respectively covers the plate corresponding positions when drawing, and is to draw this point at 1 o'clock, is then not draw in 0 o'clock.
Accordingly, the present invention also discloses a kind of window images of digital television set-top box disposal system, as described in Figure 9, is the window images of digital television set-top box disposal system structural representation of the embodiment of the invention, comprise: creation module 41, cut out module 42 and draw mould 43.
Described creation module 41, being used to create window covers plate and cuts out district's chained list. after creating window, described creation module 41 also is used to set up a size and the wide of window and the high illiteracy plate (region of memory) that equates, the byte-sized of region of memory is that the wide height that multiply by of window the pixel of window relevant position divided by each binary digit correspondence of 8. these illiteracy plates again, its value is 1 o'clock, represents that this pixel needs to show; It is 0 o'clock, this pixel does not need to show. by changing the value of covering the plate corresponding positions, can create the cut out areas of arbitrary shape. corresponding to the volume window of Fig. 2, the volume bar part 32 of picture can be set to 1, framework part 31 is set to 0. and sets up one and cut out district's chained list, and the start node of chained list is the copy that this window covers plate;
The described module 42 of cutting out is used to use stacked system to cover plate and cuts out, and the mode that described illiteracy plate is cut out is: window 2 is added on the window 1.
After window 1 was cut out by window 2, the described module 42 of cutting out also was used for its illiteracy plate is divided into 5 parts, and as shown in Figure 5, the illiteracy plate of window 2 remains unchanged.Wherein, cover plate 1,2,3,4 and inherit the value that parent window 1 covers the plate appropriate section, covering plate 5 is that the value that window 1 covers the plate appropriate section deducts the value that window 2 covers plate.Be that a lot of are cut out districts if first window or second window have been tailored, then first window each node of cutting out district's chained list all will be done above-mentioned computing with all nodes that second window be cut out district's chained list.
For example, described cut out the 42 pairs of same sizes of module cover plate the subtraction rule can for:
A、1-0=1
B、1-1=0
C、0-1=0
D、0-0=0
But this rule simplified summary is: have only when the value of covering plate 1 be 1 and the value of covering plate 2 when being 0, the value that the result covers plate just is 1; Other situations all are 0.According to above-mentioned rule, the result that illiteracy plate 1 (Fig. 6) and illiteracy plate 2 (Fig. 7) subtract each other as shown in Figure 8.
Described drafting module 43 is used to draw window, and window judges according to cutting out the value pointwise that district's chained list respectively covers the plate corresponding positions when drawing, and is to draw this point at 1 o'clock, is then not draw in 0 o'clock.
In sum, according to window images of digital television set-top box disposal route disclosed by the invention and system, cut out mechanism according to this kind window, can realize the demonstration of some the complicated shape windows in the set-top box application at an easy rate, as quiet, new mail prompting etc., with great universalization of the demonstration of these information and simplification, this programme supports the stack of multiwindow to show.