JP5226089B2 - Image coding method converter - Google Patents
Image coding method converter Download PDFInfo
- Publication number
- JP5226089B2 JP5226089B2 JP2011001238A JP2011001238A JP5226089B2 JP 5226089 B2 JP5226089 B2 JP 5226089B2 JP 2011001238 A JP2011001238 A JP 2011001238A JP 2011001238 A JP2011001238 A JP 2011001238A JP 5226089 B2 JP5226089 B2 JP 5226089B2
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- image
- jpeg
- quantization
- encoding method
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 157
- 238000013139 quantization Methods 0.000 claims description 240
- 238000006243 chemical reaction Methods 0.000 claims description 161
- 238000002620 method output Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 18
- 239000000284 extract Substances 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 10
- 230000006835 compression Effects 0.000 description 9
- 238000007906 compression Methods 0.000 description 9
- 230000006866 deterioration Effects 0.000 description 7
- 102100029860 Suppressor of tumorigenicity 20 protein Human genes 0.000 description 4
- 238000012217 deletion Methods 0.000 description 3
- 230000037430 deletion Effects 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 230000009466 transformation Effects 0.000 description 3
- 101000760620 Homo sapiens Cell adhesion molecule 1 Proteins 0.000 description 2
- 101000661816 Homo sapiens Suppression of tumorigenicity 18 protein Proteins 0.000 description 2
- 102100035353 Cyclin-dependent kinase 2-associated protein 1 Human genes 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
この発明は、例えば、JPEGの映像ストリームをMPEG−2の映像ストリームに変換する画像符号化方式変換装置に関するものである。 The present invention relates to an image coding method conversion apparatus that converts, for example, a JPEG video stream into an MPEG-2 video stream.
近年、一般的に画像を圧縮して符号化する技術が用いられている。
この画像符号化方式の代表的なものとして、主にデジタルカメラなどで採用されているJPEG(Joint Photographic Experts Group)がある。
また、JPEGを連続して符号化することで、動画像を符号化する方式もある。この方式は、Motion JPEG、もしくは、MJPEG等と呼ばれることもある。
さらに、DVD(Digital Veritable Disk)−VIDEOに採用されているMPEG−2(Moving Picture Experts Group)と呼ばれる動画像符号化方式がある。
In recent years, a technique for compressing and encoding an image is generally used.
A representative example of this image encoding method is JPEG (Joint Photographic Experts Group) mainly used in digital cameras and the like.
There is also a method of encoding a moving image by continuously encoding JPEG. This method is sometimes called Motion JPEG or MJPEG.
Furthermore, there is a moving picture encoding method called MPEG-2 (Moving Picture Experts Group) adopted in DVD (Digital Verifiable Disk) -VIDEO.
このように、画像符号化方式には様々な方式が存在し、一般に異なる画像符号化方式には互換性がない。
そのため、ユーザが異なる画像符号化方式に対応するには、それぞれの画像符号化方式に対応する画像復号装置を用意するか、画像符号化方式変換装置を用意する必要がある。
例えば、市販されているDVDプレーヤはMPEG−2方式しか再生できず、それぞれの画像符号化方式に対応する画像復号装置を用意するのは現実的に困難である。
一方、画像符号化方式変換装置を用意すれば、それぞれの画像符号化方式に対応する画像復号装置を用意する必要がなくなるが、画像の変換に要する時間や、変換後の画像の品質が問題になる。
As described above, there are various image encoding methods, and generally different image encoding methods are not compatible.
For this reason, in order for a user to support different image encoding methods, it is necessary to prepare an image decoding device corresponding to each image encoding method or to prepare an image encoding method conversion device.
For example, a commercially available DVD player can reproduce only the MPEG-2 system, and it is practically difficult to prepare an image decoding apparatus corresponding to each image encoding system.
On the other hand, if an image encoding method conversion device is prepared, it is not necessary to prepare an image decoding device corresponding to each image encoding method, but the time required for image conversion and the quality of the image after conversion are problematic. Become.
画像符号化方式変換装置における最も単純な変換方法としては、一旦、符号化データを復号して画像データに戻してから、再度異なる符号化方式で符号化を行う方法がある。
しかし、この変換方法では、演算処理量が膨大になる上、画像の画質も劣化し易い欠点がある。
そこで、演算処理量の増加や画質の劣化を抑えるために、符号化データの完全な復号を行わずに画像符号化方式を変換する画像符号化方式変換装置が開発され、その画像符号化方式変換装置が以下の非特許文献1に開示されている。
ただし、以下の非特許文献1に開示されている画像符号化方式変換装置では、符号化データの量子化や逆量子化については実施する必要がある。
As the simplest conversion method in the image encoding method conversion apparatus, there is a method in which encoded data is once decoded and returned to image data, and then encoded again by a different encoding method.
However, this conversion method has the disadvantages that the amount of calculation processing is enormous and the image quality of the image tends to deteriorate.
Therefore, in order to suppress an increase in the amount of calculation processing and deterioration in image quality, an image coding method conversion device that converts an image coding method without completely decoding encoded data has been developed. The apparatus is disclosed in the following
However, in the image coding method conversion apparatus disclosed in Non-Patent
従来の画像符号化方式変換装置は以上のように構成されているので、符号化データの完全な復号を行わずに画像符号化方式を変換しており、ある程度は、演算処理量の増加や画質の劣化を抑えることができる。しかし、符号化データの量子化や逆量子化については実施する必要があるため、演算処理量の削減や画質の劣化の抑制には限界があるなどの課題があった。 Since the conventional image coding method conversion apparatus is configured as described above, the image coding method is converted without completely decoding the encoded data. Can be prevented. However, since it is necessary to carry out quantization and inverse quantization of encoded data, there are problems such as limitations in reducing the amount of calculation processing and suppressing deterioration in image quality.
この発明は上記のような課題を解決するためになされたもので、演算処理量を大幅に削減することができるとともに、画質の劣化を大幅に抑制することができる画像符号化方式変換装置を得ることを目的とする。 The present invention has been made to solve the above-described problems, and provides an image coding method conversion apparatus that can greatly reduce the amount of arithmetic processing and can greatly suppress deterioration in image quality. For the purpose.
この発明に係る画像符号化方式変換装置は、画像信号が第一の符号化方式で符号化されている符号化ストリームの一部を復号して、その符号化ストリームからヘッダ情報と第一の符号化方式の量子化テーブル及び量子化周波数成分を抽出する簡易復号化手段と、簡易復号化手段により抽出された第一の符号化方式の量子化テーブル及び量子化周波数成分を第二の符号化方式の量子化テーブル及び量子化周波数成分に変換するデータ変換手段と、データ変換手段により変換された第二の符号化方式の量子化テーブルを用いて追加画像の画像データを量子化し、量子化後の画像データをデータ変換手段により変換された第二の符号化方式の量子化周波数成分に加える画像データ追加手段と、簡易復号化手段により抽出されたヘッダ情報を追加画像の画像幅に応じて変更し、変更後のヘッダ情報とデータ変換手段により変換された第二の符号化方式の量子化テーブルと画像データ追加手段により量子化後の画像データが加えられた第二の符号化方式の量子化周波数成分から第二の符号化方式の符号化ストリームを作成する符号化ストリーム作成手段とを備えるものである。
また、簡易復号化手段により今回抽出された第一の符号化方式の量子化テーブルと、簡易復号化手段により前回抽出された第一の符号化方式の量子化テーブルとを比較し、さらに簡易復号化手段から今回出力された第一の符号化方式の量子化周波数成分と、簡易復号化手段から前回出力された第一の符号化方式の量子化周波数成分とを比較し、2つの比較結果に基づいてフレーム内符号化を実施するか否かを判定する符号化判定手段を設け、符号化ストリーム作成手段が、符号化判定手段からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施して第二の符号化方式の符号化ストリームを作成し、符号化判定手段からフレーム内符号化を実施しない旨を示す判定結果を受ければ、フレーム内符号化を実施せずに、前回作成した第二の符号化方式の符号化ストリームを出力するようにしたものである。
The image coding method conversion apparatus according to the present invention decodes a part of an encoded stream in which an image signal is encoded by the first encoding method, and generates header information and a first code from the encoded stream. A simple decoding means for extracting the quantization table and quantization frequency component of the encoding method, and a second encoding method for the quantization table and quantization frequency component of the first encoding method extracted by the simple decoding means The image data of the additional image is quantized using the quantization table and the data conversion means for converting to the quantization frequency component, and the quantization table of the second encoding method converted by the data conversion means, and after the quantization The image data adding means for adding the image data to the quantized frequency component of the second encoding method converted by the data converting means, and the header information extracted by the simple decoding means as the additional image The second information is changed according to the image width, the header information after the change, the quantization table of the second encoding method converted by the data conversion means, and the image data after the quantization is added by the image data adding means Coding stream creating means for creating a coded stream of the second coding method from the quantized frequency component of the coding method.
Further, the quantization table of the first encoding method extracted this time by the simple decoding means is compared with the quantization table of the first encoding method previously extracted by the simple decoding means, and further simplified decoding is performed. The quantization frequency component of the first encoding method output this time from the encoding means and the quantization frequency component of the first encoding method output last time from the simple decoding means are compared, and two comparison results are obtained. Provided with an encoding determination unit that determines whether or not to perform intra-frame encoding based on, and if the encoded stream creation unit receives a determination result indicating that intra-frame encoding is to be performed from the encoding determination unit, Intra-frame encoding is performed to create an encoded stream of the second encoding method, and if a determination result indicating that intra-frame encoding is not performed is received from the encoding determination means, intra-frame encoding is performed. Z , In which to output the encoded stream of the second coding scheme previously created.
この発明によれば、画像信号が第一の符号化方式で符号化されている符号化ストリームの一部を復号して、その符号化ストリームからヘッダ情報と第一の符号化方式の量子化テーブル及び量子化周波数成分を抽出する簡易復号化手段と、簡易復号化手段により抽出された第一の符号化方式の量子化テーブル及び量子化周波数成分を第二の符号化方式の量子化テーブル及び量子化周波数成分に変換するデータ変換手段と、データ変換手段により変換された第二の符号化方式の量子化テーブルを用いて追加画像の画像データを量子化し、量子化後の画像データをデータ変換手段により変換された第二の符号化方式の量子化周波数成分に加える画像データ追加手段と、簡易復号化手段により抽出されたヘッダ情報を追加画像の画像幅に応じて変更し、変更後のヘッダ情報とデータ変換手段により変換された第二の符号化方式の量子化テーブルと画像データ追加手段により量子化後の画像データが加えられた第二の符号化方式の量子化周波数成分から第二の符号化方式の符号化ストリームを作成する符号化ストリーム作成手段とを備えるように構成したので、演算処理量を大幅に削減することができるとともに、画質の劣化を大幅に抑制することができる効果がある。
また、簡易復号化手段により今回抽出された第一の符号化方式の量子化テーブルと、簡易復号化手段により前回抽出された第一の符号化方式の量子化テーブルとを比較し、さらに簡易復号化手段から今回出力された第一の符号化方式の量子化周波数成分と、簡易復号化手段から前回出力された第一の符号化方式の量子化周波数成分とを比較し、2つの比較結果に基づいてフレーム内符号化を実施するか否かを判定する符号化判定手段を設け、符号化ストリーム作成手段が、符号化判定手段からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施して第二の符号化方式の符号化ストリームを作成し、符号化判定手段からフレーム内符号化を実施しない旨を示す判定結果を受ければ、フレーム内符号化を実施せずに、前回作成した第二の符号化方式の符号化ストリームを出力するように構成したので、符号量を大幅に削減することができる効果がある。
According to this invention, a part of the encoded stream in which the image signal is encoded by the first encoding method is decoded, and the header information and the quantization table of the first encoding method are decoded from the encoded stream. And a simple decoding means for extracting the quantized frequency component, a quantization table for the first encoding method and a quantization frequency component extracted by the simple decoding means for the quantization table and the quantum for the second encoding method. Data conversion means for converting to a quantized frequency component, and image data of the additional image is quantized using the quantization table of the second encoding method converted by the data conversion means, and the image data after quantization is converted to data conversion means The image data adding means to be added to the quantized frequency component of the second encoding method converted by the above and the header information extracted by the simple decoding means are changed according to the image width of the additional image. Quantization frequency component of the second encoding method in which the header information after the change, the quantization table of the second encoding method converted by the data conversion means, and the image data after quantization by the image data adding means are added Since it is configured to include an encoded stream creating means for creating an encoded stream of the second encoding method from the above, it is possible to greatly reduce the amount of calculation processing and to greatly suppress deterioration in image quality There is an effect that can.
Further, the quantization table of the first encoding method extracted this time by the simple decoding means is compared with the quantization table of the first encoding method previously extracted by the simple decoding means, and further simplified decoding is performed. The quantization frequency component of the first encoding method output this time from the encoding means and the quantization frequency component of the first encoding method output last time from the simple decoding means are compared, and two comparison results are obtained. Provided with an encoding determination unit that determines whether or not to perform intra-frame encoding based on, and if the encoded stream creation unit receives a determination result indicating that intra-frame encoding is to be performed from the encoding determination unit, Intra-frame encoding is performed to create an encoded stream of the second encoding method, and if a determination result indicating that intra-frame encoding is not performed is received from the encoding determination means, intra-frame encoding is performed. Z , Since it is configured to output a coded stream of the second coding scheme previously created, there is an effect that can greatly reduce the amount of code.
実施の形態1.
図1はこの発明の実施の形態1による画像符号化方式変換装置を示す構成図であり、図において、JPEG簡易復号部1は画像信号がJPEG(第一の符号化方式)で符号化されているJPEGストリーム(符号化ストリーム)の一部を復号して、そのJPEGストリームからヘッダ情報とJPEG量子化テーブル(第一の符号化方式の量子化テーブル)及びJPEG量子化DCT(Discrete Cosine Transform)係数(第一の符号化方式の量子化周波数成分)を抽出する処理を実施する。なお、JPEG簡易復号部1は簡易復号化手段を構成している。
FIG. 1 is a block diagram showing an image coding method conversion apparatus according to
データ変換部2はJPEG簡易復号部1により抽出されたJPEG量子化テーブル及びJPEG量子化DCT係数をMPEG−2量子化テーブル・パラメータ(第二の符号化方式の量子化テーブル)及びMPEG−2量子化DCT係数(第二の符号化方式の量子化周波数成分)に変換する処理を実施する。なお、データ変換部2はデータ変換手段を構成している。
MPEG−2ストリーム作成部3はJPEG簡易復号部1により抽出されたヘッダ情報とデータ変換部2により変換されたMPEG−2量子化テーブル・パラメータ及びMPEG−2量子化DCT係数からMPEG−2ストリーム(第二の符号化方式の符号化ストリーム)を作成する処理を実施する。なお、MPEG−2ストリーム作成部3は符号化ストリーム作成手段を構成している。
The
The MPEG-2
次に動作について説明する。
最初に、JPEGとMPEG−2の符号化について簡単に説明する。
JPEGは、画像の画像信号(画素データ)をDCT変換し、DCT変換の画像信号であるDCT係数を量子化するものである。
JPEGでは、画像信号をDCT変換することにより、パワーを低周波領域に集中させることができ、DCT係数を量子化することにより、高周波成分を間引いて画像を圧縮することができる。
また、JPEGでは、DCT係数のランレングス符号化や可変長符号化などを実施することにより、更に圧縮率を高めている。
一方、MPEG−2では、JPEGと同様の圧縮を実施しているが、時間方向に圧縮している点でJPEGと相違しており、また、符号化フォーマットの点でJPEGと相違している。
この実施の形態1では、MPEG−2におけるフレーム間符号化を用いずに、全てフレーム内符号化を行うものとする。
以下、図1の画像符号化方式変換装置の処理内容を具体的に説明する。
Next, the operation will be described.
First, JPEG and MPEG-2 encoding will be briefly described.
JPEG performs DCT conversion of an image signal (pixel data) of an image, and quantizes DCT coefficients that are image signals of DCT conversion.
In JPEG, power can be concentrated in a low frequency region by DCT conversion of an image signal, and an image can be compressed by thinning out high frequency components by quantizing DCT coefficients.
In JPEG, the compression rate is further increased by performing run length coding, variable length coding, etc. of DCT coefficients.
On the other hand, MPEG-2 performs compression similar to JPEG, but is different from JPEG in that it is compressed in the time direction, and is different from JPEG in terms of encoding format.
In the first embodiment, all intra-frame encoding is performed without using inter-frame encoding in MPEG-2.
Hereinafter, the processing content of the image coding method conversion apparatus of FIG. 1 will be described in detail.
JPEG簡易復号部1は、画像信号がJPEGで符号化されているJPEGストリームを入力すると、そのJPEGストリームの一部を復号して、そのJPEGストリームからヘッダ情報とJPEG量子化テーブル及びJPEG量子化DCT係数を抽出する。
即ち、JPEG簡易復号部1は、JPEGストリームにおけるヘッダ情報やハフマン符号などを復号することにより、そのJPEGストリームからヘッダ情報を抽出して、そのヘッダ情報をMPEG−2ストリーム作成部3に出力し、そのJPEGストリームからJPEG量子化テーブルとJPEG量子化DCT係数を抽出して、そのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部2に出力する。
When a JPEG stream in which an image signal is encoded by JPEG is input, the JPEG
That is, the JPEG
データ変換部2は、JPEG簡易復号部1からJPEG量子化テーブルとJPEG量子化DCT係数を受けると、そのJPEG量子化テーブルをMPEG−2量子化テーブル・パラメータに変換し、そのJPEG量子化DCT係数をMPEG−2量子化DCT係数に変換する。
以下、データ変換部2における変換アルゴリズムを説明する。
When the
Hereinafter, a conversion algorithm in the
まず、JPEG符号化におけるJPEG量子化DCT係数は、下記の式(1)で逆量子化される。
ただし、JpegDequantDCTi,jはJPEG量子化DCT係数が逆量子化されたDCT係数、JpegQuantTablei,jはJPEG量子化テーブル、JpegQuantDCTi,jはJPEG量子化DCT係数である。
i,jは8×8の各成分を表している。
First, the JPEG quantized DCT coefficient in JPEG encoding is inversely quantized by the following equation (1).
However, JpegQuantDCT i, j is a DCT coefficient obtained by dequantizing the JPEG quantized DCT coefficient, JpegQuantTable i, j is a JPEG quantization table, and JpegQuantDCT i, j is a JPEG quantized DCT coefficient.
i and j represent 8 × 8 components.
一方、MPEG−2符号化におけるイントラMB(Macro Block)においては、MPEG−2量子化DCT係数が、i=j=0のDC(Direct Current)成分と、それ以外のAC(Alternating Current)成分で異なり、以下の式(2)で逆量子化される。
ただし、MpegDequantDCTi,jはMPEG−2量子化DCT係数が逆りょうしかされたDCT係数、MpegQuantTablei,jはMPEG−2量子化テーブル・パラメータ、MpegQuantDCTi,jはMPEG−2量子化DCT係数、DcMultはイントラDC成分用量子化パラメータ、QuantScaleは量子化スケールコードである。
On the other hand, in an intra MB (Macro Block) in MPEG-2 encoding, the MPEG-2 quantized DCT coefficient is composed of a DC (Direct Current) component with i = j = 0 and other AC (Alternating Current) components. Differently, the inverse quantization is performed by the following equation (2).
Where MpegQuantDCT i, j is the DCT coefficient obtained by reversing the MPEG-2 quantized DCT coefficient, MpegQuantTable i, j is the MPEG-2 quantization table parameter, MpegQuantDCT i, j is the MPEG-2 quantized DCT coefficient, DcMult is an intra DC component quantization parameter, and QuantScale is a quantization scale code.
上記の式(1)と式(2)におけるJPEGとMPEG−2の逆量子化計算式から、イントラMBでは、下記に示すように、MPEG−2での符号化を行えばよい。
式(3)〜(5)から分る通り、逆量子化及び量子化の処理を直流成分だけ行えばよく、演算量が削減されていることが理解される。
From the JPEG and MPEG-2 inverse quantization calculation formulas in the above equations (1) and (2), the intra MB may be encoded in MPEG-2 as shown below.
As can be seen from the equations (3) to (5), it is understood that the inverse quantization and the quantization process need only be performed on the DC component, and the amount of calculation is reduced.
MPEG−2ストリーム作成部3は、JPEG簡易復号部1がヘッダ情報を抽出し、データ変換部2がMPEG−2量子化テーブル・パラメータとMPEG−2量子化DCT係数を出力すると、そのヘッダ情報とMPEG−2量子化テーブル・パラメータとMPEG−2量子化DCT係数からMPEG−2ストリームを作成する。
特に、MpegQuantTablei,jをMPEG−2のpictureヘッダ部に多重して符号化し、DcMultをMPEG−2のVLC(Variable Length Coding)を行う際に符号化するとよい。
When the JPEG
In particular, MpegQuantTable i, j may be encoded by being multiplexed on the MPEG-2 picture header portion, and DcMulti may be encoded when MPEG-2 VLC (Variable Length Coding) is performed.
以上で明らかなように、この実施の形態1によれば、画像信号がJPEGで符号化されているJPEGストリームの一部を復号して、そのJPEGストリームからヘッダ情報とJPEG量子化テーブル及びJPEG量子化DCT係数を抽出するJPEG簡易復号部1と、JPEG簡易復号部1により抽出されたJPEG量子化テーブル及びJPEG量子化DCT係数をMPEG−2量子化テーブル・パラメータ及びMPEG−2量子化DCT係数に変換するデータ変換部2とを設け、JPEG簡易復号部1により抽出されたヘッダ情報とデータ変換部2により変換されたMPEG−2量子化テーブル・パラメータ及びMPEG−2量子化DCT係数からMPEG−2ストリームを作成するように構成したので、演算処理量を大幅に削減することができるとともに、画質の劣化を大幅に抑制することができる効果を奏する。
即ち、この実施の形態1によれば、画像符号化方式をJPEGからMPEG−2に変換する際、変換に伴う逆量子化処理と量子化処理が1つのDCTのブロックにつき1度で済むため、演算量を大幅に削減することができるとともに、再量子化処理による画質劣化を抑えることができる。
As is apparent from the above, according to the first embodiment, a part of a JPEG stream in which an image signal is encoded by JPEG is decoded, and header information, a JPEG quantization table, and a JPEG quantum are decoded from the JPEG stream. JPEG
That is, according to the first embodiment, when the image encoding method is converted from JPEG to MPEG-2, the inverse quantization process and the quantization process associated with the conversion need only be performed once for one DCT block. The amount of computation can be greatly reduced, and image quality deterioration due to requantization processing can be suppressed.
なお、この実施の形態1では、画像符号化方式をJPEGからMPEG−2に変換するものについて示したが、同様の変換方法を用いて、MPEG−2のI−pictureからJPEGに変換することもできる。また、量子化及びDCTを用いている他の符号化方式間の変換にも適用することが可能である。 In the first embodiment, the image encoding method is converted from JPEG to MPEG-2. However, a similar conversion method may be used to convert from MPEG-2 I-picture to JPEG. it can. It can also be applied to conversion between other coding schemes using quantization and DCT.
実施の形態2.
図2はこの発明の実施の形態2による画像符号化方式変換装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
画像データ追加部4はデータ変換部2により変換されたMPEG−2量子化テーブル・パラメータを用いて追加画像の画像データ(ここでは、追加画像の画像データは、既にDCT係数に変換されているものとする)を量子化し、量子化後の画像データをデータ変換部2により変換されたMPEG−2量子化DCT係数に加えて、追加MPEG−2量子化DCT係数(MPEG−2量子化DCT係数+量子化後の画像データ)をMPEG−2ストリーム作成部5に出力するとともに、追加画像の画像幅を示すヘッダ変更情報をMPEG−2ストリーム作成部5に出力する。なお、画像データ追加部4は画像データ追加手段を構成している。
MPEG−2ストリーム作成部5は簡易復号化部1により抽出されたヘッダ情報を画像データ追加部4から出力されたヘッダ変更情報にしたがって変更し、変更後のヘッダ情報とデータ変換部2により変換されたMPEG−2量子化テーブル・パラメータと画像データ追加部4から出力された追加MPEG−2量子化DCT係数からMPEG−2ストリームを作成する処理を実施する。なお、MPEG−2ストリーム作成部5は符号化ストリーム作成手段を構成している。
FIG. 2 is a block diagram showing an image coding method conversion apparatus according to
The image
The MPEG-2
この実施の形態2では、追加画像の画像データを用いて、変換後のMPEG−2の画像の幅を拡大する方法について示している。
MPEG−2は、例えば、DVD(Digital Versatile Disk)−VIDEO方式における映像符号化方式で用いられている。
このDVD−VIDEO方式では、MPEG−2と比べて、さらに解像度の制限が設けられている。例えば、幅704画素×高さ480ラインなどに制限されている。
しかし、一般的なJPEGでは、幅と高さの比が4:3である。例えば、幅640画素×高さ480ラインなどで記録される。
この実施の形態2を用いることで、高速に画像の幅を拡大することが可能になる。
In the second embodiment, a method for enlarging the width of a converted MPEG-2 image using image data of an additional image is shown.
MPEG-2 is used, for example, in a video encoding system in a DVD (Digital Versatile Disk) -VIDEO system.
In this DVD-VIDEO system, resolution is further limited as compared with MPEG-2. For example, the width is limited to 704 pixels ×
However, in general JPEG, the ratio of width to height is 4: 3. For example, it is recorded with a width of 640 pixels × a height of 480 lines.
By using the second embodiment, the width of the image can be enlarged at high speed.
以下、図2の画像符号化方式変換装置の処理内容を具体的に説明する。
JPEG簡易復号部1は、画像信号がJPEGで符号化されているJPEGストリームを入力すると、上記実施の形態1と同様に、そのJPEGストリームの一部を復号して、そのJPEGストリームからヘッダ情報とJPEG量子化テーブル及びJPEG量子化DCT係数を抽出する。
Hereinafter, the processing content of the image coding method conversion apparatus of FIG. 2 will be described in detail.
When a JPEG stream in which an image signal is encoded with JPEG is input, the JPEG
データ変換部2は、JPEG簡易復号部1からJPEG量子化テーブルとJPEG量子化DCT係数を受けると、上記実施の形態1と同様に、そのJPEG量子化テーブルをMPEG−2量子化テーブル・パラメータに変換し、そのJPEG量子化DCT係数をMPEG−2量子化DCT係数に変換する。
When the
画像データ追加部4は、データ変換部2からMPEG−2量子化テーブル・パラメータを受けると、そのMPEG−2量子化テーブル・パラメータを用いて追加画像の画像データを量子化する。
また、画像データ追加部4は、量子化後の画像データをデータ変換部2により変換されたMPEG−2量子化DCT係数に加えて、追加MPEG−2量子化DCT係数(MPEG−2量子化DCT係数+量子化後の画像データ)をMPEG−2ストリーム作成部5に出力するとともに、追加画像の画像幅を示すヘッダ変更情報をMPEG−2ストリーム作成部5に出力する。
Upon receiving the MPEG-2 quantization table parameter from the
Further, the image
以下、追加MPEG−2量子化DCT係数の作成方法を説明する。
例えば、64画素×480ラインの追加画像を640画素×480ラインの画像に追加して、704画素×480ラインの画像を作成する場合には、図3に示すように、640画素×480ラインの画像の右端に64画素×480ラインの追加画像を追加する形態の他、図4に示すように、640画素×480ラインの画像の左端に64画素×480ラインの追加画像を追加する形態や、図5に示すように、640画素×480ラインの画像の右端に32画素×480ラインの追加画像を追加して、640画素×480ラインの画像の左端に32画素×480ラインの追加画像を追加する形態などが考えられる。
いずれの形態でも、追加する画像の領域は8の倍数であることから、ブロック単位で考えることができる。
Hereinafter, a method of creating an additional MPEG-2 quantized DCT coefficient will be described.
For example, when an additional image of 64 pixels × 480 lines is added to an image of 640 pixels × 480 lines to create an image of 704 pixels × 480 lines, as shown in FIG. 3, 640 pixels × 480 lines In addition to the form of adding an additional image of 64 pixels × 480 lines to the right end of the image, as shown in FIG. 4, the form of adding an additional image of 64 pixels × 480 lines to the left end of the image of 640 pixels × 480 lines, As shown in Fig. 5, an additional image of 32 pixels x 480 lines is added to the right end of an image of 640 pixels x 480 lines, and an additional image of 32 pixels x 480 lines is added to the left end of an image of 640 pixels x 480 lines The form to do is conceivable.
In any form, since the area of the image to be added is a multiple of 8, it can be considered in units of blocks.
追加画像としては、例えば、単一色で塗りつぶされている画像、何らかの模様や文字が施されている画像など、いかなる画像の画像データであってもよく、ユーザにより入力された画像の画像データであってもよい。
ここでは、追加画像の画像データは、既にDCT係数に変換されているものとしているが、画像データ追加部4が追加画像の画像データをDCT係数に変換するようにしてもよい。
したがって、予め決められた画像の画像データを用いるか、変換開始前にユーザにより入力された画像の画像データを用いるものとする。
The additional image may be image data of any image, such as an image painted with a single color or an image with some pattern or character, and may be image data of an image input by the user. May be.
Here, it is assumed that the image data of the additional image has already been converted into the DCT coefficient, but the image
Therefore, it is assumed that image data of a predetermined image is used, or image data of an image input by a user before the start of conversion is used.
画像データ追加部4は、下記の式(6)に示すように、データ変換部2から出力されたMPEG−2量子化テーブル・パラメータを用いて、追加画像の画像データを量子化する。
画像データ追加部4は、上述したように、量子化後の追加画像の画像データをデータ変換部2により変換されたMPEG−2量子化DCT係数に加えて、追加MPEG−2量子化DCT係数(MPEG−2量子化DCT係数+量子化後の画像データ)をMPEG−2ストリーム作成部5に出力するとともに、追加画像の画像幅を示すヘッダ変更情報をMPEG−2ストリーム作成部5に出力する。
なお、予め決められた追加画像の画像データをDCT変換して保持しておけば、量子化処理のみを行えばよく、高速に画像を追加することができる。
As described above, the image
If image data of a predetermined additional image is DCT-converted and held, only the quantization process needs to be performed, and an image can be added at high speed.
MPEG−2ストリーム作成部5は、JPEG簡易復号部1からヘッダ情報を受け、データ変換部2からMPEG−2量子化テーブル・パラメータと追加MPEG−2量子化DCT係数とヘッダ変更情報を受けると、そのヘッダ情報に含まれている画像幅に関する情報をヘッダ変更情報にしたがって変更し、変更後のヘッダ情報とMPEG−2量子化テーブル・パラメータと追加MPEG−2量子化DCT係数からMPEG−2ストリームを作成する。
When the MPEG-2
以上で明らかなように、この実施の形態2によれば、データ変換部2により変換されたMPEG−2量子化テーブル・パラメータを用いて追加画像の画像データを量子化し、量子化後の画像データをデータ変換部2により変換されたMPEG−2量子化DCT係数に加えて、追加MPEG−2量子化DCT係数(MPEG−2量子化DCT係数+量子化後の画像データ)をMPEG−2ストリーム作成部5に出力するとともに、追加画像の画像幅を示すヘッダ変更情報をMPEG−2ストリーム作成部5に出力するように構成したので、上記実施の形態1と同様の効果を奏する他に、高速に画像サイズを変更することができる効果を奏する。これにより、DVD−VIDEOを作成する場合などの自由度を高めることができる。
As apparent from the above, according to the second embodiment, the image data of the additional image is quantized using the MPEG-2 quantization table parameter converted by the
実施の形態3.
図6はこの発明の実施の形態3による画像符号化方式変換装置を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
追加ブロック画像データベース6は予め時刻情報に対応する追加画像の画像データ(追加画像の画像データは、MPEG−2のMB(マクロブロック)単位の画像データであって、DCT係数に変換されている)を記憶しているメモリである。
追加画像作成部7は時刻情報を入力すると、追加ブロック画像データベース6を参照して、その時刻情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力する。
なお、追加ブロック画像データベース6及び追加画像作成部7から追加画像作成手段が構成されている。
6 is a block diagram showing an image coding system conversion apparatus according to
The additional block image database 6 stores image data of an additional image corresponding to time information in advance (the image data of the additional image is image data in units of MPEG-2 MB (macroblock) and converted into DCT coefficients). Is a memory storing
When the time information is input, the additional
The additional block image database 6 and the additional
次に動作について説明する。
追加画像作成部7は、時刻情報を入力すると、追加ブロック画像データベース6を参照して、その時刻情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力する。
この時間情報は、どこから得てもよく、例えば、クロックから現在時刻を入力するようにしてもよい。また、最初に変換されるJPEG画像を0として、JPEGの入力に合わせてインクリメントしてもよい。あるいは、電子的に記録されている入力JPEGの作成日時を入力するようにしてもよい。
Next, the operation will be described.
When the time information is input, the additional
This time information may be obtained from anywhere, for example, the current time may be input from a clock. Alternatively, the first JPEG image to be converted may be set to 0 and incremented according to JPEG input. Alternatively, the creation date and time of the input JPEG recorded electronically may be input.
例えば、2006年4月1日22時00分14秒の時間情報が得られた場合、追加ブロック画像データベース6からこの時間情報の表示に必要な追加画像の画像データとして、MPEG−2のMB単位で描かれている「2」「0」「6」「4」「1」「年」「月」「日」「時」「分」の画像データのDCT係数を取得する。
ここで、図7(a)は「1」の文字を16画素×32ライン(縦方向の2つのMBで描いている例)で表しており、図7(b)は「1」の文字を複数のMBからなるブロック単位で表している説明図である。
追加ブロック画像データベース6がDCT係数に変換されているMB単位の画像データを記憶しているので、追加画像作成部7が追加画像の画像データをDCT変換することなく、追加画像の画像データを画像データ追加部4に出力することができる。
For example, when time information of 21:00:14 on April 1, 2006 is obtained, the image data of an additional image necessary for displaying this time information from the additional block image database 6 is in MB units of MPEG-2 The DCT coefficients of the image data “2”, “0”, “6”, “4”, “1”, “year”, “month”, “day”, “hour”, and “minute” depicted in FIG.
Here, FIG. 7A shows the character “1” by 16 pixels × 32 lines (example drawn in two vertical MBs), and FIG. 7B shows the character “1”. It is explanatory drawing represented by the block unit which consists of several MB.
Since the additional block image database 6 stores MB-unit image data that has been converted into DCT coefficients, the additional
画像データ追加部4は、追加画像作成部7から追加画像の画像データを受けると、上記実施の形態2と同様に、データ変換部2により変換されたMPEG−2量子化テーブル・パラメータを用いて追加画像の画像データを量子化し、量子化後の画像データをデータ変換部2により変換されたMPEG−2量子化DCT係数に加えて、追加MPEG−2量子化DCT係数(MPEG−2量子化DCT係数+量子化後の画像データ)をMPEG−2ストリーム作成部5に出力するとともに、追加画像の画像幅を示すヘッダ変更情報をMPEG−2ストリーム作成部5に出力する。
When receiving the image data of the additional image from the additional
この実施の形態3では、図7(a)に示すように、縦方向の2つのMBで文字が描いている例を示したが、3つ以上のMBで文字が描いていてもよい。また、図7(b)に示すように、MB単位ではなく、ブロック単位で文字が描いていてもよい。
また、数字以外の文字や模様など、文字以外が描かれていてもよい。
ここで、図8は時間情報が表示されている追加画像の一例を示す説明図であり、図9は右端に時間情報が追加された画像の一例を示す説明図である。
In the third embodiment, as shown in FIG. 7A, an example is shown in which characters are drawn with two MBs in the vertical direction, but characters may be drawn with three or more MBs. Further, as shown in FIG. 7B, characters may be drawn not in units of MB but in units of blocks.
Moreover, characters other than numbers, such as characters and patterns, may be drawn.
Here, FIG. 8 is an explanatory diagram illustrating an example of an additional image in which time information is displayed, and FIG. 9 is an explanatory diagram illustrating an example of an image in which time information is added to the right end.
以上で明らかなように、この実施の形態3によれば、追加ブロック画像データベース6を参照して、時刻情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力するように構成したので、時刻情報に対応する画像を追加することができる効果を奏する。
これにより、DVD−VIDEOを作成する場合などの自由度を高めることができる他、作成したDVD−VIDEOを視聴しながら、ユーザが時間情報を確認したり、周期的に置き換わる模様などを楽しんだりすることができる。
As is apparent from the above, according to the third embodiment, the additional block image database 6 is referred to acquire the image data of the additional image corresponding to the time information, and the image data of the additional image is added to the image data. Since it was comprised so that it might output to the
As a result, the degree of freedom in creating a DVD-VIDEO can be increased, and the user can check time information or enjoy a pattern that is periodically replaced while viewing the created DVD-VIDEO. be able to.
実施の形態4.
図10はこの発明の実施の形態4による画像符号化方式変換装置を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
追加ブロック画像データベース8は予めヘッダ情報(ヘッダ情報に含まれている情報であって、例えば、撮影に使用されたカメラの型番、メーカー名、時間情報などの情報)に対応する追加画像の画像データ(追加画像の画像データは、MPEG−2のMB単位の画像データであって、DCT係数に変換されている)を記憶しているメモリである。
追加画像作成部9は追加ブロック画像データベース8を参照して、簡易復号化部1により抽出されたヘッダ情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力する。
なお、追加ブロック画像データベース8及び追加画像作成部9から追加画像作成手段が構成されている。
10 is a block diagram showing an image coding system conversion apparatus according to
The additional
The additional
The additional
上記実施の形態3では、追加画像作成部7が追加ブロック画像データベース6を参照して、時刻情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力するものについて示したが、追加画像作成部9がヘッダ情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力するようにしてもよい。
In the third embodiment, the additional
即ち、簡易復号化部1により抽出されるヘッダ情報には、例えば、撮影に使用されたカメラの型番、メーカー名、時間情報など、様々な情報が含まれているので、予めヘッダ情報に対応する追加画像の画像データを追加ブロック画像データベース8に記録する。
追加画像作成部9は、簡易復号化部1からヘッダ情報を受けると、追加ブロック画像データベース8を参照して、そのヘッダ情報に対応する追加画像の画像データを取得し、その追加画像の画像データを画像データ追加部4に出力する。
これにより、DVD−VIDEOを作成する場合などの自由度を高めることができる他、作成したDVD−VIDEOを視聴しながら、ユーザがヘッダ情報を確認したり、周期的に置き換わる模様などを楽しんだりすることができる効果を奏する。
That is, since the header information extracted by the
Upon receiving the header information from the
As a result, the degree of freedom in creating a DVD-VIDEO can be increased, and the user can check the header information or enjoy a pattern that is periodically replaced while viewing the created DVD-VIDEO. There is an effect that can be.
上記実施の形態3,4では、画像データ追加部4が追加画像を追加領域に追加するものについて示したが(図9を参照)、図18に示すように、画像データ追加部4が追加画像をJPEG画像変換領域に追加するようにしてもよい。
図18では、JPEG画像変換領域の一部を黒で塗りつぶして、白抜きの時間情報を追加している例を示している。
なお、追加画像をJPEG画像変換領域に追加する際、例えば、色差成分については特に処理せずに、輝度成分のみの追加画像を追加するのであれば、処理の高速化を図ることができる。
輝度成分のみの追加画像をJPEG画像変換領域に追加すると、JPEG画像の色差成分が残り、JPEG画像が透けて見えるような画像になる。
In the third and fourth embodiments, the image
FIG. 18 shows an example in which a part of the JPEG image conversion area is painted black and white time information is added.
Note that when adding an additional image to the JPEG image conversion area, for example, if the additional image of only the luminance component is added without particularly processing the color difference component, the processing speed can be increased.
When an additional image having only a luminance component is added to the JPEG image conversion area, the color difference component of the JPEG image remains, and the JPEG image can be seen through.
実施の形態5.
図11はこの発明の実施の形態5による画像符号化方式変換装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
DCT係数削減部10は簡易復号化部1により抽出されたJPEG量子化DCT係数のうち、高次のJPEG量子化DCT係数を“0”にして、高次のJPEG量子化DCT係数を削除する処理を実施する。なお、DCT係数削減部10は高周波成分削除手段を構成している。
図11では、図1の画像符号化方式変換装置にDCT係数削減部10を適用している例を示しているが、図2、図6及び図10の画像符号化方式変換装置にDCT係数削減部10を適用してもよい。
FIG. 11 is a block diagram showing an image coding system conversion apparatus according to
The DCT
FIG. 11 shows an example in which the DCT
次に動作について説明する。
一般に、画像においては、高周波成分を削減しても劣化が目立たない場合が多いので、この実施の形態5では、高次のJPEG量子化DCT係数を“0”にして、高次のJPEG量子化DCT係数を削除することにより、符号量を削減して圧縮率を高めるようにしている。
Next, the operation will be described.
In general, in an image, even if high frequency components are reduced, deterioration is often not conspicuous. Therefore, in the fifth embodiment, a high-order JPEG quantization DCT coefficient is set to “0” and high-order JPEG quantization is performed. By deleting the DCT coefficient, the code amount is reduced and the compression rate is increased.
即ち、DCT係数削減部10は、簡易復号化部1がJPEG量子化DCT係数を抽出すると、そのJPEG量子化DCT係数のうち、高次のJPEG量子化DCT係数を“0”にして、高次のJPEG量子化DCT係数を削除する。
具体的には、“0”でないJPEG量子化DCT係数の個数を低次のJPEG量子化DCT係数から順番に計数し、“0”でないJPEG量子化DCT係数の個数が予め指定された個数を超えた段階で、それ以降の高次のJPEG量子化DCT係数を“0”にする方法が考えられる。
また、予め指定された次数より高次のJPEG量子化DCT係数を“0”にする方法や、予め指定された個数以上連続して“0”のJPEG量子化DCT係数が続いた場合に、それ以降の高次のJPEG量子化DCT係数を“0”にする方法が考えられる。
なお、2次元のJPEG量子化DCT係数を低次から順番に調べる方法として、JPEG符号化に用いられるランレングス符号化のデータをそのまま用いる方法を使用することができる。
DCT係数削減部10は、削除処理後のJPEG量子化DCT係数(高次のJPEG量子化DCT係数が削除されているJPEG量子化DCT係数)をデータ変換部2に出力する。
That is, when the
Specifically, the number of JPEG quantized DCT coefficients that are not “0” is counted in order from the lower-order JPEG quantized DCT coefficients, and the number of JPEG quantized DCT coefficients that are not “0” exceeds the number specified in advance. At this stage, it is conceivable to set the subsequent higher-order JPEG quantized DCT coefficients to “0”.
In addition, when a JPEG quantized DCT coefficient having a higher order than a predesignated order is set to “0”, or when a JPEG quantized DCT coefficient of “0” continues for a predetermined number or more, A method of setting subsequent high-order JPEG quantized DCT coefficients to “0” is conceivable.
As a method for examining the two-dimensional JPEG quantized DCT coefficients in order from the lowest order, a method using the run-length encoded data used for JPEG encoding as it is can be used.
The DCT
以上で明らかなように、この実施の形態5によれば、簡易復号化部1により抽出されたJPEG量子化DCT係数のうち、高次のJPEG量子化DCT係数を“0”にして、高次のJPEG量子化DCT係数を削除するように構成したので、符号量を削減して圧縮率を高めることができる効果を奏する。
As is apparent from the above, according to the fifth embodiment, among the JPEG quantized DCT coefficients extracted by the
実施の形態6.
図12はこの発明の実施の形態6による画像符号化方式変換装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
スキップ判定部11は簡易復号化部1により今回抽出されたJPEG量子化テーブルと参照データバッファ12に格納されているJPEG量子化テーブル(簡易復号化部1により前回抽出されたJPEG量子化テーブル)を比較するとともに、簡易復号化部1により今回抽出されたJPEG量子化DCT係数と参照データバッファ12に格納されているJPEG量子化DCT係数(簡易復号化部1により前回抽出されたJPEG量子化DCT係数)を比較し、それらの比較結果に基づいてフレーム内符号化を実施するか否かを判定する処理を実施する。ただし、スキップ判定部11はMPEG−2ストリーム作成部13からフレーム内符号化を実施する必要がある旨を示すフレーム内符号化判定用フラグを受けると、JPEG量子化テーブルやJPEG量子化DCT係数の比較処理を実施せずに、フレーム内符号化を実施する旨を示す判定結果を出力する。
参照データバッファ12はスキップ判定部11における次回の比較処理のために、簡易復号化部1により今回抽出されたJPEG量子化テーブルとJPEG量子化DCT係数を保持するメモリである。
なお、スキップ判定部11及び参照データバッファ12から符号化判定手段が構成されている。
Embodiment 6 FIG.
FIG. 12 is a block diagram showing an image coding method conversion apparatus according to Embodiment 6 of the present invention. In the figure, the same reference numerals as those in FIG.
The
The reference data buffer 12 is a memory that holds the JPEG quantization table and the JPEG quantized DCT coefficient extracted this time by the
The
MPEG−2ストリーム作成部13は符号化対象のフレームやMBがMPEG−2におけるGOPの先頭やスライスの先頭に当る場合、フレーム内符号化判定用フラグを“1”に設定し、それ以外の場合、フレーム内符号化判定用フラグを“0”に設定する一方、スキップ判定部11からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施してMPEG−2ストリームを作成し、スキップ判定部11からフレーム内符号化を実施しない旨を示す判定結果を受ければ、フレーム内符号化を実施せずに、前回作成したMPEG−2ストリームを出力する処理を実施する。なお、MPEG−2ストリーム作成部13は符号化ストリーム作成手段を構成している。
The MPEG-2
図12では、図1の画像符号化方式変換装置にスキップ判定部11及びMPEG−2ストリーム作成部13等を適用している例を示しているが、図2、図6、図10及び図11の画像符号化方式変換装置にスキップ判定部11及びMPEG−2ストリーム作成部13等を適用してもよい。
図13はこの発明の実施の形態6による画像符号化方式変換装置のスキップ判定部11の処理内容を示すフローチャートである。
FIG. 12 shows an example in which the
FIG. 13 is a flowchart showing the processing contents of the
次に動作について説明する。
JPEG簡易復号部1は、画像信号がJPEGで符号化されているJPEGストリームを入力すると、上記実施の形態1と同様に、そのJPEGストリームの一部を復号して、そのJPEGストリームからヘッダ情報とJPEG量子化テーブル及びJPEG量子化DCT係数を抽出する。
Next, the operation will be described.
When a JPEG stream in which an image signal is encoded with JPEG is input, the JPEG
MPEG−2ストリーム作成部13は、JPEG簡易復号部1がJPEGストリームからヘッダ情報を抽出すると、符号化対象のフレームやMBがMPEG−2におけるGOPの先頭やスライスの先頭に当る場合、“1”のフレーム内符号化判定用フラグをスキップ判定部11に出力し、符号化対象のフレームやMBがMPEG−2におけるGOPの先頭やスライスの先頭に当らない場合、“0”のフレーム内符号化判定用フラグをスキップ判定部11に出力する。
一般に、時間方向の圧縮を行う動画像符号化方式においては、誤差の伝播を防ぐため、強制的にフレーム内符号化を行うように定められている。MPEG−2においては、GOPの先頭やスライスの先頭がこれに当る。
When the JPEG
In general, in a moving picture coding system that performs compression in the time direction, it is determined to forcibly perform intra-frame coding in order to prevent error propagation. In MPEG-2, this is the head of a GOP or the head of a slice.
スキップ判定部11は、簡易復号化部1が現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を抽出すると、簡易復号化部1から現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を入力し(ステップST1)、MPEG−2ストリーム作成部13からフレーム内符号化判定用フラグを入力する(ステップST2)。
スキップ判定部11は、MPEG−2ストリーム作成部13から入力したフレーム内符号化判定用フラグが“1”であれば(ステップST3)、フレーム内符号化を実施する必要があると判断し、フレーム内符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部13に出力して、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部2に出力する(ステップST4)。
なお、スキップ判定部11は、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(1つ前のフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST9)。
When the
If the intra-frame encoding determination flag input from the MPEG-2
The
一方、MPEG−2ストリーム作成部13から入力したフレーム内符号化判定用フラグが“0”であれば(ステップST3)、参照データバッファ12に格納されている参照データ(1つ前のフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を入力する(ステップST5)。
そして、スキップ判定部11は、現在のフレームのJPEG量子化テーブルと、1つ前のフレームのJPEG量子化テーブルとを比較するとともに、現在のフレームのJPEG量子化DCT係数と1つ前のフレームのJPEG量子化DCT係数とを比較する(ステップST6)。
On the other hand, if the intra-frame coding determination flag input from the MPEG-2
The
以下、スキップ判定部11における比較処理を具体的に説明する。
スキップ判定部11は、現在のフレームのJPEG量子化DCT係数と1つ前のフレームのJPEG量子化DCT係数とを比較する場合、例えば、下記の式(7)に示すように、現在のフレームのJPEG量子化DCT係数を現在のフレームのJPEG量子化テーブルで除算するとともに、1つ前のフレームのJPEG量子化DCT係数を1つ前のフレームのJPEG量子化テーブルで除算し、双方の除算結果の差分の和が閾値より小さいか否かを判別する。
Hereinafter, the comparison process in the
When the
スキップ判定部11は、上記の式(7)が成立せず、式(7)の左辺が閾値Thskip1以上であれば(ステップST7)、現在のフレームのJPEG量子化DCT係数と1つ前のフレームのJPEG量子化DCT係数との差分が大きく、フレーム内符号化を実施する必要があると判断し、フレーム内符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部13に出力して、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部2に出力する(ステップST4)。
なお、スキップ判定部11は、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(1つ前のフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST9)。
If the above equation (7) is not satisfied and the left side of the equation (7) is equal to or greater than the threshold Th skip1 (step ST7), the
The
また、スキップ判定部11は、現在のフレームのJPEG量子化テーブルと、1つ前のフレームのJPEG量子化テーブルとを比較し、双方のJPEG量子化テーブルが同一でなく、異なっている場合には差分が大きいと判断し(ステップST7)、フレーム内符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部13に出力して、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部2に出力する(ステップST4)。
なお、スキップ判定部11は、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(1つ前のフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST9)。
In addition, the
The
スキップ判定部11は、現在のフレームのJPEG量子化テーブルと、1つ前のフレームのJPEG量子化テーブルが同一である場合、例えば、下記の式(8)に示すように、現在のフレームのJPEG量子化テーブルと、1つ前のフレームのJPEG量子化テーブルとの差分の和が閾値より小さいか否かを判別する。
スキップ判定部11は、上記の式(8)が成立せず、式(8)の左辺が閾値Thskip2以上であれば(ステップST7)、現在のフレームのJPEG量子化DCT係数と1つ前のフレームのJPEG量子化DCT係数との差分が大きく、フレーム内符号化を実施する必要があると判断し、フレーム内符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部13に出力して、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部2に出力する(ステップST4)。
なお、スキップ判定部11は、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(1つ前のフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST9)。
If the above equation (8) does not hold and the left side of equation (8) is greater than or equal to the threshold Th skip2 (step ST7), the
The
スキップ判定部11は、上記の式(7)が成立し、かつ、式(8)が成立する場合、フレーム内符号化を実施する必要がないと判断し、フレーム内符号化を実施しない旨を示す判定結果をMPEG−2ストリーム作成部13に出力する(ステップST8)。この場合、データ変換部2では、符号化方式の変換を行う必要がないので、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部2には出力しない。
なお、スキップ判定部11は、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(1つ前のフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST9)。
The
The
データ変換部2は、スキップ判定部11から現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を受けると、上記実施の形態1と同様にして、そのJPEG量子化テーブルをMPEG−2量子化テーブル・パラメータに変換し、そのJPEG量子化DCT係数をMPEG−2量子化DCT係数に変換する。
ただし、この実施の形態6では、非イントラMBを扱う場合もあり、非イントラMBの場合には、上記の式(2)の代わりに下記の式(9)を使用し、式(4)の代わりに下記の式(10)を使用して変換を行う。
However, in the sixth embodiment, a non-intra MB may be handled. In the case of a non-intra MB, the following formula (9) is used instead of the above formula (2), and the formula (4) Instead, the conversion is performed using the following equation (10).
MPEG−2ストリーム作成部13は、スキップ判定部11からフレーム内符号化を実施する旨を示す判定結果を受けると、上記実施の形態1と同様に、フレーム内符号化を実施して、JPEG簡易復号部1から出力されたヘッダ情報と、データ変換部2から出力されたMPEG−2量子化テーブル・パラメータ及びMPEG−2量子化DCT係数とからMPEG−2ストリームを作成する。
一方、スキップ判定部11からフレーム内符号化を実施しない旨を示す判定結果を受けると、フレーム内符号化を実施せずに、前回作成したMPEG−2ストリームを出力する。
When the MPEG-2
On the other hand, when receiving a determination result indicating that the intra-frame encoding is not performed from the
以上で明らかなように、この実施の形態6によれば、スキップ判定部11がフレーム内符号化を実施するか否かを判定し、MPEG−2ストリーム作成部13がスキップ判定部11からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施してMPEG−2ストリームを作成し、スキップ判定部11からフレーム内符号化を実施しない旨を示す判定結果を受ければ、フレーム内符号化を実施せずに、前回作成したMPEG−2ストリームを出力するように構成したので、符号量を大幅に削減することができる効果を奏する。また、スキップMB判定をDCT係数領域で行うことで、演算量を低く保つことが可能である。
As is apparent from the above, according to the sixth embodiment, the
なお、この実施の形態6では、JPEGからMPEG−2に変換するものについて示したが、同様の方法で、MPEG−2のI−pictureからJPEGに変換することも可能である。また、量子化もしくはDCTを用いた他の符号化方式間の変換にも適用可能である。
また、この実施の形態6では、変換後の形式がMPEG−2であるため、スキップの判定を行う単位をMBとしているが、変換する形式によって判定の単位を変えてもよい。
また、上記実施の形態2〜4における画像の追加と組み合わせてもよく、追加する領域の一部が常に同じ画像である場合、該当するブロックを常にスキップと判定するようにしてもよい。
In the sixth embodiment, the conversion from JPEG to MPEG-2 is shown. However, it is also possible to convert from MPEG-2 I-picture to JPEG by the same method. Also, the present invention can be applied to conversion between other encoding methods using quantization or DCT.
In the sixth embodiment, since the converted format is MPEG-2, the unit for determining the skip is MB, but the determination unit may be changed depending on the format to be converted.
Further, it may be combined with the addition of the image in the second to fourth embodiments, and when a part of the area to be added is always the same image, it may be determined that the corresponding block is always skipped.
実施の形態7.
図14はこの発明の実施の形態7による画像符号化方式変換装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
MBタイプ判定部14は簡易復号化部1により抽出された現在のフレームのJPEG量子化テーブルと参照データバッファ15に格納されている最後に符号化の対象にされたフレームのJPEG量子化テーブルを比較するとともに、簡易復号化部1により抽出された現在のフレームのJPEG量子化DCT係数と参照データバッファ15に格納されている最後に符号化の対象にされたフレームのJPEG量子化DCT係数を比較し、それらの比較結果に基づいてフレーム内符号化を実施するか、フレーム間符号化を実施するか、符号化をスキップするかを判定する処理を実施する。ただし、MBタイプ判定部14はMPEG−2ストリーム作成部17からフレーム内符号化を実施する必要がある旨を示すフレーム内符号化判定用フラグを受けると、JPEG量子化テーブルやJPEG量子化DCT係数の比較処理を実施せずに、フレーム内符号化を実施する旨を示す判定結果を出力する。
参照データバッファ15はMBタイプ判定部14における次回の比較処理のために、MBタイプ判定部14により最後に符号化の対象にされたフレーム(フレーム内符号化又はフレーム間符号化の実施対象にされたフレーム)のJPEG量子化テーブルとJPEG量子化DCT係数を保持するメモリである。
なお、MBタイプ判定部14及び参照データバッファ15から符号化判定手段が構成されている。
FIG. 14 is a block diagram showing an image coding method conversion apparatus according to
The MB
The reference data buffer 15 is used for the next comparison process in the MB
The MB
データ変換部16はMBタイプ判定部14の判定結果に応じてJPEG量子化DCT係数又は差分JPEG量子化DCT係数をMPEG−2量子化DCT係数に変換するとともに、JPEG量子化テーブルをMPEG−2量子化テーブル・パラメータに変換する処理を実施する。なお、データ変換部16はデータ変換手段を構成している。
MPEG−2ストリーム作成部17は符号化対象のフレームやMBがMPEG−2におけるGOPの先頭やスライスの先頭に当る場合、フレーム内符号化判定用フラグを“1”に設定し、それ以外の場合、フレーム内符号化判定用フラグを“0”に設定する一方、MBタイプ判定部14からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施してMPEG−2ストリームを作成し、MBタイプ判定部14からフレーム間符号化を実施する旨を示す判定結果を受ければ、フレーム間符号化を実施してMPEG−2ストリームを作成し、MBタイプ判定部14から符号化をスキップする旨を示す判定結果を受ければ、フレーム内符号化やフレーム間符号化を実施せずに、前回作成したMPEG−2ストリームを出力する処理を実施する。なお、MPEG−2ストリーム作成部17は符号化ストリーム作成手段を構成している。
The
The MPEG-2
図14では、図1の画像符号化方式変換装置にMBタイプ判定部14やMPEG−2ストリーム作成部17等を適用している例を示しているが、図2、図6、図10及び図11の画像符号化方式変換装置にMBタイプ判定部14やMPEG−2ストリーム作成部17等を適用してもよい。
図15はこの発明の実施の形態7による画像符号化方式変換装置のMBタイプ判定部14の処理内容を示すフローチャートである。
FIG. 14 shows an example in which the MB
FIG. 15 is a flowchart showing the processing contents of the MB
次に動作について説明する。
JPEG簡易復号部1は、画像信号がJPEGで符号化されているJPEGストリームを入力すると、上記実施の形態1と同様に、そのJPEGストリームの一部を復号して、そのJPEGストリームからヘッダ情報とJPEG量子化テーブル及びJPEG量子化DCT係数を抽出する。
Next, the operation will be described.
When a JPEG stream in which an image signal is encoded with JPEG is input, the JPEG
MPEG−2ストリーム作成部17は、JPEG簡易復号部1がJPEGストリームからヘッダ情報を抽出すると、符号化対象のフレームやMBがMPEG−2におけるGOPの先頭やスライスの先頭に当る場合、“1”のフレーム内符号化判定用フラグをスキップ判定部11に出力し、符号化対象のフレームやMBがMPEG−2におけるGOPの先頭やスライスの先頭に当らない場合、“0”のフレーム内符号化判定用フラグをスキップ判定部11に出力する。
一般に、時間方向の圧縮を行う動画像符号化方式においては、誤差の伝播を防ぐため、強制的にフレーム内符号化を行うように定められている。MPEG−2においては、GOPの先頭やスライスの先頭がこれに当る。
When the JPEG
In general, in a moving picture coding system that performs compression in the time direction, it is determined to forcibly perform intra-frame coding in order to prevent error propagation. In MPEG-2, this is the head of a GOP or the head of a slice.
MBタイプ判定部14は、簡易復号化部1が現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を抽出すると、簡易復号化部1から現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を入力し(ステップST11)、MPEG−2ストリーム作成部17からフレーム内符号化判定用フラグを入力する(ステップST12)。
MBタイプ判定部14は、MPEG−2ストリーム作成部17から入力したフレーム内符号化判定用フラグが“1”であれば(ステップST13)、フレーム内符号化を実施する必要があると判断し、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部16に出力する(ステップST14)。
When the
If the intra-frame encoding determination flag input from the MPEG-2
また、MBタイプ判定部14は、フレーム内符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部17及びデータ変換部16に出力するとともに(ステップST20)、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(最後に符号化の対象にされたフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST21)。
In addition, the MB
MBタイプ判定部14は、MPEG−2ストリーム作成部13から入力したフレーム内符号化判定用フラグが“0”であれば(ステップST13)、参照データバッファ12に格納されている参照データ(最後に符号化の対象にされたフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を入力する(ステップST15)。
そして、MBタイプ判定部14は、現在のフレームのJPEG量子化テーブルと、最後に符号化の対象にされたフレームのJPEG量子化テーブルとを比較するとともに、現在のフレームのJPEG量子化DCT係数と最後に符号化の対象にされたフレームのJPEG量子化DCT係数とを比較する(ステップST16)。
If the intra-frame coding determination flag input from the MPEG-2
Then, the MB
即ち、MBタイプ判定部14は、図12のスキップ判定部11と同様にして、JPEG量子化テーブル及びJPEG量子化DCT係数の比較処理を実施する。
MBタイプ判定部14は、例えば、以下に示すように、比較結果を分類して、フレーム内符号化を実施するか、フレーム間符号化を実施するか、符号化をスキップするかを判定する。
(1)JPEG量子化テーブル又はJPEG量子化DCT係数の差分が大きい場合 → フレーム内符号化を実施すると判断する
(2)JPEG量子化テーブル及びJPEG量子化DCT係数の差分が小さい場合(JPEG量子化テーブル又はJPEG量子化DCT係数の差分が非常に小さい場合を含む) → フレーム間符号化を実施すると判断する
(3)JPEG量子化テーブル及びJPEG量子化DCT係数の差分が非常に小さい場合 → 符号化をスキップすると判断する
That is, the MB
For example, as shown below, the MB
(1) When the difference between the JPEG quantization table or the JPEG quantized DCT coefficient is large → It is determined that intraframe coding is performed. (2) When the difference between the JPEG quantization table and the JPEG quantized DCT coefficient is small (JPEG quantization) (Including the case where the difference between the table or the JPEG quantized DCT coefficient is very small) → Judge that the inter-frame coding is performed (3) When the difference between the JPEG quantization table and the JPEG quantized DCT coefficient is very small → coding Decide to skip
MBタイプ判定部14は、JPEG量子化テーブル又はJPEG量子化DCT係数の差分が大きく(ステップST17)、フレーム内符号化を実施すると判断すると、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部16に出力する(ステップST14)。
また、MBタイプ判定部14は、フレーム内符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部17及びデータ変換部16に出力するとともに(ステップST20)、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(最後に符号化の対象にされたフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST21)。
If the MB
In addition, the MB
MBタイプ判定部14は、JPEG量子化テーブル及びJPEG量子化DCT係数の差分が小さく(ステップST17,ST18)、フレーム間符号化を実施すると判断すると、現在のフレームのJPEG量子化テーブルをデータ変換部16に出力する。
また、現在のフレームのJPEG量子化DCT係数と、最後に符号化の対象にされたフレームのJPEG量子化DCT係数との差分を求め、その差分をJPEG量子化DCT係数(以下、「差分JPEG量子化DCT係数」と称する)としてデータ変換部16に出力する(ステップST19)。
このように、差分JPEG量子化DCT係数がデータ変換部16に出力される場合、データ変換部16では、動画像符号化に用いられる動きベクトルの探索が行われないため、演算量が大幅に削減される。
When the MB
Also, the difference between the JPEG quantized DCT coefficient of the current frame and the JPEG quantized DCT coefficient of the last frame to be encoded is obtained, and the difference is calculated as the JPEG quantized DCT coefficient (hereinafter referred to as “difference JPEG quantum”). Output to the data converter 16 (step ST19).
As described above, when the differential JPEG quantized DCT coefficient is output to the
また、MBタイプ判定部14は、フレーム間符号化を実施する旨を示す判定結果をMPEG−2ストリーム作成部17及びデータ変換部16に出力するとともに(ステップST20)、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(最後に符号化の対象にされたフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST21)。
In addition, the MB
MBタイプ判定部14は、JPEG量子化テーブル及びJPEG量子化DCT係数の差分が非常に小さく(ステップST17,ST18)、符号化をスキップすると判断すると、符号化をスキップする旨を示す判定結果をMPEG−2ストリーム作成部17及びデータ変換部16に出力する(ステップST20)。
この場合、データ変換部16では、符号化方式の変換を行う必要がないので、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数をデータ変換部16には出力しない。
また、MBタイプ判定部14は、現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数を参照データバッファ12に出力して、参照データバッファ12が格納している参照データ(最後に符号化の対象にされたフレームのJPEG量子化テーブルとJPEG量子化DCT係数)を現在のフレームのJPEG量子化テーブルとJPEG量子化DCT係数に更新する(ステップST21)。
When the difference between the JPEG quantization table and the JPEG quantized DCT coefficient is very small (steps ST17 and ST18) and the MB
In this case, since the
In addition, the MB
データ変換部16は、MBタイプ判定部14の判定結果がフレーム内符号化を実施する旨を示す判定結果である場合、図1のデータ変換部2と同様の方法で、JPEG量子化DCT係数をMPEG−2量子化DCT係数に変換し、JPEG量子化テーブルをMPEG−2量子化テーブル・パラメータに変換する。
ただし、この実施の形態7では、非イントラMBを扱う場合があり、非イントラMBの場合には、上記の式(2)の代わりに下記の式(9)を使用し、式(4)の代わりに下記の式(10)を使用して変換を行う。
When the determination result of the MB
However, in the seventh embodiment, a non-intra MB may be handled. In the case of a non-intra MB, the following formula (9) is used instead of the above formula (2), and the formula (4) Instead, the conversion is performed using the following equation (10).
データ変換部16は、MBタイプ判定部14の判定結果がフレーム間符号化を実施する旨を示す判定結果である場合、MBタイプ判定部14から出力された差分JPEG量子化DCT係数をMPEG−2量子化DCT係数に変換し、JPEG量子化テーブルをMPEG−2量子化テーブル・パラメータに変換する。
ただし、JPEGからMPEG−2に変換する場合においては、特に変換処理は行われない。式(2)におけるQuantScale=16とするのみである。しかし、他の符号化方式の場合には、何らかの変換処理を行う必要がある場合がある。
なお、データ変換部16は、MBタイプ判定部14の判定結果が符号化をスキップする旨を示す判定結果である場合、上述したように、符号化方式の変換処理を実施しない。
If the determination result of the MB
However, when converting from JPEG to MPEG-2, no particular conversion process is performed. Only QuantScale = 16 in equation (2). However, in the case of other encoding methods, some conversion processing may need to be performed.
Note that, when the determination result of the MB
MPEG−2ストリーム作成部17は、MBタイプ判定部14からフレーム内符号化を実施する旨を示す判定結果を受けると、上記実施の形態1と同様に、フレーム内符号化を実施して、JPEG簡易復号部1から出力されたヘッダ情報と、データ変換部16から出力されたMPEG−2量子化テーブル・パラメータ及びMPEG−2量子化DCT係数とからMPEG−2ストリームを作成する。
MPEG−2ストリーム作成部17は、MBタイプ判定部14からフレーム間符号化を実施する旨を示す判定結果を受けると、フレーム間符号化を実施して、JPEG簡易復号部1から出力されたヘッダ情報と、データ変換部16から出力されたMPEG−2量子化テーブル・パラメータ及びMPEG−2量子化DCT係数とからMPEG−2ストリームを作成する。
MPEG−2ストリーム作成部17は、MBタイプ判定部14から符号化をスキップする旨を示す判定結果を受けると、フレーム内符号化やフレーム間符号化を実施せずに、前回作成したMPEG−2ストリームを出力する。
When the MPEG-2
When the MPEG-2
When the MPEG-2
以上で明らかなように、この実施の形態7によれば、MBタイプ判定部14がフレーム内符号化を実施するか、フレーム間符号化を実施するか、符号化をスキップするかを判定し、MPEG−2ストリーム作成部17がMBタイプ判定部14からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施してMPEG−2ストリームを作成し、MBタイプ判定部14からフレーム間符号化を実施する旨を示す判定結果を受ければ、フレーム間符号化を実施してMPEG−2ストリームを作成し、MBタイプ判定部14から符号化をスキップする旨を示す判定結果を受ければ、フレーム内符号化やフレーム間符号化を実施せずに、前回作成したMPEG−2ストリームを出力するように構成したので、符号量を大幅に削減することができる効果を奏する。また、MB判定をDCT係数領域で行うことで、演算量を低く保つことが可能である。
As is apparent from the above, according to the seventh embodiment, the MB
なお、この実施の形態7では、JPEGからMPEG−2に変換するものについて示したが、同様の方法で、MPEG−2のI−pictureからJPEGに変換することも可能である。また、量子化もしくはDCTを用いた他の符号化方式間の変換にも適用可能である。
また、この実施の形態7では、変換後の形式がMPEG−2であるため、スキップの判定を行う単位をMBとしているが、変換する形式によって判定の単位を変えてもよい。
また、上記実施の形態2〜4における画像の追加と組み合わせてもよく、追加する領域の一部が常に同じ画像である場合、該当するブロックを常にスキップと判定するようにしてもよい。
In the seventh embodiment, the conversion from JPEG to MPEG-2 is shown, but it is also possible to convert from MPEG-2 I-picture to JPEG by the same method. Also, the present invention can be applied to conversion between other encoding methods using quantization or DCT.
In the seventh embodiment, since the converted format is MPEG-2, the unit for determining the skip is MB, but the determination unit may be changed depending on the format to be converted.
Further, it may be combined with the addition of the image in the second to fourth embodiments, and when a part of the area to be added is always the same image, it may be determined that the corresponding block is always skipped.
実施の形態8.
図16はこの発明の実施の形態8による画像符号化方式変換装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
色差フォーマット変換部18はJPEG簡易復号部1により抽出されたJPEG量子化テーブルを用いて、JPEG簡易復号部1により抽出されたJPEG量子化DCT係数を逆量子化して色差成分を求め、その色差成分と、JPEG簡易復号部1により抽出されたヘッダ情報に含まれているJPEGの色差フォーマットを示す情報と、MPEG−2の色差フォーマットとに応じて、そのJPEG量子化DCT係数を変換する処理を実施する。なお、色差フォーマット変換部18は色差変換手段を構成している。
図16では、図1の画像符号化方式変換装置に色差フォーマット変換部18を適用している例を示しているが、図2、図6、図10、図11、図12及び図14の画像符号化方式変換装置に色差フォーマット変換部18を適用してもよい。
FIG. 16 is a block diagram showing an image coding system conversion apparatus according to
The color difference
FIG. 16 shows an example in which the color difference
この実施の形態8は、符号化方式の変換前後において、色差フォーマットが異なる場合でも、高速に変換処理を実施する方法に関するものである。
画像圧縮においては、圧縮率を高めるために、YCbCr色空間を用いて画像を圧縮する場合が多い。このとき、Y(輝度)成分と比べて、CbCr成分(色差)成分は間引かれていることが多く、その間引き方は符号化方式によって異なる。これが色差フォーマットの違いである。
この実施の形態8では、色差フォーマット変換部18を実装することで、高速な変換処理を実現している。
The eighth embodiment relates to a method for performing a conversion process at high speed even when the color difference formats are different before and after the encoding system conversion.
In image compression, in order to increase the compression rate, an image is often compressed using the YCbCr color space. At this time, the CbCr component (color difference) component is often thinned out compared to the Y (luminance) component, and the thinning method differs depending on the encoding method. This is the difference in color difference format.
In the eighth embodiment, a high-speed conversion process is realized by mounting the color difference
以下、色差フォーマット変換部18の処理内容を説明する。
ここでは、説明の便宜上、JPEGの色差フォーマットが4:2:2形式であり、変換対象のMPEG−2の色差フォーマットが4:2:0形式であるものとする。
図18に示すように、4:2:0形式は、4画素分のY信号に対してCbCr信号(図中ではC)がそれぞれ1画素分である形式である。
また、4:2:2形式は、4画素分のY信号に対してCbCr信号(図中ではC)がそれぞれ2画素分である形式である。
ただし、輝度と色差の位置関係は符号化方式により異なり、図17に示した位置とは異なることがある。
The processing contents of the color difference
Here, for convenience of explanation, it is assumed that the color difference format of JPEG is 4: 2: 2 format and the color difference format of MPEG-2 to be converted is 4: 2: 0 format.
As shown in FIG. 18, the 4: 2: 0 format is a format in which the CbCr signal (C in the figure) is one pixel for the Y signal for four pixels.
The 4: 2: 2 format is a format in which the CbCr signal (C in the figure) is equivalent to two pixels for the Y signal for four pixels.
However, the positional relationship between luminance and color difference differs depending on the encoding method, and may differ from the position shown in FIG.
したがって、画像圧縮におけるブロックの単位で考えると、4:2:2形式における8×8のDCT係数の2つを4:2:0形式の8×8のDCT係数の1つに変換すればよいことになる。
このような変換を行う場合、最も単純な方法としては、一旦画像の復号を行い、16×8の画像信号から8×8の画像信号にフィルタリングを行って縮退した後、再度DCTを行うことが挙げられるが、演算量が大きくなる欠点がある。
そこで、この実施の形態8では、色差フォーマット変換部18が16×8のの量子化DCT係数を直接8×8の量子化DCT係数に変換することで演算量の削減を行うようにしている。
Therefore, in terms of block units in image compression, two 8 × 8 DCT coefficients in 4: 2: 2 format may be converted to one of 8 × 8 DCT coefficients in 4: 2: 0 format. It will be.
When performing such conversion, the simplest method is to first decode an image, perform filtering from a 16 × 8 image signal to an 8 × 8 image signal, degenerate, and then perform DCT again. Although it is mentioned, there is a drawback that the calculation amount becomes large.
Therefore, in the eighth embodiment, the color difference
まず、色差フォーマット変換部18は、下記の変換式(11)を用いて、M×Nの画像信号をDCT変換する。
式(11)において、M=N=8として、上下に並んだ2つの8×8の画像信号をそれぞれX8×8u,X8×8lとして、それぞれを個別にDCT変換すると、下記の式(12)のようになる。
式(12)の上下の成分を連結すると、以下のように変形することができる。
次に、16×8の画像信号に通常のDCT変換を行う場合、上記の式(11)で、M=16,N=8とすると、下記の式(17)のようになる。
ここで、式(16)を変形すると、下記の式(18)のようになる。
Here, when the equation (16) is modified, the following equation (18) is obtained.
式(17)と式(18)から式(19)が得られる。
この方法により、個別にDCT変換を行った2つの8×8のDCT変換係数Z16×8から16×8のDCT変換係数Y16×8を算出することが可能であり、色差フォーマットの異なる画像ブロックから算出されたDCT係数を復号を行わずに直接変換することができる。
このようにして、色差フォーマット変換部18により変換されたJPEG量子化DCT係数がデータ変換部2に出力される。
Expression (19) is obtained from Expression (17) and Expression (18).
By this method, it is possible to calculate 16 × 8 DCT conversion coefficient Y 16 × 8 from two 8 × 8 DCT conversion coefficients Z 16 × 8 that have been individually DCT converted, and images having different color difference formats. The DCT coefficient calculated from the block can be directly converted without decoding.
In this way, the JPEG quantized DCT coefficient converted by the color difference
以上で明らかなように、この実施の形態8によれば、色差フォーマット変換部18がJPEG簡易復号部1により抽出されたヘッダ情報に含まれているJPEGの色差フォーマットを示す情報と、MPEG−2の色差フォーマットとに応じてJPEG量子化DCT係数を変換するように構成したので、色差フォーマットが異なる場合でも、高速な変換処理を実現することができる効果を奏する。
As is apparent from the above, according to the eighth embodiment, information indicating the JPEG color difference format included in the header information extracted by the JPEG
なお、この実施の形態8では、JPEGからMPEG−2に変換するものについて示したが、同様の方法で、色差フォーマットの異なる他の符号化方式間の変換にも適用することが可能である。
また、4:2:2形式から4:2:0形式への変換以外の色差フォーマット変換であっても、本方式で示した方法から変換係数を算出することが可能である。
In the eighth embodiment, the conversion from JPEG to MPEG-2 has been described. However, the same method can be applied to conversion between other encoding methods having different color difference formats.
Even in the case of color difference format conversion other than the conversion from the 4: 2: 2 format to the 4: 2: 0 format, the conversion coefficient can be calculated from the method shown in this method.
1 JPEG簡易復号部(簡易復号化手段)、2 データ変換部(データ変換手段)、3 MPEG−2ストリーム作成部(符号化ストリーム作成手段)、4 画像データ追加部(画像データ追加手段)、5 MPEG−2ストリーム作成部(符号化ストリーム作成手段)、6 追加ブロック画像データベース(追加画像作成手段)、7 追加画像作成部(追加画像作成手段)、8 追加ブロック画像データベース(追加画像作成手段)、9 追加画像作成部(追加画像作成手段)、10 DCT係数削減部(高周波成分削除手段)、11 スキップ判定部(符号化判定手段)、12 参照データバッファ(符号化判定手段)、13 MPEG−2ストリーム作成部(符号化ストリーム作成手段)、14 MBタイプ判定部(符号化判定手段)、15 参照データバッファ(符号化判定手段)、16 データ変換部(データ変換手段)、17 MPEG−2ストリーム作成部(符号化ストリーム作成手段)、18 色差フォーマット変換部(色差変換手段)。 1 JPEG simple decoding unit (simple decoding unit), 2 data conversion unit (data conversion unit), 3 MPEG-2 stream creation unit (encoded stream creation unit), 4 image data addition unit (image data addition unit), 5 MPEG-2 stream creation unit (encoded stream creation unit), 6 additional block image database (additional image creation unit), 7 additional image creation unit (additional image creation unit), 8 additional block image database (additional image creation unit), 9 Additional image creation unit (additional image creation unit), 10 DCT coefficient reduction unit (high frequency component deletion unit), 11 Skip determination unit (encoding determination unit), 12 Reference data buffer (encoding determination unit), 13 MPEG-2 Stream creation unit (encoded stream creation unit), 14 MB type determination unit (encoding determination unit), 15 Irradiation data buffer (coding judgment means), 16 data converter (data conversion unit), 17 MPEG-2 stream creation unit (coded stream creating means), 18 chrominance format conversion unit (color difference conversion means).
Claims (7)
上記簡易復号化手段により今回抽出された第一の符号化方式の量子化テーブルと、上記簡易復号化手段により前回抽出された第一の符号化方式の量子化テーブルとを比較し、さらに上記簡易復号化手段から今回出力された第一の符号化方式の量子化周波数成分と、上記簡易復号化手段から前回出力された第一の符号化方式の量子化周波数成分とを比較し、上記2つの比較結果に基づいてフレーム内符号化を実施するか否かを判定する符号化判定手段を設け、
上記符号化ストリーム作成手段が、上記符号化判定手段からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施して第二の符号化方式の符号化ストリームを作成し、上記符号化判定手段からフレーム内符号化を実施しない旨を示す判定結果を受ければ、フレーム内符号化を実施せずに、前回作成した第二の符号化方式の符号化ストリームを出力することを特徴とする画像符号化方式変換装置。 A part of the encoded stream in which the image signal is encoded by the first encoding method is decoded, and the header information, the quantization table and the quantization frequency component of the first encoding method are obtained from the encoded stream. Extracting simple decoding means, and converting the quantization table and quantization frequency component of the first encoding method extracted by the simple decoding means to the quantization table and quantization frequency component of the second encoding method The image data of the additional image is quantized using the data conversion means to be converted and the quantization table of the second encoding method converted by the data conversion means, and the quantized image data is converted by the data conversion means. The image data adding means to be added to the quantized frequency component of the second encoding method and the header information extracted by the simple decoding means are changed according to the image width of the additional image. Quantization of the second encoding method in which the header information after the change, the quantization table of the second encoding method converted by the data conversion unit, and the image data after quantization by the image data addition unit are added. Encoded stream creation means for creating an encoded stream of the second encoding method from the encoded frequency component ,
The quantization table of the first encoding method extracted this time by the simple decoding unit is compared with the quantization table of the first encoding method previously extracted by the simple decoding unit, and the simple The quantization frequency component of the first encoding method output this time from the decoding means and the quantization frequency component of the first encoding method output last time from the simple decoding means are compared. An encoding determination unit is provided for determining whether to perform intraframe encoding based on the comparison result,
When the coded stream creation means receives a determination result indicating that intra-frame coding is to be performed from the coding judgment means, it performs intra-frame coding and creates a coded stream of the second coding method. If the determination result indicating that intra-frame encoding is not performed is received from the encoding determination means, the previously generated encoded stream of the second encoding method is output without performing intra-frame encoding. An image coding method conversion apparatus characterized by the above.
上記簡易復号化手段により抽出された第一の符号化方式の量子化テーブルと、最後に符号化の対象にされたフレームの第一の符号化方式の量子化テーブルとを比較し、さらに上記簡易復号化手段から出力された第一の符号化方式の量子化周波数成分と、最後に符号化の対象にされたフレームの第一の符号化方式の量子化周波数成分とを比較し、上記2つの比較結果に基づいてフレーム内符号化を実施するか、フレーム間符号化を実施するか、符号化をスキップするかを判定する符号化判定手段を設け、
上記符号化ストリーム作成手段が、上記符号化判定手段からフレーム内符号化を実施する旨を示す判定結果を受ければ、フレーム内符号化を実施して第二の符号化方式の符号化ストリームを作成し、上記符号化判定手段からフレーム間符号化を実施する旨を示す判定結果を受ければ、フレーム間符号化を実施して第二の符号化方式の符号化ストリームを作成し、上記符号化判定手段から符号化をスキップする旨を示す判定結果を受ければ、フレーム内符号化及びフレーム間符号化を実施せずに、前回作成した第二の符号化方式の符号化ストリームを出力することを特徴とする画像符号化方式変換装置。 A part of the encoded stream in which the image signal is encoded by the first encoding method is decoded, and the header information, the quantization table and the quantization frequency component of the first encoding method are obtained from the encoded stream. Extracting simple decoding means, and converting the quantization table and quantization frequency component of the first encoding method extracted by the simple decoding means to the quantization table and quantization frequency component of the second encoding method The image data of the additional image is quantized using the data conversion means to be converted and the quantization table of the second encoding method converted by the data conversion means, and the quantized image data is converted by the data conversion means. The image data adding means to be added to the quantized frequency component of the second encoding method and the header information extracted by the simple decoding means are changed according to the image width of the additional image. Quantization of the second encoding method in which the header information after the change, the quantization table of the second encoding method converted by the data conversion unit, and the image data after quantization by the image data addition unit are added. Encoded stream creation means for creating an encoded stream of the second encoding method from the encoded frequency component ,
The quantization table of the first encoding method extracted by the simple decoding means is compared with the quantization table of the first encoding method of the last frame to be encoded. The quantization frequency component of the first encoding method output from the decoding means is compared with the quantization frequency component of the first encoding method of the last frame to be encoded. Provided with an encoding determination means for determining whether to perform intra-frame encoding, inter-frame encoding, or skip encoding based on the comparison result,
When the coded stream creation means receives a determination result indicating that intra-frame coding is to be performed from the coding judgment means, it performs intra-frame coding and creates a coded stream of the second coding method. If the determination result indicating that inter-frame encoding is to be performed is received from the encoding determination means, inter-frame encoding is performed to generate an encoded stream of the second encoding method, and the encoding determination is performed. If a determination result indicating that encoding is skipped is received from the means, the previously generated encoded stream of the second encoding method is output without performing intraframe encoding and interframe encoding. An image coding method conversion apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011001238A JP5226089B2 (en) | 2011-01-06 | 2011-01-06 | Image coding method converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011001238A JP5226089B2 (en) | 2011-01-06 | 2011-01-06 | Image coding method converter |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006337280A Division JP2008153771A (en) | 2006-12-14 | 2006-12-14 | Image coding system converting apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011091858A JP2011091858A (en) | 2011-05-06 |
JP5226089B2 true JP5226089B2 (en) | 2013-07-03 |
Family
ID=44109597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011001238A Expired - Fee Related JP5226089B2 (en) | 2011-01-06 | 2011-01-06 | Image coding method converter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5226089B2 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3715664B2 (en) * | 1994-08-31 | 2005-11-09 | キヤノン株式会社 | Image processing method |
JP2001309381A (en) * | 2000-04-25 | 2001-11-02 | Canon Inc | Image processor, image processing method and storage medium |
JP2002010264A (en) * | 2000-06-21 | 2002-01-11 | Victor Co Of Japan Ltd | Device for replacing compressed data |
JP4363615B2 (en) * | 2002-09-27 | 2009-11-11 | Kddi株式会社 | Encoded video converter |
JP3893350B2 (en) * | 2002-11-29 | 2007-03-14 | キヤノン株式会社 | Encoded data conversion apparatus and method |
JP4575803B2 (en) * | 2005-02-10 | 2010-11-04 | 日本放送協会 | Compression encoding apparatus and compression encoding program |
-
2011
- 2011-01-06 JP JP2011001238A patent/JP5226089B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011091858A (en) | 2011-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI324481B (en) | Method and apparatus for encoding/decoding video signal using reference pictures | |
JP4092734B2 (en) | Digital signal conversion method and digital signal conversion apparatus | |
JP5878551B2 (en) | Method, computer program and system for tone mapping a high dynamic range (HDR) video data stream | |
JP5502487B2 (en) | Maximum dynamic range signaling of inverse discrete cosine transform | |
KR100971835B1 (en) | Image decoding method and apparatus | |
CN116684582A (en) | Decoding device, encoding device, and data transmitting device | |
US8611418B2 (en) | Decoding a progressive JPEG bitstream as a sequentially-predicted hybrid video bitstream | |
JP4245576B2 (en) | Image compression / decompression method, image compression apparatus, and image expansion apparatus | |
JP5800362B2 (en) | Moving image sending device, moving image receiving device, moving image transmission system, moving image sending method, moving image receiving method, and program | |
CN106028031B (en) | Video encoding apparatus and method, video decoding apparatus and method | |
JP4274653B2 (en) | Moving picture composition apparatus and moving picture composition method | |
JPH057356A (en) | Image recording/reproducing device | |
JP2001119703A (en) | Compression of digital video image by variable length prediction coding | |
JP5226089B2 (en) | Image coding method converter | |
JP2008153771A (en) | Image coding system converting apparatus | |
JP2006129248A (en) | Image encoding and decoding method and apparatus thereof | |
JP2008109700A (en) | Method and device for converting digital signal | |
JP4749508B2 (en) | Image decoding method | |
JP2004056616A (en) | Device, method and program for decoding encoded signal | |
KR101979634B1 (en) | Image processing apparatus for image enhancement and method thereof | |
CN100521788C (en) | Digital signal conversion method | |
JP2005184525A (en) | Image processing device | |
JP4605212B2 (en) | Digital signal conversion method and digital signal conversion apparatus | |
Awad et al. | Video over cellular mobile device based on hybrid technique | |
JP4513856B2 (en) | Digital signal conversion method and digital signal conversion apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121213 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121218 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130205 |
|
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: 20130305 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130313 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160322 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |