[go: up one dir, main page]

JP2014116890A - Image encoding device - Google Patents

Image encoding device Download PDF

Info

Publication number
JP2014116890A
JP2014116890A JP2012271366A JP2012271366A JP2014116890A JP 2014116890 A JP2014116890 A JP 2014116890A JP 2012271366 A JP2012271366 A JP 2012271366A JP 2012271366 A JP2012271366 A JP 2012271366A JP 2014116890 A JP2014116890 A JP 2014116890A
Authority
JP
Japan
Prior art keywords
encoding
parameter
unit
image
threshold
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
JP2012271366A
Other languages
Japanese (ja)
Other versions
JP6300440B2 (en
Inventor
Yusuke Itani
裕介 伊谷
Shunichi Sekiguchi
俊一 関口
Yasuyuki Sato
泰幸 佐藤
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2012271366A priority Critical patent/JP6300440B2/en
Publication of JP2014116890A publication Critical patent/JP2014116890A/en
Application granted granted Critical
Publication of JP6300440B2 publication Critical patent/JP6300440B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

【課題】ユーザを煩わせることなく、且つ録画の画質を落とすことなくレート変換を行い、HDDを効率的に利用する画像符号化装置を得る。
【解決手段】入力されたMPEG−2ビデオストリーム101から、符号化の難易度を示す符号化難易度パラメータを算出する符号化難易度パラメータ算出部3と、算出された符号化難易度パラメータに基づいて、MPEG−2ビデオストリーム101の圧縮率を決定する録画モード決定部4と、MPEG−2ビデオストリーム101を復号した映像データに対して、決定された圧縮率を用いて目標符号量を適応的に切り替えた符号化を行い、H.264/AVCビデオストリーム102を生成する再符号化部5とを備える。
【選択図】図1
An image encoding apparatus that performs rate conversion without bothering a user and without degrading the image quality of recording and efficiently using an HDD is obtained.
An encoding difficulty parameter calculation unit that calculates an encoding difficulty parameter indicating an encoding difficulty from an input MPEG-2 video stream, and a calculated encoding difficulty parameter. Then, the recording mode determination unit 4 that determines the compression rate of the MPEG-2 video stream 101 and the target code amount are adaptively applied to the video data obtained by decoding the MPEG-2 video stream 101 using the determined compression rate. And a re-encoding unit 5 that generates the H.264 / AVC video stream 102.
[Selection] Figure 1

Description

この発明は、画像を圧縮符号化して伝送・記録する画像符号化装置に関するものである。   The present invention relates to an image encoding apparatus for compressing and encoding an image for transmission and recording.

放送波を録画する機器として、HDDレコーダや録画機能付テレビなどといった機器の普及が進んでいる。これら放送波を録画する機器には、HDD利用効率化のために、放送番組をMPEG−2ビデオストリームのままではなく、H.264/AVCビデオストリーム等、MPEG−2よりも高圧縮が可能な符号化方式を用いてレート変換し、ビットレートを下げることで記録・保存する機能が備わっている。   As devices for recording broadcast waves, devices such as HDD recorders and televisions with a recording function are becoming widespread. These devices that record broadcast waves can be compressed more than MPEG-2, such as H.264 / AVC video streams, instead of MPEG-2 video streams for broadcast programs, in order to improve HDD utilization efficiency. It has a function of recording / saving by converting the rate using an encoding method and lowering the bit rate.

放送波をH.264/AVCビデオストリームに変換する手段としては、受信したMPEG−2ビデオストリームをリアルタイムで変換する手段だけではなく、例えば特許文献1に示すように、MPEG−2ビデオストリームを受信した際には変換せず、後でビットレートを変換する技術が開示されている。また、レート変換時の圧縮率は、通常複数のモードが用意されており、そこからユーザが選択する方式をとる。   As means for converting a broadcast wave into an H.264 / AVC video stream, not only means for converting a received MPEG-2 video stream in real time, but also, for example, as shown in Patent Document 1, an MPEG-2 video stream is received. In this case, a technique is disclosed in which the bit rate is converted afterwards without being converted. In addition, a plurality of modes are usually prepared for the compression rate at the time of rate conversion, and the user selects a mode from there.

特開2010−063133号公報JP 2010-063133 A

しかしながら、上述した従来の技術では、ビットレートを変換し録画する際には、ユーザが圧縮率を選択し、選択した圧縮率のレートで放送番組を録画していた。そのため、ユーザは番組に応じて個々に圧縮率を設定する必要があり、操作が複雑になるという課題があった。また、録画する番組に対して、最適な圧縮率をユーザが判断するのは困難であり、どの番組に対しても一定の画質を保つために、高いビットレートとなるモードを固定で設定するなど、HDDの効率的な利用が行われていないという課題があった。   However, in the conventional technique described above, when recording after converting the bit rate, the user selects a compression rate, and the broadcast program is recorded at the rate of the selected compression rate. Therefore, the user has to set the compression rate individually according to the program, and there is a problem that the operation becomes complicated. Also, it is difficult for the user to determine the optimum compression rate for the program to be recorded, and in order to maintain a constant image quality for any program, a mode with a high bit rate is fixedly set. There is a problem that the HDD is not efficiently used.

この発明は、上記のような課題を解決するためになされたもので、録画する番組に対して自動で圧縮率を決定することで、ユーザを煩わせることなく、且つ録画の画質を落とすことなくレート変換を行い、HDDを効率的に利用する画像符号化装置を得ることを目的とする。   The present invention has been made to solve the above-described problems. By automatically determining a compression rate for a program to be recorded, the user is not bothered and the image quality of the recording is not deteriorated. An object of the present invention is to obtain an image encoding apparatus that performs rate conversion and efficiently uses an HDD.

この発明に係る画像符号化装置は、入力された第1の映像符号化データから、符号化の難易度を示す符号化難易度パラメータを算出する符号化難易度パラメータ算出部と、符号化難易度パラメータ算出部が算出した符号化難易度パラメータに基づいて、第1の映像符号化データの圧縮率を決定する録画モード決定部と、第1の映像符号化データを復号した映像データに対して、録画モード決定部が決定した圧縮率を用いて目標符号量を適応的に切り替えた符号化を行い、第2の映像符号化データを生成する再符号化部とを備えるものである。   An image encoding device according to the present invention includes an encoding difficulty parameter calculation unit that calculates an encoding difficulty parameter indicating an encoding difficulty from input first video encoded data, and an encoding difficulty Based on the encoding difficulty parameter calculated by the parameter calculation unit, a recording mode determination unit that determines the compression rate of the first video encoded data, and video data obtained by decoding the first video encoded data, And a re-encoding unit that performs encoding by adaptively switching the target code amount using the compression rate determined by the recording mode determination unit and generates second video encoded data.

この発明によれば、ユーザが圧縮率の設定を切り替えることなく、最適な圧縮率で放送番組を符号化することができ、画質を保ったままHDDを効率的に利用することができる。   According to the present invention, a broadcast program can be encoded at an optimal compression rate without the user switching the setting of the compression rate, and the HDD can be efficiently used while maintaining the image quality.

実施の形態1による画像符号化装置の構成を示すブロック図である。1 is a block diagram showing a configuration of an image encoding device according to Embodiment 1. FIG. 実施の形態1による画像符号化装置の符号化難易度パラメータの算出例を示す図である。6 is a diagram illustrating a calculation example of an encoding difficulty level parameter of the image encoding device according to Embodiment 1. FIG. 実施の形態1による画像符号化装置の符号化難易度パラメータのその他の算出例を示す図である。FIG. 10 is a diagram illustrating another calculation example of the encoding difficulty level parameter of the image encoding device according to the first embodiment. 実施の形態1による画像符号化装置のその他の構成を示すブロック図である。FIG. 10 is a block diagram illustrating another configuration of the image encoding device according to the first embodiment. 実施の形態1による画像符号化装置の閾値設定処理部の閾値設定例を示す図である。6 is a diagram illustrating a threshold setting example of a threshold setting processing unit of the image encoding device according to Embodiment 1. FIG. 実施の形態1による画像符号化装置の閾値設定処理部の閾値設定その他の例を示す図である。10 is a diagram illustrating another example of threshold setting of a threshold setting processing unit of the image encoding device according to Embodiment 1. FIG. 実施の形態1による画像符号化装置の閾値設定処理部の動作を示すフローチャートである。5 is a flowchart illustrating an operation of a threshold setting processing unit of the image encoding device according to the first embodiment. 実施の形態1による画像符号化装置の動作を示すフローチャートである。5 is a flowchart showing an operation of the image encoding device according to the first embodiment. 実施の形態1による画像符号化装置の符号化難易度パラメータのその他の算出例を示す図である。FIG. 10 is a diagram illustrating another calculation example of the encoding difficulty level parameter of the image encoding device according to the first embodiment. 実施の形態1による画像符号化装置の符号化難易度パラメータのその他の算出例を示す図である。FIG. 10 is a diagram illustrating another calculation example of the encoding difficulty level parameter of the image encoding device according to the first embodiment. 実施の形態2による画像符号化装置の構成を示すブロック図である。6 is a block diagram illustrating a configuration of an image encoding device according to Embodiment 2. FIG. 実施の形態2による画像符号化装置の量子化マトリクスの例を示す図である。It is a figure which shows the example of the quantization matrix of the image coding apparatus by Embodiment 2. FIG. 実施の形態2による画像符号化装置のその他の構成を示すブロック図である。It is a block diagram which shows the other structure of the image coding apparatus by Embodiment 2. FIG. 実施の形態2による画像符号化装置の閾値設定処理部の動作を示すフローチャートである。10 is a flowchart illustrating an operation of a threshold setting processing unit of the image encoding device according to the second embodiment. 実施の形態2による画像符号化装置の動作を示すフローチャートである。10 is a flowchart illustrating an operation of the image encoding device according to the second embodiment.

実施の形態1.
実施の形態1では、MPEG−2ビデオストリームを受信し、再圧縮して記録する機器あるいはシステムに適用され、ユーザ操作を必要とせず、適切な圧縮率でMPEG−2ビデオストリームを記録するための画像符号化装置について説明する。
図1は、この発明の実施の形態1による画像符号化装置の構成を示すブロック図である。
画像符号化装置10は、受信部1、記憶部2、符号化難易度パラメータ算出部3、録画モード決定部4および再符号化部5で構成されている。
受信部1は、MPEG−2映像符号化方式によって圧縮符号化されたMPEG−2ビデオストリーム(第1の映像符号化データ)101を受信し、記憶部2に記録する。記憶部2は、ハードディスクや大容量メモリ、SSDなどで構成される格納領域である。
Embodiment 1 FIG.
The first embodiment is applied to a device or system that receives an MPEG-2 video stream, recompresses and records it, and does not require a user operation, and records an MPEG-2 video stream at an appropriate compression rate. An image coding apparatus will be described.
FIG. 1 is a block diagram showing a configuration of an image coding apparatus according to Embodiment 1 of the present invention.
The image encoding device 10 includes a reception unit 1, a storage unit 2, an encoding difficulty level parameter calculation unit 3, a recording mode determination unit 4, and a re-encoding unit 5.
The receiving unit 1 receives an MPEG-2 video stream (first video encoded data) 101 compressed and encoded by the MPEG-2 video encoding method and records it in the storage unit 2. The storage unit 2 is a storage area configured by a hard disk, a large-capacity memory, an SSD, and the like.

符号化難易度パラメータ算出部3は、記憶部2に記録されたMPEG−2ビデオストリーム101を読み出し、あらかじめ設定された所定の長さのシーンの単位で、符号化難易度パラメータを導出する。ここで、シーンとは例えば所定の時間の単位でもよいし、MPEG−2ビデオストリーム101のデータ構造を規定するGOP(Group Of Picture)、すなわちMPEG−2ビデオストリーム101に対するランダムアクセス可能なデータ単位(2つのIピクチャ間に含まれる全ピクチャデータ)などでもよい。符号化難易度パラメータ算出部3は、導出した符号化難易度パラメータを、シーンの単位で記憶部2に記録する。録画モード決定部4は、記憶部2に記録された符号化難易度パラメータに基づいて録画モードを決定する。録画モードは、あらかじめ設定された複数の録画モードに対して、符号化難易度パラメータの閾値処理を行うことにより該当する録画モードを選択することにより決定される。   The encoding difficulty parameter calculation unit 3 reads the MPEG-2 video stream 101 recorded in the storage unit 2 and derives an encoding difficulty parameter in units of a predetermined length of a preset scene. Here, the scene may be, for example, a unit of a predetermined time, or a GOP (Group Of Picture) that defines the data structure of the MPEG-2 video stream 101, that is, a data unit (Randomly accessible for the MPEG-2 video stream 101 ( All picture data included between two I pictures) may be used. The encoding difficulty parameter calculation unit 3 records the derived encoding difficulty parameter in the storage unit 2 in units of scenes. The recording mode determination unit 4 determines the recording mode based on the encoding difficulty level parameter recorded in the storage unit 2. The recording mode is determined by selecting a corresponding recording mode by performing threshold processing of the encoding difficulty parameter for a plurality of preset recording modes.

再符号化部5は、復号部6、制御部7および符号化部8で構成されている。
復号部6は、記憶部2から読み出したMPEG−2ビデオストリーム101を復号し、復号した画像を符号化部8に出力する。制御部7は、録画モード決定部4で決定された録画モードが入力されると、当該録画モードに対応した符号化パラメータを取得し、符号化部8に出力する。符号化部8は、復号部6から入力された画像に対して、制御部7から入力された符号化パラメータを用いて符号化処理を行い、H.264/AVCビデオストリーム(第2の映像符号化データ)102を出力する。また、符号化部8は、制御部7に対して発生符号量のフィードバックを行う。例えば、目標符号量に対して発生符号量が多い場合は、制御部7において粗い量子化を行うなど、発生符号量を減らす方向に制御を行い、逆に発生符号量が少ない場合は、細かい量子化を行うなど、発生符号量を増やす方向に制御を行う。
The re-encoding unit 5 includes a decoding unit 6, a control unit 7, and an encoding unit 8.
The decoding unit 6 decodes the MPEG-2 video stream 101 read from the storage unit 2 and outputs the decoded image to the encoding unit 8. When the recording mode determined by the recording mode determination unit 4 is input, the control unit 7 acquires an encoding parameter corresponding to the recording mode and outputs it to the encoding unit 8. The encoding unit 8 performs an encoding process on the image input from the decoding unit 6 using the encoding parameter input from the control unit 7, and generates an H.264 / AVC video stream (second video code). Data) 102 is output. Also, the encoding unit 8 feeds back the generated code amount to the control unit 7. For example, when the generated code amount is large with respect to the target code amount, the control unit 7 performs control such as rough quantization to reduce the generated code amount. Conversely, when the generated code amount is small, the fine quantum amount Control to increase the generated code amount.

次に、符号化難易度パラメータ算出部3による符号化難易度パラメータの算出を図2および図3を参照しながら具体的に説明する。
図2に示すように、MPEG−2ビットストリームのIピクチャ符号化データに含まれるDCT係数のDC成分から縮小画像(図2におけるDC0,DC1,DC2,DC3)を生成し、生成した縮小画像内で特定の単位ごとに画素間の分散値を計算することが考えられる。分散値を計算する単位は、画像全体でもよいし、所定のブロック単位であるMBなどで処理してもよい。MB単位で処理する場合、縮小画像は2×2になるため、以下の式(1)を用いて計算することができる。

Figure 2014116890
画素の分散が大きい場合、画面が複雑であることを意味しており、符号化が難しい画像であることを示している。 Next, the calculation of the encoding difficulty level parameter by the encoding difficulty level parameter calculation unit 3 will be specifically described with reference to FIGS. 2 and 3.
As shown in FIG. 2, a reduced image (DC 0 , DC 1 , DC 2 , DC 3 in FIG. 2) is generated from the DC component of the DCT coefficient included in the I-picture encoded data of the MPEG-2 bit stream, and generated It is conceivable to calculate a variance value between pixels for each specific unit in the reduced image. The unit for calculating the variance value may be the whole image, or may be processed by MB, which is a predetermined block unit. When processing in units of MB, the reduced image is 2 × 2, and can be calculated using the following equation (1).
Figure 2014116890
When the pixel dispersion is large, it means that the screen is complicated, indicating that the image is difficult to encode.

上述のようにブロック単位で処理する場合、各ブロックの分散値の平均を1ピクチャの符号化難易度パラメータとしてもよいし、図3に示すように、計算した分散値が所定の閾値を超えたブロックのみをカウントし、その個数を符号化難易度パラメータとしてもよい。図3の例では処理量が増加するが、分散値そのものを使用する場合には局所的に分散が大きいブロックや小さいブロックの影響を受けるのに対し、閾値を超えたブロックをカウントすることで当該影響を小さくすることができるという利点がある。   When processing is performed in units of blocks as described above, the average of the variance values of each block may be used as an encoding difficulty parameter for one picture, and the calculated variance value exceeds a predetermined threshold as shown in FIG. Only the blocks may be counted, and the number thereof may be used as the encoding difficulty parameter. In the example of FIG. 3, the processing amount increases, but when using the variance value itself, it is affected by a block having a large variance or a small block locally, while the block exceeding the threshold is counted. There is an advantage that the influence can be reduced.

一方、シーン単位で比較する場合には、1シーン内に含まれるIピクチャで符号化難易度パラメータを算出し、その平均値をとって符号化難易度パラメータとしてもよいし、閾値を設定して当該閾値を超えたIピクチャをカウントし、その個数を符号化難易度パラメータとしてもよい。   On the other hand, when comparing in units of scenes, the encoding difficulty level parameter is calculated using I pictures included in one scene, and the average value may be taken as the encoding difficulty level parameter, or a threshold value may be set. It is also possible to count I pictures exceeding the threshold and use the number as an encoding difficulty level parameter.

なお、上述のようにシーン単位で処理する場合、MPEG−2ビデオストリーム101のIピクチャ符号化データに含まれるDCT係数のDC成分から縮小画像を生成して、生成した縮小画像に対する特徴量を符号化難易度パラメータとしているが、MPEG−2ビデオストリーム101を画像データに復号して、復号画像レベルで同様の特徴量抽出を実行してもかまわない。縮小画像ではないため、処理量は増加するものの、実際の画像データに即した特徴量が抽出できるという利点がある。   When processing is performed in units of scenes as described above, a reduced image is generated from the DC component of the DCT coefficient included in the I-picture encoded data of the MPEG-2 video stream 101, and the feature amount for the generated reduced image is encoded. However, the MPEG-2 video stream 101 may be decoded into image data, and similar feature amount extraction may be performed at the decoded image level. Since it is not a reduced image, the processing amount increases, but there is an advantage that a feature amount according to actual image data can be extracted.

次に、録画モード決定部4による録画モードの算出を具体的に説明する。
録画モード決定部4が符号化難易度パラメータに基づいて録画モードを決定する方法としては、閾値処理が考えられる。録画モードのモード数をNとすると、以下に示す閾値判定条件(a)に基づいて閾値処理を行い、録画モード(mode)を決定する。
・閾値判定条件(a)
if TH1<Level then mode1
else if TH2<Level then mode2
・・・
else if THN<Level then modeN
なお、mode1<mode2<・・・<modeNの順で圧縮率が高いものとし、このとき閾値はTH1>TH2>・・・>THNの順であるものとする。
Next, calculation of the recording mode by the recording mode determination unit 4 will be specifically described.
As a method in which the recording mode determination unit 4 determines the recording mode based on the encoding difficulty level parameter, threshold processing can be considered. When the number of recording modes is N, threshold processing is performed based on the threshold determination condition (a) shown below to determine the recording mode (mode).
・ Threshold determination condition (a)
if TH1 <Level then mode1
else if TH2 <Level then mode2
...
else if THN <Level then modeN
It is assumed that the compression rate is high in the order of mode1 <mode2 <... <ModeN, and the threshold values are TH1>TH2>.

符号化難易度が高いシーンは、圧縮率を高くすると画質が劣化してしまうため、あまり圧縮率を上げられない。一方、符号化難易度が低いシーンは、圧縮率を高くしても画質劣化が目立たない。このため、上記のような閾値処理により圧縮率を決定することにより、シーンの符号化難易度と圧縮率のバランスをとることができる。   For scenes with a high degree of difficulty in encoding, if the compression rate is increased, the image quality deteriorates, so that the compression rate cannot be increased much. On the other hand, in a scene with a low encoding difficulty level, image quality degradation is not noticeable even when the compression rate is increased. Therefore, by determining the compression rate by the threshold processing as described above, it is possible to balance the difficulty of encoding the scene and the compression rate.

次に、上述した閾値THNの設定について説明する。閾値THNは、各機器において固有値としてもよいし、ユーザ操作や録画する機器の状態に応じて変更してもよい。ユーザ操作や録画する機器の状態に応じて閾値THNを変更する場合には、例えば図4に示すように閾値設定処理部9を追加して設ける。図4は、実施の形態1による画像符号化装置10のその他の構成を示すブロック図である。
閾値設定処理部9は、入力されるユーザ操作や、録画する機器側から入力される状態情報に基づいて閾値THNを決定し、録画モード決定部4に設定する処理を行う。
Next, the setting of the threshold value THN will be described. The threshold value THN may be a unique value for each device, or may be changed according to the user operation or the state of the device to be recorded. When the threshold value THN is changed according to the user operation or the state of the recording device, for example, a threshold value setting processing unit 9 is additionally provided as shown in FIG. FIG. 4 is a block diagram showing another configuration of the image encoding device 10 according to the first embodiment.
The threshold setting processing unit 9 determines the threshold THN based on the input user operation and the state information input from the recording device side, and performs processing for setting the recording mode determination unit 4.

例えば、図5に示すように、各種優先度に応じて閾値を変更してもよい。閾値設定処理部9は、入力されるユーザの選択操作に基づいて、ユーザが画質を優先させたいか、あるいはHDDの効率化を優先させたいかを判断し、画質を優先させたいユーザに対しては、画質を優先させる閾値設定(図5における画像優先閾値の設定)を行う、あるいはHDDの効率化を優先させたいユーザに対しては、圧縮率の高い録画モードに振るような閾値設定(図5におけるHDD容量優先閾値の設定)を行う。このようにユーザの選択操作に基づいて閾値THNの設定を変えることにより、ユーザの嗜好に合わせたモード設定を行うことができる。   For example, as shown in FIG. 5, the threshold value may be changed according to various priorities. The threshold setting processing unit 9 determines whether the user wants to prioritize the image quality or the efficiency of the HDD based on the input selection operation of the user, and for the user who wants to prioritize the image quality. Is a threshold setting (priority setting of image priority in FIG. 5) or a threshold setting that shifts to a recording mode with a high compression rate for users who want to prioritize the efficiency improvement of HDD (see FIG. 5). 5) (setting of HDD capacity priority threshold in step 5). Thus, by changing the setting of the threshold value THN based on the user's selection operation, it is possible to perform mode setting that matches the user's preference.

なお、画像優先閾値またはHDD容量優先閾値のどちらが設定された場合にも、録画モード決定部4では、設定された閾値THNよりも符号化難易度が高い場合には圧縮率を低く設定し、設定された閾値THNよりも符号化難易度が低い場合には圧縮率を高く設定する。   Note that, regardless of whether the image priority threshold or the HDD capacity priority threshold is set, the recording mode determination unit 4 sets the compression rate to be lower when the encoding difficulty is higher than the set threshold THN. When the encoding difficulty level is lower than the set threshold value THN, the compression rate is set high.

また、シーンが変化する場合であって、各シーンを複数のシーンに分類することができる場合、図5に示すように時間ごとにシーンA群とシーンB群に分類し、シーンA群とシーンB群それぞれの符号化難易度を閾値設定処理部9に入力し、閾値設定処理部9はシーンA群とシーンB群の符号化難易度に基づいて閾値を算出し、より高い閾値を閾値THNとして録画モード決定部4に設定する。録画モード決定部4では、より高い閾値である閾値THNに基づいて圧縮率を決定することにより、シーン全体から設定された閾値に基づいて圧縮率を決定する場合よりも画質を優先させることができる。   In addition, when the scene changes and each scene can be classified into a plurality of scenes, the scene A group and the scene B group are classified according to time as shown in FIG. The encoding difficulty level of each of the B groups is input to the threshold setting processing unit 9, and the threshold setting processing unit 9 calculates a threshold based on the encoding difficulty levels of the scene A group and the scene B group, and sets a higher threshold to the threshold THN. Is set in the recording mode determination unit 4. The recording mode determination unit 4 can prioritize the image quality over the case where the compression rate is determined based on the threshold set from the entire scene by determining the compression rate based on the threshold THN which is a higher threshold. .

また、閾値設定処理部9は、ユーザの選択操作に基づいてシーンA群もしくはシーンB群のどちらか一方の閾値を選択し、閾値THNとして録画モード決定部4に設定してもよい。これにより、録画モード決定部4では、ユーザが選択したシーン群に着目して圧縮率を決定することができ。HDDの効率化を優先することができる。   The threshold setting processing unit 9 may select one of the threshold values of the scene A group or the scene B group based on the user's selection operation, and set the threshold value THN in the recording mode determination unit 4. Thus, the recording mode determination unit 4 can determine the compression rate by paying attention to the scene group selected by the user. Priority can be given to the efficiency of HDD.

また、閾値設定処理部9は、閾値設定処理部9は、機器側から入力されるHDDの残容量を示す情報を参照し、残容量に応じて閾値THNを設定するように構成してもよい。HDD残容量に十分余裕があると判断した場合には画質を優先させる閾値設定とし、HDD残容量に余裕がないと判断した場合は、高い圧縮率を優先させる閾値設定とする。   Further, the threshold setting processing unit 9 may be configured such that the threshold setting processing unit 9 refers to information indicating the remaining capacity of the HDD input from the device side and sets the threshold THN according to the remaining capacity. . If it is determined that there is sufficient HDD remaining capacity, the threshold setting is set so that priority is given to image quality. If it is determined that there is not enough HDD remaining capacity, the threshold setting is set so that a high compression ratio is prioritized.

さらに、ユーザの嗜好に合わせた閾値設定の異なる方法として、ユーザからのフィードバックをもとに、閾値設定処理部9に閾値THNを学習させる方法も考えられる。
図7は、この発明の実施の形態1による画像符号化装置10の閾値設定処理部9の動作を示すフローチャートである。
まず、ある符号化パラメータを用いて番組録画が行われた後にユーザが当該番組を視聴し、視聴後に画質について評価を行うものとする。
Further, as a method of different threshold setting according to the user's preference, a method of causing the threshold setting processing unit 9 to learn the threshold THN based on feedback from the user is also conceivable.
FIG. 7 is a flowchart showing the operation of the threshold setting processing unit 9 of the image encoding device 10 according to Embodiment 1 of the present invention.
First, it is assumed that after a program is recorded using a certain encoding parameter, the user views the program and evaluates the image quality after viewing.

閾値設定処理部9に、ユーザ操作として視聴した番組の画質に対する評価が入力されると(ステップST1)、閾値設定処理部9は当該評価を参照してユーザが画質に満足したか否か判定を行う(ステップST2)。ユーザが画質に満足している場合(ステップST2;YES)、表示部など(不図示)を介してHDD容量を優先させるためにより高圧縮な録画モードとするかの選択画面を表示させる(ステップST3)。HDD容量を優先させるユーザ選択指示が入力された場合(ステップST3;YES)、閾値設定処理部9は閾値THNを下げる処理を行い(ステップST4)、圧縮率の高い録画モードが選択されるように調整を行う。一方。HDD容量を優先させないユーザ選択指示が入力された場合(ステップST3;NO)、処理を終了する。   When the evaluation for the image quality of the program viewed as a user operation is input to the threshold setting processing unit 9 (step ST1), the threshold setting processing unit 9 refers to the evaluation to determine whether the user is satisfied with the image quality. Perform (step ST2). If the user is satisfied with the image quality (step ST2; YES), a selection screen for selecting a higher-compression recording mode in order to prioritize the HDD capacity via a display unit (not shown) is displayed (step ST3). ). When a user selection instruction to prioritize HDD capacity is input (step ST3; YES), the threshold setting processing unit 9 performs a process of lowering the threshold THN (step ST4) so that a recording mode with a high compression rate is selected. Make adjustments. on the other hand. If a user selection instruction that does not prioritize HDD capacity is input (step ST3; NO), the process ends.

一方、ユーザが画質に満足していない場合(ステップST2;NO)、高画質化を図るためには圧縮率を下げる方向に閾値THNを変更させる必要がある。そのため、表示部などを介してHDD容量を優先させるか否かの選択画面を表示させる(ステップST5)。HDD容量を優先させ、高画質化を行わないとの選択指示が入力された場合(ステップST5;YES)、閾値THNの設定変更は行わずに処理を終了する。一方、HDD容量を優先させず、高画質化を行うとの選択指示が入力された場合(ステップST5;NO)、閾値設定処理部9は閾値THNを上げる処理を行い(ステップST6)、圧縮率の低い録画モードが選択されるように調整を行う。   On the other hand, if the user is not satisfied with the image quality (step ST2; NO), it is necessary to change the threshold value THN in the direction of decreasing the compression rate in order to improve the image quality. Therefore, a selection screen as to whether or not to prioritize the HDD capacity is displayed via the display unit or the like (step ST5). If an instruction to select the HDD capacity is given priority and the image quality is not improved is input (step ST5; YES), the process ends without changing the setting of the threshold value THN. On the other hand, when a selection instruction to improve the image quality without giving priority to the HDD capacity is input (step ST5; NO), the threshold setting processing unit 9 performs a process of increasing the threshold THN (step ST6), and the compression rate Make adjustments so that a recording mode with a low recording level is selected.

このように、閾値設定処理部9はユーザからのフィードバックに基づいて閾値THNを微調整することが可能となり、よりユーザの嗜好に合った符号化を実現することができる。なお、ユーザからのフィードバックは常時行われるように構成してもよいし、ある一定期間ごとに行われるように構成してもよい。常時フィードバックを行うことで、細かい設定が可能となるが、ユーザが煩わしさを感じる可能性がある。一方、ある一定区間ごとにフィードバックを行うことで、細かい設定の変更は行うことができないが、ユーザの負担を低減させることができる。   As described above, the threshold setting processing unit 9 can finely adjust the threshold THN based on feedback from the user, and can realize encoding more suited to the user's preference. In addition, you may comprise so that the feedback from a user may always be performed, and you may comprise so that it may be performed for every fixed period. By always performing feedback, fine settings can be made, but the user may feel annoyed. On the other hand, by performing feedback for every certain interval, it is not possible to change detailed settings, but it is possible to reduce the burden on the user.

次に、画像符号化装置10の動作について説明する。
図8は、この発明の実施の形態1における画像符号化装置10の動作を示すフローチャートである。なお、図8のフローチャートでは、ユーザが自動録画の設定を選択していることを前提に説明を行う。なお、自動録画の設定が選択されていない場合には、従来と同様の録画方法により録画が行われるものとする。なお、以下に示す処理は特定のシーンごとに行われ、録画対象番組が終了されるまで繰り返されるものとする。
Next, the operation of the image encoding device 10 will be described.
FIG. 8 is a flowchart showing the operation of the image coding apparatus 10 according to Embodiment 1 of the present invention. Note that the flowchart in FIG. 8 will be described on the assumption that the user has selected the setting for automatic recording. When automatic recording setting is not selected, recording is performed by a recording method similar to the conventional one. Note that the following processing is performed for each specific scene, and is repeated until the recording target program is finished.

受信部1は、録画対象の番組のMPEG−2ビデオストリームを受信し、記憶部2に記録させる(ステップST11)。符号化難易度パラメータ算出部3は、ステップST11で記憶部2に記録されたMPEG−2ビデオストリームから符号化難易度パラメータを抽出する(ステップST12)。なお、ステップST12の処理は、放送波を受信しながら算出してもよいし、受信中は記憶部2に蓄積し、オフラインで算出してもよい。同様に、以下に示す動作は受信しながら行うように構成してもよいし、番組終了まで放送波を受信した後オフラインで再符号化まで行うように構成してもよい。   The receiving unit 1 receives the MPEG-2 video stream of the program to be recorded and records it in the storage unit 2 (step ST11). The encoding difficulty parameter calculation unit 3 extracts an encoding difficulty parameter from the MPEG-2 video stream recorded in the storage unit 2 in step ST11 (step ST12). The process of step ST12 may be calculated while receiving the broadcast wave, or may be stored in the storage unit 2 during reception and calculated offline. Similarly, the operation described below may be performed while receiving, or may be configured to perform re-encoding offline after receiving the broadcast wave until the end of the program.

閾値設定処理部9は、ユーザが画質優先モードを設定しているか否か判定を行う(ステップST13)。画質優先モードが設定されている場合(ステップST13;YES)、閾値設定処理部9は画質を優先する閾値を設定する(ステップST14)。一方、画質優先モードが設定されていない場合(ステップST13;NO)、閾値設定処理部9はHDD容量を優先する閾値を設定する(ステップST15)。録画モード決定部4は、ステップST12で抽出された符号化難易度パラメータと、ステップST14またはステップST15で設定された閾値とを用いて、上述した閾値判定条件(a)に基づいて閾値処理を行い、N個(N≧1)の録画モードから1つの録画モードに決定する(ステップST16)。   The threshold setting processing unit 9 determines whether or not the user has set the image quality priority mode (step ST13). When the image quality priority mode is set (step ST13; YES), the threshold setting processing unit 9 sets a threshold for giving priority to image quality (step ST14). On the other hand, when the image quality priority mode is not set (step ST13; NO), the threshold setting processing unit 9 sets a threshold for giving priority to the HDD capacity (step ST15). The recording mode determination unit 4 performs threshold processing based on the threshold determination condition (a) described above using the encoding difficulty level parameter extracted in step ST12 and the threshold set in step ST14 or step ST15. , N recording modes (N ≧ 1) are determined as one recording mode (step ST16).

再符号化部5は、ステップST16で決定した録画モードにより、ステップST11で受信したMPEG−2ビデオストリームを復号した画像に対して再符号化を行い、得られたH.264/AVCビデオストリームを録画ストリームとして出力する(ステップST17)。画像符号化装置10は録画対象番組が終了したか否か判定を行い(ステップST18)、終了した場合には(ステップST18;YES)、処理を終了する。一方、終了していない場合には(ステップST18;NO)、ステップST11の処理に戻り、上述した処理を繰り返す。   The re-encoding unit 5 re-encodes the image obtained by decoding the MPEG-2 video stream received at step ST11 in the recording mode determined at step ST16, and the obtained H.264 / AVC video stream The recorded stream is output (step ST17). The image encoding device 10 determines whether or not the recording target program has ended (step ST18). If the recording has ended (step ST18; YES), the processing ends. On the other hand, if not completed (step ST18; NO), the processing returns to step ST11 and the above-described processing is repeated.

上述した説明では、符号化難易度パラメータ3として、Iピクチャの縮小画像を用いてパラメータを算出する例を示したが、フレーム間の動きベクトルを用いてパラメータを算出してもよい。動きベクトルを用いることにより、シーン内の動きの複雑度が分かるため、発生符号量の大小を判断することができる。   In the above description, an example in which a parameter is calculated using a reduced image of an I picture as the encoding difficulty level parameter 3 has been described. However, the parameter may be calculated using a motion vector between frames. By using the motion vector, the complexity of the motion in the scene can be known, so that the amount of generated code can be determined.

動きベクトルを用いた符号化難易度パラメータの推定方法として、動きベクトルの長さを用いることが考えられる。
Level1 = |MV| ・・・(2)
上述した式(2)に示す、動きベクトルの長さが大きいということは、フレーム間で動きが大きいことを意味しており、一般的に動きを捉えにくいシーンであると言える。そのため、動きベクトルの長さをみることで、シーン内の複雑度を推定できる。
It is conceivable to use the length of the motion vector as a method of estimating the encoding difficulty parameter using the motion vector.
Level1 = | MV | (2)
The large length of the motion vector shown in Equation (2) above means that the motion is large between frames, and it can be said that the scene is generally difficult to capture the motion. Therefore, the complexity in the scene can be estimated by looking at the length of the motion vector.

または、以下の式(3)に示すように動きベクトルの分散値を用いてもよい。一般的な動画像符号化方式であれば、動きベクトルは符号化済ベクトルから予測したベクトルとの差分を符号化するため、分散が小さければ、それだけ符号化する値が小さくなると考えられる。そのため、動きベクトルの長さを用いる場合と比べ処理量は増えるが、分散値を用いることで、より精度よく符号化難易度を推定することが可能となる。

Figure 2014116890
Alternatively, as shown in the following equation (3), a variance value of motion vectors may be used. In the case of a general moving image encoding method, the difference between a motion vector and a vector predicted from an encoded vector is encoded. Therefore, if the variance is small, the value to be encoded becomes smaller accordingly. For this reason, the processing amount is increased as compared with the case where the length of the motion vector is used, but it is possible to estimate the encoding difficulty level more accurately by using the variance value.

Figure 2014116890

また、符号化難易度パラメータとして、図9に示すようなフレーム間の差分画像の分散を用いてもよい。差分画像の分散が大きいということは、シーン内で動きが大きいことや、雑音が大きいことを示している。そのため、符号化難易度を推定するパラメータとして利用することで、より精度よく符号化難易度を推定できる。
差分画像の分散を用いる場合は、隣接する画像間の差分画像でもよいし、数フレーム離れた画像間の差分画像を用いてもよい。例えば、図10に示すように、隣接するIピクチャ同士の差分画像から縮小画像を生成して分散値を算出することにより、縮小画像の生成がDCT係数のみから行えるため、処理量低減に寄与する。
Further, the difference image distribution between frames as shown in FIG. 9 may be used as the encoding difficulty level parameter. A large variance of the difference image indicates that the motion is large in the scene and that the noise is large. Therefore, the encoding difficulty level can be estimated more accurately by using it as a parameter for estimating the encoding difficulty level.
When using difference image dispersion, a difference image between adjacent images may be used, or a difference image between images separated by several frames may be used. For example, as shown in FIG. 10, by generating a reduced image from a difference image between adjacent I pictures and calculating a variance value, the reduced image can be generated from only the DCT coefficient, which contributes to a reduction in processing amount. .

符号化難易度パラメータとして、上記項目を組み合わせてもよい。画像の複雑度と、動きの複雑度を組み合わせることにより、より精度よく符号化難易度を推定することが可能となる。   The above items may be combined as an encoding difficulty level parameter. By combining the complexity of the image and the complexity of the motion, it becomes possible to estimate the encoding difficulty level with higher accuracy.

以上のように、この実施の形態1によれば、映像符号化データから符号化の難易度を示す符号化難易度パラメータを算出する符号化難易度パラメータ算出部と、算出された符号化難易度パラメータに基づいて画像の圧縮率を示す録画モードを決定する録画モード決定部と、決定された録画モードに応じたパラメータを用いて目標符号量を適応的に切り替えた符号化を行う再符号化部とを備えるように構成したので、ユーザが設定を切り替えることなく、最適な圧縮率で符号化することができ、画質を保ったままHDDの効率的な利用を実現することができる。   As described above, according to the first embodiment, the encoding difficulty parameter calculating unit that calculates the encoding difficulty parameter indicating the difficulty of encoding from the video encoded data, and the calculated encoding difficulty Recording mode determining unit that determines a recording mode indicating an image compression rate based on a parameter, and re-encoding unit that performs encoding by adaptively switching a target code amount using a parameter corresponding to the determined recording mode Therefore, encoding can be performed at an optimal compression rate without switching the setting by the user, and efficient use of the HDD can be realized while maintaining the image quality.

また、この実施の形態1によれば、録画モード決定部が閾値処理により録画モードを決定し、閾値処理に用いる閾値を優先度、シーンごとの符号化難易度、HDDの残容量、あるいはユーザの嗜好などに合わせて設定可能に構成したので、記録する機器側の状態、あるいはユーザの嗜好に合わせた録画モードの決定を行うことができる。   Further, according to the first embodiment, the recording mode determination unit determines the recording mode by threshold processing, and the threshold used for the threshold processing is set as the priority, the encoding difficulty for each scene, the remaining capacity of the HDD, or the user's Since it can be set according to the preference, etc., it is possible to determine the state of the device to be recorded or the recording mode according to the user's preference.

また、この実施の形態1によれば、符号化難易度パラメータとして画像の複雑さと、画像の動きの複雑さとを組み合わせ可能に構成したので、映像符号化データの符号化の難易度を精度よく推定することができる。   Further, according to the first embodiment, since the complexity of the image and the complexity of the motion of the image can be combined as the encoding difficulty parameter, the difficulty of encoding the video encoded data can be accurately estimated. can do.

なお、上述した実施の形態1では、符号化難易度パラメータに基づいて圧縮率を決定する構成を示したが、当該画像符号化装置10を記録システムなどに適用する場合には従来手法の手動で圧縮率を決定するモードと切り替え可能なシステムとして構成してもよい。自由にモードを設定したいユーザに対し、手動で決定可能なモードを用意することで、よりユーザの嗜好に合わせた記録システムを提供することができる。   In the above-described first embodiment, the configuration in which the compression rate is determined based on the encoding difficulty level parameter has been described. However, when the image encoding device 10 is applied to a recording system or the like, the conventional method is manually used. You may comprise as a system switchable with the mode which determines a compression rate. By preparing a mode that can be manually determined for a user who wants to freely set a mode, a recording system more suited to the user's preference can be provided.

また、上述した実施の形態1では、MPEG−2ビデオストリームを入力し、H.264/AVCビデオストリームを出力とする例を示したが、これは入力がH.264/AVCビデオストリームなど別の動画像符号化方式であってもよいし、出力がMPEG−2など別の動画像符号化方式であってもよく、符号化方式に限定されるものではない。   In the first embodiment described above, an example in which an MPEG-2 video stream is input and an H.264 / AVC video stream is output has been described. However, this is different from an input such as an H.264 / AVC video stream. The video encoding method may be used, and the output may be another video encoding method such as MPEG-2, and is not limited to the encoding method.

実施の形態2.
上述した実施の形態1では、MPEG−2ビデオストリームを受信し再圧縮して記録する機器あるいはシステムに適用され、適切な圧縮率でMPEG−2ビデオストリーム記録するための画像符号化装置について述べたが、この実施の形態2では、ユーザ、記録装置あるいは記録システムが設定した圧縮率に対し、より高画質な映像を得るためのパラメータを設定する構成を示す。
Embodiment 2. FIG.
In the first embodiment described above, an image coding apparatus for recording an MPEG-2 video stream at an appropriate compression rate, which is applied to a device or system that receives an MPEG-2 video stream and recompresses and records it, has been described. However, the second embodiment shows a configuration in which parameters for obtaining a higher-quality video are set for the compression rate set by the user, the recording apparatus, or the recording system.

図11は、この発明の実施の形態2による画像符号化装置の構成を示すブロック図である。実施の形態2の画像符号化装置は、図1で示した実施の形態1の画像符号化装置10の録画モード決定部4に替えて符号化パラメータ決定部11を設けている。なお、以下では、実施の形態1による画像符号化装置10の構成要素と同一または相当する部分には実施の形態1で使用した符号と同一の符号を付して説明を省略または簡略化する。   FIG. 11 is a block diagram showing a configuration of an image coding apparatus according to Embodiment 2 of the present invention. The image encoding apparatus according to the second embodiment includes an encoding parameter determination unit 11 instead of the recording mode determination unit 4 of the image encoding apparatus 10 according to the first embodiment shown in FIG. In the following description, the same or corresponding parts as those of the image encoding device 10 according to the first embodiment are denoted by the same reference numerals as those used in the first embodiment, and the description thereof is omitted or simplified.

符号化パラメータ決定部11は、符号化難易度パラメータ算出部3で算出された符号化難易度パラメータと、ユーザ操作によって指定された録画設定条件とに応じて、量子化マトリクスなどの符号化パラメータを設定する。量子化マトリクスの符号化パラメータのパラメータ数をNとすると、以下に示す閾値判定条件(b)に基づいて閾値処理を行い、符号化パラメータ(Para)を決定する。なお、録画設定条件とは、画質を優先するか、あるいはHDD容量を優先して高画質を望まないかなどユーザの録画に対する嗜好を設定した条件である。
・閾値判定条件(b)
if TH1´<Level then Para1
else if TH2´<Level then Para2
・・・
else if THN´<Level then ParaN
なお、Nの値が大きいほど、符号化難易度が低いシーン用のパラメータセットを示している。このとき閾値はTH1´>TH2´>・・・>THN´の順であるものとする。
再符号化部5の制御部7は、符号化パラメータ決定部11で決定された符号化パラメータを、符号化部8に出力する。
The encoding parameter determination unit 11 determines an encoding parameter such as a quantization matrix according to the encoding difficulty parameter calculated by the encoding difficulty parameter calculation unit 3 and the recording setting condition specified by the user operation. Set. When the number of parameters of the encoding parameter of the quantization matrix is N, threshold processing is performed based on the threshold determination condition (b) shown below to determine the encoding parameter (Para). Note that the recording setting condition is a condition in which a user's preference for recording is set, such as whether image quality is given priority or HDD capacity is given priority and high image quality is not desired.
・ Threshold determination condition (b)
if TH1´ <Level then Para1
else if TH2´ <Level then Para2
...
else if THN '<Level then ParaN
Note that the larger the value of N is, the lower the encoding difficulty is for the scene parameter set. At this time, the threshold values are in the order of TH1 ′> TH2 ′>...> THN ′.
The control unit 7 of the re-encoding unit 5 outputs the encoding parameter determined by the encoding parameter determination unit 11 to the encoding unit 8.

図12に量子化マトリクスの例を示す。符号化難易度が高い場合は、図12(a)に示すように高域の係数を落とす符号化パラメータを設定し、難易度が低い場合は、図12(b)に示すように高域をより残す符号化パラメータを設定する。符号化難易度が高いということは、発生符号量が多いということを示している。指定されたビットレートで符号化するために、高域を落とすマトリクスとすることで、発生符号量を抑えることが可能となる。一方、符号化難易度が低い場合は、発生符号量が少ないことを示しており、図12(b)に示すように、高域を残すマトリクスとしても、指定されたビットレートで符号化できる可能性が高い。   FIG. 12 shows an example of the quantization matrix. When the encoding difficulty is high, an encoding parameter for dropping the high frequency coefficient is set as shown in FIG. 12A, and when the encoding difficulty is low, the high frequency is set as shown in FIG. Set the remaining encoding parameters. A high degree of encoding difficulty indicates that the amount of generated codes is large. In order to perform encoding at a specified bit rate, the generated code amount can be suppressed by using a matrix that lowers the high frequency band. On the other hand, when the degree of encoding difficulty is low, it indicates that the amount of generated code is small, and as shown in FIG. 12B, it is possible to encode at a specified bit rate even as a matrix that leaves high frequencies. High nature.

また、符号化難易度に応じてデブロッキングフィルタなどのループフィルタ強度を変えるように構成することもできる。フィルタ強度を強くすると、画像の高域が失われるため、少しぼけた画像になるが、発生符号量を小さくできるメリットがある。このため、符号化難易度が高いシーンについては、フィルタ強度を強くすることで発生符号量を抑えることが可能となる。   Moreover, it can also be configured to change the strength of a loop filter such as a deblocking filter in accordance with the degree of difficulty of encoding. When the filter strength is increased, the high frequency of the image is lost, so the image becomes slightly blurred, but there is an advantage that the generated code amount can be reduced. For this reason, for a scene with a high degree of difficulty in encoding, the amount of generated code can be suppressed by increasing the filter strength.

次に、上述した閾値THN´の設定について説明する。閾値THN´は、各機器において固有値としてもよいし、ユーザ操作や録画する機器の状態に応じて変更してもよい。上述したように、符号化難易度が低い映像に対して、量子化マトリクスやブロッキングフィルタのパラメータについて高域を落とすように設定を行うと、高域が失われ、全体的にぼやけた画像となる。一方、符号化難易度が高い映像に対して高域を残すような符号化を行うと、画像のぼやけが減る一方で、モスキートノイズやブロックノイズが目立つ画像となる。どちらの映像を好むかはユーザによって異なるため、閾値の違うモードを複数用意し選択できるようにすることで、ユーザの嗜好に合わせた符号化を行うことができる。   Next, the setting of the threshold value THN ′ described above will be described. The threshold value THN ′ may be a unique value for each device, or may be changed according to the user operation or the state of the device to be recorded. As described above, if the quantization matrix and blocking filter parameters are set so as to reduce the high frequency for video with low encoding difficulty, the high frequency is lost and the image becomes blurred overall. . On the other hand, when encoding is performed so as to leave a high frequency range for a video with a high degree of difficulty in encoding, the image blurring is reduced, while an image in which mosquito noise and block noise are conspicuous is obtained. Which video is preferred depends on the user, so that a plurality of modes with different thresholds can be prepared and selected so that encoding according to the user's preference can be performed.

そこで、ユーザ操作や録画する機器の状態に応じて閾値THN´を変更する場合には、例えば図13に示すように閾値設定処理部9´を追加して設ける。図13は、実施の形態2による画像符号化装置10のその他の構成を示すブロック図である。
閾値設定処理部9´は、入力されるユーザ操作や、録画する機器側から入力される状態情報に基づいて閾値THN´を決定し、符号化パラメータ決定部11に設定する処理を行う。
Therefore, when the threshold value THN ′ is changed according to the user operation or the state of the recording device, for example, a threshold value setting processing unit 9 ′ is additionally provided as shown in FIG. FIG. 13 is a block diagram illustrating another configuration of the image encoding device 10 according to the second embodiment.
The threshold setting processing unit 9 ′ performs a process of determining the threshold THN ′ based on the input user operation and the state information input from the recording device side and setting the threshold THN ′ in the encoding parameter determination unit 11.

また、ユーザの嗜好に合わせた閾値設定の異なる方法として、ユーザからのフィードバックをもとに、閾値設定処理部9´に閾値THN´を学習させる方法も考えられる。
図14は、この発明の実施の形態1による画像符号化装置10の閾値設定処理部9´の動作を示すフローチャートである。なお、以下では実施の形態1に係る画像符号化装置10の閾値設定処理部9´と同一のステップには図7で使用した符号と同一の符号を付し、説明を省略または簡略化する。
まず、ある符号化パラメータを用いて番組録画が行われた後に、ユーザが当該番組を視聴し、視聴後に画質について評価を行う(ステップST1)。閾値設定処理部9´は、ステップST1として画質に対する評価が入力されると、当該評価を参照してユーザが画質に満足したか否か判定を行う(ステップST2)。
Further, as a method of different threshold setting according to the user's preference, a method of causing the threshold setting processing unit 9 ′ to learn the threshold THN ′ based on feedback from the user is also conceivable.
FIG. 14 is a flowchart showing the operation of the threshold setting processing unit 9 ′ of the image encoding device 10 according to Embodiment 1 of the present invention. In the following, the same steps as those of the threshold setting processing unit 9 ′ of the image encoding device 10 according to Embodiment 1 are denoted by the same reference numerals as those used in FIG. 7, and description thereof is omitted or simplified.
First, after recording a program using a certain encoding parameter, the user views the program and evaluates the image quality after viewing (step ST1). When the evaluation for the image quality is input as step ST1, the threshold setting processing unit 9 ′ refers to the evaluation and determines whether or not the user is satisfied with the image quality (step ST2).

ユーザが画質に満足している場合(ステップST2;YES)には処理を終了する。一方、ユーザが画質に満足していない場合(ステップST2;NO)、さらに評価を参照して録画した映像がぼやけていると評価したか、または録画した映像にノイズが多いと評価したか判定を行う(ステップST21)。ステップST21において録画した映像がぼやけていると評価された場合、高域を残す符号化の設定とするために、閾値設定処理部9´は閾値THN´を上げる処理を行い(ステップST22)、処理を終了する。一方、ステップST21において録画した映像にノイズが多いと評価された場合、高域をより落とす符号化の設定とするために、閾値THN´を下げる処理を行い(ステップST23)、処理を終了する。   If the user is satisfied with the image quality (step ST2; YES), the process ends. On the other hand, if the user is not satisfied with the image quality (step ST2; NO), it is further determined whether the recorded video is evaluated as being blurred by referring to the evaluation, or whether the recorded video is evaluated as being noisy. It performs (step ST21). If it is evaluated in step ST21 that the recorded video is blurred, the threshold setting processing unit 9 ′ performs a process of increasing the threshold THN ′ in order to set the coding to leave the high frequency (step ST22). Exit. On the other hand, when it is evaluated that there is a lot of noise in the recorded video in step ST21, a process of lowering the threshold THN ′ is performed in order to set the encoding to lower the high frequency (step ST23), and the process ends.

このように、閾値設定処理部9´はユーザからのフィードバックに基づいて閾値THN´を微調整することが可能となり、よりユーザの嗜好に合った符号化を実現することができる。なお、ユーザからのフィードバックは常時行われるように構成してもよいし、ある一定期間ごとに行われるように構成してもよい。常時フィードバックを行うことで、細かい設定が可能となるが、ユーザが煩わしさを感じる可能性がある。一方、ある一定区間ごとにフィードバックを行うことで、細かい設定の変更は行うことができないが、ユーザの負担を低減させることができる。   As described above, the threshold setting processing unit 9 ′ can finely adjust the threshold THN ′ based on feedback from the user, and can realize encoding more suited to the user's preference. In addition, you may comprise so that the feedback from a user may always be performed, and you may comprise so that it may be performed for every fixed period. By always performing feedback, fine settings can be made, but the user may feel annoyed. On the other hand, by performing feedback for every certain interval, it is not possible to change detailed settings, but it is possible to reduce the burden on the user.

次に、画像符号化装置10の動作について説明する。
図15は、この発明の実施の形態2における画像符号化装置10の動作を示すフローチャートである。なお、以下では実施の形態1に係る画像符号化装置10の閾値設定処理部9´と同一のステップには図8で使用した符号と同一の符号を付し、説明を省略または簡略化する。また、実施の形態1と同様に、図15のフローチャートにおいても、ユーザが自動録画の設定を選択していることを前提に説明を行う。なお、自動録画の設定が選択されていない場合には、従来と同様の録画方法により録画が行われるものとする。なお、以下に示す処理は特定のシーンごとに行われ、録画対象番組が終了されるまで繰り返されるものとする。
Next, the operation of the image encoding device 10 will be described.
FIG. 15 is a flowchart showing the operation of the image coding apparatus 10 according to Embodiment 2 of the present invention. In the following, the same steps as those of the threshold setting processing unit 9 ′ of the image encoding device 10 according to the first embodiment are denoted by the same reference numerals as those used in FIG. 8, and description thereof is omitted or simplified. Similarly to the first embodiment, the description will be made on the assumption that the user has selected the setting of automatic recording in the flowchart of FIG. When automatic recording setting is not selected, recording is performed by a recording method similar to the conventional one. Note that the following processing is performed for each specific scene, and is repeated until the recording target program is finished.

ユーザまたは記録システム側から入力された録画モードが設定されると(ステップST31)、受信部1は、録画対象の番組のMPEG−2ビデオストリームを受信し、記憶部2に記録させる(ステップST11)。符号化難易度パラメータ算出部3は、符号化難易度パラメータを抽出し(ステップST12)、その後、ステップST13からステップST15の処理を行い、選択されたモードに応じて閾値THN´を設定する。   When the recording mode input from the user or the recording system is set (step ST31), the receiving unit 1 receives the MPEG-2 video stream of the program to be recorded and records it in the storage unit 2 (step ST11). . The encoding difficulty level parameter calculation unit 3 extracts the encoding difficulty level parameter (step ST12), and then performs the processing from step ST13 to step ST15 to set the threshold value THN ′ according to the selected mode.

符号化パラメータ決定部11は、ステップST12で抽出された符号化難易度パラメータと、ステップST14またはステップST15で設定された閾値THN´とを用いて、上述した閾値判定条件(b)に基づいて閾値処理を行い、N個(N≧1)の符号化パラメータから1つの符号化パラメータに決定する(ステップST32)。   The encoding parameter determination unit 11 uses the encoding difficulty level parameter extracted in step ST12 and the threshold value THN ′ set in step ST14 or step ST15 based on the threshold determination condition (b) described above. Processing is performed to determine one encoding parameter from N (N ≧ 1) encoding parameters (step ST32).

再符号化部5は、ステップST32で決定した符号化パラメータにより、ステップST11で受信したMPEG−2ビデオストリームを復号した画像に対して再符号化を行い、得られたH.264/AVCビデオストリームを録画ストリームとして出力する(ステップST33)。画像符号化装置10は録画対象番組が終了したか否か判定を行い(ステップST18)、終了した場合には(ステップST18;YES)、処理を終了する。一方、終了していない場合には(ステップST18;NO)、ステップST11の処理に戻り、上述した処理を繰り返す。   The re-encoding unit 5 re-encodes the image obtained by decoding the MPEG-2 video stream received in step ST11 according to the encoding parameter determined in step ST32, and the obtained H.264 / AVC video stream Is output as a recording stream (step ST33). The image encoding device 10 determines whether or not the recording target program has ended (step ST18). If the recording has ended (step ST18; YES), the processing ends. On the other hand, if not completed (step ST18; NO), the processing returns to step ST11 and the above-described processing is repeated.

以上のように、この実施の形態2によれば、映像符号化データから符号化の難易度を示す符号化難易度パラメータを算出する符号化難易度パラメータ算出部と、算出された符号化難易度パラメータに基づいて発生符号量を制御する符号化パラメータを決定する符号化パラメータ決定部と、決定された符号化パラメータを用いて発生符号量を適応的に切り替えた符号化を行う再符号化部とを備えるように構成したので、ユーザが設定を切り替えることなく、最適な発生符号量の符号化を行うことができ、HDDの効率的な利用を実現することができる。   As described above, according to the second embodiment, the encoding difficulty parameter calculation unit that calculates the encoding difficulty parameter indicating the difficulty of encoding from the video encoded data, and the calculated encoding difficulty An encoding parameter determining unit that determines an encoding parameter that controls the generated code amount based on the parameter, and a re-encoding unit that performs encoding by adaptively switching the generated code amount using the determined encoding parameter; Therefore, it is possible to perform encoding of an optimal generated code amount without switching the setting by the user, and to realize efficient use of the HDD.

また、この実施の形態1によれば、符号化パラメータ決定部が閾値処理により符号化パラメータを決定し、閾値処理に用いる閾値をユーザの嗜好などに合わせて設定可能に構成したので、ユーザの嗜好に合わせた符号化パラメータを設定することができる。   Further, according to the first embodiment, the encoding parameter determination unit determines the encoding parameter by threshold processing, and the threshold used for the threshold processing can be set according to the user's preference. The encoding parameter can be set according to the above.

なお、上述した実施の形態2では、MPEG−2ビデオストリームを入力し、H.264/AVCビデオストリームを出力とする例を示したが、これは入力がH.264/AVCビデオストリームなど別の動画像符号化方式であってもよいし、出力がMPEG−2など別の動画像符号化方式であってもよく、符号化方式に限定されるものではない。   In the second embodiment described above, an example in which an MPEG-2 video stream is input and an H.264 / AVC video stream is output has been described. The video encoding method may be used, and the output may be another video encoding method such as MPEG-2, and is not limited to the encoding method.

なお、本願発明はその発明の範囲内において、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。   In the present invention, within the scope of the invention, any combination of the embodiments, or any modification of any component in each embodiment, or omission of any component in each embodiment is possible. .

1 受信部、2 記憶部、3 符号化難易度パラメータ算出部、4 録画モード決定部、5 再符号化部、6 復号部、7 制御部、8 符号化部、9 閾値設定処理部、10 画像符号化装置、11 符号化パラメータ決定部。   DESCRIPTION OF SYMBOLS 1 Reception part, 2 Storage part, 3 Encoding difficulty parameter calculation part, 4 Recording mode determination part, 5 Re-encoding part, 6 Decoding part, 7 Control part, 8 Encoding part, 9 Threshold setting process part, 10 image An encoding device, 11 an encoding parameter determination unit.

Claims (2)

入力された第1の映像符号化データから、符号化の難易度を示す符号化難易度パラメータを算出する符号化難易度パラメータ算出部と、
前記符号化難易度パラメータ算出部が算出した前記符号化難易度パラメータに基づいて、前記第1の映像符号化データの圧縮率を決定する録画モード決定部と、
前記第1の映像符号化データを復号した映像データに対して、前記録画モード決定部が決定した圧縮率を用いて目標符号量を適応的に切り替えた符号化を行い、第2の映像符号化データを生成する再符号化部とを備えた画像符号化装置。
An encoding difficulty parameter calculating unit that calculates an encoding difficulty parameter indicating the difficulty of encoding from the input first video encoded data;
A recording mode determination unit that determines a compression rate of the first video encoded data based on the encoding difficulty parameter calculated by the encoding difficulty parameter calculation unit;
The video data obtained by decoding the first video encoded data is encoded by adaptively switching the target code amount using the compression rate determined by the recording mode determining unit, and the second video encoding is performed. An image encoding device including a re-encoding unit that generates data.
入力された第1の映像符号化データから、符号化の難易度を示す符号化難易度パラメータを算出する符号化難易度パラメータ算出部と、
前記符号化難易度パラメータ算出部が算出した前記符号化難易度パラメータに基づいて、前記第1の映像符号化データの発生符号量を制御する符号化パラメータを決定する符号化パラメータ決定部と、
前記第1の映像符号化データを復号した映像データに対して、前記符号化パラメータ決定部が決定した符号化パラメータを用いて目標符号量を適応的に切り替えた符号化を行い、第2の映像符号化データを生成する再符号化部とを備えた画像符号化装置。
An encoding difficulty parameter calculating unit that calculates an encoding difficulty parameter indicating the difficulty of encoding from the input first video encoded data;
An encoding parameter determining unit that determines an encoding parameter for controlling a generated code amount of the first video encoded data based on the encoding difficulty parameter calculated by the encoding difficulty parameter calculating unit;
The video data obtained by decoding the first video encoded data is encoded by adaptively switching the target code amount using the encoding parameter determined by the encoding parameter determination unit, and the second video An image encoding apparatus comprising: a re-encoding unit that generates encoded data.
JP2012271366A 2012-12-12 2012-12-12 Image encoding device Expired - Fee Related JP6300440B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012271366A JP6300440B2 (en) 2012-12-12 2012-12-12 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012271366A JP6300440B2 (en) 2012-12-12 2012-12-12 Image encoding device

Publications (2)

Publication Number Publication Date
JP2014116890A true JP2014116890A (en) 2014-06-26
JP6300440B2 JP6300440B2 (en) 2018-03-28

Family

ID=51172451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012271366A Expired - Fee Related JP6300440B2 (en) 2012-12-12 2012-12-12 Image encoding device

Country Status (1)

Country Link
JP (1) JP6300440B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022174918A (en) * 2021-05-12 2022-11-25 横河電機株式会社 Apparatus, method and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003274415A (en) * 2002-03-09 2003-09-26 Samsung Electronics Co Ltd Adaptive video coding method and apparatus based on spatio-temporal complexity
JP2005210502A (en) * 2004-01-23 2005-08-04 Nec Corp Image recompression device and method
JP2008205534A (en) * 2007-02-16 2008-09-04 Matsushita Electric Ind Co Ltd Encoding method converter
JP2009010763A (en) * 2007-06-28 2009-01-15 Sony Corp Image processing apparatus and method
JP2009135666A (en) * 2007-11-29 2009-06-18 Nec Corp Data transcoder, electronic device, data transcoding method, and program
JP2009231905A (en) * 2008-03-19 2009-10-08 Mega Chips Corp Transcoder

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003274415A (en) * 2002-03-09 2003-09-26 Samsung Electronics Co Ltd Adaptive video coding method and apparatus based on spatio-temporal complexity
JP2005210502A (en) * 2004-01-23 2005-08-04 Nec Corp Image recompression device and method
JP2008205534A (en) * 2007-02-16 2008-09-04 Matsushita Electric Ind Co Ltd Encoding method converter
JP2009010763A (en) * 2007-06-28 2009-01-15 Sony Corp Image processing apparatus and method
JP2009135666A (en) * 2007-11-29 2009-06-18 Nec Corp Data transcoder, electronic device, data transcoding method, and program
JP2009231905A (en) * 2008-03-19 2009-10-08 Mega Chips Corp Transcoder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022174918A (en) * 2021-05-12 2022-11-25 横河電機株式会社 Apparatus, method and program
JP7424345B2 (en) 2021-05-12 2024-01-30 横河電機株式会社 Apparatus, method and program

Also Published As

Publication number Publication date
JP6300440B2 (en) 2018-03-28

Similar Documents

Publication Publication Date Title
US20200336743A1 (en) Image decoding device, image encoding device, and method thereof
JP5173837B2 (en) Adaptive filtering to improve video encoder performance
US8422565B2 (en) Information processing device and method, and information processing system
US20080165861A1 (en) Intelligent Video Signal Encoding Utilizing Regions of Interest Information
EP1949705B1 (en) Image signal processing apparatus
US8824550B2 (en) Image capture apparatus
JP5884313B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP2018137542A (en) Encoding apparatus, encoding method, and program
JP6300440B2 (en) Image encoding device
JP6217826B2 (en) Image processing apparatus and image processing method
US20120314966A1 (en) Image coding apparatus, image decoding apparatus, image coding method, image decoding method, and program
JP6289168B2 (en) Image encoding device
JP2017028622A (en) Image quality control apparatus, image quality control method, image quality control system, and program for image quality control
JP4942208B2 (en) Encoder
JP2005005862A (en) Picture coding device
JP2018191334A (en) Image coding device, image coding method, and program
JP2012124653A (en) Encoder, encoding method, and program
JP2001204025A (en) High efficiency coding device
JP2007081744A (en) Moving picture coding apparatus and moving picture coding method
Bruls et al. A spatial dual layer video compression method allowing for dynamic resolution control
HK1240733B (en) Image encoding device, image encoding method and image decoding device
HK1237161B (en) Image decoding method and image processing apparatus
JP2012195815A (en) Image processing apparatus and image processing method
JP2010103666A (en) Image encoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160912

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170719

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: 20180130

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180227

R150 Certificate of patent or registration of utility model

Ref document number: 6300440

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees