View Full Version : MPEG2Dec3 v0.9 for Avisynth 2.5


Marc FD
9th November 2002, 23:19
a lot of work for this pre release of the stable version.
and i've spend a lot of time on documentation, i'll try to clean the code more in the next days to be able to package it. (in v1.0)

dl it on my site (link below, in my signature)

i hope you'll enjoy the old&new features.
i'm sorry, defaults parameters aren't implemented but i'm thinking of it.
it's piece of cake now, because the harder stuff on the Avisynth API (~ 1000 lines) is done ^^.
BTW, i think i may add a fixed quant YV12 postprocessor (would act like if source was at a fixed quant. less efficent, but can still be usefull)

i dunno if i should add fastest colorspace convertions. say me ^^

going to sleep now XD

Regards,
MarcFD

PS @Sh0dan : do you know if dividee is going to make a YV12 version of compare ? i've a new quality mesure (coded for YV12) that Mfa gived me a long time ago, i could add it and do the YV12 convertion if you want.

ACClarke
10th November 2002, 00:35
Thank's for your great job.
I will test mpeg2dec3 soon.
but before I have to sleep, like you :D

SeparateFieldsYV12 is really interesting.
I often use it as you know.

merci....

MaTTeR
10th November 2002, 01:08
Thanks so much for the new build Marc. Documentation is much better:D

The custom CPU settings looks great, cant wait to test it!

Edit- For some reason lumoff=-1 is being reported as an invalid argument sometimes. I got it to work twice but it's not consistent:confused: I'm using sh0dan's 07112002 2.5 build and the script is-
LoadPlugin("C:\Program Files\AviSynth2\plugins\MPEG2DEC3_YV12.dll")
LoadPlugin("C:\Program Files\AviSynth2\plugins\undot.dll")
mpeg2source("D:\test\breed.d2v",iDCT=2,lumoff=-1,cpu2="xoooxo")
crop(4,4,712,472)
UnDot()
LanczosResize(640,352)
Limiter()

HarryM
10th November 2002, 09:29
@MarcFD:

Thanks. Much thanks for Avisynth2.5's adapted Mpeg2Dec! You are fanatical devoted :)

Marc FD
10th November 2002, 09:35
> Edit- For some reason lumoff=-1 is being reported as an invalid argument
> sometimes. I got it to work twice but it's not consistent I'm using
> sh0dan's 07112002 2.5 build and the script is-

please read the doc. due to the YV12 colorspace compatibility, LumaFilter and colorspace convertions are indepedant filters. this way, it's much more user friendly, code get cleaner, and you can use it WITHOUT MPEG2Dec3 decoding. you just need YV12 colospace.

LumaFilter() will do lumoff=-2 lumagain=1 by default (i thinked at iago and users who use is combo)

dunno if a sharpen2 YV12 could help to temporary replace Unfilter in iago's combo ? maybe it's worth to check ?

>SeparateFieldsYV12 is really interesting.
>I often use it as you know.

i did it thinking of you ^^

iago
10th November 2002, 17:35
@Marc

Thanks a lot for the new version! I'd been waiting for it for days to start some real YV12 tests/encodes. Also, the documentation looks really sharp too! ;)

regards,
iago

Marc FD
10th November 2002, 17:54
i've finished 0.91 (with bugfixes & default settings), but can't release it ^^
sorry, i need to go right now. i would release later ^_^

sh0dan
10th November 2002, 18:14
Originally posted by Marc FD
PS @Sh0dan : do you know if dividee is going to make a YV12 version of compare ? i've a new quality mesure (coded for YV12) that Mfa gived me a long time ago, i could add it and do the YV12 convertion if you want.
Dividee is very tied up at the moment, as far as I understand, but I'll see if I can do an YV12 version soon. This and Blankclip is probably top of the list right now. Layer would be nice, but it seems like a big task (haven't looked at the code at all).

ookzDVD
11th November 2002, 04:36
@Marc FD,

Thank you for your latest MPEGDEC3 v0.9,
with latest AVIsynth 2.5 (build 7/11) & Koepi's XviD build 9/11,
1-pass quantizer @ 2, without b-frame,
I got ~30fps :) on my Athlon XP 1700+, That's fast! ;)

Marc FD
11th November 2002, 09:55
Okay, v0.91 is out.

Changes :
- cleaned a bit more the source
- added MPEG2Dec3.def default settings loading (like don's filters)
- bff mode in SeparateFieldsYV12

(and bugfixes)

dl on my page, as usual.


>Dividee is very tied up at the moment, as far as I understand, but I'll
>see if I can do an YV12 version soon.

if you really want to do it, okay. but i know very well the source, and i've improvements to do, so i though i could handle it. just say me.

>This and Blankclip is probably top of the list right now.

Blankclip should be easy to do in YV12 ^^

>Layer would be nice, but it seems like a big task (haven't looked at
>the code at all).

layers would be so easy to convert to YV12, no ? i can do it if there's any request for it ^^

BTW, i'm gonna make a YV12 version of subtract (with MMX code for all colorspaces) because i often use them and i don't want to use Avisynth 2.06 anymore. i can e-mail you the code when it's finished, ok ?

sh0dan
11th November 2002, 10:59
Feel free to do all this - it would be nice if I could focus on brushing up other stuff now.

The best way would really be for you to have CVS access. Version control would be 10x easier than mailing changes back and forth. You should contact Richard about access.

Marc FD
11th November 2002, 11:01
okay i'm gonna mail him ^^

wotef
11th November 2002, 16:57
i'd love to have layer, thanks marc

Bulletproof
14th November 2002, 07:24
Hey I tried this decoder today and in the readme it says to use:

MPEG2Dec3("filename.d2v")

But it says it's an invalid command. Using MPEG2Source still works though, but is that the proper way to do it?

N_F
14th November 2002, 09:43
Originally posted by Bulletproof
Hey I tried this decoder today and in the readme it says to use:

MPEG2Dec3("filename.d2v")

But it says it's an invalid command. Using MPEG2Source still works though, but is that the proper way to do it?

I noticed the same thing last night when I tried it. I got a speed increase (though only 10 %) with it, so I guess YV12 was at least used in some way.

ACClarke
14th November 2002, 14:11
it's just a mistake
Marc knows it, he 'll probably correct it in the next release.

mpeg2source is the right keyword

dattrax
14th November 2002, 17:53
stupid question, but I went to your web site and there is only beta 0.6 for download and not 0.9 as advertised.

am I going daft?

Jim

cult
14th November 2002, 18:02
@dattrax
its there.The build is 0.91 and downloaded a couple of days ago.try to clear your browser cache

dattrax
14th November 2002, 23:32
Just done that, and it's still reporting version beta 6 as the latest. The odd thing is that I get the same page at work as I do at home.

Jim

N_F
15th November 2002, 09:55
Originally posted by dattrax
Just done that, and it's still reporting version beta 6 as the latest. The odd thing is that I get the same page at work as I do at home.

Jim

You're scrolling down too far. Check under avisynth 2.5 filter, not 2.06.

Bulletproof
16th November 2002, 20:28
I think I found a bug with the latest release. I just tried it on and alot of frames come out green, some frames just show chroma, some frames show luma, some show luma and chroma mixed from different frames.

It is not my setup, I have tested 3 other videos which do decode fine with MPEG2DEC3. The video decodes fine under DVD2AVI, and will show up fine in TMPGENC. I'm not using any special options.

I also noticed that the MPEG2DEC3 Beta 6 for Avisynth 2.06 does not seem to work for the YV12 beta (Maybe it wasn't supposed to), but I wasn't using that version previously anyway, I just got it to see if it might fix this problem I had. I was using 0.91.

The video seems like it may be Hybrid material, and it's quite short too, 11 minutes. I'm not sure if that plays any role though.

MaTTeR
16th November 2002, 20:57
Marc,

Since your documentation still says your taking feature request...

I've been thinking about how worth while multi-threading MPEG2DEC3 would be:) I'm not sure how you process each plane but in my thinking multi-threading would help speed up functions such as "Pre-Processing modes". I'd appreciate your thoughts if you get a moment.

Marc FD
16th November 2002, 23:26
@Bulletproof

sorry i don't see exactly. can you describe better ?
did you tried with a regular MPEG2Dec2 ??

> Since your documentation still says your taking feature request...

of course ^^

> I've been thinking about how worth while multi-threading MPEG2DEC3 would
> be I'm not sure how you process each plane but in my thinking
> multi-threading would help speed up functions such as "Pre-Processing
> modes". I'd appreciate your thoughts if you get a moment.

Post Processing is done on a frame basis, and _after_ decompression.
decoding is very sequential (especially MPEG decoding) so multithreading is useless.
so you've got a point : you can do PP absolutely when we want, even in non-sequential order !

so if you use Post Processing, multi-threading will help. but you would hardly be able to decode MPEG-2 faster than 80-90 fps with a 2 Gz CPU (and with 2x2 Ghz)

i think the easier way to make muti-threading is to decode with a CPU, to filter with CPU(s) (max 1 CPU/filter) and to encode with one CPU.
it's the easiest and fastest way of doing it, and you can use YV12,YUY2 or even RGB32 is you want.

i think VDub is doing something like that.

the problem is, i don't have a SMP computer, so i can only speak in theory.

@All

0.92 is on the way, with a x-mas surprise.
personnaly, i really like it. i think i will never transcode old encodes without it now.

Yeah, you've all guessed : it's decoder independent Post Processing ^^

i thought without the decoder info, it would do the job bad. in fact, it's of course less accurate, but really amazing if you have some crappy, old and blocky sources.

lighty
16th November 2002, 23:34
Originally posted by Bulletproof
I think I found a bug with the latest release. I just tried it on and a lot of frames come out green, some frames just show chroma, some frames show luma, some show luma and chroma mixed from different frames.

I noticed same problems when using mpeg2dec3 v0.91 YV12. It only happens in preview mode when I use slider in VirtualDub to browse frame by frame through video. It happens with all the movies, all formats and regardless of AVS script used. The only common things is using mpeg2dec3 and the funny thing is that encodes comes out fine it only happens when browsing through video frame by frame.

I attached images than more than enough explains encountered problems.

Soft used: Avisynth YV12 alpha 11/11, XviD 16/11, mpeg2dec3 0.91 YV12, VirtualDubMod 1.4.11.

Bulletproof
16th November 2002, 23:34
I will make screenshots for you later on, I couldn't try with the old Mpeg2dec, it says something like "Unexceptional error". I think it's because I use YV12 AVIsynth now. But using DVD2AVi decoder does work fine.

cult
17th November 2002, 11:32
@lighty
I have noticed it too.But no problems at all with the encoded movies.

Marc FD
17th November 2002, 15:03
okay guys, i'll take a look. i now i saw it when i rewind.

@all

MPEG2Dec3 v0.92 is out. i think it's almost final now, but sh0dan asked not to release final plugins before a stable Avisynth 2.5, so it's likely the last version before 1.00

i hope you'll enjoy my job on this plugin ^_^

MaTTeR
17th November 2002, 22:15
Marc FD,

Thx for the response and the new build.

In regards to multi-threading I was thinking along the same lines as you. Decoding wouldn't really gain anything but PP most likely would. What if MPEG2DEC3 detected a 2nd CPU and then fed more than 1 frame to the encoder in a non-sequential order? Or possibly even in a sequential order? I guess I would think of it as almost like a Read Ahead cache:D Two or more frames processing at once sounds alot better than one to me.

I use PP in almost every movie(except SuperBit) these days since you gave us the wonderful option of controling the thresholds with moderate_h and moderate_v. Now that we have the custom CPU settings I might even be using it alot more. Thx again for the great effort.

BTW- Your new 0.92 build contains the TVscale parameter. Does this make the external Limiter() or LegalClip() filters obsolete now?

Marc FD
18th November 2002, 16:26
> What if MPEG2DEC3 detected a 2nd CPU and then fed more than 1 frame to
> the encoder in a non-sequential order? Or possibly even in a sequential
> order? I guess I would think of it as almost like a Read Ahead cache Two
> or more frames processing at once sounds alot better than one to me.

it's possible, but i've never coded in SMP, and i can't debug with my system, si i would't do it. sorry.

>BTW- Your new 0.92 build contains the TVscale parameter.

from 0.9x, there's DVD2AVI YV12->RGB24 convertion can be used a a filter. TVscale/PCscale is a YV12->RGB24 feature.

>Does this make
>the external Limiter() or LegalClip() filters obsolete now?

i don't know what these filters are for. can you explain please ?

dartbillie
19th November 2002, 17:05
To MARC FC
I have a problem with MPEG2Dec3 for avisynth with yv12 support.
The decoder gets stuck and wobbles back and forth on some frames, after some time of decoding.
My source material is a captured mpeg2(dvb)(interlaced pal) file.
I noticed the same problem with MPEG2Dec3 beta 5 when i set the parameter Fast=True , decoding with Fast=False gave no problem.
I guess the problem are my files, but I just thought i`ll give you some feedback.
If you are interested i`ll send you a file.
Hope to here from you.
By the way ,thanks for your great programs.

Marc FD
19th November 2002, 17:28
strange, i'll see if i come on this kind of problem.

>If you are interested i`ll send you a file.

sorry my bandwith is too limited

Marc FD
19th November 2002, 19:36
BTW, for people interessed by MPEG2Dec's3 interlace/progressive detection, you can check what he thinks of each frame with DebugView. (pf==0 mean interlaced i think)

[Toff]
20th November 2002, 00:50
Originally posted by Bulletproof
I think I found a bug with the latest release. I just tried it on and alot of frames come out green, some frames just show chroma, some frames show luma, some show luma and chroma mixed from different frames.


I can see the same problem here (v0.92), but only when i go backward in vdub.

MaTTeR
20th November 2002, 01:09
Originally posted by Marc FD
you can check what he thinks of each frame with DebugView. (pf==0 mean interlaced i think) Confirmed, testing some interlaced material now using iPP=true.

MaTTeR
23rd November 2002, 15:56
I just found a 4:3 source that MPEG2DEC3 0.91 and 0.92 totally chokes on as well. My problem looks very similar to lighty and BulletProof's. I'm attaching a very small JPG which displays the color problem. FWIW, Beta 6 does not give me this problem at all but I can reproduce the problem time after time with v0.9x builds and this particular source. I also tried the last 3 AVS 2.5 builds but that didn't affect it at all.

Let me know if you need any other information.

Marc FD
23rd November 2002, 17:48
there is a bug when you rewind. it happends with MPEG2Dec3 (in YV12 mode, versions 0.9x)
when you rewind, the UV planes are not in synch with the Y planes.

so it's a MPEG2Dec3 bug ??
NO !! the bug is not in MPEG2Dec3 ^^ !!

for exemple, i've done this little experiment (among others) :

MPEG2Dec3 say to Avisynth it is outputing YUY2 data.
because a YUY2 frame is bigger than a YV12 frame, i can fill the frame with the YV12 buffers (1/2 Y, 1/8 U, 1/8 V)

when i decode the result, it's assuming YUY2, so i can see the three separated channels. (it's a bit ugly, it's only a hack)

and i can rewind a much as i want, i works very good. the 3 channels are in synch.

other experiments shows that MPEG2Dec3 works very good.

the very strange thing is, i can't reproduce the bug with avi files.

i assumed there could be problem in Avisynth 2.5 regarding YV12 buffering, but why avi files works ??

i wish i could help. sorry.

MaTTeR
23rd November 2002, 18:04
Marc,

Thx for the comment. My problem happens without rewinding though. It's actually encoding like this for a period in the movie then it switches back to normal encoding and everything looks fine. It seems like maybe a certain combination of colors or scenes causes the problem but I can't be sure. Just to clarify though, I'm not seeking through my AVI file at all; just normal playback in YV12. Maybe sh0dan will see these posts and comment.

trbarry
23rd November 2002, 19:59
I don't know if any other YV12 filters do it yet but TomsMoComp effecively has to do a rewind to look at the previous frame. Hopefully that frame will always already be in cache but I have seen these effects in encodings, not just preview mode.

- Tom

Marc FD
23rd November 2002, 20:33
i'm 80% sure it's avisynth cache now : when you use SetMemoryMax(1), the problem occurs on a 10 frames and with SetMemoryMax(128), avisynth is caching hundreds frames (so when i rewind 100 frames and go ahead, the bug is still here).

@tom

i always cache myself in my filters, it's much faster ^^

MaTTeR
23rd November 2002, 20:39
I'm not sure why but the pattern in some of these threads seems to point at interlaced and/or hybrid material. In my test though, I disabled TomsMoComp and all other filters and the color problem still existed. So for this interlaced source it looks like I'll have to revert back to 2.07 for the time being. So at least from my perspective it's narrowed down to MPEG2Dec3 or AVS 2.5 but it sounds like Marc thinks an AVS issue exists. Beyond any of this I'm afraid my skills aren't going to be any help.

FWIW, I've never seen artifacts rewinding or seeking ahead in preview mode using the MPEG2Dec3 0.9x builds. Very strange.

Bulletproof
24th November 2002, 05:24
I was working on a different movie for a while which is why I havent been able to reply recently. The other movie I was working on had no mess ups at all when rewinding or seeking in Virtualdub (YV12). I have gotten back to the movie I had problems with, and made sure everything I had was updated, the problem is still there. When seeking I see messed up frames, sometimes fully GREEN frames every few seconds in a strobing effect. Some people are saying that they don't see it when they encode the file, I do see it when I encode the file, regardless of the codec used. I tried using XviD and HuffYUV for a test, and the frame errors come out in the encoded file.

I have tried with regular MPEG2DEC and with Avisynth v2.07 (non-YV12 version) and it works then.

I tried messing with SetMemoryMax to see if it would change anything.

SetMemoryMax(128) does not make any difference to the problems.

SetMemoryMax(1) takes out the strobing green frames, but the mixed chroma/luma bad frames are still there and still end up in the encoded file. The position/frame #'s where the mixed chroma/luma bad frames occur does NOT change although the green strobing is gone.

Marc FD
24th November 2002, 10:18
strobing green frames = uninitialised UV planes (U=0,V=0 is green)
i saw that too.

>I have tried with regular MPEG2DEC and with Avisynth v2.07 (non-YV12
>version) and it works then.

MPEG2Dec3 YUY2 works well too. it's due to YV12 (avisynth caching bug or bad memory allocation ?)

it's alpha because we knowed we'ld need to solve this kind of problems ^^

i would like to play with avisynth, but i'm on a big project currently, and i really want to see results, so i can't code now on avisynth.

>SetMemoryMax(128) does not make any difference to the problems.

it's even worse if you have less than 378 Mb RAM ^^

maybe the bug is in MPEG2Dec3. I hope not, and my test showed me it doesn't seems to be related to MPEG2Dec3, but i can just assume things, i'm sure of nothing.

lighty
24th November 2002, 22:49
Ummm- I think that mpeg2dec3 is the "weak link". I concluded this because this "strobe" efect is encountered (at least in my case) exclusively when encoding "strange" mixed materials like NTSC combined progressive+interlaced sources.
When encoding PAL materials I never encountered "strobe" efects.

So if Avisynth cache is to blame then why doesn't it produce such strange effects in the PAL materials also? Why only NTSC progressive+interlaced sources are affected?:sly:

Marc FD
25th November 2002, 13:01
IMHO, the problem is connected to cache.
Storing 30 fps at 720x576, is different than a ripped avi in 640x360 @ 24 fps ^_^

i can make a pseudo YUY2 (no convertion, YV12 outputted) for you all to test on all sources. anyone interresed ?

sh0dan
25th November 2002, 13:58
Originally posted by Marc FD
strobing green frames = uninitialised UV planes (U=0,V=0 is green)
i saw that too.

>I have tried with regular MPEG2DEC and with Avisynth v2.07 (non-YV12
>version) and it works then.

MPEG2Dec3 YUY2 works well too. it's due to YV12 (avisynth caching bug or bad memory allocation ?)

Uninitialized framebuffers are not cleared in AviSynth - they are reused, without clearing the imagedata. So when you request a NewVideoFrame, you might get data from an old one.
I strongly suggest, that you look through the code again. I don't have access to it, but you should investigate, if there is separate code handling progressive frames, that doesn't work properly. Telecined movies will most likely contain progressive encoded frames, whereas PAL won't.

And considering the fact, that it seems to depend on the source material, it seems to point in the same direction.

Marc FD
25th November 2002, 14:15
>Uninitialized framebuffers are not cleared in AviSynth - they are >reused, without clearing the imagedata. So when you request a >NewVideoFrame, you might get data from an old one.

i know, thanks ^__^

>I strongly suggest, that you look through the code again.

i'll try to find some time.

>I don't have access to it

you have, i released MPEG2Dec3 v0.92 source code ^__^

> but you should investigate, if there is separate code handling
> progressive frames, that doesn't work properly. Telecined movies will
> most likely contain progressive encoded frames, whereas PAL won't.
> And considering the fact, that it seems to depend on the source
> material, it seems to point in the same direction.

it doesn't work in interlaced PAL when i rewind, i don't think it's related to the source material, i think it's just a buffer size chaotic side effect. but i may be wrong of course :D

i think a pseudo YUY2 builde might help to do light in dark here.

BTW, there is some SIMD code i added in a interlaced decoding copy function, and disabling it doesn't resolved anything.

sh0dan
25th November 2002, 16:26
Great, you put up the source!

ok, a problem seems like this:

void CMPEG2Decoder::assembleFrame(unsigned char *src[], int pf, unsigned char *dst, int pitch)

Is only called sometimes. If you put a breakpoint there, it only seems to get triggered around I-frames (it might be at the I-frame, or just before an I-frame), when seeking backwards. I don't know if this is supposed to be like this - it _seems_ like it's there you copy your data.

Marc FD
25th November 2002, 16:44
strange. i'll re-check that.
the weird think is, it's working in YUY2...

Marc FD
25th November 2002, 16:51
quick look... yes, MPEG2Dec3 (in fact YV12) seems to be the source of the problem. i'm going to kill that :devil:

haazheel
25th November 2002, 16:53
Hi,

I'm a new user of MPEG2DEC3, and I realized that I can't use that module and the line SelectRangeEvery(280,14) in order to run a compressibility check, whereas with the "normal" module MPEG2DEC, well it's working...

Did I do a mistake?

kilg0r3
25th November 2002, 17:20
@ haazheel

i don't know the soluttion but this has been discussed elsewher already - > search

Marc FD
25th November 2002, 19:12
i was right. it was a buffer problem. but not avisynth ones. MPEG2Dec's ones. i totally overlooked this part of the code.

i feel really sorry. everything is my fault :(

so i've made the REAL work to get YV12 internally in MPEG2Dec3.
i changed the whole way MPEG2Dec handles frames (some hundred of lines to change...), it's much clean now, but i've come accros a lots of bugs (due to my hown mistakes :( ) so i've debugged during 2 hours. it's stable now, and it's is able to rewind flawlessly, but i've a new bug (i think i introduced this one :( ) : i get some drops in playback when i rewind. i don't understand why i get that. very very strange.

i think i'll attach an alpha version here soon, but only 80% of the problem is fixed, it's not finished yet, so it would be for testing only.

the good new is, MPEG2Dec3 internals are 100% YV12, so it should be a very little bit faster ^^

sh0dan
25th November 2002, 19:27
Great to hear, Marc!

Bug fixes that make code faster are always nice :)

Marc FD
25th November 2002, 19:55
>Bug fixes that make code faster are always nice

it's theoritically faster (means : nobody will notice it)

BTW, i've found the bug i added ("it's not a bug, it's a feature !!" ^^)

it's 100% fixed. but i'll finish to clean a bit the ugly code, and i want to add some MMX code in a misc part.

Marc FD
25th November 2002, 22:37
i'm in hurry and my ftp acces is dead, so here is MPEG2Dec3 v0.93
i've packaged the sources, i will upload them tomorow.

enjoy :)

and sorry again for the bugs, but hey, it's avisynth 2.5 _alpha_ ^^

( attached "mpeg2dec3 v0.93.zip" )

CruNcher
25th November 2002, 23:11
SetMemoryMax(48)
LoadPlugin("D:\Video\Tools\GordianKnot\MPEG2Dec3YV12.dll")
MPEG2Source("D:\uranusproject.d2v",idct=5,iPP=true)
BicubicResize(512,384)

is couseing unrecognized exception in last line with old mpeg2dec 0.92 it worked :(

Source is Mpeg2 interlaced PAL Svcd Stream

16:9 DVD PAL Stream works without problems any idears ?

lighty
26th November 2002, 00:00
Ummm- when I use slider in VirDubMod 1.4.11 it causes following error:Avisynth read error: Avisynth caught an access violation at 0x00ffb069, attempting to write to 0x000002d0

I tried all the scripts that used to work before with mpeg2dec3 0.92 (although with green frames and strobes).

Bulletproof
26th November 2002, 00:50
Same here, I'm getting access violations. But it manages to decode at least 1 minute of video with no problems. I'm sure you will be able to get the program working 100% soon.

springl
26th November 2002, 00:53
@Marc FD
-source material = VOB file NTSC/FILM with interlaced/progressive frames
-Mpeg2Dec3 0.93+avisynth 2.5 = crash in Windos98SE
irreversible error OE in 0028:C02A353A of VXD VWIN32(05) + 00002062
With this script:
Loadplugin("C:\Programmi\AviSynth2\plugins\Mpeg2dec3.dll")
Mpeg2Source("C:\WINDOWS\Desktop\Encoder\prova.d2v")
trim(0,2000)
crop(0,64,720,352)
I get the crash after the first frames with pf=1 (in debugview pf=1 is interlaced?) after 70 frames with pf=0 which are ok.
With this script:
Loadplugin("C:\Programmi\AviSynth2\plugins\Mpeg2dec3.dll")
Mpeg2Source("C:\WINDOWS\Desktop\Encoder\prova.d2v")
YV12toYUY2()
trim(0,2000)
crop(0,64,720,352)
I get the same error above indicated but it happens nearly a minute after.
With the second scrip the quality of frames is good but I noted that
removing the crop there is a horizontal flashing lin ,30 pixels under the top of frame.
I hope it is useful to you.
Regards
Sorry for my poor english.

Marc FD
26th November 2002, 08:34
okay 0.93 is up on my site. (with sources)

i've tested only on interlaced streams (pf = 0 is interlaced)

but i've no progressive source to test ...

>here is a horizontal flashing lin ,30 pixels under the top of frame.

hmm, i suspect something. i'll look into it. idon't do the job to end on the YV12 buffers mmx copy.

i think i've a little vob with progressives frame somewhere.

expect more tonight.

PS: yes, bugs where predictible, because i've changed a lot of code.

ookzDVD
26th November 2002, 09:21
@Marc FD,

I just finish encoding with your latest v0.93,
progressive source, 2:50 minutes length, with no problem.

lighty
26th November 2002, 11:38
@ookzDVD

Use longer clip or try to use slider in a long movie and you will notice that it will crash.

cult
26th November 2002, 13:07
loaded a normal movie(1h.48min)no crash when using the slider.And the problem is solved

lighty
26th November 2002, 15:32
Ummm- indeed when I load PAL interlaced source everything is fine but when I load NTSC progressive/interlaced source it keeps crashing. BTW- it is the same source where it used to strobe picture so I guess problem isn't solved yet.

Marc FD
26th November 2002, 17:02
i corrected 2 or 3 bugs, it should work now.

BTW, MPEG2Dec3 new buffering code should be faster for the source where you have problems ^_^

dl on my site in 10 minutes (time for me to upload ^^)

lighty
26th November 2002, 17:32
@Marc FD

Thx for the new 0.93b version. Slider now works without any errors and rewinding also haven't produced a single green frame.

As for strobing effect I will reencode same source that I had problems with before and I will advise here about all the results I get.

Good work Marc FD!:D

Bulletproof
27th November 2002, 02:30
This one is working for me with no problems :cool:

MaTTeR
27th November 2002, 03:06
Thx Marc! Seems like you found the bug for the strobing color problem. So far my encodes are looking great that caused me problems with the previous builds.

ookzDVD
27th November 2002, 03:32
@Marc FD,

If you don't mind, could you tell me about :

LumaFilter()

without parameter (use default value?)

is that the same with :

LumaFilter(-2,1) ?

Thank you.

lighty
27th November 2002, 10:22
Originally posted by MaTTeR
Thx Marc! Seems like you found the bug for the strobing color problem. So far my encodes are looking great that caused me problems with the previous builds.

I can confirm this. The NTSC progressive/interlaced source that gave me such troubles by strobing now works flawlessly. Thx Marc FD!:cool:

iago
27th November 2002, 13:14
@Marc

After a couple of full two-pass encodes with the latest version, I didn't have any problems either! ;)

Thanks for the bug-fixed new version,
iago

Marc FD
27th November 2002, 14:02
>LumaFilter()
>without parameter (use default value?)
>is that the same with :
>LumaFilter(-2,1) ?

yes, LumaFilter() == LumaFilter(-2,1) , because using 0,1 won't do anything anyway, and iago seemed to like the -2,1 setting ^_^

BTW, thanks at all for the support. i don't think MPEG2Dec is the faster MPEG2 decoder (hardware decoding or libmpeg2 is faster) but it's rock-solid. that's what i like. and 50 fps decoding is enough for me.

i'm gonna take a look on the audio aspect of DVD ripping.
i'd like to have a ac3source avisynth filter.

CruNcher
27th November 2002, 20:18
perfect it works now without any hassle great work Marc :)
could you implement PVA support i know that Nic is workin on this but it would be nice if also Mpeg2Dec3 with PP would support it thx for this great Decoder :)

Marc FD
27th November 2002, 22:04
PVA? i know MPEG2Dec3 supports ATSC (transport packets) streams or something like that. i never tried. i think tom can say more about this.

trbarry
27th November 2002, 22:42
Marc -

I think PVA are the European equivalent of ATSC streams, similar but not quite the same. And I have never worked with one so dunno what it would take.

BTW, I previously griped that MPEGDEC3 did not handle HDTV/ATSC streams but I think that maybe the only problem is if I try to crop in DVD2AVI and then use MPEG2DEC3. I'm doing an HDTV clip now and it seems fine (no cropping).

Final question? Does the deblocking in MPEG2DEC3 depend on the quants used for each block?

- Tom

springl
28th November 2002, 02:32
@Marc FD
Mpeg2Dec3 0.93 solved the problem of "strobo effect",thanks.
There is another method to solve it: if the parameter
"Field_Operation" in .d2v file is set to 1 (corresponding to FORCE FILM in dvd2avi, I think) all the versions of Mpeg2Dec3 ( 0.92 and prior) work without strange effects.I don't know if this solution works for all the people wiht "NTSC/FILM and interlaced/progressive frames" source material;with my source this solution is a valid alternative.
Not all the problems relative to this kind of source are still solved!! I noted that with certain sequences of frames the decoding is very slow (10-15 frames) and the restart correctly,a typical sequence is 0 0 ... 0 1 0 1 0 1 0 ... where 0<--->pf==0 and 1<--->pf==1 in debugview.
Last note: it seems to me that the resolution of Mpeg2Dec3 output in YV12 much lower than in YUY2(with YV12toYUY2 ) and YV12 output has more mosquito noise than YUY2.
What about?
Thx for your work.
Tix

Rrrough
28th November 2002, 09:10
PVA is an MPEG-2 transport stream format used by european digital satellite TV. you can find a basic document here. (http://www.technotrend.de/download/av_format_v1.pdf )

cheers

lighty
28th November 2002, 14:13
Originally posted by springl

Last note: it seems to me that the resolution of Mpeg2Dec3 output in YV12 much lower than in YUY2(with YV12toYUY2 ) and YV12 output has more mosquito noise than YUY2.

I haven't noticed any quality degradation and I looked hard...
BTW- what do you mean that resolution is lower? AFAIK- Resolution is same for YV12 as well as YUY2 and it only depends on the script what will you do with it...

Gannjunior
28th November 2002, 18:22
Hi,
I'm doing some tests with avs 2.50 + mpeg3dec3 0.92.
I've tried it on "Shining":i've done a complete encoding with divx 5.02.One with only Qpel and Pe2,the other with any tool.Resolution at 720x528.As encoder VdubMod.Fast rec...etc.Both encodings,made in 2pass,arrive at the end with any problem.The size I wanted is perfectly followed.BUT...my problem is that the film is perfect until 16 minute after the begin.From that point until end,I see the same frame that goes back and forward.
I've done another complete encoding with avs 2.07 and it's all ok(only slower ;) ).
Today i've done another encoding with 2.50 on another film: the same problem from sixteenth minute to the end.
Any Suggestion?

TIA

ciao!

Marc FD
28th November 2002, 19:22
>BTW, I previously griped that MPEGDEC3 did not handle HDTV/ATSC streams
>but I think that maybe the only problem is if I try to crop in DVD2AVI
>and then use MPEG2DEC3. I'm doing an HDTV clip now and it seems fine (no
> cropping).

avoid to change anything in DVD2AVI. i ignore many parameter, and something may pass trought. i think i'll remove the croping stuff in a next verison. and some other small changes. but it's very low priority.

>Final question? Does the deblocking in MPEG2DEC3 depend on the quants >used for each block?

yes, of course ^_^

>Field_Operation

all fields operations are working in 0.93

> Not all the problems relative to this kind of source are still >solved!! I noted that with certain sequences of frames the decoding is >very slow (10-15 frames) and the restart correctly,a typical sequence >is 0 0 ... 0 1 0 1 0 1 0 ... where 0<--->pf==0 and 1<--->pf==1 in >debugview.

hybrid sequences. MPEG2Dec is buffering a lot and playing with fields. i've optimised the stuff, and it should be faster than a regular MPEG2Dec.

>and YV12 output has more mosquito noise than YUY2.

lol. that's details ^^
MPEG2Dec YV12->YUY2 convertion is vertically blurring chroma a bit.


for transport streams, you need to make manual changes to the .d2v file.

lighty
28th November 2002, 19:33
Originally posted by Gannjunior
Any Suggestion?

Pls read this thread more carefuly. Use mpeg2dec3_0.93b. You can download it form Marc FD's site. Look for link in his sig.

trbarry
28th November 2002, 22:17
avoid to change anything in DVD2AVI. i ignore many parameter, and something may pass trought. i think i'll remove the croping stuff in a next verison. and some other small changes. but it's very low priority.

Marc -

Are you sure you really want to remove the cropping support? (not resize, which would be hard, and shouldn't be done in MPEG2DECx)

There are probably only half a dozen instructions somewhere in store.cpp that support the cropping by gimmicking the start offset and size. Likely the only problem is the adjustment for vertical cropping is off by a factor of 2 for YV12 instead of YUY2. I am goint to still support in in MPEG2DEC2 when I finally get around to it. (except I"m also using yours now ;) )

But if we are to remove the cropping support I have an alternate proposal. It would be nice if some of the parms (resize, cropping, etc.) that can be nicely and interactively set in DVD2AVI just be passed on to Avisynth where they would appear as variables, which could be referred to in functions and scripts.

So if there were vars like "DVD2AVI_Crop_Left", DVD2AVI_Horiz_Size, etc., then the actual work could be done in Avisynth after IVTC/deinterlacing where it belongs, and possibly after other filters. We could write our own custom scripts and still refer to the choices made interactively in DVD2AVI where you can see what you are cropping/sizing. Even choices like Force Film or PC/TV scale could be passed on, for whatever use.

Just a thought.

- Tom

Marc FD
29th November 2002, 17:36
>Are you sure you really want to remove the cropping support?

in fact, no. if i do something with MPEG2Dec3, it'ld only be bugfixes.

>There are probably only half a dozen instructions somewhere in >store.cpp that support the cropping by gimmicking the start offset and >size.

or call Crop() after MPEG2Source.

>Likely the only problem is the adjustment for vertical cropping is off >by a factor of 2 for YV12 instead of YUY2. I am goint to still support >in in MPEG2DEC2 when I finally get around to it. (except I"m also >using yours now )

please take MPEG2Dec3 v0.93 source code and work on it. i'm not going to update the code, so YOU could continue to improve it. (like adding proper cropping).

>But if we are to remove the cropping support I have an alternate
>proposal. It would be nice if some of the parms (resize, cropping,
>etc.) that can be nicely and interactively set in DVD2AVI just be
>passed on to Avisynth where they would appear as variables, which
>could be referred to in functions and scripts.

for me, Avisynth/VirtualDub is interactive enough. i don't like DVD2AVI ^^.

>So if there were vars like "DVD2AVI_Crop_Left", DVD2AVI_Horiz_Size, >etc., then the actual work could be done in Avisynth after >IVTC/deinterlacing where it belongs, and possibly after other filters. >We could write our own custom scripts and still refer to the choices >made interactively in DVD2AVI where you can see what you are >cropping/sizing. Even choices like Force Film or PC/TV scale could be >passed on, for whatever use.

if a filter can create global vars (sh0dan do you know more about that ?) it would be very easy to parse that from the DVD2AVI project file.

CruNcher
29th November 2002, 19:38
@Trbarry Marc_Fd and Nic :)

I tested Save-Oe with Transport Stream support on a recorded PVA file and i saw only some visual errors can't make a pic even not with hypersnap i couldn't even save it to AVI No Compress its allways produceing a 0 byte file and demuxing isn't working i think because of the different File System a PVA file uses but a Picture is there
i think the errors caused by seek problems in the PVA file ? it would be nice if DVD2AVI and fillters build up on it would support demuxing and playing of PVA files people then don't need to use PVAstrumento anymore :)

Maybe this could be off help http://home.t-online.de/home/michael-ring/DVD2AVI_PVAView-src-1.0.zip

trbarry
29th November 2002, 21:22
please take MPEG2Dec3 v0.93 source code and work on it. i'm not going to update the code, so YOU could continue to improve it. (like adding proper cropping).

Well, er, uhmmmmmm ...... that is kinda like feeding a stray cat. I'm afraid it might sort of make me responsible for it again and MPEG2DECx has never really been my top priority. It is much too much fun trying to talk you into doing all the work. ;)

But I must admit you have done an admirable job of it with all these enhancements.

If it is okay with you I would like to sometime merge all the changes in your new version back into the save-oe Sourceforge project. But I guess I was waiting to see when/if you lost interest and I would not be doing anything in a timely enough fashion to help the current Avisynth 2.5.

DVD2AVI & MPEG2DEC are funny projects, often orphaned for some reason. Somebody takes them and runs with them for awhile and then for awhile they just sit. But I'm real happy with your recent changes. When I got the project from OGO the cropping was busted too, so I guess I'm used to fixing it. ;)

@Sh0dan -

Is it easily possible somehow to pass back global vars from MPEGDEC to Avisynth like I suggested above? Is it like MPEG2Source creates a clip that could just have some more vars set by MPEG2DECx and referred to like other clips attributes?

- Tom

trbarry
29th November 2002, 21:33
Cruncher -

I'm afraid you are going to have to find someone who knows and uses PVA files to get support for those. Currently I'm pretty sure we look for the x'47' (IIRC) ATSC transport stream flags to identify US HDTV streams.

- Tom

Gannjunior
30th November 2002, 13:16
@Lighty
Pls read this thread more carefuly

I've not asked anything of strange and I've not asked nothing that has been treated many times...There's no answer about my problem in the others posts.And mpeg2dec3 0.93b isn't gone out one month ago...

However I've done the same encoding using mpeg2dec3 0.93b and I've had the same problem explained some post ago.I've also opened Vdub and the I've had the same problem even when I scroll DVD by Vdub.
So,dear Lighty,I've read CAREFULLY the thread and I've not seen any answer that could help me to solve my problem(If you have seen one,tell me :rolleyes: ).For that reason,I've posted my question 8 messages ago!

Regards

Wilbert
30th November 2002, 13:28
I'm afraid you are going to have to find someone who knows and uses PVA files to get support for those. Currently I'm pretty sure we look for the x'47' (IIRC) ATSC transport stream flags to identify US HDTV streams.
Anyone knows about PVA files and is willing to help Tom?

edit: maybe BB knows enough about this stuff and is willing to help you?

Bulletproof
18th December 2002, 03:01
There seems to be a major problem in the post processing of MPEG2DEC3. There are tiny distorted blocks in the video on edges of things. Sometimes there are several of them, I made screenshots so you could see. I'm using an AMD Athlon CPU. The IDCT changes do not make a difference. However, on Jackei's page (Author of DVD2AVI), he has a similar type of distortion in his program when using the IEEE-1180 reference IDCT with distorted blocks, I don't know if they are related, you can see that problem here: http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/idctref/

This is with CPU=4:

http://www.boomspeed.com/boya/bad.png

This is with CPU=0 (post processing off):

http://www.boomspeed.com/boya/good.png

Marc FD
18th December 2002, 14:18
well, i can only suppose things.
are you using iPP = true ??

BTW, the bug as nothing to do with what jackei's refers to.
it's really not easy to see, but i dunno why it's here.
i hope it's not my bad implementation ^__^

Bulletproof
18th December 2002, 21:07
Yes I was using iPP=TRUE, I have not checked yet if it happens with it off, but 99% of my material is interlaced so I always keep it on.

Marc FD
19th December 2002, 16:00
use separatefields, you'll see it does the job right.
as i writed in the readme, using iPP=true activates field-based PP.

i think deinterlacing will more or less remove these artifacts.

Bulletproof
25th December 2002, 07:22
On a somewhat related note, I just installed DivX 5.02, I had 5.01 installed for a while, and it's default post processing setting is up 1 notch. I noticed while playing a video today that it has the same exact problem with showing those blocks in frames, and this is from progressive video. After disabling post processing they dissapeared.

Acaila
1st January 2003, 19:15
@Marc FD:

When I use this filter (v0.94) I get the following output in debugview for every frame:
00000089 3.00058924 [1180] 1st-pass: size:106 total-kbytes:2 inter quant:2 MPEG kblocks:0 mblocks:0
00000090 3.00147482 [1180] MPEG2Dec3 log> pf = 1
00000091 3.01606831 [1180] MPEG2Dec3 log> fo = 0
00000092 3.01617335 [1180] MPEG2Dec3 log> top_field_first = 1
00000093 3.01622667 [1180] MPEG2Dec3 log> progressive_frame = 1

Now, since I get 4 extra lines for every frame it is increasing my disk usage, and in fact I believe it's actually slowing down my encodes because fps keeps dropping to zero every once in a while due to memory swapping. I've searched the readme that comes with it, but I haven't been able to find a way to disable MPEG2Dec3 from outputting these extra lines. Maybe I've overlooked something, but could you please tell me how to disable this extra info?

iago
1st January 2003, 19:32
@Acaila,

In DebugView, go to

Edit -> Filter/Highlight -> Exclude

and type in "mpeg2dec3". That's all! ;)

regards,
iago

Acaila
1st January 2003, 19:35
Hadn't even thought of that. Thanks :)

cweb
2nd January 2003, 10:23
Can you update the software you are using for your card? Updated
software should be able to save directly in MPEG-2. My hauppauge's
software does that. I never save in PVA. If I use PVA and PVAstrumento
I'd lose some bits of the video and/or audio, and that's not good.

I save in MPEG2 and then use DVD2AVI (the original or the improved
one by Tom) plus mpeg2dec3/avisynth 2.5 currently. The results are
great.

I would try updating the software (driver plus recording utility).
You can use a third party recording software such as Progdvb.


Originally posted by CruNcher
@Trbarry Marc_Fd and Nic :)

I tested Save-Oe with Transport Stream support on a recorded PVA file and i saw only some visual errors can't make a pic even not with hypersnap i couldn't even save it to AVI No Compress its allways produceing a 0 byte file and demuxing isn't working i think because of the different File System a PVA file uses but a Picture is there
i think the errors caused by seek problems in the PVA file ? it would be nice if DVD2AVI and fillters build up on it would support demuxing and playing of PVA files people then don't need to use PVAstrumento anymore :)

Maybe this could be off help http://home.t-online.de/home/michael-ring/DVD2AVI_PVAView-src-1.0.zip

CruNcher
2nd January 2003, 19:49
Can you update the software you are using for your card? Updated
software should be able to save directly in MPEG-2. My hauppauge's
software does that. I never save in PVA. If I use PVA and PVAstrumento
I'd lose some bits of the video and/or audio, and that's not good.

i use Progdvb a long time now mpeg-2 recording looks stable but there is now another problem with mpeg2dec3 Yv12, Marc has a test clip of the "repeating frame" bug and is investigating it. The problem recording directly to Mpeg-2 its more vurnearable to send errors loseing complete gops the bits loseing problem was corrected as i know in the new pvastrumento version 2.25

cweb
3rd January 2003, 17:06
I never get errors when I record to mpeg-2. Of course, I get errors
if I try to record something while doing something computation intensive, so when recording I try not to do anything else with the PC.
As a result there aren't problems usually with the recording and you
can say I never use pvastrumento even though I did install it and I
do update it.

I did update the dvb-s drivers from the ones which were supplied, so
perhaps that helps.

Originally posted by CruNcher
i use Progdvb a long time now mpeg-2 recording looks stable but there is now another problem with mpeg2dec3 Yv12, Marc has a test clip of the "repeating frame" bug and is investigating it. The problem recording directly to Mpeg-2 its more vurnearable to send errors loseing complete gops the bits loseing problem was corrected as i know in the new pvastrumento version 2.25

MrBunny
5th January 2003, 23:15
Just to suppliment what Acaila was saying about mpeg2dec3 debugview output. Even if iago's method manages to disable the debugview from actually outputting the lines to the screen, mpeg2dec3 is still "sending" those lines to debugview. Although it's probably very minor, it's probably still results in a performance hit. I was wondering if it would be possible to have an option to disable that output.

Thanks

MaTTeR
5th January 2003, 23:58
Originally posted by MrBunny
Although it's probably very minor, it's probably still results in a performance hit. I was wondering if it would be possible to have an option to disable that output. If a performance hit exists it has to be very minor, so much so that you won't notice. Before we started filtering the performance hit was coming from DebugView gobbling up lots of RAM, if you filter you shouldn't see this anymore.

AFAIK MarcFD already said he would give the user an option to disable the output in the next version.

Evil Andy
10th January 2003, 17:23
I know something like this has come up before but I'm getting 'Unrecognised exception errors' with 0.94

All I have access to are progressive PAL sources and so far not a single one will work even for such a simple script as

LoadPlugin("C:\ANDY\GORDIA~2\mpeg2dec3.dll")

MPEG2Source("C:\andy\dvd ripping\test\series 1 - episode 2 - the new girl.d2v")

Guest
10th January 2003, 17:41
Make a very small VOB available for download that causes the problem. Use VOBSplitter if necessary. Then we can try to duplicate your issue.

Just for fun, try making your d2v and VOB files have no spaces in their names.

Evil Andy
10th January 2003, 23:39
Tried making the filenames 8.3 standard, still no joy.

Attaching a small vob.

Evil Andy
10th January 2003, 23:40
Ahem, attaching a small vob

Guest
11th January 2003, 01:01
Your VOB works just fine for me with mpeg2dec3_094, 1/10/03 Avisynth 2.5, DVD2AVI 1.76, and this script:

LoadPlugin("d:\avisynthplugins\mpeg2dec3_094.dll")
mpeg2source("ickle.d2v")

You must have a hosed-up installation or an unexpected DLL floating around that is being loaded.

cweb
11th January 2003, 09:56
Hello Neuron2,

Thanks for compiling mpeg2dec for avisynth 2.5. I did find another case which gives the looping problem with Marc's mpeg2dec3 (see the other thread in this forum). So I think the problem is not yet solved.
If you want, I can give you the clip in question.

Guest
11th January 2003, 12:00
The fact that a VOB fails for you and not for the rest of us suggests that there is a problem with your system. I'll try your new VOB if you like, but you oughtn't ignore this finding.

cweb
11th January 2003, 12:24
Hmm.. actually I don't use VOBs :) - I presume you are replying to Andy,
not me. My clip is a satellite dvb-s MPEG2 recording.

Originally posted by neuron2
The fact that a VOB fails for you and not for the rest of us suggests that there is a problem with your system. I'll try your new VOB if you like, but you oughtn't ignore this finding.

Guest
11th January 2003, 12:37
You're right. Sorry.

Evil Andy
11th January 2003, 19:14
This is most frustrating. Here's what I've done so far.

1.) Clean install of Win98

2.) Install both Gordian Knot 27 packs, rip and system.

3.) Unzip the latest avisynth 2.5 dll and place it in windows/system, overwriting the original dll placed there by Gordian Knot.

4.) Install the latest release of VirtualDubMod.

5.) Unzip the latest release of mpeg2dec3 (0.94) and put the 3 files in my Gordian Knot directory.

6.) Rip DVD using DVDDecrypter and get a project file with DVD2AVI 1.76 (doing no editing in DVD2AVI).

7.) Write out the above script exactly (well, apart from the filenames and paths).

8.) Attempt to load my avs in VDMod.

9.) Swear loudly as I get unrecognised exceptions.

What am I doing wrong? It must be something embarrassingly simple as no one else is having these problems.

Guest
11th January 2003, 20:13
What happens with the Avisynth 2.5 port of dividee's mpeg2dec that I posted on another thread?

scmccarthy
11th January 2003, 22:20
@ evilandy
neuron2
an unexpected DLL floating around
Don't forget to search your entire drive for avisynth.dll and compare the results with your paths and the versions of the dll to make sure there is no conflict.

Stephen

MaTTeR
11th January 2003, 23:09
It's just a thought but you might also put the avisynth.dll inside of the Vdub folder.

Evil Andy
11th January 2003, 23:14
Your avisynth 2.5 port of mpeg2dec works fine and I know avisynth 2.5 is installed correctly because a simple version script works fine.

This script works

LoadPlugin("C:\test\MPEG2DEC_avisynth25.dll")
#LoadPlugin("C:\test\MPEG2Dec3.dll")

mpeg2source("C:\test\test.d2v")

crop(10,9,701,557)

BicubicResize(544,304,0,0.5)

This script doesn't

#LoadPlugin("C:\test\MPEG2DEC_avisynth25.dll")
LoadPlugin("C:\test\MPEG2Dec3.dll")

mpeg2source("C:\test\test.d2v")

crop(10,9,701,557)

BicubicResize(544,304,0,0.5)

Evil Andy
11th January 2003, 23:17
And no joy putting avisynth.dll in my vdub folder either.

I'm stumped :confused:

MaTTeR
11th January 2003, 23:37
One last thing, make sure your always cropping and resizing using even numbers.

Evil Andy
12th January 2003, 00:13
Whoops, that was sloppy of me, but that's not the problem either as


LoadPlugin("C:\test\MPEG2Dec3.dll")

mpeg2source("C:\test\test.d2v")


Still throws up an exception.

That last script, however, does load up in vdubmod. The exception comes when i try any of the seek or preview buttons. A check under file info shows it is recognising the source as YV12 and is using DivX 5.02 as the decoder.

trbarry
12th January 2003, 01:07
Some versions of DVD2AVI get bundled with a DVD2AVI.ini file from a machine of different processor type. For instance you don't want to have one saying IDCT=4 if you aren't running on a P4. (use 2 for mmx)

You might just try deleting your DVD2AVI.ini file and remaking the .d2v with the defaults, using DVD2AVI 1.76.

- Tom

Evil Andy
12th January 2003, 01:21
still a no go.

Guest
12th January 2003, 04:44
Redownload the mpeg2dec3. Maybe it got corrupted.

Evil Andy
13th January 2003, 16:55
Sigh, still a no go. Perhaps I'll try compiling the source for myself and see how that works out.

blue`ostyler
15th January 2003, 06:18
Evil Andy

I had exactly the same problem.
"Unrecognized Exception!"
I tryed almost everything:
- Recompiling MPEG2dec3
- Changing the IDCT under DVD2Avi
- Changing from Avisynth 2.5 with MPEG2dec3 0.94 to Avisynth 2.07 with MPEG2dec3 Beta6
- Installing AVS with VdubMod and xvid codec on another PC which didn't have anything before
- other things i don't remember

BUT, i tryed too to simply go back from DVD2AVI 1.77.3 to 1.76
and it works.

In fact, i don't have to use DVD2AVI 1.76 to make the thing work perfectly. I just open the D2V file and delete the bracket, then change Luminance_Filter=0,0 to Luminance=0,0 and all is ok :)

But if you use DVD2AVI 1.76 to create the d2v, then your problem still remains weird...

scmccarthy
15th January 2003, 16:54
@blue

If Andy is smart enough to use Gordian Knot, then he is using DVD2AVI 1.76. Gordian Knot only uses well tested, compatible versions of the software.

Stephen

Evil Andy
16th January 2003, 16:18
I'm using the DVD2AVI that came bundled with Gordian Knot ie 1.76

Latest thinking is that it's maybe a problem with Avisynth 2.5 after all as I've found that Convolution3d produces the same error.

I'll go through a plug in spree to find what others give me the same error.

sh0dan
16th January 2003, 16:27
@EA: Have you tried searching through you entire HD for avisynth.dll to be sure that there isn't another version lying around somewhere?

Evil Andy
16th January 2003, 16:36
Yep, just the one copy in Windows/System

A quick 'Version' script confirms it as 2.5

Some 2.5 plugins are working for me (e.g. the recompiled mpeg2dec) and some aren't (e.g. mpeg2dec3 & convolution3d)

kilg0r3
16th January 2003, 19:12
@evilandy

sorry if this sounds stupid, but, have updated your system with recent drivers (for chipset etc.), directx version and all the nice things you can get from windowsupdate.microsoft.com?

is avisynth 2.0x working for you?

how about uninstalling divx and using xvid for yv12 decoding?

that's all i can think of atm

scmccarthy
16th January 2003, 19:30
Some 2.5 plugins are working for me (e.g. the recompiled mpeg2dec) Ah Ha! mpeg2dec.dll was recompiled for AviSynth 2.5 without added YV12 capability. If I am right, mpeg2dec3 would work it you converted to YUY2 in your script.

Stephen

Evil Andy
30th January 2003, 11:14
Well I don't know what changes were made to avisynth or mpeg2dec3 for the beta release but everything's working fine now. Thanks to all developers and people who tried to help me with my problems.

snooty
24th February 2003, 03:04
Hi - Can someone please tell me where to download the latest version? Mr. Marc FD has changed his sig so I don't know where to get it.

Thanks,

Paul

Guest
24th February 2003, 05:22
Originally posted by snooty
Hi - Can someone please tell me where to download the latest version? Mr. Marc FD has changed his sig so I don't know where to get it.
http://ziquash.chez.tiscali.fr/

Monamona
9th March 2003, 03:46
I got broken image (like stripe) with the following AVS file.

---
LoadPlugin("mpeg2dec3.dll")
Mpeg2Source("dvd.d2v")
crop(8,0,704,480)
YV12toYUY2(interlaced=true) or YV12toYUY2()
---

The source is interlaced anime(NTSC 30fps).
When I delete crop(), everything seems to be perfect.

---
[Encoding Environment]
Mpeg2Dec3 1.00
Avisuynth 2.5 (latest beta)
VirtualDubMOD 1.4.13.1
(Pentium 3)
---

ryangs
15th March 2003, 03:41
I can't open my MPEG2 file at all--it tells me that it "couldn't open file." It's odd, because Nic's mpegdecoder has no trouble dealing with it. I'd just use that but I'd like to try MPEG2Dec3's postprocessing. It's a 480x480 MPEG2 SVCD source... any ideas?

Marc FD
16th March 2003, 20:17
"couldn't open file" mean that the input path is wrong

ryangs
16th March 2003, 21:11
Originally posted by Marc FD
"couldn't open file" mean that the input path is wrong

I've double and triple-checked the path--I know it's correct. If I hadn't typed the path right, Nic's wouldn't open it, either.

Marc FD
16th March 2003, 21:31
"couldn't open file" ?
okay it wasn't env->ThrowError("MPEG2Source : unable to load file \"%s\" ",path);

so it's an internal error.
it should NEVER appear !!

try to make a small cut of you mpeg2 (about 5 mo) and upload where i can leech it, i'll take a look in my freetime (nothing granted)

i think it's due to the unhabitual format. (remeber dev are often the ones who use the less their own tools ^^)

Prettz
4th April 2003, 21:25
I'm not sure if this question can really be answered, but about how much difference in quality should you expect using idct=5 (32bit SSE2) with MPEG2Dec3 versus, say, using the 64bit FPU mode (or the 64bit IEEE reference mode)? Would any differences be dependent on the source?

Also, wouldn't there be a way to do the algorithm with 64bit SSE2? I can understand if it's just that nobody wants to code that right now, but I'm just curious since I thought I remembered there being both 32bit and 64bit versions of all of the SSE2 instructions.

ryangs
5th April 2003, 18:19
Marc FD:

I tried two other MPEG2 files, and neither worked. One is another SVCD encoded file, the other is DVD encoded. The problem must be with my system somehow. Could the MPEG2 filters from some programs I installed (like WinDVD or PowerDVD) be interfering with MPEG2Dec3? I'm running WinXP Pro SP1 with Avisynth 2.5.1 beta and VirtualDub 1.5.1.

Marc FD
16th April 2003, 19:53
>Could the MPEG2 filters from some programs I installed (like WinDVD
>or PowerDVD) be interfering with MPEG2Dec3

no

litz
19th April 2003, 05:54
Using mpeg2dec3.dll to read HDTV transport streams, I'm running into TERRIBLE problems with bitstream errors.

These are short little subframe to 1 frame glitches in the transmission.

There is no way to avoid these - they simply happen.

But mpeg2dec3.dll totally explodes any time it runs across one, causing an access violation error in avisynth - crashing avisynth and causing any and all subsequent frame requests to fail.

At that point, the only solution is to shut all the software down, restart, and try again, avoiding the frame in question.

is there ANY way around this? This problem effectively makes the dvd2avi/mpeg2dec3 solution to HDTV recompression impossible.

A sample of a .ts file that causes the error is available upon request.

thanks

- litz

bartnl
5th May 2003, 18:03
I'm having the same trouble with digital TV recordings from satellite. On some recordings avisynth will crash when there is a single bad frame. Bad thing is that these bad frames do not get recognized by the 'scan video stream for errors' option of VirtualDubMod.

As a workaround I use the YV12 decoder from http://nic.dnsalias.com/MPEGDecoder.html that doesn't read the start- and endpoint in d2v files very well. I.e. it reads the whole source. This can be corrected by making proper selection in VirtualDubMod.

Therefore I will always first start with mpeg2dec3.dll and if that fails I use the other. It seems however that more and more recording fail with mpeg2dec3.dll . I hope this is just because I actually have more recording errors :confused:

trbarry
5th May 2003, 22:04
is there ANY way around this? This problem effectively makes the dvd2avi/mpeg2dec3 solution to HDTV recompression impossible.

A few months ago I implemented a couple HDTV solutions out of desperation on MPEG2DEC2, for Avsynth 2 and below (YUY2 only).

See www.trbarry.com/MPEG2DEC2.zip .

In that one I made all the buffers a lot bigger. This wastes memory but lowers the chance of falling off the end of the buffer during motion estimation when trying to process garbage. That alone saves a lot of clips, since that is where it would usually crash.

And for really desparate measures that zip also contains a copy of MPEG2DEC_ER.dll (Error Recovery). If you do a Loadplugin for that instead of the regular MPEG2DEC2.dll then it will have an error trap that properly returns garbage frames out for garbage in.

However it is slower and seems to also sometimes crash Vdub when you finally exit. On the good side your encoding will be finished by then. ;)

- Tom

bond
17th May 2003, 18:01
great news for all mpeg2dec3 fans! for all of you who dont know it by now: there is a new version of mpeg2dec3 out! more infos here (http://forum.doom9.org/showthread.php?s=&threadid=53164)

Ewi
17th May 2003, 20:15
Is it already recommended to use Nics new version or is it still only for testing? The one included in Gknot is the original 1.0, isn't it?

bond
17th May 2003, 20:25
it's ok to use nic's new build! the one in gknot is still 1.0 but lenox is thinking about replacing it with the new one

dapipa
10th February 2004, 10:48
Originally posted by Prettz
I'm not sure if this question can really be answered, but about how much difference in quality should you expect using idct=5 (32bit SSE2) with MPEG2Dec3 versus, say, using the 64bit FPU mode (or the 64bit IEEE reference mode)? Would any differences be dependent on the source?

havin'rule 1 on my mind,i searched first for an answer,but found only this question - precisely what i wanted to ask - but it's almost a year old and there's no response:(could anyone answer it for me?

Nic
10th February 2004, 11:11
The difference in visual quality would be minuscule. Your best bet, if you really want to know. Is to try two small clips with both ssemmx2 and reference dct and see if you can tell any difference. I doubt you will be able to. (Doom9 once did a test himself and was unable to determine a difference)

However, it was once thought that trbarry's simple idct produced smaller files when used to compress and was better quality than ssemmx idct. But, it wasn't tested much and the difference would only be very small. I recommned using the fastest idct for your computer.

There, hopefully that finally answers that question,

Cheers,
-Nic

Cyberia
11th February 2004, 23:58
Nic, does the 64bit FPU mode use Miha's code? I'm pretty sure DVD2AVI does use miha's code for 64bit idct.

If that's the code you are using, Miha produced a page demonstrating how his(her?) code was superior. Basically, the 64bit code produced fewer color errors in individual pixels than ANY 32bit implementation, and the errors that did occur were much smaller in scope.