ram
ram
There is a change that restricts gain for low-luminance regions. https://github.com/google/libultrahdr/commit/720dbed8d920361935fa2d5db3fda9c64160ec1c. What is the problem this change is trying to resolve?
``` if (sdr < 2.f / 255.0f) { // If sdr is zero and hdr is non zero, it can result in very large gain values. In compression - //...
This was my thinking while computing gainmap coefficients, ``` if (y_sdr > 0.0f) { gain = y_hdr / y_sdr; } float gain = log2(y_hdr / y_sdr) ``` If y_hdr is...
These computations are further clamped here, ``` // gain coefficient range [-14.3, 15.6] is capable of representing hdr pels from sdr pels. // Allowing further excursion might not offer any...
considerable amount of code seems to be duplicated across archs. for instance weights used in conversion, they can be moved to common place and reused. Also, please wait on further...
> @ram-mohan Hi, I am preparing to port other functions. Is my code structure suitable in the current situation? yes changes look good to me
Basing on the notes in, https://github.com/google/libultrahdr/issues/116#issuecomment-2287995683, this can be marked for closure.
@DichenZhang1 this is not required now
@kmilos instead of pkgconf if pkg-config were used, wouldn't this change break static builds as cflags.private is not supported by later.
@gregbenz setting [this](https://github.com/google/libultrahdr/blob/cb0b016db8570d9b23aa7262042687bac47f9393/lib/src/jpegr.cpp#L56) to true should resolve this request.