JP2008219070A - Video encoding system, method and program - Google Patents
Video encoding system, method and program Download PDFInfo
- Publication number
- JP2008219070A JP2008219070A JP2007049232A JP2007049232A JP2008219070A JP 2008219070 A JP2008219070 A JP 2008219070A JP 2007049232 A JP2007049232 A JP 2007049232A JP 2007049232 A JP2007049232 A JP 2007049232A JP 2008219070 A JP2008219070 A JP 2008219070A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- video data
- video
- frame rate
- unit
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、映像符号化システムに関し、特にカメラデバイスからの映像を入力とする符号化システムに関する。 The present invention relates to a video encoding system, and more particularly, to an encoding system that receives video from a camera device.
パーソナルコンピュータ(PC)や携帯情報端末(PDA)、携帯電話機等の端末技術と、ADSL(Asymmetric Digital Subscriber Line)や無線LAN(Local Area Network)、第3世代携帯電話網といったネットワーク技術の進歩により、映像音声等のストリーミングメディアを組み合わせたコミュニケーション手段が広く普及している。 With advances in terminal technologies such as personal computers (PCs), personal digital assistants (PDAs), mobile phones, and network technologies such as ADSL (Asymmetric Digital Subscriber Line), wireless LAN (Local Area Network), and third-generation mobile phone networks, Communication means combining streaming media such as video and audio are widely used.
映像符号化システムの一例が特許文献1に記載されている。この映像符号化システムでは、ビデオカメラから取得した映像信号をエンコーダで圧縮し、パケット化した後に、UDP(User Datagram Protocol)を用いて再生側端末に向けて送出する処理が行われる。
An example of a video encoding system is described in
この種の映像符号化システムは、カメラ装置、映像符号化装置、パケット化装置および送信装置から構成される。以下に、その動作を簡単に説明する。 This type of video encoding system includes a camera device, a video encoding device, a packetizing device, and a transmission device. The operation will be briefly described below.
まず、カメラ装置の設定を行う。カメラ装置は、例えばデジタルビデオカメラやビデオキャプチャカードであり、画像サイズ、画像形式、フレームレートなどの設定が行われる。 First, the camera device is set. The camera device is, for example, a digital video camera or a video capture card, and settings such as an image size, an image format, and a frame rate are performed.
カメラ装置の設定を行った後、映像のキャプチャを開始する。キャプチャ開始が指示されると、カメラ装置は、定期的に撮像を行って映像フレームのデジタル化処理を実施する。カメラ装置は、設定されたフレームレートで映像信号を出力する。カメラ装置から出力された映像信号は、映像符号化装置に供給される。 After setting the camera device, start capturing video. When the start of capture is instructed, the camera device periodically captures images and performs video frame digitization processing. The camera device outputs a video signal at a set frame rate. The video signal output from the camera device is supplied to the video encoding device.
映像符号化装置は、画質やビットレート等の設定が予め行われており、カメラ装置から供給された映像信号に対して圧縮符号化の処理を実行する。圧縮符号化された映像信号は、ビットストリームとして映像符号化装置から出力される。映像符号化装置から出力されたビットストリームは、パケット化装置に供給される。 In the video encoding device, settings such as image quality and bit rate are set in advance, and compression encoding processing is performed on the video signal supplied from the camera device. The compressed and encoded video signal is output from the video encoding device as a bit stream. The bit stream output from the video encoding device is supplied to the packetizing device.
パケット化装置は、映像符号化装置から供給されたビットストリームを伝送メディアに適したサイズに分割してパケット化する。パケット化されたビデオデータは、送信装置に供給される。送信装置は、パケット化装置から供給されたビデオデータを、ネットワークを介して再生側端末に向けて送出する。
カメラ装置には様々な機種があり、出力可能なフレームレートには差異がある。また、PCを用いて映像符号化システムを構築する場合には、Windows OSのデバイスドライバアーキテクチャであるWDM(Windows Driver Model)やDirectShow等の汎用的なデバイス制御手段が提供されているため、USBバス接続のWebカメラなどの安価なカメラ装置が用いられることが多い。しかし、Webカメラの種類によっては、数種類のフレームレートにしか対応していないものも存在する。 There are various types of camera devices, and there are differences in output frame rates. When a video encoding system is constructed using a PC, general-purpose device control means such as WDM (Windows Driver Model) and DirectShow, which are device driver architectures of Windows OS, are provided. An inexpensive camera device such as a connected Web camera is often used. However, depending on the type of Web camera, there are some that only support several frame rates.
また、カメラ装置によっては、ファームウェアやデバイスドライバなどの映像取得処理を行うソフトウェアでフレームレートの管理をしていないものがある。そのようなカメラ装置では、出力フレームレートを設定しても、指定通りのフレームレートで映像が出力されない場合もある。 Some camera devices do not manage the frame rate with software that performs video acquisition processing such as firmware and device drivers. In such a camera device, even if the output frame rate is set, the video may not be output at the specified frame rate.
カメラ装置が希望のフレームレートに対応していない場合や、カメラ装置が設定と異なるフレームレートで映像信号を出力した場合には、カメラ装置が出力する映像信号のフレームレートが、映像符号化装置が要求するフレームレートと異なる、といった状態が発生する。映像符号化装置では、一般に、単位時間当たりの出力符号量を制御する機構があり、その制御のために映像の入力時間情報を要求する。このため、符号化の設定と異なるフレームレートで映像信号が入力された場合は、符号化処理の動作に支障を来たし、伝送路の容量を超えた過大なビットストリームが出力され、パケットロスによる画質劣化が発生する、といった問題を生じる。 When the camera device does not support the desired frame rate or when the camera device outputs a video signal at a frame rate different from the setting, the frame rate of the video signal output by the camera device is determined by the video encoding device. A situation occurs that is different from the requested frame rate. In general, a video encoding apparatus has a mechanism for controlling an output code amount per unit time, and requests video input time information for the control. For this reason, when a video signal is input at a frame rate different from the encoding setting, the encoding processing operation is hindered, an excessive bit stream exceeding the capacity of the transmission path is output, and image quality due to packet loss is output. The problem of deterioration occurs.
また、カメラ装置から指定通りのフレームレートで映像信号が出力されず、入力映像信号のフレームレートに異常が発生した場合に、そのことをユーザやアプリケーションプログラムに通知するようになっていないため、ユーザは、フレームレートの異常の発生を把握することができない、という問題もある。これは、映像符号化システム及びカメラ操作フレームワークが正常なカメラをターゲットとしているために、フレームレートの監視機能と通知機能を持っていないことによる。 In addition, when the video signal is not output from the camera device at the specified frame rate and an abnormality occurs in the frame rate of the input video signal, the user or application program is not notified of this, so the user There is also a problem that it is impossible to grasp the occurrence of an abnormal frame rate. This is because the video encoding system and the camera operation framework target a normal camera, and therefore do not have a frame rate monitoring function and a notification function.
本発明の目的は、上記問題を解決し、入力映像データのフレームレートを映像符号化に適したフレームレートに変換することのできる映像符号化システムを提供することにある。 An object of the present invention is to solve the above problems and provide a video encoding system capable of converting the frame rate of input video data to a frame rate suitable for video encoding.
本発明のさらなる目的は、入力映像データのフレームレートの異常をユーザに通知することのできる映像符号化システムを提供することにある。 It is a further object of the present invention to provide a video encoding system that can notify a user of an abnormality in the frame rate of input video data.
上記目的を達成するため、本発明の映像符号化システムは、
入力映像データのフレームレートを指定されたフレームレートに変換するフレームレート調整部と、
前記フレームレート調整部で前記指定されたフレームレートへの変換が施された映像データを符号化する映像符号化部と、を有し、
前記フレームレート調整部は、前記入力映像データがフレーム単位に格納されるフレームバッファを備え、前記入力映像データのフレームレートによって決まるタイミングとは独立した、前記指定されたフレームレートによって決まるタイミングで、前記フレームバッファに格納された映像データを読み出す、ことを特徴とする。
In order to achieve the above object, the video encoding system of the present invention includes:
A frame rate adjustment unit that converts the frame rate of the input video data to a specified frame rate;
A video encoding unit that encodes the video data that has been converted to the designated frame rate by the frame rate adjustment unit;
The frame rate adjustment unit includes a frame buffer in which the input video data is stored in units of frames, and the timing determined by the designated frame rate is independent of the timing determined by the frame rate of the input video data. The video data stored in the frame buffer is read out.
上記の構成によれば、フレームレート調整部において、フレームバッファにおける映像データの書き込みおよび読み出しがそれぞれ独立したタイミングで実行されるので、例えば、入力映像データのフレームレートが指定フレームレートより低い場合は、フレームの複製が行われ、反対に、入力映像データのフレームレートが指定フレームレートより高い場合は、フレームの破棄が行われる。これにより、入力映像データのフレームレートが指定フレームレートに変換される。このように、映像符号化部が要求するフレームレート(指定フレームレート)とは異なるフレームレートでカメラ装置から映像データが入力された場合は、フレームレート調整部が、入力映像データのフレームレートを指定フレームレートに変換するので、映像符号化部には、常に、指定フレームレートで映像データが供給される。よって、映像符号化部の設定パラメータの変更は必要なく、また、符号化処理が停止する、といった不具合も生じない。 According to the above configuration, in the frame rate adjustment unit, the writing and reading of the video data in the frame buffer are performed at independent timings. For example, when the frame rate of the input video data is lower than the specified frame rate, On the contrary, when the frame rate of the input video data is higher than the designated frame rate, the frame is discarded. As a result, the frame rate of the input video data is converted to the designated frame rate. As described above, when video data is input from the camera device at a frame rate different from the frame rate required by the video encoding unit (specified frame rate), the frame rate adjustment unit specifies the frame rate of the input video data. Since the frame rate is converted, the video data is always supplied to the video encoding unit at the designated frame rate. Therefore, it is not necessary to change the setting parameters of the video encoding unit, and there is no problem that the encoding process is stopped.
上記映像符号化システムにおいて、
前記フレームバッファは、
1フレーム分の映像データが格納される映像データ領域と、
前記映像データ領域に格納された映像データのフレーム番号が格納されるフレーム番号領域と、を有し、
前記フレームレート調整部は、
前記入力映像データが当該フレームレート調整部に供給される度にカウント値が1つインクリメントされる入力フレームカウンタと、
前記入力映像データを、該映像データのフレームレートによって決まるタイミングで前記映像データ領域に書き込むとともに、該映像データのフレーム番号として前記入力フレームカウンタのカウント値を前記フレーム番号領域に書き込む映像入力部と、
前記指定されたフレームレートによって決まるタイミングで、前記映像データ領域に書き込まれた映像データおよび前記フレーム番号領域に書き込まれたフレーム番号を前記フレームバッファから読み出すデータ取得部と、
前記データ取得部が前記映像データ領域に格納された映像データおよび前記フレーム番号領域に格納されたフレーム番号を前記フレームバッファから読み出すと、該読み出したフレーム番号を、次回の前記データ取得部による読み出しが行われるまで保持する出力フレームカウンタと、
前記データ取得部が読み出した映像データについて、前記データ取得部が今回読み出した当該映像データのフレーム番号と、前記出力フレームカウンタに保持されている、前記データ取得部が前回読み出した映像データのフレーム番号との差に基づいて、フレームの破棄または複製が実施されたか否かを判定するフレーム破棄複製判定部と、
前記フレーム破棄複製判定部で前記フレームの破棄または複製が施された後のデータであると判断された場合に、その旨を示すイベント情報を外部に通知するイベント通知部と、をさらに有していてもよい。
In the video encoding system,
The frame buffer is
A video data area in which video data for one frame is stored;
A frame number area in which a frame number of video data stored in the video data area is stored;
The frame rate adjustment unit
An input frame counter whose count value is incremented by one each time the input video data is supplied to the frame rate adjustment unit;
Writing the input video data in the video data area at a timing determined by the frame rate of the video data, and writing a count value of the input frame counter in the frame number area as a frame number of the video data;
A data acquisition unit that reads out the video data written in the video data area and the frame number written in the frame number area from the frame buffer at a timing determined by the designated frame rate;
When the data acquisition unit reads the video data stored in the video data area and the frame number stored in the frame number area from the frame buffer, the read frame number is read by the data acquisition unit next time. An output frame counter to hold until done,
For the video data read by the data acquisition unit, the frame number of the video data read by the data acquisition unit this time and the frame number of the video data read by the data acquisition unit previously held in the output frame counter A frame discard / duplication determination unit that determines whether or not a frame is discarded or duplicated based on the difference between
And an event notification unit for notifying event information indicating the fact to the outside when the frame discard / duplication determination unit determines that the data is after the frame has been discarded or duplicated. May be.
上記の構成によれば、映像符号化部が要求するフレームレート(指定フレームレート)とは異なるフレームレートでカメラ装置から映像データが入力され、フレームレート調整部にて、フレームの破棄または複製が行なわれると、フレーム破棄複製判定部にて、そのフレームの破棄または複製の実行が検知され、イベント通知部が、そのことを示すイベント情報を外部に通知する。このイベント情報の通知により、ユーザは、入力映像データのフレームレートの異常を把握することが可能である。 According to the above configuration, video data is input from the camera device at a frame rate different from the frame rate (designated frame rate) required by the video encoding unit, and the frame rate adjustment unit discards or duplicates the frame. Then, the frame discard / duplication determination unit detects that the frame is discarded or duplicated, and the event notification unit notifies the event information indicating the fact to the outside. By notification of this event information, the user can grasp the abnormality of the frame rate of the input video data.
本発明によれば、入力映像データのフレームレートに関わらず、指定フレームレートで映像データを映像符号化部に供給することができる。よって、映像符号化部における符号化処理の動作に支障を来たすことがなく、伝送路の容量を超えた過大なビットストリームの出力やパケットロスによる画質劣化を抑制することができる。 According to the present invention, video data can be supplied to the video encoding unit at a specified frame rate regardless of the frame rate of the input video data. Therefore, the operation of the encoding process in the video encoding unit is not hindered, and the deterioration of the image quality due to the output of an excessive bit stream exceeding the capacity of the transmission path and the packet loss can be suppressed.
また、カメラ装置側のフレームレートが指定フレームレートと異なる場合や、カメラ装置が指定通りのフレームレートで映像データを出力しなかった場合は、フレームの破棄または複製が行われたことを示すイベント情報が通知されるので、ユーザは、その通知されたイベント情報に基づいて、フレームレートの異常を把握することができる。 Also, if the frame rate on the camera device side is different from the specified frame rate, or if the camera device did not output video data at the specified frame rate, event information indicating that the frame was discarded or duplicated Therefore, the user can grasp the abnormality of the frame rate based on the notified event information.
次に、本発明の実施の形態について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
本発明は、フレームレート調整処理において、フレームバッファにおける映像データの書き込み及び読み出しのタイミングを独立させることで、フレームの破棄や複製を実現し、それにより入力映像データのフレームレートを指定フレームレートに変換する点、フレームの破棄や複製の実施を検知して外部に通知する点を特徴とする。以下、実施例にて詳細に説明する。 In the frame rate adjustment process, the video data writing and reading timings in the frame buffer are made independent to achieve frame discard and duplication, thereby converting the frame rate of the input video data to the specified frame rate. It is characterized by the fact that frame discard or duplication is detected and notified to the outside. Hereinafter, the embodiment will be described in detail.
図1は、本発明の第1の実施例である映像符号化システムの主要部を示すブロック図である。 FIG. 1 is a block diagram showing the main part of a video encoding system according to the first embodiment of the present invention.
図1を参照すると、映像符号化システム100は、カメラデバイスを接続したコンピュータシステム上で動作する映像符号化システムであって、その主要部は、映像取得部101、フレームレート調整部102、映像符号化部103、パケット化部104、送信部105から構成される。コンピュータシステムは、プログラムやデータなどを蓄積する記憶装置、キーボードやマウスなどの入力装置、CRTやLCDなどの表示装置、外部との通信を行うモデムなどの通信装置、プリンタなどの出力装置および入力装置からの入力を受け付けて通信装置、出力装置、表示装置の動作を制御する制御装置から構成されている。ユーザは、入力装置を通じて、映像符号化システムを起動させたり、映像符号化システムを動作させるのに必要な指示や設定を行ったりする。
Referring to FIG. 1, a video encoding system 100 is a video encoding system that operates on a computer system to which a camera device is connected, and its main parts are a
映像取得部101は、カメラデバイスからの映像データ(動画像)の取得を行う機能ブロックである。映像取得部101は、映像データをカメラデバイスから取得してフレーム単位で出力する機能を備えている。映像フレームのフォーマットは、通常、YUVビットマップ形式であるが、これに代えてRGBビットマップ形式を用いても良い。YUVビットマップ形式は、輝度信号(Y)と、輝度信号と赤色成分の差(U)、輝度信号と青色成分の差(V)の3つの情報で色を表す形式である。
The
また、カメラデバイスとしては、USBやIEEE1394などの外部バスに接続されたデジタルカメラデバイスやNTSC形式のアナログビデオカメラ等が利用可能である。アナログビデオカメラを使用する場合は、同軸ケーブル等の映像伝送ケーブルでビデオキャプチャカードに接続する必要がある。 As the camera device, a digital camera device connected to an external bus such as USB or IEEE1394, an NTSC format analog video camera, or the like can be used. When using an analog video camera, it is necessary to connect to a video capture card with a video transmission cable such as a coaxial cable.
映像取得開始が指示された場合、映像取得部101は、事前に指定された映像サイズ(縦ピクセル数、横ピクセル数)、映像フォーマット、フレームレートに従い、自律的に動画像の取得を開始する。映像取得部101が出力した映像データは、フレームレート調整部102に渡される。
When the start of video acquisition is instructed, the
フレームレート調整部102は、映像取得部101から入力される映像データのフレームレートを監視し、そのフレームレートと指定されたフレームレートの差異を検出して調整する機能ブロックである。フレームレート調整部102でフレームレート調整が施された映像データは、映像符号化部103に渡される。
The frame
映像符号化部103は、フレームレート調整部102から入力されたフレームレート調整後の映像データに対して、圧縮符号化を実施してビットストリームに変換する機能ブロックである。圧縮符号化方式としては、MPEG−4やH.264等の動画像を圧縮するためのフレーム内、フレーム間符号化方式を利用することができる。
The
映像符号化部103へ設定するパラメータは、入力映像のフレームレートとビットレートである。映像符号化部103は、出力ビットストリームを指定ビットレート以下に抑えるための、量子化スケール制御を実施して、入力映像データの符号化処理を実施する。符号化方式としては、MotionJPEGなどのフレーム内符号化のみ行う静止画用圧縮技術を応用した方式を用いることができる。映像符号化部103の出力ビットストリームは、パケット化部104に渡される。
Parameters set in the
パケット化部104は、映像符号化部103から出力されたビットストリームを伝送メディアごとに最適なサイズに分割し、ヘッダを付加する機能ブロックである。映像配信におけるパケット化処理では、通常、IETF RFC3550で規定された、RTP(RealTime Transport Protocol)が用いられる。RTPは、ヘッダにペイロードの種類、シーケンス番号、送信者識別子、時刻情報と言ったリアルタイムストリーミングに必要な情報を付加することが可能である。より詳細なパケット分割方式及びヘッダの定義は、映像符号化形式ごとに規格化されている。MPEG−4形式の映像を伝送する場合、IETF RFC3640によるRTPパケット分割方法を、H.264形式ではIETF RFC3984を、MotionJPEG形式ではIETF RFC2435をそれぞれ用いることができる。パケット化部104でRTPパケットに分割された映像ストリームは、送信部105に渡される。
The
送信部105は、パケット化部104からのRTPパケットに分割された映像ストリームをIPネットワーク経由で映像復号システムに伝送する機能ブロックである。RTPパケットは、UDP/IPプロトコルとソケットを用いて伝送される。
The
次に、フレームレート調整部102の詳細な内部構成について説明する。
Next, a detailed internal configuration of the frame
図2は、フレームレート調整部102の具体的な構成を示すブロック図である。図2を参照すると、フレームレート調整部102は、映像入力部201、入力フレームカウンタ202、フレームバッファ203、データ取得部204、タイマ205、出力フレームカウンタ206、フレーム破棄複製判定部207、イベント通知部208、映像出力部209から構成される。
FIG. 2 is a block diagram showing a specific configuration of the frame
ユーザは、映像符号化システム100に対する配信開始指示の前に、映像取得部101に映像の縦横のピクセル数、映像フォーマット、フレームレートを指定する。映像取得部101に対して設定したフレームレート設定は、フレームレート調整部102と映像符号化部103にも適用される。この設定値に基づいて、フレームレート調整部102では、フレームバッファ203における書き込みや読み出しのタイミングやタイマ205のインターバルが設定される。
The user designates the number of vertical and horizontal pixels of the video, the video format, and the frame rate to the
映像入力部201は、映像取得部101の映像データの出力タイミング(これは、カメラデバイスから入力される映像データのフレームレートによって決まる)で呼び出される。映像入力部201は、映像取得部101から受け取った映像データを入力フレームカウンタ202から取得したフレーム番号と共にフレームバッファ203に書き込む処理を行う。
The
入力フレームカウンタ202は、フレームレート調整部102内に入力された映像データのフレームの数をカウントするものであって、映像データが入力される度にカウント値が1つインクリメントされる。入力フレームカウンタ202は、そのカウント値Lがフレーム番号として保持される。カウント値Lの初期値は1とし、映像入力部201から要求されたときに内部で保持しているカウンタ値Lを映像入力部201に渡す。
The
フレームバッファ203は、1映像フレームを保存する領域である映像データ領域と、入力フレーム番号を保存する領域とを持つメモリである。図3に、フレームバッファ203のメモリ領域を模式的に示す。この例では、フレームバッファ203は、フレーム番号領域501、映像データ領域502および同期フラグ503からなるメモリ領域を有する。
The
映像入力部201は、フレーム単位に入力された映像データを映像データ領域502に、フレーム番号をフレーム番号領域501に上書きする。フレームバッファ203は、上書きされるまでは、同じデータを保持する。同期フラグ503は、フレーム番号領域501と映像データ領域502へのアクセスを排他制御するためのものである。映像入力部201が、フレームバッファ203を操作する際に、同期フラグ503を有効化することで、データ取得部204のフレームバッファ203に対する操作を待機させることが可能になる。反対に、データ取得部204が、フレームバッファ203を操作する際に、同期フラグ503を有効化することで、映像入力部201のフレームバッファ203に対する操作を待機させることが可能になる。
The
データ取得部204は、映像データ領域502から映像データを、フレーム番号領域501からフレーム番号をコピーして取り出す処理を行う。データ取得部204によるデータ取得は、タイマ205によって定期的に指示され、フレームバッファ203への書き込みタイミング(映像入力タイミング)とは独立したタイミングで実施される。データ取得部204は、フレームバッファ203からの映像データの読み出し処理を行う前に、バッファの排他制御を実施するため、同期フラグ503を有効にしてロックをかける。その後、データ取得部204は、フレーム番号領域501および映像データ領域502からフレーム番号および映像データを取得する。フレーム番号および映像データの取得が完了した後、データ取得部204は、同期フラグ503を無効にしてロックを解除する。
The
フレームレート調整部102をソフトウェアとして実装する場合は、データ取得部204を映像取得部101とは別のプロセスやスレッドとして動作させ、同期フラグ503をミューテックスやセマフォといった同期オブジェクトとして実現する。
When the frame
タイマ205は、データ取得部204におけるデータ取得処理を実施するタイミングを決定するインターバルタイマである。タイマ間隔は、ユーザにより指定されるフレームレートにより決定される。
The
出力フレームカウンタ206は、データ取得部204がフレームバッファ203から取得した映像データのフレーム番号を、データ取得部204による次回の読み出しまで保持する。
The
フレーム破棄複製判定部207は、データ取得部204が取得した映像データについて、データ取得部204が取得したフレーム番号Mと出力フレームカウンタ206が保持するフレーム番号(データ取得部204が前回取得したフレーム番号)の差を計算し、その差に基づいてフレームの破棄、複製が実施されたかを判別する処理を行う。前回取り出したフレーム番号と今回取得したフレーム番号の差が1である場合、フレーム破棄複製判定部207は、フレームが正常に取得されていると判定する。前回取り出したフレーム番号と今回取得したフレーム番号の差が1でない場合は、フレーム破棄複製判定部207は、フレームの破棄または複製が実施されていると判定する。具体的には、前回取り出したフレーム番号と今回取得したフレーム番号の差が0の場合は、フレームの複製が実施されたと判定する。前回取り出したフレーム番号と今回取得したフレーム番号の差が2以上である場合は、フレームの破棄が実施されたと判定する。
For the video data acquired by the
イベント通知部208は、フレーム破棄複製判定部207でフレームの破棄または複製の実施がなされたことが検知された場合に、ユーザにその旨を通知する処理を実施する。イベント通知の手段として、メッセージ送出、パケットの送出、コールバック関数呼び出し等を用い、ユーザに対してエラーメッセージの表示もしくは警告音を再生する。
When the frame discard /
映像出力部209は、データ取得部204から供給される映像データを映像符号化部103に供給する。
The
次に、映像符号化システムの動作について説明する。 Next, the operation of the video encoding system will be described.
(映像フレーム入力処理)
図4は、フレームレート調整部102にて行われる映像フレーム入力処理を示すフローチャートである。以下、図1、図2および図4を参照して映像フレーム入力処理を具体的に説明する。
(Video frame input processing)
FIG. 4 is a flowchart showing video frame input processing performed by the frame
まず、配信開始指示によって入力フレームカウンタ202のカウント値Lが1に初期化される(ステップS301)。その後、映像入力部201は、映像取得部101から映像データが入力されるまで待機する(ステップS302)。
First, the count value L of the
映像データが映像入力部201に供給されると、映像入力部201は、データ取得部204によってフレームバッファ203の同期フラグ503が有効化されていないかを調べる(ステップS303)。同期フラグ503が有効化されている場合は、フレームバッファ203がデータ取得部204によってロックされているため、映像入力部201は、同期フラグ503が無効化されるまで待機する。
When the video data is supplied to the
フレームバッファ203の同期フラグ503が無効化されたことを確認した後、映像入力部201は、映像入力処理に伴うフレームバッファ203に対するアクセスに先立ち、フレームバッファ203をロックするため、同期フラグ503を有効化する(ステップS304)。これにより、フレームバッファ203が映像入力部201によってロックされる。
After confirming that the
フレームバッファ203をロックした後、映像入力部201は、入力フレームカウンタ202から取得したカウンタ値Lをフレームバッファ203のフレーム番号領域に上書きするとともに、供給された映像データをフレームバッファ203の映像データ領域に上書する(ステップS305、S306)。
After locking the
続いて、映像入力部201は、映像入力処理のためロックしていたフレームバッファ203の同期フラグ503を無効化する(ステップS307)。これにより、フレームバッファ203はアンロックの状態となる。
Subsequently, the
フレームバッファ203をアンロックとした後、映像入力部201は、入力フレームカウンタ202のカウント値Lに1を加算する(ステップS308)。そして、映像入力部201は、配信終了指示がなされたか否かを判断する(ステップS309)。配信終了指示がない場合は、ステップS302に戻り、次回の映像データ入力まで待機する。
After the
(映像フレーム出力処理)
図5は、フレームレート調整部102にて行われる映像フレーム出力処理を示すフローチャートである。以下、図1、図2および図5を参照して映像フレーム出力処理を具体的に説明する。
(Video frame output processing)
FIG. 5 is a flowchart showing a video frame output process performed by the frame
配信開始指示によって出力フレームカウンタ206のカウント値(フレーム番号N)を0に初期化する(ステップS401)。タイマ205は、ユーザからの要求フレームレートで設定されたインターバルでイベントを発行する。データ取得部204は、タイマ205からイベントが発行されるまで待機する(ステップS402)。
In response to the distribution start instruction, the count value (frame number N) of the
タイマ205からイベントが発行されて待機が解除されると、データ取得部204は、映像入力部201によってフレームバッファ203の同期フラグ503が有効化されていないかを調べる(ステップS403)。同期フラグ503が有効化されている場合は、フレームバッファ203が映像入力部201によってロックされているため、データ取得部204は、同期フラグ503が無効化されるまで待機する。
When the event is issued from the
フレームバッファ203の同期フラグ503が無効化されたことを確認した後、データ取得部204は、映像フレーム出力処理に伴うアクセスに先立ち、フレームバッファ203をロックするため、同期フラグ503を有効化する(ステップ404)。これにより、フレームバッファ203がデータ取得部204によってロックされる。
After confirming that the
フレームバッファ203をロックした後、データ取得部204は、フレームバッファ203のフレーム番号領域からフレーム番号を読み出し(ステップS405)、フレームバッファ203の映像データ領域から映像データを読み出す(ステップS406)。以下の説明において、このフレーム番号領域から読み出したフレーム番号をフレーム番号Mとする。
After locking the
続いて、データ取得部204は、映像フレーム出力処理のためロックしていたフレームバッファ203をアンロックするため、同期フラグ503を無効化する(ステップS407)。
Subsequently, the
フレームバッファ203をアンロックした後、データ取得部204は、フレームバッファ203からの映像データの取得が初回の映像取得であるか否かを判断する(ステップS408)。初回の映像取得である場合は、データ取得部204は、出力フレームカウンタ206のカウント値(フレーム番号N)にM−1を代入する(ステップS409)。その後、ステップS410に移行する。初回の映像取得でない場合は、ステップS409の処理は行わずに、ステップS410に移行する。
After unlocking the
ステップS410で、フレーム破棄複製判定部207は、データ取得部204で取得したフレーム番号M(今回取得したフレーム番号)と出力フレームカウンタ206に保持されているフレーム番号N(前回取得したフレーム番号または初回時のフレーム番号)の差Xを計算する(ステップS410)。
In step S410, the frame discard
フレーム番号差Xが0である場合は、フレーム破棄複製判定部207は、フレームバッファ203に格納された映像データが複製された(フレーム複製が実施された)、と判断する(ステップS411、S412)。フレーム複製とは、映像入力部201がフレームバッファ203上の映像データを更新する前に、データ取得部204が再度映像データを取得することを意味する。これにより、フレーム入出力のタイミング差を1回のフレーム複製で調整したことになる。ユーザが指定したフレームレートに比べ、映像取得部101が出力するフレームレートが小さい場合にこのフレーム複製が実行される。
When the frame number difference X is 0, the frame discard /
フレーム番号差Xが2以上になった場合は、フレーム破棄複製判定部207は、フレームバッファ203に格納された映像データが破棄された(フレーム破棄が実施された)、と判断する(ステップS411、S413)。フレーム破棄とは、データ取得部204がフレームバッファ203から映像データを取得する前に、映像入力部201がフレームバッファ203上の映像データを更新することを意味する。これにより、フレーム入出力のタイミング差をフレーム破棄を行うことで調整したことになる。ユーザが指定したフレームレートに比べ、映像取得部101が出力するフレームレートが大きい場合に、このフレーム破棄が実行される。なお、破棄されたフレーム数は、X−1で求めることができる。この破棄フレーム数はイベント通知によってユーザに通知することができる。
When the frame number difference X is 2 or more, the frame discard
フレーム番号差Xが1である場合は、フレーム破棄複製判定部207は、フレームバッファ203に格納された映像データが破棄または複製されることなくそのまま出力された、と判断する(ステップS411、S414)。この状態は、映像取得部101が出力するフレームレートとユーザが要求するフレームレートが同一であった場合に該当する。
When the frame number difference X is 1, the frame discard /
ステップS412でフレーム複製がなされたと判断した場合、または、ステップS413でフレーム破棄がなされたと判断した場合は、イベント通知部208が、ユーザに対してその旨を示すイベント通知を行う(ステップS415)。イベント通知の手法としては、アラーム音、メッセージ音の再生、モニタ上へのメッセージの表示などがある。このイベント通知により、ユーザは、要求したフレームレートでカメラが動作せず、破棄や複製を行って映像配信を実施している状態にあることを認識する。
If it is determined in step S412 that the frame has been duplicated or if it is determined in step S413 that the frame has been discarded, the
データ取得部204で取得した映像データは、映像出力部209によって映像符号化部103に渡される(ステップS416)。また、データ取得部204は、出力フレームカウンタ206のカウント値(出力フレームフレーム番号N)を取得したフレームの番号Mによって更新する(ステップS417)。
The video data acquired by the
カウント値の更新後、データ取得部204は、配信終了指示がなされたか否かを判断する(ステップS418)。配信終了指示がない場合は、ステップS402に戻り、タイマ205が次回イベントを発生するまで待機する。
After updating the count value, the
本実施例の映像符号化システムによれば、フレームレート調整部102において、フレームバッファ203における映像データの書き込みおよび読み出しがそれぞれ独立したタイミングで実行されるので、例えば、入力映像データのフレームレートが指定フレームレートより低い場合は、フレームの複製が行われ、反対に、入力映像データのフレームレートが指定フレームレートより高い場合は、フレームの破棄が行われる。これにより、入力映像データのフレームレートが指定フレームレートに変換される。このように、映像符号化部103が要求するフレームレート(指定フレームレート)とは異なるフレームレートでカメラデバイスから映像データが入力された場合は、フレームレート調整部102が、入力映像データのフレームレートを指定フレームレートに変換するので、映像符号化部103には、常に、指定フレームレートで映像データが供給される。よって、映像符号化部103の設定パラメータの変更は必要なく、また、符号化処理が停止する、といった不具合も生じない。また、伝送路の容量を超えた過大なビットストリームが出力されて、パケットロスによる画質劣化が発生する、といった不具合の発生も抑制される。
According to the video encoding system of the present embodiment, the frame
加えて、本実施例の映像符号化システムを利用する上で、カメラデバイスの選択の幅を広げることができる。 In addition, when using the video encoding system of the present embodiment, the range of camera device selection can be expanded.
さらに、映像符号化部103が要求するフレームレート(指定フレームレート)とは異なるフレームレートでカメラデバイスから映像データが入力され、フレームレート調整部103にて、フレームの破棄または複製が行なわれると、フレーム破棄複製判定部207にて、そのフレームの破棄または複製の実行が検知され、イベント通知部208が、そのことを示すイベント情報を外部に通知する。このイベント情報の通知により、ユーザは、入力映像データのフレームレートの異常を把握することが可能である。
Furthermore, when video data is input from the camera device at a frame rate different from the frame rate requested by the video encoding unit 103 (specified frame rate), and the frame
一般的に、MPEG−4やH.264等を用いるシステムでは、フレームレートを含む映像符号化パラメータを切り替える場合に、映像符号化部のリセットが必要になる。このリセット処理により、一時的に映像の配信が停止する。また、映像復号システム側では、配信再開後は、IピクチャやIDRピクチャを受信するまで、映像のデコードが開始できない。このため、通常は、カメラを切り替えた場合に、映像再生が途絶する区間が発生する。ここでは、そのような映像配信停止に伴う問題をも解決することのできる映像符号化システムについて説明する。 In general, MPEG-4 and H.264. In a system using H.264 or the like, the video encoding unit needs to be reset when switching video encoding parameters including a frame rate. This reset process temporarily stops video distribution. On the video decoding system side, after resuming distribution, video decoding cannot be started until an I picture or IDR picture is received. For this reason, usually, when the camera is switched, a section in which video reproduction is interrupted occurs. Here, a video encoding system capable of solving the problems associated with such video distribution stop will be described.
図6は、本発明の第2の実施例である映像符号化システムの主要部を示すブロック図である。 FIG. 6 is a block diagram showing the main part of a video encoding system according to the second embodiment of the present invention.
図6を参照すると、映像符号化システム600は、カメラデバイスを接続したコンピュータシステム上で動作する映像符号化システムであって、その主要部は、複数の映像取得部601〜603、カメラ選択部604、フレームレート調整部102、映像符号化部103、パケット化部104、送信部105から構成される。この映像符号化システム600は、第1の実施例の映像符号化システム100の機能に加えて、複数の映像取得部から選択的に映像データを取得するカメラ選択機能を備えており、ユーザからの指示により映像取得部を切り替えることが可能である。
Referring to FIG. 6, a
映像取得部601は、毎秒3フレームの動画を取得する能力を備える。映像取得部602は、毎秒17フレームの動画を取得する能力を備える。映像取得部603は、毎秒30フレームの動画を取得する能力を備える。なお、映像取得部の個数とフレームレートは、これに限定されるものではなく、適宜に変更することができる。
The
映像取得部601、602、603はそれぞれ、カメラ選択部604を介してフレームレート調整部102に接続されている。カメラ選択部604は、映像取得部601、602、603のうち、ユーザによって選択された映像取得部から出力された映像フレームをフレームレート調整部102に出力する切り替え機能を有する。カメラ選択部604は、選択されていない映像取得部の映像フレームを破棄する。ユーザは、コンピュータシステムの入力装置を通じて、映像取得部601、602、603のうちから所望の映像取得部を選択することができる。
Each of the
フレームレート調整部102は、カメラ選択部604から供給される映像フレームに対してフレームレートの調整処理を実施する。ユーザは、映像符号化部103での符号化の対象となる映像データのフレームレートの値を任意に設定することが可能であるが、ここでは、フレームレートの設定値は毎秒15フレームとする。ユーザによって設定されたフレームレート値は、フレームレート調整部102および映像符号化部103に供給される。
The frame
フレームレート調整部102によるフレームレート調整処理では、カメラ選択部604から供給される映像フレームと独立したタイミングで、映像フレームの破棄や複製が行われる。このフレームレート調整処理は、基本的には、第1の実施例で説明した映像フレーム入力処理(図4)および映像フレーム出力処理(図5)と同様であるが、映像取得部601が選択されている場合は、映像フレームの複製が行われ、映像取得部602または映像取得部603が選択されている場合は、映像フレームの破棄が行われる。これにより、カメラ選択部604から供給された映像データのフレームレートを、指定されたフレームレート(毎秒15フレーム)に変換することができる。
In the frame rate adjustment processing by the frame
映像符号化部103は、フレームレート調整部102で指定のフレームレートに変換された映像データを圧縮符号化し、ビットストリームに変換する処理を行う。圧縮符号化方式としては前述のMPEG−4やH.264などを用いる。
The
映像符号化部103に入力される映像フレームは、カメラ装置の切り替えに関係なく、毎秒15フレームのフレームレートに調整されているため、リセットの必要がない。よって、映像符号化部103は、符号化処理を正常に実施することができる。
The video frame input to the
パケット化部104は、映像符号化部103から出力されたビットストリームを伝送メディアに応じた最適なサイズに分割する。パケット化処理は、映像符号化形式と伝送メディアの種類によって決まる。MPEG−4形式の映像を伝送する場合は、IETF RFC3640によるRTPパケット分割方法を、H.264形式の映像を伝送する場合は、IETF RFC3984を、それぞれ用いるのが一般的である。
The
送信部105は、RTPパケットに分割された映像ストリームをIPネットワーク経由で映像復号システムに伝送する機能を持つ。RTPパケットは、UDP/IPプロトコルとソケットインターフェイスを用いて送出される。
The
本実施例の映像符号化システム600によれば、フレームレート調整部102が、カメラ切り替えに関係なく、指定されたフレームレート(例えば、毎秒15フレーム)で映像を出力するため、映像符号化部103にて、映像符号化パラメータを変更する必要がない。したがって、映像符号化システム600では、カメラ切り替えに関係なく、指定されたフレームレート(毎秒15フレーム)の映像の符号化を継続して行うことができる。その結果、映像復号システムでは、カメラ切り替えが行われた場合でも、遅延なく切り替わった映像を継続して再生することができる。
According to the
図7は、本発明の第3の実施例である映像符号化システムの主要部を示すブロック図である。 FIG. 7 is a block diagram showing the main part of a video encoding system according to the third embodiment of the present invention.
図7を参照すると、映像符号化システム700は、カメラデバイスを接続したコンピュータシステム上で動作する映像符号化システムであって、その主要部は、映像取得部101、フレームレート調整部701、映像符号化部103、パケット化部104、送信部105から構成される。この映像符号化システム700は、第1の実施例の映像符号化システム100の機能に加えて、フレームレート調整を実施した際のイベント通知を、ユーザに対してだけでなく、映像復号システム側に送出する映像データに合成する機能を備える。
Referring to FIG. 7, a
映像取得部101は、動画像の取得を行う機能ブロックであり、映像データをフレーム単位で出力する機能を備えている。使用するカメラデバイスは、デジタルカメラデバイスやアナログビデオカメラビデオキャプチャカードである。映像取得開始が指示された場合、映像取得部101は、事前に指定された映像サイズ(縦ピクセル数、横ピクセル数)、映像フォーマット、フレームレートに従い、自律的に動画像の取得を開始する。映像取得部101が出力した映像データは、フレームレート調整部701に渡される。
The
フレームレート調整部701は、映像取得部101から入力される映像データのフレームレートを指定されたフレームレートになるように調整するとともに、フレームレート調整時のフレームの破棄または複製を示すイベント通知を映像配信システム700及び映像復号システムを利用するユーザに通知する機能を持つ機能ブロックである。
The frame
映像符号化部103は、フレームレート調整部701からフレームレート調整が施された映像データを受け取り、該映像データを圧縮符号化してビットストリームに変換する機能ブロックである。圧縮符号化方式としては、MPEG−4、H.264、MotionJPEG等が利用される。
The
パケット化部104は、映像符号化部103から出力されたビットストリームを伝送メディアごとに最適なサイズに分割し、ヘッダを付加する機能を持つ。パケット化処理は、映像符号化形式と伝送メディアの種類によって規格化されている。IPネットワークを用いてMPEG−4、H.264、MotionJPEG形式の映像を伝送する場合、それぞれIETF RFC3640、3984、2435形式によるRTPパケット分割方法を用いる。
The
送信部105は、RTPパケットに分割された映像ストリームをIPネットワーク経由で映像復号システムに伝送する機能を持つ。RTPパケットは、UDP/IPプロトコルとソケットを用いて伝送される。
The
次に、フレームレート調整部701の詳細な内部構成について説明する。
Next, a detailed internal configuration of the frame
図8は、フレームレート調整部701の構成を示すブロック図である。図8を参照すると、フレームレート調整部701は、映像入力部201、入力フレームカウンタ202、フレームバッファ203、データ取得部204、タイマ205、出力フレームカウンタ206、フレーム破棄複製判定部207、イベント通知部208、メッセージ画像合成部801、映像出力部209から構成される。
FIG. 8 is a block diagram illustrating a configuration of the frame
フレームレート調整部701の動作において、映像フレームの破棄や複製が実施したかを判別する処理までは第1の実施例と同じである。以下に、フレームレート調整部701の処理の詳細について、映像フレームの破棄複製判定処理の後の動作を説明する。
The operation of the frame
フレーム破棄複製判定部207は、データ取得部204がフレームバッファ203のフレーム番号領域501から取得したフレーム番号Mと出力フレームカウンタ206が保持するフレーム番号Nの差を計算し、フレームの破棄、複製が実施されたかを判別する処理を行う。
The frame discard /
前回取り出したフレーム番号と今回取得したフレーム番号の差が1である場合は、フレームは正常に取得されていることを示す。両フレーム差が0の場合は、フレームの複製が実施されていることを示す。両フレーム差が2以上である場合は、フレームの破棄が実施されていることを示す。 If the difference between the previously extracted frame number and the currently acquired frame number is 1, it indicates that the frame has been acquired normally. When both frame differences are 0, it indicates that frame duplication is being performed. If the difference between the two frames is 2 or more, it indicates that the frame is being discarded.
フレーム破棄複製判定部207でフレームの破棄または複製が発生したと判定された場合は、イベント通知部208は、ユーザにその旨を通知する処理を実施する。また、イベント通知部208は、フレーム破棄複製判定部207での判定結果(正常、破棄、複製)をメッセージ画像合成部801に供給する。イベント通知の手段としては、ネットワークへのパケット送出、コールバック関数呼び出し等によって実現する。ネットワークへのパケット送出により、外部端末に対してイベントを通知することが可能となる。イベント通知を受け取ったシステムは、エラーメッセージの表示もしくは警告音の再生によってユーザにフレームの破棄複製が発生したことを知らせる。
When the frame discard /
データ取得部204がフレーム番号領域502から取得した映像データは、メッセージ画像合成部801に渡される。同時に、その映像データに関する判定結果(正常、破棄、複製)がイベント通知部208からメッセージ画像合成部801へ通知される。
The video data acquired by the
データ取得部204から供給される映像データが、正常に取得された映像データである場合、メッセージ画像合成部801は、その映像データをそのまま映像出力部209に供給する。データ取得部204から供給される映像データが、破棄または複製が実施された映像データである場合、メッセージ画像合成部801は、その映像データに、破棄または複製が実施されたことを示す情報を付与したメッセージ付き映像データを映像出力部209に供給する。
If the video data supplied from the
映像出力部209は、メッセージ画像合成部801から供給される映像データまたはメッセージ付き映像データを映像符号化部103に供給する。
The
次に、メッセージ画像合成部801の構成を具体的に説明する。
Next, the configuration of the message
図9は、メッセージ合成部801の構成を示すブロック図である。図9を参照すると、メッセージ画像合成部801は、映像入力部901、映像出力部902、映像フレームバッファ903および画像合成部905から構成される。
FIG. 9 is a block diagram showing the configuration of the
映像入力部901の入力には、データ取得部204から出力された映像データが供給される。映像入力部901は、データ取得部204から出力された映像データを画像合成部905に供給する。画像合成部905には、イベント通知部208からのイベント通知904が供給されている。イベント通知904は、データ取得部204が取得した映像データに関する判定結果(正常、破棄、複製)を示す。
The video data output from the
映像入力部901から供給される映像データが正常に取得されたものであることを示すイベント通知904が、イベント通知部208から画像合成部905に供給された場合は、画像合成部905は、画像合成処理を行わずに、映像入力部901から供給された映像データをそのまま映像出力部209に出力する。
When the
映像入力部901から供給される映像データが映像フレームの破棄または複製が実施された後の映像データである旨を示すイベント通知904が、イベント通知部208から画像合成部905に供給された場合は、画像合成部905は、フレームバッファ903上で、フレームレート異常を示すイベント図形906を生成するとともに、そのイベント図形906と映像入力部901から供給された映像データを合成する。そして、画像合成部905は、合成した映像データを映像出力部902に供給する。
When the
イベント図形906は、例えば文字列、図形、画像などから構成される。なお、イベント図形906は、あらかじめフレームバッファ903上に保持したり、イベント内容に合わせて逐次生成したりすることができる。また、イベント図形906は、必ずしも入力映像データに合成せず、別のプロトコルで伝送し、映像復号システム側で表示しても良い。
The event graphic 906 is composed of, for example, a character string, a graphic, and an image. Note that the event graphic 906 can be stored in advance on the
本実施例の映像符号化システム700によれば、フレームレート調整部701によってフレームレート調整が実施された場合に、入力映像に対する画像合成を実施することで、映像符号化システム700を利用するユーザだけでなく、映像復号システムで映像を見るユーザに対してもフレームレート調整の実施を通知することが可能となる。
According to the
以上説明した各実施例の映像符号化システムにおいて、各構成(機能ブロック)における動作は、プログラムしたがってコンピュータがそれら機能ブロックに対応する動作を実行することで実現すること可能である。プログラムは、予めコンピュータシステムにインストールされていても、CD−ROMやDVDに代表される記録媒体に格納されて供給されてもよい。また、プログラムは、インターネットに代表されるネットワークを通じて提供されてもよい。 In the video encoding system of each embodiment described above, the operation in each configuration (functional block) can be realized by the program, and thus the computer executing the operation corresponding to the functional block. The program may be installed in a computer system in advance or may be stored and supplied in a recording medium represented by a CD-ROM or DVD. The program may be provided through a network represented by the Internet.
本発明は、映像録画システム、映像監視システム等のカメラデバイスから映像フレームデータを取得して符号化するシステム全般に適用することができる。また、カメラデバイス以外の映像入力手段に対しても、利用可能である。 The present invention can be applied to all systems that acquire and encode video frame data from a camera device such as a video recording system and a video surveillance system. It can also be used for video input means other than camera devices.
100 映像符号化システム
101 映像取得部
102 フレームレート調整部
103 映像符号化部
104 パケット化部
105 送信部
201 映像入力部
202 入力フレームカウンタ
203 フレームバッファ
204 データ取得部
205 タイマ
206 出力フレームカウンタ
207 フレーム破棄複製判定部
208 イベント通知部
209 映像出力部
DESCRIPTION OF SYMBOLS 100
Claims (10)
前記フレームレート調整部で前記指定されたフレームレートへの変換が施された映像データを符号化する映像符号化部と、を有し、
前記フレームレート調整部は、前記入力映像データがフレーム単位に格納されるフレームバッファを備え、前記入力映像データのフレームレートによって決まるタイミングとは独立した、前記指定されたフレームレートによって決まるタイミングで、前記フレームバッファに格納された映像データを読み出す、ことを特徴とする映像符号化システム。 A frame rate adjustment unit that converts the frame rate of the input video data to a specified frame rate;
A video encoding unit that encodes the video data that has been converted to the designated frame rate by the frame rate adjustment unit;
The frame rate adjustment unit includes a frame buffer in which the input video data is stored in units of frames, and the timing determined by the designated frame rate is independent of the timing determined by the frame rate of the input video data. A video encoding system for reading video data stored in a frame buffer.
前記複数の映像取得部のいずれかを選択し、該選択した映像取得部が取得した映像データを前記入力映像データとして前記フレームレート調整部に供給する選択部と、をさらに有する、請求項1に記載の映像符号化システム。 A plurality of video acquisition units for acquiring video data from an external camera device;
The apparatus further comprises: a selection unit that selects any one of the plurality of video acquisition units and supplies the video data acquired by the selected video acquisition unit to the frame rate adjustment unit as the input video data. The video encoding system described.
1フレーム分の映像データが格納される映像データ領域と、
前記映像データ領域に格納された映像データのフレーム番号が格納されるフレーム番号領域と、を有し、
前記フレームレート調整部は、
前記入力映像データが当該フレームレート調整部に供給される度にカウント値が1つインクリメントされる入力フレームカウンタと、
前記入力映像データを、該映像データのフレームレートによって決まるタイミングで前記映像データ領域に書き込むとともに、該映像データのフレーム番号として前記入力フレームカウンタのカウント値を前記フレーム番号領域に書き込む映像入力部と、
前記指定されたフレームレートによって決まるタイミングで、前記映像データ領域に書き込まれた映像データおよび前記フレーム番号領域に書き込まれたフレーム番号を前記フレームバッファから読み出すデータ取得部と、
前記データ取得部が前記映像データ領域に格納された映像データおよび前記フレーム番号領域に格納されたフレーム番号を前記フレームバッファから読み出すと、該読み出したフレーム番号を、次回の前記データ取得部による読み出しが行われるまで保持する出力フレームカウンタと、
前記データ取得部が読み出した映像データについて、前記データ取得部が今回読み出した当該映像データのフレーム番号と、前記出力フレームカウンタに保持されている、前記データ取得部が前回読み出した映像データのフレーム番号との差に基づいて、フレームの破棄または複製が実施されたか否かを判定するフレーム破棄複製判定部と、
前記フレーム破棄複製判定部で前記フレームの破棄または複製が施された後のデータであると判断された場合に、その旨を示すイベント情報を外部に通知するイベント通知部と、をさらに有する、請求項1から3のいずれか1項に記載の映像符号化システム。 The frame buffer is
A video data area in which video data for one frame is stored;
A frame number area in which a frame number of video data stored in the video data area is stored;
The frame rate adjustment unit
An input frame counter whose count value is incremented by one each time the input video data is supplied to the frame rate adjustment unit;
Writing the input video data in the video data area at a timing determined by the frame rate of the video data, and writing a count value of the input frame counter in the frame number area as a frame number of the video data;
A data acquisition unit that reads out the video data written in the video data area and the frame number written in the frame number area from the frame buffer at a timing determined by the designated frame rate;
When the data acquisition unit reads the video data stored in the video data area and the frame number stored in the frame number area from the frame buffer, the read frame number is read by the data acquisition unit next time. An output frame counter to hold until done,
For the video data read by the data acquisition unit, the frame number of the video data read by the data acquisition unit this time and the frame number of the video data read by the data acquisition unit previously held in the output frame counter A frame discard / duplication determination unit that determines whether or not a frame is discarded or duplicated based on the difference between
An event notification unit for notifying event information indicating the fact to the outside when the frame discard / duplication determination unit determines that the data is after the frame has been discarded or copied. Item 4. The video encoding system according to any one of Items 1 to 3.
前記データ取得部が、前記タイマで決定した読み出しタイミングで、前記映像データ領域に書き込まれた映像データおよび前記フレーム番号領域に書き込まれたフレーム番号を前記フレームバッファから読み出す、請求項4に記載の映像符号化システム。 The frame rate adjustment unit further includes a timer for determining the read timing of video data from the frame buffer based on the designated frame rate,
5. The video according to claim 4, wherein the data acquisition unit reads the video data written in the video data area and the frame number written in the frame number area from the frame buffer at a read timing determined by the timer. Encoding system.
前記映像符号化部は、前記画像合成部で合成された映像データを符号化する、請求項4に記載の映像符号化システム。 The frame rate adjustment unit combines the video data and the image data indicating the event information with respect to the video data notified of the event information by the event notification unit among the video data read by the data acquisition unit. It further has a synthesis unit,
The video encoding system according to claim 4, wherein the video encoding unit encodes the video data combined by the image combining unit.
前記フレームレート調整ステップで前記指定されたフレームレートへの変換が施された映像データを符号化する映像符号化ステップと、を有し、
前記フレームレート調整ステップは、
前記入力映像データをフレーム単位にフレームバッファに格納するステップと、
前記入力映像データのフレームレートによって決まるタイミングとは独立した、前記指定されたフレームレートによって決まるタイミングで、前記フレームバッファに格納された映像データを読み出すステップと、を含む、映像符号化方法。 A frame rate adjustment step for converting the frame rate of the input video data to a specified frame rate;
A video encoding step that encodes the video data that has been converted to the designated frame rate in the frame rate adjustment step;
The frame rate adjustment step includes:
Storing the input video data in a frame buffer in units of frames;
And a step of reading the video data stored in the frame buffer at a timing determined by the designated frame rate independent of a timing determined by the frame rate of the input video data.
前記入力映像データが供給される度に入力フレームカウンタのカウント値を1つインクリメントするステップと、
前記入力映像データを、該映像データのフレームレートによって決まるタイミングで前記フレームバッファの映像データ領域に書き込むとともに、該映像データのフレーム番号として前記入力フレームカウンタのカウント値を前記フレームバッファのフレーム番号領域に書き込むステップと、
前記指定されたフレームレートによって決まるタイミングで、前記映像データ領域に書き込まれた映像データおよび前記フレーム番号領域に書き込まれたフレーム番号を前記フレームバッファから読み出すステップと、
前記映像データ領域に格納された映像データおよび前記フレーム番号領域に格納されたフレーム番号を前記フレームバッファから読み出すと、該読み出したフレーム番号を、次回の読み出しが行われるまで出力フレームカウンタで保持するステップと、
前記映像データ領域から読み出した映像データについて、今回取得した当該映像データのフレーム番号と、前記出力フレームカウンタに保持されている、前回取得した映像データのフレーム番号との差に基づいて、フレームの破棄または複製が実施されたか否かを判定するステップと、
前記フレームの破棄または複製が実施されたと判断した場合に、その旨を示すイベント情報を外部に通知するステップと、をさらに含む、請求項7に記載の映像符号化方法。 The frame rate adjustment step includes:
Incrementing the count value of the input frame counter by one each time the input video data is supplied;
The input video data is written into the video data area of the frame buffer at a timing determined by the frame rate of the video data, and the count value of the input frame counter is stored in the frame number area of the frame buffer as the frame number of the video data. Writing step;
Reading the video data written in the video data area and the frame number written in the frame number area from the frame buffer at a timing determined by the designated frame rate;
When the video data stored in the video data area and the frame number stored in the frame number area are read from the frame buffer, the read frame number is held in an output frame counter until the next reading is performed. When,
For the video data read from the video data area, the frame is discarded based on the difference between the frame number of the video data acquired this time and the frame number of the video data acquired last time held in the output frame counter. Or determining whether duplication has been performed;
The video encoding method according to claim 7, further comprising a step of notifying the outside of event information indicating that when it is determined that the frame is discarded or duplicated.
前記フレームレート調整処理で前記指定されたフレームレートへの変換が施された映像データを符号化する映像符号化処理と、をコンピュータに実行させるプログラムであって、
前記フレームレート調整処理において、
前記入力映像データをフレーム単位にフレームバッファに格納する処理と、
前記入力映像データのフレームレートによって決まるタイミングとは独立した、前記指定されたフレームレートによって決まるタイミングで、前記フレームバッファに格納された映像データを読み出す処理と、を前記コンピュータに実行させるプログラム。 A frame rate adjustment process for converting the frame rate of the input video data to a specified frame rate;
A program for causing a computer to execute video encoding processing for encoding video data that has been converted to the specified frame rate in the frame rate adjustment processing,
In the frame rate adjustment process,
Storing the input video data in a frame buffer in units of frames;
A program for causing the computer to execute a process of reading video data stored in the frame buffer at a timing determined by the designated frame rate independent of a timing determined by a frame rate of the input video data.
前記入力映像データが前記映像データ領域に書き込まれる度に入力フレームカウンタのカウント値を1つインクリメントする処理と、
前記入力映像データを、該映像データのフレームレートによって決まるタイミングで前記フレームバッファの映像データ領域に書き込むとともに、該映像データのフレーム番号として前記入力フレームカウンタのカウント値を前記フレームバッファのフレーム番号領域に書き込む処理と、
前記指定されたフレームレートによって決まるタイミングで、前記映像データ領域に書き込まれた映像データおよび前記フレーム番号領域に書き込まれたフレーム番号を前記フレームバッファから読み出す処理と、
前記映像データ領域に格納された映像データおよび前記フレーム番号領域に格納されたフレーム番号を前記フレームバッファから読み出すと、該読み出したフレーム番号を、次回の読み出しが行われるまで出力フレームカウンタで保持する処理と、
前記映像データ領域から読み出した映像データについて、今回取得した映像データのフレーム番号と、前記出力フレームカウンタに保持されている、前回取得した映像データのフレーム番号との差に基づいて、フレームの破棄または複製が実施されたか否かを判定する処理と、
前記フレームの破棄または複製が実施されたと判断した場合に、その旨を示すイベント情報を外部に通知する処理と、を前記コンピュータにさらに実行させる、請求項9に記載のプログラム。 In the frame rate adjustment process,
A process of incrementing the count value of the input frame counter by one each time the input video data is written to the video data area;
The input video data is written into the video data area of the frame buffer at a timing determined by the frame rate of the video data, and the count value of the input frame counter is stored in the frame number area of the frame buffer as the frame number of the video data. Writing process,
A process of reading the video data written in the video data area and the frame number written in the frame number area from the frame buffer at a timing determined by the designated frame rate;
When the video data stored in the video data area and the frame number stored in the frame number area are read from the frame buffer, the read frame number is held in the output frame counter until the next reading is performed. When,
For the video data read from the video data area, based on the difference between the frame number of the video data acquired this time and the frame number of the video data acquired last time held in the output frame counter, A process for determining whether or not duplication has been performed;
The program according to claim 9, wherein when it is determined that the frame is discarded or duplicated, the computer further executes a process of notifying event information indicating the fact to the outside.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007049232A JP4826798B2 (en) | 2007-02-28 | 2007-02-28 | Video encoding system, method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007049232A JP4826798B2 (en) | 2007-02-28 | 2007-02-28 | Video encoding system, method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008219070A true JP2008219070A (en) | 2008-09-18 |
JP4826798B2 JP4826798B2 (en) | 2011-11-30 |
Family
ID=39838653
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007049232A Expired - Fee Related JP4826798B2 (en) | 2007-02-28 | 2007-02-28 | Video encoding system, method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4826798B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012510653A (en) * | 2008-12-01 | 2012-05-10 | ノーテル・ネットワークス・リミテッド | Method and apparatus for providing a video representation of a three-dimensional computer generated virtual environment |
KR20200082466A (en) * | 2018-12-28 | 2020-07-08 | 국방과학연구소 | Method for processing and tracking video data from EO-IR camera installed in unmanned aerial vehicle and system thereof |
CN114449309A (en) * | 2022-02-14 | 2022-05-06 | 杭州登虹科技有限公司 | Moving picture playing method for cloud directing |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0998372A (en) * | 1995-10-03 | 1997-04-08 | Canon Inc | Recording and reproducing device |
JPH11112937A (en) * | 1997-10-02 | 1999-04-23 | Sony Corp | Video-audio synchronization method and video audio signal recording and reproducing device |
JP2003018545A (en) * | 2001-06-29 | 2003-01-17 | Toshiba Corp | Multichannel recording equipment, multichannel recording method, multichannel reproducing equipment and multichannel reproducing method |
JP2004023172A (en) * | 2002-06-12 | 2004-01-22 | Monolith Co Ltd | Device for adjusting reproducing time, recorder provided with its adjustment function and frame rate converting device for converting video frame period |
JP2005175582A (en) * | 2003-12-08 | 2005-06-30 | Nec Micro Systems Ltd | Encoder and encoding method |
JP2005236803A (en) * | 2004-02-20 | 2005-09-02 | Sony Corp | Image compression device |
JP2005328487A (en) * | 2004-05-17 | 2005-11-24 | Seiko Epson Corp | Image data compression device, electronic apparatus, and image data compression method |
-
2007
- 2007-02-28 JP JP2007049232A patent/JP4826798B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0998372A (en) * | 1995-10-03 | 1997-04-08 | Canon Inc | Recording and reproducing device |
JPH11112937A (en) * | 1997-10-02 | 1999-04-23 | Sony Corp | Video-audio synchronization method and video audio signal recording and reproducing device |
JP2003018545A (en) * | 2001-06-29 | 2003-01-17 | Toshiba Corp | Multichannel recording equipment, multichannel recording method, multichannel reproducing equipment and multichannel reproducing method |
JP2004023172A (en) * | 2002-06-12 | 2004-01-22 | Monolith Co Ltd | Device for adjusting reproducing time, recorder provided with its adjustment function and frame rate converting device for converting video frame period |
JP2005175582A (en) * | 2003-12-08 | 2005-06-30 | Nec Micro Systems Ltd | Encoder and encoding method |
JP2005236803A (en) * | 2004-02-20 | 2005-09-02 | Sony Corp | Image compression device |
JP2005328487A (en) * | 2004-05-17 | 2005-11-24 | Seiko Epson Corp | Image data compression device, electronic apparatus, and image data compression method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012510653A (en) * | 2008-12-01 | 2012-05-10 | ノーテル・ネットワークス・リミテッド | Method and apparatus for providing a video representation of a three-dimensional computer generated virtual environment |
KR20200082466A (en) * | 2018-12-28 | 2020-07-08 | 국방과학연구소 | Method for processing and tracking video data from EO-IR camera installed in unmanned aerial vehicle and system thereof |
KR102163697B1 (en) * | 2018-12-28 | 2020-10-08 | 국방과학연구소 | Method for compensating delayed video data from EO-IR camera installed in unmanned aerial vehicle and system thereof |
CN114449309A (en) * | 2022-02-14 | 2022-05-06 | 杭州登虹科技有限公司 | Moving picture playing method for cloud directing |
CN114449309B (en) * | 2022-02-14 | 2023-10-13 | 杭州登虹科技有限公司 | Dynamic diagram playing method for cloud guide |
Also Published As
Publication number | Publication date |
---|---|
JP4826798B2 (en) | 2011-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102324326B1 (en) | Streaming multiple encodings encoded using different encoding parameters | |
US5910827A (en) | Video signal decoding arrangement and method for improved error concealment | |
JP4670902B2 (en) | Transmitting apparatus, transmitting method, and receiving apparatus | |
US8184636B2 (en) | Information processing device and method, and computer readable medium for packetizing and depacketizing data | |
JP2007208458A (en) | System, terminal, and method for communication | |
JP2003230117A (en) | Transmission system, transmission device, transmission scheme and transmission method for dynamic image data | |
US9226003B2 (en) | Method for transmitting video signals from an application on a server over an IP network to a client device | |
JP4826798B2 (en) | Video encoding system, method and program | |
US7403566B2 (en) | System, computer program product, and method for transmitting compressed screen images from one computer to another or many computers | |
JP4488958B2 (en) | Video transmission system and video transmission method | |
JP2007288604A (en) | System and method for transmitting video | |
US20100104009A1 (en) | Methods and systems for improving network response during channel change | |
JP2018152656A (en) | Transmission apparatus, video distribution apparatus, video coding apparatus, and transmission method | |
WO2017076913A1 (en) | Upgraded image streaming to legacy and upgraded displays | |
US20150009275A1 (en) | Video display apparatus, video display method, and computer program product | |
JP2004349743A (en) | Video stream switching system, method, and video image monitoring and video image distribution system including video stream switching system | |
JP2008131264A (en) | Monitor camera, image recording/display apparatus and monitor camera system | |
JP2005072879A (en) | Remote image monitoring system | |
KR101652095B1 (en) | Realtime remote monitoring and playing system using digital video recoder, and method thereof | |
US20230034162A1 (en) | Transmission apparatus and transmission method | |
JP2014103534A (en) | Image transmission device | |
JP2006262205A (en) | Encoder, codec method, and network transmission system | |
US20100031302A1 (en) | Stream distribution system, stream receiving device, and stream reproduction method | |
JP2012169694A (en) | Teleconference system, conference controller, teleconference method, and conference control method | |
JP2011078068A (en) | System for video transmission |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100119 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101215 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110104 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110302 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110817 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110830 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140922 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |