Advertisement
shssoichiro

Tonemap

Jun 22nd, 2022
777
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 02-Morbius-tonemap_linear
  2. clip = core.resize.Bicubic(
  3.     clip, transfer_s="linear", nominal_luminance=203, format=vs.RGB48
  4. )
  5. clip = core.tonemap.Mobius(clip, exposure=1, peak=558/203)
  6. clip = core.resize.Bicubic(
  7.     clip,
  8.     primaries_s="709",
  9.     transfer_s="709",
  10.     matrix_s="709",
  11.     dither_type="error_diffusion",
  12.     format=vs.YUV420P16,
  13. )
  14.  
  15. # 03-Morbius-placebo
  16. clip = vsutil.depth(clip, 16)
  17. clip = clip.placebo.Tonemap(
  18.     src_csp=1,
  19.     dst_csp=0,
  20.     src_max=558,
  21.     dst_max=203,
  22.     dynamic_peak_detection=False,
  23.     tone_mapping_function=6 # Mobius
  24. )
  25.  
  26. # 04-bt2390-placebo
  27. clip = vsutil.depth(clip, 16)
  28. clip = clip.placebo.Tonemap(
  29.     src_csp=1,
  30.     dst_csp=0,
  31.     src_max=558,
  32.     dst_max=203,
  33.     dynamic_peak_detection=False,
  34.     tone_mapping_function=2 # BT.2390
  35. )
  36.  
  37. # 05-bt2446a-placebo
  38. clip = vsutil.depth(clip, 16)
  39. clip = clip.placebo.Tonemap(
  40.     src_csp=1,
  41.     dst_csp=0,
  42.     src_max=558,
  43.     dst_max=203,
  44.     dynamic_peak_detection=False,
  45.     tone_mapping_function=3 # BT.2446a
  46. )
Advertisement
RAW Paste Data Copied
Advertisement