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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th June 2015, 21:38   #1  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,020
edge side bleed? need help

hi all

I wonder if there is a solution for such a problem



It occurs in white or black edges
__________________
My Avisynth Stuff

Last edited by real.finder; 7th November 2015 at 23:10.
real.finder is offline   Reply With Quote
Old 30th June 2015, 00:15   #2  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,020
and here another frame (same source) to show it in black edge



See debris on the Moon

and you can use Histogram("luma") to see the one that outside the moon clearly
__________________
My Avisynth Stuff

Last edited by real.finder; 30th June 2015 at 00:27.
real.finder is offline   Reply With Quote
Old 30th June 2015, 10:51   #3  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 312
I had a quick attempt at this. It's kind of slow and you could optimise it by replacing all the raveragew calls with just dither_resize16. (I mean, I'm assuming the latter is faster for doing a two-tap convolution. I didn't actually benchmark that.)

Code:
ImageReader("O:\XTkOH35.png")
showgreen("y8")
w1 = 0.6
w2 = 0.02
w4 = 0.02
w8 = 0.02
w16 = 0.02
w32 = 0.01
dither_convert_8_to_16()
shift32 = dither_resize16(width(),height()/2,src_left=-32)
raveragew(last,1+w32,shift32,-w32,lsb_in=true,lsb_out=true,mode=0)
shift16 = dither_resize16(width(),height()/2,src_left=-16)
raveragew(last,1+w16,shift16,-w16,lsb_in=true,lsb_out=true,mode=0)
shift8 = dither_resize16(width(),height()/2,src_left=-8)
raveragew(last,1+w8,shift8,-w8,lsb_in=true,lsb_out=true,mode=0)
shift4 = dither_resize16(width(),height()/2,src_left=-4)
raveragew(last,1+w4,shift4,-w4,lsb_in=true,lsb_out=true,mode=0)
shift2 = dither_resize16(width(),height()/2,src_left=-2)
raveragew(last,1+w2,shift2,-w2,lsb_in=true,lsb_out=true,mode=0)
shift1 = dither_resize16(width(),height()/2,src_left=-1)
raveragew(last,1+w1,shift1,-w1,lsb_in=true,lsb_out=true,mode=0)
ditherpost(mode=-1)
# insert dehaloing filter of choice here
I just randomly typed out some coefficients and it turned out semidecent, but I'm sure it's possible to tweak them for a much better result. Also might need further tweaking for the chroma channels.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 30th June 2015, 15:43   #4  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,020
Quote:
Originally Posted by colours View Post
I had a quick attempt at this. It's kind of slow and you could optimise it by replacing all the raveragew calls with just dither_resize16. (I mean, I'm assuming the latter is faster for doing a two-tap convolution. I didn't actually benchmark that.)

Code:
ImageReader("O:\XTkOH35.png")
showgreen("y8")
w1 = 0.6
w2 = 0.02
w4 = 0.02
w8 = 0.02
w16 = 0.02
w32 = 0.01
dither_convert_8_to_16()
shift32 = dither_resize16(width(),height()/2,src_left=-32)
raveragew(last,1+w32,shift32,-w32,lsb_in=true,lsb_out=true,mode=0)
shift16 = dither_resize16(width(),height()/2,src_left=-16)
raveragew(last,1+w16,shift16,-w16,lsb_in=true,lsb_out=true,mode=0)
shift8 = dither_resize16(width(),height()/2,src_left=-8)
raveragew(last,1+w8,shift8,-w8,lsb_in=true,lsb_out=true,mode=0)
shift4 = dither_resize16(width(),height()/2,src_left=-4)
raveragew(last,1+w4,shift4,-w4,lsb_in=true,lsb_out=true,mode=0)
shift2 = dither_resize16(width(),height()/2,src_left=-2)
raveragew(last,1+w2,shift2,-w2,lsb_in=true,lsb_out=true,mode=0)
shift1 = dither_resize16(width(),height()/2,src_left=-1)
raveragew(last,1+w1,shift1,-w1,lsb_in=true,lsb_out=true,mode=0)
ditherpost(mode=-1)
# insert dehaloing filter of choice here
I just randomly typed out some coefficients and it turned out semidecent, but I'm sure it's possible to tweak them for a much better result. Also might need further tweaking for the chroma channels.
thank you, your idea will help

and using this http://forum.doom9.org/showthread.ph...01#post1177901 after your code will make it better

yes there are similar problem in chroma in this source http://forum.doom9.org/showthread.php?p=1715113
__________________
My Avisynth Stuff

Last edited by real.finder; 7th November 2015 at 23:09.
real.finder is offline   Reply With Quote
Old 5th February 2017, 08:47   #5  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,020
if anyone has this type of artifacts, I made function that based on colours idea (with a lot of edits and speed up), it's edgesidebleed(), it's also in the same script that has sanimebob()
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Reply

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 07:20.


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