CN101534438B - Audio-visual bit stream processing method and device - Google Patents

Audio-visual bit stream processing method and device Download PDF

Info

Publication number
CN101534438B
CN101534438B CN 200810085349 CN200810085349A CN101534438B CN 101534438 B CN101534438 B CN 101534438B CN 200810085349 CN200810085349 CN 200810085349 CN 200810085349 A CN200810085349 A CN 200810085349A CN 101534438 B CN101534438 B CN 101534438B
Authority
CN
China
Prior art keywords
bit stream
initial code
detecting
unit
imitative
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
CN 200810085349
Other languages
Chinese (zh)
Other versions
CN101534438A (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.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
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 Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN 200810085349 priority Critical patent/CN101534438B/en
Publication of CN101534438A publication Critical patent/CN101534438A/en
Application granted granted Critical
Publication of CN101534438B publication Critical patent/CN101534438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to an audio-visual bit stream processing method which comprises the steps of receiving an input bit stream; detecting whether the input bit stream has a simulated start code protection code; removing the simulated start code protection code to generate an output bit stream when the simulated start code protection code is detected and simultaneously setting a mark signal to be a first specified mark value; detecting whether the input bit stream has a start code; and outputting directly the input bit stream when the start code is detected, and setting the mark signal to be a second specified mark value.

Description

Audio-visual bit stream processing method and device
Technical field
The present invention relates to audio-visual coding and decoding technology, particularly relate to imitative initial code protection coding and initial code detects and treatment technology is relevant.
Background technology
Audio-visual coding techniques has become one of of paramount importance role in the digital home gradually, MPEG2 continues, MP3, VCD, after the DVD, audio-visual coding and decoding ability with MPEG4-AVC form (perhaps being called H.264) or the VC-1 of Microsoft form has become one of basic demand condition of present media product, and at HDTV, be used widely in the system such as HD-DVD and blue-ray DVD, because the two has powerful compression ratio, low bitrate, program that need not be complicated, and the ability of height communication applications integration, become function and reference format indispensable in the audio-visual digital video product.
Take MPEG4 as example, in the middle of the specification of MPEG4, the pattern of initial code and the pattern (startcode emulation prevention pattern) of imitative initial code protection coding have been defined, " 00_00_01 " of its definition hexadecimal representation is initial code, and can add the pattern of this initial code for the position of beginning and the end of previous network abstraction layer unit of a new network abstraction layer unit of decoder identification at the front end of each network abstraction layer unit (NAL unit).And in cataloged procedure, when the initial code pattern is identical therewith pattern appears in the bit stream of coding result, then can add in this bit stream imitating initial code protection byte (emulation prevention byte), occur with the situation of avoiding imitative initial code.For example, when the pattern of " 00_00_01 " appears in the bit stream of coding result, be about to insert in this bit stream with the imitative initial code protection byte " 03 " (i.e. " 0x03 ") of hexadecimal representation, to obtain new bit stream fragment " 00_00_03_01 ".In the middle of the specification of MPEG4, again four patterns such as " 00_00_03_00 ", " 00_00_03_01 ", " 00_00_03_02 ", " 00_00_03_03 " are defined as imitative initial code protection coding.
Owing in these two kinds of standard specifications, often can run into the problem of imitative initial code, therefore, namely being designed with imitative initial code preventing mechanism at cataloged procedure and distinguishing imitative initial code and initial code.Yet, in decode procedure, if when not detecting imitative initial code protection coding, bit stream can directly be deciphered, if when detecting imitative initial code protection coding, then must first the imitative initial code protection byte " 0x03 " of imitating in the initial code protection coding be removed, but when decoded operation, carry out simultaneously this action, can increase widely the complexity of decoding, and then the usefulness of bit stream is processed in impact, especially when processing the bit stream of high bit rate, the problem that causes is more serious.
Summary of the invention
One of purpose of the present invention is to provide a kind of audio-visual bit stream processing method device, and it can by detecting initial code, detect and remove the imitative initial code protection coding in the bit stream and setting the sign signal, solve the problem in the prior art.
Embodiments of the invention have disclosed a kind of audio-visual bit stream processing method.This audio-visual bit stream processing method comprises reception one incoming bit stream; Detect this incoming bit stream and whether have an imitative initial code protection coding; And when detecting this imitative initial code protection coding, remove this imitative initial code protection coding and export bit stream to produce one, and set a sign signal for one first special sign value.The method also is contained in when not detecting this imitative initial code protection coding, detects this incoming bit stream and whether has an initial code; And when detecting this initial code, directly export this incoming bit stream, and should indicate that signal set one second special sign value for.
Embodiments of the invention have also disclosed a kind of audio-visual bit stream processing method.This audio-visual bit stream processing method comprises reception one incoming bit stream; Detect this incoming bit stream and whether have an imitative initial code protection coding; When not detecting this imitative initial code protection coding, detect this incoming bit stream and whether have an initial code; And when detecting this initial code, directly export this incoming bit stream, and set a sign signal for a special sign value.The method also is contained in when not detecting this initial code, directly exports this incoming bit stream, and should indicate that signal maintained a default value.
Embodiments of the invention have also disclosed a kind of audio-visual bit stream processing unit.The audio-visual bit stream processing unit comprises a bit stream pre-process module and a decoding module.Bit stream pre-process module comprises a detecting unit, and removes unit and a sign signal generation unit.Detecting unit is used for receiving an incoming bit stream and detects this incoming bit stream whether have imitative initial code protection coding.Remove the unit and be coupled to detecting unit, be used for when detecting imitative initial code protection coding, remove imitative initial code protection coding to produce an output bit stream.Sign signal generation unit is coupled to detecting unit, is used for setting a sign signal for one first special sign value when detecting imitative initial code protection coding.Decoding module is coupled to and removes unit and sign signal generation unit, is used for deciphering the output bit stream according to the sign signal.
Description of drawings
Fig. 1 is the schematic diagram according to the audio-visual bit stream processing unit of one embodiment of the invention.
Fig. 2 is the schematic diagram of an embodiment of the internal circuit of the bit stream pre-process module among Fig. 1.
Fig. 3 is the schematic diagram of an embodiment of the internal circuit of the decoding module among Fig. 1.
Fig. 4 is the flow chart of an example operation of bit stream processing method of the present invention.
Fig. 5 is the schematic diagram of the form of incoming bit stream, the output bit stream in the key diagram 1 and the set point that indicates signal.
The reference numeral explanation
100 audio-visual bit stream processing unit
120 bit stream pre-process modules
140 decoding modules
BS InIncoming bit stream
BS OutThe output bit stream
S FGThe sign signal
220 detecting units
230 remove the unit
240 sign signal generation units
310,320 bit stream linked devices
330 first decoding units
340 bit length computing units
350 second decoding units
360 sign signal inspection units
370 decoded bits pointer setup units
DBP 1Decoded bits pointer
402~422 steps
Embodiment
In following embodiment, so that the audio-visual bit stream (audio/video bit stream) that meets MPEG4-AVC form (namely H.264 form) or meet the VC-1 of Microsoft form is treated to example, audio-visual bit stream processing method of the present invention and device are described, but the technical staff who has the knack of audio-visual coding and decoding treatment technology all should understand, range of application of the present invention is not as limit, under what its existing or prerequisite of the audio-visual form spirit according to the invention that may develop out in the future in office, equal applicable technology of the present invention.
Please refer to Fig. 1, Fig. 1 is the schematic diagram according to the audio-visual bit stream processing unit 100 of one embodiment of the invention.Audio-visual bit stream processing unit 100 is arranged at the decoding end in the audio-video system usually, and it comprises a bit stream pre-process module 120 and a decoding module 140, and bit stream pre-process module 120 is used for receiving an incoming bit stream BS In(can meet the MPEG4-AVC form or meet the audio-visual bit stream of the VC-1 of Microsoft form for one, also can be the bit stream that meets other form), and according to incoming bit stream BS InProduce an output bit stream BS OutAn and sign signal S FG, decoding module 140 is coupled to bit stream pre-process module 120, is used for receiving output bit stream BS OutAnd sign signal S FG, and according to sign signal S FGDecipher incoming bit stream BS InAbout each assembly and the function mode thereof of bit stream pre-process module 120 with the internal circuit of coding module 140, will in the following examples, further describe.
Please refer to Fig. 2, Fig. 2 is the schematic diagram of an embodiment of the internal circuit of the bit stream pre-process module 120 among Fig. 1.Bit stream pre-process module 120 comprises (but being not limited to) detecting unit 220, and removes unit 230 and a sign signal generation unit 240, and wherein, detecting unit 220 is used for receiving incoming bit stream BS InAnd detection incoming bit stream BS InWhether have an imitative initial code protection coding P1, removing 230 of unit is to be coupled to detecting unit 220, when detecting imitative initial code protection coding P1, will imitate initial code protection coding P1 from incoming bit stream BS InIn remove to produce output bit stream BS OutIn addition, sign signal generation unit 240 is coupled to detecting unit 220, is used for setting sign signal S FG, when detecting imitative initial code protection coding P1, will indicate signal S FGSet one first special sign value FG1 for; When detecting initial code, will indicate signal S FGSet one second special sign value FG2 for.
As previously mentioned, in the middle of the specification of MPEG4, the pattern of initial code and the pattern of imitative initial code protection coding have been defined, its definition " 00_00_01 ", be initial code, and four patterns such as " 00_00_03_00 ", " 00_00_03_01 ", " 00_00_03_02 ", " 00_00_03_03 " are defined as imitative initial code protection coding, and these a little patterns will be applied in the following examples and in detail explanation.
Please refer to Fig. 3, Fig. 3 is the schematic diagram of an embodiment of the internal circuit of the decoding module 140 among Fig. 1.Decoding module 140 comprises decoded bits pointer setup unit 370 of (but being not limited to) two bit stream linked devices (bit streamconcatenator) 310,320,1 first decoding unit 330, a bit length computing unit 340, one second decoding unit 350, a sign signal inspection unit 360 and.Wherein, bit stream linked device 310,320 is used for respectively receiving output bit stream BS OutAnd sign signal S FG, and a plurality of positions that will be wherein connect together to obtain required position number, and the first decoding unit 330 is coupled to bit stream linked device 310, is used for to exporting bit stream BS OutThe meet standard requirements decoded operation of (for example H.264 or VC-1 form) of audio and video information.350 of the second decoding units are to be coupled to bit stream linked device 320, are used for to sign signal S FGDecipher to find out the position of initial code, for example, when the second decoding unit 350 is deciphered out sign signal S FGWhen being the second special sign value FG2, can inform that the first decoding unit 330 has initial code herein.In addition, bit length computing unit 340 is coupled to the first decoding unit 330, is used for calculating output bit stream BS OutIn the bit length deciphered, and this bit length offered bit stream linked device 310,320, which position should be connected together to inform bit stream linked device 310,320.And sign signal inspection unit 360 is coupled to the second decoding unit 350, is used for checkmark signal S FGSet point, last, 370 of decoded bits pointer setup units are coupled to bit length computing unit 340 and sign signal inspection unit 360, are used for according to this bit length and sign signal S FGSet a decoded bits pointer DBP 1, it is used to refer to the bit position of having deciphered at present.For example, if sign signal S FGWhen being the first special sign value FG1, then set decoded bits pointer DBP 1For decoded bits pointer originally adds eight positions, before this position, will imitate initial code protection byte " 0x03 " and remove to inform decoding module 140; If sign signal S FGBe not when being the first special sign value FG1, then to set decoded bits pointer DBP 1Be decoded bits pointer originally.This kind way can correctly be learnt decoded bits pointer DBP 1, in order to follow-up decoding action.
Above-mentioned example only illustrates application of the present invention for being used for, and is not restrictive condition of the present invention, and those skilled in the art should make appropriateness to decoding module 140 and change according to spirit of the present invention, and the corresponding variation of this kind also should belong to category of the present invention.
Please refer to Fig. 4, Fig. 4 is the flow chart of an example operation of bit stream processing method of the present invention, it comprises (but being not limited to) following step (if note that and can obtain identical in fact result, then these steps might not be abideed by execution order shown in Figure 4 and carry out):
Step 402: flow process begins.
Step 404: receive an incoming bit stream.
Step 406: detect this incoming bit stream and whether have an imitative initial code protection coding.When detecting this imitative initial code protection coding, execution in step 408; Otherwise, execution in step 412.
Step 408: remove this imitative initial code protection coding to produce an output bit stream.
Step 410: set a sign signal for one first special sign value.
Step 412: detect this incoming bit stream and whether have an initial code.When detecting this initial code, execution in step 414; Otherwise, execution in step 418.
Step 414: directly export this incoming bit stream.
Step 416: should indicate that signal set one second special sign value for.
Step 418: directly export this incoming bit stream.
Step 420: should indicate that signal maintained a default value.
Step 422: decipher this incoming bit stream according to this sign signal.
Next, in connection with each step shown in Figure 4 and Fig. 2, each assembly shown in Figure 3 illustrate each assembly between how to operate.In step 404~406, the detecting unit 220 of bit stream pre-process module 120 can receive incoming bit stream BS InAnd detection incoming bit stream BS InWhether has imitative initial code protection coding.Next, minute several situations describe, and in the first situation, when detecting imitative initial code protection coding, remove unit 230 and can remove imitative initial code protection coding to produce output bit stream BS Out, and sign signal generation unit 240 can be with sign signal S FGSet the first special sign value FG1 (step 408~410) for.When not detecting imitative initial code protection coding, detecting unit 220 can continue to detect incoming bit stream BS InWhether has initial code (step 412).In the second situation, when detecting initial code, remove directly output incoming bit stream BS of unit 230 InWith as output bit stream BS Out, and sign signal generation unit 240 can be with sign signal S FGSet the second special sign value FG2 (step 414~416) for.In the third situation, when both not detecting imitative initial code protection coding and also do not detect initial code, remove directly output incoming bit stream BS of unit 230 InWith as output bit stream BS Out, and sign signal generation unit 240 can be with sign signal S FGMaintain a default value (step 418~420).Then, decoding module 140 can receive output bit stream BS OutAnd sign signal S FG(by learning in above-mentioned step 408~410, step 414~416 or step 418~420) is last, and decoding module 140 is again according to sign signal S FGDecipher incoming bit stream BS In(step 422).
The step of above-mentioned flow process only for the present invention for feasible embodiment, and unrestricted restrictive condition of the present invention, and in the situation that without prejudice to spirit of the present invention, the method can also comprise other intermediate steps or several steps can be merged into one step, to do suitable variation.
Please refer to Fig. 5, Fig. 5 is the incoming bit stream BS in the key diagram 1 In, output bit stream BS OutAnd sign signal S FGThe schematic diagram of form of set point.As shown in Figure 5, will be divided into three kinds of situations and describe, in follow-up explanation please in the lump with reference to Fig. 2.In the first situation, incoming bit stream BS InHave imitative initial code protection coding, for example " 00_00_03_00 ", " 00_00_03_01 ", " 00_00_03_02 ", " 00_00_03_03 " remove unit 230 this moment and can will imitate initial code protection coding from incoming bit stream BS InIn remove to produce output bit stream BS Out, for example " 00_00_00 ", " 00_00_01 ", " 00_00_02 ", " 00_00_03 " in addition, indicate that signal generation unit 240 can be with sign signal S FGSet the first special sign value FG1, for example " 00_00_80 " for.In the second situation, incoming bit stream BS InNot not imitative initial code protection coding, but incoming bit stream BS InHave initial code, that is " 00_00_01 ", at this moment, remove directly output incoming bit stream BS of unit 230 InWith as output bit stream BS Out, that is " 00_00_01 ", in addition, sign signal generation unit 240 can be with sign signal S FGSet the second special sign value FG2, for example " 00_00_7f " for.In the third situation, incoming bit stream BS InBoth not imitative initial code protection coding did not have initial code yet, removed directly output incoming bit stream BS of unit 230 this moment InWith as output bit stream BS Out, indicate that in addition signal generation unit 240 can be with sign signal S FGMaintain a default value, for example " 00_00_00 ".
Note that above-described embodiment only is used as example explanation of the present invention, is not restrictive condition of the present invention, and those skilled in the art should understand, under spirit of the present invention, and sign signal S FGThe various variations of set point all be feasible.
Above-described embodiment only is used for technical characterictic of the present invention is described, is not to limit to category of the present invention.As from the foregoing, the invention provides a kind of audio-visual bit stream processing method and relevant apparatus thereof, deciphering before the action, first incoming bit stream is carried out pre-process, whether it has imitative initial code protection coding or whether has initial code by detecting incoming bit stream, produce different output bit streams and set the set point of different sign signals, the action of deciphering according to the set point of different sign signals more afterwards.Thus, not only can reduce significantly the complexity of decoding, and very easily just can remove imitating initial code protection coding, and can pick out easily the different of imitative initial code protection coding and initial code.In addition, by output bit stream BS OutBit length and sign signal S FGSet point, can correctly learn decoded bits pointer DBP 1, in order to follow-up decoding action.
The above only is preferred embodiment of the present invention, and all equalizations of doing according to the present patent application claim change and modify, and all should belong to covering scope of the present invention.

Claims (4)

1. audio-visual bit stream processing method includes:
Receive an incoming bit stream;
Detect this incoming bit stream and whether have an imitative initial code protection coding;
When detecting this imitative initial code protection coding, remove this imitative initial code protection coding and export bit stream to produce one, and set a sign signal for one first special sign value; And
According to this sign signal incoming bit stream of decoding;
The method also comprises:
When not detecting this imitative initial code protection coding, detect this incoming bit stream and whether have an initial code; And
When detecting this initial code, directly export this incoming bit stream, and should indicate that signal set one second special sign value for;
The method also comprises:
When not detecting this initial code, directly export this incoming bit stream, and should indicate that signal maintained a default value.
2. the method for claim 1, it also comprises:
Calculate a bit length of this output bit stream; And
Set a decoded bits pointer according to this bit length and this sign signal.
3. audio-visual bit stream processing unit, it includes:
One bit stream pre-process module includes:
One detecting unit is used for receiving an incoming bit stream and detects this incoming bit stream whether have an imitative initial code protection coding;
One removes the unit, is coupled to this detecting unit, is used for when detecting this imitative initial code protection coding, removes this imitative initial code protection coding to produce an output bit stream; And
One sign signal generation unit is coupled to this detecting unit, is used for setting a sign signal for one first special sign value when detecting this imitative initial code protection coding; And
One decoding module is coupled to this and removes unit and this sign signal generation unit, is used for deciphering this output bit stream according to this sign signal;
Wherein: this detecting unit also is used for:
When not detecting this imitative initial code protection coding, detect this incoming bit stream and whether have an initial code; And
When detecting this initial code, directly export this incoming bit stream; And
This sign signal generation unit also is used for:
When detecting this initial code, should indicate that signal set one second special sign value for;
Wherein this detecting unit also is used for directly exporting this incoming bit stream when not detecting this initial code; And this sign signal generation unit also is used for when not detecting this initial code, should indicate that signal maintained a default value.
4. bit stream processing unit as claimed in claim 3, wherein this decoding module also comprises:
One bit length computing unit is coupled to this and removes the unit, is used for calculating a bit length of this output bit stream;
One sign signal inspection unit is coupled to this sign signal generation unit, is used for checking this sign signal; And
One decoded bits pointer setup unit is coupled to this bit length computing unit and this sign signal inspection unit, is used for setting a decoded bits pointer according to this bit length and this sign signal.
CN 200810085349 2008-03-14 2008-03-14 Audio-visual bit stream processing method and device Active CN101534438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810085349 CN101534438B (en) 2008-03-14 2008-03-14 Audio-visual bit stream processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810085349 CN101534438B (en) 2008-03-14 2008-03-14 Audio-visual bit stream processing method and device

Publications (2)

Publication Number Publication Date
CN101534438A CN101534438A (en) 2009-09-16
CN101534438B true CN101534438B (en) 2013-02-13

Family

ID=41104787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810085349 Active CN101534438B (en) 2008-03-14 2008-03-14 Audio-visual bit stream processing method and device

Country Status (1)

Country Link
CN (1) CN101534438B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050007263A1 (en) * 2003-07-09 2005-01-13 Minhua Zhou Video coding
CN1656821A (en) * 2002-04-19 2005-08-17 微软公司 Methods and systems for preventing start code emulation at locations that include non-byte aligned and/or bit-shifted positions
EP1753244A1 (en) * 2002-01-22 2007-02-14 Microsoft Corporation Methods and systems for start code emulation prevention and data stuffing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1753244A1 (en) * 2002-01-22 2007-02-14 Microsoft Corporation Methods and systems for start code emulation prevention and data stuffing
CN1656821A (en) * 2002-04-19 2005-08-17 微软公司 Methods and systems for preventing start code emulation at locations that include non-byte aligned and/or bit-shifted positions
US20050007263A1 (en) * 2003-07-09 2005-01-13 Minhua Zhou Video coding

Also Published As

Publication number Publication date
CN101534438A (en) 2009-09-16

Similar Documents

Publication Publication Date Title
TWI534701B (en) Audio adjustment system
KR101007420B1 (en) Interface circuit
CN100428798C (en) Digital TV decoding method and system
CN101686360A (en) Interface circuit and video apparatus
US20090228601A1 (en) Method and apparatus for processing audio/video bit-stream
US8098690B2 (en) System and method for transferring high-definition multimedia signals over four twisted-pairs
CN102164261A (en) Content reproduction system, content receiving apparatus, sound reproduction apparatus, content reproduction method
CN101783969A (en) Comprehensive monitoring device of signal quality of digital television
JP6863282B2 (en) Receiver and receiving method
CN103002353A (en) Method and device for packaging multimedia documents
CN105979349A (en) Audio frequency data processing method and device
CN106416283A (en) Reception apparatus, transmission apparatus, and data processing method
US10986070B2 (en) Transmission apparatus, transmission method, reception apparatus, and reception method
CN105516712A (en) Audio and video decoding chip test platform and method
CN101534438B (en) Audio-visual bit stream processing method and device
CN101521781A (en) Method for setting HDMI audio format
CN103620678A (en) Bit stream transmission device, bit stream reception/transmission system, bit stream reception device, bit stream transmission method, bit stream reception method, and bit stream
CN103402069B (en) Electronic equipment and display unit thereof and signal processing apparatus
CN1418406A (en) Method and apparatus for protecting lossless transmission of data stream
CN114697817B (en) Audio data processing system and electronic device
JP6973403B2 (en) Transmitter, transmitter, receiver and receiver
JP6669071B2 (en) Transmitting device, transmitting method, receiving device and receiving method
JP6973402B2 (en) Transmitter, transmitter, receiver and receiver
CN112637673B (en) Decoding method and decoding system of iSP (information processing system) signal
CN100445931C (en) Audiovisual signal transfering-receiving provessing device

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