WO2013120331A1 - 屏幕内容的显示方法及装置 - Google Patents

屏幕内容的显示方法及装置 Download PDF

Info

Publication number
WO2013120331A1
WO2013120331A1 PCT/CN2012/076783 CN2012076783W WO2013120331A1 WO 2013120331 A1 WO2013120331 A1 WO 2013120331A1 CN 2012076783 W CN2012076783 W CN 2012076783W WO 2013120331 A1 WO2013120331 A1 WO 2013120331A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
layer
transparency
value
format
Prior art date
Application number
PCT/CN2012/076783
Other languages
English (en)
French (fr)
Inventor
童龙仓
陈有鑫
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013120331A1 publication Critical patent/WO2013120331A1/zh

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2310/00Command of the display device
    • G09G2310/04Partial updating of the display screen
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/10Mixing of images, i.e. displayed pixel being the result of an operation, e.g. adding, on the corresponding input pixels

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for displaying screen content.
  • BACKGROUND With the development of electronic technologies and software technologies, the popularity of mobile terminal devices such as mobile phones, MP4s, and tablet computers is increasing, and people are increasingly paying attention to their multimedia processing capabilities and screens when selecting these devices. display effect. Smooth HD video playback and a versatile User Interface (UI) special effects display is an important factor in attracting customers' attention and inspiring customers' desire to buy. Multimedia playback and UI effects must be multi-layer overlay of On-Screen Display (OSD). OSD is actually a method and technology for simultaneously displaying multiple layers on the screen. It is alpha blending.
  • OSD On-Screen Display
  • the above application scenario needs to display the user interface and the video data on the screen at the same time, and the user interface can be defined as a graphic layer, and the video data is defined as a video layer.
  • the graphics layer may be data that has been alpha blended.
  • Alpha blending requires the graphics layer to be alpha color transparency (Alpha, Red, Green, Blue, abbreviated as ARGB) data
  • video layer data can be luminance chromatic aberration (YUV), ARGB, red, green, blue (Red, Green, blue, A variety of data formats such as RGB) format.
  • the above OSD process requires two steps of traversing the pixels of the graphics layer to perform alpha transparency configuration and alpha blending respectively, so that the process requires a large amount of data calculation.
  • the processor technology has made great progress, in the embedded environment, the Central Processing Unit (CPU) and memory are still scarce resources, and the cost of upgrading it from the hardware point of view is relatively expensive, plus Power has always been the bottleneck of embedded devices, so a good OSD hybrid algorithm is crucial both from the perspective of reducing the amount of computation or from the standpoint of extending the standby time of the power supply.
  • an effective solution has not been proposed yet.
  • Embodiments of the present invention provide a method and an apparatus for displaying screen content, so as to at least solve the problem of a large amount of calculation in the display process of screen content in the related art.
  • a method for displaying screen content comprising: receiving an update instruction sent by a user, determining an update area according to the update instruction; reading pixel points in the update area one by one, wherein The upper layer of the pixel is a graphics layer, and the lower layer is a video layer; for each pixel to be read, the transparency of the graphics layer of the pixel is configured according to the pixel value of the graphics layer of the pixel, and the value of the transparency is When it is greater than 0, and less than 255, the pixel value of the video layer of the pixel is mixed with the pixel value of the graphic layer, and the mixed result is stored in a corresponding position of the buffer; the buffer is displayed on the screen.
  • Mixing the pixel value of the video layer of the pixel and the pixel value of the graphic layer may include: determining whether the format of the video layer of the pixel is the same as the format of the graphic layer; if not, the video layer of the pixel
  • the format is converted into the same format as the above graphic layer, wherein the format of the graphic layer is a red, green and blue RGB color format or a luminance color difference YUV format; and then the pixel of the video layer of the pixel is compared according to the format of the converted video layer.
  • the value is mixed with the pixel values of the above graphics layer.
  • Determining the update area according to the update instruction may include: determining that the update area is a video layer update area when the update instruction is a video layer update instruction; and determining that the update area is a graphics layer update area when the update instruction is a graphics layer update instruction.
  • the method may further include: determining whether the updated region is the video layer update region; and if yes, determining whether the value of the transparency is 0.
  • the format of the video layer of the above pixel is converted into a specified output format, and the pixel value of the converted video layer of the pixel is stored to the corresponding position of the buffer;
  • the value of the transparency is 255, and the pixel value of the graphic layer of the above pixel is stored in the corresponding position of the buffer area.
  • the method may further include: determining whether the updated region is a graphics layer update region; if yes, determining whether the value of the transparency is 0 or 255 ; If the value of the transparency is 0, the pixel value of the video layer of the pixel is stored in the corresponding position of the buffer; if the value of the transparency is 255, the pixel value of the graphic layer of the pixel is stored in the above The corresponding location of the buffer area.
  • the method may further include: setting a correspondence table between the pixel value and the transparency; and configuring the pixel according to the pixel value of the graphic layer of the pixel point, before the transparency of the graphic layer of the pixel is configured according to the pixel value of the graphic layer of the pixel
  • the transparency of the graphic layer of the dot includes: reading a pixel value of the graphic layer of the pixel, and querying, in the correspondence table, the transparency of the graphic layer corresponding to the pixel value of the graphic layer, and configuring the transparency configured by the query Give the above pixels.
  • the above mixing may be alpha blending.
  • a display device for screen content comprising: an update area determining module configured to receive an update instruction sent by a user, determining an update area according to the update instruction; and a pixel value mixing module , configured to read the pixel points in the update area one by one, wherein the upper layer of the pixel is a graphics layer, and the lower layer is a video layer; for each pixel to be read, according to a pixel value of the graphics layer of the pixel The transparency of the graphic layer of the pixel, and when the value of the transparency is greater than 0 and less than 255, the pixel value of the video layer of the pixel is mixed with the pixel value of the graphic layer; and the storage module is configured to The mixed result of the pixel value mixing module is stored in a corresponding position of the buffer area; and the pixel value display module is configured to display the pixel value stored in the buffer area on the screen.
  • the pixel value mixing module may include: a format determining unit configured to determine whether a format of a video layer of the pixel is the same as a format of the graphic layer; and a conversion unit configured to be in a case where the determination result of the format determining unit is negative Converting a format of the video layer of the pixel to the same format as the graphic layer, wherein the format of the graphic layer is a red, green, blue, or RGB color format or a luminance color difference YUV format; and the mixing unit is configured to convert according to the conversion unit The format of the video layer is mixed with the pixel value of the video layer of the pixel and the pixel value of the graphics layer.
  • the update area determining module may include: a video layer update area determining unit, configured to: when the update instruction is a video layer update instruction, determine that the update area is a video layer update area; and the graphics layer update area determining unit is configured to be the update instruction When updating the instructions for the graphics layer, determine the update area as the graphics layer update area.
  • the pixel value mixing module may further include: a first area determining unit configured to determine whether the updated area is the video layer update area; and the first transparency determining unit is configured to determine that the first area determining unit is yes In the case of determining whether the value of the transparency is 0 or 255; the first storage unit is configured to convert the format of the video layer of the pixel to a specified output format when the value of the transparency is 0, and convert the converted The pixel value of the video layer of the pixel is stored in the corresponding position of the buffer area; the second storage unit is configured to store the pixel value of the graphic layer of the pixel to the buffer area when the value of the transparency is 255. Corresponding location.
  • the pixel value mixing module may further include: a second area determining unit configured to determine whether the updated area is the graphic layer update area; and the second transparency determining unit is configured to determine that the second area determining unit is yes
  • the third storage unit is configured to store the pixel value of the video layer of the pixel to the corresponding position of the buffer area when the value of the transparency is 0
  • the four storage unit is configured to store the pixel value of the graphic layer of the pixel point to a corresponding position of the buffer area when the value of the transparency is 255.
  • the device may further include: a correspondence relationship setting module, configured to set a correspondence table between the pixel value and the transparency;
  • the pixel value mixing module includes: a transparency configuration unit, configured to read a pixel value of the graphic layer of the pixel, The transparency of the graphic layer corresponding to the pixel value of the graphic layer is queried in the correspondence table, and the queried transparency is configured to the pixel.
  • the update area is determined according to the received update instruction, and then the pixel points in the update area are read one by one, and for each read pixel point, the transparency of the graphic layer of the pixel point is configured, and in the transparency
  • the pixel value of the video layer of the pixel is mixed with the pixel value of the graphic layer, and the mixed result is stored in the corresponding position of the buffer, and then the cache is displayed on the screen.
  • the pixel value stored in the area solves the problem of large calculation amount in the display process of the screen content in the related art, thereby simplifying the calculation process, reducing the power consumption of the device, and improving the user experience.
  • FIG. 1 is a flowchart of a method for displaying screen content according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a screen content display method of a terminal device according to an embodiment of the present invention
  • FIG. 3 is a flowchart according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing a specific structure of a display device for screen content according to an embodiment of the present invention.
  • FIG. 5 is a block diagram showing another structure of a display device for screen content according to an embodiment of the present invention.
  • BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
  • an embodiment of the present invention provides a method and a device for displaying screen content, which can complete the display of the screen content by traversing the pixel points at a time, which will be described in detail below through embodiments.
  • the embodiment provides a method for displaying the content of the screen, and the method can be implemented on the terminal device, as shown in the flowchart of the method for displaying the content of the screen shown in FIG. 1 , the method includes the following steps (step S102 - step S108 ): S102:
  • the terminal device receives an update instruction sent by the user, and determines an update area according to the update instruction.
  • Step S104 The terminal device reads the pixel in the update area one by one, where the upper layer of the pixel is a graphics layer, and the lower layer is a video layer.
  • Step S106 For each pixel that is read, the terminal device configures the transparency of the graphic layer of the pixel according to the pixel value of the graphic layer of the pixel, and when the value of the transparency is greater than 0 and less than 255, The pixel value of the video layer of the pixel is mixed with the pixel value of the graphic layer, and the mixed result is stored in a corresponding position of the buffer area;
  • Step S108 the terminal device displays the pixel value stored in the buffer area on the screen. .
  • the update area is determined according to the received update instruction, and then the pixel points in the update area are read one by one, and for each read pixel point, the transparency of the graphic layer of the pixel point is configured, and in the transparency
  • the pixel value of the video layer of the pixel is mixed with the pixel value of the graphic layer, and the mixed result is stored in the corresponding position of the buffer, and then the cache is displayed on the screen.
  • the pixel value stored in the area solves the problem of large calculation amount in the display process of the screen content in the related art, thereby simplifying the calculation process, reducing the power consumption of the device, and improving the user experience.
  • the terminal device initializes related resources of the OSD processing, switches the swipe mode to the OSD mode, and then receives an update instruction sent by the user, and determines the update instruction. And determining, according to the update instruction, an update area, when the update instruction is a video layer update instruction, determining that the update area is a video layer update area, and when the update instruction is a graphics layer update instruction, determining that the update area is a graphics layer update area.
  • This method can directly and accurately determine the update area, and facilitate subsequent operations on the pixels in the update area.
  • the terminal device After determining the update area, the terminal device reads the pixel points in the update area one by one, and then the terminal device operates on each read pixel point, and then configures the pixel point according to the pixel value of the graphic layer of the pixel point.
  • the transparency of the graphics layer can be implemented by searching the correspondence table between the pixel values and the transparency. Therefore, the embodiment provides a preferred embodiment, that is, configuring the pixel points according to the pixel values of the graphics layer of the pixel points. Before the transparency of the graphics layer, set the correspondence table between pixel values and transparency.
  • the pixel value of the graphic layer of the pixel point may be read first, and the transparency of the graphic layer corresponding to the pixel value of the graphic layer is queried in the corresponding relation table, and the transparency of the query is configured to the pixel point.
  • This method is simple and easy to operate, and can improve calculation efficiency.
  • the above transparency can have three values: the value of transparency is greater than 0 and less than 255 (ie partially transparent), the value of transparency is 0 (ie, full transparency), and the value of transparency is 255 (ie, impervious).
  • the update area is the video layer update area or the graphics layer update area
  • the subsequent operations are the same, that is, the terminal device sets the pixel value of the video layer of the above pixel and the above
  • the pixel values of the graphics layer are mixed.
  • the mixing operation it is necessary to first determine that the video layer and the graphics layer have the same format.
  • the user interface is generally in RGB format.
  • OSD swipe display it is necessary to convert RGB data into a graphics layer of ARGB format, and at the same time, configure transparency for each pixel of the graphics layer, and then perform a mixing operation.
  • the format of the video layer and the graphics layer may be RGB or YUV occupying a small byte, which can reduce the graphics layer buffer of an ARGB format, and the memory usage is reduced to about half of the common mode, and the video
  • the same format of the layer and graphics layer ensures that subsequent pixel value blending is completed.
  • the terminal device Converting the format of the video layer of the pixel to the same format as the graphics layer, wherein the format of the graphics layer may be RGB or YUV, and then the pixel value and graphics of the video layer of the above pixel according to the format of the converted video layer
  • the pixel values of the layers are mixed, and the mixing operation can be alpha blending.
  • the mixed result is stored in the corresponding location of the buffer (Buffer).
  • Buffer the buffer
  • the update area is the video layer update area
  • the format of the video layer of the pixel is first converted to the output format supported by the terminal device, and then the pixel value of the video layer of the converted pixel is stored.
  • this embodiment provides a preferred implementation manner, first determining whether the update area is a video layer update area, and if so, determining the value of the transparency. Whether it is 0 or 255, if the value of transparency is 0, the format of the video layer of the pixel is converted to the specified output format, and the pixel value of the video layer of the converted pixel is stored to the corresponding position of the buffer; if transparency The value of 255 stores the pixel value of the graphics layer of the pixel to the corresponding location in the buffer.
  • the update area is the graphics layer update area
  • the video layer is not updated at this time, and the format should also be the output format supported by the terminal device, and the pixel value of the video layer of the pixel is stored in the buffer area.
  • This method only operates on the determined update area, which reduces the amount of calculation and is simple and easy to implement.
  • this embodiment provides a preferred implementation manner, first determining whether the update area is a graphics layer update area, and if so, determining the value of the transparency.
  • the pixel value of the video layer of the pixel is stored to the corresponding position of the buffer; if the value of the transparency is 255, the pixel value of the graphic layer of the pixel is stored to the buffer Corresponding location.
  • the above process is performed on a pixel that is read in the update area. After the above operation is performed on one pixel, the above operation is performed on the next pixel until all the pixels in the update area are traversed. Then, the pixel values stored in the buffer area are displayed on the screen, and finally the related resources processed by the OSD are released, and the OSD mode is switched to the normal mode.
  • the above process achieves a traversal of the pixel points, reducing the calculation
  • the three values of transparency can be distinguished by the concept of key colors, which are color values that need to be fully transparent or partially transparent in the graphics layer. Therefore, it can be determined whether the pixel value of the graphic layer of the pixel is a key color, and if it is a key color, it indicates that the transparency of the pixel is 0 or greater than 0 and less than 255, so that subsequent operations can be performed accordingly, if not, Indicates that the transparency of the pixel is 255, and the subsequent operations can be performed accordingly.
  • key colors are color values that need to be fully transparent or partially transparent in the graphics layer. Therefore, it can be determined whether the pixel value of the graphic layer of the pixel is a key color, and if it is a key color, it indicates that the transparency of the pixel is 0 or greater than 0 and less than 255, so that subsequent operations can be performed accordingly, if not, Indicates that the transparency of the pixel is 255, and the subsequent operations can be performed accordingly.
  • Embodiment 1 2 is a flowchart of a screen content display method of a terminal device according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps (step S202 - step S230): Step S202, an initialization process. Initialize the relevant resources processed by the OSD, apply for the buffer area, and switch the screen mode to the OSD mode. Step S204, a message processing process. Determining the received message, if receiving the video layer update instruction, executing step S206, if receiving the graphics layer update instruction, executing step S228, if receiving the message request to end the OSD, switching the OSD mode to the normal mode. Step S206, reading pixel points in the video layer update area one by one.
  • Step S208 determining whether the pixel point is a key color according to a pixel value of the graphic layer of the pixel, and if yes, executing step S212, and if not, performing step S210.
  • Step S210 if a pixel of the graphics layer in the update area is not a key color, the value of the transparency should be 255 (ie, impervious), and the graphics layer is not updated, and the pixel value of the graphics layer of the pixel is stored in the cache. The corresponding position of the area is then executed in step S226.
  • step S212 if a pixel of the graphics layer in the update area is a key color, it is determined whether the value of the transparency is 0. If the value of the transparency is 0, step S214 is performed.
  • step S220 is performed.
  • step S214 the value of the transparency corresponding to the pixel is 0 (that is, full transparency), and it is determined whether the format of the video layer of the pixel meets the format supported by the terminal device, and if it is satisfied, the format conversion is not required, and step S218 is performed, if not satisfied.
  • step S216 is performed. Step S216, converting the format of the video layer of the pixel to the output format supported by the video device, and assuming that the format of the video layer of the pixel (such as YUV) needs to be converted into a specified output format (such as RGB), the conversion formula is as follows :
  • Step S2108 after the format conversion is completed, the pixel value of the video layer of the converted pixel is stored to the corresponding position of the buffer area, and then step S226 is performed.
  • step S220 the value of the transparency corresponding to the pixel is greater than 0 and less than 255.
  • the format of the video layer of the pixel is determined to be the same as the format of the graphics layer. If they are the same, step S224 is performed. If not, step S222 is performed. Step S222, converting the format of the video layer of the pixel to the same format as the graphic layer, for example, converting YUV to RGB.
  • the conversion formula has been described above, and details are not described herein again.
  • Step S224 performing a mixing operation (such as alpha blending) on the pixel value of the video layer of the pixel and the pixel value of the graphic layer according to the format of the converted video layer, and the calculation method of the mixing operation is as follows:
  • Step S226 displaying the pixel values buffered in the buffer area on the screen, and then performing step S230.
  • Step S230 releasing related resources in the OSD processing, and switching the OSD mode to the normal mode.
  • the embodiment provides a display device for screen content, which is used to implement the above embodiment.
  • the 3 is a structural block diagram of a display device for screen content according to an embodiment of the present invention.
  • the device includes: an update region determining module 30, a pixel value mixing module 32, a storage module 34, and a pixel value display module 36.
  • the update area determining module 30 is configured to receive an update instruction sent by the user, and determine an update area according to the update instruction.
  • the pixel value mixing module 32 is connected to the update area determining module 30, and is configured to read the update area determining module 30 to determine one by one.
  • the graphics layer of the pixel is configured according to a pixel value of the graphics layer of the pixel Transparency, and when the value of the transparency is greater than 0 and less than 255, the pixel value of the video layer of the pixel is mixed with the pixel value of the graphics layer;
  • the storage module 34 is connected to the pixel value mixing module 32, and is configured to store the result of mixing the pixel value mixing module 32 to a corresponding position of the buffer area;
  • the pixel value display module 36 is connected to the storage module 34, and is set to be on the screen. The pixel values stored in the above buffer area are displayed.
  • the update area determining module 30 determines the update area according to the received update instruction, and then the pixel value mixing module 32 reads the pixel points in the update area one by one, and configures the pixel point for each read pixel point.
  • the pixel value display module 36 displays the pixel value stored in the buffer area by the storage module 34 on the screen, which solves the problem of large calculation amount in the display process of the screen content in the related art, thereby simplifying the calculation process and reducing the calculation process.
  • the device power consumption improves the user experience.
  • the terminal device Before the update region determining module 30 receives the update command sent by the user, the terminal device initializes the related resources processed by the OSD, switches the swipe mode to the OSD mode, and then receives the update command sent by the user, and determines the update region according to the update command. Therefore, the embodiment provides a preferred embodiment.
  • the update area determining module 30 may further include: a video layer update area determining unit, configured to determine that the update area is a video layer update when the update command is a video layer update command.
  • a graphics layer update area determining unit is configured to determine that the update area is a graphics layer update area when the update instruction is a graphics layer update instruction. This method can directly and accurately determine the update area, and facilitate subsequent operations on the pixels in the update area.
  • the pixel value mixing module 32 reads the pixel points in the update region one by one, and then the terminal device operates on each read pixel point, and then according to the graphic layer of the pixel point.
  • the pixel value is configured to configure the transparency of the graphic layer of the pixel, and the configuration process can be implemented by searching a correspondence table between the pixel value and the transparency.
  • the embodiment provides a preferred embodiment, and the device may further include:
  • the relationship table setting module is configured to set a correspondence table between the pixel value and the transparency;
  • the pixel value mixing module 32 includes: a transparency configuration unit, configured to read a pixel value of the graphic layer of the pixel, and query in the correspondence table
  • the transparency of the graphic layer corresponding to the pixel value of the graphic layer is configured to allocate the above-mentioned transparency to the pixel.
  • This method is simple and easy to operate.
  • the three values of transparency have been introduced. In different update areas (such as video update area or graphic update area), when the values of transparency are different, the corresponding operations are different.
  • FIG. 4 is a block diagram showing a specific structure of a display device for screen content according to an embodiment of the present invention.
  • the display device for screen content includes the pixel value mixing mode in addition to the modules shown in FIG.
  • Block 32 also includes: format determination unit 320, conversion unit 322, and mixing unit 324. The structure will be described below.
  • the format determining unit 320 is configured to determine whether the format of the video layer of the pixel is the same as the format of the graphics layer; the converting unit 322 is connected to the format determining unit 320, and is set to be in the case that the determination result of the format determining unit 320 is NO.
  • the format of the video layer of the above pixel is converted into the same format as the graphic layer, wherein the format of the graphic layer may be RGB or YUV;
  • the mixing unit 324 is connected to the converting unit 322, and is configured to be converted according to the converting unit 322.
  • the format of the video layer mixes the pixel values of the video layer of the above pixel and the pixel value of the graphics layer.
  • the pixel value mixing module 32 may further include: a first area determining unit, configured to determine whether the update area is a video layer update area;
  • the transparency determining unit is configured to determine whether the value of the transparency is 0 or 255 if the determination result of the first region determining unit is YES;
  • the first storage unit is set to set the pixel when the value of the transparency is 0 Converting the format of the video layer of the dot to the specified output format, and storing the pixel value of the converted video layer of the pixel to the corresponding position of the buffer;
  • the second storage unit is set to have a value of 255 when the transparency is 255.
  • the pixel value mixing module 32 may further include: a second area determining unit, configured to determine whether the update area is a graphics layer update area;
  • the transparency determining unit is configured to determine whether the value of the transparency is 0 or 255 when the determination result of the second region determining unit is YES; and the third storage unit is set to set the pixel when the value of the transparency is 0.
  • the pixel value of the video layer of the dot is stored in the corresponding position of the buffer area; and the fourth storage unit is configured to store the pixel value of the graphic layer of the pixel point to the corresponding position of the buffer area when the value of the transparency is 255.
  • the operation process of the display device of the above screen content is an operation performed on a read pixel point in the update area. After the above operation is performed on one pixel point, the above operation is performed on the next pixel point until the traversal is completed. Update all the pixels in the area, then display the pixel values stored in the buffer on the screen, and finally release the relevant resources processed by the OSD, and switch the OSD mode to the normal mode. The above process achieves a traversal of the pixel points, reducing the amount of calculation.
  • the three values of transparency can be distinguished by the concept of key color.
  • the subsequent operation can be performed according to whether the pixel value of the graphic layer of the pixel is a key color. This has been described above and will not be described here.
  • 5 is another structural block diagram of a display device for screen content according to an embodiment of the present invention. As shown in FIG. 5, the device includes a video layer data generating module 50, a graphic layer data generating module 52, an OSD processing module 54, and a brush. Screen display module 56.
  • the structure will be described below.
  • the video layer data generating module 50 is configured to generate video layer data (ie, a video layer update command).
  • the module is a virtual module.
  • the module can be used by the video decoding output module of the video playback service, or by the video capture output module of the camera or camera module, or by the video playback service, video recording.
  • the video data acquisition processing module of the preview/service service acts as a module that processes the video data output from a video source such as a decoder or a camera into a specific video data format and a specified width and height according to an output requirement, and provides the OSD processing module.
  • 54 as a video layer data source.
  • the graphics layer data generation module 52 is configured to generate graphics layer data (ie, graphics layer update instructions).
  • the module is also a virtual module.
  • the module can be played by the user interface interaction module, which provides the interface information of the user interface icons, menus, buttons, texts, etc. to the OSD processing module according to the output requirements, and also A corresponding table of key colors and alpha transparency to be provided to the OSD processing module for the OSD module to obtain alpha transparency based on key colors during alpha blending.
  • the function of the OSD processing module 54 is equivalent to the pixel value mixing module 32 and the storage module 34 of FIG. 3 described above, which is responsible for alpha transparency configuration, color system conversion, and alpha blending of image data of the graphics layer when performing OSD processing operations.
  • the module queries whether the pixels of the graphics layer are key colors according to the data sent by the graphics layer data generation module.
  • the pixel is directly copied to the corresponding position of the output Buffer, if it is a key color.
  • the corresponding transparency is queried from the table, and then the format of the corresponding pixel point of the video layer is converted into the RGB color system.
  • the corresponding pixel points of the graphic layer and the video layer are alpha blended, and the mixed result is stored in the output Buffer. Corresponding location.
  • the module After determining the graphics layer update area or the video layer update area, the module performs color conversion according to the key color, performs alpha blending, and then supplies the processed data to the screen display module 56 for display; the function of the screen display module 56 Corresponding to the pixel value display module 36 in FIG.
  • the module is responsible for refreshing and displaying the image data processed by the OSD to the display screen of the portable terminal.
  • the display method of the screen content provided by the present invention performs the alpha transparency configuration and the alpha blending according to the pixel value of the graphics layer, and the OSD processing can be completed by traversing the pixel points in the update region at one time. It can reduce the graphics layer buffer in ARGB format, reduce the memory footprint to about half of the common mode, and reduce the calculation amount of alpha blending, reduce the cost, reduce the power consumption, improve the user response, and support the method.
  • the multi-transparency setting of the graphics layer is of great value in improving the screen display effect, improving the user experience, and reducing the power consumption of the device.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种屏幕内容的显示方法及装置。其中,该方法包括:接收用户发送的更新指令,根据该更新指令确定更新区域;逐个读取上述更新区域内的像素点,其中,该像素点的上层为图形层,下层为视频层;对于每个读取的像素点,根据该像素点的图形层的像素值配置该像素点的图形层的透明度,并在该透明度的值大于0,且小于255时,将上述像素点的视频层的像素值和上述图形层的像素值进行混合,并将混合后的结果存储到缓存区的对应位置;在屏幕上显示该缓存区中存储的像素值。通过本发明,解决了相关技术中屏幕内容的显示过程中计算量较大的问题,从而简化了计算过程,降低了设备功耗,提升了用户体验。

Description

屏幕内容的显示方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种屏幕内容的显示方法及装置。 背景技术 随着电子技术与软件技术的发展, 手机、 MP4、 平板电脑等便携式终端设备的普 及程度越来越高, 人们在选择这些设备的时候, 也越来越看重它们的多媒体处理能力 和屏幕显示效果。 流畅的高清视频播放效果和绚丽多变的用户界面 (User Interface, 简称为 UI) 特效显示成为吸引客户眼球并激发客户购买欲望的一个重要因素。 多媒体播放和 UI特效都要进行屏幕菜单式调节方式 (On-Screen Display, 简称为 OSD) 的多图层叠加, OSD事实上就是将多图层同时显示在屏幕上的方法和技术, 其 关键技术就是阿尔法 (alpha) 混合。 以目前便携式设备上视频播放或拍照录像的屏幕 显示方式为例, 上述应用场景需要将用户界面和视频数据同时显示在屏幕上, 可以将 用户界面定义为图形层, 将视频数据定义为视频层, 图形层可能是已经经过 alpha混 合后的数据。 alpha混合要求图形层是带 alpha透明度的色彩模式(Alpha, Red, Green, Blue,简称为 ARGB)数据,视频层数据可以为亮度色差(YUV)、 ARGB、红绿蓝(Red, Green, blue, 简称为 RGB) 格式等多种数据格式。 上述 OSD处理过程需要两次遍历 图形层的像素点从而分别进行 alpha透明度配置和 alpha混合, 由此可见, 该过程需要 进行大量的数据计算。 虽然处理器技术有了长足的发展, 然而在嵌入式环境下, 中央处理器 (Central Processing Unit, 简称为 CPU)和内存依然是紧缺资源, 并且从硬件角度对其进行提升 的代价比较昂贵,加之电源一直是嵌入式设备的瓶颈所在, 因此一种好的 OSD混合算 法, 无论是从减少计算量的角度考虑还是从延长电源待机时间的角度考虑, 都是至关 重要的。 针对相关技术中屏幕内容的显示过程中计算量较大的问题, 目前尚未提出有效的 解决方案。 发明内容 本发明实施例提供了一种屏幕内容的显示方法及装置, 以至少解决相关技术中屏 幕内容的显示过程中计算量较大的问题。 根据本发明实施例的一个方面, 提供了一种屏幕内容的显示方法, 该方法包括: 接收用户发送的更新指令, 根据该更新指令确定更新区域; 逐个读取上述更新区域内 的像素点, 其中, 该像素点的上层为图形层, 下层为视频层; 对于每个读取的像素点, 根据该像素点的图形层的像素值配置该像素点的图形层的透明度, 并在该透明度的值 大于 0, 且小于 255时, 将上述像素点的视频层的像素值和上述图形层的像素值进行 混合, 并将混合后的结果存储到缓存区的对应位置; 在屏幕上显示该缓存区中存储的 像素值。 将上述像素点的视频层的像素值和上述图形层的像素值进行混合可以包括: 判断 该像素点的视频层的格式与图形层的格式是否相同; 如果否, 将上述像素点的视频层 的格式转换为与上述图形层相同的格式,其中,该图形层的格式为红绿蓝 RGB色彩格 式或亮度色差 YUV格式; 然后根据转换后的上述视频层的格式对上述像素点的视频 层的像素值和上述图形层的像素值进行混合。 根据上述更新指令确定更新区域可以包括:当上述更新指令为视频层更新指令时, 确定更新区域为视频层更新区域; 当上述更新指令为图形层更新指令时, 确定更新区 域为图形层更新区域。 根据上述像素点的图形层的像素值配置上述像素点的图形层的透明度之后, 上述 方法还可以包括: 判断上述更新区域是否为上述视频层更新区域; 如果是, 判断上述 透明度的值是否为 0或 255 ; 如果上述透明度的值为 0,将上述像素点的视频层的格式 转换为指定输出格式, 并将转换后的上述像素点的视频层的像素值存储到上述缓存区 的对应位置; 如果上述透明度的值为 255, 将上述像素点的图形层的像素值存储到上 述缓存区的对应位置。 根据上述像素点的图形层的像素值配置上述像素点的图形层的透明度之后, 上述 方法还可以包括: 判断上述更新区域是否为图形层更新区域; 如果是, 判断上述透明 度的值是否为 0或 255 ; 如果上述透明度的值为 0,将上述像素点的视频层的像素值存 储到上述缓存区的对应位置; 如果上述透明度的值为 255, 将上述像素点的图形层的 像素值存储到上述缓存区的对应位置。 根据上述像素点的图形层的像素值配置上述像素点的图形层的透明度之前, 上述 方法还可以包括: 设置像素值与透明度的对应关系表; 根据上述像素点的图形层的像 素值配置上述像素点的图形层的透明度包括: 读取上述像素点的图形层的像素值, 在 上述对应关系表中查询与上述图形层的像素值相对应的上述图形层的透明度, 将查询 到的上述透明度配置给上述像素点。 上述混合可以为阿尔法混合。 根据本发明实施例的另一方面, 提供了一种屏幕内容的显示装置, 该装置包括: 更新区域确定模块, 设置为接收用户发送的更新指令,根据该更新指令确定更新区域; 像素值混合模块, 设置为逐个读取上述更新区域内的像素点, 其中, 该像素点的上层 为图形层, 下层为视频层; 对于每个读取的像素点, 根据该像素点的图形层的像素值 配置该像素点的图形层的透明度, 并在该透明度的值大于 0, 且小于 255时, 将上述 像素点的视频层的像素值和上述图形层的像素值进行混合; 存储模块, 设置为将上述 像素值混合模块混合后的结果存储到缓存区的对应位置; 像素值显示模块, 设置为在 屏幕上显示上述缓存区中存储的像素值。 上述像素值混合模块可以包括: 格式判断单元, 设置为判断上述像素点的视频层 的格式与上述图形层的格式是否相同; 转换单元, 设置为在上述格式判断单元的判断 结果为否的情况下, 将上述像素点的视频层的格式转换为与上述图形层相同的格式, 其中, 该图形层的格式为红绿蓝 RGB色彩格式或亮度色差 YUV格式; 混合单元, 设 置为根据上述转换单元转换后的上述视频层的格式对上述像素点的视频层的像素值和 上述图形层的像素值进行混合。 上述更新区域确定模块可以包括: 视频层更新区域确定单元, 设置为当上述更新 指令为视频层更新指令时, 确定更新区域为视频层更新区域; 图形层更新区域确定单 元, 设置为当上述更新指令为图形层更新指令时, 确定更新区域为图形层更新区域。 上述像素值混合模块还可以包括: 第一区域判断单元, 设置为判断上述更新区域 是否为上述视频层更新区域; 第一透明度判断单元, 设置为在上述第一区域判断单元 的判断结果为是的情况下, 判断上述透明度的值是否为 0或 255 ; 第一存储单元, 设 置为在上述透明度的值为 0时, 将上述像素点的视频层的格式转换为指定输出格式, 并将转换后的上述像素点的视频层的像素值存储到上述缓存区的对应位置; 第二存储 单元, 设置为在上述透明度的值为 255时, 将上述像素点的图形层的像素值存储到上 述缓存区的对应位置。 上述像素值混合模块还可以包括: 第二区域判断单元, 设置为判断上述更新区域 是否为上述图形层更新区域; 第二透明度判断单元, 设置为在上述第二区域判断单元 的判断结果为是的情况下, 判断上述透明度的值是否为 0或 255 ; 第三存储单元, 设 置为在上述透明度的值为 0时, 将上述像素点的视频层的像素值存储到上述缓存区的 对应位置; 第四存储单元, 设置为在上述透明度的值为 255时, 将上述像素点的图形 层的像素值存储到上述缓存区的对应位置。 上述装置还可以包括: 对应关系表设置模块, 设置为设置像素值与透明度的对应 关系表; 上述像素值混合模块包括: 透明度配置单元, 设置为读取上述像素点的图形 层的像素值, 在上述对应关系表中查询与上述图形层的像素值相对应的上述图形层的 透明度, 将查询到的上述透明度配置给上述像素点。 通过本发明, 根据接收到的更新指令确定更新区域, 然后逐个读取该更新区域内 的像素点, 对于每个读取的像素点, 配置该像素点的图形层的透明度, 并在该透明度 的值大于 0, 且小于 255时, 将上述像素点的视频层的像素值和上述图形层的像素值 进行混合, 并将混合后的结果存储到缓存区的对应位置, 然后在屏幕上显示该缓存区 中存储的像素值, 解决了相关技术中屏幕内容的显示过程中计算量较大的问题, 从而 简化了计算过程, 降低了设备功耗, 提升了用户体验。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的屏幕内容的显示方法流程图; 图 2是根据本发明实施例的终端设备的屏幕内容显示方法的流程图; 图 3是根据本发明实施例的屏幕内容的显示装置的结构框图; 图 4是根据本发明实施例的屏幕内容的显示装置的具体结构框图; 图 5是根据本发明实施例的屏幕内容的显示装置的另一种结构框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在相关技术中, 需要分别对像素点的图形层的像素值配置透明度以及进行像素值 的混合操作, 因此需要两次遍历像素点, 此过程需要进行大量的数据计算。 基于此, 本发明实施例提供了一种屏幕内容的显示方法及装置, 该方法只需一次遍历像素点便 可完成屏幕内容的显示, 下面通过实施例进行详细说明。 本实施例提供了一种屏幕内容的显示方法, 该方法可以在终端设备上实现, 如图 1所示的屏幕内容的显示方法流程图, 该方法包括以下步骤 (步骤 S102-步骤 S108 ): 步骤 S102, 终端设备接收用户发送的更新指令, 根据该更新指令确定更新区域; 步骤 S104, 终端设备逐个读取上述更新区域内的像素点, 其中, 该像素点的上层 为图形层, 下层为视频层; 步骤 S106, 对于每个读取的像素点, 终端设备根据上述像素点的图形层的像素值 配置上述像素点的图形层的透明度, 并在该透明度的值大于 0, 且小于 255时, 将上 述像素点的视频层的像素值和上述图形层的像素值进行混合, 并将混合后的结果存储 到缓存区的对应位置; 步骤 S108, 终端设备在屏幕上显示上述缓存区中存储的像素值。 通过上述方法, 根据接收到的更新指令确定更新区域, 然后逐个读取该更新区域 内的像素点, 对于每个读取的像素点, 配置该像素点的图形层的透明度, 并在该透明 度的值大于 0, 且小于 255时, 将上述像素点的视频层的像素值和上述图形层的像素 值进行混合, 并将混合后的结果存储到缓存区的对应位置, 然后在屏幕上显示该缓存 区中存储的像素值, 解决了相关技术中屏幕内容的显示过程中计算量较大的问题, 从 而简化了计算过程, 降低了设备功耗, 提升了用户体验。 在步骤 S102之前,终端设备初始化 OSD处理的相关资源,将刷屏模式切换到 OSD 模式, 然后接收用户发送的更新指令, 并对该更新指令进行判断。 根据该更新指令确 定更新区域, 当上述更新指令为视频层更新指令时,确定更新区域为视频层更新区域, 当上述更新指令为图形层更新指令时, 确定更新区域为图形层更新区域。 该方式可以 直接准确的确定更新区域, 方便后续对更新区域内像素点的操作。 在确定更新区域之后, 终端设备逐个读取该更新区域内的像素点, 然后终端设备 对每个读取到的像素点进行操作, 再根据上述像素点的图形层的像素值配置上述像素 点的图形层的透明度,该配置过程可以通过查找像素值与透明度的对应关系表来实现, 因此, 本实施例提供了一种优选实施方式, 即在根据像素点的图形层的像素值配置该 像素点的图形层的透明度之前, 设置像素值与透明度的对应关系表。 然后在进行透明 度配置时, 可以先读取像素点的图形层的像素值, 在上述对应关系表中查询与图形层 的像素值相对应的图形层的透明度, 将查询到的透明度配置给像素点。 该方式简单易 操作, 可提高计算效率。 上述透明度可以有三种取值: 透明度的值大于 0且小于 255 (即部分透明)、 透明 度的值为 0 (即全透)、 透明度的值为 255 (即不透)。 在更新区域为视频层更新区域或 图形层更新区域时, 如果透明度的值大于 0, 且小于 255, 其后续的操作都是一致的, 即终端设备将上述像素点的视频层的像素值和上述图形层的像素值进行混合, 在进行 混合操作时, 需要先确定视频层和图形层的格式相同。在现有技术中, 没有 OSD需求 时, 为节约内存空间, 用户界面一般为 RGB格式。 在进行 OSD刷屏显示时, 需要将 RGB数据转换为 ARGB格式的图形层, 同时为图形层的每个像素点配置透明度,而后 进行混合操作。此过程需要新分配一个 ARGB格式的缓冲区,大小为 RGB缓冲区的 2 倍, 由此可见, 上述过程需要占用大量的内存空间。 在本实施例中, 视频层和图形层的格式可以是占用字节较小的 RGB或 YUV, 这 样可以减少一个 ARGB格式的图形层缓冲区,是内存占用减少为通用方式的一半左右, 并且视频层和图形层的格式相同可以保证完成后续的像素值混合。 基于在透明度的值大于 0, 且小于 255时的上述操作过程, 本实施例提供了一种 优选实施方式, 判断像素点的视频层的格式与图形层的格式是否相同, 如果不相同, 终端设备将像素点的视频层的格式转换为与图形层相同的格式, 其中, 图形层的格式 可以为 RGB或 YUV, 然后根据转换后的视频层的格式对上述像素点的视频层的像素 值和图形层的像素值进行混合, 该混合操作可以为阿尔法混合。 然后, 将混合后的结 果存储到缓存区 (Buffer) 的对应位置。 当然, 在确定视频层与图形层的格式相同之 后, 还要保证转换后的格式满足终端设备支持的输出格式, 这样能够保证后续可以在 屏幕上显示内容。 在更新区域为视频层更新区域时, 如果透明度的值为 0, 则先将像素点的视频层 的格式转换为终端设备支持的输出格式, 然后将转换后的像素点的视频层的像素值存 储到缓存区的对应位置; 如果透明度的值为 255, 此时图形层没有更新, 将像素点的 图形层的像素值存储到缓存区的对应位置。 该方式只对确定后的更新区域进行操作, 减少了计算量, 且简便易实现。 基于在更新区域为视频层更新区域, 透明度为 0或 255的上述操作过程, 本实施 例提供了一种优选实施方式, 先判断更新区域是否为视频层更新区域, 如果是, 再判 断透明度的值是否为 0或 255, 如果透明度的值为 0,将像素点的视频层的格式转换为 指定输出格式, 并将转换后的像素点的视频层的像素值存储到缓存区的对应位置; 如 果透明度的值为 255, 将像素点的图形层的像素值存储到缓存区的对应位置。 在更新区域为图形层更新区域时, 如果透明度的值为 0, 此时视频层没有更新, 其格式也应该是终端设备支持的输出格式, 则将像素点的视频层的像素值存储到缓存 区的对应位置; 如果透明度的值为 255, 将像素点的图形层的像素值存储到缓存区的 对应位置。 该方式只对确定后的更新区域进行操作, 减少了计算量, 且简便易实现。 基于在更新区域为图形层更新区域, 透明度为 0或 255的上述操作过程, 本实施 例提供了一种优选实施方式, 先判断更新区域是否为图形层更新区域, 如果是, 再判 断透明度的值是否为 0或 255, 如果透明度的值为 0,将像素点的视频层的像素值存储 到缓存区的对应位置; 如果透明度的值为 255, 将像素点的图形层的像素值存储到缓 存区的对应位置。 上述过程都是对于更新区域内的读取到的一个像素点进行的操作, 在对一个像素 点完成上述操作之后, 再对下一个像素点进行上述操作, 直至遍历完更新区域内的所 有像素点,然后将缓存区中存储的像素值显示在屏幕上,最后释放 OSD处理的相关资 源, 将 OSD模式切换至普通模式。上述过程实现了对像素点的一次遍历, 减少了计算
透明度的三种取值情况可以用关键色的概念加以区分, 关键色是指图形层中需要 全透或部分透明显示的颜色值。因此可以判断像素点的图形层的像素值是否为关键色, 如果是关键色, 则表示像素点的透明度为 0或者大于 0且小于 255, 这样可以相应的 进行后续操作, 如果不是关键色, 则表示像素点的透明度为 255, 也可以相应的进行 后续操作。 前面已经对具体操作过程进行了详细描述, 在此不再赘述。 下面结合优选实施例和附图对上述实施例的实现过程进行详细说明。 实施例一 图 2是根据本发明实施例的终端设备的屏幕内容显示方法的流程图,如图 2所示, 该方法包括如下步骤 (步骤 S202-步骤 S230): 步骤 S202, 初始化过程。 初始化 OSD处理的相关资源, 申请缓存区, 并将刷屏 模式切换到 OSD模式。 步骤 S204, 消息处理过程。 对接收到的消息进行判断, 如果接收到视频层更新指 令, 则执行步骤 S206, 如果接收到图形层更新指令, 则执行步骤 S228, 如果接收到 结束 OSD的消息请求, 则将 OSD模式切换至普通模式。 步骤 S206, 逐个读取视频层更新区域内的像素点。 步骤 S208,根据该像素点的图形层的像素值判断该像素点是否为关键色,如果是, 执行步骤 S212, 如果不是, 执行步骤 S210。 步骤 S210, 如果更新区域内图形层的某像素点不是关键色, 则其透明度的值应为 255 (即不透), 此时图形层没有更新, 将像素点的图形层的像素值存储到缓存区的对 应位置, 然后执行步骤 S226。 步骤 S212, 如果更新区域内图形层的某像素点为关键色, 判断其透明度的值是否 为 0, 如果透明度的值为 0, 执行步骤 S214。 如果透明度的值不为 0, 执行步骤 S220。 步骤 S214, 像素点对应的透明度的值为 0 (即全透), 判断像素点的视频层的格式 是否满足终端设备支持的格式, 如果满足则不需要进行格式转换, 执行步骤 S218, 如 果不满足, 执行步骤 S216。 步骤 S216, 将像素点的视频层的格式转换为视频设备支持的输出格式, 假设需要 将像素点的视频层的格式 (比如 YUV)转换为指定输出格式 (比如 RGB ), 则转换公 式如下所示:
R=Y+1.402(Cr-128)
G=Y-0.34414(Cb-128)-0.71414(Cr-128)
B=Y+1.772(Cb-128) 步骤 S218, 在格式转换完成之后, 将转换后的像素点的视频层的像素值存储到缓 存区的对应位置, 然后执行步骤 S226。 步骤 S220, 像素点对应的透明度的值大于 0且小于 255, 判断像素点的视频层的 格式与图形层的格式是否相同, 如果相同, 则执行步骤 S224, 如果不相同, 执行步骤 S222。 步骤 S222, 将像素点的视频层的格式转换为与图形层相同的格式, 比如将 YUV 转换为 RGB, 前面已经对转换公式进行了描述, 在此不再赘述。 当然, 此处转换后的 格式应当满足视频设备的指定输出格式。 步骤 S224,根据转换后的视频层的格式对像素点的视频层的像素值和图形层的像 素值进行混合操作 (比如 alpha混合), 该混合操作的计算方法如下所示:
R out = (((R_g - R_v)*(alpha))»8) + R_v G out = (((G_g - G_v)*(alpha))»8) + G_v
B out = (((B_g - R_v)*(alpha))»8) + B_v 其中后缀 g表示图形层, v表示视频层。 步骤 S226, 将缓存区中缓存的像素值显示到屏幕上, 然后执行步骤 S230。 步骤 S228, 按照对上述视频层更新区域内像素点的操作方式, 对图形层更新区域 内的像素点的操作进行相同操作, 前面已经进行了详细描述, 在此不再赘述。 步骤 S230, 释放 OSD处理中的相关资源, 将 OSD模式切换至普通模式。 对应于上述屏幕内容的显示方法, 本实施例提供了一种屏幕内容的显示装置, 该 装置用于实现上述实施例。 图 3是根据本发明实施例的屏幕内容的显示装置的结构框 图, 如图 3所示, 该装置包括: 更新区域确定模块 30、 像素值混合模块 32、 存储模块 34和像素值显示模块 36。 下面对该结构进行说明。 更新区域确定模块 30, 设置为接收用户发送的更新指令, 根据该更新指令确定更 新区域; 像素值混合模块 32,连接至更新区域确定模块 30, 设置为逐个读取上述更新区域 确定模块 30确定的更新区域内的像素点, 其中, 该像素点的上层为图形层, 下层为视 频层; 对于每个读取的像素点, 根据该像素点的图形层的像素值配置该像素点的图形 层的透明度, 并在上述透明度的值大于 0, 且小于 255时, 将上述像素点的视频层的 像素值和图形层的像素值进行混合; 存储模块 34, 连接至像素值混合模块 32, 设置为将上述像素值混合模块 32混合 后的结果存储到缓存区的对应位置; 像素值显示模块 36,连接至存储模块 34, 设置为在屏幕上显示上述缓存区中存储 的像素值。 通过上述装置, 更新区域确定模块 30根据接收到的更新指令确定更新区域,然后 像素值混合模块 32逐个读取该更新区域内的像素点,对于每个读取的像素点, 配置该 像素点的图形层的透明度, 并在该透明度的值大于 0, 且小于 255时, 将上述像素点 的视频层的像素值和上述图形层的像素值进行混合, 并将混合后的结果存储到缓存区 的对应位置, 然后像素值显示模块 36在屏幕上显示存储模块 34在缓存区中存储的像 素值, 解决了相关技术中屏幕内容的显示过程中计算量较大的问题, 从而简化了计算 过程, 降低了设备功耗, 提升了用户体验。 在更新区域确定模块 30接收用户发送的更新指令之前, 终端设备初始化 OSD处 理的相关资源, 将刷屏模式切换到 OSD模式, 然后接收用户发送的更新指令, 并根据 该更新指令确定更新区域。 因此, 本实施例提供了一种优选实施方式, 上述更新区域 确定模块 30还可以包括: 视频层更新区域确定单元, 设置为当上述更新指令为视频层 更新指令时, 确定更新区域为视频层更新区域; 图形层更新区域确定单元, 设置为当 上述更新指令为图形层更新指令时, 确定更新区域为图形层更新区域。 该方式可以直 接准确的确定更新区域, 方便后续对更新区域内像素点的操作。 在更新区域确定模块 30确定更新区域之后, 像素值混合模块 32逐个读取该更新 区域内的像素点, 然后终端设备对每个读取到的像素点进行操作, 再根据上述像素点 的图形层的像素值配置上述像素点的图形层的透明度, 该配置过程可以通过查找像素 值与透明度的对应关系表来实现, 因此, 本实施例提供了一种优选实施方式, 上述装 置还可以包括: 对应关系表设置模块, 设置为设置像素值与透明度的对应关系表; 像 素值混合模块 32包括: 透明度配置单元, 设置为读取上述像素点的图形层的像素值, 在上述对应关系表中查询与图形层的像素值相对应的上述图形层的透明度, 将查询到 的上述透明度配置给上述像素点。 该方式简单易操作。 前面已经对透明度的三种取值进行了介绍, 在不同更新区域 (比如视频更新区域 或图形更新区域) 内, 在透明度取值不同时, 对应的操作也不同。 在更新区域为视频 层更新区域或图形层更新区域时, 如果透明度的值大于 0, 且小于 255, 其后续的操作 都是一致的。 图 4是根据本发明实施例的屏幕内容的显示装置的具体结构框图, 如图 4所示, 屏幕内容的显示装置除了包括图 3所示的各个模块之外, 上述像素值混合模 块 32还包括: 格式判断单元 320、 转换单元 322和混合单元 324。 下面对该结构进行 说明。 格式判断单元 320, 设置为判断像素点的视频层的格式与图形层的格式是否相同; 转换单元 322,连接至格式判断单元 320, 设置为在格式判断单元 320的判断结果 为否的情况下, 将上述像素点的视频层的格式转换为与图形层相同的格式, 其中, 该 图形层的格式可以为 RGB或 YUV; 混合单元 324,连接至转换单元 322, 设置为根据转换单元 322转换后的视频层的 格式对上述像素点的视频层的像素值和图形层的像素值进行混合。 在更新区域为视频层更新区域时, 如果透明度的值为 0或 255, 则上述像素值混 合模块 32还可以包括: 第一区域判断单元, 设置为判断更新区域是否为视频层更新区 域; 第一透明度判断单元, 设置为在上述第一区域判断单元的判断结果为是的情况下, 判断透明度的值是否为 0或 255 ; 第一存储单元, 设置为在上述透明度的值为 0时, 将像素点的视频层的格式转换为指定输出格式, 并将转换后的上述像素点的视频层的 像素值存储到缓存区的对应位置; 第二存储单元, 设置为在上述透明度的值为 255时, 将上述像素点的图形层的像素值存储到上述缓存区的对应位置。 在更新区域为图形层更新区域时, 如果透明度的值为 0或 255, 则上述像素值混 合模块 32还可以包括: 第二区域判断单元, 设置为判断更新区域是否为图形层更新区 域; 第二透明度判断单元, 设置为在上述第二区域判断单元的判断结果为是的情况下, 判断透明度的值是否为 0或 255 ; 第三存储单元, 设置为在上述透明度的值为 0时, 将像素点的视频层的像素值存储到缓存区的对应位置; 第四存储单元, 设置为在上述 透明度的值为 255时,将上述像素点的图形层的像素值存储到上述缓存区的对应位置。 上述屏幕内容的显示装置的操作过程都是对于更新区域内的读取到的一个像素点 进行的操作, 在对一个像素点完成上述操作之后, 再对下一个像素点进行上述操作, 直至遍历完更新区域内的所有像素点, 然后将缓存区中存储的像素值显示在屏幕上, 最后释放 OSD处理的相关资源, 将 OSD模式切换至普通模式。 上述过程实现了对像 素点的一次遍历, 减少了计算量。 透明度的三种取值情况可以用关键色的概念加以区分, 可以根据像素点的图形层 的像素值是否为关键色进行后续操作, 前面已经进行了介绍, 在此不再赘述。 图 5是根据本发明实施例的屏幕内容的显示装置的另一种结构框图,如图 5所示, 该装置包括视频层数据生成模块 50、 图形层数据生成模块 52、 OSD处理模块 54和刷 屏显示模块 56。 下面对该结构进行说明。 视频层数据生成模块 50, 设置为生成视频层数据 (即视屏层更新指令)。 该模块 是一个虚拟模块, 在实际应用场景下该模块可由视频播放类业务的视频解码输出模块 充当, 也可由拍照、摄像等模块的视频采集输出模块充当, 也可以由视频播放类业务, 视频录制 /预览类业务的视频数据采集处理模块充当, 该模块将从解码器或摄像头等视 频源所输出的视频数据按照输出要求, 处理为特定的视频数据格式和指定的宽高, 提 供给 OSD处理模块 54作为视频层数据源。 图形层数据生成模块 52, 设置为产生图形层数据 (即图形层更新指令)。 该模块 也是一个虚拟模块, 在实际应用场景下该模块可以由用户界面交互模块充当, 该模块 将用户界面的图标、菜单、按钮、文字等界面显示信息按照输出要求提供给 OSD处理 模块, 同时还要提供给 OSD处理模块一个关键色和 alpha透明度的对应表, 以供 OSD 模块在进行 alpha混合时根据关键色获取 alpha透明度。 OSD处理模块 54的功能相当于上述图 3中的像素值混合模块 32和存储模块 34, 该模块负责在进行 OSD处理操作时图形层的 alpha透明度配置、 色系转换和图像数据 的 alpha混合。 本模块根据图形层数据生成模块所传入的数据, 查询图形层的各个像 素点是否为关键色, 如果不是关键色, 则将该像素点直接拷贝到输出 Buffer对应的位 置上, 如果是关键色, 则首先从表中查询其对应的透明度, 其次将视频层对应像素点 的格式转换为 RGB色系, 最后将图形层和视频层对应像素点进行 alpha混合, 并将混 合结果存储到输出 Buffer的对应位置。 该模块在确定图形层更新区域或视频层更新区 域之后, 根据关键色进行色系转换, 再进行 alpha混合, 而后将处理得到数据提供给 刷屏显示模块 56进行显示; 刷屏显示模块 56的功能相当于上述图 3中的像素值显示模块 36, 该模块负责将 OSD处理后的图像数据刷新显示到便携式终端的显示屏上。 从以上的描述中可以看出, 本发明提供的屏幕内容的显示方法根据图形层的像素 值, 同时进行 alpha透明度的配置和 alpha混合, 只需一次遍历更新区域内的像素点即 可完成 OSD处理, 可以减少一个 ARGB格式的图形层缓冲区, 使内存占用减少为通 用方式的一半左右, 并且减少了 alpha混合的计算量, 降低了成本, 减少了功耗, 提 高了用户响应, 同时该方法支持图形层多透明度设置, 对改善屏幕显示效果、 提高用 户体验、 降低设备功耗等方面具有重要价值。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种屏幕内容的显示方法, 包括:
接收用户发送的更新指令, 根据所述更新指令确定更新区域; 逐个读取所述更新区域内的像素点, 其中, 所述像素点的上层为图形层, 下层为视频层;
对于每个读取的像素点, 根据所述像素点的图形层的像素值配置所述像素 点的图形层的透明度, 并在所述透明度的值大于 0, 且小于 255时, 将所述像 素点的视频层的像素值和所述图形层的像素值进行混合, 并将混合后的结果存 储到缓存区的对应位置;
在屏幕上显示所述缓存区中存储的像素值。
2. 根据权利要求 1所述的方法, 其中, 将所述像素点的视频层的像素值和所述图 形层的像素值进行混合包括:
判断所述像素点的视频层的格式与所述图形层的格式是否相同; 如果否, 将所述像素点的视频层的格式转换为与所述图形层相同的格式, 其中, 所述图形层的格式为红绿蓝 RGB色彩格式或亮度色差 YUV格式; 根据转换后的所述视频层的格式对所述像素点的视频层的像素值和所述图 形层的像素值进行混合。
3. 根据权利要求 1所述的方法, 其中, 根据所述更新指令确定更新区域包括: 当所述更新指令为视频层更新指令时, 确定更新区域为视频层更新区域; 当所述更新指令为图形层更新指令时, 确定更新区域为图形层更新区域。
4. 根据权利要求 3所述的方法, 其中, 根据所述像素点的图形层的像素值配置所 述像素点的图形层的透明度之后, 所述方法还包括:
判断所述更新区域是否为所述视频层更新区域;
如果是, 判断所述透明度的值是否为 0或 255 ;
如果所述透明度的值为 0, 将所述像素点的视频层的格式转换为指定输出 格式, 并将转换后的所述像素点的视频层的像素值存储到所述缓存区的对应位 置; 如果所述透明度的值为 255, 将所述像素点的图形层的像素值存储到所述 缓存区的对应位置。
5. 根据权利要求 3所述的方法, 其中, 根据所述像素点的图形层的像素值配置所 述像素点的图形层的透明度之后, 所述方法还包括:
判断所述更新区域是否为所述图形层更新区域;
如果是, 判断所述透明度的值是否为 0或 255 ;
如果所述透明度的值为 0, 将所述像素点的视频层的像素值存储到所述缓 存区的对应位置;
如果所述透明度的值为 255, 将所述像素点的图形层的像素值存储到所述 缓存区的对应位置。
6. 根据权利要求 1所述的方法, 其中,
根据所述像素点的图形层的像素值配置所述像素点的图形层的透明度之 前, 所述方法还包括: 设置像素值与透明度的对应关系表;
根据所述像素点的图形层的像素值配置所述像素点的图形层的透明度包 括: 读取所述像素点的图形层的像素值, 在所述对应关系表中查询与所述图形 层的像素值相对应的所述图形层的透明度, 将查询到的所述透明度配置给所述 像素点。
7. 根据权利要求 1至 6任一项所述的方法, 其中, 所述混合为阿尔法混合。
8. 一种屏幕内容的显示装置, 包括:
更新区域确定模块, 设置为接收用户发送的更新指令, 根据所述更新指令 确定更新区域;
像素值混合模块, 设置为逐个读取所述更新区域确定模块确定的所述更新 区域内的像素点, 其中, 所述像素点的上层为图形层, 下层为视频层; 对于每 个读取的像素点, 根据所述像素点的图形层的像素值配置所述像素点的图形层 的透明度, 并在所述透明度的值大于 0, 且小于 255时, 将所述像素点的视频 层的像素值和所述图形层的像素值进行混合;
存储模块, 设置为将所述像素值混合模块混合后的结果存储到缓存区的对 应位置;
像素值显示模块, 设置为在屏幕上显示所述缓存区中存储的像素值。
9. 根据权利要求 8所述的装置, 其中, 所述像素值混合模块包括: 格式判断单元, 设置为判断所述像素点的视频层的格式与所述图形层的格 式是否相同;
转换单元, 设置为在所述格式判断单元的判断结果为否的情况下, 将所述 像素点的视频层的格式转换为与所述图形层相同的格式, 其中, 所述图形层的 格式为红绿蓝 RGB色彩格式或亮度色差 YUV格式;
混合单元, 设置为根据所述转换单元转换后的所述视频层的格式对所述像 素点的视频层的像素值和所述图形层的像素值进行混合。
10. 根据权利要求 8所述的装置, 其中, 所述更新区域确定模块包括:
视频层更新区域确定单元, 设置为当所述更新指令为视频层更新指令时, 确定更新区域为视频层更新区域;
图形层更新区域确定单元, 设置为当所述更新指令为图形层更新指令时, 确定更新区域为图形层更新区域。
11. 根据权利要求 10所述的装置, 其中, 所述像素值混合模块还包括:
第一区域判断单元,设置为判断所述更新区域是否为所述视频层更新区域; 第一透明度判断单元, 设置为在所述第一区域判断单元的判断结果为是的 情况下, 判断所述透明度的值是否为 0或 255 ;
第一存储单元, 设置为在所述透明度的值为 0时, 将所述像素点的视频层 的格式转换为指定输出格式, 并将转换后的所述像素点的视频层的像素值存储 到所述缓存区的对应位置;
第二存储单元, 设置为在所述透明度的值为 255时, 将所述像素点的图形 层的像素值存储到所述缓存区的对应位置。
12. 根据权利要求 10所述的装置, 其中, 所述像素值混合模块还包括:
第二区域判断单元,设置为判断所述更新区域是否为所述图形层更新区域; 第二透明度判断单元, 设置为在所述第二区域判断单元的判断结果为是的 情况下, 判断所述透明度的值是否为 0或 255 ;
第三存储单元, 设置为在所述透明度的值为 0时, 将所述像素点的视频层 的像素值存储到所述缓存区的对应位置; 第四存储单元, 设置为在所述透明度的值为 255时, 将所述像素点的图形 层的像素值存储到所述缓存区的对应位置。
13. 根据权利要求 8所述的装置, 其中,
所述装置还包括: 对应关系表设置模块, 设置为设置像素值与透明度的对 应关系表;
所述像素值混合模块包括: 透明度配置单元, 设置为读取所述像素点的图 形层的像素值, 在所述对应关系表中查询与所述图形层的像素值相对应的所述 图形层的透明度, 将查询到的所述透明度配置给所述像素点。
PCT/CN2012/076783 2012-02-17 2012-06-12 屏幕内容的显示方法及装置 WO2013120331A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210036704.5 2012-02-17
CN201210036704.5A CN103259989B (zh) 2012-02-17 2012-02-17 屏幕内容的显示方法及装置

Publications (1)

Publication Number Publication Date
WO2013120331A1 true WO2013120331A1 (zh) 2013-08-22

Family

ID=48963657

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/076783 WO2013120331A1 (zh) 2012-02-17 2012-06-12 屏幕内容的显示方法及装置

Country Status (2)

Country Link
CN (1) CN103259989B (zh)
WO (1) WO2013120331A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986935B (zh) * 2014-04-30 2018-03-06 华为技术有限公司 编码方法、编码器、屏幕共享设备及系统
CN106303285A (zh) * 2015-05-20 2017-01-04 深圳市中兴微电子技术有限公司 一种多媒体信息的输出方法及装置
CN106569757A (zh) * 2015-10-08 2017-04-19 青岛海信电器股份有限公司 一种更改图形界面文本颜色的方法和装置
CN105516657B (zh) * 2015-11-30 2019-03-26 浙江大华技术股份有限公司 对显示设备所显示内容进行操作的方法、装置和显示设备
CN105390109A (zh) * 2015-12-07 2016-03-09 惠州Tcl移动通信有限公司 驱动显示方法以及液晶显示装置
CN108024133A (zh) * 2016-10-28 2018-05-11 深圳市中兴微电子技术有限公司 一种信息输出显示方法及装置
KR20180102933A (ko) * 2017-03-08 2018-09-18 삼성전자주식회사 Ui를 인식하는 디스플레이 장치 및 그 디스플레이 장치의 제어 방법
CN110719517B (zh) * 2018-07-11 2021-08-13 视联动力信息技术股份有限公司 一种视频流显示方法及装置
CN109413232B (zh) * 2018-10-19 2021-01-01 北京小米移动软件有限公司 屏幕显示方法及装置
KR20210012095A (ko) * 2019-07-23 2021-02-03 삼성전자주식회사 이미지 데이터의 레이어를 블렌딩하기 위한 전자 장치
CN112616083A (zh) * 2020-12-11 2021-04-06 湖南国科微电子股份有限公司 一种视频的显示层叠加处理方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988624A (zh) * 2005-12-22 2007-06-27 三星电子株式会社 图像处理装置和方法
CN101119454A (zh) * 2006-08-02 2008-02-06 深圳Tcl新技术有限公司 一种电视功能界面透明显示的方法及其装置
KR20080025549A (ko) * 2006-09-18 2008-03-21 엘지전자 주식회사 오에스디에서의 투명정보 처리장치 및 방법

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005107780A (ja) * 2003-09-30 2005-04-21 Sony Corp 画像混合方法および混合画像データ生成装置
CN101908216B (zh) * 2010-07-20 2014-04-30 中兴通讯股份有限公司 一种实现矢量字体的方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988624A (zh) * 2005-12-22 2007-06-27 三星电子株式会社 图像处理装置和方法
CN101119454A (zh) * 2006-08-02 2008-02-06 深圳Tcl新技术有限公司 一种电视功能界面透明显示的方法及其装置
KR20080025549A (ko) * 2006-09-18 2008-03-21 엘지전자 주식회사 오에스디에서의 투명정보 처리장치 및 방법

Also Published As

Publication number Publication date
CN103259989B (zh) 2018-08-14
CN103259989A (zh) 2013-08-21

Similar Documents

Publication Publication Date Title
WO2013120331A1 (zh) 屏幕内容的显示方法及装置
CN101523481B (zh) 用于使显示具有不同帧速率的视频数据的窗口迭加的图像处理设备
US9665247B2 (en) Method and device for applying a new skin to a display environment
US20230385008A1 (en) Wireless Projection Method, Mobile Device, and Computer-Readable Storage Medium
CN105103123A (zh) 用于虚拟显示器的系统和方法
WO2013167081A2 (zh) 一种实现多屏显示的方法及系统
CN103488371A (zh) 一种在移动终端上制作动画的方法及移动终端
CN110213657B (zh) 一种开机方法及智能电视
CN112579030B (zh) 投屏输出控制方法、装置及电子设备
CN110012336B (zh) 直播界面的图片配置方法、终端及装置
CN109196865A (zh) 一种数据处理方法及终端
WO2013023514A1 (zh) 一种图像处理方法、装置及系统
CN1968372A (zh) 电视功能界面的背景变换方法
JP2004086277A (ja) 情報処理装置、プロジェクタシステム及びプログラム
CN113518257A (zh) 多系统投屏处理方法与设备
JP5365541B2 (ja) 画像転送装置および画像転送における画像表示制御方法
US20240005891A1 (en) Mirroring method, apparatus, and system
CN103886847B (zh) 基于大屏幕液晶拼接显示的开窗控制器及其控制方法
CN113573149B (zh) 一种频道搜索方法及显示设备
TW201901620A (zh) 一種繪製方法及裝置
CN112162719A (zh) 显示内容渲染方法及装置、计算机可读介质和电子设备
WO2015117345A1 (zh) 背景的显示方法及装置
KR20160048430A (ko) 디지털 디바이스 및 디지털 디바이스에서 데이터 처리 방법
JP5029679B2 (ja) 画像転送装置および画像転送方法
JP2009086543A (ja) 画像転送装置および画像転送方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12868396

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12868396

Country of ref document: EP

Kind code of ref document: A1