CN104980788A - Video decoding method and device - Google Patents

Video decoding method and device Download PDF

Info

Publication number
CN104980788A
CN104980788A CN201510073425.XA CN201510073425A CN104980788A CN 104980788 A CN104980788 A CN 104980788A CN 201510073425 A CN201510073425 A CN 201510073425A CN 104980788 A CN104980788 A CN 104980788A
Authority
CN
China
Prior art keywords
video
decoding
mobile terminal
decoder
mistake
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
CN201510073425.XA
Other languages
Chinese (zh)
Other versions
CN104980788B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510073425.XA priority Critical patent/CN104980788B/en
Publication of CN104980788A publication Critical patent/CN104980788A/en
Application granted granted Critical
Publication of CN104980788B publication Critical patent/CN104980788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a video decoding method, comprising the steps as follows: obtaining model number information of a mobile terminal, judging whether the model number information of the mobile terminal is matched with the information in a white list, wherein the white list is recorded with model number information of the mobile terminal supporting hardware decoding; decoding the video via a software decoder if the model number information of the mobile terminal is not matched with the information in the white list; obtaining a corresponding video decoding library according to version information of a processor of the mobile terminal, and judging whether the format of the video is a preset video coding standard format according to the video decoding library; decoding the video via a hardware decoder if the format of the video is the preset video coding standard format, and executing the step of decoding the video via the software decoder if the format of the video is not the preset video coding standard format. The invention further provides a video decoding device. The above video decoding method and the video decoding device can improve flexibility and success rate of decoding the video.

Description

Video encoding/decoding method and device
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of video encoding/decoding method and device.
Background technology
Video decode mode based on mobile terminal generally comprises soft solution and firmly separates two kinds.Hard solution is also hardware decode, refers to and utilizes the multi-media processing unit of the chip of mobile terminal to carry out the mode of decoding.Soft solution is also software decode, refers to and utilizes decoding program to be carried out the mode of decoding by primary processor.
But use software decode merely, although can obtain more stable effect, when playing complicated video, decoding speed can affect the fluency of video playback more slowly and compare power consumption, and then error probability is very high to use merely hardware decode.
Summary of the invention
In view of this, the invention provides a kind of video encoding/decoding method and device, flexibility and the success rate of video decode can be improved.
A kind of video encoding/decoding method that the embodiment of the present invention provides, comprising:
Obtain the type information of mobile terminal, the type information judging described mobile terminal whether with the information match in white list, record the type information of the mobile terminal of support hardware decoding in described white list;
If do not mate, then by software decoder decoded video;
If match, then obtain corresponding video decode storehouse according to the version information of the processor of described mobile terminal, and judge whether the form of described video is preset video coding standard format according to described video decode storehouse;
If so, then to be decoded described video by hardware decoder, if not, then perform the described step by software decoder decoded video.
A kind of video decoder that the embodiment of the present invention provides, comprising:
Acquisition module, for obtaining the type information of mobile terminal;
Judge module, for judge the described mobile terminal that described acquisition module obtains type information whether with the information match in white list, record the type information of the mobile terminal of support hardware decoding in described white list;
Decoder module, if for the judged result of described judge module for not mate, then by software decoder decoded video;
Described acquisition module, if also for the judged result of described judge module for matching, then obtain corresponding video decode storehouse according to the version information of the processor of described mobile terminal;
Described judge module, the described video decode storehouse also for obtaining according to described acquisition module judges whether the form of described video is preset video coding standard format;
Described decoder module, if be also yes for the judged result of described judge module, then decoded described video by hardware decoder, if not, then performs the described step by software decoder decoded video.
The video encoding/decoding method that the embodiment of the present invention provides and device, by before video decode according to the match condition of the information in the type information of mobile terminal and white list, and whether the form of video to be decoded is preset video coding standard format, select corresponding decoding process, can be this video and determine most suitable decoding process, improve flexibility and the success rate of video decode.
For above and other object of the present invention, feature and advantage can be become apparent, preferred embodiment cited below particularly, and coordinate institute's accompanying drawings, be described in detail below.
Accompanying drawing explanation
Fig. 1 shows a kind of structured flowchart of mobile terminal;
The flow chart of the video encoding/decoding method that Fig. 2 provides for first embodiment of the invention;
The applied environment figure of the video encoding/decoding method that Fig. 3 provides for first embodiment of the invention;
The flow chart of the video encoding/decoding method that Fig. 4 provides for second embodiment of the invention;
The flow chart of a step in the video encoding/decoding method that Fig. 5 provides for second embodiment of the invention;
The flow chart of another step in the video encoding/decoding method that Fig. 6 provides for second embodiment of the invention;
The structural representation of the video decoder that Fig. 7 provides for third embodiment of the invention;
The structural representation of the video decoder that Fig. 8 provides for fourth embodiment of the invention.
Embodiment
For further setting forth the present invention for the technological means that realizes predetermined goal of the invention and take and effect, below in conjunction with accompanying drawing and preferred embodiment, to according to the specific embodiment of the present invention, structure, feature and effect thereof, be described in detail as follows.
Fig. 1 shows a kind of structured flowchart of mobile terminal.As shown in Figure 1, mobile terminal 200 comprises: memory 202, storage control 204, one or more (only illustrating one in figure) processor 206, Peripheral Interface 208, radio-frequency module 210, audio-frequency module 212, display module 214, key-press module 216 and hardware decoder 218.These assemblies are by one or more communication bus/holding wire 220 communication mutually.
Be appreciated that the structure shown in Fig. 1 is only signal, mobile terminal 200 also can comprise than assembly more or less shown in Fig. 1, or has the configuration different from shown in Fig. 1.Each assembly shown in Fig. 1 can adopt hardware, software or its combination to realize.
Memory 202 can be used for storing software program and module, as the video encoding/decoding method in the embodiment of the present invention and program command/module corresponding to device, processor 206 is by running the software program and module that are stored in memory 202, thus perform the application of various function and data processing, namely realize above-mentioned video encoding/decoding method.
Memory 202 can comprise high speed random asccess memory, also can comprise nonvolatile memory, as one or more magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, memory 202 can comprise the memory relative to the long-range setting of processor 206 further, and these remote memories can be connected to mobile terminal 200 by network.The example of above-mentioned network includes but not limited to the Internet, intranet, local area network (LAN), mobile radio communication and combination thereof.Processor 206 and other possible assemblies can carry out the access of memory 202 under the control of storage control 204.
Various softwares in processor 206 run memory 202, instruction are to perform the various function of mobile terminal 200 and to carry out data processing.
Peripheral Interface 208 is for being coupled to CPU and memory 202 by various external equipment.
In certain embodiments, storage control 204, processor 206 and Peripheral Interface 208 can realize in one single chip.In some other example, they can respectively by independently chip realization.
Radio-frequency module 210, for receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and the signal of telecommunication, thus carries out communication with communication network or other equipment.Radio-frequency module 210 can comprise the various existing circuit element for performing these functions, such as, and antenna, radio-frequency (RF) transceiver, digital signal processor, encrypt/decrypt chip, subscriber identity module (SIM) card, memory etc.Radio-frequency module 210 can with various network as the Internet, intranet, wireless network carry out communication or carry out communication by wireless network and other equipment.Above-mentioned wireless network can comprise cellular telephone networks, WLAN (wireless local area network) or metropolitan area network.Above-mentioned wireless network can use various communication standard, agreement and technology, include, but are not limited to global system for mobile communications (Global System for MobileCommunication, GSM), enhancement mode mobile communication technology (Enhanced Data GSMEnvironment, EDGE), Wideband CDMA Technology (wideband code division multipleaccess, W-CDMA), CDMA (Code Division Multiple Access) (Code division access, CDMA), tdma (time division multiple access, TDMA), bluetooth, adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (as IEEE-USA standard IEEE 802.11a, IEEE802.11b, IEEE802.11g and/or IEEE802.11n), the networking telephone (Voice overinternet protocol, VoIP), worldwide interoperability for microwave access (Worldwide Interoperability forMicrowave Access, Wi-Max), other are for mail, the agreement of instant messaging and short message, and any other suitable communications protocol, even can comprise those current agreements be developed not yet.
Audio-frequency module 212 provides audio interface to user, and it can comprise one or more microphone, one or more loud speaker and voicefrequency circuit.Voicefrequency circuit receives voice data from Peripheral Interface 208, voice data is converted to telecommunications breath, and telecommunications breath is transferred to loud speaker.Telecommunications breath is changed the sound wave can heard into people's ear by loud speaker.Voicefrequency circuit also from microphone receive telecommunications breath, convert electrical signals to voice data, and by data transmission in network telephony to Peripheral Interface 208 to be further processed.Voice data can obtain from memory 202 or by radio-frequency module 210.In addition, voice data also can be stored in memory 202 or by radio-frequency module 210 and send.In some instances, audio-frequency module 212 also can comprise an earphone and broadcast hole, for providing audio interface to earphone or other equipment.
Display module 214 provides an output interface between mobile terminal 200 and user, and export to user's display video, the content of these video frequency output can comprise word, figure, video and combination in any thereof.Some Output rusults correspond to some user interface object.Understandable, display module 214 can also provide one to export and inputting interface between mobile terminal 200 and user simultaneously.Particularly, except exporting to user's display video, display module 214 also receives the input of user, and the gesture operation such as click, slip of such as user, so that response is made in the input of user interface object to these users.The technology detecting user's input can be based on resistance-type, condenser type or other touch control detection technology possible arbitrarily.The instantiation of display module 214 display unit includes, but are not limited to liquid crystal display or light emitting polymer displays.
Key-press module 216 provides user to carry out the interface inputted to mobile terminal 200 equally, and user can perform different functions by pressing different buttons to make mobile terminal 200.
Hardware decoder 218, for decoded video, instantiation includes, but are not limited to multimedia, audio frequency, video decoding chip.
Mobile terminal 200 can comprise: be provided with Android or other similar operations systems and support video playback, network data transmission and have the smart mobile phone, panel computer, E-book reader, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression standard audio frequency aspect 4) player, pocket computer on knee, vehicle-mounted computer, wearable device, navigator etc. of browser environment.
First embodiment
The flow chart of the video encoding/decoding method that Fig. 2 provides for first embodiment of the invention.The method, by the mobile terminal 200 shown in Fig. 1, realizes video decode.As shown in Figure 3, the method comprises:
Step S101, obtains the type information of mobile terminal;
In the present embodiment, in mobile terminal 200, preset browser, by running the video that this browser acquisition user specifies, then performing each step in the present embodiment, realizing the decoding to this video and broadcasting.Wherein, the video that user specifies both can be the Online Video being stored in server also can be stored in local offline video.The version information of mobile terminal 200 is comprised in the type information of mobile terminal 200.
Step S102, the type information judging this mobile terminal whether with the information match in white list, record the type information of the mobile terminal of support hardware decoding in this white list;
Recording in white list after tested can the type information of one or more mobile terminals of support hardware decoding.The type information of mobile terminal 200 is mated one by one with the information recorded in white list, when many that comprise in this white list can support hardware decoding mobile terminal type information in have the matching degree of the type information of a type information and mobile terminal 200 to be greater than preset value, then determine the information match in the type information of mobile terminal 200 and this white list, mobile terminal 200 support hardware is decoded; Otherwise, determine that the type information of mobile terminal 200 does not mate with the information in this white list, mobile terminal 200 not support hardware decoding.
If do not mate, then perform step S103; If match, then perform step S104.
Step S103, by software decoder decoded video;
When the type information of mobile terminal 200 does not mate with the information in this white list, by software decoder decoded video.Wherein, software decoder can be, but not limited to comprise: FFMpeg (FastForward Mpeg, a kind of cross-platform multi-media processing instrument) decoder, VLC multimedia player (Visible Light Communication) etc.Such as, when the type information of mobile terminal 200 does not mate with the information in this white list, then by video that preset browser execution FFMepg decoders decode user specifies.
Step S104, the version information according to the processor of this mobile terminal obtains corresponding video decode storehouse;
The processor of mobile terminal can be, but not limited to comprise: arm processor (Advanced RISCMachines, senior classical instruction set machine), Intel ATOM processor (Chinese: atom processor) or other similar processors.
Particularly, when information match in the type information and this white list of mobile terminal 200, then obtained the version information of the arm processor of mobile terminal 200 by preset browser, obtain corresponding video decode storehouse according to this version information.
Step S105, judges according to this video decode storehouse whether the form of this video is preset video coding standard format;
H.264 preset video encoding standard is preferably.H.264 be a kind of high-performance protocol of encode and decode, it is the new-generation digital video compression format after the common MPEG4 that continues (MovingPicture Experts Group4, dynamic image expert group 4) proposed of International Organization for standardization (ISO) and International Telecommunication Union (ITU).
Particularly, by loading and running the video that this video decode storehouse decode users specifies, then judge that whether the form of this video is H.264 form according to operation result.
If so, then step S106 is performed; If not, then step S103 is performed.
Step S106, to be decoded this video by hardware decoder.
Hardware decoder can be, but not limited to comprise: multimedia, audio frequency, video decoding chip.Particularly, when the form of the video that user specifies is for H.264 form, then to be decoded this video by preset browser instruction hardware decoder.
The video encoding/decoding method that the embodiment of the present invention provides, by before video decode according to the match condition of the information in the type information of mobile terminal and white list, and whether the form of video to be decoded is preset video coding standard format, select corresponding decoding process, can be this video and determine most suitable decoding process, improve flexibility and the success rate of video decode.
Second embodiment
The flow chart of the video encoding/decoding method that Fig. 3 provides for second embodiment of the invention.The method can be applicable in the applied environment shown in Fig. 4, and by the mobile terminal 200 shown in Fig. 4, realizes video decode.In Fig. 4, server 100 and mobile terminal 200 are arranged in wired or wireless network, carry out information interaction by this network.As shown in Figure 3, the method comprises:
Step S201, obtains the type information of mobile terminal;
In the present embodiment, in mobile terminal 200, preset browser, by running the video that this browser acquisition user specifies, then performing each step in the present embodiment, realizing the decoding to this video and broadcasting.Wherein, the video that user specifies both can be the Online Video being stored in server also can be stored in local offline video.The version information of mobile terminal 200 is comprised in the type information of mobile terminal 200.
Step S202, sends to server by the type information of this mobile terminal, and the type information of this mobile terminal is mated with the information in this white list by this server;
Recording in this white list after tested can the type information of one or more mobile terminals of support hardware decoding.Particularly, the type information of the mobile terminal 200 obtained by preset browser is sent to server 100 by mobile terminal 200, and this type information is mated with the information in this white list by server 100.The type information of the mobile terminal 200 of reception mates with the information recorded in this white list by server 100 one by one, when many that comprise in this white list can support hardware decoding mobile terminal type information in have the matching degree of the type information of a type information and mobile terminal 200 to be greater than preset value, then determine the information match in the type information of mobile terminal 200 and this white list, mobile terminal 200 support hardware is decoded; Otherwise, determine that the type information of mobile terminal 200 does not mate with the information in this white list, mobile terminal 200 not support hardware decoding; Then, matching result is returned to mobile terminal 200.
Step S203, the type information that the matching result returned according to this server judges this mobile terminal whether with the information match in white list;
If do not mate, then perform step S204; If match, then perform step S206.
Step S204, by software decoder decoded video, and sends to this server by the type information of this mobile terminal, makes this server upgrade this white list according to the type information of this mobile terminal;
Software decoder can be, but not limited to comprise: FFMpeg decoder, VLC multimedia player etc.
Particularly, if the type information of matching result display mobile terminal 200 that server 100 returns does not mate with the information in this white list, then by video that preset browser execution FFMepg decoders decode user specifies.Simultaneously, the type information of mobile terminal 200 is sent to server 100, make server 100 obtain incorrect information in this white list (as: in test, support hardware is decoded but there is the type information of the mobile terminal of the failed case of decoding in actual decoding) according to this type information, and shielded or delete.
Step S205, if there is decoding error in decode procedure, then switched system player is decoded this video;
System plays device is the player carried in the operating system of mobile terminal, in the whole process passing through software decoder decoded video, comprise software decode initialization and two stages of formal decoding, as long as any one stage in above-mentioned two stages receive error message that system returns (as, error code), then switch this system plays device by preset browser and to decode this video.
Step S206, the version information according to the processor of this mobile terminal obtains corresponding video decode storehouse;
The processor of mobile terminal can be, but not limited to comprise: arm processor, Intel ATOM processor or other similar processors.
Particularly, if the information match in the type information of matching result that server 100 returns display mobile terminal 200 and this white list, then obtained the version information of the arm processor of mobile terminal 200 by preset browser, obtain corresponding decoding storehouse according to this version information from server 100.
Step S207, judges according to this decoding storehouse whether the form of this video is preset video coding standard format;
H.264 preset video encoding standard is preferably.H.264 being a kind of high-performance protocol of encode and decode, is the new-generation digital video compression format after MPEG4 that International Organization for standardization (ISO) and International Telecommunication Union (ITU) propose jointly.
Particularly, mobile terminal 200 is loaded by preset browser and runs the video to be decoded that this video decode storehouse decode users specifies, and then judges that whether the form of this video is H.264 form according to operation result.
If so, then step S208 is performed; If not, then step S204 is performed.
Step S208, performs hardware decode initialization operation by hardware decoder, judges whether this hardware decode initialization operation makes a mistake;
Particularly, as shown in Figure 5, this step specifically can comprise:
Step S2081, is analyzed one group of video features parameter of specifying in this video by this hardware decoder, to determine whether this hardware decoder supports this video features parameter;
The video features parameter that this group is specified can be, but not limited to comprise: the configuration parameter of video, level parameters and wide high parameter.Wherein, the configuration parameter of video is for illustration of the complexity of Video coding, and the level parameters of video refers to the scope of the resolution of video, and wide high parameter refers to the value of the width of video and height.
Particularly, mobile terminal 200 by hardware decoder (as, multimedia, video, audio decoder chip) from the file of this video, obtain above-mentioned video features parameter, read and analyze this video features parameter, to determine whether this hardware decoder supports this video features parameter.
Step S2082, if do not support, then determines that this hardware decode initialization operation makes a mistake;
Step S2083, if support, then judges whether the form of the color that renderer support shows mates with the video decompression form of this hardware decoder support;
When using hardware mode render video, because color during renderer display is generally RGB565 form, and the form of the video decompression of hardware decoder support is generally yuv format, miscellaneous editions is perhaps had according to different chip yuv formats, system can have matching requirement to decompressed format usually, such as, the video of the yuv format of some versions can directly transfer RGB565 form to, the video of the yuv format of some versions then can not directly transfer RGB565 form to, and when can not directly change, when being also form undesirable (not mating), system can return error message.
Step S2084, if do not mate, then determines that this hardware decode initialization operation makes a mistake.
When system returns error message, determine the video decompression format mismatching that the form of the color that renderer support shows and this hardware decoder are supported, this hardware decode initialization operation makes a mistake.
If this hardware decode initialization operation makes a mistake, then perform step S204; If this hardware decode initialization operation does not make a mistake, then perform step S209.
Step S209, formally to be decoded this video by this hardware decoder, judges whether this formal decoding makes a mistake;
Particularly, as shown in Figure 6, this step can comprise:
Step S2091, to be decoded by this hardware decoder the first frame of this video, if the information of this video features parameter is inconsistent before and after decoding, then this video features parameter obtained after reaffirming decoding, and when making a mistake in confirmation process, determining that this is formally decoded and making a mistake;
The information of this video features parameter sometimes obtained when initialization can be inconsistent with the information of rear this video features parameter obtained of decoding, the wide high parameter of such as video, the value obtained after the value of this wide high parameter obtained during initialization and the first frame of this video of decoding is likely inconsistent, now hardware decoder can reaffirm the information of rear this video features parameter obtained of decoding, is correctly decoded so that follow-up.If make a mistake reaffirming in process, then determining that formal decoding makes a mistake.
Step S2092, if the information of this video features parameter of decoding front and back is consistent, or does not make a mistake in confirmation process, then continues other frames of this video of decoding, and when making a mistake in decode procedure, determining that this is formally decoded and making a mistake.
If the information of this video features parameter obtained during initialization is consistent with the information of this video features parameter obtained after decoding, or do not make a mistake in the process of the information of this video features parameter obtained after reaffirming decoding, then continue other frames of this video of decoding, and when the error code that the system that receives in decode procedure returns, determine that formal decoding makes a mistake.
If this is formally decoded and makes a mistake, then perform step S204.
The video encoding/decoding method that the embodiment of the present invention provides, by before video decode according to the match condition of the information in the type information of mobile terminal and white list, and whether the form of video to be decoded is preset video coding standard format, select corresponding decoding process, can be this video and determine most suitable decoding process, improve flexibility and the success rate of video decode.In addition, by the process according to selected decoding process decoded video, switch other decoding processes in time according to the mistake occurred in decode procedure, the error rate of video decode can be reduced further, improve decoding efficiency.
3rd embodiment
The structural representation of the video decoder that Fig. 7 provides for third embodiment of the invention.The video decoder 30 that the present embodiment provides can run in the mobile terminal 200 shown in Fig. 1, for realizing the video encoding/decoding method in above-described embodiment.As shown in Figure 7, video decoder 30 comprises:
Acquisition module 301, for obtaining the type information of mobile terminal;
Judge module 302, for judge this mobile terminal that acquisition module 301 obtains type information whether with the information match in white list, record the type information of the mobile terminal of support hardware decoding in this white list;
Decoder module 303, if for the judged result of judge module 302 for not mate, then by software decoder decoded video;
Acquisition module 301, if also for the judged result of judge module 302 for matching, then obtain corresponding video decode storehouse according to the version information of the processor of this mobile terminal;
Judge module 302, this video decode storehouse also for obtaining according to acquisition module 301 judges whether the form of this video is preset video coding standard format;
Decoder module 303, if be also yes for the judged result of judge module 302, then to be decoded this video by hardware decoder, if not, then performs this step by software decoder decoded video.
The present embodiment, to the detailed process of each Implement of Function Module of video decoder 40 function separately, refers to the particular content of above-mentioned Fig. 1 to middle description embodiment illustrated in fig. 6, repeats no more herein.
The video decoder that the embodiment of the present invention provides, by before video decode according to the match condition of the information in the type information of mobile terminal and white list, and whether the form of video to be decoded is preset video coding standard format, select corresponding decoding process, can be this video and determine most suitable decoding process, improve flexibility and the success rate of video decode.
4th embodiment
The structural representation of the video decoder that Fig. 8 provides for fourth embodiment of the invention.The video decoder 40 that the present embodiment provides can run in the mobile terminal 200 shown in Fig. 1, for realizing the video encoding/decoding method in above-described embodiment.As shown in Figure 8, with the video decoder 30 shown in Fig. 7 unlike:
Further, decoder module 303 comprises:
Judging unit 3031, for performing hardware decode initialization operation by this hardware decoder, judges whether this hardware decode initialization operation makes a mistake;
Decoding unit 3032, if make a mistake for this hardware decode initialization operation, then performs this step by software decoder decoded video;
Judging unit 3031, if also do not make a mistake for this hardware decode initialization operation, then formally to be decoded this video by this hardware decoder, judges whether this formal decoding makes a mistake;
Decoding unit 3032, if also for this formally decoding make a mistake, then perform this step by software decoder decoded video.
Further, judging unit 3031, also for being analyzed one group of video features parameter of specifying in this video by this hardware decoder, to determine whether this hardware decoder supports this video features parameter, if do not support, then determine that this hardware decode initialization operation makes a mistake, if support, then judge whether the form of the color that renderer support shows mates with the video decompression form of this hardware decoder support, if do not mate, then determine that this hardware decode initialization operation makes a mistake.
Further, judging unit 3031, also for the first frame of this video of being decoded by this hardware decoder, if the information of this video features parameter is inconsistent before and after decoding, this video features parameter obtained after then reaffirming decoding, and when making a mistake in confirmation process, determine that this is formally decoded to make a mistake, if also consistent for the information of this video features parameter before and after decoding, or do not make a mistake in confirmation process, then continue other frames of this video of decoding, and when making a mistake in decode procedure, determining that this is formally decoded and making a mistake.
Further, judge module 302 comprises:
Transmitting element 3021, for the type information of this mobile terminal is sent to server, makes this server be mated with the information in this white list by the type information of this mobile terminal;
Information matches judging unit 3022, the type information that the matching result for returning according to this server judges this mobile terminal whether with the information match in white list.
Further, decoder module 303, also for this video of being decoded by this software decoder, if there is decoding error in decode procedure, then switched system player is decoded this video.
Further, video decoder 40 also comprises:
Sending module 404, for the type information of this mobile terminal is sent to this server, makes this server upgrade this white list according to the type information of this mobile terminal.
The present embodiment, to the detailed process of each Implement of Function Module of video decoder 40 function separately, refers to the particular content of above-mentioned Fig. 1 to middle description embodiment illustrated in fig. 6, repeats no more herein.
The video decoder that the embodiment of the present invention provides, by before video decode according to the match condition of the information in the type information of mobile terminal and white list, and whether the form of video to be decoded is preset video coding standard format, select corresponding decoding process, can be this video and determine most suitable decoding process, improve flexibility and the success rate of video decode.In addition, by the process according to selected decoding process decoded video, switch other decoding processes in time according to the mistake occurred in decode procedure, the error rate of video decode can be reduced further, improve decoding efficiency.
It should be noted that, each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device class embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising key element and also there is other identical element.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
Above, it is only preferred embodiment of the present invention, not any pro forma restriction is done to the present invention, although the present invention discloses as above with preferred embodiment, but and be not used to limit the present invention, any those skilled in the art, do not departing within the scope of technical solution of the present invention, make a little change when the technology contents of above-mentioned announcement can be utilized or be modified to the Equivalent embodiments of equivalent variations, in every case be do not depart from technical solution of the present invention content, according to any simple modification that technical spirit of the present invention is done above embodiment, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (15)

1. a video encoding/decoding method, is characterized in that, described method comprises:
Obtain the type information of mobile terminal, the type information judging described mobile terminal whether with the information match in white list, record the type information of the mobile terminal of support hardware decoding in described white list;
If do not mate, then by software decoder decoded video;
If match, then obtain corresponding video decode storehouse according to the version information of the processor of described mobile terminal, and judge whether the form of described video is preset video coding standard format according to described video decode storehouse;
If so, then to be decoded described video by hardware decoder, if not, then perform the described step by software decoder decoded video.
2. method according to claim 1, is characterized in that, is describedly comprised by hardware decoder described video of decoding:
Perform hardware decode initialization operation by described hardware decoder, judge whether described hardware decode initialization operation makes a mistake;
If described hardware decode initialization operation makes a mistake, then perform the described step by software decoder decoded video;
If described hardware decode initialization operation does not make a mistake, then formally to be decoded described video by described hardware decoder, judge whether described formal decoding makes a mistake;
If described formal decoding makes a mistake, then perform the described step by software decoder decoded video.
3. method according to claim 2, is characterized in that, described by described hardware decoder execution hardware decode initialization operation, judges whether described hardware decode initialization operation makes a mistake and comprises:
By described hardware decoder, one group of video features parameter of specifying in described video is analyzed, to determine whether described hardware decoder supports described video features parameter;
If do not support, then determine that described hardware decode initialization operation makes a mistake.
4. method according to claim 3, is characterized in that, described method also comprises:
If support, then judge whether the form of the color that renderer support shows mates with the video decompression form of described hardware decoder support;
If do not mate, then determine that described hardware decode initialization operation makes a mistake.
5. method according to claim 4, is characterized in that, describedly formally to be decoded described video by described hardware decoder, judges whether described formal decoding makes a mistake and comprises:
To be decoded by described hardware decoder the first frame of described video, if the information of described video features parameter is inconsistent before and after decoding, the described video features parameter obtained after then reaffirming decoding, and when making a mistake in confirmation process, determine that described formal decoding makes a mistake;
If the information of described video features parameter is consistent before and after decoding, or does not make a mistake in confirmation process, then continues other frames of the described video of decoding, and when making a mistake in decode procedure, determine that described formal decoding makes a mistake.
6. method according to claim 1, is characterized in that, describedly judges whether the type information of described mobile terminal comprises with the information match in white list:
The type information of described mobile terminal is sent to server, the type information of described mobile terminal is mated with the information in described white list by described server;
The type information that the matching result returned according to described server judges described mobile terminal whether with the information match in white list.
7. the method according to any one of claim 1 to 6, is characterized in that, is describedly comprised by software decoder described video of decoding:
To be decoded described video by described software decoder;
If there is decoding error in decode procedure, then switched system player is decoded described video.
8. method according to claim 7, is characterized in that, described decoding after described video by described software decoder is comprised:
The type information of described mobile terminal is sent to described server, makes described server upgrade described white list according to the type information of described mobile terminal.
9. a video decoder, is characterized in that, described device comprises:
Acquisition module, for obtaining the type information of mobile terminal;
Judge module, for judge the described mobile terminal that described acquisition module obtains type information whether with the information match in white list, record the type information of the mobile terminal of support hardware decoding in described white list;
Decoder module, if for the judged result of described judge module for not mate, then by software decoder decoded video;
Described acquisition module, if also for the judged result of described judge module for matching, then obtain corresponding video decode storehouse according to the version information of the processor of described mobile terminal;
Described judge module, the described video decode storehouse also for obtaining according to described acquisition module judges whether the form of described video is preset video coding standard format;
Described decoder module, if be also yes for the judged result of described judge module, then decoded described video by hardware decoder, if not, then performs the described step by software decoder decoded video.
10. device according to claim 9, is characterized in that, described decoder module comprises:
Judging unit, for performing hardware decode initialization operation by described hardware decoder, judges whether described hardware decode initialization operation makes a mistake;
Decoding unit, if make a mistake for described hardware decode initialization operation, then performs the described step by software decoder decoded video;
Described judging unit, if also do not make a mistake for described hardware decode initialization operation, then formally to be decoded described video by described hardware decoder, judges whether described formal decoding makes a mistake;
Described decoding unit, if also make a mistake for described formal decoding, then performs the described step by software decoder decoded video.
11. devices according to claim 10, is characterized in that,
Described judging unit, also for being analyzed one group of video features parameter of specifying in described video by described hardware decoder, to determine whether described hardware decoder supports described video features parameter, if do not support, then determine that described hardware decode initialization operation makes a mistake, if support, then judge whether the form of the color that renderer support shows mates with the video decompression form of described hardware decoder support, if do not mate, then determine that described hardware decode initialization operation makes a mistake.
12. devices according to claim 11, is characterized in that,
Described judging unit, also for the first frame of described video of being decoded by described hardware decoder, if the information of described video features parameter is inconsistent before and after decoding, the described video features parameter obtained after then reaffirming decoding, and when making a mistake in confirmation process, determine that described formal decoding makes a mistake, if also consistent for the information of described video features parameter before and after decoding, or do not make a mistake in confirmation process, then continue other frames of the described video of decoding, and when making a mistake in decode procedure, determine that described formal decoding makes a mistake.
13. devices according to claim 9, is characterized in that, described judge module comprises:
Transmitting element, for the type information of described mobile terminal is sent to server, makes described server be mated with the information in described white list by the type information of described mobile terminal;
Information matches judging unit, the type information that the matching result for returning according to described server judges described mobile terminal whether with the information match in white list.
14. devices according to any one of claim 9 to 13, is characterized in that, described decoder module, and also for described video of being decoded by described software decoder, if there is decoding error in decode procedure, then switched system player is decoded described video.
15. devices according to claim 14, is characterized in that, described device also comprises:
Sending module, for the type information of described mobile terminal is sent to described server, makes described server upgrade described white list according to the type information of described mobile terminal.
CN201510073425.XA 2015-02-11 2015-02-11 Video encoding/decoding method and device Active CN104980788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510073425.XA CN104980788B (en) 2015-02-11 2015-02-11 Video encoding/decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510073425.XA CN104980788B (en) 2015-02-11 2015-02-11 Video encoding/decoding method and device

Publications (2)

Publication Number Publication Date
CN104980788A true CN104980788A (en) 2015-10-14
CN104980788B CN104980788B (en) 2018-08-07

Family

ID=54276794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510073425.XA Active CN104980788B (en) 2015-02-11 2015-02-11 Video encoding/decoding method and device

Country Status (1)

Country Link
CN (1) CN104980788B (en)

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980797A (en) * 2015-05-27 2015-10-14 腾讯科技(深圳)有限公司 Video decoding method and client
CN105898496A (en) * 2015-11-18 2016-08-24 乐视网信息技术(北京)股份有限公司 HLS stream hardware decoding method based on Android device and device
CN106131319A (en) * 2016-06-29 2016-11-16 努比亚技术有限公司 A kind of information processing method and device, terminal
CN106231051A (en) * 2016-08-01 2016-12-14 腾讯科技(深圳)有限公司 The method of testing of a kind of video decoding and relevant device
CN106658174A (en) * 2016-10-31 2017-05-10 努比亚技术有限公司 Video decoding terminal and method
CN106792066A (en) * 2016-12-20 2017-05-31 暴风集团股份有限公司 The method and system that the video decoding of optimization is played
CN108235096A (en) * 2018-01-18 2018-06-29 湖南快乐阳光互动娱乐传媒有限公司 The mobile terminal hard decoder method that intelligently the soft decoding of switching plays video
CN108600813A (en) * 2018-05-17 2018-09-28 上海七牛信息技术有限公司 a kind of media file playing method, device and media play system
CN108882010A (en) * 2018-06-29 2018-11-23 深圳市九洲电器有限公司 A kind of method and system that multi-screen plays
CN109088887A (en) * 2018-09-29 2018-12-25 北京金山云网络技术有限公司 A kind of decoded method and device of Streaming Media
CN109309867A (en) * 2017-07-28 2019-02-05 中兴通讯股份有限公司 Display methods, display terminal and the computer readable storage medium of terminal
CN109391843A (en) * 2017-08-03 2019-02-26 腾讯科技(深圳)有限公司 Online Video speed playback method, device, medium and intelligent terminal
CN110138725A (en) * 2019-03-26 2019-08-16 视联动力信息技术股份有限公司 A kind of method for interchanging data and security gateway
CN110198427A (en) * 2018-07-05 2019-09-03 腾讯科技(深圳)有限公司 Video call method and device
CN110753265A (en) * 2019-10-28 2020-02-04 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN110858920A (en) * 2018-08-23 2020-03-03 武汉斗鱼网络科技有限公司 Video decoding method, mobile terminal, server, system and storage medium
WO2020078165A1 (en) * 2018-10-15 2020-04-23 Oppo广东移动通信有限公司 Video processing method and apparatus, electronic device, and computer-readable medium
CN111757168A (en) * 2019-03-29 2020-10-09 腾讯科技(深圳)有限公司 Audio decoding method, device, storage medium and equipment
CN112003976A (en) * 2020-07-31 2020-11-27 北京达佳互联信息技术有限公司 Hard-coding and hard-decoding test method and device
CN112203097A (en) * 2020-09-30 2021-01-08 苏州臻迪智能科技有限公司 Adaptive video decoding method and device, terminal equipment and storage medium
CN112823529A (en) * 2018-11-29 2021-05-18 深圳市欢太科技有限公司 Video decoding method, video decoding device, electronic equipment and computer readable storage medium
EP3855754A4 (en) * 2018-10-15 2021-09-29 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Video processing method and apparatus, electronic device, and storage medium
CN113596469A (en) * 2021-06-23 2021-11-02 天津津航计算技术研究所 Soft-hard combined and high-efficiency transmission video decoding method
CN114302176A (en) * 2021-12-03 2022-04-08 杭州海康威视系统技术有限公司 Video playing method and device
CN115334352A (en) * 2022-08-11 2022-11-11 北京蔚领时代科技有限公司 Automatic matching video decoding method, device, decoder and storage medium
CN116546273A (en) * 2023-06-27 2023-08-04 北京麟卓信息科技有限公司 Video playing optimization method based on multi-decoder dynamic fusion

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761736A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Video decoding method and device
CN103260021A (en) * 2012-02-21 2013-08-21 腾讯科技(深圳)有限公司 Method and device for decoding videos
JP2014207536A (en) * 2013-04-12 2014-10-30 ソニー株式会社 Image processing device and method
JP2015012410A (en) * 2013-06-28 2015-01-19 ルネサスエレクトロニクス株式会社 Image decoder

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761736A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Video decoding method and device
CN103260021A (en) * 2012-02-21 2013-08-21 腾讯科技(深圳)有限公司 Method and device for decoding videos
JP2014207536A (en) * 2013-04-12 2014-10-30 ソニー株式会社 Image processing device and method
JP2015012410A (en) * 2013-06-28 2015-01-19 ルネサスエレクトロニクス株式会社 Image decoder

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980797A (en) * 2015-05-27 2015-10-14 腾讯科技(深圳)有限公司 Video decoding method and client
CN105898496A (en) * 2015-11-18 2016-08-24 乐视网信息技术(北京)股份有限公司 HLS stream hardware decoding method based on Android device and device
CN106131319A (en) * 2016-06-29 2016-11-16 努比亚技术有限公司 A kind of information processing method and device, terminal
CN106231051A (en) * 2016-08-01 2016-12-14 腾讯科技(深圳)有限公司 The method of testing of a kind of video decoding and relevant device
CN106658174A (en) * 2016-10-31 2017-05-10 努比亚技术有限公司 Video decoding terminal and method
CN106792066A (en) * 2016-12-20 2017-05-31 暴风集团股份有限公司 The method and system that the video decoding of optimization is played
CN109309867A (en) * 2017-07-28 2019-02-05 中兴通讯股份有限公司 Display methods, display terminal and the computer readable storage medium of terminal
CN109391843B (en) * 2017-08-03 2022-02-25 腾讯科技(深圳)有限公司 Online video speed doubling playing method, device, medium and intelligent terminal
CN109391843A (en) * 2017-08-03 2019-02-26 腾讯科技(深圳)有限公司 Online Video speed playback method, device, medium and intelligent terminal
CN108235096A (en) * 2018-01-18 2018-06-29 湖南快乐阳光互动娱乐传媒有限公司 The mobile terminal hard decoder method that intelligently the soft decoding of switching plays video
CN108600813A (en) * 2018-05-17 2018-09-28 上海七牛信息技术有限公司 a kind of media file playing method, device and media play system
CN108882010A (en) * 2018-06-29 2018-11-23 深圳市九洲电器有限公司 A kind of method and system that multi-screen plays
CN110198427A (en) * 2018-07-05 2019-09-03 腾讯科技(深圳)有限公司 Video call method and device
CN110198427B (en) * 2018-07-05 2021-09-21 腾讯科技(深圳)有限公司 Video call method and device
CN110858920A (en) * 2018-08-23 2020-03-03 武汉斗鱼网络科技有限公司 Video decoding method, mobile terminal, server, system and storage medium
CN109088887A (en) * 2018-09-29 2018-12-25 北京金山云网络技术有限公司 A kind of decoded method and device of Streaming Media
WO2020078165A1 (en) * 2018-10-15 2020-04-23 Oppo广东移动通信有限公司 Video processing method and apparatus, electronic device, and computer-readable medium
EP3855754A4 (en) * 2018-10-15 2021-09-29 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Video processing method and apparatus, electronic device, and storage medium
US11562772B2 (en) 2018-10-15 2023-01-24 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Video processing method, electronic device, and storage medium
US11336953B2 (en) 2018-10-15 2022-05-17 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Video processing method, electronic device, and computer-readable medium
CN112823529A (en) * 2018-11-29 2021-05-18 深圳市欢太科技有限公司 Video decoding method, video decoding device, electronic equipment and computer readable storage medium
CN110138725A (en) * 2019-03-26 2019-08-16 视联动力信息技术股份有限公司 A kind of method for interchanging data and security gateway
CN110138725B (en) * 2019-03-26 2021-12-03 视联动力信息技术股份有限公司 Data exchange method and security gateway
CN111757168A (en) * 2019-03-29 2020-10-09 腾讯科技(深圳)有限公司 Audio decoding method, device, storage medium and equipment
CN110753265B (en) * 2019-10-28 2022-04-19 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN110753265A (en) * 2019-10-28 2020-02-04 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN112003976B (en) * 2020-07-31 2022-04-29 北京达佳互联信息技术有限公司 Hard-coding and hard-decoding test method and device
CN112003976A (en) * 2020-07-31 2020-11-27 北京达佳互联信息技术有限公司 Hard-coding and hard-decoding test method and device
CN112203097A (en) * 2020-09-30 2021-01-08 苏州臻迪智能科技有限公司 Adaptive video decoding method and device, terminal equipment and storage medium
CN113596469A (en) * 2021-06-23 2021-11-02 天津津航计算技术研究所 Soft-hard combined and high-efficiency transmission video decoding method
CN114302176A (en) * 2021-12-03 2022-04-08 杭州海康威视系统技术有限公司 Video playing method and device
CN114302176B (en) * 2021-12-03 2024-02-09 杭州海康威视系统技术有限公司 Video playing method and device
CN115334352A (en) * 2022-08-11 2022-11-11 北京蔚领时代科技有限公司 Automatic matching video decoding method, device, decoder and storage medium
CN116546273A (en) * 2023-06-27 2023-08-04 北京麟卓信息科技有限公司 Video playing optimization method based on multi-decoder dynamic fusion
CN116546273B (en) * 2023-06-27 2023-08-25 北京麟卓信息科技有限公司 Video playing optimization method based on multi-decoder dynamic fusion

Also Published As

Publication number Publication date
CN104980788B (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN104980788A (en) Video decoding method and device
US11930197B2 (en) Video decoding method and apparatus, computer device, and storage medium
US11336953B2 (en) Video processing method, electronic device, and computer-readable medium
KR101906834B1 (en) Device and method for selecting resource of application in wireless terminal
US10020832B2 (en) Method of controlling SIM card and SD card and electronic device for implementing the same
US8090405B2 (en) Image/audio playback device of mobile communication terminal
CN105528229B (en) Improve the method and device that mobile terminal first powers on speed
US9978384B2 (en) Audio decoding using modulator-demodulator
US11202066B2 (en) Video data encoding and decoding method, device, and system, and storage medium
CN111954051B (en) Method and system for transmitting video and audio data, cloud server and storage medium
CN104837057A (en) Video file playing method, device and system
CN104183250A (en) Method and system for synchronizing function of music player of intelligent device and Bluetooth headset
CN104731808A (en) Browser webpage loading method and browser webpage loading device
CN109753262B (en) Frame display processing method and device, terminal equipment and storage medium
CN105117751B (en) Two-dimentional decoding transmission method and device
CN104092658B (en) Audio data play method and device
CN106328149B (en) A kind of mixed audio processing method and relevant device
CN104954323A (en) Information pushing method, information pushing device, information pushing equipment and information pushing system
CN116368460A (en) Audio processing method and device
CN105744505B (en) Mobile terminal and its method for upgrading system
CN113596583A (en) Video stream bullet time data processing method and device
CN116418995A (en) Scheduling method of coding and decoding resources and electronic equipment
CN107391733B (en) Music file fast grouping method, music file fast grouping device and terminal
CN114979729A (en) Video data processing method and device and vehicle
KR20130050815A (en) Server and method for providing contents

Legal Events

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