JP2004328353A - Correction method and apparatus for inverted stream packet - Google Patents

Correction method and apparatus for inverted stream packet Download PDF

Info

Publication number
JP2004328353A
JP2004328353A JP2003119822A JP2003119822A JP2004328353A JP 2004328353 A JP2004328353 A JP 2004328353A JP 2003119822 A JP2003119822 A JP 2003119822A JP 2003119822 A JP2003119822 A JP 2003119822A JP 2004328353 A JP2004328353 A JP 2004328353A
Authority
JP
Japan
Prior art keywords
packet
stream
order
sequence number
received
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.)
Withdrawn
Application number
JP2003119822A
Other languages
Japanese (ja)
Inventor
Toshiyuki Asano
俊幸 浅野
Seiji Matsuo
誠二 松尾
Mari Kawahara
麻里 川原
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003119822A priority Critical patent/JP2004328353A/en
Publication of JP2004328353A publication Critical patent/JP2004328353A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video or multiplex stream to a specific local network, e.g. a IEEE 1394 or Bluetooth® network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2381Adapting the multiplex stream to a specific network, e.g. an Internet Protocol [IP] network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2404Monitoring of server processing errors or hardware failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving MPEG packets from an IP network
    • H04N21/4381Recovering the multiplex stream from a specific network, e.g. recovering MPEG packets from ATM cells
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP

Abstract

<P>PROBLEM TO BE SOLVED: To provide a correction method and an apparatus for inverted stream packets for preventing a deterioration in quality such as disturbance of an image even when the received packets are decoded. <P>SOLUTION: A system which passes MPEG stream packets over an IP network and performs image distribution in real time, includes a packet receiving part 10 which receives the MPEG stream packets, an RTP header information extraction part 11 which extracts RTP headers from the received packets, a sequence number extraction part 12 which further extracts sequence numbers of the packets from the extracted RTP headers and a packet order correction part 13 which corrects an order of the packets based on the sequence numbers extracted from the sequence number extraction part 12. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は逆転ストリームパケットの補正方法及び装置に関する。マルチメディア時代を迎え、通信回線網等のインフラの拡充が進んでいる。しかしながら、画像データの情報量は大きいため、そのままのデータを転送しようとすると、依然として通信時間が長くなったり、通信回線の負荷が増大するといったことが問題となる。このような問題を解決する技術として、JPEG(Joint Photographic Coding Experts Group)やMPEG(Moving Picture Coding Experts Group)方式の画像圧縮技術が用いられる。このうち、MPEG方式は、主として動画像(ビデオデータ)の圧縮に用いられる他、音声データを圧縮し、ビデオデータに多重化することもできる。
【0002】
【従来の技術】
前述した画像圧縮技術として用いられるMPEG方式には、MPEG1,MPEG2,MPEG4といったものがある。従来のこの種の技術としては、MPEGパケットのPESプライベートデータ領域に、当初のMPEGデータストリームにおけるパケットグループの並びと、生成したMPEGデータパケット列におけるパケットグループの並びとの対応関係を記述した順序テーブルを設け、これにより、当初のパケットグループの順序を把握し、パケットグループの順序を任意に変更することができるようにしたシステムが知られている(例えば特許文献1参照)。
【0003】
図7は従来のデータ転送システムの概念図である。図において、1はカメラ、2は該カメラ1で撮影したNTSC信号を受けて変調を行なうエンコーダである。この例では、カメラ1としてカメラ1〜カメラ3までの3台、エンコーダ2としてエンコーダ1〜エンコーダ3までの3台を示している。3はエンコーダ2の出力信号が転送されるネットワークである。これらエンコーダ2の出力は、MPEGデータとなり、MPEGストリームパケット配信となる。
【0004】
4はネットワーク3と接続され、エンコーダ2の出力信号であるMPEGデータを受信して元のNTSC信号に戻すデコーダである。5はデコーダ4と接続され、NTSC画像を表示するモニタである。図に示す例では、デコーダがデコーダ1,デコーダ2の2台、モニタ5がモニタ1,モニタ2の2台設けられた例を示している。6はネットワーク3と接続される管理サーバ、7は同じくネットワーク3と接続されるパソコン(PC)である。このように構成されたシステムの概要を説明すれば、以下の通りである。
【0005】
この図に示すシステムは、IPネットワーク上にMPEGストリームパケットを流し、リアルタイムに画像配信を行なうシステムを示している。図中のエンコーダ1〜3は、それぞれNTSC映像/音声入力及びIPインタフェースを持ち、カメラ1から入力されたNTSC映像/音声データをMPEGストリームにエンコードし、MPEGストリームパケットをIPネットワーク上に配信する機能を持つ。
【0006】
また、図中のデコーダ1,デコーダ2は、それぞれNTSC映像/音声出力及びIPネットワークインタフェースを持ち、ライブ受信したMPEGストリームパケットをNTSC映像/音声データにデコードし、モニタ5に出力する機能を持つ。
【0007】
このようなシステムにより、マルチキャスト或いはユニキャストにてIPネットワーク上の多数のモニタに同時に配信できる。更に、これらの装置は、管理サーバ6及びパソコン(PC)7により一括設定することができる。例えば、エンコーダ1からの映像/音声をデコーダ1で受信してモニタ1に表示していたものを管理サーバ6又はパソコン7によりデコーダ2で受信してモニタ2に表示するように切替設定することができる。
【0008】
エンコーダ、デコーダの装置構成を以下に示す。図8はエンコーダ2の内部構成例を示す図である。図において、2aは例えばカメラからのNTSCデータを受けてエンコードするエンコーダ部であり、NTSCデータをMPEGデータに変換する。2bはエンコーダ部2aの出力であるMPEGデータを送信する送信部である。該送信部2bからMPEGストリームパケット配信が行なわれる。
【0009】
図9はデコーダ4の内部構成例を示す図である。図において、4aは例えばエンコーダ2からのMPEGストリームパケットを受信する受信部である。4bは該受信部4aの出力であるMPEGデータを、デコードしてNTSCデータに変換するデコーダ部である。該デコーダ部4bの出力は、例えばモニタに接続され、画像表示が行なわれる。
【0010】
図10はMPEGストリームパケットの構成例を示す図である。MPEGストリームパケットの構成例を示す図である。MPEGストリームパケットは、大きく分けてRTPヘッダとペイロード部の2つから構成されている。RTPヘッダは、エンコーダがMPEGストリームパケットをIPネットワークに配信する際に送信部で付加され、そのヘッダ内には、パケットの配信順序を示すシーケンス番号が格納されている。
【0011】
パケットは1行あたり0ビットから31ビットまでの32ビットで構成され、0〜65535の範囲でサイクリックに採番されている。この番号により、デコーダ側は受信パケットやストリーム切り替えの発生を認識している。
【0012】
RTPヘッダにおいて、Vはバージョン、Pはパディング、Xはエクステンション、CCはCSRCカウント、MはRAPのフラグを示すマーカ、PTはペイロードタイプ、シーケンス番号はパケットの連続番号を示す。タイムスタンプは時刻情報である。
【0013】
ペイロード部において、MPEG圧縮モードは、圧縮のモード(例えばMPEG1かMPEG2か等)を示し、時刻はRAPフラグが立った時に表示される。その後にはMPEG実データが入る。
【0014】
エンコーダからネットワークに配信されたMPEGストリームパケットをデコーダの受信部にて受信した時の受信フローチャートを図11に示す。ストリームパケットを受信すると(S1)、パケット受信数をカウントする(S2)。次に、RTPヘッダ情報をチェックする(S3)。そして、ストリームサイズをチェックする(S4)。
【0015】
次に、受信パケットがおかしくないかどうかチェックする(S5)。ここで、受信パケットがおかしいとは、例えば受信パケットデータが壊れていることをいう。受信パケットがおかしい場合には、その受信ストリームを破棄し(S6)、ステップS1に戻り、パケット受信ステップからやりなおす。受信パケットがおかしくない場合には、パケット抜けをチェックし(S7)、受信ストリームをデコード要求する(S8)。そして、次のパケット受信処理に入る。
【0016】
以上の説明より明らかなように、受信部にて受信されたMPEGストリームパケットは、受信部内において初めにRTPヘッダ内の情報のチェックが行なわれ、その後にシーケンス番号のチェックが行なわれる。従来の技術では、パケット逆転が発生していたとしても、パケットの受信順に従って、デコーダ部にデコード要求を行なっている。
【0017】
【特許文献1】
特開平10−312648号公報(第6頁、図1)
【0018】
【発明が解決しようとする課題】
前述したように、MPEGストリームを逆転して受信した場合、従来のパケット受信処理では、エンコーダが送信した順序とは異なった順序でデコード要求がなされる。そのため、データが抜けていないにもかかわらず画像が乱れてしまい、品質の低下が課題とされている。特に、MPEG4に関しては、データサイズが小さく、パケットが逆転する頻度が高くなるため、MPEG1やMPEG2に比べると更に画像が乱れてしまうという問題があった。
【0019】
本発明はこのような課題に鑑みてなされたものであって、受信したパケットのデコードを行なった場合でも画像の乱れ等の品質の低下を防止することができる逆転ストリームパケットの補正方法及び装置を提供することを目的としている。
【0020】
【課題を解決するための手段】
(1)請求項1記載の発明は、以下の通りである。図1は本発明方法の原理を示すフローチャートである。本発明は、IPネットワークを介して受信したMPEGストリームパケットを流し、リアルタイムに画像配信を行なうシステムにおいて、IPネットワークを介して受信したMPEGストリームパケットからRTPヘッダ情報を取り出し(ステップ1)、次に、RTPヘッダ内のパケット送信順序を示すシーケンス番号情報を取り出し(ステップ2)、取り出したシーケンス番号を元にパケットの受信順序の誤りを識別し、パケット送信順序に従って処理を行なう(ステップ3)ようにしたことを特徴とする。
【0021】
このように構成すれば、シーケンス番号を元に、受信したパケットデータをデコードする時に、パケット着信順ではなく、シーケンス番号順にデコードするようにしているため、デコードされた画像に乱れがなく、品質の低下を防止することができる。
(2)請求項2記載の発明は、以下の通りである。図2は本発明の原理ブロック図である。図に示す装置は、IPネットワーク上にMPEGストリームパケットを流し、リアルタイムに画像配信を行なうシステムのデコード部分を示している。図において、10はMPEGストリームパケットを受信するパケット受信部、11は受信したパケットからRTPヘッダを抽出するRTPヘッダ情報抽出部、12は抽出したRTPヘッダから更にパケットのシーケンス番号を抽出するシーケンス番号抽出部、13は該シーケンス番号抽出部12から抽出されたシーケンス番号を元にパケットの順序を補正するパケット順序補正部である。
【0022】
このように構成すれば、パケット受信時のパケット着信順序がパケット送信時と比較して狂っていても、パケット順序補正部13がパケット送信順に従ってデコード処理を行なうようにすることで、デコードされた画像に乱れがなく、品質の低下を防止することができる。
(3)請求項3記載の発明は、前記パケット順序補正部13は、パケット逆転が発生した場合には、それをどの程度まで保証するかの閾値として保証数範囲を設け、最後にデコード要求を行なったストリームのシーケンス番号から閾値までを範囲とすることを特徴とする。
【0023】
このように構成すれば、パケット逆転を補正するための保証数範囲を予め設定しておき、保証数範囲内に到着したパケットについては、パケット順序を補正するようにしているので、デコードされた画像に乱れがなく、好ましい画像が得られる。
(4)請求項4記載の発明は、前記パケット順序補正部は、逆転しているパケットをどの程度まで保持させるかの閾値として最大保持数を設け、その値は請求項3記載の保証数範囲と同じとすることを特徴とする。
【0024】
このように構成すれば、最大保持数以内のパケットであれば、逆転を補正してデコードされた画像の品質の低下を防止することができる。
(5)請求項5記載の発明は、保持したストリームや、最後にデコード要求を行なったストリーム情報を管理するため、ストリーム管理テーブルを設け、ストリームの一括管理を行なうようにしたことを特徴とする。
【0025】
このように構成すれば、ストリームの一括管理を行なうことでパケット順序の補正処理を行ない、画像品質を維持することができる。
【0026】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態例を詳細に説明する。
【0027】
図3は本発明方法の動作の一例を示すフローチャートである。図に示すフローチャートは、図11の従来方法と対応している。図11の方法と比較すると、図11のステップS7,S8が、本発明ではS7’となっている。S7’は、本発明に係るパケット逆転補正処理である。
【0028】
先ず、全体の動作について説明する。ストリームパケットを受信すると(S1)、パケット受信数をカウントする(S2)。次に、RTPヘッダ情報をチェックする(S3)。そして、ストリームサイズをチェックする(S4)。次に、受信パケットがおかしくないかどうかチェックする(S5)。ここで、受信パケットがおかしいとは、例えば受信パケットデータが壊れていることをいう。受信パケットがおかしい場合には、その受信ストリームを破棄し(S6)、ステップS1に戻り、パケット受信ステップからやりなおす。受信パケットがおかしくない場合には、パケットに逆転が発生していた場合には、パケット逆転補正処理を行ない(S7’)、次のパケット受信処理に入る。
【0029】
パケット逆転が発生した場合には、それをどの程度まで保証するかの閾値として保証数範囲を設け、最後にデコード要求を行なったストリームのシーケンス番号から閾値までを保証する範囲とする。また、本来の順序とは違って受信したパケットは、期待するパケットを受信するまで保持していなければならない。そのため、パケットをどの程度まで保持させるかの閾値として最大保持数を設け、その値は保証数範囲と同じ値とする。
【0030】
更に、保持したストリームや最後にデコード要求を行なったストリーム情報を管理するため、ストリーム管理テーブルを設け、ストリームの一括管理を行なうようにする。
【0031】
図4はストリーム管理テーブルの一例を示す図である。ストリーム管理テーブルは、パケットの逆転を補正するために、必要な情報を全て格納しておくテーブルである。このストリーム管理テーブルは、図2のパケット順序補正部13内に設けられる。ストリーム管理テーブルには、図に示すように、大きく分けて3つの情報が格納されている。1つ目は、最後にデコード要求を行なったストリームの情報で、シーケンス番号とMPEG実データが格納されているバッファ上の先頭アドレス情報が管理されている。シーケンス番号は、受信したパケットと最後にデコード要求を行なったストリームとのシーケンス飛びをチェックするために必要とされる情報である。MPEG実データの先頭アドレスは、受信したストリームが格納されているバッファの管理のためのものである。
【0032】
2つ目は、現在受信したストリームの情報で、シーケンス番号、RTPヘッダ先頭アドレス、MPEG実データ先頭アドレスとそのサイズ、MPEG形式、MPEGモード番号、装置種別である。RAPフラグは、受信したMPEGストリームパケットがRAPであるかどうかを示すフラグである。ここで、RAPとは基準画像のことである。
【0033】
シーケンス番号は、前述したように、最後にデコード要求を行なったストリームとのシーケンス番号チェックに用いられる。その他の情報については、デコード要求時に必要とされる情報であり、これらの情報をデコーダ部に渡すことで、デコード要求を行なう。
【0034】
3つ目は、パケット逆転が発生した際に保持するストリームの情報で、最大保持数分の領域が用意されている。保持ストリームフラグ以外は、2つ目で示した内容と同一の内容である。保持ストリームフラグは、格納されている保持ストリーム情報の有効、無効を識別するためのフラグである。例えば、このフラグが立ている場合には、その情報は、現在発生しているパケット逆転の保証数範囲内のストリーム情報が格納されていることを示している。
【0035】
また、そのストリームがデコード要求、破棄及び初期化された場合は、フラグは下げられる。このフラグにより、その情報が正しいかどうかを明確に確認することができ、保持ストリームを検索する際の無駄がなくなる。
【0036】
このストリーム管理テーブルは、デコード要求開始時、停止時及びネットワーク断発生時には、パケットの連続性が失われる可能性があるため、初期化が行なわれる。このようなストリーム管理テーブルを用いれば、ストリームの一括管理を行なうことでパケット順序の補正処理を行ない、画像品質を維持することができる。
【0037】
このように、本発明によれば、パケット逆転を補正するための保証数範囲を予め設定しておき、保証数範囲内に到着したパケットについては、パケット順序を補正するようにしているので、デコードされた画像に乱れがなく、好ましい画像が得られる。また、逆転しているパケットをどの程度まで保持させるかの閾値として最大保持数を設け、その値は前記保証数範囲と同じとすることにより、逆転を補正してデコードされた画像の品質の低下を防止することができる。
【0038】
図5はパケット逆転補正処理の一例を示すフローチャートである。動作の主体は、図2のパケット順序補正部13である。補正には、既存のシーケンス番号を利用してエンコーダがIPネットワーク上に送信したパケットの順序を識別し、パケットのデコード順序の補正を行なうものである。
【0039】
先ず、初めに受信ストリームのシーケンス番号のチェックが行なわれる(S1)。このチェックでは、図4に示したストリーム管理テーブルの情報から最後にデコーダ要求を行なったストリームのシーケンス番号と比較し、シーケンス飛びが発生したかどうかを識別し、発生していればシーケンス飛びフラグを立てる。
【0040】
次に、受信したストリームが受信開始から初めてのストリームパケットであるかチェックを行なう(S2)。初めてのストリームパケットである場合には、パケット逆転発生はあり得ないため、即デコーダ部に対してデコード要求を行なう(S9)。初めてではない場合(受信開始から2番目以降のストリーム)には、次の処理に入る。
【0041】
次に、受信ストリームがデコード要求を行なったストリームより番号が小さいかどうかチェックする(S3)。最後にデコード要求を行なったストリームより番号が小さい場合には、不要なパケットであるので、ストリーム管理テーブルより最後にデコード要求を行なったストリームのシーケンス番号を取得し、それ以前の受信ストリームパケットを破棄する(S10)。
【0042】
次に、受信ストリームが保証数範囲の場合について説明する。受信ストリームがシーケンス飛びの保証数範囲内であるかどうかチェックする(S4)。保証数範囲内の場合には、はじめにシーケンス飛びが発生しているか否かで処理が変わる。シーケンス飛びは、初めに行なったシーケンス飛びチェックで行なっており、フラグの内容により判断する(S5)。
【0043】
シーケンス飛びが発生しておれば、受信ストリームをデコード保持する(S11)。この場合において、ストリーム管理テーブルの保持ストリームフラグにて格納場所の空きを検索し、その情報を保持しておく。この処理により、後で保持ストリームをデコード要求する場合に、ストリーム管理テーブルより情報を取り出すことが可能となる。
【0044】
シーケンス飛びが発生していない場合には、受信したストリームが連続していることになるので、受信ストリームをデコード要求する(S6)。この時、ストリーム管理テーブルの保持しているストリームの中に次のストリームがあるかどうかチェックし(S7)、受信したストリームの次のストリームがあれば、保持ストリームをデコード要求を行なう(S8)。その後、受信待ち状態となる。
【0045】
次に、受信ストリームが保証数範囲外の場合の処理について説明する。保証数範囲外の場合には、初めに受信したストリームの一つ前のシーケンス番号のストリームがあるか否かをストリーム管理テーブル内を検索し(S13)、あればフラグを立て(S12)、更にもう一つ前のストリームがあるか検索する。この処理を繰り返すことにより、ストリーム管理テーブル内の連続している保持ストリーム全てに対してデコード要求を行ない、その後に現在受信したストリームのデコード要求を行なう。最後に、受信したストリームが保証数範囲を超えてしまったので、一度ストリーム管理テーブルの初期化を行なう。その後、受信待ち状態となる。
【0046】
具体的には、保持ストリーム中に前のストリームがない場合、ループを通ったかどうかチェックし(S14)、通った場合には、シーケンス番号が連続しているストリームのみ保持ストリームをデコード要求する(S15)。次に、受信ストリームをデコード要求し(S16)、残っているストリームを破棄し(S17)、ステップS1に戻る。
【0047】
ステップS14において、ループを通っていない場合には、受信ストリームをデコード要求し(S18)、保持ストリームを全て破棄し(S19)、ステップS1に戻る。
【0048】
このように構成すれば、パケット受信時のパケット着信順序がパケット送信時と比較して狂っていても、パケット順序補正部13がパケット送信順序に従ってデコード処理を行なうようにすることで、デコードされた画像に乱れがなく、品質の低下を防止することができる。
【0049】
次に、図5,図6を用いて、いくつかのパケット逆転補正処理の例を示す。図6はパケット受信例を示す図である。図6のパケットの受信順序は、左から右の順に受信するものとし、図中の矢印は、パケットが逆転したことを示し、番号はシーケンス番号を示す。また、網掛けしたパケットは、抜けたパケットを受信したことを示す。ここでは、保証数範囲及び最大保持数は10の場合を例にとる。
(デコード要求を行なったストリームよりも以前のパケットを受信した場合)
図6の(a)に示すように、デコード要求を行なったストリームよりも以前のパケットを受信した場合(パケット番号5がパケット番号33の後に来た場合)、図5の逆転補正処理フローチャートに従って処理を行なうと、シーケンス番号1(以下番号のみとする)のストリームは、S1のシーケンスチェックを受け、受信開始から初めてのストリームなので、S2の分岐でS9の処理に移り、デコード要求される。この処理を初期動作とする。
【0050】
デコード要求を行なう際は、ストリーム管理テーブルのデコード要求情報が更新され、以下、更新処理はデコード要求時毎に行なわれる。2のパケットは、S1,S2,S3,S4,S5,S6,S7の処理の順に行なわれる。この処理順序を通常動作とする。その後、33までのパケットは、2のパケットと同様に通常処理を行なう。
【0051】
次に、5のパケットが来た場合、S1,S2の処理を受け、S3の分岐により最後にデコード要求を行なったストリーム33よりも番号が小さいため、S10の処理が行なわれ、当該パケットは破棄される。34以降の処理は2と同様の処理順となる。
(保証数範囲を超えたストリームを受信した場合)
図6の(b)に示すような保証数範囲を超えたパケットを受信した場合、図5のパケット逆転補正処理フローチャートに従って処理を行なうと、1のパケットは受信開始から初めてのストリームなので初期動作を行なう。2から13までのパケットについては通常動作が行なわれる。
【0052】
22のパケットは、S1,S2,S3の順に処理が行なわれる。この場合、S4の分岐により保証数範囲内であるかどうかのチェックが行なわれる。ストリーム13と22間の差異は“9”であり、保証数範囲内なのでS5の処理に移る。S5の処理において、最後にデコード要求を行なったストリーム13からシーケンス飛びが発生しているので、S11の処理により、ストリーム管理テーブル上に保持ストリームとして情報が格納され、23,24のパケットについても22と同様の処理順でストリーム管理テーブルにその情報が格納される。
【0053】
その後、ストリーム25を受信すると、S1,S2,S3の処理が行なわれ、S4の処理において保証数範囲外なので、S13の処理に移る。S13の処理では、ストリーム管理テーブル内を受信ストリーム25より一つ前のストリーム、即ち24のストリームを検索する。ここで、先に保持した24のストリームが存在するので、S12の処理によりループチェックフラグが立てられ、更にS13の処理が繰り返され、次は24の一つ前のストリームである23を検索する。
【0054】
同様に、この処理を繰り返し、22を見つけるまで検索を続けるが、22の一つ前のストリームは保持されていないため、S14の処理に移る。S14の処理において、ループチェックフラグにより、ループを通ったかが識別されるので、S15の処理に移り、22,23,24のストリームをデコード要求する。
【0055】
その後、S16の処理により現在受信したストリーム25のデコード要求を行ない、最後にS17の処理により、残っている保持ストリームを、保持ストリームフラグを下げることにより、無効とする。その後、26のパケット以降は通常動作を行なう。
(パケット逆転が1回発生した場合)
図6の(c)に示すように、逆転が1回発生した場合(ストリーム11)、図5のパケット逆転補正処理フローチャートに従って処理を行なうと、1のパケットは受信開始から初めてのストリームなので、初期動作を行なう。2から10までのパケットは通常動作が行なわれ、12,13のパケットは、S1,S2,S3の順に処理が行なわれる。
【0056】
そして、S4の処理において保証数範囲内なので、S5の処理に移る。S5の処理において、最後にデコード要求を行なったストリーム10からシーケンス飛びが発生しているので、S11の処理により、ストリーム管理テーブル上に保持ストリームとして情報が格納される。
【0057】
期待している11のパケットを受信すると、S1〜S4の順に処理が行なわれる。S5の処理において、最後にデコード要求を行なったストリーム10と現在受信した11とはシーケンス飛びが発生していないので、S6の処理が行なわれ、11がデコード要求される。
【0058】
次に、S7の処理に移り、S7の処理において現在受信した11の次のパケット、即ち12がないかストリーム管理テーブル内の検索を行なう。ここで、先に保持しておいたストリーム12が存在するので、S8の処理により12のストリームがデコード要求され、更にS7の処理が繰り返される。
【0059】
そして、12の次の番号である13を探す。13も12と同様にストリーム管理テーブル内に情報が保持されているので、S8の処理に移り、デコード要求される。更に、S7の処理が繰り返されるが、13の次の番号14は存在しないので、終了となる。その後、14以降の処理は通常動作をする。
(パケット逆転が3回発生し、その受信順が複雑な場合)
図6の(d)に示すようにシーケンス飛びが発生し、更に期待するパケットを受信する前に2回のシーケンス飛びが発生している。その後、期待するパケットの受信順序が複雑な場合、図5のパケット逆転補正処理フローチャートに従って処理を行なう。
【0060】
1のパケットは、受信開始から初めてのストリームなので、初期動作を行なう。2〜10までのパケットは通常動作が行なわれ、12,13,15,17の順にパケットを受信する。これらのパケットは、S1,S2,S3,S4,S5,S11の順で処理され、ストリーム管理テーブルにてその情報を管理される。
【0061】
次に、逆転したパケット14を受信するが、S1〜S5の順に処理され、最後にデコード要求を行なったストリーム10とは、シーケンス飛びが発生しているので、12,13,15,17と同様にストリーム管理テーブルにてその情報を保持される。更に18,16,19も14と同様に処理される。
【0062】
次に、11を受信すると、S1〜S4の順序で処理され、S5の処理において、最後にデコード要求を行なった10とはシーケンス飛びが発生していないため、S6の処理に移りデコード要求される。そして、S7の処理に移る。
【0063】
S7の処理では、11の次のストリーム12を検索する。12のストリームは、ストリーム管理テーブルでその情報を保持しているため、S8の処理に移り、12のストリームがデコード要求される。その後、S7,S8の処理が繰り返され、残っている保持しているストリーム13から19がデコード要求される。その後、20以降のパケットは通常動作を行なう。
【0064】
以上、説明したように、本発明によれば、IPネットワークより受信したパケットに逆転が発生しても、その補正が可能になる。この補正効果により、パケット逆転が発生した際の画像の乱れを軽減でき、特にMPEG4のようなパケット逆転発生頻度が高いストリームの場合に対して効果的であり、課題となっている品質の低下も避けられる。
【0065】
【発明の効果】
本発明によれば、以下のような効果が得られる。
(1)請求項1記載の発明によれば、シーケンス番号を元に、受信したパケットデータをデコードする時に、パケット着信順ではなく、シーケンス番号順にデコードするようにしているため、デコードされた画像に乱れがなく、品質の低下を防止することができる。
(2)請求項2記載の発明によれば、パケット受信時のパケット着信順序がパケット送信時と比較して狂っていても、パケット順序補正部13がパケット送信順に従ってデコード処理を行なうようにすることで、デコードされた画像に乱れがなく、品質の低下を防止することができる。
(3)請求項3記載の発明によれば、パケット逆転を補正するための保証数範囲を予め設定しておき、保証数範囲内に到着したパケットについては、パケット順序を補正するようにしているので、デコードされた画像に乱れがなく、好ましい画像が得られる。
(4)請求項4記載の発明によれば、最大保持数以内のパケットであれば、逆転を補正してデコードされた画像の品質の低下を防止することができる。
(5)請求項5記載の発明によれば、ストリームの一括管理を行なうことでパケット順序の補正処理を行ない、画像品質を維持することができる。
【0066】
このように、本発明によれば、受信したパケットのデコードを行なった場合でも画像の乱れ等の品質の低下を防止することができる逆転ストリームパケットの補正方法及び装置を提供することができる。
【図面の簡単な説明】
【図1】本発明方法の原理を示すフローチャートである。
【図2】本発明の原理ブロック図である。
【図3】本発明方法の動作の一例を示すフローチャートである。
【図4】ストリーム管理テーブルの一例を示す図である。
【図5】パケット逆転補正処理の一例を示すフローチャートである。
【図6】パケット受信例を示す図である。
【図7】従来のデータ転送システムの概念図である。
【図8】エンコーダの内部構成例を示す図である。
【図9】デコーダの内部構成例を示す図である。
【図10】MPEGストリームパケットの構成例を示す図である。
【図11】受信部のパケット受信時の既存処理を示すフローチャートである。
【符号の説明】
10 パケット受信部
11 RTPヘッダ情報抽出部
12 シーケンス番号抽出部
13 パケット順序補正部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method and an apparatus for correcting a reverse stream packet. With the arrival of the multimedia age, the expansion of infrastructure such as communication networks has been progressing. However, since the amount of information of the image data is large, if the data is transferred as it is, there is a problem that the communication time is still long and the load on the communication line is increased. As a technique for solving such a problem, a JPEG (Joint Photographic Coding Experts Group) or MPEG (Moving Picture Coding Experts Group) image compression technique is used. Among these, the MPEG method is mainly used for compression of moving images (video data), and can also compress audio data and multiplex it with video data.
[0002]
[Prior art]
The MPEG system used as the above-described image compression technology includes MPEG1, MPEG2, and MPEG4. As a conventional technique of this kind, an order table in which a correspondence relationship between a packet group arrangement in an original MPEG data stream and a packet group arrangement in a generated MPEG data packet sequence is described in a PES private data area of an MPEG packet. There has been known a system in which the order of packet groups is initially grasped and the order of packet groups can be arbitrarily changed (see, for example, Patent Document 1).
[0003]
FIG. 7 is a conceptual diagram of a conventional data transfer system. In the figure, reference numeral 1 denotes a camera, and 2 denotes an encoder for receiving and modulating an NTSC signal photographed by the camera 1. In this example, three cameras 1 to 3 are shown as the camera 1 and three encoders 1 to 3 are shown as the encoder 2. Reference numeral 3 denotes a network to which an output signal of the encoder 2 is transferred. The output of these encoders 2 becomes MPEG data, which is an MPEG stream packet distribution.
[0004]
Reference numeral 4 denotes a decoder which is connected to the network 3 and receives MPEG data as an output signal of the encoder 2 and restores the original NTSC signal. A monitor 5 is connected to the decoder 4 and displays an NTSC image. In the example shown in the figure, an example is shown in which two decoders, decoder 1 and decoder 2, and two monitors 5, monitor 1 and monitor 2, are provided. Reference numeral 6 denotes a management server connected to the network 3, and reference numeral 7 denotes a personal computer (PC) also connected to the network 3. The outline of the system configured as described above is as follows.
[0005]
The system shown in this figure is a system that distributes MPEG stream packets over an IP network and distributes images in real time. Encoders 1 to 3 in the figure each have an NTSC video / audio input and an IP interface, encode NTSC video / audio data input from the camera 1 into an MPEG stream, and deliver MPEG stream packets over an IP network. have.
[0006]
Also, the decoder 1 and the decoder 2 in the figure have NTSC video / audio output and an IP network interface, respectively, and have a function of decoding live-received MPEG stream packets into NTSC video / audio data and outputting them to the monitor 5.
[0007]
With such a system, it is possible to simultaneously distribute to a large number of monitors on an IP network by multicast or unicast. Further, these devices can be collectively set by the management server 6 and the personal computer (PC) 7. For example, it is possible to switch and set the video / audio received from the encoder 1 by the decoder 1 and displayed on the monitor 1 by the management server 6 or the personal computer 7 to be received by the decoder 2 and displayed on the monitor 2. it can.
[0008]
The device configurations of the encoder and decoder are shown below. FIG. 8 is a diagram illustrating an example of the internal configuration of the encoder 2. In the figure, reference numeral 2a denotes an encoder for receiving and encoding NTSC data from a camera, for example, and converts the NTSC data into MPEG data. A transmission unit 2b transmits the MPEG data output from the encoder unit 2a. MPEG stream packet distribution is performed from the transmission unit 2b.
[0009]
FIG. 9 is a diagram showing an example of the internal configuration of the decoder 4. In the figure, reference numeral 4a denotes a receiving unit that receives an MPEG stream packet from the encoder 2, for example. A decoder 4b decodes the MPEG data output from the receiver 4a and converts the data into NTSC data. The output of the decoder unit 4b is connected to, for example, a monitor, and an image is displayed.
[0010]
FIG. 10 is a diagram showing a configuration example of an MPEG stream packet. FIG. 3 is a diagram illustrating a configuration example of an MPEG stream packet. The MPEG stream packet is roughly composed of two parts, an RTP header and a payload part. The RTP header is added by the transmission unit when the encoder distributes the MPEG stream packet to the IP network, and the header stores a sequence number indicating the distribution order of the packet.
[0011]
The packet is composed of 32 bits from 0 to 31 bits per row, and is cyclically numbered in the range of 0 to 65535. Based on this number, the decoder recognizes the occurrence of a received packet or stream switching.
[0012]
In the RTP header, V indicates a version, P indicates padding, X indicates an extension, CC indicates a CSRC count, M indicates a marker indicating a RAP flag, PT indicates a payload type, and a sequence number indicates a serial number of a packet. The time stamp is time information.
[0013]
In the payload portion, the MPEG compression mode indicates a compression mode (for example, MPEG1 or MPEG2), and the time is displayed when the RAP flag is set. Thereafter, the actual MPEG data is entered.
[0014]
FIG. 11 shows a reception flowchart when the MPEG stream packet distributed from the encoder to the network is received by the receiver of the decoder. When a stream packet is received (S1), the number of received packets is counted (S2). Next, the RTP header information is checked (S3). Then, the stream size is checked (S4).
[0015]
Next, it is checked whether or not the received packet is incorrect (S5). Here, the incorrect reception packet means, for example, that the reception packet data is broken. If the received packet is incorrect, the received stream is discarded (S6), and the process returns to step S1 to start over from the packet receiving step. If the received packet is not wrong, it checks for missing packets (S7) and requests decoding of the received stream (S8). Then, the process enters the next packet receiving process.
[0016]
As is clear from the above description, in the MPEG stream packet received by the receiving unit, the information in the RTP header is first checked in the receiving unit, and then the sequence number is checked. In the prior art, even if packet inversion occurs, a decoding request is made to the decoder unit in accordance with the order of packet reception.
[0017]
[Patent Document 1]
Japanese Patent Application Laid-Open No. 10-31648 (page 6, FIG. 1)
[0018]
[Problems to be solved by the invention]
As described above, when an MPEG stream is inverted and received, in the conventional packet reception processing, a decoding request is made in an order different from the order transmitted by the encoder. For this reason, the image is distorted even though no data is missing, and there is a problem of deterioration in quality. In particular, with respect to MPEG4, the data size is small and the frequency of packet reversal increases, so that there is a problem that the image is further distorted as compared with MPEG1 and MPEG2.
[0019]
SUMMARY OF THE INVENTION The present invention has been made in view of such a problem, and provides a method and an apparatus for correcting a reverse stream packet which can prevent quality deterioration such as image distortion even when a received packet is decoded. It is intended to provide.
[0020]
[Means for Solving the Problems]
(1) The invention described in claim 1 is as follows. FIG. 1 is a flowchart showing the principle of the method of the present invention. According to the present invention, in a system for flowing an MPEG stream packet received via an IP network and delivering images in real time, RTP header information is extracted from the MPEG stream packet received via the IP network (step 1). Sequence number information indicating the packet transmission order in the RTP header is extracted (Step 2), an error in the packet reception order is identified based on the extracted sequence number, and processing is performed according to the packet transmission order (Step 3). It is characterized by the following.
[0021]
With this configuration, when decoding received packet data based on a sequence number, decoding is performed not in the order of packet arrival but in the order of sequence numbers. The drop can be prevented.
(2) The invention described in claim 2 is as follows. FIG. 2 is a block diagram showing the principle of the present invention. The apparatus shown in the figure shows a decoding part of a system for transmitting an MPEG stream packet over an IP network and distributing images in real time. In the figure, 10 is a packet receiving unit for receiving an MPEG stream packet, 11 is an RTP header information extracting unit for extracting an RTP header from the received packet, and 12 is a sequence number extracting unit for further extracting the sequence number of the packet from the extracted RTP header. The unit 13 is a packet order correcting unit for correcting the order of packets based on the sequence numbers extracted from the sequence number extracting unit 12.
[0022]
With this configuration, even if the packet arrival order at the time of packet reception is out of order as compared with the time of packet transmission, the packet order correction unit 13 performs the decoding process in accordance with the packet transmission order, so that the packet is decoded. There is no disturbance in the image, and it is possible to prevent a decrease in quality.
(3) In the invention according to claim 3, in the case where the packet reversal occurs, the packet order correcting unit 13 sets a guaranteed number range as a threshold value for assuring the degree of the packet reversal, and finally sends a decoding request. The range is from the sequence number of the performed stream to the threshold.
[0023]
With this configuration, the guaranteed number range for correcting the packet inversion is set in advance, and the packets arriving within the guaranteed number range are corrected in the packet order. And a preferable image can be obtained.
(4) According to a fourth aspect of the present invention, in the packet order correcting section, the maximum number of held packets is set as a threshold value for determining how much a reversed packet is held, and the value is a guaranteed number range according to the third embodiment. It is characterized by the same as above.
[0024]
With this configuration, if the number of packets is within the maximum number, the reverse rotation can be corrected and the quality of the decoded image can be prevented from lowering.
(5) The invention according to claim 5 is characterized in that a stream management table is provided for managing the held stream and the stream information for which the decoding request was made last, and the stream is managed collectively. .
[0025]
With this configuration, by performing the stream management collectively, the packet order can be corrected, and the image quality can be maintained.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0027]
FIG. 3 is a flowchart showing an example of the operation of the method of the present invention. The flowchart shown corresponds to the conventional method of FIG. Compared with the method of FIG. 11, steps S7 and S8 of FIG. 11 are replaced with S7 ′ in the present invention. S7 'is the packet reversal correction processing according to the present invention.
[0028]
First, the overall operation will be described. When a stream packet is received (S1), the number of received packets is counted (S2). Next, the RTP header information is checked (S3). Then, the stream size is checked (S4). Next, it is checked whether or not the received packet is incorrect (S5). Here, the incorrect reception packet means, for example, that the reception packet data is broken. If the received packet is incorrect, the received stream is discarded (S6), and the process returns to step S1 to start over from the packet receiving step. If the received packet is not wrong, and if the packet has been inverted, a packet inversion correction process is performed (S7 '), and the next packet reception process is started.
[0029]
When a packet inversion occurs, a guaranteed number range is provided as a threshold value for assuring the degree of the packet inversion, and the range from the sequence number of the stream for which the decoding request was made last to the threshold value is set. Packets received out of the original order must be held until the expected packets are received. Therefore, the maximum number of held packets is set as a threshold value for determining how many packets are held, and the value is set to the same value as the guaranteed number range.
[0030]
Furthermore, a stream management table is provided to manage the held stream and the stream information for which the last decoding request was made, so that the streams are collectively managed.
[0031]
FIG. 4 is a diagram illustrating an example of the stream management table. The stream management table is a table in which all necessary information is stored in order to correct inversion of a packet. This stream management table is provided in the packet order correction unit 13 in FIG. As shown in the figure, the stream management table stores three main types of information. The first is information on a stream for which a decoding request was made last, and manages a sequence number and head address information on a buffer storing MPEG actual data. The sequence number is information required for checking a sequence skip between a received packet and a stream for which a decoding request was made last. The head address of the actual MPEG data is for managing a buffer in which the received stream is stored.
[0032]
The second is information on the currently received stream, which includes a sequence number, RTP header start address, MPEG actual data start address and its size, MPEG format, MPEG mode number, and device type. The RAP flag is a flag indicating whether or not the received MPEG stream packet is a RAP. Here, the RAP is a reference image.
[0033]
As described above, the sequence number is used for checking the sequence number with the stream that has requested decoding last. Other information is information required at the time of a decoding request, and a decoding request is made by passing the information to the decoder unit.
[0034]
The third is information on a stream held when a packet inversion occurs, and an area corresponding to the maximum number of held streams is prepared. Except for the held stream flag, the content is the same as the content shown in the second. The held stream flag is a flag for identifying whether the stored held stream information is valid or invalid. For example, when this flag is set, this information indicates that stream information within the guaranteed number range of the currently occurring packet inversion is stored.
[0035]
When the stream is requested to be decoded, discarded, and initialized, the flag is lowered. This flag makes it possible to clearly confirm whether the information is correct, and eliminates waste when searching for a held stream.
[0036]
The stream management table is initialized at the start of decoding request, at the time of stopping the decoding request, and at the time of network disconnection, since there is a possibility that packet continuity may be lost. By using such a stream management table, it is possible to carry out batch management of streams to perform correction processing of the packet order and maintain image quality.
[0037]
As described above, according to the present invention, the guaranteed number range for correcting the packet inversion is set in advance, and the packets arriving within the guaranteed number range are corrected in the packet order. The obtained image is not disturbed, and a preferable image is obtained. In addition, the maximum number of held packets is set as a threshold for holding the inverted packets, and the value is set to be the same as the guaranteed number range, thereby lowering the quality of the decoded image by correcting the inverted data. Can be prevented.
[0038]
FIG. 5 is a flowchart illustrating an example of the packet reverse rotation correction process. The main part of the operation is the packet order correction unit 13 in FIG. The correction uses the existing sequence number to identify the order of the packets transmitted by the encoder over the IP network, and corrects the decoding order of the packets.
[0039]
First, the sequence number of the received stream is checked (S1). In this check, the information of the stream management table shown in FIG. 4 is compared with the sequence number of the stream for which the last decoder request was made, and whether or not a sequence skip has occurred is identified. Stand up.
[0040]
Next, it is checked whether the received stream is the first stream packet from the start of reception (S2). If it is the first stream packet, there is no possibility of packet inversion, so a decoding request is immediately sent to the decoder unit (S9). If it is not the first time (the second and subsequent streams from the start of reception), the next process is started.
[0041]
Next, it is checked whether the number of the received stream is smaller than that of the stream for which the decoding request has been made (S3). If the stream number is smaller than the last stream for which a decode request was made, it is an unnecessary packet, so the sequence number of the last stream for which a decode request was made is obtained from the stream management table, and the received stream packets before that are discarded. (S10).
[0042]
Next, a case where the received stream is within the guaranteed number range will be described. It is checked whether the received stream is within the guaranteed number range of the sequence skip (S4). If the number is within the guaranteed number range, the processing changes depending on whether a sequence skip has occurred first. The sequence skip is performed by the sequence skip check performed first, and is determined based on the contents of the flag (S5).
[0043]
If a sequence skip has occurred, the received stream is decoded and held (S11). In this case, the storage location flag in the stream management table is used to search for an empty storage location, and that information is stored. By this processing, when a decoding request for the held stream is made later, it is possible to extract information from the stream management table.
[0044]
If the sequence skip does not occur, it means that the received stream is continuous, so a decoding request is made for the received stream (S6). At this time, it is checked whether or not there is a next stream among the streams held by the stream management table (S7). If there is a stream next to the received stream, a decoding request for the held stream is made (S8). After that, it enters a reception waiting state.
[0045]
Next, processing when the received stream is out of the guaranteed number range will be described. If the number is out of the guaranteed number range, the stream management table is searched for a stream having a sequence number immediately before the stream received first (S13), and if so, a flag is set (S12). Search for another previous stream. By repeating this process, a decoding request is made for all the continuous holding streams in the stream management table, and thereafter, a decoding request for the currently received stream is made. Finally, since the received stream exceeds the guaranteed number range, the stream management table is initialized once. After that, it enters a reception waiting state.
[0046]
More specifically, if there is no previous stream in the held stream, it is checked whether or not the loop has been passed (S14). If the stream has been passed, only the stream having a continuous sequence number is requested to decode the held stream (S15). ). Next, a decoding request is made for the received stream (S16), the remaining stream is discarded (S17), and the process returns to step S1.
[0047]
If it is determined in step S14 that the data does not pass through the loop, the received stream is requested to be decoded (S18), all the held streams are discarded (S19), and the process returns to step S1.
[0048]
With this configuration, even if the packet arrival order at the time of packet reception is out of order compared to the packet transmission, the packet order correction unit 13 performs the decoding process in accordance with the packet transmission order, so that the packet is decoded. There is no disturbance in the image, and it is possible to prevent a decrease in quality.
[0049]
Next, examples of some packet reversal correction processing will be described with reference to FIGS. FIG. 6 is a diagram illustrating an example of packet reception. The reception order of the packets in FIG. 6 is assumed to be received in order from left to right, the arrows in the figure indicate that the packets are reversed, and the numbers indicate the sequence numbers. A shaded packet indicates that a missing packet has been received. Here, the case where the guaranteed number range and the maximum holding number are 10 is taken as an example.
(When a packet earlier than the stream that requested decoding is received)
As shown in FIG. 6A, when a packet earlier than the stream for which the decoding request was made is received (when packet number 5 comes after packet number 33), processing is performed according to the reverse rotation correction processing flowchart of FIG. Is performed, the stream of sequence number 1 (hereinafter, only the number) is subjected to the sequence check of S1 and is the first stream from the start of reception. Therefore, the process proceeds to S9 at the branch of S2, and a decoding request is made. This process is an initial operation.
[0050]
When a decode request is made, the decode request information in the stream management table is updated. Thereafter, the update process is performed every time a decode request is made. Packet 2 is performed in the order of S1, S2, S3, S4, S5, S6, and S7. This processing order is a normal operation. After that, the normal processing is performed for the packets up to 33 in the same manner as for the second packet.
[0051]
Next, when the packet of 5 arrives, it undergoes the processing of S1 and S2, and since the number is smaller than that of the stream 33 that last made the decoding request due to the branch of S3, the processing of S10 is performed and the packet is discarded. Is done. The processing after 34 is the same processing order as in 2.
(When a stream exceeding the guaranteed number range is received)
When a packet exceeding the guaranteed number range as shown in FIG. 6B is received and the processing is performed according to the packet reversal correction processing flowchart of FIG. 5, the initial operation is performed because one packet is the first stream from the start of reception. Do. Normal operation is performed on packets 2 to 13.
[0052]
The 22 packets are processed in the order of S1, S2, and S3. In this case, the branch of S4 checks whether the number is within the guaranteed number range. Since the difference between the streams 13 and 22 is “9”, which is within the guaranteed number range, the process proceeds to S5. In the process of S5, since a sequence jump has occurred from the stream 13 that has requested decoding last, information is stored as a holding stream on the stream management table by the process of S11. The information is stored in the stream management table in the same processing order as.
[0053]
Thereafter, when the stream 25 is received, the processing of S1, S2, and S3 is performed. Since the processing is out of the guaranteed number range in the processing of S4, the process proceeds to S13. In the process at S13, the stream management table is searched for a stream one before the reception stream 25, that is, a stream of 24. Here, since there are the 24 streams held earlier, a loop check flag is set by the processing of S12, and the processing of S13 is repeated, and the next stream, 23, which is one stream before 24, is searched.
[0054]
Similarly, this process is repeated, and the search is continued until 22 is found. However, since the stream immediately before 22 is not held, the process proceeds to S14. In the process of S14, whether or not the loop has been passed is identified based on the loop check flag. Thus, the process proceeds to the process of S15, and a decoding request is made for the streams 22, 23, and 24.
[0055]
Thereafter, a decoding request of the stream 25 currently received is made in the processing of S16, and finally, the remaining held stream is invalidated by the processing of S17 by lowering the held stream flag. Thereafter, the normal operation is performed after the 26th packet.
(When packet reversal occurs once)
As shown in (c) of FIG. 6, when one inversion occurs (stream 11), the processing is performed according to the packet inversion correction processing flowchart of FIG. Perform the operation. The normal operation is performed on the packets 2 to 10, and the processing on the packets 12 and 13 is performed in the order of S1, S2 and S3.
[0056]
Then, since it is within the guaranteed number range in the process of S4, the process proceeds to S5. In the process of S5, since a sequence jump has occurred from the stream 10 for which decoding was last requested, information is stored as a holding stream on the stream management table by the process of S11.
[0057]
When the expected 11 packets are received, the processing is performed in the order of S1 to S4. In the process of S5, since the sequence skip has not occurred between the stream 10 that has made the last decoding request and the currently received stream 11, the process of S6 is performed and 11 is requested to be decoded.
[0058]
Next, the processing shifts to the processing of S7, and the stream management table is searched for the packet next to the 11 currently received in the processing of S7, that is, 12. Here, since the stream 12 held earlier exists, the decoding of the stream 12 is requested by the processing of S8, and the processing of S7 is repeated.
[0059]
Then, 13 which is the next number after 12 is searched. Since information is held in the stream management table for 13 as well as 12, the processing shifts to S 8 and a decoding request is made. Further, the process of S7 is repeated, but since there is no number 14 next to 13, the process ends. Thereafter, the processes after 14 perform the normal operation.
(When packet inversion occurs three times and the receiving order is complicated)
As shown in FIG. 6D, a sequence jump occurs, and two sequence jumps occur before an expected packet is received. Thereafter, when the expected packet reception order is complicated, the processing is performed according to the packet inversion correction processing flowchart of FIG.
[0060]
Since packet 1 is the first stream from the start of reception, an initial operation is performed. Normal operation is performed for packets 2 to 10, and packets are received in the order of 12, 13, 15, and 17. These packets are processed in the order of S1, S2, S3, S4, S5, and S11, and the information is managed in the stream management table.
[0061]
Next, the inverted packet 14 is received, but is processed in the order of S1 to S5, and since the sequence skipping occurs with the stream 10 that has made the last decoding request, it is the same as 12, 13, 15, and 17, The information is held in the stream management table. Further, 18, 16, and 19 are processed similarly to 14.
[0062]
Next, when 11 is received, the processing is performed in the order of S1 to S4. In the processing of S5, since the sequence skip does not occur from the last 10 which made the decoding request, the processing shifts to the processing of S6 and a decoding request is made. . Then, the process proceeds to S7.
[0063]
In the process of S7, the stream 12 following the 11 is searched. Since the information of the 12 streams is held in the stream management table, the process proceeds to S8, and the decoding of the 12 streams is requested. Thereafter, the processes of S7 and S8 are repeated, and decoding of the remaining held streams 13 to 19 is requested. Thereafter, normal operation is performed for packets 20 and thereafter.
[0064]
As described above, according to the present invention, even if a packet received from the IP network is inverted, it can be corrected. This correction effect can reduce image disturbance when packet inversion occurs, and is particularly effective for a stream in which packet inversion occurs frequently, such as MPEG4. can avoid.
[0065]
【The invention's effect】
According to the present invention, the following effects can be obtained.
(1) According to the first aspect of the invention, when decoding received packet data based on a sequence number, decoding is performed not in the order of packet arrival but in the order of sequence numbers. There is no disturbance, and a decrease in quality can be prevented.
(2) According to the second aspect of the present invention, even if the packet arrival order at the time of packet reception is out of order compared with the packet transmission, the packet order correction unit 13 performs the decoding process according to the packet transmission order. Thus, the decoded image is not disturbed, and the quality can be prevented from lowering.
(3) According to the third aspect of the present invention, the guaranteed number range for correcting the packet inversion is set in advance, and the packet order for packets arriving within the guaranteed number range is corrected. Therefore, there is no disorder in the decoded image, and a preferable image is obtained.
(4) According to the fourth aspect of the invention, if the number of packets is within the maximum number, the inversion can be corrected to prevent the quality of the decoded image from deteriorating.
(5) According to the fifth aspect of the present invention, by performing batch management of the streams, the packet order can be corrected, and the image quality can be maintained.
[0066]
As described above, according to the present invention, it is possible to provide a method and an apparatus for correcting a reverse stream packet, which can prevent quality deterioration such as image distortion even when a received packet is decoded.
[Brief description of the drawings]
FIG. 1 is a flowchart showing the principle of the method of the present invention.
FIG. 2 is a principle block diagram of the present invention.
FIG. 3 is a flowchart showing an example of the operation of the method of the present invention.
FIG. 4 is a diagram illustrating an example of a stream management table.
FIG. 5 is a flowchart illustrating an example of a packet reverse rotation correction process.
FIG. 6 is a diagram illustrating an example of packet reception.
FIG. 7 is a conceptual diagram of a conventional data transfer system.
FIG. 8 is a diagram illustrating an example of an internal configuration of an encoder.
FIG. 9 is a diagram illustrating an example of an internal configuration of a decoder.
FIG. 10 is a diagram illustrating a configuration example of an MPEG stream packet.
FIG. 11 is a flowchart illustrating an existing process when a receiving unit receives a packet.
[Explanation of symbols]
10 Packet receiver
11 RTP header information extraction unit
12 Sequence number extraction unit
13 Packet order correction unit

Claims (5)

IPネットワークを介して受信したMPEGストリームパケットを流し、リアルタイムに画像配信を行なうシステムにおいて、IPネットワークを介して受信したMPEGストリームパケットからRTPヘッダ情報を取り出し(ステップ1)、
次に、RTPヘッダ内のパケット送信順序を示すシーケンス番号情報を取り出し(ステップ2)、
取り出したシーケンス番号を元にパケットの受信順序の誤りを識別し、パケット送信順序に従って処理を行なう(ステップ3)
ようにしたことを特徴とする逆転ストリームパケットの補正方法。
In a system for flowing an MPEG stream packet received via an IP network and distributing images in real time, RTP header information is extracted from the MPEG stream packet received via the IP network (step 1),
Next, sequence number information indicating the packet transmission order in the RTP header is extracted (step 2),
An error in the packet reception order is identified based on the extracted sequence number, and processing is performed according to the packet transmission order (step 3).
A method for correcting a reverse stream packet.
IPネットワーク上にMPEGストリームパケットを流し、リアルタイムに画像配信を行なうシステムにおいて、
MPEGストリームパケットを受信するパケット受信部と、
受信したパケットからRTPヘッダを抽出するRTPヘッダ情報抽出部と、
抽出したRTPヘッダから更にパケットのシーケンス番号を抽出するシーケンス番号抽出部と、
該シーケンス番号抽出部から抽出されたシーケンス番号を元にパケットの順序を補正するパケット順序補正部と、
を含んで構成される逆転ストリームパケットの補正装置。
In a system that distributes MPEG stream packets over an IP network and distributes images in real time,
A packet receiving unit that receives an MPEG stream packet;
An RTP header information extraction unit that extracts an RTP header from the received packet;
A sequence number extracting unit for further extracting a packet sequence number from the extracted RTP header;
A packet order correction unit that corrects the order of packets based on the sequence number extracted from the sequence number extraction unit;
And a correction device for the reverse stream packet.
前記パケット順序補正部は、パケット逆転が発生した場合には、それをどの程度まで保証するかの閾値として保証数範囲を設け、最後にデコード要求を行なったストリームのシーケンス番号から閾値までを範囲とすることを特徴とする請求項2記載の逆転ストリームパケットの補正装置。When the packet inversion occurs, the packet order correction unit sets a guaranteed number range as a threshold value for assuring the degree of the packet inversion, and sets a range from the sequence number of the stream for which the last decoding request was made to the threshold value. 3. The apparatus for correcting a reverse stream packet according to claim 2, wherein: 前記パケット順序補正部は、逆転しているパケットをどの程度まで保持させるの閾値として最大保持数を設け、その値は請求項3記載の保証数範囲と同じとすることを特徴とする請求項2記載の逆転ストリームパケットの補正装置。The said packet order correction | amendment part sets the maximum holding | maintenance number as a threshold value which holds the packet which reversed, and the value is the same as the guarantee number range of Claim 3 characterized by the above-mentioned. A correction device for a reverse stream packet according to the above description. 保持したストリームや、最後にデコード要求を行なったストリーム情報を管理するため、ストリーム管理テーブルを設け、ストリームの一括管理を行なうようにしたことを特徴とする請求項2記載の逆転ストリームパケットの補正装置。3. The reverse stream packet correction device according to claim 2, wherein a stream management table is provided for managing the held stream and the stream information for which the decoding request was made last, and the stream is collectively managed. .
JP2003119822A 2003-04-24 2003-04-24 Correction method and apparatus for inverted stream packet Withdrawn JP2004328353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003119822A JP2004328353A (en) 2003-04-24 2003-04-24 Correction method and apparatus for inverted stream packet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003119822A JP2004328353A (en) 2003-04-24 2003-04-24 Correction method and apparatus for inverted stream packet

Publications (1)

Publication Number Publication Date
JP2004328353A true JP2004328353A (en) 2004-11-18

Family

ID=33498936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003119822A Withdrawn JP2004328353A (en) 2003-04-24 2003-04-24 Correction method and apparatus for inverted stream packet

Country Status (1)

Country Link
JP (1) JP2004328353A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007007526A1 (en) * 2005-07-12 2007-01-18 Matsushita Electric Industrial Co., Ltd. Video stream processing device, integrated circuit device, and method
JP2009500925A (en) * 2005-06-30 2009-01-08 クゥアルコム・インコーポレイテッド System and method for resolving conflicts in many simultaneous communications in a wireless system
CN100464586C (en) * 2005-11-27 2009-02-25 海信集团有限公司 MPEG1 file real-time playing method based on IP STB
JP4769306B2 (en) * 2006-01-13 2011-09-07 アルカテル−ルーセント ユーエスエー インコーポレーテッド Method for controlling packet delivery in a packet switched network

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009500925A (en) * 2005-06-30 2009-01-08 クゥアルコム・インコーポレイテッド System and method for resolving conflicts in many simultaneous communications in a wireless system
US8705515B2 (en) 2005-06-30 2014-04-22 Qualcomm Incorporated System and method for resolving conflicts in multiple simultaneous communications in a wireless system
WO2007007526A1 (en) * 2005-07-12 2007-01-18 Matsushita Electric Industrial Co., Ltd. Video stream processing device, integrated circuit device, and method
CN100464586C (en) * 2005-11-27 2009-02-25 海信集团有限公司 MPEG1 file real-time playing method based on IP STB
JP4769306B2 (en) * 2006-01-13 2011-09-07 アルカテル−ルーセント ユーエスエー インコーポレーテッド Method for controlling packet delivery in a packet switched network

Similar Documents

Publication Publication Date Title
JP3931595B2 (en) Data correction apparatus and data correction method
RU2518383C2 (en) Method and device for reordering and multiplexing multimedia packets from multimedia streams belonging to interrelated sessions
US6078594A (en) Protocol and procedure for automated channel change in an MPEG-2 compliant datastream
Wenger et al. RTP payload format for H. 264 video
JP4943513B2 (en) Video data loss recovery system using low bit rate stream of IPTV
US6026506A (en) Concealing errors in transport stream data
JP3507766B2 (en) How to format compressed video data into transfer cells
US10965949B2 (en) Carriage systems encoding or decoding JPEG 2000 video
US20090285309A1 (en) Apparatus and Method for Coding an Information Signal into a Data Stream, Converting the Data Stream and Decoding the Data Stream
EP1439704A2 (en) Method and apparatus for processing, transmitting and receiving dynamic image data
US9264737B2 (en) Error resilient transmission of random access frames and global coding parameters
US20100132007A1 (en) Accelerating channel change time with external picture property markings
US9215396B2 (en) Faster access to television channels
Wenger et al. RFC 3984: RTP payload format for H. 264 video
US10536708B2 (en) Efficient frame loss recovery and reconstruction in dyadic hierarchy based coding
KR100792025B1 (en) Method of transmitting video data in case of channel change in iptv system
JP2004328353A (en) Correction method and apparatus for inverted stream packet
RU2671992C2 (en) Transmission device, transmission method, reception device and reception method
JP3259691B2 (en) Multicast system and receiving device
JP2006014153A (en) Packet-error monitoring mpeg decoder, mpeg image transmitting system and mpeg image transmission method
JP2005064574A (en) Stream packet transmission apparatus and stream packet transmission method
WO2009080113A1 (en) Method and apparatus for distributing media over a communications network

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060704