Fix dcp.cc with some help from the implementation in ART
This commit is contained in:
@@ -41,6 +41,20 @@ class DCPProfileApplyState;
|
||||
class DCPProfile final
|
||||
{
|
||||
public:
|
||||
class ApplyState final
|
||||
{
|
||||
public:
|
||||
ApplyState();
|
||||
~ApplyState();
|
||||
|
||||
private:
|
||||
struct Data;
|
||||
|
||||
std::unique_ptr<Data> data;
|
||||
|
||||
friend class DCPProfile;
|
||||
};
|
||||
|
||||
struct Illuminants {
|
||||
short light_source_1;
|
||||
short light_source_2;
|
||||
@@ -72,10 +86,11 @@ public:
|
||||
const ColorTemp& white_balance,
|
||||
const Triple& pre_mul,
|
||||
const Matrix& cam_wb_matrix,
|
||||
bool apply_hue_sat_map = true
|
||||
bool apply_hue_sat_map,
|
||||
bool apply_look_table
|
||||
) const;
|
||||
void setStep2ApplyState(const Glib::ustring& working_space, bool use_tone_curve, bool apply_look_table, bool apply_baseline_exposure, DCPProfileApplyState& as_out);
|
||||
void step2ApplyTile(float* r, float* g, float* b, int width, int height, int tile_width, const DCPProfileApplyState& as_in) const;
|
||||
void setStep2ApplyState(const Glib::ustring& working_space, bool use_tone_curve, bool apply_look_table, bool apply_baseline_exposure, ApplyState& as_out);
|
||||
void step2ApplyTile(float* r, float* g, float* b, int width, int height, int tile_width, const ApplyState& as_in) const;
|
||||
|
||||
private:
|
||||
struct HsbModify {
|
||||
@@ -136,20 +151,6 @@ private:
|
||||
AdobeToneCurve tone_curve;
|
||||
};
|
||||
|
||||
class DCPProfileApplyState final
|
||||
{
|
||||
public:
|
||||
DCPProfileApplyState();
|
||||
~DCPProfileApplyState();
|
||||
|
||||
private:
|
||||
struct Data;
|
||||
|
||||
const std::unique_ptr<Data> data;
|
||||
|
||||
friend class DCPProfile;
|
||||
};
|
||||
|
||||
class DCPStore final :
|
||||
public NonCopyable
|
||||
{
|
||||
@@ -171,10 +172,10 @@ private:
|
||||
std::vector<Glib::ustring> profileDir;
|
||||
|
||||
// these contain standard profiles from RT. keys are all in uppercase, file path is value
|
||||
std::map<std::string, Glib::ustring> file_std_profiles;
|
||||
std::map<Glib::ustring, Glib::ustring> file_std_profiles;
|
||||
|
||||
// Maps file name to profile as cache
|
||||
mutable std::map<std::string, DCPProfile*> profile_cache;
|
||||
mutable std::map<Glib::ustring, DCPProfile*> profile_cache;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user