File indexing completed on 2025-01-05 03:56:46

0001 /* -*- C++ -*-
0002  * File: var_defines.h
0003  * Copyright 2008-2021 LibRaw LLC (info@libraw.org)
0004  * Created: Sat Mar  8, 2008
0005  *
0006  * LibRaw redefinitions of dcraw internal variables
0007 
0008 LibRaw is free software; you can redistribute it and/or modify
0009 it under the terms of the one of two licenses as you choose:
0010 
0011 1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
0012    (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
0013 
0014 2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
0015    (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
0016 
0017  */
0018 
0019 #ifndef VAR_DEFINES_H
0020 #define VAR_DEFINES_H
0021 
0022 
0023 // imgdata.idata
0024 #define make              (imgdata.idata.make)
0025 #define model             (imgdata.idata.model)
0026 #define software          (imgdata.idata.software)
0027 #define is_raw            (imgdata.idata.raw_count)
0028 #define dng_version       (imgdata.idata.dng_version)
0029 #define is_foveon         (imgdata.idata.is_foveon)
0030 #define colors            (imgdata.idata.colors)
0031 #define cdesc             (imgdata.idata.cdesc)
0032 #define filters           (imgdata.idata.filters)
0033 #define xtrans            (imgdata.idata.xtrans)
0034 #define xtrans_abs        (imgdata.idata.xtrans_abs)
0035 #define xmpdata           (imgdata.idata.xmpdata)
0036 #define xmplen            (imgdata.idata.xmplen)
0037 //imgdata image
0038 #define image             (imgdata.image)
0039 #define raw_image         (imgdata.rawdata.raw_image)
0040 #define color_image       (imgdata.rawdata.color_image)
0041 #define normalized_make   (imgdata.idata.normalized_make)
0042 #define normalized_model  (imgdata.idata.normalized_model)
0043 #define maker_index       (imgdata.idata.maker_index)
0044 
0045 // imgdata.sizes
0046 #define raw_height        (imgdata.sizes.raw_height)
0047 #define raw_width         (imgdata.sizes.raw_width)
0048 #define raw_pitch         (imgdata.sizes.raw_pitch)
0049 #define height            (imgdata.sizes.height)
0050 #define width             (imgdata.sizes.width)
0051 #define top_margin        (imgdata.sizes.top_margin)
0052 #define left_margin       (imgdata.sizes.left_margin)
0053 #define bottom_margin     (imgdata.sizes.bottom_margin)
0054 #define right_margin      (imgdata.sizes.right_margin)
0055 #define iheight           (imgdata.sizes.iheight)
0056 #define iwidth            (imgdata.sizes.iwidth)
0057 #define pixel_aspect      (imgdata.sizes.pixel_aspect)
0058 #define flip              (imgdata.sizes.flip)
0059 #define mask              (imgdata.sizes.mask)
0060 #define raw_stride        (libraw_internal_data.unpacker_data.raw_stride)
0061 
0062 //imgdata.color
0063 #define white             (imgdata.color.white)
0064 #define cam_mul           (imgdata.color.cam_mul)
0065 #define pre_mul           (imgdata.color.pre_mul)
0066 #define cmatrix           (imgdata.color.cmatrix)
0067 #define rgb_cam           (imgdata.color.rgb_cam)
0068 #ifndef SRC_USES_CURVE
0069 #define curve             (imgdata.color.curve)
0070 #endif
0071 #ifndef SRC_USES_BLACK
0072 #define black             (imgdata.color.black)
0073 #define cblack            (imgdata.color.cblack)
0074 #endif
0075 #define maximum           (imgdata.color.maximum)
0076 #define channel_maximum   (imgdata.color.channel_maximum)
0077 #define profile_length    (imgdata.color.profile_length)
0078 #define color_flags       (imgdata.color.color_flags)
0079 #define ph1               (imgdata.color.phase_one_data)
0080 #define flash_used        (imgdata.color.flash_used)
0081 #define canon_ev          (imgdata.color.canon_ev)
0082 #define model2            (imgdata.color.model2)
0083 
0084 //imgdata.thumbnail
0085 #define thumb_width       (imgdata.thumbnail.twidth)
0086 #define thumb_height      (imgdata.thumbnail.theight)
0087 #define thumb_length      (imgdata.thumbnail.tlength)
0088 
0089 
0090 //imgdata.others
0091 #define iso_speed         (imgdata.other.iso_speed)
0092 #define shutter           (imgdata.other.shutter)
0093 #define aperture          (imgdata.other.aperture)
0094 #define focal_len         (imgdata.other.focal_len)
0095 #define timestamp         (imgdata.other.timestamp)
0096 #define shot_order        (imgdata.other.shot_order)
0097 #define gpsdata           (imgdata.other.gpsdata)
0098 #define desc              (imgdata.other.desc)
0099 #define artist            (imgdata.other.artist)
0100 
0101 #define FujiCropMode      (imgdata.makernotes.fuji.CropMode)
0102 
0103 //imgdata.output
0104 #define greybox           (imgdata.params.greybox)
0105 #define cropbox           (imgdata.params.cropbox)
0106 #define aber              (imgdata.params.aber)
0107 #define gamm              (imgdata.params.gamm)
0108 #define user_mul          (imgdata.params.user_mul)
0109 #define shot_select       (imgdata.rawparams.shot_select)
0110 #define bright            (imgdata.params.bright)
0111 #define threshold         (imgdata.params.threshold)
0112 #define half_size         (imgdata.params.half_size)
0113 #define four_color_rgb    (imgdata.params.four_color_rgb)
0114 #define highlight         (imgdata.params.highlight)
0115 #define use_auto_wb       (imgdata.params.use_auto_wb)
0116 #define use_camera_wb     (imgdata.params.use_camera_wb)
0117 #define use_camera_matrix (imgdata.params.use_camera_matrix)
0118 #define output_color      (imgdata.params.output_color)
0119 #define output_bps        (imgdata.params.output_bps)
0120 #define gamma_16bit       (imgdata.params.gamma_16bit)
0121 #define output_tiff       (imgdata.params.output_tiff)
0122 #define med_passes        (imgdata.params.med_passes)
0123 #define no_auto_bright    (imgdata.params.no_auto_bright)
0124 #define auto_bright_thr   (imgdata.params.auto_bright_thr)
0125 #define use_fuji_rotate   (imgdata.params.use_fuji_rotate)
0126 #define filtering_mode    (imgdata.params.filtering_mode)
0127 
0128 // DCB
0129 #define dcb_iterations    (imgdata.params.iterations)
0130 #define dcb_enhance_fl    (imgdata.params.dcb_enhance)
0131 #define fbdd_noiserd      (imgdata.params.fbdd_noiserd)
0132 
0133 //libraw_internal_data.internal_data
0134 #define meta_data         (libraw_internal_data.internal_data.meta_data)
0135 #define ifp               libraw_internal_data.internal_data.input
0136 #define ifname            ((char*)libraw_internal_data.internal_data.input->fname())
0137 #define ofp               libraw_internal_data.internal_data.output
0138 #define profile_offset    (libraw_internal_data.internal_data.profile_offset)
0139 #define thumb_offset      (libraw_internal_data.internal_data.toffset)
0140 #define pana_black        (libraw_internal_data.internal_data.pana_black)
0141 
0142 //libraw_internal_data.internal_output_params
0143 #define mix_green         (libraw_internal_data.internal_output_params.mix_green)
0144 #define raw_color         (libraw_internal_data.internal_output_params.raw_color)
0145 #define use_gamma         (libraw_internal_data.internal_output_params.use_gamma)
0146 #define zero_is_bad       (libraw_internal_data.internal_output_params.zero_is_bad)
0147 #ifndef SRC_USES_SHRINK
0148 #define shrink            (libraw_internal_data.internal_output_params.shrink)
0149 #endif
0150 #define fuji_width        (libraw_internal_data.internal_output_params.fuji_width)
0151 #define thumb_format      (libraw_internal_data.unpacker_data.thumb_format)
0152 
0153 //libraw_internal_data.output_data
0154 #define histogram         (libraw_internal_data.output_data.histogram)
0155 #define oprof             (libraw_internal_data.output_data.oprof)
0156 
0157 //libraw_internal_data.identify_data
0158 #define exif_cfa          (libraw_internal_data.identify_data.olympus_exif_cfa)
0159 #define unique_id         (libraw_internal_data.identify_data.unique_id)
0160 #define OlyID             (libraw_internal_data.identify_data.OlyID)
0161 #define tiff_nifds        (libraw_internal_data.identify_data.tiff_nifds)
0162 #define tiff_flip         (libraw_internal_data.identify_data.tiff_flip)
0163 #define metadata_blocks   (libraw_internal_data.identify_data.metadata_blocks)
0164 
0165 //libraw_internal_data.unpacker_data
0166 #define order             (libraw_internal_data.unpacker_data.order)
0167 #define data_error        (libraw_internal_data.unpacker_data.data_error)
0168 #define cr2_slice         (libraw_internal_data.unpacker_data.cr2_slice)
0169 #define sraw_mul          (libraw_internal_data.unpacker_data.sraw_mul)
0170 #define kodak_cbpp        (libraw_internal_data.unpacker_data.kodak_cbpp)
0171 #define strip_offset      (libraw_internal_data.unpacker_data.strip_offset)
0172 #define data_offset       (libraw_internal_data.unpacker_data.data_offset)
0173 #define data_size         (libraw_internal_data.unpacker_data.data_size)
0174 #define meta_offset       (libraw_internal_data.unpacker_data.meta_offset)
0175 #define meta_length       (libraw_internal_data.unpacker_data.meta_length)
0176 #define thumb_misc        (libraw_internal_data.unpacker_data.thumb_misc)
0177 #define fuji_layout       (libraw_internal_data.unpacker_data.fuji_layout)
0178 #define tiff_samples      (libraw_internal_data.unpacker_data.tiff_samples)
0179 #define tiff_bps          (libraw_internal_data.unpacker_data.tiff_bps)
0180 #define tiff_compress     (libraw_internal_data.unpacker_data.tiff_compress)
0181 #define tiff_sampleformat (libraw_internal_data.unpacker_data.tiff_sampleformat)
0182 #define zero_after_ff     (libraw_internal_data.unpacker_data.zero_after_ff)
0183 #define tile_width        (libraw_internal_data.unpacker_data.tile_width)
0184 #define tile_length       (libraw_internal_data.unpacker_data.tile_length)
0185 #define load_flags        (libraw_internal_data.unpacker_data.load_flags)
0186 #define pana_encoding     (libraw_internal_data.unpacker_data.pana_encoding)
0187 #define pana_bpp          (libraw_internal_data.unpacker_data.pana_bpp)
0188 #define CM_found          (libraw_internal_data.unpacker_data.CM_found)
0189 
0190 #define is_NikonTransfer  (libraw_internal_data.unpacker_data.is_NikonTransfer)
0191 #define is_Olympus        (libraw_internal_data.unpacker_data.is_Olympus)
0192 #define OlympusDNG_SubDirOffsetValid (libraw_internal_data.unpacker_data.OlympusDNG_SubDirOffsetValid)
0193 #define is_Sony           (libraw_internal_data.unpacker_data.is_Sony)
0194 #define is_PentaxRicohMakernotes    (libraw_internal_data.unpacker_data.is_PentaxRicohMakernotes)
0195 #define is_pana_raw       (libraw_internal_data.unpacker_data.is_pana_raw)
0196 
0197 
0198 #ifdef LIBRAW_IO_REDEFINED
0199 #define fread(ptr,size,n,stream)   stream->read(ptr,size,n)
0200 #define fseek(stream,o,w)          stream->seek(o,w)
0201 #define fseeko(stream,o,w)         stream->seek(o,w)
0202 #define ftell(stream)              stream->tell()
0203 #define ftello(stream)             stream->tell()
0204 #define feof(stream)               stream->eof()
0205 #ifdef getc
0206 #undef getc
0207 #endif
0208 #define getc(stream)               stream->get_char()
0209 #define fgetc(stream)              stream->get_char()
0210 #define fgetcb(stream)             stream->get_char_buf()
0211 #define fgets(str,n,stream)        stream->gets(str,n)
0212 #define fscanf(stream,fmt,ptr)     stream->scanf_one(fmt,ptr)
0213 #endif
0214 
0215 #endif