JP2007142809A - Video recording apparatus - Google Patents

Video recording apparatus Download PDF

Info

Publication number
JP2007142809A
JP2007142809A JP2005333888A JP2005333888A JP2007142809A JP 2007142809 A JP2007142809 A JP 2007142809A JP 2005333888 A JP2005333888 A JP 2005333888A JP 2005333888 A JP2005333888 A JP 2005333888A JP 2007142809 A JP2007142809 A JP 2007142809A
Authority
JP
Japan
Prior art keywords
encoding
video
frame rate
unit
frame
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.)
Pending
Application number
JP2005333888A
Other languages
Japanese (ja)
Inventor
Tadataka Ueda
恭敬 上田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005333888A priority Critical patent/JP2007142809A/en
Publication of JP2007142809A publication Critical patent/JP2007142809A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a video recording apparatus capable of automatically executing efficient coding with high image quality depending on an operating state of a photographing recording apparatus such as a photographing state frame rate without the need for a user to notify complicated coding parameter settings. <P>SOLUTION: The video recording apparatus is configured to include: a frame rate setting means 111 for optionally setting the photographing state frame rate being the number of frames per unit time at photographing of a moving picture in the case of photographing the moving picture; a camera section 100 for photographing the moving picture at the photographing state frame rate set by the frame rate setting means 111; a video coding section 103 for applying compression coding to video data photographed by the camera section 100; and video processing setting control section 113 for revising a video processing method to be executed by the video coding section 103 on the basis of the photographing state frame rate set by the frame rate setting means 111 and a maximum coding frame rate denoting a maximum processing capability of the video coding section 103. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、映像を圧縮符号化してファイルとして記録媒体に記録する映像記録装置に関する。   The present invention relates to a video recording apparatus that compresses and encodes video and records it as a file on a recording medium.

従来、映画の撮影は、光学的な記録方式のフィルムに1秒間あたりのフレーム数(以下、1秒間あたりのフレーム数を「フレームレート」と略記する)が毎秒24フレームの動画映像(以下、動画映像を「映像」と略記する)を記録することで行われていた。   Conventionally, movie shooting is performed on an optical recording film with a moving image (hereinafter referred to as a moving image) having a frame rate per second (hereinafter, abbreviated as “frame rate”) of 24 frames per second. The video was abbreviated as “video”).

近年、映画を電子的に動画撮影(以下、単に「撮影」と略記する)、記録、動画再生(以下、単に「再生」と略記する)する技術も開発され、普及してきている。一般にこのような技術においては、CCD等の撮像素子を用いて映像を電気信号に変換し、この電気信号を磁気記録媒体等に電子的に記録する。また、記録媒体に電子的に記録された映像情報を、再生装置を用いて再生する。撮影に失敗する等した場合、記録媒体に一旦映像情報が記録されてしまうと再使用ができないフィルムに比べ、電子的に撮影、記録する方法では、記録媒体上の不要になった映像信号の上に新たに映像信号を上書きして記録する等することで、記録媒体の再使用ができる。したがって、このような電子的な撮影は、フィルムと比較して撮影にかかる費用を安く抑えることができるという特徴がある。   In recent years, techniques for electronically shooting movies (hereinafter simply abbreviated as “shooting”), recording, and playing back movies (hereinafter simply abbreviated as “playback”) have been developed and are becoming popular. In general, in such a technique, an image is converted into an electric signal using an imaging device such as a CCD, and the electric signal is electronically recorded on a magnetic recording medium or the like. Also, the video information electronically recorded on the recording medium is played back using a playback device. In the case of shooting failure, etc., when video information is once recorded on the recording medium, compared with film that cannot be reused, the method of electronically shooting and recording the video signal on the recording medium is no longer necessary. The recording medium can be reused by newly overwriting and recording the video signal. Therefore, such electronic photographing is characterized in that the cost for photographing can be reduced as compared with film.

この、映画を電子的に撮影、記録、再生する方法において、撮影時や再生時のフレームレートは、放送用業界では毎秒30フレーム、映画業界では毎秒24フレームで行われるのが一般的である。したがって、電子的に撮影、記録、再生する装置では、例えば、2:3プルダウン処理のように、毎秒30フレームと24フレームとの相互変換を容易にする技術が使用されている。すなわち、電子的に撮影、記録、再生する装置は、毎秒30フレームの処理能力を備え、撮影時や再生時のフレームレートは、毎秒30フレーム、毎秒24フレームの両方に対応するのが一般的である。このように複数のフレームレートに対応した従来の映像記録装置の他の例として、クイックモーションやスローモーション再生等の特殊効果を実現する技術を用いたものが挙げられる(たとえば、特許文献1を参照)。この従来の映像記録装置では、撮影者が撮影の際に撮影時のフレームレートを設定し、設定されたフレームレートで撮影された映像信号を毎秒60フレームの映像信号に変換して記録する。そして、再生時にはこの毎秒60フレームの映像信号を再度撮影時のフレームレートの映像信号に変換することで特殊効果を実現している。この従来の映像記録装置では、毎秒60フレームの記録処理能力をもっており、間欠的な記録を行うことで特殊効果を実現している。   In this method of electronically shooting, recording and reproducing a movie, the frame rate at the time of shooting and playback is generally 30 frames per second in the broadcasting industry and 24 frames per second in the movie industry. Therefore, a device that electronically captures, records, and plays back uses a technology that facilitates mutual conversion between 30 frames and 24 frames per second, such as 2: 3 pull-down processing. That is, an apparatus that electronically captures, records, and plays back has a processing capacity of 30 frames per second, and generally supports a frame rate of 30 frames per second and 24 frames per second during shooting and playback. is there. As another example of the conventional video recording apparatus corresponding to a plurality of frame rates as described above, there is one using a technique for realizing a special effect such as quick motion or slow motion playback (see, for example, Patent Document 1). ). In this conventional video recording apparatus, when a photographer takes a picture, a frame rate at the time of shooting is set, and a video signal shot at the set frame rate is converted into a video signal of 60 frames per second and recorded. Then, at the time of reproduction, a special effect is realized by converting the video signal of 60 frames per second into a video signal of the frame rate at the time of shooting again. This conventional video recording apparatus has a recording processing capability of 60 frames per second, and realizes special effects by performing intermittent recording.

一方、従来の映像記録装置においては、記録時には映像を圧縮符号化して記録する方法をとるのが一般的である。符号化方式には符号化ビットレート、動き補償モード設定等の多くの符号化パラメータが存在し、それらの最適な組み合わせで効率的な符号化を行っている。この符号化パラメータ設定の複雑さを解消するために、あらかじめユーザが設定したコンテンツの内容のジャンル情報に基づき符号化パラメータを適切に設定して符号化動作を行う方法が提案されている(例えば、特許文献2を参照)。
特開2002−152569号公報 特開2000−287173号公報
On the other hand, a conventional video recording apparatus generally employs a method in which video is compressed and encoded during recording. There are many encoding parameters such as an encoding bit rate and motion compensation mode setting in the encoding method, and efficient encoding is performed by an optimal combination thereof. In order to eliminate the complexity of setting the encoding parameter, a method has been proposed in which the encoding operation is performed by appropriately setting the encoding parameter based on the genre information of the content content previously set by the user (for example, (See Patent Document 2).
Japanese Patent Laid-Open No. 2002-152569 JP 2000-287173 A

しかしながら、従来の映像記録装置では、符号化パラメータの適切な設定のために、撮影前にあらかじめこれから撮影するコンテンツのジャンルをユーザが指定する必要があり、ユーザの利便性が低下するという問題点があった。また、ユーザが指定したジャンル情報と撮影するコンテンツの内容が必ずしも一致するとは限らないという問題点があった。例えば、ジャンルが映画のものは毎秒24フレームで撮影して、2:3プルダウン処理を行い表示することを前提とした符号化パラメータ設定を行っているが、そのような撮影方法を用いたコンテンツ内容のみとは限らず、必ずしもユーザが指定したものが最適な符号化パラメータとはいえなかった。   However, in the conventional video recording apparatus, in order to appropriately set the encoding parameter, it is necessary for the user to specify the genre of the content to be captured in advance before shooting, which reduces the convenience for the user. there were. In addition, there is a problem that the genre information specified by the user does not always match the content of the content to be photographed. For example, if the genre is a movie, the encoding parameter is set on the premise that the movie is shot at 24 frames per second, and is subjected to 2: 3 pull-down processing and displayed. Content content using such a shooting method However, the parameters specified by the user are not necessarily the optimum encoding parameters.

本発明はこのような課題を解決するためになされたものであり、複雑な符号化パラメータの設定をユーザに意識させることなく、撮影時フレームレートや再生時フレームレート等の撮影記録装置の動作状態によって自動的に高画質で効率的な符号化を行うことができるリアルタイム符号化が可能な映像記録装置を提供することを目的とする。   The present invention has been made to solve such a problem, and the operation state of the imaging / recording apparatus such as the shooting frame rate and the reproduction frame rate without making the user aware of complicated encoding parameter settings. An object of the present invention is to provide a video recording apparatus capable of real-time encoding that can automatically perform high-quality and efficient encoding.

上述した課題を解決するために、本発明の映像記録装置は、動画撮影した映像信号を圧縮符号化して記録媒体にファイル化して記録する映像記録装置であって、動画撮影の際に、動画撮影するときの単位時間あたりのフレーム数である撮影時フレームレートを任意に設定するフレームレート設定部と、フレームレート設定部において設定された撮影時フレームレートで動画撮影する撮影部と、撮影部で撮影された映像データを圧縮符号化する映像符号化部と、フレームレート設定部において設定された撮影時フレームレートと映像符号化部の最大処理能力である最大符号化フレームレートとに基づいて映像符号化部での映像処理方法を変更する映像処理設定制御部とを備えた構成としたものである。   In order to solve the above-described problems, a video recording apparatus according to the present invention is a video recording apparatus that compresses and encodes a video signal obtained by moving image recording and records the file on a recording medium. A frame rate setting unit that arbitrarily sets the shooting frame rate, which is the number of frames per unit time when shooting, a shooting unit that shoots a movie at the shooting frame rate set in the frame rate setting unit, and a shooting unit A video encoding unit that compresses and encodes the video data, a video encoding based on a frame rate at the time of shooting set in the frame rate setting unit and a maximum encoding frame rate that is a maximum processing capacity of the video encoding unit And a video processing setting control unit that changes a video processing method in the unit.

本発明によれば、映像データを圧縮符号化し、記録媒体に圧縮映像データを記録する映像記録装置において、撮影時フレームレートと最大符号化フレームレートによって映像処理設定、符号化パラメータを適応的に変更させることによって、記録装置が持つ符号化や記録処理能力を最大限発揮し、より低い符号化ビットレートで、高画質かつ高効率なリアルタイム圧縮符号化が可能となる。   According to the present invention, in a video recording apparatus that compresses and encodes video data and records the compressed video data on a recording medium, video processing settings and encoding parameters are adaptively changed according to the shooting frame rate and the maximum encoding frame rate. By doing so, it is possible to maximize the encoding and recording processing capabilities of the recording apparatus, and to realize high-quality and highly efficient real-time compression encoding at a lower encoding bit rate.

以下、図面を参照しながら本発明の実施の形態について詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

(実施の形態1)
本発明の実施の形態1における映像記録装置1の構成について、図1を用いて説明する。本実施の形態では、撮影者が、撮影時のフレームレートと再生時のフレームレートとをそれぞれ任意に設定できる構成とし、クイックモーションやスローモーション再生を行う機能をもった映像記録装置を1例として説明する。すなわち、撮影者によって設定された撮影時のフレームレートで映像信号が撮影、記録され、撮影者によって設定された再生時のフレームレートで映像信号が再生される。
(Embodiment 1)
The configuration of the video recording apparatus 1 according to Embodiment 1 of the present invention will be described with reference to FIG. In this embodiment, an example is a video recording apparatus in which a photographer can arbitrarily set a frame rate at the time of shooting and a frame rate at the time of playback, and has a function of performing quick motion or slow motion playback. explain. That is, the video signal is shot and recorded at the shooting frame rate set by the photographer, and the video signal is played back at the playback frame rate set by the photographer.

そして、撮影時のフレームレートを再生時のフレームレートよりも大きく設定すればスローモーション再生がなされ、逆に撮影時のフレームレートを再生時のフレームレートよりも小さく設定すればクイックモーション再生がなされるようにしている。なお、ここでは、撮影時のフレームレートを毎秒Xフレーム(Xは任意の実数)とし、再生時のフレームレートを毎秒30フレームに設定したものとして、以下の説明を行う。   If the frame rate at the time of shooting is set higher than the frame rate at the time of playback, slow motion playback is performed. Conversely, if the frame rate at the time of shooting is set lower than the frame rate at the time of playback, quick motion playback is performed. I am doing so. Here, the following description will be made assuming that the frame rate at the time of shooting is set to X frames per second (X is an arbitrary real number), and the frame rate at the time of reproduction is set to 30 frames per second.

図1は、本発明の実施の形態1のカメラレコーダの構成を示す。本実施の形態では、カメラ部により撮像された映像を圧縮符号化した圧縮映像データとして記録媒体に記録するカメラレコーダを、映像記録装置の一例として挙げて説明する。このようなカメラレコーダは、放送事業者や映画制作者などを対象とした業務用途を目的とする装置であり、映画やドラマの撮影などに利用されている。例えば、撮影現場において、本カメラレコーダで撮影した映像は、番組制作のための素材データとして、着脱可能な記録媒体に記録される。さらに、放送局内において、この記録媒体に記録された素材データは、他の素材データとともに番組の編集作業に使用される。   FIG. 1 shows a configuration of a camera recorder according to Embodiment 1 of the present invention. In the present embodiment, a camera recorder that records on a recording medium as compressed video data obtained by compression-coding video captured by a camera unit will be described as an example of a video recording device. Such a camera recorder is a device intended for business use intended for broadcasters and movie producers, and is used for shooting movies and dramas. For example, at the shooting site, video shot by the camera recorder is recorded on a removable recording medium as material data for program production. Further, in the broadcasting station, the material data recorded on the recording medium is used for editing the program together with other material data.

図1に示すように、本映像記録装置1としてのカメラレコーダは、被写体を撮像することにより、記録媒体に記録するための映像データを供給するカメラ部100と、カメラ部からの映像データから、重複がなく、記録媒体に記録すべき映像データを示す有効フレームフラグを生成し、そのフレームに相当する映像データを抽出する有効フレーム抽出部101と、効率的な圧縮符号化を行うために映像に対して処理を行う映像前処理部102と、映像データを圧縮符号化して、圧縮映像データを生成する映像符号化部103と、圧縮映像データをファイルとして記録媒体120に記録する記録部104とを備える。さらに、本発明の映像記録装置1は、圧縮符号化を制御するシステム制御部110を含む構成である。各構成要素間は、ホストインターフェイス130を介して通信を行う。   As shown in FIG. 1, the camera recorder as the video recording apparatus 1 captures a subject and supplies video data for recording on a recording medium, and video data from the camera unit. There is no duplication, an effective frame flag indicating video data to be recorded on a recording medium is generated, and an effective frame extraction unit 101 that extracts video data corresponding to the frame, and the video for efficient compression coding A video preprocessing unit 102 that performs processing, a video encoding unit 103 that compresses and encodes video data to generate compressed video data, and a recording unit 104 that records the compressed video data as a file on the recording medium 120. Prepare. Furthermore, the video recording apparatus 1 of the present invention includes a system control unit 110 that controls compression encoding. Each component communicates via the host interface 130.

また、本実施の形態では、システム制御部110が、例えば、図示しないマイコンとメモリとによって実現される一例を挙げており、システム制御部110に含まれる各処理手段は、マイコンがメモリに記憶した各種のプログラムを実行することによって実現される。本システム制御部110は、カメラ部の撮影するフレームレートXを設定するフレームレート設定手段111と、映像前処理部102と映像符号化部103に入力される映像のフレームレート情報を設定する入力映像情報設定手段112と、映像前処理部102の設定変更を制御する映像前処理設定制御手段114と、映像符号化部103の符号化パラメータの変更を制御する符号化設定制御手段115と、記録媒体120に所定のファイル形式で記録するための処理を行う記録制御手段116とを含む。なお、本実施の形態では記録媒体120にはファイル形式で記録するとしているが、ファイル形式でなくともよい。   In the present embodiment, an example is given in which the system control unit 110 is realized by, for example, a microcomputer and a memory (not shown), and each processing unit included in the system control unit 110 is stored in the memory by the microcomputer. This is realized by executing various programs. The system control unit 110 includes a frame rate setting unit 111 that sets a frame rate X taken by the camera unit, and an input video that sets frame rate information of a video input to the video preprocessing unit 102 and the video encoding unit 103. Information setting means 112, video preprocessing setting control means 114 for controlling the setting change of the video preprocessing section 102, encoding setting control means 115 for controlling the change of the encoding parameter of the video encoding section 103, and a recording medium 120 includes a recording control unit 116 that performs processing for recording in a predetermined file format. In the present embodiment, the recording medium 120 records in the file format, but the recording medium 120 may not be in the file format.

映像符号化部103に供給された映像データは、例えば、映像圧縮方式として広く利用されているMPEG−2方式や、あるいは、MPEG−4 AVC/H.264方式や、さらには、業務用のデジタルVTR(Video Tape Recorder)の規格の一つであるSMPTE(Society of Motion Picture and Television Engineers)−314M(DV−Based 25M)規格等に基づき圧縮符号化される。どのような圧縮符号化方式でも同様の効果を発揮するが、本実施の形態では、MPEG−4 AVC/H.264方式(以下、H.264と略記する)にて圧縮符号化する場合を説明する。   The video data supplied to the video encoding unit 103 is, for example, the MPEG-2 system widely used as a video compression system, or MPEG-4 AVC / H. H.264 system, and further compression coding based on SMPTE (Society of Motion Picture Engineers and Television Engineers) -314M (DV-Based 25M) standard, which is one of the standards of professional digital VTR (Video Tape Recorder). The Although any compression coding system can achieve the same effect, in this embodiment, MPEG-4 AVC / H. A case of compressing and encoding in the H.264 system (hereinafter abbreviated as H.264) will be described.

以上のように構成された本カメラレコーダにおいて、クイックモーション再生を実現するための記録例を用いて本実施の形態を説明する。例えば、ユーザが入力手段121に対して撮像の開始を指示すると、カメラ部100は、フレームレート設定手段111により設定された撮影時フレームレートXにて撮像処理を行い、再生時フレームレートである毎秒30フレームにフレームレートを変換して、有効フレーム抽出部101へと出力する。これはカメラ部以降の映像処理部が、例えば、毎秒24フレームや毎秒30フレームのようなSMPTE−274M等の規格で規定されたフレームレートでのみ動作する装置やLSIが多く、一旦このようなフレームレートに変換するほうが、実現が容易となるためである。   In the camera recorder configured as described above, the present embodiment will be described using a recording example for realizing quick motion playback. For example, when the user instructs the input unit 121 to start imaging, the camera unit 100 performs an imaging process at the shooting frame rate X set by the frame rate setting unit 111 and performs the reproduction frame rate every second. The frame rate is converted into 30 frames and output to the effective frame extraction unit 101. This is because many video processing units after the camera unit operate only at a frame rate defined by a standard such as SMPTE-274M such as 24 frames per second or 30 frames per second, and once such frames This is because conversion to a rate is easier to implement.

次に、この映像信号が有効フレーム抽出部101に供給される。クイックモーション再生のための記録時には、撮影時フレームレートX<再生時フレームレートとなっている。したがってカメラ部は映像信号として、フレームレートの変換により少なくとも一部のフレームを複数回出力する。有効フレーム抽出部101は、再生時フレームレートにてカメラ部から繰り返して出力される同じ映像信号のうちの先頭フレーム(以下、「有効フレーム」と略記する)を識別するための信号を、有効フレームフラグとして、映像信号とは別に出力する。有効フレーム抽出部101以降のブロックは、映像データと同期して供給される有効フレームフラグにより、撮影した有効フレームのデータのみを抽出して各ブロックの処理を行う。有効フレームフラグは、フレームレート設定手段111により設定された撮影時フレームレートXと、カメラ部から出力される映像データのフレームレート(本実施の形態の例では、再生時フレームレート)により決定する。有効フレームフラグの具体的な決定方法は次の通りである。撮影時フレームレートXと、カメラ部から出力される映像データのフレームレート(毎秒Yフレームとする)の比から、カメラ部から出力される映像データ中の有効フレームの割合と繰返し周期が決まる。したがって例えば、その繰り返し周期中のフレームのうち先頭フレームとして有効フレームを出力し、その有効フレームの映像データに有効フレームフラグを付与する。例えば、Xを10、Yを30とすると、繰返し周期は3、有効フレームの割合は1/3となるので、3フレームに1回、繰返し周期の先頭フレームを有効フレームとする。ただし、有効フレーム抽出部101以降のブロックが、例えば、単純な有効フレーム/無効フレームの繰り返し等のシーケンスで規定されており、フレームレート設定手段111により設定された撮影時フレームレートXと再生時フレームレートとにより、有効フレーム抽出部101以降の各ブロックにおいて、映像の有効フレームが明確に抽出できる場合は、有効フレーム抽出部101は必ずしも必要ではない。また、有効フレームを繰り返される映像データの先頭フレームとして説明したが、先頭でなく、途中や最後のフレームとしてもよい。さらに、本実施の形態では有効フレーム抽出部101にて有効フレームフラグを生成する構成としたが、カメラ部にて複数回出力される同一フレームのうちの先頭フレームを、有効フレームフラグと共に出力する構成としてもよい。   Next, this video signal is supplied to the effective frame extraction unit 101. At the time of recording for quick motion playback, the shooting frame rate X <the playback frame rate. Therefore, the camera unit outputs at least a part of frames as a video signal by converting the frame rate a plurality of times. The effective frame extraction unit 101 uses a signal for identifying the first frame (hereinafter abbreviated as “effective frame”) of the same video signal repeatedly output from the camera unit at the playback frame rate as an effective frame. As a flag, it is output separately from the video signal. The blocks after the effective frame extraction unit 101 extract only the data of the captured effective frame by the effective frame flag supplied in synchronization with the video data, and process each block. The effective frame flag is determined by the shooting frame rate X set by the frame rate setting unit 111 and the frame rate of video data output from the camera unit (in the example of the present embodiment, the playback frame rate). A specific method for determining the effective frame flag is as follows. The ratio of the effective frame in the video data output from the camera unit and the repetition cycle are determined from the ratio between the frame rate X at the time of shooting and the frame rate (Y frame per second) of the video data output from the camera unit. Therefore, for example, an effective frame is output as the first frame among the frames in the repetition cycle, and an effective frame flag is assigned to the video data of the effective frame. For example, if X is 10 and Y is 30, the repetition period is 3 and the ratio of effective frames is 1/3. Therefore, the first frame of the repetition period is set as an effective frame once every 3 frames. However, the blocks after the effective frame extraction unit 101 are defined by a sequence such as simple repetition of effective frames / invalid frames, for example, and the shooting frame rate X and the playback frame set by the frame rate setting means 111 are set. If the effective frame of the video can be clearly extracted in each block after the effective frame extraction unit 101 depending on the rate, the effective frame extraction unit 101 is not necessarily required. Further, although the effective frame has been described as the first frame of the video data to be repeated, it may be the middle or last frame instead of the first frame. Further, in this embodiment, the effective frame extraction unit 101 generates the effective frame flag. However, the first frame of the same frame output a plurality of times by the camera unit is output together with the effective frame flag. It is good.

図2は、撮影時フレームレートと再生時フレームレートの関係を示す図である。図中の数字は処理中のフレームに対して便宜的に振った番号を示す。図2は、撮影時フレームレートを毎秒10フレーム、再生時フレームレートを30フレームとしたときの図である。図2a)は、撮影時にカメラ部から出力される映像信号を示している。カメラ部は、毎秒10フレームの信号を撮像し、得られた各フレームを3フレームずつ出力することで、以降の処理部が処理しやすい毎秒30フレームの映像を出力している。次に有効フレーム抽出部101が、この映像信号に対して、繰り返し入力される同一のフレームのうち先頭のフレームに、有効フレームフラグを付与する。   FIG. 2 is a diagram showing the relationship between the shooting frame rate and the playback frame rate. The numbers in the figure indicate numbers assigned for convenience to the frame being processed. FIG. 2 is a diagram when the shooting frame rate is 10 frames per second and the playback frame rate is 30 frames. FIG. 2A) shows a video signal output from the camera unit during shooting. The camera unit captures a signal of 10 frames per second and outputs each of the obtained frames by 3 frames, thereby outputting an image of 30 frames per second that can be easily processed by subsequent processing units. Next, the effective frame extraction unit 101 assigns an effective frame flag to the first frame among the same frames that are repeatedly input to the video signal.

次に、有効フレームフラグと映像データは映像前処理部102に供給され、映像前処理設定制御手段114により設定された設定値に従って、有効フレームの映像データにのみフィルタ処理等の圧縮符号化の前処理を行う。この前処理では効率よく圧縮符号化を行うために、圧縮符号化する前の映像データに対して、例えば、ノイズ除去フィルタ処理や、帯域制限フィルタ処理等が行われる。   Next, the effective frame flag and the video data are supplied to the video preprocessing unit 102, and only the video data of the effective frame is subjected to compression encoding such as filtering processing according to the set value set by the video preprocessing setting control unit 114. Process. In order to efficiently perform compression encoding in this preprocessing, for example, noise removal filter processing, band limitation filter processing, and the like are performed on video data before compression encoding.

さらに、映像前処理部102から出力された映像データは、映像符号化部103に供給され、符号化設定制御手段115により設定された符号化パラメータにてMPEG−4 AVC/H.264等の符号化方式にて符号化処理が行われる。図2b)は、映像符号化部103から出力される符号化データを示している。このように映像符号化部103では、有効フレームフラグの付与されたフレームに対してのみ、符号化処理が行われる。すなわち、映像符号化部103には毎秒30フレームの映像信号が入力されるが、符号化して出力する符号化データは毎秒10フレームとなる。符号化された符号化データは、記録部にてファイル化され、半導体メモリや光ディスク等の記録媒体に記録される。図2c)は、このようにして記録された符号化データを再生したときの様子を示している。毎秒10フレームのフレームレートで記録された符号化データを、毎秒30フレームのデータとして読み出して再生するため、再生時の映像は3倍速のクイックモーションの映像となる。   Further, the video data output from the video pre-processing unit 102 is supplied to the video encoding unit 103 and is encoded by the MPEG-4 AVC / H. The encoding process is performed by an encoding method such as H.264. FIG. 2 b) shows encoded data output from the video encoding unit 103. As described above, the video encoding unit 103 performs the encoding process only on the frame to which the effective frame flag is assigned. That is, a video signal of 30 frames per second is input to the video encoding unit 103, but encoded data to be encoded and output is 10 frames per second. The encoded data that has been encoded is filed in a recording unit and recorded on a recording medium such as a semiconductor memory or an optical disk. FIG. 2c) shows a state when the encoded data recorded in this way is reproduced. Since the encoded data recorded at a frame rate of 10 frames per second is read and reproduced as 30 frames of data per second, the image at the time of reproduction becomes a 3 × speed quick motion image.

なお、本実施の形態では、映像前処理部102を含んだ構成で説明しているが、映像符号化部103が含まれていれば映像前処理部102を含んでいなくとも同様の効果を発揮することができる。   In the present embodiment, the configuration including the video preprocessing unit 102 is described. However, if the video encoding unit 103 is included, the same effect can be obtained even if the video preprocessing unit 102 is not included. It can be demonstrated.

次に、映像前処理部102と映像符号化部103の動作をより詳細に説明する。映像前処理部102と映像符号化部103の詳細ブロック図を図3に示す。これは、H.264規格で規定されている一般的な構成に加えて、前処理フィルタ部220、符号化メモリ211、出力制御部212を含んだ構成である。前述した通り映像前処理部102(すなわち、前処理フィルタ部220)は含まなくても同様の効果を発揮する。   Next, operations of the video preprocessing unit 102 and the video encoding unit 103 will be described in more detail. A detailed block diagram of the video preprocessing unit 102 and the video encoding unit 103 is shown in FIG. This is the In addition to the general configuration defined in the H.264 standard, the configuration includes a preprocessing filter unit 220, an encoding memory 211, and an output control unit 212. As described above, even if the video preprocessing unit 102 (that is, the preprocessing filter unit 220) is not included, the same effect is exhibited.

前処理フィルタ部220は、映像の符号化前の処理を行うブロックで、映像前処理部102に含まれ、本実施の形態では、圧縮効率を改善するために映像データの平準化処理フィルタ部を含む構成としている。前処理フィルタ部220から出力される映像データは、DCT/量子化部201に提供される。DCT/量子化部201は、この映像データに対して離散コサイン変換(DCT)及び量子化処理を行う。さらにエントロピー符号化部202は、量子化後のデータに対して、可変長符号化や算術符号化を行い、ビットストリームとして圧縮符号化データを出力する。圧縮符号化データは、符号化メモリ211にて一時的に蓄積される。同時に、逆量子化/IDCT部203は、DCT/量子化部201から提供された変換データに対し、逆量子化処理及び逆DCT(IDCT)処理を行い、フィルタ部204に再変換された映像データを提供する。フィルタ部204は、この映像データに対してデブロッキングフィルタ処理を行った後、フレームメモリ205に格納する。フレームメモリ205に格納された映像データは、フレーム内予測処理及びフレーム間予測処理にて利用される。フレーム内予測処理部206は、H.264の特徴の一つでもあるフレーム内での予測を行う。予測結果は、DCT/量子化部201にて次フレームの入力画像のDCT/量子化の際に用いられる。   The preprocessing filter unit 220 is a block that performs processing before video encoding, and is included in the video preprocessing unit 102. In the present embodiment, a video data leveling processing filter unit is provided to improve compression efficiency. It is configured to include. The video data output from the preprocessing filter unit 220 is provided to the DCT / quantization unit 201. The DCT / quantization unit 201 performs discrete cosine transform (DCT) and quantization processing on the video data. Further, the entropy encoding unit 202 performs variable length encoding or arithmetic encoding on the quantized data, and outputs compressed encoded data as a bit stream. The compressed encoded data is temporarily stored in the encoding memory 211. At the same time, the inverse quantization / IDCT unit 203 performs inverse quantization processing and inverse DCT (IDCT) processing on the converted data provided from the DCT / quantization unit 201 and reconverts the video data into the filter unit 204. I will provide a. The filter unit 204 performs deblocking filter processing on the video data and then stores the video data in the frame memory 205. Video data stored in the frame memory 205 is used in intra-frame prediction processing and inter-frame prediction processing. The intra-frame prediction processing unit 206 is an Prediction is performed within a frame that is also one of the H.264 features. The prediction result is used when the DCT / quantization unit 201 performs DCT / quantization of the input image of the next frame.

一方、入力画像は動きベクトル検出部208にも入力される。動きベクトル検出部208は、フレームメモリ205に格納されている参照フレームから水平方向と垂直方向の動きベクトルを検出する。フレーム間予測処理部207は、検出された動きベクトルに基づいて、可変MC(Motion Compensation)によるブロックの分割処理、動き補償処理及び動きベクトルの符号化を行う。切り替えスイッチ210は、フレーム毎にフレーム内予測符号化方式を適用するか、フレーム間予測符号化を適用するかを選択する。切り替えスイッチ210で選択された予測結果が、DCT/量子化部201に提供される。   On the other hand, the input image is also input to the motion vector detection unit 208. The motion vector detection unit 208 detects horizontal and vertical motion vectors from the reference frame stored in the frame memory 205. Based on the detected motion vector, the inter-frame prediction processing unit 207 performs block division processing, motion compensation processing, and motion vector encoding using variable MC (Motion Compensation). The changeover switch 210 selects whether to apply the intraframe predictive coding method or the interframe predictive coding for each frame. The prediction result selected by the changeover switch 210 is provided to the DCT / quantization unit 201.

符号化メモリ211は、符号化されたデータを一時的に蓄積するメモリであり、出力制御部212は、符号化メモリ211に蓄積されている符号化されたビットストリームを最終的に映像符号化部から出力するブロックである。符号化メモリ211の制御方法と、出力制御部212の処理の詳細は後述する。   The encoding memory 211 is a memory that temporarily stores encoded data, and the output control unit 212 finally converts the encoded bitstream stored in the encoding memory 211 into a video encoding unit. Is a block to be output from. Details of the control method of the encoding memory 211 and the processing of the output control unit 212 will be described later.

本発明の映像記録装置は、撮影時フレームレートと最大符号化フレームレートとの比に従って符号化パラメータを変更する、適応的符号化方式を採用している。この適応的符号化方式は大きく2つの方式に区分される。第1の適応的符号化方式は、映像前処理部102の処理設定、あるいは、映像符号化部103における各種符号化パラメータを撮影時フレームレートに応じて変化させる方法であり、第2の適応的符号化方式は、映像前処理部102の処理設定、あるいは、映像符号化部103における各種符号化パラメータを複数組備え、ひとつのフレームに対して複数のパラメータ組にて符号化された結果である、複数の圧縮符号化ストリームから最も効率の良いストリームを採用する方法である。   The video recording apparatus of the present invention employs an adaptive encoding system that changes the encoding parameter in accordance with the ratio between the shooting frame rate and the maximum encoding frame rate. This adaptive coding system is roughly divided into two systems. The first adaptive encoding method is a method of changing the processing setting of the video preprocessing unit 102 or various encoding parameters in the video encoding unit 103 according to the frame rate at the time of shooting. The encoding method is the result of encoding a plurality of parameter sets for a single frame with a plurality of sets of various encoding parameters in the video pre-processing unit 102 or the video encoding unit 103. This is a method of adopting the most efficient stream from a plurality of compression-coded streams.

まず、第1の適応的符号化方式の第1の例として、符号化設定制御手段115において、動きベクトル検出部208の符号化パラメータを制御して動きベクトル検出のための探索範囲を適応的に変更する例について説明する。動きベクトル検出部208では、まず、符号化を行う映像フレームを所定の大きさの矩形領域(例えば、16×16画素、8×8画素など)にブロック分割し、フレームメモリ205内に格納されている参照画面から各ブロックの予測値として適切なブロックを探索する。一般的には、参照画面内のあらかじめ設定された探索範囲内で、ブロックの位置を少しずつ動かして、当該位置のブロックが予測値として適切か否かを判定する。一般的に探索範囲を拡大すると画質や圧縮符号化効率は向上するが、動きベクトル検出は、圧縮符号化処理の中でも特に処理負荷が高く、頻繁にメモリアクセスが発生することでメモリバスがボトルネックになるため探索範囲を限定して実現するのが一般的である(例えば、特開平9−261652号公報)。したがって、最大符号化フレームレートと等しいフレームレートにて、リアルタイムに符号化する場合には処理速度が間に合わず動作を保証できないような広い探索範囲でも、それ以下の低いフレームレートで符号化する場合では、1フレームあたりの処理にかけることのできる時間が増加するため、リアルタイム符号化の動作保証が可能になる。言い換えれば、撮影時フレームレートが最大符号化フレームレートよりも低い場合には、撮影時フレームレートにおける1フレームの符号化にかけることのできる時間が、最大符号化フレームレートにおけるそれよりも長くなる。そこで、増加した時間の分だけ、符号化設定を適応的に変更する。すなわち、最大符号化フレームレートでの符号化時よりも処理負荷が高いが、より高効率な符号化を行うように、符号化設定を変更する。例えばこの第1の例では、動きベクトル検出の探索範囲を最大符号化フレームレートでの符号化時の範囲より広くすることで、処理負荷が高いが高効率な符号化を行うようにすることができる。ここで、最大符号化フレームレートとは、機器全体が最大の符号化能力で符号化した場合のフレームレートであり、好ましくは、機器で対応する最大となる記録時のフレームレートと一致する。以下の説明では、最大符号化フレームレートを毎秒30フレームとして説明する。   First, as a first example of the first adaptive encoding scheme, the encoding setting control means 115 controls the encoding parameter of the motion vector detection unit 208 to adaptively set a search range for motion vector detection. An example of changing will be described. The motion vector detection unit 208 first divides a video frame to be encoded into rectangular areas of a predetermined size (for example, 16 × 16 pixels, 8 × 8 pixels, etc.) and stores them in the frame memory 205. An appropriate block is searched as a predicted value of each block from the reference screen. In general, the position of a block is moved little by little within a preset search range in the reference screen to determine whether or not the block at that position is appropriate as a predicted value. In general, image quality and compression / encoding efficiency are improved when the search range is expanded, but motion vector detection has a particularly high processing load even during compression / encoding, and the memory bus is frequently generated, causing the memory bus to become a bottleneck. Therefore, the search range is generally limited (for example, Japanese Patent Laid-Open No. 9-261552). Therefore, when encoding in real time at a frame rate equal to the maximum encoding frame rate, even in a wide search range where the processing speed cannot be guaranteed and operation cannot be guaranteed, Since the time available for processing per frame increases, the real-time encoding operation can be guaranteed. In other words, when the shooting frame rate is lower than the maximum encoded frame rate, the time that can be spent for encoding one frame at the shooting frame rate is longer than that at the maximum encoded frame rate. Therefore, the encoding setting is adaptively changed by the increased time. That is, the processing load is higher than that at the time of encoding at the maximum encoding frame rate, but the encoding setting is changed so as to perform more efficient encoding. For example, in this first example, by making the search range for motion vector detection wider than the range at the time of encoding at the maximum encoding frame rate, it is possible to perform highly efficient encoding with a high processing load. it can. Here, the maximum encoding frame rate is a frame rate when the entire device is encoded with the maximum encoding capability, and preferably coincides with the maximum recording frame rate corresponding to the device. In the following description, the maximum encoding frame rate is assumed to be 30 frames per second.

次に、探索範囲を適応的に変更するための具体的なアルゴリズムについて説明する。動きベクトル検出部208の最大探索範囲設定を制御する符号化設定制御手段115において、以下の式でフレームレート比(FRR)を求める。   Next, a specific algorithm for adaptively changing the search range will be described. In the encoding setting control means 115 that controls the maximum search range setting of the motion vector detection unit 208, the frame rate ratio (FRR) is obtained by the following equation.

FRR=最大符号化フレームレート/撮影時フレームレート
動きベクトル検出の探索範囲は、図4のFRRの条件により決定する。撮影時フレームレートと最大符号化フレームレートが一致するとき、すなわち、FRR=1のときを基準とすると、動きベクトル検出の探索範囲も含めたすべての符号化パラメータが一定であれば、動きベクトル検出の最大処理量は一定であり、FRRが大きくなる、すなわち撮影時フレームレートが低くなるに従って一定時間あたりの処理負荷は軽減される。したがって、符号化処理能力を最大限発揮するために、符号化設定制御手段115はFRRの増加に合わせて探索範囲を拡大する。符号化処理クロック等は同一の周波数であるため、1フレーム分の映像データを符号化する処理量は増えることになるが、1フレームあたりの映像データの符号化処理にかけることのできる時間も伸びるため、リアルタイム符号化の動作保証が可能になる。また、FRRが1より小さい場合は符号化処理がリアルタイムに処理できないことを表しており、できるだけ短時間で符号化が終了するように探索範囲を縮小した設定とする。しかし、リアルタイム符号化を目的とした映像記録装置では、FRRが1より小さくなる撮影時フレームレートをユーザにより設定できない構成にすることが望ましい。
FRR = maximum encoding frame rate / shooting frame rate The search range for motion vector detection is determined by the FRR condition in FIG. When the frame rate at the time of shooting matches the maximum encoding frame rate, that is, when FRR = 1, the motion vector detection is performed if all the encoding parameters including the search range of motion vector detection are constant. The maximum processing amount is constant, and the processing load per fixed time is reduced as the FRR increases, that is, the shooting frame rate decreases. Therefore, in order to maximize the encoding processing capability, the encoding setting control means 115 expands the search range in accordance with the increase in FRR. Since the encoding processing clocks and the like have the same frequency, the amount of processing for encoding video data for one frame increases, but the time that can be spent for encoding processing of video data per frame also increases. Therefore, it is possible to guarantee the operation of real-time encoding. Further, when FRR is smaller than 1, it indicates that the encoding process cannot be performed in real time, and the search range is set to be reduced so that the encoding is completed in as short a time as possible. However, it is desirable that the video recording apparatus for the purpose of real-time encoding has a configuration in which the user cannot set the shooting frame rate at which FRR is smaller than 1.

なお、FRRと探索範囲の設定の関係は一例であり、同一の探索範囲とするFRRの区間を短くしてもよいし、FRRの大きさに従って適宜変更してもかまわない。好ましくは、FRR=1のときの水平方向の探索範囲の距離H1、垂直方向の探索範囲の距離V1に対して、FRR=Fnのときの水平方向の探索範囲の距離Hn,垂直方向の探索範囲の距離Vnとすると、下記の式を満たす最大のHn,Vnとすれば、処理能力を最大限発揮することができる。   Note that the relationship between the FRR and the search range setting is an example, and the FRR section for the same search range may be shortened, or may be changed as appropriate according to the size of the FRR. Preferably, the distance H1 in the horizontal search range when FRR = 1 and the distance V1 in the vertical search range are the distance Hn in the horizontal search range and the vertical search range when FRR = Fn. If the distance Vn is the maximum Hn and Vn satisfying the following expression, the processing capability can be maximized.

Fn≧(Hn×Vn)/(H1×V1)
また、H.264の規格によれば、例えば、レベル2.1から3.0では、動きベクトルの最大値は−512〜+511、レベル3.1から5.1では、−256〜+255と規定されており、H.264規格に準拠する場合はこの制限を超えないようにしなければならないが、本発明はH.264規格の制限に限定されるものではない。
Fn ≧ (Hn × Vn) / (H1 × V1)
H. According to the H.264 standard, for example, in levels 2.1 to 3.0, the maximum value of a motion vector is defined as −512 to +511, and in levels 3.1 to 5.1, −256 to +255. H. When conforming to the H.264 standard, this limit must not be exceeded. It is not limited to the restrictions of the H.264 standard.

また、第1の適応的符号化方式における第2の例として、フレーム内予測符号化(イントラ予測符号化)のブロックサイズ設定を適応的に変更する例について説明する。H.264符号化方式では、フレーム内で符号化を行うIピクチャにおいて、フレーム内予測を用いることで符号化効率の向上を実現している。このフレーム内予測符号化においては、輝度信号に関しては、処理ブロック単位をそれぞれ4×4画素、16×16画素とする2つの符号化モードが存在するが、16×16モードの方が、パターンが多く処理負荷が高い。そこで、前記FRRが4以上のときは、16×16画素モードでフレーム内予測符号化を行い、4未満の場合には、4×4画素モードでフレーム内予測符号化を行う。   In addition, as a second example in the first adaptive encoding scheme, an example in which the block size setting of intra-frame prediction encoding (intra prediction encoding) is adaptively changed will be described. H. In the H.264 encoding method, the encoding efficiency is improved by using intra-frame prediction in an I picture that is encoded in a frame. In this intra-frame prediction coding, there are two coding modes for the luminance signal with the processing block unit being 4 × 4 pixels and 16 × 16 pixels, respectively, but the pattern is more in the 16 × 16 mode. Many processing loads are high. Therefore, when the FRR is 4 or more, intra-frame prediction encoding is performed in the 16 × 16 pixel mode, and when it is less than 4, intra-frame prediction encoding is performed in the 4 × 4 pixel mode.

図3のフレーム内予測処理部206において、4×4画素、16×16画素の2つの符号化モードを切り替え可能な構成とし、符号化設定制御手段115にて、上述した制御方法でフレーム内予測符号化モードの切り替え制御を行う。   The intra-frame prediction processing unit 206 in FIG. 3 is configured to be able to switch between two encoding modes of 4 × 4 pixels and 16 × 16 pixels, and the encoding setting control unit 115 performs intra-frame prediction using the control method described above. Encoding mode switching control is performed.

また、第1の適応的符号化方式における第3の例として、映像前処理部102にてフィルタ係数のタップ数を適応的に変更する例について説明する。撮影時フレームレートと最大符号化フレームレートが一致するとき、すなわち、FRR=1のときに映像前処理設定制御手段114が設定する前処理フィルタ部220のフィルタタップ数を16タップとすると、FRR≧2の場合には、フィルタタップ数を2倍の32タップとする。処理時間も2倍の時間があるため、16タップの演算器を2回利用することで資源を有効活用できる。   In addition, as a third example in the first adaptive encoding method, an example in which the number of taps of the filter coefficient is adaptively changed in the video preprocessing unit 102 will be described. When the number of filter taps of the preprocessing filter unit 220 set by the video preprocessing setting control unit 114 when the shooting frame rate matches the maximum encoding frame rate, that is, when FRR = 1, FRR ≧ In the case of 2, the number of filter taps is doubled to 32 taps. Since the processing time is also doubled, resources can be effectively used by using a 16-tap computing unit twice.

次に、第2の適応的符号化方式として、1フレーム分の映像データに対して適応的に複数回符号化を行うことで高効率な圧縮符号化を行う方式を説明する。第2の適応的符号化方式の概念図を図5に示す。図5では1フレーム分の映像データに対し、2回符号化を行う例を示している。図5において、a)はカメラ部が撮影時フレームレートで撮影した映像データであり、映像前処理部102に提供されるデータを表している。b)は符号化時の符号化データを表しており、符号化時に1フレーム分の映像データに対して、符号化パラメータを変更して複数回圧縮符号化処理を行う。c)は映像符号化部103から出力される圧縮符号化ストリームを表しており、b)で符号化した複数の符号化データからもっとも効率の良い(例えば、符号化サイズがもっとも小さい)符号化データを採用する。図中の例は、符号化時の符号化データとして、フレーム1a、2a及び3bが採用されたことを示している。   Next, as a second adaptive encoding method, a method for performing highly efficient compression encoding by adaptively encoding a plurality of times of video data for one frame will be described. A conceptual diagram of the second adaptive encoding scheme is shown in FIG. FIG. 5 shows an example in which one frame of video data is encoded twice. In FIG. 5, a) is video data shot by the camera unit at the shooting frame rate, and represents data provided to the video preprocessing unit 102. b) represents encoded data at the time of encoding, and compression encoding processing is performed a plurality of times by changing the encoding parameter for one frame of video data at the time of encoding. c) represents a compressed encoded stream output from the video encoding unit 103, and is the most efficient (for example, the smallest encoded size) encoded data from the plurality of encoded data encoded in b). Is adopted. The example in the figure shows that frames 1a, 2a, and 3b are employed as encoded data at the time of encoding.

映像前処理部102と映像符号化部103を制御するのはシステム制御部110の映像処理設定制御部113すなわち、映像前処理設定制御手段114、符号化設定制御手段115である。以下、第2の適応的符号化方式の例として、H.264の符号化構造(フレーム/フィールド)の適応制御と、映像前処理部のフィルタの適応的制御、及び、映像符号化部103の量子化パラメータの適応制御に関して説明する。   The video preprocessing unit 102 and the video encoding unit 103 are controlled by the video processing setting control unit 113 of the system control unit 110, that is, the video preprocessing setting control unit 114 and the encoding setting control unit 115. Hereinafter, as an example of the second adaptive encoding scheme, H.264 is used. H.264 coding structure (frame / field) adaptive control, video pre-processing unit filter adaptive control, and video coding unit 103 quantization parameter adaptive control will be described.

まず、第2の適当的符号化方式の第1の例として、符号化設定制御手段115における符号化構造(フレーム/フィールド)の適応的制御に関して説明する。H.264のメインプロファイルにおいては、符号化構造として、Frame−Base符号化、Field−Base符号化、Pict−Level Adaptiveフレーム/フィールド符号化(PAFF)及びMacroBlock−Level Adaptiveフレーム/フィールド符号化(MBAFF)の4通りの方法を選択できるように規格で定められている。PAFF、MBAFFは、Frame−Base符号化やField−Base符号化より高い符号化効率を実現することが可能であるが、それぞれ、フレーム構造、フィールド構造の両方で符号化を行って、結果として符号化効率の高いモードを選択する処理を行うため、膨大な演算量を必要とする。   First, adaptive control of the coding structure (frame / field) in the coding setting control means 115 will be described as a first example of the second appropriate coding method. H. In the H.264 main profile, Frame-Base coding, Field-Base coding, Pict-Level Adaptive frame / field coding (PAFF), and MacroBlock-Level Adaptive frame / field coding (MBAFF) are used as coding structures. It is defined in the standard so that four methods can be selected. PAFF and MBAFF can achieve higher encoding efficiency than Frame-Base encoding and Field-Base encoding, but encoding is performed with both frame structure and field structure, respectively. In order to perform the process of selecting a mode with high efficiency, a huge amount of calculation is required.

そこで、第2の適応的符号化方式では、符号化設定制御手段115が映像符号化部103に対して設定を行い、前述のFRRが2未満のときには、符号化処理負荷軽減のためフィールド構造あるいはフレーム構造のいずれかで1回だけ符号化を行い、前述のFRRが2以上のときには、1フレームの映像データに対してフレーム構造とフィールド構造での2回の符号化を施して符号化効率のよい方の符号化データを採用するPAFF方式にて符号化を行う。例えば、1回目の符号化時はフレーム構造で符号化を行い、2回目の符号化時はフィールド構造で符号化を行う。すなわち、図5において、1a、2a、3aはフレーム構造で符号化を行い、1b、2b、3bはフィールド構造で符号化を行う。2回の符号化結果は符号化メモリ211に一時的に蓄積される。出力制御部212は、これらの結果からより符号化効率のよいほうの符号化データを採用し、出力する。図6に前述した符号化構造の適応的制御方法のフローチャートを示す。S001にて前述したFRRのチェックを行い、FRRが2以上の場合はS002のPAFF設定を行う。FRRが2より小さい場合には、S003にて入力のビデオ撮像方法に従って設定を変える。撮像方法がインターレース方式の場合には、S004にてField−Base設定を行い、プログレッシブ方式の場合には、S005にてFrame−Base設定を行う。   Therefore, in the second adaptive encoding system, the encoding setting control means 115 sets the video encoding unit 103, and when the above FRR is less than 2, the field structure or the structure is reduced to reduce the encoding processing load. Encoding is performed only once in one of the frame structures, and when the above-mentioned FRR is 2 or more, encoding of one frame of video data is performed twice in the frame structure and the field structure to improve the encoding efficiency. Encoding is performed by the PAFF method that employs the better encoded data. For example, encoding is performed with a frame structure at the first encoding, and encoding is performed with a field structure at the second encoding. That is, in FIG. 5, 1a, 2a, and 3a are encoded with a frame structure, and 1b, 2b, and 3b are encoded with a field structure. The two encoding results are temporarily stored in the encoding memory 211. From these results, the output control unit 212 adopts and outputs the encoded data having the better encoding efficiency. FIG. 6 shows a flowchart of the adaptive control method of the coding structure described above. In S001, the FRR check described above is performed. If the FRR is 2 or more, the PAFF setting in S002 is performed. If FRR is less than 2, the setting is changed in S003 according to the input video imaging method. If the imaging method is an interlace method, Field-Base setting is performed in S004, and if it is a progressive method, Frame-Base setting is performed in S005.

なお、図6では、FRRが2以上のとき、実現が容易なように、単純なFrame−Base符号化とField−Base符号化の組み合わせで実現できるPAFFを行うような制御を行っているが、MBAFFを行ってもよい。また、図6のフローチャートは一例であり、例えば、FRR≧3の場合にMBAFFを行い、FRR≧2の場合はPAFFを行ってもよい。   In FIG. 6, when FRR is 2 or more, control is performed so as to perform PAFF that can be realized by a combination of simple Frame-Base encoding and Field-Base encoding so that the implementation is easy. MBAFF may be performed. 6 is an example. For example, MBAFF may be performed when FRR ≧ 3, and PAFF may be performed when FRR ≧ 2.

次に、第2の適応的符号化方式の第2の例として、映像前処理設定制御手段114において、映像前処理部102のフィルタ処理を適応的に制御する方法を説明する。基本的な制御のフローチャートの例を図7に示す。S101にて、符号化設定制御手段115は、前述したFRRのチェックを行い、FRRが2以上の場合はS102,S103にて複数の符号化設定で同一の映像データを符号化するように映像前処理部102を設定する。さらに、S104,S105,S106において、出力制御部212は、S102,S103にて符号化されて符号化メモリ211に蓄積された符号化データnの中で最も効率の良い(例えば、符号化データのサイズの小さい、あるいは、32kbyte等のファイルシステムの記録時のアライメントに対して空き記録領域が少なくなる等で決定する)符号化データを記録媒体に記録する。例えば、符号化設定制御手段115は、S102では符号化設定1として、帯域制限する特性を備えたフィルタ係数1を映像前処理部102に設定し、映像符号化部103がその設定で符号化を行う。その後、S103では符号化設定2として、ノイズ除去の特性を備えたフィルタ係数2を設定して符号化を行う。そして、S104では符号化データのサイズが小さい方を記録データとして採用する。このように、異なった特性のフィルタ係数で同一の映像データに対して符号化を行うことで、効率的な符号化を行うための映像前処理が行える。なお、S101にてFRRが2未満の場合はS111、S112にて一種類の符号化設定で一度だけ符号化を行って出力する。   Next, as a second example of the second adaptive encoding method, a method of adaptively controlling the filter processing of the video preprocessing unit 102 in the video preprocessing setting control unit 114 will be described. An example of a basic control flowchart is shown in FIG. In S101, the encoding setting control unit 115 performs the above-described FRR check. If the FRR is 2 or more, the encoding setting control unit 115 encodes the same image data so as to encode the same image data with a plurality of encoding settings in S102 and S103. The processing unit 102 is set. Further, in S104, S105, and S106, the output control unit 212 is the most efficient among the encoded data n encoded in S102 and S103 and stored in the encoding memory 211 (for example, the encoded data The encoded data is recorded on the recording medium. For example, the encoding setting control unit 115 sets the filter coefficient 1 having the band limiting characteristic as the encoding setting 1 in S102 in the video preprocessing unit 102, and the video encoding unit 103 performs encoding using the setting. Do. Thereafter, in S103, encoding is performed by setting a filter coefficient 2 having noise removal characteristics as encoding setting 2. In S104, the smaller encoded data size is adopted as the recording data. In this way, by encoding the same video data with filter coefficients having different characteristics, video preprocessing for efficient encoding can be performed. If the FRR is less than 2 in S101, encoding is performed only once with one kind of encoding setting in S111 and S112, and output.

ここで、S104、S105、S106における符号化メモリ211の制御方法と、出力制御部212が、最終的に記録媒体に記録される符号化データを出力するときの制御方法に関して説明する。異なる符号化パラメータで複数回符号化された符号化データは、すべて符号化メモリ211に蓄積され、符号化設定制御手段115により効率がよいと選択された、記録媒体120に記録すべき符号化データのみが出力制御部212から出力される。この出力された符号化データは、記録部104に供給され、記録部104では、供給されたすべての符号化データをファイル化して記録媒体に記録する構成とする。この際、記録制御手段116によりファイル化の処理が行われ、ファイルとして記録媒体に記録される。   Here, the control method of the encoding memory 211 in S104, S105, and S106 and the control method when the output control unit 212 outputs the encoded data to be finally recorded on the recording medium will be described. Encoded data that has been encoded a plurality of times with different encoding parameters is all stored in the encoding memory 211, and the encoded data to be recorded on the recording medium 120 that is selected as efficient by the encoding setting control means 115. Only from the output control unit 212. The output encoded data is supplied to the recording unit 104, and the recording unit 104 is configured to record all the supplied encoded data in a file on a recording medium. At this time, file processing is performed by the recording control means 116 and recorded as a file on a recording medium.

図8は図7における出力制御部と符号化メモリの制御方法の一例を模式的に示した図である。図8において、各フレームを符号化した結果は、データの先頭ポインタが指し示すアドレスから書き込まれる。例えば符号化データ1が書き込まれる領域の先頭は、データ1先頭ポインタが示している。また、書き込みポインタが現在の書き込み先を示し、読み出しポインタが現在の読み出し先を示している。図8(A)は通常設定、すなわち図7のS101においてFRRが2未満の場合での符号化時のある時点での符号化メモリの内容を表している。図のように、1フレーム毎にエントロピー符号化部202から供給される符号化データが書き込まれる。すなわち、一つ目のフレームが符号化され、データ1先頭ポインタが先頭を示す領域に符号化データ1として書き込まれた後、二つ目のフレームが符号化され、データ2先頭ポインタが先頭を示す領域に符号化データ2として書き込まれる。出力制御部212は、符号化設定制御手段115により指定される先頭ポインタから1フレームに相当する符号化データを順に読み出し、映像符号化部103から出力する。図8(A)の例では符号化メモリにて符号化データ2が書き込まれている間に、直前に書き込まれた符号化データ1が読み出される。   FIG. 8 is a diagram schematically showing an example of a method for controlling the output control unit and the encoding memory in FIG. In FIG. 8, the result of encoding each frame is written from the address indicated by the head pointer of the data. For example, the head of the area where the encoded data 1 is written is indicated by the data 1 head pointer. The write pointer indicates the current write destination, and the read pointer indicates the current read destination. FIG. 8A shows the contents of the encoding memory at a certain point in time when encoding is performed in the normal setting, that is, when FRR is less than 2 in S101 of FIG. As shown in the figure, encoded data supplied from the entropy encoding unit 202 is written for each frame. That is, after the first frame is encoded and the data 1 head pointer is written as the encoded data 1 in the area indicating the head, the second frame is encoded and the data 2 head pointer indicates the head. The encoded data 2 is written in the area. The output control unit 212 sequentially reads encoded data corresponding to one frame from the head pointer designated by the encoding setting control unit 115 and outputs the encoded data from the video encoding unit 103. In the example of FIG. 8A, while the encoded data 2 is being written in the encoding memory, the encoded data 1 written immediately before is read out.

図8(B)は異なった符号化パラメータで複数回圧縮符号化を行う場合、すなわち図7のS101においてFRRが2以上の場合の符号化メモリの内容を表している。エントロピー符号化部202が1フレーム分の映像データを複数の符号化パラメータにて符号化した符号化データ(符号化データ1a,符号化データ1b)が、順に書き込まれる。   FIG. 8B shows the contents of the encoding memory when the compression encoding is performed a plurality of times with different encoding parameters, that is, when the FRR is 2 or more in S101 of FIG. Encoded data (encoded data 1a, encoded data 1b) in which the entropy encoding unit 202 encodes video data for one frame with a plurality of encoding parameters are sequentially written.

図8(C)は、エントロピー符号化部202が次のフレームの符号化データ(符号化データ2a、符号化データ2b)を符号化メモリ211に書き込んでいる途中に、図8(B)で書き込まれた符号化データ(符号化データ1a,符号化データ1b)が、出力制御部212により読み出され、映像符号化部103から出力され、記録部104にて記録媒体に記録されることを表している。出力制御部212によって符号化メモリ211から読み出されて出力される符号化データは、記録部104が記録媒体120に記録する符号化データのみとする。すなわち、符号化メモリに符号化データ1a及び符号化データ2bが書き込まれた後で、出力制御部212はいずれの符号化データが効率がよいかを判断してその符号化データ(図では1b)を読み出すようにする。これは、符号化設定制御手段115が、効率がよいと判断した符号化データの先頭ポインタを出力制御部212に指定して、出力制御部212が、そのポインタから該当する1フレーム分の符号化データを読み出すことで実現する。   8C is written in FIG. 8B while the entropy encoding unit 202 is writing the encoded data (encoded data 2a, encoded data 2b) of the next frame in the encoding memory 211. The encoded data (encoded data 1a, encoded data 1b) is read by the output control unit 212, output from the video encoding unit 103, and recorded on the recording medium by the recording unit 104. ing. The encoded data read from the encoding memory 211 and output by the output control unit 212 is only encoded data that the recording unit 104 records on the recording medium 120. That is, after the encoded data 1a and the encoded data 2b are written in the encoding memory, the output control unit 212 determines which encoded data is efficient and determines the encoded data (1b in the figure). Is read out. This is because the encoding setting control means 115 designates the head pointer of the encoded data determined to be efficient to the output control unit 212, and the output control unit 212 encodes the corresponding one frame from the pointer. Realized by reading data.

上記のように、映像符号化部103においては、出力制御部212以外はすべてのデータに対して一般的なH.264の符号化処理を行えばよく、出力制御部212以外に特別な装置や手段は必要ないため実現が容易である。   As described above, in the video encoding unit 103, a general H.264 standard is applied to all data except the output control unit 212. H.264 encoding processing only needs to be performed, and no special device or means other than the output control unit 212 is required, which is easy to implement.

なお、図7,図8では1フレームの同一の映像データを2回符号化する方法を説明したが、同一の映像データを3回以上符号化してもよい。例えば、FRR≧3の場合に1フレームの同一の映像データを3回符号化し、FRR≧2の場合に1フレームの同一の映像データを2回符号化してもよい。   7 and 8, the method of encoding the same video data of one frame twice has been described, but the same video data may be encoded three or more times. For example, the same video data of one frame may be encoded three times when FRR ≧ 3, and the same video data of one frame may be encoded twice when FRR ≧ 2.

次に、第2の適応的符号化方式の第3の例として、符号化設定制御手段115における、DCT/量子化部201の量子化パラメータの適応的制御に関して説明する。量子化は、圧縮符号化の効率及び画質を左右する重要な処理で、様々な量子化パラメータによって量子化が行われている。H.264符号化方式では、量子化マトリックスとして量子化する際のパラメータ表が定義されているが、このパラメータ表を複数切り替え可能な構成にすることで量子化パラメータの適応的制御を実現する。すなわち、符号化設定制御手段115が映像符号化部103に対して、複数のパラメータ表を使用して量子化処理を行うように設定する。このとき、どのパラメータ表を利用したかは、エントロピー符号化部202が符号化データ中にメタデータ(Q_TABLE)として含めるようにし、最終的に記録ファイル中に記録されるようにする。復号化時には、記録されたQ_TABLEに従ったパラメータ表で逆量子化を行う。基本的な処理の流れは図7と同様であり、符号化設定1を量子化パラメータ1、符号化設定2を量子化パラメータ2と読み替えて実現すればよい。   Next, adaptive control of the quantization parameter of the DCT / quantization unit 201 in the encoding setting control unit 115 will be described as a third example of the second adaptive encoding method. Quantization is an important process that affects the efficiency and image quality of compression coding, and quantization is performed using various quantization parameters. H. In the H.264 encoding method, a parameter table for quantization as a quantization matrix is defined, but adaptive control of quantization parameters is realized by adopting a configuration in which a plurality of parameter tables can be switched. That is, the encoding setting control unit 115 sets the video encoding unit 103 to perform quantization using a plurality of parameter tables. At this time, which parameter table is used is determined so that the entropy encoding unit 202 includes the encoded data as metadata (Q_TABLE) and is finally recorded in the recording file. At the time of decoding, inverse quantization is performed using a parameter table according to the recorded Q_TABLE. The basic processing flow is the same as that in FIG. 7, and the encoding setting 1 may be realized as the quantization parameter 1 and the encoding setting 2 as the quantization parameter 2.

以上のように、本実施の形態の映像記録装置1によれば、少ないハードウエア資源(例えば、メモリ容量やメモリバススペックや演算器)を用いて、リアルタイムで符号化処理を行うことを目的として、第1、第2の適応的符号化方式によって、常にハードウエアの最大処理能力を発揮することで、高画質で、高効率な符号化を行うことができる。   As described above, according to the video recording apparatus 1 of the present embodiment, for the purpose of performing encoding processing in real time using a small amount of hardware resources (for example, memory capacity, memory bus specification, and arithmetic unit). The first and second adaptive encoding methods always exhibit the maximum processing capability of the hardware, so that high-quality and highly efficient encoding can be performed.

なお、FRRを撮影時フレームレートと最大符号化フレームレートの比として説明したが、撮影時フレームレートと再生時フレームレートが等しい場合にも同様の効果を発揮する。この場合、カメラ部100や映像前処理部102、記録処理部104は再生時フレームレートにて動作するため実装が容易である特徴がある。また、再生装置や、再生時フレームレートにて機能を制限する(例えば、動きベクトルの探索範囲の制限)規格に対して高画質の符号化が行える利点がある。これは、一般的に、再生時の復号装置の性能や回路規模上の制約のために、再生装置及び復号化処理の実現を容易にする規格を設けることが多く、本発明は、任意の再生時フレームレート(撮影時フレームレートに等しい)に対して、常にハードウエアの最大処理能力を発揮して、高効率な圧縮符号化を行うものであり、前述した規格に制限された中で高画質な圧縮符号化を行うのに適している。   Note that although FRR has been described as a ratio between the shooting frame rate and the maximum encoding frame rate, the same effect can be achieved when the shooting frame rate is equal to the reproduction frame rate. In this case, the camera unit 100, the video pre-processing unit 102, and the recording processing unit 104 operate at a playback frame rate, and thus are easy to implement. In addition, there is an advantage that high-quality encoding can be performed with respect to a playback device and a standard whose function is limited by the frame rate at the time of playback (for example, limitation of a search range of motion vectors). In general, a standard that facilitates the implementation of a playback device and a decoding process is often provided due to restrictions on the performance and circuit scale of the decoding device during playback. The maximum hardware processing capacity is always used for the time frame rate (equal to the shooting frame rate), and high-efficiency compression coding is performed. It is suitable for performing simple compression coding.

なお、本実施の形態では、圧縮符号化方式にMPEG−4 AVC/H.264方式を用いることとして説明したが、MPEG−2方式を用いた場合にも同様の効果があることは明確である。また、SMPTE−314M(DV−Based 25M)等のフレーム内圧縮符号化方式においては、フレーム間の相関を利用して符号化する方法は用いられないが、この方法以外の符号化パラメータの制御は同様の効果があり、さらに、映像前処理部102での適応処理は符号化方式に関係なく同様の効果を発揮する。   In the present embodiment, MPEG-4 AVC / H. It has been described that the H.264 system is used, but it is clear that the same effect can be obtained when the MPEG-2 system is used. In addition, in an intra-frame compression encoding method such as SMPTE-314M (DV-Based 25M), a method of encoding using correlation between frames is not used, but control of encoding parameters other than this method is not possible. The same effect is obtained, and the adaptive processing in the video preprocessing unit 102 exhibits the same effect regardless of the encoding method.

また、本実施の形態においては、有効フレームフラグを映像データとは別に出力する構成として説明したが、たとえば、映像信号の垂直ブランキング期間に有効フレームフラグを多重する等映像信号に多重した形で出力する構成としてもよい。また、有効フレームフラグによって識別されるフレームは連続する同じフレームの先頭フレームでなくてもよく、連続する同じフレームの中から有効な1フレームを抜き出す構成であればよい。   In the present embodiment, the effective frame flag is output separately from the video data. However, for example, the effective frame flag is multiplexed with the video signal such as the effective frame flag multiplexed in the vertical blanking period of the video signal. It is good also as a structure to output. Further, the frame identified by the valid frame flag may not be the first frame of the same continuous frame, and may be a configuration in which one valid frame is extracted from the same continuous frame.

また、本実施の形態において、カメラ部100から一定のフレームレートで映像データの出力が行われる方法を説明したが、カメラ部100は記録時フレームレートで出力した映像データをフレームメモリ等に一旦記憶させ、これを再生時フレームレート等、設定されたフレームレートになるように読み出す等、実質的に設定されたフレームレートで映像信号を出力する構成としてもよい。   In the present embodiment, the method of outputting video data at a constant frame rate from the camera unit 100 has been described. However, the camera unit 100 temporarily stores the video data output at the recording frame rate in a frame memory or the like. The video signal may be output at a substantially set frame rate, for example, by reading it so as to have a set frame rate such as a playback frame rate.

また、映像符号化部103(出力制御部212)から符号化データをフレーム毎に出力する方法を説明したが、フレーム間圧縮符号化方式を用いる符号化の場合には、フレーム毎に出力する意味はなく、映像符号化部103からの出力は、フレーム毎の出力に限定するものではない。   Further, the method of outputting encoded data for each frame from the video encoding unit 103 (output control unit 212) has been described. However, in the case of encoding using the interframe compression encoding method, the meaning of outputting for each frame. No, the output from the video encoding unit 103 is not limited to the output for each frame.

(実施の形態2)
本発明の実施の形態2における映像記録装置について説明する。本実施の形態の映像記録装置の概略構成は、実施の形態1における映像記録装置1とほぼ同じであるので、同一部分については説明を省略する。実施の形態1と異なる点は、主に前記FRRが1以上2未満となる撮影時フレームレートを適応的制御の対象とすることと、そのことによる映像処理設定制御部113(映像前処理設定制御手段114、及び、符号化設定制御手段115)の制御の追加や変更である。すなわち、本実施の形態の適応的符号化方式は、実施の形態1の第2の適応的符号化方式を、FRRが1以上2未満の場合に適用したものに相当する。ここでは、撮影時フレームレートを毎秒24フレーム、再生時フレームレートを毎秒30フレームに設定したものとして、以下の説明を行う。また、最大符号化フレームレートも毎秒30フレームとする。
(Embodiment 2)
A video recording apparatus according to Embodiment 2 of the present invention will be described. Since the schematic configuration of the video recording apparatus according to the present embodiment is substantially the same as that of the video recording apparatus 1 according to the first embodiment, the description of the same parts is omitted. The difference from the first embodiment is that the shooting frame rate at which the FRR is 1 or more and less than 2 is subject to adaptive control, and the video processing setting control unit 113 (video preprocessing setting control) based on that is the subject of adaptive control. Means 114 and encoding setting control means 115) are added or changed. That is, the adaptive coding scheme of the present embodiment corresponds to the second adaptive coding scheme of the first embodiment applied when the FRR is 1 or more and less than 2. Here, the following description will be made assuming that the shooting frame rate is set to 24 frames per second and the playback frame rate is set to 30 frames per second. The maximum encoding frame rate is also 30 frames per second.

本実施の形態における適応的符号化方式を用いた映像処理設定制御部113の制御方法を説明する。図9に本方法によって符号化を行ったときの概念図を示す。a)に示すような、撮影時フレームレートを毎秒24フレームとして撮影された映像データを、b)に示すように最大符号化フレームレートの毎秒30フレームで処理を行う。その際、撮影時フレームレートと最大符号化フレームレートの差によって生じる余裕時間に、あるフレームの映像データを異なったパラメータを用いて複数回符号化を行う。すなわち、図9 b)の1a、1b(5a、5b)は、同じ映像データ1(5)に対して2回符号化したものである。   A control method of the video processing setting control unit 113 using the adaptive encoding method in the present embodiment will be described. FIG. 9 shows a conceptual diagram when encoding is performed by this method. Video data shot at a shooting frame rate of 24 frames per second as shown in a) is processed at a maximum encoding frame rate of 30 frames per second as shown in b). At this time, video data of a certain frame is encoded a plurality of times using different parameters in the margin time generated by the difference between the shooting frame rate and the maximum encoding frame rate. That is, 1a and 1b (5a and 5b) in FIG. 9b) are obtained by encoding the same video data 1 (5) twice.

MPEG−2やH.264方式のようなフレーム間での相関を利用した圧縮符号化を行う場合には、参照フレームの参照方法の違いによって分類されるIピクチャ、Bピクチャ、Pピクチャを効果的に当てはめることによって高画質化を実現できる。Iピクチャ、Bピクチャ、Pピクチャの中で画質及び符号化データサイズに対する影響が大きいのは一般的にはフレーム内符号化方式のみで符号化したIピクチャである。したがって、このIピクチャの符号化処理を、符号化処理を行う上で時間的に余裕のある部分に行う。すなわち、図9 b)の1a、1b(5a、5b)に相当するフレームをIピクチャとして符号化することで、Iピクチャの高画質化を図れる。一般的にIピクチャは他のピクチャから参照されるので、Iピクチャの高画質化により、ストリーム全体の画質を向上することができる。また、符号化データ量が一番多いのはIピクチャであるので、Iピクチャを複数回符号化し、符号化データのサイズが少ない方を採用することで符号化レートを抑えることもできる。   MPEG-2 and H.264 In the case of performing compression coding using correlation between frames as in the H.264 scheme, high quality is achieved by effectively applying I pictures, B pictures, and P pictures classified according to the reference frame reference method. Can be realized. Of the I pictures, B pictures, and P pictures, the I picture that has a large influence on the image quality and the encoded data size is generally an I picture that is encoded only by the intraframe encoding method. Therefore, the encoding process of the I picture is performed on a portion having a time margin in performing the encoding process. That is, by encoding the frame corresponding to 1a, 1b (5a, 5b) of FIG. 9b as an I picture, the picture quality of the I picture can be improved. In general, since an I picture is referred to by other pictures, the image quality of the entire stream can be improved by improving the picture quality of the I picture. Further, since the I data has the largest amount of encoded data, the encoding rate can be suppressed by encoding the I picture a plurality of times and adopting the one having the smaller encoded data size.

図9に示す例では、撮影時フレームレートと最大符号化フレームレートの比は4:5であるので、撮影時フレームで4フレームに対して、最大符号化フレームで1フレーム分の時間、処理に余裕ができる(図9bの1b,5bに相当)。この時間を2回目の符号化に割り当て、撮影時フレームの4フレーム周期で、Iピクチャの符号化を異なった符号化パラメータで2回(図9bの1a,1bに相当)行えば、Iピクチャの符号化効率が向上する。   In the example shown in FIG. 9, the ratio of the shooting frame rate to the maximum encoded frame rate is 4: 5. There is room (corresponding to 1b and 5b in FIG. 9b). If this time is assigned to the second encoding, and the I picture is encoded twice with different encoding parameters (corresponding to 1a and 1b in FIG. 9b) in the 4-frame period of the shooting frame, the I picture Encoding efficiency is improved.

したがって、Iピクチャの周期は好ましくは以下のFiで表される周期となる。また、MPEG−2等におけるGOP構成、すなわち1GOPに含まれるフレーム数は以下の式で表されるFgopにするのが望ましい。   Therefore, the period of the I picture is preferably a period represented by the following Fi. Further, it is desirable that the GOP configuration in MPEG-2 or the like, that is, the number of frames included in one GOP is Fgop represented by the following equation.

Fi={X/GCD(X,Z)}×m
Fgop=Fi×n
ただし、n、mは自然数、Xは撮影時フレームレート、Zは最大符号化フレームレートとし、GCD(X,Z)は、XとZの最大公約数を表す。例えば図9の場合はX=24、Z=30であるので、m=1、n=1とすれば、Fi=4、Fgop=4となる。
Fi = {X / GCD (X, Z)} × m
Fgop = Fi × n
However, n and m are natural numbers, X is a shooting frame rate, Z is a maximum encoding frame rate, and GCD (X, Z) represents the greatest common divisor of X and Z. For example, in the case of FIG. 9, since X = 24 and Z = 30, if m = 1 and n = 1, then Fi = 4 and Fgop = 4.

以上のように、本実施の形態の映像記録装置によれば、符号化部の処理能力を最大限に発揮して、撮影された映像データに対して高効率、高画質の圧縮符号化を行うことができる。   As described above, according to the video recording apparatus of the present embodiment, the processing capability of the encoding unit is maximized, and high-efficiency, high-quality compression encoding is performed on the captured video data. be able to.

なお、本実施の形態では、撮影時フレームレートを毎秒24フレーム、最大符号化フレームレートを毎秒30フレームについて説明を行ったが、撮影時フレームレートと最大符号化フレームレートの比に従ってFgop,Fiを決定すれば同様の効果を発揮することは明らかである。   In this embodiment, the shooting frame rate is 24 frames per second and the maximum encoding frame rate is 30 frames per second. However, Fgop and Fi are set according to the ratio between the shooting frame rate and the maximum encoding frame rate. It is clear that the same effect will be achieved if determined.

また、本実施の形態では、実施の形態1における第2の適応的符号化方式に相当する方式に関して説明したが、図9の1a,1b(5a,5b)の部分を1フレーム分の同じ映像データに対して異なった符号化パラメータで2回符号化を行うのではなく、実施の形態1における第1の適応的符号化方式で説明したように、最大符号化フレームレートで2フレーム分の処理時間をかけて、処理負荷の高い符号化パラメータを設定して1回の符号化で高効率な符号化を行っても同様の効果を発揮することができる。   Further, in the present embodiment, the method corresponding to the second adaptive encoding method in the first embodiment has been described, but the portions 1a and 1b (5a and 5b) in FIG. Rather than encoding data twice with different encoding parameters, processing for two frames at the maximum encoding frame rate as described in the first adaptive encoding scheme in the first embodiment The same effect can be exhibited even if time-consuming encoding parameters with a high processing load are set and highly efficient encoding is performed by one encoding.

また、本実施の形態では、すべてのIピクチャを複数回符号化する方法を説明したが、すべてのIピクチャに限定するものではなく、GOP先頭のIピクチャのみの場合や、Iピクチャに限定しない場合も一定の効果がある。   In the present embodiment, a method of encoding all I pictures a plurality of times has been described. However, the present invention is not limited to all I pictures, and is not limited to only I pictures at the head of a GOP or I pictures. In some cases, there is a certain effect.

本発明にかかる映像記録装置は、カメラレコーダなど撮影時フレームレートと最大符号化フレームレートが異なる場合に高画質、高効率な圧縮符号化を行うもので、半導体メモリ、光ディスク等のランダムアクセス可能な記録媒体に記録する映像記録装置や、映像符号化方法、映像符号化装置等に広く適用可能である。   The video recording apparatus according to the present invention performs high-quality, high-efficiency compression encoding when the shooting frame rate and the maximum encoding frame rate are different, such as a camera recorder. The present invention can be widely applied to a video recording apparatus that records on a recording medium, a video encoding method, a video encoding apparatus, and the like.

カメラレコーダの構成を示す図Diagram showing the configuration of the camera recorder 撮影時フレームレートと再生時フレームレートの関係を示す図Diagram showing the relationship between shooting frame rate and playback frame rate H.264の適応的な符号化方法の構成図H. H.264 adaptive coding method configuration diagram 適応的な動きベクトルの探索範囲の設定図Adaptive motion vector search range setting diagram 第2の適応的符号化方式を示す概念図Conceptual diagram showing a second adaptive encoding scheme 符号化構造の適応的制御方法のフローチャートFlowchart of adaptive control method of coding structure 第2の適応的符号化方式における制御フローを示す図The figure which shows the control flow in a 2nd adaptive encoding system 最適な符号化データの出力制御時の符号化メモリの概念図Conceptual diagram of the encoding memory when controlling the output of optimal encoded data Iピクチャの適応的符号化方法の概念図Conceptual diagram of adaptive coding method of I picture

符号の説明Explanation of symbols

100 カメラ部
101 有効フレーム抽出部
102 映像前処理部
103 映像符号化部
104 記録部
110 システム制御部
111 フレームレート設定手段
112 入力映像情報設定手段
113 映像処理設定制御部
114 映像前処理設定制御手段
115 符号化設定制御手段
116 記録制御手段
120 記録媒体
121 入力手段
130 ホストインターフェイス
201 DCT/量子化部
202 エントロピー符号化部
203 逆量子化/IDCT部
204 フィルタ部
205 フレームメモリ
206 フレーム内予測処理部
207 フレーム間予測処理部
208 動きベクトル検出部
210 切り替えスイッチ
211 符号化メモリ
212 出力制御部
220 前処理フィルタ部
DESCRIPTION OF SYMBOLS 100 Camera part 101 Effective frame extraction part 102 Image | video pre-processing part 103 Image | video encoding part 104 Recording part 110 System control part 111 Frame rate setting means 112 Input image | video information setting means 113 Image | video process setting control part 114 Image | video pre-processing setting control means 115 Coding setting control means 116 Recording control means 120 Recording medium 121 Input means 130 Host interface 201 DCT / quantization section 202 Entropy coding section 203 Inverse quantization / IDCT section 204 Filter section 205 Frame memory 206 Intra-frame prediction processing section 207 frames Inter-prediction processing unit 208 Motion vector detection unit 210 Changeover switch 211 Coding memory 212 Output control unit 220 Preprocessing filter unit

Claims (21)

動画撮影した映像信号を圧縮符号化して記録媒体にファイル化して記録する映像記録装置であって、
動画撮影の際に、動画撮影するときの単位時間あたりのフレーム数である撮影時フレームレートを任意に設定するフレームレート設定部と、
前記フレームレート設定部において設定された前記撮影時フレームレートで動画撮影する撮影部と、
前記撮影部で撮影された映像データを圧縮符号化する映像符号化部と、
前記フレームレート設定部において設定された撮影時フレームレートと前記映像符号化部の最大処理能力である最大符号化フレームレートとに基づいて前記映像符号化部での映像処理方法を変更する映像処理設定制御部とを備えた映像記録装置。
A video recording apparatus that compresses and encodes a video signal of a moving image and records it as a file on a recording medium,
A frame rate setting unit for arbitrarily setting a shooting frame rate, which is the number of frames per unit time when shooting a movie,
A shooting unit that shoots a moving image at the shooting frame rate set in the frame rate setting unit;
A video encoding unit that compresses and encodes video data captured by the imaging unit;
Video processing setting for changing the video processing method in the video encoding unit based on the frame rate at the time of shooting set in the frame rate setting unit and the maximum encoding frame rate which is the maximum processing capability of the video encoding unit A video recording apparatus comprising a control unit.
前記映像処理設定制御部は、前記撮影時フレームレートが前記最大符号化フレームレートよりも低い場合に、最大符号化フレームレートでの符号化時よりも処理負荷が高いがより高効率な符号化を行うように符号化設定値を変更する請求項1記載の映像記録装置。 When the frame rate at the time of shooting is lower than the maximum encoding frame rate, the video processing setting control unit has a higher processing load than encoding at the maximum encoding frame rate, but performs more efficient encoding. The video recording apparatus according to claim 1, wherein the encoding setting value is changed so as to be performed. 前記映像符号化部は、映像の動きベクトルを検出してフレーム間の相関情報を用いた符号化を行い、
前記符号化設定値は動きベクトルを検出するための検索範囲の設定であり、
前記映像処理設定制御部は、前記撮影時フレームレートが前記最大符号化フレームレートよりも低い場合に、前記最大符号化フレームレートで符号化するときの検索範囲よりも広い範囲を検索するように前記符号化設定値を変更する請求項2記載の映像記録装置。
The video encoding unit detects video motion vectors and performs encoding using correlation information between frames,
The encoding setting value is a setting of a search range for detecting a motion vector,
The video processing setting control unit, when the shooting frame rate is lower than the maximum encoding frame rate, so as to search a range wider than a search range when encoding at the maximum encoding frame rate. The video recording apparatus according to claim 2, wherein the encoding set value is changed.
前記映像符号化部は、MPEG4 AVC/H.264方式で符号化を行い、
前記符号化設定値は、動きベクトルを検出するための検索範囲の設定及びフレーム内予測符号化におけるブロックサイズの設定のうち少なくともいずれか1つを含む請求項2記載の映像記録装置。
The video encoding unit includes MPEG4 AVC / H. H.264 encoding,
The video recording apparatus according to claim 2, wherein the coding setting value includes at least one of setting of a search range for detecting a motion vector and setting of a block size in intra-frame predictive coding.
符号化前の映像に映像処理を行う映像前処理部を備え、
前記映像処理設定制御部は、前記フレームレート設定部において設定された前記撮影時フレームレートと前記最大符号化フレームレートとに基づいて、前記映像前処理部の処理設定を変更する請求項1記載の映像記録装置。
Provided with a video pre-processing unit that performs video processing on the video before encoding,
The video processing setting control unit changes processing settings of the video preprocessing unit based on the shooting frame rate and the maximum encoding frame rate set in the frame rate setting unit. Video recording device.
前記映像前処理部の処理設定はフィルタ係数のタップ数の設定である請求項5記載の映像記録装置。 6. The video recording apparatus according to claim 5, wherein the processing setting of the video preprocessing unit is a setting of the number of taps of a filter coefficient. 前記撮影時フレームレートが毎秒24フレームであり、前記最大符号化フレームレートが毎秒30フレームである請求項1乃至7のいずれか1項に記載の映像記録装置。 The video recording apparatus according to any one of claims 1 to 7, wherein the shooting frame rate is 24 frames per second, and the maximum encoding frame rate is 30 frames per second. 前記映像処理設定制御部は、前記撮影時フレームレートに対する前記最大符号化フレームレートの比が2以上である場合に、同一の1フレームの映像データに対して異なる符号化設定値を前記比に応じて前記映像符号化部に複数回設定し、
前記映像符号化部は、前記映像データに対して各符号化設定値で複数回符号化を行い、最も効率的なストリームを該当フレームの映像データを圧縮符号化した符号化データとして採用するようにした請求項1記載の映像記録装置。
When the ratio of the maximum encoding frame rate to the shooting frame rate is 2 or more, the video processing setting control unit responds to different encoding setting values for the same one frame of video data according to the ratio. Set multiple times in the video encoding unit,
The video encoding unit encodes the video data a plurality of times with each encoding set value, and adopts the most efficient stream as encoded data obtained by compressing and encoding the video data of the corresponding frame. The video recording apparatus according to claim 1.
前記映像符号化部は、量子化を含む符号化を行い、
前記符号化設定値は、量子化パラメータに関する設定である請求項8記載の映像記録装置。
The video encoding unit performs encoding including quantization,
The video recording apparatus according to claim 8, wherein the encoding setting value is a setting relating to a quantization parameter.
前記映像符号化部は、MPEG4 AVC/H.264方式で符号化を行い、
前記符号化設定値は、Frame−Base符号化、Field−Base符号化、Pict−Level Adaptiveフィールド/フレーム符号化及びMB−Level Adaptiveフィールド/フレーム符号化の中から符号化構造を選択する設定、動きベクトルを検出するための検索範囲の設定並びに量子化パラメータの選択方法の設定のうち少なくともいずれか1つを含む請求項8記載の映像記録装置。
The video encoding unit includes MPEG4 AVC / H. H.264 encoding,
The coding setting value is a setting for selecting a coding structure from among Frame-Base coding, Field-Base coding, Pict-Level Adaptive field / frame coding, and MB-Level Adaptive field / frame coding. 9. The video recording apparatus according to claim 8, comprising at least one of setting of a search range for detecting a vector and setting of a method for selecting a quantization parameter.
符号化前の映像に映像処理を行う映像前処理部を備え、
前記映像処理設定制御部は、前記フレームレート設定部において設定された前記撮影時フレームレートと前記最大符号化フレームレートとに基づいて、前記映像前処理部の設定を異なる設定で複数回行い、
前記映像前処理部は、前記映像前処理部になされた各設定に対して前処理を行い、
前記映像符号化部は、前記映像前処理部で前処理された映像データに対して符号化を行い、符号化効率が一番良い符号化データを記録媒体に記録することを特徴とする請求項8記載の映像記録装置。
Provided with a video pre-processing unit that performs video processing on the video before encoding,
The video processing setting control unit performs the setting of the video preprocessing unit a plurality of times with different settings based on the shooting frame rate and the maximum encoding frame rate set in the frame rate setting unit,
The video preprocessing unit performs preprocessing for each setting made in the video preprocessing unit,
The video encoding unit performs encoding on the video data preprocessed by the video preprocessing unit, and records encoded data having the best encoding efficiency on a recording medium. 8. The video recording apparatus according to 8.
前記映像前処理部はフィルタ処理を含み、前記異なる設定はフィルタ係数値の設定である請求項11記載の映像記録装置。 12. The video recording apparatus according to claim 11, wherein the video pre-processing unit includes a filter process, and the different setting is a filter coefficient value setting. 複数の符号化データのサイズが一番小さい符号化データを選択して記録媒体に記録する請求項8乃至12のいずれか1項に記載の映像記録装置。 The video recording apparatus according to claim 8, wherein a plurality of pieces of encoded data having the smallest size is selected and recorded on a recording medium. 前記映像処理設定制御部は、前記撮影時フレームレートに対する前記最大符号化フレームレートの比が1以上2未満である場合に、一部のフレームについて、同一フレームの映像データに対して異なる符号化設定値を前記映像符号化部に複数回設定し、
前記映像符号化部は、前記映像データに対して各符号化設定値で複数回符号化を行い、最も効率的なストリームを該当フレームの映像データを圧縮符号化した符号化データとして採用するようにした請求項1記載の映像記録装置。
The video processing setting control unit, when a ratio of the maximum encoding frame rate to the shooting frame rate is 1 or more and less than 2, for some frames, different encoding settings for video data of the same frame A value is set in the video encoder multiple times,
The video encoding unit encodes the video data a plurality of times with each encoding set value, and adopts the most efficient stream as encoded data obtained by compressing and encoding the video data of the corresponding frame. The video recording apparatus according to claim 1.
前記映像符号化部は、フレーム間の相関情報を用いた符号化方式であって、かつ、フレーム内符号化を行うことが許される符号化方式で符号化を行い、前記最大符号化フレームレートにて符号化処理を行うとき、前記撮影時フレームレートと前記最大符号化フレームレートとの差によって生じる余裕時間を利用して、フレーム内符号化に要する時間をフレーム内符号化以外の処理時間より多く割り当てる請求項14記載の映像記録装置。 The video encoding unit is an encoding method that uses correlation information between frames, and performs encoding using an encoding method that allows intra-frame encoding, so that the maximum encoding frame rate is achieved. When performing the encoding process, the time required for the intra-frame encoding is made longer than the processing time other than the intra-frame encoding by using a margin time generated by the difference between the shooting frame rate and the maximum encoding frame rate. 15. The video recording apparatus according to claim 14, wherein the video recording apparatus is assigned. 前記映像符号化部は、フレーム間の相関情報を用いた符号化方式であって、かつ、フレーム内符号化を行うことが許される符号化方式で符号化を行い、前記最大符号化フレームレートにて符号化処理を行うとき、前記撮影時フレームレートが前記最大符号化フレームレートより小さい場合、符号化処理時に発生する余裕時間をフレーム内符号化処理に割り当てる請求項3、4及び6のうちいずれか1項に記載の映像記録装置。 The video encoding unit is an encoding method that uses correlation information between frames, and performs encoding using an encoding method that allows intra-frame encoding, so that the maximum encoding frame rate is achieved. 7. The encoding process according to any one of claims 3, 4, and 6, wherein when the shooting frame rate is smaller than the maximum encoding frame rate, an extra time generated during the encoding process is allocated to the intra-frame encoding process. The video recording apparatus according to claim 1. 前記映像符号化部は、フレーム間の相関情報を用いた符号化方式であって、かつ、フレーム内符号化を行うことが許される符号化方式で符号化を行い、前記最大符号化フレームレートにて符号化処理を行うとき、前記撮影時フレームレートが前記最大符号化フレームレートより小さい場合、フレーム内符号化処理時に異なった符号化設定で複数回フレーム内符号化を行い、最も効率的な符号化データを該当フレームの圧縮符号化データとして記録媒体に記録する請求項8乃至12のうちいずれか1項に記載の映像記録装置。 The video encoding unit is an encoding method that uses correlation information between frames, and performs encoding using an encoding method that allows intra-frame encoding, so that the maximum encoding frame rate is achieved. When performing the encoding process, if the shooting frame rate is smaller than the maximum encoding frame rate, intra-frame encoding is performed multiple times with different encoding settings during the intra-frame encoding process. The video recording apparatus according to claim 8, wherein the encoded data is recorded on the recording medium as compressed encoded data of the corresponding frame. 前記映像符号化部は、前記撮影時フレームレートと前記最大符号化フレームレートとの比に基づいた周期で、フレーム内符号化処理を行うIピクチャを挿入する請求項16及び17のうちいずれか1項に記載の映像記録装置。 The video encoding unit inserts an I picture for performing an intra-frame encoding process at a cycle based on a ratio between the shooting frame rate and the maximum encoding frame rate. The video recording device according to item. 前記撮影時フレームレートが毎秒24フレームで、前記最大符号化フレームレートが毎秒30フレームであり、フレーム内符号化処理を行うIピクチャを挿入する周期は4の倍数である請求項18記載の映像記録装置。 19. The video recording according to claim 18, wherein the shooting frame rate is 24 frames per second, the maximum encoding frame rate is 30 frames per second, and the period for inserting an I picture for intra-frame encoding processing is a multiple of 4. apparatus. 前記映像符号化部は、Group of Pictures(GOP)構造をもつ符号化方式で符号化を行い、GOP周期は、前記撮影時フレームレートと前記最大符号化フレームレートとの比に基づいて決定される請求項18記載の映像記録装置。 The video encoding unit performs encoding using an encoding method having a Group of Pictures (GOP) structure, and a GOP cycle is determined based on a ratio between the shooting frame rate and the maximum encoding frame rate. The video recording apparatus according to claim 18. 前記撮影時フレームレートが毎秒24フレームで、前記最大符号化フレームレートが毎秒30フレームであり、GOPに含まれるフレーム数は、4の倍数である請求項20記載の映像記録装置。 21. The video recording apparatus according to claim 20, wherein the shooting frame rate is 24 frames per second, the maximum encoding frame rate is 30 frames per second, and the number of frames included in the GOP is a multiple of four.
JP2005333888A 2005-11-18 2005-11-18 Video recording apparatus Pending JP2007142809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005333888A JP2007142809A (en) 2005-11-18 2005-11-18 Video recording apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005333888A JP2007142809A (en) 2005-11-18 2005-11-18 Video recording apparatus

Publications (1)

Publication Number Publication Date
JP2007142809A true JP2007142809A (en) 2007-06-07

Family

ID=38205131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005333888A Pending JP2007142809A (en) 2005-11-18 2005-11-18 Video recording apparatus

Country Status (1)

Country Link
JP (1) JP2007142809A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011071833A (en) * 2009-09-28 2011-04-07 Brother Industries Ltd Communication terminal device, terminal control method, and terminal control program
JP2015520581A (en) * 2012-05-14 2015-07-16 クゥアルコム・インコーポレイテッドQualcomm Incorporated Programmable and scalable search of candidate blocks for inter-coding or intra-coding
JP2017005500A (en) * 2015-06-10 2017-01-05 キヤノン株式会社 Image processing device, image processing method and program
CN115460466A (en) * 2022-08-23 2022-12-09 北京泰豪智能工程有限公司 Video picture customization method and system in video communication

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011071833A (en) * 2009-09-28 2011-04-07 Brother Industries Ltd Communication terminal device, terminal control method, and terminal control program
JP2015520581A (en) * 2012-05-14 2015-07-16 クゥアルコム・インコーポレイテッドQualcomm Incorporated Programmable and scalable search of candidate blocks for inter-coding or intra-coding
JP2017005500A (en) * 2015-06-10 2017-01-05 キヤノン株式会社 Image processing device, image processing method and program
CN115460466A (en) * 2022-08-23 2022-12-09 北京泰豪智能工程有限公司 Video picture customization method and system in video communication

Similar Documents

Publication Publication Date Title
KR100796085B1 (en) Decoder, decoding method, and recorded medium
JP5090158B2 (en) VIDEO INFORMATION RECORDING DEVICE, VIDEO INFORMATION RECORDING METHOD, VIDEO INFORMATION RECORDING PROGRAM, AND RECORDING MEDIUM CONTAINING VIDEO INFORMATION RECORDING PROGRAM
JP2000278692A (en) Compressed data processing method, processor and recording and reproducing system
JP5153674B2 (en) Moving picture coding apparatus and moving picture coding method
KR20070049098A (en) Recording apparatus and method, reproducing apparatus and method, recording medium, and program
JP4023324B2 (en) Watermark embedding and image compression unit
JP4797974B2 (en) Imaging device
JP2007142809A (en) Video recording apparatus
JP4875008B2 (en) Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
JP4902854B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, moving picture encoding apparatus, moving picture encoding method, moving picture encoding program, and moving picture encoding / decoding apparatus
JP4365941B2 (en) Encoding device, image processing device, camera-integrated image recording device, image processing system, encoding method, and storage medium
JPH11308618A (en) Image signal processor and method therefor, and image signal reproducing device
JP4288897B2 (en) Encoding apparatus and method, program, and recording medium
JPH11289515A (en) Picture signal processor and its method, picture signal recorder and its method and recording medium
JP4320509B2 (en) Video re-encoding apparatus and method
JPH1198514A (en) Image coder and its method
JP2003023637A (en) Image coding method and image coding device
US6678327B1 (en) Image signal compression coding method and apparatus
JP4765961B2 (en) Digital video recording device
JP4380068B2 (en) Data reproduction device and editing device
JP2009081727A (en) Image encoding apparatus, method of controlling therefor, and program
JP2007228626A (en) Image signal processing apparatus and method
JP3645254B2 (en) Image data recording system and image data recording method
JP2005159832A (en) Signal processor
JP2015037223A (en) Image processing device and control method of the same