function lut = Tone_curve_table(Asymmetry, SecondPole)
%%plot(Tone_curve_table(5, 100))
%hold on
%plot(Tone_curve_table(25, 200))
%Asymmetry:[1:255], SecondPole:[1:255]
x = (Asymmetry + 1)/257*2-1;
ai = floor(0.5 + 255*(1-1/(1000*x*x*x)) + x - ((x>=0).*2));
ii = (0:32)';
if ai >=0
x = ii /32;
else
x = (32 - ii) / 32;
end
as = abs(ai ./ 255);
dp = SecondPole ./ 255;
y = round((dp + (1-dp).*((abs(1-dp-x)./dp).^3)).*(x.*(as+1)./(as+x)).*65535);
y = max(0,min(y, 65535));
if ai < 0
y = 65535 - y;
end
lut = round(y);