Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5287624B2 - Image processing circuit and image encoding apparatus - Google Patents
[go: Go Back, main page]

JP5287624B2 - Image processing circuit and image encoding apparatus - Google Patents

Image processing circuit and image encoding apparatus Download PDF

Info

Publication number
JP5287624B2
JP5287624B2 JP2009211979A JP2009211979A JP5287624B2 JP 5287624 B2 JP5287624 B2 JP 5287624B2 JP 2009211979 A JP2009211979 A JP 2009211979A JP 2009211979 A JP2009211979 A JP 2009211979A JP 5287624 B2 JP5287624 B2 JP 5287624B2
Authority
JP
Japan
Prior art keywords
pixel
unit
pixels
weighting coefficient
constant
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
Application number
JP2009211979A
Other languages
Japanese (ja)
Other versions
JP2011061704A (en
Inventor
楊 宋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009211979A priority Critical patent/JP5287624B2/en
Publication of JP2011061704A publication Critical patent/JP2011061704A/en
Application granted granted Critical
Publication of JP5287624B2 publication Critical patent/JP5287624B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、動画データの動き補償を行う画像処理回路および画像符号化装置に関する。   The present invention relates to an image processing circuit and an image encoding device that perform motion compensation of moving image data.

動画データのフレーム間およびフレーム内の差分値に基づいてデータを圧縮し符号化する画像符号化技術が様々な分野で利用されている。フレームとは動画データを構成する一枚の静止画である。1つのフレームは複数のマクロブロックに分割される。全ての処理はマクロブロック単位で実行される。   An image encoding technique for compressing and encoding data based on a difference value between and within frames of moving image data is used in various fields. A frame is a single still image constituting moving image data. One frame is divided into a plurality of macroblocks. All processing is executed in units of macroblocks.

画像の圧縮符号化によって動画データのデータサイズを小さくすることにより、限られた記憶容量を有する記憶媒体に対し、より長時間で高画質の動画データを記憶させることが出来る。動画圧縮の機能を有する画像符号化装置はハンディカメラなどの携帯機器にも実装されている。フレーム間およびフレーム内の差分値に基づいてデータサイズを圧縮し符号化する画像符号化技術としてH.264やMPEG(Moving Picture Experts Group)などがある。   By reducing the data size of the moving image data by compressing and encoding the image, high-quality moving image data can be stored in a longer time on a storage medium having a limited storage capacity. An image encoding device having a function of moving image compression is also mounted on a portable device such as a handy camera. As an image encoding technique for compressing and encoding a data size based on a difference value between frames and within a frame, H.264 is used. H.264 and MPEG (Moving Picture Experts Group).

H.264は高精度の圧縮符号化を実現するため、フレーム間の差分値に基づく圧縮処理であるフレーム間予測処理を行う。フレーム間予測処理において、フレーム間の個々のマクロブロックにおける輝度の比較により、マクロブロックの移動量である動きベクトルを検出する。動きベクトルの検出の際にフレーム間予測処理における精度を向上させるため、整数精度の輝度参照画像から補間処理によって仮想的に求めた分数精度の輝度参照画像を用い、符号化対象画像の動き検出が行われる。   H. H.264 performs inter-frame prediction processing, which is compression processing based on a difference value between frames, in order to realize high-precision compression coding. In the inter-frame prediction process, a motion vector, which is the amount of movement of the macro block, is detected by comparing the luminance of each macro block between frames. In order to improve the accuracy in the inter-frame prediction process when detecting the motion vector, the motion detection of the encoding target image is performed by using the fractional luminance reference image virtually obtained by interpolation from the integer precision luminance reference image. Done.

動き検出で検出した動きベクトルを基に、参照画像フレームから補間処理によって輝度と色差の補間画素を生成する。参照画像フレーム中の複数の輝度また色差の参照画素から輝度と色差の補間画素を生成することを動き補償処理という。以下、色差の補間演算について説明する。   Based on the motion vector detected by the motion detection, interpolation pixels of luminance and color difference are generated from the reference image frame by interpolation processing. Generating interpolated pixels of luminance and color difference from a plurality of luminance or color difference reference pixels in the reference image frame is called motion compensation processing. The color difference interpolation calculation will be described below.

色差の補間画素は検出した動きベクトルの座標に近接する4つの参照画素から生成される。補間画素を求めるための参照画素をA、B、C、Dとすると、補間画素の色差データは、{(8−dx)×(8−dy)×A+dx×(8−dy)×B+(8−dx)×dy×C+dx×dy×D+32}>>6として計算される。ここで‘>>’は右方向にビットシフトする演算を示す。またdx、dyは重み係数と呼ばれる係数である。補間画素の演算は多くの乗算を含む。乗算を実行するための乗算部の回路規模が大きいため、乗算回数が多いほど、補間画素を演算するための演算回路の回路規模は大きくなる。   Color difference interpolation pixels are generated from four reference pixels close to the detected motion vector coordinates. Assuming that the reference pixels for obtaining the interpolation pixel are A, B, C, and D, the color difference data of the interpolation pixel is {(8−dx) × (8−dy) × A + dx × (8−dy) × B + (8 -Dx) * dy * C + dx * dy * D + 32} >> 6. Here, ‘>>’ indicates a bit shift operation to the right. Dx and dy are coefficients called weighting coefficients. Interpolated pixel operations involve many multiplications. Since the circuit scale of the multiplication unit for performing multiplication is large, the circuit scale of the arithmetic circuit for calculating the interpolation pixel increases as the number of multiplications increases.

以下の特許文献および非特許文献には画像符号化装置に関する技術が開示されている。   The following patent documents and non-patent documents disclose techniques related to an image encoding device.

特開平04−035385号公報Japanese Patent Laid-Open No. 04-035385 特開平06−204888号公報Japanese Patent Laid-Open No. 06-204888

角野眞也ほか、H.264/AVC教科書、株式会社インプレス、2006Junya Tsunono et al. H.264 / AVC textbook, Impress Corporation, 2006

本発明の一実施例では、補間演算の演算式を見直して回路規模の大きくなる演算を減らすことにより実装面積の小さい画像処理回路を提供することを目的とする。   An object of an embodiment of the present invention is to provide an image processing circuit having a small mounting area by reviewing an arithmetic expression for interpolation calculation and reducing an operation that increases a circuit scale.

上記課題を解決するため、画像処理回路は、補間画素を囲む行列状に配置された複数の画素のうち行方向上の複数の該画素の画素値から演算される第一定数と、該補間画素を囲む列方向上の複数の該画素の画素値から演算される第二定数と、該補間画素を囲む該複数の画素の画素値から演算される第三定数とを求める第一演算部と、行方向上の複数の該画素に対する該補間画素の位置から決定される第一重み付け係数と列方向上の複数の該画素に対する該補間画素の位置から決定される第二重み付け係数を演算し第三重み付け係数を求める第二演算部と、該第一定数に応じて該第一重み付け係数当りの画素値変化量を演算する第三演算部と、該第二定数に応じて該第二重み付け係数当りの画素値変化量を演算する第四演算部と、該第三定数に応じて該第三重み付け係数当りの画素値変化量を演算する第五演算部と、該第三、該第四、および該第五演算部の演算結果に基づいて該補間画素の画素値を演算する第六演算部を有する。   In order to solve the above problem, an image processing circuit includes: a first constant calculated from pixel values of a plurality of pixels in a row direction among a plurality of pixels arranged in a matrix surrounding the interpolation pixel; and the interpolation pixel A first calculation unit for obtaining a second constant calculated from the pixel values of the plurality of pixels on the column direction surrounding the interpolation pixel and a third constant calculated from the pixel values of the plurality of pixels surrounding the interpolation pixel; A third weighting is calculated by calculating a first weighting coefficient determined from the position of the interpolation pixel for the plurality of pixels in the row direction and a second weighting coefficient determined from the position of the interpolation pixel for the plurality of pixels in the column direction. A second calculation unit for obtaining a coefficient; a third calculation unit for calculating a pixel value change amount per first weighting coefficient according to the first constant; and a second calculation unit per second weighting coefficient according to the second constant. A fourth calculation unit for calculating the pixel value change amount of And calculating the pixel value of the interpolated pixel based on the calculation results of the third, fourth, and fifth calculation units, and the fifth calculation unit that calculates the pixel value change amount per the third weighting coefficient. A sixth arithmetic unit.

実施形態によれば、回路規模の大きくなる演算を減らすことにより実装面積の小さい画像処理回路を提供することができる。   According to the embodiment, it is possible to provide an image processing circuit with a small mounting area by reducing the computation that increases the circuit scale.

画像符号化装置のブロック図である。It is a block diagram of an image coding apparatus. 参照画素と補間画素とのイメージ図である。It is an image figure of a reference pixel and an interpolation pixel. 動き補償部の詳細ブロック図である。It is a detailed block diagram of a motion compensation part. 画素演算部における乗算部のブロック図である。It is a block diagram of the multiplication part in a pixel calculating part. 従来技術によるゲート数と本実施例によるゲート数との比較テーブルである。It is a comparison table of the number of gates by a prior art and the number of gates by a present Example.

以下、本実施の形態について説明する。なお、各実施形態における構成の組み合わせも本発明の実施形態に含まれる。   Hereinafter, this embodiment will be described. In addition, the combination of the structure in each embodiment is also contained in embodiment of this invention.

図1は本実施の形態に係る画像符号化装置1の構成の一例を示すブロック図である。画像符号化装置1は入力された動画データを圧縮し符号化する。画像符号化装置1は差分器5、DCT変換部3、量子化部10、逆量子化部17、逆DCT変換部7、加算器18、フレーム内予測部11、フレーム間予測部12、可変長符号化部13を有する。ここでDCTとは離散コサイン変換(Discrete Cosine Transform)であり、離散信号を周波数領域の信号に変換する処理である。   FIG. 1 is a block diagram showing an example of the configuration of an image encoding device 1 according to the present embodiment. The image encoding device 1 compresses and encodes the input moving image data. The image encoding device 1 includes a subtractor 5, a DCT conversion unit 3, a quantization unit 10, an inverse quantization unit 17, an inverse DCT conversion unit 7, an adder 18, an intra-frame prediction unit 11, an inter-frame prediction unit 12, a variable length. An encoding unit 13 is included. Here, DCT is a Discrete Cosine Transform, which is a process of converting a discrete signal into a frequency domain signal.

フレーム内予測部11は予測対象ブロックの予測計算に用いる符号化済みの隣接ブロックの画素16から予測画像を生成し、生成した予測画像と予測画像生成前のブロックの入力画像2との差分値が最も小さい予測モードを求めるフレーム内予測処理を行う。フレーム内予測部11は差分値が最も小さい予測モードを選択することにより、最も正確な画像予測が可能な予測モードを決定する。   The intra-frame prediction unit 11 generates a prediction image from the pixels 16 of the encoded adjacent block used for prediction calculation of the prediction target block, and the difference value between the generated prediction image and the input image 2 of the block before the prediction image generation is Intraframe prediction processing for obtaining the smallest prediction mode is performed. The intra-frame prediction unit 11 determines a prediction mode in which the most accurate image prediction is possible by selecting a prediction mode having the smallest difference value.

フレーム間予測部12は予測対象ブロックに対し、前方、後方、あるいはその両方のフレームから予測画像を生成し、生成した予測画像と元の入力画像2との差分を求めるフレーム間予測処理を行う。フレーム間予測部12は入力画像2および参照画像82を入力とし、予測画像ブロックの生成を行う。   The inter-frame prediction unit 12 generates a predicted image from the front, rear, or both of the prediction target blocks, and performs an inter-frame prediction process for obtaining a difference between the generated predicted image and the original input image 2. The inter-frame prediction unit 12 receives the input image 2 and the reference image 82 and generates a predicted image block.

フレーム間予測部12は動き検出回路20、画像処理回路21を有する。動き検出回路20は入力画像2および参照画像82の輝度データから動きベクトル22を算出する。動き検出回路20は算出した動きベクトル22に基づいて、重み付け係数dx、dyを画像処理回路21へ出力する。重み付け係数dx、dyについての詳細は後述する。   The inter-frame prediction unit 12 includes a motion detection circuit 20 and an image processing circuit 21. The motion detection circuit 20 calculates a motion vector 22 from the luminance data of the input image 2 and the reference image 82. The motion detection circuit 20 outputs weighting coefficients dx and dy to the image processing circuit 21 based on the calculated motion vector 22. Details of the weighting coefficients dx and dy will be described later.

画像処理回路21は行列状に配置された複数の画素の画素値から補間演算により補間画素の画素値を求める。画像処理回路21は算出した動きベクトル22および参照画像82に基づいて、補間演算された補間画素である輝度データと色差データを有する予測画素を算出し判定部6へ出力する。画像処理回路21は動きベクトル22を重み付け係数dx、dyとして動き検出回路20から受信する。画像処理回路21は動きベクトル22から動き補償を実行する動き補償部として機能する。   The image processing circuit 21 obtains pixel values of interpolation pixels from pixel values of a plurality of pixels arranged in a matrix by interpolation calculation. Based on the calculated motion vector 22 and the reference image 82, the image processing circuit 21 calculates a prediction pixel having luminance data and color difference data, which are interpolation pixels subjected to interpolation calculation, and outputs the prediction pixel to the determination unit 6. The image processing circuit 21 receives the motion vector 22 from the motion detection circuit 20 as weighting coefficients dx and dy. The image processing circuit 21 functions as a motion compensation unit that performs motion compensation from the motion vector 22.

判定部6はフレーム間予測部12およびフレーム内予測部11が出力する予測画素のうち、予測誤差の小さい画像を予測画像8として出力する。   The determination unit 6 outputs an image with a small prediction error as the prediction image 8 among the prediction pixels output by the inter-frame prediction unit 12 and the intra-frame prediction unit 11.

差分器5は入力画像2とその予測結果である予測画像8との差分を計算し、その差分値を予測誤差80として出力する。ここで予測画像8はフレーム間予測処理またはフレーム内予測処理において隣接フレームのマクロブロックあるいは同一フレームの隣接マクロブロックに基づいて生成された画像である。画像符号化装置1は各予測処理により生成された予測画像8と予測処理前の入力画像2との差分を符号化し出力する。差分が小さくなるほど画像の圧縮率は高くなる。   The differentiator 5 calculates the difference between the input image 2 and the prediction image 8 that is the prediction result, and outputs the difference value as a prediction error 80. Here, the predicted image 8 is an image generated based on the macroblock of the adjacent frame or the adjacent macroblock of the same frame in the inter-frame prediction process or the intra-frame prediction process. The image encoding device 1 encodes and outputs the difference between the predicted image 8 generated by each prediction process and the input image 2 before the prediction process. The smaller the difference, the higher the image compression rate.

DCT変換部3は予測誤差80を離散コサイン変換により周波数領域に変換する。量子化部10は変換したDCT係数値に対し、量子化ステップで除算した結果を整数値に丸める処理をする。   The DCT transform unit 3 transforms the prediction error 80 into the frequency domain by discrete cosine transform. The quantization unit 10 performs a process of rounding a result obtained by dividing the converted DCT coefficient value by the quantization step to an integer value.

可変長符号化部13は整数値に丸め込まれたDCT係数値のうち、出現頻度の高い情報を短い符号で表現し、出現頻度の低い情報を長い符号で表現することにより、全体として出力ビット数を減らす処理を行い、符号化データ19を出力する。   The variable length encoding unit 13 expresses information with high appearance frequency with a short code among DCT coefficient values rounded to an integer value, and expresses information with low appearance frequency with a long code, so that the number of output bits as a whole Is performed, and encoded data 19 is output.

逆量子化部17は量子化部10により量子化された予測誤差を逆量子化する。逆量子化した予測誤差は逆DCT変換部7により逆変換され、DCT係数値に変換される前の予測誤差81となる。   The inverse quantization unit 17 inversely quantizes the prediction error quantized by the quantization unit 10. The inversely quantized prediction error is inversely transformed by the inverse DCT transform unit 7 and becomes a prediction error 81 before being transformed into a DCT coefficient value.

加算部18はフレーム内予測部11又はフレーム間予測部12により生成された予測画像8と予測誤差81とを加算し画像16を出力する。画像16はフィルタ部9に入力される。フィルタ部9はデブロッキング・フィルタとも呼ばれ、画像16のブロックひずみを減少させる。フィルタ部9はブロックひずみ処理後の画像を復元画像15として出力する。復元画像15はフレーム間予測部12によるフレーム間予測処理の参照画像82として用いられる。   The adding unit 18 adds the prediction image 8 generated by the intra-frame prediction unit 11 or the inter-frame prediction unit 12 and the prediction error 81, and outputs an image 16. The image 16 is input to the filter unit 9. The filter unit 9 is also called a deblocking filter, and reduces block distortion of the image 16. The filter unit 9 outputs the image after the block distortion processing as a restored image 15. The restored image 15 is used as a reference image 82 for inter-frame prediction processing by the inter-frame prediction unit 12.

入力画像2が入力されると、フレーム間予測部12によりフレーム間予測処理が実行され、フレーム内予測部11によりフレーム内予測処理が実行される。判定部6はフレーム間予測処理結果およびフレーム内予測処理結果のうち最も入力画像2との差分値が小さい予測画像8を出力する。   When the input image 2 is input, the inter-frame prediction unit 12 executes an inter-frame prediction process, and the intra-frame prediction unit 11 executes an intra-frame prediction process. The determination unit 6 outputs the predicted image 8 having the smallest difference value from the input image 2 among the inter-frame prediction processing result and the intra-frame prediction processing result.

差分器5は生成された予測画像8と入力画像2との差分を計算し予測誤差80をDCT変換部3に出力する。予測誤差80はDCT変換部3により変換され量子化部10で量子化される。量子化された予測画像8は可変長符号化部13により符号化され、符号化データ19として出力される。
量子化部10は量子化した予測誤差を可変長符号化部13に出力すると共に、逆量子化部17へ出力する。逆量子化部17により逆量子化された予測誤差は逆DCT変換部7により周波数領域から時間領域に変換される。加算器18は時間領域に変換された予測誤差と判定部6から出力された予測画像8とを加算し、予測処理前の画像16を復号生成する。
The difference unit 5 calculates the difference between the generated predicted image 8 and the input image 2 and outputs a prediction error 80 to the DCT conversion unit 3. The prediction error 80 is converted by the DCT conversion unit 3 and quantized by the quantization unit 10. The quantized predicted image 8 is encoded by the variable length encoding unit 13 and output as encoded data 19.
The quantization unit 10 outputs the quantized prediction error to the variable length coding unit 13 and also outputs it to the inverse quantization unit 17. The prediction error inversely quantized by the inverse quantization unit 17 is converted from the frequency domain to the time domain by the inverse DCT transform unit 7. The adder 18 adds the prediction error converted to the time domain and the predicted image 8 output from the determination unit 6 to decode and generate the image 16 before the prediction process.

以上の動作により画像符号化装置1は、フレーム間予測処理とフレーム内予測処理によって動画を圧縮することが出来る。   With the above operation, the image encoding device 1 can compress the moving image by the inter-frame prediction process and the intra-frame prediction process.

図2は参照画素A、B、C、D、E、Fと補間画素30、31とのイメージ図である。参照画素A、B、C、D、E、Fは参照画像フレームの一部の色差画素である。本実施例において補間画素30、31は色差データである。補間画素30は近接する参照画素A、B、C、Dを1/8画素精度で線形補間して重み付けし生成する。補間画素31は近接する参照画素B、D、E、Fを1/8画素精度で線形補間して重み付けし生成する。H.264規格において参照画素A、B、C、D、E、Fは整数色差画素信号である。1/8画素精度とは、参照画素A、B間および参照画素A、C間を8分割した距離を最小単位として補間画素30、31を補間演算できることを示す。本実施例において参照画素間の分割数は8であるが、分割数が2の乗数であれば、画像処理回路は本発明と同等の実装面積縮小効果を奏することが出来る。補間画素30と補間画素31の計算方法は同じなので、以下補間画素30の計算方法についてのみ説明し、補間画素31についての説明を省略する。   FIG. 2 is an image diagram of the reference pixels A, B, C, D, E, and F and the interpolation pixels 30 and 31. Reference pixels A, B, C, D, E, and F are part of the color difference pixels of the reference image frame. In this embodiment, the interpolation pixels 30 and 31 are color difference data. The interpolation pixel 30 is generated by linearly interpolating adjacent reference pixels A, B, C, and D with 1/8 pixel accuracy and weighting. The interpolation pixel 31 is generated by linearly interpolating adjacent reference pixels B, D, E, and F with 1/8 pixel accuracy. H. In the H.264 standard, reference pixels A, B, C, D, E, and F are integer color difference pixel signals. The 1/8 pixel accuracy indicates that the interpolation pixels 30 and 31 can be interpolated with a distance obtained by dividing the reference pixels A and B and the reference pixels A and C into eight as a minimum unit. In this embodiment, the number of divisions between reference pixels is 8. However, if the number of divisions is a multiplier of 2, the image processing circuit can achieve a mounting area reduction effect equivalent to that of the present invention. Since the calculation method of the interpolation pixel 30 and the interpolation pixel 31 is the same, only the calculation method of the interpolation pixel 30 will be described below, and the description of the interpolation pixel 31 will be omitted.

図2において補間画素30の座標は参照画素Aを基準として定義されている。補間画素30は参照画素Aに対し、参照画素Bの方向へdx、参照画素Cの方向へdyの距離に位置する。ここでdx、dyはそれぞれ0から7の整数であり、重み付け係数と呼ばれる。重み付け係数dx、dyは動き検出回路20で算出された動きベクトルに基づいて動き検出回路20から画像処理回路21へ出力される。   In FIG. 2, the coordinates of the interpolation pixel 30 are defined with reference to the reference pixel A. The interpolation pixel 30 is located at a distance of dx in the direction of the reference pixel B and dy in the direction of the reference pixel C with respect to the reference pixel A. Here, dx and dy are integers from 0 to 7 and are called weighting coefficients. The weighting coefficients dx and dy are output from the motion detection circuit 20 to the image processing circuit 21 based on the motion vector calculated by the motion detection circuit 20.

dx、dyに基づく補間画素の位置は参照画素に対する重み付けのために仮想的に設定された位置であり、実際の画面上で補間画素が表示される位置とは異なる。行方向の重み付け係数dxは行方向上の参照画素A、Bと補間画素30との位置関係から決定される。列方向の重み付け係数dyは列方向上の参照画素A、Cと補間画素30との位置関係から決定される。   The position of the interpolation pixel based on dx and dy is a position virtually set for weighting the reference pixel, and is different from the position where the interpolation pixel is displayed on the actual screen. The weighting coefficient dx in the row direction is determined from the positional relationship between the reference pixels A and B and the interpolation pixel 30 in the row direction. The weighting coefficient dy in the column direction is determined from the positional relationship between the reference pixels A and C and the interpolation pixel 30 in the column direction.

図2の条件において、補間画素30の色差データは、補間画素30={(8−dx)×(8−dy)×A+dx×(8−dy)×B+(8−dx)×dy×C+dx×dy×D+32}>>6として計算される。ここで‘>>’は右方向にビットシフトする演算を示し、‘>>6’は6ビット右シフト演算することを示す。   In the condition of FIG. 2, the color difference data of the interpolation pixel 30 is: interpolation pixel 30 = {(8−dx) × (8−dy) × A + dx × (8−dy) × B + (8−dx) × dy × C + dx × It is calculated as dy × D + 32} >> 6. Here, ‘>>’ indicates a right bit shift operation, and ‘>> 6’ indicates a 6 bit right shift operation.

より乗算回数が少なくなるように補間画素30の演算式を見直すと、補間画素30={64×A―8×dx×(A−B)―8×dy×(A−C)+dx×dy×(A+D−B−C)+32}>>6と変形することが出来る。これにより、‘dx×dy’と‘(A+D−B−C)’との乗算部分以外の乗算は上記乗算部およびシフト演算部で演算することが出来る。また式の変形前は重み付け係数dx、dyおよび参照画素A、B、C、Dとの乗算の回数が8回で合ったのに対し、式の変形後は乗算回数が4回になっている。乗算を実行する乗算器は回路規模が大きい。式の変形により重み付け係数dx、dy間の乗算回数を減らし、より実装面積の小さい画像処理回路を実現することが出来る。   When the arithmetic expression of the interpolation pixel 30 is reconsidered so that the number of multiplications becomes smaller, the interpolation pixel 30 = {64 × A−8 × dx × (AB) −8 × dy × (AC) + dx × dy × (A + D-B-C) +32} >> 6. As a result, multiplications other than the multiplication part of ‘dx × dy’ and ‘(A + D−B−C)’ can be performed by the multiplication unit and the shift operation unit. In addition, the number of multiplications with the weighting coefficients dx, dy and the reference pixels A, B, C, D matches 8 times before the equation is modified, whereas the number of multiplications is 4 after the equation is modified. . A multiplier that performs multiplication has a large circuit scale. By modifying the formula, the number of multiplications between the weighting coefficients dx and dy can be reduced, and an image processing circuit with a smaller mounting area can be realized.

なお、本実施例は参照画素Aを基準としているが、参照画素B、C、Dを基準としても同様の計算により補間画素30を求めることが出来る。   Although the present embodiment uses the reference pixel A as a reference, the interpolation pixel 30 can be obtained by the same calculation using the reference pixels B, C, and D as a reference.

図3は画像処理回路21の詳細ブロック図である。画像処理回路21は乗算部41、2つの画素演算部54、55を有する。本実施例において画素演算部は2つだが、同等の回路を複数用意し、複数の補間画素を同時に演算できるようにしても良い。   FIG. 3 is a detailed block diagram of the image processing circuit 21. The image processing circuit 21 includes a multiplication unit 41 and two pixel calculation units 54 and 55. In this embodiment, although there are two pixel calculation units, a plurality of equivalent circuits may be prepared so that a plurality of interpolation pixels can be calculated simultaneously.

乗算部41は動き検出回路20から受信した重み付け係数dx、dyに基づいて新たな重み付け係数‘dx×dy’を生成する演算部として機能する。乗算部41は重み付け係数dxと重み付け係数dyを乗算し、重み付け係数‘dx×dy’を出力する。重み付け係数dx、dyはそれぞれ整数である。   The multiplication unit 41 functions as a calculation unit that generates a new weighting coefficient “dx × dy” based on the weighting coefficients dx and dy received from the motion detection circuit 20. The multiplier 41 multiplies the weighting coefficient dx and the weighting coefficient dy and outputs a weighting coefficient 'dx × dy'. The weighting coefficients dx and dy are integers.

画素演算部54は参照画素A、B、C、D、重み付け係数dx、dy、‘dx×dy’を入力とし、補間画素30を出力する。画素演算部55は参照画素B、D、E、F、重み付け係数dx、dy、‘dx×dy’を入力とし、補間画素31を出力する。それぞれの画素演算部54、55は演算部93、94、95を有する。画素演算部54、55は同一構成を有するので、以下には画素演算部54のみを詳細に説明し、画素演算部55についての説明を省略する。   The pixel calculation unit 54 inputs the reference pixels A, B, C, and D, the weighting coefficients dx, dy, and “dx × dy”, and outputs the interpolation pixel 30. The pixel calculation unit 55 inputs the reference pixels B, D, E, and F, the weighting coefficients dx, dy, and “dx × dy”, and outputs the interpolation pixel 31. Each pixel calculation unit 54, 55 has calculation units 93, 94, 95. Since the pixel calculation units 54 and 55 have the same configuration, only the pixel calculation unit 54 will be described in detail below, and description of the pixel calculation unit 55 will be omitted.

演算部93は重み付け係数dxに乗ずる数と、重み付け係数dyに乗ずる数と、重み付け係数‘dx×dy’に乗ずる数とを参照画素の画素値から減算により求める。演算部93は減算部42、43、44、45を有する。   The calculation unit 93 obtains the number by which the weighting coefficient dx is multiplied, the number by which the weighting coefficient dy is multiplied, and the number by which the weighting coefficient ‘dx × dy’ is multiplied by subtraction from the pixel value of the reference pixel. The calculation unit 93 includes subtraction units 42, 43, 44 and 45.

減算部42は参照画素Aから参照画素Aの行方向上の参照画素Bを減算し、定数‘A−B’を出力する。減算部43は参照画素Aから参照画素Aの列方向上の参照画素Cを減算し、定数‘A−C’を出力する。減算部44は参照画素Cから参照画素Cの行方向上の参照画素Dを減算し、定数‘C−D’を出力する。減算部45は定数‘A―B’から定数‘C―D’を減算することにより、補間画素30の補間演算に用いる参照画素A、B、C、Dから定数‘A+D−B−C’を演算する。参照画素A、B、C、Dはそれぞれ整数値であるため、その加減算結果も整数値となる。   The subtracting unit 42 subtracts the reference pixel B in the row direction of the reference pixel A from the reference pixel A, and outputs a constant ‘A−B’. The subtracting unit 43 subtracts the reference pixel C in the column direction of the reference pixel A from the reference pixel A, and outputs a constant ‘A−C’. The subtracting unit 44 subtracts the reference pixel D in the row direction of the reference pixel C from the reference pixel C, and outputs a constant 'C-D'. The subtracting unit 45 subtracts the constant “C−D” from the constant “A−B”, thereby obtaining the constant “A + D−B−C” from the reference pixels A, B, C, and D used for the interpolation calculation of the interpolation pixel 30. Calculate. Since each of the reference pixels A, B, C, and D has an integer value, the addition / subtraction result also has an integer value.

演算部94は重み付け係数dxと定数‘A−B’を乗算し、重み付け係数dyと定数‘A−C’を乗算し、重み付け係数‘dx×dy’と定数‘A+D−B−C’を乗算する。演算部94は乗算部41、46、47、48を有する。   The arithmetic unit 94 multiplies the weighting coefficient dx and the constant “A−B”, multiplies the weighting coefficient dy and the constant “A−C”, and multiplies the weighting coefficient “dx × dy” and the constant “A + DBC”. To do. The calculation unit 94 includes multiplication units 41, 46, 47 and 48.

乗算部46は定数‘A−B’に応じて重み付け係数dx当りの画素変化量を演算する演算部として機能する。乗算部46は重み付け係数dxと定数‘A−B’とを乗算し‘dx×(A−B)’を出力する。乗算部47は定数‘A−C’に応じて重み付け係数dy当りの画素変化量を演算する演算部として機能する。乗算部47は重み付け係数dyと定数‘A−C’とを乗算し‘dy×(A−C)’を出力する。乗算部46は定数‘A+D−B−C’に応じて重み付け係数‘dx×dy’当りの画素変化量を演算する演算部として機能する。乗算部48は重み付け係数‘dx×dy’と定数‘A+D−B−C’とを乗算し‘dx×dy×(A+D−B−C)’を出力する。   The multiplication unit 46 functions as a calculation unit that calculates the pixel change amount per weighting coefficient dx according to the constant “A−B”. The multiplier 46 multiplies the weighting coefficient dx and the constant “A−B” and outputs “dx × (A−B)”. The multiplication unit 47 functions as a calculation unit that calculates a pixel change amount per weighting coefficient dy according to the constant “A−C”. The multiplication unit 47 multiplies the weighting coefficient dy and the constant “A−C” and outputs “dy × (A−C)”. The multiplication unit 46 functions as a calculation unit that calculates a pixel change amount per weighting coefficient “dx × dy” according to the constant “A + D−B−C”. The multiplier 48 multiplies the weighting coefficient ‘dx × dy’ and the constant ‘A + D−B−C’ and outputs ‘dx × dy × (A + D−B−C)’.

演算部95は演算部94の演算結果に基づいて補間画素30を計算する。演算部95はシフト演算部49、50、51、53、加減算部52を有する。   The calculation unit 95 calculates the interpolation pixel 30 based on the calculation result of the calculation unit 94. The calculation unit 95 includes shift calculation units 49, 50, 51, 53 and an addition / subtraction unit 52.

シフト演算部49は参照画素Aを左へ6ビットシフトさせ、シフト演算結果である‘64×A’を出力する。シフト演算部50は‘dx×(A−B)’を左に3ビットシフトさせ、シフト演算結果である‘8×dx×(A−B)’を出力する。シフト演算部51は‘dy×(A−C)’を左に3ビットシフトさせ、シフト演算結果である‘8×dy×(A−C)’を出力する。   The shift calculation unit 49 shifts the reference pixel A 6 bits to the left, and outputs “64 × A” as the shift calculation result. The shift calculation unit 50 shifts ‘dx × (A−B)’ to the left by 3 bits, and outputs ‘8 × dx × (A−B)’, which is a shift calculation result. The shift calculation unit 51 shifts ‘dy × (A−C)’ to the left by 3 bits, and outputs ‘8 × dy × (A−C)’ as the shift calculation result.

加減算部52はシフト演算部49の出力と乗算部48の出力と定数‘32’との加算結果から、シフト演算部50の出力とシフト演算部51の出力との加算結果を減算し、その加減算結果である‘64×A―8×dx×(A−B)―8×dy×(A−C)+dx×dy×(A+D−B−C)+32’を出力する。   The addition / subtraction unit 52 subtracts the addition result of the output of the shift calculation unit 50 and the output of the shift calculation unit 51 from the addition result of the output of the shift calculation unit 49, the output of the multiplication unit 48, and the constant '32', and the addition / subtraction As a result, “64 × A−8 × dx × (A−B) −8 × dy × (A−C) + dx × dy × (A + D−B−C) +32” is output.

シフト演算部53は加減算部52の出力を右へ6ビットシフトさせ、シフト演算結果である‘{64×A―8×dx×(A−B)―8×dy×(A−C)+dx×dy×(A+D−B−C)+32}>>6’を補間画素30として出力する。   The shift calculation unit 53 shifts the output of the addition / subtraction unit 52 to the right by 6 bits, and the result of the shift calculation is' {64 × A−8 × dx × (AB) −8 × dy × (AC) + dx × dy × (A + D−B−C) +32} >> 6 ′ is output as the interpolation pixel 30.

以上の通り、変形後の演算式で回路を構成することにより、より少ない乗算部で補間画素30を計算することが出来る。さらに後述する乗算部を用いることにより、画像処理回路の実装面積をより小さくすることができる。   As described above, the interpolation pixel 30 can be calculated with fewer multiplication units by configuring the circuit with the modified arithmetic expression. Furthermore, the mounting area of the image processing circuit can be further reduced by using a multiplier described later.

重み付け係数dx、dyは0から7までの整数である。よって重み付け係数dx、dyとの乗算を行う乗算部は回路規模の大きい乗算器を使うことなく、加算器とシフト演算器との組み合わせで実現することができる。また色差データの動き補償演算においては、参照画素間を2の乗数である‘8’で割った長さを最小単位とし、参照画素に対して補間画素を位置決めする。よって補間画素の重み付け演算において重み付け係数は2の乗数となる。2の乗数との乗算はビットシフト演算を実行するシフト演算部で実現することが出来る。   The weighting coefficients dx and dy are integers from 0 to 7. Therefore, the multiplication unit that performs multiplication with the weighting coefficients dx and dy can be realized by a combination of an adder and a shift calculator without using a multiplier having a large circuit scale. In the motion compensation calculation of the color difference data, the interpolation pixel is positioned with respect to the reference pixel with the length obtained by dividing the interval between the reference pixels by “8” which is a multiplier of 2 as a minimum unit. Therefore, the weighting coefficient is a multiplier of 2 in the interpolation pixel weighting calculation. Multiplication with a multiplier of 2 can be realized by a shift operation unit that performs a bit shift operation.

図4は乗算部46の詳細ブロック図である。図4のAは乗算部46のブロック図を示し、図4のBは乗算部46の制御部60における制御テーブル71を示す。   FIG. 4 is a detailed block diagram of the multiplication unit 46. 4A shows a block diagram of the multiplication unit 46, and FIG. 4B shows a control table 71 in the control unit 60 of the multiplication unit 46.

乗算部46は制御部60、シフト回路96、97、加減算部67を有する。シフト回路96、97は整数‘dx’を2つの2の乗数に分割し、分割した2つの2の乗数の各々の指数に応じて他方の整数である‘A−B’をビットシフトする。   The multiplication unit 46 includes a control unit 60, shift circuits 96 and 97, and an addition / subtraction unit 67. The shift circuits 96 and 97 divide the integer ‘dx’ into two 2 multipliers, and bit-shift the other integer ‘A−B’ according to the exponents of the two divided 2 multipliers.

制御部60は整数‘dx’を2つの2の乗数に分割した後のそれぞれの指数に応じてシフト回路96、97のシフト数を設定し、シフト回路96、97シフト演算結果を組み合わせるように加減算部67を制御する。制御部60は図4のBに示す制御テーブル71を記憶する。制御部60は入力信号‘dx’の整数値に応じてマルチプレクサ64、66、加減算部67に対し制御信号68、69、70を出力する。   The control unit 60 sets the number of shifts of the shift circuits 96 and 97 according to the respective exponents after dividing the integer 'dx' into two 2's multipliers, and performs addition / subtraction to combine the shift circuit 96 and 97 shift operation results. The unit 67 is controlled. The control unit 60 stores a control table 71 shown in FIG. The control unit 60 outputs control signals 68, 69, and 70 to the multiplexers 64 and 66 and the addition / subtraction unit 67 according to the integer value of the input signal ‘dx’.

シフト回路96はシフト演算部61、62、63、マルチプレクサ64を有する。シフト回路97はシフト演算部65、マルチプレクサ66を有する。   The shift circuit 96 includes shift calculation units 61, 62, 63 and a multiplexer 64. The shift circuit 97 includes a shift calculation unit 65 and a multiplexer 66.

乗算部46に入力された‘A−B’は、マルチプレクサ64、66、シフト演算部61、62、63、65に入力される。シフト演算部61、65は入力された‘A−B’を1ビット左シフトさせて出力する。シフト演算部62は入力された‘A−B’を2ビット左シフトさせて出力する。シフト演算部63は入力された‘A−B’を3ビット左シフトさせて出力する。   ‘A−B’ input to the multiplication unit 46 is input to the multiplexers 64 and 66 and the shift calculation units 61, 62, 63 and 65. The shift calculation units 61 and 65 shift the input 'A-B' to the left by 1 bit and output it. The shift operation unit 62 shifts the inputted 'A-B' by 2 bits to the left and outputs it. The shift calculation unit 63 shifts the inputted 'A-B' to the left by 3 bits and outputs it.

マルチプレクサ64は入力端子0から4に入力された信号のうち、制御信号68の値に応じて1つの入力信号を選択し出力する。制御信号68は5つの入力端子のうちいずれかを指定可能な、例えば3ビットの信号である。マルチプレクサ66は入力端子0から2に入力された信号のうち、制御信号69の値に応じて1つの入力信号を選択し出力する。制御信号69は3つの入力端子のうちいずれかを指定可能な、例えば2ビットの信号である。   The multiplexer 64 selects and outputs one input signal according to the value of the control signal 68 among the signals input to the input terminals 0 to 4. The control signal 68 is, for example, a 3-bit signal that can designate any of the five input terminals. The multiplexer 66 selects and outputs one input signal according to the value of the control signal 69 among the signals input from the input terminals 0 to 2. The control signal 69 is, for example, a 2-bit signal that can designate any of the three input terminals.

ビットシフト数を可変にするため、本実施例では複数のシフト演算部の出力をマルチプレクサで切り替えて選択しているが、制御信号によってビットシフト数を可変にするシフト演算部により実現することも出来る。   In order to make the number of bit shifts variable, in this embodiment, the outputs of a plurality of shift operation units are selected by switching with a multiplexer, but it can also be realized by a shift operation unit that makes the number of bit shifts variable by a control signal. .

加減算部67は複数のマルチプレクサ64、66から出力されるシフト後の複数の参照画素を重み付け係数‘dx’と参照画素との乗算値に対応させて加減算する。加減算部67は制御信号70の値に応じてマルチプレクサ64、66から出力された値を加算または減算し、その結果を出力する。   The addition / subtraction unit 67 adds / subtracts the plurality of shifted reference pixels output from the plurality of multiplexers 64 and 66 according to the multiplication value of the weighting coefficient ‘dx’ and the reference pixel. The adder / subtractor 67 adds or subtracts the values output from the multiplexers 64 and 66 according to the value of the control signal 70, and outputs the result.

図4のBは制御部60に記憶された制御テーブル71である。制御テーブル71において、列72は乗算部46に入力される‘dx’の値である。   4B is a control table 71 stored in the control unit 60. FIG. In the control table 71, a column 72 is a value of “dx” input to the multiplication unit 46.

列73は‘dx’の値に応じて制御部60から出力される制御信号68の値である。マルチプレクサ64は制御信号68の値に対応した入力端子から入力される信号を選択し出力する。   A column 73 is a value of the control signal 68 output from the control unit 60 according to the value of “dx”. The multiplexer 64 selects and outputs a signal input from the input terminal corresponding to the value of the control signal 68.

列74は‘dx’の値に応じて制御部60から出力される制御信号69の値である。マルチプレクサ66は制御信号69の値に対応した入力端子から入力される信号を選択し出力する。   A column 74 is a value of the control signal 69 output from the control unit 60 in accordance with the value of “dx”. The multiplexer 66 selects and outputs a signal input from the input terminal corresponding to the value of the control signal 69.

列75は‘dx’の値に応じて制御部60から出力される制御信号70の値である。加減算部67は制御信号が‘0’の場合はマルチプレクサ64の出力値にマルチプレクサ66の出力値を加算し、制御信号が‘1’の場合はマルチプレクサ64の出力値からマルチプレクサ66の出力値を減算する。   A column 75 is a value of the control signal 70 output from the control unit 60 according to the value of “dx”. The adder / subtractor 67 adds the output value of the multiplexer 66 to the output value of the multiplexer 64 when the control signal is “0”, and subtracts the output value of the multiplexer 66 from the output value of the multiplexer 64 when the control signal is “1”. To do.

列76は‘dx’の値に応じて加減算部67から出力される値である。加減算部67から出力される値は乗算部46に入力される‘dx’と‘A−B’との乗算値に対応する。   A column 76 is a value output from the adder / subtractor 67 according to the value of “dx”. The value output from the adder / subtractor 67 corresponds to the multiplied value of ‘dx’ and ‘A−B’ input to the multiplier 46.

例えば‘dx’が‘0’の場合、制御部60は制御信号68として‘0’を出力し、制御信号69として‘0’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子0の入力値‘0’を出力し、マルチプレクサ66は入力端子0の入力値‘0’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘0’を出力する。   For example, when ‘dx’ is ‘0’, the control unit 60 outputs ‘0’ as the control signal 68, outputs ‘0’ as the control signal 69, and outputs ‘0’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “0” at the input terminal 0, the multiplexer 66 outputs the input value “0” at the input terminal 0, and the adder / subtractor 67 adds the output values from the multiplexers 64 and 66. '0' is output.

‘dx’が‘1’の場合、制御部60は制御信号68として‘1’を出力し、制御信号69として‘0’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子1の入力値‘A−B’を出力し、マルチプレクサ66は入力端子0の入力値‘0’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘A−B’を出力する。   When ‘dx’ is ‘1’, the control unit 60 outputs ‘1’ as the control signal 68, outputs ‘0’ as the control signal 69, and outputs ‘0’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “A−B” of the input terminal 1, the multiplexer 66 outputs the input value “0” of the input terminal 0, and the adder / subtractor 67 adds the output values from the multiplexers 64 and 66. The result “A-B” is output.

‘dx’が‘2’の場合、制御部60は制御信号68として‘2’を出力し、制御信号69として‘0’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子2の入力値‘(A−B)<<1’を出力し、マルチプレクサ66は入力端子0の入力値‘0’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘(A−B)<<1’を出力する。   When ‘dx’ is ‘2’, the control unit 60 outputs ‘2’ as the control signal 68, outputs ‘0’ as the control signal 69, and outputs ‘0’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “(A−B) << 1” of the input terminal 2, the multiplexer 66 outputs the input value “0” of the input terminal 0, and the adder / subtractor 67 receives from the multiplexers 64 and 66. '(AB) << 1' is output as a result of adding the output values of.

‘dx’が‘3’の場合、制御部60は制御信号68として‘2’を出力し、制御信号69として‘1’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子2の入力値‘(A−B)<<1’を出力し、マルチプレクサ66は入力端子1の入力値‘A−B’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘((A−B)<<1)+(A−B)’を出力する。   When ‘dx’ is ‘3’, the control unit 60 outputs ‘2’ as the control signal 68, outputs ‘1’ as the control signal 69, and outputs ‘0’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “(A−B) << 1” of the input terminal 2, the multiplexer 66 outputs the input value “A−B” of the input terminal 1, and the adder / subtractor 67 includes the multiplexer 64, '((A−B) << 1) + (A−B)', which is the result of adding the output values from 66, is output.

‘dx’が‘4’の場合、制御部60は制御信号68として‘3’を出力し、制御信号69として‘0’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子3の入力値‘(A−B)<<2’を出力し、マルチプレクサ66は入力端子0の入力値‘0’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘(A−B)<<2’を出力する。   When ‘dx’ is ‘4’, the control unit 60 outputs ‘3’ as the control signal 68, outputs ‘0’ as the control signal 69, and outputs ‘0’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “(A−B) << 2” of the input terminal 3, the multiplexer 66 outputs the input value “0” of the input terminal 0, and the adder / subtractor 67 receives from the multiplexers 64 and 66. '(AB) << 2' is output as a result of adding the output values of.

‘dx’が‘5’の場合、制御部60は制御信号68として‘3’を出力し、制御信号69として‘1’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子3の入力値‘(A−B)<<2’を出力し、マルチプレクサ66は入力端子1の入力値‘A−B’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘((A−B)<<2)+(A−B)’を出力する。   When ‘dx’ is ‘5’, the control unit 60 outputs ‘3’ as the control signal 68, outputs ‘1’ as the control signal 69, and outputs ‘0’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “(A−B) << 2” of the input terminal 3, the multiplexer 66 outputs the input value “A−B” of the input terminal 1, and the adder / subtractor 67 includes the multiplexer 64, '((A−B) << 2) + (A−B)', which is the result of adding the output values from 66, is output.

‘dx’が‘6’の場合、制御部60は制御信号68として‘3’を出力し、制御信号69として‘2’を出力し、制御信号70として‘0’を出力する。これによりマルチプレクサ64は入力端子3の入力値‘(A−B)<<2’を出力し、マルチプレクサ66は入力端子2の入力値‘(A−B)<<1’を出力し、加減算部67はマルチプレクサ64、66からの出力値を加算した結果である‘((A−B)<<2)+((A−B)<<1)’を出力する。   When ‘dx’ is ‘6’, the control unit 60 outputs ‘3’ as the control signal 68, ‘2’ as the control signal 69, and ‘0’ as the control signal 70. Thereby, the multiplexer 64 outputs the input value '(AB) << 2' of the input terminal 3, the multiplexer 66 outputs the input value '(AB) << 1' of the input terminal 2, and the addition / subtraction unit 67 outputs “((A−B) << 2) + ((A−B) << 1)”, which is the result of adding the output values from the multiplexers 64 and 66.

‘dx’が‘7’の場合、制御部60は制御信号68として‘4’を出力し、制御信号69として‘1’を出力し、制御信号70として‘1’を出力する。これによりマルチプレクサ64は入力端子4の入力値‘(A−B)<<3’を出力し、マルチプレクサ66は入力端子1の入力値‘A−B’を出力し、加減算部67はマルチプレクサ64の出力からマルチプレクサ66の出力値を減算した結果である‘((A−B)<<3)−(A−B)’を出力する。   When ‘dx’ is ‘7’, the control unit 60 outputs ‘4’ as the control signal 68, outputs ‘1’ as the control signal 69, and outputs ‘1’ as the control signal 70. As a result, the multiplexer 64 outputs the input value “(A−B) << 3” of the input terminal 4, the multiplexer 66 outputs the input value “A−B” of the input terminal 1, and the adder / subtractor 67 '((A−B) << 3) − (A−B)', which is a result of subtracting the output value of the multiplexer 66 from the output, is output.

以上の通り乗算部46はシフト演算部と加減算部との組み合わせにより実装することができる。   As described above, the multiplication unit 46 can be implemented by a combination of the shift calculation unit and the addition / subtraction unit.

乗算部41も乗算部46と同様に図4の通り加減算とシフト演算との組み合わせに置換することが出来る。より具体的には図4の‘A−B’を‘dy’に置換することにより、dx×dyの演算を行うことが出来る。   Similarly to the multiplication unit 46, the multiplication unit 41 can be replaced with a combination of addition / subtraction and shift operation as shown in FIG. More specifically, dx × dy can be calculated by replacing “A-B” in FIG. 4 with “dy”.

図5は従来技術によるゲート数と本実施例によるゲート数との比較テーブルである。1つ当りのゲートの実装面積が同じ場合、ゲート数が大きいほど実装面積は大きくなる。図5において、行90は乗算部1つ当りのゲート数の比較であり、行91は画像処理回路におけるゲート数の比較である。   FIG. 5 is a comparison table of the number of gates according to the prior art and the number of gates according to the present embodiment. When the mounting area of one gate is the same, the mounting area increases as the number of gates increases. In FIG. 5, row 90 is a comparison of the number of gates per multiplication unit, and row 91 is a comparison of the number of gates in the image processing circuit.

図5より、乗算器を8ビットの画素の乗算を本実施例に係る乗算部で実現することにより、従来の8ビット乗算器を用いる場合に比べてゲート数を64%削減することが出来る。また、画像処理回路全体で実装面積を35%削減することが出来る。   As shown in FIG. 5, the multiplication of the 8-bit pixel is realized by the multiplication unit according to this embodiment, whereby the number of gates can be reduced by 64% compared to the case of using the conventional 8-bit multiplier. Also, the mounting area of the entire image processing circuit can be reduced by 35%.

1 画像符号化装置
2 入力画像
11 フレーム内予測部
12 フレーム間予測部
20 動き検出回路
21 画像処理回路
22 動きベクトル
30 補間画素
41、46、47、48 乗算部
49、50、51、53 シフト演算部
61、62、63、65 シフト演算部
60 制御部
64、66 マルチプレクサ
67 加減算部
DESCRIPTION OF SYMBOLS 1 Image coding apparatus 2 Input image 11 Intra-frame prediction part 12 Inter-frame prediction part 20 Motion detection circuit 21 Image processing circuit 22 Motion vector 30 Interpolation pixel 41, 46, 47, 48 Multiplication part 49, 50, 51, 53 Shift calculation Units 61, 62, 63, 65 Shift calculation unit 60 Control unit 64, 66 Multiplexer 67 Addition / subtraction unit

Claims (3)

補間画素を囲む行列状に配置された複数の画素のうち行方向上の複数の該画素の画素値から演算される第一定数と、該補間画素を囲む列方向上の複数の該画素の画素値から演算される第二定数と、該補間画素を囲む該複数の画素の画素値から演算される第三定数とを求める第一演算部と、
行方向上の複数の該画素に対する該補間画素の位置から決定される第一重み付け係数と列方向上の複数の該画素に対する該補間画素の位置から決定される第二重み付け係数を演算し第三重み付け係数を求める第二演算部と、
該第一定数に応じて該第一重み付け係数当りの画素値変化量を演算する第三演算部と、
該第二定数に応じて該第二重み付け係数当りの画素値変化量を演算する第四演算部と、
該第三定数に応じて該第三重み付け係数当りの画素値変化量を演算する第五演算部と、
該第三、該第四、および該第五演算部の演算結果に基づいて該補間画素の画素値を演算する第六演算部と
を有する画像処理回路。
A first constant calculated from pixel values of a plurality of pixels in the row direction among a plurality of pixels arranged in a matrix surrounding the interpolation pixel, and a plurality of pixels in the column direction surrounding the interpolation pixel A first calculation unit for obtaining a second constant calculated from a value and a third constant calculated from pixel values of the plurality of pixels surrounding the interpolation pixel;
A third weighting is calculated by calculating a first weighting coefficient determined from the position of the interpolation pixel for the plurality of pixels in the row direction and a second weighting coefficient determined from the position of the interpolation pixel for the plurality of pixels in the column direction. A second calculation unit for obtaining a coefficient;
A third calculation unit for calculating a pixel value change amount per the first weighting coefficient according to the first constant;
A fourth calculation unit for calculating a pixel value change amount per the second weighting coefficient according to the second constant;
A fifth calculation unit for calculating a pixel value change amount per the third weighting coefficient according to the third constant;
An image processing circuit comprising: a sixth calculation unit that calculates a pixel value of the interpolation pixel based on calculation results of the third, fourth, and fifth calculation units.
該第二、該第三、または該第四演算部は、整数値である該第一重み付け係数、該第二重み付け係数、該第一定数、および該第二定数のうちいずれか2つを入力値とし、
一方の該入力値を2の乗数に分割し、該2の乗数各々の指数に応じて他方の該入力値をビットシフトする第一シフト回路および第二シフト回路と、
該指数に応じて該第一シフト回路および該第二シフト回路のシフト数を設定し、該第一シフト回路および該第二シフト回路のシフト演算結果を組み合わせる制御部と
を有する、請求項1に記載の画像処理回路。
The second, the third, or the fourth operation unit calculates any two of the first weighting coefficient, the second weighting coefficient, the first constant, and the second constant that are integer values. As an input value,
A first shift circuit and a second shift circuit for dividing one of the input values into a multiplier of 2 and bit-shifting the other input value according to an index of each of the two multipliers;
A control unit configured to set the number of shifts of the first shift circuit and the second shift circuit according to the exponent and to combine the shift operation results of the first shift circuit and the second shift circuit. The image processing circuit described.
補間画素を囲む行列状に配置された複数の画素のうち行方向上の複数の該画素の画素値から演算される第一定数と、該補間画素を囲む列方向上の複数の該画素の画素値から演算される第二定数と、該補間画素を囲む該複数の画素の画素値から演算される第三定数とを求める第一演算部と、
行方向上の複数の該画素に対する該補間画素の位置から決定される第一重み付け係数と、列方向上の複数の該画素に対する該補間画素の位置から決定される第二重み付け係数を演算し第三重み付け係数を求める第二演算部と、
該第一定数に応じて該第一重み付け係数当りの画素値変化量を演算する第三演算部と、
該第二定数に応じて該第二重み付け係数当りの画素値変化量を演算する第四演算部と、
該第三定数に応じて該第三重み付け係数当りの画素値変化量を演算する第五演算部と、
該第三、該第四、および該第五演算部の演算結果に基づいて該補間画素の画素値を演算する第六演算部と、
該補間画素と元の入力画素との差分値を計算する差分器と、
該差分値を離散コサイン変換する離散コサイン変換部と、
該離散コサイン変換された該差分値を可変長符号化する可変長符号化部と
を有する画像符号化装置。
A first constant calculated from pixel values of a plurality of pixels in the row direction among a plurality of pixels arranged in a matrix surrounding the interpolation pixel, and a plurality of pixels in the column direction surrounding the interpolation pixel A first calculation unit for obtaining a second constant calculated from a value and a third constant calculated from pixel values of the plurality of pixels surrounding the interpolation pixel;
A first weighting coefficient determined from the position of the interpolation pixel with respect to the plurality of pixels in the row direction and a second weighting coefficient determined from the position of the interpolation pixel with respect to the plurality of pixels in the column direction are calculated and a third A second calculation unit for obtaining a weighting coefficient;
A third calculation unit for calculating a pixel value change amount per the first weighting coefficient according to the first constant;
A fourth calculation unit for calculating a pixel value change amount per the second weighting coefficient according to the second constant;
A fifth calculation unit for calculating a pixel value change amount per the third weighting coefficient according to the third constant;
A sixth calculation unit that calculates the pixel value of the interpolation pixel based on the calculation results of the third, fourth, and fifth calculation units;
A differentiator for calculating a difference value between the interpolated pixel and the original input pixel;
A discrete cosine transform unit for performing a discrete cosine transform on the difference value;
An image coding apparatus comprising: a variable-length coding unit that performs variable-length coding on the difference value subjected to the discrete cosine transform.
JP2009211979A 2009-09-14 2009-09-14 Image processing circuit and image encoding apparatus Expired - Fee Related JP5287624B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009211979A JP5287624B2 (en) 2009-09-14 2009-09-14 Image processing circuit and image encoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009211979A JP5287624B2 (en) 2009-09-14 2009-09-14 Image processing circuit and image encoding apparatus

Publications (2)

Publication Number Publication Date
JP2011061704A JP2011061704A (en) 2011-03-24
JP5287624B2 true JP5287624B2 (en) 2013-09-11

Family

ID=43948787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009211979A Expired - Fee Related JP5287624B2 (en) 2009-09-14 2009-09-14 Image processing circuit and image encoding apparatus

Country Status (1)

Country Link
JP (1) JP5287624B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04266281A (en) * 1991-02-21 1992-09-22 Seiko Epson Corp Hardware configuration of digital filter for interpolation
JPH1049348A (en) * 1996-08-05 1998-02-20 Toshiba Corp Integer multiplier
JP2007060699A (en) * 2002-01-18 2007-03-08 Toshiba Corp Video encoding method, apparatus, and program
US7653132B2 (en) * 2004-12-21 2010-01-26 Stmicroelectronics, Inc. Method and system for fast implementation of subpixel interpolation
EP1851718A2 (en) * 2005-02-25 2007-11-07 Matsushita Electric Industrial Co., Ltd. Pixel interpolating method and device
JP5698428B2 (en) * 2006-11-08 2015-04-08 三星電子株式会社Samsung Electronics Co.,Ltd. Motion compensation method, recording medium, and motion compensation device

Also Published As

Publication number Publication date
JP2011061704A (en) 2011-03-24

Similar Documents

Publication Publication Date Title
KR101354741B1 (en) Resampling and picture resizing operations for multi-resolution video coding and decoding
CN112929661B (en) Decoding Method and Encoding Method
CN100452668C (en) Method and system for selecting interpolation filter type in video coding
KR100982156B1 (en) Error reduction during calculation of inverse discrete cosine transform
EP1359763B1 (en) Approximate bicubic filter
EP3448038B1 (en) Decoding method for intra predicting a block by first predicting the pixels at the boundary
KR102939858B1 (en) Matrix-based intra prediction
CN107105263B (en) Video decoding method and apparatus for motion compensation performed under inter prediction
JP2013534795A5 (en)
JP2013534795A (en) Variable local bit depth increase for fixed-point conversion in video coding
US10158880B2 (en) Method and apparatus for encoding/decoding video using high-precision filter
JP2006140758A (en) Moving picture coding method, moving picture coding apparatus, and moving picture coding program
CN101335893A (en) Efficient encoding/decoding of sequences of data frames
KR20090043353A (en) Image Encoding / Decoding Method and Device Using Diffusion Characteristics of Image
CN114009044A (en) Simplified downsampling for matrix-based intra prediction
JP2024178354A (en) Image component prediction method, encoder, decoder and storage medium
JPWO2009157581A1 (en) Image processing apparatus and image processing method
KR20250034918A (en) Encoding and decoding method, apparatus, encoding device, decoding device and recording medium
CN114982228B (en) Inter-frame prediction method, encoder, decoder and computer storage medium
JP5287624B2 (en) Image processing circuit and image encoding apparatus
US8422807B2 (en) Encoder and image conversion apparatus
KR20050053135A (en) Apparatus for calculating absolute difference value, and motion prediction apparatus and motion picture encoding apparatus utilizing the calculated absolute difference value
JP5195674B2 (en) Image encoding device
JP7716235B2 (en) Encoding device and program
Braatz et al. High-throughput and low-power integrated direct/inverse hevc quantization hardware design

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120510

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130430

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130507

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130520

LAPS Cancellation because of no payment of annual fees