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. |
![]() |
#1 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Partially debugged version of the MaskTools : 1.5.6
I corrected the issue with functions Inpand / Expand ( and normally also Inflate / Deflate, but I didn't check these ones ).
There were in fact several issues, one of them being the MMX version of these functions, so for the moment, you can't have these 4 functions mmxed. Please report any bugs / slowdown you may encounter with this version. Especially slowdown in fact, since I'm clearly no expert with VC++ ( first time I used it ). I only checked speed with Binarize, it was as fast as with the former version ( 1.4.1 ), so I hope it'll the same with other functions. Finally, I didn't ask Kurosu the permission to do that ( no mail adress in his readme ), so I hope he won't mind. You'll find the new version here Edit : Inflate and deflate work too. Last edited by Manao; 3rd January 2005 at 07:39. |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Chainmax : it would be possible, with a lot of time. But I don't really think it's useful, since most of the filters are working in YV12 ( except Dust ). So it's not one of my priorities yet. For what purpose would you have the use of an YUY2 version ?
K-Dash : link is working, I'll make myself clearer : right click on the link, do 'copy adress', paste it in your adress bar, it'll work ( at least it's working for me ). I emphasised that sentence in my first post. @all : I'll be away from my computer for 2 weeks soon, so I'll cope with the most obvious bugs first ( and there are plenty ). Another version should be up for tomorrow, correcting the multiple use of a same function with different mode. ( right now, except for expand / inpand / deflate / inflate, using more than once a function with a different mode always applies the function with the same mode ). Edit : oups, my bad, only the 4 I corrected were subject to this bug. I should have read the changelog ![]() Last edited by Manao; 21st December 2003 at 22:26. |
![]() |
![]() |
![]() |
#6 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Originally posted by Manao:
Chainmax : it would be possible, with a lot of time. But I don't really think it's useful, since most of the filters are working in YV12 ( except Dust ). So it's not one of my priorities yet. For what purpose would you have the use of an YUY2 version ? Well, one of the best de-rainbowers out there (sh0dan's script) uses MaskTools. It would be awesome to be able to use it on TV captures without having to make an extra colorspace conversion. I don't know what MaskTools functions it uses, though. |
![]() |
![]() |
![]() |
#9 | Link | |
Retired AviSynth Dev ;)
![]() Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
Quote:
__________________
Regards, sh0dan // VoxPod |
|
![]() |
![]() |
![]() |
#10 | Link | |
·
Join Date: Jan 2002
Posts: 1,729
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
sh0dan: does that version perform as good as the "30% faster" YV12 one? I don't mind a little less speed if the results regarding IQ are the same.
mf: thanks for the link, but I don't understand how that can help me use a YV12 filter on a YUY2 source without having to make a colorspace conversion. |
![]() |
![]() |
![]() |
#12 | Link | |
·
Join Date: Jan 2002
Posts: 1,729
|
Quote:
input = last input.Greyscale().ConvertToYV12() y = last input.UToY().ConvertToYV12() u = last input.VToY().ConvertToYV12() v = last y.Sh0dansl33tscript().ConvertToYUY2() yprocessed = last u.Sh0dansl33tscript().ConvertToYUY2() uprocessed = last v.Sh0dansl33tscript().ConvertToYUY2() vprocessed = last YToUV(uprocessed, vprocessed, yprocessed) Seeing what you want is rainbow removal, you can probably leave out the processing of the luma channel (y). |
|
![]() |
![]() |
![]() |
#13 | Link |
Retired AviSynth Dev ;)
![]() Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
Exactly. However the rainbow tool requires luma and chroma to be reliable as they are interdependant. The YUY2 script in this thread does however account for this and it filters YUY2 chroma without affecting chroma resolution, by using an approach like mf's suggestion.
I don't think the speed is much lower than YV12 anyway.
__________________
Regards, sh0dan // VoxPod |
![]() |
![]() |
![]() |
#14 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
New version, correcting some bugs ( 3DNow intructions should have been removed, some optimizations have been disabled because they gave a different output than the non optimized one ), and optimizing Binarize and Invert ( they were the simplest ).
Get it here ( copy & paste, as usual ) There should be bugs, so I'm waiting the bug report. |
![]() |
![]() |
![]() |
#15 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
mf, kurosu and the others : since AviSynth 2.54 alpha, there is an 'overlay' filter inside AviSynth which works in YV12 and do the job of MaskedMerge, YV12Layer and YV12Substract ( and more )
I'm wondering whether to let these filters in the next release, as soon as AviSynth 2.54 is out. What do you think of it ? |
![]() |
![]() |
![]() |
#16 | Link |
·
Join Date: Jan 2002
Posts: 1,729
|
Well, as long as Overlay is C only I'm not using it. I was already relieved the change to YV12 gave a speed boost (although not on my PC - the same old 3fps), and I'm not going to make it slow just to keep it to internal AVS filters.
|
![]() |
![]() |
![]() |
#17 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
I looked more closely to the source code, Overlay do use MMX optimizations. However, I didn't see Overlay was converting YV12 to YUY2, so using it is not an option yet. So I'll let these functions inside the MaskTools.
I tested MMX optimizations in MaskedMerge ( they are currently disabled ), there are not very effective, at least for me. So I'll try to improve them ( though I'm not sure I'll succeed ). Edited : Damn, I was wrong one more time. Optimizations _are _ effective with MaskedMerge, I did forget to enable them ![]() I'll test them and make another build available soon. Edited 2 : Build available, with optimizations back for MaskedMerge. The optimized filters are : MaskedMerge, YV12Layer, YV12Subtract, Binarize, Invert, EdgeMask ( Robert, Special, Sobel, Cartoon only ) and FastFitPlane. I modified optimizations for Binarize only, and there will be problems if these optimizations are used with an offset, so I added a usemmx parameter, defaulted to true, which allows to disable mmx for Binarize. Unless there are bugs report, there should not be any other version for a moment, at least from me. Last edited by Manao; 5th January 2004 at 22:54. |
![]() |
![]() |
![]() |
#18 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
OK, new version, with a new filter : MotionDetection. It builds the mask of the moving pixels.
Here is the changelog : 1.4.5 - Added MotionDetection filter, no MMX / assembler optimizations for it yet. It takes the idea of Sansgrip's filter (NoMoSmooth) and outputs the motion mask directly in the correct colorspace for the MaskTools. So basically it's an adaptation of NoMoSmooth to YV12 with giving the choice to the user of the spatial filter he wants to use. But since I only took the algorithm of SansGrip, not his code, bugs are waiting to be discovered. Optimizations will come later. I updated the link on the first page. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|