CN102231834A - Animated portable network graphics (APNG) file processing method and device for digital television system - Google Patents

Animated portable network graphics (APNG) file processing method and device for digital television system Download PDF

Info

Publication number
CN102231834A
CN102231834A CN201110176015XA CN201110176015A CN102231834A CN 102231834 A CN102231834 A CN 102231834A CN 201110176015X A CN201110176015X A CN 201110176015XA CN 201110176015 A CN201110176015 A CN 201110176015A CN 102231834 A CN102231834 A CN 102231834A
Authority
CN
China
Prior art keywords
picture frame
rgb
video data
transparent information
pixel
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
Application number
CN201110176015XA
Other languages
Chinese (zh)
Inventor
徐佳宏
肖友能
吴启康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
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 Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201110176015XA priority Critical patent/CN102231834A/en
Publication of CN102231834A publication Critical patent/CN102231834A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses an animated portable network graphics (APNG) file processing method and an APNG file processing system for a digital television system. The method provided by the invention comprises a front-end processing method and a terminal processing method. The front-end processing method comprises the following steps of: decoding an APNG file to obtain a red, green and blue (RGB) image frame and the transparent information of pixels of the RGB image frame; converting the RGB image frame into a luma and chroma (YUV) image frame; performing video coding on the YUV image frame according to a preset video coding standard to obtain video data; inserting the transparent information of the pixels of the RGB image frame into the video data obtained by the video coding; and transmitting the video data. The device provided by the invention comprises a front-end processing device and a terminal processing device. By the processing method and the processing device provided by the invention, the finite central processing unit (CPU) resources of a digital television set-top box are saved, the APNG file with a high frame rate and large images can be used, and dynamic images, with transparency effects, of the APNG file can be displayed at a terminal.

Description

Processing method and the device of a kind of APNG file in digital television system
Technical field
The present invention relates to the digital television techniques field, processing method and the device of particularly a kind of APNG file in digital television system.
Background technology
Along with the popularization of Digital Television use and the development of digital television techniques, digital cable customers is had higher requirement to the picture effect of watching, for example, wish to see HTML (Hyper Text Mark-up Language, the HTML) page that embeds dynamic image.Html page allows to embed the dynamic image of different data format, and these dynamic images are not only lively, and the application of transparent background effect makes dynamic effect rich and varied.In various moving image format, dynamic portable network figure (Animated Portable Network Graphics, APNG) form is as network graphic (Portable Network Graphic Format, PNG) expansion of form is a kind of moving image format that often is embedded in the html page.
The common way of digital television system processing APNG file is central processing unit (the Central Processing Unit by set-top box at present, CPU) the APNG file is decoded, but this decoding belongs to soft decoding, need to consume a large amount of cpu resources, the system loading height, when especially higher or picture size is big when APNG file frame per second, can cause the set-top box CPU Limited resources can not satisfy the real-time decoding of image in the APNG file, the slack phenomenon of animation effect in the time of may occurring showing can be experienced picture and significantly jump and pause and feel when the user watches.Therefore, generally do not support the APNG file of high frame per second, large-size images in the existing Digital Television html page, or show the APNG file by the method that reduces frame per second, reduces picture size, but these solutions or can not use the APNG file, reduce the quality and the animation effect of APNG document image, made application and the development of APNG file dynamic image in digital television system be restricted.
Summary of the invention
In view of this, the object of the present invention is to provide processing method and the device of a kind of APNG file in digital television system, make the APNG file that can show high frame per second, large-size images in terminal in real time, and picture displayed has transparent effect.
The invention provides the front-end processing method of a kind of APNG file in digital television system, comprising:
Dynamic portable network figure APNG file is decoded, obtain the transparent information of RGB picture frame and RGB picture frame pixel;
The RGB picture frame is converted to the YUV picture frame;
According to default video encoding standard the YUV picture frame is carried out video coding and obtain video data;
The transparent information of RGB picture frame pixel is inserted in the described video data;
Send described video data.
Preferably, described the APNG file is decoded, obtains the transparent information of RGB picture frame and RGB picture frame pixel, also comprise:
Transparent information to described RGB picture frame pixel compresses processing;
Described transparent information with RGB picture frame pixel is inserted in the described video data, comprising: the transparent information that will compress the RGB picture frame pixel after handling is inserted in the described video data.
Preferably, described default video encoding standard is the MPEG-2 of dynamic image expert group video encoding standard or video encoding standard H.264.
Preferably, described default video encoding standard is the MPEG-2 video encoding standard,
Describedly according to default video encoding standard the YUV picture frame is carried out video coding and obtain video data and comprise: according to the MPEG-2 video encoding standard YUV picture frame being encoded obtains video data;
Described transparent information with RGB picture frame pixel is inserted in the described video data, comprising: the transparent information of RGB picture frame pixel is inserted into spread user data field in the described video data.
Preferably, described default video encoding standard is video encoding standard H.264,
Describedly according to default video encoding standard the YUV picture frame is carried out video coding and obtain video data and comprise: according to video encoding standard H.264 the YUV picture frame being encoded obtains video data;
Described transparent information with RGB picture frame pixel is inserted in the described video data, comprising: the transparent information of RGB picture frame pixel is inserted into auxiliary enhancing information field in the described video data.
The terminal processing method of a kind of APNG file in digital television system comprises:
The video data that receiving front-end sends in accordance with the method for claim 1;
From described video data, extract the transparent information of RGB picture frame pixel;
According to the decoding standard of described video encoding standard correspondence described video data is decoded and to obtain the YUV picture frame;
The YUV picture frame is converted to the RGB picture frame;
The rgb value of the pixel that described RGB picture frame is comprised, the rgb value of display position background pixel point carry out ALPHA with the transparent information of RGB picture frame pixel and mix, and output shows.
Preferably, described the APNG file is decoded, obtain the transparent information of RGB picture frame and RGB picture frame pixel, also comprise: the transparent information to described RGB picture frame pixel compresses processing;
The transparent information of the described RGB picture frame pixel that extracts from video data is the transparent information after overcompression is handled, and further comprises: the transparent information to the RGB picture frame pixel that extracts decompresses;
The rgb value of the described pixel that the RGB picture frame is comprised, the rgb value of display position background pixel point carry out ALPHA with the transparent information of RGB picture frame pixel and mix, and output shows, comprise: the rgb value of the pixel that the RGB picture frame is comprised, the rgb value of display position background pixel point and decompress after transparent information mix, and output shows.
The front end processing device of a kind of APNG file in digital television system comprises:
APNG file decoding unit is used for the APNG file is decoded, and obtains the transparent information of RGB picture frame and RGB picture frame pixel;
RGB to YUV converting unit is used for the RGB picture frame is converted to the YUV picture frame;
Video encoding unit is used for according to default video encoding standard the YUV picture frame being carried out video coding;
Transparent information inserts the unit, is used for the video data after transparent information with RGB picture frame pixel is inserted into described video coding;
Video data sends the unit, is used to send described video data.
Preferably, further comprise:
The transparent information compression unit is used for the transparent information of described RGB picture frame pixel is compressed processing;
Described transparent information inserts the unit, and the transparent information of the RGB picture frame pixel after being used for will compression handling is inserted into the video data behind the described video coding.
Preferably, described default video encoding standard is the MPEG-2 of dynamic image expert group video encoding standard or video encoding standard H.264.
Preferably, described default video encoding standard is the MPEG-2 video encoding standard,
Described video encoding unit, being used for according to the MPEG-2 video encoding standard YUV picture frame being encoded obtains video data;
Described transparent information inserts the unit, is used for the transparent information of RGB picture frame pixel is inserted into the spread user data field of described video data.
Preferably, described default video standard is video standard H.264,
Described video encoding unit, being used for according to video encoding standard H.264 the YUV picture frame being encoded obtains video data;
Described transparent information inserts the unit, is used for the transparent information of RGB picture frame pixel is inserted into the auxiliary enhancing information field of described video data.
The terminal processes device of a kind of APNG file in digital television system comprises:
The video data receiving element is used for the video data that receiving front-end sends according to the described device of claim 8;
The transparent information extraction unit is used for from the transparent information of described video data extraction RGB picture frame pixel;
Video decoding unit, being used for according to the decoding standard of video data encoding standard correspondence video data being decoded obtains the YUV picture frame;
YUV to RGB converting unit is used for the YUV picture frame is converted to the RGB picture frame;
Mix the output display unit, the rgb value that is used for rgb value, the display position background pixel point of pixel that described RGB picture frame is comprised carries out ALPHA with the transparent information of RGB picture frame pixel to be mixed, and exports demonstration.
According to the specific embodiment that the application provides, the application discloses following technique effect:
By the APNG file being decoded at digital TV front-end, obtain the transparent information of RGB picture frame and RGB picture frame pixel, and the RGB picture frame carried out video coding, obtain video data, make digital TV terminal from video data, to obtain the RGB picture frame by the hardware decoding, avoided using digital TV set-top box CPU to carry out the APNG file decoding and the problem of the cpu resource deficiency brought in terminal, save the limited cpu resource of set-top box, and then can use the APNG file of high frame per second and large-size images.
After being decoded, obtains by the APNG file transparent information of RGB picture frame pixel, this transparent information is inserted into transmission in the lump in the video data that comprises RGB picture frame content, make the transparent information of the rgb value of rgb value, display position background pixel point of the pixel that terminal can comprise the RGB picture frame and pixel carry out ALPHA and mix output, demonstrate and have the APNG file dynamic image that enriches transparent effect.Therefore, content supplier can develop the APNG file that content is abundanter, picture is more gorgeous, has improved the picture quality of the APNG file dynamic image that the user watches, has promoted the application of multimedia digital content in the digital television system field.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of front-end processing method of the present invention;
Fig. 2 is the schematic flow sheet of terminal processing method of the present invention;
Fig. 3 is the structural representation of front end processing device of the present invention;
Fig. 4 is the structural representation of terminal processes device of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills obtained belongs to the scope of protection of the invention.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
APNG is a kind of bitmap animated format based on PNG (Portable Network Graphics), can comprise several coloured images in the APNG file, and a width of cloth coloured image is a basic picture frame.First frame of picture frame is the single width PNG image of a standard among the APNG, and the multiple image frame in the APNG file is shown on the screen continuously, has just obtained animation effect, and the frame per second of picture frame is high more, and the animation effect that obtains is just smooth more.
The front end of the embodiment of the invention comprises mainly that to the processing method of APNG file APNG file decoding, RGB picture frame change in YUV picture frame, video coding and the RGB image steps such as pixel transparent information insertion.
With reference to shown in Figure 1, below the front-end processing method of the embodiment of the invention is done detailed explanation.
S101) the APNG file is decoded, obtain the transparent information of RGB picture frame and RGB picture frame pixel.
The APNG standard definition APNG file include file global information, image frame information.Wherein, global information comprises file signature territory, file header data block, animation controll block and image end block, and image frame information comprises control information and each two field picture frame data piece of each frame.The picture frame that is comprised in the APNG file is that the RGB picture frame is included in the image frame data piece.
In addition, the transparent information that also includes RGB picture frame pixel in the image frame data piece.This transparent information is represented by the transparent channel value (Alpha) of one 8 bit of use or 16 bits.If the transparent channel value is 8 bits, be 0-255 in the span of transparent channel value, represent different transparencies respectively.0 is that full impregnated is bright, and 255 for opaque fully, is in various degree transparent between 0 to 255.If the transparent channel value is 16 bits, then provide more transparency.By using the transparent channel value, the dynamic image of APNG file can have abundant transparent effect.
Therefore, according to the APNG format standard APNG file is decoded the transparent information of RGB picture frame that can obtain comprising in the video data block and RGB picture frame pixel at front end.
S102) the RGB picture frame is converted to the YUV picture frame;
According to the requirement of video coding, needing the RGB color space conversion before carrying out video coding is the YUV color space that television system is used, and obtains the YUV picture frame." Y " expression brightness in the YUV picture frame, " U " and " V " represents colourity.For the YUV picture frame, the complete description of a color image is represented by brightness value Y and two chrominance C b, Cr.RGB is to realize according to the conversion formula of standard definition to the conversion of YUV.
Brightness value Y, by R, G, the weighted average of B obtains:
Y=krR+kgG+kbB, kr, kg, kb are weighted factors, by standard code.
Chrominance C b, Cr is represented by different color distinction:
Cb=B-Y
Cr=R-Y
During specific implementation, the RGB picture frame is converted to the YUV picture frame can goes out the YUV value by different algorithm computation.For obtaining higher conversion efficiency, also can obtain the YUV value of rgb value correspondence by rgb value query conversion table by pre-establishing conversion table.
The RGB picture frame is being converted in the process of YUV picture frame, is usually also needing delay time control YUV picture frame number of repetition, making the variation of the YUV picture frame picture after the conversion have better continuity according to the RGB picture frame.
Before the RGB picture frame is converted to the YUV picture frame, may also need the size of the RGB picture frame before changing to be adjusted, to make things convenient for video coding according to video encoding standard.The video encoding standard that digital television system adopts can be the MPEG-2 video encoding standard that dynamic image professional association (Moving Pictures Experts Group) is formulated.The MPEG-2 video encoding standard also is the current widely used video encoding standard of China's digital television system.Because the MPEG2 video image is that the pixel size with 16*16 is that unit encodes, therefore,, then can't obtain the integer unit of encoding if the length and width of picture frame can not be divided exactly by 16 pixels.To this, common processing method is that the size of RGB picture frame is adjusted, and the wide height that is about to the RGB picture frame extends to and can be divided exactly by 16 pixels.
Except that the MPEG-2 video encoding standard, H.264 video encoding standard also is a kind of video encoding standard that is widely used.H.264 video image also is that the pixel size with 16*16 is that unit does compression, therefore if default video encoding standard for H.264, also need the size of RGB picture frame is adjusted, method of adjustment is that the wide height with the RGB picture frame extends to and can be divided exactly by 16 pixels.
S103) according to default video encoding standard the YUV picture frame is carried out video coding and obtain video data.
Finishing the RGB picture frame after the conversion of YUV picture frame, at the specific video coding standard, adopt the video coding instrument of this standard, produce the encoding code stream that meets this video encoding standard regulation.If default video encoding standard is the MPEG-2 video encoding standard, then adopt the MPEG-2 encoder that the YUV picture frame is carried out the MPEG-2 video coding, obtain the MPEG-2 video flowing.
If default video encoding standard is video encoding standard H.264, can adopt then H.264 that encoder carries out H.264 video coding with the YUV picture frame, obtain H.264 video flowing.
S104) transparent information of RGB picture frame pixel is inserted in the video data that described video coding obtains.
In an embodiment of the present invention, need to utilize digital television system front end that the RGB picture frame is carried out conversion process and carries out video coding in the subsequent step, but conversion process and video coding process are not preserved the transparent information of RGB picture frame pixel, therefore, have the APNG file dynamic image that enriches transparent effect for demonstrating in terminal, need carry out special processing to the transparent information of the RGB picture frame pixel of acquisition after decoding, make terminal can obtain this transparent information and be used for image to show.
Be inserted in the video data behind the coding by transparent information and send in the lump RGB picture frame pixel, terminal can extract this transparent information from the video data that receives, and carry out ALPHA with the rgb value of the rgb value of RGB picture frame pixel and display position background pixel point and mix, thereby show the APNG file dynamic image that has transparent effect.Because different video standards has defined the field that different Gong users expands to be needed, therefore can utilize these fields to transmit the transparent information of RGB picture frame pixel, and this class field of video standard definition is at each frame image data, be that the carry-on user of each frame image data is from the information of filling, therefore utilize the transparent information that in this field, inserts RGB picture frame pixel, video content can be do not destroyed, and the precise synchronization with picture frame can be realized.
For the MPEG-2 video encoding standard, this standard has defined 3 spread user datas (Extension_and_user_data) field in the MPEG-2 video data format, wherein spread user data 2 (Extension_and_user_data (2)) is relevant with picture frame, can be used to insert the transparent information of RGB picture frame pixel.For video encoding standard H.264, H.264 standard can be used to insert the transparent information of RGB picture frame pixel H.264 having defined and can expand auxiliary enhancing information (the Supplemental Enhancement Information) field that needs for the user in the video data format.
Therefore, for the digital television system that adopts the MPEG-2 video encoding standard, front end is after the video coding of finishing the YUV picture frame obtains video data, and the transparent information of the RGB picture frame pixel that obtains decoding is inserted into the spread user data field 2 in the video data.If adopt H.264 video encoding standard, then after the video coding of finishing the YUV picture frame obtains video data, the transparent information of RGB picture frame pixel is inserted into auxiliary enhancing information field in the video data.
Though above-mentioned two kinds of concrete video standards do not carry out the restriction of length to this type of field, during specific implementation, can before inserting, compress processing by the transparent information to RGB picture frame pixel, save bandwidth.
S105) send described video data.
After front end will adopt coding standard to finish coding, the video data behind the coding is sent to terminal.
In the present embodiment, the video data received of end-on is mainly finished rgb value that extraction, video data decoding, the conversion YUV picture frame of the transparent information of RGB picture frame pixel are the pixel that comprises of RGB picture frame, RGB picture frame and transparent information mixed display of pixel etc.
Referring to shown in Figure 2, below the terminal processing method of the embodiment of the invention is done detailed explanation.
S201) receiving front-end is according to step S105) video data that sends.
Terminal receives the video data that comprises APNG file dynamic image content that sends according to aforementioned front-end processing method.
S202) transparent information of extraction RGB picture frame pixel from described video data.
Terminal reads the transparent information of the RGB picture frame pixel of front end insertion for the video data that receives from video data according to the video data encoding standard.
For the video data that adopts MPEG-2 video encoding standard coding, from spread user data field 2, read the transparent information of RGB picture frame pixel.
For adopting the H.264 video data of video encoding standard coding, from the auxiliary transparent information that reads RGB picture frame pixel the information field that strengthens.。
Handle if front end has carried out compression before inserting this transparent information, extract the transparent information of RGB picture frame pixel from above-mentioned field after, also need to carry out corresponding decompression.
S203) according to the decoding standard of described video encoding standard correspondence described video data is decoded and obtain the YUV picture frame.
After terminal receives video data, can adopt the chip that comprises decoder module to finish, promptly adopt hard decoder video data decoding.The advantage of hard decoder is exactly the efficient height, and is low in energy consumption, and on the other side be soft decoding, just carry out video data decoding with CPU.Carry out special processing by picture frame with the APNG file, and adopt video encoding standard that the picture frame after handling is carried out video coding, make terminal to adopt hard decoder to this video data, reduced the taking of cpu resource, also avoided because cpu resource is not enough and can not the high frame per second of real-time decoding and the dynamic image that caused of large-size images APNG file show discontinuous.
At different video encoding standards, defined corresponding with it decoding standard in the standard and be used for decode video data.Terminal can adopt the decoder module chip that comprises corresponding decoding standard, and the video data that receives is carried out hard decoder, obtains the YUV picture frame.For use the MPEG-2 or the video data of coding standard coding H.264, use respectively support MPEG-2 or H.264 the decoding module chip video data that receives is decoded.In fact, there has been at present multiple decoder module chip to support MPEG-2 and H.264 decoding simultaneously.
S204) the YUV picture frame is converted to the RGB picture frame.
After obtaining decoded YUV picture frame, the YUV color space conversion need be returned the RGB color space, obtain the RGB picture frame.The method of conversion is S102) in the inverse process of conversion method.Here no longer describe in detail.
Similarly, during specific implementation, the YUV picture frame is converted to the RGB picture frame can go out rgb value by different algorithm computation.For obtaining higher conversion efficiency, also can obtain the corresponding rgb value of YUV value by YUV value query conversion table by pre-establishing conversion table.
S205) rgb value of the rgb value of the pixel that the RGB picture frame is comprised, display position background pixel point carries out ALPHA with the transparent information of RGB picture frame pixel and mixes, and output shows.
It is a kind of image processing techniques of mixing source pixel and object pixel that ALPHA mixes, and the image that picture frame is comprised, the background transparent information corresponding with image of display position carry out ALPHA and mix, and make the image generation transparent effect of demonstration.In the present embodiment, the rgb value of each pixel and the rgb value of this display position background pixel point have been comprised in the RGB picture frame, therefore rgb value that can be by pixel that the RGB picture frame is comprised, the rgb value of display position background pixel point carry out ALPHA with the transparent information of pixel and mix, and export demonstration and have the APNG file dynamic image that enriches transparent effect.In the specific implementation, can carry out the mixed processing of image by the first floor system of set-top box, and output on color television set or other display equipment, demonstrate the APNG file dynamic image that has transparent effect.
With reference to shown in Figure 3, this figure is the front end processing device of the described APNG file of the embodiment of the present application in digital television system.
The 301 pairs of APNG files in APNG file decoding unit are decoded, and obtain the transparent information of RGB picture frame and RGB picture frame pixel.According to the APNG file structure of APNG standard definition, decode to the APNG file in APNG file decoding unit, obtains the image frame data piece.The transparent information that comprises RGB picture frame and RGB picture frame pixel in the image frame data piece.
RGB to YUV converting unit 302 is converted to the YUV picture frame with the RGB picture frame.RGB to YUV converting unit realizes according to the conversion formula of standard definition.During specific implementation, can be calculated the YUV value by different algorithms, perhaps the conversion table by pre-establishing is looked into conversion table by rgb value and is obtained realizing for the YUV value.The RGB picture frame is being converted in the process of YUV picture frame, RGB to YUV converting unit also needs according to the delay time of RGB picture frame control YUV picture frame number of repetition, makes the variation of the YUV picture frame picture after the conversion have better continuity.
Before the RGB picture frame is converted to the YUV picture frame, may also need the size of the RGB picture frame before changing to be adjusted according to video encoding standard, to make things convenient for video coding, therefore, can further increase RGB frame sign adjustment unit, be used for the size of RGB picture frame being adjusted according to default video encoding standard.If default video encoding standard is MPEG-2, then RGB frame sign adjustment unit extends to the wide height of RGB picture frame can be divided exactly by 16 pixels.If use H.264 video encoding standard, according to the characteristics of compression H.264, RGB frame sign adjustment unit method of adjustment also is that the wide height with the RGB picture frame extends to and can be divided exactly by 16 pixels.
Video encoding unit 303 carries out video coding according to default video encoding standard to the YUV picture frame and obtains video data.Video encoding unit can adopt the specific video coding tools, produces the encoding stream that meets the video encoding standard regulation.For the MPEG-2 video encoding standard, adopt the MPEG-2 encoder that the YUV picture frame is carried out the MPEG-2 video coding, obtain the MPEG-2 video flowing.In like manner,, can adopt then H.264 that encoder carries out H.264 video coding with the YUV picture frame, obtain H.264 video flowing for video encoding standard H.264.
Transparent information inserts unit 304 transparent information of RGB picture frame pixel is inserted in the video data behind the described video coding.For the MPEG-2 video encoding standard, after the video coding of finishing the YUV picture frame obtains video data, the transparent information of RGB picture frame pixel is inserted into spread user data field 2 in the video data.If adopt H.264 video encoding standard, then after the video coding of finishing the YUV picture frame obtains video data, the transparent information of RGB picture frame pixel is inserted into auxiliary enhancing information field in the video data.
For saving bandwidth, can further increase the transparent information compression unit, be used for the transparent information of RGB picture frame pixel is compressed processing.Transparent information inserts in the video data after the transparent information that will compress the RGB picture frame pixel after the processing in the unit is inserted into described video coding.
Video data sends unit 305 and sends described video data.
In the present embodiment, the terminal of digital television system can be a digital TV set-top box.Digital TV set-top box is a kind ofly to convert digital television signal the conversion equipment of analog signal to, is to use the family to watch digital television program and digital TV in high resolution program by enough original simulated televisions.
Referring to shown in Figure 4, this figure is the terminal processes device of the described APNG file of the embodiment of the present application in digital television system.
The video data that video data receiving element 401 receiving front-end processing unit send.
Transparent information extraction unit 402 extracts the transparent information of RGB picture frame pixel from the video data that the video data receiving element receives.The transparent information extraction unit reads the transparent information of the RGB picture frame pixel of front end insertion from video data according to the video data encoding standard:
For the video data that adopts MPEG-2 video encoding standard coding, the transparent information extraction unit reads the transparent information of RGB picture frame pixel from spread user data field 2; For adopting the H.264 video data of video encoding standard coding, the transparent information extraction unit is from the auxiliary transparent information that reads RGB picture frame pixel the information field that strengthens.
Handle if front end has carried out compression before inserting this transparent information, behind the transparent information that extracts from above-mentioned field, also need to carry out corresponding decompression.
Video encoding unit 403 is decoded to video data according to the decoding standard of video data encoding standard correspondence and is obtained the YUV picture frame.In the specific implementation, video decoding unit can be for comprising the chip of decoder module.Because front end employing video encoding standard is carried out video coding to the picture frame of APNG file, make terminal to carry out hard decoder to this video data by video decoding unit, avoided using CPU that the APNG file decoded and bring to the taking of cpu resource, and when the cpu resource deficiency, caused can not real-time decoding and the picture that occurs is discontinuous.For using the MPEG-2 or the video data of coding standard coding H.264, terminal can adopt the decoder module chip that comprises corresponding decoding standard, and the video data that receives is carried out hard decoder, obtains the YUV picture frame.In fact, there has been at present multiple decoder module chip to support MPEG-2 and H.264 decoding simultaneously.
YUV to RGB converting unit 404 is used for the YUV picture frame is converted to the RGB picture frame.The YUV picture frame that the back of decoding obtains is changed, be converted to the RGB picture frame by the YUV picture frame.During specific implementation, YUV to RGB converting unit can be calculated rgb value by different algorithms, perhaps by pre-establishing conversion table, obtains rgb value by looking into conversion table.
After obtaining the RGB picture frame, owing to comprised the rgb value of each pixel and the rgb value of this display position background pixel point in the RGB picture frame, therefore the rgb value that mixes rgb value, the display position background pixel point of the pixel that output display unit 405 comprises the RGB picture frame carries out ALPHA with the transparent information of RGB picture frame pixel to be mixed, and exports demonstration.Mix and export the first floor system module that display unit can comprise digital TV set-top box, this module is finished the rgb value of the pixel that the RGB picture frame comprises, the rgb value of display position background pixel point mixes with the ALPHA of the transparent information of RGB picture frame pixel, obtain having the image of transparent effect, and the output demonstration, present to the dynamic image that the user has the APNG file of transparent effect.
More than processing method and the device of a kind of APNG file provided by the present invention in digital television system is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part in specific embodiments and applications all can change.In sum, this description should not be construed as limitation of the present invention.

Claims (13)

1. the front-end processing method of an APNG file in digital television system is characterized in that, comprising:
Dynamic portable network figure APNG file is decoded, obtain the transparent information of RGB picture frame and RGB picture frame pixel;
The RGB picture frame is converted to the YUV picture frame;
According to default video encoding standard the YUV picture frame is carried out video coding and obtain video data;
The transparent information of RGB picture frame pixel is inserted in the described video data;
Send described video data.
2. method according to claim 1 is characterized in that, described the APNG file is decoded, and obtains the transparent information of RGB picture frame and RGB picture frame pixel, also comprises:
Transparent information to described RGB picture frame pixel compresses processing;
Described transparent information with RGB picture frame pixel is inserted in the described video data, comprising: the transparent information that will compress the RGB picture frame pixel after handling is inserted in the described video data.
3. method according to claim 1 is characterized in that, described default video encoding standard is the MPEG-2 of dynamic image expert group video encoding standard or video encoding standard H.264.
4. method according to claim 3 is characterized in that, described default video encoding standard is the MPEG-2 video encoding standard;
Describedly according to default video encoding standard the YUV picture frame is carried out video coding and obtain video data and comprise: according to the MPEG-2 video encoding standard YUV picture frame being encoded obtains video data;
Described transparent information with RGB picture frame pixel is inserted in the described video data, comprising: the transparent information of RGB picture frame pixel is inserted into spread user data field in the described video data.
5. method according to claim 3 is characterized in that, described default video encoding standard is video encoding standard H.264;
Describedly according to default video encoding standard the YUV picture frame is carried out video coding and obtain video data and comprise: according to video encoding standard H.264 the YUV picture frame being encoded obtains video data;
Described transparent information with RGB picture frame pixel is inserted in the described video data, comprising: the transparent information of RGB picture frame pixel is inserted into auxiliary enhancing information field in the described video data.
6. the terminal processing method of an APNG file in digital television system is characterized in that, comprising:
The video data that receiving front-end sends in accordance with the method for claim 1;
From described video data, extract the transparent information of RGB picture frame pixel;
According to the decoding standard of described video encoding standard correspondence described video data is decoded and to obtain the YUV picture frame;
The YUV picture frame is converted to the RGB picture frame;
The rgb value of the pixel that described RGB picture frame is comprised, the rgb value of display position background pixel point carry out ALPHA with the transparent information of RGB picture frame pixel and mix, and output shows.
7. method according to claim 6 is characterized in that, described the APNG file is decoded, and obtains the transparent information of RGB picture frame and RGB picture frame pixel, and also comprise: the transparent information to described RGB picture frame pixel compresses processing;
The transparent information of the described RGB picture frame pixel that extracts from video data is the transparent information after overcompression is handled, and further comprises: the transparent information to the RGB picture frame pixel that extracts decompresses;
The rgb value of the described pixel that the RGB picture frame is comprised, the rgb value of display position background pixel point carry out ALPHA with the transparent information of RGB picture frame pixel and mix, and output shows, comprise: the rgb value of the pixel that the RGB picture frame is comprised, the rgb value of display position background pixel point and decompress after transparent information mix, and output shows.
8. the front end processing device of an APNG file in digital television system is characterized in that, comprising:
APNG file decoding unit is used for the APNG file is decoded, and obtains the transparent information of RGB picture frame and RGB picture frame pixel;
RGB to YUV converting unit is used for the RGB picture frame is converted to the YUV picture frame;
Video encoding unit is used for according to default video encoding standard the YUV picture frame being carried out video coding;
Transparent information inserts the unit, is used for the video data after transparent information with RGB picture frame pixel is inserted into described video coding;
Video data sends the unit, is used to send described video data.
9. device according to claim 8 is characterized in that, further comprises:
The transparent information compression unit is used for the transparent information of described RGB picture frame pixel is compressed processing;
Described transparent information inserts the unit, and the transparent information of the RGB picture frame pixel after being used for will compression handling is inserted into the video data behind the described video coding.
10. device according to claim 8 is characterized in that, described default video encoding standard is the MPEG-2 of dynamic image expert group video encoding standard or video encoding standard H.264.
11. device according to claim 10 is characterized in that, described default video encoding standard is the MPEG-2 video encoding standard;
Described video encoding unit, being used for according to the MPEG-2 video encoding standard YUV picture frame being encoded obtains video data;
Described transparent information inserts the unit, is used for the transparent information of RGB picture frame pixel is inserted into the spread user data field of described video data.
12. device according to claim 10 is characterized in that, described default video standard is video standard H.264;
Described video encoding unit, being used for according to video encoding standard H.264 the YUV picture frame being encoded obtains video data;
Described transparent information inserts the unit, is used for the transparent information of RGB picture frame pixel is inserted into the auxiliary enhancing information field of described video data.
13. the terminal processes device of an APNG file in digital television system is characterized in that, comprising:
The video data receiving element is used for the video data that receiving front-end sends according to the described device of claim 8;
The transparent information extraction unit is used for from the transparent information of described video data extraction RGB picture frame pixel;
Video decoding unit, being used for according to the decoding standard of video data encoding standard correspondence video data being decoded obtains the YUV picture frame;
YUV to RGB converting unit is used for the YUV picture frame is converted to the RGB picture frame;
Mix the output display unit, the rgb value that is used for rgb value, the display position background pixel point of pixel that described RGB picture frame is comprised carries out ALPHA with the transparent information of RGB picture frame pixel to be mixed, and exports demonstration.
CN201110176015XA 2011-06-27 2011-06-27 Animated portable network graphics (APNG) file processing method and device for digital television system Pending CN102231834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110176015XA CN102231834A (en) 2011-06-27 2011-06-27 Animated portable network graphics (APNG) file processing method and device for digital television system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110176015XA CN102231834A (en) 2011-06-27 2011-06-27 Animated portable network graphics (APNG) file processing method and device for digital television system

Publications (1)

Publication Number Publication Date
CN102231834A true CN102231834A (en) 2011-11-02

Family

ID=44844360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110176015XA Pending CN102231834A (en) 2011-06-27 2011-06-27 Animated portable network graphics (APNG) file processing method and device for digital television system

Country Status (1)

Country Link
CN (1) CN102231834A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630787A (en) * 2014-10-28 2016-06-01 腾讯科技(深圳)有限公司 Animation implementation method and device based on dynamic portable network graphics
CN105959724A (en) * 2016-05-24 2016-09-21 腾讯科技(深圳)有限公司 Video data processing method and device
CN106204672A (en) * 2016-08-03 2016-12-07 深圳市创梦天地科技有限公司 Texture compression document generating method
CN115022713A (en) * 2022-05-26 2022-09-06 京东科技信息技术有限公司 Video data processing method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060256380A1 (en) * 2005-05-10 2006-11-16 Klassen Gary D Transparent digital images and method of processing and storing same
CN101742317A (en) * 2009-12-31 2010-06-16 北京中科大洋科技发展股份有限公司 Video compressing and encoding method with alpha transparent channel
CN101945273A (en) * 2009-07-01 2011-01-12 雅马哈株式会社 Compression-encoding device and Visual Display control device
CN102036059A (en) * 2009-09-25 2011-04-27 腾讯科技(深圳)有限公司 Method, device and system for compressing and decompressing transparent images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060256380A1 (en) * 2005-05-10 2006-11-16 Klassen Gary D Transparent digital images and method of processing and storing same
CN101945273A (en) * 2009-07-01 2011-01-12 雅马哈株式会社 Compression-encoding device and Visual Display control device
CN102036059A (en) * 2009-09-25 2011-04-27 腾讯科技(深圳)有限公司 Method, device and system for compressing and decompressing transparent images
CN101742317A (en) * 2009-12-31 2010-06-16 北京中科大洋科技发展股份有限公司 Video compressing and encoding method with alpha transparent channel

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630787A (en) * 2014-10-28 2016-06-01 腾讯科技(深圳)有限公司 Animation implementation method and device based on dynamic portable network graphics
CN105630787B (en) * 2014-10-28 2020-09-11 腾讯科技(深圳)有限公司 Animation realization method and device based on dynamic portable network graphics
CN105959724A (en) * 2016-05-24 2016-09-21 腾讯科技(深圳)有限公司 Video data processing method and device
CN105959724B (en) * 2016-05-24 2020-08-25 腾讯科技(深圳)有限公司 Video data processing method and device
CN106204672A (en) * 2016-08-03 2016-12-07 深圳市创梦天地科技有限公司 Texture compression document generating method
CN115022713A (en) * 2022-05-26 2022-09-06 京东科技信息技术有限公司 Video data processing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN102119532B (en) Color gamut scalability techniques
CN102231836B (en) Graphics interchange format (GIF) file processing method and device for digital television system
CN105191304B (en) Image encoding method and device and relevant picture decoding method and device according to pixel data execution position flat scanning coding
JP7340659B2 (en) Method and apparatus for reconstructing image data from decoded image data
CN101491103B (en) Method and apparatus for encoder assisted pre-processing
RU2758035C2 (en) Method and device for reconstructing image data by decoded image data
CN101394569B (en) Error tolerance method, device and chip for AVS video decoder
CN107211130A (en) The method and apparatus coded and decoded to colour picture
CN102761738A (en) Image compression method and device on basis of mixed chromaticity sampling rate
CN101778246A (en) Method and device for processing multipicture video image
US11070830B2 (en) Coding and decoding method with color conversion and corresponding devices
CN110636305B (en) Image rendering and encoding method and related device
US11062432B2 (en) Method and device for reconstructing an HDR image
WO2018178367A1 (en) Method and device for color gamut mapping
CN102497388A (en) Mobile network terminal and method for wireless screen content transmission between such terminal and TV
WO2018197263A1 (en) Method and device for color gamut mapping
JP6980054B2 (en) Methods and equipment for processing image data
CN102231834A (en) Animated portable network graphics (APNG) file processing method and device for digital television system
CN107396002B (en) A kind of processing method and mobile terminal of video image
CN110049347B (en) Method, system, terminal and device for configuring images on live interface
KR100839504B1 (en) Method of decoding an image, image decoder performing the same, and mobile device having the same
CN101188765A (en) Method and apparatus for encoding and decoding RGB image
US11638040B2 (en) Eco-friendly codec-based system for low latency transmission
CN110798705A (en) Video image transmission method, device and equipment
CN104780390A (en) Video processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1162798

Country of ref document: HK

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111102

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1162798

Country of ref document: HK