"Кинопередвижка" Форум любителей и коллекционеров плёночного кино.

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



Общие вопросы по обработке видео

Сообщений 21 страница 40 из 93

21

А какой программой делать захват? Ради интереса пару кадров попробовать

22

Вот программа Александра Кочкина  - Ссылка
http://s3.uploads.ru/t/9gMyp.jpg
Отражение кадра есть по вертикали,удобно.
скачать программу - Ссылка

Ещё можно попробовать  - Debut Video Capture Software Pro 3.01

Отредактировано dan74 (10-01-2019 19:03:50)

23

Спасибо попробую.

24

dan74 написал(а):

Вот программа Александра Кочкина  - Ссылка

Попробовал и что-то не в восторге от результата.

В настройках камеры черезстрочная.
http://s8.uploads.ru/t/E7wla.jpg

В настройках камеры прогрессивная.
http://sd.uploads.ru/t/u7tNm.jpg

В настройках камеры черезстрочная.
http://sh.uploads.ru/t/NiMgB.jpg

В настройках камеры прогрессивная.
http://s5.uploads.ru/t/eaWB9.jpg

25

Хотелось бы узнать кто как борется с "красными" фильмами, я с первыми цветными фильмами которые цифровал ни как не боролся, но из последних попался уж больно "красный" фильм "Наш Барнаул", я попытался поиграться с цветом вручную, результат уже выкладывал в другой теме.
Большого опыта работы с видеоредакторами у меня нет, раньше занимался пережатием видео, но коррекцию цвета не делал,  сейчас я обрабатываю видео простенькой программой "Movavi Video", режу, склеиваю, переворачиваю кадр и добавляю маленько чёткости, на этом всё, чем мне не нравится эта программа, так это узкие настройки выходного файла, поэтому чтобы получить на выходе хорошее качество, файл получается большого размера. Нашёл в программе кнопку "автобаланс белого", результат на видео, хотелось бы услышать ваше мнение, а также как вы делаете цветокоррекцию.

26

http://sg.uploads.ru/t/7E2Yc.jpg

Сначала прогнал через скрипт ависинт,потом в редакторе XMedia Recode добавил насыщенность. В VirtualDub есть неплохой фильтр "Color Mill (2/1).

Отредактировано dan74 (13-01-2019 15:30:12)

27

dan74
Спасибо за информацию, цвет конечно лучше моего, если решусь делать такие манипуляции, обращусь за помощью.

28

на заметку

Новая версия  AEO-Light 2.3.2 -  программное обеспечение для извлечения оптического звука.
https://github.com/usc-imi/aeo-light/releases

AEO-Light 2.3.2  введение  -   

Просьба к Huan-Carlos (Александру),  может сделаете тоже видео, как Вы производите настройки и извлечение  звука с этой версией программы?

Отредактировано dan74 (24-05-2019 17:34:44)

29

dan74
ну там дядя так подробно все рассказал, я даже не знаю что можно еще добавить

30

Инструкция  AEO-Light 2.2 beta

31

Всем привет, а можно бы где нить отдельно или даж можно тут, выложить ссылки где норм можно скачать  проги  по обработке видео,  а так же инфу по установке и хотя бы начальной  настройке этих программ , а ещё  лучше  бы добавить  в архив форума, если можно конечно. Я думаю лишним не будет и искать не придётся по всей ветке.

Отредактировано Виктор (02-06-2019 14:46:18)

32

Виктор, это очень широкая тема. Что именно Вы понимаете под обработкой видео? Видеомонтаж, создание рипов, обработка файлов видеозахвата, улучшение качества исходников или что-то ещё?

33

Спасибо, в основном по обработке файлов захвата, и все что связано с улучшением качества в общем.

34

Понятно. Тогда расскажите, в какой формат Вы делаете захват.
Программы Ависинт и ВиртуалДаб Вам знакомы?

35

С Ависинтом не работал, Виртуал даб стояла на компе потом удалил, ругалась на файлы,пишет мисинг соде ,но просто времени не было с этим разбираться, ставил с диска  с набором всяких прог,   может просто глючная попалась. Работал с прогами Видео монтаж, Видео мастер,  но больше  для фото прогами. Нужна прога где можно перевернуть видео, в какой не сложной можно это сделать? MPEG4 формат. Мне сильно высокое  качество не нужно в принципе, еденичный случай просто. Но мало ли, лишними знания никогда не бывают.

Отредактировано Виктор (03-06-2019 09:55:13)

36

Виктор, варианта два.
1. Если  случай одноразовый, и качество неважно, то можно воспользоваться программой XviD4PSP 5.
2. Если хотите вникнуть в процесс, и работать с видео осмысленно, то надо освоить для начала вот эту инструкцию: Как сделать отличный ДВД-рип. На "Фениксе", кстати, много информации и уроков по обработке видео. Сборка программ хорошо работает на ХР и 7, но и на более поздних ОС под неё люди подстраиваются. Хотя проблемные видео я обрабатываю в старых системах.

Эти программы позволяют улучшать видео и грамотно делать сжатие.
Для монтажа рекомендую  Pinnacle Studio 14 Ultimate, её достаточно просто освоить с нуля. Но в неё надо подавать качественное видео, и сжатие выходного файла делать не в ней.

Для более конкретных советов нужен кусочек вашего исходника.

37

Спасибо, для начала мне нужно перевернуть исходник, прямая пересьемка с плёнки 16мм. Совсем быстро выложить не смогу,  времени мало совсем, работа. Все урывками только, и с Ютюб проблемы,  блокируют по вечерам иногда.

38

Вот на Ютуб как раз примеры выкладывать не надо, т.к. он на своё усмотрение перекодирует видео. Это всё равно, что картину реставрировать по фотографии.
Нужно сам файл захвата залить на облако и прислать ссылку. Ну или передать через торрент магнет-ссылкой, если умеете.

Отредактировано GreifeR (03-06-2019 17:18:45)

39

dan74 написал(а):

http://sg.uploads.ru/t/7E2Yc.jpg
Сначала прогнал через скрипт ависинт,потом в редакторе XMedia Recode добавил насыщенность. В VirtualDub есть неплохой фильтр "Color Mill (2/1).

dan74, а скрипт для Ависинта можете выложить?

40

GreifeR

скрипты брал здесь - https://letransfert.soforums.com/f29-Le … apture.htm
Тему забыл,там ролик красный, снятый в Африке реставрируют.

1 скрипт   которым в посте правил   -   

Код:
AVISource("C:\Users\zzzzzzzz2019zzzzzzzz\Desktop\123999.avi")   #  путь к фильму 



LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\GRunT.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RGBAdapt.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RT_Stats.dll")
# display tunings
comparison = false
show_scrutinized = false
show_info = false 

Levels(19, 1.228, 255, 0, 255)


# color space matrix tuning and specify the source rectangle under scrutiny
matrix = "Rec601"
x = 0.09
Y= 0.09
w = 0.09
h = 0.09

# autogain tunings
threshold  = 0.10
gain_strength = 1.0       

# autocontraste tunings       
auto_cont  = true
cont_strength = 1.0

# gamma process tunings
auto_spow = true
rpow_strength = 1.0
spow_strength = 1.0
pord = false

# bias tuning
bias_strength = 1.0

# If you use AvsPmod user sliders you can delete comment for follow lines

#~ 
#~ comparison = Select(0, false , true)
#~ show_scrutinized = Select(0, false , true)
#~ show_info = Select(0, false , true) 

#~ 
#~ matrix = Select(0, "Rec601" , "Rec709")
#~ x = 0.07 
#~ Y= 0.07
#~ w = 0.07
#~ h = 0.07
#~ threshold  = 0.1

#~ 

#~ 
 #~ gain_strength = 1.0 

#~ 
#~ auto_cont = Select(1, false , true)
#~   
#~ cont_strength = 1.0

#~ 
#~ auto_spow = Select(1, false , true)
#~ 
#~ rpow_strength = 1.0
#~ spow_strength = 1.0 
#~ pord = Select(0, false , true)

#~ 
#~ bias_strength = 1.0
                                            
output = RGBAdapt_awb_process(matrix = matrix, show_scrutinized = show_scrutinized,  show_info = show_info, x = x, y = y, w = w, h = h, \
                                                       threshold = threshold, gain_strength = gain_strength, auto_cont = auto_cont,cont_strength = cont_strength, \
                                                       auto_spow = auto_spow,rpow_strength = rpow_strength, spow_strength = spow_strength, pord = pord, bias_strength = bias_strength)                                                                                  
                                                                               
without_cont_output = (!comparison) ? nop : RGBAdapt_awb_process(matrix = matrix, show_scrutinized = false,  show_info = false, x = x, y = y, w = w, h = h,  \
                                                       threshold = threshold, cont_strength = 0.0, auto_spow = false)\
                                                       .AddBorders(0, 80, 0, 0, color=$000000). Subtitle ("gain, rpow_strength, spow_strength and  bias process     no cont and no auto mode for gamma"+ \
                                                  "\n threshold : " + LeftStr(string(threshold),4) + "   gain strength : 1.0"  + "   auto_cont : false  cont strength : 0.0" + \
                                                  "\n auto_spow : false   rpow strength : 1.0" + "   spow strength : 1.0"  + "   pord : false" +\
                                                  "\n bias strength : 1.0" , lsp = 20)                                                      
                       
bias_only  =  (!comparison) ? nop : RGBAdapt_awb_process(matrix = matrix, show_scrutinized = false,  show_info = false, x = x, y = y, w = w, h = h, \
                                                       threshold = threshold, gain_strength = 0.0, cont_strength = 0.0, rpow_strength = 0.0)\
                                                        .AddBorders(0, 80, 0, 0, color=$000000). Subtitle ("bias process only      output near ColorYUV autowhite"+ \
                                                  "\n threshold : " + LeftStr(string(threshold),4) + "   gain strength : 0.0"  + "   auto_cont : false  cont strength : 0.0" + \
                                                  "\n auto_spow : false   rpow strength : 0.0" + "   spow strength : 0.0"  + "   pord : false" +\
                                                  "\n bias strength : 1.0" , lsp = 20)

gain_bias_only =  (!comparison) ? nop : RGBAdapt_awb_process(matrix = matrix, show_scrutinized = false,  show_info = false, x = x, y = y, w = w, h = h, \
                                                       threshold = threshold, cont_strength = 0.0, rpow_strength = 0.0)\
                                                        .AddBorders(0, 80, 0, 0, color=$000000). Subtitle ("gain and bias process only"+ \
                                                  "\n threshold : " + LeftStr(string(threshold),4) + "   gain strength : 1.0"  + "   auto_cont : false  cont strength : 0.0" + \
                                                  "\n auto_spow : false   rpow strength : 0.0" + "   spow strength : 0.0"  + "   pord : false" +\
                                                  "\n bias strength : 1.0", lsp = 20)
                                                  
gain_gamma_only =  (!comparison) ? nop : RGBAdapt_awb_process(matrix = matrix, show_scrutinized = false,  show_info = false, x = x, y = y, w = w, h = h, \
                                                    threshold = threshold, cont_strength = 0.0, auto_spow = false, bias_strength = 0.0) \
                                                      .AddBorders(0, 80, 0, 0, color=$000000). Subtitle ("gain cont rpow and spow process but no bias process and no auto mode for cont and gamma"+ \
                                                  "\n threshold : " + LeftStr(string(threshold),4) + "   gain strength : 1.0"  + "   auto_cont : false  cont strength : 0.0" + \
                                                  "\n auto_spow : false   rpow strength : 1.0" + "   spow strength : 1.0"  + "   pord : false" +\
                                                  "\n bias strength : 0.0" , lsp = 20)                                                   
                                                       
all =  (!comparison) ? nop : RGBAdapt_awb_process(matrix = matrix, show_scrutinized = false,  show_info = false, x = x, y = y, w = w, h = h, threshold = threshold) \
                                                      .AddBorders(0, 80, 0, 0, color=$000000). Subtitle ("gain cont rpow spow and bias process  with auto mode for cont and gamma"+ \
                                                  "\n threshold : " + LeftStr(string(threshold),4) + "   gain strength : 1.0"  + "   auto_cont : true  cont strength : 1.0" + \
                                                  "\n auto_spow : true   rpow strength : 1.0" + "   spow strength : 1.0"  + "   pord : false" +\
                                                  "\n bias strength : 1.0" , lsp = 20)                                                                         

compared_output = (!comparison) ? nop : StackVertical(StackHorizontal(last.AddBorders(0, 80, 0, 0, color=$000000).Subtitle("original"),gain_bias_only, all), \
                                                  StackHorizontal(bias_only, gain_gamma_only, output .AddBorders(0, 80, 0, 0, color=$000000)\
                                                  . Subtitle ("user setting where all args are free" + \
                                                  "\n threshold : " + LeftStr(string(threshold),4) + "   gain strength : " + LeftStr(string(gain_strength),3)  + "   auto_cont : " + string(auto_cont)+\
                                                   "   cont strength : " + LeftStr(string(cont_strength),3) + \
                                                  "\n auto_spow : " + string(auto_spow) + "   rpow strength : " + LeftStr(string(rpow_strength),3) +"   spow strength : " + \
                                                  LeftStr(string(spow_strength),3)  + "   pord : " + string(pord) +\
                                                  "\n bias strength : " + LeftStr(string(bias_strength),3)  , lsp = 20)))
                        
(!comparison) ? output : compared_output

# ----------------------------        function script      -------------------------------------

function RGBAdapt_awb_process(clip clip, string "matrix",bool "show_scrutinized", bool "show_info", float "x", float "y", float "w", float "h", \
                                                      float "threshold",  float "gain_strength" ,  bool "auto_cont", float  "cont_strength", \
                                                      bool "auto_spow", float "rpow_strength", float "spow_strength", bool "pord", float "bias_strength")
                                                                      
{

#----------------------------------------------based on  RGBADapt plugin ---------------------------------------------------------------------#
#                 script author  : StainlessS http://forum.doom9.org/showthread.php?p=1681286#post1681286                                     #
#------------------------------------------------------------------------------------------------------------------------------------------------- #

#---------------------------------------------- need  RT_Stats plugin ----------------------------------------------------------------------------#
#                 script author  : StainlessS http://forum.doom9.org/showthread.php?p=1584313#post1584313                                       #
#----------------------------------------------------------------------------------------------------------------------------------------------- #

#---------------------------------------------- need  GRunT plugin ----------------------------------------------------------------------------#
#                 script author  : Gavino http://forum.doom9.org/showthread.php?p=1157083#post1157083                                         #
#----------------------------------------------------------------------------------------------------------------------------------------------- #

Assert(IsYV12(clip) || IsRGB(clip)," Input video colorspace must be YV12 or RGB, not YUV")  
matrix = string(Default(matrix, "Rec601") ) # Color standard, Rec 601 or Rec 709
Assert(matrix == "Rec601" || matrix == "Rec709", """RGBAdapt_auto_awb: matrix "Rec601" or "Rec709"""")
show_scrutinized = Default(show_scrutinized, false) # show scrutinized aera or not, default false
show_info = Default(show_info, false) # show info or not, default false
x = float(Default(x,0.00)) #width percentage to specify the coords source rectangle under scrutiny, the default :  x = y = h = w = 0.00 is full frame
Assert(x>=0.00 && x <= 0.99,"RGBAdapt_auto_awb: x 0.00 -> 0.99")
y = float(Default(y,0.00)) #heignt percentage to specify the coords source rectangle under scrutiny, the default :  x = y = h = w = 0.00 is full frame
Assert(y>=0.00 && y <= 0.99,"RGBAdapt_auto_awb: y 0.00 -> 0.99")
w = float(Default(w,0.00)) #coords specify the source rectangle under scrutiny, the default :  x = y = h = w = 0.00 is full frame
Assert(w>=0.00 && w <= 0.99,"RGBAdapt_auto_awb: w 0.00 -> 0.99")
Assert(x+w>=0.00 && x+w <= 0.99 ,"RGBAdapt_auto_awb: x+w 0.00 -> 0.99")
h = float(Default(h,0.00)) #coords specify the source rectangle under scrutiny , the default :  x = y = h = w = 0.00 is full frame
Assert(h>=0.00 && h <= 0.99,"RGBAdapt_auto_awb: h 0.00 -> 0.99")
Assert(y+h>=0.00 && y+h <= 0.99 ,"RGBAdapt_auto_awb: x+w 0.00 -> 0.99")
threshold  = Float(Default(threshold, 0.10)) # threshold arg of RT_Stats plugin
Assert(threshold>=0.00 && threshold <= 1.00,"RGBAdapt_auto_awb: threshold 0.00 -> 1.00")
gain_strength = Float(Default(gain_strength, 1.00)) # strength arg for gain
Assert(gain_strength>=0.00 && gain_strength <= 1.00,"RGBAdapt_auto_awb: gain_strength 0.00 -> 1.00")
auto_cont = Default(auto_cont, true) # auto weighted cont_strength arg
cont_strength = Float(Default(cont_strength, 1.00)) # strength arg for contrast
Assert(cont_strength>=0.00 && cont_strength <= 1.00,"RGBAdapt_auto_awb: cont_strength 0.00 -> 1.00")
auto_spow = Default(auto_spow, true) # auto weighted rpow_strength arg control by cont_strength arg
rpow_strength = Float(Default(rpow_strength, 1.00)) # strength arg for rpow
Assert(rpow_strength>=0.00 && rpow_strength <= 1.00,"RGBAdapt_auto_awb: rpow_strength 0.00 -> 1.00")
spow_strength = Float(Default(spow_strength, 1.00)) # strength arg for spow
Assert(spow_strength>=0.00 && spow_strength <= 1.00,"RGBAdapt_auto_awb: spow_strength 0.00 -> 1.00")
pord = Default(pord, false) # RGBAdapt pord arg
bias_strength = Float(Default(bias_strength, 1.00)) # strength arg for automatic bias_strength
Assert(bias_strength>=0.00 && bias_strength <= 1.00,"RGBAdapt_auto_awb: bias_strength 0.00 -> 1.00")

#---------- Specify the source rectangle under scrutiny

        x = int(Width(clip) * x)
        y = int(Height(clip) * y)
        w = int(-Width(clip) * w)
        h = int(-Height(clip) * h)
        
#--------- RGB color space process        

RGB_clip = (!isRGB(clip)) ? ConvertToRGB24(clip, matrix=matrix) : clip

#--------- AWB process        

ScriptClip(RGB_clip, """

#---------- First pass :  gain process for each channel 

        RT_RgbChanStats( RGB_clip, x = x, y = y, w = w, h = h, threshold = threshold, chan = -1, flgs = 1+2+4+16)
        
        # ------ detection BlankClip and condition to avoid division by 0           
        
        blanklip = RCS_MinMaxDiff_0 + RCS_MinMaxDiff_1 + RCS_MinMaxDiff_2    
        
RCS_MinMaxDiff_0 = Max (RCS_MinMaxDiff_0, 0.01) RCS_MinMaxDiff_1 = Max (RCS_MinMaxDiff_1, 0.01) RCS_MinMaxDiff_2 = Max (RCS_MinMaxDiff_2, 0.01)
               
        #---- gain process
                
        r_gain = 1 - (1 - float(255.0/RCS_MinMaxDiff_0)) * gain_strength
        r_bias = - RCS_Min_0 * r_gain * gain_strength 
                                                 
        g_gain = 1 - (1 - float(255.0/RCS_MinMaxDiff_1)) * gain_strength
        g_bias = - RCS_Min_1 * g_gain * gain_strength
        
                
        b_gain = 1 - (1 - float(255.0/RCS_MinMaxDiff_2)) * gain_strength
        b_bias = - RCS_Min_2 * b_gain * gain_strength
        
        #---- cont process
        
        # Cont is dangerous, because it can overshoot light and dark, but it is necessary to help to find good correction for very big
        # color cast. Thus bool auto_cont arg enable a automatic weighted autocont stength. I observe that picture do'nt need contraste is
        # picture, which have a large histogram, which have min value near 0 et max value near 255, which have bigger min max diff value.
        # But not it is simple, sometime the automatic weigthed autocont stength must be desable.
        
        r_cont = (!auto_cont) ? 1 - (1 - r_gain) * cont_strength : 1 - (1 - r_gain) * cont_strength * (255.0 - RCS_MinMaxDiff_0)/255.0
        r_cont_max = RCS_Max_0 * r_gain + r_bias + (r_cont - 1) *(RCS_Max_0 - 128)
        
        g_cont = (!auto_cont) ? 1 - (1 - g_gain) * cont_strength : 1 - (1 - g_gain) * cont_strength * (255.0 - RCS_MinMaxDiff_1)/255.0
        g_cont_max = RCS_Max_1 * g_gain + g_bias + (g_cont - 1) *(RCS_Max_1 - 128)

        b_cont = (!auto_cont) ? 1 - (1 - b_gain) * cont_strength : 1 - (1 - b_gain) * cont_strength * (255.0 - RCS_MinMaxDiff_2)/255.0
        b_cont_max = RCS_Max_2 * b_gain + b_bias + (b_cont - 1) *(RCS_Max_2 - 128)
        
        r_cont_bias = (!auto_cont) ? (255 - r_cont_max) * cont_strength : \
                                              (255 - r_cont_max) * cont_strength * (255.0 - RCS_MinMaxDiff_0)/255.0  
        g_cont_bias = (!auto_cont) ? (255 - g_cont_max) * cont_strength : \
                                              (255 - g_cont_max) * cont_strength * (255.0 - RCS_MinMaxDiff_1)/255.0
        b_cont_bias = (!auto_cont) ? (255 - b_cont_max) * cont_strength : \
                                              (255 - b_cont_max) * cont_strength * (255.0 - RCS_MinMaxDiff_2)/255.0
        
        #------------ gain and cont in RGBadapt args range     
        
        r_gain = Min (8.0, Max (r_gain, -8.0))
        g_gain = Min (8.0, Max (g_gain, -8.0))
        b_gain = Min (8.0, Max (b_gain, -8.0))
        
        r_cont = Min (8.0, Max (r_cont, -8.0))
        g_cont = Min (8.0, Max (g_cont, -8.0))
        b_cont = Min (8.0, Max (b_cont, -8.0))                                      
                                                      
        r_bias = r_bias + r_cont_bias
        r_bias = Min (512.0, Max (r_bias, -512.0))
        g_bias = g_bias + g_cont_bias
        g_bias = Min (512.0, Max (g_bias, -512.0))
        b_bias = b_bias + b_cont_bias
        b_bias = Min (512.0, Max (b_bias, -512.0))
       
#---------- gamma curves corrections process in accordance with gray world theory
          
    #----------- RGB values calculation
     
      r_gain_cont_ave = RCS_Ave_0 * r_gain + r_bias + (r_cont - 1) *(RCS_Ave_0 - 128)
      g_gain_cont_ave = RCS_Ave_1 * g_gain + g_bias + (g_cont - 1) *(RCS_Ave_1 - 128)       
      b_gain_cont_ave = RCS_Ave_2 * b_gain + b_bias + (b_cont - 1) *(RCS_Ave_2 - 128)        
         
    #----------- RGB gamma corrections values calcul
             
        # In gray world theory, in YUV range, we increase or decrease average value to ref = 128.0, but in RGB range
        # average of channel average values is better, with average of channel average value after gain process the
        # picture ligth is better
        
        # In gamma process, to incresae or decrease average value, we use gamma args. To find this gamma args, we
        # solve this equation ref = pow(average value/255.0,1/gamma args)
        
   # Gamma corrections are calculated with gain output, because is more refine than calculated with gain and cont output
        
        ref = (RCS_Ave_0 * r_gain + r_bias + RCS_Ave_1 * g_gain + g_bias + RCS_Ave_2 * b_gain + b_bias)/3.0

        r_rpow = 1 + (log((RCS_Ave_0 * r_gain + r_bias)/255.0)/log(ref/255.0) -1) * rpow_strength
        r_rpow = Min (4.0, Max (r_rpow, 0.1))
        g_rpow = 1 + (log((RCS_Ave_1* g_gain + g_bias)/255.0)/log(ref/255.0) - 1) * rpow_strength
        g_rpow = Min (4.0, Max (g_rpow, 0.1))
        b_rpow = 1 + (log((RCS_Ave_2 * b_gain + b_bias)/255.0)/log(ref/255.0) -1) * rpow_strength
        b_rpow = Min (4.0, Max (b_rpow, 0.1)) 
                     
    #-----------  RGB correction with spow curve calcul

    #------- Spow process is enable in default mode, spmid and pord args default values increase
    #------- rpow process action, thus we get more color saturation but also more dark aeras.
    #------- Spow for rpow is like contrast for gain. Thus i use the same factor to get automatic
    #------- weigthed spow arg
       
       r_spow = (!auto_spow) ? 1 - (1 - 1/r_rpow) * spow_strength : \
                               1 - (1 - 1/r_rpow) * spow_strength * (255.0 - RCS_MinMaxDiff_0)/255.0
       r_spow = Min (4.0, Max (r_spow, 0.1))                                                                              
       g_spow = (!auto_spow) ? 1 - (1 - 1/g_rpow) * spow_strength : \
                               1 - (1 - 1/g_rpow) * spow_strength * (255.0 - RCS_MinMaxDiff_1)/255.0
       g_spow = Min (4.0, Max (g_spow, 0.1))   
       b_spow = (!auto_spow) ? 1 - (1 - 1/b_rpow) * spow_strength : \
                               1 - (1 - 1/b_rpow) * spow_strength * (255.0 - RCS_MinMaxDiff_2)/255.0
       b_spow = Min (4.0, Max (b_spow, 0.1))                                     
       
       r_spmid = (r_spow == 1.0) ? 0.5 : (RCS_Ave_0 * r_gain + r_bias)/255.0 
       r_spmid = Min (0.99, Max (r_spmid, 0.01))
       g_spmid = (g_spow == 1.0) ? 0.5 : (RCS_Ave_1* g_gain + g_bias)/255.0
       g_spmid = Min (0.99, Max (g_spmid, 0.01))
       b_spmid = (b_spow == 1.0) ? 0.5 : (RCS_Ave_2 * b_gain + b_bias)/255.0 
       b_spmid = Min (0.99, Max (b_spmid, 0.01))
            
#---------- bias corrections process in accordance with gray world theory
    
    #----------- RGB bias corrections extraction and calcul
    
RGBAdapt( RGB_clip, \
    R_bias = r_bias, R_Gain = r_gain, R_Cont = r_cont,  R_rpow = r_rpow, R_spow = r_spow, R_SPMid = r_spmid, R_Pord = pord,\
     G_bias = g_bias, G_Gain = g_gain, G_Cont = g_cont, G_rpow = g_rpow, G_spow = g_spow, G_SPMid = g_spmid, G_Pord = pord,\
     B_bias = b_bias, B_Gain = b_gain, B_Cont = b_cont, B_rpow = b_rpow, B_spow = b_spow, B_SPMid = b_spmid, B_Pord = pord) 
    
RT_RgbChanStats( LAST, x = x, y = y, w = w, h = h, threshold = threshold, chan = -1, flgs = 16)
     
     ref = (RCS_Ave_0 + RCS_Ave_1 + RCS_Ave_2)/3.0 # in RGB range ref is better 128.0 for Gray world theory correction
    
     dr = ref - RCS_Ave_0
     dg = ref - RCS_Ave_1
     db = ref - RCS_Ave_2 

     r_bias = (r_bias + dr * bias_strength)
     r_bias = Min (512.0, Max (r_bias, -512.0))
        
     g_bias = (g_bias + dg * bias_strength)
     g_bias = Min (512.0, Max (g_bias, -512.0))
        
     b_bias = (b_bias + db * bias_strength)
     b_bias = Min (512.0, Max (b_bias, -512.0))
                                                
RGBAdapt( RGB_clip, \
    R_bias = r_bias, R_Gain = r_gain, R_Cont = r_cont,  R_rpow = r_rpow, R_spow = r_spow, R_SPMid = r_spmid, R_Pord = pord,\
     G_bias = g_bias, G_Gain = g_gain, G_Cont = g_cont, G_rpow = g_rpow, G_spow = g_spow, G_SPMid = g_spmid, G_Pord = pord,\
     B_bias = b_bias, B_Gain = b_gain, B_Cont = b_cont, B_rpow = b_rpow, B_spow = b_spow, B_SPMid = b_spmid, B_Pord = pord)
     
(blanklip == 0) ? RGB_clip : last

#----------- variables strings are tuned in global mode for data display in following ScriptClip

global r_args = (!show_info)? nop : \
RT_String("\\n                     R_bias : %s      R_gain : %s      R_cont : %s  \\n                     R_rpow : %s          R_spow : %s    R_spmid : %s",\
                      string(r_bias), string(r_gain), string(r_cont), string(r_rpow), string(r_spow), string(r_spmid),esc =1)
global g_args = (!show_info)? nop : \
RT_String("\\n                     G_bias : %s      G_gain : %s      G_cont : %s  \\n                     G_rpow : %s         G_spow : %s    G_spmid : %s",\
                      string(g_bias), string(g_gain), string(g_cont), string(g_rpow), string(g_spow), string(g_spmid),esc =1)
global b_args = (!show_info)? nop : \
RT_String("\\n                     B_bias : %s      B_gain : %s      B_cont : %s  \\n                     B_rpow : %s         B_spow : %s    B_spmid : %s",\
                      string(b_bias), string(b_gain), string(b_cont), string(b_rpow), string(b_spow), string(b_spmid),esc =1)                                            

return last """, args = "RGB_clip, show_info, x, y, w , h, gain_strength, threshold, auto_cont, cont_strength, auto_spow, rpow_strength, spow_strength,"+\
                                    "pord, bias_strength")
                                     
#--------- datas display process        
                                     
(!show_info) ? last :\
ScriptClip(last, """

#--------- start RGB values extraction for display

        RT_RgbChanStats( RGB_clip, x = x, y = y, w = w, h = h, threshold = threshold, chan = -1, flgs = 1+2+4+16)
        start_ave = (RCS_Ave_0 + RCS_Ave_1 + RCS_Ave_2)/3.0
        r_start = RT_String("\\nDeparture :  Average : %s    Min/max : %s             Min : %s    Max : %s",\
                   string(RCS_Ave_0), string(RCS_MinMaxDiff_0), string(RCS_Min_0), string(RCS_Max_0),esc =1)
        g_start = RT_String("\\nDeparture :  Average : %s    Min/max : %s             Min : %s    Max : %s",\
                   string(RCS_Ave_1), string(RCS_MinMaxDiff_1), string(RCS_Min_1), string(RCS_Max_1),esc =1)
        b_start = RT_String("\\nDeparture :  Average : %s    Min/max : %s             Min : %s    Max : %s",\
                   string(RCS_Ave_2), string(RCS_MinMaxDiff_2), string(RCS_Min_2), string(RCS_Max_2),esc =1)           
       
#--------- final RGB values extraction for display

       RT_RgbChanStats( last, x = x, y = y, w = w, h = h, threshold = threshold, chan = -1, flgs = 1+2+4+8+16)
       
        r_end = RT_String("\\nFinish       :  Average : %s     Min/max : %s             Min : %s    Max : %s",\
                   string(RCS_Ave_0), string(RCS_MinMaxDiff_0), string(RCS_Min_0), string(RCS_Max_0),esc =1)
        g_end = RT_String("\\nFinish      :  Average : %s     Min/max : %s             Min : %s    Max : %s",\
                   string(RCS_Ave_1), string(RCS_MinMaxDiff_1), string(RCS_Min_1), string(RCS_Max_1),esc =1)
        b_end = RT_String("\\nFinish      :  Average : %s     Min/max : %s             Min : %s    Max : %s",\
                   string(RCS_Ave_2), string(RCS_MinMaxDiff_2), string(RCS_Min_2), string(RCS_Max_2),esc =1)
                
#-------- display            

Subtitle("channels averages average : " + string(start_ave)+\
         "\n\n" + "Red values : " + r_start + r_args + r_end +\                     
         "\n\n" + "Green values : " + g_start + g_args + g_end+\
         "\n\n" + "Blue values : " + b_start + b_args + b_end+\                                               
         "\n\n" + "channels averages average : " + string((RCS_Ave_0 + RCS_Ave_1 + RCS_Ave_2 )/3)\ 
            ,y = 20, lsp = 20, text_color = $00FFFF00, halo_color = $00000000, size = float(height()/32.0))                       
                        
return last """, args = "RGB_clip, x, y, w , h, threshold")                                      

#-------- display scrutinized aera

        scrutinized_green = (!show_scrutinized)? nop : BlankClip(RGB_clip, width = (Width(last)-x+w), height = (Height(last)-y+h), color=$00FF00)
        scrutinized_white = (!show_scrutinized)? nop : Blankclip(RGB_clip, width = (Width(last)-x+w), height = (Height(last)-y+h), color=$FFFFFF)
        scrutinized_int = (!show_scrutinized)? nop : Blankclip(RGB_clip, width = (Width(scrutinized_white)-4), height = (Height(scrutinized_white)-4),\
                                                                                                                color=000000)
        
        scrutinized_mask = (!show_scrutinized)? nop : Overlay(scrutinized_white, scrutinized_int, x=2, y=2, opacity=1.0, mode="multiply", greymask=true,\
                                                                                    ignore_conditional=false, pc_range=false)
        
        scrutinized = (!show_scrutinized)? nop : Overlay(last, scrutinized_green, mask = scrutinized_mask, x=x, y=y, opacity=1.0, mode="blend", greymask=true,\
                                                                                            ignore_conditional=false, pc_range=false)

(!show_scrutinized)? last : scrutinized

#--------- End of RGB color space process

!isRGB(clip) ? ConvertToYV12(last, matrix=matrix) : last                                     
                                                                                                                          
}

2 скрипт с ползунками, на попробовать   - 

Код:
AVISource("C:\Users\zzzzz2019zzzzz\Desktop\9999.avi")




LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\GRunT.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RGBAdapt.dll")


show_info_nb = 0
show_info = (show_info_nb==0) ? false : true # show info or not, default false
comparison_nb = 0
comparison  = (comparison_nb==0) ? false : true # show original vs processed comparison  or not, default false



awb_nb = 1
awb = (awb_nb == 0) ? false : true

strength_bias = 0.7 # linear curve use strength, between 0.0 and 1.0, default 0.5 
strength_rpow = -0.5 # rpow curve use strength, between -4.0 and 4.0, default 1.0
strength_spow = 2.4 # spow curve use strength, between -4.0 and 4.0, default 1.0

R_spmid = 0.1  # it is original R_spmid args, range 0.1 to 0.99 center 0.5
G_spmid = 0.65  # it is original G_spmid args, range 0.1 to 0.99 center 0.5
B_spmid = 0.1  # it is original B_spmid args, range 0.1 to 0.99 center 0.5

R_pord_nb = 1 
R_pord = (R_pord_nb == 0) ? false : true # it is original R_pord args
G_pord_nb = 1 
G_pord = (G_pord_nb == 0) ? false : true  # it is original G_pord args
B_pord_nb = 1 
B_pord = (B_pord_nb == 0) ? false : true  # it is original B_pord args


R_bias_manu = -47  # same range with original R_bias args 
G_bias_manu = -23  # same range with original G_bias args
B_bias_manu = -47  # same range with original B_bias args

R_gain = 1.0  # it is original R_gain args, range -8 to 8 center 1.0
G_gain = 1.0  # it is original G_gain args, range -8 to 8 center 1.0
B_gain = 1.0  # it is original B_gain args, range -8 to 8 center 1.0

R_cont = 1.0  # it is original R_cont args, range -8 to 8 center 1.0
G_cont = 1.0  # it is original G_cont args, range -8 to 8 center 1.0
B_cont = 0.7  # it is original B_cont args, range -8 to 8 center 1.0

R_rpow_manu = 0.0  # range -0.9 to 3.0 center 0 (original R_rpow range 0.1 to 4.0 center 1.0)
G_rpow_manu = 0.0  # range -0.9 to 3.0 center 0 (original G_rpow range 0.1 to 4.0 center 1.0)
B_rpow_manu = 0.0  # range -0.9 to 3.0 center 0 (original B_rpow range 0.1 to 4.0 center 1.0)

R_spow_manu = 0.0  # range -0.9 to 3.0 center 0 (original R_spow range 0.1 to 4.0 center 1.0)
G_spow_manu = 0.0  # range -0.9 to 3.0 center 0 (original G_spow range 0.1 to 4.0 center 1.0)
B_spow_manu = 0.0  # range -0.9 to 3.0 center 0 (original B_spow range 0.1 to 4.0 center 1.0)

RGBAdapt_awb_auto( \
R_bias_manu = R_bias_manu, R_gain = R_gain, R_cont = R_cont, R_rpow_manu = R_rpow_manu, R_spow_manu =R_spow_manu, R_spmid = R_spmid, R_pord = R_pord,\
G_bias_manu = G_bias_manu, G_gain = G_gain, G_cont = G_cont, G_rpow_manu = G_rpow_manu, G_spow_manu =G_spow_manu, G_spmid = G_spmid, G_pord = G_pord,\
B_bias_manu = B_bias_manu, B_gain = B_gain, B_cont = B_cont, B_rpow_manu = B_rpow_manu, B_spow_manu =B_spow_manu, B_spmid = B_spmid, B_pord = B_pord,\
                     awb = awb, strength_bias = strength_bias, strength_rpow =  strength_rpow, strength_spow = strength_spow,\
                     show_info = show_info, comparison = comparison)                 


function RGBAdapt_awb_auto(clip clip, bool "awb",\
             float "R_bias_manu", float "R_gain", float "R_cont", float "R_rpow_manu", float "R_spow_manu", float "R_spmid", bool "R_pord",\
             float "G_bias_manu", float "G_gain", float "G_cont", float "G_rpow_manu", float "G_spow_manu", float "G_spmid", bool "G_pord",\
             float "B_bias_manu", float "B_gain", float "B_cont", float "B_rpow_manu", float "B_spow_manu", float "B_spmid", bool "B_pord",\
             float "strength_bias", float "strength_rpow", float "strength_spow",\
             bool "show_info", bool "comparison")

{

#----------------------------------------------based on  RGBADapt plugin ---------------------------------------------------------------------#
#                 script author  : StainlessS http://forum.doom9.org/showthread.php?p=1681286#post1681286                                     #
#------------------------------------------------------------------------------------------------------------------------------------------------- #

#---------------------------------------------- need  GRunT plugin ----------------------------------------------------------------------------#
#                 script author  : Gavino http://forum.doom9.org/showthread.php?p=1157083#post1157083                                     #
#------------------------------------------------------------------------------------------------------------------------------------------------- #
                                        
test = isRGB(clip)
(test == false) ? ConvertToRGB32(clip, matrix="Rec601") : clip

clip = last

awb = Default(awb,true) # auto white balance mode
awb_nb = (awb == false) ? 0 : 1

R_bias_manu = Default(R_bias_manu, 0)  # same range with original R_bias args 
G_bias_manu = Default(G_bias_manu, 0)  # same range with original G_bias args
B_bias_manu = Default(B_bias_manu, 0)  # same range with original B_bias args

R_gain = Default(R_gain, 1)  # it is original R_gain args, range -8 to 8 center 1.0
G_gain = Default(G_gain, 1)  # it is original G_gain args, range -8 to 8 center 1.0
B_gain = Default(B_gain, 1)  # it is original B_gain args, range -8 to 8 center 1.0

R_cont = Default(R_cont, 1)  # it is original R_cont args, range -8 to 8 center 1.0
G_cont = Default(G_cont, 1)  # it is original G_cont args, range -8 to 8 center 1.0
B_cont = Default(B_cont, 1)  # it is original B_cont args, range -8 to 8 center 1.0

R_rpow_manu = Default(R_rpow_manu, 0)  # range -0.9 to 3.0 center 0 (original R_rpow range 0.1 to 4.0 center 1.0)
G_rpow_manu = Default(G_rpow_manu, 0)  # range -0.9 to 3.0 center 0 (original G_rpow range 0.1 to 4.0 center 1.0)
B_rpow_manu = Default(B_rpow_manu, 0)  # range -0.9 to 3.0 center 0 (original B_rpow range 0.1 to 4.0 center 1.0)

R_spow_manu = Default(R_spow_manu, 0)  # range -0.9 to 3.0 center 0 (original R_spow range 0.1 to 4.0 center 1.0)
G_spow_manu = Default(G_spow_manu, 0)  # range -0.9 to 3.0 center 0 (original G_spow range 0.1 to 4.0 center 1.0)
B_spow_manu = Default(B_spow_manu, 0)  # range -0.9 to 3.0 center 0 (original B_spow range 0.1 to 4.0 center 1.0)

R_spmid = Default(R_spmid, 0.5)  # it is original R_spmid args, range 0.1 to 0.99 center 0.5
G_spmid = Default(G_spmid, 0.5)  # it is original G_spmid args, range 0.1 to 0.99 center 0.5
B_spmid = Default(B_spmid, 0.5)  # it is original B_spmid args, range 0.1 to 0.99 center 0.5

R_pord = Default(R_pord, false)  # it is original R_pord args
G_pord = Default(G_pord, false)  # it is original G_pord args
B_pord = Default(B_pord, false)  # it is original B_pord args

strength_bias = Default(strength_bias, 0.8) # linear curve use strength, between 0.0 and 1.0, default 0.8                                 
strength_rpow = Default(strength_rpow,1.0) # rpow curve use strength, between -4.0 and 4.0, default 1.0
strength_spow = Default(strength_spow,1.0) # spow curve use strength, between -4.0 and 4.0, default 1.0

show_info = Default(show_info, false) # show info or not, default false
comparison = Default(comparison, false) # show original vs processed comparison  or not, default false

neutre =  BlankClip( clip,pixel_type="RGB32", color=$000000)
luma = Greyscale(clip, matrix="Rec601") 
red=ShowRed(clip,"RGB32")
green = ShowGreen(clip,"RGB32")
blue = ShowBlue(clip,"RGB32")

 ScriptClip(clip, """

#------------ RGB values calcul

    luma_value = RGBDifference(luma, neutre)     
    r = RGBDifference(neutre, red) 
    g = RGBDifference(neutre,green) 
    b = RGBDifference(neutre,blue)  
    
#----------- RGB correction calcul    
    dr = luma_value-r
    dg = luma_value-g
    db = luma_value-b
   
#-----------  RGB correction with linear curve calcul (Bias)   
        dr1_calcul = dr * strength_bias * awb_nb + R_bias_manu
        dr1_low_limit = Max (dr1_calcul, -512)
    dr1 = Min (512, dr1_low_limit)    
        dg1_calcul = dg * strength_bias * awb_nb + G_bias_manu
        dg1_low_limit = Max (dg1_calcul, -512)
    dg1 = Min (512, dg1_low_limit)
        db1_calcul = db * strength_bias * awb_nb + B_bias_manu
        db1_low_limit = Max (db1_calcul, -512)
    db1 = Min (512, db1_low_limit)
    
#-----------  RGB correction with Rpow and Spow curves calcul    
    dr2 = (dr - dr * strength_bias) * awb_nb
    dg2 = (dg - dg * strength_bias) * awb_nb
    db2 = (db - db * strength_bias) * awb_nb
    
#-----------  RGB correction with Rpow curve calcul        
        yr_calcul = (dr2 < 0) ? 1+dr2 * strength_rpow/128 + R_Rpow_manu : 1/(1-dr2 * strength_rpow/128) + R_Rpow_manu
        yr_low_limit = Max (yr_calcul, 0.1)
    yr = Min (4.0, yr_low_limit)
        yg_calcul = (dg2 < 0) ? 1+dg2 * strength_rpow/128 + G_Rpow_manu : 1/(1-dg2 * strength_rpow/128) + G_Rpow_manu
        yg_low_limit = Max (yg_calcul, 0.1)
    yg = Min (4.0, yg_low_limit)
        yb_calcul = (db2 < 0) ? 1+db2 * strength_rpow/128 + B_Rpow_manu : 1/(1-db2 * strength_rpow/128) + B_Rpow_manu
        yb_low_limit = Max (yb_calcul, 0.1)
    yb = Min (4.0, yb_low_limit)
    
#-----------  RGB correction with Spow curve calcul    
        sr_calcul = (dr2 < 0) ? 1+dr2 * strength_spow/128 + R_Spow_manu : 1/(1-dr2 * strength_spow/128) + R_Spow_manu
        sr_low_limit = Max (sr_calcul, 0.1)
    sr = Min (4.0, sr_low_limit)
        sg_calcul = (dg2 < 0) ? 1+dg2 * strength_spow/128 + G_Spow_manu : 1/(1-dg2 * strength_spow/128) + G_Spow_manu
        sg_low_limit = Max (sg_calcul, 0.1)
    sg = Min (4.0, sg_low_limit)
        sb_calcul = (db2 < 0) ? 1+db2 * strength_spow/128 + B_Spow_manu : 1/(1-db2 * strength_spow/128) + B_Spow_manu
        sb_low_limit = Max (sb_calcul, 0.1)
    sb = Min (4.0, sb_low_limit)
    
           
   (show_info == false)? \
    RGBAdapt( \
    R_Bias = dr1, R_Gain = R_Gain, R_Cont = R_Cont, R_RPow = yr, R_Spow = sr, R_SPMid = R_spmid, R_Pord = R_pord, \
     G_Bias = dg1, G_Gain = G_Gain, G_Cont = G_Cont, G_RPow = yg, G_Spow = sg, G_SPMid = G_spmid, G_Pord = G_pord,\
     B_Bias = db1, B_Gain = B_Gain, B_Cont = B_Cont, B_RPow = yb, B_Spow = sb, B_SPMid = B_spmid, B_Pord = B_pord)\
     :\
     RGBAdapt( \
    R_Bias = dr1, R_Gain = R_Gain, R_Cont = R_Cont, R_RPow = yr, R_Spow = sr, R_SPMid = R_spmid, R_Pord = R_pord, \
     G_Bias = dg1, G_Gain = G_Gain, G_Cont = G_Cont, G_RPow = yg, G_Spow = sg, G_SPMid = G_spmid, G_Pord = G_pord,\
     B_Bias = db1, B_Gain = B_Gain, B_Cont = B_Cont, B_RPow = yb, B_Spow = sb, B_SPMid = B_spmid, B_Pord = B_pord)\
    .Subtitle("Red value : "+String(r)+\
              "\n     Middle - Red Value : "+String(dr)+\
              "\n Bias : "+String(dr1)+\
              "\n     Gamma and S correction base : "+String(dr2)+\
              "\n Rpow : "+String(yr)+"            Spow : "+String(sr),y=40,lsp=20)\
   .Subtitle("Green value : "+String(g)+\
             "\n     Middle - Green Value : "+String(dg)+\     
             "\n Bias : "+String(dg1)+\
             "\n     Gamma and S correction base : "+String(dg2)+\
             "\n Rpow : "+String(yg)+"           Spow : "+String(sg),y=160,lsp=20)\
    .Subtitle("Blue value : "+String(b)+\
             "\n     Middle - Blue Value : "+String(db)+\
             "\n Bias : "+String(db1)+\
             "\n     Gamma and S correction base : "+String(db2)+\
             "\n Rpow : "+String(yb)+"             Spow : "+String(sb), y=280,lsp=20)
         
""", args = "R_bias_manu, R_gain, R_cont, R_rpow_manu, R_spow_manu, R_spmid, R_pord," +\
                   "G_bias_manu, G_gain, G_cont, G_rpow_manu, G_spow_manu, G_spmid, G_pord,"+\
                   "B_bias_manu, B_gain, B_cont, B_rpow_manu, B_spow_manu, B_spmid, B_pord,"+\
                   "neutre, red, green, blue,luma,"+\
                   "awb_nb, strength_bias, strength_rpow, strength_spow,"+\
                   "show_info")


(comparison == false) ? last : StackHorizontal(clip,last)

(test == false) ? ConvertToYV12(last, matrix="Rec601") : last

}
### AvsP marked script ###
# 
# 
# 
# 
# AVISource("C:\Users\zzzzz2019zzzzz\Desktop\9999.avi")
# 
# 
# 
# 
# LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\GRunT.dll")
# LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RGBAdapt.dll")
# 
# [<separator>]
# show_info_nb = [<"show_info_nb", 0, 1, 0>]
# show_info = (show_info_nb==0) ? false : true # show info or not, default false
# comparison_nb = [<"comparison_nb", 0, 1, 0>]
# comparison  = (comparison_nb==0) ? false : true # show original vs processed comparison  or not, default false
# 
# [<separator>]
# [<separator>]
# awb_nb = [<"awb_nb", 0, 1, 1>]
# awb = (awb_nb == 0) ? false : true
# 
# strength_bias = [<"strength_bias", 0.0, 1.0, 0.7>] # linear curve use strength, between 0.0 and 1.0, default 0.5 
# strength_rpow = [<"Strength_rpow", -4.0, 4.0, -0.5>] # rpow curve use strength, between -4.0 and 4.0, default 1.0
# strength_spow = [<"Strength_spow", -4.0, 4.0, 2.4>] # spow curve use strength, between -4.0 and 4.0, default 1.0
# 
# R_spmid = [<"R_spmid", 0.1, 0.99, 0.1>]  # it is original R_spmid args, range 0.1 to 0.99 center 0.5
# G_spmid = [<"G_spmid", 0.1, 0.99, 0.65>]  # it is original G_spmid args, range 0.1 to 0.99 center 0.5
# B_spmid = [<"B_spmid", 0.1, 0.99, 0.1>]  # it is original B_spmid args, range 0.1 to 0.99 center 0.5
# 
# R_pord_nb = [<"R_pord_nb", 0, 1, 1>] 
# R_pord = (R_pord_nb == 0) ? false : true # it is original R_pord args
# G_pord_nb = [<"G_pord_nb", 0, 1, 1>] 
# G_pord = (G_pord_nb == 0) ? false : true  # it is original G_pord args
# B_pord_nb = [<"B_pord_nb", 0, 1, 1>] 
# B_pord = (B_pord_nb == 0) ? false : true  # it is original B_pord args
# 
# [<separator>]
# R_bias_manu = [<"R_bias_manu", -512, 512, -47>]  # same range with original R_bias args 
# G_bias_manu = [<"G_bias_manu", -512, 512, -23>]  # same range with original G_bias args
# B_bias_manu = [<"B_bias_manu", -512, 512, -47>]  # same range with original B_bias args
# 
# R_gain = [<"R_gain", -8, 8, 1.0>]  # it is original R_gain args, range -8 to 8 center 1.0
# G_gain = [<"G_gain", -8, 8, 1.0>]  # it is original G_gain args, range -8 to 8 center 1.0
# B_gain = [<"B_gain", -8, 8, 1.0>]  # it is original B_gain args, range -8 to 8 center 1.0
# 
# R_cont = [<"R_cont", -8, 8, 1.0>]  # it is original R_cont args, range -8 to 8 center 1.0
# G_cont = [<"G_cont", -8, 8, 1.0>]  # it is original G_cont args, range -8 to 8 center 1.0
# B_cont = [<"B_cont", -8, 8, 0.7>]  # it is original B_cont args, range -8 to 8 center 1.0
# 
# R_rpow_manu = [<"R_rpow_manu", -0.9, 3.0, 0.0>]  # range -0.9 to 3.0 center 0 (original R_rpow range 0.1 to 4.0 center 1.0)
# G_rpow_manu = [<"G_rpow_manu", -0.9, 3.0, 0.0>]  # range -0.9 to 3.0 center 0 (original G_rpow range 0.1 to 4.0 center 1.0)
# B_rpow_manu = [<"B_rpow_manu", -0.9, 3.0, 0.0>]  # range -0.9 to 3.0 center 0 (original B_rpow range 0.1 to 4.0 center 1.0)
# 
# R_spow_manu = [<"R_spow_manu", -0.9, 3.0, 0.0>]  # range -0.9 to 3.0 center 0 (original R_spow range 0.1 to 4.0 center 1.0)
# G_spow_manu = [<"G_spow_manu", -0.9, 3.0, 0.0>]  # range -0.9 to 3.0 center 0 (original G_spow range 0.1 to 4.0 center 1.0)
# B_spow_manu = [<"B_spow_manu", -0.9, 3.0, 0.0>]  # range -0.9 to 3.0 center 0 (original B_spow range 0.1 to 4.0 center 1.0)
# 
# RGBAdapt_awb_auto( \
# R_bias_manu = R_bias_manu, R_gain = R_gain, R_cont = R_cont, R_rpow_manu = R_rpow_manu, R_spow_manu =R_spow_manu, R_spmid = R_spmid, R_pord = R_pord,\
# G_bias_manu = G_bias_manu, G_gain = G_gain, G_cont = G_cont, G_rpow_manu = G_rpow_manu, G_spow_manu =G_spow_manu, G_spmid = G_spmid, G_pord = G_pord,\
# B_bias_manu = B_bias_manu, B_gain = B_gain, B_cont = B_cont, B_rpow_manu = B_rpow_manu, B_spow_manu =B_spow_manu, B_spmid = B_spmid, B_pord = B_pord,\
#                      awb = awb, strength_bias = strength_bias, strength_rpow =  strength_rpow, strength_spow = strength_spow,\
#                      show_info = show_info, comparison = comparison)                 
# 
# 
# function RGBAdapt_awb_auto(clip clip, bool "awb",\
#              float "R_bias_manu", float "R_gain", float "R_cont", float "R_rpow_manu", float "R_spow_manu", float "R_spmid", bool "R_pord",\
#              float "G_bias_manu", float "G_gain", float "G_cont", float "G_rpow_manu", float "G_spow_manu", float "G_spmid", bool "G_pord",\
#              float "B_bias_manu", float "B_gain", float "B_cont", float "B_rpow_manu", float "B_spow_manu", float "B_spmid", bool "B_pord",\
#              float "strength_bias", float "strength_rpow", float "strength_spow",\
#              bool "show_info", bool "comparison")
# 
# {
# 
# #----------------------------------------------based on  RGBADapt plugin ---------------------------------------------------------------------#
# #                 script author  : StainlessS [url=http://forum.doom9.org/showthread.php?p=1681286#post1681286]http://forum.doom9.org/showthread.php?p=1681286#post1681286[/url]                                     #
# #------------------------------------------------------------------------------------------------------------------------------------------------- #
# 
# #---------------------------------------------- need  GRunT plugin ----------------------------------------------------------------------------#
# #                 script author  : Gavino [url=http://forum.doom9.org/showthread.php?p=1157083#post1157083]http://forum.doom9.org/showthread.php?p=1157083#post1157083[/url]                                     #
# #------------------------------------------------------------------------------------------------------------------------------------------------- #
#                                         
# test = isRGB(clip)
# (test == false) ? ConvertToRGB32(clip, matrix="Rec601") : clip
# 
# clip = last
# 
# awb = Default(awb,true) # auto white balance mode
# awb_nb = (awb == false) ? 0 : 1
# 
# R_bias_manu = Default(R_bias_manu, 0)  # same range with original R_bias args 
# G_bias_manu = Default(G_bias_manu, 0)  # same range with original G_bias args
# B_bias_manu = Default(B_bias_manu, 0)  # same range with original B_bias args
# 
# R_gain = Default(R_gain, 1)  # it is original R_gain args, range -8 to 8 center 1.0
# G_gain = Default(G_gain, 1)  # it is original G_gain args, range -8 to 8 center 1.0
# B_gain = Default(B_gain, 1)  # it is original B_gain args, range -8 to 8 center 1.0
# 
# R_cont = Default(R_cont, 1)  # it is original R_cont args, range -8 to 8 center 1.0
# G_cont = Default(G_cont, 1)  # it is original G_cont args, range -8 to 8 center 1.0
# B_cont = Default(B_cont, 1)  # it is original B_cont args, range -8 to 8 center 1.0
# 
# R_rpow_manu = Default(R_rpow_manu, 0)  # range -0.9 to 3.0 center 0 (original R_rpow range 0.1 to 4.0 center 1.0)
# G_rpow_manu = Default(G_rpow_manu, 0)  # range -0.9 to 3.0 center 0 (original G_rpow range 0.1 to 4.0 center 1.0)
# B_rpow_manu = Default(B_rpow_manu, 0)  # range -0.9 to 3.0 center 0 (original B_rpow range 0.1 to 4.0 center 1.0)
# 
# R_spow_manu = Default(R_spow_manu, 0)  # range -0.9 to 3.0 center 0 (original R_spow range 0.1 to 4.0 center 1.0)
# G_spow_manu = Default(G_spow_manu, 0)  # range -0.9 to 3.0 center 0 (original G_spow range 0.1 to 4.0 center 1.0)
# B_spow_manu = Default(B_spow_manu, 0)  # range -0.9 to 3.0 center 0 (original B_spow range 0.1 to 4.0 center 1.0)
# 
# R_spmid = Default(R_spmid, 0.5)  # it is original R_spmid args, range 0.1 to 0.99 center 0.5
# G_spmid = Default(G_spmid, 0.5)  # it is original G_spmid args, range 0.1 to 0.99 center 0.5
# B_spmid = Default(B_spmid, 0.5)  # it is original B_spmid args, range 0.1 to 0.99 center 0.5
# 
# R_pord = Default(R_pord, false)  # it is original R_pord args
# G_pord = Default(G_pord, false)  # it is original G_pord args
# B_pord = Default(B_pord, false)  # it is original B_pord args
# 
# strength_bias = Default(strength_bias, 0.8) # linear curve use strength, between 0.0 and 1.0, default 0.8                                 
# strength_rpow = Default(strength_rpow,1.0) # rpow curve use strength, between -4.0 and 4.0, default 1.0
# strength_spow = Default(strength_spow,1.0) # spow curve use strength, between -4.0 and 4.0, default 1.0
# 
# show_info = Default(show_info, false) # show info or not, default false
# comparison = Default(comparison, false) # show original vs processed comparison  or not, default false
# 
# neutre =  BlankClip( clip,pixel_type="RGB32", color=$000000)
# luma = Greyscale(clip, matrix="Rec601") 
# red=ShowRed(clip,"RGB32")
# green = ShowGreen(clip,"RGB32")
# blue = ShowBlue(clip,"RGB32")
# 
#  ScriptClip(clip, """
# 
# #------------ RGB values calcul
# 
#     luma_value = RGBDifference(luma, neutre)     
#     r = RGBDifference(neutre, red) 
#     g = RGBDifference(neutre,green) 
#     b = RGBDifference(neutre,blue)  
#     
# #----------- RGB correction calcul    
#     dr = luma_value-r
#     dg = luma_value-g
#     db = luma_value-b
#    
# #-----------  RGB correction with linear curve calcul (Bias)   
#         dr1_calcul = dr * strength_bias * awb_nb + R_bias_manu
#         dr1_low_limit = Max (dr1_calcul, -512)
#     dr1 = Min (512, dr1_low_limit)    
#         dg1_calcul = dg * strength_bias * awb_nb + G_bias_manu
#         dg1_low_limit = Max (dg1_calcul, -512)
#     dg1 = Min (512, dg1_low_limit)
#         db1_calcul = db * strength_bias * awb_nb + B_bias_manu
#         db1_low_limit = Max (db1_calcul, -512)
#     db1 = Min (512, db1_low_limit)
#     
# #-----------  RGB correction with Rpow and Spow curves calcul    
#     dr2 = (dr - dr * strength_bias) * awb_nb
#     dg2 = (dg - dg * strength_bias) * awb_nb
#     db2 = (db - db * strength_bias) * awb_nb
#     
# #-----------  RGB correction with Rpow curve calcul        
#         yr_calcul = (dr2 < 0) ? 1+dr2 * strength_rpow/128 + R_Rpow_manu : 1/(1-dr2 * strength_rpow/128) + R_Rpow_manu
#         yr_low_limit = Max (yr_calcul, 0.1)
#     yr = Min (4.0, yr_low_limit)
#         yg_calcul = (dg2 < 0) ? 1+dg2 * strength_rpow/128 + G_Rpow_manu : 1/(1-dg2 * strength_rpow/128) + G_Rpow_manu
#         yg_low_limit = Max (yg_calcul, 0.1)
#     yg = Min (4.0, yg_low_limit)
#         yb_calcul = (db2 < 0) ? 1+db2 * strength_rpow/128 + B_Rpow_manu : 1/(1-db2 * strength_rpow/128) + B_Rpow_manu
#         yb_low_limit = Max (yb_calcul, 0.1)
#     yb = Min (4.0, yb_low_limit)
#     
# #-----------  RGB correction with Spow curve calcul    
#         sr_calcul = (dr2 < 0) ? 1+dr2 * strength_spow/128 + R_Spow_manu : 1/(1-dr2 * strength_spow/128) + R_Spow_manu
#         sr_low_limit = Max (sr_calcul, 0.1)
#     sr = Min (4.0, sr_low_limit)
#         sg_calcul = (dg2 < 0) ? 1+dg2 * strength_spow/128 + G_Spow_manu : 1/(1-dg2 * strength_spow/128) + G_Spow_manu
#         sg_low_limit = Max (sg_calcul, 0.1)
#     sg = Min (4.0, sg_low_limit)
#         sb_calcul = (db2 < 0) ? 1+db2 * strength_spow/128 + B_Spow_manu : 1/(1-db2 * strength_spow/128) + B_Spow_manu
#         sb_low_limit = Max (sb_calcul, 0.1)
#     sb = Min (4.0, sb_low_limit)
#     
#            
#    (show_info == false)? \
#     RGBAdapt( \
#     R_Bias = dr1, R_Gain = R_Gain, R_Cont = R_Cont, R_RPow = yr, R_Spow = sr, R_SPMid = R_spmid, R_Pord = R_pord, \
#      G_Bias = dg1, G_Gain = G_Gain, G_Cont = G_Cont, G_RPow = yg, G_Spow = sg, G_SPMid = G_spmid, G_Pord = G_pord,\
#      B_Bias = db1, B_Gain = B_Gain, B_Cont = B_Cont, B_RPow = yb, B_Spow = sb, B_SPMid = B_spmid, B_Pord = B_pord)\
#      :\
#      RGBAdapt( \
#     R_Bias = dr1, R_Gain = R_Gain, R_Cont = R_Cont, R_RPow = yr, R_Spow = sr, R_SPMid = R_spmid, R_Pord = R_pord, \
#      G_Bias = dg1, G_Gain = G_Gain, G_Cont = G_Cont, G_RPow = yg, G_Spow = sg, G_SPMid = G_spmid, G_Pord = G_pord,\
#      B_Bias = db1, B_Gain = B_Gain, B_Cont = B_Cont, B_RPow = yb, B_Spow = sb, B_SPMid = B_spmid, B_Pord = B_pord)\
#     .Subtitle("Red value : "+String(r)+\
#               "\n     Middle - Red Value : "+String(dr)+\
#               "\n Bias : "+String(dr1)+\
#               "\n     Gamma and S correction base : "+String(dr2)+\
#               "\n Rpow : "+String(yr)+"            Spow : "+String(sr),y=40,lsp=20)\
#    .Subtitle("Green value : "+String(g)+\
#              "\n     Middle - Green Value : "+String(dg)+\     
#              "\n Bias : "+String(dg1)+\
#              "\n     Gamma and S correction base : "+String(dg2)+\
#              "\n Rpow : "+String(yg)+"           Spow : "+String(sg),y=160,lsp=20)\
#     .Subtitle("Blue value : "+String(b)+\
#              "\n     Middle - Blue Value : "+String(db)+\
#              "\n Bias : "+String(db1)+\
#              "\n     Gamma and S correction base : "+String(db2)+\
#              "\n Rpow : "+String(yb)+"             Spow : "+String(sb), y=280,lsp=20)
#          
# """, args = "R_bias_manu, R_gain, R_cont, R_rpow_manu, R_spow_manu, R_spmid, R_pord," +\
#                    "G_bias_manu, G_gain, G_cont, G_rpow_manu, G_spow_manu, G_spmid, G_pord,"+\
#                    "B_bias_manu, B_gain, B_cont, B_rpow_manu, B_spow_manu, B_spmid, B_pord,"+\
#                    "neutre, red, green, blue,luma,"+\
#                    "awb_nb, strength_bias, strength_rpow, strength_spow,"+\
#                    "show_info")
# 
# 
# (comparison == false) ? last : StackHorizontal(clip,last)
# 
# (test == false) ? ConvertToYV12(last, matrix="Rec601") : last
# 
# }
### AvsP marked script ###

Отредактировано dan74 (04-06-2019 09:24:38)