Log in

View Full Version : Memory and avisynth


Shinjipierre
20th February 2003, 14:11
Here's the problem:

I've done that :
(yeah it's gonna be hell long to huffyuv but I don't mind that. that's not the problem)


#########################################
# Procédure qui charge tous les plugins disponibles
#########################################

### RGB ###

### YUY2 ###
LoadPlugin("C:\Encoding\Avisynth\YUY2\_2DCleanYUY2.dll")
LoadPlugin("C:\Encoding\Avisynth\YUY2\_2DCleanYUY2_makewritable.dll")
LoadPlugin("C:\Encoding\Avisynth\YUY2\SmoothHiQ.dll")

###YUY2 - RGB ###
LoadPlugin("C:\Encoding\Avisynth\YUY2 - RGB\Dnr2.dll")
LoadPlugin("C:\Encoding\Avisynth\YUY2 - RGB\DustV5.dll")
LoadPlugin("C:\Encoding\Avisynth\YUY2 - RGB\MSharpen.dll")

### YUY2 - YV12 ###

### YUY2 - YV12 ###

###YV12 ###

### Loader de Tmpeg ###
LoadVFAPIplugin("C:\Encoding\Avisynth\TMPGenc.vfp","TMPGsource")

################################################################
SetMemoryMax(64)


function filter1 (clip) {
clip = FaeryDust(clip,3)
clip = FaeryDust(clip,3)
clip = SmoothHiQ(clip,5,50,3,3)
return clip
}
function filter2 (clip) {
clip = PixieDust(clip,8)
clip = PixieDust(clip,8)
return clip
}

#################
# crop + deinterlace #
#################
video=TMPGsource("Juuni kokki 8.tpr") # Color changes
video=Flipvertical(video)
video=converttoyuy2(video)
video = DNR2(video)
#################



##########################################################
# Trim de la video pour ne pas filtrer certaines parties de la même façon#
##########################################################
video1 = video.trim(2283,7187)
video2 = video.trim(7188,10866)
video3 = video.trim(10867,11025)
video4 = video.trim(11026,16100)
video5 = video.trim(16101,18672)
video6 = video.trim(18673,24274)
video7 = video.trim(24275,25621)
video8 = video.trim(25622,25654)
video9 = video.trim(25655,32443)
video10 = video.trim(32444,35238)
video11 = video.trim(35239,35607)
video12 = video.trim(35607,0)
##########################################################


##########################
#Tite session de filtrage bourrin#
##########################

video1 = filter1(video1)
video2 = filter2(video2)
video3 = filter1(video3)
video4 = filter2(video4)
video5 = filter1(video5)
video6 = filter2(video6)
video7 = filter1(video7)
video8 = filter2(video8)
video9 = filter1(video9)
video10 = filter2(video10)
video11 = filter1(video11)
video12 = filter2(video12)

##########################


###################################
# Filtres d'après filtrage des autres parties #
###################################
final = video1+video2+video3+video4+video5+video6+video7+video8+video9+video10+video11+video12
final = MSharpen(final,15,30)
final = _2DCleanYUY2(final,0,5,3,3)
return final
###################################
#########################################


The "problem" is :
It sucks all my memory :D

When I load the avisynth project in virtualdubmod... +800 mb of memory are taken :P

is that because of DUSTV5 ?
i didn't ahve the problem before, so... ^^

If someone knows the answer that would be great

Steady
22nd February 2003, 02:24
Dust currently creates 15 internal buffers at 24 bits/pixel. For a 720x480 frame that is about 15 MB. You are creating many instances of the filter.