CN105657540A - Video decoding method adapted to Android system and device thereof - Google Patents
Video decoding method adapted to Android system and device thereof Download PDFInfo
- Publication number
- CN105657540A CN105657540A CN201610010332.7A CN201610010332A CN105657540A CN 105657540 A CN105657540 A CN 105657540A CN 201610010332 A CN201610010332 A CN 201610010332A CN 105657540 A CN105657540 A CN 105657540A
- Authority
- CN
- China
- Prior art keywords
- module
- video
- buffer memory
- decoder
- cache
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000003044 adaptive effect Effects 0.000 claims description 11
- 238000000151 deposition Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 3
- 230000003139 buffering effect Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000004304 visual acuity Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44004—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440218—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention provides a video decoding method adapted to an Android system and device thereof. The video decoding method comprises the following steps: the step of transmitting video information to a decoding module; the step of acquiring cache information from the decoding module; the step of creating a cache module according to the cache information through a display module; the step of decoding code stream data in the cache module through the decoding module; the step of saving the decoded video information at the cache module; and the step of displaying the video data through the display module. The invention further provides a video decoding device using the video decoding method. The display module applies to the cache module so that the setting of co-caching the decoding and displaying is in favor of reducing the application of the number of cache modules while reducing the copying times; the method comprises applying to the cache module through the acquisition of the cache information corresponding to the video information so as to effectively reduce the application size and number of the cache module, and then to improve the video decoding performance and the decoding efficiency.
Description
Technical field
The present invention relates to video decoding filed, particularly relate to the video encoding/decoding method of a kind of adaptive Android system and use the video decoder of the method.
Background technology
Android (Android) system is the operating system of a kind of freedom based on Linux of developing by company of Google and development sources code, it is mainly used in the mobile equipment such as smart mobile phone, panel computer, nowadays, Android platform occupies the maximum market share in the whole world in field of mobile phones. The success of android system has benefited from the way of its development sources code to a certain extent, all opens out by numerous authority of system and interface so that each hardware manufacturer can carry out adaptation according to the hardware characteristic of self and android system. In multi-media, android defines mediaplayer and mediacodec two socket, nuplayer and stagefrightplayer that system carries inherits in mediaplayer, softomx then docks with mediacodec, the encoding and decoding resource (comprising hardware and software resource) of self can be docked by hardware manufacturer with this two socket, thus play manufacturer's resources advantage separately, the difference that android system is also able between compatible different hardware manufacturer.
In the process realizing interface, it is achieved mechanism determine performance and the efficiency of interface with strategy, thus affect the superiority-inferiority of whole android system. So how better the interface of adaptive android system, the performance that promotes interface, for each hardware manufacturer, all become most important.
Mediaplayer is the multimedia interface of complete set, the realizing class and must comprise stream media protocol process, separate the module such as Document encapsulation, Broadcast Control, audio/video decoding, caption decoding of this interface, upper strata adjusts user only medium resource access path or url (network resource indications) need to be delivered to mediaplayer, and mediaplayer then calls each module and play by media content. Mediacodec be then a set of encoding and decoding interface its be connected work with demoder, coding interface is responsible for the coding source code of input is become object code stream, decoding interface is responsible for the bit stream data of input is decoded into audio frequency frame or frame of video, being exactly the data of input processed in brief, the data after processing the most at last output to upper strata and adjust user. Android adopts openmaxIL and mediacodec to dock, and in fact each manufacturer adopts is driving mechanism (openmaxIL), then realizes driving mechanism and demoder uses mutually alternately. Realize how managing the buffer memory device (buffer) for depositing input and output data, directly having influence on the efficiency of interface in openmaxIL uses. For now, buffer manages the shortcomings such as the buffer space that there is application is excessive, the copy inefficiency of buffer. The buffer space of application is too big, will take more Installed System Memory, the fluency of influential system, and buffer copies and then can reduce overall encoding and decoding performance under efficiency, and the power consumption causing equipment increases.
Summary of the invention
First object of the present invention is to provide the video encoding/decoding method of a kind of high efficiency and adaptive Android system.
2nd object of the present invention is to provide the video decoder of a kind of high efficiency and adaptive Android system.
In order to realize first object of the present invention, the present invention provides the video encoding/decoding method of a kind of adaptive Android system, wherein, comprising: the step that video information is passed to decoder module; The step of buffer memory information is obtained from decoder module; Display module is according to the step of buffer memory information creating cache module; The step that bit stream data in cache module is decoded by decoder module; The step of decoded video data is preserved at cache module; The step that video data are shown by display module.
From such scheme, decoder module inside does not carry out applying for the cache module for depositing video data, but by applying for by display module, by carrying out reading decoding at the cache module of display module during decoding, read decoded video data in cache module by display module during display to show, realize decoder module and display module shared buffer memory module, the application simultaneously decreasing cache module number being beneficial to minimizing copy number of times that is provided with of shared buffer memory uses, and by the buffer memory information obtaining video information corresponding, cache module is applied for, effectively reduce application size and the number of cache module, then realize improving the copy efficiency of cache module or reduce the number of times of copy, thus improve performance and the decoding efficiency of video decode.
Further scheme is, be passed to the step of decoder module in video information before, video encoding/decoding method also comprises: creates and drives module and the step of initialize driving module; Drive the step of module creation decoder module.
Further scheme is, after obtain the step of buffer memory information from decoder module, video encoding/decoding method also comprises: the step judging whether successfully to obtain buffer memory information; As successfully obtained buffer memory information, then perform to export buffer memory information to display module.
Further scheme is, after display module is according to buffer memory information creating cache module, video encoding/decoding method also comprises: the step that the address of cache module is passed to decoder module.
Further scheme is, before the step that the bit stream data in cache module is decoded by decoder module, video encoding/decoding method also comprises the step that cache module is monitored by management module.
Further scheme is, buffer memory information buffer memory capacity and buffer memory number.
Therefore, by first the video information of video being passed to decoder module, then the buffer memory information obtained required for decoding can be fed back, cache module is applied for targetedly according to buffer memory information by display module again, make the capacity with minimum cache module and number smooth and easy in guarantee normal operation, what utilize management module arranges the monitoring state to cache module simultaneously, and by driving module to carry out Coordination Treatment, cause confusion when avoiding cache module to read and write data, thus be conducive to improving efficiency and the stability of video decode.
In order to realize first object of the present invention, the present invention provides the video decoder of a kind of adaptive Android system, comprise display module and decoder module, wherein, decoder module receives video information, and decoder module exports buffer memory information to display module, display module is according to buffer memory information creating cache module, bit stream data in cache module is decoded by decoder module, and cache module preserves decoded video data, and video data are shown by display module.
From such scheme, decoder module inside does not carry out applying for the cache module for depositing video data, but by applying for by display module, by carrying out reading decoding at the cache module of display module during decoding, read decoded video data in cache module by display module during display to show, realize decoder module and display module shared buffer memory module, the application simultaneously decreasing cache module number being beneficial to minimizing copy number of times that is provided with of shared buffer memory uses, and by the buffer memory information obtaining video information corresponding, cache module is applied for, effectively reduce application size and the number of cache module, then realize improving the copy efficiency of cache module or reduce the number of times of copy, thus improve performance and the decoding efficiency of video decode.
Accompanying drawing explanation
Fig. 1 is the system chart of video decoder embodiment of the present invention.
Fig. 2 is the schema of video encoding/decoding method embodiment of the present invention.
Below in conjunction with drawings and Examples, the invention will be further described.
Embodiment
Video decoder embodiment:
With reference to Fig. 1, Fig. 1 is the system chart of the video decoder of adaptive Android system, video decoder comprises driving module 2, display module 3, decoder module 4, cache module 5 and management module 6, decoder module 4 receives video information, decoder module 4 exports buffer memory information to display module 3, display module 3 is according to buffer memory information creating cache module 5, bit stream data in cache module 5 is decoded by decoder module 4, cache module 5 preserves decoded video data, video data are shown by display module 3, drive module 2 for creating decoder module 4, management module 6 for being monitored by cache module 5 and obtains status signal, management module 6 is to driving module feedback status signal.
Video encoding/decoding method embodiment:
It it is the schema of the video encoding/decoding method of adaptive Android system with reference to Fig. 2 composition graphs 1, Fig. 2. First step S11 is performed, program starts, Android system interface layer 1 creates and drives module 2, corresponding initialize information is delivered to and drives module 2 to drive module 2 with initialize, perform step S12 subsequently, drive module 2 to create decoder module 4, and video information is passed to decoder module 4 with the form of structure, the inner variable of decoder module 4 initialize and state, drive module 2 to enter the relevant message of main thread process and task.
Then perform step S13, obtain buffer memory information from decoder module 4, the number of buffer memory information buffer memory and the amount of capacity of buffer memory. Perform step S14 subsequently, judge whether to obtain successfully, such as unsuccessful acquisition, then return step S13, until obtaining buffer memory information, as successfully obtained buffer memory information, then perform step S15, export buffer memory information to display module 3, and driving module 2 be set to suspended state, wait display module 3 by application to cache module transmission get off. Owing to driving module 2 cannot learn that decoder module 4 parses the time point of buffer memory information, therefore this kind of method constantly inquired about is adopted to obtain.
Performing step S16 subsequently, display module 3 goes out the cache module 5 of respective volume size and corresponding number according to buffer memory information applications. taking a broadcasting resolving power as 1080*720, having 3 H264 videos with reference to frame is that the application of cache module 5 is illustrated by example, when creating decoder module 4, the video format information of the resolution information of 1080*720 and h264 is set in decoder module, the resource that demoder is corresponding according to these video information initialize, decoder module parses the number with reference to frame from video information when being 3, then can equal with reference to frame number according to cache module number, buffering number and display module take the sum of number, buffering number is generally 4, display module takies number and is generally 2, therefore the number of cache module is 9. and when video format is YV12, each pixel is by Y, U, V tri-representation in components, and ratio is 4:1:1, therefore the amount of capacity of cache module is resolving power * 3/2, and namely the amount of capacity of cache module is 1080*720*3/2.
Perform step S17 subsequently, the address of cache module 5 is passed to and drives module 2, perform step S18 subsequently, drive module 2 that the address of cache module 5 is passed to decoder module 4, then step S19 is performed, creative management module 6, cache module 5 is monitored by management module 6, each cache module 5 has three states: decoder module takies, display module takies and the free time, cache module State Transferring is followed successively by: and decoder module takies-and display module takies-and idle, to the monitoring of cache module 5 and status signal is obtained by management module 6, management module 6 is to driving module 2 feedback states signal, make to drive the conversion mutual use to reach decoder module and display module of module 2 by cache module state.
Then performing step S20, copy bit stream data from cache module 5 and decode to decoder module 4, decoded video data are kept at cache module 5 and preserve, and finally perform step S21, and display module 3 obtains decoded video from cache module 5 and shows. When video playback, do not select circulation to perform step S20 and step S21, constantly undertaken decoding and playing by video, until video playback is complete.
Therefore, decoder module inside does not carry out applying for the cache module for depositing video data, but by applying for by display module, by carrying out reading decoding at the cache module of display module during decoding, read decoded video data in cache module by display module during display to show, realize decoder module and display module shared buffer memory module, the application simultaneously decreasing cache module number being beneficial to minimizing copy number of times that is provided with of shared buffer memory uses, and by the buffer memory information obtaining video information corresponding, cache module is applied for, effectively reduce application size and the number of cache module, then realize improving the copy efficiency of cache module or reduce the number of times of copy, thus improve performance and the decoding efficiency of video decode.
Claims (10)
1. the video encoding/decoding method of an adaptive Android system, it is characterised in that, comprising:
Video information is passed to the step of decoder module;
The step of buffer memory information is obtained from described decoder module;
Display module is according to the step of described buffer memory information creating cache module;
The step that bit stream data in described cache module is decoded by described decoder module;
The step of decoded video data is preserved at described cache module;
The step that described video data are shown by described display module.
2. video encoding/decoding method according to claim 1, it is characterised in that:
Be passed to the step of described decoder module in video information before, described video encoding/decoding method also comprises:
Create the step driving module and drive module described in initialize;
The step of decoder module described in described driving module creation.
3. video encoding/decoding method according to claim 1, it is characterised in that:
After obtain the step of described buffer memory information from described decoder module, described video encoding/decoding method also comprises:
Judge whether successfully to obtain the step of described buffer memory information;
Such as buffer memory information as described in successfully obtaining, then perform to export described buffer memory information to described display module.
4. video encoding/decoding method according to claim 1, it is characterised in that:
After described display module cache module according to described buffer memory information creating, described video encoding/decoding method also comprises:
The address of described cache module is passed to the step of described decoder module.
5. video encoding/decoding method according to claim 1, it is characterised in that:
Before the step that bit stream data in described cache module is decoded by described decoder module, described video encoding/decoding method also comprises the step that described cache module is monitored by management module.
6. video encoding/decoding method according to the arbitrary item of claim 1 to 5, it is characterised in that:
Described buffer memory information buffer memory capacity and buffer memory number.
7. a video decoder for adaptive Android system, comprises display module and decoder module, it is characterised in that:
Described decoder module receives video information, described decoder module exports buffer memory information to described display module, described display module is according to described buffer memory information creating cache module, bit stream data in described cache module is decoded by described decoder module, described cache module preserves decoded video data, and described video data are shown by described display module.
8. video decoder according to claim 7, it is characterised in that:
Described video decoder also comprises driving module, and described driving module is for creating described decoder module.
9. video decoder according to claim 7, it is characterised in that:
Described video decoder also comprises management module, and described management module is used for being monitored by described cache module and obtains status signal, and described management module is to status signal described in described driving module feedback.
10. video decoder according to the arbitrary item of claim 7 to 9, it is characterised in that:
Described buffer memory information buffer memory capacity and buffer memory number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610010332.7A CN105657540B (en) | 2016-01-05 | 2016-01-05 | A kind of video encoding/decoding method and its device being adapted to Android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610010332.7A CN105657540B (en) | 2016-01-05 | 2016-01-05 | A kind of video encoding/decoding method and its device being adapted to Android system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105657540A true CN105657540A (en) | 2016-06-08 |
CN105657540B CN105657540B (en) | 2019-02-22 |
Family
ID=56490636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610010332.7A Active CN105657540B (en) | 2016-01-05 | 2016-01-05 | A kind of video encoding/decoding method and its device being adapted to Android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105657540B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113015003A (en) * | 2021-03-08 | 2021-06-22 | 展讯通信(上海)有限公司 | Video frame caching method and device |
CN113596495A (en) * | 2021-07-28 | 2021-11-02 | 广州方硅信息技术有限公司 | Live broadcast stream pushing processing method and device, equipment and medium thereof |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101282467A (en) * | 2008-05-15 | 2008-10-08 | 中兴通讯股份有限公司 | Method and apparatus for caching data when playing medium with low speed |
CN102868908A (en) * | 2011-07-04 | 2013-01-09 | 哈尔滨融智达网络科技有限公司 | High-efficiency streaming media playing method and device |
CN102984576A (en) * | 2012-12-21 | 2013-03-20 | 四川九洲电器集团有限责任公司 | Audio-video stripping method and system for TS media |
CN103067774A (en) * | 2012-12-28 | 2013-04-24 | 四川九洲电器集团有限责任公司 | Method and system capable of enabling set top box to display add-on subtitles |
CN103281528A (en) * | 2013-04-10 | 2013-09-04 | 深圳康佳通信科技有限公司 | Streaming media decoding method, system and mobile terminal |
US20130279877A1 (en) * | 2012-04-19 | 2013-10-24 | Qnx Software Systems Limited | System and Method Of Video Decoder Resource Sharing |
CN104182355A (en) * | 2014-08-29 | 2014-12-03 | 广州华多网络科技有限公司 | Method and device for memory allocation |
-
2016
- 2016-01-05 CN CN201610010332.7A patent/CN105657540B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101282467A (en) * | 2008-05-15 | 2008-10-08 | 中兴通讯股份有限公司 | Method and apparatus for caching data when playing medium with low speed |
CN102868908A (en) * | 2011-07-04 | 2013-01-09 | 哈尔滨融智达网络科技有限公司 | High-efficiency streaming media playing method and device |
US20130279877A1 (en) * | 2012-04-19 | 2013-10-24 | Qnx Software Systems Limited | System and Method Of Video Decoder Resource Sharing |
CN102984576A (en) * | 2012-12-21 | 2013-03-20 | 四川九洲电器集团有限责任公司 | Audio-video stripping method and system for TS media |
CN103067774A (en) * | 2012-12-28 | 2013-04-24 | 四川九洲电器集团有限责任公司 | Method and system capable of enabling set top box to display add-on subtitles |
CN103281528A (en) * | 2013-04-10 | 2013-09-04 | 深圳康佳通信科技有限公司 | Streaming media decoding method, system and mobile terminal |
CN104182355A (en) * | 2014-08-29 | 2014-12-03 | 广州华多网络科技有限公司 | Method and device for memory allocation |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113015003A (en) * | 2021-03-08 | 2021-06-22 | 展讯通信(上海)有限公司 | Video frame caching method and device |
CN113015003B (en) * | 2021-03-08 | 2022-11-25 | 展讯通信(上海)有限公司 | Video frame caching method and device |
CN113596495A (en) * | 2021-07-28 | 2021-11-02 | 广州方硅信息技术有限公司 | Live broadcast stream pushing processing method and device, equipment and medium thereof |
CN113596495B (en) * | 2021-07-28 | 2023-11-24 | 广州方硅信息技术有限公司 | Live broadcast push stream processing method and device, equipment and medium thereof |
Also Published As
Publication number | Publication date |
---|---|
CN105657540B (en) | 2019-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104159150A (en) | Cloud terminal, cloud server, media data stream playing system and method | |
CN107592551B (en) | Method and device for cloud streaming service | |
US8856212B1 (en) | Web-based configurable pipeline for media processing | |
CN108881916A (en) | The video optimized processing method and processing device of remote desktop | |
CN104780378A (en) | Method, device and player for decoding video | |
US8830300B2 (en) | Multiscalar stereo video format conversion | |
EP3207714A1 (en) | Buffer optimization | |
CN102981887B (en) | Data processing method and electronic equipment | |
CN104685873B (en) | Encoding controller and coding control method | |
CN105187845B (en) | Apparatus for decoding video data and coding/decoding method | |
CN103167334A (en) | System and method using a portable terminal for generating a dual display signal and tranmsitting said signal to a broadcasting receiver by hdmi signal | |
WO2018119611A1 (en) | Multimedia data encoding/decoding method and device for multi-operating system, electronic device, and computer program product | |
CN110933495A (en) | Video playing method and device based on embedded system | |
CN107229516B (en) | Data processing method and device | |
CN105657540A (en) | Video decoding method adapted to Android system and device thereof | |
CN101442627A (en) | Control method for peer-to-peer calculation set-top box player | |
US20140358996A1 (en) | Distributed encoding and decoding system, method, and device | |
CN101009836B (en) | Embedded video playing device based on the dual processor | |
CN106716998B (en) | Multiple operating system multi-medium data decoding method, device and electronic equipment | |
US10630809B2 (en) | Information processing apparatus, image processing apparatus and control methods thereof | |
CN112203097A (en) | Adaptive video decoding method and device, terminal equipment and storage medium | |
CN1957323A (en) | Display apparatus and display system using the same | |
CN202210851U (en) | Control device for standard-definition/ high-definition audio video coder and decoder | |
CN111083408A (en) | Method, system and equipment for processing video storage service | |
CN103152571B (en) | Reduce method for processing video frequency and the circuit of data bandwidth |
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 |