CN101262614B - A detection method and detection device for mixed code stream - Google Patents
A detection method and detection device for mixed code stream Download PDFInfo
- Publication number
- CN101262614B CN101262614B CN 200810026990 CN200810026990A CN101262614B CN 101262614 B CN101262614 B CN 101262614B CN 200810026990 CN200810026990 CN 200810026990 CN 200810026990 A CN200810026990 A CN 200810026990A CN 101262614 B CN101262614 B CN 101262614B
- Authority
- CN
- China
- Prior art keywords
- sequence
- protocol type
- code stream
- extension header
- level
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
The embodiment of the invention discloses a detection method for detecting a hybrid code stream. The method comprises the steps of obtaining coding information which at least comprises a serial grade and an image grade from the coding serial of the hybrid code stream and determining the coding protocol type of the coding serial according to the obtained coding information. By obtaining and detecting extension information contained in the coding information which at least comprises the serial grade and the image grade, and moving the identification of the code stream protocol from a serial location to the image head of each serial, the embodiment of the invention can more accurately identify the hybrid code stream which comprises an MPEG1 protocol code stream and an MPEG2 protocol code stream without the loss of identifying sensitivity; meanwhile, by detecting a plurality of extension heads, the detection method can re-determine the wrongly determined code stream and deal with mistake code streams caused by various situations. The embodiment of the invention also correspondingly discloses a detection device of the hybrid code stream.
Description
Technical field
The present invention relates to the communications field, relate in particular to a kind of detection method and checkout gear of mixed code stream.
Background technology
At digital video broadcast for cable (Digital Video Broadcasting CABLE, DVB-C) (Moving Pictures Experts Group-1, system layer code stream MPEG-1) is as an optional requirement with the compatible dynamic image of decoder expert group standard 1 in the relevant agreement.Therefore in the practical application, the decoder of digital broadcast television might need the code stream of MPEG compatible 1 video layer, so decoder may get access to by MPEG1 and dynamic image expert group standard 2 (Moving Pictures Experts Group-2, the code stream of MPEG-2) mixing formation when decoding.For elementary stream (Element Stream, ES), if the switching of MPEG1 and MPEG2, just need identify in time, could guarantee that follow-up decoding correctly finishes.Otherwise,, will cause decoding correct image if the MPEG1 code stream is used as the MPEG1 code stream or MPEG1 is used as MPEG2 decodes.Specific to some decoder, may be used as the mistake code stream to the correct code stream of script and handle, thereby cause variety of issues such as frame losing, mosaic.Correspondingly, the agreement that agreement is switched the mechanism detect and also needed to avoid error code, packet loss the to cause erroneous judgement of switching.If because the error code packet loss has produced the erroneous judgement that agreement is switched, above-mentioned code stream with certain agreement so also can occur is used as another agreement and decodes, consequently some can can't parse fully by the code stream that fault-toleranr technique recovers originally, can cause phenomenons such as not right frame losing, mosaic equally.
Fig. 1 and Fig. 2 are respectively the code flow structure schematic diagram of MPEG1, MPEG2.The code flow structure of MPEG2 comprises that (Group of Pictures, GOP) head, image head, image level are expanded first-class for sequence head, sequence-level extension header, image sets.Contrast as seen, the notable difference of two agreements is at sequence layer, in GOP layer and the image layer this which floor, the MPEG1 code stream does not have various extension header, MPEG2 then can have various extension header.Some extension header is necessary for MPEG2, sequence-level extension header for example, and can not have the sequence-level extension header among the MPEG1.Whether existing mixed code stream detection method contains according to coded sequence that the sequence-level extension header detects, and just assert that when detecting sequence-level expansion head this sequence is the MPEG2 agreement in the code stream, otherwise regards as the MPEG1 agreement.
Though above-mentioned detection method can be discerned MPEG1 and MPEG2 sequence, this identification is too simple, only depends on an extension header to judge protocol type, and this can cause erroneous judgement to the code stream of having made mistakes.For example, when having lost the prolate-headed initial code of sequence-level owing to error code in the MPEG2 code stream, so this detection method will be the MPEG1 sequence with current MPEG2 sequence erroneous judgement because of detecting extension header, can decode according to the MPEG1 coding/decoding method when therefore decoding, so just caused the successive image and the decoding confusion of bottom more, the user who receives this signal has been caused very big influence; Also because this too simple recognition methods makes it does not had correction capability by the code stream of false judgment to protocol type.
Summary of the invention
Embodiment of the invention technical problem to be solved is, a kind of detection method and checkout gear of mixed code stream is provided, and can carry out the detection of mixed code stream exactly.For solving the problems of the technologies described above, the embodiment of the invention provides a kind of detection method of mixed code stream, may further comprise the steps:
From the coded sequence of described mixed code stream, obtain the coded message that comprises sequence-level and image level at least; Described mixed code stream comprises MPEG1 agreement code stream and MPEG2 agreement code stream;
Judge the coding protocol type of described coded sequence according to the extension header information of sequence-level in the described coded message of obtaining and image level.
The embodiment of the invention also provides a kind of checkout gear of mixed code stream, comprising:
Acquiring unit, this unit are used for obtaining the coded message that comprises sequence-level and image level at least from the coded sequence of described mixed code stream; Described mixed code stream comprises MPEG1 agreement code stream and MPEG2 agreement code stream;
Judging unit, this unit are used for judging according to the extension header information of the sequence-level of the described coded message of obtaining and image level the coding protocol type of described coded sequence.
The embodiment of the invention is by obtaining and detect the extension header information that comprises in the coded message that comprises sequence-level and image level at least, the identification of code stream agreement is transferred to by sequence location after the image head of each sequence, can under the situation of not losing the identification susceptibility, be discerned the different agreement type in the mixed code stream more accurately.
Description of drawings
Fig. 1 is the code flow structure schematic diagram of MPEG1;
Fig. 2 is the code flow structure schematic diagram of MPEG2;
Fig. 3 realizes the schematic flow sheet of the embodiment that mixed code stream detects for the present invention;
Fig. 4 realizes the schematic flow sheet of another embodiment that mixed code stream detects for the present invention;
Fig. 5 realizes the schematic flow sheet of another embodiment that mixed code stream detects for the present invention;
Fig. 6 realizes the device schematic diagram of the embodiment that mixed code stream detects for the present invention;
Fig. 7 realizes the device schematic diagram of another embodiment that mixed code stream detects for the present invention;
Fig. 8 realizes the device schematic diagram of another embodiment that mixed code stream detects for the present invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below the embodiment of the invention is further described with reference to accompanying drawing.The embodiment of the invention is that example is described with the detection to the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
See also shown in Figure 3ly, Fig. 3 realizes the schematic flow sheet of the embodiment that mixed code stream detects for the present invention.
Step S1 obtains the coded message that comprises sequence-level and image level at least from the coded sequence of described mixed code stream.After obtaining the coded message of image level of sequence-level and this sequence, parse sequence-level and image level coded message, the judgement of protocol type is after solving the coded message of obtaining, before beginning to parse the SLICE head of image.Can have a plurality of image level coded messages in the code stream sequence, the coded message that also can choose sequence-level and greater number image level in the present embodiment detects the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
Step S2 judges the coding protocol type of described coded sequence according to the described coded message of obtaining.If comprise the extension header that at least one can complete decoding in the coded message of having resolved then be judged as the MPEG2 protocol type; Otherwise be judged as the MPEG1 protocol type.Because there are a plurality of extension header usually in the code flow structure of MPEG2 protocol type, and error code takes place in a plurality of extension header simultaneously or the probability lost is much smaller with respect to single extension header, therefore by detecting accuracy rate that a plurality of extension header judge protocol type, can effectively reduce erroneous judgement like this with protocol type than only many accurately by detection sequence-level extension header.
The extension header information that the embodiment of the invention comprises in by the coded message of obtaining and detect sequence-level and image level, the identification of code stream agreement is transferred to after the image head by sequence location, can under the situation of not losing the identification susceptibility, can be discerned the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream more accurately; Simultaneously also can declare misjudged code stream and tackle the wrong code stream that multiple situation causes by a plurality of prolate-headed detections are changeed.
See also shown in Figure 4ly, Fig. 4 realizes the schematic flow sheet of another embodiment that mixed code stream detects for the present invention.
Step S11 obtains the coded message that comprises sequence-level and image level at least from the coded sequence of mixed code stream.Obtain the coded message of the image level of sequence-level and this sequence, parse sequence-level and image level coded message, the judgement of protocol type is after solving the coded message of obtaining, before beginning to parse the SLICE head of image.Can have a plurality of image level coded messages in the code stream sequence, the coded message that also can choose sequence-level and greater number image level in the present embodiment detects the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
Step S12 resolves the coded message of obtaining, and obtains the extension header information of sequence-level and image level.Referring to Fig. 2, Fig. 2 is the code flow structure schematic diagram of MPEG2 protocol type, and it is first-class to be divided into sequence head, sequence-level extension header, GOP head, image head and image level expansion on grammer.Referring to Fig. 1, contrast as seen, the code flow structure of MPEG1 protocol type does not have the various extension header in the code flow structure of MPEG2 protocol type.Some extension header is necessary for the code stream of MPEG2 protocol type, and for example therefore sequence-level extension header and image level extension header can come accurate protocol type to judge according to the prolate-headed situation that exists of sequence-level extension header and image level in the code stream.
Step S13 is according to the coding protocol type of the described coded message judgement coded sequence that obtains.Resolve to the image level information of obtaining from sequence-level, judge protocol type according to prolate-headed situation in the sequential coding information.Referring to shown in Figure 4, if comprise the extension header that at least one can complete decoding in the coded message of having resolved then be judged as the MPEG2 protocol type; Otherwise be judged as the MPEG1 protocol type.Because there are a plurality of extension header usually in the code flow structure of MPEG2 protocol type, and error code takes place in a plurality of extension header simultaneously or the probability lost is much smaller with respect to single extension header, therefore by detecting accuracy rate that a plurality of extension header judge protocol type, can effectively reduce erroneous judgement like this with protocol type than only many accurately by detection sequence-level extension header.
Step S14 utilizes the coding protocol type corresponding decoding method after judging that described coded sequence is decoded.After step S13 finishes judgement to coding protocol,,, utilize the coding/decoding method of MPEG1 protocol type that coded sequence is decoded so if the protocol type judged result is the MPEG1 protocol type according to the judged result of agreement; If the protocol type judged result is the MPEG2 protocol type, utilize the coding/decoding method of MPEG2 protocol type that coded sequence is decoded so.
Step S15, the judgement of coding protocol misinterpretation.Judged on the basis of agreement at this, situation appears in the extension header in can the decoded result of step S14, judge that whether coding protocol is by the interpretation of mistake, the coding protocol misinterpretation occurs if be judged as the coding protocol misinterpretation then warn, this step judges whether conform to decoded result to detect top agreement.In case the caution of coding protocol misinterpretation occurs, can detect coding protocol again once more as required or change and be judged to other agreements.The situation that described judged result and decoded result are not inconsistent comprises:
Protocol type is judged as MPEG1, thereby but parse at least one extension header in the decode procedure and be not inconsistent with judged result, because there is not extension header in the code flow structure of MPEG1 protocol type, say that then mistake appears in the interpretation of this code stream so extension header occurs;
Protocol type is judged as MPEG2, but the extension header that parses in the decode procedure does not comprise sequence-level extension header and image level extension header simultaneously.Because sequence-level extension header and image level extension header are requisite extension header in the code flow structure of MPEG2 protocol type, if therefore requisite extension header the explanation interpretation occurs and mistake occurs when decoding.
See also shown in Figure 5ly, Fig. 5 realizes the schematic flow sheet of another embodiment that mixed code stream detects for the present invention.
Step S111 obtains the coded message that comprises sequence-level and image level at least from the coded sequence of mixed code stream.Obtain the coded message of the image level of sequence-level and this sequence, parse sequence-level and image level coded message, the judgement of protocol type is after solving the coded message of obtaining, before beginning to parse the SLICE head of image.Can have a plurality of image level coded messages in the code stream sequence, the coded message that also can choose sequence-level and greater number image level in the present embodiment detects the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
Step S112 resolves the described coded message of obtaining, the coded sequence initial condition of mixed code stream under obtaining.The coded sequence initial condition of mixed code stream obtained the extension header information that comprises in the coded message simultaneously under the coded message of obtaining by parsing can obtain.The initial condition of described coded sequence is used for judging whether described code stream is that the coding protocol type is judged first.
Step S113 resolves the initial condition information of coded sequence and judges whether described code stream is that the coding protocol type is judged first according to step S112.Because agreement judgement first is different with the initial condition of non-judgement first, after agreement is judged first, initial condition can be made amendment, the initial condition of next time judging of this code stream will change, and this agreement judgement is with regard to right and wrong agreement judgement first so.Be judged as judgement first if judge this, then directly be determined further operation; Judge that if be judged as non-agreement first enter next step decision operation after then the judged result of last time being distinguished, the protocol type judged result of last time can be MPEG1 or MPEG2.
Step S114 is according to the coding protocol type of the described coded message judgement coded sequence that obtains.Judge whether the coding protocol type of the extension header information judgement coded sequence that the S12 of integrating step as a result of coding protocol type judgement first obtains comprising in the coded message according to step S113.
If agreement is judged first, then judge the protocol type of coded sequence according to the coded message of obtaining.Referring to shown in Figure 4, if the coded message of having resolved comprises the extension header that at least one can complete decoding then is judged as the MPEG2 protocol type; Otherwise be judged as the MPEG1 protocol type.Because there are a plurality of extension header usually in the code flow structure of MPEG2 protocol type, and error code takes place in a plurality of extension header simultaneously or the probability lost is much smaller with respect to single extension header, therefore by detecting accuracy rate that a plurality of extension header judge protocol type, can effectively reduce erroneous judgement like this with protocol type than only many accurately by detection sequence-level extension header.
If not the judgement of coding protocol type first, then judge the protocol type of coded sequence according to the coded message of obtaining.
Referring to shown in Figure 5, exist and comprise and sequence-level and at least two extension header of image level then described coded sequence is rejudged protocol type into MPEG2 if coded sequence had been judged as MPEG1 protocol type and described coded message before this is judged; Be judged as the MPEG1 protocol type otherwise keep.
Referring to shown in Figure 5,, then described coded sequence is rejudged protocol type into MPEG1 if described coded sequence had been judged as the MPEG2 protocol type before this is judged and there is not the extension header that can decode in described coded message.Be judged as the MPEG2 protocol type otherwise keep.
Thereby in the time will doing protocol type to the code stream of known protocol and rejudge the conversion that causes agreement, the condition that rejudges need be improved, the harmful effect of avoiding the random conversion of coding protocol type to bring, the condition that rejudges that the embodiment of the invention adopted is a kind of embodiment, can also specify other the condition that rejudges as required according to identical principle.
Step S115 utilizes the coding protocol type corresponding decoding method after judging that described coded sequence is decoded.After step S114 finishes judgement to coding protocol,,, utilize the coding/decoding method of MPEG1 that coded sequence is decoded so if the agreement judged result is MPEG1 according to the judged result of agreement; If the agreement judged result is MPEG2, utilize the coding/decoding method of MPEG2 that coded sequence is decoded so.
Step S116, the judgement of coding protocol misinterpretation.Judged on the basis of agreement at this, situation appears in the extension header in can the decoded result of step S1115, judge that whether coding protocol is by the interpretation of mistake, the coding protocol misinterpretation occurs if be judged as the coding protocol misinterpretation then warn, this step judges whether conform to decoded result to detect top agreement.In case the caution of coding protocol misinterpretation occurs, can detect coding protocol again once more as required or change and be judged to other agreements.The situation that described judged result and decoded result are not inconsistent comprises:
Protocol type is judged as MPEG1, thereby but parse at least one extension header in the decode procedure and be not inconsistent with judged result, because there is not extension header in the code flow structure of MPEG1 protocol type, say that then mistake appears in the interpretation of this code stream so extension header occurs;
Protocol type is judged as MPEG2, but the extension header that parses in the decode procedure does not comprise sequence-level extension header and image level extension header simultaneously.Because sequence-level extension header and image level extension header are requisite extension header in the code flow structure of MPEG2 protocol type, if therefore requisite extension header the explanation interpretation occurs and mistake occurs when decoding.
See also shown in Figure 6ly, Fig. 6 realizes the device schematic diagram of the embodiment that mixed code stream detects for the present invention.
Described checkout gear specifically comprises: acquiring unit 1 and judging unit 2.Wherein, acquiring unit 1, judging unit 2 connect successively.
Acquiring unit 1, this unit are used for obtaining the coded message that comprises sequence-level and image level at least from the coded sequence of mixed code stream.When receiving the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream, this unit extracts the operation that is used for next step with the coded message of sequence-level in this mixed code stream coded sequence and image level.Acquiring unit 1 obtains the coded message of sequence-level and image level in the present embodiment.Can have a plurality of image level coded messages in the code stream sequence, the coded message that also can choose sequence-level and greater number image level in the present embodiment detects the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
See also shown in Figure 7ly, Fig. 7 realizes the device schematic diagram of another embodiment that mixed code stream detects for the present invention.
Described checkout gear specifically comprises: acquiring unit 10, judging unit 20, decoding unit 30 and false judgment unit 40.Wherein, acquiring unit 10, judging unit 20, decoding unit 30 and false judgment unit 40 are connected successively.
Acquiring unit 10, this unit are used for obtaining the coded message that comprises sequence-level and image level at least from the coded sequence of mixed code stream.When receiving the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream, this unit extracts the operation that is used for next step with the coded message of sequence-level in this mixed code stream coded sequence and image level.Acquiring unit 10 obtains the coded message of sequence-level and image level in the present embodiment.Can have a plurality of image level coded messages in the code stream sequence, the coded message that also can choose sequence-level and greater number image level in the present embodiment detects the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
Judging unit 20, this unit are used for the coding protocol type that the sequence-level obtained according to acquiring unit 10 and image level information are judged described coded sequence.Judging unit 20 specifically comprises: first parsing module 21 and the first agreement judge module 22, and first parsing module 21 is connected with the first agreement judge module 22.
First parsing module 21, this module are used to resolve the described coded message of obtaining, and obtain the extension header information of described sequence-level and image level.The extension header information of described sequence-level and image level is used for judging the protocol type of described coded sequence.
The first agreement judge module 22 is used for judging according to the extension header information of described sequence-level and image level the coding protocol type of described coded sequence.If the coded message of having resolved comprises the extension header that at least one can complete decoding then is judged as the MPEG2 protocol type; Otherwise judge that described coded sequence is the MPEG1 protocol type.
Decoding unit 30, this unit are used to utilize the coding protocol type corresponding decoding method after the judgement that described coded sequence is decoded.After judging unit 20 was finished judgement to coding protocol, according to the judged result of agreement, if the protocol type judged result is the MPEG1 protocol type, decoding unit 30 utilized the coding/decoding method of MPEG1 protocol type that coded sequence is decoded so; If the protocol type judged result is the MPEG2 protocol type, decoding unit 30 utilizes the coding/decoding method of MPEG2 protocol type that coded sequence is decoded so.
False judgment unit 40 is used to judge whether the protocol type judged result is consistent with decoded result, if inconsistent then be judged as the coding protocol misinterpretation, and the coding protocol misinterpretation would appear in caution.
After judging unit 20 is finished judgement to coding protocol, situation appears according to the extension header in decoding unit 30 decoded results, judge that whether coding protocol is by the interpretation of mistake, if be judged as the coding protocol misinterpretation then warn and the coding protocol misinterpretation occurs, this unit can detect top agreement and judge whether conform to decoded result, in case the caution of coding protocol misinterpretation occurs, can detect coding protocol again once more as required or change and be judged to other agreements.The situation that described judged result and decoded result are not inconsistent comprises:
Protocol type is judged as MPEG1, thereby but parse at least one extension header in the decode procedure and be not inconsistent with judged result, because there is not extension header in the code flow structure of MPEG1 protocol type, say that then mistake appears in the interpretation of this code stream so extension header occurs;
Protocol type is judged as MPEG2, but the extension header that parses in the decode procedure does not comprise sequence-level extension header and image level extension header simultaneously.Because sequence-level extension header and image level extension header are requisite extension header in the code flow structure of MPEG2 protocol type, if therefore requisite extension header the explanation interpretation occurs and mistake occurs when decoding.
See also shown in Figure 8ly, Fig. 8 realizes the device schematic diagram of another embodiment that mixed code stream detects for the present invention.
Described checkout gear specifically comprises: acquiring unit 100, judging unit 200, decoding unit 300 and false judgment unit 400.Wherein, acquiring unit 100, judging unit 200, decoding unit 300 and false judgment unit 400 are connected successively.
Acquiring unit 100, this unit are used for obtaining the coded message that comprises sequence-level and image level at least from the coded sequence of mixed code stream.When receiving the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream, this unit extracts the operation that is used for next step with the coded message of sequence-level in this mixed code stream coded sequence and image level.Acquiring unit 100 obtains the coded message of sequence-level and image level in the present embodiment.Can have a plurality of image level coded messages in the code stream sequence, the coded message that also can choose sequence-level and greater number image level in the present embodiment detects the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream.
Judging unit 200, this unit are used for the coding protocol type that the sequence-level obtained according to acquiring unit 100 and image level information are judged described coded sequence.Judging unit 200 specifically comprises: second parsing module 201 and the second agreement judge module 203, and second parsing module 201, initial condition judge module 202 and the second agreement judge module 202 are connected.
Initial condition judge module 202 is used for judging according to the initial condition information of described coded sequence whether described mixed code stream is the judgement of coding protocol type first.
The second agreement judge module 203, after being used for when described initial condition judge module judges that described mixed code stream is the judgement of coding protocol type first, if described coded message comprises the extension header that at least one can complete decoding, judge that described coded sequence is the MPEG2 protocol type, otherwise judge that described coded sequence is the MPEG1 protocol type; Or
After when described initial condition judge module judges that described mixed code stream is not the judgement of coding protocol type first, if described coded sequence had been judged as the MPEG1 protocol type before this is judged and the existence of described coded message comprises sequence-level and at least two extension header of image level, described coded sequence is rejudged the protocol type into MPEG2; If or described coded sequence had been judged as the MPEG2 protocol type before this is judged and there is not the extension header that can decode in described coded message, and described coded sequence is rejudged the protocol type into MPEG1.
Decoding unit 300, this unit are used to utilize the coding protocol type corresponding decoding method after the judgement that described coded sequence is decoded.After judging unit 200 was finished judgement to coding protocol, according to the judged result of agreement, if the protocol type judged result is the MPEG1 protocol type, decoding unit 30 utilized the coding/decoding method of MPEG1 protocol type that coded sequence is decoded so; If the protocol type judged result is the MPEG2 protocol type, decoding unit 300 utilizes the coding/decoding method of MPEG2 protocol type that coded sequence is decoded so.
After judging unit 200 is finished judgement to coding protocol, situation appears according to the extension header in decoding unit 300 decoded results, judge that whether coding protocol is by the interpretation of mistake, if be judged as the coding protocol misinterpretation then warn and the coding protocol misinterpretation occurs, this unit can detect top agreement and judge whether conform to decoded result, in case the caution of coding protocol misinterpretation occurs, can detect coding protocol again once more as required or change and be judged to other agreements.The situation that described judged result and decoded result are not inconsistent comprises:
Protocol type is judged as MPEG1, thereby but parse at least one extension header in the decode procedure and be not inconsistent with judged result, because there is not extension header in the code flow structure of MPEG1 protocol type, say that then mistake appears in the interpretation of this code stream so extension header occurs;
Protocol type is judged as MPEG2, but the extension header that parses in the decode procedure does not comprise sequence-level extension header and image level extension header simultaneously.Because sequence-level extension header and image level extension header are requisite extension header in the code flow structure of MPEG2 protocol type, if therefore requisite extension header the explanation interpretation occurs and mistake occurs when decoding.
The embodiment of the invention is not only applicable to the identification of the high agreement of the such similarity of for example MPEG1 and MPEG2, relevant thought can also be used for the identification that other lacks the code stream of tangible protocol version sign.
The embodiment of the invention is by obtaining and detect the extension header information that comprises in the coded message that comprises sequence-level and image level at least, the identification of code stream agreement is transferred to by sequence location after the image head of each sequence, can under the situation of not losing the identification susceptibility, can be discerned the mixed code stream that comprises MPEG1 agreement code stream and MPEG2 agreement code stream more accurately; Simultaneously also can declare misjudged code stream and tackle the wrong code stream that multiple situation causes by a plurality of prolate-headed detections are changeed.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly realize by hardware.Based on such understanding, technical scheme of the present invention can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a station terminal equipment (can be mobile phone, personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
More than cited only be embodiments of the invention, can not limit the present invention's interest field certainly with this, therefore the equivalent variations of doing according to claim of the present invention still belongs to the scope that the present invention is contained.
Claims (13)
1. the detection method of a mixed code stream comprises:
From the coded sequence of described mixed code stream, obtain the coded message that comprises sequence-level and image level at least; Described mixed code stream comprises MPEG1 agreement code stream and MPEG2 agreement code stream;
Judge the coding protocol type of described coded sequence according to the extension header information of sequence-level in the coded message of obtaining and image level.
2. detection method as claimed in claim 1 is characterized in that, the extension header information of sequence-level in the coded message that described basis is obtained and image level judges that the coding protocol type of described coded sequence comprises:
Resolve the described coded message of obtaining, obtain the extension header information of described sequence-level and image level;
Judge the coding protocol type of described coded sequence according to described extension header information.
3. detection method as claimed in claim 1 is characterized in that, the extension header information of sequence-level in the coded message that described basis is obtained and image level judges that the coding protocol type of described coded sequence also comprises:
Resolve the described coded message of obtaining, obtain the initial condition information of the coded sequence of described mixed code stream;
Judge according to the initial condition information of described coded sequence whether described mixed code stream is the judgement of coding protocol type first.
4. detection method as claimed in claim 3 is characterized in that, if the judgement of coding protocol type first, the coded message that then described basis is obtained judges that the coding protocol type of described coded sequence comprises:
If described coded message comprises the extension header that at least one can complete decoding, judge that then described coded sequence is the MPEG2 protocol type; Otherwise judge that described coded sequence is the MPEG1 protocol type.
5. detection method as claimed in claim 3 is characterized in that, if not the judgement of coding protocol type first, the coded message that then described basis is obtained judges that the coding protocol type of described coded sequence comprises:
If described coded sequence had been judged as MPEG1 protocol type and described coded message and has existed and comprise and sequence-level and at least two extension header of image level then described coded sequence is rejudged the protocol type into MPEG2 before this is judged; Or
If described coded sequence had been judged as the MPEG2 protocol type before this is judged and there is not the extension header that can decode in described coded message, then described coded sequence is rejudged protocol type into MPEG1.
6. detection method as claimed in claim 1 is characterized in that, described extension header information according to sequence-level in the described coded message of obtaining and image level also comprises after judging the coding protocol type of described coded sequence:
When the situation that this judged result and decoded result be not inconsistent occurring, then be judged as the coding protocol misinterpretation, and the coding protocol misinterpretation appears in caution.
7. detection method as claimed in claim 6 is characterized in that, described being judged as also comprises before the coding protocol misinterpretation:
Utilize the coding protocol type corresponding decoding method after judging that described coded sequence is decoded.
8. detection method as claimed in claim 6 is characterized in that, the situation that described judged result and decoded result are not inconsistent comprises:
The coding protocol type is judged as MPEG1, but parses at least one extension header in the decode procedure; Or
The coding protocol type is judged as MPEG2, but the extension header that parses in the decode procedure does not comprise sequence-level extension header and image level extension header simultaneously.
9. the checkout gear of a mixed code stream is characterized in that, comprising:
Acquiring unit is used for obtaining the coded message that comprises sequence-level and image level at least from the coded sequence of described mixed code stream; Described mixed code stream comprises MPEG1 agreement code stream and MPEG2 agreement code stream;
Judging unit is used for judging according to the extension header information of the sequence-level of the coded message obtained and image level the coding protocol type of described coded sequence.
10. checkout gear as claimed in claim 9 is characterized in that, described judging unit further comprises:
First parsing module is used to resolve the described coded message of obtaining, and obtains the extension header information of described sequence-level and image level;
The first agreement judge module is used for judging according to the extension header information of described sequence-level and image level the coding protocol type of described coded sequence.
11. checkout gear as claimed in claim 9 is characterized in that, described judging unit comprises:
Second parsing module is used to resolve the described coded message of obtaining, and obtains the initial condition information of the coded sequence of described mixed code stream;
The initial condition judge module is used for judging according to the initial condition information of described coded sequence whether described mixed code stream is the judgement of coding protocol type first.
12. checkout gear as claimed in claim 11 is characterized in that, described judging unit also comprises:
The second agreement judge module, after being used for when described initial condition judge module judges that described mixed code stream is the judgement of coding protocol type first, if described coded message comprises the extension header that at least one can complete decoding, judge that described coded sequence is the MPEG2 protocol type, otherwise judge that described coded sequence is the MPEG1 protocol type; Or
After when described initial condition judge module judges that described mixed code stream is not the judgement of coding protocol type first, if described coded sequence had been judged as the MPEG1 protocol type before this is judged and the existence of described coded message comprises sequence-level and at least two extension header of image level, described coded sequence is rejudged the protocol type into MPEG2; If or described coded sequence had been judged as the MPEG2 protocol type before this is judged and there is not the extension header that can decode in described coded message, and described coded sequence is rejudged the protocol type into MPEG1.
13. require 9 checkout gear as claim, it is characterized in that, also comprise:
Decoding unit is used to utilize the coding protocol type corresponding decoding method after the judgement that described coded sequence is decoded;
The false judgment unit is used to judge whether the protocol type judged result conforms to decoded result, if do not conform to then be judged as the coding protocol misinterpretation, and the coding protocol misinterpretation appears in caution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200810026990 CN101262614B (en) | 2008-03-25 | 2008-03-25 | A detection method and detection device for mixed code stream |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200810026990 CN101262614B (en) | 2008-03-25 | 2008-03-25 | A detection method and detection device for mixed code stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101262614A CN101262614A (en) | 2008-09-10 |
CN101262614B true CN101262614B (en) | 2011-04-13 |
Family
ID=39962773
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200810026990 Expired - Fee Related CN101262614B (en) | 2008-03-25 | 2008-03-25 | A detection method and detection device for mixed code stream |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101262614B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106961608B (en) * | 2017-04-07 | 2019-05-28 | 山东师范大学 | High definition decoder digital shows mixed format code stream adaptive processing system and method |
-
2008
- 2008-03-25 CN CN 200810026990 patent/CN101262614B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101262614A (en) | 2008-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102067231B1 (en) | Network device and error handling | |
CN1722804A (en) | Data structure and signaling method for emergency alert message and digital TV receiver | |
CN109561300B (en) | Service quality detection method and device | |
CN101296441B (en) | Method and device for scanning two-dimension bar code and transmitting message | |
US7965777B2 (en) | Data transmission system, and its transmission side apparatus and reception side apparatus | |
US7653136B2 (en) | Decoding method and decoding apparatus | |
US7134064B2 (en) | Error detecting method and apparatus | |
US8718131B2 (en) | Method and apparatus for generating and processing packet in MPEG-2 transport stream | |
CN101262614B (en) | A detection method and detection device for mixed code stream | |
CN101242538A (en) | A code stream decoding method and device | |
CN112672154A (en) | Live video playing method and device, server and computer readable storage medium | |
JP4731343B2 (en) | Decoding device | |
CN101198052B (en) | Video encoding method, decoding method and device | |
CN103873806A (en) | Monitoring image relevant information transmission method, system and device | |
US7165207B2 (en) | Robust signal coding | |
CN106851265A (en) | Multi-tuner Set Top Box produces detection method and system | |
CN101742210B (en) | Method, system and device for transmitting related information of monitoring image | |
CN112055174B (en) | Video transmission method and device and computer readable storage medium | |
CN100521783C (en) | Method for management of auxiliary programs and corresponding receiver and system | |
CN101578873B (en) | Method and apparatus for decoding multi-view coded video | |
CN101296166A (en) | Method for measuring multimedia data based on index | |
CN112104872A (en) | Image transmission method and device | |
US6928124B2 (en) | Method and system for fast synchronization multiframe structures using periodic signatures | |
RU2454809C1 (en) | Method and device to analyse data | |
CN100534200C (en) | Error detecting device and method for video frequency decoder |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110413 Termination date: 20180325 |