Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th September 2007, 14:02   #1961  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by yesgrey3 View Post
It would be great to have an option in the output tab for converting to a custom RGB...
Do you have any samples that use non BT.601? It's not too hard, but I need sample to work on.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 14th September 2007, 19:50   #1962  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by haruhiko_yamagata View Post
Do you have any samples that use non BT.601? It's not too hard, but I need sample to work on.
I think that any blu-ray or hd-dvd are in BT.709. I could try to prepare you a little sample, but any sample should work, even a BT.601 one, because the idea is not correcting the source, the idea is changing the source in a way that when output in the display it shows the right colors. Some displays have a color gammut wider than the source, so, at the output, the colors are different than what's supposed to be. We can correct this with a transformation matrix to convert the source colors from the source color gammut to the display color gammut. I already wrote a matlab file to calculate this matrix, now I only need a way to use this matrix. ffdshow is the best place, since lots of people use it for viewing their content.

Or when you talk about a sample you are talking about a custom matrix sample?

Thanks for your help.

Last edited by yesgrey; 14th September 2007 at 19:58.
yesgrey is offline   Reply With Quote
Old 14th September 2007, 20:38   #1963  |  Link
amt
Registered User
 
Join Date: Apr 2007
Location: Sweden
Posts: 5
Such a feature would be appreciated. My LCD TV has a nasty red push and it would be nice to be able to compensate for it in ffdshow.

@yesgrey3
How did you calculate a custom matrix for your display? Did you use a colorimeter to measure the displays real gammut?
amt is offline   Reply With Quote
Old 14th September 2007, 23:23   #1964  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,815
I have one question. Why MJPEG in VFW decoder is disabled by default?
Atak_Snajpera is offline   Reply With Quote
Old 15th September 2007, 00:06   #1965  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
@amt

Yes, it's the only way. With the primaries coordinates, it's just doing the math. Let's see how all this works out and then I will put here my matlab file.
yesgrey is offline   Reply With Quote
Old 15th September 2007, 00:14   #1966  |  Link
Nicholi
Registered User
 
Join Date: Apr 2003
Location: Lancaster, CA
Posts: 89
Quote:
Originally Posted by Leak View Post
I'm having a slightly different problem with the ffdshow audio decoder and "swap channels" (which I use to swap the left and right channels since I have my stereo speakers behind me when I'm using my projector):

I was watching the first season of Star Trek: Voyager on DVD when I noticed that the episodes on the second disc stayed silent *unless* I activated 32-bit output in the ffdshow audio decoder. Using 16 or 24 bit instead doesn't work, as the 5.1 AC3 audio will stay silent - but it does work in the menu at first, which only has stereo audio...

Could it be that channel swapping, for whatever reason, only works right with 32bit output?
I'm surprised my eye caught this post. I can confirm Leak's initial finding. Awhile back I ran into a DVD much like his, it opened with trailers that were 2ch stereo audio but the menu and movie had 5.1. Everything was fine through the trailers but when the menu followed (and also into the movie) the sound was completely gone. Basically running on ffd defaults, no filters and 16bit output.

What I noticed was if I forced the channel mixing (set it to 5.1) and played from the beginning of the DVD everything was fine. But leaving the mixing off caused the change in channel numbers to freak out ffd. Never did check with 32bit output, didn't occur to me. But I checked again just now and attempting to force any of the other outputs makes no difference.
Nicholi is offline   Reply With Quote
Old 15th September 2007, 06:14   #1967  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by cc979 View Post
did one working and a new one
http://www.speedyshare.com/778904670.html

cheers
OK, I'm begining to understand. Though I cannot reproduce using my own compilation, I hope next my commit will fix it.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 15th September 2007, 14:57   #1968  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
haruhiko,

Here is a sample custom matrix:
C = [0.879244 0.101276 0.019480]
[0.044836 0.915219 0.039945]
[0.015503 0.097127 0.887370]

Considering the BT.601->RGB conversion matrix as B, the conversion from YUV->custom RGB should be:
[RGBcustom] = C x B x [YUV]

Last edited by yesgrey; 16th September 2007 at 19:12.
yesgrey is offline   Reply With Quote
Old 15th September 2007, 17:43   #1969  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
I was wondering one thing about auto-preset loading: it loads the first preset that matches *any* condition set for the preset - wouldn't it make much more sense to at least include the option to only load the first preset to match *all* conditions?

I.e. I have two presets that convert DVDs for my 800x600 projector, but one for NTSC and one for PAL - currently I can't make an autoload preset that only loads when there's both the "DVD Navigator" filter in the graph *and* the frame rate is 30Hz for NTSC and another similar one for 25Hz for PAL...

Mind if I add a per-preset option to choose whether any or all conditions must match?

np: Mike Shannon - Tears (Possible Conclusions To Stories That Never End)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 15th September 2007, 21:25   #1970  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,647
Instead of adding yet another option, wouldn't it be better to just make it work the logical way. For me also that would mean using AND instead of OR on all the enabled conditions in a preset.
__________________
MPC-HC 2.2.1
clsid is offline   Reply With Quote
Old 15th September 2007, 23:20   #1971  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by clsid View Post
Instead of adding yet another option, wouldn't it be better to just make it work the logical way. For me also that would mean using AND instead of OR on all the enabled conditions in a preset.
Well, sure. I just was erring on the cautious side because someone might already be making use of the "OR" behaviour, which would of course break with a change to "AND"...

The code change itself should be rather minimal, but the implications might not be. What does the rest here think?

np: Luke Vibert - Comphex (Chicago, Detroit, Redruth)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 16th September 2007, 04:02   #1972  |  Link
Bathrone
Curious Beta Tester
 
Join Date: Nov 2004
Posts: 240
Can a new build be done please theres some changes in the log I'm keen to test, thanks.
Bathrone is offline   Reply With Quote
Old 16th September 2007, 19:09   #1973  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Haruhiko,
Here is a little help from me: I have made some changes to the ffdshow video output dialog tab. Let me know what you think (and others from here, also) about it. If you all agree about it, let me know how should I add it.

Looking at it you could have a better idea of what I am suggesting:
-a way to select the matrix coefficients for the YUV->RGB conversion (I have looked at ffdshow code and it appears that it already supports both matrices, I think it's just needed to add the code for the selection)
-allowing a conversion between RGB spaces with different primaries coordinates. For this, we should supply a matrix for the conversion. This matrix should be applied after the conversion from YUV->RGB. If we multiply the YUV->RGB matrix with the RGB->RGBdisplay matrix at the beggining, the YUV->RGBdisplay conversion could be done without any processing penalty.
Attached Images
 
yesgrey is offline   Reply With Quote
Old 16th September 2007, 22:50   #1974  |  Link
Rash
Registered User
 
Rash's Avatar
 
Join Date: Aug 2002
Posts: 403
I've noticed that ffdshow's systray icons always create the right-click menu on the ffdshow audio icon (the blue one on clsid build). But I usually play videos that require only the video decoder, so I don't get a menu. Is there a way I could make ffdshow create the menu on the video decoder tray icon?

Thank you.
Rash is offline   Reply With Quote
Old 17th September 2007, 03:50   #1975  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by yesgrey3 View Post
Haruhiko,
Here is a little help from me: I have made some changes to the ffdshow video output dialog tab. Let me know what you think (and others from here, also) about it. If you all agree about it, let me know how should I add it.

Looking at it you could have a better idea of what I am suggesting:
-a way to select the matrix coefficients for the YUV->RGB conversion (I have looked at ffdshow code and it appears that it already supports both matrices, I think it's just needed to add the code for the selection)
-allowing a conversion between RGB spaces with different primaries coordinates. For this, we should supply a matrix for the conversion. This matrix should be applied after the conversion from YUV->RGB. If we multiply the YUV->RGB matrix with the RGB->RGBdisplay matrix at the beggining, the YUV->RGBdisplay conversion could be done without any processing penalty.
That's a decent UI for it, although I'm of the opinion that a custom RGB conversion should be done as a separate filter, not as part of the normal conversion. Mainly because few would use it, but also because I'm concerned that applying the matrix before or after would cause banding and slowdown. (So does levels, and I already avoid its use whenever possible.) Fortunately, it'd probably actually be easier to avoid both by just precomputing the coefficients and combining them into one operation. (Obviously this won't work with ICM profiles, but so far no one's requested those.)
foxyshadis is offline   Reply With Quote
Old 17th September 2007, 10:29   #1976  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by foxyshadis View Post
Fortunately, it'd probably actually be easier to avoid both by just precomputing the coefficients and combining them into one operation.
That's my idea. Maybe I was not clear enough, but that was my thinking. It's just multiplying the two matrices before starting the process to obtain the coefficients. That's also why I thought adding this matrix to the output tab. If it is a diagonal matrix with all coefficients 1.0, it does nothing. Another option (which I prefer) is putting a check box to enable/disable the use ot the custom RGB matrix, but the dialog is already so crowd!...

I have considered this instead of the ICM profiles because it would be easier and faster to do. It would be perfect if we just entered our display primaries coordinates and then ffdshow would do all the math, but that was a much more harder task, and very few people would actually use it, because not everyone could measure their display primaries.
To easier the task, I have written a little matlab file for calculating the conversion matrix for the display color primaries. With this file and the ffdshow presets/profiles capability, we could approach the ICM profiles capability.

I know this is not completelly accurate, because for a correct ICM we should correct the RGB colors at the linear domain, but according to Poynton's colorfaq n.20, if all the conversion coefficients are close to either zero or one, the resulting erros of performing the conversion at the non-linear domain will be insignificant.

Last edited by yesgrey; 17th September 2007 at 10:59.
yesgrey is offline   Reply With Quote
Old 18th September 2007, 12:49   #1977  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by yesgrey3 View Post
Haruhiko,
Here is a little help from me: I have made some changes to the ffdshow video output dialog tab. Let me know what you think (and others from here, also) about it. If you all agree about it, let me know how should I add it.
Thank you. It explains clearly what you need.
The dialog is cool, but bit too crowded for new users. I think new page should be added as an option to "Output".
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th September 2007, 13:11   #1978  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by haruhiko_yamagata View Post
The dialog is cool, but bit too crowded for new users.
Yes, i thought it too.

I forgot one thing. The conversion routines to RGB have four options: rec601, rec709, pc601, pc709. Currently, i believe the conversion to RGB uses the rec601 option, but it would be great to have all 4 available, especially the pc601 and pc709 options, because that are the most important for an accurate viewing.

I have considered another way of solving my request, maybe it's easier...
Since ffdshow has avisynth support, I could request to be added the possibility of a custom matrix to the ConvertToRGB routine and then use it with ffdshow. This routine already have all the other options I am requesting with a plus: we could use better sample algorithms for the chroma (in 2.6).

Since this is a correction needed only for the viewing, the right place to do it is in ffdshow, but let me know what you think about it...
yesgrey is offline   Reply With Quote
Old 18th September 2007, 13:48   #1979  |  Link
obieobieobie
Registered User
 
Join Date: Mar 2004
Posts: 182
Is there a difference between the mpeg4 asp decoder in ffdshow and the one in vlc? I can see combing artifacts when ffdshow decodes but not when vlc decodes the same file. The file is ripped from cable tv and deinterlaced before encoding.

edit: no deinterlacing is enabled in either ffdshow or vlc
obieobieobie is offline   Reply With Quote
Old 18th September 2007, 15:26   #1980  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by yesgrey3 View Post
The conversion routines to RGB have four options: rec601, rec709, pc601, pc709.
Is it possible to auto-detect rec and pc?
If you have samples that use pc601/709, please send us some.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Reply

Tags
ffdshow, ffdshow tryouts, ffdshow-mt, ffplay, icl


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:20.


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