Project Name  Version 1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Typedefs | Enumerations | Functions
Tonemapper Interface

Defines the API for the JPEG-HDR mobile tonemapper library. More...

Data Structures

struct  jh_tmo_description_ts
 Defines the description for a tonemapper type. More...
struct  jh_tmo_params_ts
 Defines the parameters that control the behavior of the tonemapper. Parameters are specified depending on the type of tonemapper. More...

Typedefs

typedef enum jh_exposure_method_ts jh_exposure_method_t
 Defines the exposure-mode settings for the tonemapper.
typedef enum jh_tmo_selector_ts jh_tmo_selector_t
 Defines the tonemapper types.
typedef struct
jh_tmo_description_ts 
jh_tmo_description_t
 Defines the description for a tonemapper type.
typedef struct jh_tmo_params_ts jh_tmo_params_t
 Defines the parameters that control the behavior of the tonemapper. Parameters are specified depending on the type of tonemapper.

Enumerations

enum  jh_exposure_method_ts { JH_EX_MODE_MEDIAN = 1 }
 Defines the exposure-mode settings for the tonemapper. More...
enum  jh_tmo_selector_ts { JH_SIMPLE = 1, JH_EXP_GAMMA = 2, JH_HAMS = 3, JH_CPT = 4 }
 Defines the tonemapper types. More...

Functions

int jh_get_tmo_list (jh_tmo_description_t tmo_list[])
 Returns the size of the list of tonemappers available for the encoder and the list itself as an array of values of type jh_tmo_description_ts. If jh_get_tmo_list() is called using NULL for tmo_list, returns only the size of the list as a value of type int.
int jh_tonemap (const jh_tmo_params_t *tmo_params, jh_monitor_t *monitor, const jh_image_t *hdri, const jh_rect_t *r_in, jh_image_t *sdri, jh_error_t *error)
 Tone maps an HDR image and returns an SDR image.
int jh_tonemap_memory_estimate (const int pixels, const jh_tmo_params_t *tmo_params, int *mem, jh_error_t *error)
 Estimates the amount of memory required for processing.
int jh_tonemap_set_default (const jh_tmo_selector_t tmo, jh_tmo_params_t *params, jh_error_t *error)
 Sets default tone-mapping parameters.

Detailed Description

Defines the API for the JPEG-HDR mobile tonemapper library.

Enumeration Type Documentation

Defines the exposure-mode settings for the tonemapper.

Enumerator:
JH_EX_MODE_MEDIAN 

Exposure calculated based on median luminance.

Definition at line 34 of file jh_tonemap.h.

Defines the tonemapper types.

Enumerator:
JH_SIMPLE 

Dolby simple tonemapper.

JH_EXP_GAMMA 

Dolby exposure and gamma tonemapper.

JH_HAMS 

Dolby HAMS tonemapper.

JH_CPT 

Dolby CPT tonemapper.

Definition at line 40 of file jh_tonemap.h.

Function Documentation

int jh_get_tmo_list ( jh_tmo_description_t  tmo_list[])

Returns the size of the list of tonemappers available for the encoder and the list itself as an array of values of type jh_tmo_description_ts. If jh_get_tmo_list() is called using NULL for tmo_list, returns only the size of the list as a value of type int.

Note
The user is responsible for allocating memory for the list.
Returns
The list and the size of the list of available tonemappers.
Parameters
[in,out]tmo_listList of tonemappers available for the encoder.
int jh_tonemap ( const jh_tmo_params_t tmo_params,
jh_monitor_t monitor,
const jh_image_t hdri,
const jh_rect_t r_in,
jh_image_t sdri,
jh_error_t error 
)

Tone maps an HDR image and returns an SDR image.

Returns
0 if the function does not succeed.
Parameters
[in]tmo_paramsTonemapper parameters.
[in,out]monitorProgress status of the function. The initial value of cancel must be 0.
[in]hdriHDR image.
[in]r_inRendering rectangle in the HDRI image. Tone mapping is done only for the data in the rectangle.
[out]sdriTone-mapped SDR image. The dimensions of the SDR image should be >= the dimensions of the rendering rectangle.
[in,out]errorUser-allocated error-reporting structure that contains information about the error.
int jh_tonemap_memory_estimate ( const int  pixels,
const jh_tmo_params_t tmo_params,
int *  mem,
jh_error_t error 
)

Estimates the amount of memory required for processing.

Returns
0 if the function does not succeed.
Parameters
[in]pixelsNumber of pixels in an image.
[in]tmo_paramsTonemapper parameters. Should not be NULL.
[in,out]memUser-allocated variable that returns the amount of required memory, in bytes.
[in,out]errorUser-allocated error-reporting structure that contains information about the error.
int jh_tonemap_set_default ( const jh_tmo_selector_t  tmo,
jh_tmo_params_t params,
jh_error_t error 
)

Sets default tone-mapping parameters.

Returns
0 if the function does not succeed.
Parameters
[in]tmoTonemapper for which the parameters are to be set.
[out]paramsUser-allocated tonemapper parameters.
[in,out]errorUser-allocated error-reporting structure that contains information about the error.