CN103841389A - Video playing method and player - Google Patents
Video playing method and player Download PDFInfo
- Publication number
- CN103841389A CN103841389A CN201410131609.2A CN201410131609A CN103841389A CN 103841389 A CN103841389 A CN 103841389A CN 201410131609 A CN201410131609 A CN 201410131609A CN 103841389 A CN103841389 A CN 103841389A
- Authority
- CN
- China
- Prior art keywords
- terminal equipment
- video
- data
- cpu
- gpu
- 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.)
- Granted
Links
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
An embodiment of the invention discloses a video playing method and a player. The video playing method comprises the steps of receiving video stream data; sending the received video stream data to a CPU of a terminal device and controlling the CPU of the terminal device to decode the video stream data to obtain the video data in a YUV format; controlling the CPU of the terminal device to send the video data in a YUV format obtained through decoding to a GPU of the terminal device and controlling the GPU of the terminal device to perform chroma spatial conversion on the video data in a YUV format to obtain the video data in an RGB format; controlling the GPU of the terminal device to display the obtained video data in an RGB format. Therefore, the GPU is utilized to share tasks of chroma spatial conversion and playing of the CPU, the occupancy rate of the CPU can be reduced, accordingly, power consumption of the terminal device is reduced, and service life of the terminal device is prolonged.
Description
Technical field
The present invention relates to multimedia information technique field, particularly a kind of video broadcasting method and player.
Background technology
Along with the development of Internet technology and multimedia technology, watch video to become a lot of people's habits and customs by multiple terminal equipment.At present, user can open by the browser in terminal equipment the page of video website, and the corresponding video player of this page invocation is the online displaying video of user; The client software that user also can directly open a terminal in equipment, this client software calls corresponding video player and broadcasts the online displaying video into user.
In prior art, the process of the online displaying video of video player is generally: the video stream data that reception server transmits, the video stream data receiving is decoded, decoded data format is yuv format, then the data of yuv format are carried out to chrominance space conversion, the data format after conversion is rgb format, then the data of rgb format are shown, thereby realize the online broadcasting of video, wherein YUV and RGB are two kinds of different colour coding methods.
But in prior art, decoding to video stream data and chrominance space conversion process are all at CPU(Central Processing Unit, central processing unit) on carry out, wherein, the data that the data of yuv format are converted into rgb format can make the occupancy of CPU too high, the too high meeting of CPU usage brings the problem that terminal equipment power consumption is large, and can cause terminal equipment overheated, shortens the useful life of terminal equipment.
Summary of the invention
In order to address the above problem, the embodiment of the invention discloses a kind of video broadcasting method and player, concrete technical scheme is as follows:
A kind of video broadcasting method, comprising:
Receiver, video flow data;
By received video stream data, send to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtain the video data of yuv format;
Control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format;
The GPU that controls described terminal equipment shows the video data of obtained rgb format.
Preferably, the video data of the yuv format that the CPU of the described terminal equipment of described control obtains decoding, sends to the GPU of described terminal equipment, comprising:
Obtain after the video data of yuv format, directly control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment.
Preferably, the video data of the yuv format that the CPU of the described terminal equipment of described control obtains decoding, sends to the GPU of described terminal equipment, comprising:
Obtain after the video data of yuv format, judge whether to meet pre-conditioned, if so, control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment.
Preferably, described in judge whether to meet pre-conditioned, specifically comprise:
Detect the CPU usage of described terminal equipment, judge whether described CPU usage is greater than preset value, if so, determine meet pre-conditioned.
Preferably, described in judge whether to meet pre-conditioned, specifically comprise:
Obtain the frame per second of video stream data;
Detect the video decode frame number of described video stream data in the unit interval;
Judge whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, if so, determine meet pre-conditioned.
Preferably, described in obtain the frame per second of video stream data, comprising:
Before video stream data not being decoded, obtain the frame per second of video stream data;
Or,
After video stream data is started to decode, and before decision operation, obtain the frame per second of video stream data, described decision operation is: judge whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data.
Preferably, the GPU of the described terminal equipment of described control shows the video data of obtained rgb format, specifically comprises:
The GPU that controls described terminal equipment shows the video data of obtained rgb format according to default broadcasting speed.
A kind of player, this player comprises:
Receiver module, for receiver, video flow data;
Decoder module, for by received video stream data, sends to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtains the video data of yuv format;
Color space convert module, the video data of yuv format decoding being obtained for the CPU that controls described terminal equipment, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format;
Display module, shows the video data of obtained rgb format for the GPU that controls described terminal equipment.
Preferably, described color space convert module, comprising:
First sends submodule, for after the decoding of described decoder module obtains the video data of yuv format, directly controls the video data of the yuv format that the CPU of described terminal equipment obtains decoding, sends to the GPU of described terminal equipment;
The first conversion submodule, carries out color space convert for the GPU that controls described terminal equipment to the described first video data that sends the yuv format that submodule sends, and obtains the video data of rgb format.
Preferably, described color space convert module, comprising:
Judge submodule, for after described decoder module decoding obtains the video data of yuv format, judge whether to meet pre-conditioned;
Second sends submodule, for when the described judged result that judges submodule is when being, controls the video data of the yuv format that the CPU of described terminal equipment obtains decoding, sends to the GPU of described terminal equipment;
The second conversion submodule, carries out color space convert for the GPU that controls described terminal equipment to the described second video data that sends the yuv format that submodule sends, and obtains the video data of rgb format.
Preferably, described judgement submodule specifically comprises:
The first detection sub-unit, for detection of the CPU usage of described terminal equipment;
The first judgment sub-unit, for judging whether described CPU usage is greater than preset value, if so, determine meet pre-conditioned.
Preferably, described judgement submodule specifically comprises:
Obtain subelement, for obtaining the frame per second of video stream data;
The second detection sub-unit, for detection of the video decode frame number of described video stream data in the unit interval;
The second judgment sub-unit, for judging whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, if so, determine meet pre-conditioned.
Preferably, described in obtain subelement, specifically for:
Before described decoder module is not decoded to video stream data, obtain the frame per second of video stream data;
Or,
After described decoder module is decoded to video stream data, and before described the second judgment sub-unit starts decision operation, obtain the frame per second of video stream data.
Preferably, described display module, specifically for:
The GPU that controls described terminal equipment shows the video data of obtained rgb format according to default broadcasting speed.
Application technique scheme, the CPU of terminal equipment completes after the decoding of video stream data, the embodiment of the present invention can meet pre-conditioned after, or the video data of the yuv format that directly CPU of control terminal obtains decoding, send to the GPU of terminal equipment, and the GPU of control terminal carries out color space convert to the video data of yuv format, GUP directly shows the video data of obtained rgb format; Compared with prior art, due to GPU, to have dominant frequency low, the advantage that amount of calculation is large, the embodiment of the present invention utilizes GPU to share the task of CPU color space convert and broadcasting, can reduce CPU usage, thereby reduce the power consumption of terminal equipment, extend the useful life of terminal equipment.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The first flow chart of a kind of video broadcasting method that Fig. 1 provides for the embodiment of the present invention;
The second flow chart of a kind of video broadcasting method that Fig. 2 provides for the embodiment of the present invention;
The third flow chart of a kind of video broadcasting method that Fig. 3 provides for the embodiment of the present invention;
Fig. 4 is the first flow chart of S303 as shown in Figure 3;
Fig. 5 is the second flow chart of S303 as shown in Figure 3;
The structural representation of a kind of player that Fig. 6 provides for the embodiment of the present invention;
Fig. 7 is the first structural representation of module 603 as shown in Figure 6;
Fig. 8 is the second structural representation of module 603 as shown in Figure 6;
Fig. 9 is the first structural representation of module 603c as shown in Figure 8;
Figure 10 is the second structural representation of module 603c as shown in Figure 8.
Embodiment
First a kind of video broadcasting method embodiment of the present invention being provided describes, and the method is applied in the terminal equipment that comprises central processor CPU, graphic process unit GPU, can comprise:
Receiver, video flow data;
By received video stream data, send to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtain the video data of yuv format;
Control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format;
The GPU that controls described terminal equipment shows the video data of obtained rgb format.
Apply technical scheme provided by the invention, the CPU of terminal equipment completes after the decoding of video stream data, the embodiment of the present invention can meet pre-conditioned after, or the video data of the yuv format that directly CPU of control terminal obtains decoding, send to the GPU of terminal equipment, and the GPU of control terminal carries out color space convert to the video data of yuv format, GUP directly shows the video data of obtained rgb format; Compared with prior art, due to GPU, to have dominant frequency low, the advantage that amount of calculation is large, the embodiment of the present invention utilizes GPU to share the task of CPU color space convert and broadcasting, can reduce CPU usage, thereby reduce the power consumption of terminal equipment, extend the useful life of terminal equipment.
In order to make those skilled in the art understand better the technical scheme in the present invention, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
For in video display process, reduce the CPU usage of this terminal equipment, thereby reduce the power consumption of terminal equipment, extend the useful life of terminal equipment, the embodiment of the present invention provides a kind of video broadcasting method and player.
First a kind of video broadcasting method embodiment of the present invention being provided is below introduced.
It should be noted that, a kind of video broadcasting method that the embodiment of the present invention provides is applicable in terminal equipment, and in actual applications, this terminal equipment can be: vehicle-mounted computer, mobile phone, Set Top Box, notebook computer or desktop computer etc.
As shown in Figure 1, a kind of video broadcasting method, is applied in the terminal equipment that comprises central processor CPU, graphic process unit GPU, can comprise:
S101, receiver, video flow data.
Player in terminal equipment can receive the video stream data from server side, and " video stream data " described in the embodiment of the present invention can be the stream medium data of processing through coding, and the embodiment of the present invention is not restricted this.
S102, by received video stream data, sends to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtains the video data of yuv format.
" YUV " described in the embodiment of the present invention is a kind of colour coding method that eurovision system adopts, and is mainly used in optimizing the transmission of colour-video signal, and wherein, Y represents brightness, and U, V represent aberration, and brightness and aberration are two components that form color.
It should be noted that, color picture signal, through color separation, respectively after amplification correction, obtains RGB image, then obtains brightness signal Y and two color difference signal U and V through matrixer, last transmitting terminal is encoded brightness and 3 signals of aberration respectively, sends with unified channel.
Because the video stream data receiving is the video data through the yuv format of coding processing, the player of this terminal equipment can be by received video stream data, send to the CPU of this terminal equipment, and the CPU that controls this terminal equipment decodes to received video stream data, obtain the video data of yuv format.
While watching TV play such as user online by mobile phone, the player in mobile phone obtains video data endlessly from network video server side, and the CPU of player control mobile phone decodes to the video data getting, and obtains the video data of yuv format.
S103, control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format.
" RGB " described in the embodiment of the present invention is a kind of method that color is encoded, and is that the stack between mutually obtains color miscellaneous by the variation to red (R), green (G), blue (B) three Color Channels and they.
It should be noted that, represent that by RGB three primary colors color is really very directly perceived, if but this method is used as to image transmitting, there is following shortcoming: first shortcoming is to take too many bandwidth, with RGB trichromatic specification image, the bandwidth of R, G, tri-components of B is impartial, all approximate the bandwidth of brightness Y, so each component needs larger bandwidth to describe; Second shortcoming is poor anti jamming capability, because G component occupies 59% of brightness value, so in the time that G is interfered, pixel brightness value can be greatly affected, and human eye is very responsive to the variation of brightness value, so image subjective quality can obviously decline.For these reasons, in video signal transmission, conventionally adopt the synthetic method of YUV.
" color space convert " described in the embodiment of the present invention is exactly the video data that the video data of yuv format is converted to rgb format in essence, and wherein, the conversion formula of YUV and RGB can be:
Y=0.299R+0.587G+0.114B
U=-0.147R+0.289G+0.436B
V=0.615R-0.515G-0.100B。
Be understandable that, current display mostly adopts RGB color standard, such as color display on display, is to beat by electron gun the image that produces color at the red, green, blue three-colour light-emitting of screen on extremely.
Based on the above-mentioned fact, CPU at this terminal equipment decodes to received video stream data, after obtaining the video data of yuv format, the GPU that the video data transmitting of the yuv format that the CPU of the player control terminal of this terminal equipment obtains decoding is given this terminal equipment carries out chrominance space conversion, and obtaining can be at the video data of the rgb format of the demonstration screen display of display.
While watching TV play such as user online by mobile phone, player in mobile phone obtains video data endlessly from network video server side, the CPU that first player controls mobile phone decodes to the video data getting, obtain the video data of yuv format, then the video data transmitting of controlling the yuv format that the CPU of mobile phone obtains decoding is given the GPU of mobile phone, to carry out color space convert, obtain the video data of rgb format, the GPU that controls afterwards mobile phone by the video data of the rgb format being converted on the display screen of mobile phone for user shows.
In prior art, color space convert is to complete on the CPU of this terminal equipment completely, the data that the data of yuv format are converted into rgb format can make the occupancy of CPU too high, the too high meeting of CPU usage brings the problem that terminal equipment power consumption is large, and can cause terminal equipment overheated, shorten the useful life of terminal equipment.
The advantage of the embodiment of the present invention is, due to GPU, to have dominant frequency low, the advantage that amount of calculation is large, utilize GPU to share the task of CPU color space convert and broadcasting, can reduce CPU usage, thereby reduce the power consumption of terminal equipment, extend the useful life of terminal equipment; In addition, the computing function that GPU is powerful, player decoding capability is improved relatively, thereby the player of this terminal equipment is more smooth to the broadcasting of video data.
S104, the GPU that controls described terminal equipment shows the video data of obtained rgb format.
" video data of rgb format " described in the embodiment of the present invention can be understood as multiple frame of video, and each frame of video is exactly a rest image, and the broadcasting of video file can be understood as the continuous broadcasting of multiple still pictures.
Obtaining after the video data of rgb format, the GPU of this terminal equipment of player control of this terminal equipment shows on display screen the video data of obtained rgb format.
In an embodiment of the embodiment of the present invention, in order to meet user's personalized broadcast request, the GPU that controls described terminal equipment shows the video data of obtained rgb format, can comprise: the GPU that controls described terminal equipment shows the video data of obtained rgb format according to default broadcasting speed.
" broadcasting speed " described in the embodiment of the present invention can be understood as the frame number of the frame of video comprising in per second, i.e. frame per second.According to people's vision physiological feature, in the time that the refresh rate of image reached for 5 frame/second, people starts to feel that image is movable, in the time that the refresh rate of image reached for 24 frame/second, people feels that image is completely continuous and smooth, and the frame per second using such as film was exactly 24 frame/seconds.
In embodiments of the present invention, default broadcasting speed can, at the uniform velocity, can also arrange this default broadcasting speed certainly according to actual needs, and to meet individual requirements, the embodiment of the present invention is not restricted this.
In one embodiment of the invention, as shown in Figure 2, a kind of video broadcasting method, can comprise:
S201, receiver, video flow data.
S202, by received video stream data, sends to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtains the video data of yuv format.
S203, the video data of the yuv format that directly CPU of the described terminal equipment of control obtains decoding, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out space color space convert to the video data of described yuv format, obtain the video data of rgb format.
S204, the GPU that controls described terminal equipment shows the video data of obtained rgb format.
In embodiments of the present invention, S201, S202, S204 are identical with S101, S102, S104 in last embodiment respectively, and the embodiment of the present invention repeats no more this.In S203, the video data of the yuv format that the player of this terminal equipment obtains decoding, transfers to the GPU of this terminal equipment to process completely.
Now, the GPU of this terminal equipment has born the task of the video data of yuv format being converted to the video data of rgb format completely, and the CPU of this terminal equipment is only responsible for received video stream data to decode.The cpu performance that the embodiment of the present invention goes for terminal equipment is very low, in displaying video process, and a card serious situation; Now bear the task of the video data of yuv format being converted to the video data of rgb format completely by GPU, thereby can reduce greatly the occupancy of CPU in video display process, fundamentally solve a card serious problem in video display process.
In another embodiment of the present invention, as shown in Figure 3, a kind of video broadcasting method, can comprise:
S301, receiver, video flow data.
S302, by received video stream data, sends to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtains the video data of yuv format.
S303, judges whether to meet pre-conditioned, if so, forwards S304 to, otherwise forwards S305 to.
Obtaining after the video data of yuv format, this terminal equipment can judge whether to meet pre-conditioned, and carries out different operations according to different judged results.Wherein, when judgement meets when pre-conditioned, can perform step S304; When judgement does not meet when pre-conditioned, can perform step S305.
In an embodiment of the embodiment of the present invention, S303 can comprise:
S303a, detects the CPU usage of described terminal equipment.
S303b, judges whether described CPU usage is greater than preset value, if so, forwards S303c to, otherwise forwards S303d to.
After detecting the current occupancy of CPU of this terminal equipment, can judge whether the current occupancy of CPU is greater than preset value by terminal equipment, in the time that the current occupancy of the CPU of this terminal equipment is greater than preset value, execution step S303c; In the time that the current occupancy of the CPU of this terminal equipment is less than preset value, execution step S303d.
It should be noted that, " preset value " described in the embodiment of the present invention can be 20%, 25% or 30% etc., and user also can arrange according to actual needs voluntarily certainly, and the embodiment of the present invention is not restricted this.The CPU of this terminal equipment is in the process that video stream data is decoded, and player detects the occupancy of CPU, in the time that the occupancy of CPU is greater than preset value, thinks that the load of CPU is too high, is born the task of color space convert by GPU.
Be understandable that, the detection of player to CPU usage in CPU decode procedure, can carry out according to the default time cycle, can be also to trigger by receiving corresponding user instruction, and the embodiment of the present invention is not restricted this.
S303c, determine meet pre-conditioned.
S303d, determine do not meet pre-conditioned.
In another embodiment of the embodiment of the present invention, S303 can comprise:
S303e, obtains the frame per second of video stream data.
The embodiment of the present invention can, before video stream data not being decoded, be obtained the frame per second of video stream data; Also can be after video stream data be started to decode, and before decision operation, obtain the frame per second of video stream data, described decision operation is: judge whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, and the embodiment of the present invention is not restricted this.
S303f, the video decode frame number of described video stream data in the detection unit interval.
S303g, judges that whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, if so, forwards S303h to, otherwise forwards S303i to.
After detecting the video decode frame number of described video stream data in the unit interval, terminal equipment can judge whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, in the time that the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, execution step S303h; In the time that the video decode frame number of described video stream data in the unit interval is greater than the frame per second of described video stream data, execution step S303i.
CPU is in the process that video stream data is decoded, player detects the video decode frame number in the CPU unit interval, in the time detecting that video decode frame number in the CPU unit interval is less than the frame per second of described video stream data, think that the decoding speed of CPU can not meet the requirement of video playback, there will be video Caton phenomenon, now giving GPU by the task of color space convert processes, can reduce greatly the load of CPU, make CPU can distribute more resource to decode to video stream data, thereby solve the video card causing because of the decoding speed deficiency problem of pausing.
Be understandable that, the detection of player to video decode frame number in the CPU unit interval in CPU decode procedure, can carry out according to the default time cycle, can be also to trigger by accepting corresponding user instruction, and the embodiment of the present invention is not restricted this.
S303h, determine meet pre-conditioned.
S303i, determine do not meet pre-conditioned.
S304, control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out space color space convert to the video data of described yuv format, obtain the video data of rgb format.
S305, the CPU that controls described terminal equipment carries out space color space convert to the video data of described yuv format, obtains the video data of rgb format.
S306, the GPU that controls described terminal equipment shows the video data of obtained rgb format.
In embodiments of the present invention, S301, S302, S306 are identical with S101, S102, S104 in last embodiment respectively, and the embodiment of the present invention repeats no more this.
It is relatively low that the embodiment of the present invention is applicable to the cpu performance of terminal equipment, and in the time playing HD video, the decoding speed of CPU is less than HD video frame per second, or the too high situation of the occupancy of CPU; The embodiment of the present invention can be shared by the GPU of control terminal the color space convert task of the CPU of this terminal equipment, thereby can reduce the load of CPU, make CPU can distribute more resource to decode to video stream data, thereby solve the video card causing because of the decoding speed deficiency problem of pausing, improved the fluency of terminal equipment video playback.
Corresponding to embodiment of the method above, the present invention also provides a kind of player, is applied in the terminal equipment that comprises central processor CPU, graphic process unit GPU, and shown in Figure 6, this player can comprise:
Color space convert module 603, the video data of yuv format decoding being obtained for the CPU that controls described terminal equipment, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format;
In a specific embodiment of the present invention, described display module 604, shows the video data of obtained rgb format according to default broadcasting speed specifically for the GPU that controls described terminal equipment.
In an embodiment of the present invention, described color space convert module 603, can comprise:
First sends submodule 603a, for after described decoder module decoding obtains the video data of yuv format, directly controls the video data of the yuv format that the CPU of described terminal equipment obtains decoding, sends to the GPU of described terminal equipment;
The first conversion submodule 603b, carries out color space convert for the GPU that controls described terminal equipment to the described first video data that sends the yuv format that submodule sends, and obtains the video data of rgb format.
In another embodiment of the invention, color space convert module 603, can comprise:
In an embodiment of the embodiment of the present invention, judge submodule 603c, can comprise:
The first detection sub-unit 603c1, for detection of the CPU usage of described terminal equipment;
The first judgment sub-unit 603c2, for judging whether described CPU usage is greater than preset value, if so, determine meet pre-conditioned.
In an embodiment of the embodiment of the present invention, judge submodule 603c, can comprise:
Obtain subelement 603c3, for obtaining the frame per second of video stream data;
Further, described in obtain subelement 603c3, specifically for:
Before described decoder module is not decoded to video stream data, obtain the frame per second of video stream data;
Or,
After described decoder module is decoded to video stream data, and before described the second judgment sub-unit starts decision operation, obtain the frame per second of video stream data;
The second detection sub-unit 603c4, for detection of the video decode frame number of described video stream data in the unit interval;
The second judgment sub-unit 603c5, for judging whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, if so, determine meet pre-conditioned.
Second sends submodule 603d, for when the described judged result that judges submodule is when being, controls the video data of the yuv format that the CPU of described terminal equipment obtains decoding, sends to the GPU of described terminal equipment;
The second conversion submodule 603e, carries out color space convert for the GPU that controls described terminal equipment to the described second video data that sends the yuv format that submodule sends, and obtains the video data of rgb format.
For player embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
For convenience of description, while describing above player, being divided into various modules with function describes respectively.Certainly, in the time that enforcement is of the present invention, the function of each module can be realized in same or multiple software and/or hardware.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Each embodiment in this specification all adopts relevant mode to describe, between each embodiment identical similar part mutually referring to, what each embodiment stressed is and the difference of other embodiment.Especially,, for device embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of step realizing in said method execution mode is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in computer read/write memory medium, here the alleged storage medium obtaining, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.
Claims (14)
1. a video broadcasting method, is applied in the terminal equipment that comprises central processor CPU, graphic process unit GPU, it is characterized in that, the method comprises:
Receiver, video flow data;
By received video stream data, send to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtain the video data of yuv format;
Control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format;
The GPU that controls described terminal equipment shows the video data of obtained rgb format.
2. method according to claim 1, is characterized in that, the video data of the yuv format that the CPU of the described terminal equipment of described control obtains decoding sends to the GPU of described terminal equipment, comprising:
Obtain after the video data of yuv format, directly control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment.
3. method according to claim 1, is characterized in that, the video data of the yuv format that the CPU of the described terminal equipment of described control obtains decoding sends to the GPU of described terminal equipment, comprising:
Obtain after the video data of yuv format, judge whether to meet pre-conditioned, if so, control the video data of the yuv format that the CPU of described terminal equipment obtains decoding, send to the GPU of described terminal equipment.
4. method according to claim 3, is characterized in that, described in judge whether to meet pre-conditioned, specifically comprise:
Detect the CPU usage of described terminal equipment, judge whether described CPU usage is greater than preset value, if so, determine meet pre-conditioned.
5. method according to claim 3, is characterized in that, described in judge whether to meet pre-conditioned, specifically comprise:
Obtain the frame per second of video stream data;
Detect the video decode frame number of described video stream data in the unit interval;
Judge whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, if so, determine meet pre-conditioned.
6. method according to claim 5, is characterized in that, described in obtain the frame per second of video stream data, comprising:
Before video stream data not being decoded, obtain the frame per second of video stream data;
Or,
After video stream data is started to decode, and before decision operation, obtain the frame per second of video stream data, described decision operation is: judge whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data.
7. method according to claim 1, is characterized in that, the GPU of the described terminal equipment of described control shows the video data of obtained rgb format, specifically comprises:
The GPU that controls described terminal equipment shows the video data of obtained rgb format according to default broadcasting speed.
8. a player, is applied in the terminal equipment that comprises central processor CPU, graphic process unit GPU, it is characterized in that, this player comprises:
Receiver module, for receiver, video flow data;
Decoder module, for by received video stream data, sends to the CPU of described terminal equipment, and the CPU that controls described terminal equipment decodes to described video stream data, obtains the video data of yuv format;
Color space convert module, the video data of yuv format decoding being obtained for the CPU that controls described terminal equipment, send to the GPU of described terminal equipment, and the GPU that controls described terminal equipment carries out color space convert to the video data of described yuv format, obtain the video data of rgb format;
Display module, shows the video data of obtained rgb format for the GPU that controls described terminal equipment.
9. player according to claim 8, is characterized in that, described color space convert module, comprising:
First sends submodule, for after the decoding of described decoder module obtains the video data of yuv format, directly controls the video data of the yuv format that the CPU of described terminal equipment obtains decoding, sends to the GPU of described terminal equipment;
The first conversion submodule, carries out color space convert for the GPU that controls described terminal equipment to the described first video data that sends the yuv format that submodule sends, and obtains the video data of rgb format.
10. player according to claim 8, is characterized in that, described color space convert module, comprising:
Judge submodule, for after described decoder module decoding obtains the video data of yuv format, judge whether to meet pre-conditioned;
Second sends submodule, for when the described judged result that judges submodule is when being, controls the video data of the yuv format that the CPU of described terminal equipment obtains decoding, sends to the GPU of described terminal equipment;
The second conversion submodule, carries out color space convert for the GPU that controls described terminal equipment to the described second video data that sends the yuv format that submodule sends, and obtains the video data of rgb format.
11. players according to claim 10, is characterized in that, described judgement submodule specifically comprises:
The first detection sub-unit, for detection of the CPU usage of described terminal equipment;
The first judgment sub-unit, for judging whether described CPU usage is greater than preset value, if so, determine meet pre-conditioned.
12. players according to claim 10, is characterized in that, described judgement submodule specifically comprises:
Obtain subelement, for obtaining the frame per second of video stream data;
The second detection sub-unit, for detection of the video decode frame number of described video stream data in the unit interval;
The second judgment sub-unit, for judging whether the video decode frame number of described video stream data in the unit interval is less than the frame per second of described video stream data, if so, determine meet pre-conditioned.
13. players according to claim 12, is characterized in that, described in obtain subelement, specifically for:
Before described decoder module is not decoded to video stream data, obtain the frame per second of video stream data;
Or,
After described decoder module is decoded to video stream data, and before described the second judgment sub-unit starts decision operation, obtain the frame per second of video stream data.
14. players according to claim 8, is characterized in that, described display module, specifically for:
The GPU that controls described terminal equipment shows the video data of obtained rgb format according to default broadcasting speed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410131609.2A CN103841389B (en) | 2014-04-02 | 2014-04-02 | A kind of video broadcasting method and player |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410131609.2A CN103841389B (en) | 2014-04-02 | 2014-04-02 | A kind of video broadcasting method and player |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103841389A true CN103841389A (en) | 2014-06-04 |
CN103841389B CN103841389B (en) | 2015-10-21 |
Family
ID=50804478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410131609.2A Active CN103841389B (en) | 2014-04-02 | 2014-04-02 | A kind of video broadcasting method and player |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103841389B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104410904A (en) * | 2014-12-25 | 2015-03-11 | 安科智慧城市技术(中国)有限公司 | Video playing method and video playing device |
CN104735485A (en) * | 2015-03-05 | 2015-06-24 | 上海小蚁科技有限公司 | Method and device for playing video |
CN105791890A (en) * | 2014-12-23 | 2016-07-20 | Tcl集团股份有限公司 | Soft decoding method and device for player |
CN106293638A (en) * | 2015-06-11 | 2017-01-04 | 吉林师范大学 | Heterogeneous formats based on CPU Yu GPU heterogeneous platform storage method |
CN106303361A (en) * | 2015-06-11 | 2017-01-04 | 阿里巴巴集团控股有限公司 | Image processing method, device, system and graphic process unit in video calling |
CN107920253A (en) * | 2017-10-31 | 2018-04-17 | 北京赛思信安技术股份有限公司 | A kind of method for processing video frequency based on GPU |
CN107993185A (en) * | 2017-11-28 | 2018-05-04 | 北京潘达互娱科技有限公司 | Data processing method and device |
CN108696761A (en) * | 2017-04-08 | 2018-10-23 | 腾讯科技(深圳)有限公司 | A kind of photograph document handling method and its equipment, system |
CN109196865A (en) * | 2017-03-27 | 2019-01-11 | 华为技术有限公司 | A kind of data processing method and terminal |
CN109391847A (en) * | 2017-08-08 | 2019-02-26 | 中国电信股份有限公司 | The monitoring method and monitoring device of Streaming Media Caton |
CN109587546A (en) * | 2018-11-27 | 2019-04-05 | Oppo广东移动通信有限公司 | Method for processing video frequency, device, electronic equipment and computer-readable medium |
WO2019196634A1 (en) * | 2018-04-13 | 2019-10-17 | 华为技术有限公司 | Data processing method and apparatus |
CN111741343A (en) * | 2020-06-17 | 2020-10-02 | 咪咕视讯科技有限公司 | Video processing method and device and electronic equipment |
CN116193201A (en) * | 2023-02-27 | 2023-05-30 | 深圳数拓科技有限公司 | Video data processing method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123723A (en) * | 2006-08-11 | 2008-02-13 | 北京大学 | Digital video decoding method based on image processor |
CN101354780A (en) * | 2007-07-26 | 2009-01-28 | Lg电子株式会社 | Graphic data processing apparatus and method |
CN101477674A (en) * | 2008-01-04 | 2009-07-08 | 华硕电脑股份有限公司 | Method for data computation assistance by display card |
CN101930719A (en) * | 2009-06-18 | 2010-12-29 | 辉达公司 | Method and system for automatically switching scene mode of display |
CN102164284A (en) * | 2010-02-24 | 2011-08-24 | 富士通株式会社 | Video decoding method and system |
CN102625090A (en) * | 2011-01-26 | 2012-08-01 | 鸿富锦精密工业(深圳)有限公司 | Image decoding method and pattern processing device using same |
CN103402100A (en) * | 2013-08-23 | 2013-11-20 | 北京奇艺世纪科技有限公司 | Video processing method and mobile terminal |
-
2014
- 2014-04-02 CN CN201410131609.2A patent/CN103841389B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123723A (en) * | 2006-08-11 | 2008-02-13 | 北京大学 | Digital video decoding method based on image processor |
CN101354780A (en) * | 2007-07-26 | 2009-01-28 | Lg电子株式会社 | Graphic data processing apparatus and method |
CN101477674A (en) * | 2008-01-04 | 2009-07-08 | 华硕电脑股份有限公司 | Method for data computation assistance by display card |
CN101930719A (en) * | 2009-06-18 | 2010-12-29 | 辉达公司 | Method and system for automatically switching scene mode of display |
CN102164284A (en) * | 2010-02-24 | 2011-08-24 | 富士通株式会社 | Video decoding method and system |
CN102625090A (en) * | 2011-01-26 | 2012-08-01 | 鸿富锦精密工业(深圳)有限公司 | Image decoding method and pattern processing device using same |
CN103402100A (en) * | 2013-08-23 | 2013-11-20 | 北京奇艺世纪科技有限公司 | Video processing method and mobile terminal |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105791890A (en) * | 2014-12-23 | 2016-07-20 | Tcl集团股份有限公司 | Soft decoding method and device for player |
CN104410904A (en) * | 2014-12-25 | 2015-03-11 | 安科智慧城市技术(中国)有限公司 | Video playing method and video playing device |
CN104735485A (en) * | 2015-03-05 | 2015-06-24 | 上海小蚁科技有限公司 | Method and device for playing video |
CN106293638A (en) * | 2015-06-11 | 2017-01-04 | 吉林师范大学 | Heterogeneous formats based on CPU Yu GPU heterogeneous platform storage method |
CN106303361A (en) * | 2015-06-11 | 2017-01-04 | 阿里巴巴集团控股有限公司 | Image processing method, device, system and graphic process unit in video calling |
CN106293638B (en) * | 2015-06-11 | 2019-08-06 | 吉林师范大学 | Heterogeneous formats storage method based on CPU Yu GPU heterogeneous platform |
CN109196865A (en) * | 2017-03-27 | 2019-01-11 | 华为技术有限公司 | A kind of data processing method and terminal |
CN109196865B (en) * | 2017-03-27 | 2021-03-30 | 华为技术有限公司 | Data processing method, terminal and storage medium |
CN108696761A (en) * | 2017-04-08 | 2018-10-23 | 腾讯科技(深圳)有限公司 | A kind of photograph document handling method and its equipment, system |
CN108696761B (en) * | 2017-04-08 | 2022-03-04 | 腾讯科技(深圳)有限公司 | Picture file processing method, device and system |
CN109391847A (en) * | 2017-08-08 | 2019-02-26 | 中国电信股份有限公司 | The monitoring method and monitoring device of Streaming Media Caton |
CN107920253A (en) * | 2017-10-31 | 2018-04-17 | 北京赛思信安技术股份有限公司 | A kind of method for processing video frequency based on GPU |
CN107993185A (en) * | 2017-11-28 | 2018-05-04 | 北京潘达互娱科技有限公司 | Data processing method and device |
WO2019196634A1 (en) * | 2018-04-13 | 2019-10-17 | 华为技术有限公司 | Data processing method and apparatus |
CN110377534A (en) * | 2018-04-13 | 2019-10-25 | 华为技术有限公司 | Data processing method and device |
CN110377534B (en) * | 2018-04-13 | 2023-11-17 | 华为技术有限公司 | Data processing method and device |
CN109587546A (en) * | 2018-11-27 | 2019-04-05 | Oppo广东移动通信有限公司 | Method for processing video frequency, device, electronic equipment and computer-readable medium |
US11457272B2 (en) | 2018-11-27 | 2022-09-27 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Video processing method, electronic device, and computer-readable medium |
CN109587546B (en) * | 2018-11-27 | 2020-09-22 | Oppo广东移动通信有限公司 | Video processing method, video processing device, electronic equipment and computer readable medium |
CN111741343A (en) * | 2020-06-17 | 2020-10-02 | 咪咕视讯科技有限公司 | Video processing method and device and electronic equipment |
CN111741343B (en) * | 2020-06-17 | 2022-11-15 | 咪咕视讯科技有限公司 | Video processing method and device and electronic equipment |
CN116193201A (en) * | 2023-02-27 | 2023-05-30 | 深圳数拓科技有限公司 | Video data processing method |
Also Published As
Publication number | Publication date |
---|---|
CN103841389B (en) | 2015-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103841389B (en) | A kind of video broadcasting method and player | |
WO2021175049A1 (en) | Video frame interpolation method and related apparatus | |
JP7370360B2 (en) | Method and device for adapting video content decoded from an elementary stream to display characteristics | |
US9948884B2 (en) | Converting method and converting apparatus for converting luminance value of an input video into a second luminance value | |
CN106134172B (en) | Display system, display methods and display device | |
CN100531291C (en) | Method and system for mastering and distributing enhanced color space content | |
US10511803B2 (en) | Video signal transmission method and device | |
KR102617258B1 (en) | Image processing method and apparatus | |
CN105892976A (en) | Method and device for realizing multi-screen interaction | |
US9894314B2 (en) | Encoding, distributing and displaying video data containing customized video content versions | |
EP3685575B1 (en) | Display apparatus, method for controlling the same and image providing apparatus | |
CN112087648B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN103283250A (en) | Method, device and system of video redirection, and computer readable medium | |
US10805680B2 (en) | Method and device for configuring image mode | |
US20140294100A1 (en) | Dual channel encoding and detection | |
US20170161875A1 (en) | Video resolution method and apparatus | |
CN103997677B (en) | A kind of player method and playback equipment of audio frequency and video | |
US11094286B2 (en) | Image processing apparatus and image processing method | |
US20240031525A1 (en) | Efficient electro-optical transfer function (eotf) curve for standard dynamic range (sdr) content | |
KR101437694B1 (en) | Display apparatus and control method thereof | |
CN220629392U (en) | Video and audio transmission extension system | |
CN104469231A (en) | Multimedia transmission device and power supply control method thereof | |
CN117241054A (en) | Cross-network live broadcast system, method, electronic equipment and storage medium | |
CN105323635A (en) | Video processing system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |