Advertisement
Guest User

Yokohama Kaidashi Kikou OVA 1

a guest
Dec 9th, 2011
5,912
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Avisynth 108.83 KB | None | 0 0
  1. ______________________________________________________________________________
  2.  
  3.     pass0.avsi
  4. ______________________________________________________________________________
  5.  
  6.  
  7. ###
  8. ### Pass 0
  9. ### Dot crawl and rainbow removal (strictly temporal)
  10. ###
  11.  
  12.  
  13. # ep_str must be defined at this point.
  14.  
  15. SetMemoryMax (512)
  16.  
  17. Import ("cut.avsi")
  18.  
  19. MPEG2Source ("ykk.d2v")
  20. AssumeFps (30000, 1001)
  21.  
  22. Eval (cut_str)
  23.  
  24. remove_rdc (op_str, ed_str, notcomb_str)
  25.  
  26.  
  27.  
  28. Function remove_rdc (clip src, string frames_op, string frames_ed, string notcomb_str, int "show_mask")
  29. {
  30.     show_mask = Default (show_mask, 0)
  31.  
  32.     src
  33.  
  34.     rdc_a = LUTDeRainbow () # Don't use LUTDeCrawl, too much artifacts.
  35.     rdc_b = TComb (mode=2, fthreshL=4, othreshL=6, fthreshC=7, othreshC=10)
  36.     rdc_am = mt_makediff (rdc_a, last, y=3, u=3, v=3)
  37.     rdc_bm = mt_makediff (rdc_b, last, y=3, u=3, v=3)
  38.     rdc_m = mt_lutxy (rdc_am, rdc_bm, expr="x 128 - abs y 128 - abs < y x ?", y=3, u=3, v=3)
  39.     mt_merge (rdc_a, rdc_b, rdc_m, y=3, u=3, v=3)
  40.  
  41.     ReplaceFramesSimple (rdc_a, mappings=notcomb_str)
  42.  
  43.     (frames_op != "" || frames_ed != "")
  44. \   ?   remove_rdc_strong (frames_op, frames_ed, show_mask)
  45. \   :   last
  46.  
  47.     (show_mask == 5)
  48. \   ?   mt_makediff (src, last, y=3, u=3, v=3).mt_lut (
  49. \           yexpr="x 128 - 8 * 128 +",
  50. \           expr="x 128 - 4 * 128 +",
  51. \           y=3, u=3, v=3)
  52. \   :   last
  53. }
  54.  
  55. Function remove_rdc_strong (clip src, string frames_op, string frames_ed, int show_mask)
  56. {
  57.     src
  58.     len = src.FrameCount ()
  59.     SeparateFields ()
  60.     SelectEven () + SelectOdd ()
  61.     DeRainbow ()    # Sh0dan's
  62.     Interleave (Trim (0, -len), Trim (len, 0))
  63.     Weave ()
  64.     rdc_c = last
  65.  
  66.     tst = src.TFM ().TemporalSoften (7, 32, 255, 255)
  67.     highc = tst.mt_edge (mode="min/max", thY1=0, thY2=255)
  68.     small = highc.mt_lut ("x 160 - 8 *")
  69.     big_op = tst.remove_rdc_mask_op ()
  70.     big_ed = tst.remove_rdc_mask_ed (highc)
  71.     big = big_op.ReplaceFramesSimple (big_ed, mappings=frames_ed)
  72.     rdc_cm = mt_hysteresis (small, big, u=-128, v=-128)
  73.  
  74.     mt_merge (src, rdc_c, rdc_cm, luma=true, y=2, u=3, v=3)
  75.     (show_mask == 2) ? rdc_cm : last
  76.     (show_mask == 3) ? mt_merge (src.BlankClip (), src, rdc_cm, y=3, u=3, v=3) : last
  77.     strong = last
  78.  
  79.     src.ReplaceFramesSimple (strong, mappings=frames_op + chr(10) + frames_ed)
  80.  
  81.     (show_mask == 1) ? rdc_cm : last
  82.     (show_mask == 4)
  83. \   ?   mt_makediff (src, last, y=3, u=3, v=3).mt_lut (
  84. \           yexpr="x 128 - 8 * 128 +",
  85. \           expr="x 128 - 4 * 128 +",
  86. \           y=3, u=3, v=3)
  87. \   :   last
  88. }
  89.  
  90. Function remove_rdc_mask_op (clip tst)
  91. {
  92.     tst
  93.     mt_binarize (threshold=224)
  94.     mt_expand_multi (sw=3, sh=3, mode="ellipse")
  95.     PointResize (Width (), Height (), -1, -1)
  96. }
  97.  
  98. # End credit font is thiner than on the OP and must be detected
  99. # more carefully.
  100. Function remove_rdc_mask_ed (clip tst, clip highc)
  101. {
  102.     highc2 = highc.mt_lut ("x 128 - 8 *")
  103.     white = tst.mt_lut ("x 192 - 8 *")
  104.     white = white.mt_expand_multi (sw=3, sh=3, mode="ellipse")
  105.     white = white.PointResize (white.Width (), white.Height (), -2, -2)
  106.     white = white.mt_binarize ()
  107.  
  108.     sub = mt_lutxy (
  109. \       tst.PointResize (tst.Width (), tst.Height (), -1, -1),
  110. \       tst.PointResize (tst.Width (), tst.Height (),  1,  1),
  111. \       expr="x y - 16 - 128 > 255 0 ?"
  112. \   )
  113.     sub = sub.mt_expand_multi (sw=3, sh=3, mode="ellipse")
  114.  
  115.     highc2 = highc2.mt_expand ().mt_binarize ()
  116.  
  117.     big = mt_logic (white, sub,  mode="max")
  118.     big = mt_logic (big, highc2, mode="max")
  119.  
  120.     big
  121. }
  122.  
  123.  
  124.  
  125. ______________________________________________________________________________
  126.  
  127.     pass1.avsi
  128. ______________________________________________________________________________
  129.  
  130.  
  131. ###
  132. ### Pass 1
  133. ### Deinterlacing
  134. ###
  135.  
  136.  
  137. # ep_str must be defined at this point.
  138.  
  139. SetMemoryMax (1024)
  140. SetMTMode (3, 3)
  141.  
  142. Import ("cut.avsi")
  143. Import ("merge-seg.avsi")
  144.  
  145.  
  146. (seg_str == "")
  147. \   ? fslg_cat_seg_undet_end (ep_str, "0", 0, fps_num=30000, fps_den=1001, threads=2)
  148. \   : fslg_load_seg (ep_str, "0", seg_str, 30*60*1, fps_num=30000, fps_den=1001, threads=2)
  149.  
  150.  
  151. SetMTMode (2)
  152.  
  153. QTGMC (lossless=2, tr0=1, tr1=1, tr2=1, EdiThreads=2)
  154.  
  155.  
  156.  
  157.  
  158. ______________________________________________________________________________
  159.  
  160.     pass2.avsi
  161. ______________________________________________________________________________
  162.  
  163.  
  164.  
  165.  
  166. ###
  167. ### Pass 2
  168. ### Blending removal and conversion to 24p
  169. ###
  170.  
  171.  
  172. # ep_str must be defined at this point.
  173.  
  174. SetMemoryMax (1024)
  175. (ep_str == "01" && seg_str == "01") ? SetMTMode (5, 1) : NOP () # Don't ask...
  176.  
  177. Import ("cut.avsi")
  178. Import ("merge-seg.avsi")
  179.  
  180.  
  181. (seg_str == "")
  182. \   ? fslg_cat_seg_undet_end (ep_str, "1", 0, fps_num=60000, fps_den=1001, threads=2)
  183. \   : fslg_load_seg (ep_str, "1", seg_str, 60*60*1, fps_num=60000, fps_den=1001, threads=2)
  184. RequestLinear (clim=15)
  185. c_deint60 = last
  186.  
  187. (seg_str == "")
  188. \   ? fslg_cat_seg_undet_end (ep_str, "0", 0, fps_num=30000, fps_den=1001, threads=2)
  189. \   : fslg_load_seg (ep_str, "0", seg_str, 30*60*1, fps_num=30000, fps_den=1001, threads=2)
  190. RequestLinear (clim=15)
  191.  
  192.  
  193.  
  194. ##################################################
  195.  
  196.     debug = false
  197.     compa = 0
  198.  
  199. ##################################################
  200.  
  201.  
  202.  
  203.  
  204. c_org = last
  205. w = Width ()
  206. h = Height ()
  207.  
  208. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  209.  
  210. c_mask_3f = find_3field_mask ()
  211. c_dw      = DoubleWeave ()
  212. len_2x    = c_dw.FrameCount ()
  213.  
  214. c_deint60_x = StackVertical (c_deint60, c_deint60.BlankClip (height=4, color_yuv=$FF8080), c_mask_3f)
  215. c_dw_x      = StackVertical (c_dw,      c_dw     .BlankClip (height=4, color_yuv=$008080), c_mask_3f)
  216.  
  217. tfm60_x = c_dw_x.Loop (-1).TFM (
  218. \   y0=h,
  219. \   y1=c_dw_x.Height () - 1,
  220. \   clip2=c_deint60_x.Loop (-1),
  221. \   PP=4,
  222. \   MI=60,
  223. \   ovr="ep-"+ep_str+"-tfm-override.txt",
  224. \   display=debug
  225. \ ).Trim (0, -len_2x)
  226.  
  227. tfm60      = tfm60_x.Crop (0, 0, 0, h)
  228. c_aa       = tfm60.daa_mod (threads=3, nns=4)
  229.  
  230.  
  231. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  232.  
  233. c_all = StackVertical (c_aa, tfm60_x)
  234.  
  235. c_blend24 = c_all.SRestore (frate=24000.0/1001.0, dclip=c_aa, cache=-1)
  236. c_blend24 = c_blend24.RequestLinear (elim=20)
  237. c_ivtc24  = c_org.TFM (PP=0).TDecimate (mode=1, clip2=c_all.SelectEven ())
  238.  
  239. c_blend24.ReplaceFramesSimple_oor (c_ivtc24, mappings=stdivtc_str)
  240. AssumeFps (24000, 1001)
  241. c_all24 = last
  242.  
  243.  
  244. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  245.  
  246. c_aa24      = Crop (0, 0,         0, h)
  247. c_n24       = Crop (0, h,         0, h)
  248. c_mask_di24 = Crop (0, h * 2    , 0, 4).PointResize (w, h)
  249. c_mask_3f24 = Crop (0, h * 2 + 4, 0, 4)
  250.  
  251. c_vinv24    = c_n24.Vinverse ()
  252. c_vinv24    = mt_merge (c_vinv24, c_n24, c_mask_di24, luma=true)
  253. c_blur      = c_aa24.RemoveGrain (11, -1)
  254. c_mmo_soft  = c_blur.find_motion_mask (true)
  255. c_mmo_hard  = c_blur.find_motion_mask (false)
  256. c_mmo_aa    = c_mmo_hard.ReplaceFramesSimple_oor (c_mmo_soft, mappings=lessmoaa_str)
  257. c_mmo_vi    = c_mmo_hard
  258.  
  259. clean_frames_new (c_n24, c_aa24, c_vinv24, c_mask_3f24, c_mmo_aa, c_mmo_vi, comb_str, disexmask_str, forceaa_str, disableaa_str, disablevi_str)
  260.  
  261. c_24p = last
  262.  
  263.  
  264. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  265.  
  266.  
  267.  
  268.     (debug     ) ? tfm60_x
  269. \ : (compa == 1) ? Interleave (c_n24.Subtitle ("c_n24"), c_24p.Subtitle ("c_24p"))
  270. \ :                last
  271.  
  272.  
  273.  
  274. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  275.  
  276. Function fix_ep01_manual (clip src, clip c_aa)
  277. {
  278.     src
  279.  
  280.     fix1 = StackVertical (
  281. \       src.Crop (0, 0, 0, 256),
  282. \       StackHorizontal (
  283. \           src.Crop (0, 256, 400, 0),
  284. \           c_aa.Crop (400, 256, 0, 0)
  285. \       )
  286. \   )
  287.  
  288.     src.ReplaceFramesSimple_oor (fix1, mappings="[102235 102314]")
  289. }
  290.  
  291.  
  292. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  293.  
  294.  
  295. # Modification : nnedi3
  296. function daa_mod (clip c, int "nns", int "threads")
  297. {
  298.     nn  = c.nnedi3(field=-2, nns=nns, threads=threads)
  299.     dbl     = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
  300.     dblD    = mt_makediff(c,dbl,U=3,V=3)
  301.     shrpD   = mt_makediff(dbl,dbl.removegrain((width(c)>1100) ? 20 : 11),U=3,V=3)
  302.     DD  = shrpD.repair(dblD,13)
  303.     return dbl.mt_adddiff(DD,U=3,V=3)
  304. }
  305.  
  306.  
  307.  
  308. Function ReplaceFramesSimple_oor (clip base, clip src, string "filename", string "mappings", int "maxtime")
  309. {
  310.     maxtime = Default (maxtime, 30) # Minutes
  311.  
  312.     lsec = Int (base.FrameRate () * maxtime * 60)
  313.     len  = base.FrameCount ()
  314.     ladd = Max (lsec - len, 0)
  315.     base = base + base.BlankClip (length=ladd)
  316.     src  = src + src.BlankClip (length=ladd)
  317.     base.ReplaceFramesSimple (src, filename=filename, mappings=mappings)
  318.     Trim (0, -len)
  319. }
  320.  
  321.  
  322.  
  323. Function find_motion_mask (clip c_blur, bool lessen)
  324. {
  325.     c_blur
  326.     (lessen) ? RemoveGrain (20, -1)             : last
  327.     (lessen) ? TemporalSoften (1, 32, 255, 255) : last
  328.     mt_makediff (last, last.SelectEvery (1, 1))
  329.     mt_lut ("x 128 - abs 5 - 16 *")
  330.     mt_expand ()
  331.     mt_logic (last, last.SelectEvery (1, -1), mode="max")
  332.     RemoveGrain (20, -1)
  333. }
  334.  
  335.  
  336.  
  337. # Principe:
  338. #
  339. # En cas de mouvement, les images tenant sur 3 fields dans le pattern 3:2
  340. # ont une IVTC bizarre, qu'on pourrait décrire sous forme : (A-B-A)-(C-C)
  341. # Les 3 types de field A, B et C sont exposés différemment. Le C est moyen,
  342. # l'A est plus flou et le B est plus net. Notons que les fields A et B
  343. # appartiennent à la même image. Cet écart d'exposition semble n'apparaître
  344. # qu'en cas de mouvement, et il est très prononcé sur les pans à 24 fps.
  345. #
  346. # On commence donc par chercher les A-B-A en mouvement, qui nécessitent
  347. # un traitement particulier. En fait, on cherche la position d'un field B.
  348. # D'une part, on compare le field précédent au suivant (les A potentiels) :
  349. # ils doivent être très similaires, leur différence absolue proche de zéro.
  350. # D'autre part, on compare le field central aux deuxièmes suivant et
  351. # précédents : ils doivent être différents, si les 3 frames auquels ils
  352. # sont rattachés sont différentes.
  353. #
  354. # Une fois qu'on a trouvé et masqué le field B, on étale le masque sur
  355. # les fields A associés.
  356.  
  357. Function find_3field_mask (clip c_org)
  358. {
  359.     c_org
  360.     SeparateFields ()
  361.     RemoveGrain (20, -1)
  362.  
  363.     ScriptClip ("""
  364.  
  365.         dif_11 = mt_makediff (SelectEvery (1, -1), SelectEvery (1, +1))
  366.         dif_11 = dif_11.mt_lut ("x 128 - abs 16 *")
  367.  
  368.         dif_20 = dif_11.SelectEvery (1, -1)
  369.         dif_02 = dif_11.SelectEvery (1, +1)
  370.  
  371.         al_mid  = dif_11.AverageLuma ()
  372.         al_prev = dif_20.AverageLuma () - al_mid
  373.         al_next = dif_02.AverageLuma () - al_mid
  374.         #cmp_prev = mt_lutxy (dif_20, dif_11, expr="x y -").mt_inpand ()
  375.         #cmp_next = mt_lutxy (dif_02, dif_11, expr="x y -").mt_inpand ()
  376.         #al_prev = cmp_prev.AverageLuma ()
  377.         #al_next = cmp_next.AverageLuma ()
  378.  
  379.         (al_prev > 5 && al_next > 5) ? mt_lut (y=-255) : mt_lut (y=0)
  380.  
  381.     """)
  382.  
  383.     Crop (0, 0, 0, 4)
  384.  
  385.     frame_mask = last
  386.     frame_mask = mt_logic (frame_mask, SelectEvery (1, -1), mode="or")
  387.     frame_mask = mt_logic (frame_mask, SelectEvery (1, +1), mode="or", u=-128, v=-128)
  388.  
  389.     return (frame_mask)
  390. }
  391.  
  392. Function clean_frames_new (clip tfmout, clip c_aa, clip c_vinv, clip c_mask_3f, clip c_mmo_aa, clip c_mmo_vi, string comb_str, string disexmask_str, string forceaa_str, string disableaa_str, string disablevi_str)
  393. {
  394.     mask_sc = c_aa.ScriptClip ("""
  395.         YDifferenceFromPrevious () > 30 ? mt_lut (y=-255) : mt_lut (y=0)
  396.     """)
  397.  
  398.     w = tfmout.Width ()
  399.     h = tfmout.Height ()
  400.     c_mask_3f
  401.     ReplaceFramesSimple_oor (mt_lut (y=-255), mappings=forceaa_str)
  402.     PointResize (w, h)
  403.     frame_mask = last
  404.  
  405.     frame_mask = mt_logic (frame_mask, mask_sc, mode="max")
  406.  
  407.     edge_mask = c_aa.mt_edge (mode="prewitt", thY1=0, thY2=255) # edge_vert_only ()
  408.     edge_mask = edge_mask.RemoveGrain (20, -1)
  409.     edge_mask = edge_mask.mt_lut ("x 8 - 8 *")
  410.  
  411.     aa_mask = mt_logic (frame_mask, edge_mask, mode="and")
  412.     aa_mask = mt_logic (aa_mask, c_mmo_aa, mode="min")
  413.  
  414.     mask_hor1 = c_vinv.mt_edge ("1 1 1 0 0 0 -1 -1 -1 1", thY1=0, thY2=255)
  415.     mask_ver  = c_aa.mt_edge ("1 0 -1 1 0 -1 1 0 -1 1", thY1=0, thY2=255)
  416.     mask_hor  = mt_lutxy (mask_hor1, mask_ver, "x y -")
  417.     mask_excl = mask_hor
  418.     mask_excl = mask_excl.mt_expand ()
  419.     mask_excl = mask_excl.mt_inpand_multi (sw=2, sh=3)
  420.     mask_excl = mask_excl.mt_expand_multi (sw=3, sh=4)
  421.     mask_excl = mask_excl.mt_inpand_multi (sw=1, sh=1)
  422.     mask_excl = mask_excl.RemoveGrain (20, -1)
  423.     mask_excl = mask_excl.mt_lut ("x 32 - 6 *")
  424.     mask_excl = mask_excl.RemoveGrain (20, -1)
  425.  
  426.     mask_excl = mt_logic (mask_sc, mask_excl, "andn")
  427.  
  428.     mt_lutxy (aa_mask, mask_excl, expr="x y -")
  429.     ReplaceFramesSimple_oor (aa_mask, mappings=disexmask_str)
  430.     aa_mask = last
  431.  
  432.     mt_lutxy (c_mmo_vi, mask_excl, expr="x y -")
  433.     ReplaceFramesSimple_oor (c_mmo_vi, mappings=disexmask_str)
  434.     c_mmo_vi = last
  435.  
  436.     tfmout
  437.     mt_merge (last, c_vinv, c_mmo_vi, luma=true)
  438.     ReplaceFramesSimple_oor (c_vinv, mappings=comb_str)
  439.     ReplaceFramesSimple_oor (tfmout, mappings=disablevi_str)
  440.  
  441.     c_noaa = last
  442.     mt_merge (last, c_aa,   aa_mask, luma=true)
  443.     ReplaceFramesSimple_oor (c_noaa, mappings=disableaa_str)
  444.  
  445. #TEST#  aa_mask.GreyScale ().Levels (0,1,255, 16,235)
  446. #TEST#  mask_excl.GreyScale ().Levels (0,1,255, 16,235)
  447. #TEST#  mask_hor.GreyScale ().Levels (0,1,255, 16,235)
  448. #TEST#  mask_sc.GreyScale ().Levels (0,1,255, 16,235)
  449. #TEST#  c_mmo_aa.GreyScale ().Levels (0,1,255, 16,235)
  450. #TEST#  c_mmo_vi.GreyScale ().Levels (0,1,255, 16,235)
  451. #TEST#  mt_merge (last, last.Subtitle ("_______________xxxx"), frame_mask, luma=true)
  452.  
  453. }
  454.  
  455. Function edge_vert_only (clip src)
  456. {
  457.     src
  458.     mt_edge ("1 0 -1 1 0 -1 1 0 -1 1", thY1=0, thY2=255)
  459. }
  460.  
  461. # Not used
  462. Function edge_prewitt_no_hor (clip src)
  463. {
  464.     src
  465.     mt_logic (
  466. \       mt_edge ("1 1 0 1 0 -1 0 -1 -1 1", thY1=0, thY2=255),
  467. \       mt_logic (
  468. \           mt_edge ("1 0 -1 1 0 -1 1 0 -1 1", thY1=0, thY2=255),
  469. \           mt_edge ("0 -1 -1 1 0 -1 1 1 0 1", thY1=0, thY2=255),
  470. \           mode="max"
  471. \       ),
  472. \       mode="max"
  473. \   )
  474. }
  475.  
  476.  
  477.  
  478.  
  479. ______________________________________________________________________________
  480.  
  481.     pass3.avsi
  482. ______________________________________________________________________________
  483.  
  484.  
  485.  
  486.  
  487. ###
  488. ### Pass 3
  489. ### Deblocking
  490. ### Comb removal during fades
  491. ### Chroma bleeding removal
  492. ### Mosquito noise removal on high motion scenes
  493. ### Dehaloing, 1st pass
  494. ###
  495.  
  496.  
  497. # ep_str must be defined at this point.
  498.  
  499. SetMemoryMax (1024)
  500. SetMTMode (3, 2)
  501.  
  502. Import ("cut.avsi")
  503. Import ("merge-seg.avsi")
  504.  
  505. (seg_str == "")
  506. \   ? fslg_cat_seg_undet_end (ep_str, "2", 0)
  507. \   : fslg_load_seg (ep_str, "2", seg_str, 24*60*1)
  508.  
  509. c_org = last
  510. w = Width ()
  511. h = Height ()
  512.  
  513. SetMTMode (2)
  514.  
  515.  
  516. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  517. # Deblock
  518.  
  519. dqed = Deblock_QED ()
  520. dqed_dif = mt_makediff (dqed, last, y=3, u=3, v=3)
  521. dqed_dif = dqed_dif.mt_lut ("x 128 < x 1 + x 128 > x 1 - x ? ?", y=3, u=3, v=3)
  522. mt_adddiff (last, dqed_dif, y=3, u=3, v=3)
  523.  
  524.  
  525. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  526. # Comb removal
  527.  
  528. (ep_str == "OP") ? last : ScriptClip ("""
  529.     fmul = 1
  530.  
  531.     d_thr1 = 0.5
  532.     d_thr2 = -0.001
  533.     fad_m2 = SelectEvery (1, -2*fmul)
  534.     fad_m1 = SelectEvery (1, -1*fmul)
  535.     fad_p1 = SelectEvery (1, +1*fmul)
  536.     fad_p2 = SelectEvery (1, +2*fmul)
  537.     al_0   = last.AverageLuma ()
  538.     al_m1  = fad_m1.AverageLuma ()
  539.     al_m2  = fad_m2.AverageLuma ()
  540.     al_p1  = fad_p1.AverageLuma ()
  541.     al_p2  = fad_p2.AverageLuma ()
  542.     d_m2   = al_m1 - al_m2
  543.     d_m1   = al_0  - al_m1
  544.     d_p1   = al_p1 - al_0
  545.     d_p2   = al_p2 - al_p1
  546.     dl_m2  = Min (Abs (d_m2), d_thr1 * 1.1)
  547.     dl_m1  = Min (Abs (d_m1), d_thr1 * 1.1)
  548.     dl_p1  = Min (Abs (d_p1), d_thr1 * 1.1)
  549.     dl_p2  = Min (Abs (d_p2), d_thr1 * 1.1)
  550.     fad1dir_flag = (d_m1 * d_p1 >= d_thr2) && (d_m2 * d_m1 >= d_thr2) && (d_p2 * d_p1 >= d_thr2)
  551.     fad1q_flag = (dl_m2 + dl_m1 + dl_p1 + dl_p2 > d_thr1 * 2)
  552.     fad1_flag = (fad1dir_flag && fad1q_flag)
  553.     msg_str = String (d_m2)+" "+String (d_m1)+" "+String (d_p1)+" "+String (d_p2)
  554.     msg_str = msg_str + ((fad1_flag) ? "\nPotential frame fade" : "\n")
  555.  
  556.     thr = 0.4
  557.     sep = SeparateFields ()
  558.     dif = sep.SelectOdd ().AverageLuma() - sep.SelectEven ().AverageLuma()
  559.     fad2_flag = (abs (dif) > thr)
  560.     msg_str = msg_str + "\n" + String (dif)
  561.     msg_str = msg_str + ((fad2_flag) ? "\nPotential field fade" : "\n")
  562.  
  563.     fad_flag = (fad1_flag && fad2_flag)
  564.     msg_str = (fad_flag) ? msg_str + "\n*** Fade! ***" : msg_str
  565.  
  566.     vv_limit = 5
  567.     vv_expr = "x y - x y - "+String(vv_limit)+" 1.3 * / 6 ^ 1 + / y +"
  568.     (fad_flag) ? mt_lutxy (Vinverse (), last, expr=vv_expr, y=3, u=3, v=3) : last
  569.  
  570. #TEST#  Subtitle (msg_str, lsp=1)
  571. """)
  572.  
  573.  
  574. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  575. # Chroma bleeding
  576.  
  577. (ep_str == "OP") ? last : fslg_warp_chroma_h ()
  578.  
  579.  
  580. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  581. # Mosquito noise
  582.  
  583. RequestLinear ()
  584.  
  585. mask_edg = mt_edge (mode="prewitt", thY1=0, thY2=255)
  586. mask_det = mt_edge (mode="min/max", thY1=0, thY2=255)
  587. m_p  = mask_edg.SelectEvery (1, -1)
  588. m_n  = mask_edg.SelectEvery (1, +1)
  589. mask_edg_dyn = mask_edg
  590. mask_edg_dyn = mt_logic (mask_edg_dyn, m_p, mode="max")
  591. mask_edg_dyn = mt_logic (mask_edg_dyn, m_n, mode="max")
  592. m_np = mt_logic (m_p, m_n, mode="min")
  593. mask_e1 = mt_lutxy (mask_edg_dyn, m_np, expr="x y - 144 - 8 *")
  594. mask_e2 = mt_lutxy (mask_edg, m_np).mt_lut (expr="x 144 - 8 *")
  595. mask_e1_large = mask_e1.BicubicResize (w/4, h/4, 1, 0).BicubicResize (w, h, 1 ,0).mt_lut (expr="x 4 *")
  596. mask_e1_large = mask_e1_large.BicubicResize (w/4, h/4, 1, 0).BicubicResize (w, h, 1 ,0).mt_lut (expr="x 3 *")
  597. mask_e1_large = mask_e1_large.BicubicResize (w/4, h/4, 1, 0).BicubicResize (w, h, 1 ,0).mt_lut (expr="x 2 *")
  598. mask_z = mask_e2.mt_expand_multi (mode="ellipse", sw=2, sh=2).mt_inpand_multi (mode="ellipse", sw=2, sh=2)
  599. mask_z = mt_lutxy (mask_z, mask_e1, "x y -")
  600. mask_z = mask_z.BicubicResize (w/2, h/2, 1, 0).BicubicResize (w, h, 1, 0)
  601. mask_z = mask_z.mt_lut (expr="x 2 *")
  602. mask_k = mt_lutxy (mask_e1_large, mask_z, "x y -")
  603. c_filt_raw = dfttest (sigma=32, tbsize=1)
  604. c_filt_raw = ContraSharpen (c_filt_raw, last)
  605. c_filt = mt_merge (last, c_filt_raw, mask_k, luma=true)
  606.  
  607. last.ReplaceFramesSimple_oor (c_filt, mappings=spden_str)
  608. c_filt = last
  609.  
  610.  
  611. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  612. # Dehaloing
  613.  
  614. # Regarder 25134 (17:28.30)
  615.  
  616. c_deh_strong = FineDehalo (rx=2, ry=2, thmi=60, thma=100, thlimi=40, thlima=80, brightstr=1.0, darkstr=0.5, contra=0.0, edgeproc=0.35, showmask=0)
  617. c_deh_light  = FineDehalo (rx=2, ry=2, thmi=60, thma=100, thlimi=40, thlima=80, brightstr=0.5, darkstr=0.25, contra=0.5, edgeproc=0.35, showmask=0)
  618. c_deh = c_deh_strong.ReplaceFramesSimple_oor (c_deh_light, mappings=lightdh_str)
  619. c_deh.ReplaceFramesSimple_oor (last, mappings=nodh_str)
  620. c_deh = last
  621.  
  622.  
  623. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  624.  
  625. # Display tests
  626. #Interleave (c_org.Subtitle ("o"), last.Subtitle ("p"))
  627. #mask_e1.GreyScale ()
  628. #mask_e1_large.GreyScale ()
  629. #mask_z.GreyScale ()
  630. #mask_k.GreyScale ()
  631. #mt_lutxy (c_org, mask_mb.GreyScale (), "x 15 * y + 16 /")
  632. #c_filt
  633. #mt_average (last, scm.GreyScale ())
  634. #aa_m.GreyScale ()
  635. #Spline36Resize (w*2, h*2)
  636.  
  637. last
  638.  
  639.  
  640.  
  641. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  642.  
  643.  
  644.  
  645. Function ReplaceFramesSimple_oor (clip base, clip src, string "filename", string "mappings", int "maxtime")
  646. {
  647.     maxtime = Default (maxtime, 30) # Minutes
  648.  
  649.     lsec = Int (base.FrameRate () * maxtime * 60)
  650.     len  = base.FrameCount ()
  651.     ladd = Max (lsec - len, 0)
  652.     base = base + base.BlankClip (length=ladd)
  653.     src  = src + src.BlankClip (length=ladd)
  654.     base.ReplaceFramesSimple (src, filename=filename, mappings=mappings)
  655.     Trim (0, -len)
  656. }
  657.  
  658.  
  659. Function fslg_warp_chroma_h (clip src)
  660. {
  661.     src
  662.     w = Width ()
  663.     h = Height ()
  664.     PointResize (w, h * 5)  # Cancels awarpsharp vertical effect
  665.     aWarpSharp2 ()
  666.     PointResize (w, h, 0, 2)
  667.     src.MergeChroma (last)
  668. }
  669.  
  670.  
  671.  
  672.  
  673. ______________________________________________________________________________
  674.  
  675.     pass4.avsi
  676. ______________________________________________________________________________
  677.  
  678.  
  679.  
  680. ###
  681. ### Pass 4
  682. ### Search clip perparation
  683. ###
  684.  
  685.  
  686. # ep_str must be defined at this point.
  687.  
  688. SetMemoryMax (768)
  689.  
  690. Import ("cut.avsi")
  691. Import ("merge-seg.avsi")
  692. Import ("fslg-denoise.avsi")
  693.  
  694. (seg_str == "")
  695. \   ? fslg_cat_seg_undet_end (ep_str, "3", 0, threads=2)
  696. \   : fslg_load_seg (ep_str, "3", seg_str, 24*60*1, threads=2)
  697.  
  698. c_org = last
  699.  
  700.  
  701. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  702.  
  703. Vinverse ()
  704. ChubbyRain2mod (th=6)
  705. aa = Santiag (strh=1, strv=1, threads=3)
  706. mask = aa.fslg_make_edge_mask ()
  707. mt_merge (last, aa, mask, luma=true)
  708. fslg_make_search_clip (sigma=24, threads=3, lamt=2)
  709.  
  710.  
  711. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  712.  
  713. #Interleave (c_org.Subtitle ("o"), last.Subtitle ("p3"))
  714. #c_org
  715. last
  716.  
  717.  
  718.  
  719. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  720.  
  721.  
  722.  
  723. Function fslg_make_edge_mask (clip src)
  724. {
  725.     src
  726.     mt_edge (mode="min/max", thY1=0, thY2=255)
  727.     mt_lut ("x 10 - 0 max 200 / 0.5 ^ 600 *")
  728.     mt_expand_multi (sw=3, sh=3, mode="ellipse")
  729.     RemoveGrain (20, -1)
  730.     RemoveGrain (20, -1)
  731.     RemoveGrain (20, -1)
  732. }
  733.  
  734.  
  735.  
  736.  
  737. ______________________________________________________________________________
  738.  
  739.     pass5.avsi
  740. ______________________________________________________________________________
  741.  
  742.  
  743.  
  744.  
  745. ###
  746. ### Pass 5
  747. ### MC stuff: denoising, temporal smoothing, sharpening
  748. ### Level correction
  749. ###
  750.  
  751.  
  752. # ep_str must be defined at this point.
  753.  
  754. SetMemoryMax (1024)
  755.  
  756. Import ("cut.avsi")
  757. Import ("merge-seg.avsi")
  758.  
  759.  
  760. ##################################################
  761.  
  762.     compa = 0
  763.  
  764.     lossless16 = true
  765.  
  766. ##################################################
  767.  
  768.  
  769. (compa == 1)
  770. \ ? ((seg_str == "")
  771. \       ? fslg_cat_seg_undet_end (ep_str, "2", 0, threads=1)
  772. \       : fslg_load_seg (ep_str, "2", seg_str, 24*60*1, threads=1)
  773. \   )
  774. \ : last
  775.  
  776. c_pass1 = last
  777.  
  778. (seg_str == "")
  779. \   ? fslg_cat_seg_undet_end (ep_str, "4", 0, threads=1)
  780. \   : fslg_load_seg (ep_str, "4", seg_str, 24*60*1, threads=1)
  781.  
  782. c_ana = last
  783.  
  784. (seg_str == "")
  785. \   ? fslg_cat_seg_undet_end (ep_str, "3", 0, threads=1)
  786. \   : fslg_load_seg (ep_str, "3", seg_str, 24*60*1, threads=1)
  787.  
  788. c_org = last
  789. w = Width ()
  790. h = Height ()
  791.  
  792.  
  793. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  794. # Pre-sharpening
  795.  
  796. dftsig   = (ep_str == "OP") ? 16 : 4
  797. den_base = (ep_str == "OP") ? Vinverse () : last
  798. den_base = den_base.dfttest (sigma=dftsig, tbsize=1)
  799.  
  800. mask_edge = den_base.mt_edge (mode="prewitt", thY1=0, thY2=255)
  801. mask_edge = mask_edge.mt_lut (expr="x 80 - 4 *")
  802. mask_halo = mask_edge.mt_expand_multi (sw=6, sh=5, mode="ellipse")
  803. mask_shrp = mask_edge.mt_inflate ()
  804. mask_shrp = mt_lutxy (mask_halo, mask_shrp, "x y -")
  805. mask_shrp = mask_shrp.RemoveGrain (20, -1)
  806.  
  807. dh_mask  = mask_edge.mt_expand_multi (sw=3, sh=3, mode="ellipse")
  808. dh_mask  = mt_lutxy (dh_mask, mask_edge, "x y -")
  809. dh_mask  = dh_mask.RemoveGrain (20, -1)
  810.  
  811. dh_src   = den_base
  812. dh_src   = dh_src.Dehalo_alpha ()
  813. #dh_src   = dh_src.RemoveGrain (4)
  814. denoised = mt_merge (den_base, dh_src, dh_mask, luma=true)
  815.  
  816. c_shrp = Seesaw (
  817. \   denoised=denoised, nrlimit=0, nrlimit2=1,
  818. \   bias=100, sstr=1.25, Spower=2, Szp=3,
  819. \   Sdamplo=0, SdampHi=99, Slimit=30, sootheT=0, sootheS=0)
  820. # Previous settings:
  821. # nrlimit=0, nrlimit2=1, bias=100, sstr=1.25, Spower=4, Szp=3, Sdamplo=0, SdampHi=14, Slimit=5, sootheT=0, sootheS=0
  822. c_shrp = (ep_str == "OP") ? Merge (last, c_shrp, 1.0/3) : c_shrp
  823. c_shrp = mt_merge (c_shrp, last, mask_shrp, luma=true)
  824. c_shrp = c_shrp.ReplaceFramesSimple_oor (last, mappings=nosharp_str)
  825.  
  826.  
  827. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  828. # Temporal stabilization (denoising)
  829.  
  830. # Frames 41139 (combing), 4862, 4866 (rougeur sous l'oeil), 2730,2763 (rainbows), 23180 (faible gradient, bruit), 37849 (ciel étoilé), 34990 (mouvement avec objets dégueulasses)
  831. # 31097
  832.  
  833. tr = 6
  834. pel = 4
  835. blksize = 8
  836. sad = 150
  837. dct=0
  838. super_a = c_ana.MSuper (pel=pel)
  839. super_p = c_shrp.MSuper (pel=pel, levels=1)
  840. super_a = super_a.RequestLinear (clim=20, elim=8)
  841. super_p = super_p.RequestLinear (clim=20, elim=8)
  842. vv  = super_a.MAnalyse (multi=true, delta=tr, blksize=blksize, overlap=blksize/2, dct=dct)
  843. vb1 = vv.SelectEvery (tr * 2, 0)
  844. vf1 = vv.SelectEvery (tr * 2, 1)
  845. vb2 = vv.SelectEvery (tr * 2, 2)
  846. vf2 = vv.SelectEvery (tr * 2, 3)
  847. vb3 = vv.SelectEvery (tr * 2, 4)
  848. vf3 = vv.SelectEvery (tr * 2, 5)
  849. cf3 = last.MCompensate (super_p, vf3, thSAD=sad)
  850. cf2 = last.MCompensate (super_p, vf2, thSAD=sad)
  851. cf1 = last.MCompensate (super_p, vf1, thSAD=sad)
  852. cb1 = last.MCompensate (super_p, vb1, thSAD=sad)
  853. cb2 = last.MCompensate (super_p, vb2, thSAD=sad)
  854. cb3 = last.MCompensate (super_p, vb3, thSAD=sad)
  855. vmb2 = MMask (vb2, kind=1, ml=100.0*sad/400.0, gamma=1.5)
  856. vmb1 = MMask (vb1, kind=1, ml=100.0*sad/400.0, gamma=1.5)
  857. vmf1 = MMask (vf1, kind=1, ml=100.0*sad/400.0, gamma=1.5)
  858. vmf2 = MMask (vf2, kind=1, ml=100.0*sad/400.0, gamma=1.5)
  859. vmb  = mt_logic (vmb1, vmb2, mode="min")
  860. vmf  = mt_logic (vmf1, vmf2, mode="min")
  861. vm   = mt_logic (vmb,  vmf,  mode="min")
  862.  
  863. c_spa = dfttest (sigma=12, tbsize=1, lsb=true, threads=2)
  864.  
  865. c_deg = last.MergeChroma (last.MDegrain1 (super_p, vb1, vf1, plane=3, thSAD=sad, thSADC=sad*2))
  866. c_deg_heavy = c_deg.MDegrainN (super_p, vv, tr, thSAD=sad, lsb=true)
  867. c_deg_heavy = Dither_merge16_8 (c_deg_heavy, c_spa, vm, luma=true)
  868. c_deg_light = c_deg.MDegrain1 (super_p, vb1, vf1, thSAD=sad, lsb=true)
  869. c_deg = c_deg_heavy.ReplaceFramesSimple_oor (c_deg_light, mappings=lowtr_str)
  870.  
  871. c_dft = Interleave (cb3, cb2, cb1, last, cf1, cf2, cf3)
  872. c_dft = c_dft.dfttest (sigma=2, tbsize=7, sbsize=16, sosize=12, lsb=true)
  873. c_dft = c_dft.SelectEvery (7, 3)
  874.  
  875. c_filt = c_dft.Dither_limit_dif16 (c_deg, thr=0.4)
  876. c_db   = c_filt.Dither_bilateral16 (radius=12, thr=1.5, flat=0.75, wmin=1.0)
  877. c_filt = c_db.Dither_limit_dif16 (c_filt, thr=0.25)
  878.  
  879. # Mask for edges only, bypassing the noise
  880. filt_mask = last.Dither_build_gf3_range_mask (2)
  881. filt_mask = filt_mask.mt_lut ("x 8 - 24 *")
  882. filt_mask = filt_mask.mt_expand ().mt_expand ().RemoveGrain (20, -1)
  883. c_nofilt = last.Dither_convert_8_to_16 ()
  884.  
  885. # Mask for dark and low contrast areas
  886. c_lp      = last.BilinearResize (w/(4*4)*4, h/(4*4)*4).RemoveGrain (4, -1)
  887. dark_mask = c_lp.mt_lut ("700 x 16 * -")
  888. dark_mask = dark_mask.BicubicResize (w, h, 1, 0)
  889. cont_mask = Dither_build_gf3_range_mask (4)
  890. cont_mask = cont_mask.mt_lut ("255 x 15 - 1 max 2 ^ /")
  891. cont_mask = cont_mask.RemoveGrain (20, -1)
  892. nflt_mask = mt_logic (dark_mask, cont_mask, mode="min")
  893.  
  894. c_keepnoise = Dither_merge16_8 (c_nofilt, c_filt, filt_mask, luma=true)
  895. c_nflt_dark = Dither_merge16_8 (c_filt, c_nofilt, nflt_mask, luma=true)
  896.  
  897. c_filt
  898. ReplaceFramesSimple_oor (c_keepnoise, mappings=keepnoise_str)
  899. ReplaceFramesSimple_oor (c_nflt_dark, mappings=keepdark_str)
  900.  
  901.  
  902. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  903. # Levels
  904.  
  905. #c_lev = Dither_convert_yuv_to_rgb (matrix="601", chromak="spline36", output="rgb48y")
  906. #c_lev = c_lev.Dither_lut16 ("x 5120 - 60160 / 0 max 0.95 ^ 65280 *", y=3, u=1, v=1)
  907. #c_lev = Dither_convert_rgb_to_yuv (
  908. #\  c_lev.SelectEvery (3, 0),
  909. #\  c_lev.SelectEvery (3, 1),
  910. #\  c_lev.SelectEvery (3, 2),
  911. #\  matrix="601", chromak="spline36", lsb=true
  912. #\ )
  913. c_lev = Dither_lut16 ("x 33 256 * - 202 256 * / 0 max 0.95 ^ 219 256 * * 16 256 * +", y=3, u=2, v=2)
  914. ReplaceFramesSimple_oor (c_lev, mappings=levels_str)
  915.  
  916. (lossless16 && compa == 0) ? last : DitherPost ()
  917.  
  918.  
  919. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  920.  
  921. #vm = vm.mt_lut ("x 4 *")
  922. #vm.GreyScale ().Levels (0, 1, 255, 16, 235)
  923. #denoised
  924. #c_ana
  925. #c_org
  926. #c_shrp
  927. #dh_mask.GreyScale ().Levels (0, 1, 255, 16, 235)
  928. #dh_src
  929. #filt_mask.GreyScale ().Levels (0, 1, 255, 16, 235)
  930. #nflt_mask.GreyScale ().Levels (0, 1, 255, 16, 235)
  931.  
  932. (compa == 1) ? Interleave (c_pass1.Subtitle ("o"), last.Subtitle ("f")) : last
  933.  
  934.  
  935.  
  936. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  937.  
  938.  
  939.  
  940. Function ReplaceFramesSimple_oor (clip base, clip src, string "filename", string "mappings", int "maxtime")
  941. {
  942.     maxtime = Default (maxtime, 30) # Minutes
  943.  
  944.     lsec = Int (base.FrameRate () * maxtime * 60)
  945.     len  = base.FrameCount ()
  946.     ladd = Max (lsec - len, 0)
  947.     base = base + base.BlankClip (length=ladd)
  948.     src  = src + src.BlankClip (length=ladd)
  949.     base.ReplaceFramesSimple (src, filename=filename, mappings=mappings)
  950.     Trim (0, -len)
  951. }
  952.  
  953.  
  954.  
  955.  
  956.  
  957. ______________________________________________________________________________
  958.  
  959.     pass6.avsi
  960. ______________________________________________________________________________
  961.  
  962.  
  963.  
  964.  
  965. ###
  966. ### Pass 6
  967. ### Anti-aliasing
  968. ### Dehaloing, 2nd pass
  969. ### Mosquito noise removal on static credits
  970. ### Ringing removal on frame border
  971. ### Derainbowing 2nd pass
  972. ### Cropping
  973. ### Spot removal
  974. ### Frame freezing
  975. ###
  976.  
  977.  
  978. # ep_str must be defined at this point.
  979.  
  980. SetMemoryMax (960)
  981. SetMTMode (3, 2)
  982.  
  983. Import ("cut.avsi")
  984. Import ("merge-seg.avsi")
  985.  
  986. #(seg_str == "")
  987. #\  ? fslg_cat_seg_undet_end (ep_str, "2", 0, threads=3)
  988. #\  : fslg_load_seg (ep_str, "2", seg_str, 24*60*1, threads=3)
  989. #
  990. #c_pass1 = last
  991.  
  992. (seg_str == "")
  993. \   ? fslg_cat_seg_undet_end (ep_str, "5", 0, threads=3, ext=".avi")
  994. \   : fslg_load_seg (ep_str, "5", seg_str, 24*60*1, threads=3, ext=".avi")
  995.  
  996.  
  997. ##################################################
  998.  
  999.     croponly   = false  # To output quickly a despot reference clip
  1000.     lossless16 = true   # If pass 4 is 16 bits
  1001.     ll16out    = true   # Pass 5 storage
  1002.  
  1003. ##################################################
  1004.  
  1005.  
  1006.  
  1007. SetMTMode (2)
  1008.  
  1009.  
  1010. c_org = last
  1011. dithermode = (ll16out) ? -1 : 0
  1012. (lossless16) ? DitherPost (mode=dithermode) : last
  1013. w = Width ()
  1014. h = Height ()
  1015.  
  1016.  
  1017. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1018. # Anti-aliasing
  1019.  
  1020. c_x2    = Spline36Resize (w, h * 2, 0, 0.25)
  1021. c_x2_nn = c_x2.Santiag (type="nnedi3", strv=1, threads=1)
  1022. c_aa_ee = c_x2.Santiag (type="eedi2", strv=1)
  1023. c_aa_cs = c_aa_ee.ContraSharpen (c_x2_nn)
  1024. c_aa_cs = c_aa_cs.ReplaceFramesSimple_oor (c_x2_nn, mappings=aannedi3_str)
  1025. c_aa    = c_aa_cs.Spline36Resize (w, h, 0, -0.5)
  1026.  
  1027. m_aa    = c_aa.mt_edge (mode="prewitt", thY1=16, thY2=255)
  1028. m_aa    = m_aa.mt_expand ().RemoveGrain (20, -1)
  1029. (croponly) ? last : mt_merge (last, c_aa, m_aa, luma=true)
  1030.  
  1031.  
  1032. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1033. # Dehaloing
  1034.  
  1035. # Light version
  1036. pre_deh = last
  1037. c_deh = FineDehalo (rx=2, ry=2, thmi=60, thma=100, thlimi=40, thlima=80, brightstr=0.5, darkstr=0.25, contra=0.5, edgeproc=0.35, showmask=0)
  1038. c_deh.ReplaceFramesSimple_oor (last, mappings=nodh_str+" "+nosharp_str)
  1039. c_deh = last
  1040. (croponly) ? pre_deh : last
  1041.  
  1042.  
  1043. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1044. # Mosquito noise + Dirty fades
  1045.  
  1046. cred_mask  = detect_credits ()
  1047. cred_mask  = cred_mask.RemoveGrain (20, -1).RemoveGrain (20, -1)
  1048. all_clean = frfun7 (1.3, 8, 0)
  1049. cred_clean = mt_merge (last, all_clean, cred_mask, luma=true)
  1050. (croponly) ? last : ReplaceFramesSimple_oor (cred_clean, mappings=credmosquito_str)
  1051. (croponly) ? last : ReplaceFramesSimple_oor (all_clean, mappings=dirtyfade_str)
  1052.  
  1053.  
  1054. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1055. # Ringing
  1056.  
  1057. border_mask  = mt_lutspa (mode="absolute", expr="x 14 == 120 x 16 == 136 128 ? ?")
  1058. border_fixed = mt_lutxy (border_mask, expr="x y 128 / * round 1 254 clip", y=3, u=2, v=2)
  1059. (croponly) ? last : ReplaceFramesSimple_oor (border_fixed, mappings=borderfix_str)
  1060.  
  1061.  
  1062. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1063. # Rainbows
  1064.  
  1065. c_derainbow = last.ChubbyRain2mod (th=8, show=false)
  1066. (croponly) ? last : ReplaceFramesSimple_oor (c_derainbow, mappings=derainbow_str)
  1067.  
  1068.  
  1069. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1070. # Crop
  1071.  
  1072. c_crop10 = Crop (10, 0, -6, 0)
  1073. c_crop12 = Crop (12, 0, -4, 0)
  1074. Crop ( 8, 0, -8, 0)
  1075. ReplaceFramesSimple_oor (c_crop10, mappings=crop10_str)
  1076. ReplaceFramesSimple_oor (c_crop12, mappings=crop12_str)
  1077.  
  1078. # No need for Dither_crop16() as we don't crop vertically.
  1079. c_16 = (ll16out && ! croponly) ?                               c_org.Crop ( 8, 0, -8, 0)                       : last
  1080. c_16 = (ll16out && ! croponly) ? c_16.ReplaceFramesSimple_oor (c_org.Crop (10, 0, -6, 0), mappings=crop10_str) : last
  1081. c_16 = (ll16out && ! croponly) ? c_16.ReplaceFramesSimple_oor (c_org.Crop (12, 0, -4, 0), mappings=crop12_str) : last
  1082.  
  1083.  
  1084. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1085. # Spots
  1086. # Design failure: should have been before cropping (more practical)
  1087.  
  1088. c_predespot = last
  1089. spot_mask = mt_lut ("16", y=-16, u=-128, v=-128)
  1090. spot_mask = spot_mask.TextSub ("ep-"+ep_str+"-despot-mask.ass")
  1091. spot_mask = spot_mask.mt_lut ("x 16 - 219 / 255 *")
  1092. spot_mask = spot_mask.RemoveGrain (20, -1)
  1093. SetMTMode (5)
  1094. super = MSuper (pel=1)
  1095. super = super.RequestLinear ()
  1096. vb4   = super.MAnalyse (isb=true,  delta=4, blksize=16, overlap=8)
  1097. vb2   = super.MAnalyse (isb=true,  delta=2, blksize=16, overlap=8)
  1098. vb1   = super.MAnalyse (isb=true,  delta=1, blksize=16, overlap=8)
  1099. vf1   = super.MAnalyse (isb=false, delta=1, blksize=16, overlap=8)
  1100. vf2   = super.MAnalyse (isb=false, delta=2, blksize=16, overlap=8)
  1101. vf4   = super.MAnalyse (isb=false, delta=4, blksize=16, overlap=8)
  1102. cb4   = MCompensate (super, vb4, thSAD=2000)
  1103. cb2   = MCompensate (super, vb2, thSAD=2000)
  1104. cf2   = MCompensate (super, vf2, thSAD=2000)
  1105. cf4   = MCompensate (super, vf4, thSAD=2000)
  1106. SetMTMode (2)
  1107. smoothed = last.MDegrain2 (super, vb1, vf1, vb2, vf2, thSAD=2000)
  1108. despoted = Median2 (cb4, cb2, smoothed, cf2, cf4)
  1109. ScriptClip ("""
  1110.     lumax = spot_mask.YPlaneMax ()
  1111.     (lumax >= 128) ? mt_merge (last, despoted, spot_mask, luma=true) : last
  1112. """)
  1113. (croponly) ? c_predespot : last
  1114.  
  1115.  
  1116. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1117.  
  1118. (ll16out && ! croponly) ? Dither_convert_8_to_16 () : last
  1119. (ll16out && ! croponly) ? c_16.Dither_limit_dif16 (last, thr=1.0, elast=2.0) : last
  1120.  
  1121.  
  1122. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1123. # Freeze
  1124.  
  1125. c_prefreeze = last
  1126. Eval (frzfrm_str)
  1127. (croponly) ? c_prefreeze : last
  1128.  
  1129.  
  1130. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1131.  
  1132. #c_x2
  1133. #c_x2_nn.Spline36Resize (w, h, 0, -0.5)
  1134. #c_aa_ee.Spline36Resize (w, h, 0, -0.5)
  1135. #c_aa
  1136. #mask_shrp.GreyScale ().Levels (0, 1, 255, 16, 235)
  1137. #Interleave (c_pass1.Subtitle ("o"), pre_deh.Subtitle ("pre"), c_deh.Subtitle ("deh2"))
  1138.  
  1139.  
  1140. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1141.  
  1142.  
  1143.  
  1144. Function ReplaceFramesSimple_oor (clip base, clip src, string "filename", string "mappings", int "maxtime")
  1145. {
  1146.     maxtime = Default (maxtime, 30) # Minutes
  1147.  
  1148.     lsec = Int (base.FrameRate () * maxtime * 60)
  1149.     len  = base.FrameCount ()
  1150.     ladd = Max (lsec - len, 0)
  1151.     base = base + base.BlankClip (length=ladd)
  1152.     src  = src + src.BlankClip (length=ladd)
  1153.     base.ReplaceFramesSimple (src, filename=filename, mappings=mappings)
  1154.     Trim (0, -len)
  1155. }
  1156.  
  1157.  
  1158. # Almost the same functions as in pass 0
  1159. Function detect_credits (clip src)
  1160. {
  1161.     src
  1162.     tst = last.TemporalSoften (7, 32, 255, 255)
  1163.     highc = tst.mt_edge (mode="min/max", thY1=0, thY2=255)
  1164.     small = highc.mt_lut ("x 160 - 8 *")
  1165.     big   = tst.remove_rdc_mask_ed (highc)
  1166.  
  1167.     rdc_cm = mt_hysteresis (small, big, u=-128, v=-128)
  1168.  
  1169.  
  1170.     rdc_cm.GreyScale ()
  1171. }
  1172.  
  1173. Function remove_rdc_mask_ed (clip tst, clip highc)
  1174. {
  1175.     highc2 = highc.mt_lut ("x 128 - 8 *")
  1176.     white = tst.mt_lut ("x 192 - 8 *")
  1177.     white = white.mt_expand_multi (sw=3, sh=3, mode="ellipse")
  1178.     white = white.PointResize (white.Width (), white.Height (), -2, -2)
  1179.     white = white.mt_binarize ()
  1180.  
  1181.     sub = mt_lutxy (
  1182. \       tst.PointResize (tst.Width (), tst.Height (), -1, -1),
  1183. \       tst.PointResize (tst.Width (), tst.Height (), 1, 1),
  1184. \       expr="x y - 16 - 128 > 255 0 ?"
  1185. \   )
  1186.     sub = sub.mt_expand_multi (sw=10, sh=10)
  1187.  
  1188.     highc2 = highc2.mt_expand ().mt_binarize ()
  1189.  
  1190.     big = mt_logic (white, sub, mode="max")
  1191.     big = mt_logic (big, highc2, mode="max")
  1192.  
  1193.     big
  1194. }
  1195.  
  1196. Function FreezeN1 (clip src, int f)
  1197. {
  1198.     return (src.FreezeFrame (f, f, f + 1))
  1199. }
  1200. Function FreezeP1 (clip src, int f)
  1201. {
  1202.     return (src.FreezeFrame (f, f, f - 1))
  1203. }
  1204. Function FreezeN2 (clip src, int f)
  1205. {
  1206.     return (src.FreezeFrame (f, f + 1, f + 2))
  1207. }
  1208. Function FreezeN3 (clip src, int f)
  1209. {
  1210.     return (src.FreezeFrame (f, f + 2, f + 3))
  1211. }
  1212. Function FreezePN (clip src, int f)
  1213. {
  1214.     return (src.FreezeFrame (f - 1, f + 1, f))
  1215. }
  1216.  
  1217.  
  1218.  
  1219.  
  1220. ______________________________________________________________________________
  1221.  
  1222.     cut.avsi
  1223. ______________________________________________________________________________
  1224.  
  1225.  
  1226.  
  1227.  
  1228. # ep_str must be defined at this point.
  1229.  
  1230.  
  1231.  
  1232. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1233. # Pass 0
  1234.  
  1235.  
  1236.  
  1237. cut_str =
  1238. \     (ep_str == "01") ? "Dissolve (cut_clip (52050, 52050+2640+16), cut_clip (2640, 51958), 16)"
  1239. \   : (ep_str == "02") ? "cut_clip ( 52050, 103858)"
  1240. \   : (ep_str == "OP") ? "cut_clip (103894, 106543)"
  1241. \   : (ep_str == "ED") ? "cut_clip (106570, 109018)"
  1242. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1243.  
  1244. cutaudio_str = (ep_str == "01") ? "cut_clip (0,  51958)" : cut_str
  1245.  
  1246. Function cut_clip (clip src, int frame_beg, int frame_end)
  1247. {
  1248.     src
  1249.     Trim (frame_beg, frame_beg - frame_end)
  1250. }
  1251.  
  1252. # 30 fps, after cut
  1253. # TComb bypass (artifacts)
  1254. notcomb_str =
  1255. \     (ep_str == "01") ? "[34780 35059]"
  1256. \   : (ep_str == "02") ? ""
  1257. \   : (ep_str == "OP") ? ""
  1258. \   : (ep_str == "ED") ? ""
  1259. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1260.  
  1261.  
  1262.  
  1263. # 30 fps, after cut
  1264. # Credits to derainbow with stronger settings
  1265. op_str =
  1266. \     (ep_str == "01") ? "[270 2259]"
  1267. \   : (ep_str == "02") ? "[270 2259]"
  1268. \   : (ep_str == "OP") ? ""
  1269. \   : (ep_str == "ED") ? ""
  1270. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1271. ed_str =
  1272. \     (ep_str == "01") ? "[49400 51957]"
  1273. \   : (ep_str == "02") ? "[49125 51794]"
  1274. \   : (ep_str == "OP") ? ""
  1275. \   : (ep_str == "ED") ? ""
  1276. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1277.  
  1278. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1279. # Pass 2
  1280.  
  1281.  
  1282.  
  1283. # 24 fps
  1284. # Frames to process with a regular IVTC (no real blending)
  1285. stdivtc_str =
  1286. \     (ep_str == "01") ? "[0 2267]"
  1287. \   : (ep_str == "02") ? "[0 39231]"
  1288. \   : (ep_str == "OP") ? "[0 2118]"
  1289. \   : (ep_str == "ED") ? ""
  1290. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1291.  
  1292. # 24 fps
  1293. # Frames showing minor residual combing after IVTC/deblending, needing an additional Vinverse
  1294. comb_str =
  1295. \     (ep_str == "01") ? """
  1296. [14538 14705] [20165 20331]
  1297. 26593 26682 [27166 27197] [33143 33278] [37180 37354] [37753 38040] [38137 38267] 40070
  1298. """
  1299. \   : (ep_str == "02") ? """
  1300. 2317 2381 2925 [27238 27239]
  1301. """
  1302. \   : (ep_str == "OP") ? ""
  1303. \   : (ep_str == "ED") ? ""
  1304. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1305.  
  1306. # 24 fps
  1307. # Bypass the detail exclusion mask.
  1308. disexmask_str =
  1309. \     (ep_str == "01") ? """
  1310. [1060 1142]
  1311. [2268 41565]
  1312. """
  1313. \   : (ep_str == "02") ? """
  1314. [1060 1142] [13139 13202] [2983 3032] [3189 3207] [4184 4479] [9753 9757] [12222 12222]
  1315. [13707 13814] [18332 18344] [18772 18797] [19170 19289] [30648 30720] [30913 31008] [31083 31176]
  1316. [36357 36362] [37775 37809]
  1317. """
  1318. \   : (ep_str == "OP") ? ""
  1319. \   : (ep_str == "ED") ? ""
  1320. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1321.  
  1322. # 24 fps
  1323. # Force auto smoothing (AA + Vinverse) on any motion
  1324. forceaa_str =
  1325. \     (ep_str == "01") ? """
  1326. [2268 21484] [21555 41565]
  1327. """
  1328. \   : (ep_str == "02") ? """
  1329. [5830 6032] [6215 6245] [9753 9757] [10493 10558] [11245 11364]
  1330. [15873 15943]
  1331. [16293 16436] [16500 16660] [18332 18344] [18772 18797] [28813 28814]
  1332. [30648 30720] [30913 31008] [33632 33812] [36357 36362] [39936 39936]
  1333. """
  1334. \   : (ep_str == "OP") ? ""
  1335. \   : (ep_str == "ED") ? "[0 1957]"
  1336. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1337.  
  1338. # 24 fps
  1339. # Disable AA but possibly keep Vinverse
  1340. disableaa_str =
  1341. \     (ep_str == "01") ? """
  1342. [14706 14913] [20165 20331] [21423 21554] [21687 21806]
  1343. """
  1344. \   : (ep_str == "02") ? "[29683 29712]"
  1345. \   : (ep_str == "OP") ? "[0 2118]"
  1346. \   : (ep_str == "ED") ? ""
  1347. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1348.  
  1349. # 24 fps
  1350. # Lessen the motion detection system for AA
  1351. lessmoaa_str =
  1352. \     (ep_str == "01") ? "[988 998] [1064 1143] [2112 20142] [20248 41565]"
  1353. \   : (ep_str == "02") ? "[988 998] [1064 1143]"
  1354. \   : (ep_str == "OP") ? ""
  1355. \   : (ep_str == "ED") ? ""
  1356. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1357.  
  1358. # 24 fps
  1359. # Disable Vinverse
  1360. disablevi_str =
  1361. \     (ep_str == "01") ? "[21485 21554]"
  1362. \   : (ep_str == "02") ? ""
  1363. \   : (ep_str == "OP") ? "[0 2118]"
  1364. \   : (ep_str == "ED") ? ""
  1365. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1366.  
  1367.  
  1368.  
  1369. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1370. # Pass 3
  1371.  
  1372.  
  1373.  
  1374. # 24 fps
  1375. # Spatial edge denoising
  1376. spden_str =
  1377. \     (ep_str == "01") ? "[4017 4088] [5537 5652] [14538 14924] [30603 30731] [31448 31593]"
  1378. \   : (ep_str == "02") ? "[13892 13906] [30481 30542] [30649 30720]"
  1379. \   : (ep_str == "OP") ? ""
  1380. \   : (ep_str == "ED") ? ""
  1381. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1382.  
  1383. # 24 fps
  1384. # No dehalo
  1385. nodh_str =
  1386. \     (ep_str == "01") ? "[39523 40066] [40329 40499] [40775 41091] [41198 41565]"
  1387. \   : (ep_str == "02") ? ""
  1388. \   : (ep_str == "OP") ? ""
  1389. \   : (ep_str == "ED") ? ""
  1390. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1391.  
  1392. # 24 fps
  1393. # Light dehalo only
  1394. lightdh_str =
  1395. \     (ep_str == "01") ? ""
  1396. \   : (ep_str == "02") ? "[2112 39231]"
  1397. \   : (ep_str == "OP") ? "[0 2118]"
  1398. \   : (ep_str == "ED") ? "[0 1957]"
  1399. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1400.  
  1401.  
  1402.  
  1403. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1404. # Pass 5
  1405.  
  1406.  
  1407.  
  1408. # 24 fps
  1409. # No sharpening
  1410. nosharp_str =
  1411. \     (ep_str == "01") ? "[4017 4088] [5537 5644] [14538 14924] [30603 30722] [31448 31591]"
  1412. \   : (ep_str == "02") ? ""
  1413. \   : (ep_str == "OP") ? ""
  1414. \   : (ep_str == "ED") ? ""
  1415. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1416.  
  1417. # 24 fps
  1418. # Frames to filter with a low temporal radius.
  1419. lowtr_str =
  1420. \     (ep_str == "01") ? "[1283 1330]"
  1421. \   : (ep_str == "02") ? "[1283 1330] [3420 4715]"
  1422. \   : (ep_str == "OP") ? ""
  1423. \   : (ep_str == "ED") ? "[1082 1191]"
  1424. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1425.  
  1426. # 24 fps
  1427. # Background in motion where texture is lost by filtering.
  1428. # A voir: EP01 [14706 14924]
  1429. keepnoise_str =
  1430. \     (ep_str == "01") ? """
  1431. [3621 3799] [20248 20330] [21423 21686] [26749 26849] [27827 28040]
  1432. [36745 37094] [40555 40662]
  1433. """
  1434. \   : (ep_str == "02") ? "[37775 37809] [40333 40445]"
  1435. \   : (ep_str == "OP") ? ""
  1436. \   : (ep_str == "ED") ? "[1083 1197]"
  1437. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1438.  
  1439. # 24 fps
  1440. # Frames with important things hidden in dark area lost by filtering.
  1441. # Warning: very slow processing here (30s per frame) for some reason.
  1442. keepdark_str =
  1443. \     (ep_str == "01") ? "[37753 38040]"
  1444. \   : (ep_str == "02") ? ""
  1445. \   : (ep_str == "OP") ? ""
  1446. \   : (ep_str == "ED") ? ""
  1447. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1448.  
  1449. # 24 fps
  1450. # Frames with black level set to 20 (RGB), needing to be fixed
  1451. levels_str =
  1452. \     (ep_str == "01") ? "[0 2124] [25712 26573]"
  1453. \   : (ep_str == "02") ? "[0 41445]"
  1454. \   : (ep_str == "OP") ? ""
  1455. \   : (ep_str == "ED") ? ""
  1456. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1457.  
  1458.  
  1459.  
  1460. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1461. # Pass 6
  1462.  
  1463.  
  1464.  
  1465. # 24 fps
  1466. # Dirty fades
  1467. dirtyfade_str =
  1468. \     (ep_str == "01") ? "[1262 1282] [39496 39523] [39551 39576] [39605 39702] [40527 40541] [41156 41186]"
  1469. \   : (ep_str == "02") ? "[1262 1282] [39275 39301] [39330 39355] [39384 39481] [40306 40320] [40935 40965]"
  1470. \   : (ep_str == "OP") ? "[1260 1279]"
  1471. \   : (ep_str == "ED") ? "[24 51] [79 104] [133 220] [1055 1082] [1684 1719]"
  1472. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1473.  
  1474. # 24 fps
  1475. # Mosquito noise on the credits
  1476. credmosquito_str =
  1477. \     (ep_str == "01") ? """
  1478. [39530 39622] [39730 39879] [39930 40039] [40335 40494]
  1479. [40579 40705] [40815 40943] [40990 41078] [41227 41322]
  1480. """
  1481. \   : (ep_str == "02") ? ""
  1482. \   : (ep_str == "OP") ? ""
  1483. \   : (ep_str == "ED") ? ""
  1484. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1485.  
  1486. # 24 fps
  1487. # Frames needing additional, strong derainbowing
  1488. derainbow_str =
  1489. \     (ep_str == "01") ? "[2638 2773] [3148 3250] [27827 28041] [28660 28779] [37879 38040]"
  1490. \   : (ep_str == "02") ? """
  1491. [9438 9641] [9768 11046] [11266 11292] [11606 11822] [11948 12034]
  1492. [13708 13815] [15275 15398] [16294 16437] [17375 17494] [18039 18085]
  1493. [18799 18805] [19171 19290] [20945 21142] [21698 21913] [24855 25032]
  1494. [28545 28691]
  1495. """
  1496. \   : (ep_str == "OP") ? ""
  1497. \   : (ep_str == "ED") ? ""
  1498. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1499.  
  1500. # 24 fps
  1501. # Frames where eedi2 based AA is plain wrong
  1502. aannedi3_str =
  1503. \     (ep_str == "01") ? "[27720 28034]"
  1504. \   : (ep_str == "02") ? ""
  1505. \   : (ep_str == "OP") ? ""
  1506. \   : (ep_str == "ED") ? ""
  1507. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1508.  
  1509. # 24 fps
  1510. # Frames where the ringing border has to be fixed
  1511. borderfix_str =
  1512. \     (ep_str == "01") ? "[39473 41565]"
  1513. \   : (ep_str == "02") ? ""
  1514. \   : (ep_str == "OP") ? ""
  1515. \   : (ep_str == "ED") ? "[0 1957]"
  1516. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1517.  
  1518. # 24 fps
  1519. # Frames to crop to 10 or 12 pixels instead of 8
  1520. crop10_str =
  1521. \     (ep_str == "01") ? "[2112 5536] [5645 8470] [14255 25311] [27724 39472]"
  1522. \   : (ep_str == "02") ? ""
  1523. \   : (ep_str == "OP") ? ""
  1524. \   : (ep_str == "ED") ? ""
  1525. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1526. crop12_str =
  1527. \     (ep_str == "01") ? """
  1528. [5537 5644] [8471 10432] [10758 10894] [11404 12904] [13000 14254]
  1529. [25312 25702] [26574 27723] [37753 39472] [39473 41565]
  1530. """
  1531. \   : (ep_str == "02") ? ""
  1532. \   : (ep_str == "OP") ? ""
  1533. \   : (ep_str == "ED") ? "[0 1957]"
  1534. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1535.  
  1536. # 24 fps
  1537. # Frames to freeze
  1538. frzfrm_str =
  1539. \     (ep_str == "01") ? """
  1540. FreezeN1 (  563)
  1541. FreezeN1 (  580)
  1542. FreezeN1 ( 1012)
  1543. FreezeN1 ( 1027)
  1544. FreezeN1 ( 1214)
  1545. FreezeN2 ( 1237)
  1546. FreezeN2 ( 2269)
  1547. FreezeN2 ( 2774)
  1548. FreezeN2 ( 2955)
  1549. FreezeN2 ( 3051)
  1550. FreezeN1 ( 3148)
  1551. FreezeN2 ( 3251)
  1552. FreezeN2 ( 3808)
  1553. FreezeN1 ( 3925)
  1554. FreezeN1 ( 4089)
  1555. FreezeN2 ( 4164)
  1556. FreezeN2 ( 4336)
  1557. FreezeN2 ( 4375)
  1558. FreezeN2 ( 4564)
  1559. FreezeN2 ( 4625)
  1560. FreezeN1 ( 4853)
  1561. FreezeN2 ( 6573)
  1562. FreezeN2 ( 7019)
  1563. FreezeN2 ( 9706)
  1564. FreezeN1 (10758)
  1565. FreezeN2 (11476)
  1566. FreezeP1 (11523)
  1567. FreezeN1 (11524)
  1568. FreezeN1 (11789)
  1569. FreezeN2 (11954)
  1570. FreezeN2 (12038)
  1571. FreezeN2 (12089)
  1572. FreezeN2 (12149)
  1573. FreezeN2 (12305)
  1574. FreezeN2 (13933)
  1575. FreezeN2 (14053)
  1576. FreezeN2 (14925)
  1577. FreezeN2 (15141)
  1578. FreezeP1 (15407)
  1579. FreezeN2 (15577)
  1580. FreezeN2 (16342)
  1581. FreezeN2 (16426)
  1582. FreezeN2 (16540)
  1583. FreezeN2 (16900)
  1584. FreezeP1 (16973)
  1585. FreezeN1 (17500)
  1586. FreezeN1 (17548)
  1587. FreezeN1 (17599)
  1588. FreezeN2 (17647)
  1589. FreezePN (17792)
  1590. FreezeN2 (17804)
  1591. FreezeN2 (17864)
  1592. FreezeN2 (18044)
  1593. FreezeN2 (18146)
  1594. FreezeN2 (18230)
  1595. FreezeN2 (18398)
  1596. FreezeN2 (18458)
  1597. FreezeN2 (19010)
  1598. FreezeN2 (19094)
  1599. FreezeN2 (19255)
  1600. FreezeN1 (19514)
  1601. FreezeN2 (19569)
  1602. FreezeN2 (19839)
  1603. FreezeN1 (19911)
  1604. FreezeN2 (20011)
  1605. FreezeN2 (21072)
  1606. FreezeN2 (21366)
  1607. FreezeN2 (22377)
  1608. FreezeN2 (23373)
  1609. FreezeN2 (23517)
  1610. FreezeP1 (23578)
  1611. FreezeN2 (24046)
  1612. FreezeN2 (24226)
  1613. FreezeN2 (24262)
  1614. FreezeN2 (24286)
  1615. FreezeN2 (24886)
  1616. FreezeN2 (24988)
  1617. FreezeN2 (25144)
  1618. FreezeN2 (25312)
  1619. FreezeN2 (28102)
  1620. FreezeN2 (28462)
  1621. FreezeN2 (28498)
  1622. FreezeN2 (28780)
  1623. FreezeN1 (28801)
  1624. FreezeN2 (28873)
  1625. FreezeN2 (29137)
  1626. FreezeN2 (29212)
  1627. FreezeN1 (29428)
  1628. FreezeN1 (29477)
  1629. FreezeN1 (29660)
  1630. FreezeN2 (29912)
  1631. FreezeN2 (30032)
  1632. FreezePN (30202)
  1633. FreezeN2 (30309)
  1634. FreezeN1 (30603)
  1635. FreezeN2 (31640)
  1636. FreezeN2 (31856)
  1637. FreezeN2 (32053)
  1638. FreezeN2 (32089)
  1639. FreezePN (32164)
  1640. FreezeN1 (32235)
  1641. FreezeN2 (32427)
  1642. FreezeN2 (32501)
  1643. FreezeN2 (32561)
  1644. FreezeN2 (32633)
  1645. FreezeN1 (32753)
  1646. FreezePN (32898)
  1647. FreezeN1 (32920)
  1648. FreezeN2 (32992)
  1649. FreezeN2 (33625)
  1650. FreezeP1 (33792)
  1651. FreezeN2 (33793)
  1652. FreezeN2 (33916)
  1653. FreezeN2 (34180)
  1654. FreezeN2 (34618)
  1655. FreezeN1 (34764)
  1656. FreezeN2 (35398)
  1657. FreezeN2 (35509)
  1658. FreezeN2 (35797)
  1659. FreezeN2 (35977)
  1660. FreezeN2 (36181)
  1661. FreezeN2 (36361)
  1662. FreezeN2 (38268)
  1663. FreezeN2 (38461)
  1664. FreezeN2 (38581)
  1665. FreezeN2 (38845)
  1666. FreezeN2 (38942)
  1667. FreezeN2 (39110)
  1668. FreezeN2 (40110)
  1669. FreezeN2 (40146)
  1670. FreezeN1 (40179)
  1671. FreezeP1 (40234)
  1672. FreezeN2 (40235)
  1673. """
  1674. \   : (ep_str == "02") ? """
  1675. FreezeN1 (  563)
  1676. FreezeN1 (  580)
  1677. FreezeN1 ( 1012)
  1678. FreezeN1 ( 1027)
  1679. FreezeN1 ( 1214)
  1680. FreezeN2 ( 1237)
  1681. FreezeN1 ( 1283)
  1682. FreezeN1 (39925)
  1683. FreezeN1 (39958)
  1684. FreezeN1 (39973)
  1685. FreezeN1 (40014)
  1686. """
  1687. \   : (ep_str == "OP") ? """
  1688. FreezeN1 (  578)
  1689. FreezeN2 ( 1010)
  1690. FreezeN1 ( 1027)
  1691. FreezeN2 ( 1154)
  1692. FreezeN2 ( 1212)
  1693. FreezeN2 ( 1235)
  1694. FreezeN3 ( 1280)
  1695. FreezeN2 ( 1570)
  1696. FreezeN3 ( 1696)
  1697. FreezeN3 ( 1828)
  1698. """
  1699. \   : (ep_str == "ED") ? """
  1700. FreezeN2 (  638)
  1701. FreezeN2 (  674)
  1702. FreezeN1 (  707)
  1703. FreezeN1 (  722)
  1704. FreezeP1 (  762)
  1705. FreezeN2 (  763)
  1706. """
  1707. \   :                    "Throw ("+chr(34)+"Unexpected ep_str value."+chr(34)+")"
  1708.  
  1709.  
  1710. # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1711.  
  1712.  
  1713.  
  1714. ______________________________________________________________________________
  1715.  
  1716.     merge-seg.avsi
  1717. ______________________________________________________________________________
  1718.  
  1719.  
  1720.  
  1721.  
  1722. Function fslg_cat_seg (string ep_str, string pass_str, int seg_index_beg, int seg_index_end, string "path", int "threads", string "ext", int "fps_num", int "fps_den")
  1723. {
  1724.     ext  = Default (ext, ".mp4")
  1725.     path = Default (path, "")
  1726.     path = (path != "" && LeftStr (path, 1) != "\") ? path + "\" : path
  1727.  
  1728.     fs = "%02.0f"
  1729.     seg_str = String (seg_index_beg, fs)
  1730.     this_seg = FFVideoSource (path+"ep-"+ep_str+"-p"+pass_str+"-"+seg_str+ext, threads=threads)
  1731.     this_seg = this_seg.fslg_assume_fps_cond (fps_num, fps_den)
  1732.  
  1733.       (seg_index_beg + 1 < seg_index_end)
  1734. \   ? this_seg + fslg_cat_seg (ep_str, pass_str, seg_index_beg + 1, seg_index_end, path=path, ext=ext, fps_num=fps_num, fps_den=fps_den)
  1735. \   : this_seg
  1736.  
  1737.     return (last)
  1738. }
  1739.  
  1740. Function fslg_cat_seg_undet_end (string ep_str, string pass_str, int seg_index_beg, string "path", int "threads", string "ext", int "fps_num", int "fps_den")
  1741. {
  1742.     ext  = Default (ext, ".mp4")
  1743.     path = Default (path, "")
  1744.     path = (path != "" && LeftStr (path, 1) != "\") ? path + "\" : path
  1745.  
  1746.     fs = "%02.0f"
  1747.     seg_str = String (seg_index_beg, fs)
  1748.  
  1749.     c = fslg_load_seg_internal (path+"ep-"+ep_str+"-p"+pass_str+"-"+seg_str+ext)
  1750.     c = c.IsClip () ? c.fslg_assume_fps_cond (fps_num, fps_den) : c
  1751.     d = c.IsClip () ? fslg_cat_seg_undet_end (ep_str, pass_str, seg_index_beg + 1, path=path, ext=ext, fps_num=fps_num, fps_den=fps_den) : ""
  1752.     e = d.IsClip () ? c + d : c
  1753.  
  1754.     return (e)
  1755. }
  1756.  
  1757. Function fslg_load_seg (string ep_str, string pass_str, string seg_str, int seg_len, string "path", int "threads", string "ext", int "fps_num", int "fps_den")
  1758. {
  1759.     ext  = Default (ext, ".mp4")
  1760.     path = Default (path, "")
  1761.     path = (path != "" && LeftStr (path, 1) != "\") ? path + "\" : path
  1762.  
  1763.     seg_nbr = Int (Value (seg_str))
  1764.     seg_str_len = StrLen (seg_str)
  1765.     fs = "%0" + String (seg_str_len) + ".0f"
  1766.     seg_pre_str = String (seg_nbr - 1, fs)
  1767.     seg_nxt_str = String (seg_nbr + 1, fs)
  1768.  
  1769.     seg_main = FFVideoSource (path+"ep-"+ep_str+"-p"+pass_str+"-"+seg_str+ext, threads=threads)
  1770.     seg_main = seg_main.fslg_assume_fps_cond (fps_num, fps_den)
  1771.     seg = (seg_nbr > 0) ? FFVideoSource (path+"ep-"+ep_str+"-p"+pass_str+"-"+seg_pre_str+ext, threads=threads).fslg_assume_fps_cond (fps_num, fps_den) + seg_main : seg_main
  1772.     seg = (seg_nbr > 1) ? seg.BlankClip (length=seg_len*(seg_nbr-1), fps=fps_num, fps_denominator=fps_den) + seg : seg
  1773.     seg_next = fslg_load_seg_internal (path+"ep-"+ep_str+"-p"+pass_str+"-"+seg_nxt_str+ext)
  1774.     Assert ((! seg_next.IsClip () || seg_len == seg_main.FrameCount ()),
  1775. \           "fslg_load_seg: wrong number of frames.")
  1776.  
  1777.     seg_next.IsClip () ? seg + seg_next.fslg_assume_fps_cond (fps_num, fps_den) : seg
  1778. }
  1779.  
  1780. Function fslg_load_seg_internal (string filename, int "threads")
  1781. {
  1782.     Exist (filename) ? FFVideoSource (filename, threads=threads) : ""
  1783. }
  1784.  
  1785. Function fslg_assume_fps_cond (clip src, int "fps_num", int "fps_den")
  1786. {
  1787.     src
  1788.     (Defined (fps_num)) ? AssumeFPS (fps_num, fps_den) : last
  1789. }
  1790.  
  1791. Function fslg_load_whole_video (string ep_str, string pass_str, string "path", int "threads", string "ext", int "fps_num", int "fps_den")
  1792. {
  1793.     ext  = Default (ext, ".mp4")
  1794.     path = Default (path, "")
  1795.     path = (path != "" && LeftStr (path, 1) != "\") ? path + "\" : path
  1796.  
  1797.     filename = path + "ep-" + ep_str + "-p" + pass_str + ext
  1798.     Exist (filename)
  1799. \   ? FFVideoSource (filename, threads=threads).fslg_assume_fps_cond (fps_num, fps_den)
  1800. \   : fslg_cat_seg_undet_end (ep_str, pass_str, 0, path=path, threads=threads, ext=ext, fps_num=fps_num, fps_den=fps_den)
  1801. }
  1802.  
  1803.  
  1804.  
  1805. ______________________________________________________________________________
  1806.  
  1807.     fslg-denoise.avsi
  1808. ______________________________________________________________________________
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816. Function fslg_make_search_clip (clip o, int "sigma", int "lamt", int "spatsmooth", bool "edgesmooth", float "spatsigma", int "rad", int "blksize", int "overlap", int "sad", int "threads", int "pel", bool "lcurve")
  1817. {
  1818.     sigma      = Default (sigma,          32)
  1819.     lamt       = Default (lamt,            1)
  1820.     spatsmooth = Default (spatsmooth,      0)   # 1 or 2 for pretty grainy source.
  1821.     edgesmooth = Default (edgesmooth,   true)
  1822.     spatsigma  = Default (spatsigma,      16)
  1823.     rad        = Default (rad,             6)
  1824.     blksize    = Default (blksize,        16)
  1825.     overlap    = Default (overlap, blksize/2)
  1826.     sad        = Default (sad,           400)
  1827.     pel        = Default (pel,             4)
  1828.     lcurve     = Default (lcurve,       true)
  1829.  
  1830.     rmax = 7
  1831.     Assert ((rad <= rmax), "rad value is too high.")
  1832.  
  1833.     o
  1834.     w = Width ()
  1835.     h = Height ()
  1836.  
  1837.     low  = o.bicubicresize(w/(10*4)*4,h/(10*4)*4).bicubicresize(w*3/(10*4)*4,h*3/(10*4)*4,1,0).bicubicresize(w,h,1,0)
  1838.  
  1839.     ldif  = mt_makediff (o, low)
  1840.     ldif  = ldif.mt_lut ("x "+String(128-lamt)+" "+String(128+lamt)+" clip")
  1841.     mt_adddiff (o, ldif, y=3, u=2, v=2) # mt_lutxy(o,low,"x y < x 1 - x y > x 1 + x ? ?",U=2,V=2)
  1842.  
  1843.     (spatsmooth >= 1) ? Merge (RemoveGrain (11), last) : last
  1844.     (spatsmooth >= 2) ? Merge (RemoveGrain (11), last) : last
  1845.     (edgesmooth) ? mt_merge (
  1846. \       last,
  1847. \       RemoveGrain (11, -1).RemoveGrain (20, -1),
  1848. \       mt_edge (mode="prewitt", thY1=0, thY2=255).RemoveGrain (20, -1).mt_lut ("x 64 - 4 *").RemoveGrain (20, -1),
  1849. \       y=3, u=2, v=2
  1850. \   ) : last
  1851.     sss = String (spatsigma)
  1852.     ssxy = "0.0:0.0 0.15:0.0 0.25:" + sss + " 1.0:" + sss
  1853.     dfttest (sigma=spatsigma, tbsize=1, sbsize=16, sosize=12, threads=threads, ssx=ssxy, ssy=ssxy, quiet=true)
  1854.     x = last
  1855.  
  1856.     sup = MSuper (pel=pel)
  1857.  
  1858.     vec = sup.MAnalyse (multi=true, delta=rmax, blksize=blksize, overlap=overlap, search=5, searchparam=4, DCT=5, truemotion=false, global=true)
  1859.     bc1  = (rad >= 1) ? MCompensate (sup, vec.SelectEvery (rmax*2,  0), thSAD=sad) : last
  1860.     fc1  = (rad >= 1) ? MCompensate (sup, vec.SelectEvery (rmax*2,  1), thSAD=sad) : last
  1861.     bc2  = (rad >= 2) ? MCompensate (sup, vec.SelectEvery (rmax*2,  2), thSAD=sad) : last
  1862.     fc2  = (rad >= 2) ? MCompensate (sup, vec.SelectEvery (rmax*2,  3), thSAD=sad) : last
  1863.     bc3  = (rad >= 3) ? MCompensate (sup, vec.SelectEvery (rmax*2,  4), thSAD=sad) : last
  1864.     fc3  = (rad >= 3) ? MCompensate (sup, vec.SelectEvery (rmax*2,  5), thSAD=sad) : last
  1865.     bc4  = (rad >= 4) ? MCompensate (sup, vec.SelectEvery (rmax*2,  6), thSAD=sad) : last
  1866.     fc4  = (rad >= 4) ? MCompensate (sup, vec.SelectEvery (rmax*2,  7), thSAD=sad) : last
  1867.     bc5  = (rad >= 5) ? MCompensate (sup, vec.SelectEvery (rmax*2,  8), thSAD=sad) : last
  1868.     fc5  = (rad >= 5) ? MCompensate (sup, vec.SelectEvery (rmax*2,  9), thSAD=sad) : last
  1869.     bc6  = (rad >= 6) ? MCompensate (sup, vec.SelectEvery (rmax*2, 10), thSAD=sad) : last
  1870.     fc6  = (rad >= 6) ? MCompensate (sup, vec.SelectEvery (rmax*2, 11), thSAD=sad) : last
  1871.     bc7  = (rad >= 7) ? MCompensate (sup, vec.SelectEvery (rmax*2, 12), thSAD=sad) : last
  1872.     fc7  = (rad >= 7) ? MCompensate (sup, vec.SelectEvery (rmax*2, 13), thSAD=sad) : last
  1873.     Interleave (fc7, fc6, fc5, fc4, fc3, fc2, fc1, last, bc1, bc2, bc3, bc4, bc5, bc6, bc7)
  1874.     dfttest (sigma=sigma, tbsize=rad*2+1, sbsize=16, sosize=12, threads=threads, lsb=lcurve)
  1875.     SelectEvery (rmax*2+1, rmax)
  1876.  
  1877.     (lcurve) ? fslg_remap_luma_search_clip () : last
  1878.     (lcurve) ? DitherPost (mode=-1)           : last
  1879. }
  1880.  
  1881.  
  1882.  
  1883. # spa_more   = src8.Vinverse ().dfttest (sigma=32, tbsize=1, lsb=true, threads=threads)
  1884. # ssxy       = "0.00:64.0 0.25:256.0 0.35:256.0 0.40:4.0 1.00:0.0"
  1885. # spa_strong = src8.Vinverse ().dfttest (sigma=256, ssx=ssxy, ssy=ssxy, tbsize=1, sbsize=16, sosize=12, threads=threads, dither=1, quiet=true).Deblock_QED (40, 40).Dither_convert_8_to_16()
  1886. # No need to provide sclip if vec is provided
  1887. # No need to provide tclip if sup is provided
  1888. Function flsg_denoise (clip src8, clip "sclip", clip "tclip", clip "sup", clip "vec", int "rad", int "pel", int "blksize", int "overlap", int "sad", float "scoef", bool "csall", bool "csspat", float "ss1", float "ss2", float "ss3", bool "twice", int "threads", clip "spa_more", string "fltmore_str", string "fltmoremask_str", clip "spa_strong", string "fltstrong_str")
  1889. {
  1890.     rad     = Default (rad,        6)
  1891.     pel     = Default (pel,        4)
  1892.     sad     = Default (sad,       64)   # 80
  1893.     scoef   = Default (scoef,    1.0)   # 0.75
  1894.     csall   = Default (csall,  false)
  1895.     csspat  = Default (csspat,  true)
  1896.     ss1     = Default (ss1,      1.0)
  1897.     ss2     = Default (ss2,      4.0)
  1898.     ss3     = Default (ss3,     12.0)
  1899.     sclip   = Default (sclip,   src8)
  1900.     tclip   = Default (tclip,   src8)
  1901.     twice   = Default (twice,  false)
  1902.  
  1903.     Assert (! Defined (vec) || vec.FrameCount () == 2 * rad * sclip.FrameCount (),
  1904. \       "vec length and rad value are not consistent.")
  1905.  
  1906.     spamore_flag = (Defined (spa_more)   && Defined (fltmore_str  ) && fltmore_str   != "")
  1907.     spastrg_flag = (Defined (spa_strong) && Defined (fltstrong_str) && fltstrong_str != "")
  1908.     spamix_str = (Defined (fltmore_str  ) ?        fltmore_str    : "")
  1909. \              + (Defined (fltstrong_str) ? (" " + fltstrong_str) : "")
  1910.     moremask_flag = (Defined (spa_more) && Defined (fltmoremask_str) &&  fltmoremask_str != "")
  1911.  
  1912.     src8
  1913.  
  1914.     vec   = (Defined (vec)) ? vec : sclip.fslg_gen_vect (pel, rad, blksize=blksize, overlap=overlap)
  1915.     sup   = (Defined (sup)) ? sup : tclip.MSuper (pel=pel, levels=1)
  1916.     deg16 = last.fslg_filter_mdegrain (sup, vec, rad, sad)
  1917.     deg8a = (twice) ? deg16.DitherPost (mode=6)                        : deg16.DitherPost (mode=-1)
  1918.     sup2  = (twice) ? deg8a.MSuper (pel=pel, levels=1)                 : NOP ()
  1919.     deg16 = (twice) ? deg8a.fslg_filter_mdegrain (sup2, vec, rad, sad) : deg16
  1920.  
  1921.     vb1  = vec.SelectEvery (rad*2, 0)
  1922.     vf1  = vec.SelectEvery (rad*2, 1)
  1923.     vmb1 = MMask (vb1, kind=1, ml=100.0*sad*scoef/400.0, gamma=3.0, Ysc=255)
  1924.     vmf1 = MMask (vf1, kind=1, ml=100.0*sad*scoef/400.0, gamma=3.0, Ysc=255)
  1925.     vmmi = mt_logic (vmb1, vmf1,  mode="min")
  1926.     vmma = mt_logic (vmb1, vmf1,  mode="max")
  1927.  
  1928.     edgemask = (moremask_flag) ? deg8a.mt_edge (mode="min/max", thY1=0, thY2=255) : NOP ()
  1929.     edgemask = (moremask_flag) ? edgemask.mt_lut ("x 16 - 32 *")                  : NOP ()
  1930.     edgemask = (moremask_flag) ? mt_expand_multi (sw=8, sh=8, mode="ellipse")     : NOP ()
  1931.     edgemask = (moremask_flag) ? edgemask.RemoveGrain (20, -1)                    : NOP ()
  1932.  
  1933.     spa_normal = flsg_select_filter_with_luma (deg16, src8, ss1, ss2, ss3, threads=threads)
  1934.  
  1935.     spa_masked = (moremask_flag) ? Dither_merge16_8 (spa_normal, spa_more, edgemask, luma=true)            : NOP ()
  1936.     spa_more   = (moremask_flag) ? spa_more.ReplaceFramesSimple_oor (spa_masked, mappings=fltmoremask_str) : NOP ()
  1937.  
  1938.     spa = spa_normal
  1939.     spa = (spamore_flag) ? spa.ReplaceFramesSimple_oor (spa_more,   mappings=fltmore_str)   : spa
  1940.     spa = (spastrg_flag) ? spa.ReplaceFramesSimple_oor (spa_strong, mappings=fltstrong_str) : spa
  1941.  
  1942.     # Contrasharpening (spatial only)
  1943.     spa8   = (csspat && ! csall) ? spa.DitherPost (mode=-1)                          : NOP ()
  1944.     csdif8 = (csspat && ! csall) ? spa8.ContraSharpen_dif (src8, dif=true)           : NOP ()
  1945.     csdif  = (csspat && ! csall) ? csdif8.Dither_convert_8_to_16 ()                  : NOP ()
  1946.     spa    = (csspat && ! csall) ? spa.Dither_add16 (csdif, y=3, u=2, v=2, dif=true) : spa
  1947.  
  1948.     vm = vmmi.ReplaceFramesSimple_oor (vmma, mappings=spamix_str)
  1949.     Dither_merge16_8 (deg16, spa, vm, luma=true)
  1950.  
  1951.     # Contrasharpening (all)
  1952.     deg8   = (csall) ? DitherPost (mode=-1)                    : NOP ()
  1953.     csdif8 = (csall) ? deg8.ContraSharpen_dif (src8, dif=true) : NOP ()
  1954.     csdif  = (csall) ? csdif8.Dither_convert_8_to_16 ()        : NOP ()
  1955.     (csall) ? Dither_add16 (csdif, y=3, u=2, v=2, dif=true)    : last
  1956. }
  1957.  
  1958. Function fslg_gen_vect (clip sclip, int pel, int rad, int "blksize", int "overlap")
  1959. {
  1960.     blksize = Default (blksize,         8)
  1961.     overlap = Default (overlap, blksize/2)
  1962.  
  1963.     sup_a = sclip.MSuper (pel=pel)
  1964.     sup_a.MAnalyse (multi=true, delta=rad, blksize=blksize, overlap=overlap)
  1965. }
  1966.  
  1967. Function fslg_filter_mdegrain (clip o, clip sup, clip vec, int rad, int sad)
  1968. {
  1969.     o.MDegrainN (sup, vec, rad, thSAD=sad, thSAD2=sad/2, lsb=true)
  1970. }
  1971.  
  1972. Function fslg_filter_dfttest (clip o, clip sup, clip vec, int rad, int sad, int rmax, float sigma)
  1973. {
  1974.     o
  1975.     bc1  = (rad >= 1) ? MCompensate (sup, vec.SelectEvery (rmax*2,  0), thSAD=sad) : last
  1976.     fc1  = (rad >= 1) ? MCompensate (sup, vec.SelectEvery (rmax*2,  1), thSAD=sad) : last
  1977.     bc2  = (rad >= 2) ? MCompensate (sup, vec.SelectEvery (rmax*2,  2), thSAD=sad) : last
  1978.     fc2  = (rad >= 2) ? MCompensate (sup, vec.SelectEvery (rmax*2,  3), thSAD=sad) : last
  1979.     bc3  = (rad >= 3) ? MCompensate (sup, vec.SelectEvery (rmax*2,  4), thSAD=sad) : last
  1980.     fc3  = (rad >= 3) ? MCompensate (sup, vec.SelectEvery (rmax*2,  5), thSAD=sad) : last
  1981.     bc4  = (rad >= 4) ? MCompensate (sup, vec.SelectEvery (rmax*2,  6), thSAD=sad) : last
  1982.     fc4  = (rad >= 4) ? MCompensate (sup, vec.SelectEvery (rmax*2,  7), thSAD=sad) : last
  1983.     bc5  = (rad >= 5) ? MCompensate (sup, vec.SelectEvery (rmax*2,  8), thSAD=sad) : last
  1984.     fc5  = (rad >= 5) ? MCompensate (sup, vec.SelectEvery (rmax*2,  9), thSAD=sad) : last
  1985.     bc6  = (rad >= 6) ? MCompensate (sup, vec.SelectEvery (rmax*2, 10), thSAD=sad) : last
  1986.     fc6  = (rad >= 6) ? MCompensate (sup, vec.SelectEvery (rmax*2, 11), thSAD=sad) : last
  1987.     bc7  = (rad >= 7) ? MCompensate (sup, vec.SelectEvery (rmax*2, 12), thSAD=sad) : last
  1988.     fc7  = (rad >= 7) ? MCompensate (sup, vec.SelectEvery (rmax*2, 13), thSAD=sad) : last
  1989.     Interleave (fc7, fc6, fc5, fc4, fc3, fc2, fc1, last, bc1, bc2, bc3, bc4, bc5, bc6, bc7)
  1990.     dfttest (sigma=sigma, tbsize=rad*2+1, sbsize=16, sosize=12, threads=threads)
  1991.     SelectEvery (rmax*2+1, rmax)
  1992. }
  1993.  
  1994. Function ContraSharpen_dif (clip NR2, clip o, bool "dif")
  1995. {
  1996.     dif = Default (dif, false)
  1997.     s      = NR2.ContraSharpen_MinBlur(1,1)      # Damp down remaining spots of the denoised clip.
  1998.     allD   = mt_makediff(o,NR2)                  # The difference achieved by the denoising.
  1999.     ssD    = mt_makediff(s,s.removegrain(11,-1)) # The difference of a simple kernel blur.
  2000.     ssDD   = ssD.repair(allD,1)                  # Limit the difference to the max of what the denoising removed locally.
  2001.     ssDD   = ssDD.mt_lutxy(ssD,"x 128 - abs y 128 - abs < x y ?") # abs(diff) after limiting may not be bigger than before.
  2002.  
  2003.     (dif) ? ssDD : NR2.mt_adddiff(ssDD,U=2,V=2) # Apply the limited difference. (Sharpening is just inverse blurring.)
  2004. }
  2005.  
  2006. # The 16-bit clip is filtered, the 8-bit clip is only passed for mask calculation
  2007. Function flsg_select_filter_with_luma (clip src16, clip src8, float ss1, float ss2, float ss3, int "threads")
  2008. {
  2009.     flt_flag = (ss1 > 0 && ss2 > 0 && ss3 > 0)
  2010.  
  2011.     src8
  2012.     w = Width ()
  2013.     h = Height ()
  2014.     r = 6
  2015.     (flt_flag) ? BicubicResize (w / r / 4 * 4, h / r / 4 * 4) : NOP ()
  2016.     (flt_flag) ? BicubicResize (w, h, 1, 0)                   : NOP ()
  2017.  
  2018.     lvl1 = String (24)
  2019.     lvl2 = String (60)
  2020.     lvl3 = String (96)
  2021.     mask2 = (ss2 != ss1) ? mt_lut ("255 x "+lvl1+" - "+lvl2+" "+lvl1+" - * /") : NOP ()
  2022.     mask3 = (ss3 != ss2) ? mt_lut ("255 x "+lvl2+" - "+lvl3+" "+lvl2+" - * /") : NOP ()
  2023.  
  2024.     src16
  2025.     f1 = (ss1 > 0) ? dfttest (sigma=ss1, tbsize=1, lsb=true, lsb_in=true, threads=threads) : src16
  2026.     f2 = (ss2 > 0) ? dfttest (sigma=ss2, tbsize=1, lsb=true, lsb_in=true, threads=threads) : src16
  2027.     f3 = (ss3 > 0) ? dfttest (sigma=ss3, tbsize=1, lsb=true, lsb_in=true, threads=threads) : src16
  2028.     (ss2 != ss1) ? Dither_merge16_8 (f1,   f2, mask2, luma=true) : f1
  2029.     (ss3 != ss2) ? Dither_merge16_8 (last, f3, mask3, luma=true) : last
  2030. }
  2031.  
  2032.  
  2033.  
  2034. # 16-bit TV-range -> full range with extra curvature
  2035. # s0 = new slope at 0
  2036. # c  = length of the curved part, > 0, no specific unit
  2037. #
  2038. # Matlab code:
  2039. # c  = 1/16;
  2040. # s0 = 2;
  2041. # x = linspace (0, 1, 10001);
  2042. # y1 = (x * 219 + 16) / 256; % Scale [0 ; 1]
  2043. # t = ((y1*256 - 16) / 219);
  2044. # k = (s0-1)*c;
  2045. # y2 = ((1+c) - (1+c)*c ./ (t + c)) * k + t * (1 - k);
  2046. # plot (x, y1, x, y2); grid on;
  2047. Function fslg_remap_luma_search_clip (clip src, float "s0", float "c")
  2048. {
  2049.     s0 = Default (s0, 2.0)
  2050.     c  = Default (c,  1.0/16)
  2051.  
  2052.     k = (s0 - 1) * c
  2053.     t = "x 4096 - 56064 / 0 1 clip"
  2054.     e = String(k)+" "+String(1+c)+" "+String((1+c)*c)+" "+t+" "+String(c)+" + / - * "+t+" 1 "+String(k)+" - * + 65536 *"
  2055.  
  2056.     src.Dither_lut16 (
  2057. \       yexpr=e,
  2058. \       expr="x 32768 - 32768 * 28672 / 32768 +",
  2059. \       y=3, u=3, v=3
  2060. \   )
  2061. }
  2062.  
  2063.  
  2064.  
  2065.  
  2066. ______________________________________________________________________________
  2067.  
  2068.     ep-01-tfm-override.txt
  2069. ______________________________________________________________________________
  2070.  
  2071.  
  2072.  
  2073.  
  2074. 1362,1406 i 100
  2075. 13842,14111 --+++--+++
  2076. 36344,36583 i 150
  2077. 36584,37311 i 120
  2078. 36764,36765 +
  2079. 36766,37311 pcpcpbcbcb
  2080. 36766,37311 --+----+--
  2081. #50356,50617 ---+----+-
  2082. 50356,50617 -
  2083. 50360,50617 ucpcpncbcb
  2084. 50619,50915 ----+----+
  2085. 50620,50915 cbcbucpcpn
  2086. 53707,53885 +
  2087. 53887,54216 i 150
  2088. 56692,57369 i 150
  2089. 69400,69799 i 120
  2090. 86271,86540 +
  2091. 94380,95100 pncbcbccpc
  2092. 94380,95100 -
  2093. 98930,98943 i 256
  2094. 98944,98989 i 120
  2095. 99210,99709 i 120
  2096. 99790,100039 i 120
  2097. 100040,100109 i 256
  2098. 100110,100169 i 120
  2099. 100840,101049 i 120
  2100. #101167 -
  2101. #101189 -
  2102. 101940,102729 i 150
  2103. 102259,102320 -
  2104.  
  2105.  
  2106.  
  2107.  
  2108. ______________________________________________________________________________
  2109.  
  2110.     FineDehalo.avsi
  2111. ______________________________________________________________________________
  2112.  
  2113.  
  2114.  
  2115.  
  2116. # This program is free software. It comes without any warranty, to
  2117. # the extent permitted by applicable law. You can redistribute it
  2118. # and/or modify it under the terms of the Do What The Fuck You Want
  2119. # To Public License, Version 2, as published by Sam Hocevar. See
  2120. # http://sam.zoy.org/wtfpl/COPYING for more details.
  2121.  
  2122. Function FineDehalo (clip src, float "rx", float "ry", int "thmi", int "thma", int "thlimi", int "thlima", float "darkstr", float "brightstr", int "showmask", float "contra", bool "excl", float "edgeproc")
  2123. {
  2124.     rx        = Default (rx,          2)
  2125.     ry        = Default (ry,         rx)
  2126.     thmi      = Default (thmi,       80)
  2127.     thma      = Default (thma,      128)
  2128.     thlimi    = Default (thlimi,     50)
  2129.     thlima    = Default (thlima,    100)
  2130.     darkstr   = Default (darkstr,   1.0)
  2131.     brightstr = Default (brightstr, 1.0)
  2132.     showmask  = Default (showmask,    0)
  2133.     contra    = Default (contra,    0.0)
  2134.     excl      = Default (excl,     true)
  2135.     edgeproc  = Default (edgeproc,  0.0)
  2136.  
  2137.     rx_i = Round (rx)
  2138.     ry_i = Round (ry)
  2139.  
  2140.     src
  2141.  
  2142.  
  2143.     ### Dehaloing ###
  2144.  
  2145.     dehaloed = DeHalo_alpha (rx=rx, ry=ry, darkstr=darkstr, brightstr=brightstr)
  2146.  
  2147.     # Contrasharpening
  2148.     dehaloed =   (contra > 0)
  2149. \              ? dehaloed.FineDehalo_contrasharp (src, contra)
  2150. \              : dehaloed
  2151.  
  2152.  
  2153.     ### Main edges ###
  2154.  
  2155.     # Basic edge detection, thresholding will be applied later.
  2156.     edges = mt_edge (mode="prewitt", thY1=0, thY2=255)
  2157.  
  2158.     # Keeps only the sharpest edges (line edges)
  2159.     strong = edges.mt_lut (expr="x "+String(thmi)+" - "+String(thma-thmi)+" / 255 *")
  2160.  
  2161.     # Extends them to include the potential halos
  2162.     large = strong.mt_expand_multi (sw=rx_i, sh=ry_i)
  2163.  
  2164.  
  2165.     ### Exclusion zones ###
  2166.  
  2167.     # When two edges are close from each other (both edges of a single
  2168.     # line or multiple parallel color bands), the halo removal
  2169.     # oversmoothes them or makes seriously bleed the bands, producing
  2170.     # annoying artifacts. Therefore we have to produce a mask to exclude
  2171.     # these zones from the halo removal.
  2172.  
  2173.     # Includes more edges than previously, but ignores simple details
  2174.     light = edges.mt_lut (expr="x "+String(thlimi)+" - "+String(thlima-thlimi)+" / 255 *")
  2175.  
  2176.     # To build the exclusion zone, we make grow the edge mask, then shrink
  2177.     # it to its original shape. During the growing stage, close adjacent
  2178.     # edge masks will join and merge, forming a solid area, which will
  2179.     # remain solid even after the shrinking stage.
  2180.  
  2181.     # Mask growing
  2182.     shrink = light.mt_expand_multi (sw=rx_i, sh=ry_i, mode="ellipse")
  2183.  
  2184.     # At this point, because the mask was made of a shades of grey, we may
  2185.     # end up with large areas of dark grey after shrinking. To avoid this,
  2186.     # we amplify and saturate the mask here (actually we could even
  2187.     # binarize it).
  2188.     shrink = shrink.mt_lut ("x 4 *")
  2189.  
  2190.     # Mask shrinking
  2191.     shrink = shrink.mt_inpand_multi (sw=rx_i, sh=ry_i, mode="ellipse")
  2192.  
  2193.     # This mask is almost binary, which will produce distinct
  2194.     # discontinuities once applied. Then we have to smooth it.
  2195.     shrink = shrink.RemoveGrain (20, -1)
  2196.     shrink = shrink.RemoveGrain (20, -1)
  2197.  
  2198.  
  2199.     ### Final mask building ###
  2200.  
  2201.     # Previous mask may be a bit weak on the pure edge side, so we ensure
  2202.     # that the main edges are really excluded. We do not want them to be
  2203.     # smoothed by the halo removal.
  2204.     shr_med = (excl) ? mt_logic (strong, shrink, mode="max") : strong
  2205.  
  2206.     # Substracts masks and amplifies the difference to be sure we get 255
  2207.     # on the areas to be processed.
  2208.     outside = mt_lutxy (large, shr_med, "x y - 2 *")
  2209.  
  2210.     # If edge processing is required, adds the edgemask
  2211.     ep_str  = "x y "+String(edgeproc * 0.66)+" * +"
  2212.     outside = (edgeproc > 0) ? mt_lutxy (outside, strong, ep_str) : outside
  2213.  
  2214.     # Smooth again and amplify to grow the mask a bit, otherwise the halo
  2215.     # parts sticking to the edges could be missed.
  2216.     outside = outside.RemoveGrain (20, -1).mt_lut ("x 2 *")
  2217.  
  2218.     ### Masking ###
  2219.  
  2220.     mt_merge (last, dehaloed, outside, y=3, u=2, v=2)
  2221.  
  2222.       (showmask == 1) ? outside.GreyScale ()
  2223. \   : (showmask == 2) ? shrink.GreyScale ()
  2224. \   : (showmask == 3) ? edges.GreyScale ()
  2225. \   : (showmask == 4) ? strong.GreyScale ()
  2226. \   :                   last
  2227. }
  2228.  
  2229. # level == 1.0 : normal contrasharp
  2230. Function FineDehalo_contrasharp (clip dehaloed, clip src, float level)
  2231. {
  2232.     bb  = dehaloed.RemoveGrain (11, -1)
  2233.     bb2 = bb.Repair (bb.Repair (bb.Medianblur (2, -256, -256), 1), 1)
  2234.     xd  = mt_makediff (bb, bb2)
  2235.     xd  = xd.mt_lut ("x 128 - 2.49 * "+String(level)+" * 128 +")
  2236.     xdd = mt_lutxy (
  2237. \       xd,
  2238. \       mt_makediff (src, dehaloed),
  2239. \       "x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?"
  2240. \   )
  2241.  
  2242.     dehaloed.mt_adddiff (xdd, y=3, u=2, v=2)
  2243. }
  2244.  
  2245.  
  2246.  
  2247.  
  2248. # Try to remove 2nd order halos.
  2249. Function FineDehalo2 (clip src, string "hconv", string "vconv", int "showmask")
  2250. {
  2251.     hconv    = Default (hconv, "-1 -2 0 0 40 0 0 -2 -1")
  2252.     vconv    = Default (vconv, "-2 -1 0 0 40 0 0 -1 -2")
  2253.     showmask = Default (showmask, 0)
  2254.  
  2255.     src
  2256.     fix_h = mt_convolution (horizontal="1", vertical=vconv, y=3, u=2, v=2)
  2257.     fix_v = mt_convolution (horizontal=hconv, vertical="1", y=3, u=2, v=2)
  2258.     edges_h = mt_edge (mode="1 2 1 0 0 0 -1 -2 -1", thY1=0, thY2=255)
  2259.     edges_v = mt_edge (mode="1 0 -1 2 0 -2 1 0 -1", thY1=0, thY2=255)
  2260.     mask_h = edges_h    #.mt_lut (expr="x 2 *")
  2261.     mask_v = edges_v    #.mt_lut (expr="x 2 *")
  2262.     temp_h = mt_lutxy (mask_h, mask_v, expr="x 3 * y -")
  2263.     temp_v = mt_lutxy (mask_v, mask_h, expr="x 3 * y -")
  2264.     mask_h = temp_h
  2265.     mask_v = temp_v
  2266.  
  2267.     mask_h = mask_h.FineDehalo2_grow_mask ("vertical")
  2268.     mask_v = mask_v.FineDehalo2_grow_mask ("horizontal")
  2269.  
  2270.     src
  2271.     mt_merge (last, fix_h, mask_h, y=3, u=2, v=2)
  2272.     mt_merge (last, fix_v, mask_v, y=3, u=2, v=2)
  2273.  
  2274.       (showmask == 1) ? mt_logic (mask_h, mask_v, mode="max").GreyScale ()
  2275. \   :                   last
  2276. }
  2277.  
  2278. Function FineDehalo2_grow_mask (clip mask, string mode)
  2279. {
  2280.     Assert ((mode == "horizontal" || mode == "vertical"), "Wrong mode")
  2281.  
  2282.     mask
  2283.     mt_expand (mode=mode).mt_inpand (mode=mode)
  2284.     mask_1 = mt_expand (mode=mode)
  2285.     mask_2 = mask_1.mt_expand (mode=mode).mt_expand (mode=mode)
  2286.     mt_lutxy (mask_2, mask_1, expr="x y -")
  2287.     RemoveGrain (12, -1).mt_lut (expr="x 1.8 *")
  2288. }
  2289.  
  2290.  
  2291.  
  2292. ______________________________________________________________________________
  2293.  
  2294.     santiag.avsi
  2295. ______________________________________________________________________________
  2296.  
  2297.  
  2298.  
  2299.  
  2300. # Antialiasing
  2301.  
  2302. # This program is free software. It comes without any warranty, to
  2303. # the extent permitted by applicable law. You can redistribute it
  2304. # and/or modify it under the terms of the Do What The Fuck You Want
  2305. # To Public License, Version 2, as published by Sam Hocevar. See
  2306. # http://sam.zoy.org/wtfpl/COPYING for more details.
  2307.  
  2308. # type = "nnedi3", "eedi2", "eedi3" or "sangnom"
  2309. Function santiag (clip c, int "strh", int "strv", string "type", int "nns", int "aa", int "threads", int "nsize", int "vcheck")
  2310. {
  2311.     strh    = Default (strh,        1)
  2312.     strv    = Default (strv,        1)
  2313.     type    = Default (type, "nnedi3")
  2314.  
  2315.     c
  2316.     (strh >= 0) ?             santiag_dir (strh, type, nns=nns, aa=aa, threads=threads, nsize=nsize, vcheck=vcheck)              : last
  2317.     (strv >= 0) ? TurnLeft ().santiag_dir (strv, type, nns=nns, aa=aa, threads=threads, nsize=nsize, vcheck=vcheck).TurnRight () : last
  2318. }
  2319.  
  2320. Function santiag_dir (clip c, int strength, string type, int "nns", int "aa", int "threads", int "nsize", int "vcheck")
  2321. {
  2322.     c
  2323.     w = Width ()
  2324.     h = Height ()
  2325.     santiag_stronger (strength, type, nns=nns, aa=aa, threads=threads, nsize=nsize, vcheck=vcheck)
  2326.     Spline36Resize (w, h, 0, 0.5, w, h * 2)
  2327. }
  2328.  
  2329. Function santiag_stronger (clip c, int strength, string type, int "nns", int "aa", int "threads", int "nsize", int "vcheck")
  2330. {
  2331.     strength = (strength < 0) ? 0 : strength
  2332.     field = strength % 2
  2333.     dh = (strength <= 0)
  2334.  
  2335.     (! dh) ? c.santiag_stronger (strength - 1, type) : c
  2336.  
  2337.       (type == "nnedi3" ) ? santiag_nnedi3  (dh, field, nns=nns, threads=threads, nsize=nsize)
  2338. \   : (type == "eedi2"  ) ? santiag_eedi2   (dh, field)
  2339. \   : (type == "eedi3"  ) ? santiag_eedi3   (dh, field, nns=nns, threads=threads, nsize=nsize, vcheck=vcheck)
  2340. \   : (type == "sangnom") ? santiag_sangnom (dh, field, aa=aa)
  2341. \   : Assert (false, "Santiag: unexpected value for type.")
  2342. }
  2343.  
  2344. Function santiag_nnedi3 (clip c, bool dh, int field, int "nns", int "threads", int "nsize")
  2345. {
  2346.     c.nnedi3 (dh=dh, field=field, nns=nns, threads=threads, nsize=nsize)
  2347. }
  2348.  
  2349. Function santiag_eedi2 (clip c, bool dh, int field)
  2350. {
  2351.     c
  2352.     w = Width ()
  2353.     h = Height ()
  2354.     (dh) ? last : PointResize (w, h / 2, 0, 1-field, w, h)
  2355.     eedi2 (field=field)
  2356. }
  2357.  
  2358. Function santiag_eedi3 (clip c, bool dh, int field, int "nns", int "threads", int "nsize", int "vcheck")
  2359. {
  2360.     sclip = c.santiag_nnedi3 (dh, field, nns=nns, threads=threads, nsize=nsize)
  2361.     c.eedi3 (dh=dh, field=field, threads=threads, vcheck=vcheck, sclip=sclip)
  2362. }
  2363.  
  2364. Function santiag_sangnom (clip c, bool dh, int field, int "aa")
  2365. {
  2366.     c
  2367.     w = Width ()
  2368.     h = Height ()
  2369.     (dh) ? Spline36Resize (w, h * 2, 0, -0.25, w, h) : last
  2370.     SangNom (order=field, aa=aa)
  2371. }
  2372.  
  2373.  
  2374.  
  2375. ______________________________________________________________________________
  2376.  
  2377.     ep-01-despot-mask.ass
  2378. ______________________________________________________________________________
  2379.  
  2380.  
  2381.  
  2382.  
  2383. [Script Info]
  2384. ; Script generated by Aegisub 2.1.8
  2385. ; http://www.aegisub.org/
  2386. Title: DeSpot automatically generated file
  2387. ScriptType: v4.00+
  2388. WrapStyle: 0
  2389. PlayResX: 704
  2390. PlayResY: 480
  2391. ScaledBorderAndShadow: yes
  2392. Video Aspect Ratio: 0
  2393. Video Zoom: 12
  2394. Video Position: 701
  2395. Video File: ep-01-workraw.avi
  2396.  
  2397. [V4+ Styles]
  2398. Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
  2399. Style: Mask,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,0,0,7,0,0,0,1
  2400. Style: Outline,Arial,20,&HFFFFFFFF,&H000000FF,&H00FF00FF,&H00000000,0,0,0,0,100,100,0,0,1,1,0,7,0,0,0,1
  2401.  
  2402. [Events]
  2403. Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
  2404. Dialogue: 0,0:00:08.90,0:00:08.95,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 75 293 l 82 293 82 299 75 299{\p0}
  2405. Dialogue: 0,0:00:09.94,0:00:09.98,Mask,,0000,0000,0000,,{\p1\pos(462,444)}m -4 -8 l 4 -8 4 8 -4 8{\p0}
  2406. Dialogue: 0,0:00:10.03,0:00:10.11,Mask,,0000,0000,0000,,{\p1\pos(534,56)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2407. Dialogue: 0,0:00:10.78,0:00:10.82,Mask,,0000,0000,0000,,{\p1\pos(404,248)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2408. Dialogue: 0,0:00:11.40,0:00:11.44,Mask,,0000,0000,0000,,{\p1\pos(532,392)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2409. Dialogue: 0,0:00:13.37,0:00:13.41,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 664 464 l 671 464 671 472 664 472{\p0}
  2410. Dialogue: 0,0:00:13.53,0:00:13.58,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 86 266 l 95 266 95 272 86 272{\p0}
  2411. Dialogue: 0,0:00:14.20,0:00:14.24,Mask,,0000,0000,0000,,{\p1\pos(532,458)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2412. Dialogue: 0,0:00:14.32,0:00:14.36,Mask,,0000,0000,0000,,{\p1\pos(552,468)}m -8 -4 l 8 -4 8 4 -8 4{\p0}
  2413. Dialogue: 0,0:00:14.49,0:00:14.54,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 664 282 l 671 282 671 288 664 288{\p0}
  2414. Dialogue: 0,0:00:14.78,0:00:14.82,Mask,,0000,0000,0000,,{\p1\pos(636,396)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2415. Dialogue: 0,0:00:15.57,0:00:15.61,Mask,,0000,0000,0000,,{\p1\pos(472,160)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2416. Dialogue: 0,0:00:15.61,0:00:15.66,Mask,,0000,0000,0000,,{\p1\pos(230,56)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2417. Dialogue: 0,0:00:15.62,0:00:15.66,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 527 185 l 534 185 534 191 527 191{\p0}
  2418. Dialogue: 0,0:00:16.33,0:00:16.37,Mask,,0000,0000,0000,,{\p1\pos(530,52)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2419. Dialogue: 0,0:00:16.33,0:00:16.37,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 622 197 l 628 197 628 203 622 203{\p0}
  2420. Dialogue: 0,0:00:16.95,0:00:17.00,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 511 196 l 517 196 517 202 511 202{\p0}
  2421. Dialogue: 0,0:00:17.04,0:00:17.08,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 538 232 l 543 232 543 238 538 238{\p0}
  2422. Dialogue: 0,0:00:17.04,0:00:17.08,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 360 247 l 374 247 374 255 360 255{\p0}
  2423. Dialogue: 0,0:00:17.71,0:00:17.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 525 385 l 532 385 532 391 525 391{\p0}
  2424. Dialogue: 0,0:00:18.87,0:00:18.91,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 564 177 l 571 177 571 183 564 183{\p0}
  2425. Dialogue: 0,0:00:19.12,0:00:19.16,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 525 114 l 532 114 532 120 525 120{\p0}
  2426. Dialogue: 0,0:00:20.25,0:00:20.29,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 495 36 l 503 36 503 40 495 40{\p0}
  2427. Dialogue: 0,0:00:20.88,0:00:20.92,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 362 410 l 369 410 369 417 362 417{\p0}
  2428. Dialogue: 0,0:00:21.21,0:00:21.25,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 529 316 l 534 316 534 321 529 321{\p0}
  2429. Dialogue: 0,0:00:21.29,0:00:21.33,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 698 126 l 703 126 703 133 698 133{\p0}
  2430. Dialogue: 0,0:00:21.38,0:00:21.42,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 296 327 l 303 327 303 333 296 333{\p0}
  2431. Dialogue: 0,0:00:21.75,0:00:21.79,Mask,,0000,0000,0000,,{\p1\pos(526,64)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2432. Dialogue: 0,0:00:21.87,0:00:21.95,Mask,,0000,0000,0000,,{\p1\pos(10,214)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2433. Dialogue: 0,0:00:21.91,0:00:21.95,Mask,,0000,0000,0000,,{\p1\pos(532,184)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2434. Dialogue: 0,0:00:22.21,0:00:22.25,Mask,,0000,0000,0000,,{\p1\pos(162,38)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2435. Dialogue: 0,0:00:22.21,0:00:22.25,Mask,,0000,0000,0000,,{\p1\pos(654,92)}m -12 -4 l 12 -4 12 4 -12 4{\p0}
  2436. Dialogue: 0,0:00:22.21,0:00:22.25,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 627 159 l 654 159 654 168 627 168{\p0}
  2437. Dialogue: 0,0:00:22.33,0:00:22.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 145 8 l 152 8 152 21 145 21{\p0}
  2438. Dialogue: 0,0:00:22.33,0:00:22.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 140 14 l 148 14 148 19 140 19{\p0}
  2439. Dialogue: 0,0:00:22.42,0:00:22.46,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 677 9 l 683 9 683 18 677 18{\p0}
  2440. Dialogue: 0,0:00:22.62,0:00:22.67,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 527 47 l 535 47 535 53 527 53{\p0}
  2441. Dialogue: 0,0:00:22.62,0:00:22.66,Mask,,0000,0000,0000,,{\p1\pos(676,160)}m -6 -4 l 6 -4 6 4 -6 4{\p0}
  2442. Dialogue: 0,0:00:23.59,0:00:23.63,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 390 437 l 396 437 396 443 390 443{\p0}
  2443. Dialogue: 0,0:00:23.71,0:00:23.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 673 345 l 679 345 679 351 673 351{\p0}
  2444. Dialogue: 0,0:00:24.71,0:00:24.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 529 247 l 537 247 537 253 529 253{\p0}
  2445. Dialogue: 0,0:00:25.71,0:00:25.75,Mask,,0000,0000,0000,,{\p1\pos(682,152)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2446. Dialogue: 0,0:00:25.92,0:00:25.96,Mask,,0000,0000,0000,,{\p1\pos(570,436)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2447. Dialogue: 0,0:00:26.29,0:00:26.46,Mask,,0000,0000,0000,,{\p1\pos(590,390)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2448. Dialogue: 0,0:00:26.42,0:00:26.46,Mask,,0000,0000,0000,,{\p1\pos(564,446)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2449. Dialogue: 0,0:00:26.46,0:00:26.54,Mask,,0000,0000,0000,,{\p1\pos(596,380)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2450. Dialogue: 0,0:00:26.54,0:00:26.58,Mask,,0000,0000,0000,,{\p1\pos(682,396)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2451. Dialogue: 0,0:00:29.21,0:00:29.25,Mask,,0000,0000,0000,,{\p1\pos(252,58)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2452. Dialogue: 0,0:00:26.79,0:00:26.88,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 592 368 l 600 368 600 376 592 376{\p0}
  2453. Dialogue: 0,0:00:26.79,0:00:26.83,Mask,,0000,0000,0000,,{\p1\pos(28,244)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2454. Dialogue: 0,0:00:26.80,0:00:26.84,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 531 448 l 538 448 538 454 531 454{\p0}
  2455. Dialogue: 0,0:00:28.22,0:00:28.26,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 531 179 l 539 179 539 184 531 184{\p0}
  2456. Dialogue: 0,0:00:28.22,0:00:28.26,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 112 234 l 122 234 122 244 112 244{\p0}
  2457. Dialogue: 0,0:00:30.30,0:00:30.34,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 531 380 l 538 380 538 386 531 386{\p0}
  2458. Dialogue: 0,0:00:30.96,0:00:31.01,Mask,,0000,0000,0000,,{\p1\pos(250,190)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2459. Dialogue: 0,0:00:31.01,0:00:31.05,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 531 245 l 538 245 538 250 531 250{\p0}
  2460. Dialogue: 0,0:00:33.63,0:00:33.67,Mask,,0000,0000,0000,,{\p1\pos(672,258)}m -4 -8 l 4 -8 4 8 -4 8{\p0}
  2461. Dialogue: 0,0:00:37.64,0:00:37.72,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 404 440 l 414 440 414 450 404 450{\p0}
  2462. Dialogue: 0,0:00:38.01,0:00:38.05,Mask,,0000,0000,0000,,{\p1\pos(534,110)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2463. Dialogue: 0,0:00:39.47,0:00:39.51,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 630 48 l 638 48 638 56 630 56{\p0}
  2464. Dialogue: 0,0:00:41.52,0:00:41.56,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 529 40 l 536 40 536 45 529 45{\p0}
  2465. Dialogue: 0,0:00:42.48,0:00:42.52,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 578 217 l 589 217 589 226 578 226{\p0}
  2466. Dialogue: 0,0:00:42.69,0:00:42.73,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 452 0 l 464 0 464 13 452 13{\p0}
  2467. Dialogue: 0,0:00:42.69,0:00:42.73,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 245 333 l 251 333 251 339 245 339{\p0}
  2468. Dialogue: 0,0:00:43.56,0:00:43.61,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 490 43 l 498 43 498 51 490 51{\p0}
  2469. Dialogue: 0,0:00:44.32,0:00:44.36,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 529 104 l 537 104 537 111 529 111{\p0}
  2470. Dialogue: 0,0:00:45.69,0:00:45.73,Mask,,0000,0000,0000,,{\p1\pos(532,444)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2471. Dialogue: 0,0:00:45.48,0:00:45.52,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 24 152 l 34 152 34 162 24 162{\p0}
  2472. Dialogue: 0,0:00:45.81,0:00:45.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 646 46 l 656 46 656 64 646 64{\p0}
  2473. Dialogue: 0,0:00:45.81,0:00:45.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 452 386 l 460 386 460 406 452 406{\p0}
  2474. Dialogue: 0,0:00:45.98,0:00:46.02,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 328 236 l 336 236 336 244 328 244{\p0}
  2475. Dialogue: 0,0:00:46.40,0:00:46.44,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 528 306 l 536 306 536 314 528 314{\p0}
  2476. Dialogue: 0,0:00:46.31,0:00:46.44,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 550 296 l 558 296 558 312 550 312{\p0}
  2477. Dialogue: 0,0:00:46.06,0:00:46.10,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 490 14 l 498 14 498 26 490 26{\p0}
  2478. Dialogue: 0,0:00:46.94,0:00:47.06,Mask,,0000,0000,0000,,{\p1\pos(386,250)}m -4 -10 l 4 -10 4 10 -4 10{\p0}
  2479. Dialogue: 0,0:00:47.69,0:00:47.81,Mask,,0000,0000,0000,,{\p1\pos(298,34)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2480. Dialogue: 0,0:00:47.81,0:00:47.86,Mask,,0000,0000,0000,,{\p1\pos(533,40)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2481. Dialogue: 0,0:00:47.94,0:00:48.06,Mask,,0000,0000,0000,,{\p1\pos(302,64)}m -8 -4 l 8 -4 8 4 -8 4{\p0}
  2482. Dialogue: 0,0:00:49.06,0:00:49.19,Mask,,0000,0000,0000,,{\p1\pos(190,88)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2483. Dialogue: 0,0:00:49.15,0:00:49.19,Mask,,0000,0000,0000,,{\p1\pos(484,26)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2484. Dialogue: 0,0:00:48.44,0:00:48.56,Mask,,0000,0000,0000,,{\p1\pos(246,34)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2485. Dialogue: 0,0:00:48.44,0:00:48.56,Mask,,0000,0000,0000,,{\p1\pos(444,444)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2486. Dialogue: 0,0:00:50.61,0:00:50.65,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 530 104 l 540 104 540 112 530 112{\p0}
  2487. Dialogue: 0,0:00:51.03,0:00:51.07,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 608 0 l 621 0 621 12 608 12{\p0}
  2488. Dialogue: 0,0:00:51.61,0:00:51.66,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 151 13 l 158 13 158 23 151 23{\p0}
  2489. Dialogue: 0,0:00:51.61,0:00:51.66,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 147 15 l 153 15 153 23 147 23{\p0}
  2490. Dialogue: 0,0:00:54.11,0:00:54.15,Mask,,0000,0000,0000,,{\p1\pos(536,38)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2491. Dialogue: 0,0:00:55.49,0:00:55.53,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 531 369 l 537 369 537 375 531 375{\p0}
  2492. Dialogue: 0,0:01:06.63,0:01:06.67,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 356 323 l 363 323 363 329 356 329{\p0}
  2493. Dialogue: 0,0:01:06.71,0:01:06.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 531 32 l 537 32 537 37 531 37{\p0}
  2494. Dialogue: 0,0:01:06.75,0:01:06.80,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 626 366 l 632 366 632 380 626 380{\p0}
  2495. Dialogue: 0,0:01:07.04,0:01:07.17,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 130 170 l 138 170 138 178 130 178{\p0}
  2496. Dialogue: 0,0:01:07.42,0:01:07.46,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 117 113 l 126 113 126 122 117 122{\p0}
  2497. Dialogue: 0,0:01:07.92,0:01:07.96,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 150 434 l 156 434 156 444 150 444{\p0}
  2498. Dialogue: 0,0:01:08.80,0:01:08.84,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 530 234 l 537 234 537 239 530 239{\p0}
  2499. Dialogue: 0,0:01:09.34,0:01:09.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 370 23 l 376 23 376 29 370 29{\p0}
  2500. Dialogue: 0,0:01:11.59,0:01:11.63,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 529 300 l 535 300 535 305 529 305{\p0}
  2501. Dialogue: 0,0:01:12.34,0:01:12.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 631 22 l 638 22 638 28 631 28{\p0}
  2502. Dialogue: 0,0:01:13.01,0:01:13.05,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 528 30 l 536 30 536 36 528 36{\p0}
  2503. Dialogue: 0,0:01:13.05,0:01:13.09,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 385 371 l 390 371 390 378 385 378{\p0}
  2504. Dialogue: 0,0:01:16.34,0:01:16.38,Mask,,0000,0000,0000,,{\p1\pos(378,310)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2505. Dialogue: 0,0:01:21.19,0:01:21.23,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m -1 453 l 3 453 3 459 -1 459{\p0}
  2506. Dialogue: 0,0:01:23.97,0:01:24.10,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 632 157 l 640 157 640 165 632 165{\p0}
  2507. Dialogue: 0,0:01:24.22,0:01:24.35,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 645 170 l 655 170 655 180 645 180{\p0}
  2508. Dialogue: 0,0:01:24.44,0:01:24.48,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 131 165 l 139 165 139 171 131 171{\p0}
  2509. Dialogue: 0,0:01:24.73,0:01:24.85,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 372 40 l 382 40 382 48 372 48 {\p0}
  2510. Dialogue: 0,0:01:24.90,0:01:24.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 256 441 l 266 441 266 448 256 448{\p0}
  2511. Dialogue: 0,0:01:25.73,0:01:25.89,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 414 26 l 422 26 422 34 414 34{\p0}
  2512. Dialogue: 0,0:01:25.98,0:01:26.02,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 487 300 l 496 300 496 307 487 307{\p0}
  2513. Dialogue: 0,0:01:25.98,0:01:26.10,Mask,,0000,0000,0000,,{\p1\pos(378,42)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2514. Dialogue: 0,0:01:26.86,0:01:26.90,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 57 317 l 63 317 63 322 57 322{\p0}
  2515. Dialogue: 0,0:01:27.19,0:01:27.23,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 192 188 l 198 188 198 192 192 192{\p0}
  2516. Dialogue: 0,0:01:27.82,0:01:27.86,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 123 6 l 129 6 129 11 123 11{\p0}
  2517. Dialogue: 0,0:01:36.45,0:01:36.49,Mask,,0000,0000,0000,,{\p1\pos(30,76)}m -4 -6 l 4 -6 4 6 -4 6{\p0}
  2518. Dialogue: 0,0:01:36.78,0:01:36.82,Mask,,0000,0000,0000,,{\p1\pos(612,68)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2519. Dialogue: 0,0:01:45.33,0:01:45.37,Mask,,0000,0000,0000,,{\p1\pos(264,392)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2520. Dialogue: 0,0:01:45.41,0:01:45.50,Mask,,0000,0000,0000,,{\p1\pos(68,444)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2521. Dialogue: 0,0:01:54.39,0:01:54.43,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 86 108 l 93 108 93 113 86 113{\p0}
  2522. Dialogue: 0,0:02:07.23,0:02:07.27,Mask,,0000,0000,0000,,{\p1\pos(598,6)}m -6 -4 l 6 -4 6 4 -6 4{\p0}
  2523. Dialogue: 0,0:02:09.27,0:02:09.31,Mask,,0000,0000,0000,,{\p1\pos(468,54)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2524. Dialogue: 0,0:02:12.86,0:02:12.90,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 259 461 l 267 461 267 467 259 467{\p0}
  2525. Dialogue: 0,0:02:17.95,0:02:17.99,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 101 237 l 108 237 108 242 101 242{\p0}
  2526. Dialogue: 0,0:02:19.70,0:02:19.82,Mask,,0000,0000,0000,,{\p1\pos(458,404)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2527. Dialogue: 0,0:02:20.45,0:02:20.70,Mask,,0000,0000,0000,,{\p1\pos(410,112)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2528. Dialogue: 0,0:02:23.83,0:02:23.95,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 676 18 l 682 18 682 22 676 22{\p0}
  2529. Dialogue: 0,0:02:30.09,0:02:30.13,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 541 424 l 546 424 546 430 541 430{\p0}
  2530. Dialogue: 0,0:02:38.01,0:02:38.05,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 190 0 l 198 0 198 8 190 8{\p0}
  2531. Dialogue: 0,0:02:40.13,0:02:40.22,Mask,,0000,0000,0000,,{\p1\pos(19,178)}m -4 -8 l 4 -8 4 8 -4 8{\p0}
  2532. Dialogue: 0,0:02:45.39,0:02:45.51,Mask,,0000,0000,0000,,{\p1\pos(36,216)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2533. Dialogue: 0,0:02:52.23,0:02:52.27,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 25 145 l 40 145 40 155 25 155{\p0}
  2534. Dialogue: 0,0:03:10.21,0:03:10.25,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 462 420 l 470 420 470 425 462 425{\p0}
  2535. Dialogue: 0,0:03:15.13,0:03:15.25,Mask,,0000,0000,0000,,{\p1\pos(146,206)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2536. Dialogue: 0,0:03:26.10,0:03:26.14,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 460 120 l 470 120 470 130 460 130{\p0}
  2537. Dialogue: 0,0:03:44.82,0:03:44.95,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 282 180 l 292 180 292 186 282 186{\p0}
  2538. Dialogue: 0,0:03:45.00,0:03:45.04,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 217 391 l 225 391 225 396 217 396{\p0}
  2539. Dialogue: 0,0:03:50.58,0:03:50.70,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 624 82 l 634 82 634 88 624 88{\p0}
  2540. Dialogue: 0,0:04:10.94,0:04:10.98,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 0 68 l 5 68 5 72 0 72{\p0}
  2541. Dialogue: 0,0:04:32.12,0:04:32.25,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 316 236 l 326 236 326 244 316 244{\p0}
  2542. Dialogue: 0,0:04:44.76,0:04:44.81,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 691 444 l 699 444 699 450 691 450{\p0}
  2543. Dialogue: 0,0:04:45.10,0:04:45.14,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 44 403 l 50 403 50 408 44 408{\p0}
  2544. Dialogue: 0,0:04:47.64,0:04:47.68,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 668 353 l 677 353 677 359 668 359{\p0}
  2545. Dialogue: 0,0:04:59.15,0:04:59.19,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 140 414 l 147 414 147 418 140 418{\p0}
  2546. Dialogue: 0,0:05:15.59,0:05:15.63,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 549 29 l 555 29 555 37 549 37{\p0}
  2547. Dialogue: 0,0:05:39.02,0:05:39.10,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 56 112 l 64 112 64 120 56 120{\p0}
  2548. Dialogue: 0,0:05:40.11,0:05:40.15,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 586 466 l 596 466 596 474 586 474{\p0}
  2549. Dialogue: 0,0:05:40.15,0:05:40.19,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 537 262 l 544 262 544 267 537 267{\p0}
  2550. Dialogue: 0,0:05:41.52,0:05:41.65,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 652 187 l 657 187 657 194 652 194{\p0}
  2551. Dialogue: 0,0:05:41.74,0:05:41.78,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 442 12 l 448 12 448 17 442 17{\p0}
  2552. Dialogue: 0,0:05:50.16,0:05:50.20,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 103 234 l 111 234 111 239 103 239{\p0}
  2553. Dialogue: 0,0:05:57.08,0:05:57.25,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 318 288 l 326 288 326 294 318 294{\p0}
  2554. Dialogue: 0,0:05:58.17,0:05:58.25,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 50 232 l 55 232 55 237 50 237{\p0}
  2555. Dialogue: 0,0:06:09.22,0:06:09.31,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 428 9 l 438 9 438 16 428 16{\p0}
  2556. Dialogue: 0,0:06:42.38,0:06:42.42,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 631 418 l 639 418 639 426 631 426{\p0}
  2557. Dialogue: 0,0:06:42.51,0:06:42.55,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 17 411 l 23 411 23 416 17 416{\p0}
  2558. Dialogue: 0,0:06:42.71,0:06:42.76,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 433 254 l 439 254 439 259 433 259{\p0}
  2559. Dialogue: 0,0:06:43.84,0:06:43.88,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 130 229 l 136 229 136 233 130 233{\p0}
  2560. Dialogue: 0,0:06:43.67,0:06:43.79,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 397 411 l 407 411 407 421 397 421{\p0}
  2561. Dialogue: 0,0:06:55.56,0:06:55.60,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 222 110 l 230 110 230 114 222 114{\p0}
  2562. Dialogue: 0,0:07:12.58,0:07:12.62,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 4 426 l 12 426 12 431 4 431{\p0}
  2563. Dialogue: 0,0:07:12.61,0:07:12.78,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 330 330 l 340 330 340 338 330 338{\p0}
  2564. Dialogue: 0,0:07:32.63,0:07:32.72,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 540 332 l 548 332 548 336 540 336{\p0}
  2565. Dialogue: 0,0:07:44.77,0:07:44.90,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 206 50 l 213 50 213 56 206 56{\p0}
  2566. Dialogue: 0,0:09:12.16,0:09:12.20,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 3 364 l 13 364 13 375 3 375{\p0}
  2567. Dialogue: 0,0:09:30.84,0:09:30.96,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 42 440 l 52 440 52 450 42 450{\p0}
  2568. Dialogue: 0,0:09:30.92,0:09:30.97,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 106 387 l 115 387 115 393 106 393{\p0}
  2569. Dialogue: 0,0:09:55.07,0:09:55.12,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 684 269 l 695 269 695 277 684 277{\p0}
  2570. Dialogue: 0,0:09:56.40,0:09:56.49,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 288 244 l 298 244 298 250 288 250{\p0}
  2571. Dialogue: 0,0:10:07.50,0:10:07.58,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 180 240 l 190 240 190 250 180 250{\p0}
  2572. Dialogue: 0,0:10:22.93,0:10:22.98,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 178 171 l 186 171 186 176 178 176{\p0}
  2573. Dialogue: 0,0:10:29.61,0:10:29.65,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 163 431 l 169 431 169 436 163 436{\p0}
  2574. Dialogue: 0,0:10:30.90,0:10:30.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 683 163 l 691 163 691 169 683 169{\p0}
  2575. Dialogue: 0,0:10:31.32,0:10:31.36,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 307 144 l 316 144 316 155 307 155{\p0}
  2576. Dialogue: 0,0:10:45.24,0:10:45.29,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 690 100 l 704 100 704 116 690 116{\p0}
  2577. Dialogue: 0,0:10:46.08,0:10:46.12,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 695 160 l 703 160 703 168 695 168{\p0}
  2578. Dialogue: 0,0:10:46.29,0:10:46.33,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 692 438 l 698 438 698 444 692 444{\p0}
  2579. Dialogue: 0,0:10:56.34,0:10:56.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 462 294 l 470 294 470 300 462 300{\p0}
  2580. Dialogue: 0,0:10:59.38,0:10:59.42,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 346 382 l 354 382 354 390 346 390{\p0}
  2581. Dialogue: 0,0:11:03.89,0:11:03.93,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 229 454 l 236 454 236 459 229 459{\p0}
  2582. Dialogue: 0,0:11:08.15,0:11:08.19,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 182 415 l 190 415 190 421 182 421{\p0}
  2583. Dialogue: 0,0:11:27.83,0:11:27.87,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 648 180 l 655 180 655 186 648 186{\p0}
  2584. Dialogue: 0,0:11:35.17,0:11:35.21,Mask,,0000,0000,0000,,{\p1\pos(50,90)}m -4 -8 l 4 -8 4 8 -4 8{\p0}
  2585. Dialogue: 0,0:11:50.73,0:11:50.85,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 564 318 l 572 318 572 324 564 324{\p0}
  2586. Dialogue: 0,0:11:51.23,0:11:51.35,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 564 318 l 572 318 572 324 564 324{\p0}
  2587. Dialogue: 0,0:11:58.36,0:11:58.48,Mask,,0000,0000,0000,,{\p1\pos(196,42)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2588. Dialogue: 0,0:11:59.11,0:11:59.23,Mask,,0000,0000,0000,,{\p1\pos(132,378)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2589. Dialogue: 0,0:12:01.32,0:12:01.37,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 473 84 l 482 84 482 89 473 89{\p0}
  2590. Dialogue: 0,0:12:08.71,0:12:08.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 600 9 l 610 9 610 18 600 18{\p0}
  2591. Dialogue: 0,0:12:08.71,0:12:08.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 597 15 l 605 15 605 20 597 20{\p0}
  2592. Dialogue: 0,0:12:16.34,0:12:16.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 496 297 l 504 297 504 302 496 302{\p0}
  2593. Dialogue: 0,0:12:35.10,0:12:35.15,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 514 212 l 522 212 522 220 514 220{\p0}
  2594. Dialogue: 0,0:12:48.45,0:12:48.49,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 194 80 l 202 80 202 88 194 88{\p0}
  2595. Dialogue: 0,0:12:55.50,0:12:55.55,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 172 403 l 180 403 180 413 172 413{\p0}
  2596. Dialogue: 0,0:12:55.50,0:12:55.55,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 50 454 l 60 454 60 462 50 462{\p0}
  2597. Dialogue: 0,0:12:59.17,0:12:59.22,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 422 414 l 429 414 429 419 422 419{\p0}
  2598. Dialogue: 0,0:13:07.14,0:13:07.18,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 324 30 l 331 30 331 36 324 36{\p0}
  2599. Dialogue: 0,0:13:37.46,0:13:37.50,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 679 369 l 689 369 689 376 679 376{\p0}
  2600. Dialogue: 0,0:13:40.04,0:13:40.17,Mask,,0000,0000,0000,,{\p1\pos(230,286)}m -6 -4 l 6 -4 6 4 -6 4{\p0}
  2601. Dialogue: 0,0:13:40.17,0:13:40.29,Mask,,0000,0000,0000,,{\p1\pos(38,326)}m -8 -4 l 8 -4 8 4 -8 4{\p0}
  2602. Dialogue: 0,0:13:52.81,0:13:52.93,Mask,,0000,0000,0000,,{\p1\pos(106,438)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2603. Dialogue: 0,0:13:53.01,0:13:53.10,Mask,,0000,0000,0000,,{\p1\pos(98,458)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2604. Dialogue: 0,0:13:53.22,0:13:53.43,Mask,,0000,0000,0000,,{\p1\pos(472,464)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2605. Dialogue: 0,0:13:53.93,0:13:54.02,Mask,,0000,0000,0000,,{\p1\pos(98,458)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2606. Dialogue: 0,0:14:17.17,0:14:17.21,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 56 129 l 64 129 64 139 56 139{\p0}
  2607. Dialogue: 0,0:14:37.90,0:14:37.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 73 431 l 81 431 81 437 73 437{\p0}
  2608. Dialogue: 0,0:14:39.60,0:14:39.73,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 118 238 l 126 238 126 244 118 244{\p0}
  2609. Dialogue: 0,0:14:42.57,0:14:42.61,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 118 136 l 128 136 128 142 118 142{\p0}
  2610. Dialogue: 0,0:14:45.86,0:14:45.91,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 561 447 l 568 447 568 452 561 452{\p0}
  2611. Dialogue: 0,0:14:50.28,0:14:50.32,Mask,,0000,0000,0000,,{\p1\pos(400,94)}m -4 -6 l 4 -6 4 6 -4 6{\p0}
  2612. Dialogue: 0,0:15:29.03,0:15:29.07,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 445 214 l 452 214 452 218 445 218{\p0}
  2613. Dialogue: 0,0:15:31.41,0:15:31.45,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 459 413 l 468 413 468 420 459 420{\p0}
  2614. Dialogue: 0,0:15:35.41,0:15:35.49,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 205 13 l 218 13 218 27 205 27{\p0}
  2615. Dialogue: 0,0:15:35.58,0:15:35.62,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 131 73 l 142 73 142 84 131 84{\p0}
  2616. Dialogue: 0,0:15:38.67,0:15:38.71,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 20 326 l 29 326 29 332 20 332{\p0}
  2617. Dialogue: 0,0:15:38.71,0:15:38.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 33 324 l 43 324 43 330 33 330{\p0}
  2618. Dialogue: 0,0:15:38.75,0:15:38.79,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 35 327 l 45 327 45 333 35 333{\p0}
  2619. Dialogue: 0,0:15:43.25,0:15:43.30,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 255 445 l 280 445 280 451 255 451{\p0}
  2620. Dialogue: 0,0:15:44.42,0:15:44.46,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 510 312 l 519 312 519 318 510 318{\p0}
  2621. Dialogue: 0,0:15:46.51,0:15:46.55,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 691 198 l 701 198 701 204 691 204{\p0}
  2622. Dialogue: 0,0:15:46.71,0:15:46.80,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 250 19 l 258 19 258 25 250 25{\p0}
  2623. Dialogue: 0,0:15:48.34,0:15:48.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 186 386 l 193 386 193 391 186 391{\p0}
  2624. Dialogue: 0,0:16:27.76,0:16:27.80,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 261 466 l 269 466 269 471 261 471{\p0}
  2625. Dialogue: 0,0:16:30.39,0:16:30.43,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 682 452 l 690 452 690 458 682 458{\p0}
  2626. Dialogue: 0,0:16:31.01,0:16:31.09,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 556 194 l 564 194 564 202 556 202{\p0}
  2627. Dialogue: 0,0:16:31.26,0:16:31.34,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 156 158 l 164 158 164 166 156 166{\p0}
  2628. Dialogue: 0,0:16:31.34,0:16:31.42,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 392 96 l 400 96 400 104 392 104{\p0}
  2629. Dialogue: 0,0:16:32.09,0:16:32.13,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 408 112 l 424 112 424 128 408 128{\p0}
  2630. Dialogue: 0,0:16:38.89,0:16:38.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 143 250 l 149 250 149 255 143 255{\p0}
  2631. Dialogue: 0,0:16:39.89,0:16:39.94,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 54 226 l 61 226 61 231 54 231{\p0}
  2632. Dialogue: 0,0:16:51.15,0:16:51.28,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 170 292 l 180 292 180 300 170 300{\p0}
  2633. Dialogue: 0,0:16:53.03,0:16:53.07,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 24 228 l 32 228 32 233 24 233{\p0}
  2634. Dialogue: 0,0:16:54.20,0:16:54.32,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 247 465 l 255 465 255 472 247 472{\p0}
  2635. Dialogue: 0,0:16:54.24,0:16:54.28,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 248 476 l 255 476 255 481 248 481{\p0}
  2636. Dialogue: 0,0:17:18.51,0:17:18.55,Mask,,0000,0000,0000,,{\p1\pos(362,390)}m -8 -4 l 8 -4 8 4 -8 4{\p0}
  2637. Dialogue: 0,0:17:18.64,0:17:18.68,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 184 130 l 192 130 192 138 184 138{\p0}
  2638. Dialogue: 0,0:17:27.23,0:17:27.31,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 612 156 l 620 156 620 164 612 164{\p0}
  2639. Dialogue: 0,0:17:35.28,0:17:35.33,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 669 368 l 677 368 677 374 669 374{\p0}
  2640. Dialogue: 0,0:17:40.25,0:17:40.29,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 217 196 l 224 196 224 201 217 201{\p0}
  2641. Dialogue: 0,0:17:41.62,0:17:41.66,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 218 150 l 225 150 225 156 218 156{\p0}
  2642. Dialogue: 0,0:17:54.59,0:17:54.64,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 326 117 l 332 117 332 122 326 122{\p0}
  2643. Dialogue: 0,0:18:00.10,0:18:00.14,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 547 153 l 553 153 553 160 547 160{\p0}
  2644. Dialogue: 0,0:18:21.96,0:18:22.00,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 155 388 l 165 388 165 398 155 398{\p0}
  2645. Dialogue: 0,0:18:36.59,0:18:36.63,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 410 178 l 418 178 418 186 410 186{\p0}
  2646. Dialogue: 0,0:19:42.41,0:19:42.45,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 207 278 l 211 278 211 284 207 284{\p0}
  2647. Dialogue: 0,0:19:50.08,0:19:50.13,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 123 316 l 131 316 131 322 123 322{\p0}
  2648. Dialogue: 0,0:19:50.45,0:19:50.58,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 182 170 l 190 170 190 178 182 178{\p0}
  2649. Dialogue: 0,0:19:58.59,0:19:58.63,Mask,,0000,0000,0000,,{\p1\pos(364,342)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2650. Dialogue: 0,0:19:58.67,0:19:58.76,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 628 26 l 636 26 636 36 628 36{\p0}
  2651. Dialogue: 0,0:19:59.18,0:19:59.26,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 632 68 l 644 68 644 78 632 78{\p0}
  2652. Dialogue: 0,0:19:59.97,0:20:00.01,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 444 123 l 451 123 451 129 444 129{\p0}
  2653. Dialogue: 0,0:20:01.10,0:20:01.14,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 179 370 l 185 370 185 376 179 376{\p0}
  2654. Dialogue: 0,0:20:11.23,0:20:11.27,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 229 189 l 236 189 236 194 229 194{\p0}
  2655. Dialogue: 0,0:20:26.37,0:20:26.45,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 94 284 l 102 284 102 292 94 292{\p0}
  2656. Dialogue: 0,0:20:35.34,0:20:35.38,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 644 365 l 650 365 650 369 644 369{\p0}
  2657. Dialogue: 0,0:20:45.72,0:20:45.77,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 283 24 l 289 24 289 31 283 31{\p0}
  2658. Dialogue: 0,0:20:47.89,0:20:47.93,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 396 81 l 403 81 403 86 396 86{\p0}
  2659. Dialogue: 0,0:21:10.71,0:21:10.75,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 220 267 l 227 267 227 274 220 274{\p0}
  2660. Dialogue: 0,0:21:17.12,0:21:17.21,Mask,,0000,0000,0000,,{\p1\pos(322,174)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2661. Dialogue: 0,0:21:24.38,0:21:24.51,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 568 395 l 573 395 573 399 568 399{\p0}
  2662. Dialogue: 0,0:21:36.23,0:21:36.27,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 611 65 l 619 65 619 72 611 72{\p0}
  2663. Dialogue: 0,0:21:45.24,0:21:45.28,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 309 94 l 315 94 315 99 309 99{\p0}
  2664. Dialogue: 0,0:21:58.38,0:21:58.42,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 320 104 l 342 104 342 110 320 110{\p0}
  2665. Dialogue: 0,0:21:58.92,0:21:58.96,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 40 334 l 47 334 47 339 40 339{\p0}
  2666. Dialogue: 0,0:22:17.11,0:22:17.15,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 691 167 l 699 167 699 171 691 171{\p0}
  2667. Dialogue: 0,0:22:17.36,0:22:17.40,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 450 334 l 459 334 459 341 450 341{\p0}
  2668. Dialogue: 0,0:22:17.44,0:22:17.48,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 680 0 l 687 0 687 6 680 6{\p0}
  2669. Dialogue: 0,0:22:21.15,0:22:21.19,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 417 368 l 424 368 424 374 417 374{\p0}
  2670. Dialogue: 0,0:22:47.85,0:22:47.89,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 72 190 l 79 190 79 195 72 195{\p0}
  2671. Dialogue: 0,0:22:51.81,0:22:51.85,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 68 29 l 75 29 75 35 68 35{\p0}
  2672. Dialogue: 0,0:22:54.23,0:22:54.27,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 213 54 l 221 54 221 62 213 62{\p0}
  2673. Dialogue: 0,0:23:04.15,0:23:04.28,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 560 144 l 568 144 568 152 560 152{\p0}
  2674. Dialogue: 0,0:23:10.53,0:23:10.65,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 182 120 l 190 120 190 128 182 128{\p0}
  2675. Dialogue: 0,0:23:12.12,0:23:12.16,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 449 368 l 456 368 456 375 449 375{\p0}
  2676. Dialogue: 0,0:23:22.04,0:23:22.13,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 161 178 l 167 178 167 188 161 188{\p0}
  2677. Dialogue: 0,0:23:30.22,0:23:30.26,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 102 169 l 112 169 112 177 102 177{\p0}
  2678. Dialogue: 0,0:23:39.40,0:23:39.44,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 36 132 l 45 132 45 141 36 141{\p0}
  2679. Dialogue: 0,0:24:01.71,0:24:01.79,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 223 456 l 231 456 231 462 223 462{\p0}
  2680. Dialogue: 0,0:24:07.09,0:24:07.13,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 236 49 l 243 49 243 54 236 54{\p0}
  2681. Dialogue: 0,0:24:08.18,0:24:08.22,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 118 339 l 124 339 124 344 118 344{\p0}
  2682. Dialogue: 0,0:24:19.73,0:24:19.77,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 47 217 l 55 217 55 223 47 223{\p0}
  2683. Dialogue: 0,0:24:21.61,0:24:21.65,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 382 418 l 390 418 390 424 382 424{\p0}
  2684. Dialogue: 0,0:24:32.86,0:24:32.99,Mask,,0000,0000,0000,,{\p1\pos(84,60)}m -4 -4 l 4 -4 4 4 -4 4{\p0}
  2685. Dialogue: 0,0:24:35.24,0:24:35.29,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 153 2 l 161 2 161 7 153 7{\p0}
  2686. Dialogue: 0,0:25:09.02,0:25:09.11,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 447 337 l 455 337 455 343 447 343{\p0}
  2687. Dialogue: 0,0:25:40.64,0:25:40.68,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 14 40 l 34 40 34 58 14 58{\p0}
  2688. Dialogue: 0,0:25:40.68,0:25:40.76,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 24 32 l 32 32 32 40 24 40{\p0}
  2689. Dialogue: 0,0:25:42.14,0:25:42.19,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 300 274 l 307 274 307 281 300 281{\p0}
  2690. Dialogue: 0,0:26:16.59,0:26:16.67,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 380 90 l 390 90 390 98 380 98{\p0}
  2691. Dialogue: 0,0:26:39.24,0:26:39.36,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 296 150 l 306 150 306 158 296 158{\p0}
  2692. Dialogue: 0,0:26:54.55,0:26:54.59,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 371 162 l 377 162 377 167 371 167{\p0}
  2693. Dialogue: 0,0:27:35.84,0:27:36.00,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 486 218 l 508 218 508 234 486 234{\p0}
  2694. Dialogue: 0,0:27:39.26,0:27:39.30,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 58 66 l 66 66 66 77 58 77{\p0}
  2695. Dialogue: 0,0:27:45.39,0:27:45.43,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 126 375 l 133 375 133 381 126 381{\p0}
  2696. Dialogue: 0,0:27:48.31,0:27:48.39,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 594 32 l 602 32 602 40 594 40{\p0}
  2697. Dialogue: 0,0:27:52.60,0:27:52.73,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 580 154 l 590 154 590 162 580 162{\p0}
  2698. Dialogue: 0,0:27:53.53,0:27:53.57,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 224 222 l 234 222 234 227 224 227{\p0}
  2699. Dialogue: 0,0:27:53.69,0:27:53.73,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 49 306 l 54 306 54 313 49 313{\p0}
  2700. Dialogue: 0,0:27:55.44,0:27:55.53,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 275 106 l 280 106 280 111 275 111{\p0}
  2701. Dialogue: 0,0:27:55.77,0:27:55.81,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 460 210 l 475 210 475 225 460 225{\p0}
  2702. Dialogue: 0,0:27:55.77,0:27:55.86,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 306 38 l 316 38 316 46 306 46{\p0}
  2703. Dialogue: 0,0:27:58.57,0:27:58.61,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 666 77 l 675 77 675 84 666 84{\p0}
  2704. Dialogue: 0,0:27:58.69,0:27:58.73,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 568 146 l 578 146 578 154 568 154{\p0}
  2705. Dialogue: 0,0:27:58.78,0:27:58.82,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 471 327 l 477 327 477 331 471 331{\p0}
  2706. Dialogue: 0,0:28:03.49,0:28:03.54,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 260 28 l 267 28 267 33 260 33{\p0}
  2707. Dialogue: 0,0:28:05.58,0:28:05.62,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 594 63 l 598 63 598 71 594 71{\p0}
  2708. Dialogue: 0,0:28:05.62,0:28:05.66,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 0 425 l 7 425 7 432 0 432{\p0}
  2709. Dialogue: 0,0:28:06.96,0:28:07.00,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 36 10 l 41 10 41 15 36 15{\p0}
  2710. Dialogue: 0,0:28:07.87,0:28:07.92,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 607 69 l 613 69 613 77 607 77{\p0}
  2711. Dialogue: 0,0:28:10.37,0:28:10.45,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 32 156 l 40 156 40 164 32 164{\p0}
  2712. Dialogue: 0,0:28:14.00,0:28:14.05,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 146 296 l 152 296 152 302 146 302{\p0}
  2713. Dialogue: 0,0:28:21.55,0:28:21.60,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 654 374 l 659 374 659 379 654 379{\p0}
  2714. Dialogue: 0,0:28:25.06,0:28:25.10,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 143 401 l 150 401 150 409 143 409{\p0}
  2715. Dialogue: 0,0:28:31.48,0:28:31.52,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 352 214 l 357 214 357 218 352 218{\p0}
  2716. Dialogue: 0,0:28:34.23,0:28:34.28,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 180 58 l 186 58 186 64 180 64{\p0}
  2717. Dialogue: 0,0:28:34.40,0:28:34.44,Mask,,0000,0000,0000,,{\pos(0,0)\p1}m 315 38 l 321 38 321 43 315 43{\p0}
  2718.  
  2719.  
  2720.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement