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 17th January 2008, 01:14   #1  |  Link
Tim Bate
Registered User
 
Join Date: Jul 2007
Posts: 7
Can't find SSIM 0.25

I am a bit of a newbie with AVISynth. I'm trying to do some time-based demuxing using SSIM as a metric. I have a rudimentary script going with SSIM version 0.23, but I'm hoping version 0.25 might improve things. 0.23 doesn't seem to have SSIM_AVG, whereas 0.25 seems to?

I have seen this thread and found many links to later versions, but they were all broken, or when I unzipped them, actually contained version 0.23 (even though the zips claimed 0.25.) Can anyone help me out? Then I can go onto my next big conundrum!

P.S. I have had a lot of trouble compiling the source to DLLs using LCC, so if someone has a compiled DLL, that would be lovely!

Thanks in advance.

Last edited by Tim Bate; 17th January 2008 at 01:16.
Tim Bate is offline   Reply With Quote
Old 17th January 2008, 01:35   #2  |  Link
mitsubishi
Registered User
 
Join Date: Sep 2006
Location: UK
Posts: 416
I don't see mention of v0.25 in that thread, where are the source files?

BTW I use 0.23 and it gives me average SSIM just fine if that is what you mean.
mitsubishi is offline   Reply With Quote
Old 17th January 2008, 03:40   #3  |  Link
Tim Bate
Registered User
 
Join Date: Jul 2007
Posts: 7
Just using SSIM (version 0.23) gives me the average (in a separate file) as well as the results. However, in the thread, there appears to be use of a function "SSIM_AVG". From a post by LeFungus, you can see what I mean:

Quote:
Sh0dan has added conditionnal functions, so the ssim metric could be used in conditionnal scripts.

For example:
Code:
a=avisource("c:\blah.avi")
b=a.filter()
return conditionalfilter(a,b,a,"SSIM_AVG(a,b)","<","0.98",true)
will return b, if ssim(a,b)>0.98, or a if b is bad ssim-wise (meaning it may filter too much). 0.98 is an arbitrary value, and should be replaced by your own adequate value.

It may also be used in a 3-pass encoding scenario, when you filter more encoded frames, that have a too low ssim value.

Code:
a=avisource("c:\blah.avi")
b=a.filter()
c=avisource("c:\blah-2pass-encoded.avi")
return conditionalfilter(a,b,b,"SSIM_AVG(a,c)","<","0.94",true)
I have no idea if it'll give good results, but the concept is interesting

Get the dll here
These functions are the ones I'm after. You are right in that there are no links claiming version 0.25 here, but rather 0.24. There are links elsewhere to 0.25. All of them seem to be either broken, or link to a version 0.23. I have found no source for 0.25. I found some source claiming to be for 0.24, but it didn't seem to change much. It could be my poor compiling (I had some errors I could not get rid of, missing libraries I think.)

The summary lists of plugins commonly refer to the latest and greatest SSIM as version 0.25, so that is what I was chasing down. If 0.24 has the aforementioned functionality, it would be just fine. I also note that my SSIM values are scaled as the SSIm algorithm suggests - [0, 1] - and not as 0.24 or 0.25 do - [0, 100]. I prefer the original scaling, mind you, but would really like the conditional behaviour.

An additional note: the link "Get the dll here" appears to be broken.

Cheers
Tim Bate is offline   Reply With Quote
Old 17th January 2008, 05:17   #4  |  Link
mitsubishi
Registered User
 
Join Date: Sep 2006
Location: UK
Posts: 416
OK, the one I had was actually the same as the one linked in the first post as 24, and later in the thread as 24a (both are the same). The one on warpenterprises is different and has a date after so it really is 25. It's just the internal name has not been updated.

Both of these are dated after that post, but neither contain the functions. 25 doesn't come with the source either
mitsubishi is offline   Reply With Quote
Old 17th January 2008, 06:17   #5  |  Link
Tim Bate
Registered User
 
Join Date: Jul 2007
Posts: 7
Thanks for the tip. I'll check the warpenterprises one as soon as I can get to a computer that I can do it on.

Mostly I was noticing that the files were identical in size, and the DLLs I tried didn't have output scaled from 0-100, so I figured they couldn't be 0.24 or later. I could have gotten some confused though, with the half a dozen or so DLLs I found around the interweb.

If you stumble across anything with the SSIM_AVG, that's the thing I'm after, please feel very free to post or pm me!
Tim Bate is offline   Reply With Quote
Old 18th January 2008, 02:37   #6  |  Link
Tim Bate
Registered User
 
Join Date: Jul 2007
Posts: 7
Well, I've tried a whole bunch of links. I have gotten two broken links, and two different DLLs (or at least, four files with only two different sizes.) None of them seem to have the functions I found in Shodan's post.

I have included the links I have followed below. Also, I am not trusting the macro data for the file version; I was testing by the presence or absence of the functions I need, or if there was any apparent difference in functionality. All seem to be the same!

The following two links were broken:
http://perso.wanadoo.fr/reservoir/dl/SSIM.dll
http://home.student.utwente.nl/m.f.al/ssim/

The following three produced files of identical size, and appeared to be the same.
http://perso.wanadoo.fr/reservoir/dl/SSIM-0.24.rar
http://www.geocities.com/wilbertdijkhof/ssim-0.24a.zip
http://avisynth.org/warpenterprises/...l_20050817.zip

This last was larger, but only gave me false hope.
http://www.avisynth.org/warpenterpri...l_20030914.zip

Well, if anyone has another SSIM DLL, one that can do the things Shodan's post (http://forum.doom9.org/showthread.ph...504#post378504) seems to show, I would love to hear from you!
Tim Bate is offline   Reply With Quote
Old 18th January 2008, 20:08   #7  |  Link
mitsubishi
Registered User
 
Join Date: Sep 2006
Location: UK
Posts: 416
Hello Tim, since I had the source code in front of me, I've had a crack at it. Since I've never done any filter dev or even C before it was a little confusing, but I think I've got it. Mostly it's just copying the existing code and making it accessible in a new way, so I think it behaves OK.

I'll verify it's behaviour with a couple of clips with known frame SSIMs and then add the Y,U & V varients like Shodans.

Last edited by mitsubishi; 19th January 2008 at 01:20.
mitsubishi is offline   Reply With Quote
Old 19th January 2008, 02:07   #8  |  Link
mitsubishi
Registered User
 
Join Date: Sep 2006
Location: UK
Posts: 416
EDIT: Confusing, removed.

Last edited by mitsubishi; 19th January 2008 at 20:50.
mitsubishi is offline   Reply With Quote
Old 19th January 2008, 21:07   #9  |  Link
mitsubishi
Registered User
 
Join Date: Sep 2006
Location: UK
Posts: 416
OK I was getting confused because the DLL in the 24a source does not go with the source, the source seems to go with the 25 DLL at warpenterprises.

Anyway, I've added in the functions which should do the same as Shodan's.

http://www.mediafire.com/?4hinbmajzse

I've updated the resource info so the DLL knows it is version 0.25.1.

I gave the functions different names,
SSIM_FRAME(clip1, clip2)
SSIM_Y_FRAME(clip1, clip2)
SSIM_U_FRAME(clip1, clip2)
SSIM_V_FRAME(clip1, clip2)

Lumimasking is off for these functions, I can't get it to work with the same results, can't figure out why, but without lumimasking it returns the correct values.
mitsubishi is offline   Reply With Quote
Old 1st February 2008, 07:31   #10  |  Link
Tim Bate
Registered User
 
Join Date: Jul 2007
Posts: 7
Thanks! Can't wait to test!

Sorry it took me so long to get back. I haven't tested it yet, but all the same, thanks a lot! If it works, you have done me a big favour.
Tim Bate 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 05:56.


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