CN109862409A - Video decoding, playback method, device, system, terminal and storage medium - Google Patents

Video decoding, playback method, device, system, terminal and storage medium Download PDF

Info

Publication number
CN109862409A
CN109862409A CN201910204733.XA CN201910204733A CN109862409A CN 109862409 A CN109862409 A CN 109862409A CN 201910204733 A CN201910204733 A CN 201910204733A CN 109862409 A CN109862409 A CN 109862409A
Authority
CN
China
Prior art keywords
video
hard decoders
decoding
hard
decoders
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
Application number
CN201910204733.XA
Other languages
Chinese (zh)
Other versions
CN109862409B (en
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.)
Guangzhou Netstar Information Technology Co Ltd
Original Assignee
Guangzhou Netstar Information Technology Co Ltd
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 Guangzhou Netstar Information Technology Co Ltd filed Critical Guangzhou Netstar Information Technology Co Ltd
Priority to CN201910204733.XA priority Critical patent/CN109862409B/en
Publication of CN109862409A publication Critical patent/CN109862409A/en
Application granted granted Critical
Publication of CN109862409B publication Critical patent/CN109862409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of video decoding, playback method, device, system, terminal and storage mediums.The video encoding/decoding method includes: to call soft decoder decoding video, and obtain hard decoders;If getting hard decoders, the hard decoders are initialized;If hard decoders initialization finishes, the hard decoders is called to continue decoding video.Through the above technical solution, soft decoding first is carried out to video, avoiding the video as caused by waiting the initialization of hard decoders can not be decoded and be watched, and hard decoders are initialized after getting hard decoders, hard decoders initialization, which finishes, calls hard decoders to continue decoding video, the decoding efficiency of video entirety is improved, even if in the case where frequent switching video, also the decoded delay of video can be reduced, the viewing experience of user is promoted.

Description

Video decoding, playback method, device, system, terminal and storage medium
Technical field
The present embodiments relate to technical field of video processing more particularly to a kind of decoding of video, playback method, device, System, terminal and storage medium.
Background technique
In current mobile internet era, internet video live broadcasting using more and more extensive, people can pass through network Watch the live video that distal end is being broadcast live, such as race, meeting, teaching, operation.The mode of internet video live broadcasting be by Video signal compression (coding) forms code stream, by network by bit stream to client, when user watches live streaming from client, Image or video will be exported after the code stream decoding received.
In client, in order to improve decoding speed and reduce the central processing unit (Central of client Processing Unit, CPU) consumption, it is decoded using hardware decoder, wherein hardware decoder generally refers at figure It manages device (Graphics Processing Unit, GPU).When having just enter into direct broadcasting room or switching live video, obtain The hard decoders and process for reinitializing hard decoders is slower are easy the delay so that first frame video decoding elapsed time is too long It is excessively high, especially when user's frequent switching live video, it will cause the delay or Caton of picture using hardware decoder decoding, sternly Ghost image rings viewing.
Summary of the invention
The present invention provides a kind of video decoding, playback method, device, system, terminal and storage mediums.Improve video Decoding efficiency.
In a first aspect, the embodiment of the invention provides a kind of video encoding/decoding methods, comprising:
Soft decoder decoding video is called, and obtains hard decoders;
If getting hard decoders, the hard decoders are initialized;
If hard decoders initialization finishes, the hard decoders is called to continue decoding video.
Second aspect, the embodiment of the invention provides a kind of video broadcasting methods, comprising:
Receive video;
Pass through video encoding/decoding method decoding video as described in relation to the first aspect;
Video after broadcast decoder.
The third aspect, the embodiment of the invention provides a kind of video decoding controllers, comprising:
Calling module, for calling soft decoder decoding video;
Module is obtained, for obtaining hard decoders;
Initialization module, if initializing the hard decoders for getting hard decoders;
The calling module is also used to the hard decoders initialization and finishes, then the hard decoders is called to continue to decode Video.
Fourth aspect, the embodiment of the invention provides a kind of video decoders, comprising:
Control module, hard decoders and soft decoder, the control module are connected with hard decoders and soft decoder respectively, The video decoding controller as described in the third aspect is arranged in the control module.
5th aspect, the embodiment of the invention provides a kind of audio/video player systems, comprising:
Video reception module, video decoder and video playback module as described in fourth aspect, the video decoding Device is used to be sent to the video playback module by after the received video decoding of the video reception module and play.
6th aspect, the embodiment of the invention provides a kind of terminals, comprising:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes video encoding/decoding method as described in relation to the first aspect or the video broadcasting method as described in second aspect.
7th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes video encoding/decoding method as described in relation to the first aspect or the view as described in second aspect when the program is executed by processor Frequency playback method.
The embodiment of the invention provides a kind of video decoding, playback method, device, system, terminal and storage mediums, pass through Soft decoder decoding video is first called when playing video, and obtains hard decoders in soft decoding process, is got and just After beginningization hard decoders, hard decoders is called to carry out hard decoder.Through the above technical solutions, first carrying out soft decoding to video, keep away Having exempted from the video as caused by waiting the initialization of hard decoders can not be decoded and be watched, and after getting hard decoders just Beginningization hard decoders, hard decoders call hard decoders to continue to decode after initializing, and improve the decoding effect of video entirety Rate, even if can also reduce the decoded delay of video in the case where frequent switching video, promote the viewing experience of user.
Detailed description of the invention
Fig. 1 is a kind of flow chart for video encoding/decoding method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of the application for video encoding/decoding method that the embodiment of the present invention one provides;
Fig. 3 is the flow diagram of main thread in a kind of application for video encoding/decoding method that the embodiment of the present invention one provides;
Fig. 4 is the flow diagram of sub thread in a kind of application for video encoding/decoding method that the embodiment of the present invention one provides;
Fig. 5 is a kind of flow chart of video broadcasting method provided by Embodiment 2 of the present invention;
Fig. 6 is a kind of structural schematic diagram for video decoding controller that the embodiment of the present invention three provides;
Fig. 7 is a kind of structural schematic diagram for video decoder that the embodiment of the present invention four provides;
Fig. 8 is a kind of structural schematic diagram for audio/video player system that the embodiment of the present invention five provides;
Fig. 9 is a kind of hardware structural diagram for terminal that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.In addition, in the absence of conflict, this The feature in embodiment and embodiment in invention can be combined with each other.It also should be noted that for ease of description, it is attached Only the parts related to the present invention are shown in figure rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart for video encoding/decoding method that the embodiment of the present invention one provides.The present embodiment is applicable to pair The case where all kinds of live videos are decoded.Specifically, the video encoding/decoding method can be executed by video decoder, the video Decoding apparatus can be realized by way of software and/or hardware, and integrate in the terminal.Further, terminal includes but not It is defined in: the intelligent terminals such as smart phone, desktop computer, laptop and tablet computer.
Specifically, this method specifically comprises the following steps: with reference to Fig. 1
S110, soft decoder decoding video is called.
When user watches network direct broadcasting video by terminal, according to CPU the or GPU performance of terminal, may be selected to video Carry out hard decoder or soft decoding.Hard decoder, which refers to by video card core GPU, is decoded work to HD video, and feature is decoding Speed is fast, CPU usage is low, but hard decoders initialization is time-consuming higher, for example, when having just enter into direct broadcasting room, the code stream of video Information changes, and needs to wait reacquisition hard decoders or initialization hard decoders, in the process can not be to video solution Code, causes the decoding time of first frame video too long, postpones higher.Soft decoding is decoded by CPU, can be deposited simultaneously in terminal In multiple soft decoders.For the present embodiment when being decoded to video, default calls soft decoder decoding video, avoid due to Wait video caused by the initialization of hard decoders that can not be decoded and be watched, to improve decoding efficiency.
S120, hard decoders are obtained.
Specifically, attempting to obtain hard decoders while calling soft decoder decoding video.Hard decoders in terminal There is usually one if hard decoders are held by other threads or background application, current video decoding thread can not Hard decoders are obtained, continue to keep soft decoding;If the held state of hard decoders is the free time, it can obtain and hold the hard decoder Device.
S130, whether hard decoders are got, if so, thening follow the steps S140;If not, S120 is thened follow the steps, Continue to obtain hard decoders.
S140, the initialization hard decoders.
Specifically, after getting hard decoders, calling relevant connect while calling soft decoder decoding video Mouthful, the code stream information of video is passed to hard decoders, the running environment etc. of hard decoder is detected, to initialize hard decoders.
Whether S150, hard decoders, which initialize, finishes, if so, thening follow the steps S160;If it is not, S140 is thened follow the steps, Until hard decoders initialization finishes.
S160, the hard decoders are called to continue decoding video.
Specifically, then calling soft decoder decoding video when terminal is not available hard decoders decoding video, working as detection It is finished to hard decoders initialization, is then switched to from the soft decoder decoding video of calling and hard decoders is called to continue to carry out video Decoding provides faster decoding speed for subsequent decoding, improves the decoding efficiency of entire video, and reduce the occupancy of CPU.
Further, described to call soft decoder decoding video, comprising: to enter direct broadcasting room for the first time, then call soft decoder Decoding video;Alternatively, switching direct broadcasting room, then call soft decoder decoding video;Alternatively, switch video parameter in direct broadcasting room, Then call soft decoder decoding video.
Fig. 2 is a kind of flow diagram of the application for video encoding/decoding method that the embodiment of the present invention one provides.With reference to Fig. 2, By taking IOS system as an example, when user enters direct broadcasting room (for example, user chooses direct broadcasting room 2 in live streaming platform and clicks to enter for the first time The button of direct broadcasting room), switching direct broadcasting room (user switches to other direct broadcasting rooms from the direct broadcasting room being currently located) or direct broadcasting room in Video parameter changes (such as user has changed clarity, screen size video parameter, switch window or visual angle etc.), above-mentioned Situation can cause video decoding parametric to change, and in the case, call soft decoder decoding video, and attempt obtain and just Beginningization hard decoders.Wherein, video decoding parametric refers to the sequence parameter set (Sequence in H.264 compressed video stream Paramater Set, SPS)/picture parameter set (Picture Paramater Set, PPS), SPS/PPS is two kinds of data pressures Drop-head portion, the high parameter information of width for designated coding.By detecting whether SPS/PPS changes, it is determined whether Hard decoders are obtained, after getting hard decoders, then initialize hard decoders, and after hard decoder initialization, call hard Decoder substitutes soft decoder and continues decoding video.
Further, the initialization hard decoders, comprising:
Main thread sends the instruction of initialization hard decoders;
Sub thread initializes the hard decoders according to the instruction of the initialization hard decoders.
Specifically, main thread is used to execute the code stream information of reception video, determines decoding process, and to first frame video into While row soft decoding, hard decoders are obtained, are communicated with the hard decoders in sub thread (as sent initialization hard decoders Instruction, update hard decoders resetting flag bit, detection hard decoders whether get, whether initialize finish);Sub-line Journey is used to create hard decoders according to the instruction of main thread, and is called in terminal according to the resetting flag bit parameter of hard decoders Portion's interface is passed to video decoding parametric to hard decoders, to complete the initialization of hard decoders.
Further, before the initialization hard decoders, further includes: the resetting mark of the hard decoders is set Position parameter is mark to be initiated.
Specifically, after getting hard decoders, main thread sends the hard solution of initialization to sub thread by taking IOS system as an example The instruction of code device, and the parameter of the resetting flag bit of hard decoders is set to mark to be initiated.In the present embodiment, optional , mark to be initiated is true, and sub thread can call relevant interface after recognizing resetting flag bit and being mark to be initiated SPS/PPS after variation is passed to hard decoders, to complete the initialization of hard decoders.
Further, described to get hard decoders, comprising: the held state of hard decoders is the free time, then holds described Hard decoders.If the held state of hard decoders is the free time, i.e., do not held by other threads or background application, then main thread The hard decoders can be obtained, hard decoders otherwise can not be obtained, continue to call soft decoder decoding video.
Fig. 3 is the flow diagram of main thread in a kind of application for video encoding/decoding method that the embodiment of the present invention one provides. On the basis of the above embodiments, below to the process of main thread and sub thread during the concrete application of video encoding/decoding method It is described in detail.
It should be noted that server sends to terminal and is broadcast live when user enters direct broadcasting room viewing live streaming by terminal Video corresponding code stream information includes video decoding parametric in code stream information, for example, video decoding parametric is H.264 video SPS/PPS in compressed bit stream.It further include image group (Group of Pictures, GOP) in code stream information, GOP is by I/P/B Frame composition, the starting point of a GOP are I frame, and terminal is the P frame or B frame before next I frame, wherein I/P/B frame is that video is normal The 3 kinds of frame types seen, I frame are also referred to as in frame (intra) frame, indicate key frame, contain this frame in I frame and correspond to the complete of picture Entire data is decoded for the data in I frame when decoding.P frame is difference frame, and expression is this frame with a pass before The difference of key frame (or P frame), do not include partial data, when to P frame decoding need by it includes difference data be superimposed upon it is previous In the data of frame, corresponding picture is generated.B frame is two-way difference frame, i.e., B frame recording be this frame and before and after frames difference.P frame Interframe (inter) frame is also referred to as with B frame.
Further, the state of hard decoders include: space state, original state, have not been obtained state, be held state with And release conditions.Wherein:
Space state indicates that hard decoders are not present in the decoded main thread of video.
Original state, before referring to creation hard decoders, main thread sends the use request of hard decoders to sub thread, that is, adjusts With the instruction of hard decoders.
State has not been obtained, refers to that hard decoders have been created but do not obtained by any system thread.
It is held state, refers to that host process after creating hard decoders, obtains and holds the hard decoders.
Release conditions refer to that no longer progress hard decoder, hard decoders are released, are no longer held by video decoding related linear program. Under hard decoders release conditions, hard decoders are destroyed can to reply space state, i.e., do not deposit in the decoded main thread of video In hard decoders.
As shown in figure 3, the present embodiment to be to include I frame, P frame in a GOP, be illustrated for B frame, then the reality of main thread Existing process is as follows:
S1, first GOP received in code stream information set SPS/PPS update when handling the I frame in first GOP Position parameter is to have occurred to update (illustrative, the mark updated is true).It should be noted that being connect in the present embodiment First GOP received refers to first GOP in code stream information when entering direct broadcasting room, switching direct broadcasting room for the first time, At this point, SPS/PPS changes, SPS/PPS update position parameter is set to and has been updated.And it is unchanged for other SPS/PPS It the case where change (as watched same class video in same direct broadcasting room always, hard decoders are without resetting or reconnection), then keeps Current decoding process.
Further, call soft decoder to carry out soft decoding first GOP and export image, to avoid etc. it is to be obtained First frame video can not be decoded and be watched during hard decoders and initialization hard decoders, improve decoding efficiency, and And soft decoding is all carried out (until hard decoders initialization finishes) in a period of time hereafter.
S2, second GOP in code stream information is received, when handling the I frame in second GOP, SPS/PPS updates position Parameter is to have updated, but hard decoders also has not been obtained in main thread (hard decoders state is that state has not been obtained), it tries Hard decoders are obtained, send the use request of hard decoders to sub thread or call the instruction of hard decoders.It should be noted that If detected when I frame in second GOP the held state of hard decoders be not it is idle, illustrate hard decoders by other lines Journey or background application are held, then video decoding thread can not obtain hard decoders, can only continue to carry out soft decoding to video, During the GOP continued after treatment simultaneously, the held state of hard decoders is continued to test, and in the held state of hard decoders To obtain hard decoders when the free time.
S3, handle second GOP in P frame or B frame when, after getting hard decoders, by the state of hard decoders It is updated to be held state, and triggers hard decoders initialization, is i.e. the resetting flag bit parameter of setting hard decoders is to initial Change mark, notice sub thread initializes hard decoders.Simultaneously by SPS/PPS update position parameter be set to do not occur update it is (exemplary , the mark not updated is false), that is, the SPS/PPS after changing has been cached, and does not have update mark.Obtaining hard solution During code device and initialization hard decoders, main thread still carries out soft decoding to GOP and exports image.
S4, receive third GOP in code stream information, when handling the I frame in third GOP, to each I frame into It can all detect whether hard decoders complete initialization before row decoding, i.e. the initialization complement mark position parameter of hard decoders is It is no that be completed, (illustrative, completed mark is true), if so, destroying current soft decoder, calls hard decoder Device carries out hard decoder to GOP later and exports image;If it is not, soft decoded output image is still then carried out to third GOP, and Before the I frame of each GOP later is decoded, whether detection hard decoders, which initialize, is finished.
It should be noted that if (SPS/PPS is sent out switching direct broadcasting room during carrying out hard decoder to GOP later Changing), then hard decoders can be discharged, soft decoding is switched to, setting SPS/PPS to update position parameter is to have updated, and is then weighed S2 to S4 is executed again.In addition, above-described embodiment is illustrated by taking first three GOP as an example, and in practical applications, due to CPU, The influence of other threads of GPU performance or backstage, time needed for obtaining hard decoders, time needed for initialization hard decoders are equal It can not determine, therefore, the operations that above-mentioned main thread executes are likely to occur in other GOP.
Fig. 4 is the flow diagram of sub thread in a kind of application for video encoding/decoding method that the embodiment of the present invention one provides. As shown in figure 4, whether sub thread cycle detection hard decoders are original state or are held state, when hard decoders are initial shape State, sub thread receive the use request of the hard decoders of main thread transmission or call the instruction of hard decoders, then the hard solution of creation The state of hard decoders is simultaneously set to the state of having not been obtained by code device, and continues cycling through the state of detection hard decoders.It needs to illustrate It is after hard decoders under the state that has not been obtained are held by main thread, state will be updated to be held.When hard decoders are to be held When state, whether the resetting flag bit parameter that sub thread continues to test hard decoders is mark to be initiated, if it is, initially Change hard decoders, call the relevant internal interface of hard decoders, is passed to SPS/PPS, and after the completion of hard decoders initialization, it will The resetting flag bit parameter of hard decoders, which is set to, is not required to initialization (illustrative, the mark for being not required to initialization is false), will be hard The initialization complement mark position parameter of decoder, which is set to, to be completed;If it is not, then cycle detection hard decoders whether be it is initial or It is held state.
Above in the concrete application of video encoding/decoding method provided by embodiment one, the code of video is received by main thread Stream information calls decoder, and while carrying out soft decoding to video, is communicated with the hard decoders in sub thread;It is logical Sub thread creation hard decoders are crossed, and call the internal interface of terminal according to the resetting flag bit parameter of hard decoders, to hard solution Code device is passed to video decoding parametric, to complete the initialization of hard decoders, realizes and first carries out soft decoding to video, avoid by The video caused by the initialization for waiting hard decoders can not be decoded and be watched, and be initialized firmly after getting hard decoders Decoder, hard decoders call hard decoders to continue to decode, improve the decoding efficiency of video entirety after initializing, even if In the case where frequent switching video, the decoded delay of video can be also reduced, the viewing experience of user is promoted.
Embodiment two
Fig. 5 is a kind of implementation flow chart of video broadcasting method provided by Embodiment 2 of the present invention.The present embodiment is applicable In all kinds of live videos are decoded and are played the case where.Specifically, the video broadcasting method can be by software and/or hard The mode of part is realized, and is integrated in audio/video player system.Further, audio/video player system includes: video reception module, view Frequency decoding apparatus and video playback module, the video decoder are used to decode the received video of the video reception module Afterwards, the video playback module is sent to play.It should be noted that the technical detail of detailed description can not in the present embodiment Referring to above-mentioned any embodiment.
Specifically, as shown in figure 5, the video broadcasting method includes:
S210, video is received.
Specifically, server can send live video to terminal when user enters direct broadcasting room viewing live streaming by terminal Corresponding video flowing, vision signal pass through network transmission to terminal by server after encoder encodes, and terminal is needed to view Frequency is decoded and could export image, wherein video flowing is H.264 compressed video stream, in code stream information including SPS/PPS with And GOP.
S220, soft decoder decoding video is called.
S230, hard decoders are obtained.
S240, whether hard decoders are got, if so, thening follow the steps S250;If it is not, thening follow the steps S230, continue Obtain hard decoders.
S250, the initialization hard decoders.
Whether S260, hard decoders initialization finish, if so, S270 is thened follow the steps, if it is not, then returning to step S250, until hard decoders initialization finishes.
S270, the hard decoders are called to continue decoding video.
Video after S280, broadcast decoder.
Specifically, the initial data of vision signal has been compressed processing in an encoding process, terminal is at the beginning of hard decoders Before beginningization is completed, soft decoder decoding video is called;Hard decoders initialization finishes, then call the hard decoders after Continuous decoding video, the initial data before being compressed, and image one by one is exported, thus the video after broadcast decoder.
A kind of video broadcasting method provided by Embodiment 2 of the present invention, by carrying out soft decoding to the video received, and Hard decoders are initialized after getting hard decoders, hard decoders decoding video is called after hard decoders initialization, Video after broadcast decoder, avoiding the video as caused by waiting the initialization of hard decoders can not be decoded and be played, and be mentioned The fluency of high video playing reduces card even if can also reduce the delay of first frame video in the case where frequent switching video , improve video display effect.
Embodiment three
Fig. 6 is a kind of structural schematic diagram for video decoding controller that the embodiment of the present invention three provides.The video solution Code control device may be provided in the control module of video decoder, for the init state according to hard decoders, call Soft decoder or hard decoders control video decoding process.
As shown in fig. 6, video decoding controller provided in this embodiment includes:
Calling module 310, for calling soft decoder decoding video;
Module 320 is obtained, for obtaining hard decoders;
Initialization module 330, if initializing the hard decoders for getting hard decoders;
The calling module 310 is also used to the hard decoders initialization and finishes, then the hard decoders is called to continue to solve Code video.
A kind of video decoding controller that the embodiment of the present invention three provides calls soft decoder to decode by calling module Video;Hard decoders are obtained by obtaining module, hard decoders are initialized after getting hard decoders by initialization module, By calling module when hard decoders initialization finishes, calls hard decoders to continue decoding video, realize in hard decoder Control carries out soft decoding to video while device initializes, avoid video caused by the initialization as waiting hard decoders without Method is decoded and is watched, and control calls hard decoders to carry out hard decoder after hard decoders initialization, realizes control The switching of soft decoding and hard decoder, improves the decoding efficiency of video entirety, promotes the viewing experience of user.
On the basis of the above embodiments, the calling module 310 is specifically used for:
Enter direct broadcasting room for the first time, then calls soft decoder decoding video;Alternatively,
Switch direct broadcasting room, then calls soft decoder decoding video;Alternatively,
Switch video parameter in direct broadcasting room, then calls soft decoder decoding video.
Further, described device further include:
Setup module, the resetting flag bit parameter for the hard decoders to be arranged are mark to be initiated.
Further, the acquisition module 320, is specifically used for:
The held state of hard decoders is the free time, then holds the hard decoders.
The video encoding/decoding method category that the video decoding controller and above-described embodiment that the embodiment of the present invention three provides propose In same inventive concept, it can be used for realizing the decoded control of video, have corresponding function and beneficial effect.
Example IV
Fig. 7 is a kind of structural schematic diagram for video decoder that the embodiment of the present invention four provides.As shown in fig. 7, this reality The video decoder for applying example offer includes: control module 410, hard decoders 420 and soft decoder 430, the control module 410 are connected with hard decoders 420 and soft decoder 430 respectively, and the control module 410 is arranged as described in above-described embodiment three Video decoding controller.
Specifically, control module 410 is used to call soft 430 decoding video of decoder, and hard decoders 420 are obtained, also used If initializing the hard decoders 420 in getting hard decoders 420, it is also used to the initialization of hard decoders 420 and finishes, 430 decoding video of hard decoders is then called, thus decoding of the control to video.
A kind of video decoder that the embodiment of the present invention four provides is controlled by control module to video decoding process, Hard decoders are obtained and initialized while carrying out soft decoding to video, are avoided due to waiting the initialization of hard decoders to make At video can not be decoded and be watched, after hard decoders initialization call hard decoders, it is whole to improve video Decoding efficiency promotes the viewing body of user even if can also reduce the decoded delay of video in the case where frequent switching video It tests.
The video decoder that the embodiment of the present invention four provides can be used for executing the video solution that above-mentioned any embodiment provides Code method, has corresponding function and beneficial effect.
Embodiment five
Fig. 8 is a kind of structural schematic diagram for audio/video player system that the embodiment of the present invention five provides.As shown in figure 8, video Play system 500 includes:
Video reception module 510, video decoder 520 and video playback module 530, the video decoder 520 For being sent to after the decoding of the video reception module 510 received video the video playback module 530 and playing.
Specifically, video reception module 510 can be live streaming platform, client, the browser etc. in terminal, for receiving Video, video decoder 520 are used to be sent to the video for after the decoding of the video reception module 510 received video Playing module 530 plays, wherein the structure and function of video decoder 520 can be found in video described in above-described embodiment four Decoding apparatus.Video playback module 530 is used for the video after broadcast decoder.
The audio/video player system that the embodiment of the present invention five provides can be used for executing the video that above-mentioned any embodiment provides and broadcast Method is put, has corresponding function and beneficial effect.
Embodiment six
Fig. 9 is a kind of hardware structural diagram for terminal that the embodiment of the present invention six provides.As shown in figure 9, the present embodiment A kind of terminal provided, comprising: processor 610 and storage device 620.Processor in the terminal can be one or more, In Fig. 9 by taking a processor 610 as an example, processor 610 and storage device 620 in the terminal can by bus or other Mode connects, in Fig. 9 for being connected by bus.
One or more of programs are executed by one or more of processors 610, so that one or more of places Reason device realizes any video encoding/decoding method or video broadcasting method in above-described embodiment.
Storage device 620 in the terminal is used as a kind of computer readable storage medium, can be used for storing one or more Program, described program can be software program, computer executable program and module, such as the video solution in the embodiment of the present invention Corresponding program instruction/the module of code method is (for example, the module in attached video decoding controller shown in fig. 6, comprising: call Module 210 obtains module 220 and initialization module 230).Processor 610 is stored in storage device 620 by operation Software program, instruction and module, thereby executing the various function application and data processing of terminal, i.e. the realization above method is real Apply the video encoding/decoding method or video broadcasting method in example.
Storage device 620 mainly includes storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. (such as according to terminal Resetting flag bit parameter, video in above-described embodiment etc.).In addition, storage device 620 may include high random access storage Device, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or other are non-volatile Solid-state memory.In some instances, storage device 620 can further comprise depositing relative to processor 610 is remotely located Reservoir, these remote memories can pass through network connection to terminal.The example of above-mentioned network includes but is not limited to internet, enterprise Industry intranet, local area network, mobile radio communication and combinations thereof.
Also, when one or more program included in above-mentioned terminal is held by one or more of processors 610 Row, so that one or more of processors are realized: calling soft decoder decoding video, and obtain hard decoders;If obtained To hard decoders, then the hard decoders are initialized;If hard decoders initialization finishes, the hard decoders is called to continue Decoding video.
Alternatively, when one or more program included in above-mentioned terminal is held by one or more of processors 610 Row, so that one or more of processors are realized: receiving video;Soft decoder decoding video is called, and obtains hard decoders; If getting hard decoders, the hard decoders are initialized;If hard decoders initialization finishes, the hard solution is called Code device continues decoding video;Video after broadcast decoder.
The video encoding/decoding method or video broadcasting method that the terminal and above-described embodiment that the present embodiment proposes propose belong to together One inventive concept, the technical detail of detailed description not can be found in above-mentioned any embodiment, and the present embodiment in the present embodiment Has beneficial effect identical with execution video encoding/decoding method or video broadcasting method.
On the basis of the above embodiments, the present embodiment also provides a kind of computer readable storage medium, is stored thereon with Computer program, the program realize the present invention above-mentioned any implementation when being executed by video decoding controller or video decoder Video encoding/decoding method or video broadcasting method in example.
Certainly, a kind of computer readable storage medium being stored with computer program provided by the embodiment of the present invention, Video encoding/decoding method or video as described in any embodiment of that present invention are practiced without limitation to when computer program is executed by processor Playback method.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions use so that terminal (can be platform Formula computer, smart phone or network equipment etc.) execute video encoding/decoding method or video described in each embodiment of the present invention Playback method.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (11)

1. a kind of video encoding/decoding method characterized by comprising
Soft decoder decoding video is called, and obtains hard decoders;
If getting hard decoders, the hard decoders are initialized;
If hard decoders initialization finishes, the hard decoders is called to continue decoding video.
2. the method according to claim 1, wherein described call soft decoder decoding video, comprising:
Enter direct broadcasting room for the first time, then calls soft decoder decoding video;Alternatively,
Switch direct broadcasting room, then calls soft decoder decoding video;Alternatively,
Switch video parameter in direct broadcasting room, then calls soft decoder decoding video.
3. method according to claim 1 or 2, which is characterized in that before the initialization hard decoders, also wrap It includes:
The resetting flag bit parameter that the hard decoders are arranged is mark to be initiated.
4. method according to claim 1 or 2, which is characterized in that described to get hard decoders, comprising:
The held state of hard decoders is the free time, then holds the hard decoders.
5. method according to claim 1 or 2, which is characterized in that the initialization hard decoders, comprising:
Main thread sends the instruction of initialization hard decoders;
Sub thread initializes the hard decoders according to the instruction of the initialization hard decoders.
6. a kind of video broadcasting method characterized by comprising
Receive video;
Pass through video encoding/decoding method decoding video such as described in any one of claim 1 to 5;
Video after broadcast decoder.
7. a kind of video decoding controller characterized by comprising
Calling module, for calling soft decoder decoding video;
Module is obtained, for obtaining hard decoders;
Initialization module, if initializing the hard decoders for getting hard decoders;
The calling module is also used to the hard decoders initialization and finishes, then the hard decoders is called to continue decoding video.
8. a kind of video decoder characterized by comprising control module, hard decoders and soft decoder, the control mould Block is connected with hard decoders and soft decoder respectively, and video decoding control as claimed in claim 7 is arranged in the control module Device.
9. a kind of audio/video player system characterized by comprising
Video reception module, video decoder as claimed in claim 8 and video playback module, the video decoder For being sent to after the received video decoding of the video reception module video playback module and playing.
10. a kind of terminal characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in claim 1-6.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The method as described in claim 1-6 is realized when execution.
CN201910204733.XA 2019-03-18 2019-03-18 Video decoding method, video playing method, device, system, terminal and storage medium Active CN109862409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910204733.XA CN109862409B (en) 2019-03-18 2019-03-18 Video decoding method, video playing method, device, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910204733.XA CN109862409B (en) 2019-03-18 2019-03-18 Video decoding method, video playing method, device, system, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109862409A true CN109862409A (en) 2019-06-07
CN109862409B CN109862409B (en) 2021-03-26

Family

ID=66900969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910204733.XA Active CN109862409B (en) 2019-03-18 2019-03-18 Video decoding method, video playing method, device, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109862409B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953991A (en) * 2020-08-07 2020-11-17 山东金东数字创意股份有限公司 Video CPU + GPU hardware decoding acceleration system and method based on window platform
CN112738525A (en) * 2020-12-11 2021-04-30 深圳万兴软件有限公司 Video processing method, device and computer readable storage medium
CN113411589A (en) * 2021-06-21 2021-09-17 苏州科达科技股份有限公司 Decoding method, decoding device, electronic equipment and storage medium
CN113676769A (en) * 2021-08-23 2021-11-19 北京字跳网络技术有限公司 Video decoding method, apparatus, storage medium, and program product
CN114422799A (en) * 2022-01-24 2022-04-29 北京百度网讯科技有限公司 Video file decoding method and device, electronic equipment and program product
CN114845162A (en) * 2021-02-01 2022-08-02 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and storage medium
CN114422799B (en) * 2022-01-24 2024-04-19 北京百度网讯科技有限公司 Decoding method and device for video file, electronic equipment and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002171523A (en) * 2000-09-22 2002-06-14 Matsushita Electric Ind Co Ltd Image decoder, image decoding method, and program storage medium
CN104185062A (en) * 2013-05-27 2014-12-03 中兴通讯股份有限公司 Method for processing video streams by terminal and terminal
CN108282164A (en) * 2017-01-05 2018-07-13 腾讯科技(深圳)有限公司 A kind of data encoding and coding/decoding method and device
CN108959977A (en) * 2018-06-22 2018-12-07 中国电子科技集团公司第五十八研究所 A kind of soft or hard hybrid decoding method suitable for SRAM PUF
CN109120988A (en) * 2018-08-23 2019-01-01 Oppo广东移动通信有限公司 Coding/decoding method, device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002171523A (en) * 2000-09-22 2002-06-14 Matsushita Electric Ind Co Ltd Image decoder, image decoding method, and program storage medium
CN104185062A (en) * 2013-05-27 2014-12-03 中兴通讯股份有限公司 Method for processing video streams by terminal and terminal
CN108282164A (en) * 2017-01-05 2018-07-13 腾讯科技(深圳)有限公司 A kind of data encoding and coding/decoding method and device
CN108959977A (en) * 2018-06-22 2018-12-07 中国电子科技集团公司第五十八研究所 A kind of soft or hard hybrid decoding method suitable for SRAM PUF
CN109120988A (en) * 2018-08-23 2019-01-01 Oppo广东移动通信有限公司 Coding/decoding method, device, electronic equipment and storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953991A (en) * 2020-08-07 2020-11-17 山东金东数字创意股份有限公司 Video CPU + GPU hardware decoding acceleration system and method based on window platform
CN111953991B (en) * 2020-08-07 2022-05-20 山东金东数字创意股份有限公司 System and method for accelerating decoding of video CPU + GPU hardware based on windows platform
CN112738525A (en) * 2020-12-11 2021-04-30 深圳万兴软件有限公司 Video processing method, device and computer readable storage medium
CN114845162A (en) * 2021-02-01 2022-08-02 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and storage medium
CN114845162B (en) * 2021-02-01 2024-04-02 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and storage medium
CN113411589A (en) * 2021-06-21 2021-09-17 苏州科达科技股份有限公司 Decoding method, decoding device, electronic equipment and storage medium
CN113676769A (en) * 2021-08-23 2021-11-19 北京字跳网络技术有限公司 Video decoding method, apparatus, storage medium, and program product
CN113676769B (en) * 2021-08-23 2023-03-31 北京字跳网络技术有限公司 Video decoding method, device and storage medium
CN114422799A (en) * 2022-01-24 2022-04-29 北京百度网讯科技有限公司 Video file decoding method and device, electronic equipment and program product
CN114422799B (en) * 2022-01-24 2024-04-19 北京百度网讯科技有限公司 Decoding method and device for video file, electronic equipment and program product

Also Published As

Publication number Publication date
CN109862409B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN109862409A (en) Video decoding, playback method, device, system, terminal and storage medium
CN110557670B (en) Method, device, terminal and storage medium for playing video in webpage
US10229651B2 (en) Variable refresh rate video capture and playback
CN107018370B (en) Display method and system for video wall
WO2016131223A1 (en) Frame loss method for video frame and video sending apparatus
CN110366033B (en) Video playing method, device, equipment and storage medium
CN111417441A (en) Method and system for rendering and encoding content of an online interactive gaming session
CN111314741B (en) Video super-resolution processing method and device, electronic equipment and storage medium
CN111479165B (en) Seamless switching method and device for software and hardware decoding resolution and storage medium
CN110784718B (en) Video data encoding method, apparatus, device and storage medium
US11694316B2 (en) Method and apparatus for determining experience quality of VR multimedia
CN105430417B (en) Encoding method, decoding method, device and electronic equipment
JP2018521550A (en) Method, client and computer storage medium for playing video
CN109788212A (en) A kind of processing method of segmenting video, device, terminal and storage medium
CN110401866B (en) Live video display method, device, terminal and storage medium
CN105409229A (en) Information processing apparatus, information processing method, and program
CN110049347B (en) Method, system, terminal and device for configuring images on live interface
CN107613302B (en) Decoding method and device, storage medium and processor
CN109729379B (en) Method, device, terminal and storage medium for realizing live video microphone connection
CN104010204B (en) Image information processing method and device
CN109525852B (en) Live video stream processing method, device and system and computer readable storage medium
WO2021057686A1 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium and electronic device
CN113301346A (en) Method and device for playing multi-channel video in hybrid mode based on android terminal soft and hard decoding
CN103260017A (en) Video processing method, video processing device and video processing system
CN104994406A (en) Video editing method and apparatus based on silverlight plug-in

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant