DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_mosaic_info.hGo to the documentation of this file.00001 /*****************************************************************************/ 00002 // Copyright 2006-2007 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/workarea/stern/camera_raw/dng_sdk/source/dng_mosaic_info.h#10 $ */ 00010 /* $DateTime: 2009/06/05 23:40:21 $ */ 00011 /* $Change: 573330 $ */ 00012 /* $Author: stern $ */ 00013 00018 /*****************************************************************************/ 00019 00020 #ifndef __dng_mosaic_info__ 00021 #define __dng_mosaic_info__ 00022 00023 /*****************************************************************************/ 00024 00025 #include "dng_classes.h" 00026 #include "dng_rect.h" 00027 #include "dng_sdk_limits.h" 00028 #include "dng_types.h" 00029 00030 /*****************************************************************************/ 00031 00036 00037 class dng_mosaic_info 00038 { 00039 00040 public: 00041 00043 00044 dng_point fCFAPatternSize; 00045 00047 00048 uint8 fCFAPattern [kMaxCFAPattern] [kMaxCFAPattern]; 00049 00051 00052 uint32 fColorPlanes; 00053 00054 uint8 fCFAPlaneColor [kMaxColorPlanes]; 00055 00067 00068 uint32 fCFALayout; 00069 00078 00079 uint32 fBayerGreenSplit; 00080 00081 protected: 00082 00083 dng_point fSrcSize; 00084 00085 dng_point fCroppedSize; 00086 00087 real64 fAspectRatio; 00088 00089 public: 00090 00091 dng_mosaic_info (); 00092 00093 virtual ~dng_mosaic_info (); 00094 00095 virtual void Parse (dng_host &host, 00096 dng_stream &stream, 00097 dng_info &info); 00098 00099 virtual void PostParse (dng_host &host, 00100 dng_negative &negative); 00101 00104 00105 bool IsColorFilterArray () const 00106 { 00107 return fCFAPatternSize != dng_point (0, 0); 00108 } 00109 00115 00116 virtual bool SetFourColorBayer (); 00117 00122 00123 virtual dng_point FullScale () const; 00124 00131 00132 virtual dng_point DownScale (uint32 minSize, 00133 uint32 prefSize, 00134 real64 cropFactor) const; 00135 00139 00140 virtual dng_point DstSize (const dng_point &downScale) const; 00141 00148 00149 virtual void InterpolateGeneric (dng_host &host, 00150 dng_negative &negative, 00151 const dng_image &srcImage, 00152 dng_image &dstImage, 00153 uint32 srcPlane = 0) const; 00154 00162 00163 virtual void InterpolateFast (dng_host &host, 00164 dng_negative &negative, 00165 const dng_image &srcImage, 00166 dng_image &dstImage, 00167 const dng_point &downScale, 00168 uint32 srcPlane = 0) const; 00169 00177 00178 virtual void Interpolate (dng_host &host, 00179 dng_negative &negative, 00180 const dng_image &srcImage, 00181 dng_image &dstImage, 00182 const dng_point &downScale, 00183 uint32 srcPlane = 0) const; 00184 00185 protected: 00186 00187 virtual bool IsSafeDownScale (const dng_point &downScale) const; 00188 00189 uint32 SizeForDownScale (const dng_point &downScale) const; 00190 00191 virtual bool ValidSizeDownScale (const dng_point &downScale, 00192 uint32 minSize) const; 00193 00194 }; 00195 00196 /*****************************************************************************/ 00197 00198 #endif 00199 00200 /*****************************************************************************/ |