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. |
26th August 2004, 12:27 | #21 | Link | ||
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
Quote:
|
||
26th August 2004, 13:04 | #22 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
A sidenote should be that the MMX-extensions kassandro mentions are also refered to as Integer SSE, which is present on 95% of all processors using AviSynth today.
However, I didn't find any obvoius places it would make sense to apply. A thing you use a lot: Code:
mov ebx,043544354h ; 32768*0.526 movd mm2,ebx
__________________
Regards, sh0dan // VoxPod Last edited by sh0dan; 26th August 2004 at 13:15. |
26th August 2004, 15:24 | #23 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
I guess I'll fix that and do a comparison; are you sure the difference will be really noticeable? (EDIT: Okay, so my test script went from 338 FPS to 342 FPS with this change; good to have, but still hardly noticeable...) Then again, I also made the mistake to use MOVNTQ for writing to the target buffer after reading it's description in Intel's docs thoroughly, only to discover that it tears the filter's performance to shreds... np: Komeit - When The Sun Hits (Blue Skied An' Clear comp.) Last edited by Leak; 26th August 2004 at 16:19. |
|
26th August 2004, 15:31 | #24 | Link | ||||
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
Quote:
Quote:
Quote:
It's already a lot faster than the last version, and I'm quite happy about that, and to be totally honest I did it to be able to integrate part of it into BlendBob... np: The Notwist - Trashing Days (Neon Golden) |
||||
26th August 2004, 23:24 | #25 | Link |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
New Version 1.5.1
KernelDeint 1.5.1 (with source) (Old version; see first post for newest version)
This version includes the changes sh0dan suggested (which resulted in a small speedup) and doesn't read beyond the end of frames anymore if your pitch doesn't happen to be a multiple of 8. EDIT: There's one other change I forgot - in 1.5.0 the order parameter was inverted for RGB32 video; is anybody even using it for that? Still, if your pitch isn't evenly divisible by 8, you'll get a minor drop in speed if the frame is still aligned on an 8 byte boundary (for example if you just crop off something to the right), but you'll get a bigger speed drop if that's not the case as unaligned memory access just plain takes longer (which can happen when you cut off stuff on the left with crop) - in that case, always use "align=true" with crop. Or, in numbers: Code:
Testclip FPS ============================= === Normal 332 Crop(0,0,716,480,align=false) 329 Crop(2,0,716,480,align=false) 282 Crop(2,0,716,480,align=true) 325 np: Markus Guentner - Sleep Well (Audio Island) Last edited by Leak; 15th January 2005 at 19:47. |
27th August 2004, 00:26 | #26 | Link | |
Registered User
Join Date: Jun 2003
Location: Northampton, England
Posts: 187
|
Quote:
It seems to me that the aim of a "proper" bobber would be to return each field to to it's full resolution - which may involve different strategies than that of a deinterlacer thats aiming to give best results for 25 fps or 29.97 progressive output. I hope that made some sort of sense. |
|
27th August 2004, 13:59 | #27 | Link | |
Registered User
Join Date: Aug 2002
Posts: 467
|
Quote:
Deinterlacing is basically the process of creating the progressive frames from the interlaced input. But the term also seems to have evolved into the process that outputs progressive frames at the input frame rate (i.e. PAL would result in 25 progressive fps, while NTSC would result in 29.97 progressive fps), normally to improve video encoding by feeding progressive instead of interlaced frames to the codec. In my book, technically inverse telecine is deinterlacing as well, but it's so specific to film (and the output for NTSC is not the input frame/field rate) I think it's a class of its own. So at the risk of being pedantic, I guess I'd say a "proper deinterlacer" would use any technique possible (including inverse telecine, field matching, etc.) to create a progressive output at the input frame rate (25 or 29.97), while "proper bob" would use the same techniques to create a progressive output at the input field rate (50 or 59.94). BTW, my interest in deinterlacing is for standards conversion, so bob is much more useful to me . Oh, and just to throw out a little controversy , the better the deinterlacer, the harder the image will be to compress. So saying that the output of a particular deinterlacer is "harder to compress" can mean the quality is better! [To prove this, you'd need perfect deinterlacing. The closest we have is inverse telecine. So if you don't believe me, take a telecined video and IVTC it, and compare compressing this to a video deinterlaced using your favorite deinterlacer. (Be sure to match frame rates.) Barring out-and-out failures of the deinterlacer (combing left in), the IVTC should be at least as difficult to compress, and usually more difficult.] Xesdeeni |
|
28th August 2004, 15:21 | #28 | Link |
Registered User
Join Date: Apr 2003
Location: Lancaster, CA
Posts: 89
|
The shiny packages reference to the chroma artifacts possibly being lessened doesn't seem to hold true for all the things I've tried so far.
Wondering if anyone else has though? And what type of source? Dealing mostly with anime's here and the 1.4.0 and 1.5.1 images look exactly the same. Last edited by Nicholi; 28th August 2004 at 16:06. |
28th August 2004, 15:54 | #29 | Link | ||
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
Quote:
Also, what I've fixed was one kind of chroma artifacts (which produced some faint chroma ghosting when one plane was deinterlaced and the other wasn't), I didn't say it'd fix _ALL_ possible chroma artifacts; if you mean the slight ghosting KernelDeint causes now and then then that's something inherent in the algorithm that can't be avoided. Try using a threshold of 0 on the images you get artifacts on, if they stay they're not of the kind that my change fixes. np: Sole - Teepee On A Highway Blues (Selling Live Water) |
||
28th August 2004, 16:11 | #30 | Link |
Registered User
Join Date: Apr 2003
Location: Lancaster, CA
Posts: 89
|
Err yeah sorry. Edited accordingly. I suppose we are talking about different things, my mistake. I speak of the usual "ghosted" lines from the deinterlaced movement. Already on thresh=0 also.
I would upload the pics if I could, but alas I have no webhost or such. So it seems what I was looking for is not actually here, heh. And also unavoidably removed...oh well. There is always Sangnom to alternate with on occasion. Thank you for continu'ing work on an already great filter however. KernelDeint is my default choice for deinterlacing, and mayhaps when DG returns he will hopefully implement your hard work. |
28th August 2004, 16:56 | #31 | Link |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Nicholi, - For image hosting try this. It is great. You don't even have to register.
__________________
How to Optimize Bitrate for CCE multipass |
6th September 2004, 16:30 | #32 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
There seems to be something wrong with KernelBob.
With this script I get a bad result: MPEG2Source("c:\temp\captures\startrek.d2v",idct=7) KernelBob(order=1,sharp=true,threshold=7) SeparateFields() SelectEvery(4,1,2) Weave() With this script it's OK: MPEG2Source("c:\temp\captures\startrek.d2v",idct=7) KernelBob(order=1,sharp=true,threshold=7) ConverttoYUY2() SeparateFields() SelectEvery(4,1,2) Weave() Here are the screenshots: YV12 YUY2 The original material If I replace KernelBob with a simple Bob(), both scripts give a proper result. I didn't test whether the v1.4.0 with scharfis_brain's function would behave the same way. The screenshots are not exactly at the same frame so don't pay attention to that. Just pay attention to the amount of combing in the subtitles in the YV12 version. The funny thing is that this weird behaviour is not seen throughout the whole clip, it's just a small portion in the middle. I also tried order=0 and SelectEvery(4,0,3) but it didn't help.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
6th September 2004, 17:31 | #33 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Just tried it with KernelDeint v1.5.1 and scharfis_brain's function from the Restore24 package, and it gives a correct output without a need to convert to YUY2. So there's something wrong with Leak's implementation of the function
Code:
function kernelbob(clip a, int "th",bool "mask") { mask=default(mask,false) th=default(th,5) ord = getparity(a) ? 1 : 0 f=a.kerneldeint(order=ord, sharp=true, twoway=false, threshold=th,map=mask) e=a.separatefields.trim(1,0).weave.kerneldeint(order=1-ord, sharp=true, twoway=false, threshold=th,map=mask) interleave(f,e).assumeframebased }
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
6th September 2004, 18:15 | #34 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
Also, could you cut out a short part of that sequence and upload it somewhere? I'm pretty sure it's got something to do with the order of the fields getting passed into MotionMask, but I can't put my finger on it... np: Plaid - Crumax Rins (Spokes) |
|
6th September 2004, 18:17 | #35 | Link |
member
Join Date: Oct 2003
Location: Belgium
Posts: 106
|
I have noticed that with Leak's KernelBob I have to use SelectEvery(4,0,3) to maintain the field order. If I use SelectEvery(4,1,2) the field order is reversed. This happens with both TFF and BFF sources.
No matter what the source is, with scharfis_brain's kernelbob function I have to use SelectEvery (4,1,2) to get TFF, and SelectEvery(4,0,3) to get BFF. |
6th September 2004, 18:28 | #36 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
np: Plaid - Assault On Precinct Zero (Double Figure) |
|
6th September 2004, 18:35 | #37 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
OK, I'll do the test and get you a small sample tomorrow - unfortunately I probably won't have the time today
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
6th September 2004, 18:39 | #38 | Link |
member
Join Date: Oct 2003
Location: Belgium
Posts: 106
|
I just ran a short test and with AssumeFrameBased after KernelBob it behaves like scharfis_brain's kernelbob function: SelectEvery(4,1,2) results in TFF, SelectEvery(4,0,3) results in BFF.
EDIT: as far as the field order is concerned, Avisynth's internal Bob() command works like scharfis_brain's kernelbob function. Last edited by erratic; 6th September 2004 at 19:47. |
6th September 2004, 18:39 | #39 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
that's bizarre, because i haven't encountered this at all and i've been using the leak version since it was released.
maybe i should check my plugin directory for avsi files with kernelbob in them?
__________________
sucking the life out of your videos since 2004 |
6th September 2004, 18:55 | #40 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
Try this: add a call to Info() after KernelBob() and then add a AssumeFrameBased() in between and compare the parity... Still, a AssumeFrameBased() after KernelBob() should do the trick until I release the next version; it's just that I currently don't have much time to work on AviSynth filters... Now I'm just wondering if that was what bit Boulder as well... np: The Black Dog - Frisbee Skip (Spanners) |
|
|
|