Source code for src.quality.bd_adjustment.ssim_adjustment_for_bd
import numpy as np
[docs]
def adjust_values_for_bd(value: float) -> float:
#In case the value parsed is exactly 1, we set dif to the closest value of 0
dif = 1 - value
if dif == 0:
dif = np.nextafter(0, 1)
return -10 * np.log10(dif)