.

Upscaling to High Definition

videoediting-upscale

NTSC DVD 480i60 (4:3) to 720p60 (16:9)

Source is DVD/MPEG-2 NTSC/SD, indexed with neuron2’s tool. Mor more details on aspect ration conversion refer to Displaying 4×3 on 16×9 and and Faking It Making 4:3 footage work in 16:9 projects.

# auto generated by releases\upconvert.cmd:BRD, 6 threads
# based on http://forum.doom9.org/archive/index.php/t-150727.html

Import("plugins\LSFmod\LSFmod.v1.9.avsi")
Import("plugins\GrainFactory3\GrainFactory3.avsi")

LoadPlugin("plugins\dgmpgdec158\DGDecode.dll")
LoadPlugin("plugins\RemoveGrain-1.0\RemoveGrainSSE3.dll")
LoadPlugin("plugins\RemoveGrain-1.0\RepairSSE3.dll")
LoadPlugin("plugins\nnedi2\nnedi2.dll")
LoadPlugin("plugins\yadifmod_v1\yadifmod.dll")
LoadPlugin("plugins\mvtools-v2.5.10.1\mvtools2.dll")
LoadPlugin("plugins\masktools-v2.0a36\mt_masktools-26.dll")
LoadPlugin("plugins\addgrainc_1.4\addgrainc.dll")

DGDecode_mpeg2source("test.d2v", cpu=4, info=3)
ConvertToYV12(interlaced=true)
AssumeBFF()

edi=nnedi2(field=-2)
yadifmod(mode=1, edeint=edi)

#Now we're at 480p60, let's do a light MDegrain2
   MT("""
super = MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=4)
backward_vec1 = super.MAnalyse(isb = true, delta = 1, overlap=4)
forward_vec1 = super.MAnalyse(isb = false, delta = 1, overlap=4)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=200)
  """, 6)

# if resize to
# crop, tilt, scan and resize
Crop(0,34,-34,0)
Spline36resize(1120,720)

# and let's sharpen a bit
MT("LSFMod(Smode=5, strength=70)", 6)
# and finally, add some nice HD grain
MT("GrainFactory3(g1str=4, g2str=6, g3str=8)", 6)
AddBorders(80,0,80,0)

NTSC DVD 480i60 (16:9) to 720p60 (16:9)

Source is DVD/MPEG-2 NTSC/SD, indexed with neuron2’s tool.

# auto generated by releases\upconvert.cmd:BRD, 6 threads
# based on http://forum.doom9.org/archive/index.php/t-150727.html

Import("plugins\LSFmod\LSFmod.v1.9.avsi")
Import("plugins\GrainFactory3\GrainFactory3.avsi")

LoadPlugin("plugins\dgmpgdec158\DGDecode.dll")
LoadPlugin("plugins\RemoveGrain-1.0\RemoveGrainSSE3.dll")
LoadPlugin("plugins\RemoveGrain-1.0\RepairSSE3.dll")
LoadPlugin("plugins\nnedi2\nnedi2.dll")
LoadPlugin("plugins\yadifmod_v1\yadifmod.dll")
LoadPlugin("plugins\mvtools-v2.5.10.1\mvtools2.dll")
LoadPlugin("plugins\masktools-v2.0a36\mt_masktools-26.dll")
LoadPlugin("plugins\addgrainc_1.4\addgrainc.dll")

DGDecode_mpeg2source("test.d2v", cpu=4, info=3)
ConvertToYV12(interlaced=true)
AssumeBFF()
ColorMatrix(mode="Rec.601->Rec.709")

edi=nnedi2(field=-2)
yadifmod(mode=1, edeint=edi)

#Now we're at 480p60, let's do a light MDegrain2
   MT("""
super = MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=4)
backward_vec1 = super.MAnalyse(isb = true, delta = 1, overlap=4)
forward_vec1 = super.MAnalyse(isb = false, delta = 1, overlap=4)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=200)
  """, 6)

# if resize to
Spline36resize(1280,720)

# and let's sharpen a bit
MT("LSFMod(Smode=5, strength=70)", 6)
# and finally, add some nice HD grain
MT("GrainFactory3(g1str=4, g2str=6, g3str=8)", 6)

NTSC DVD 480i60 (16:9) to 1080p24 (16:9)

Source is DVD/MPEG-2 NTSC/SD, indexed with neuron2’s tool.

# auto generated by upconvert.cmd:BRD, 6 threads
# based on http://forum.doom9.org/archive/index.php/t-150727.html

Import("plugins\LSFmod\LSFmod.v1.9.avsi")
Import("plugins\GrainFactory3\GrainFactory3.avsi")

LoadPlugin("plugins\dgmpgdec158\DGDecode.dll")
LoadPlugin("plugins\RemoveGrain-1.0\RemoveGrainSSE3.dll")
LoadPlugin("plugins\RemoveGrain-1.0\RepairSSE3.dll")
LoadPlugin("plugins\nnedi2\nnedi2.dll")
LoadPlugin("plugins\yadifmod_v1\yadifmod.dll")
LoadPlugin("plugins\mvtools-v2.5.10.1\mvtools2.dll")
LoadPlugin("plugins\masktools-v2.0a36\mt_masktools-26.dll")
LoadPlugin("plugins\addgrainc_1.4\addgrainc.dll")

DGDecode_mpeg2source("test.d2v", cpu=4, info=3)
ConvertToYV12(interlaced=true)
AssumeBFF()
ColorMatrix(mode="Rec.601->Rec.709")

edi=nnedi2(field=-2)
yadifmod(mode=1, edeint=edi)

#Now we're at 480p60, let's do a light MDegrain2
   MT("""
super = MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=4)
backward_vec1 = super.MAnalyse(isb = true, delta = 1, overlap=4)
forward_vec1 = super.MAnalyse(isb = false, delta = 1, overlap=4)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=200)
  """, 6)

# p60 to p24
  MT("""
super = MSuper(pel=2, sharp=1)
backward_vec = super.MAnalyse(isb = true, delta = 1, overlap=4, divide=2,search=3)
forward_vec = super.MAnalyse(isb = false, delta = 1, overlap=4, divide=2,search=3)
MFlowFps(super, backward_vec, forward_vec, num=120000, den=1001, mask=1, ml=49)
  """, 6)
SelectEvery(5)

# if resize to
Spline36resize(1920,1080)

# and let's sharpen a bit
MT("LSFMod(Smode=5, strength=70)", 6)
# and finally, add some nice HD grain
MT("GrainFactory3(g1str=4, g2str=6, g3str=8)", 6)

PAL DVD 576i50 (16:9) to 1080p24 (16:9)

Source is DVD/MPEG-2 NTSC/SD, indexed with neuron2’s tool.

# Based on http://forum.doom9.org/archive/index.php/t-139766.html
#setmtmode(2,0)

Import("tools2\MCTemporalDenoise.v1.2.02.avsi")
Import("tools2\GradFun2DBmod.v1.3.avsi")
Import("tools2\LSFmod.v1.7.avsi")
Import("tools2\Deblock_QED.avs")

v=DGDecode_mpeg2source("test.d2v", cpu=4, info=3)
v=AssumeBFF(v)
v=ColorMatrix(v,hints=true, interlaced=true, threads=0)
a=WAVSource("test.wav")
AudioDub(v,a)

LoadPlugin("tools2\SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=false, doublerate=true)

LoadPlugin("tools2\AddGrainC.dll")
LoadPlugin("tools2\deblock.dll")
LoadPlugin("tools2\EEDI2.dll")
LoadPlugin("tools2\FFT3DFilter.dll") # put fftw3.dll in C:\Windows\SysWOW64\ for 64-bit windows
LoadPlugin("tools2\FFT3Dgpu.dll") # put fftw3.dll in C:\Windows\SysWOW64\ for 64-bit windows
LoadPlugin("tools2\gradfun2db.dll")
LoadPlugin("tools2\MaskTools.dll")
LoadPlugin("tools2\DctFilter.dll")
LoadPlugin("tools2\mt_masktools-25.dll")
LoadPlugin("tools2\mvtools2.dll")
LoadPlugin("tools2\RemoveGrainSSE3.dll")
LoadPlugin("tools2\RepairSSE3.dll")
LoadPlugin("tools2\RsharpenSSE3.dll")
LoadPlugin("tools2\SangNom.dll")
LoadPlugin("tools2\TTempSmooth.dll")

MCTemporalDenoise(settings="high", deblock=true, interlaced=FALSE, gpu=false)

# now at 720x576p50, convert to 1920x1080p24
ConvertToYUY2()
ConvertFPS(48000,1001)
SelectEven()

Spline64Resize(1920,1080,0,0,720,576)
ConvertToRGB()
Coert Vonk

Coert Vonk

Independent Firmware Engineer at Los Altos, CA
Welcome to the things that I couldn’t find.This blog shares some of the notes that I took while deep diving into various fields.Many such endeavors were triggered by curious inquiries from students. Even though the notes often cover a broader area, the key goal is to help the them adopt, flourish and inspire them to invent new technology.
Coert Vonk

Latest posts by Coert Vonk (see all)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Protected with IP Blacklist CloudIP Blacklist Cloud