I just found out that according to the creator of Deblock_QED, that function should be used before deinterlacing. The problem is that Delock_QED works only with progressive videos, so he provided this workaround:
I'm trying to make a generic function to be used on every video with interlacing that needs deblocking. I wrote this code:Code:par=getparity() SeparateFields().PointResize(width,height) Deblock_QED() AssumeFrameBased() SeparateFields() Merge(SelectEven(),SelectOdd()) par ? AssumeTFF() : AssumeBFF() Weave()
but I got the error "Weave should be applied on field based material. Use AssumeFieldBased() beforehand." Where is the issue?Code:function Deblock_QED_Interlaced_Source(clip c, int quant1, int quant2) { par=getparity(c) SeparateFields(c).PointResize(c.width, c.height) Deblock_QED(c, quant1, quant2) AssumeFrameBased(c) SeparateFields(c) Merge(SelectEven(c),SelectOdd(c)) AssumeFieldBased(c) par ? AssumeTFF(c) : AssumeBFF(c) Weave(c) } Deblock_QED_Interlaced_Source(30, 30)
+ Reply to Thread
Results 1 to 7 of 7
-
-
You are applying Weave on c which was not modified by any of the other lines.Where is the issue?
You might want to read up on variable use and assignments in Avisynth.
I assume:
orCode:function Deblock_QED_Interlaced_Source(clip c, int quant1, int quant2) { par=getparity(c) c = SeparateFields(c).PointResize(c.width, c.height) c = Deblock_QED(c, quant1, quant2) c = AssumeFrameBased(c) c = SeparateFields(c) c = Merge(SelectEven(c),SelectOdd(c)) c = AssumeFieldBased(c) c = par ? AssumeTFF(c) : AssumeBFF(c) return Weave(c) }
is what you are trying to do,.. (didn't test this, but I think I didn't miss anything)Code:function Deblock_QED_Interlaced_Source(clip c, int quant1, int quant2) { par=getparity(c) c = c.SeparateFields().PointResize(c.width, c.height) c = c.Deblock_QED(quant1, quant2) c = c.AssumeFrameBased() c = c.SeparateFields() c = c.Merge(c.SelectEven(),c.SelectOdd()) c = c.AssumeFieldBased() c = par ? c.AssumeTFF() : c.AssumeBFF() return c.Weave() }
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
-
"Invalid arguments to function Merge"
needs to beCode:c.Merge(c.SelectEven(),c.SelectOdd())
without the 'c.' at the start.Code:Merge(c.SelectEven(),c.SelectOdd())
Cu Selur
Ps.: Depending on your content, using QTGMC to deinterlace, then apply Deblock_QED and re-interlace might be better.Last edited by Selur; 10th Sep 2024 at 14:03.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Where? What you linked was a workaround mentioned, if you don't want to deinterlace.I just found out that according to the creator of Deblock_QED, that function should be used before deinterlacing.
I can't remember that Didée ever wrote that Deblock_QED should be used before deinterlacing.
(I think that statement is simply wrong.)
then deblock after deinterlacing,..The results of my Avisynth scripts are always progressive
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Here's my version of deblock_QED_i() for interlaced video. It requires deblock_QED().
Code:function Deblock_QED_i ( clip clp, int "quant1", int "quant2", int "aOff1", int "bOff1", int "aOff2", int "bOff2", int "uv" ) { quant1 = default( quant1, 24 ) # Strength of block edge deblocking quant2 = default( quant2, 26 ) # Strength of block internal deblocking aOff1 = default( aOff1, 1 ) # halfway "sensitivity" and halfway a strength modifier for borders aOff2 = default( aOff2, 1 ) # halfway "sensitivity" and halfway a strength modifier for block interiors bOff1 = default( bOff1, 2 ) # "sensitivity to detect blocking" for borders bOff2 = default( bOff2, 2 ) # "sensitivity to detect blocking" for block interiors uv = default( uv, 3 ) # u=3 -> use proposed method for chroma deblocking # u=2 -> no chroma deblocking at all (fastest method) # u=1|-1 -> directly use chroma debl. from the normal|strong deblock() last=clp par=getparity() SeparateFields().PointResize(width,height) Deblock_QED(last, quant1, quant2, aOff1, aOff2, bOff1, bOff2, uv) AssumeFrameBased() SeparateFields() Merge(SelectEven(),SelectOdd()) par ? AssumeTFF() : AssumeBFF() Weave() }
Similar Threads
-
File size 3x bigger when using Avisynth trim function through VDub2
By VideoYak in forum Newbie / General discussionsReplies: 6Last Post: 9th Sep 2023, 07:58 -
any one got guide on how to install avisynth that don' point to avisynth.nl
By MrKool in forum Newbie / General discussionsReplies: 7Last Post: 9th Aug 2023, 11:57 -
avisynth/AvsPmod macro/function to append videos
By Marc1973 in forum Newbie / General discussionsReplies: 2Last Post: 29th Apr 2023, 01:27 -
AviSynth Script error: there is no function named "setmtmode"
By minimax in forum RestorationReplies: 27Last Post: 10th Sep 2021, 04:57 -
Create a function in Avisynth to apply a logo on a clip
By kaskaï in forum EditingReplies: 1Last Post: 9th Apr 2020, 10:03


Quote
