Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
erazortt committed Feb 11, 2024
1 parent a2f30a2 commit 1020b52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DoViBaker/DoViTonemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ PVideoFrame DoViTonemap<signalBitDepth>::GetFrame(int n, IScriptEnvironment* env
return dst;
}

if (maxPq != masterMaxPq || minPq != masterMinPq || scale != lumScale) {
if (maxPq != masterMaxPq || minPq != masterMinPq || std::abs(scale-lumScale)>0.001f) {
masterMinPq = minPq;
masterMaxPq = maxPq;
lumScale = scale;
Expand All @@ -102,7 +102,7 @@ PVideoFrame DoViTonemap<signalBitDepth>::GetFrame(int n, IScriptEnvironment* env
template<int signalBitDepth>
void DoViTonemap<signalBitDepth>::applyTonemapRGB(PVideoFrame& dst, const PVideoFrame& src) const
{
//apply tonemap using R'G'B' scaling
//apply tonemap using R'G'B' scaling (see p.59 of ITU-R BT.2408-7)
const int height = src->GetHeight(PLANAR_R);
const int width = src->GetRowSize(PLANAR_R) / sizeof(uint16_t);
const uint16_t* srcP[3];
Expand Down
10 changes: 5 additions & 5 deletions DoViBaker/DoViTonemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class DoViTonemap : public GenericVideoFilter
void applyTonemapRGB(PVideoFrame& dst, const PVideoFrame& src) const;
//void applyTonemapYUV(PVideoFrame& dst, const PVideoFrame& src) const;

uint16_t targetMaxPq;
uint16_t targetMinPq;
const uint16_t targetMaxPq;
const uint16_t targetMinPq;
uint16_t masterMaxPq;
uint16_t masterMinPq;
float lumScale;

bool dynamicMasterMaxPq;
bool dynamicMasterMinPq;
bool dynamicLumScale;
const bool dynamicMasterMaxPq;
const bool dynamicMasterMinPq;
const bool dynamicLumScale;

DoViEetf<signalBitDepth>* doviEetf;
};

0 comments on commit 1020b52

Please sign in to comment.