Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st June 2011, 12:36   #41  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Quote:
Originally Posted by Groucho2004 View Post
I have used this filter in combination with MDegrain for several sources and I'm very happy with the results.

I also played around with the "diff_seed" parameter but can't really see any difference (apart from the fact that "diff_seed = true" is quite a bit slower). Do you have any more info on the usefulness of that parameter?
When it is enabled, it will use different seed to generate the reference info and noise pattern for each frame. It's not very useful indeed, I keep it for completeness only.
SAPikachu is offline   Reply With Quote
Old 23rd June 2011, 08:53   #42  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,192
cretindesalpes, any chance of getting a sample of that clip used in the first image? I notice everything but gf3 wipes out all the detail on the bikes in the shadow, gf3 looks the best to me but I assume it's also the slowest.
That image seems to me to be the best test for a deband filter I would like to use it for my own comparisons if I could, thanks.
ryrynz is offline   Reply With Quote
Old 23rd June 2011, 23:44   #43  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
Here are some samples of the original clips:
http://www.mediafire.com/?ge0ntbznzbcv76c

Anyway, the screenshots displayed in post #4 of this thread were done with the first version of flash3kyuu_deband. The new high precision mode retains much better the details.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r19 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 25th June 2011, 03:57   #44  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Just added the other 2 images to sample collection. Quality of latest version should be better than the previous one.

PS: I'm going on vacation tomorrow for a week. I will reply to new posts after I return home.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 25th June 2011, 13:37   #45  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,192
Quote:
Originally Posted by cretindesalpes View Post
Here are some samples of the original clips:
http://www.mediafire.com/?ge0ntbznzbcv76c

Anyway, the screenshots displayed in post #4 of this thread were done with the first version of flash3kyuu_deband. The new high precision mode retains much better the details.
Thanks, I did some testing and flash3kyuu kicks ffdshows deband in terms of quality AND performance, so this filter is a keeper. I find setting the DitherY and DitherC strength to 16 is a good blend of filtering and detail retention, Excellent work!!

Oh and cheers for the introduction to Kyubey. Love the face plant, adorable.

Last edited by ryrynz; 24th July 2011 at 00:55.
ryrynz is offline   Reply With Quote
Old 22nd July 2011, 11:18   #46  |  Link
hetrinity
Registered User
 
Join Date: Apr 2010
Posts: 2
SAPikachu,

Thank you for a great filter. I have been using your filter in combination with two other filters to radically improve on the quality of my encodes. Below is an example of my avisynth scripts...

---------------------------------------------------------------------
"SetMemoryMax(1024)

MPEG2Source("myvob5.d2v")

audio=DirectShowSource("myvob5.ac3")
audiodub(audio)

Crop(4,0,-4,-2)
Spline64Resize(720,400)

FFT3DGPU(sigma=2,bw=8,bh=8,bt=1,sharpen=0,plane=0,precision=2,ow=4,oh=4,oldfft=false)
FFT3DGPU(sigma=2,bw=8,bh=8,bt=3,sharpen=0,plane=4,precision=2,ow=4,oh=4,oldfft=false)
flash3kyuu_deband(opt=3,mt=true,precision_mode=1)
---------------------------------------------------------------------

OR (for IVTC)

---------------------------------------------------------------------
SetMemoryMax(1024)

MPEG2Source("myvob1.d2v",idct=0)
TFM(d2v="myvob1.d2v",opt=3)
TDecimate(opt=3)
audio=DirectShowSource("myvob1.ac3")
audiodub(audio)
#Crop(8,0,-6,0)
Spline64Resize(720,400)

FFT3DGPU(sigma=2,bt=1,bw=8,bh=8,sharpen=0,mode=1,plane=0,precision=2,wintype=2,oldfft=false)
FFT3DGPU(sigma=2,bt=3,bw=8,bh=8,sharpen=0,mode=1,plane=4,precision=2,wintype=2,oldfft=false)
flash3kyuu_deband(opt=3,mt=true,precision_mode=1)
---------------------------------------------------------------------

The audio directshowsource would be ac3filter. These, with mediacoder 2011, provide excellent x264 quality for me... and I encode them at my 1100 bitrate. In most cases, the quality of the encode will visibly look superior to the original due to the vast reduction in noise. In comparison to the original, there is some loss of detail, particularly in space scenes where some of the stars are lost. Your filter helped to minimize/eliminate the banding created by my using the FFT3DGPU filters.

I'm no expert or specialist in this area, though, I am an IT person. So, you guys may be way ahead of me in visual quality encodes. Let me know what you think.
hetrinity is offline   Reply With Quote
Old 22nd July 2011, 13:02   #47  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Quote:
Originally Posted by hetrinity View Post
SAPikachu,

Thank you for a great filter. I have been using your filter in combination with two other filters to radically improve on the quality of my encodes. Below is an example of my avisynth scripts...

---------------------------------------------------------------------
"SetMemoryMax(1024)

MPEG2Source("myvob5.d2v")

audio=DirectShowSource("myvob5.ac3")
audiodub(audio)

Crop(4,0,-4,-2)
Spline64Resize(720,400)

FFT3DGPU(sigma=2,bw=8,bh=8,bt=1,sharpen=0,plane=0,precision=2,ow=4,oh=4,oldfft=false)
FFT3DGPU(sigma=2,bw=8,bh=8,bt=3,sharpen=0,plane=4,precision=2,ow=4,oh=4,oldfft=false)
flash3kyuu_deband(opt=3,mt=true,precision_mode=1)
---------------------------------------------------------------------

OR (for IVTC)

---------------------------------------------------------------------
SetMemoryMax(1024)

MPEG2Source("myvob1.d2v",idct=0)
TFM(d2v="myvob1.d2v",opt=3)
TDecimate(opt=3)
audio=DirectShowSource("myvob1.ac3")
audiodub(audio)
#Crop(8,0,-6,0)
Spline64Resize(720,400)

FFT3DGPU(sigma=2,bt=1,bw=8,bh=8,sharpen=0,mode=1,plane=0,precision=2,wintype=2,oldfft=false)
FFT3DGPU(sigma=2,bt=3,bw=8,bh=8,sharpen=0,mode=1,plane=4,precision=2,wintype=2,oldfft=false)
flash3kyuu_deband(opt=3,mt=true,precision_mode=1)
---------------------------------------------------------------------

The audio directshowsource would be ac3filter. These, with mediacoder 2011, provide excellent x264 quality for me... and I encode them at my 1100 bitrate. In most cases, the quality of the encode will visibly look superior to the original due to the vast reduction in noise. In comparison to the original, there is some loss of detail, particularly in space scenes where some of the stars are lost. Your filter helped to minimize/eliminate the banding created by my using the FFT3DGPU filters.

I'm no expert or specialist in this area, though, I am an IT person. So, you guys may be way ahead of me in visual quality encodes. Let me know what you think.
I don't use FFT3DGPU much, but as far as I know sigma=2 is very high for normal videos, and due to your plane settings, the luma plane is filtered twice, so it is not surprising that many details are lost. To gain more details, you may try lowering the sigma values, and/or change plane in the second FFT3DGPU to 3, make it filter only the chroma planes.

Also for flash3kyuu_deband, opt and mt should usually be left out unless error occurs. The default settings are rather strong, so you may want to lower them a bit, particularly ditherY and ditherC.

Have a happy encoding.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 24th July 2011, 00:58   #48  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,192
Quote:
Originally Posted by hetrinity View Post
there is some loss of detail, particularly in space scenes where some of the stars are lost.
Setting DitherY and DitherC to a lower value (I prefer 16 for each) as stated by SAPikachu and myself will help improve detail.

Last edited by ryrynz; 24th July 2011 at 01:00.
ryrynz is offline   Reply With Quote
Old 26th July 2011, 21:26   #49  |  Link
hetrinity
Registered User
 
Join Date: Apr 2010
Posts: 2
Thanks & Request

Thanks everyone for your input. I have a quick question. I'm not sure if the avsinput for MediaCoder will work with 64 bit avisynth, but, I have all my filters in 64 bit, except for your flash3kyuu_deband. Do you have a current 64 bit version made, or planned for later down the road? Thanks again!
hetrinity is offline   Reply With Quote
Old 27th July 2011, 01:37   #50  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
I have plan to make a 64bit version, but it has low priority and I have been very busy recently, so it may take some time to complete...
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 1st August 2011, 11:17   #51  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Released 1.2.0.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 9th August 2011, 07:35   #52  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,192
Thank you SAPikachu, looking forward to the 16bit internal precision.
ryrynz is offline   Reply With Quote
Old 7th September 2011, 10:33   #53  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Released 1.3.0. Added x64 version.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 8th September 2011, 19:00   #54  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,043
VERY very nice!
mp3dom is offline   Reply With Quote
Old 13th September 2011, 01:39   #55  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,394
f3kdb_dither, but how to feed 10bit file


Andrew
kolak is offline   Reply With Quote
Old 13th September 2011, 03:48   #56  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Quote:
Originally Posted by kolak View Post
f3kdb_dither, but how to feed 10bit file


Andrew
You need a source filter that can output high bit-depth data. But I don't know any h264 source filter with high output at this time (Actually f3kdb_dither is originally made for raw source filters, not 10bit h264). Maybe someone can modify ffms2 to add this functionality.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 13th September 2011, 10:51   #57  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,043
I think kolak means not to input a 10bit AVC file but rather a raw 10bit (like v210 avi/mov). AVS plugins actually manages 8bit (truncated or dithered) from a 10bit source and BlackMagic codecs or AE internally made a colorspace conversion to RGB. What we needs is something like a v210 input plugins that outputs a (16bit?) stacked clip so flash and other dither tools can then be used to dither a 10bit clip directly and output a final 8bit clip.
mp3dom is offline   Reply With Quote
Old 13th September 2011, 16:07   #58  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,394
Yes- I would like to feed v210 for dithering to 8bit.
kolak is offline   Reply With Quote
Old 14th September 2011, 02:22   #59  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Sorry that I misunderstood the problem. As far as I know you need RawReader (Sashimi) and mt_lut to load the file as correct format, like http://forum.doom9.org/showthread.ph...highlight=v210 . I will try to figure it out later today.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 14th September 2011, 11:05   #60  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Just completed the script. I tested it on two samples from http://samples.mplayerhq.hu/V-codecs/v210/ (the 720p one need to be converted to mov container first). Script needs avisynth 2.6.

file_head needs to be manually figured out for other files. Open the file in a hex editor, find last "mdat" tag in ASCII view (won't be too far from start), file_head is offset of the immediately followed byte.

EDIT: There are special cases, see http://forum.doom9.org/showthread.ph...77#post1526877 .

Code:
# modified from http://forum.doom9.org/showthread.php?p=1469679#post1469679

function readv210(string fn, int file_head, int frame_width, int frame_height, bool "flip") {
    
    line_size = (frame_width * 16 / 6 + 127) / 128 * 128 # all lines are padded to 128 bytes boundary
    
    base=RawReader (fn, format="y8", width=line_size, height=frame_height, numframes=0, filehead=file_head, framehead=0, flip=default(flip,false))
    
    
    p0=base.every(4,0)
    p1=base.every(4,1)
    p2=base.every(4,2)
    p3=base.every(4,3)
    
    lsb0=mt_lut(p0,yexpr="x 6 <<u 255 &u")
    msb0=mt_lutxy(p0,p1,yexpr="x 2 >>u y 6 <<u |u 255 &u")
    out0=StackVertical(msb0, lsb0)
    
    lsb1=mt_lut(p1,yexpr="x 2 >>u 6 <<u 255 &u")
    msb1=mt_lutxy(p1,p2,yexpr="x 4 >>u y 4 <<u |u 255 &u")
    out1=StackVertical(msb1, lsb1)
    
    lsb2=mt_lut(p2,yexpr="x 4 >>u 6 <<u 255 &u")
    msb2=mt_lutxy(p2,p3,"x 6 >>u y 2 <<u |u 255 &u")
    out2=StackVertical(msb2,lsb2)
    
    weave3h(out0,out1,out2)
    
    y=last.every(2,1)
    u=last.every(4,0)
    v=last.every(4,2)
    
    # return last
    YToUV(u, v, y)
    
    Crop(0,0,frame_width,0)
    
    f3kdb_dither(stacked=true)


}

function every(clip v, int n, int offset) {#select every n bytes horizontally with offset, works on yv12 only
  v
  w=width
  h=height
  pointresize(v,w*2,h)
  crop(offset*2,0,0,0).addborders(0,0,offset*2,0)#shift left offset pixels
  pointresize(w/n,h)
}

function weave3h(clip a, clip b, clip c) {#horizontally weave 3 clips
  a=a.turnright
  b=b.turnright
  c=c.turnright
  
  interleave(a,c,b,c) # a c b c -> ac bc -> abcc
  assumefieldbased
  assumetff
  weave
  assumefieldbased
  assumetff
  weave
  
  # From http://avisynth.org/mediawiki/Advanced_Scripting_Tips:
  
  # In RGB, PointResize deletes the first of each group of 4 lines. 
  # However, in YUV modes, it deletes the last of each group of 4 lines. 
  pointresize(width,height*3/4)
  turnleft
}


LoadPlugin("flash3kyuu_deband.dll")

# readv210("output.mov", 36, 640, 480, flip=true)

# readv210("coff3.mov", 1103, 176, 144)

readv210("v210_720p.mov", 36, 1280, 720)
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3

Last edited by SAPikachu; 17th September 2011 at 02:01.
SAPikachu is offline   Reply With Quote
Reply

Tags
avisynth, deband

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.