natural-harmonia-gropius / hdr-toys

Componentized Rec.2100 to Rec.709 conversion shader for mpv-player, featuring dynamic curves and a uniform color space.
MIT License
119 stars 1 forks source link

Add black point compensation #58

Closed natural-harmonia-gropius closed 7 months ago

natural-harmonia-gropius commented 8 months ago

I'm not sure if this is needed/necessary. If the answer is yes, it should be done in tone-mapping, just like what bt.2390 did.

Follow https://www.color.org/WP40-Black_Point_Compensation_2010-07-27.pdf

matrices is for bt2020, add it after tone-mapping. as above bt2390 doesn't need this.

glsl-shader=~~/shaders/hdr-toys/utils/clip_both.glsl
glsl-shader=~~/shaders/hdr-toys/transfer-function/pq_inv.glsl
glsl-shader=~~/shaders/hdr-toys/tone-mapping/dynamic.glsl
+ glsl-shader=~~/shaders/hdr-toys/utils/black_point_compensation.glsl
glsl-shader=~~/shaders/hdr-toys/gamut-mapping/bottosson.glsl
glsl-shader=~~/shaders/hdr-toys/transfer-function/bt1886.glsl

Note:

Update README, if this been merged.

natural-harmonia-gropius commented 7 months ago

dynamic now include black_point_compensation, no need for an independent one.