CN101312519B - Data frame processing method and apparatus - Google Patents

Data frame processing method and apparatus Download PDF

Info

Publication number
CN101312519B
CN101312519B CN2008101161880A CN200810116188A CN101312519B CN 101312519 B CN101312519 B CN 101312519B CN 2008101161880 A CN2008101161880 A CN 2008101161880A CN 200810116188 A CN200810116188 A CN 200810116188A CN 101312519 B CN101312519 B CN 101312519B
Authority
CN
China
Prior art keywords
preliminary treatment
time
data frame
sleep
frame
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.)
Active
Application number
CN2008101161880A
Other languages
Chinese (zh)
Other versions
CN101312519A (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.)
Huawei Device Co Ltd
Huawei Device Shenzhen Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN2008101161880A priority Critical patent/CN101312519B/en
Publication of CN101312519A publication Critical patent/CN101312519A/en
Application granted granted Critical
Publication of CN101312519B publication Critical patent/CN101312519B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a data frame processing method and a device. The method comprises: in a decoding mode time, occupying system resources, preprocessing N data frames and storing the preprocessing result into a play buffer, wherein N is bigger than 1 and smaller than the integer of the maximum decoding number; after the decoding mode time, switching from the decoding mode to a sleep mode, releasing system resource; before the end of the sleep mode time, receiving sleep wakeup command, switching from the sleep mode to the decoding mode. Without affecting the watch quality of users, in the decoding mode time, the invention occupies system resource for integrally decoding of a plurality of data frames, and releases the system resource to enter into a sleep mode, and plays the preprocessed data frames, to enter the CPU, relative devices and peripheries into low power consumption mode, thereby reducing the dynamic power consumption of a media player, prolonging the standby time and improving the service quality of the device.

Description

Data frame processing method and device
Technical field
The embodiment of the invention relates to technical field of data processing, relates in particular to a kind of data frame processing method and device.
Background technology
Along with the continuous development of system integration technology, the function of embedded system is become stronger day by day, and uses also increasingly extensive.Nowadays embedded system has incorporated in people's the life, as personal digital assistant, music phone, MP3/MP4 player etc.Along with the continuous lifting that market requires at volume and aspect of performance removable portable set, the contradiction between embedded device small size, high-performance and the limited battery capacity becomes problem demanding prompt solution.
MP3 voice playing and MP4 video playback business, it is the frequent main business of using of user, in the prior art portable terminal media player be one based on the MULTI-TASK SYSTEM DESIGN scheme, wherein main control task is responsible for catching and receiving, handle the foreground user command, and be responsible for the current state of feedback media player; The demultiplexing task is responsible for reading and resolve media data content from file, finishes the extraction work of audio-video frequency media data etc.; Decoding task is responsible for the coding task according to concrete media data, and media data is carried out the corresponding reprocessing task of separating code conversion and being correlated with; (Render) task of broadcast is responsible for finishing audio-visual synchronization work, and calls audio driven interface, video drive interface, finishes the broadcast of voice data and the broadcast work of video data.
Fig. 1 is existing media player Frame process chart, as shown in Figure 1, existing media player system is an asynchronous system, after the demultiplexing of finishing a Frame, decoding processing, directly carry out the broadcast of this Frame, and carry out demultiplexing, the decoding processing of next Frame when playing previous Frame, the rest may be inferred, concurrent running between the multitask does not have strict corresponding relationship.
Fig. 2 as shown in Figure 2, wherein is in free time (IDLE) state for the corresponding relation of existing media player state machine when not starting media player; When receiving startup media player task, when finishing device initialize, enter preparation (READY) state, prepare the playing audio-video media file; When receiving user's play command, enter decoding and play (PLAY) state, begin continuous media data frame demultiplexing, decoding and broadcast work; When receiving user's pause command, enter interruption (PAUSE) state, suspend media playing task.Fig. 3 consumes schematic diagram for existing media player medium power consumption, as shown in Figure 3, transverse axis is represented the duration, the longitudinal axis is represented power consumed, when having media renderer plays now, and the preparation that ml is in corresponding to media player (READY) state, after receiving play command, enter decoding broadcast (PLAY) state in the m2 corresponding diagram, CPU moves at full speed, finishes up to media player work.
The inventor finds in realizing process of the present invention: when having media renderer plays media data frame frequency now, to frequently read media file, file is stored in the peripheral hardwares such as SD card, flash memory (Flash) or micro harddisk more, causes the frequent access to peripheral hardware, poor performance and power consumption height; Work meeting frequent startings such as the parsing of media file, decoding, power consumption is bigger; Also have and using the dynamic electric voltage frequency to adjust (DynamicVoltage Frequence Scale; Hereinafter to be referred as: in equipment DVFS),, can make CPU frequently carry out DVFS and switch that energy and time are switched in cost because cpu load has been caused variation continuously and healthily.Existing in a word media player mode of operation will cause the energy consumption of equipment bigger, influence service quality.
Summary of the invention
Defectives such as the embodiment of the invention provides a kind of data frame processing method and device, and power consumption is bigger when solving that player carries out media play in the prior art, the dynamic power consumption when realizing reduction system operation media player is improved service quality.
The embodiment of the invention provides a kind of data frame processing method, comprising:
At decoding schema occupying system resources in the time, N Frame carried out preliminary treatment, and deposit the preliminary treatment result in play buffer, described N is greater than 1, smaller or equal to the integer of maximal solution yardage, the memory headroom size of described maximal solution yardage and play buffer adapts;
The described decoding schema time switches to sleep pattern from decoding schema after finishing, and discharges described system resource;
Before the sleep pattern time finishes, receive the sleep awakening instruction, switch to decoding schema from sleep pattern.
The embodiment of the invention provides a kind of Frame processing unit, comprising:
Decoding process module, be used at decoding schema occupying system resources in the time, N Frame carried out preliminary treatment, and deposit the preliminary treatment result in play buffer, described N is greater than 1, smaller or equal to the integer of maximal solution yardage, the memory headroom size of described maximal solution yardage and play buffer adapts;
The switching controls module is used for switching to sleep pattern from decoding schema after the described decoding schema time finishes, and discharges described system resource;
Sleep control module is used for receiving the sleep awakening instruction before the sleep pattern time finishes, and switches to decoding schema from sleep pattern.
Data frame processing method that the embodiment of the invention provides and device, guaranteeing not influence under the prerequisite of user's audiovisual impression, decoding schema in the time occupying system resources carry out concentrated decoding place two reasons of a plurality of Frames, free system resources enters sleep pattern then, play previous pretreated Frame, and make CPU and related device and peripheral hardware enter low-power consumption mode, thereby the dynamic power consumption when greatly reducing system's operation media player, the stand-by time of prolongation equipment has improved service quality.
Description of drawings
Fig. 1 is existing media player Frame process chart;
Fig. 2 is the corresponding relation of existing media player state machine;
Fig. 3 consumes schematic diagram for existing media player medium power consumption;
Fig. 4 is a data frame processing method embodiment flow chart of the present invention;
Fig. 5 is the system mode machine schematic diagram of media player among the data frame processing method embodiment of the present invention;
Fig. 6 consumes schematic diagram for the power consumption of media player among the data frame processing method embodiment of the present invention;
Fig. 7 is Frame processing unit embodiment one structural representation of the present invention;
Fig. 8 is Frame processing unit embodiment two structural representations of the present invention.
Embodiment
Further specify the technical scheme of the embodiment of the invention below in conjunction with the drawings and specific embodiments.
The embodiment of the invention is in the low-power consumption optimal design, system has been designed to a synchro system, keep a kind of strict relatively lock in time between each task, guarantee in a relatively-stationary time interval, central processing unit (being called for short CPU) and/or digital signal processor (Digital Sigal Processor, DSP) focus on data-intensive calculation task, and can carry out media play relatively for a long time.
Fig. 4 is a data frame processing method embodiment flow chart of the present invention, and as shown in Figure 4, this method comprises the steps:
Step 100 at decoding schema occupying system resources in the time, is carried out preliminary treatment to N Frame, and is deposited the preliminary treatment result in play buffer, and described N is greater than 1, smaller or equal to the integer of maximal solution yardage;
Carry out in the process of normal media play at media player, the mode of operation of media player is divided into two kinds of operating states, a kind of operating state is a decoding schema, and another kind of operating state is a sleep pattern; Further, the time period that works under the decoding schema is called the decoding schema time, and the time period that is operated under the sleep pattern is called the sleep pattern time.Wherein so-called decoding schema operating state is at decoding schema in the time, the media player occupying system resources promptly takies CPU and/or DSP resource and other related resource Frame is carried out preliminary treatment, described preprocessing process comprises: for audio frequency or pure video, comprise demultiplexing, decoding processing, reprocessing from file, the volume adjustment or the processing etc. that resamples, wherein reprocessing promptly comprises the balanced adjusting of EQ-for audio frequency; For video playback, comprise deblocking effect, YUV is to RGB conversion, operations such as processing such as rotation or convergent-divergent and broadcast; Video for the sound accompaniment of band audio frequency on the basis of aforesaid operations, also comprises operations such as audio-visual synchronization processing.And will deposit play buffer in through pretreated object information, carry out media information for the playing task data therefrom of media player, for example the continuous broadcast of audio or video.Be in decoding schema following time at media player, because system resource is occupied and be at a high speed in service, system is in high power consumption operating state.
Media player is under the operating state of stable state, carry out the preliminary treatment work of the many Frames of quantity as far as possible decoding schema time planted agent, but the quantity of pretreated Frame has certain restriction, promptly can not be greater than the maximal solution yardage, the number of therefore carrying out pretreated Frame should be greater than 1, smaller or equal to the maximal solution yardage, this maximal solution yardage should adapt with the memory headroom size of the play buffer of system, is example in the time a plurality of Frames corresponding with the maximal solution yardage are carried out preliminary treatment at decoding schema among this method embodiment.
Step 101, the described decoding schema time switches to sleep pattern from decoding schema after finishing, and discharges described system resource;
Carry out the concentrated decoding processing of a plurality of Frames at the media player occupying system resources after, just after the end of decoding schema time, media player will switch to sleep pattern from decoding schema, when media player is in sleep pattern, want free system resources promptly to discharge taking to CPU and/or DSP and related resource, inform that CPU and/or DSP temporarily no longer include works of treatment such as decoding, this moment, CPU was not when having other Processing tasks, just can enter and be in low-power consumption mode, concrete CPU and/or DSP low-power consumption mode comprise that " Clock gating " is that CPU and/or DSP turn-off clock, because this moment, CPU did not have clock, the power consumption of this moment is below 10% of operate as normal; CPU and/or DSP low-power consumption mode comprise that also " Power Gating " is about to CPU and/or DSP descends electric treatment, do not have leakage current this moment, and the low-power consumption that concrete CPU takes also will be considered other system's restraining factors such as power supply subregion.
When media player is in sleep pattern, sleep pattern in the time media player no longer carry out the processing such as decoding of Frame, but under the effect of playing task, carry out the Frame preliminary treatment object information in the play buffer is carried out continuous broadcast, and last till that always media player switches to decoding schema again.Because media player is operated in sleep pattern following time, occupying system resources does not carry out the reading of file data frame, demultiplexing, decoding and pretreatment operation such as synchronous, has therefore reduced the power consumption of system, has saved the electric energy of equipment.In order to prolong the device standby time, can be so that media player be in sleep pattern in the long time, be in decoding schema in the short time, that is to say and make the ratio of sleep pattern time and decoding schema time be the bigger the better, purpose is to guarantee under the continuous prerequisite of media play, make media player in longer a period of time, be in the lower sleep pattern of system power dissipation, be in the bigger decoding schema of system power dissipation in the short period of time, reduce power consumption; But owing to be subjected to the influence of factors such as hardware device and software processes speed, and to guarantee the continuity of media play, not influencing user's impression, there are certain qualification sleep pattern time and decoding schema time.
Particularly, can being set as follows of sleep pattern time: owing to have for example restriction of device product such as music phone, MP3 design of terminal of media player function, the memory headroom of play buffer is fixed, therefore media player will be subjected to the restriction of play buffer size when carrying out media play, what data frame informations multipotency is stored and is fixed in the play buffer, and this greatest measure is exactly aforesaid maximal solution yardage.The maximum of sleep pattern time be exactly with in the play buffer, with the corresponding a plurality of Frames of maximal solution yardage all play the used time.And the used time of Frame of playing one type fix, and the maximal solution yardage that is subjected to the restriction of play buffer size also fixes, the sleep pattern time is just fixing so.For example the reproduction time of each Frame of mp3 file is fixed as T1=26ms, and the maximal solution yardage with equipment correspondence of media player is 100, and then the maximum of sleep pattern time is that 100*26ms is 2600ms.Being set as follows of decoding schema time: since device hardware and software design well after, one type Frame is carried out the used time of preliminary treatment be referred to as frame processing time T2, and T2 will be much smaller than T1 also with regard to respective fixation; And in decode time, to carry out preliminary treatment to 100 Frames of maximal solution yardage correspondence, then the maximum of decoding schema time is T2*100.
Step 102 before the sleep pattern time finishes, receives the sleep awakening instruction, switches to decoding schema from sleep pattern.
Media player is for guaranteeing the continuous broadcast of entire media file, should under decoding schema and two kinds of operating states of sleep pattern, switch, promptly when the sleep pattern time finishes, to enter the decoding schema time, switch to decoding schema ensuing Frame is carried out decoding processing.In order not cause the interruption of playback of media files, remaining has data can supply to play in the play buffer, therefore will be before the sleep pattern time finishes, carry out decoding schema in advance and carry out Frame decoding, guarantee formerly to be stored in data playback in the play buffer and deposit new decoded data in play buffer before finishing.Media player enters decoding schema in advance can call out triggering by the third party, promptly when media player when decoding schema switches to sleep pattern, timer receives described sleep pattern temporal information; Timer picks up counting, and send described sleep awakening instruction during the time arriving sleep awakening, the described sleep awakening time is less than the described sleep pattern time, and before the sleep pattern time finishes, send the sleep awakening instruction to media player, owing to handle sleep and wake up and also need extra time overhead, therefore should further guarantee the sleep awakening time and switch to decoding schema required time sum less than the described sleep pattern time from sleep pattern, the sleep awakening instruction back that media player receives the timer transmission switches to decoding schema from sleep pattern, described preliminary treatment before repeating to a plurality of Frames corresponding with the maximal solution yardage, and with decoding process result for example the PCM sign indicating number be stored in the play buffer for loop play.The instruction of sleep awakening that media player receives also can be that the user operates and the described sleep awakening instruction that produces, and for example the user initiates pausing operation, and at this moment CPU at first can be waken up by interrupt events such as keyboards.The instruction of sleep awakening that media player receives also can be other external events and the described sleep awakening instruction that produces, and for example event notification then waits.
After execution of step 102, continue execution in step 100 and step 101 successively, also be according to execution in step 100 successively with regard to the broadcast of saying entire media file, step 101 and step 102 and circulation is carried out, and circulation finishes until playback of media files.
In the data frame processing method that present embodiment provides, be before the preliminary treatment of carrying out Frame, the reproduction time attribute information according to described maximal solution yardage and each Frame obtains the described sleep pattern time; Also to carry out the temporal information of decoding processing, obtain the described decoding schema time according to described maximal solution yardage with to each Frame.
By optimizing the design of media player, guaranteeing not influence under the prerequisite of user's audiovisual impression, adopt synchronous design method, task for the data processing intensive focuses on, and then allow CPU and related device and peripheral hardware enter low-power consumption mode, thereby the dynamic power consumption when greatly reducing system's operation media player extends working time, and improves quality of server.Under the high performance prerequisite of assurance system, effectively reduce the power consumption of portable terminal.Because the unit power consumption when the present invention effectively reduces the media player use for same power consumption index, therefore can be selected the lower battery apparatus of nominal, thereby further reduce equipment cost.
In the method that present embodiment provides, when a plurality of Frames corresponding with the maximal solution yardage are carried out preliminary treatment, can adopt a plurality of Frames corresponding with the maximal solution yardage are carried out pretreated mode in batches, be specially, the a plurality of Frames corresponding with the maximal solution yardage are carried out in batches, and occupying system resources Frame to every batch under the control action of CPU carries out preliminary treatment.Avoided so a plurality of Frames corresponding with the maximal solution yardage being carried out the long time delay of bringing of pretreatment time because of disposable, but also can be in the excessive time that switches to decoding schema from sleep pattern, replenish the data in the play buffer rapidly, guarantee the continuity of media resource plays.
Also have, after media player receives play instruction information, if according in the time a plurality of Frames corresponding with the maximal solution yardage being carried out preliminary treatment at decoding schema under the stable situation, because Frame is more will to cause time-delay, can not enter broadcast state in a period of time after the user sends play instruction, influenced QoS of customer, therefore to after receiving play instruction information, take the pattern of startup fast, make it steadily to enter stable state, the process of taking to start fast can be to receive play instruction information, the first quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the first quantity data frame, and deposit the preliminary treatment result of the described first quantity data frame in described play buffer; When the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and depositing the preliminary treatment result of the described second quantity data frame in described play buffer, described second quantity is greater than described first quantity; With second quantity as first quantity, with the 3rd quantity as second quantity, described the 3rd quantity is greater than described second quantity, repeat when the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment to be handled, obtain the preliminary treatment result of the second quantity data frame, and deposit the preliminary treatment result of the described second quantity data frame in described play buffer.Be specially, can be uninterrupted continuously in order to guarantee startup fast and follow-up play, can carry out reading and demultiplexing work of N1 Frame medium (audio frequency and video or audio, video data) zero hour earlier, choosing of N1 can match with the pre-set time that enters decoding schema in advance, can select 1~4 frame; Just can carry out the play operation of audio, video data then, when playing the N1 Frame, carry out reading and demultiplexing of N2 Frame according to playing the decision of N1 Frame media file characteristics, to play time of a frame much smaller with the time ratio of demultiplexing one frame owing to read, therefore to satisfy N2>N1, after playing the N1 Frame, the N2 Frame is ready to, and has guaranteed that voice data continuously plays; Carry out reading and demultiplexing of N3 frame data then, and satisfy N3>N2; Repeat said process, to the last pretreated data have reached the desired decoded data frame of stable state number.Media player is in broadcast state to the preliminary treatment result who is stored in the play buffer always.
By adopting the mode of quick startup, media player can enter the broadcast state of media file rapidly in the short period of time after receiving play instruction, shortens user's stand-by period, improves QoS of customer.
Fig. 5 is the system mode machine schematic diagram of media player among the data frame processing method embodiment of the present invention, and as shown in Figure 5, media player comprises following state machine:
(1) idle (IDLE) state: when not starting media player, be in idle condition;
(2) prepare (READY) state: when receiving startup media player task, when finishing device initialize, enter standby condition, prepare the playing audio-video media file;
(3) (PLAY) state is play in decoding: system finishes the processing of multiframe media data continuously;
(4) start (QUICK START) state fast: be a transient process, occur in start after and enter before the decoding broadcast state, purpose is the disposable decoding broadcast state that enters of stage that prevents in beginning, with causing the user after waiting for the long period, could obtain the output of audio-video document, influence service quality;
(5) sleep (SLEEP) state: can make CPU be in low power mode of operation, this moment, obsolete peripheral hardware also can enter low-power consumption mode; Such as being hardware (chip I P or external chip), the video decode module that the current media player adopts realizes that this corresponding hardware also can enter corresponding low-power consumption mode so; Media player has been introduced sleep state in the present embodiment, is used to carry out long system low-power consumption and has a rest;
(6) interrupt (PAUSE) state: when receiving user's pause command, enter interrupt status, suspend media playing task.
Fig. 6 consumes schematic diagram for the power consumption of media player among the data frame processing method embodiment of the present invention, as shown in Figure 6, transverse axis is represented the duration, the longitudinal axis is represented power consumed, m21 and m22 represent the new state of new media player correspondence, be divided into m21 (corresponding PLAY state) and m22 (corresponding SLEEP state) two states during with the media player operate as normal, when m21, CPU moves at full speed or with the rate corresponding grade, when m22, system only plays, and can be operated in relatively low power consumption mode.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Fig. 7 is Frame processing unit embodiment one structural representation of the present invention, as shown in Figure 7, this device comprises decoding process module 11, switching controls module 12 and sleep control module 13, wherein decoding process module 11 is used at decoding schema occupying system resources in the time, N Frame carried out preliminary treatment, and depositing the preliminary treatment result in play buffer, described N is greater than 1, smaller or equal to the integer of maximal solution yardage; Switching controls module 12 is used for switching to sleep pattern from decoding schema after the described decoding schema time finishes, and discharges described system resource; Sleep control module 13 is used for receiving the sleep awakening instruction before the sleep pattern time finishes, and switches to decoding schema from sleep pattern.
Particularly, Frame processing unit described in the present embodiment can be media player, when media player is in the broadcast state of media file, at decoding schema in the time, decoding process module 11 occupying system resources, under the control action of CPU, finish the preliminary treatment of a plurality of Frames, the quantity of a plurality of Frames should be greater than 1 and smaller or equal to the maximal solution yardage, and will be stored in the play buffer for playing usefulness through pretreated object information, present embodiment is being that example describes to carrying out preliminary treatment with the corresponding a plurality of Frames of maximal solution yardage; After the decoding schema time finished, media player switched to sleep pattern from decoding schema, discharged the system resource that had before taken this moment; Media player enters sleep pattern, and the data in the play buffer are play, and system is in low power consumpting state; For guaranteeing the continuation of playback of media files, before the sleep pattern time finished, sleep control module 13 will receive the sleep awakening instruction, and media player switches to decoding schema from sleep pattern, proceeds the preliminary treatment of a plurality of Frames.
The Frame processing unit that present embodiment provides, guaranteeing not influence under the prerequisite of user's audiovisual impression, decoding schema in the time occupying system resources carry out the concentrated preliminary treatment of a plurality of Frames, free system resources enters sleep pattern then, play previous pretreated Frame, and make CPU and related device and peripheral hardware enter low-power consumption mode, thus the dynamic power consumption when greatly reducing system operation media player, the stand-by time of prolongation equipment has improved service quality.
Fig. 8 is Frame processing unit embodiment two structural representations of the present invention, as shown in Figure 8, this device comprises above-mentioned decoding process module 11, switching controls module 12 and sleep control module 13, further, decoding process module 11 comprises controls submodule 111 and decoding processing sub 112 in batches, wherein control submodule 111 in batches and be used for a plurality of Frames corresponding with described maximal solution yardage are carried out in batches, control every batch of quantity of carrying out pretreated Frame; The Frame that decoding processing submodule 112 is used for every batch carries out preliminary treatment.In order to reduce time delay, and guarantee the continuation of playback of media files, decoding process module 11 adopts and in batches a plurality of Frames corresponding with the maximal solution yardage is carried out pretreated mode, control the quantity of the Frame of operations such as submodule 111 control media players read from media file at every turn, demultiplexing, the Frame that the decoding processing submodule is 112 pairs every batch carries out preliminary treatment in batches; And the like, carry out some batches Frame preliminary treatment, just finish preprocessing process to a plurality of Frames corresponding with the maximal solution yardage.
Can also comprise sleep pattern time-obtaining module 16 and decoding schema time-obtaining module 17 among the notebook data frame processing apparatus embodiment, wherein sleep pattern time-obtaining module 16 is used for the reproduction time attribute information according to maximal solution yardage and each Frame, obtains the sleep pattern time; Decoding schema time-obtaining module 17 is used for carrying out pretreated temporal information according to the maximal solution yardage with to each Frame, obtains the decoding schema time.Decoding process module 11 carries out the preliminary treatment of Frame at the decoding schema that decoding schema time-obtaining module 17 obtains in the time; The sleep pattern that sleep control module 13 obtains in sleep pattern time-obtaining module 16 free system resources in the time makes CPU be in sleep state.
The sleep awakening instruction that sleep control module 13 receives can be that timer sends, and also can pay new order such as the user initiates pausing operation or other external events because of the user, and generate the sleep awakening instruction.The Frame processing unit also comprises timer 14 in the present embodiment, be used for when when decoding schema switches to sleep pattern, receive described sleep pattern temporal information, pick up counting, and sends the sleep awakening instruction during time arriving sleep awakening, described sleep awakening time and switch to decoding schema required time sum less than the described sleep pattern time from sleep pattern.The Frame processing unit comprises that also playing module 15 is used for the preliminary treatment result who is stored in the play buffer is play.Timer 14 at the Frame processing unit when decoding schema switches to sleep pattern, pick up counting, and before closing on the end of sleep pattern time, wake the Frame processing unit to the instruction of Frame processing unit transmission sleep awakening, occupying system resources carries out the preprocessing process of a plurality of Frames.Playing module 15 in the Frame processing unit is responsible for calling data and is carried out the media information broadcast in play buffer after the Frame processing unit enters broadcast state.
Further, after media player receives play instruction information, if according in the time a plurality of Frames corresponding with the maximal solution yardage being carried out preliminary treatment at decoding schema under the stable situation, because Frame is more will to cause time-delay, can not enter broadcast state in a period of time after the user sends play instruction, influenced QoS of customer, therefore to after receiving play instruction information, take the pattern of startup fast, make it steadily to enter stable state, can also comprise in the present embodiment that quick startup processing module 18 is used to finish the quick startup function of media player.Start processing module 18 fast and be used to receive play instruction information, the first quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the first quantity data frame, and deposit the preliminary treatment result of the described first quantity data frame in described play buffer; When the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and depositing the preliminary treatment result of the described second quantity data frame in described play buffer, described second quantity is greater than described first quantity; With second quantity as first quantity, with the 3rd quantity as second quantity, described the 3rd quantity is greater than described second quantity, repeat described when the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and deposit the preliminary treatment result of the described second quantity data frame in described play buffer.Be specially, can be uninterrupted continuously in order to guarantee startup fast and follow-up play, can carry out reading and demultiplexing work of N1 Frame medium (audio frequency and video or audio, video data) zero hour earlier, choosing of N1 can match with the pre-set time that enters decoding schema in advance, can select 1~4 frame; Just can carry out the play operation of audio, video data then, when playing the N1 Frame, carry out reading and demultiplexing of N2 Frame according to playing the decision of N1 Frame media file characteristics, to play time of a frame much smaller with the time ratio of demultiplexing one frame owing to read, therefore to satisfy N2>N1, after playing the N1 Frame, the N2 Frame is ready to, and has guaranteed that voice data continuously plays; Carry out reading and demultiplexing of N3 frame data then, and satisfy N3>N2; Repeat said process, to the last pretreated data have reached the desired decoded data frame of stable state number.Media player is in broadcast state to the preliminary treatment result who is stored in the play buffer always.
The Frame processing unit that present embodiment provides, guaranteeing not influence under the prerequisite of user's audiovisual impression, adopt synchronous design method, task for the data processing intensive focuses on, and then allow CPU and related device and peripheral hardware enter low-power consumption mode, thereby the dynamic power consumption when greatly reducing system's operation media player extends working time, and improves service quality.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (9)

1. data frame processing method is characterized in that comprising:
Receive play instruction information, the first quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the first quantity data frame, and deposit the preliminary treatment result of the described first quantity data frame in described play buffer;
When the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and depositing the preliminary treatment result of the described second quantity data frame in described play buffer, described second quantity is greater than described first quantity;
With second quantity as first quantity, with the 3rd quantity as second quantity, described the 3rd quantity is greater than described second quantity, repeat described when the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and deposit the preliminary treatment result of the described second quantity data frame in described play buffer;
At decoding schema occupying system resources in the time, N Frame carried out preliminary treatment, and deposit the preliminary treatment result in play buffer, described N is greater than 1, smaller or equal to the integer of maximal solution yardage, the memory headroom size of described maximal solution yardage and play buffer adapts;
The described decoding schema time switches to sleep pattern from decoding schema after finishing, and discharges described system resource;
Before the sleep pattern time finishes, receive the sleep awakening instruction, switch to decoding schema from sleep pattern;
Wherein, the reproduction time attribute information according to described maximal solution yardage and each Frame obtains the described sleep pattern time;
Carry out pretreated temporal information according to described maximal solution yardage with to each Frame, obtain the described decoding schema time.
2. data frame processing method according to claim 1 is characterized in that describedly a plurality of Frames corresponding with the maximal solution yardage are carried out preliminary treatment comprising:
The a plurality of Frames corresponding with described maximal solution yardage are carried out preliminary treatment in batches.
3. data frame processing method according to claim 1 is characterized in that described reception sleep awakening instruction comprises:
Receive the sleep awakening instruction that timer sends; Or
Reception is instructed because of the sleep awakening that the user operates or other external events produce.
4. data frame processing method according to claim 3 is characterized in that described method also comprises:
When decoding schema switches to sleep pattern, timer receives described sleep pattern temporal information;
Described timer picks up counting, and sends described sleep awakening instruction during the time arriving sleep awakening, the described sleep awakening time with switch to decoding schema required time sum less than the described sleep pattern time from sleep pattern.
5. data frame processing method according to claim 1 is characterized in that also comprising:
The described preliminary treatment result who is stored in the described play buffer is play.
6. Frame processing unit is characterized in that comprising:
Start processing module fast, be used to receive play instruction information, the first quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the first quantity data frame, and deposit the preliminary treatment result of the described first quantity data frame in described play buffer; When the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and depositing the preliminary treatment result of the described second quantity data frame in described play buffer, described second quantity is greater than described first quantity; With second quantity as first quantity, with the 3rd quantity as second quantity, described the 3rd quantity is greater than described second quantity, repeat described when the preliminary treatment result to the described first quantity data frame plays, the second quantity data frame is carried out preliminary treatment, obtain the preliminary treatment result of the second quantity data frame, and deposit the preliminary treatment result of the described second quantity data frame in described play buffer;
Decoding process module, be used at decoding schema occupying system resources in the time, N Frame carried out preliminary treatment, and deposit the preliminary treatment result in play buffer, described N is greater than 1, smaller or equal to the integer of maximal solution yardage, the memory headroom size of described maximal solution yardage and play buffer adapts;
The switching controls module is used for switching to sleep pattern from decoding schema after the described decoding schema time finishes, and discharges described system resource;
Sleep control module is used for receiving the sleep awakening instruction before the sleep pattern time finishes, and switches to decoding schema from sleep pattern;
The sleep pattern time-obtaining module is used for the reproduction time attribute information according to described maximal solution yardage and each Frame, obtains the described sleep pattern time;
The decoding schema time-obtaining module is used for carrying out pretreated temporal information according to described maximal solution yardage with to each Frame, obtains the described decoding schema time.
7. Frame processing unit according to claim 6 is characterized in that described decoding process module comprises:
Control submodule in batches, be used for a plurality of Frames corresponding with described maximal solution yardage are carried out in batches, control every batch of quantity of carrying out pretreated Frame;
The decoding processing submodule, the Frame that is used for every batch carries out preliminary treatment.
8. according to claim 6 or 7 described Frame processing unit, it is characterized in that also comprising:
Timer, be used for when when decoding schema switches to sleep pattern, receive described sleep pattern temporal information, pick up counting, and send described sleep awakening instruction during the time arriving sleep awakening, the described sleep awakening time with switch to decoding schema required time sum less than the described sleep pattern time from sleep pattern.
9. Frame processing unit according to claim 6 is characterized in that also comprising:
Playing module is used for the described preliminary treatment result who is stored in the described play buffer is play.
CN2008101161880A 2008-07-04 2008-07-04 Data frame processing method and apparatus Active CN101312519B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101161880A CN101312519B (en) 2008-07-04 2008-07-04 Data frame processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101161880A CN101312519B (en) 2008-07-04 2008-07-04 Data frame processing method and apparatus

Publications (2)

Publication Number Publication Date
CN101312519A CN101312519A (en) 2008-11-26
CN101312519B true CN101312519B (en) 2010-07-21

Family

ID=40100917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101161880A Active CN101312519B (en) 2008-07-04 2008-07-04 Data frame processing method and apparatus

Country Status (1)

Country Link
CN (1) CN101312519B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873498B (en) * 2010-06-22 2013-05-08 深圳市融创天下科技股份有限公司 Video decoding method, video decoding device and video/audio play system
CN102307311A (en) * 2011-08-30 2012-01-04 华映光电股份有限公司 Method for playing stereoscopic image
CN102833829B (en) * 2012-08-17 2016-05-25 广州海格天立通信息技术有限公司 Standby wakeup method based on tdma system
CN106095541B (en) 2016-05-31 2019-11-05 深圳市万普拉斯科技有限公司 Dormancy management method and relevant apparatus
CN107256078B (en) * 2017-05-05 2020-06-23 浙江大华技术股份有限公司 Dynamic voltage frequency adjusting method and device
CN112153447B (en) * 2020-09-27 2022-06-14 海信视像科技股份有限公司 Display device and sound and picture synchronous control method
CN115134658B (en) * 2022-05-27 2024-05-14 阿里巴巴云计算(北京)有限公司 Video processing method, device, equipment and storage medium
CN115579013B (en) * 2022-12-09 2023-03-10 深圳市锦锐科技股份有限公司 Low-power consumption audio decoder

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1675949A (en) * 2002-06-26 2005-09-28 高通股份有限公司 Timer-based sleep for terminals in wireless communication systems
CN1949904A (en) * 2006-10-25 2007-04-18 青岛海信移动通信技术股份有限公司 TD SCDMA music cell phone
JP2007141020A (en) * 2005-11-21 2007-06-07 Seiko Epson Corp Data processor and electronic equipment
CN101171564A (en) * 2005-05-11 2008-04-30 英特尔公司 Seamless transition of operating environments in mobile systems for power optimization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1675949A (en) * 2002-06-26 2005-09-28 高通股份有限公司 Timer-based sleep for terminals in wireless communication systems
CN101171564A (en) * 2005-05-11 2008-04-30 英特尔公司 Seamless transition of operating environments in mobile systems for power optimization
JP2007141020A (en) * 2005-11-21 2007-06-07 Seiko Epson Corp Data processor and electronic equipment
CN1949904A (en) * 2006-10-25 2007-04-18 青岛海信移动通信技术股份有限公司 TD SCDMA music cell phone

Also Published As

Publication number Publication date
CN101312519A (en) 2008-11-26

Similar Documents

Publication Publication Date Title
CN101312519B (en) Data frame processing method and apparatus
US7000140B2 (en) Data processor and data processing system
US8438409B2 (en) Operating system (OS) virtualisation and processor utilization thresholds for minimizing power consumption in mobile phones
JP4977774B2 (en) Data processing device
TWI233052B (en) Non main CPU/OS based operational environment
US7904740B2 (en) Power supply efficiency optimization
US8479031B2 (en) System switching unit having a switch to switch on/off a channel for data interaction between a first system and the bus interface of a second system according to the operation state of the second system
US7146513B2 (en) System for adjusting a clock frequency based on comparing a required process times and a worst case execution times and adjusting a voltage and clock frequency based on a number of ready state application tasks
US20090201082A1 (en) Integrated circuit device having power domains and partitions based on use case power optimization
JP2007095040A (en) Data processing apparatus, program, recording medium, and content playback apparatus
US20050026654A1 (en) Dynamic application resource management
JP2013527507A (en) System and method for controlling central processor power with guaranteed transition deadlines
KR20120049604A (en) Method and apparatus for managing memory of a mobile device
KR20120112579A (en) System and method for controlling central processing unit power with reduced frequency oscillations
US20110099404A1 (en) Electronic device, method of controlling an electronic device, and system-on-chip
JP2009026047A (en) Audio processor having clock frequency dynamic automatic control function
CN103065654A (en) Mobile device chip and mobile device controlling method therefor
JP2008234475A (en) Information processor
US9710052B2 (en) Dynamic energy savings for digital signal processor modules using plural energy savings states
JP5088365B2 (en) Electronic equipment and load balancing program
KR20060071293A (en) Apparatus for mpeg playback using dynamic working frequency and voltage scaling with decoding time prediction and method thereof
CN115712337A (en) Scheduling method and device of processor, electronic equipment and storage medium
JP2003319390A (en) Image reproducing terminal apparatus
EP4300485A1 (en) Media processing device and method
CN112463335A (en) Application program running method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee after: Huawei terminal (Shenzhen) Co.,Ltd.

Address before: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee before: HUAWEI DEVICE Co.,Ltd.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20181219

Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: HUAWEI DEVICE Co.,Ltd.

Address before: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee before: Huawei terminal (Shenzhen) Co.,Ltd.

TR01 Transfer of patent right