Log in

View Full Version : Direct show resize filter for divx


Pages : [1] 2

legman
12th January 2002, 17:56
Hey, I have an interesting problem that I ahve not seen anyone address yet.

There are several people using the divxplus application to view divx movies on their h+ decoder cards tv out chip.

Even though this application produces the best tvout quality, it has a limitation of 640 widths on input. If a file is 592 wide it will add black bars to the side.

I ahve known about this problem for sometime, but only recently have I been hearing about a lot of upset people. I was hoping the divx groups like vite and dominion would wake up and realize that the 640 widths were the best way to go, but alas that is not happening.

I am now trying to find a work around for this and could really use some help.

I tried loading a divx movie in graphedit and replacing the render filter with the h+ yuv video render and the movie played fine out of the h+ chip to the tv.

I am lookign for a way/suggestions to resize the input to a 640 width inbetween these filters. With avisynth or some other resize filter that installs with an appication.

Ideas?

legman
12th January 2002, 19:17
Ok, I found the solution to the above.

Using this version of avisynth:
http://www.doom9.org/Soft21/mpg/Avisynthv105.zip

and a script that looks like this:
avisource("e:\1.avi").BilinearResize(640,272)
ConvertToYUY2
flipvertical

You may or not need the flip filter

name the script file this:
1.avs

Load you divx in vdub and make it a divx with wav audio and save the file

Launch divxplus,
when it looks for a file, browse to the dir that your 1.avs is in. You will not be able to see it and there is no drop down option for *.* to see it either. Just paste or type in 1.avs and hit open.

It will load the movie and resize on the fly. Works great and very fast. No noticable system slowdown on a 450p2.


The output is very nice! :)

If anyone can find a better way, please do.

There an adjustment we will need to make for the video delay and add that line to the script. I don't have the time at the moment, but I will fix it later.

cofferscuffs
12th January 2002, 23:17
I've just tested (today) a new version of Bicubic Resizer DirectShow filter for Doom9 and have forwarded on today... gives very good results.

Doom9
12th January 2002, 23:21
it comes with no readme.. what exactly does it do?

cofferscuffs
12th January 2002, 23:30
Wait, wait. The readme was in the very first file he sent me.. I'll go fish it out.

cofferscuffs
12th January 2002, 23:40
OK, I wiped out my inbox so I don't have it anymore, but I've emailed the author so he'll send it again.

Anyways, I've been using it in PowerDivX by adding it via the config menu->filters (Bicubic Resize Filter). All it basically does is make it fit the full screen, just like legman wants (apart from this way I don't have to make a AVS script)

Blacksun should really implement (if possible) an option to allow selected filters to run at startup.

legman
13th January 2002, 00:08
Ok, my does not work.
The video is dragging behind the audio. It is just too slow.

cofferscuffs: Please explain what you are talking about. Are you using a filter with divxplus that is selectable in graphedit? If not that, then what?

I tried installing every player on doom9's page and none installed a direct show filter for resizing that I could bring up in graphedit.

I can't thinK of another way to resize going to divx+

vinetu
13th January 2002, 01:57
legman,

check at http://www.elecard.com/download/ the
"MoonLight Scalar - Resizer DirectShow®filter"
-Bad quality for me but it's "100%FREE" ...

Doom9
13th January 2002, 03:40
I'll publish that filter as soon as I get a readme.. it's open source soft, too

legman
13th January 2002, 05:00
vinetu,
Thanks, I guess this is aboutt he best i can hope for. It's free, works, but the quality is a bit weak. I don't have enough cpu for anything better in a 450 p2 playback box.

I tried setting cpu at lowest and it was not fast enough for precise setting. The basic setting looked about the same, bit did not drag the box down.


cofferscuffs,
yeah thanks bud. I think you are right, we need blacksun to make his resize filter selectable :) or well, selectable and unselectable. You can add the h+yuv render, but you can't remove the render that is already there on openg a file. If i had a faster box I would be begging. I hope he does it for all the others that can use it. Maybe he can just intergrate that h+yuv filter in his player to make it easy as specifing tv out to h+. Now that would be cool, as he has a really nice player.

legman
14th January 2002, 01:39
Where is blacksun?
I have not seen him in a long time.

legman
14th January 2002, 06:39
I tried that bicubic filter you posted. I tried it in graphedit. The quality was there and it was not that cpu intensive, but it was a bit much for my 450 p2 box. Also, the movies do not hold synch when being played in graphedit. Why? No clue. It's a nice filter.

BlackSun
14th January 2002, 07:07
I am here :D All of this sound interesting. BTW Doom9, you should ask Elecard (Moonlight) before distributing the Scalar filter, I thought it was free but finally I needed to license it (for PowerDivX 4)

This filter will let PowerDivX 4 Resize (simple or bilinear), crop and add black bar to the movie. Does it fit your need ?

DarkAvenger
14th January 2002, 10:07
A stupid question: Why doing resize with CPU? At least Nvidia cards can do it on their own (at least to some extent). Or is it just a problem with the h+?

legman
14th January 2002, 15:10
Hey Blacksun,
Well there are 2 filters. The "in my opinion much lower quality" moonlight and the nicer bicubic avaiable via link on the new page. I realize you are very busy with xvid, so thanks for taking a look.

The moonlight filter does do a color space conversion that can be helpful for other stuff. I just cannot watch a movie that has ghosting all over the place like that. I would rather not watch it at all and save myself a terrible headache.

DarkAvenger,
The divxplus application sends whatever you play directly to the tvout card, width wise. If you set it to fill the sreen, it won't keep aspect ratio. I just assume have one tv out card,. That being the H+ because it is a very good dvd decoder.

Doom9
14th January 2002, 18:22
what scalar filter?

legman
15th January 2002, 02:59
Thats the moonlight one.

BlackSun
15th January 2002, 07:09
Originally posted by legman
Hey Blacksun,
Well there are 2 filters. The crappy moonlight and the nice bicubic avaiable via link on the new page. I realize you are very busy with xvid, so thanks for taking a look.



I'll take a look at the bicubic filter, as long as I know the COM interface it's more easier. I don't see any problem by implementing your ideas in PowerDivX, but I need you to help me to test as I don't have a H+. (A friend got one but the old rev)

legman
15th January 2002, 14:50
I would be more then happy to help. :)
Thanks so much for taking a look at this.
I see this as two filters. The bicubic and the yuvrender that accesses the tv out. I guess that would be 2 switches where you could turn either on or off.

BTW, if need be, I will buy a fast cpu for that box. Hell they have to be cheep now.

cofferscuffs
15th January 2002, 16:02
Just got this in my inbox:

This is bicubic filter for directshow. It works in YUY2 mode only. Bicubic code was taken from avisynth 1.0 beta 5. I made this filter because i wanted mpeg-1 and other low resolution video to look better and sharper with my G450 dualhead.

Some standalone dvd players allready do bicubic resizing like most pioneer models. I own pioneer 525 and that gave me the idea because i was usually burning vcd's to watch them so i could watch them with better in quality but now i don't have to burn anything anymore just watch them with my g450. But test it your self to see how much better and sharper low resoltion videos look :)

Usage is simple put bicubic_resizer.ax to your system32 dir in win2000 or xp and put those bat files anywhere you want then just click reg_bicubic.bat to register the filter it will autoload so if you don't want to use it just click unreg_bicubic.bat to unregister it so it won't autoload. Use mediaplayer 6.4 or similar to get properties from filter it has resolutution setting and bicubic
setting. I find setting b = 0 and c = 1.0 quite good (default).

Those are exactly same setting as in avisynth but i don't know that much about bicubic algorythm so you'll be better off asking someone else about them but higher the c is sharper the picture is b = 0 and c = 1.5 might be better for really blurry material. And anyone knows what flip picture setting is. And you need allways to press save buttong to save your settings. Only flipping works in realtime other
setting only start working as soon as you load the next file.

Doom9
15th January 2002, 18:18
legman: whatever moonlight/elecard filter I have on my page.. they asked me to carry it so there can't be any problems with it.

legman
16th January 2002, 01:46
Doom,
That moonlight filter is very bad. Trash it. It is better to watch a movie with bars on the sides that to resize with that.

The bicubic filter is very good.

PowerDivx just needs a few mods and I think we are home free.

BlackSun
16th January 2002, 07:19
Finally I don't like the Moonlight Scaler anymore... Now let's see, if I use the bicubic filter, first I need to change his merit, because the filter is loaded with every movie and I don't think people will appreciate it.

Then, I need to found the interface, easy, just take a look at the source code.

What is the license of the filter ? I guess DirectShow filter are an exception for GPL, because it is used in WMP :) Is there a way to contact the original author and ask him if he allow me to use his filter in PowerDivX ?

A bud will give me a H+ this afternoon, unfortunatly this is the old revision and I don't think it will work fine.

Another problem is some options in DivXPlus. How the guy can change PAL/NTSC, etc...

legman
16th January 2002, 11:11
I don't know the license of the bicubic filter.
I may load all the time with normal applications, but with divxplus. If it did, there would not e an issue. There is no way to call it either from divxplus.

The pal/ntsc, invert and a few other options are avaible by right clicking on the divxplus gui.

The divxplus application should work with any revision, just not amd cpu's. This is what i havew heard, but am not 100% sure.

BlackSun
16th January 2002, 11:28
Originally posted by legman
The pal/ntsc, invert and a few other options are avaible by right clicking on the divxplus gui.


I know, but I want to use them from the DirectShow filter using it COM Object interface


The divxplus application should work with any revision, just not amd cpu's. This is what i havew heard, but am not 100% sure.

I was talking about the revision of the H+ chipset

legman
16th January 2002, 11:52
Yeah, that is a problem as the developer never answeres for source code.
As for the revision, I have heard of all of them working.

BlackSun
16th January 2002, 11:59
Okay, my first try will be to get the H+ working with DivXPlus...

Sanapaku
16th January 2002, 14:09
Originally posted by BlackSun


I was talking about the revision of the H+ chipset

Rev. A is said only to work on Windows 2000. Rev. B should work fine
on Windows 98(SE), ME and 2000.

San.

BlackSun
17th January 2002, 07:17
And WinXP ? I got a Rev. A and it didn't work with WinXP, unfortunatly i wasn't able to test with Win98/Me because I didn't got the drivers. :scared:

wanton
17th January 2002, 12:24
I'll be adding keep aspect ratio to that bicubic filter soon. Reason why i didn't add it before i send it was that i thought i didn't need but i i found out that if you have divx movie resolution like 512x??? then you'd be better of watching it via bicubic filter even with NTSC output with PAL you are really better off running even 640x??? video trough it because pal square pixel output is 768x576. But i'll be posting it here and sending it to doom9 probably tomorrow.

legman
17th January 2002, 14:56
http://www.sigmadesigns.com/support/downloads.htm

macdaddy
17th January 2002, 17:30
Several weeks ago, I put the links to all drivers up on the "fairly small FAQ;" you should be able to access the drivers froim there...

Snoopy
18th January 2002, 05:28
to wanton:

This filter is great, but I found a glitch when I tried a resolution higher than pal (800x600).
On the right side some 'stripes' appeared in the picture.
They are getting bigger with higher resolution.

The same thing happens in Avisynth, so it seems to be the filter code.
Maybe you can find out what's wrong, it would be nice if the filter would work fullscreen (at least 800x600).

And while I'm on it:
How about a checkbox to disable the filter?
Registering/unregistering becomes annoying when using XP because
it's an administrator task, batch files to click on won't work.

BlackSun
18th January 2002, 07:24
Yes please change the merit of the filter

wanton
18th January 2002, 11:35
Ok i'll try add all those things. But i didn't have time last night so i'll try again today. To Snoopy: I can't fix bicubic part because i don't know how it works and on computers i've tried i don't have any problems with higher resolutions like 1024x768 and higher pentium celeron 500mhz, athlon 700mhz, athlon 1.2gz and athlon 1.4gz. Can you tell me what these stripes look like? Any chance postin screen capture from the problem? And just for a note you should keep width dividable (hope that word is spelled ok...probably not) by 32 otherwise you'll probably get really wierd graphic errors like shitty looking picture because some graphics card won't like video surfaces like that :) But i've never tried this filter with files that have source width not dividable by 32 so it might be that.

wanton
18th January 2002, 11:45
Just tried resolutions 3200x480, 640x1000 and 1024x1000 with mpeg-1 352x240 and divx 512x384 source and still no stripes. Anyone else here than Snoopy can tell existence of the stripes with higher than to 800x600 resize?

legman
18th January 2002, 15:01
The merit does not work when playing a divx through divxplus application. Is there a way to set it even higher, so no matter whar, it is always used? Of course an off swich is nice too.

I was thinking of an interface that call the filter, no matter wher eit is being used, for properties adjustments and on/off settings.

macdaddy
20th January 2002, 00:07
I have been testing the direct show filter from doom9s page (bicubic_directshow_v1.2) and it looks good. I will give it a full testing (watching several movies all the way through, etc.) throughout the long weekend, but sofar, so good...

From the directshow bicubic resize readme:
"Usage is simple put bicubic_resizer.ax to your system32 dir in win2000 or xp and put
those bat files anywhere you want then just click reg_bicubic.bat to register
the filter"

Maybe this works in win2000 and xp, I don't know-I don't use those operating systems. It does not work in win98. If you run win98se (and I do), you have to copy both reg.bat and the .ax file to windows\system\ folder, and run the reg.bat from there...

Having said that, the filter works. And the flip works, so zoomplayer is a viable option using the dxr3 card's tv-out...

I will say that the directshow filter seems to improve the picture quality over just using the hp renderer...

Just one guy talking, but I hope it helps.

legman
20th January 2002, 02:08
you just have to run regsvr32 from the command line is all. The problem is it does not remember to stay on for divxplus. Major bummer.

macdaddy
20th January 2002, 02:16
zoom player remembers to run all the filters, once installed, after restarts, etc...

DivX played with these filters looks good through my dxr3 tv-out. zoom is so much easier to use than divx+ and Eugene's (one guy's opinion), and with so many more options...

By manually making a graph, I am able to get h+ tvout and powerDVD XP audio (S/PDIF) output (read more here (http://forum.doom9.org/showthread.php?s=&threadid=13976#post69843)). I am working on the mediagraph to get avi/ac3 going. Since the h+ renderer and directshow bicubic resize work with the standard media graph, and the ac3 out via cyberlink's audio decoder works, the two should be able to work in conjunction. Again the standard mediagraph works with the h+ render and dshow bicubic installed. I''ll post when I get the ac3/divx working...

Any of you with ideas, suggestions and the like, please chime in. Any input is certainly appreciated...

legman
20th January 2002, 16:32
I did not know there was another thread on this going.

Ok, here is the deal:
I downloaded the zoom player to see if it installed any new resizing filters, but when it didn't, I never touched it. After reading your post, I went back and played with it.

I have several problems.
1. When I first launched a divx, it remembered my last graphedit playback settign and launched the filters automatically....
after divx4 decompressor I had bicubic resize and the h+ yuvrender,
The problem is that with these settings, my cpu is not fast enough. The video bcomes choppy and the audio drags behind.

Very important:::: Does the audio stay in synch for you with a faster cpu?
If so, I will upgrade my cpu and be done.

It looks as if the the zoomplayer could resize the video on it's own and possibly without the bicubic resize filter, but it appears from your comments on the other thread, that you are indeed using this bicubic filter to resize.

I read further and read that it should complete a graph on its own, but I was unable to generate an uncomplete graph that the player would see in its graph dir.

The instructions for creating and converting a graph are for dvd playback only. I did try however, but i don't think it saw my incomplete graph or a complete one that I made.

I think what it ended up seeing was the last saved graph that graphedit saved. This last graph was a simple divx playback replacing the render filter with the h+ yuv render filter.

Now this works fine. I now had the video playing again on the tv, but this time without the bicubic in the chain. I had also previously unregistered it, incase you are interested, to make sure it would not be called.

What I got was exactly what divx+ gives me. It was a video that was undersized in width. I then attempted to use the controls to resize the video, but all it did was resize the empty window of the zoom player on the monitor and had no effect on the video on the tv in anyway.

So I am back to either requesting that the player find a way to resize the video without using any more cpu or buying a faster cpu.

Comments or suggestions are appreciated, lol. Thanks

macdaddy
20th January 2002, 19:24
The only time I got a slowdown, was when I moved the post-processing slider all the way over to max (it defaults on min). Then the audio did lag, but no problems with slider at minimum...

I can post my h+ and cyberlink S/PDIF graph (DVD playback)if you want it...

I use directshow resize with divx, not DVD playback...

Alexy
20th January 2002, 19:35
Yes please :)

macdaddy
20th January 2002, 20:13
// Zoom Player DVD Graph conversion of [C:\My Documents\hplusmaudio.xgr].
DefineFilter(claud.ax)
LoadFilter({E30629D1-27E5-11CE-875D-00608CB78066},WavOut S/PDIF Delta AP)
LoadFilter({D318FCEA-97D3-4B26-86B6-25E3FDCA5050},Hollywood Plus DirectShow filter)
LoadFilter({9BC1B780-85E3-11D2-98D0-0080C84E9C39},CyberLink Audio Decoder)
LoadFilter({9B8C4620-2C1A-11D0-8493-00A02438AD48},Source 0)
ConnectPin(Source 0,Video,Hollywood Plus DirectShow filter,Video In)
ConnectPin(Source 0,AC3,CyberLink Audio Decoder,In)
ConnectPin(Source 0,SubPicture,Hollywood Plus DirectShow filter,Subpicture In)
ConnectPin(CyberLink Audio Decoder,Out,WavOut S/PDIF Delta AP,Audio Input pin (rendered))

You can use the filters file mode (in zoomplayer) to specify the ones needed for avi/ac3 playback. This works fine on my machine...

Don't forget the registry tweaks. The S/PDIF output (Dolby Digital/dts) does not work without them. More information about those settings can be found here (http://forum.doom9.org/showthread.php?s=&threadid=13976#post69843). The .filters file for ac3DivX playback is there, too...

The only complaint I have is that the screen occassionally tears on pan shots, during divx playback only...

Any assistance, thoughts or suggestions are greatly appreciated.

Snoopy
21st January 2002, 00:57
About the "Stripes" with higher resolution than PAL I was talking about:

The filter is not to blame!
It seems to be my graphic adapter or it's driver.
I tried to make a screen shot, and the capture was OK!!!(no stripes)

Does anybody else still use a Asus AGP-V3800 SGRAM ?
If so, please tell me if it works for you and what driver version you are using.

My specs:
VGA: Asus AGP-V3800 SGRAM
Bios Version: 2.05.13
Driver version: v3.79
Direct X 8.x (build 810)

CPU: Athlon 1.33GHz
Mainboard: Shuttle AK-31 rev. 2.0
OS: XP pro


Thanks in advance,
Snoopy

wanton
21st January 2002, 12:53
And for a note. What hell does this mean? Taken from bicubic v1.2.1 readme.

1.2 Maxwell Sayles


Name me as Maxwell Sayles...where the hell did that guy get that name. Because it's not mine. My name isn't even an english name. Maybe i should have but something in the readme. But now there is atleast Wanton there.

BlackSun
21st January 2002, 13:08
The link you provide (attachement) is not valid, can you verify it so i'll be able to validate the attachement (I am a super mod)

wanton
21st January 2002, 13:15
Seems that i left maxwell sayles in the source code but it's not me. I was using imedia's resizer filter as template that was really buggy and wasn't even done properly meaning some input and output pin shit was missing. And that link. Maybe this doom9's attachment thing doesn't just work and i don't have any place to up it. If someone wants to give me an email where to send it so he can put somewhere and post the link here? i'll try to attach it to this post too.

BlackSun
21st January 2002, 13:18
send it to blacksun <at> powerdivx <dot> com and i'll upload it on my server and will give you the link

wanton
21st January 2002, 13:44
Here are the links thanks to Blacksun :)

http://www.divx-digest.net/blacksunsoft/bicubic_directshow_v1_3b.zip
http://www.divx-digest.net/blacksunsoft/bicubic_directshow_v1_3b_source.zip

edit by BlackSun: link fixed