JP6838951B2 - Coding device and coding method - Google Patents

Coding device and coding method Download PDF

Info

Publication number
JP6838951B2
JP6838951B2 JP2016235879A JP2016235879A JP6838951B2 JP 6838951 B2 JP6838951 B2 JP 6838951B2 JP 2016235879 A JP2016235879 A JP 2016235879A JP 2016235879 A JP2016235879 A JP 2016235879A JP 6838951 B2 JP6838951 B2 JP 6838951B2
Authority
JP
Japan
Prior art keywords
block size
information
unit
block
coding
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.)
Active
Application number
JP2016235879A
Other languages
Japanese (ja)
Other versions
JP2018093386A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2016235879A priority Critical patent/JP6838951B2/en
Publication of JP2018093386A publication Critical patent/JP2018093386A/en
Application granted granted Critical
Publication of JP6838951B2 publication Critical patent/JP6838951B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、符号化装置及び符号化方法に関する。 The present invention relates to a coding device and a coding method.

動画像データを圧縮符号化する画像処理装置として撮像装置、携帯型通信装置等が知られている。このような画像処理装置は、撮像部によって動画像信号を取得し、取得した動画像信号を圧縮符号化し、圧縮符号化が行われた動画像ファイルを記録媒体に記録する。従来、圧縮符号化前の画像データは100nitsの輝度レベルを上限とするSDR(Standard Dynamic Range)で表現されたものであった。しかしながら、近年では、輝度レベルの上限を10000nits程度にまで拡張させたHDR(High Dynamic Range)で表現され、人が知覚できる輝度範囲に近い輝度範囲を有する画像データが提供されている。 An image pickup device, a portable communication device, and the like are known as an image processing device that compresses and encodes moving image data. Such an image processing device acquires a moving image signal by an imaging unit, compresses and encodes the acquired moving image signal, and records the compressed moving image file on a recording medium. Conventionally, the image data before compression coding has been expressed by SDR (Standard Dynamic Range) having a brightness level of 100 nits as the upper limit. However, in recent years, there has been provided image data expressed by HDR (High Dynamic Range) in which the upper limit of the luminance level is extended to about 10,000 bits and having a luminance range close to the luminance range perceptible to humans.

HDR画像を復号する際には、逆対数変換が行われる。この逆対数変換において、非可逆圧縮で生じた誤差が増幅し、HDR画像の画質が劣化することがある。特許文献1は、対数逆変換による誤差の拡大が比較的小さな輝度領域、又は、誤差が拡大しない輝度領域に量子化誤差が集中するように量子化を行い、量子化により得られたインデックス画像を符号化する方法を開示している。 When decoding the HDR image, inverse logarithmic conversion is performed. In this inverse logarithmic transformation, the error generated by lossy compression may be amplified and the image quality of the HDR image may be deteriorated. In Patent Document 1, quantization is performed so that the quantization error is concentrated in the luminance region where the error expansion due to logarithmic inverse conversion is relatively small or in the luminance region where the error does not expand, and the index image obtained by the quantization is obtained. The method of encoding is disclosed.

特開2013−106333号公報Japanese Unexamined Patent Publication No. 2013-106333

しかしながら、特許文献1において、量子化を行う際の符号化の単位となるブロックのサイズについては考慮されていない。そのため、ブロックサイズが大きい場合には、符号化による画質の劣化が広範囲に広がることがある。 However, in Patent Document 1, the size of a block, which is a unit of coding when performing quantization, is not considered. Therefore, when the block size is large, the deterioration of the image quality due to the coding may spread over a wide range.

本発明は、符号化による画質の劣化を低減し得る符号化装置及び符号化方法を提供することを目的とする。 An object of the present invention is to provide a coding apparatus and a coding method capable of reducing deterioration of image quality due to coding.

本発明の一観点によれば、画像を構成する複数の画素の画素値に基づく輝度情報を取得する輝度情報取得手段と、前記輝度情報に基づいて、前記複数の画素を含むブロックにおけるブロックサイズの上限に関するブロックサイズ制限情報を生成するブロックサイズ制限手段と、前記ブロックサイズ制限情報に基づいて設定された前記ブロックを単位として前記画像の符号化を行う符号化手段とを有し、前記ブロックサイズ制限手段は、前記画像の伝達関数がPerceptual Quantizer又は、Hybrid Log Gammaに対応するものである場合に前記ブロックサイズの上限を最大ブロックサイズよりも小さい値に制限するように前記ブロックサイズ制限情報を生成することを特徴とする符号化装置が提供される。 According to one aspect of the present invention, the luminance information acquisition means for acquiring the luminance information based on the pixel values of the plurality of pixels constituting the image and the block size in the block including the plurality of pixels based on the luminance information. possess a block size limit means for generating a block size control information of the upper limit, and encoding means for encoding the image the block units that are set on the basis of the block size restriction information, the block size restrictions The means generates the block size limit information so as to limit the upper limit of the block size to a value smaller than the maximum block size when the transfer function of the image corresponds to the Perceptual Quantizer or the Hybrid Log Gamma. An encoding device is provided.

本発明の他の観点によれば、画像を構成する複数の画素の画素値に基づく輝度情報を取得するステップと、前記輝度情報に基づいて、前記複数の画素を含むブロックにおけるブロックサイズの上限に関するブロックサイズ制限情報を生成するステップと、前記ブロックサイズ制限情報に基づいて設定された前記ブロックを単位として前記画像の符号化を行うステップとを有し、前記ブロックサイズ制限情報を生成するステップにおいて、前記画像の伝達関数がPerceptual Quantizer又は、Hybrid Log Gammaに対応するものである場合に前記ブロックサイズの上限を最大ブロックサイズよりも小さい値に制限するように前記ブロックサイズ制限情報が生成されることを特徴とする符号化方法が提供される。

According to another aspect of the present invention, the step of acquiring the luminance information based on the pixel values of the plurality of pixels constituting the image and the upper limit of the block size in the block including the plurality of pixels based on the luminance information. generating a block size control information, said block have a step of performing encoding of the image in units of the blocks set on the basis of the size limit information, in the step of generating the block size limitation information, When the transfer function of the image corresponds to Pixel Quantizer or Hybrid Log Gamma, the block size limit information is generated so as to limit the upper limit of the block size to a value smaller than the maximum block size. A featured coding method is provided.

本発明によれば、符号化による画質の劣化を低減し得る符号化装置及び符号化方法が提供される。 According to the present invention, there is provided a coding device and a coding method capable of reducing deterioration of image quality due to coding.

第1実施形態による画像処理装置を示すブロック図である。It is a block diagram which shows the image processing apparatus by 1st Embodiment. 第1実施形態による画像処理装置に備えられている符号化処理部を示すブロック図である。It is a block diagram which shows the coding processing part provided in the image processing apparatus by 1st Embodiment. 第1実施形態によるブロックの構成を示す図である。It is a figure which shows the structure of the block by 1st Embodiment. 第1実施形態による符号化処理部の動作を示すフローチャートである。It is a flowchart which shows the operation of the coding processing part by 1st Embodiment. 第1実施形態による輝度情報算出部の動作を示すフローチャートである。It is a flowchart which shows the operation of the luminance information calculation part by 1st Embodiment. 第1実施形態によるブロックサイズ制限部の動作を示すフローチャートである。It is a flowchart which shows the operation of the block size limiting part by 1st Embodiment. 第2実施形態によるブロックサイズ制限部の動作を示すフローチャートである。It is a flowchart which shows the operation of the block size limiting part by 2nd Embodiment. 第3実施形態による符号化処理部の動作を示すフローチャートである。It is a flowchart which shows the operation of the coding processing part by 3rd Embodiment. 第3実施形態によるCPUによって行われる輝度情報算出の動作を示すフローチャートである。It is a flowchart which shows the operation of the luminance information calculation performed by the CPU according to 3rd Embodiment.

本発明の実施の形態を、添付の図面を参照して以下に詳細に説明するが、本発明は、以下の実施形態に限定されるものではない。 Embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but the present invention is not limited to the following embodiments.

[第1実施形態]
第1実施形態による符号化装置及び符号化方法について、図面を参照して詳細に説明する。図1は、本実施形態による画像処理装置100を示すブロック図である。図1に示すように、本実施形態による画像処理装置100は、CPU101と、メモリ102と、不揮発性メモリ103と、操作部104と、撮像部112と、画像処理部113と、符号化処理部114と、表示制御部115と、表示部116とを有している。更に、本実施形態による画像処理装置100は、通信制御部117と、通信部118と、記録媒体制御部119と、内部バス130とを有している。画像処理装置100は、撮影レンズ111を用いて被写体の光学像を撮像部112の画素アレイに結像するが、撮影レンズ111は、画像処理装置100のボディ(筐体、本体)から、着脱不能であってもよいし、着脱可能であってもよい。また、画像処理装置100は、記録媒体制御部119を介して画像データの書き込み及び読み出しを記録媒体120に対して行う。記録媒体120は、画像処理装置100に着脱可能であってもよいし、着脱不能であってもよい。
[First Embodiment]
The coding apparatus and coding method according to the first embodiment will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an image processing device 100 according to the present embodiment. As shown in FIG. 1, the image processing apparatus 100 according to the present embodiment includes a CPU 101, a memory 102, a non-volatile memory 103, an operation unit 104, an image pickup unit 112, an image processing unit 113, and a coding processing unit. It has 114, a display control unit 115, and a display unit 116. Further, the image processing device 100 according to the present embodiment includes a communication control unit 117, a communication unit 118, a recording medium control unit 119, and an internal bus 130. The image processing device 100 forms an optical image of a subject on the pixel array of the imaging unit 112 using the photographing lens 111, but the photographing lens 111 is not removable from the body (housing, main body) of the image processing device 100. It may be removable, or it may be removable. Further, the image processing device 100 writes and reads image data to and from the recording medium 120 via the recording medium control unit 119. The recording medium 120 may be detachable from or detachable from the image processing device 100.

CPU101は、不揮発性メモリ103に記憶されているコンピュータプログラムを実行することによって、内部バス130を介して画像処理装置100の各部(各機能ブロック)の動作を制御する。 The CPU 101 controls the operation of each part (each functional block) of the image processing device 100 via the internal bus 130 by executing a computer program stored in the non-volatile memory 103.

メモリ102は、書き換え可能な揮発性メモリである。メモリ102は、画像処理装置100の各部の動作を制御するためのコンピュータプログラム、画像処理装置100の各部の動作に関するパラメータ等の情報、通信制御部117によって受信される情報等を一時的に記録する。また、メモリ102は、撮像部112によって取得された画像、画像処理部113、符号化処理部114等によって処理された画像及び情報を一時的に記録する。メモリ102は、これらを一時的に記録するために十分な記憶容量を備えている。 The memory 102 is a rewritable volatile memory. The memory 102 temporarily records a computer program for controlling the operation of each part of the image processing device 100, information such as parameters related to the operation of each part of the image processing device 100, information received by the communication control unit 117, and the like. .. Further, the memory 102 temporarily records the image acquired by the imaging unit 112, the image processed by the image processing unit 113, the coding processing unit 114, and the like, and the information. The memory 102 has a storage capacity sufficient for temporarily recording these.

不揮発性メモリ103は、電気的に消去及び記録が可能なメモリであり、例えばEEPROM等が用いられる。不揮発性メモリ103は、画像処理装置100の各部の動作を制御するコンピュータプログラム及び画像処理装置100の各部の動作に関するパラメータ等の情報を記憶する。当該コンピュータプログラムにより、本実施形態による画像処理装置100によって行われる各種動作が実現される。 The non-volatile memory 103 is a memory that can be electrically erased and recorded, and for example, EEPROM or the like is used. The non-volatile memory 103 stores information such as a computer program that controls the operation of each part of the image processing device 100 and parameters related to the operation of each part of the image processing device 100. The computer program realizes various operations performed by the image processing apparatus 100 according to the present embodiment.

操作部104は、画像処理装置100を操作するためのユーザインターフェースを提供する。操作部104は、電源ボタン、メニューボタン、撮影ボタン等の各種ボタンを含んでおり、各種ボタンはスイッチ、タッチパネル等により構成される。CPU101は、操作部104を介して入力されたユーザの指示に従って画像処理装置100を制御する。なお、ここでは、操作部104を介して入力される操作に基づいてCPU101が画像処理装置100を制御する場合を例に説明したが、これに限定されるものではない。例えば、不図示のリモートコントローラ、不図示の携帯端末等から通信部118を介して入力される要求に基づいて、CPU101が画像処理装置100を制御してもよい。 The operation unit 104 provides a user interface for operating the image processing device 100. The operation unit 104 includes various buttons such as a power button, a menu button, and a shooting button, and the various buttons are composed of a switch, a touch panel, and the like. The CPU 101 controls the image processing device 100 according to a user's instruction input via the operation unit 104. Although the case where the CPU 101 controls the image processing device 100 based on the operation input via the operation unit 104 has been described here as an example, the present invention is not limited to this. For example, the CPU 101 may control the image processing device 100 based on a request input from a remote controller (not shown), a mobile terminal (not shown), or the like via the communication unit 118.

撮影レンズ(レンズユニット)111は、ズームレンズ、フォーカスレンズ等を含む不図示のレンズ群、不図示のレンズ制御部、不図示の絞り等によって構成される。撮影レンズ111は、画角を変更するズーム手段として機能し得る。レンズ制御部は、CPU101から送信される制御信号により、焦点の調整及び絞り値(F値)の制御を行う。撮像部112は、動画像を構成する複数の画像を順次取得する取得手段として機能し得る。撮像部112としては、例えば、例えばCCD(電荷結合素子)、CMOS(相補型金属酸化膜半導体)素子等でのエリアイメージセンサが用いられる。撮像部112は、被写体の光学像を電気信号に変換する不図示の光電変換部が行列状、すなわち、2次元的に配列された不図示の画素アレイを有している。当該画素アレイには、被写体の光学像が撮影レンズ111によって結像される。撮像部112は、撮像した画像を画像処理部113又はメモリ102に出力する。なお、撮像部112は、静止画像を取得することも可能である。 The photographing lens (lens unit) 111 is composed of a lens group (not shown) including a zoom lens, a focus lens, etc., a lens control unit (not shown), an aperture (not shown), and the like. The photographing lens 111 can function as a zoom means for changing the angle of view. The lens control unit adjusts the focus and controls the aperture value (F value) by the control signal transmitted from the CPU 101. The imaging unit 112 can function as an acquisition means for sequentially acquiring a plurality of images constituting a moving image. As the image pickup unit 112, for example, an area image sensor using a CCD (charge-coupled device), a CMOS (complementary metal oxide semiconductor) device, or the like is used. The imaging unit 112 has a pixel array (not shown) in which photoelectric conversion units (not shown) that convert an optical image of a subject into an electric signal are arranged in a matrix, that is, two-dimensionally. An optical image of the subject is formed on the pixel array by the photographing lens 111. The image capturing unit 112 outputs the captured image to the image processing unit 113 or the memory 102. The imaging unit 112 can also acquire a still image.

画像処理部113は、撮像部112から出力される画像データ、又は、メモリ102から読み出された画像データに対し、所定の画像処理を行う。当該画像処理の例としては、補間処理、縮小処理(リサイズ処理)、色変換処理等が挙げられる。また、画像処理部113は、撮像部112によって取得された画像データを用いて、露光制御、測距制御等のための所定の演算処理を行う。画像処理部113による演算処理によって得られた演算結果に基づいて、露光制御、測距制御等がCPU101によって行われる。具体的には、AE(自動露出)処理、AWB(オートホワイトバランス)処理、AF(オートフォーカス)処理等がCPU101によって行われる。 The image processing unit 113 performs predetermined image processing on the image data output from the image pickup unit 112 or the image data read from the memory 102. Examples of the image processing include interpolation processing, reduction processing (resizing processing), color conversion processing, and the like. Further, the image processing unit 113 uses the image data acquired by the image capturing unit 112 to perform predetermined arithmetic processing for exposure control, distance measurement control, and the like. The CPU 101 performs exposure control, distance measurement control, and the like based on the calculation result obtained by the calculation process by the image processing unit 113. Specifically, the CPU 101 performs AE (automatic exposure) processing, AWB (auto white balance) processing, AF (autofocus) processing, and the like.

符号化処理部114は、画像データに対してフレーム内予測符号化(画面内予測符号化)、フレーム間予測符号化(画面間予測符号化)等を行うことによって、画像データのサイズを圧縮する。符号化処理部114は、例えば、半導体素子等により構成された符号化装置である。符号化処理部114は、画像処理装置100の外部に設けられた符号化装置であってもよい。符号化処理部114は、例えば、H.265(ITU H.265又はISO/IEC23008−2)方式によって符号化処理を行う。符号化処理部114の詳細については、図2を用いて後述する。 The coding processing unit 114 compresses the size of the image data by performing intra-frame predictive coding (in-screen predictive coding), inter-frame predictive coding (inter-screen predictive coding), and the like on the image data. .. The coding processing unit 114 is, for example, a coding device composed of a semiconductor element or the like. The coding processing unit 114 may be a coding device provided outside the image processing device 100. The coding processing unit 114, for example, H.A. The coding process is performed by the 265 (ITU H.265 or ISO / IEC23801-2) method. The details of the coding processing unit 114 will be described later with reference to FIG.

表示制御部115は、表示部116を制御する。表示部116は、不図示の表示画面を備える。表示制御部115は、画像データに対してリサイズ処理、色変換処理等を行うことにより、表示部116の表示画面に表示可能な画像を生成し、当該画像、すなわち、画像信号を表示部116に出力する。表示部116は、表示制御部115から送られてくる画像信号に基づいて、表示画面に画像を表示する。表示部116は、表示画面にメニュー等の設定画面を表示する機能であるOSD(On Screen Display)機能を備えている。表示制御部115は、画像信号にOSD画像を重畳して表示部116に画像信号を出力し得る。表示部116は、液晶ディスプレイ、有機ELディスプレイ等により構成されており、表示制御部115から送られてきた画像信号を表示する。表示部116は、例えばタッチパネルであってもよい。表示部116がタッチパネルである場合、表示部116は、操作部104としても機能し得る。 The display control unit 115 controls the display unit 116. The display unit 116 includes a display screen (not shown). The display control unit 115 generates an image that can be displayed on the display screen of the display unit 116 by performing resizing processing, color conversion processing, and the like on the image data, and transmits the image, that is, the image signal to the display unit 116. Output. The display unit 116 displays an image on the display screen based on the image signal sent from the display control unit 115. The display unit 116 has an OSD (On Screen Display) function, which is a function of displaying a setting screen such as a menu on the display screen. The display control unit 115 may superimpose the OSD image on the image signal and output the image signal to the display unit 116. The display unit 116 is composed of a liquid crystal display, an organic EL display, or the like, and displays an image signal sent from the display control unit 115. The display unit 116 may be, for example, a touch panel. When the display unit 116 is a touch panel, the display unit 116 can also function as an operation unit 104.

通信制御部117は、CPU101に制御される。通信制御部117は、IEEE802.11等によりあらかじめ定められた無線通信規格に適合する変調信号を生成して、当該変調信号を通信部118に出力する。また、通信制御部117は、無線通信規格に適合する変調信号を、通信部118を介して受信し、受信した変調信号を復号し、復号した信号に応じた信号をCPU101に出力する。通信制御部117は、通信設定を記憶するためのレジスタを備えている。通信制御部117は、CPU101からの制御によって、通信時の送受信感度を調整し得る。通信制御部117は、所定の変調方式で送受信を行うことができる。通信部118は、通信制御部117から供給される変調信号を画像処理装置100の外部にある情報通信機器等の外部機器127へ出力し、また、外部機器127からの変調信号を受信するアンテナを備えている。また、通信部118には、通信用の回路等が備えられている。なお、ここでは、通信部118によって無線通信が行われる場合を例に説明したが、通信部118によって行われる通信は無線通信に限定されるものではない。例えば、配線等を用いた電気的な接続によって通信部118と外部機器127とが接続されてもよい。 The communication control unit 117 is controlled by the CPU 101. The communication control unit 117 generates a modulated signal conforming to a wireless communication standard predetermined by IEEE802.11 or the like, and outputs the modulated signal to the communication unit 118. Further, the communication control unit 117 receives a modulated signal conforming to the wireless communication standard via the communication unit 118, decodes the received modulated signal, and outputs a signal corresponding to the decoded signal to the CPU 101. The communication control unit 117 includes a register for storing communication settings. The communication control unit 117 can adjust the transmission / reception sensitivity during communication by controlling from the CPU 101. The communication control unit 117 can perform transmission / reception by a predetermined modulation method. The communication unit 118 outputs a modulation signal supplied from the communication control unit 117 to an external device 127 such as an information communication device outside the image processing device 100, and also receives an antenna for receiving the modulation signal from the external device 127. I have. Further, the communication unit 118 is provided with a circuit for communication and the like. Although the case where wireless communication is performed by the communication unit 118 has been described here as an example, the communication performed by the communication unit 118 is not limited to wireless communication. For example, the communication unit 118 and the external device 127 may be connected by an electrical connection using wiring or the like.

記録媒体制御部119は、記録媒体120を制御する。記録媒体制御部119は、CPU101からの要求に基づいて、記録媒体120を制御するための制御信号を記録媒体120に出力する。記録媒体120としては、例えば不揮発性メモリや磁気ディスク等が用いられる。記録媒体120は、上述したように、着脱可能であってもよいし、着脱不能であってもよい。記録媒体120は、符号化された画像データ等を記録する。記録媒体120のファイルシステムに適合した形式で画像データ等がファイルとして保存される。ファイルとしては、例えば、MP4ファイル(ISO/IEC 14496-14:2003)、MXF(Material eXchange Format)ファイル等が挙げられる。各々の機能ブロック101〜104、112〜115、117、119は、内部バス130を介して互いにアクセス可能となっている。 The recording medium control unit 119 controls the recording medium 120. The recording medium control unit 119 outputs a control signal for controlling the recording medium 120 to the recording medium 120 based on the request from the CPU 101. As the recording medium 120, for example, a non-volatile memory, a magnetic disk, or the like is used. As described above, the recording medium 120 may be removable or non-detachable. The recording medium 120 records encoded image data and the like. Image data and the like are saved as a file in a format suitable for the file system of the recording medium 120. Examples of the file include an MP4 file (ISO / IEC 14496-14: 2003), an MXF (Material eXchange Format) file, and the like. The functional blocks 101 to 104, 112 to 115, 117, and 119 are accessible to each other via the internal bus 130.

<符号化処理部>
図2は、本実施形態による画像処理装置100に備えられている符号化処理部114を示すブロック図である。図2においては、符号化処理部114とメモリ102とが抜き出して示されている。符号化処理部114は、例えば、動画圧縮規格の1つであるH.265の符号化方式によって符号化を行う。
<Code processing unit>
FIG. 2 is a block diagram showing a coding processing unit 114 provided in the image processing apparatus 100 according to the present embodiment. In FIG. 2, the coding processing unit 114 and the memory 102 are extracted and shown. The coding processing unit 114 is, for example, H.A., which is one of the moving image compression standards. Coding is performed by the coding method of 265.

輝度情報取得部201は、メモリ102から符号化対象となる画像データを取得し、画像データの画素値に基づいて各画素、又は複数の画素を含む画素群に対応する輝度情報を算出することにより輝度情報の取得を行う。すなわち、輝度情報取得部201は輝度情報取得手段として機能する。算出された輝度情報は、メモリ102に一旦保存してもよく、輝度情報取得部201からブロックサイズ制限部202に直接送信してもよい。なお、輝度情報は、各画素の輝度に関する情報を含み得る。具体的には、輝度情報は、各画素の輝度を含んでもよく、複数の画素の輝度から算出された輝度の平均値、合計値、最大値、最小値等の加工後の値を含んでもよい。 The brightness information acquisition unit 201 acquires image data to be encoded from the memory 102, and calculates brightness information corresponding to each pixel or a pixel group including a plurality of pixels based on the pixel value of the image data. Acquires brightness information. That is, the luminance information acquisition unit 201 functions as the luminance information acquisition means. The calculated luminance information may be temporarily stored in the memory 102, or may be directly transmitted from the luminance information acquisition unit 201 to the block size limiting unit 202. The luminance information may include information regarding the luminance of each pixel. Specifically, the brightness information may include the brightness of each pixel, or may include processed values such as an average value, a total value, a maximum value, and a minimum value of brightness calculated from the brightness of a plurality of pixels. ..

ブロックサイズ制限部202は、画像の符号化の単位であるブロックのサイズ(ブロックサイズ)の上限の制限に関するブロックサイズ制限情報を生成し、メモリ102に保存することによりブロックサイズ制限情報の設定を行う。また、ブロックサイズ制限部202は、設定されたブロックサイズ制限情報の更新を行う。すなわち、ブロックサイズ制限部202はブロックサイズ制限手段として機能する。ここでブロックとしては、マクロブロック、Coding Tree Unit(CTU)、Coding Unit(CU)、Prediction Unit(PU)、Transform Unit(TU)等が用いられ得る。マクロブロックはH.264規格における符号化の単位である。CTU、CU、PU、TUはH.265規格における符号化の単位である。CTUは、H.265規格において各画像の符号化処理を行うブロックの単位である。CUはCTUを再帰的に分割するためのブロックの単位である。PUはCUを予測処理用に分割するためのブロックの単位である。TUはCUを変換処理用に分割するためのブロックの単位である。 The block size limit unit 202 generates block size limit information regarding the limit of the upper limit of the block size (block size) which is a unit of image coding, and sets the block size limit information by storing it in the memory 102. .. Further, the block size limit unit 202 updates the set block size limit information. That is, the block size limiting unit 202 functions as a block size limiting means. Here, as the block, a macro block, a Coding Tree Unit (CTU), a Coding Unit (CU), a Prediction Unit (PU), a Transfer Unit (TU), or the like can be used. A macroblock is a unit of coding in the H.264 standard. CTU, CU, PU, TU are H. It is a unit of coding in the 265 standard. CTU is H.I. It is a unit of a block that performs coding processing of each image in the 265 standard. CU is a block unit for recursively dividing CTU. PU is a block unit for dividing CU for prediction processing. TU is a block unit for dividing CU for conversion processing.

ブロックサイズ制限部202は、輝度情報取得部201から受信した輝度情報、あるいはメモリ102から取得した輝度情報に基づいて、各ブロックのうちのいずれか、又は全てのブロックサイズの範囲の制限を規定するブロックサイズ制限情報を生成する。そして、ブロックサイズ制限部202は、ブロックサイズ制限情報を予測符号化方法決定部203へ出力する。また、ブロックサイズ制限部202は、予測符号化条件情報として、ある着目画素ブロックを符号化する際に、その着目画素ブロック(符号化対象ブロック)の予測画素ブロックを取得する範囲を規定する情報を予測符号化方法決定部203に出力する。 The block size limiting unit 202 defines a limitation on the range of any or all of the blocks based on the luminance information received from the luminance information acquisition unit 201 or the luminance information acquired from the memory 102. Generate block size limit information. Then, the block size limitation unit 202 outputs the block size limitation information to the prediction coding method determination unit 203. Further, the block size limiting unit 202 provides information that defines a range for acquiring the predicted pixel block of the pixel block of interest (encoding target block) when encoding a certain pixel block of interest as the predictive coding condition information. Output to the predictive coding method determination unit 203.

予測符号化方法決定部203は、ブロックサイズ制限部202から入力される予測符号化条件情報に基づいて、符号化対象領域内の各画素ブロックに対する予測符号化方法を決定する。予測符号化方法決定部203は、入力される画像信号と、メモリ102から読み出した符号化済みの画素値とから、簡易的なフレーム内予測又は動き検出を含むフレーム間予測処理を行うことによって、符号化効率を示す評価値を算出する。そして、予測符号化方法決定部203は、符号化効率が最良となる予測符号化方式を決定する。符号化対象の画素ブロックがIスライスの場合には、予測符号化方法決定部203は、フレーム内の予測画素のブロックサイズと予測モードとを決定する。符号化画素ブロックがPスライス又はBスライスの場合には、フレーム内予測又はフレーム間予測の内、符号化効率の高い方を選択する。なお、フレーム内の全てのスライスがIスライスであるフレームはIフレームと称され、フレーム内の全てのスライスがPスライスであるフレームはPフレームと称され、フレーム内の全てのスライスがBスライスであるフレームはBフレームと称される。予測符号化方法決定部203は、フレーム内予測の場合にはブロックサイズ制限情報に基づき、フレーム内の予測画素のブロックサイズ、フレーム内予測モード等のフレーム内予測符号化用パラメータを決定する。更に、予測符号化方法決定部203は、ブロックサイズ制限情報に基づき、制限内に収まるようにフレーム内の予測画素のブロックサイズを分割する。予測符号化方法決定部203は、ブロックサイズ制限情報が無い場合には、フレーム内の予測画素のブロックサイズを決定する。また、予測符号化方法決定部203は、フレーム間予測の場合には、参照フレーム、画素ブロックの分割パターン、動きベクトル等のフレーム間予測符号化用パラメータを決定する。更に、予測符号化方法決定部203は、ブロックサイズ制限情報に基づき、制限内に収まるように画素ブロックの分割パターンを変更する。予測符号化方法決定部203は、決定した予測符号化用パラメータを予測符号化処理部204に出力する。 The predictive coding method determination unit 203 determines the predictive coding method for each pixel block in the coding target region based on the predictive coding condition information input from the block size limiting unit 202. The prediction coding method determination unit 203 performs inter-frame prediction processing including simple in-frame prediction or motion detection from the input image signal and the encoded pixel value read from the memory 102. An evaluation value indicating the coding efficiency is calculated. Then, the predictive coding method determination unit 203 determines the predictive coding method having the best coding efficiency. When the pixel block to be encoded is an I slice, the prediction coding method determination unit 203 determines the block size and prediction mode of the prediction pixel in the frame. When the coded pixel block is a P slice or a B slice, the one with the higher coding efficiency is selected from the intra-frame prediction and the inter-frame prediction. A frame in which all slices in the frame are I slices is called an I frame, a frame in which all slices in the frame are P slices is called a P frame, and all slices in the frame are B slices. A frame is called a B frame. In the case of in-frame prediction, the prediction coding method determination unit 203 determines in-frame prediction coding parameters such as the block size of the prediction pixels in the frame and the in-frame prediction mode based on the block size limit information. Further, the prediction coding method determination unit 203 divides the block size of the prediction pixel in the frame so as to be within the limit based on the block size limit information. The prediction coding method determination unit 203 determines the block size of the prediction pixel in the frame when there is no block size limit information. Further, in the case of inter-frame prediction, the prediction coding method determination unit 203 determines inter-frame prediction coding parameters such as a reference frame, a pixel block division pattern, and a motion vector. Further, the prediction coding method determination unit 203 changes the division pattern of the pixel block so as to be within the limit based on the block size limit information. The predictive coding method determination unit 203 outputs the determined predictive coding parameter to the predictive coding processing unit 204.

予測符号化処理部204は、符号化対象のフレーム中の着目画素ブロックを符号化する際、以下のように動作する。すなわち、予測符号化処理部204は、予測符号化方法決定部203によって決定された予測符号化用パラメータに応じて、メモリ102から読み出した符号化済み画像から予測画素ブロックを生成する。そして、予測符号化処理部204は、着目画素ブロックと予測画素ブロックとの差分である予測残差ブロックを、直交変換・量子化部205に出力する。また、予測符号化処理部204は、予測画素ブロックを局所復号化部206にも出力する。 The predictive coding processing unit 204 operates as follows when coding the pixel block of interest in the frame to be coded. That is, the predictive coding processing unit 204 generates a predictive pixel block from the coded image read from the memory 102 according to the predictive coding parameter determined by the predictive coding method determination unit 203. Then, the prediction coding processing unit 204 outputs the prediction residual block, which is the difference between the pixel block of interest and the prediction pixel block, to the orthogonal conversion / quantization unit 205. The predictive coding processing unit 204 also outputs the predictive pixel block to the local decoding unit 206.

直交変換・量子化部205は、予測符号化処理部204から供給される予測残差ブロックに対して直交変換処理を行う。また、直交変換・量子化部205は、符号量制御部207によって設定された量子化パラメータに応じた量子化ステップを用いて、直交変換処理により得られた係数を量子化する。直交変換・量子化部205は、量子化後の係数、すなわち、量子化データを、エントロピー符号化部208と局所復号化部206とに出力する。 The orthogonal transformation / quantization unit 205 performs orthogonal conversion processing on the predicted residual block supplied from the predictive coding processing unit 204. Further, the orthogonal conversion / quantization unit 205 quantizes the coefficient obtained by the orthogonal conversion process by using the quantization step corresponding to the quantization parameter set by the code amount control unit 207. The orthogonal conversion / quantization unit 205 outputs the coefficient after quantization, that is, the quantization data to the entropy coding unit 208 and the local decoding unit 206.

局所復号化部206は、直交変換・量子化部205から入力される量子化データに対して、逆量子化処理及び逆直交変換処理を行うことによって、予測残差データを生成する。そして、局所復号化部206は、生成された予測残差データに、予測符号化処理部204から入力される予測画像を加算して復号化処理を行い、復号化処理によって得られた画素ブロックによって示される画像データをメモリ102に格納する。メモリ102に格納された復号化処理後の画像データは、フレーム内予測処理に利用される。更に、デブロッキングフィルタ処理が施された復号化データがメモリ102に保持される。メモリ102に保持されたデブロッキングフィルタ処理後の復号化データは、フレーム間予測処理にも利用される。 The local decoding unit 206 generates predicted residual data by performing an inverse quantization process and an inverse orthogonal conversion process on the quantization data input from the orthogonal conversion / quantization unit 205. Then, the local decoding unit 206 adds the predicted image input from the prediction coding processing unit 204 to the generated prediction residual data to perform the decoding process, and the pixel block obtained by the decoding process is used. The indicated image data is stored in the memory 102. The image data after the decoding process stored in the memory 102 is used for the in-frame prediction process. Further, the decrypted data subjected to the deblocking filter processing is held in the memory 102. The decoded data after the deblocking filter processing held in the memory 102 is also used for the inter-frame prediction processing.

符号量制御部207は、符号化ピクチャバッファがオーバーフロー又はアンダーフローしないように符号化データの符号量を制御する。符号量制御部207は、エントロピー符号化部208から供給されるエントロピー符号化後の発生符号量に基づいて、後続のフレームに対する量子化パラメータを生成し、生成された量子化パラメータを直交変換・量子化部205に供給する。なお、符号量制御部207は、ブロックサイズ制限部202で設定された量子化優先度情報に基づいて、例えば重み付け量子化係数を変更することにより量子化パラメータを調整する。 The code amount control unit 207 controls the code amount of the coded data so that the coded picture buffer does not overflow or underflow. The code amount control unit 207 generates a quantization parameter for a subsequent frame based on the generated code amount after entropy coding supplied from the entropy coding unit 208, and the generated quantization parameter is orthogonally converted / quantized. It is supplied to the chemical unit 205. The code amount control unit 207 adjusts the quantization parameter based on the quantization priority information set by the block size limiting unit 202, for example, by changing the weighted quantization coefficient.

エントロピー符号化部208は、入力される量子化データに対してスライス単位にCABAC(コンテキスト適応型2値算術符号化)によるエントロピー符号化処理を行う。エントロピー符号化部208は、入力される多値の量子化データを2値のデータに変換する2値化部と、2値化部によって生成される2値化データを格納する2値化データメモリとを有している。また、エントロピー符号化部208は、2値化データの発生確率をコンテキストに応じて計算し、計算によって求められた2値データの発生確率を保持するコンテキスト計算部を有する。また、エントロピー符号化部208は、コンテキスト計算部から供給される2値データの発生確率に応じて算術符号化を行う算術符号化部を有する。こうして符号化されたデータを多重化処理部209に出力するとともに、エントロピー符号化後の発生符号量を符号量制御部207に出力する。 The entropy coding unit 208 performs entropy coding processing by CABAC (context adaptive binary arithmetic coding) for each slice of the input quantization data. The entropy encoding unit 208 is a binarization unit that converts the input multi-value quantization data into binary data, and a binarization data memory that stores the binarization data generated by the binarization unit. And have. Further, the entropy encoding unit 208 has a context calculation unit that calculates the occurrence probability of the binarized data according to the context and holds the occurrence probability of the binary data obtained by the calculation. Further, the entropy coding unit 208 has an arithmetic coding unit that performs arithmetic coding according to the occurrence probability of binary data supplied from the context calculation unit. The data encoded in this way is output to the multiplexing processing unit 209, and the generated code amount after entropy coding is output to the code amount control unit 207.

以上のように、予測符号化方法決定部203、予測符号化処理部204、直交変換・量子化部205、局所復号化部206、符号量制御部207及びエントロピー符号化部208の一部又は全部は、符号化手段として機能する。この符号化手段による画像の符号化はブロックサイズ制限情報に基づき設定されるブロックを単位として行われる。 As described above, a part or all of the predictive coding method determination unit 203, the predictive coding processing unit 204, the orthogonal conversion / quantization unit 205, the local decoding unit 206, the code amount control unit 207, and the entropy coding unit 208. Functions as a coding means. The coding of the image by this coding means is performed in units of blocks set based on the block size limit information.

多重化処理部209は、画像の符号化の開始の際には、符号化対象のフレームのサイズ等の各種シンタックス情報に符号化された画像データを付加することでストリームデータを生成してメモリ102に保存する。 At the start of image coding, the multiplexing processing unit 209 generates stream data by adding encoded image data to various syntax information such as the size of the frame to be encoded, and stores the memory. Save to 102.

符号化処理部114のCPU210は、不揮発性メモリ103に記憶されているコンピュータプログラムを実行することによって、符号化処理部114の各部の動作を制御する。メモリ102は、符号化処理部114の各部の動作を制御するコンピュータプログラム、各部の動作に関するパラメータ等の情報を一時的に記憶する。 The CPU 210 of the coding processing unit 114 controls the operation of each part of the coding processing unit 114 by executing a computer program stored in the non-volatile memory 103. The memory 102 temporarily stores information such as a computer program that controls the operation of each part of the coding processing unit 114 and parameters related to the operation of each part.

<ブロックの構成>
図3(a)、図3(b)及び図3(c)は、本実施形態における、ブロックの構成の一例を示す図である。図3(a)に示されるように、動画像を構成する1つの画像であるフレーム300は、最大ブロックサイズである複数のブロック301に分割することができる。複数のブロック301は、図3(a)において、A1、A2、A3、A4、…、B1、B2、…と示されている。各種ブロックにおける最大ブロックサイズについて説明する。ブロック301がマクロブロックである場合、ブロック301は、16×16個の画素302で構成される。ブロック301がCTU、CU、PUである場合、ブロック301は、64×64個の画素302で構成される。ブロック301がTUである場合、ブロック301は、32×32個の画素302で構成される。
<Block configuration>
3 (a), 3 (b) and 3 (c) are diagrams showing an example of the block configuration in the present embodiment. As shown in FIG. 3A, the frame 300, which is one image constituting the moving image, can be divided into a plurality of blocks 301 having a maximum block size. The plurality of blocks 301 are shown as A1, A2, A3, A4, ..., B1, B2, ... In FIG. 3A. The maximum block size in various blocks will be described. When the block 301 is a macro block, the block 301 is composed of 16 × 16 pixels 302. When the block 301 is a CTU, CU, or PU, the block 301 is composed of 64 × 64 pixels 302. When the block 301 is a TU, the block 301 is composed of 32 × 32 pixels 302.

図3(b)及び図3(c)は、ブロック301の構成例を示す図である。図3(b)に示されるように、ブロック301を各々が複数の画素302を含む複数の画素群303に分割して、画素群303に含まれる各画素302の輝度の平均値、合計値等を画素群303の輝度としてもよい。この場合、画素群303を画素302と同視して扱うことができる。このように、画素302又は画素群303は、輝度情報取得部201における輝度情報の算出を行う際の最小単位となる。 3 (b) and 3 (c) are diagrams showing a configuration example of the block 301. As shown in FIG. 3B, the block 301 is divided into a plurality of pixel groups 303, each of which includes a plurality of pixels 302, and the average value, total value, etc. of the brightness of each pixel 302 included in the pixel group 303. May be the brightness of the pixel group 303. In this case, the pixel group 303 can be treated as if it were the pixel 302. As described above, the pixel 302 or the pixel group 303 is the minimum unit for calculating the luminance information in the luminance information acquisition unit 201.

図3(c)は、最大ブロックサイズであるブロック301の分割の例を示す図である。上述のように、予測符号化方法決定部203は、ブロックサイズを決定する。例えば、ブロック301がCUの場合においては、最大ブロックサイズでは、ブロック301は64×64個の画素302で構成され、ブロック301は、ブロック304a、304b、304cのような異なるサイズの複数のブロックに分割することができる。各ブロック304a、304b、304cには、輝度情報の算出を行う複数の画素302又は複数の画素群303が含まれる。なお、マクロブロック、CTU、PU、TUにおいても同様にしてブロック301を複数のブロックに分割することができる。 FIG. 3C is a diagram showing an example of division of the block 301 which is the maximum block size. As described above, the predictive coding method determination unit 203 determines the block size. For example, when the block 301 is a CU, at the maximum block size, the block 301 is composed of 64 × 64 pixels 302, and the block 301 is divided into a plurality of blocks having different sizes such as blocks 304a, 304b, 304c. Can be split. Each block 304a, 304b, 304c includes a plurality of pixels 302 or a plurality of pixel groups 303 for calculating luminance information. In the macro block, CTU, PU, and TU, the block 301 can be divided into a plurality of blocks in the same manner.

<符号化処理部114の動作>
図4は、本実施形態による符号化処理部114の動作を示すフローチャートである。この動作は、画像処理装置100の電源がオンの状態において、不揮発性メモリ103に格納されているプログラムがメモリ102に展開され、符号化処理部114内のCPU210がメモリ102のプログラムを読み出して実行することにより実現される。図4のフローチャートによる処理は、フレームごとに実行されるものであり、当該処理は定期的に繰り返し実行されてもよい。
<Operation of coding processing unit 114>
FIG. 4 is a flowchart showing the operation of the coding processing unit 114 according to the present embodiment. In this operation, when the power of the image processing device 100 is turned on, the program stored in the non-volatile memory 103 is expanded in the memory 102, and the CPU 210 in the coding processing unit 114 reads the program in the memory 102 and executes it. It is realized by doing. The process according to the flowchart of FIG. 4 is executed frame by frame, and the process may be repeatedly executed periodically.

ステップS401において、CPU210は、画像処理部113がメモリ102に保存した伝達関数情報をメモリ102から取得する。その後、CPU210は、処理をステップS401からステップS402に移行させる。 In step S401, the CPU 210 acquires the transfer function information stored in the memory 102 by the image processing unit 113 from the memory 102. After that, the CPU 210 shifts the process from step S401 to step S402.

ステップS402において、CPU210は、ステップS401においてメモリ102から取得した伝達関数情報が所定のHDR方式に対応する所定の伝達関数を示すものであるか否かを判断する。所定の伝達関数の一例としては、PQ(Perceptual Quantizer)、又は、HLG(Hybrid Log Gamma)が挙げられる。CPU210は、伝達関数情報が、所定のHDR方式に対応するものであると判断した場合(ステップS402においてYES)、処理をステップS402からステップS403に移行させる。CPU210は、伝達関数情報が、所定のHDR方式に対応するものでないと判断した場合(ステップS402においてNO)、処理をステップS402からステップS408に移行させる。 In step S402, the CPU 210 determines whether or not the transfer function information acquired from the memory 102 in step S401 indicates a predetermined transfer function corresponding to the predetermined HDR system. As an example of a predetermined transfer function, PQ (Perfectual Quantizer) or HLG (Hybrid Log Gamma) can be mentioned. When the CPU 210 determines that the transfer function information corresponds to the predetermined HDR method (YES in step S402), the CPU 210 shifts the process from step S402 to step S403. When the CPU 210 determines that the transfer function information does not correspond to the predetermined HDR method (NO in step S402), the CPU 210 shifts the process from step S402 to step S408.

ステップS403において、CPU210は、画像処理部113によりメモリ102に画像データが書き込まれたことを確認し、メモリ102内の画像データが格納されているアドレスを示すアドレス情報を取得する。その後、CPU210は、処理をステップS403からステップS404に移行させる。 In step S403, the CPU 210 confirms that the image data has been written to the memory 102 by the image processing unit 113, and acquires address information indicating the address in which the image data in the memory 102 is stored. After that, the CPU 210 shifts the process from step S403 to step S404.

ステップS404において、CPU210は、輝度情報取得部201に対してメモリ102に格納されている画像データのアドレス情報を出力する。輝度情報取得部201は、画像データに含まれる画素値から画素302又は画素群303に対応する輝度情報を算出することにより輝度情報を取得する。なお、輝度情報の算出処理の詳細に関しては後述する。その後、CPU210は、処理をステップS404からステップS405に移行させる。 In step S404, the CPU 210 outputs the address information of the image data stored in the memory 102 to the luminance information acquisition unit 201. The luminance information acquisition unit 201 acquires the luminance information by calculating the luminance information corresponding to the pixels 302 or the pixel group 303 from the pixel values included in the image data. The details of the luminance information calculation process will be described later. After that, the CPU 210 shifts the process from step S404 to step S405.

ステップS405において、CPU210は、画像処理装置100内にあらかじめ決められている設定情報に基づいて、ブロックサイズ制限の判断を画素単位で行うか、あるいは画素群単位で行うかを判断する。画像処理装置100内にあらかじめ決められている設定情報とは、例えば、撮影モード、解像度等の設定についての情報である。例えば、撮影モードが高フレームレートのモードに設定されている場合には、画素群単位で処理を行うことで処理を高速化することができる。同様に、解像度が高い設定となっている場合にも、画素群単位で処理を行うことで処理を高速化することができる。CPU210は、画素単位でブロックサイズ制限を行うと判断した場合(ステップS405において「画素単位」)、処理をステップS405からステップS406に移行させる。CPU210は、画素群単位でブロックサイズの制限を行うと判断した場合(ステップS405において「画素群単位」)、処理をステップS405からステップS407に移行させる。 In step S405, the CPU 210 determines whether to determine the block size limit on a pixel-by-pixel basis or on a pixel-by-pixel basis, based on the setting information predetermined in the image processing apparatus 100. The preset setting information in the image processing device 100 is, for example, information about settings such as a shooting mode and a resolution. For example, when the shooting mode is set to a high frame rate mode, the processing can be speeded up by performing the processing in units of pixel groups. Similarly, even when the resolution is set to be high, the processing can be speeded up by performing the processing in units of pixel groups. When the CPU 210 determines that the block size is limited in pixel units (“pixel unit” in step S405), the process shifts from step S405 to step S406. When the CPU 210 determines that the block size is limited for each pixel group (“pixel group unit” in step S405), the processing shifts from step S405 to step S407.

ステップS406において、CPU210は、ブロックサイズ制限部202を制御することにより、画素単位でブロックサイズの制限を判断し、ブロックサイズ制限情報を生成する。ブロックサイズ制限部202における処理の詳細に関しては後述する。CPU210は、処理をステップS406からステップS408に移行させる。 In step S406, the CPU 210 controls the block size limiting unit 202 to determine the block size limit on a pixel-by-pixel basis and generate block size limit information. The details of the processing in the block size limiting unit 202 will be described later. The CPU 210 shifts the process from step S406 to step S408.

ステップS407において、CPU210は、ブロックサイズ制限部202を制御することにより、画素群単位でブロックサイズの制限を判断し、ブロックサイズ制限情報を生成し、メモリ102に保存する。ブロックサイズ制限部202における処理の詳細に関しては後述する。CPU210は、処理をステップS407からステップS408に移行させる。 In step S407, the CPU 210 controls the block size limiting unit 202 to determine the block size limit for each pixel group, generate block size limit information, and store it in the memory 102. The details of the processing in the block size limiting unit 202 will be described later. The CPU 210 shifts the process from step S407 to step S408.

ステップS408において、CPU210は、メモリ102に保存されたブロックサイズ制限情報に基づいて、量子化の際における各ブロックの量子化パラメータの割り当てについての優先度を設定する。ブロックサイズ制限情報によりブロックサイズの上限が制限されているブロックに対しては量子化パラメータの割り当ての優先度を高く設定し、その他のブロックに対しては優先度を低く設定する。また、CPU210は、ブロックサイズの上限の制限の程度に応じて、優先度に重み付けをしてもよい。例えば、TUのブロックにおいて、ブロックサイズの上限が16×16個に制限されているブロックよりも、上限が8×8個に制限されているブロックの量子化パラメータの割り当てを優先させるように優先度の重み付けを設定することができる。その後、CPU210は、処理をステップS408からステップS409に移行させる。 In step S408, the CPU 210 sets the priority for the allocation of the quantization parameter of each block at the time of quantization based on the block size limit information stored in the memory 102. The priority of the quantization parameter allocation is set high for the block whose upper limit of the block size is limited by the block size limit information, and the priority is set low for the other blocks. Further, the CPU 210 may weight the priority according to the degree of limitation of the upper limit of the block size. For example, in a TU block, the priority is given so that the assignment of the quantization parameter of the block whose upper limit is limited to 8 × 8 is prioritized over the block whose upper limit is limited to 16 × 16. Weighting can be set. After that, the CPU 210 shifts the process from step S408 to step S409.

ステップS409において、CPU210は、予測符号化方法決定部203、予測符号化処理部204、直交変換・量子化部205、局所復号化部206、符号量制御部207及びエントロピー符号化部208を制御して符号化処理を実行する。予測符号化方法決定部203は、ブロックサイズ制限情報に基づいて各ブロックのサイズを決定する。当該符号化処理は、このブロックを単位として行われる。その後、CPU210は、処理をステップS409からステップS410に移行させる。 In step S409, the CPU 210 controls the predictive coding method determination unit 203, the predictive coding processing unit 204, the orthogonal conversion / quantization unit 205, the local decoding unit 206, the code amount control unit 207, and the entropy coding unit 208. And execute the coding process. The predictive coding method determination unit 203 determines the size of each block based on the block size limit information. The coding process is performed in units of this block. After that, the CPU 210 shifts the process from step S409 to step S410.

ステップS410において、CPU210は、多重化処理部209を制御し、符号化された画像データに各種シンタックス情報を付加してストリームデータを生成し、生成されたストリームデータをメモリ102に保存する。その後、CPU210は、本フローチャートにおける処理を終了する。なお、シンタックス情報にはCEA−861.3規格で定められているMaximum Content Light Level(MaxCLL)、Maximum Frame−Average Light Level(MaxFALL)が含まれる。 In step S410, the CPU 210 controls the multiplexing processing unit 209, adds various syntax information to the encoded image data to generate stream data, and saves the generated stream data in the memory 102. After that, the CPU 210 ends the process in this flowchart. The syntax information includes Maximum Content Light Level (MaxCLL) and Maximum Frame-Average Light Level (MaxFALL) defined in the CEA-861.3 standard.

なお、図4に示すフローチャートにおける処理は、CPU210を介在させずに各ブロックが実行することにより実現されてもよい。また、各ブロックは上述の処理の一部を並行して行ってもよい。 The processing in the flowchart shown in FIG. 4 may be realized by executing each block without the intervention of the CPU 210. In addition, each block may perform a part of the above-mentioned processing in parallel.

<輝度情報取得部201の動作>
図5は、本実施形態による輝度情報取得部201の動作を示すフローチャートである。本処理は、図4のステップS404における符号化処理部114の輝度情報取得部201の処理に関してより詳細に説明したものである。
<Operation of brightness information acquisition unit 201>
FIG. 5 is a flowchart showing the operation of the luminance information acquisition unit 201 according to the present embodiment. This processing is described in more detail with respect to the processing of the luminance information acquisition unit 201 of the coding processing unit 114 in step S404 of FIG.

ステップS501において、輝度情報取得部201は、メモリ102から画像データを読み出す。輝度情報取得部201は、読み出された画像データの画素値がYUV形式、YCbCr形式等である場合には、当該画像データの画素値からガンマ補正後のRGBデータ(以下、ガンマ補正後のRGBデータをR’G’B’データと呼ぶ)を算出する。その後、輝度情報取得部201は、算出されたR’G’B’データをメモリ102に保存する。輝度情報取得部201は、メモリ102からR’G’B’データを読み出し、R’G’B’データに対して、デガンマ処理を行いリニアなRGBデータを算出してメモリ102に保存する。輝度情報取得部201は、メモリ102からRGBデータを読み出し、RGBデータの中の最大値を算出して、MaxCLL値として取得する。更に、輝度情報取得部201は、RGBデータの中での平均値を算出してMaxFALL値として取得する。輝度情報取得部201は、算出されたMaxCLL及びMaxFALLを、輝度情報として、ブロックサイズ制限部202に送信し、又はメモリ102に保存する。その後、輝度情報取得部201は、処理をステップS501からステップS502に移行させる。 In step S501, the luminance information acquisition unit 201 reads the image data from the memory 102. When the pixel value of the read image data is in the YUV format, YCbCr format, or the like, the brightness information acquisition unit 201 is gamma-corrected RGB data (hereinafter, gamma-corrected RGB) from the pixel value of the image data. The data is called R'G'B'data). After that, the luminance information acquisition unit 201 saves the calculated R'G'B'data in the memory 102. The luminance information acquisition unit 201 reads R'G'B'data from the memory 102, performs degamma processing on the R'G'B' data, calculates linear RGB data, and stores it in the memory 102. The luminance information acquisition unit 201 reads RGB data from the memory 102, calculates the maximum value in the RGB data, and acquires it as a MaxCLL value. Further, the luminance information acquisition unit 201 calculates an average value in the RGB data and acquires it as a MaxFALL value. The luminance information acquisition unit 201 transmits the calculated MaxCLL and MaxFALL as luminance information to the block size limiting unit 202, or stores the calculated MaxCLL and MaxFALL in the memory 102. After that, the luminance information acquisition unit 201 shifts the process from step S501 to step S502.

ステップS502において、輝度情報取得部201は、メモリ102から読み出した画像データの各画素302の画素値から、各画素302の輝度を取得する。なお、ステップS502の処理は、輝度がRGBデータから取得される場合には、ステップS501におけるMaxCLLを算出する処理又はMaxFALLを算出する処理の中で算出されたRGBデータ等の画素値を用いて行われてもよい。その後、輝度情報取得部201は、処理をステップS502からステップS503に移行させる。 In step S502, the luminance information acquisition unit 201 acquires the luminance of each pixel 302 from the pixel value of each pixel 302 of the image data read from the memory 102. In the process of step S502, when the brightness is acquired from the RGB data, the pixel value such as the RGB data calculated in the process of calculating MaxCLL or the process of calculating MaxFALL in step S501 is used. You may be broken. After that, the luminance information acquisition unit 201 shifts the process from step S502 to step S503.

ステップS503において、輝度情報取得部201は、メモリ102から画像データを読み出し、所定の画素群303単位で各画素群303の輝度の平均値、合計値、最大値、最小値等を算出する。なお、ステップS503の処理は、各画素群303の輝度がRGBデータから算出される場合には、ステップS501におけるMaxCLLを算出する処理又はMaxFALLを算出する処理の中で算出されたRGBデータ等の画素値を用いて行われてもよい。その後、輝度情報取得部201は、本フローチャートにおける処理を終了する。なお、図5に示すフローチャートの各ステップの処理は、輝度情報取得部201に代えてCPU210が行ってもよい。 In step S503, the luminance information acquisition unit 201 reads the image data from the memory 102 and calculates the average value, total value, maximum value, minimum value, etc. of the luminance of each pixel group 303 in units of predetermined pixel groups 303. In the process of step S503, when the brightness of each pixel group 303 is calculated from the RGB data, the pixels of the RGB data or the like calculated in the process of calculating MaxCLL or the process of calculating MaxFALL in step S501. It may be done using a value. After that, the luminance information acquisition unit 201 ends the process in this flowchart. The processing of each step of the flowchart shown in FIG. 5 may be performed by the CPU 210 instead of the luminance information acquisition unit 201.

<ブロックサイズ制限部202の動作>
図6は、本実施形態によるブロックサイズ制限部202の動作を示すフローチャートである。本処理は、図4のステップS406又はステップS407における符号化処理部114のブロックサイズ制限部202の処理に関して詳細に説明したものである。処理が画素単位で行われる場合はステップS406における処理となり、処理が画素群単位で行われる場合はステップS407の処理となる。
<Operation of block size limiting unit 202>
FIG. 6 is a flowchart showing the operation of the block size limiting unit 202 according to the present embodiment. This processing has been described in detail with respect to the processing of the block size limiting unit 202 of the coding processing unit 114 in step S406 or step S407 of FIG. When the processing is performed in pixel units, it is the processing in step S406, and when the processing is performed in pixel group units, it is the processing in step S407.

ステップS601において、ブロックサイズ制限部202は、ブロックサイズを仮決定する。一例として、本ステップで仮決定するブロックサイズは、CTU、CU、PU、TU等の最大ブロックサイズとしてもよい。その後、ブロックサイズ制限部202は、処理をステップS601からステップS602に移行させる。 In step S601, the block size limiting unit 202 tentatively determines the block size. As an example, the block size tentatively determined in this step may be the maximum block size of CTU, CU, PU, TU, or the like. After that, the block size limiting unit 202 shifts the process from step S601 to step S602.

ステップS602において、ブロックサイズ制限部202は、処理を行うブロックを選択する。本フローチャートにおいて、ループ処理によりステップS602が繰り返し実行されるごとに順次異なるブロックが選択される。ブロックの選択の順序は、例えば、いわゆるラスター順とすることができる。ラスター順とは、例えば、初回には、フレーム内の左上のブロックを選択し、次の回には、前回選択したブロックの右側のブロックを選択し、右端のブロックを選択した後は1つ下の行の左端のブロックを選択し、以下これを繰り返すという順序である。ブロックの選択の終了後、ブロックサイズ制限部202は、処理をステップS602からステップS603に移行させる。 In step S602, the block size limiting unit 202 selects a block to be processed. In this flowchart, different blocks are sequentially selected each time step S602 is repeatedly executed by the loop process. The order of block selection can be, for example, the so-called raster order. The raster order is, for example, the first time the block on the upper left in the frame is selected, the next time the block on the right side of the previously selected block is selected, and the block on the right end is selected and then one down. The block at the left end of the line is selected, and so on. After the block selection is completed, the block size limiting unit 202 shifts the process from step S602 to step S603.

ステップS603において、ブロックサイズ制限部202は、選択されたブロック内の画素302又は画素群303において、輝度情報が示す輝度が第1の範囲内であるか否かを判断する。ブロックサイズ制限部202は、画素302又は画素群303における輝度が第1の範囲内である場合には(ステップS603においてYES)、処理をステップS603からステップS604に移行させる。ブロックサイズ制限部202は、画素302又は画素群303における輝度が第1の範囲外である場合(ステップS603においてNO)、処理をステップS603からステップS605に移行させる。 In step S603, the block size limiting unit 202 determines whether or not the luminance indicated by the luminance information is within the first range in the pixels 302 or the pixel group 303 in the selected block. When the brightness in the pixel 302 or the pixel group 303 is within the first range (YES in step S603), the block size limiting unit 202 shifts the process from step S603 to step S604. When the brightness in the pixel 302 or the pixel group 303 is out of the first range (NO in step S603), the block size limiting unit 202 shifts the process from step S603 to step S605.

ステップS604において、ブロックサイズ制限部202は、選択されたブロック内のブロックサイズの上限を所定の第1のサイズに制限するようにブロックサイズ制限情報を更新してメモリ102に保存する。その後、ブロックサイズ制限部202は、処理をステップS604からステップS607に移行させる。 In step S604, the block size limiting unit 202 updates the block size limiting information so as to limit the upper limit of the block size in the selected block to a predetermined first size, and stores the block size limiting information in the memory 102. After that, the block size limiting unit 202 shifts the process from step S604 to step S607.

ステップS605において、ブロックサイズ制限部202は、選択されたブロック内の画素302又は画素群303において、輝度情報が示す輝度が、第1の範囲内よりも低い輝度である第2の範囲内であるか否かを判断する。ブロックサイズ制限部202は、画素302又は画素群303における輝度が第2の範囲内であると判断した場合には(ステップS605においてYES)、処理をステップS605からステップS606に移行させる。ブロックサイズ制限部202は、画素302又は画素群303の輝度が第2の範囲外であると判断した場合(ステップS605においてNO)、処理をステップS605からステップS607に移行させる。 In step S605, the block size limiting unit 202 has a second range in which the brightness indicated by the brightness information in the pixels 302 or the pixel group 303 in the selected block is lower than the first range. Judge whether or not. When the block size limiting unit 202 determines that the brightness in the pixel 302 or the pixel group 303 is within the second range (YES in step S605), the block size limiting unit 202 shifts the process from step S605 to step S606. When the block size limiting unit 202 determines that the brightness of the pixel 302 or the pixel group 303 is out of the second range (NO in step S605), the block size limiting unit 202 shifts the process from step S605 to step S607.

ステップS606において、ブロックサイズ制限部202は、選択されたブロック内のブロックサイズの上限を所定の第2のサイズに制限するようにブロックサイズ制限情報を更新してメモリ102に保存する。その後、ブロックサイズ制限部202は、処理をステップS606からステップS607に移行させる。なお、第2のサイズは第1のサイズよりも大きいサイズとして、ステップS606で設定されるブロックサイズの制限が、ステップS604で設定されるブロックサイズの制限よりも緩いものとすることが好ましい。この場合、ブロックサイズの上限の制限を輝度に応じて2段階に設定することができる。 In step S606, the block size limiting unit 202 updates the block size limiting information so as to limit the upper limit of the block size in the selected block to a predetermined second size, and stores the block size limiting information in the memory 102. After that, the block size limiting unit 202 shifts the process from step S606 to step S607. It is preferable that the second size is larger than the first size, and the block size limit set in step S606 is looser than the block size limit set in step S604. In this case, the upper limit of the block size can be set in two stages according to the brightness.

なお、ブロックサイズ制限情報は、ブロックごとに、輝度が第1の範囲内又は第2の範囲内にある画素302又は画素群303のラスター順の番号で示されていてもよい。この場合、ブロックサイズ制限情報は、ブロック番号と、輝度が第1の範囲内である画素302又は画素群303の番号と、輝度が第2の範囲内である画素302又は画素群303の番号とを列挙した文字列により構成される。また、第1の範囲及び第2の範囲は、輝度の上限及び下限で規定される範囲であってもよく、所定の閾値を超える輝度というように下限のみで規定される範囲であってもよい。 The block size limit information may be indicated by a raster order number of pixels 302 or pixel group 303 whose brightness is within the first range or the second range for each block. In this case, the block size limit information includes the block number, the number of the pixel 302 or the pixel group 303 whose brightness is within the first range, and the number of the pixel 302 or the pixel group 303 whose brightness is within the second range. It is composed of a character string enumerating. Further, the first range and the second range may be a range defined by the upper limit and the lower limit of the brightness, or may be a range defined only by the lower limit such as a brightness exceeding a predetermined threshold value. ..

ステップS607において、ブロックサイズ制限部202は、選択されたブロック内の全ての画素302又は全ての画素群303に対してステップS603からステップS606までの処理が実行されたか否かを判断する。ブロックサイズ制限部202は、選択されたブロック内の全ての画素302又は全ての画素群303に対して処理が実行されたと判断した場合(ステップS607においてYES)、処理をステップS607からステップS608に移行させる。ブロックサイズ制限部202は、選択されたブロック内に処理が実行されていない画素302又は画素群303があると判断した場合(ステップS607においてNO)、処理をステップS607からステップS603に移行させる。 In step S607, the block size limiting unit 202 determines whether or not the processes from step S603 to step S606 have been executed for all the pixels 302 or all the pixel groups 303 in the selected block. When the block size limiting unit 202 determines that the processing has been executed for all the pixels 302 or all the pixel groups 303 in the selected block (YES in step S607), the processing shifts from step S607 to step S608. Let me. When the block size limiting unit 202 determines that there are pixels 302 or pixel group 303 for which processing has not been executed in the selected block (NO in step S607), the block size limiting unit 202 shifts the processing from step S607 to step S603.

ステップS608において、ブロックサイズ制限部202は、フレーム内の全てのブロックに対して、ステップS602からステップS607までの処理が実行されたか否かを判断する。ブロックサイズ制限部202は、フレーム内の全てのブロックに対して処理が実行されたと判断した場合(ステップS608においてYES)、処理をステップS608からステップS609に移行させる。ブロックサイズ制限部202は、フレーム内に処理が実行されていないブロックがあると判断した場合(ステップS608においてNO)、処理をステップS608からステップS602に移行させる。 In step S608, the block size limiting unit 202 determines whether or not the processes from step S602 to step S607 have been executed for all the blocks in the frame. When the block size limiting unit 202 determines that the processing has been executed for all the blocks in the frame (YES in step S608), the block size limiting unit 202 shifts the processing from step S608 to step S609. When the block size limiting unit 202 determines that there is a block in the frame for which processing has not been executed (NO in step S608), the block size limiting unit 202 shifts the processing from step S608 to step S602.

ステップS609において、ブロックサイズ制限部202は、フレーム内のブロックサイズ制限情報にフレーム番号を付加して、メモリ102に保存し、本フローチャートにおける処理を終了させる。 In step S609, the block size limiting unit 202 adds a frame number to the block size limiting information in the frame, stores it in the memory 102, and ends the process in this flowchart.

なお、図6のフローチャートにおいては、輝度の判断を第1の範囲及び第2の範囲により行う場合が示されているが、同様にして3以上の範囲による輝度の判断を行ってもよい。また、輝度の判断を第1の範囲のみで行ってもよく、すなわち、ステップS605とステップS606を省略してもよい。また、図6のフローチャートにおける処理は、CTU、CU、PU、TUの各ブロックに対して実行されてもよく、ブロックの種類ごとにプロックサイズ制限情報が生成されてもよい。また、図6に示すフローチャートの各ステップの処理は、ブロックサイズ制限部202に代えてCPU210が行ってもよい。 In the flowchart of FIG. 6, the case where the brightness is determined by the first range and the second range is shown, but the brightness may be determined by the range of 3 or more in the same manner. Further, the brightness may be determined only in the first range, that is, steps S605 and S606 may be omitted. Further, the process in the flowchart of FIG. 6 may be executed for each block of CTU, CU, PU, and TU, and block size limit information may be generated for each block type. Further, the processing of each step of the flowchart shown in FIG. 6 may be performed by the CPU 210 instead of the block size limiting unit 202.

本実施形態では、輝度が所定の範囲内、典型的には輝度が比較的大きい画素において、ブロックサイズの上限を制限することにより、ブロックサイズを小さくすることができる。これにより、輝度の大きい画素において特に顕著となる符号化の際の量子化による画質の劣化が及ぶ範囲を狭くすることができる。したがって、本実施形態によれば、符号化による画質の劣化を低減し得る符号化装置及び符号化方法が提供される。 In the present embodiment, the block size can be reduced by limiting the upper limit of the block size in a pixel whose brightness is within a predetermined range, typically which is relatively high in brightness. As a result, it is possible to narrow the range in which the deterioration of the image quality due to the quantization at the time of coding, which is particularly remarkable in the pixel having high brightness. Therefore, according to the present embodiment, there is provided a coding device and a coding method capable of reducing deterioration of image quality due to coding.

[第2実施形態]
第2実施形態による符号化装置及び符号化方法について、図面を参照して詳細に説明する。本実施形態と第1実施形態との相違点は、ブロックサイズ制限部202の動作である。本実施形態において、画像処理装置100の構成は図1と同様であるため説明を省略する。また、本実施形態において、符号化処理部114の構成は図2と同様であるため説明を省略する。また、本実施形態において、符号化処理部114及び輝度情報取得部201の動作は、それぞれ、図4及び図5と同様であるため説明を省略する。
[Second Embodiment]
The coding apparatus and coding method according to the second embodiment will be described in detail with reference to the drawings. The difference between the present embodiment and the first embodiment is the operation of the block size limiting unit 202. In the present embodiment, the configuration of the image processing device 100 is the same as that in FIG. 1, and thus the description thereof will be omitted. Further, in the present embodiment, the configuration of the coding processing unit 114 is the same as that in FIG. 2, and thus the description thereof will be omitted. Further, in the present embodiment, the operations of the coding processing unit 114 and the luminance information acquisition unit 201 are the same as those in FIGS. 4 and 5, respectively, and thus the description thereof will be omitted.

<ブロックサイズ制限部202の動作>
図7は、本実施形態によるブロックサイズ制限部202の動作を示すフローチャートである。本動作は、図4のステップS406又はステップS407における符号化処理部114のブロックサイズ制限部202の処理に関して詳細に説明したものである。処理が画素単位で行われる場合はステップS406における処理となり、処理が画素群単位で行われる場合はステップS407の処理となる。なお、以下の説明において、図6の説明と共通する部分については説明を省略又は簡略化することがある。
<Operation of block size limiting unit 202>
FIG. 7 is a flowchart showing the operation of the block size limiting unit 202 according to the present embodiment. This operation has been described in detail with respect to the processing of the block size limiting unit 202 of the coding processing unit 114 in step S406 or step S407 of FIG. When the processing is performed in pixel units, it is the processing in step S406, and when the processing is performed in pixel group units, it is the processing in step S407. In the following description, the description may be omitted or simplified for the parts common to the description of FIG.

ステップS701において、ブロックサイズ制限部202は、ブロックサイズを仮決定する。当該処理は、図6のステップS601と同様である。その後、ブロックサイズ制限部202は、処理をステップS701からステップS702に移行させる。 In step S701, the block size limiting unit 202 tentatively determines the block size. The process is the same as in step S601 of FIG. After that, the block size limiting unit 202 shifts the process from step S701 to step S702.

ステップS702において、ブロックサイズ制限部202は、処理を行うブロックを選択する。当該処理は、図6のステップS602と同様である。ブロックの選択の終了後、ブロックサイズ制限部202は、処理をステップS702からステップS703に移行させる。 In step S702, the block size limiting unit 202 selects a block to be processed. The process is the same as in step S602 of FIG. After the block selection is completed, the block size limiting unit 202 shifts the process from step S702 to step S703.

ステップS703において、ブロックサイズ制限部202は、選択されたブロック内の画素302又は画素群303において、輝度情報が示す輝度が第1の範囲内であるか否かを判断する。ブロックサイズ制限部202は、画素302又は画素群303における輝度が第1の範囲内である場合には(ステップS703においてYES)、処理をステップS703からステップS704に移行させる。ブロックサイズ制限部202は、画素302又は画素群303における輝度が第1の範囲外である場合(ステップS703においてNO)、処理をステップS703からステップS705に移行させる。 In step S703, the block size limiting unit 202 determines whether or not the luminance indicated by the luminance information is within the first range in the pixels 302 or the pixel group 303 in the selected block. When the brightness in the pixel 302 or the pixel group 303 is within the first range (YES in step S703), the block size limiting unit 202 shifts the process from step S703 to step S704. When the brightness in the pixel 302 or the pixel group 303 is out of the first range (NO in step S703), the block size limiting unit 202 shifts the process from step S703 to step S705.

ステップS704において、ブロックサイズ制限部202は、レジスタのフラグFLG_Aの値を1にセットする。フラグFLG_Aは、値が1のとき、ブロック内に輝度が第1の範囲内である画素302又は画素群303を含む領域(以下、第1輝度領域と呼ぶ)が存在することを示し、値が0のとき、ブロック内に第1輝度領域が存在しないことを示す情報である。その後、ブロックサイズ制限部202は、処理をステップS704からステップS707に移行させる。なお、フラグFLG_Aには、ブロック内における第1輝度領域の位置情報も付加しておくものとする。 In step S704, the block size limiting unit 202 sets the value of the register flag FLG_A to 1. When the value is 1, the flag FLG_A indicates that there is a region (hereinafter, referred to as a first luminance region) including the pixel 302 or the pixel group 303 whose luminance is within the first range in the block, and the value is When it is 0, it is information indicating that the first luminance region does not exist in the block. After that, the block size limiting unit 202 shifts the process from step S704 to step S707. It should be noted that the position information of the first luminance region in the block is also added to the flag FLG_A.

ステップS705において、ブロックサイズ制限部202は、選択されたブロック内の画素302又は画素群303において、輝度情報が示す輝度が、第1の範囲内よりも低い輝度である第2の範囲内であるか否かを判断する。ブロックサイズ制限部202は、画素302又は画素群303における輝度が第2の範囲内であると判断した場合には(ステップS705においてYES)、処理をステップS705からステップS706に移行させる。ブロックサイズ制限部202は、画素302又は画素群303の輝度が第2の範囲外であると判断した場合(ステップS705においてNO)、処理をステップS705からステップS707に移行させる。 In step S705, the block size limiting unit 202 has a second range in which the brightness indicated by the brightness information in the pixels 302 or the pixel group 303 in the selected block is lower than the first range. Judge whether or not. When the block size limiting unit 202 determines that the brightness in the pixel 302 or the pixel group 303 is within the second range (YES in step S705), the block size limiting unit 202 shifts the process from step S705 to step S706. When the block size limiting unit 202 determines that the brightness of the pixel 302 or the pixel group 303 is out of the second range (NO in step S705), the block size limiting unit 202 shifts the process from step S705 to step S707.

ステップS706において、ブロックサイズ制限部202は、レジスタのフラグFLG_Bの値を1にセットする。フラグFLG_Bは、値が1のとき、ブロック内に輝度が第2の範囲内である画素302又は画素群303を含む領域(以下、第2輝度領域と呼ぶ)が存在することを示し、値が0のとき、ブロック内に第2輝度領域が存在しないことを示す情報である。その後、ブロックサイズ制限部202は、処理をステップS706からステップS707に移行させる。なお、フラグFLG_Bには、ブロック内における第2輝度領域の位置情報も付加しておくものとする。 In step S706, the block size limiting unit 202 sets the value of the register flag FLG_B to 1. When the value is 1, the flag FLG_B indicates that there is a region (hereinafter, referred to as a second luminance region) including the pixel 302 or the pixel group 303 whose brightness is within the second range in the block, and the value is When it is 0, it is information indicating that the second luminance region does not exist in the block. After that, the block size limiting unit 202 shifts the process from step S706 to step S707. It should be noted that the position information of the second luminance region in the block is also added to the flag FLG_B.

ステップS707において、ブロックサイズ制限部202は、フラグFLG_Aの値が1であり、かつ、フラグFLG_Bの値も1であるか否かを判断する。この処理では、ブロックサイズ制限部202は、フラグFLG_A及びフラグFLG_Bに基づいて、選択されたブロック内に第1輝度領域と第2輝度領域との両方が存在するか否かを判断している。ブロックサイズ制限部202は、フラグFLG_Aの値が1であり、かつ、フラグFLG_Bの値も1であると判断した場合(ステップS707においてYES)、処理をステップS707からステップS708に移行させる。ブロックサイズ制限部202は、フラグFLG_Aの値とフラグFLG_Bの値の少なくとも1つが0であると判断した場合(ステップS707においてNO)、処理をステップS707からステップS710に移行させる。 In step S707, the block size limiting unit 202 determines whether or not the value of the flag FLG_A is 1 and the value of the flag FLG_B is also 1. In this process, the block size limiting unit 202 determines whether or not both the first luminance region and the second luminance region exist in the selected block based on the flags FLG_A and the flag FLG_B. When the block size limiting unit 202 determines that the value of the flag FLG_A is 1 and the value of the flag FLG_B is also 1 (YES in step S707), the block size limiting unit 202 shifts the process from step S707 to step S708. When the block size limiting unit 202 determines that at least one of the value of the flag FLG_A and the value of the flag FLG_B is 0 (NO in step S707), the block size limiting unit 202 shifts the process from step S707 to step S710.

ステップS708において、ブロックサイズ制限部202は、選択されたブロック内において、隣接している第1輝度領域と第2輝度領域が存在しているか否かを判断する。具体的には、ブロックサイズ制限部202は、フラグFLG_AとフラグFLG_Bに付加された画素302又は画素群303の位置情報に基づいて当該判断を行う。ブロックサイズ制限部202は、隣接している第1輝度領域と第2輝度領域が存在すると判断した場合(ステップS708においてYES)、処理をステップS708からステップS709に移行させる。ブロックサイズ制限部202は、隣接している第1輝度領域と第2輝度領域が存在しないと判断した場合(ステップS708においてNO)、処理をステップS708からステップS710に移行させる。 In step S708, the block size limiting unit 202 determines whether or not the adjacent first luminance region and second luminance region exist in the selected block. Specifically, the block size limiting unit 202 makes the determination based on the position information of the pixels 302 or the pixel group 303 added to the flags FLG_A and the flag FLG_B. When the block size limiting unit 202 determines that the first and second luminance regions adjacent to each other exist (YES in step S708), the block size limiting unit 202 shifts the process from step S708 to step S709. When the block size limiting unit 202 determines that the adjacent first luminance region and second luminance region do not exist (NO in step S708), the block size limiting unit 202 shifts the process from step S708 to step S710.

ステップS709において、ブロックサイズ制限部202は、隣接している第1輝度領域と第2輝度領域との境界を同一ブロックとするようにブロックサイズ制限情報を更新してメモリ102に保存する。画素302又は画素群303ごとに繰り返しステップS709を実行してもよく、その場合は、隣接している第1輝度領域と第2輝度領域を発見するごとにブロックサイズ制限情報を更新してメモリ102に保存する。その後、ブロックサイズ制限部202は、処理をステップS709からステップS710に移行させる。 In step S709, the block size limiting unit 202 updates the block size limiting information so that the boundary between the adjacent first luminance region and the second luminance region is the same block, and saves the block size limiting information in the memory 102. Step S709 may be repeatedly executed for each pixel 302 or pixel group 303, and in that case, the block size limit information is updated every time the adjacent first luminance region and second luminance region are found, and the memory 102. Save to. After that, the block size limiting unit 202 shifts the process from step S709 to step S710.

ステップS710において、ブロックサイズ制限部202は、選択されたブロック内の全ての画素302又は画素群303に対してステップS703からステップS709の処理が実行されたか否かを判断する。ブロックサイズ制限部202は、選択されたブロック内の全ての画素302又は画素群303に対して処理が実行されたと判断した場合(ステップS710においてYES)、処理をステップS710からステップS711に移行させる。ブロックサイズ制限部202は、選択されたブロック内に処理が実行されていない画素302又は画素群303があると判断した場合(ステップS710においてNO)、処理をステップS710からステップS703に移行させる。 In step S710, the block size limiting unit 202 determines whether or not the processes of steps S703 to S709 have been executed for all the pixels 302 or the pixel group 303 in the selected block. When the block size limiting unit 202 determines that the processing has been executed for all the pixels 302 or the pixel group 303 in the selected block (YES in step S710), the block size limiting unit 202 shifts the processing from step S710 to step S711. When the block size limiting unit 202 determines that there are pixels 302 or pixel group 303 for which processing has not been executed in the selected block (NO in step S710), the block size limiting unit 202 shifts the processing from step S710 to step S703.

ステップS711において、ブロックサイズ制限部202は、再びフラグFLG_Aの値が1であり、かつ、フラグFLG_Bの値も1であるか否かを判断する。ブロックサイズ制限部202は、フラグFLG_Aの値が1であり、かつ、フラグFLG_Bの値も1であると判断した場合(S711においてYES)、処理をステップS711からステップS712に移行させる。ブロックサイズ制限部202は、フラグFLG_Aの値とFLG_Bの値の少なくとも1つが0であると判断した場合(S711においてNO)、処理をステップS711からステップS713に移行させる。 In step S711, the block size limiting unit 202 again determines whether or not the value of the flag FLG_A is 1 and the value of the flag FLG_B is also 1. When the block size limiting unit 202 determines that the value of the flag FLG_A is 1 and the value of the flag FLG_B is also 1 (YES in S711), the block size limiting unit 202 shifts the process from step S711 to step S712. When the block size limiting unit 202 determines that at least one of the value of the flag FLG_A and the value of FLG_B is 0 (NO in S711), the block size limiting unit 202 shifts the process from step S711 to step S713.

ステップS712において、ブロックサイズ制限部202は、ブロック内の画素302又は画素群303の輝度の分散値を算出することにより、ブロック内の輝度の平坦度を取得する。分散値とは、ブロック内における画素302又は画素群303の輝度の2乗の平均と平均の2乗との差である。ブロックサイズ制限部202は、輝度の分散値に応じてブロックサイズ制限情報を更新してメモリ102に保存する。例えば、ブロックサイズ制限部202は、輝度の分散値が小さい場合には、ブロックサイズ制限情報により規定されるブロックサイズの上限を低く設定することにより、ブロックサイズの制限を厳しくする。その後、ブロックサイズ制限部202は、処理をステップS712からステップS713に移行させる。 In step S712, the block size limiting unit 202 acquires the flatness of the brightness in the block by calculating the dispersion value of the brightness of the pixels 302 or the pixel group 303 in the block. The variance value is the difference between the average of the squares of the brightness of the pixels 302 or the pixel group 303 in the block and the square of the average. The block size limiting unit 202 updates the block size limiting information according to the dispersion value of the brightness and stores it in the memory 102. For example, when the variance value of the luminance is small, the block size limiting unit 202 tightens the block size limitation by setting the upper limit of the block size defined by the block size limiting information to be low. After that, the block size limiting unit 202 shifts the process from step S712 to step S713.

ステップS713において、ブロックサイズ制限部202は、フレーム内の全てのブロックに対して、ステップS702からステップS712までの処理が実行されたか否かを判断する。ブロックサイズ制限部202は、フレーム内の全てのブロックに対して処理が実行されたと判断した場合(ステップS713においてYES)、処理をステップS713からステップS714に移行させる。ブロックサイズ制限部202は、フレーム内に処理が実行されていないブロックがあると判断した場合(ステップS713においてNO)、処理をステップS713からステップS702に移行させる。 In step S713, the block size limiting unit 202 determines whether or not the processes from step S702 to step S712 have been executed for all the blocks in the frame. When the block size limiting unit 202 determines that the processing has been executed for all the blocks in the frame (YES in step S713), the block size limiting unit 202 shifts the processing from step S713 to step S714. When the block size limiting unit 202 determines that there is a block in the frame for which processing has not been executed (NO in step S713), the block size limiting unit 202 shifts the processing from step S713 to step S702.

ステップS714において、ブロックサイズ制限部202は、フレーム内のブロックサイズ制限情報にフレーム番号を付加して、メモリ102に保存し、本フローチャートにおける処理を終了させる。 In step S714, the block size limiting unit 202 adds a frame number to the block size limiting information in the frame, stores it in the memory 102, and ends the process in this flowchart.

なお、図7のフローチャートにおいては、輝度の判断を第1の範囲及び第2の範囲により行う場合が示されているが、同様にして3以上の範囲による輝度の判断を行ってもよい。また、輝度の判断を第1の範囲のみで行ってもよく、すなわち、ステップS705とステップS706を省略してもよい。また、図7のフローチャートにおける処理は、CTU、CU、PU、TUの各ブロックに対して実行されてもよく、ブロックの種類ごとにプロックサイズ制限情報が生成されてもよい。また、図7に示すフローチャートの各ステップの処理は、ブロックサイズ制限部202に代えてCPU210が行ってもよい。 In the flowchart of FIG. 7, the case where the brightness is determined by the first range and the second range is shown, but the brightness may be determined by the range of 3 or more in the same manner. Further, the brightness may be determined only in the first range, that is, steps S705 and S706 may be omitted. Further, the process in the flowchart of FIG. 7 may be executed for each block of CTU, CU, PU, and TU, and block size limit information may be generated for each block type. Further, the processing of each step of the flowchart shown in FIG. 7 may be performed by the CPU 210 instead of the block size limiting unit 202.

本実施形態では、輝度が第1の範囲内にある第1輝度領域(典型的には輝度が比較的高い画素)と、輝度が第2の範囲内にある第2輝度領域(典型的には輝度が比較的低い画素)が混在している場合における処理について述べた。第1輝度領域と第2輝度領域が隣接している場合にこれらの境界を同一ブロックとすることにより、輝度の境界による影響を考慮することができ、境界付近の量子化による画質の劣化を低減することができる。また、第1輝度領域と第2輝度領域が存在し、かつ分散値が小さい場合に、分散値に応じてブロックサイズの制限を設定することにより、高輝度の領域と低輝度の領域が混在する画像において、画像の平坦性を考慮したブロックサイズの設定が可能となる。 In the present embodiment, a first luminance region (typically a pixel having a relatively high luminance) in which the luminance is within the first range and a second luminance region (typically, a pixel having a relatively high luminance) in which the luminance is within the second range. The processing when (pixels with relatively low brightness) are mixed has been described. When the first luminance region and the second luminance region are adjacent to each other, by making these boundaries the same block, it is possible to consider the influence of the luminance boundary and reduce the deterioration of image quality due to quantization near the boundary. can do. Further, when the first luminance region and the second luminance region exist and the dispersion value is small, the high-luminance region and the low-luminance region coexist by setting the block size limit according to the dispersion value. In the image, the block size can be set in consideration of the flatness of the image.

以上のように、本実施形態によれば、第1実施形態の効果に加え、高輝度の領域と低輝度の領域が混在する画像において、輝度の境界の影響及び画像の平坦性を考慮してブロックサイズの制限が行われ、符号化による画質の劣化をより低減することができる。 As described above, according to the present embodiment, in addition to the effect of the first embodiment, in an image in which a high-luminance region and a low-luminance region coexist, the influence of the luminance boundary and the flatness of the image are taken into consideration. The block size is limited, and the deterioration of image quality due to encoding can be further reduced.

[第3実施形態]
第3実施形態による符号化装置及び符号化方法について、図面を参照して詳細に説明する。本実施形態が第1実施形態又は第2実施形態との相違する点は、本実施形態においては輝度情報の算出が符号化処理部114の外部の装置で行われている点である。すなわち、本実施形態では、輝度情報取得部201は、符号化処理部114の外部の装置によって画素値を用いて算出された輝度情報を取得する。なお、画像処理装置100の構成は図1と同様であるため説明を省略する。また、本実施形態において、符号化処理部114の構成は図2と同様であるため説明を省略する。また、本実施形態において、ブロックサイズ制限部202の動作は、図6又は図7と同様であるため説明を省略する。
[Third Embodiment]
The coding apparatus and coding method according to the third embodiment will be described in detail with reference to the drawings. The difference between this embodiment and the first embodiment or the second embodiment is that in this embodiment, the calculation of the luminance information is performed by an external device of the coding processing unit 114. That is, in the present embodiment, the luminance information acquisition unit 201 acquires the luminance information calculated by using the pixel values by an external device of the coding processing unit 114. Since the configuration of the image processing device 100 is the same as that in FIG. 1, the description thereof will be omitted. Further, in the present embodiment, the configuration of the coding processing unit 114 is the same as that in FIG. 2, and thus the description thereof will be omitted. Further, in the present embodiment, the operation of the block size limiting unit 202 is the same as that in FIG. 6 or FIG. 7, and thus the description thereof will be omitted.

<符号化処理部114の動作>
図8は、本実施形態による符号化処理部114の動作を示すフローチャートである。この動作は、画像処理装置100の電源がオンの状態において、不揮発性メモリ103に格納されているプログラムがメモリ102に展開され、符号化処理部114内のCPU210がメモリ102のプログラムを読み出して実行することにより実現される。図8のフローチャートによる処理は、フレームごとに実行されるものであり、当該処理は定期的に繰り返し実行されてもよい。
<Operation of coding processing unit 114>
FIG. 8 is a flowchart showing the operation of the coding processing unit 114 according to the present embodiment. In this operation, when the power of the image processing device 100 is turned on, the program stored in the non-volatile memory 103 is expanded in the memory 102, and the CPU 210 in the coding processing unit 114 reads the program in the memory 102 and executes it. It is realized by doing. The process according to the flowchart of FIG. 8 is executed frame by frame, and the process may be repeatedly executed periodically.

ステップS801及びステップS802の動作は、それぞれ図4のステップS401及びステップS402と同様であるため説明を省略する。ステップS803において、CPU210は、CPU101によりメモリ102に格納された輝度情報を取得する。その後、CPU210は、処理をステップS803からステップS804に移行させる。なお、CPU101によりメモリ102に格納された輝度情報を取得することは必須ではなく、別の方法により行われてもよい。例えば、CPU210による輝度情報の取得は、画像処理部113から符号化処理部114に送信されることにより行われてもよく、画像処理装置100以外の外部機器127から符号化処理部114に送信されることにより行われてもよい。 Since the operations of step S801 and step S802 are the same as those of step S401 and step S402 of FIG. 4, the description thereof will be omitted. In step S803, the CPU 210 acquires the luminance information stored in the memory 102 by the CPU 101. After that, the CPU 210 shifts the process from step S803 to step S804. It is not essential that the CPU 101 acquire the luminance information stored in the memory 102, and it may be performed by another method. For example, the acquisition of the luminance information by the CPU 210 may be performed by being transmitted from the image processing unit 113 to the coding processing unit 114, and is transmitted from an external device 127 other than the image processing device 100 to the coding processing unit 114. It may be done by.

ステップS804において、CPU210は、S403と同様の動作により画像データのアドレス情報を取得する。その後、CPU210は、処理をステップS804からステップS805に移行させる。その後のステップS805からステップS810の動作は、それぞれ図4のステップS405からステップS410の動作と同様であるため説明を省略する。 In step S804, the CPU 210 acquires the address information of the image data by the same operation as in S403. After that, the CPU 210 shifts the process from step S804 to step S805. Subsequent operations of steps S805 to S810 are the same as the operations of steps S405 to S410 of FIG. 4, and thus the description thereof will be omitted.

<CPU101による輝度情報算出の動作>
図9は、本実施形態によるCPU101における輝度情報算出の動作を示すフローチャートである。この動作は、画像処理装置100の電源がオンの状態において、不揮発性メモリ103に格納されているプログラムがメモリ102に展開され、CPU101が、メモリ102のプログラムを読み出して実行することにより実現される。図9のフローチャートによる処理は、フレームごとに実行されるものであり、当該処理は定期的に繰り返し実行されてもよい。
<Operation of calculating brightness information by CPU 101>
FIG. 9 is a flowchart showing the operation of calculating the luminance information in the CPU 101 according to the present embodiment. This operation is realized by expanding the program stored in the non-volatile memory 103 to the memory 102 and having the CPU 101 read and execute the program in the memory 102 while the power of the image processing device 100 is on. .. The process according to the flowchart of FIG. 9 is executed frame by frame, and the process may be repeatedly executed periodically.

ステップS901において、CPU101は、画像処理部113から取得した伝達関数情報が所定のHDR方式に対応する所定の伝達関数を示すものであるか否かを判断する。所定の伝達関数の一例としては、PQ又はHLGが挙げられる。CPU101は、伝達関数情報が、所定のHDR方式に対応するものであると判断した場合(ステップS901においてYES)、処理をステップS901からステップS902に移行させる。CPU101は、伝達関数情報が、所定のHDR方式に対応するものでないと判断した場合(ステップS901においてNO)、処理をステップS901からステップS906に移行させる。 In step S901, the CPU 101 determines whether or not the transfer function information acquired from the image processing unit 113 indicates a predetermined transfer function corresponding to the predetermined HDR method. An example of a predetermined transfer function is PQ or HLG. When the CPU 101 determines that the transfer function information corresponds to the predetermined HDR method (YES in step S901), the CPU 101 shifts the process from step S901 to step S902. When the CPU 101 determines that the transfer function information does not correspond to the predetermined HDR method (NO in step S901), the CPU 101 shifts the process from step S901 to step S906.

ステップS902において、CPU101は、メモリ102から画像データを読み出す。CPU101は、読み出された画像データの画素値がYUV形式、YCbCr形式等である場合には、当該画像データの画素値からR’G’B’データを算出してメモリ102に保存する。CPU101は、メモリ102からR’G’B’データを読み出し、R’G’B’データに対して、デガンマ処理を行いリニアなRGBデータを算出してメモリ102に保存する。CPU101は、メモリ102からRGBデータを読み出し、RGBデータの中の最大値を算出して、MaxCLL値として取得する。更に、CPU101は、RGBデータの中での平均値を算出してMaxFALL値として取得する。CPU101は、算出されたMaxCLL及びMaxFALLを、輝度情報として、ブロックサイズ制限部202に送信し、又はメモリ102に保存する。その後、CPU101は、処理をステップS902からステップS903に移行させる。 In step S902, the CPU 101 reads the image data from the memory 102. When the pixel value of the read image data is in the YUV format, YCbCr format, or the like, the CPU 101 calculates R'G'B'data from the pixel value of the image data and stores it in the memory 102. The CPU 101 reads R'G'B'data from the memory 102, performs degamma processing on the R'G'B' data, calculates linear RGB data, and stores it in the memory 102. The CPU 101 reads RGB data from the memory 102, calculates the maximum value in the RGB data, and acquires it as a MaxCLL value. Further, the CPU 101 calculates an average value in the RGB data and acquires it as a MaxFALL value. The CPU 101 transmits the calculated MaxCLL and MaxFALL as luminance information to the block size limiting unit 202, or stores the calculated MaxCLL and MaxFALL in the memory 102. After that, the CPU 101 shifts the process from step S902 to step S903.

ステップS903において、CPU101は、メモリ102から読み出した画像データの画素値から各画素302の輝度を取得する。なお、ステップS903の処理は、輝度がRGBデータから取得される場合には、ステップS902においてMaxCLLを算出する処理又はMaxFALLを算出する処理の中で算出されたRGBデータ等の画素値を用いて行われてもよい。その後、CPU101は、処理をステップS903からステップS904に移行させる。 In step S903, the CPU 101 acquires the brightness of each pixel 302 from the pixel value of the image data read from the memory 102. In the process of step S903, when the brightness is acquired from the RGB data, the pixel value such as the RGB data calculated in the process of calculating MaxCLL or the process of calculating MaxFALL in step S902 is used. You may be broken. After that, the CPU 101 shifts the process from step S903 to step S904.

ステップS904において、CPU101は、メモリ102から画像データを読み出し、所定の画素群303単位で各画素群303の輝度の平均値、合計値、最大値、最小値等を算出する。なお、ステップS904の処理は、各画素群303の輝度がRGBデータから算出される場合には、ステップS902におけるMaxCLLを算出する処理又はMaxFALLを算出する処理とともに行われてもよい。その後、CPU101は、処理をステップS904からステップS905に移行させる。 In step S904, the CPU 101 reads the image data from the memory 102 and calculates the average value, the total value, the maximum value, the minimum value, and the like of the brightness of each pixel group 303 in a predetermined pixel group 303 unit. When the brightness of each pixel group 303 is calculated from the RGB data, the process of step S904 may be performed together with the process of calculating MaxCLL or the process of calculating MaxFALL in step S902. After that, the CPU 101 shifts the process from step S904 to step S905.

ステップS905において、CPU101は、ステップS902からステップS904までの処理において生成された輝度情報を符号化処理部114に出力する。出力の方法はCPU101がメモリ102に輝度情報を書き込むことにより符号化処理部114が読み出すことができるようにするものであってもよく、CPU101が輝度情報を直接符号化処理部114のレジスタ等に書き込むものであってもよい。その後、CPU101は、処理をステップS905からステップS906に移行させる。 In step S905, the CPU 101 outputs the luminance information generated in the processes from step S902 to step S904 to the coding processing unit 114. The output method may be such that the CPU 101 writes the luminance information to the memory 102 so that the coding processing unit 114 can read the luminance information, and the CPU 101 directly sends the luminance information to the register of the coding processing unit 114 or the like. It may be something to write. After that, the CPU 101 shifts the process from step S905 to step S906.

ステップS906において、CPU101は、ステップS901において取得した伝達関数情報を符号化処理部114に出力する。出力の方法はCPU101がメモリ102に伝達関数情報を書き込むことにより符号化処理部114が読み出すことができるようにするものであってもよく、CPU101が伝達関数情報を直接符号化処理部114のレジスタ等に書き込むものであってもよい。その後、CPU101は、処理をステップS906からステップS907に移行させる。 In step S906, the CPU 101 outputs the transfer function information acquired in step S901 to the coding processing unit 114. The output method may be such that the CPU 101 writes the transfer function information to the memory 102 so that the coding processing unit 114 can read it, and the CPU 101 directly writes the transfer function information to the register of the coding processing unit 114. Etc. may be written. After that, the CPU 101 shifts the process from step S906 to step S907.

ステップS907において、CPU101は、メモリ102に保存されている画像データのアドレス情報を符号化処理部114に出力する。なお、符号化処理部114が画像処理装置100の外部に存在する場合には、画像データは通信制御部117を介して、符号化処理部114に出力される。その後、CPU101は、処理をステップS906からステップS907に移行させる。 In step S907, the CPU 101 outputs the address information of the image data stored in the memory 102 to the coding processing unit 114. When the coding processing unit 114 exists outside the image processing device 100, the image data is output to the coding processing unit 114 via the communication control unit 117. After that, the CPU 101 shifts the process from step S906 to step S907.

ステップS908において、CPU101は、符号化処理部114から出力されたストリームデータを受信して、メモリ102に保存する。その後、CPU101は、ストリームデータを、MP4ファイル、MXFファイル等にコンテナ化し、記録媒体制御部119を制御してコンテナ化したファイルを記録媒体120に保存する。その後、CPU101は、本フローチャートにおける処理を終了する。 In step S908, the CPU 101 receives the stream data output from the coding processing unit 114 and stores it in the memory 102. After that, the CPU 101 containerizes the stream data into an MP4 file, an MXF file, or the like, controls the recording medium control unit 119, and stores the containerized file in the recording medium 120. After that, the CPU 101 ends the process in this flowchart.

なお、図9に示すフローチャートにおける処理は、CPU101に代えて画像処理部113が実行することにより実現されてもよい。 The processing in the flowchart shown in FIG. 9 may be realized by executing the image processing unit 113 instead of the CPU 101.

以上に示したように、輝度情報の算出を符号化処理部114の内部で行わず、外部の装置で算出された輝度情報を取得して符号化処理を行う本実施形態の構成においても、第1又は第2実施形態と同様の効果を得ることができる。例えば、外部の専用コーデックを符号化処理部114として使用する場合において、輝度情報の算出機能が無い場合であっても実施可能である。 As shown above, also in the configuration of the present embodiment in which the luminance information is not calculated inside the coding processing unit 114, but the luminance information calculated by an external device is acquired and the coding process is performed. The same effect as that of the first or second embodiment can be obtained. For example, when an external dedicated codec is used as the coding processing unit 114, it can be carried out even when there is no function of calculating the luminance information.

[変形実施形態]
以上、好適な実施形態に基づいて本発明について詳述したが、本発明はこれらの実施形態に限定されるものではなく、要旨を逸脱しない範囲での様々な形態も本発明に含まれる。
[Modification Embodiment]
Although the present invention has been described in detail based on the preferred embodiments, the present invention is not limited to these embodiments, and various embodiments are also included in the present invention without departing from the gist.

本発明が適用され得る対象は、上述の実施形態で説明した画像処理装置100、符号化処理部114等に限定されるものではない。例えば、画像処理装置又は符号化装置を複数の装置から構成されるシステムとした場合であっても上述の実施形態と同様の機能を実現することが可能である。 The object to which the present invention can be applied is not limited to the image processing apparatus 100, the coding processing unit 114, and the like described in the above-described embodiment. For example, even when the image processing device or the coding device is a system composed of a plurality of devices, it is possible to realize the same functions as those in the above-described embodiment.

本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100 画像処理装置
114 符号化処理部
201 輝度情報取得部
202 ブロックサイズ制限部
203 予測符号化方法決定部
204 予測符号化処理部
205 直交変換量子化部
206 局所復号化部
207 符号量制御部
208 エントロピー符号化部
209 多重化処理部
210 CPU
100 Image processing device 114 Coding processing unit 201 Brightness information acquisition unit 202 Block size limiting unit 203 Predictive coding method determination unit 204 Predictive coding processing unit 205 Orthogonal conversion quantization unit 206 Local decoding unit 207 Code amount control unit 208 Entropy Coding unit 209 Multiplexing processing unit 210 CPU

Claims (15)

画像を構成する複数の画素の画素値に基づく輝度情報を取得する輝度情報取得手段と、
前記輝度情報に基づいて、前記複数の画素を含むブロックにおけるブロックサイズの上限に関するブロックサイズ制限情報を生成するブロックサイズ制限手段と、
前記ブロックサイズ制限情報に基づいて設定された前記ブロックを単位として前記画像の符号化を行う符号化手段と
を有し、
前記ブロックサイズ制限手段は、前記画像の伝達関数がPerceptual Quantizer又は、Hybrid Log Gammaに対応するものである場合に前記ブロックサイズの上限を最大ブロックサイズよりも小さい値に制限するように前記ブロックサイズ制限情報を生成することを特徴とする符号化装置。
Luminance information acquisition means for acquiring luminance information based on pixel values of a plurality of pixels constituting an image,
A block size limiting means for generating block size limiting information regarding the upper limit of the block size in the block including the plurality of pixels based on the luminance information.
Have a coding means for coding the image the blocks set on the basis of the block size limitation information units,
The block size limiting means limits the block size so as to limit the upper limit of the block size to a value smaller than the maximum block size when the transfer function of the image corresponds to Perceptual Quantizer or Hybrid Log Gamma. A coding device characterized by generating information.
前記輝度情報取得手段は、前記画素値を用いて前記輝度情報を算出することにより、前記輝度情報を取得することを特徴とする請求項1に記載の符号化装置。 The coding device according to claim 1, wherein the luminance information acquisition means acquires the luminance information by calculating the luminance information using the pixel values. 前記輝度情報取得手段は、外部の装置によって前記画素値を用いて算出された前記輝度情報を取得することを特徴とする請求項1に記載の符号化装置。 The coding device according to claim 1, wherein the luminance information acquisition means acquires the luminance information calculated by using the pixel values by an external device. 前記輝度情報の算出は、Maximum Content Light Level又はMaximum Frame−Average Light Levelを算出する処理の中で算出された前記画素値を用いて行われることを特徴とする請求項2又は3に記載の符号化装置。 The reference numeral according to claim 2 or 3, wherein the calculation of the luminance information is performed using the pixel value calculated in the process of calculating the Maximum Content Light Level or the Maximum Frame-Average Light Level. Chemical device. 前記ブロックサイズ制限手段は、前記輝度情報が示す輝度が第1の範囲内である場合に、前記ブロックサイズの上限を第1のサイズに設定することを特徴とする請求項1乃至4のいずれか1項に記載の符号化装置。 Any of claims 1 to 4, wherein the block size limiting means sets an upper limit of the block size to the first size when the brightness indicated by the brightness information is within the first range. The coding apparatus according to item 1. 前記ブロックサイズ制限手段は、更に、前記輝度が前記第1の範囲内よりも低い第2の範囲内であると判断した場合に、前記ブロックサイズの上限を第2のサイズに設定することを特徴とする請求項5に記載の符号化装置。 The block size limiting means further features setting the upper limit of the block size to the second size when it is determined that the brightness is within the second range lower than the first range. The coding apparatus according to claim 5. 前記第2のサイズは、前記第1のサイズよりも大きいことを特徴とする請求項6に記載の符号化装置。 The coding apparatus according to claim 6, wherein the second size is larger than the first size. 前記ブロックサイズ制限手段は、前記輝度が前記第1の範囲内である第1輝度領域と、前記輝度が第2の範囲内である第2輝度領域とが隣接する場合に、前記第1輝度領域と第2輝度領域との境界が同一のブロックに含まれるように前記ブロックサイズ制限情報を更新することを特徴とする請求項6又は7に記載の符号化装置。 The block size limiting means is the first luminance region when the first luminance region in which the luminance is within the first range and the second luminance region in which the luminance is within the second range are adjacent to each other. The coding apparatus according to claim 6 or 7, wherein the block size limit information is updated so that the boundary between the second luminance region and the second luminance region is included in the same block. 前記ブロックサイズ制限手段は、前記輝度の分散値に応じて、前記ブロックサイズ制限情報を更新することを特徴とする請求項6乃至8のいずれか1項に記載の符号化装置。 The coding device according to any one of claims 6 to 8, wherein the block size limiting means updates the block size limiting information according to the dispersion value of the brightness. 前記ブロックサイズ制限手段は、前記画素の各々の前記画素値から算出された前記輝度情報に基づいて、画素単位で判断を行って前記ブロックサイズ制限情報を生成することを特徴とする請求項1乃至のいずれか1項に記載の符号化装置。 The block size limiting means is characterized in that the block size limiting information is generated by making a determination on a pixel-by-pixel basis based on the luminance information calculated from the pixel value of each of the pixels. 9. The encoding device according to any one of 9. 前記ブロックサイズ制限手段は、複数の前記画素を含む画素群を単位として算出された前記輝度情報に基づいて、画素群単位で判断を行って前記ブロックサイズ制限情報を生成することを特徴とする請求項1乃至のいずれか1項に記載の符号化装置。 The claim is characterized in that the block size limiting means generates the block size limiting information by making a determination on a pixel group basis based on the luminance information calculated for each pixel group including the plurality of pixels. Item 2. The coding apparatus according to any one of Items 1 to 9. 前記ブロックは、マクロブロック、Coding Tree Unit、Coding Unit、Prediction Unit又はTransform Unitのいずれかであることを特徴とする請求項1乃至11のいずれか1項に記載の符号化装置。 The coding apparatus according to any one of claims 1 to 11 , wherein the block is any one of a macro block, a coding tree unit, a coding unit, a prediction unit, and a transfer unit. 前記符号化手段は、前記ブロックサイズ制限情報に基づいて前記ブロックの量子化パラメータの割り当ての優先度を設定することを特徴とする請求項1乃至12のいずれか1項に記載の符号化装置。 The coding device according to any one of claims 1 to 12 , wherein the coding means sets a priority for assigning a quantization parameter of the block based on the block size limitation information. 画像を構成する複数の画素の画素値に基づく輝度情報を取得するステップと、
前記輝度情報に基づいて、前記複数の画素を含むブロックにおけるブロックサイズの上限に関するブロックサイズ制限情報を生成するステップと、
前記ブロックサイズ制限情報に基づいて設定された前記ブロックを単位として前記画像の符号化を行うステップと
を有し、
前記ブロックサイズ制限情報を生成するステップにおいて、前記画像の伝達関数がPerceptual Quantizer又は、Hybrid Log Gammaに対応するものである場合に前記ブロックサイズの上限を最大ブロックサイズよりも小さい値に制限するように前記ブロックサイズ制限情報が生成されることを特徴とする符号化方法。
A step of acquiring luminance information based on the pixel values of a plurality of pixels constituting the image, and
Based on the luminance information, a step of generating block size limit information regarding the upper limit of the block size in the block including the plurality of pixels, and
Possess and performing coding of the image the blocks set on the basis of the block size limitation information units,
In the step of generating the block size limit information, when the transfer function of the image corresponds to Perceptual Quantizer or Hybrid Log Gamma, the upper limit of the block size is limited to a value smaller than the maximum block size. A coding method characterized in that the block size limit information is generated.
コンピュータに、
画像を構成する複数の画素の画素値に基づく輝度情報を取得するステップと、
前記輝度情報に基づいて、前記複数の画素を含むブロックにおけるブロックサイズの上限に関するブロックサイズ制限情報を生成するステップと、
前記ブロックサイズ制限情報に基づいて設定された前記ブロックを単位として前記画像の符号化を行うステップと
を実行させるプログラムであって、
前記ブロックサイズ制限情報を生成するステップにおいて、前記画像の伝達関数がPerceptual Quantizer又は、Hybrid Log Gammaに対応するものである場合に前記ブロックサイズの上限を最大ブロックサイズよりも小さい値に制限するように前記ブロックサイズ制限情報が生成されることを特徴とするプログラム。
On the computer
A step of acquiring luminance information based on the pixel values of a plurality of pixels constituting the image, and
Based on the luminance information, a step of generating block size limit information regarding the upper limit of the block size in the block including the plurality of pixels, and
A program that executes a step of encoding the image in units of the blocks set based on the block size limit information.
In the step of generating the block size limit information, when the transfer function of the image corresponds to the Perceptual Quantizer or Hybrid Log Gamma, the upper limit of the block size is limited to a value smaller than the maximum block size. A program characterized in that the block size limit information is generated.
JP2016235879A 2016-12-05 2016-12-05 Coding device and coding method Active JP6838951B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016235879A JP6838951B2 (en) 2016-12-05 2016-12-05 Coding device and coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016235879A JP6838951B2 (en) 2016-12-05 2016-12-05 Coding device and coding method

Publications (2)

Publication Number Publication Date
JP2018093386A JP2018093386A (en) 2018-06-14
JP6838951B2 true JP6838951B2 (en) 2021-03-03

Family

ID=62565753

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016235879A Active JP6838951B2 (en) 2016-12-05 2016-12-05 Coding device and coding method

Country Status (1)

Country Link
JP (1) JP6838951B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4033292B2 (en) * 2002-06-05 2008-01-16 株式会社Kddi研究所 Quantization control method for video coding
JP2007201558A (en) * 2006-01-23 2007-08-09 Matsushita Electric Ind Co Ltd Moving picture coding apparatus and moving picture coding method
WO2011080925A1 (en) * 2009-12-28 2011-07-07 パナソニック株式会社 Image coding device and method
JP2013106333A (en) * 2011-11-17 2013-05-30 Sony Corp Image processing apparatus and method
JP2015115903A (en) * 2013-12-13 2015-06-22 キヤノン株式会社 Imaging apparatus, control method of imaging apparatus, and computer program
WO2016181584A1 (en) * 2015-05-12 2016-11-17 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Display method and display device

Also Published As

Publication number Publication date
JP2018093386A (en) 2018-06-14

Similar Documents

Publication Publication Date Title
AU2022203068B2 (en) Apparatus and method for image processing
JP4682102B2 (en) Image coding apparatus and image coding method
US10674110B2 (en) Image encoding apparatus, and control method thereof
JP2012170042A (en) Image encoding device, image decoding device, method thereof, and program
US10600170B2 (en) Method and device for producing a digital image
US9055182B2 (en) Image coding apparatus, image coding method, and program
JP2015115903A (en) Imaging apparatus, control method of imaging apparatus, and computer program
US8934042B2 (en) Candidate image presenting method using thumbnail image and image signal processing device and imaging device performing the same
JP6838951B2 (en) Coding device and coding method
JP2007129403A (en) Image encoder and image processing system
CN106464903B (en) Method for encoding and decoding images, device for encoding and decoding images, and corresponding computer programs
US20200294211A1 (en) Image display apparatus, image supply apparatus, and control method thereof
JP2021118403A (en) Image processing device, control method thereof, program, and image processing system
KR101871946B1 (en) Apparatus, method and program of image processing
JP6465570B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2020057898A (en) Image coding device
JP6867774B2 (en) Image coding device and its control method
JP2017069914A (en) Image processing apparatus
JP7076983B2 (en) Coding device, image processing device and image processing method
KR100686358B1 (en) Image improving system and method thereof
JP2020112730A (en) Display device, control method, program, and storage medium
JP7148236B2 (en) Encoding device and its control method and program
JP5924262B2 (en) Image processing apparatus and image processing program
CN110418133B (en) Method and apparatus for encoding image data
KR100771138B1 (en) Imaging device and image correcting method

Legal Events

Date Code Title Description
RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20171214

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180126

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201020

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201021

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201210

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210212

R151 Written notification of patent or utility model registration

Ref document number: 6838951

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151