JP2008219070A - Video encoding system, method and program - Google Patents

Video encoding system, method and program Download PDF

Info

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
Application number
JP2007049232A
Other languages
Japanese (ja)
Other versions
JP4826798B2 (en
Inventor
Kazuo Asami
和男 浅見
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2007049232A priority Critical patent/JP4826798B2/en
Publication of JP2008219070A publication Critical patent/JP2008219070A/en
Application granted granted Critical
Publication of JP4826798B2 publication Critical patent/JP4826798B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a video encoding system capable of converting the frame rate of input video data to a frame rate suitable for video encoding. <P>SOLUTION: The video encoding system 100 is provided with a frame rate adjusting part 102 for converting the frame rate of the input video data to a specified frame rate and a video encoding part 103 for encoding the video data subjected to frame rate conversion in the frame rate adjusting part 102. The frame rate adjusting part 102 is provided with a frame buffer where the input video data are stored by a frame unit, and reads the video data stored in the frame buffer at a timing determined by the specified frame rate, which independent of a timing determined by the frame rate of the input video data. <P>COPYRIGHT: (C)2008,JPO&INPIT

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 Patent Document 1. In this video encoding system, a video signal acquired from a video camera is compressed by an encoder, packetized, and then sent out to a playback side terminal using UDP (User Datagram Protocol).

この種の映像符号化システムは、カメラ装置、映像符号化装置、パケット化装置および送信装置から構成される。以下に、その動作を簡単に説明する。   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.

パケット化装置は、映像符号化装置から供給されたビットストリームを伝送メディアに適したサイズに分割してパケット化する。パケット化されたビデオデータは、送信装置に供給される。送信装置は、パケット化装置から供給されたビデオデータを、ネットワークを介して再生側端末に向けて送出する。
特開2005-277950号公報(第38頁、図5)
The packetizing apparatus divides the bit stream supplied from the video encoding apparatus into a size suitable for the transmission medium and packetizes it. The packetized video data is supplied to the transmission device. The transmitting device sends the video data supplied from the packetizing device to the playback terminal via the network.
JP 2005-277950 A (page 38, Fig. 5)

カメラ装置には様々な機種があり、出力可能なフレームレートには差異がある。また、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 video acquisition unit 101, a frame rate adjustment unit 102, a video code, and the like. And a packetizing unit 104 and a transmitting unit 105. Computer systems include storage devices that store programs and data, input devices such as keyboards and mice, display devices such as CRTs and LCDs, communication devices such as modems that communicate with the outside, output devices such as printers, and input devices. It is comprised from the control apparatus which receives the input from and controls operation | movement of a communication apparatus, an output device, and a display apparatus. The user activates the video encoding system or gives instructions and settings necessary for operating the video encoding system through the input device.

映像取得部101は、カメラデバイスからの映像データ(動画像)の取得を行う機能ブロックである。映像取得部101は、映像データをカメラデバイスから取得してフレーム単位で出力する機能を備えている。映像フレームのフォーマットは、通常、YUVビットマップ形式であるが、これに代えてRGBビットマップ形式を用いても良い。YUVビットマップ形式は、輝度信号(Y)と、輝度信号と赤色成分の差(U)、輝度信号と青色成分の差(V)の3つの情報で色を表す形式である。   The video acquisition unit 101 is a functional block that acquires video data (moving images) from a camera device. The video acquisition unit 101 has a function of acquiring video data from the camera device and outputting it in units of frames. The format of the video frame is usually the YUV bitmap format, but an RGB bitmap format may be used instead. The YUV bitmap format is a format in which a color is represented by three pieces of information: a luminance signal (Y), a difference (U) between the luminance signal and the red component, and a difference (V) between the luminance signal and the blue component.

また、カメラデバイスとしては、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 video acquisition unit 101 autonomously starts moving image acquisition in accordance with the video size (number of vertical pixels and horizontal pixels), video format, and frame rate specified in advance. The video data output from the video acquisition unit 101 is passed to the frame rate adjustment unit 102.

フレームレート調整部102は、映像取得部101から入力される映像データのフレームレートを監視し、そのフレームレートと指定されたフレームレートの差異を検出して調整する機能ブロックである。フレームレート調整部102でフレームレート調整が施された映像データは、映像符号化部103に渡される。   The frame rate adjustment unit 102 is a functional block that monitors the frame rate of the video data input from the video acquisition unit 101 and detects and adjusts the difference between the frame rate and the designated frame rate. The video data that has been subjected to the frame rate adjustment by the frame rate adjustment unit 102 is passed to the video encoding unit 103.

映像符号化部103は、フレームレート調整部102から入力されたフレームレート調整後の映像データに対して、圧縮符号化を実施してビットストリームに変換する機能ブロックである。圧縮符号化方式としては、MPEG−4やH.264等の動画像を圧縮するためのフレーム内、フレーム間符号化方式を利用することができる。   The video encoding unit 103 is a functional block that performs compression encoding on the video data after the frame rate adjustment input from the frame rate adjustment unit 102 and converts the video data into a bit stream. Examples of compression encoding methods include MPEG-4 and H.264. Intra-frame and inter-frame coding schemes for compressing moving images such as H.264 can be used.

映像符号化部103へ設定するパラメータは、入力映像のフレームレートとビットレートである。映像符号化部103は、出力ビットストリームを指定ビットレート以下に抑えるための、量子化スケール制御を実施して、入力映像データの符号化処理を実施する。符号化方式としては、MotionJPEGなどのフレーム内符号化のみ行う静止画用圧縮技術を応用した方式を用いることができる。映像符号化部103の出力ビットストリームは、パケット化部104に渡される。   Parameters set in the video encoding unit 103 are the frame rate and bit rate of the input video. The video encoding unit 103 performs quantization scale control for suppressing the output bit stream to a specified bit rate or less, and performs input video data encoding processing. As an encoding method, a method applying a still image compression technique that performs only intra-frame encoding such as Motion JPEG can be used. The output bit stream of the video encoding unit 103 is passed to the packetizing unit 104.

パケット化部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 packetizing unit 104 is a functional block that divides the bit stream output from the video encoding unit 103 into an optimal size for each transmission medium and adds a header. In packetization processing in video distribution, RTP (RealTime Transport Protocol) defined by IETF RFC3550 is usually used. RTP can add information necessary for real-time streaming such as payload type, sequence number, sender identifier, and time information to the header. More detailed packet division methods and header definitions are standardized for each video encoding format. In the case of transmitting MPEG-4 format video, the RTP packet segmentation method according to IETF RFC3640 is referred to as H.264. In the H.264 format, IETF RFC3984 can be used, and in the Motion JPEG format, IETF RFC2435 can be used. The video stream divided into RTP packets by the packetizing unit 104 is passed to the transmitting unit 105.

送信部105は、パケット化部104からのRTPパケットに分割された映像ストリームをIPネットワーク経由で映像復号システムに伝送する機能ブロックである。RTPパケットは、UDP/IPプロトコルとソケットを用いて伝送される。   The transmission unit 105 is a functional block that transmits the video stream divided into RTP packets from the packetizing unit 104 to the video decoding system via the IP network. The RTP packet is transmitted using a UDP / IP protocol and a socket.

次に、フレームレート調整部102の詳細な内部構成について説明する。   Next, a detailed internal configuration of the frame rate adjustment unit 102 will be described.

図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 rate adjustment unit 102. Referring to FIG. 2, the frame rate adjustment unit 102 includes a video input unit 201, an input frame counter 202, a frame buffer 203, a data acquisition unit 204, a timer 205, an output frame counter 206, a frame discard / duplication determination unit 207, and an event notification unit. 208 and a video output unit 209.

ユーザは、映像符号化システム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 video acquisition unit 101 before giving a distribution start instruction to the video encoding system 100. The frame rate setting set for the video acquisition unit 101 is also applied to the frame rate adjustment unit 102 and the video encoding unit 103. Based on this set value, the frame rate adjustment unit 102 sets the write / read timing in the frame buffer 203 and the interval of the timer 205.

映像入力部201は、映像取得部101の映像データの出力タイミング(これは、カメラデバイスから入力される映像データのフレームレートによって決まる)で呼び出される。映像入力部201は、映像取得部101から受け取った映像データを入力フレームカウンタ202から取得したフレーム番号と共にフレームバッファ203に書き込む処理を行う。   The video input unit 201 is called at the video data output timing of the video acquisition unit 101 (this is determined by the frame rate of the video data input from the camera device). The video input unit 201 performs a process of writing the video data received from the video acquisition unit 101 into the frame buffer 203 together with the frame number acquired from the input frame counter 202.

入力フレームカウンタ202は、フレームレート調整部102内に入力された映像データのフレームの数をカウントするものであって、映像データが入力される度にカウント値が1つインクリメントされる。入力フレームカウンタ202は、そのカウント値Lがフレーム番号として保持される。カウント値Lの初期値は1とし、映像入力部201から要求されたときに内部で保持しているカウンタ値Lを映像入力部201に渡す。   The input frame counter 202 counts the number of frames of video data input into the frame rate adjustment unit 102, and the count value is incremented by one each time video data is input. The input frame counter 202 holds the count value L as a frame number. The initial value of the count value L is 1, and when requested by the video input unit 201, the counter value L held internally is passed to the video input unit 201.

フレームバッファ203は、1映像フレームを保存する領域である映像データ領域と、入力フレーム番号を保存する領域とを持つメモリである。図3に、フレームバッファ203のメモリ領域を模式的に示す。この例では、フレームバッファ203は、フレーム番号領域501、映像データ領域502および同期フラグ503からなるメモリ領域を有する。   The frame buffer 203 is a memory having a video data area that stores one video frame and an area that stores an input frame number. FIG. 3 schematically shows the memory area of the frame buffer 203. In this example, the frame buffer 203 has a memory area including a frame number area 501, a video data area 502, and a synchronization flag 503.

映像入力部201は、フレーム単位に入力された映像データを映像データ領域502に、フレーム番号をフレーム番号領域501に上書きする。フレームバッファ203は、上書きされるまでは、同じデータを保持する。同期フラグ503は、フレーム番号領域501と映像データ領域502へのアクセスを排他制御するためのものである。映像入力部201が、フレームバッファ203を操作する際に、同期フラグ503を有効化することで、データ取得部204のフレームバッファ203に対する操作を待機させることが可能になる。反対に、データ取得部204が、フレームバッファ203を操作する際に、同期フラグ503を有効化することで、映像入力部201のフレームバッファ203に対する操作を待機させることが可能になる。   The video input unit 201 overwrites video data input in frame units in the video data area 502 and overwrites the frame number in the frame number area 501. The frame buffer 203 holds the same data until overwritten. The synchronization flag 503 is used to exclusively control access to the frame number area 501 and the video data area 502. By enabling the synchronization flag 503 when the video input unit 201 operates the frame buffer 203, it is possible to make the operation for the frame buffer 203 of the data acquisition unit 204 stand by. On the other hand, when the data acquisition unit 204 operates the frame buffer 203, the synchronization flag 503 is validated, so that the operation of the video input unit 201 on the frame buffer 203 can be put on standby.

データ取得部204は、映像データ領域502から映像データを、フレーム番号領域501からフレーム番号をコピーして取り出す処理を行う。データ取得部204によるデータ取得は、タイマ205によって定期的に指示され、フレームバッファ203への書き込みタイミング(映像入力タイミング)とは独立したタイミングで実施される。データ取得部204は、フレームバッファ203からの映像データの読み出し処理を行う前に、バッファの排他制御を実施するため、同期フラグ503を有効にしてロックをかける。その後、データ取得部204は、フレーム番号領域501および映像データ領域502からフレーム番号および映像データを取得する。フレーム番号および映像データの取得が完了した後、データ取得部204は、同期フラグ503を無効にしてロックを解除する。   The data acquisition unit 204 performs processing for copying video data from the video data area 502 and copying the frame number from the frame number area 501. Data acquisition by the data acquisition unit 204 is periodically instructed by the timer 205, and is performed at a timing independent of the timing of writing to the frame buffer 203 (video input timing). The data acquisition unit 204 activates and locks the synchronization flag 503 in order to perform exclusive control of the buffer before performing video data read processing from the frame buffer 203. Thereafter, the data acquisition unit 204 acquires a frame number and video data from the frame number area 501 and the video data area 502. After the acquisition of the frame number and video data is completed, the data acquisition unit 204 invalidates the synchronization flag 503 and releases the lock.

フレームレート調整部102をソフトウェアとして実装する場合は、データ取得部204を映像取得部101とは別のプロセスやスレッドとして動作させ、同期フラグ503をミューテックスやセマフォといった同期オブジェクトとして実現する。   When the frame rate adjustment unit 102 is implemented as software, the data acquisition unit 204 is operated as a process or thread different from the video acquisition unit 101, and the synchronization flag 503 is realized as a synchronization object such as a mutex or a semaphore.

タイマ205は、データ取得部204におけるデータ取得処理を実施するタイミングを決定するインターバルタイマである。タイマ間隔は、ユーザにより指定されるフレームレートにより決定される。   The timer 205 is an interval timer that determines the timing for performing the data acquisition process in the data acquisition unit 204. The timer interval is determined by the frame rate specified by the user.

出力フレームカウンタ206は、データ取得部204がフレームバッファ203から取得した映像データのフレーム番号を、データ取得部204による次回の読み出しまで保持する。   The output frame counter 206 holds the frame number of the video data acquired from the frame buffer 203 by the data acquisition unit 204 until the next reading by the data acquisition unit 204.

フレーム破棄複製判定部207は、データ取得部204が取得した映像データについて、データ取得部204が取得したフレーム番号Mと出力フレームカウンタ206が保持するフレーム番号(データ取得部204が前回取得したフレーム番号)の差を計算し、その差に基づいてフレームの破棄、複製が実施されたかを判別する処理を行う。前回取り出したフレーム番号と今回取得したフレーム番号の差が1である場合、フレーム破棄複製判定部207は、フレームが正常に取得されていると判定する。前回取り出したフレーム番号と今回取得したフレーム番号の差が1でない場合は、フレーム破棄複製判定部207は、フレームの破棄または複製が実施されていると判定する。具体的には、前回取り出したフレーム番号と今回取得したフレーム番号の差が0の場合は、フレームの複製が実施されたと判定する。前回取り出したフレーム番号と今回取得したフレーム番号の差が2以上である場合は、フレームの破棄が実施されたと判定する。   For the video data acquired by the data acquisition unit 204, the frame discard duplication determination unit 207 includes the frame number M acquired by the data acquisition unit 204 and the frame number held by the output frame counter 206 (the frame number previously acquired by the data acquisition unit 204). ) And a process for determining whether or not the frame is discarded or duplicated based on the difference. When the difference between the previously extracted frame number and the currently acquired frame number is 1, the frame discard duplication determination unit 207 determines that the frame has been acquired normally. If the difference between the previously extracted frame number and the currently acquired frame number is not 1, the frame discard / duplication determination unit 207 determines that the frame is discarded or duplicated. Specifically, if the difference between the previously extracted frame number and the currently acquired frame number is 0, it is determined that the frame has been duplicated. When the difference between the previously extracted frame number and the currently acquired frame number is 2 or more, it is determined that the frame has been discarded.

イベント通知部208は、フレーム破棄複製判定部207でフレームの破棄または複製の実施がなされたことが検知された場合に、ユーザにその旨を通知する処理を実施する。イベント通知の手段として、メッセージ送出、パケットの送出、コールバック関数呼び出し等を用い、ユーザに対してエラーメッセージの表示もしくは警告音を再生する。   When the frame discard / duplication determination unit 207 detects that the frame is discarded or duplicated, the event notification unit 208 performs a process of notifying the user of that fact. As an event notification means, message transmission, packet transmission, callback function call, or the like is used to display an error message or play a warning sound to the user.

映像出力部209は、データ取得部204から供給される映像データを映像符号化部103に供給する。   The video output unit 209 supplies the video data supplied from the data acquisition unit 204 to the video encoding unit 103.

次に、映像符号化システムの動作について説明する。   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 rate adjustment unit 102. Hereinafter, the video frame input process will be described in detail with reference to FIG. 1, FIG. 2, and FIG.

まず、配信開始指示によって入力フレームカウンタ202のカウント値Lが1に初期化される(ステップS301)。その後、映像入力部201は、映像取得部101から映像データが入力されるまで待機する(ステップS302)。   First, the count value L of the input frame counter 202 is initialized to 1 by a distribution start instruction (step S301). Thereafter, the video input unit 201 stands by until video data is input from the video acquisition unit 101 (step S302).

映像データが映像入力部201に供給されると、映像入力部201は、データ取得部204によってフレームバッファ203の同期フラグ503が有効化されていないかを調べる(ステップS303)。同期フラグ503が有効化されている場合は、フレームバッファ203がデータ取得部204によってロックされているため、映像入力部201は、同期フラグ503が無効化されるまで待機する。   When the video data is supplied to the video input unit 201, the video input unit 201 checks whether the synchronization flag 503 of the frame buffer 203 is activated by the data acquisition unit 204 (step S303). When the synchronization flag 503 is enabled, the video input unit 201 waits until the synchronization flag 503 is disabled because the frame buffer 203 is locked by the data acquisition unit 204.

フレームバッファ203の同期フラグ503が無効化されたことを確認した後、映像入力部201は、映像入力処理に伴うフレームバッファ203に対するアクセスに先立ち、フレームバッファ203をロックするため、同期フラグ503を有効化する(ステップS304)。これにより、フレームバッファ203が映像入力部201によってロックされる。   After confirming that the synchronization flag 503 of the frame buffer 203 has been invalidated, the video input unit 201 enables the synchronization flag 503 to lock the frame buffer 203 prior to accessing the frame buffer 203 associated with video input processing. (Step S304). As a result, the frame buffer 203 is locked by the video input unit 201.

フレームバッファ203をロックした後、映像入力部201は、入力フレームカウンタ202から取得したカウンタ値Lをフレームバッファ203のフレーム番号領域に上書きするとともに、供給された映像データをフレームバッファ203の映像データ領域に上書する(ステップS305、S306)。   After locking the frame buffer 203, the video input unit 201 overwrites the frame number area of the frame buffer 203 with the counter value L acquired from the input frame counter 202, and also supplies the supplied video data to the video data area of the frame buffer 203. (Steps S305 and S306).

続いて、映像入力部201は、映像入力処理のためロックしていたフレームバッファ203の同期フラグ503を無効化する(ステップS307)。これにより、フレームバッファ203はアンロックの状態となる。   Subsequently, the video input unit 201 invalidates the synchronization flag 503 of the frame buffer 203 that has been locked for the video input process (step S307). As a result, the frame buffer 203 is unlocked.

フレームバッファ203をアンロックとした後、映像入力部201は、入力フレームカウンタ202のカウント値Lに1を加算する(ステップS308)。そして、映像入力部201は、配信終了指示がなされたか否かを判断する(ステップS309)。配信終了指示がない場合は、ステップS302に戻り、次回の映像データ入力まで待機する。   After the frame buffer 203 is unlocked, the video input unit 201 adds 1 to the count value L of the input frame counter 202 (step S308). Then, the video input unit 201 determines whether or not a distribution end instruction has been made (step S309). If there is no distribution end instruction, the process returns to step S302 and waits until the next video data input.

(映像フレーム出力処理)
図5は、フレームレート調整部102にて行われる映像フレーム出力処理を示すフローチャートである。以下、図1、図2および図5を参照して映像フレーム出力処理を具体的に説明する。
(Video frame output processing)
FIG. 5 is a flowchart showing a video frame output process performed by the frame rate adjustment unit 102. Hereinafter, the video frame output process will be described in detail with reference to FIGS. 1, 2, and 5.

配信開始指示によって出力フレームカウンタ206のカウント値(フレーム番号N)を0に初期化する(ステップS401)。タイマ205は、ユーザからの要求フレームレートで設定されたインターバルでイベントを発行する。データ取得部204は、タイマ205からイベントが発行されるまで待機する(ステップS402)。   In response to the distribution start instruction, the count value (frame number N) of the output frame counter 206 is initialized to 0 (step S401). The timer 205 issues an event at an interval set by the request frame rate from the user. The data acquisition unit 204 waits until an event is issued from the timer 205 (step S402).

タイマ205からイベントが発行されて待機が解除されると、データ取得部204は、映像入力部201によってフレームバッファ203の同期フラグ503が有効化されていないかを調べる(ステップS403)。同期フラグ503が有効化されている場合は、フレームバッファ203が映像入力部201によってロックされているため、データ取得部204は、同期フラグ503が無効化されるまで待機する。   When the event is issued from the timer 205 and the standby is released, the data acquisition unit 204 checks whether the synchronization flag 503 of the frame buffer 203 is enabled by the video input unit 201 (step S403). If the synchronization flag 503 is enabled, the data acquisition unit 204 waits until the synchronization flag 503 is disabled because the frame buffer 203 is locked by the video input unit 201.

フレームバッファ203の同期フラグ503が無効化されたことを確認した後、データ取得部204は、映像フレーム出力処理に伴うアクセスに先立ち、フレームバッファ203をロックするため、同期フラグ503を有効化する(ステップ404)。これにより、フレームバッファ203がデータ取得部204によってロックされる。   After confirming that the synchronization flag 503 of the frame buffer 203 has been invalidated, the data acquisition unit 204 enables the synchronization flag 503 to lock the frame buffer 203 prior to access associated with the video frame output processing ( Step 404). As a result, the frame buffer 203 is locked by the data acquisition unit 204.

フレームバッファ203をロックした後、データ取得部204は、フレームバッファ203のフレーム番号領域からフレーム番号を読み出し(ステップS405)、フレームバッファ203の映像データ領域から映像データを読み出す(ステップS406)。以下の説明において、このフレーム番号領域から読み出したフレーム番号をフレーム番号Mとする。   After locking the frame buffer 203, the data acquisition unit 204 reads the frame number from the frame number area of the frame buffer 203 (step S405), and reads the video data from the video data area of the frame buffer 203 (step S406). In the following description, the frame number read from this frame number area is referred to as frame number M.

続いて、データ取得部204は、映像フレーム出力処理のためロックしていたフレームバッファ203をアンロックするため、同期フラグ503を無効化する(ステップS407)。   Subsequently, the data acquisition unit 204 invalidates the synchronization flag 503 to unlock the frame buffer 203 that has been locked for the video frame output process (step S407).

フレームバッファ203をアンロックした後、データ取得部204は、フレームバッファ203からの映像データの取得が初回の映像取得であるか否かを判断する(ステップS408)。初回の映像取得である場合は、データ取得部204は、出力フレームカウンタ206のカウント値(フレーム番号N)にM−1を代入する(ステップS409)。その後、ステップS410に移行する。初回の映像取得でない場合は、ステップS409の処理は行わずに、ステップS410に移行する。   After unlocking the frame buffer 203, the data acquisition unit 204 determines whether the acquisition of the video data from the frame buffer 203 is the first video acquisition (step S408). In the case of the first video acquisition, the data acquisition unit 204 substitutes M−1 for the count value (frame number N) of the output frame counter 206 (step S409). Thereafter, the process proceeds to step S410. If it is not the first video acquisition, the process proceeds to step S410 without performing the process of step S409.

ステップS410で、フレーム破棄複製判定部207は、データ取得部204で取得したフレーム番号M(今回取得したフレーム番号)と出力フレームカウンタ206に保持されているフレーム番号N(前回取得したフレーム番号または初回時のフレーム番号)の差Xを計算する(ステップS410)。   In step S410, the frame discard duplication determination unit 207 determines the frame number M acquired by the data acquisition unit 204 (the frame number acquired this time) and the frame number N held in the output frame counter 206 (the frame number acquired last time or the first time The difference X of the time frame number) is calculated (step S410).

フレーム番号差Xが0である場合は、フレーム破棄複製判定部207は、フレームバッファ203に格納された映像データが複製された(フレーム複製が実施された)、と判断する(ステップS411、S412)。フレーム複製とは、映像入力部201がフレームバッファ203上の映像データを更新する前に、データ取得部204が再度映像データを取得することを意味する。これにより、フレーム入出力のタイミング差を1回のフレーム複製で調整したことになる。ユーザが指定したフレームレートに比べ、映像取得部101が出力するフレームレートが小さい場合にこのフレーム複製が実行される。   When the frame number difference X is 0, the frame discard / duplication determination unit 207 determines that the video data stored in the frame buffer 203 has been duplicated (frame duplication has been performed) (steps S411 and S412). . Frame duplication means that the data acquisition unit 204 acquires the video data again before the video input unit 201 updates the video data on the frame buffer 203. As a result, the timing difference between the frame input and output is adjusted by one frame duplication. This frame duplication is executed when the frame rate output from the video acquisition unit 101 is smaller than the frame rate specified by the user.

フレーム番号差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 duplication determination unit 207 determines that the video data stored in the frame buffer 203 has been discarded (frame discard has been performed) (step S411, S413). The frame discard means that the video input unit 201 updates the video data on the frame buffer 203 before the data acquisition unit 204 acquires the video data from the frame buffer 203. As a result, the frame input / output timing difference is adjusted by performing frame discard. When the frame rate output from the video acquisition unit 101 is larger than the frame rate specified by the user, this frame discarding is executed. Note that the number of discarded frames can be obtained by X-1. The number of discarded frames can be notified to the user by event notification.

フレーム番号差Xが1である場合は、フレーム破棄複製判定部207は、フレームバッファ203に格納された映像データが破棄または複製されることなくそのまま出力された、と判断する(ステップS411、S414)。この状態は、映像取得部101が出力するフレームレートとユーザが要求するフレームレートが同一であった場合に該当する。   When the frame number difference X is 1, the frame discard / duplication determination unit 207 determines that the video data stored in the frame buffer 203 has been output as it is without being discarded or duplicated (steps S411 and S414). . This state corresponds to a case where the frame rate output from the video acquisition unit 101 is the same as the frame rate requested by the user.

ステップ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 event notification unit 208 notifies the user of the event (step S415). Event notification methods include alarm sound, message sound reproduction, and message display on a monitor. By this event notification, the user recognizes that the camera does not operate at the requested frame rate, and the video distribution is being performed by discarding or duplicating.

データ取得部204で取得した映像データは、映像出力部209によって映像符号化部103に渡される(ステップS416)。また、データ取得部204は、出力フレームカウンタ206のカウント値(出力フレームフレーム番号N)を取得したフレームの番号Mによって更新する(ステップS417)。   The video data acquired by the data acquisition unit 204 is passed to the video encoding unit 103 by the video output unit 209 (step S416). Also, the data acquisition unit 204 updates the count value (output frame frame number N) of the output frame counter 206 with the acquired frame number M (step S417).

カウント値の更新後、データ取得部204は、配信終了指示がなされたか否かを判断する(ステップS418)。配信終了指示がない場合は、ステップS402に戻り、タイマ205が次回イベントを発生するまで待機する。   After updating the count value, the data acquisition unit 204 determines whether or not a distribution end instruction has been issued (step S418). If there is no distribution end instruction, the process returns to step S402 and waits until the timer 205 generates the next event.

本実施例の映像符号化システムによれば、フレームレート調整部102において、フレームバッファ203における映像データの書き込みおよび読み出しがそれぞれ独立したタイミングで実行されるので、例えば、入力映像データのフレームレートが指定フレームレートより低い場合は、フレームの複製が行われ、反対に、入力映像データのフレームレートが指定フレームレートより高い場合は、フレームの破棄が行われる。これにより、入力映像データのフレームレートが指定フレームレートに変換される。このように、映像符号化部103が要求するフレームレート(指定フレームレート)とは異なるフレームレートでカメラデバイスから映像データが入力された場合は、フレームレート調整部102が、入力映像データのフレームレートを指定フレームレートに変換するので、映像符号化部103には、常に、指定フレームレートで映像データが供給される。よって、映像符号化部103の設定パラメータの変更は必要なく、また、符号化処理が停止する、といった不具合も生じない。また、伝送路の容量を超えた過大なビットストリームが出力されて、パケットロスによる画質劣化が発生する、といった不具合の発生も抑制される。   According to the video encoding system of the present embodiment, the frame rate adjusting unit 102 executes video data writing and reading in the frame buffer 203 at independent timings. For example, the frame rate of the input video data is designated. If it is lower than the frame rate, the frame is duplicated. Conversely, if the frame rate of the input video data is higher than the specified 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 103 (specified frame rate), the frame rate adjustment unit 102 determines the frame rate of the input video data. Therefore, the video encoding unit 103 is always supplied with video data at the specified frame rate. Therefore, it is not necessary to change the setting parameters of the video encoding unit 103, and there is no problem that the encoding process is stopped. In addition, it is possible to suppress the occurrence of problems such as output of an excessive bit stream exceeding the capacity of the transmission path and image quality degradation due to packet loss.

加えて、本実施例の映像符号化システムを利用する上で、カメラデバイスの選択の幅を広げることができる。   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 rate adjusting unit 103 discards or duplicates the frame, The frame discard / duplication determination unit 207 detects the discard of the frame or the execution of the duplication, and the event notification unit 208 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.

一般的に、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 video encoding system 600 is a video encoding system that operates on a computer system to which a camera device is connected, and includes a plurality of video acquisition units 601 to 603 and a camera selection unit 604. , A frame rate adjusting unit 102, a video encoding unit 103, a packetizing unit 104, and a transmitting unit 105. The video encoding system 600 includes a camera selection function for selectively acquiring video data from a plurality of video acquisition units in addition to the function of the video encoding system 100 of the first embodiment. The video acquisition unit can be switched by an instruction.

映像取得部601は、毎秒3フレームの動画を取得する能力を備える。映像取得部602は、毎秒17フレームの動画を取得する能力を備える。映像取得部603は、毎秒30フレームの動画を取得する能力を備える。なお、映像取得部の個数とフレームレートは、これに限定されるものではなく、適宜に変更することができる。   The video acquisition unit 601 has a capability of acquiring a moving image of 3 frames per second. The video acquisition unit 602 has a capability of acquiring a moving image of 17 frames per second. The video acquisition unit 603 has a capability of acquiring a moving image of 30 frames per second. Note that the number of image acquisition units and the frame rate are not limited to this, and can be changed as appropriate.

映像取得部601、602、603はそれぞれ、カメラ選択部604を介してフレームレート調整部102に接続されている。カメラ選択部604は、映像取得部601、602、603のうち、ユーザによって選択された映像取得部から出力された映像フレームをフレームレート調整部102に出力する切り替え機能を有する。カメラ選択部604は、選択されていない映像取得部の映像フレームを破棄する。ユーザは、コンピュータシステムの入力装置を通じて、映像取得部601、602、603のうちから所望の映像取得部を選択することができる。   Each of the video acquisition units 601, 602, and 603 is connected to the frame rate adjustment unit 102 via the camera selection unit 604. The camera selection unit 604 has a switching function of outputting the video frame output from the video acquisition unit selected by the user among the video acquisition units 601, 602, and 603 to the frame rate adjustment unit 102. The camera selection unit 604 discards the video frame of the video acquisition unit that has not been selected. The user can select a desired video acquisition unit from the video acquisition units 601, 602, and 603 through the input device of the computer system.

フレームレート調整部102は、カメラ選択部604から供給される映像フレームに対してフレームレートの調整処理を実施する。ユーザは、映像符号化部103での符号化の対象となる映像データのフレームレートの値を任意に設定することが可能であるが、ここでは、フレームレートの設定値は毎秒15フレームとする。ユーザによって設定されたフレームレート値は、フレームレート調整部102および映像符号化部103に供給される。   The frame rate adjustment unit 102 performs a frame rate adjustment process on the video frame supplied from the camera selection unit 604. The user can arbitrarily set the frame rate value of the video data to be encoded by the video encoding unit 103. Here, the frame rate setting value is 15 frames per second. The frame rate value set by the user is supplied to the frame rate adjustment unit 102 and the video encoding unit 103.

フレームレート調整部102によるフレームレート調整処理では、カメラ選択部604から供給される映像フレームと独立したタイミングで、映像フレームの破棄や複製が行われる。このフレームレート調整処理は、基本的には、第1の実施例で説明した映像フレーム入力処理(図4)および映像フレーム出力処理(図5)と同様であるが、映像取得部601が選択されている場合は、映像フレームの複製が行われ、映像取得部602または映像取得部603が選択されている場合は、映像フレームの破棄が行われる。これにより、カメラ選択部604から供給された映像データのフレームレートを、指定されたフレームレート(毎秒15フレーム)に変換することができる。   In the frame rate adjustment processing by the frame rate adjustment unit 102, the video frame is discarded or duplicated at a timing independent of the video frame supplied from the camera selection unit 604. This frame rate adjustment process is basically the same as the video frame input process (FIG. 4) and the video frame output process (FIG. 5) described in the first embodiment, but the video acquisition unit 601 is selected. If the video acquisition unit 602 or the video acquisition unit 603 is selected, the video frame is discarded. Thereby, the frame rate of the video data supplied from the camera selection unit 604 can be converted into a designated frame rate (15 frames per second).

映像符号化部103は、フレームレート調整部102で指定のフレームレートに変換された映像データを圧縮符号化し、ビットストリームに変換する処理を行う。圧縮符号化方式としては前述のMPEG−4やH.264などを用いる。   The video encoding unit 103 performs a process of compressing and encoding the video data converted to the frame rate specified by the frame rate adjusting unit 102 and converting it into a bit stream. As the compression encoding method, the above-mentioned MPEG-4 and H.264 are used. H.264 or the like is used.

映像符号化部103に入力される映像フレームは、カメラ装置の切り替えに関係なく、毎秒15フレームのフレームレートに調整されているため、リセットの必要がない。よって、映像符号化部103は、符号化処理を正常に実施することができる。   The video frame input to the video encoding unit 103 is adjusted to a frame rate of 15 frames per second regardless of the switching of the camera device, and thus does not need to be reset. Therefore, the video encoding unit 103 can normally perform the encoding process.

パケット化部104は、映像符号化部103から出力されたビットストリームを伝送メディアに応じた最適なサイズに分割する。パケット化処理は、映像符号化形式と伝送メディアの種類によって決まる。MPEG−4形式の映像を伝送する場合は、IETF RFC3640によるRTPパケット分割方法を、H.264形式の映像を伝送する場合は、IETF RFC3984を、それぞれ用いるのが一般的である。   The packetizing unit 104 divides the bit stream output from the video encoding unit 103 into an optimum size according to the transmission medium. Packetization processing is determined by the video encoding format and the type of transmission media. In the case of transmitting MPEG-4 format video, the RTP packet segmentation method according to IETF RFC3640 is used. In the case of transmitting H.264 format video, it is common to use IETF RFC3984.

送信部105は、RTPパケットに分割された映像ストリームをIPネットワーク経由で映像復号システムに伝送する機能を持つ。RTPパケットは、UDP/IPプロトコルとソケットインターフェイスを用いて送出される。   The transmission unit 105 has a function of transmitting the video stream divided into RTP packets to the video decoding system via the IP network. The RTP packet is transmitted using a UDP / IP protocol and a socket interface.

本実施例の映像符号化システム600によれば、フレームレート調整部102が、カメラ切り替えに関係なく、指定されたフレームレート(例えば、毎秒15フレーム)で映像を出力するため、映像符号化部103にて、映像符号化パラメータを変更する必要がない。したがって、映像符号化システム600では、カメラ切り替えに関係なく、指定されたフレームレート(毎秒15フレーム)の映像の符号化を継続して行うことができる。その結果、映像復号システムでは、カメラ切り替えが行われた場合でも、遅延なく切り替わった映像を継続して再生することができる。   According to the video encoding system 600 of this embodiment, since the frame rate adjustment unit 102 outputs video at a specified frame rate (for example, 15 frames per second) regardless of camera switching, the video encoding unit 103 Therefore, it is not necessary to change the video encoding parameter. Therefore, in the video encoding system 600, it is possible to continue encoding video at a designated frame rate (15 frames per second) regardless of camera switching. As a result, in the video decoding system, even when the camera is switched, it is possible to continuously reproduce the switched video without delay.

図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 video encoding system 700 is a video encoding system that operates on a computer system to which a camera device is connected, and its main parts are a video acquisition unit 101, a frame rate adjustment unit 701, a video code. And a packetizing unit 104 and a transmitting unit 105. In addition to the functions of the video encoding system 100 of the first embodiment, the video encoding system 700 notifies not only the user but also the event notification when the frame rate is adjusted to the video decoding system side. A function for synthesizing the video data to be transmitted is provided.

映像取得部101は、動画像の取得を行う機能ブロックであり、映像データをフレーム単位で出力する機能を備えている。使用するカメラデバイスは、デジタルカメラデバイスやアナログビデオカメラビデオキャプチャカードである。映像取得開始が指示された場合、映像取得部101は、事前に指定された映像サイズ(縦ピクセル数、横ピクセル数)、映像フォーマット、フレームレートに従い、自律的に動画像の取得を開始する。映像取得部101が出力した映像データは、フレームレート調整部701に渡される。   The video acquisition unit 101 is a functional block that acquires a moving image, and has a function of outputting video data in units of frames. The camera device used is a digital camera device or an analog video camera video capture card. When the start of video acquisition is instructed, the video acquisition unit 101 autonomously starts moving image acquisition in accordance with the video size (number of vertical pixels and horizontal pixels), video format, and frame rate specified in advance. The video data output from the video acquisition unit 101 is passed to the frame rate adjustment unit 701.

フレームレート調整部701は、映像取得部101から入力される映像データのフレームレートを指定されたフレームレートになるように調整するとともに、フレームレート調整時のフレームの破棄または複製を示すイベント通知を映像配信システム700及び映像復号システムを利用するユーザに通知する機能を持つ機能ブロックである。   The frame rate adjustment unit 701 adjusts the frame rate of the video data input from the video acquisition unit 101 to the specified frame rate, and sends an event notification indicating the discard or duplication of the frame at the time of the frame rate adjustment. It is a functional block having a function of notifying a user who uses the distribution system 700 and the video decoding system.

映像符号化部103は、フレームレート調整部701からフレームレート調整が施された映像データを受け取り、該映像データを圧縮符号化してビットストリームに変換する機能ブロックである。圧縮符号化方式としては、MPEG−4、H.264、MotionJPEG等が利用される。   The video encoding unit 103 is a functional block that receives video data subjected to frame rate adjustment from the frame rate adjustment unit 701, compresses and encodes the video data, and converts it into a bit stream. Examples of compression encoding methods include MPEG-4, H.264, and the like. H.264, Motion JPEG, etc. are used.

パケット化部104は、映像符号化部103から出力されたビットストリームを伝送メディアごとに最適なサイズに分割し、ヘッダを付加する機能を持つ。パケット化処理は、映像符号化形式と伝送メディアの種類によって規格化されている。IPネットワークを用いてMPEG−4、H.264、MotionJPEG形式の映像を伝送する場合、それぞれIETF RFC3640、3984、2435形式によるRTPパケット分割方法を用いる。   The packetizing unit 104 has a function of dividing the bit stream output from the video encoding unit 103 into an optimal size for each transmission medium and adding a header. The packetization process is standardized according to the video encoding format and the type of transmission media. MPEG-4, H.264 using IP network. When transmitting video in the H.264, Motion JPEG format, RTP packet segmentation methods in the IETF RFC3640, 3984, and 2435 formats are used, respectively.

送信部105は、RTPパケットに分割された映像ストリームをIPネットワーク経由で映像復号システムに伝送する機能を持つ。RTPパケットは、UDP/IPプロトコルとソケットを用いて伝送される。   The transmission unit 105 has a function of transmitting the video stream divided into RTP packets to the video decoding system via the IP network. The RTP packet is transmitted using a UDP / IP protocol and a socket.

次に、フレームレート調整部701の詳細な内部構成について説明する。   Next, a detailed internal configuration of the frame rate adjustment unit 701 will be described.

図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 rate adjustment unit 701. Referring to FIG. 8, the frame rate adjustment unit 701 includes a video input unit 201, an input frame counter 202, a frame buffer 203, a data acquisition unit 204, a timer 205, an output frame counter 206, a frame discard / duplication determination unit 207, and an event notification unit. 208, a message image composition unit 801, and a video output unit 209.

フレームレート調整部701の動作において、映像フレームの破棄や複製が実施したかを判別する処理までは第1の実施例と同じである。以下に、フレームレート調整部701の処理の詳細について、映像フレームの破棄複製判定処理の後の動作を説明する。   The operation of the frame rate adjustment unit 701 is the same as that of the first embodiment up to the process of determining whether the video frame is discarded or duplicated. Hereinafter, with respect to the details of the processing of the frame rate adjustment unit 701, the operation after the video frame discard / duplication determination processing will be described.

フレーム破棄複製判定部207は、データ取得部204がフレームバッファ203のフレーム番号領域501から取得したフレーム番号Mと出力フレームカウンタ206が保持するフレーム番号Nの差を計算し、フレームの破棄、複製が実施されたかを判別する処理を行う。   The frame discard / duplication determination unit 207 calculates the difference between the frame number M acquired by the data acquisition unit 204 from the frame number area 501 of the frame buffer 203 and the frame number N held by the output frame counter 206, and discards / duplicates the frame. A process for determining whether or not it has been performed is performed.

前回取り出したフレーム番号と今回取得したフレーム番号の差が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 / duplication determination unit 207 determines that the frame is discarded or duplicated, the event notification unit 208 performs a process of notifying the user of the fact. Further, the event notification unit 208 supplies the determination result (normal, discard, duplication) in the frame discard / duplication determination unit 207 to the message image synthesis unit 801. Event notification means is realized by sending a packet to the network, calling a callback function, or the like. By sending a packet to the network, an event can be notified to an external terminal. The system that has received the event notification notifies the user that the frame has been discarded and duplicated by displaying an error message or playing a warning sound.

データ取得部204がフレーム番号領域502から取得した映像データは、メッセージ画像合成部801に渡される。同時に、その映像データに関する判定結果(正常、破棄、複製)がイベント通知部208からメッセージ画像合成部801へ通知される。   The video data acquired by the data acquisition unit 204 from the frame number area 502 is passed to the message image composition unit 801. At the same time, the event notification unit 208 notifies the message image composition unit 801 of the determination result (normal, discarded, or duplicated) regarding the video data.

データ取得部204から供給される映像データが、正常に取得された映像データである場合、メッセージ画像合成部801は、その映像データをそのまま映像出力部209に供給する。データ取得部204から供給される映像データが、破棄または複製が実施された映像データである場合、メッセージ画像合成部801は、その映像データに、破棄または複製が実施されたことを示す情報を付与したメッセージ付き映像データを映像出力部209に供給する。   If the video data supplied from the data acquisition unit 204 is normally acquired video data, the message image synthesis unit 801 supplies the video data to the video output unit 209 as it is. When the video data supplied from the data acquisition unit 204 is video data that has been discarded or duplicated, the message image composition unit 801 adds information indicating that the video data has been discarded or duplicated. The message-attached video data is supplied to the video output unit 209.

映像出力部209は、メッセージ画像合成部801から供給される映像データまたはメッセージ付き映像データを映像符号化部103に供給する。   The video output unit 209 supplies the video data supplied from the message image synthesis unit 801 or video data with a message to the video encoding unit 103.

次に、メッセージ画像合成部801の構成を具体的に説明する。   Next, the configuration of the message image composition unit 801 will be specifically described.

図9は、メッセージ合成部801の構成を示すブロック図である。図9を参照すると、メッセージ画像合成部801は、映像入力部901、映像出力部902、映像フレームバッファ903および画像合成部905から構成される。   FIG. 9 is a block diagram showing the configuration of the message composition unit 801. Referring to FIG. 9, the message image synthesis unit 801 includes a video input unit 901, a video output unit 902, a video frame buffer 903, and an image synthesis unit 905.

映像入力部901の入力には、データ取得部204から出力された映像データが供給される。映像入力部901は、データ取得部204から出力された映像データを画像合成部905に供給する。画像合成部905には、イベント通知部208からのイベント通知904が供給されている。イベント通知904は、データ取得部204が取得した映像データに関する判定結果(正常、破棄、複製)を示す。   The video data output from the data acquisition unit 204 is supplied to the input of the video input unit 901. The video input unit 901 supplies the video data output from the data acquisition unit 204 to the image composition unit 905. An event notification 904 from the event notification unit 208 is supplied to the image composition unit 905. An event notification 904 indicates a determination result (normal, discarded, duplicated) regarding the video data acquired by the data acquisition unit 204.

映像入力部901から供給される映像データが正常に取得されたものであることを示すイベント通知904が、イベント通知部208から画像合成部905に供給された場合は、画像合成部905は、画像合成処理を行わずに、映像入力部901から供給された映像データをそのまま映像出力部209に出力する。   When the event notification 904 indicating that the video data supplied from the video input unit 901 is normally acquired is supplied from the event notification unit 208 to the image synthesis unit 905, the image synthesis unit 905 Without performing the synthesis process, the video data supplied from the video input unit 901 is output to the video output unit 209 as it is.

映像入力部901から供給される映像データが映像フレームの破棄または複製が実施された後の映像データである旨を示すイベント通知904が、イベント通知部208から画像合成部905に供給された場合は、画像合成部905は、フレームバッファ903上で、フレームレート異常を示すイベント図形906を生成するとともに、そのイベント図形906と映像入力部901から供給された映像データを合成する。そして、画像合成部905は、合成した映像データを映像出力部902に供給する。   When the event notification 904 indicating that the video data supplied from the video input unit 901 is video data after the video frame is discarded or duplicated is supplied from the event notification unit 208 to the image composition unit 905 The image composition unit 905 generates an event graphic 906 indicating an abnormal frame rate on the frame buffer 903 and synthesizes the event graphic 906 and video data supplied from the video input unit 901. Then, the image synthesis unit 905 supplies the synthesized video data to the video output unit 902.

イベント図形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 frame buffer 903 or can be sequentially generated according to the event content. The event graphic 906 is not necessarily combined with the input video data, but may be transmitted by another protocol and displayed on the video decoding system side.

本実施例の映像符号化システム700によれば、フレームレート調整部701によってフレームレート調整が実施された場合に、入力映像に対する画像合成を実施することで、映像符号化システム700を利用するユーザだけでなく、映像復号システムで映像を見るユーザに対してもフレームレート調整の実施を通知することが可能となる。   According to the video encoding system 700 of the present embodiment, when the frame rate adjustment is performed by the frame rate adjustment unit 701, only a user who uses the video encoding system 700 performs image synthesis on the input video. In addition, it is possible to notify the user who views the video with the video decoding system of the execution of the frame rate adjustment.

以上説明した各実施例の映像符号化システムにおいて、各構成(機能ブロック)における動作は、プログラムしたがってコンピュータがそれら機能ブロックに対応する動作を実行することで実現すること可能である。プログラムは、予めコンピュータシステムにインストールされていても、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.

本発明の第1の実施例である映像符号化システムの主要部を示すブロック図である。It is a block diagram which shows the principal part of the video coding system which is the 1st Example of this invention. 図1に示すフレームレート調整部の具体的な構成を示すブロック図である。It is a block diagram which shows the specific structure of the frame rate adjustment part shown in FIG. 図2に示すフレームバッファのメモリ領域を示す模式図である。FIG. 3 is a schematic diagram showing a memory area of the frame buffer shown in FIG. 2. 図1に示すフレームレート調整部にて行われる映像フレーム入力処理を示すフローチャートである。It is a flowchart which shows the video frame input process performed in the frame rate adjustment part shown in FIG. 図1に示すフレームレート調整部にて行われる映像フレーム出力処理を示すフローチャートである。It is a flowchart which shows the video frame output process performed in the frame rate adjustment part shown in FIG. 本発明の第2の実施例である映像符号化システムの主要部を示すブロック図である。It is a block diagram which shows the principal part of the video coding system which is the 2nd Example of this invention. 本発明の第3の実施例である映像符号化システムの主要部を示すブロック図である。It is a block diagram which shows the principal part of the video coding system which is the 3rd Example of this invention. 図7に示すフレームレート調整部の構成を示すブロック図である。It is a block diagram which shows the structure of the frame rate adjustment part shown in FIG. 図8に示すメッセージ合成部の構成を示すブロック図である。It is a block diagram which shows the structure of the message synthetic | combination part shown in FIG.

符号の説明Explanation of symbols

100 映像符号化システム
101 映像取得部
102 フレームレート調整部
103 映像符号化部
104 パケット化部
105 送信部
201 映像入力部
202 入力フレームカウンタ
203 フレームバッファ
204 データ取得部
205 タイマ
206 出力フレームカウンタ
207 フレーム破棄複製判定部
208 イベント通知部
209 映像出力部
DESCRIPTION OF SYMBOLS 100 Video encoding system 101 Video acquisition part 102 Frame rate adjustment part 103 Video encoding part 104 Packetization part 105 Transmission part 201 Video input part 202 Input frame counter 203 Frame buffer 204 Data acquisition part 205 Timer 206 Output frame counter 207 Frame discard Copy determination unit 208 Event notification unit 209 Video output unit

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に記載の映像符号化システム。   The video encoding system according to claim 1, further comprising a video acquisition unit that acquires video data from an external camera device and supplies the acquired video data to the frame rate adjustment unit as the input video data. 外部カメラデバイスから映像データを取得する複数の映像取得部と、
前記複数の映像取得部のいずれかを選択し、該選択した映像取得部が取得した映像データを前記入力映像データとして前記フレームレート調整部に供給する選択部と、をさらに有する、請求項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.
JP2007049232A 2007-02-28 2007-02-28 Video encoding system, method and program Expired - Fee Related JP4826798B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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