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. |
17th August 2004, 15:54 | #22 | Link | ||
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
Quote:
|
||
17th August 2004, 16:01 | #23 | Link | |
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
|
|
17th August 2004, 16:08 | #24 | Link | |
Registered User
Join Date: Nov 2003
Posts: 1,281
|
Quote:
|
|
17th August 2004, 16:39 | #25 | Link |
Registered User
Join Date: Nov 2003
Posts: 1,281
|
I love this filter.
6000 frame clip (Clean PAL DVD) single pass, const. quant 2, with no filter's returned 2979kbps bitrate. With Undot(), returned 2828kbps With removegrain(), returned 2662kbps bitrate. With removegrain() and unfilter(-5,-5) returned 2328kbps. Thankyou again. |
17th August 2004, 20:20 | #26 | Link | |
Registered User
Join Date: Nov 2001
Posts: 291
|
@kassandro
First of all thanks for the great work you're doing. Second I want to make a question about a reference of Undot you've posted. Quote:
Thanks ARDA Last edited by ARDA; 17th August 2004 at 20:23. |
|
18th August 2004, 11:37 | #27 | Link | |
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
Code:
input=MPEG2Source("test.d2v") Undot_clip=Undot(input) RemoveGrain_clip=RemoveGrain(input, mode=1) difference(Undot_clip, removegrain_clip) Running the script with Vdubmod I was surprised to get the following output from debugview: Code:
[1016] [129] total difference = 1, different Pixels 1 [1016] [130] total difference = 3, different Pixels 3 [1016] [131] total difference = 2, different Pixels 2 [1016] [132] total difference = 1, different Pixels 1 [1016] [133] total difference = 2, different Pixels 2 [1016] [134] total difference = 4, different Pixels 4 [1016] [135] total difference = 5, different Pixels 5 [1016] [136] total difference = 4, different Pixels 4 [1016] [137] total difference = 5, different Pixels 5 [1016] [138] total difference = 3, different Pixels 3 Code:
input=MPEG2Source("test.d2v") Undot_clip=Undot(input) Undot_clip=crop(Undot_clip, 2,2,-2,-2) RemoveGrain_clip=RemoveGrain(input, mode=1) RemoveGrain_clip=crop(RemoveGrain_clip, 2,2,-2,-2) difference(Undot_clip, removegrain_clip) Code:
[1016] [204] total difference = 0, different Pixels 0 [1016] [205] total difference = 0, different Pixels 0 [1016] [206] total difference = 0, different Pixels 0 [1016] [207] total difference = 0, different Pixels 0 [1016] [208] total difference = 0, different Pixels 0 [1016] [209] total difference = 0, different Pixels 0 [1016] [210] total difference = 0, different Pixels 0 [1016] [211] total difference = 0, different Pixels 0 [1016] [212] total difference = 0, different Pixels 0 Code:
input=MPEG2Source("test.d2v") Undot_clip=Undot(input) Undot_clip=crop(Undot_clip, 0,0,-4,0) RemoveGrain_clip=RemoveGrain(input, mode=1) RemoveGrain_clip=crop(RemoveGrain_clip, 0,0,-4,0) difference(Undot_clip, removegrain_clip) Code:
[1016] [251] total difference = 0, different Pixels 0 [1016] [252] total difference = 0, different Pixels 0 [1016] [253] total difference = 0, different Pixels 0 [1016] [254] total difference = 0, different Pixels 0 [1016] [255] total difference = 0, different Pixels 0 [1016] [256] total difference = 0, different Pixels 0 [1016] [257] total difference = 0, different Pixels 0 [1016] [258] total difference = 0, different Pixels 0 [1016] [259] total difference = 0, different Pixels 0 [1016] [260] total difference = 0, different Pixels 0 [1016] [261] total difference = 0, different Pixels 0 Code:
// do last qword lea esi, [esi+eax-8-BPP] // point at last qword movq mm0, qword ptr[esi+ebx] // move 1st 4 pixel movq qword ptr[edi+eax-8], mm0 |
|
18th August 2004, 11:44 | #28 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Heh, that's one nice post about troubleshooting Maybe you should notify trbarry so that he might fix the bug once he has the time. I haven't seen him in a while though.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
18th August 2004, 20:06 | #30 | Link |
Registered User
Join Date: Nov 2001
Posts: 291
|
@kassandro
Thanks for the long explanation, I think it is very instructive; at least for me. I've borrowed this function modified a little and moving the slide in virtualdub could see the difference between your plugin and undot on the right side of amplified difference; and as you say it's hardly noticeble. Code:
clip=MPEG2Source("mysource") v1 =clip.UnDot v2 =clip.RemoveGrain(mode=1) sub = v2.subtract(v1) substrong = sub.levels(122,1,132,0,255) v3 = StackVertical(StackHorizontal(substrong.subtitle("Difference amplified"), \v1.subtitle("UnDot")),StackHorizontal(sub.subtitle("Difference"),v2.subtitle("original"))) return v3 ARDA |
18th August 2004, 21:36 | #31 | Link |
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
@Boulder:
Yes, I haven't seen trbarry here for quite a while. He seems to be busy with other things. I will draw his attention to this slight problem, when he returns. @ARDA: Thanks for the nice sript. Actually, my input source was not very suitable for the test this morning. It had a black stripe on the right hand side. Thus the penultimate and the last pixel on a line were almost always identical. Only noise did give small differences. Cropping away the black stripe, your script displayed the differences nicely. Actually it shows that the chroma difference effects the last two pixels on the right hand side. Since trbarry's assembly routine is nearly the same for YUY2, but with BPP=2 instead of BPP=1 for YV12, the same copying mistake is made for YUY2. On the other hand for YUY2, Undot and RemoveGrain(mode=1) cannot be compared, because Undot doesn't process the chroma of YUY2 clips. He could have done it with nearly the same assembly routine and BPP=4, but more attention at the border would have been necessary. Thus Undot and RemoveGrain(mode=1, modeU=0) are nearly identical for YUY2, but for YUY2 Undot is much faster. |
20th August 2004, 04:36 | #32 | Link | |
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
Of course you can use my code. However, as I mentioned earlier, the programming style is very different from trbarry's. Because I have always SSE2 in mind, I use macros where SSE and SSE2 differ, which makes the code more difficult to understand. Understanding is also hampered by my passion to overoptimise. Though the SSE2 code doesn't work currently, I should be able to fix it easily once I have a SSE2 capable cpu. In the end, we all have to switch to SSE2, because the Athlon64 platform, which will abolish the current 32 bit platform within 2 years, because Intel has adopted it, has no mmx registers anymore in 64 bit mode. Rather it has 16 SSE 128 bit registers. It would have been much better to have 8 256 bit registers instead, with which one could easily double dct/idct performance and process 32 pixels instead of 16 simultaneously with various Avisynth filters. |
|
20th August 2004, 19:29 | #33 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
Kassandro,
Thanks for your permission! I am quite easy understand your code. It is very well optimized and structured. I already put it to my filter beta (will be released soon, of course under GPL). But i remove SSE2. About SSE2. I think its time is not come for the present (not compatible with Athlon XP, so SSEMMX is standard now). I do not think, that SSE2 speed can be used in every filter. And the speed is not most important thing, but algo and quality (for me). But the next generation of filter-writers will use SSE4 of course! BTW, why you do not like Adobe so much? |
29th August 2004, 12:38 | #34 | Link |
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
SSE2 bug, I got you!
If there are no special restrictions, like in RemoveDirt, where the block size is fixed, then one should be able to produce a SSE and an SSE2 version simultaneously by using some simple macros for registers and some load and store instructions. I just learned that there is one important difference, which I am was completely unaware, when I made RemoveGrain. For 128 bit memory operands of instructions like paddusb, pminub etc. the memory operand must always be aligned (i.e. the address must be a multiple of 16), while 64 bit operands as used for SSE are allowed to be unaligned. I have to blame Intel for my ignorance, because Intel always speaks only of 128 bit memory operands and not of 128 bit aligned memory operands. Only when Intel discusses exceptions, which I never read, because I simply do not expect such exceptions for my programs, then one can read, that a memory alignment error triggers a read access exception, as reported by Boulder. Fortunately I read at least one time the exception stuff and then everything was obvious for me. Now it is my programming style to load into a register, if the data is used more than once (that is a key difference between Undot and RemoveGrain(mode=1)), because only one instruction with a memory operand can be executed at a time (that is the reason why RemoveGrain(mode=1) is about 4 fps faster than Undot). Thus for some modes I don't use at all instructions with a memory operands and these were exactly the modes reported to work by Boulder.
I just uploaded a new SSE test version (it must be called with DRemoveGrain) to the web site. The other parts of the binary archive as well as the source archive have not changed. The SSE2 problem should now be fixed, though I may have overlooked 1 or 2 instructions with a memory operand. |
29th August 2004, 13:21 | #36 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
OK, I tested the SSE2 version. It looks like all the other modes except number 4 work and produce no differences compared to the SSE version, viewed with DebugViewer. If I use mode=4, VirtualDubMod just closes without giving any error messages whatsoever.
Here's another bug as well, I noticed it earlier but forgot to post If I use modeU=-1 to disable chroma processing, I first get a screen like this: After scrolling for a few dozen frames in VDubMod, the output turns like this (notice the odd ghosting) : If I use modeU=0, everything's OK. With mode=-1, I also get weird results. This occurs on both SSE and SSE2 version.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
29th August 2004, 13:57 | #37 | Link | ||
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
Quote:
If you you use mode=-1, then the luma becomes random as well. Of course, this doesn't make sense even for b&w material. |
||
29th August 2004, 14:06 | #38 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Quote:
When can we expect the v0.6?
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
29th August 2004, 15:16 | #39 | Link | ||
Registered User
Join Date: May 2003
Location: Germany
Posts: 502
|
Quote:
Now already, Fizick in his denoiser plugin, made a temporal extension of RemoveGrain mode 5-9, but for mode=9 (trbarry's ST-median) an additional change limitation is necessary to avoid very unpleasant artifacts. While this temporal extension makes a lot of sense, the gain over the purely spatial variants is limited. Like RemoveGrain with mode >=5 it can never remove grain consisting of three equal pixels on a line segment, even if this piece of grain is only on one frame. Thus Fizick can't really exploit the temporal nature of grain either. That will change with RemoveDust. I will supply various compression comparisons of RemoveDust with RemoveGrain and DeGrainMedian. A comparison with convolution based smoothers doesn't make sense to me. Quote:
Last edited by kassandro; 29th August 2004 at 15:25. |
||
29th August 2004, 15:26 | #40 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|