Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function FixRowBrightnessProtect(clip c, int row, int input_low, int input_high, int output_low, int output_high, int protect_value){
- input_low=Default(input_low,16)
- input_high=Default(input_high,255)
- output_low=Default(output_low,16)
- output_high=Default(output_high,255)
- protect_value=Default(protect_value,20)
- c
- mt_invert()
- SmoothLevels(255-input_low,1,255-input_high,255-output_low,255-output_high,protect=protect_value)
- mt_invert()
- ConvertToY8().Crop(0,row,0,1)
- Overlay(c,last,0,row,mode="luma")
- }
- function FixColumnBrightnessProtect(clip c, int column, int input_low, int input_high, int output_low, int output_high, int protect_value){
- input_low=Default(input_low,16)
- input_high=Default(input_high,255)
- output_low=Default(output_low,16)
- output_high=Default(output_high,255)
- protect_value=Default(protect_value,20)
- c
- mt_invert()
- SmoothLevels(255-input_low,1,255-input_high,255-output_low,255-output_high,protect=protect_value)
- mt_invert()
- ConvertToY8().Crop(column,0,1,0)
- Overlay(c,last,column,0,mode="luma")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement