Log in

View Full Version : dffshow filter


Pages : 1 2 3 4 5 [6] 7 8 9 10 11 12 13 14

athos
16th September 2002, 16:03
@milan: I dont think you need to write better descriptions. I just ment do use this automatic system to have something to put in the changelog. I think doing this automatic would be easier and also better than me guessing. I am waiting for uManiac to send me his code for this.

You can write a "proper" changelog when you release stable versions.

Defiler
17th September 2002, 19:49
Just chiming in the say that the workaround fixes the problem with that clip for me. I'm experimenting to see if there are any drawbacks to leaving the workaround enabled at all times.

Defiler
18th September 2002, 01:39
I would like to set "workaroundBugs" in the registry to "1" with a .reg file, and I'd like it to work on all machines. I see it in two locations:
HKEY_CURRENT_USER\Software\GNU\ffdshow\default\
HKEY_USERS\S-blah-blah-blah\Software\GNU\ffdshow\default\

Can I just set it in the first location, and have it stick, or do I need to change it in both places? That's problematic, because the second location changes from machine to machine.
Is the NSIS used to build the installer still in the CVS tree?

-h
18th September 2002, 02:01
I would like to set "workaroundBugs" in the registry to "1" with a .reg file, and I'd like it to work on all machines. I see it in two locations:
HKEY_CURRENT_USER\Software\GNU\ffdshow\default\
HKEY_USERS\S-blah-blah-blah\Software\GNU\ffdshow\default\

You only need to alter the value in HKEY_CURRENT_USER, it will be replicated into the HKEY_USERS\x location by Windows.

This must be performed for each user that has an account on the machine, so it is replicated into each of their profile's registry data. If there is only one user, you only have to do it once.

-h

Defiler
18th September 2002, 02:13
Indeed, that works like a charm. Thank you.

iago
18th September 2002, 11:44
Hello everybody,

Sorry to interfere with some comments, but I just wanted to say a few words on this thread which I've been following attentively for a long time.

All this effort going on with ffdshow is really very promising imho. Though there are certain bugs (as mentioned here, and all of which are hopefully getting solved one by one for a future release) in the last two releases by athos, the new options added (levels, deinterlace, temporal noise filter, etc.) are absolutely great both in terms of best possible post-processing and also for deciding on the right parameters and filters for the encoding process.

There is one point I would like to learn a lot:

-> Uniform noise - when checked noise strength doesn't depend on original brightness, otherwise less noise is added to dark areas

I guess here "otherwise" means "if unchecked". So, if uniform noise is checked, the same amount of noise is added to dark areas as well. And if uniform noise is not checked, both with old and new noise algorithms, less noise is added to dark areas.

I wonder if it is possible to generate another noise algorithm as an option, which adds more noise to dark areas, which would also be a solution (and certainly a better solution than ColorYUY2, which decreases the overall quality of the film while solving the blockiness problem in black areas) to the blockiness problem widely discussed in the lumi-masking thread?..

Thanks a lot and kindest regards to all people who put effort on the development and improvement of this amazing filter.

iago

athos
18th September 2002, 13:54
Originally posted by Defiler
Is the NSIS used to build the installer still in the CVS tree?
Yes, under \bin\distrib

oddball
18th September 2002, 16:24
Milan: That luma/chroma trick don't work as well as I thought. What happens is that it just moves to a point whereby it eventually chops the image off the side of the window (While moving the image horizontally or vertically). This in effect chops off some of the image on the TV out also. Not ideal.

I really need the ability to create the black bars on all sides independently. So for instance I can lock all sides except the right hand border and move that from right to left causing the image to shrink from right to left (Just as an example).

Look forward to seeing this advanced ability in a later version ;)

wizzzard
19th September 2002, 00:44
Hello, milan,

you offered your help with the noise reduction filter. With support from the AVS team I got contact with Lindsey Dubb. When I understood right he's in the DScaler team. He will contact you for further discussion.

Thanks in advance.

wotef
22nd September 2002, 12:01
@Athos, re: the IDCT resetting from Xvid to Simple, for the time being I edited hkey_current_user\software\gnu\ffdshow\default\idct and set it to 4

athos
22nd September 2002, 14:38
Originally posted by wotef
@Athos, re: the IDCT resetting from Xvid to Simple, for the time being I edited hkey_current_user\software\gnu\ffdshow\default\idct and set it to 4
Thank you. I think Milan has allready fixed this in the CVS, but I havent been able to compile for a few days. Milan is probably in the middle of something.

milan
23rd September 2002, 07:22
I have problems with MPEG1/2 decoding. It's very slow, but as it seems it's not caused by decoding itself. I added libmpeg2, which seems to be fastest MPEG1/2 decoder, but CPU usage is still 2 times higher than with other MPEG1/2 decoding filters. I need to know where's the problem and I think that best would be time profiling. Please could you suggest me some good profiler which can be used with VS6 or VS.NET? It seems like builtin VS6 profiler isn't able to handle dynamic libraries and I wasn't able to find any profiler in VS.NET.
Thank you for help.

-h
23rd September 2002, 07:50
I have problems with MPEG1/2 decoding. It's very slow, but as it seems it's not caused by decoding itself. I added libmpeg2, which seems to be fastest MPEG1/2 decoder, but CPU usage is still 2 times higher than with other MPEG1/2 decoding filters. I need to know where's the problem and I think that best would be time profiling. Please could you suggest me some good profiler which can be used with VS6 or VS.NET? It seems like builtin VS6 profiler isn't able to handle dynamic libraries and I wasn't able to find any profiler in VS.NET.

Have you looked at timer.c, timer.h and the read_counter() function from portab.h in xvidcore? If you find no other profiling tools, you could add a few timers to your code and see what functions are eating up the most time.

-h

athos
23rd September 2002, 13:56
A new build is up! At milan's request, I will from now on upload the alpha builds to ffdshow's homepage at sourceforge (http://sourceforge.net/projects/ffdshow). Alpha builds will be released in the ffdshow-alpha package, while the regular ffdshow package will be used for stable releases by milan. I have also used a perl script that milan found to produce a nice changelog from the cvs (changes since last release) so you can get an idea on what's new.

wotef
23rd September 2002, 14:45
nice! thanks guys! everything looks sweet so far, just a note for any folks that use bsplayer i had crashes with ffdshow overlay checked until i switched bsplayer's "use overlay" mode from 2 to 1

milan
23rd September 2002, 14:53
I tested it only with WMP6.4 and graphedit. Let me know about more incompatibilities and possible solutions. One day, when docs will be written, this should be included.

athos
24th September 2002, 15:04
Hmmm has anyone tried the latest build yet? Any feedback? Sourceforge tells me there have been 0 (zero) downloads..

milan
24th September 2002, 15:10
There is some delay. I think tomorrow we will see some quite big number :) I've updated ffdshow news page.

rui
24th September 2002, 16:47
Originally posted by athos
Hmmm has anyone tried the latest build yet? Any feedback? Sourceforge tells me there have been 0 (zero) downloads..

:confused: I went there and downloaded yesterday. But didn't tried it yet.

EDIT: but you are right. I just went there and downloaded it again, then refreshed the page and the downloads are at 0

wotef
24th September 2002, 17:24
anyone else having problems playing mpeg1 video (if mpeg1 is checked on the codecs screen - regardless whether "use libmpeg2" is checked)? i get erratic behaviour in mplayer2 and bsplayer - the video either freezes or doesn't display at all, it shows some sign of life when you seek but then promptly falls over again? works fine with the ms codec when "mpeg1" is subsequently unchecked in ffdshow

Foster
24th September 2002, 18:51
i have the same problem as you wotef when i want to play videos in mpeg1-format in bsplayer. is it a failure to me on handling ffdshow or is it just a bug?

best regards
rainer

Blight
24th September 2002, 21:52
I think there's a bug, you can't resize to 800x600 even if you set to "Always resize".

Nic
24th September 2002, 21:59
@milan:
Hiya milan,
First, sorry I havent sent the XviD DShow source yet, will do tomorrow (been swamped in work :( )

Second, I used libmpeg2 to create MPEGDecoder.dll for avisynth & libmpeg2 is very quick, are you building with all the optimised code turned on? If so then I dont know why your having problems...But I could flick thru the source & try & check it out :) , the source for my decoder (although a complete & utter mess, the latest version isnt up yet (which is cleaner thankfully :) )...is always at http://nic.dnsalias.com/MPEGDecoder_src.zip not sure if that will help but the decoder code is at least in C++ there...

If I can help in anyway just give me a shout :)

Take Care,
-Nic

wotef
25th September 2002, 02:06
darn, i also get strange behaviour with zoomplayer - when playing any xvid or divx file, where the codec AND hardware overlay options are checked in ffdshow codec tab, zoomplayer says "invalid floating point operation" until either one or both of these options is unchecked - think this is a zoomplayer bug, but it probably has something to do with the overlay option

milan
25th September 2002, 07:35
anyone else having problems playing mpeg1 video (if mpeg1 is checked on the codecs screen - regardless whether "use libmpeg2" is checked)? i get erratic behaviour in mplayer2 and bsplayer - the video either freezes or doesn't display at all, it shows some sign of life when you seek but then promptly falls over again? works fine with the ms codec when "mpeg1" is subsequently unchecked in ffdshow


MPEG1/2 decoding isn't finished. The biggest problem is with timestamps. I had to set timestamp of output frames, but I still haven't found a good way how to do this. All what's implemented now is a quick hack which sometimes works and sometimes doesn't.


First, sorry I havent sent the XviD DShow source yet, will do tomorrow (been swamped in work )


Ok, as you see I have much work too.


Second, I used libmpeg2 to create MPEGDecoder.dll for avisynth & libmpeg2 is very quick, are you building with all the optimised code turned on?


I'm sorry, but I forgot to call mpeg2_init with CPU features mask. I called it with 0. Now it's much faster, but still I would like to have some good profiler, because I'm afraid that critical ffdshow routines got a little bit "bloated" and need some cleanup. Profiling results would show me where to start.

BTW as I see MPEG2Decoder.dll contains DeCSS. Would be there any possibility to create DirectShow source filter which would contain it?

Nic
25th September 2002, 09:02
Yup I was hoping to do that (create a dshow with decss), but it looks like your already more than half-way there :)
You just have to read the MPEG-2 file in 2048 byte packets, then run it through the decoding function. However you need to get the key first & that might take about 100 2048packets before getting it (but sometimes it gets the key straight away)

Cheers,
-Nic

milan
25th September 2002, 09:19
I'm not sure if I'm really so far, because ffdshow just accepts data sent by some mpeg2 demuxer filter. I thought to support DeCSS it would be needed to write either new demuxer or new file source filter. But if only ffdshow modifications will be sufficient, I will surely try to implement them.

Blight
25th September 2002, 11:05
wotef:
I just checked that and indeed it crashes, but it does so on
IGraphBuilder.RenderFile, which is a DirectShow function that builds the graph, which means that something is wrong with ffdshow...

And yes, I'm aware it doesn't happen on media player, but neither did a similar error in WinDVD's decoder which turned out to be their bug in a similar situaiton.

athos
25th September 2002, 12:42
I think there might be some legal problems with DeCSS because of the use of some decryption key (not sure though). I found this c-code that takes css encrypted data from stdin and outputs decrypted to stdout:
/* efdtt.c Author: Charles M. Hannum <root@ihack.net> */
/* */
/* Thanks to Phil Carmody <fatphil@asdf.org> for additional tweaks. */
/* */
/* Length: 434 bytes (excluding unnecessary newlines) */
/* */
/* Usage is: cat title-key scrambled.vob | efdtt >clear.vob */

#define m(i)(x[i]^s[i+84])<<
unsigned char x[5],y,s[2048];main(n){for(read(0,x,5);read(0,s,n=2048);write(1,s
,n))if(s[y=s[13]%8+20]/16%4==1){int i=m(1)17^256+m(0)8,k=m(2)0,j=m(4)17^m(3)9^k
*2-k%8^8,a=0,c=26;for(s[y]-=16;--c;j*=2)a=a*2^i&1,i=i/2^j&1<<24;for(j=127;++j<n
;c=c>y)c+=y=i^i/8^i>>4^i>>12,i=i>>8^y<<17,a^=a>>14,y=a^a*8^a<<6,a=a>>8^y<<9,k=s
[j],k="7Wo~'G_\216"[k&7]+2^"cr3sfw6v;*k+>/n."[k>>4]*2^k*257/8,s[j]=k^(k&k*2&34)
*6^c+~y;}}
Edit: When the DeCSS trials started, someone wrote a tiny perl-program that could decrypt CSS without using the illegal key from DeCSS. It was however not very fast. This c-program is supposed to be faster, and also legal. Part of the point with these two programs was to prove that it can be done with very little code, that's why its so "compressed" code.

Smiff
25th September 2002, 17:16
hi i haven't posted here before but i've been following this thread for a while, ffdshow is the d*gs you-know-what.

I also get

"Exception in module qdvd.dll.
Invalid floating point operation."

When using the new hardware overlay option on build ffdshow-20020923.exe, with ZoomPlayer 2.90 alpha (the slightly more informative error message is from v2.90). I have no idea what qdvd.dll is or what it's doing other than it's MS "DirectShow DVD PlayBack Runtime" that windows file protection doesn't let me remove.

Anyone have any ideas? The overlay works in WMP6.4 but i don't like WMP6.4! :)


EDIT: i tried unregistering qdvd.dll but it clearly seems to be needed for ffdshow to even load... if there's any other info i can provide please just ask, i really want to see ffdshow working with hardware overlay in ZoomPlayer :)

athos
25th September 2002, 19:48
Perhaps ffdshow collides with the player if they use different overlays. wotef noted that it seems to work in bsplayer if he switches the overlay used.

wizzzard
25th September 2002, 19:53
Hello,

sorry not to be so deep in the development area. Milan mentioned at AVS a denoise filter in the newest version. Is this the version from the 23. September or is it "to be compiled"?

athos
25th September 2002, 20:06
According to the changelog, milan has added it today, so it is "to be compiled". I plan to do a new compile in a couple of days or so.

Smiff
25th September 2002, 20:16
Originally posted by athos
Perhaps ffdshow collides with the player if they use different overlays. wotef noted that it seems to work in bsplayer if he switches the overlay used.


that may be true but i can't see any suitable option in ZoomPlayer... i've posted on ZP forum, let's see what they think...

Stabmaster-Arson
25th September 2002, 23:26
Page 15.....

Blight
26th September 2002, 04:13
qdvd.dll is the DVD used for functions. The crash doesn't occur in ZP itself, but rather in an external DirectShow DLL and can not be the fautl of ZP.

WMP does do several things to supress errors. This was exactly the case with the WinDVD Audio Processing filter, but that error was also in their code.

ZP is more sensitive to external errors, so it pops, nothing I can do about that, but frankly, there should be no external errors to begin with.

As for the different overlays, it's possible milan wrote his code for something that works well on his card, but others with different cards and drivers get the crash, he'll have to verify this against Zoom Player to see if it crashes on his system.

I did test the VMR renderer (which WMP uses by default) and the older Win98/2K renderer. There was no difference. I think the problem is in the DirectShow filter connection code which somehow prompts the DVD filters to try connecting and somehow gets them to crash.

milan
26th September 2002, 07:10
I think I've found the bug. When setting output video properties I forgot to set dwPictAspectRatioX and dwPictAspectRatioY fields in VIDEOINFOHEADER2 struct and they were set to 0. Now they are set either to input video dimensions or to value set on Resize&aspect page. This was clearly my mistake, but still I think this should be handled as a special case by players/graph builder. BTW I have to implement switch to set the aspect ratio acording to MPEG2 header. It has to be handled by SW scaler and overlay too (depending on user choice and HW capabilities).
I added gradual denoise filter from DScaler, but this is just first version (anyway it's already optimized for Integer SSE). I need to compare results with original DScaler filter to see if my implementation is correct.

@athos
Please wait for a few days. In new build I would like to have Nic's postprocessing routines included.

And more about overlay: yesterday I've finaly found out how to set overlay color controls (brightness, contrast, gamma,...): IMixerPinConfig2 interface exposed by Overlay Mixer input pin. I hope in few days ffdshow will not be limited to slow lookup-table gamma correction or that 2.2 MMX approximation, but will be able to use HW.

Koepi
26th September 2002, 07:22
Milan,

that is definatly great news!

I'm a little proud that you did it with hardware overlay - I was searching on that matter some months ago and got stuck in nothing :(

Hell, swiss army knife of decoders/playback filters evolves into everything... when can I write post-processed documents with it? ;) amazing!

Best regards,

Koepi

masken
26th September 2002, 09:50
Originally posted by milan
And more about overlay: yesterday I've finaly found out how to set overlay color controls (brightness, contrast, gamma,...): IMixerPinConfig2 interface exposed by Overlay Mixer input pin. I hope in few days ffdshow will not be limited to slow lookup-table gamma correction or that 2.2 MMX approximation, but will be able to use HW. I envy such talent!

Keep up the good work, you've got millions of fans m8! :D

milan
26th September 2002, 10:04
Why envy?
I was just digging in Microsoft Platform SDK. It would be much easier if DDCOLORCONTROL structure documentation wouldn't be missing in latest DirectX SDK release. Simple search for 'gamma' or 'saturation' would show the way. Fortunately it's present in DirectX 7 SDK archives at MSDN.

Blight
26th September 2002, 10:23
Milan, you could have asked me, I've implemented the Overlay interface months ago...

Oh, and I've only found the interface to it on the Overlay Mixer filter, are you somehow going to implement the interface into your filter, bypassing the Overlay Mixer, or are you going to enforce that the Overlay Mixer be included in the graph?

milan
26th September 2002, 10:38
If I wouldn't find it yesterday, I would surely ask you. In fact, I was testing reported ffdshow's problems with Zoom Player, when I decided to finally implement these controls. BTW: won't they collide with those in Zoom Player?
These new controls will be available only when Overlay Mixer filter will be in the graph. This can be forced by "Hardware overlay" checkbox in ffdshow.
Do you know how to set color properties without the Overlay Mixer filter?

Blight
26th September 2002, 11:00
They may collide, ZP will override them if enabled, depending on where you apply it.

There seems to be a standard "Driver Level" interface to do this as both the ATI and the NVIDIA driver support this, but not always.

BTW, you should know that some NVIDIA and older ATI (128 Fury) don't support Gamma or possibly some of the other settings. There are benefits to using software gamma if your CPU can handle it.

Microsoft actually has a DirectDraw "sample" in which it changes gamma, but guess what, it does so by changing the palette of an 8bit image. Don't you just love those microsoft samples.

Microsoft practically abandoned all DirectDraw documentation, it's simply not there, couldn't even find it on MSDN. So if there's some DirectDraw interface, I have no idea how to access it.

BTW, What are the actual benefits of enabling the Hardware Overlay setting in FFDShow? I understand it adds the Overlay Mixer but besides that, what are the benefits?

milan
26th September 2002, 11:22
That collistion is bad, but I will try to make ffdshow as "friendly" as possible.
I don't want to use specific ATI or NVIDIA driver calls. This would be realy out of scope of MPEG 4 decoding filter :) .
I think I'm able to detect not supported features. It seems when I call IMixerPinConfig2::GetOverlaySurfaceColorControls with dwFlags set to 0xff, it returns all supported features values and sets the mask. For example my ATI seems to not support sharpness control.
And I will surely not remove any software image processing - in fact, I should finally finish MMX approximated gamma correction.

Overlay mixer cons:
- seems to be a little slower - playing at DVD resulution is measurably slower, but maybe I just don't know how to use it correctly
- only one HW overlay can be active at same time

Overlay mixer pros:
- can specify aspect ratio - no need for SW scaling
- flip horizontally and vertically - haven't tested yet
- color controls
- maybe in the future I will add direct rendering and HW overlay seems to support it better - this is just my guess, I haven't done anything yet

There may be other pros/cons which I'm not aware of. Actually HW overlay was added to ffdshow because DIVX 5.0.2 supports it too.

athos
26th September 2002, 13:00
Originally posted by milan
@athos
Please wait for a few days. In new build I would like to have Nic's postprocessing routines included.

Sure. I use the cvs-to-changelog script you sent me to check the progress, will make new compile when Nic's routines have been added.

Blight
26th September 2002, 13:59
I actually specify AR in one of two ways (depending if a setting is enabled in ZP's options).

Either I set the video window to the right AR and set the background black, or I use the IVideoWindow destination rectangle. Not being a Player, I'm not sure if your decoder can use that interface.

The only reason I use the Overlay Mixer is to enforce MPEG2 decoders to respect AR. WinDVD/PowerDVD decoders do not respect the specified AR and instead enforce the MPEG internal AR.

I think the title "Hardware Overlay" is misleading, there's nothing "hardware" about compared to the standard renderer (which also uses the hardware overlay).

Reading the description of "Extended Overlay" on the DivX page doesn't seem to imply any relations to the Overlay Mixer. Here's their description:

Added an "Overlay Extended" mode. Selecting this will cause the filter to try to display video using the hardware overlay instead of the software overlay. The hardware overlay is much faster, but may not be supported on some video cards. When this mode is enabled, DirectShow-based player applications will be unable to open more than one window at a time.


As far as I know, there is no such thing as a software overlay, unless they meant offscreen surface, which is never used by DirectShow if your hardware supports the Overlay to begin with. It's all very odd.

milan
26th September 2002, 14:10
I will rename this option to "Use overlay mixer". Would it be more accurate?
Actually I think the "Extended Overlay" option in DIVX just forces Overlay mixer filter. Sorry, I can't test it in graphedit right now.

Blight
26th September 2002, 15:17
If that's all it does, it would somewhat contradict that they state as it would actually slightly slow decoding as the data was passed over the bus to another filter.

Nic
26th September 2002, 15:33
@milan:
check your PMs...sorry 2 b quick (sorry for the mess of the src ;) )

-Nic

athos
26th September 2002, 21:42
When I use "Hardware Overlay" (as it is still called in 20020923 release), the desktop icons flashes as if the desktop is being redrawn over and over again. Has anyone else seen this? Unchecking hardware overlay fixes this.