View Full Version :
DVD2AVI Sourceforge Project
Pages :
1
2
3
4
5
6
[
7]
8
Nic
26th April 2002, 15:09
My code goes through avisynth, so yes it does use simpleresize, but thats not "in" dvd2avi....
My changes are messy, but I have a very basic changelog, so I can them into another project :)
Cheers,
-Nic
Jubijub
26th April 2002, 15:46
I may have missed the link of you version nic...where could I find it ?
Chibi Jasmin
26th April 2002, 18:07
Originally posted by Nic
Thank god its friday....
(My version uses a minimum of mod2 on all sizes(cropping & resize)(you can set the h-mod, v-mod))
(no mod1..the resize filters in avisynth can crash out on that)
So hopefully you'll like it Jasmin :)
Cheers,
-Nic
Hi Nic...
the AviSynth docs say you have to respect mod 2 only horizontally (makes sense in yuv2)...you say, vertically mod 2 is also a must? Why?They never crashed on me, and I have used odd values vertically sometimes...are you sure about this?
I am happy to hear your version supports free resizing (respecting mod 2)...if it should somehow be possible, I'd like to have mod 1 vertically, just never seen it crash :-)
Am I right, your version has not been published for download yet? I'll be happy to get it, when you are ready to release it...
BTW: Did you also integrate all your changes into a new mpeg2dec.dll?
Chibi Jasmin
26th April 2002, 18:09
Originally posted by vlad59
@Chibi Jasmin
Yes it's friday, I'll try to merge my Dvd2avi sources on CVS tonight (I never done that before).
I'll upload a Dvd2avi.exe in the forum too. :D
But I've had no time to modify Mpec2dec.dll (it's written in C++, so it's not just a copy paste of getpic.c as I first thought), so this will be done later (ASAP). :rolleyes:
Next week I'll be on holiday, but my wife won't appreciate if I go away again with my laptop ....... :devil:
So I'm sorry but no new Mpeg2dec build from me till next week. :(
A pity, because for now I'm stuck with using mpeg2dec, because of limited resizing (mod 8 and stuff) in DVD2AVI...Nic just said his version is not that limited...thanx anyway for your work...I will have to wait patiently for your mpeg2dec version...have a nice holiday then...
trbarry
26th April 2002, 19:10
Three cheers for Nic and Vlad! :)
And maybe once one of you posts some code it might be time to start a new thread, with a summary of this huge unreadable ungainly one. ??
- Tom
Chibi Jasmin
26th April 2002, 19:27
Originally posted by trbarry
Three cheers for Nic and Vlad! :)
Same from me :-)
Jubijub
26th April 2002, 20:23
I've checked the save-oe project...sources but no release
A_Pleite
26th April 2002, 20:33
No answer to the yv12-conversion-and-resizing-in-one-algrithm-question?
I is there no one to say "Hey, A_Pleite, you damn foll that would never work!" :D
A_Pleite
vlad59
26th April 2002, 21:53
I've tried to merge my sources in CVS but I don't have any write access (or I haven't used the good command ....), perhaps because I'm referenced as a tester. I've emailed an admin to change this.
So I upload here both sources and binaries. I've tested it on K6, Athlon, PIII, PII but not on a P4 so it may crash on this.
Next things on my todo list are
- Modifying mpeg2dec.dll ASAP.
- Optimizing better the motion compensation (I've already some idea about it)
- Adding YUV12 support
- Adding bressenham resize support
@Chibi Jasmin
It's still friday in France. ;)
EDIT : I removed the attachment because the code I added wasn't accurate enought. For more information, look at my following post.
int 21h
27th April 2002, 00:26
Ok, you're updated to developer status, CVS should work now :)
Nic
27th April 2002, 09:17
Hi Jasmin, I havent tested vertical mod 1, Its very easy for me to add...so ill give it a try later :)
Cheers,
-Nic
Chibi Jasmin
27th April 2002, 10:07
Originally posted by vlad59
@Chibi Jasmin
It's still friday in France. ;)
:)
Chibi Jasmin
27th April 2002, 10:09
Originally posted by Nic
Hi Jasmin, I havent tested vertical mod 1, Its very easy for me to add...so ill give it a try later :)
Cheers,
-Nic
I'm pretty sure, it'll work, PLEASE add it... :-) Horizontal mod 1 actually does work, too, meaning it doesn't crash...what happens is, values are rounded to mod 2...so there is no sense adding a mod 1 option horizontally...but vertically it's fine...
Can't wait to get my hands on your version :-)
saVe
29th April 2002, 15:54
hehe, it's funny to see a program has my nick as a name! now everyone will think i stole it :(
sure, you can have it, no problem :D
vlad59
8th May 2002, 17:27
Just a little post to say, my previous Dvd2avi test releases were not really accurate. I must admit I made some code change without really understanding all of it, sorry :(
After reading some Intel docs, VideoLan code and understanding Tom's SSE2 form prediction code (thanks again), I finally modified again DVD2AVI. So I removed all the attachments I made in this forum and I'll post in this forum as soon as I get working Dvd2avi.exe and Mpeg2dec.dll.
I won't attach my test release in this forum anymore to avoid giving crappy programs. I'll only email it on demand.
Sorry again.
trbarry
8th May 2002, 18:43
Hi Vlad -
I haven't been working on DVD2AVI recently as I had some other ideas, and I couldn't try out your changes anyway since I don't have that kind of box. But I was still glad you were making them.
Did you ever get your Sourceforge problems solved? If so why don't you go ahead and check in your stuff anyway. There's no reason to believe your broken alpha test code will be anymore broken than my broken alpha test code. Or anybody else's either. That's just the nature of the beast.
Otherwise we'll get to a state like Nic where we can't release anything that isn't perfect. (nudge, nudge) ;)
And eventually I guess we have to deal with stripping out Dividee's filters and gettin MPEG2DEC into Sourceforge also.
- Tom
vlad59
8th May 2002, 20:16
Hi Tom,
I already have a working and accurate Dvd2avi release (in fact it's slightlyt faster than my former one), but as usual it's crappy (I've some debug code everywhere) so I've to clean up and reorganize before adding this in CVS. And I've had no time to fully understand how to deal with the c++ code of mpeg2dec.dll.
Yes my sourceforge pb are solved (thanks to google ...). So I will probably try to add your mpeg2dec.dll sources in CVS (I'll remove Dividee's code too).
Now it's just a matter of motivation : Dungeons Siege or C++ first ...... hard choice ;)
Another question : do you know where I can find some docs about how parameters works in masm ????
trbarry
8th May 2002, 22:37
Now it's just a matter of motivation : Dungeons Siege or C++ first ...... hard choice
I guess that is one of those tough lifestyle choices where no one else can advise you. ;)
But for the masm stuff, try:
.
- Tom
(got elderscrolls:morrowwind yesterday...this could seriously cut into my programming time :) )
-Nic
vlad59
10th May 2002, 20:01
I've just added a new directory in CVS for mpeg2dec.
It's based on Tom's test release and I just removed Dividee's filters.
vlad59
13th May 2002, 08:38
I remodified the form prediction part of DVD2AVI to have more accurate output, I also unrolled some loops and use an array of function pointer so I got those results :
Old MMX : 1.44
New MMX : 1.40
New SSE (or 3dnow) accurate : 1.36
New SSE (or 3dnow) less accurate (not visible) : 1.35
I began to build some SSE2 optimizations but I don't fully understand those alignment problem and I have no way to test it, so expect a test release soon.
I began to add my optimization in Mpeg2dec but cpp and C style function pointer are really difficult to merge.
vlad59
14th May 2002, 15:50
Here is another test release of Dvd2avi and mpeg2dec.dll.
The only change is an optimized MMX, 3Dnow and SSE accurate motion compensation code.
I tried to have a SSE2 one but I have no way to test and I don't understand everything in Tom's SSE2 form prediction code. So now P4 uses only SSE code (Tom's code is currently disabled).
I only made bench with Dvd2avi (see my last post) and not with mpeg2dec. Mpeg2dec.dll does not include all the dividee's filters, I don't know if he intend to make a separate build with it (it would be cool).
Next things on my todo list are :
- Bressenham resize support
- Change the about box to add a link to the sourceforge project (quite hard to do).
- make a first official beta release of Save-oe
Please share with me your bench and your feedback.
Thanks in advance.
EDIT : if you want the sources, just PM me.
trbarry
14th May 2002, 19:08
Vlad -
Nice going. But why not leave my existing optimized SSE2 code active if your new sse2 stuff isn't running yet?
BTW, while I can't do anything with it this week I really would like the source for when I get back to it. And if you are doing some more SSE2 optimized code I've also got some more sse2 color space conversion code contributed by Dr. Frankenstein that I never added to DVD2AVI yet. You can have that if you're working in that area, or eventually I'll put it in. I just didn't think it would add as much performance improvement as the other stuff.
I guess I'll PM you shortly about it.
- Tom ( trbarry#trbarry. com #=@ )
MaTTeR
14th May 2002, 20:40
I've bugged Nic for quite sometime so I thought I'd give him a break for now and ask you guys. Any chance you guys might be able to support SMP? Right now I can't even consider using another encoding app other than Vdub because I would basically be wasting a CPU.
I'm not sure but my best gues is that Avery has 1 CPU resizing while another CPU is actually encoding. This is only a guess as I've really no hard facts because so little documentation exists. Unfortunately I have no coding skills but I'd be more than happy to contribute in some other way (beta testing) if possible. Many thx in advance
vlad59
14th May 2002, 21:21
@Tom
Nice going. But why not leave my existing optimized SSE2 code active if your new sse2 stuff isn't running yet?
Because I changed a lot this function. I now use a function pointer array to avoid tests and to unroll some loops so I have different function for 16 bytes motion compensation (typicaly Y) and 8 bytes MC (U or V) (this is the w var in the old form_component_prediction). So I think that if I call your SSE2 code it will be slower. I'll send you the code tomorrow (It's still not commented).
I've already made the SSE2 MC code but it will only work on aligned stuff. I need to read more to understand fully your code.
@Matter
I'm not sure but my best gues is that Avery has 1 CPU resizing while another CPU is actually encoding. This is only a guess as I've really no hard facts because so little documentation exists. Unfortunately I have no coding skills but I'd be more than happy to contribute in some other way (beta testing) if possible. Many thx in advance
From what I can remember (I may be wrong), virtualdub is not completly SMPable. It only has one thread to read the source and one thread for the filters and the compression. So if you use a avs input all your avisynth filters use one CPU and the Divx compression use the other.
To check if my theory is true try encoding an hulfyuv avi and add some big filters (Bicubic resizing, DNR, Smart smoother, ...) and start the encoding : I don't think in this case that both CPU will be used.
By now, I'm not sure to be able to add some thread in Dvd2avi (I'm only restarting C and C++ after three years of Java ;) ). So please don't expect that from me soon, sorry.
trbarry
14th May 2002, 21:38
Matter -
What Vlad said, or at least that's my understanding. But I think using Vdub with Avisynth/Mpeg2dec frameserving is probably a fairly symetrical way to use 2 CPU's. My own testing earlier in the year suggested that about half the time was spent in DVD2AVI and half in Xvid.
So if you frameserve to Vdub in fast recompress mode you will mostly use up both processors. If you have lots of filters then I guess you would have a choice of whether to use Avisynth filters or (at the expense of some RGB convrsion) adding Vdub filters. Any extra Avisynth filters would run in one task and the Vdub filters in the other, so you could somewhat balance them if you were very determined.
- Tom
vlad59
14th May 2002, 22:02
I've also another dumb question (yes one more :D ). The new SSE and 3dnow motion compensation code are from the videolan project (I just changed the nasm code into masm and modify some parameters : minor changes). So I've keeped the videolan headers on those files and I've added some comments to explain my changes. Do I have to add a Dvd2avi header or other thing.
Sorry to be such a pain in ... but it's my first GPL project, I simply don't want to make a mistake.
trbarry
15th May 2002, 01:22
So I've keeped the videolan headers on those files and I've added some comments to explain my changes. Do I have to add a Dvd2avi header or other thing.
vlad -
The videolan headers are probably just fine. I tend to like comments of all kinds, but targeted at programmers and users, not lawyers.
- Tom
vlad59
15th May 2002, 10:13
@Tom
thanks a lot.
@All
50 downloads and no feedback ...... :rolleyes:
Edit : 57 downloads .... and still nothing
int 21h
17th May 2002, 16:31
IMO, you should keep Dr. Frankenstein's code because he is a very accomplished SSE2 mastermind. I have every confidence that his code is quite possibly the most efficient method.
Secondly, Dr. Frankenstein's code was specifically generated to be used with the Intel compiler (although I believe it will compile with MSVC). The other nice thing about using the Intel compiler is that it will unroll the loops for you. :rolleyes:
vlad59
17th May 2002, 17:18
I think I made a working P4 code (as always for the motion compensation). But I haven't tested it at all (I don't have a P4). So please test it and if it works correctly (maybe) please make some bench with my former release (some posts up).
I think it will be good to close and sum up the soooooo looooong topic. I expect to add the bressenham resize soon (maybe for the next weekend) and after that I'll make an official release of save-oe and I'll post a sum up with the changelog. I still have some question :
- Should I rename Dvd2avi to save-oe ??
- Same question to mpeg2dec.dll
I don't have a real opinion about this : renaming may prevent for messing with the other various Dvd2avi. With the addition in the D2v file (for the transport streams) I think it could be uncomptable with the previous version (I haven't tested that, I may be totally wrong).
What do you think about it ??? (I know I should stop asking dumb questions :D :D :D :D )
Another thing : please post some feedback about my mpeg2dec.dll build because I haven't made any test with it ?
EDIT : attachment removed, it crashed on P4.
(I really should reinstall Intel C++ 5.0..keep forgetting! :) )
Im going to release my version of DVD2AVI soon....(next week I hope)...I dont know what to call it? I dont want to intefere with any names so ill probably call it DVD2AVI_NIC v0.1. Then ill probably re-write it into save-oe, if thats what people want.
-Nic
trbarry
18th May 2002, 11:11
Maybe we should start making "Open Edition" versions from the Sourceforge flavor (is that what OE means?). DVD2AVIOE.exe and MPEG2DECOE.dll.
That might avoid some of the confusion.
- Tom
vlad59
24th May 2002, 10:48
Since I get absolutly no feedback about my version, I assume it works correctly.
So sunday everything will be committed on CVS. This will include those changes :
- motion compensation optimizations (It will include my untested SSE2 one, but I won't remove Tom's one)
- Modification on the about box
- addition of a link to the sourceforge webpage
- Change of the files name (I will follow Tom's suggestions)
- Bugfix on mpeg2decOE.dll (before that it crashed on K6 and PII)
As adding the bressenham resize takes me more time than I first expected. So I'll try to sum up this big topic this weekend.
Chibi Jasmin
24th May 2002, 12:30
Well, maybe this is time to repeat the wish I also had for Nic's version...if possible, please add resizing/cropping with mod 2 horizontally and freely (mod 1) vertically. This should be compliant with YUY2 colorspace rules.
Did I tell you I added it? It should be released soon :)
-Nic
Chibi Jasmin
24th May 2002, 14:37
Yeah, you did :) Did I tell you I am looking forward to your version? :D
trbarry
24th May 2002, 14:59
vlad -
Sorry, I've been working on something else and still have not had a chance to play with your new stuff.
But save-oe is a funny project. It just sort of sits there dormant for awhile and then there is a flurry of activity. But gradually it does seem to be evolving that way.
And I do intend to get back to it. But I'm also waiting to be able to use some of Nic's changes that he keeps teasing me with. ;)
- Tom
:D Im not sure how valid some of my changes will be to save-oe :( I think the resize, smart crop & auto crop will be vaild. Along with the BeSweet code :) But ill need to re-write it...this code is so messy at the moment :)
-Nic
ps
I spoke to Marty about YV12, he says its very easy to get D2A to process YV12 (rather than it doing its ->YUY2 conversion). But he says M2A's YV12 resize isn't very good, & there dont appear to be any other YV12 resize options....
Chibi Jasmin
24th May 2002, 15:23
So one would have to code a completely new yv12-resizer...!?
vlad59
24th May 2002, 15:53
Originally posted by vlad59
Since I get absolutly no feedback about my version, I assume it works correctly.
@Tom
Be sure this quote is not for you. You've always answered my questions (even the silly ones). I was only a little fed up when I compared the 147 downloads and the 0 feedbacks.
But now it's closed, i forget it.
@Nic
It's true that the M2A bressenham resize is not as sophisticated (don't if it's a real english word) as bilinear or bicubic but it's fast (unfiltered) and sharp. It could be good to make a test with Tom's simpleResize.
If I remember well (I read too much different sources), there is others YV12 resizers but always in planar mode. In Xmpeg or DvdX I think you can find that. On the other hand the avisynth resize of DVD2AVI compute YUY2 directly.
trbarry
24th May 2002, 17:30
Nic -
I could easily write a version of SimpleResize that would work on 4:2:0 planar format, and I might do that sometime. When I looked at this before it seemed there would be a decent speed improvement even if the data was still subsequently converted to YUY2, after resize or even during resize. But it would be even better if it just went to Xvid as YV12 and never had to be converted at all.
...
The parts of your code I'm most interested in are invoking a temp avs script and also improvements in audio programming.
I'm still hoping I can talk someone into passing an untouched ac3 stream directly to Xvid, keeping the sync. But I'm fairly incompetent at audio programming myself. I'm a video guy.
- Tom
acido
24th May 2002, 19:49
@vlad59
I dl your latest DVD2AVI P4 update, opened VOB files but after trying to preview them (F5) DVD2AVI crashed.
AppName: dvd2avi.exe AppVer: 0.0.0.0 ModName: dvd2avi.exe
ModVer: 0.0.0.0 Offset: 0001b3e3
WinXPpro on a 1,7g P4
vlad59
24th May 2002, 21:49
@acido
Thanks a lot.
So I'll keep the sse code for P4 till I got a way to test the SSE2 code better.
DmitryR
29th May 2002, 09:15
Originally posted by vlad59
I began to build some SSE2 optimizations but I don't fully understand those alignment problem and I have no way to test it, so expect a test release soon.
SSE2 memory argument must be 16-byte aligned. The only instruction that can deal with unaligned values is movdqu, but it is slow. Alignment can be tested this way:
mov esi,pointer
test esi,15
jz aligned
unaligned:
This is a proven way to test, I used it in XViD, and there I found out that the fastest way is to code 3 routines: for all arguments aligned, for some argiments aligned and for no arguments aligned. It will worth the check in most cases. But you must try to align all possible arguments first (while allocating memory).
acido
30th May 2002, 19:58
Originally posted by Nic
(I really should reinstall Intel C++ 5.0..keep forgetting! :) )
Im going to release my version of DVD2AVI soon....(next week I hope)...
-Nic
@nic @vlad59
Any news on the projects?
Ciao
On my side, my version is quite nice now, the bugs are slowly disappearing...Ill release it soon....
Just as a taster:
http://nic.dnsalias.com/dvd2avi/rui's_dvd2avi_guide.html
Here's rui's guide to a standard encode using my DVD2AVI.
(this is just a beta of the main guide...I hope Doom9 doesnt mind me using his familiar css)
This should give you a rough feel of things, but doesn't really describe the full features :)
-Nic
The Link
30th May 2002, 20:48
This should give you a rough feel of things, but doesn't really describe the full features .... hmm...but brushing my teeth is still something Iīve got to do on my own! ....is it? :D
Such a small installer for so much functions you get! Itīs like a Swiss Armyknive.
Grrrr :devil:
I forgot people could just look at the root then install it...grrr.
Anyway thanks for pointing out that ARDA, that has now been removed. (next time ill remember to add an index.html :) )
Anyway...Those who did download it (although they shouldn't have!) Please dont give it out, its not quite finished yet. But please do comment here what you think, though.
Cheers,
-Nic
Dvd2avi nic! :o
Seem very interesting, you make a good job with it Nic, congratulations ;)
I gonna try to make a full movie encode with it and then post a reply!
nice the decomb integration and the besweet too. god work, god work!
Cheers
Kyo
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.