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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th May 2003, 22:28   #1  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
MPEG2Dec3 v1.10

New version of MPEG2Dec3.dll for AviSynth 2.5+

http://nic.dnsalias.com/MPEG2Dec3v110.zip
http://nic.dnsalias.com/MPEG2Dec3v110_src.zip

New Features:
  • Crop now works (uses AviuSynth's Crop)
  • trbarry's optimisations (Add_Block, Block Decoding (for SSE2))
  • Uses AviSynth's BitBlt for optimised memory copying
  • No more memory leaks
  • Two new iDCT's (Skal's v.fast and the v. accurate SimpleiDCT from XviD (now with trbarry's optimisations!))
  • General Speed optimisations
  • Accepts both dvd2avi 1.77.3 & 1.76 d2v files
  • Adds support for MPEG2Dec3.dll to be used as an external DLL without AviSynth (see GetPic example in sourcecode).
  • Bugfixing & Better Stability
  • Luminance Filter added back in (was taken out by Marc)

Cheers,
-Nic

edit: Updated post to latest version

Last edited by Nic; 28th July 2003 at 10:36.
Nic is offline   Reply With Quote
Old 12th May 2003, 06:46   #2  |  Link
Pasqui
Registered User
 
Join Date: Oct 2001
Posts: 150
@Nic
Thanks a lot for this release. But why did not you used MPEG2Dec3 1.0 as an origin for your changes ? Maybe the source code was not available ?
Pasqui is offline   Reply With Quote
Old 12th May 2003, 09:18   #3  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Id once read: http://forum.doom9.org/showthread.ph...1.0#post264517

So Id thought there was no difference, and Id forgotten about the 1.0 release, but there was a difference.

So forget the above posts and use below for the fixed memory alloc bug:
(Link Removed)

Sorry about that.

-Nic

ps
MPEG2Dec3 v1.0 didnt have the debug output that .94 had so that had already been taken care of. My Bad
(still might be useful for Jonny: )
http://forum.doom9.org/showthread.ph...ory#post274437

Last edited by Nic; 12th May 2003 at 12:54.
Nic is offline   Reply With Quote
Old 12th May 2003, 09:20   #4  |  Link
Kyo
Anime Team!
 
Kyo's Avatar
 
Join Date: Jan 2002
Location: JulyCity
Posts: 279
Thanks Nic for taking the time... Great Job

...testing
__________________
:: XviD-Inside ::
Doom9 en Espaņol!
Kyo is offline   Reply With Quote
Old 12th May 2003, 10:22   #5  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,295
There already exists a version 1.0.1.: http://forum.doom9.org/showthread.ph...hreadid=49994. Could you include his changes and name it 1.0.2?
Wilbert is offline   Reply With Quote
Old 12th May 2003, 10:26   #6  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Nice surprise, many thanks Nic!
jonny is offline   Reply With Quote
Old 12th May 2003, 10:45   #7  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
@Wilbert: Damn it, this is very bad of me not to notice such things...trbarry did'nt say his exact changes either (very unlike him) But I think its only in getbit.c

Ill update soon.

-Nic
Nic is offline   Reply With Quote
Old 12th May 2003, 10:54   #8  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Done...finally.

Ill work on it more to see if theres any other improvements to make.
Sorry for the complete mess up:

(link removed)

-Nic

Last edited by Nic; 12th May 2003 at 12:55.
Nic is offline   Reply With Quote
Old 12th May 2003, 10:55   #9  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
great!!!

nic
perhaps you can update your hp with this mpeg2dec3 so that more people recognize that it exists
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 12th May 2003, 12:34   #10  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Ok, for my mistakes, ive added the ability to read both dvd2avi 1.76 and 1.77.3 D2V files.

http://nic.dnsalias.com/MPEG2Dec3v103.zip
http://nic.dnsalias.com/MPEG2Dec3v103_src.zip

-Nic
Nic is offline   Reply With Quote
Old 12th May 2003, 15:58   #11  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
Thanks Nic, works like a charm. Any chance you could get speed up to the MPEGDecoder.dll level?
RB is offline   Reply With Quote
Old 12th May 2003, 16:03   #12  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Getting there...just released 1.04

-Nic
Nic is offline   Reply With Quote
Old 12th May 2003, 16:42   #13  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Nic -

IIRC, the only change I made was to find the right PID numbers for HDTV. You got that one in Getbit, right?

- Tom
trbarry is offline   Reply With Quote
Old 12th May 2003, 16:47   #14  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Quote:
I replaced the aligned memory functions & compiled in ICL7 (well, apart from one file).
It still uses some sort of aligned_malloc, right? That's needed for SSE2 support, and probably faster on other boxes.

- Tom
trbarry is offline   Reply With Quote
Old 12th May 2003, 17:27   #15  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
@Nic

Thanks for the update. Here is a quick speed comparison between MPEGDecoder v2.03 and mpeg2dec3 v1.04 (idct=5). AVISynth 2.5.1 RC2, P4 2.4 GHz FSB 533, 512 MB PC266 DDR, simple script to frameserve PAL 720x576 video @ 25 fps with no filters except ConvertToYUY2, CCE 2.66.01.07.

mpeg2dec3 v1.04: 1.72
MPEGDecoder v2.03: 1.89

Maybe still a little room for improvement
RB is offline   Reply With Quote
Old 12th May 2003, 18:10   #16  |  Link
OBcecado
LuLz
 
Join Date: Oct 2002
Location: Portugal
Posts: 113
Thanks for this update, I'm having a small speed boost (+4 fps)


Stay well.
OBcecado is offline   Reply With Quote
Old 12th May 2003, 22:21   #17  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
@trbarry: yup I saw that in getbit. Yup its using aligned memory, it uses the functions xvid uses.

@OBcecado: Good to know

@RB: Always room for improvement, mpeg2dec3 does alot of copying memory about, if I can lower that it would be good (it shouldnt need to do as much as it was doing in the YUY2 version, but it still is). If anyone else fancies taking a look, look into assemble_frame is used, copyall (which is basically a memcpy) and Add_Block.
From profiling it with the AMD tools it seems to spend as much time copying memory blocks as it does iDCT (!? Surely thats not right, but ill look into it)

-Nic

ps
If I made a version, that didnt pay attention to fields correctly like MPEGDecoder doesnt, then it would speed along even faster (it would cut down on the memcpy's significantly).
(but thats not a good idea )
Nic is offline   Reply With Quote
Old 13th May 2003, 01:48   #18  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Nic -

I just took a look at Add_Block, mostly because I sort of remembered it. It could be made a bit faster in a couple ways, but not done away with.

I'm not really sure why the AMD profiler points that out as a major problem. It's usually inlined but maybe not so when profiling? Can you say what percentage of time Add_Block and the other main offenders are using? I had a trial copy of Vtune when I was first playing with this a year ago but it's since expired.

Also it looks like most of the SSE2 support is turned off in MPEG2DEC3. I don't know what the effects of that are, but it certainly can't help P4 performance.

- Tom
trbarry is offline   Reply With Quote
Old 13th May 2003, 06:39   #19  |  Link
int 21h
Still Laughing
 
int 21h's Avatar
 
Join Date: Oct 2001
Location: Around
Posts: 1,312
I never saw a significant leap on my P4 with all of those enabled anyways, I think they may have made for better accuracy though.
int 21h is offline   Reply With Quote
Old 13th May 2003, 08:12   #20  |  Link
alx
Registered User
 
Join Date: Oct 2001
Posts: 101
My test

Hi, because iīm a newbie in avisynt use, i will try to explain all the details of my test.

SCRIPT

LoadPlugin("C:\UTILS\DVD\avisynth2\PLUGINS\MPEG2DEC3-25.dll") --> NICīs mpeg2dec3 1.04, of course
LoadPlugin("C:\UTILS\DVD\avisynth2\PLUGINS\Unfilter-25.dll")
LoadPlugin("C:\UTILS\dvd\AviSynth2\plugins\UNDOT-25.DLL")
mpeg2source("G:\zzzprueba\1.d2v",cpu=6)
Crop(8,66,-4,-68)
LanczosResize(640,336)
UnFilter(-5,-5)
UnDot()

I used avisynth_100503 with Virtual Dub Mod 1.5.1a for the test on my WXP with SP 1.0a installed.
I have an Athlon 2100xp with 512mb. ram.
Clip is "Hollow Man" trailer......2:27 min length
XviD.Alpha.05.05.2003.1100 settings were:
VHQ=4
Croma Motion
B-Frames=2
Quantizer=2
all other settings=default

Elapsed time: 5:05 m
Size: 22.544 kb.

------------------------------------------------------------------------------
All the same settings and script, but this time with MarcFD 1.00 mpeg2dec3.dll

Elapsed time: 4:45 m
Size: 22.558 kb.
------------------------------------------------------------------------------

Both clips play ok.
Hope this help.
Alx.

BTW, if someone see that the order of filters in the script is incorrect, please let me know, because i just began with avisynth and all advices are welcome.
And, NIC, when are you planning to launch DVD2Avi_Nic ??? hope you had time in this last 2 years...he he he
alx 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 09:19.


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