PDAF patterns ignored in user's camconst, #4435
This commit is contained in:
parent
c556e026f1
commit
64979b0660
@ -380,10 +380,28 @@ CameraConst::has_pdafPattern()
|
|||||||
return pdafPattern.size() > 0;
|
return pdafPattern.size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
std::vector<int>
|
||||||
CameraConst::get_pdafPattern(std::vector<int> &pattern)
|
CameraConst::get_pdafPattern()
|
||||||
{
|
{
|
||||||
pattern = pdafPattern;
|
return pdafPattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CameraConst::update_pdafPattern(const std::vector<int> &other)
|
||||||
|
{
|
||||||
|
if (other.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pdafPattern = other;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CameraConst::update_pdafOffset(int other)
|
||||||
|
{
|
||||||
|
if (other == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pdafOffset = other;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -719,6 +737,8 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_)
|
|||||||
// deleting all the existing levels, replaced by the new ones
|
// deleting all the existing levels, replaced by the new ones
|
||||||
existingcc->update_Levels(cc);
|
existingcc->update_Levels(cc);
|
||||||
existingcc->update_Crop(cc);
|
existingcc->update_Crop(cc);
|
||||||
|
existingcc->update_pdafPattern(cc->get_pdafPattern());
|
||||||
|
existingcc->update_pdafOffset(cc->get_pdafOffset());
|
||||||
|
|
||||||
if (settings->verbose) {
|
if (settings->verbose) {
|
||||||
printf("Merging camera constants for \"%s\"\n", make_model.c_str());
|
printf("Merging camera constants for \"%s\"\n", make_model.c_str());
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
bool has_pdafPattern(void);
|
bool has_pdafPattern(void);
|
||||||
void update_dcrawMatrix(const short *other);
|
void update_dcrawMatrix(const short *other);
|
||||||
const short *get_dcrawMatrix(void);
|
const short *get_dcrawMatrix(void);
|
||||||
void get_pdafPattern(std::vector<int> &pattern);
|
std::vector<int> get_pdafPattern();
|
||||||
int get_pdafOffset() {return pdafOffset;}
|
int get_pdafOffset() {return pdafOffset;}
|
||||||
bool has_rawCrop(void);
|
bool has_rawCrop(void);
|
||||||
void get_rawCrop(int& left_margin, int& top_margin, int& width, int& height);
|
void get_rawCrop(int& left_margin, int& top_margin, int& width, int& height);
|
||||||
@ -47,6 +47,8 @@ public:
|
|||||||
int get_WhiteLevel(int idx, int iso_speed, float fnumber);
|
int get_WhiteLevel(int idx, int iso_speed, float fnumber);
|
||||||
void update_Levels(const CameraConst *other);
|
void update_Levels(const CameraConst *other);
|
||||||
void update_Crop(CameraConst *other);
|
void update_Crop(CameraConst *other);
|
||||||
|
void update_pdafPattern(const std::vector<int> &other);
|
||||||
|
void update_pdafOffset(int other);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CameraConstantsStore
|
class CameraConstantsStore
|
||||||
|
@ -134,7 +134,7 @@ PDAFLinesFilter::PDAFLinesFilter(RawImage *ri):
|
|||||||
CameraConst *cc = ccs->get(ri_->get_maker().c_str(), ri_->get_model().c_str());
|
CameraConst *cc = ccs->get(ri_->get_maker().c_str(), ri_->get_model().c_str());
|
||||||
|
|
||||||
if (cc) {
|
if (cc) {
|
||||||
cc->get_pdafPattern(pattern_);
|
pattern_ = cc->get_pdafPattern();
|
||||||
if(!pattern_.empty()) {
|
if(!pattern_.empty()) {
|
||||||
offset_ = cc->get_pdafOffset();
|
offset_ = cc->get_pdafOffset();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user