CN101873498B - Video decoding method, video decoding device and video/audio play system - Google Patents

Video decoding method, video decoding device and video/audio play system Download PDF

Info

Publication number
CN101873498B
CN101873498B CN 201010205177 CN201010205177A CN101873498B CN 101873498 B CN101873498 B CN 101873498B CN 201010205177 CN201010205177 CN 201010205177 CN 201010205177 A CN201010205177 A CN 201010205177A CN 101873498 B CN101873498 B CN 101873498B
Authority
CN
China
Prior art keywords
buffering area
module
video
frame
output queue
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.)
Expired - Fee Related
Application number
CN 201010205177
Other languages
Chinese (zh)
Other versions
CN101873498A (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.)
World (Shanghai) Technology Development Co., Ltd.
Original Assignee
Shenzhen Temobi Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Temobi Science and Technology Co Ltd filed Critical Shenzhen Temobi Science and Technology Co Ltd
Priority to CN 201010205177 priority Critical patent/CN101873498B/en
Publication of CN101873498A publication Critical patent/CN101873498A/en
Application granted granted Critical
Publication of CN101873498B publication Critical patent/CN101873498B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a video decoding method, a video decoding device and a video/audio play system. By setting an output frame queue buffer zone in both a video decoding module and an audio decoding module to trade space for time, an echo module and the decoding module can work asynchronously. Specifically speaking, if the frame queue buffer zone has video/audio frame data, echo is performed by directly acquiring data from a buffer queue according to a play speed rather than waiting for the output of a decoder. Because the decoding of video 1 frame takes relatively long time, in order to guarantee that the echo module does not stop due to the lack of dispatched CPU, the method uses entropy decoding in a video decoding process and CPU scheduling after motion compensation to ensure echo module can call the CPU in time, thereby guaranteeing playing smoothness and fluency. Therefore, when calculation decoding resources provided by a processor are narrowly enough, the phenomenon of unbalance or incoherence of video/audio play can be eliminated, and smooth and fluent play effect and more precise video/audio synchronization are provided.

Description

A kind of video encoding/decoding method, install and look audio frequency broadcast system
Technical field
The present invention relates to the audio/video encoding/decoding field, relate in particular to a kind of video encoding/decoding method, install and look audio frequency broadcast system.
Background technology
from ITU-T (ITU-T for ITU Telecommunication Standardization Sector, International Telecommunications Union's telecommunication standards group) since issue H261 video encoding standard, any compatible H261/263/264, MPEG-1/2/4 and JPEG (Joint Photographic Experts Group, associating picture experts group standard) video CODEC (coder-decoder, coder) all must be achieved as follows about function: estimation, motion compensation, transformation of coefficient, quantize and the entropy coding, these video standards are all in based on same video CODEC abstract model: DPCM/DCT (differential coding/discrete cosine transform) mixed C ODEC model.
Be that prior art is looked the audio frequency broadcast system basic block diagram as shown in Figure 1, the described audio frequency broadcast system of looking comprises: transmit control module 101, input interface 102, audio decoder module 103, video decode module 104, echo interface 105, the first buffering area 106, the second buffering area 107.Described input interface 102, audio decoder module 103, video decode module 104, echo interface 105 are connected respectively at transmit control module 101, described the first buffering area 106 is connected with described input interface 102, described the second buffering area 107 is connected with described video decode module 104, echo interface 107 and the audio decoder module 103 of being connected respectively, and described video decode module 104 also is connected with echo interface 105.Wherein, in prior art, the audio frequency broadcast system of looking of not establishing the second buffering area is arranged also, the echo interface is directly according to the decoded data address of audio decoder and Video Decoder transmission, carries out the presenting of effect of audio frequency and video.
Be the video decode modular structure figure that looks in Fig. 1 in audio frequency broadcast system as described in Figure 2, described video decode module comprises:
Entropy decoder module 1041 is used for the encoding stream of input is carried out the entropy decoding, extracts conversion coefficient, motion vector and the figure information of each macro block;
Firing floor decoding and the module 1042 that reorders are used for the firing floor decoding and reorder, obtain quantizing with conversion after sub-macro block;
Inverse quantization module 1043 is used for described sub-macro block is carried out inverse quantization;
Inverse discrete cosine transformation module 1044 is used for the sub-macro block after described inverse quantization is carried out inverse discrete cosine transformation, generates residual error;
Motion compensating module 1045 is used for motion vector and reference frame image are carried out motion compensated prediction, the generation forecast macro block, and wherein reference frame is the former frame of present frame;
Macro block reconstructed module 1046 is used for described predicted macroblock is added to the macro block that generates reconstruct on residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture;
Detection module 1047, complete for detection of whole macro block reconstruct of current frame image after, indicate that the present frame decoded picture generates complete, can be used for output or decoding prediction next time.
In prior art, the video decode module is decoded at every turn and is exported a frame, decoded frame of video raw data (as the YUV view data) are all the frame output buffers (not shown in Fig. 2) that leaves the video decode module in, this is a zone of fully being used and being managed by the video decode module, it only can deposit two field picture raw data of current decoding output, when the video decode module begins new once decoding, can first empty described frame output buffer.That is to say, no matter look the second buffering area 107 or echo interface 105 in audio frequency broadcast system (as shown in Figure 1), when accessing video decoder module 104 and audio decoder module 105, must all copy the data in described frame output buffer to the second buffering area 107 or whole echos complete (for the echo interface).This copy meeting causes all played data all can be copied once more, has wasted greatly nervous cpu resource; And there is no the second buffering area 107 look the sound Play System when the I frame decoding, if the computational resource that CPU distributes is not loose, the situations such as full frame stretching, picture and sound pause, wait usually can appear during displaying video.
Summary of the invention
The purpose of the embodiment of the present invention is to propose a kind of video decoder, usually can occur the problems such as full frame stretching, picture and sound pause, wait when being intended to solve in prior art displaying video.
Embodiments of the invention are achieved in that a kind of video decoder, comprise the entropy decoder module, are used for the encoding stream of input is carried out the entropy decoding, extract conversion coefficient, motion vector and the header of each macro block; Firing floor decoding and the module that reorders are used for the firing floor decoding and reorder, obtain quantizing with conversion after sub-macro block; Inverse quantization module is used for described sub-macro block is carried out inverse quantization; The inverse discrete cosine transformation module is used for the sub-macro block after described inverse quantization is carried out inverse discrete cosine transformation, generates residual error; Motion compensating module is used for motion vector and reference frame image being carried out motion compensated prediction, the generation forecast macro block; The macro block reconstructed module is used for described predicted macroblock is added to the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture; Detection module, complete for detection of whole macro block reconstruct of current frame image after, indicate that the present frame decoded picture generates complete, can be used for output or decoding prediction next time, wherein, described device also comprises:
The first scheduler module, after being used for realizing the entropy decoding, scheduling CPU enters sleep state;
The second scheduler module, after being used for realizing motion compensated prediction, scheduling CPU enters sleep state.
The purpose of the embodiment of the present invention is to propose a kind of video encoding/decoding method, said method comprising the steps of:
Encoding stream to input carries out the entropy decoding, extracts conversion coefficient, motion vector and the header of each macro block;
The judgement present frame is the I frame;
Scheduling CPU enters sleep state;
Firing floor is decoded and reordered, thereby obtain the sub-macro block after quantification and conversion;
Described sub-macro block is carried out inverse quantization;
Sub-macro block after described inverse quantization is carried out inverse discrete cosine transformation, generate residual error;
Motion vector and reference frame image are carried out motion compensated prediction, the generation forecast macro block;
The judgement present frame is the I frame;
Scheduling CPU enters sleep state;
Described predicted macroblock is added to the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture;
After whole macro block reconstruct of judgement current frame image are complete, generate present frame frame decoding image.
The purpose of the embodiment of the present invention is to propose a kind of audio frequency broadcast system of looking that comprises described video decoder, and described system comprises transmit control module, input interface, audio decoder module, video decoder, echo interface, the first buffering area; Described input interface, audio decoder module, video decoder, echo interface are connected with transmit control module respectively, and the first buffering area is connected with input interface; Transmit control module is used for giving an order, and chooses file or the chained address, media data position that will play, by the operating system file input/output interface, media data is read in the first buffering area, wherein,
described video decoder also comprises the 3rd output queue buffering area, described video decoder is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out video decode, deposit the 3rd output queue buffering area in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the exclusive reference to the output queue of described the 3rd output queue buffering area, described the 3rd output queue buffering area is used for storing the decoded data of described video decode module, and form output queue so that described echo interface and described video decoder can be worked asynchronously,
described audio decoder module also comprises the second output queue buffering area, described audio decoder module is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out audio decoder, deposit the second output queue buffering area in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the exclusive reference to the output queue of described the second output queue buffering area, described the second output queue buffering area is used for storing the decoded data of described audio decoder module, and form output queue so that described echo interface and described audio decoder module can be worked asynchronously,
The echo interface is used for by certain sequential, according to the data address after audio decoder of looking of storing in described the second output queue buffering area, the 3rd output queue buffering area, presents depending on the effect of audio frequency.
The purpose of the embodiment of the present invention is to propose a kind of audio frequency broadcast system of looking that comprises described video decoder, and described system comprises transmit control module, input interface, audio decoder module, video decoder, echo interface, the first buffering area; Described input interface, audio decoder module, video decoder, echo interface are connected with transmit control module respectively, and the first buffering area is connected with input interface; Transmit control module is used for giving an order, and chooses file or the chained address, media data position that will play, by the operating system file input/output interface, media data is read in the first buffering area, wherein,
The described audio frequency broadcast system of looking also comprises the 4th buffering area, described the 4th buffering area is connected with described echo interface with described audio decoder module, be used for storing described audio decoder module the output of frame output buffer decoded frame data and form output queue, and be used for providing reference address to described echo interface accessing;
described video decoder also comprises the 3rd output queue buffering area, described video decoder is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out video decode, deposit the 3rd output queue buffering area in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the output queue exclusive reference to described the 3rd output queue buffering area, described the 3rd output queue buffering area is used for storing the decoded data of described video decode module, and form output queue so that described echo interface and described video decoder can be worked asynchronously,
Described audio decoder module also is connected with described the 4th buffering area, be used for obtaining by described input interface the file that will play or the media data of the first buffering area, and carry out audio decoder, each decoding output one frame is with the frame output buffer of decoded frame of video raw deposit data in described audio decoder module;
The echo interface is used for by certain sequential, and the effect of looking audio frequency according to the data address after the audio decoder of the data address after the video decode of storing in the 3rd output queue buffering area and the 4th buffer stores presents.
The embodiment of the present invention is by arranging the output frame queue buffer in video decode module, audio decoder module, trade space for time, make (accurate parallel) work asynchronously of echo module and decoder module, specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for decoder output during echo, but directly according to broadcasting speed from the buffer queue echo of fetching data.Grow in the time of can leveling land due to the decoding of video I frame (usually much larger than 40ms), in order to guarantee that this moment, the echo module can not stop less than CPU because distributing, the present invention in video decoding process entropy decoding and motion compensation after by dispatching CPU, guarantee that the echo module can in time be dispatched to CPU, thereby guarantee that the smoothness of playing is level and smooth.Like this, in the time of just making the calculating decode resources that can provide when processor satisfy relatively reluctantly (the every frame of average 36ms when for example the individual event video decode is tested), can eliminate and look audio frequency and play phenomenon unbalanced or card, level and smooth, smooth result of broadcast and audio-visual synchronization more accurately are provided.
Description of drawings
Fig. 1 is that prior art is looked the audio frequency broadcast system basic block diagram;
Fig. 2 is the video decode modular structure figure that looks in Fig. 1 in audio frequency broadcast system;
Fig. 3 is that the embodiment of the present invention is looked the audio frequency broadcast system structure chart;
Fig. 4 is the video decode modular structure figure that looks in Fig. 3 in audio frequency broadcast system;
Fig. 5 is embodiment of the present invention video encoding/decoding method flow chart;
Fig. 6 is that another embodiment of the present invention is looked the audio frequency broadcast system structure chart.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated, for convenience of explanation, only show the part relevant to the embodiment of the present invention.Should be appreciated that the specific embodiment that this place is described, only be used for explaining the present invention, not in order to limit the present invention.
The embodiment of the present invention is by arranging the output frame queue buffer in video decode module, audio decoder module, trade space for time, make (accurate parallel) work asynchronously of echo interface module and decoder module, specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for decoder output during echo, but directly according to broadcasting speed from the buffer queue echo of fetching data.Grow in the time of can leveling land due to the decoding of video I frame (usually much larger than 40ms), in order to guarantee that this moment, the echo module can not stop less than CPU because distributing, the present invention in video decoding process entropy decoding and motion compensation after by dispatching CPU, guarantee that the echo module can in time be dispatched to CPU, thereby guarantee that the smoothness of playing is level and smooth.Like this, in the time of just making the calculating decode resources that can provide when processor satisfy relatively reluctantly (the every frame of average 36ms when for example the individual event video decode is tested), can eliminate and look audio frequency and play phenomenon unbalanced or card, level and smooth, smooth result of broadcast and audio-visual synchronization more accurately are provided.
As shown in Figure 3, look the audio frequency broadcast system structure chart for the embodiment of the present invention.Described system comprises: transmit control module 101, input interface 102, audio decoder module 103, video decode module 104, echo interface 105, the first buffering area 106, wherein audio decoder module 103 comprises that the second output queue buffering area 1031, video decode module 104 comprise the 3rd output queue buffering area 1048.Described input interface 102, audio decoder module 103, video decode module 104, echo interface 105 are connected with transmit control module 101 respectively, and the first buffering area 106 is connected with input interface 102.
Transmit control module 101 is used for giving an order, and chooses file or the chained address, media data position that will play, by operating system file input/output interface (not shown in Fig. 3), media data is read in the first buffering area 106;
audio decoder module 103, be used for obtaining by input interface 102 file that will play or the media data of the first buffering area 106, and carry out audio decoder, deposit the second output queue buffering area 1031 in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the output queue exclusive reference to described the second output queue buffering area 1031, described the second output queue buffering area 1031 is used for storing 103 decoded data of described audio decoder module, and form output queue so that echo interface 105 and audio decoder module 103 asynchronously (accurate parallel) work (specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for 103 outputs of audio frequency decoder module during echo, but directly according to broadcasting speed from the output queue echo of fetching data).
video decode module 104, be used for obtaining by input interface 102 file that will play or the media data of the first buffering area 106, and carry out video decode, deposit the 3rd output queue buffering area 1048 in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the output queue exclusive reference to described the 3rd output queue buffering area 1048, described the 3rd buffering area 1048 is used for storing 104 decoded data of described video decode module, and form output queue so that echo interface 105 and video decode module 1048 asynchronously (accurate parallel) work (specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for 104 outputs of video decode module during echo, but directly according to broadcasting speed from the output queue echo of fetching data).
Echo interface 105 is used for by certain sequential, according to the data address after audio decoder of looking of storing in described the second output queue buffering area 1031 and the 3rd output queue buffering area 1048, presents depending on the effect of audio frequency.
Wherein said echo interface 105 moves at different threads from audio decoder module and video decode module.
Be illustrated in figure 4 as the video decode modular structure figure that looks in Fig. 3 in audio frequency broadcast system.Described video decode module comprises:
Entropy decoder module 1041 is used for the encoding stream of input is carried out the entropy decoding, extracts conversion coefficient, motion vector and the header of each macro block;
The first scheduler module 1049, after being used for realizing the entropy decoding, scheduling CPU enters sleep state can in time be dispatched to CPU to guarantee the echo module, and the wherein said dormant time is less than a cpu clock Tick.;
Firing floor decoding and the module 1042 that reorders are used for the firing floor decoding and reorder, obtain quantizing with conversion after sub-macro block;
Inverse quantization module 1043 is used for described sub-macro block is carried out inverse quantization;
Inverse discrete cosine transformation module 1044 is used for the sub-macro block after described inverse quantization is carried out inverse discrete cosine transformation, generates residual error;
Motion compensating module 1045 is used for motion vector and reference frame image are carried out motion compensated prediction, the generation forecast macro block, and wherein, described reference frame is the former frame of present frame;
The second scheduler module 1040 is used for realizing realizing that scheduling CPU enters sleep state and can in time be dispatched to CPU to guarantee the echo module after motion compensated prediction that the wherein said dormant time is less than a cpu clock Tick;
Macro block reconstructed module 1046 is used for described predicted macroblock is added to the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture;
Detection module 1047, complete for detection of whole macro block reconstruct of current frame image after, indicate that the present frame decoded picture generates complete, can be used for output or decoding prediction next time.
The embodiment of the present invention is by arranging the output frame queue buffer in video decode module, audio decoder module, trade space for time, make (accurate parallel) work asynchronously of echo interface module and decoder module, specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for decoder output during echo, but directly according to broadcasting speed from the buffer queue echo of fetching data.Grow in the time of can leveling land due to the decoding of video I frame (usually much larger than 40ms), in order to guarantee that this moment, the echo module can not stop less than CPU because distributing, the present invention in video decoding process entropy decoding and motion compensation after by dispatching CPU, guarantee that the echo module can in time be dispatched to CPU, thereby guarantee that the smoothness of playing is level and smooth.Like this, in the time of just making the calculating decode resources that can provide when processor satisfy relatively reluctantly (the every frame of average 36ms when for example the individual event video decode is tested), can eliminate and look audio frequency and play phenomenon unbalanced or card, level and smooth, smooth result of broadcast and audio-visual synchronization more accurately are provided.
Be illustrated in figure 5 as embodiment of the present invention video encoding/decoding method flow chart.Said method comprising the steps of:
S501 carries out the entropy decoding to the encoding stream of inputting, and extracts conversion coefficient, motion vector and the header of each macro block;
S513 judges whether present frame is the I frame, is to enter step S502, otherwise enters step S503;
S502, scheduling CPU enters sleep state (the wherein said dormant time is less than a cpu clock Tick);
S503 decodes and reorders firing floor, thereby obtains the sub-macro block after quantification and conversion;
S504 carries out inverse quantization to described sub-macro block;
S505 carries out inverse discrete cosine transformation to the sub-macro block after described inverse quantization, generates residual error;
S506 carries out motion compensated prediction to motion vector and reference frame image, the generation forecast macro block, and wherein, described reference frame is the former frame of present frame;
S514 judges whether present frame is the I frame, is to enter step S507, otherwise enters step S508;
S507, scheduling CPU advances sleep state (the wherein said dormant time is less than a cpu clock Tick);
S508 is added to described predicted macroblock the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates present frame frame decoding image;
S509, the whole macro blocks that judge current frame image whether reconstruct complete after, be to enter step S510, otherwise return to step S501;
S510 generates present frame frame decoding image.
grow in the time of can leveling land due to the decoding of video I frame (usually much larger than 40ms), in order to guarantee that this moment, the echo module can not stop less than CPU because distributing, the embodiment of the present invention in video decoding process entropy decoding and motion compensation after by dispatching CPU, guarantee that the echo module can in time be dispatched to CPU, thereby guarantee that the smoothness of playing is level and smooth, like this, in the time of just making the calculating decode resources that can provide when processor satisfy relatively reluctantly (the every frame of average 36ms when for example the individual event video decode is tested), can eliminate and look the phenomenon that the audio frequency broadcast is unbalanced or block, provide level and smooth, smooth result of broadcast and audio-visual synchronization more accurately.
Fig. 6 is that another embodiment of the present invention is looked the audio frequency broadcast system structure chart, the difference of itself and Fig. 3 is, described audio decoder module 103 does not comprise the output queue buffering area, just is provided with the 3rd output queue buffering area 1048 in the video decode module, shown in system comprise:
Transmit control module 101, input interface 102, audio decoder module 103, video decode module 104, echo interface 105, the first buffering area 106, wherein, video decode module 104 comprises the 3rd output queue buffering area 1048.Described input interface 102, audio decoder module 103, video decode module 104, echo interface 105 are connected with transmit control module 101 respectively, the first buffering area 106 is connected with input interface 102, the described audio frequency broadcast system of looking also comprises the 4th buffering area 108, and described the 4th buffering area 108 is connected with described echo interface with described audio decoder module.
Transmit control module 101 is used for giving an order, and chooses file or the chained address, media data position that will play, by operating system file input/output interface (not shown in Fig. 6), media data is read in the first buffering area 106;
Audio decoder module 103, be used for obtaining by input interface 102 file that will play or the media data of the first buffering area 106, and carry out audio decoder, each decoding output one frame is with the frame output buffer (in Fig. 6 not shown) of decoded frame of video raw deposit data in audio decoder module 103;
The 4th buffering area 108, be used for storing described audio decoder module 103 the output of frame output buffer decoded frame data and form output queue, and be used for providing reference address to described echo interface 105 access;
video decode module 104, be used for obtaining by input interface 102 file that will play or the media data of the first buffering area 106, and carry out video decode, deposit the 3rd output queue buffering area 1048 in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the output queue exclusive reference to described the 3rd output queue buffering area 1048, described the 3rd queue buffer 1048 is used for storing the decoded data of described video decode module 104, and form output queue so that echo interface 105 and video decode module 104 asynchronously (accurate parallel) work (specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for 103 outputs of audio frequency decoder module during echo, but directly according to broadcasting speed from the output queue echo of fetching data),
Echo interface 105 is used for by certain sequential, according to the data address after the audio decoder of the data address after the video decode of storing in the 3rd output queue buffering area 1048 and the 4th buffer stores, presents depending on the effect of audio frequency.
Wherein said echo interface 105 moves at different threads from audio decoder module and video decode module.
Described in the internal structure of looking the decoder module in audio frequency broadcast system in described Fig. 6 and operation principle such as embodiment one, do not giving unnecessary details at this.
The embodiment of the present invention is by arranging the output frame queue buffer in video decode module, audio decoder module, trade space for time, make (accurate parallel) work asynchronously of echo interface module and decoder module, specifically, if look the audio frame number certificate in the frame queue buffering, need not wait for decoder output during echo, but directly according to broadcasting speed from the buffer queue echo of fetching data.Grow in the time of can leveling land due to the decoding of video I frame (usually much larger than 40ms), in order to guarantee that this moment, the echo module can not stop less than CPU because distributing, the present invention in video decoding process entropy decoding and motion compensation after by dispatching CPU, guarantee that the echo module can in time be dispatched to CPU, thereby guarantee that the smoothness of playing is level and smooth.Like this, in the time of just making the calculating decode resources that can provide when processor satisfy relatively reluctantly (the every frame of average 36ms when for example the individual event video decode is tested), can eliminate and look audio frequency and play phenomenon unbalanced or card, level and smooth, smooth result of broadcast and audio-visual synchronization more accurately are provided.
Those having ordinary skill in the art will appreciate that, realize that all or part of step in above-described embodiment method can complete by the program command related hardware, described program can be stored in a computer read/write memory medium, and described storage medium can be ROM, RAM, disk, CD etc.
The above is only preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a video decoder, comprise the entropy decoder module, is used for the encoding stream of input is carried out the entropy decoding, extracts conversion coefficient, motion vector and the header of each macro block; Firing floor decoding and the module that reorders are used for the firing floor decoding and reorder, obtain quantizing with conversion after sub-macro block; Inverse quantization module is used for described sub-macro block is carried out inverse quantization; The inverse discrete cosine transformation module is used for the sub-macro block after described inverse quantization is carried out inverse discrete cosine transformation, generates residual error; Motion compensating module is used for motion vector and reference frame image being carried out motion compensated prediction, the generation forecast macro block; The macro block reconstructed module is used for described predicted macroblock is added to the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture; Detection module, complete for detection of whole macro block reconstruct of current frame image after, indicate that the present frame decoded picture generates complete, can be used for output or decoding prediction next time, it is characterized in that, described device also comprises:
The first scheduler module, after being used for realizing the entropy decoding, scheduling CPU enters sleep state;
The second scheduler module, after being used for realizing motion compensated prediction, scheduling CPU enters sleep state;
described video decoder also comprises the 3rd output queue buffering area, described video decoder is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out video decode, deposit the 3rd output queue buffering area in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the exclusive reference to the output queue of described the 3rd output queue buffering area, described the 3rd output queue buffering area is used for storing the decoded data of described video decoder, and form output queue so that described echo interface and described video decoder can be worked asynchronously,
Described " described echo interface and described video decoder can be worked asynchronously ", be specially: if look the audio frame number certificate in the frame queue buffering, need not wait for decoding device output during echo, but directly according to broadcasting speed from the buffer queue echo of fetching data.
2. video decoder as claimed in claim 1, it is characterized in that: described reference frame is the former frame of described present frame.
3. video decoder as claimed in claim 1, it is characterized in that: the described dormant time is less than a cpu clock Tick.
4. a video encoding/decoding method, is characterized in that, said method comprising the steps of:
Encoding stream to input carries out the entropy decoding, extracts conversion coefficient, motion vector and the header of each macro block;
The judgement present frame is the I frame;
Scheduling CPU enters sleep state;
Firing floor is decoded and reordered, thereby obtain the sub-macro block after quantification and conversion;
Described sub-macro block is carried out inverse quantization;
Sub-macro block after described inverse quantization is carried out inverse discrete cosine transformation, generate residual error;
Motion vector and reference frame image are carried out motion compensated prediction, the generation forecast macro block;
The judgement present frame is the I frame;
Scheduling CPU enters sleep state;
Described predicted macroblock is added to the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture;
After whole macro block reconstruct of judgement current frame image are complete, generate present frame frame decoding image;
Wherein, described video encoding/decoding method also comprises: obtain file or the media data that will play, and carry out video decode, deposit the output queue buffering area in, and the mutual exclusion lock of the establishment overall situation guarantees the exclusive reference to the output queue of described output queue buffering area.
5. video encoding/decoding method as claimed in claim 4, is characterized in that, described method also comprises:
Judge for the first time when present frame is not the I frame, enter step and " firing floor is decoded and reordered, thereby obtain the sub-macro block after quantification and conversion ".
6. video encoding/decoding method as claimed in claim 4, is characterized in that, described method also comprises:
Judge for the second time when present frame is not the I frame, enter step and " described predicted macroblock is added to the macro block that generates reconstruct on described residual error, and after complete for whole macro block reconstruct of current frame image, directly generates the present frame decoded picture ".
7. video encoding/decoding method as claimed in claim 4, it is characterized in that: described reference frame is the former frame of described present frame.
8. video encoding/decoding method as claimed in claim 4, it is characterized in that: the described dormant time is less than a cpu clock Tick.
9. audio frequency broadcast system of looking that comprises video decoder as claimed in claim 1, described system comprises transmit control module, input interface, audio decoder module, video decoder, echo interface, the first buffering area; Described input interface, audio decoder module, video decoder, echo interface are connected with transmit control module respectively, and the first buffering area is connected with input interface; Transmit control module is used for giving an order, and chooses file or the chained address, media data position that will play, by the operating system file input/output interface, media data is read in the first buffering area, it is characterized in that:
Described video decoder is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out video decode, deposit the 3rd output queue buffering area in, and the mutual exclusion lock that be used for to create the overall situation guarantees the exclusive reference to the output queue of described the 3rd output queue buffering area;
described audio decoder module also comprises the second output queue buffering area, described audio decoder module is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out audio decoder, deposit the second output queue buffering area in, and the mutual exclusion lock that is used for the establishment overall situation guarantees the exclusive reference to the output queue of described the second output queue buffering area, described the second output queue buffering area is used for storing the decoded data of described audio decoder module, and form output queue so that described echo interface and described audio decoder module can be worked asynchronously,
The echo interface is used for by certain sequential, according to the data address after audio decoder of looking of storing in described the second output queue buffering area, the 3rd output queue buffering area, presents depending on the effect of audio frequency.
10. audio frequency broadcast system of looking that comprises video decoder as claimed in claim 1, described system comprises transmit control module, input interface, audio decoder module, video decoder, echo interface, the first buffering area; Described input interface, audio decoder module, video decoder, echo interface are connected with transmit control module respectively, and the first buffering area is connected with input interface; Transmit control module is used for giving an order, and chooses file or the chained address, media data position that will play, by the operating system file input/output interface, media data is read in the first buffering area, it is characterized in that:
The described audio frequency broadcast system of looking also comprises the 4th buffering area, described the 4th buffering area is connected with described echo interface with described audio decoder module, be used for storing described audio decoder module the output of frame output buffer decoded frame data and form output queue, and be used for providing reference address to described echo interface accessing;
Described video decoder is used for obtaining by input interface the file that will play or the media data of the first buffering area, and carry out video decode, deposit the 3rd buffering area output queue in, and the mutual exclusion lock that be used for to create the overall situation guarantees the exclusive reference to the output queue of described the 3rd output queue buffering area;
Described audio decoder module also is connected with described the 4th buffering area, be used for obtaining by described input interface the file that will play or the media data of the first buffering area, and carry out audio decoder, a frame is exported in each decoding, decoded frame of video raw image data is left in the frame output buffer of described audio decoder module;
The echo interface is used for by certain sequential, and the effect of looking audio frequency according to the data address after the audio decoder of the data address after the video decode of storing in described the 3rd output queue buffering area and the 4th buffer stores presents.
CN 201010205177 2010-06-22 2010-06-22 Video decoding method, video decoding device and video/audio play system Expired - Fee Related CN101873498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010205177 CN101873498B (en) 2010-06-22 2010-06-22 Video decoding method, video decoding device and video/audio play system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010205177 CN101873498B (en) 2010-06-22 2010-06-22 Video decoding method, video decoding device and video/audio play system

Publications (2)

Publication Number Publication Date
CN101873498A CN101873498A (en) 2010-10-27
CN101873498B true CN101873498B (en) 2013-05-08

Family

ID=42998117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010205177 Expired - Fee Related CN101873498B (en) 2010-06-22 2010-06-22 Video decoding method, video decoding device and video/audio play system

Country Status (1)

Country Link
CN (1) CN101873498B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769715B (en) * 2012-03-31 2017-12-29 新奥特(北京)视频技术有限公司 A kind of method and system of code stream editing
CN102883218B (en) * 2012-09-21 2015-04-01 北京君正集成电路股份有限公司 Method and equipment for decoding multiple video files
CN104125493A (en) * 2013-04-24 2014-10-29 鸿富锦精密工业(深圳)有限公司 Audio-video synchronization system and method
CN114640875A (en) * 2020-12-15 2022-06-17 晶晨半导体(深圳)有限公司 Method for controlling terminal display and electronic equipment
CN112995532B (en) * 2021-02-03 2023-06-13 上海哔哩哔哩科技有限公司 Video processing method and device
CN114630170B (en) * 2022-03-24 2023-10-31 抖音视界有限公司 Audio and video synchronization method and device, electronic equipment and storage medium
CN115474063B (en) * 2022-10-27 2023-01-10 中诚华隆计算机技术有限公司 Streaming media back-end decoding method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6262776B1 (en) * 1996-12-13 2001-07-17 Microsoft Corporation System and method for maintaining synchronization between audio and video
CN1589014A (en) * 2004-07-30 2005-03-02 联合信源数字音视频技术(北京)有限公司 Video frequency decoding control method and device
CN1588985A (en) * 2004-07-30 2005-03-02 联合信源数字音视频技术(北京)有限公司 Digital video-audio decoder
CN101312519A (en) * 2008-07-04 2008-11-26 深圳华为通信技术有限公司 Data frame processing method and apparatus
CN101442586A (en) * 2008-12-31 2009-05-27 中兴通讯股份有限公司 Method and terminal for playing multimedia

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6262776B1 (en) * 1996-12-13 2001-07-17 Microsoft Corporation System and method for maintaining synchronization between audio and video
CN1589014A (en) * 2004-07-30 2005-03-02 联合信源数字音视频技术(北京)有限公司 Video frequency decoding control method and device
CN1588985A (en) * 2004-07-30 2005-03-02 联合信源数字音视频技术(北京)有限公司 Digital video-audio decoder
CN101312519A (en) * 2008-07-04 2008-11-26 深圳华为通信技术有限公司 Data frame processing method and apparatus
CN101442586A (en) * 2008-12-31 2009-05-27 中兴通讯股份有限公司 Method and terminal for playing multimedia

Also Published As

Publication number Publication date
CN101873498A (en) 2010-10-27

Similar Documents

Publication Publication Date Title
CN101873498B (en) Video decoding method, video decoding device and video/audio play system
US9224187B2 (en) Wavefront order to scan order synchronization
CN1937773B (en) External memory device, method of storing image data for the same, and image processor using the method
US9336558B2 (en) Wavefront encoding with parallel bit stream encoding
CN100562114C (en) Video encoding/decoding method and decoding device
US9392292B2 (en) Parallel encoding of bypass binary symbols in CABAC encoder
CN101518089B (en) Coding/decoding methods, coders/decoders, and method and device for finding optimally matched modules
CN105721880A (en) Reducing Latency In Video Encoding And Decoding
JP2003204556A (en) Moving picture decoding processor for multimedia signal processing
WO2020140915A1 (en) Video processing method and apparatus
CN102447906A (en) Low-latency video decoding
CN101453640A (en) AVS video decoder for software and hardware combined decoding
TW202029771A (en) General applications related to affine motion
TWI247546B (en) A video encoding method which carries out the encoding of P frame or B frame by utilizing I frame
US10313683B2 (en) Video encoder with context switching
CN101883276B (en) Multi-format HD video decoder structure capable of decoding by combining software and hardware for decoding
Ling et al. An efficient controller scheme for MPEG-2 video decoder
WO1995001053A1 (en) Image processor
KR100891116B1 (en) Apparatus and method for bandwidth aware motion compensation
CN102595193A (en) Video processing apparatus and method
TWI304303B (en) Apparatus for image encoding and the method thereof
Mochizuki et al. A 64 mW high picture quality H. 264/MPEG-4 video codec IP for HD mobile applications in 90 nm CMOS
CN100576917C (en) The method and system of inversely scanning frequency efficiency
CN114339249B (en) Video decoding method, readable medium and electronic device thereof
WO2021143678A1 (en) Motion information list construction method in video encoding and decoding, device, and apparatus

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
C56 Change in the name or address of the patentee

Owner name: SHENZHEN RONGCHANG TIANXIA TECHNOLOGY CO., LTD.

Free format text: FORMER NAME: SHENZHEN TEMOBI SCIENCE + TECHNOLOGY CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 19, building 18, Changhong technology building, 518057 South twelve Road, South tech Zone, Nanshan District hi tech Zone, Guangdong, Shenzhen

Patentee after: SHENZHEN TEMOBI TECHNOLOGY CO., LTD.

Address before: 19, building 18, Changhong technology building, 518057 South twelve Road, South tech Zone, Nanshan District hi tech Zone, Guangdong, Shenzhen

Patentee before: Shenzhen Temobi Science & Tech Development Co.,Ltd.

ASS Succession or assignment of patent right

Owner name: RONGCHUANG TIANXIA (SHANGHAI) TECHNOLOGY DEVELOPME

Free format text: FORMER OWNER: SHENZHEN RONGCHANG TIANXIA TECHNOLOGY CO., LTD.

Effective date: 20150610

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150610

Address after: 200433 Shanghai City, Yangpu District Wei Road No. 6 room 502-8

Patentee after: World (Shanghai) Technology Development Co., Ltd.

Address before: 19, building 18, Changhong technology building, 518057 South twelve Road, South tech Zone, Nanshan District hi tech Zone, Guangdong, Shenzhen

Patentee before: SHENZHEN TEMOBI TECHNOLOGY CO., LTD.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130508

Termination date: 20190622

CF01 Termination of patent right due to non-payment of annual fee