ultrahdr-core 0.5.0

Core gain map math and metadata for Ultra HDR - no codec dependencies
Documentation
# libavif avifGetGainMapWeight
# base_headroom_log2,alt_headroom_log2,display_headroom_log2,weight
base_headroom_log2,alt_headroom_log2,display_headroom_log2,weight
0,2,0,0
0,2,0.5,0.25
0,2,1,0.5
0,2,1.5,0.75
0,2,2,1
0,2,3,1

# libavif apply gain core, weight=1.0
# metadata: gainMapMin=0 gainMapMax=2 (log2) gamma=1 offsets=1/64
# columns: gain, base, out_r, out_g, out_b
gain,base,out_r,out_g,out_b
0,0,0,0,0
0,0.00999999978,0.00999999978,0.00999999978,0.00999999978
0,0.100000001,0.100000001,0.100000001,0.100000001
0,0.180000007,0.180000007,0.180000007,0.180000007
0,0.5,0.5,0.5,0.5
0,0.75,0.75,0.75,0.75
0,1,1,1,1
0.25,0,0.00647208653,0.00647208653,0.00647208653
0.25,0.00999999978,0.0206142217,0.0206142217,0.0206142217
0.25,0.100000001,0.147893444,0.147893444,0.147893444
0.25,0.180000007,0.261030525,0.261030525,0.261030525
0.25,0.5,0.71357888,0.71357888,0.71357888
0.25,0.75,1.06713223,1.06713223,1.06713223
0.25,1,1.42068565,1.42068565,1.42068565
0.5,0,0.015625,0.015625,0.015625
0.5,0.00999999978,0.0356249996,0.0356249996,0.0356249996
0.5,0.100000001,0.215625003,0.215625003,0.215625003
0.5,0.180000007,0.375625014,0.375625014,0.375625014
0.5,0.5,1.015625,1.015625,1.015625
0.5,0.75,1.515625,1.515625,1.515625
0.5,1,2.015625,2.015625,2.015625
0.75,0,0.0285691731,0.0285691731,0.0285691731
0.75,0.00999999978,0.0568534434,0.0568534434,0.0568534434
0.75,0.100000001,0.311411887,0.311411887,0.311411887
0.75,0.180000007,0.53768605,0.53768605,0.53768605
0.75,0.5,1.44278276,1.44278276,1.44278276
0.75,0.75,2.14988947,2.14988947,2.14988947
0.75,1,2.8569963,2.8569963,2.8569963
1,0,0.046875,0.046875,0.046875
1,0.00999999978,0.0868749991,0.0868749991,0.0868749991
1,0.100000001,0.446875006,0.446875006,0.446875006
1,0.180000007,0.766875029,0.766875029,0.766875029
1,0.5,2.046875,2.046875,2.046875
1,0.75,3.046875,3.046875,3.046875
1,1,4.046875,4.046875,4.046875

# libavif apply gain core, varying weight at fixed gain=0.5, base=0.5
# columns: weight, out_r
weight,out_r
0,0.5
0.25,0.597559929
0.5,0.71357888
0.75,0.851549447
1,1.015625