View Full Version : YV12: mpeg2dec, mpeg2dec2 and mpeg3dec developers
jarthel
2nd November 2002, 09:47
isn't this thread more suitable to the "developer's section"? :)
jayel
iago
2nd November 2002, 11:19
Originally posted by Marc FD
...BTW, if s.o. want to try a real encode, and need filtering, the PP in MPEG2Dec3 is working (it's YV12 based ^^)... @Marc and all,
I can confirm that PP (cpu=x) is working great in mpeg2dec3 YV12. (edited/deleted)
BTW, I'm really sorry to hear that Marc announced he stopped development for an uncertain period...
@Donald,
I'm deeply sorry to hear about that. Condolences.
@everyone,
The result of my full two pass encode is great. Speed is amazing and colours are really much more natural, as Koepi mentioned too. I just wanted to share that. The only problem is there is a very thin green line at the bottom edge of the image (decoded with Nic's latest xvid.ax). My crop and resize values were as below:
crop(4,4,-4,-8)
BilinearResize(576,320)
best regards,
iago
Koepi
2nd November 2002, 11:25
I did a full 2pass with th Element Second Edition again, I hacked my latest development snapshot to "support" YV12 like sh0dan mentioned.
Unfortunately, I get plenty of colour errors/mismatches/smearing effects.
But the quantizer distribution is much more like I can accept it, compared to sh0dans stable-hack ;)
I'll look into this, I just wanted to mention why I didn't put up a YV12-hacked build of my binary yet.
Regards
Koepi
EDIT:
Oopsi. I just used a "fresh copy" of the xvidcore and the dshow filter, compiled it, and now playback is fine again. Ffdshow has it's problems with xvid qpel again though :-/ Still, if you're interested, I could put up an "YV12-hacked build", just need some votes for that ;)
Gaia
2nd November 2002, 11:42
Yes very nice work. It's very fast. Only problem is that this small green line is still there. It's not gone.
iago
2nd November 2002, 11:56
@Koepi
Vote 1 from me, "dostum"! ;)
regards,
iago
Rrrough
2nd November 2002, 12:34
@ErMaC
What exactly do I need to start testing this stuff and using it and keep it in an isolated environment? 2 different windows partitions work as well, supposed your HD is large enough... dividing your system into a "stable" and a "dev" part ;)
EDIT : xvid-mod in the VDMPG2-mod directory is working as a separate solution (see below), but I think avisynth 2.5 needs to be installed properly.
@iago
And a question: In Nic's XviD hack, B-frames are inactive. Did/do you use B-frames and/or QPel in your hack? make sure, sh0dan's xvid.dll isn't still in the same directory as the modded VirtualDubMPG2, otherwise it seems to use this XVID-version !
@all
that's a real boost in development, I also want to thank all involved people for working together on a great project ! thank you all.
cheers
iago
2nd November 2002, 13:01
Originally posted by Rrrough
make sure, sh0dan's xvid.dll isn't still in the same directory as the modded VirtualDubMPG2, otherwise it seems to use this XVID-version !@Rrrough
:confused: Thanks for mentioning this!
iago
Rrrough
2nd November 2002, 13:05
@iago
does it work now for you ? I asked the same question myself yesterday, until I tried to move the xvid.dll from the directory.
EDIT: errm, maybe I didn't make it clear, if you have an xvid.dll in the virtualdub directory, virtualdub uses this version, no matter what build you have installed. Nic's hack is a dev-build. if b-frames are grayed out for you, you probably have sh0dans or another xvid.dll in the virtualdub directory.
cheers
iago
2nd November 2002, 13:35
@Rrrough
Yes, you're right. So my previous encode was with Shodan's build ;). I removed the xvid.dll from modified VirtualDubMpg2 directory and now I'm using Nic's build with B-frames enabled. It's also clearly visible from the debugview output, which I overlooked in my previous encode. Thanks for clarifying this.
regards,
iago
edit: my previous posts are edited accordingly, to avoid possible misguidance on the part of other users.
Alestrix
2nd November 2002, 17:38
@koepi:
One more vote from me!
(wanna be able to uninstall DivX again :-) )
- Alex
trbarry
2nd November 2002, 19:33
Koepi -
Vote from me too.
- Tom
int 21h
2nd November 2002, 19:41
Hmm, no matter what I try, with MPEGDecoder I always get 'failed to open' for my vob...
SetMemoryMax(96)
LoadPlugin("C:\ENCODI~1\MPEGDecoder.dll")
MPEGSource("D:\VIDEO_TS\VTS_03_1.vob",-2,"decss")
BicubicResize(576,256,0,0.65)
or
SetMemoryMax(96)
LoadPlugin("C:\ENCODI~1\MPEGDecoder.dll")
MPEGSource("C:\vobs\VTS_03_1.vob")
BicubicResize(576,256,0,0.65)
Both places are valid paths and the vobs do rest at those locations (D: being the DVD Drive). This is with the newest alpha of Avisynth, and the newest download of MPEGDecoder from nic's homepage and I tried both VirtualdubMPG2 and the supplied version from this thread... The exception is being thrown from Line 3...
I know I tested this before and it worked fine, any ideas?
Rrrough
2nd November 2002, 20:28
hmmm, I guess MPEGDecoder doesn't output to YV12 yet :confused: did you try MPEG2DEC3 yet ?
EDIT: sorry, stupid thinking, of course it should work with YUV2 as well...
Nic, do you plan to support it with your next ("rebirth") version ?
that will probably give the next speed boost ! I'm really looking forward to it.
cheers
ARDA
2nd November 2002, 20:52
@int 21h
I couldn't open a vob either.
I've been able to encode a short clip with the following:
Avisynth 2.5 from shodan, xvid.dll and Virtualdubmpg2 modified
from this page http://cultact-server.novi.dk/kpo/avisynth/avisynth_alpha.html
+dlls in virtualdubmod projects page http://sourceforge.net/projects/virtualdubmod,
mpeg2dec3 yv12.zip,from Marc FD first page of this thread and this avs.script
LoadPlugin("C:\Avisynthplugins\mpeg2dec3 YV12.dll")
MPEG2Source("D:\LaPutaVida\laputavidapista1.d2v",CPU=0,IDCT=5).
\crop(8,8,704,536).LanczosResize(640,336)
I hope than can be usefull
Arda
@Koepi -
Vote from me too.
Arda
And I've almost forget to say THANKS EVERYBODY for this new revolution.
_______________________________________________
Lo único absoluto es el cambio permanente
vlad59
2nd November 2002, 21:05
IIRC avisynth 2.5 (alpha) use a brand new avisynth.h so all existing filter must get recompiled to be used with v2.5
iago
2nd November 2002, 21:10
@vlad59
I hope one of the first of those will be your "Convolution3d YV12.dll"! ;)
regards,
iago
MaTTeR
2nd November 2002, 21:13
It seems even basic scripts fail with v2.5 on one of my machines. With some trickery I've managed to encode a 2pass movie with XviD though and all seems to be working fine on the dualie PIII.
Following script causes instant VirtualDubMpg2 crashes upon opening-
LoadPlugin("C:\Program Files\AviSynth2\plugins\MPEG2DEC3 YV12.dll")
mpeg2source("D:\DivX RIPs\Romeo is Bleeding\romeo.d2v")
crop(8,4,708,468)
BicubicResize(624,348,0.4,0.4)
I tried no less than 20 different MOD-4 and MOD-8 resolutions and still no luck:rolleyes: So it seems my Win2k/Dual AMD system doesn't have much hope for YV12 for the moment.
Edit- I hope one of the first of those will be your "Convolution3d YV12.dll Yes, that will be great indeed.
vlad59
2nd November 2002, 23:01
@iago & MaTTer
Don't worry it's almost done. I just have to take care of first and last line who need a special work and that's it.
@MaTTer
You should be happier too : due to the rewrite it will be easier to add SMP support.
Koepi
2nd November 2002, 23:57
XviD-02112002-1:
- Fresh CVS checkout. GMC support (search precision ultra).
- New mod. HQ quant type reimplemented.
- Hacked in YV12 decoding support for new YV12 testings at forum.doom9.org.
GMC! Yay!
No improvement on first pass size for a test on "shanghai noon" yet, but let's see the result in a few hours (well, i most likely will sleep when it's finished), it even grew bigger - it seems minimum framesize isn't always used with GMC as is now, but at least we have something to play with...
Regards,
Koepi
MaTTeR
3rd November 2002, 00:02
@vlad
I'm already drooling for that rewrite;) I'm sure it will be worth the wait.
@Koepi,
Wow! GMC is now implemented as well. I can't keep up with all these new features. Thx for the new build!
Edit- Koepi,
So I gather that using MotionSearch 6 is also going to use Qpel along with GMC? I wish we had a way to turn each of the features on/off.
Rrrough
3rd November 2002, 00:08
@Koepi
thank you for granting our wishes so fast ! :)
not does only the speed of conversion grow, but also the speed of development. AMAZING
@vlad59
well, drooling here, too !
cheers
Koepi
3rd November 2002, 01:02
Yes, search precision 6 throws everything in we have, so qpel as well ;)
Regards,
Koepi
MaTTeR
3rd November 2002, 03:10
I'm sure it's too soon for this but just curious if anyone knew of a softening/blur filter that works in the YV12 space right now. If not, I'll wait patiently like everyone else:D
I managed to finally get a script to open an encode on my dual AMD box now, the trick is to not have any resizing line for some reason. As soon as I try to resize with any resolution it causes the immediate VdubMPG2 crash. Seems very stable on the dual PIII 850 box though, have done several 2 pass movies already today.
Just wanted to say thx to all the ppl who are contributing to make YV12 happen.
vlad59
3rd November 2002, 12:12
@all
while testing Convolution3D for YV12 I had some stange results :
I wanted to compare a simple avs script in YUV2 and YV12 colorspace to test the compressibility / speed of filters
My avs script is simple mpeg2source, crop & that's all.
I used DivX5 to decode YV12, all encode are done with a very old Xvid.
in YUV2 :
without C3D :
speed : 8.6 fps
first pass size : 69839 Ko
with C3D (v1.01) :
speed : 4.9 fps
first pass size : 48548
in YV12
without C3D :
speed : 8.34 fps ???????
first pass size : 74138 ???????
with C3D (new YV12) :
speed : 5.8 fps
first pass size : 49983
Strange, isn't it !
I'll make a test with the latest Koepi Xvid which can decode YV12 without Divx5 but I don't understand fully.
The good news is that C3D is faster with YV12.
Rrrough
3rd November 2002, 12:39
@vlad59
that's definetly strange :confused: but I'm glad C3D gets sped up !!! YAY
@all
I was reporting this XVID+VD YV12 decoding "problem" to xvid-user list, and guess what, sh0dans hack is already in CVS now, and it's being discussed now if+how xvid color conversion can/should be used by other programs, so maybe we'll get the preview function working purrfectly with XVID and ... bye bye DivX5 ...
cheers
ErMaC
3rd November 2002, 13:45
Update:
It does indeed appear that if I stick all the pertinent files in a single directory and open everything manually using the file->open dialog boxes, I can use the new DLLs in an isolated environment. I downloaded the VDubMOD DLLs, the AVISynth package and the binary DLL, and MarcFD's mpeg2dec yv12 and placed them all in a folder and Version is reporting back v2.5 - I'll do tests with some DVD encodes shortly.
@Vlad
I'm also waiting for the Conv3d so I can do REAL encodes (since now I only do DVD rips using it).
I also have an SMP system so if you need someone to test your SMP code please let me know and I would be happy to help. I'm running dual P3 700MHz on an Abit VP6.
sh0dan
3rd November 2002, 14:38
Originally posted by vlad59
@
My avs script is simple mpeg2source, crop & that's all.
I used DivX5 to decode YV12, all encode are done with a very old Xvid.
[...]
Strange, isn't it !
I'll make a test with the latest Koepi Xvid which can decode YV12 without Divx5 but I don't understand fully.
Are you using the modded VDub MPG2? Otherwise your YV12 will be converted to another format before it is handed to XVID. With the XVID hack, you don't risk that (you'll just get black frames).
The good news is that C3D is faster with YV12.
Well, that's just great news! Seems like we're getting some fairly good speeds for 2.5 - nice!
sh0dan
3rd November 2002, 14:42
Originally posted by Rrrough
I was reporting this XVID+VD YV12 decoding "problem" to xvid-user list, and guess what, sh0dans hack is already in CVS now, and it's being discussed now if+how xvid color conversion can/should be used by other programs, so maybe we'll get the preview function working purrfectly with XVID and ... bye bye DivX5 ...
I hope I have not laid it out that way - it's not a bug in Xvid, that it doesn't decode YV12 - it's just another feature of DivX5. I'm not to judge if this should be a feature of Xvid, or if there should be written a seperate codec for this (without XVID).
I do however see a good point in Xvid supporting YV12, since it'll probably broaden the use of Xvid even further. But please remember - it's not an Xvid bug!
sh0dan
3rd November 2002, 14:46
Originally posted by MaTTeR
Following script causes instant VirtualDubMpg2 crashes upon opening-
[...]
So it seems my Win2k/Dual AMD system doesn't have much hope for YV12 for the moment.
I'll try it out to see if I can reproduce!
Rrrough
3rd November 2002, 15:14
I hope I have not laid it out that way - it's not a bug in Xvid, that it doesn't decode YV12 - it's just another feature of DivX5. I'm not to judge if this should be a feature of Xvid, or if there should be written a seperate codec for this (without XVID). no, I didn't regard it as a bug and didn't describe it as one in the mailing-list, that's why I wrote "problem" here.
The term of "feature-addition" would be more suitable, I guess. :)
It is proposed now (and concerning your hack, it's already accepted) and the judges (=xvid-devels) have to decide whether it should be done or not.
cheers
sh0dan
3rd November 2002, 15:34
@Rrrough: ok :)
/me looks up from, and relaxes a bit to see that there are no angry Xvid-devel's after me. :cool:
[Toff]
3rd November 2002, 15:45
@sh0dan
RGB support in 2.5alpha (avisynth_a_011102.zip) seems broken.
Here is a test clip (650ko) :
http://christophe.paris.free.fr/temp/bug_AVS25_RGB24.avi
And the avs script:
AVISource("bug_AVS25_RGB24.avi")
ConvertToRGB24()
MaTTeR
3rd November 2002, 15:52
Originally posted by sh0dan
I'll try it out to see if I can reproduce!
Well after hours of trying to get it working I finally managed to do so by cropping in multiples of 8 instead of 4. Of course I also I had to use a MOD-4 resolution. It seems to be working great and very stable.
At 640 resolution I was encoding at 63FPS, I'd say that's a nice speed boost; not to mention the colors staying slightly cleaner. Thx anyways shOdan!
sh0dan
3rd November 2002, 16:26
Originally posted by [Toff]
AVISource("bug_AVS25_RGB24.avi")
ConvertToRGB24()
ConverttoRGB doesn't support YV12 (as stated on the alpha page).
UseAVISource("bug_AVS25_RGB24.avi")
ConvertToYUY2()
ConvertToRGB24()
sh0dan
3rd November 2002, 16:32
Originally posted by MaTTeR
Well after hours of trying to get it working I finally managed to do so by cropping in multiples of 8 instead of 4. Of course I also I had to use a MOD-4 resolution. It seems to be working great and very stable.
@MarcFD: Are you using AlignPlanar in Mpeg2dec3?
Edit: It seems more like an unintentional "feature" in the horzontal resizer.
Edit2: Which leads back to a bug, where avisynth.h not returned aligned row-widths.
sh0dan
3rd November 2002, 18:49
New version. Fixing mod 4/8 problems. Complete changelist:
* Resizer now works with MOD4 resolutions.
* MergeLuma/MergeChroma now supports YV12
* Fixed bug in YV12 greyscale.
* Fixed general bug on resolutions that are not mod16.
* NewVideoFrame() now throws an error, if a filter attempts to create an YV12 image that isn't mod4.
* Separatefields() should now split chroma correctly (according to the YV12 spec.)
* Mod4 checks in Resize, crop, addborders.
Enjoy
Bug? - I get some chroma noise on the last line when resizing vertically.
Edit: There seems to be stability issues with this release. I'll test further, but beware!
Edit3: Hopefully fixed it.
New feature:
* Added Limiter(clip,min_luma, max_luma, min_chroma, max_chroma) (inspired by Sansgrip)
MaTTeR
3rd November 2002, 18:54
Thx for the confirmation sh0dan. New build changelist looks great!
Edit- I just wanted to confirm with you that TemporalSoften still isn't YV12 supported. Correct?
Marc FD
3rd November 2002, 19:06
>Are you using AlignPlanar in Mpeg2dec3?
no. the internal buffers are all 128-bit aligned, but i just added a very simple memcpy from these buffers in each plane.
sh0dan
3rd November 2002, 19:20
@Matter: Correct. It hasn't been implemented yet. I hope dividee will get back to assist us.
@MarcFD: OK. If you use NewVideoFrame that isn't a problem. Just wanted to make sure :)
Koepi
3rd November 2002, 21:45
XviD-03112002-1:
- Fresh CVS checkout. GMC decoding support added.
- New mod. HQ quant type reimplemented.
- Added checkboxes for qpel/gmc for better control.
Well, now even YV12 support is "official", maybe you like this build more.
Regards,
Koepi
iago
3rd November 2002, 23:08
@shOdan,
Any ideas and/or hope ;) about the "green-line-at-the-bottom-edge" problem?
@Tom,
Sorry for asking this one more time but any plans on making a YV12 release of UnFilter? ;) (I got addicted and can't live without it! :p)
Best regards and many thanks again to everyone putting effort on this great work.
iago
MaTTeR
3rd November 2002, 23:22
Originally posted by iago
@shOdan,
Any ideas and/or hope ;) about the "green-line-at-the-bottom-edge" problem? I noticed it on my encodes today also.
MOD-8 resolutions does seem to work now with the new AVS build from shOdan and I haven't experiences any instabilities yet.
trbarry
4th November 2002, 05:38
Sorry for asking this one more time but any plans on making a YV12 release of UnFilter? (I got addicted and can't live without it! )
iago -
Yep, Unfilter should be an easy port. But my YV12 plans for the moment are:
- UnDot (fast deringing dot remover), new and simple, mostly done
- TomsMoComp, about half done
- SimpleResize, harder, but I want it
- UnFilter, not hard, but not first ;)
- MPEG2DEC2 HDTV support, others?
As I posted elsewhere, I'm actually having more trouble with YUY2 in the 2.5 alpha.
- Tom
ookzDVD
4th November 2002, 06:02
@forum,
Can someone please post an example of your working .avs script
(complete) for this YV12 ?
How many percent improvement use the YV12 over the "regular" one ?
@sh0dan,
Is all the build resize filter : Bilinear, Bicubic, Lanczos support
the YV12 ?
Thank you.
MaTTeR
4th November 2002, 06:58
Originally posted by trbarry
UnDot (fast deringing dot remover), new and simple, mostly done
Tom,
That's great news, glad to hear your working on them already. When you say "dot remover", are you speaking about the so called "mosquito noise" we see on DVD sources? I know your mostly into HDTV so maybe I'm off base here.
Koepi
4th November 2002, 07:01
@Ookz,
please read the whole thread, all the 50 posts (you'll see which posts you can jump over as they're more-or-less chit-chat).
E.g. I posted a nice working script some pages ago, some other people as well. It's all already there. Even the answer to your question that all resizers are.... well. Now go back to start, and READ for yourself.
Thanks for your attention ;)
Koepi
sh0dan
4th November 2002, 07:33
Originally posted by iago
Any ideas and/or hope ;) about the "green-line-at-the-bottom-edge" problem?
It should be gone in the latest (04-11) build - at least on my machine.
Gaia
4th November 2002, 09:14
Originally posted by sh0dan
It should be gone in the latest (04-11) build - at least on my machine. Sorry sh0dan but the green line is still sadly there :( Tried your latest build...
Rrrough
4th November 2002, 12:12
@iago & gaia,
I haven't come across the green line problem yet, could you please post your AVS-scripts ? wanna try to reproduce it.
cheers
Gaia
4th November 2002, 12:48
Here's my very simple test script:
LoadPlugin("C:\OHJELM~1\GORDIA~1\mpeg2dec3 YV12.dll")
mpeg2source("C:\THREE_KINGS\3kings.d2v",cpu=0)
crop(0,74,720,428)
BicubicResize(640,264)
It's there but sometimes it's bit hard to see. Turn all the lights off. I also noticed that there's somenthing in the left border.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.