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

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th January 2012, 15:44   #14521  |  Link
hoborg
Registered User
 
Join Date: Nov 2008
Posts: 454
BUG?
Hi.
I noticet if there is a "hi quality yv12 to RBG conversion" enabled in RGB convesion, 10-bit encoded videos make Graphstudio (FFDshow) to crash.
Just tested by "ffdshow tryouts project, svn 4236 (x86) - MSVC2010" on "i444compressed.mkv" sample.
__________________
Working machine: Win10x64 + Intel Skull Canyon
My HTPC.

How to start with Bitcoin
hoborg is offline   Reply With Quote
Old 9th January 2012, 16:50   #14522  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Quote:
Originally Posted by haruhiko_yamagata View Post
fixed at rev 4230-4231.
Works beautifully, thanks.
Snowknight26 is offline   Reply With Quote
Old 9th January 2012, 23:53   #14523  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by hoborg View Post
BUG?
Hi.
I noticet if there is a "hi quality yv12 to RBG conversion" enabled in RGB convesion, 10-bit encoded videos make Graphstudio (FFDshow) to crash.
Just tested by "ffdshow tryouts project, svn 4236 (x86) - MSVC2010" on "i444compressed.mkv" sample.
It works for me. What is the video renderer and the video card (Radeon HD 6750?)?
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 10th January 2012, 07:32   #14524  |  Link
hoborg
Registered User
 
Join Date: Nov 2008
Posts: 454
Quote:
Originally Posted by haruhiko_yamagata View Post
It works for me. What is the video renderer and the video card (Radeon HD 6750?)?
Yes, 6750 + EVR

Edit:
The same problem on my HTPC with Radeon 6450 + VMR9 FSE.

Edit2:
I reset FFDshow setting and it is working now. Must be some registry entry in "HKEY_CURRENT_USER\Software\GNU\ffdshow\default" causing the crash.
__________________
Working machine: Win10x64 + Intel Skull Canyon
My HTPC.

How to start with Bitcoin

Last edited by hoborg; 10th January 2012 at 09:44.
hoborg is offline   Reply With Quote
Old 10th January 2012, 11:16   #14525  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by hoborg View Post
Yes, 6750 + EVR

Edit:
The same problem on my HTPC with Radeon 6450 + VMR9 FSE.

Edit2:
I reset FFDshow setting and it is working now. Must be some registry entry in "HKEY_CURRENT_USER\Software\GNU\ffdshow\default" causing the crash.
You found out very important thing.
Do you have any back up of the crashing settings? If you have one, please send it to me.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 10th January 2012, 11:37   #14526  |  Link
hoborg
Registered User
 
Join Date: Nov 2008
Posts: 454
Quote:
Originally Posted by haruhiko_yamagata View Post
You found out very important thing.
Do you have any back up of the crashing settings? If you have one, please send it to me.
Yes, here it is.
__________________
Working machine: Win10x64 + Intel Skull Canyon
My HTPC.

How to start with Bitcoin
hoborg is offline   Reply With Quote
Old 10th January 2012, 13:02   #14527  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by hoborg View Post
Thank you. It was crashing because dithering was unchecked.
I have fixed at rev 4240.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 10th January 2012, 13:23   #14528  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
What should be the default output color space to EVR for 10-bit 4:2:0 video?
For most (all?) PC, EVR does not accept P010/P016. Currently ffdshow use YV12 to connect with EVR.
It's lossy. I think RGB32 is less lossy. It's a bit slower though.
A small patch can change this.

Code:
Index: src/imgFilters/ffImgfmt.cpp
===================================================================
--- src/imgFilters/ffImgfmt.cpp	(revision 4238)
+++ src/imgFilters/ffImgfmt.cpp	(working copy)
@@ -1154,6 +1154,10 @@
                 FF_CSP_P216 ,
                 FF_CSP_444P10,
                 FF_CSP_Y416 ,
+                FF_CSP_BGR32,
+                FF_CSP_RGB32,
+                FF_CSP_BGR24,
+                FF_CSP_RGB24,
                 FF_CSP_420P ,
                 FF_CSP_NV12 ,
                 FF_CSP_YUY2 ,
@@ -1167,10 +1171,6 @@
                 FF_CSP_410P ,
                 FF_CSP_ABGR ,
                 FF_CSP_RGBA ,
-                FF_CSP_BGR32,
-                FF_CSP_RGB32,
-                FF_CSP_BGR24,
-                FF_CSP_RGB24,
                 FF_CSP_BGR16,
                 FF_CSP_RGB16,
                 FF_CSP_BGR15,
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 10th January 2012, 17:18   #14529  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
IMHO the default should be to output a format as close to the original as possible, and upsampling chroma is not close at all. If 10-bit doesn't work, provide properly dithered 8-bit.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 10th January 2012, 18:38   #14530  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,642
If P010/P016 can't be used, then best order of preference would probably be RGB > NV12 > YV12.
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Old 10th January 2012, 18:47   #14531  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
I definitely agree with nevcairiel here.
madshi is offline   Reply With Quote
Old 10th January 2012, 23:49   #14532  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by nevcairiel View Post
IMHO the default should be to output a format as close to the original as possible, and upsampling chroma is not close at all. If 10-bit doesn't work, provide properly dithered 8-bit.
The video renderer has to up-sample chroma anyway unless the PC is connected to YCbCr analog TV.
The up-sampling without extra 2 bits is lossy. If up-sampling is done in ffdshow, it can utilize the 2 bits.
The video renderer may be able to use better interpolation while ffdshow use bilinear.
Which will produce better result? Is interpolation method more important than native conversion?
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 11th January 2012, 09:45   #14533  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
haruhiko, there's one thing missing in your argument, namely that RGB output is only 8bit. So let's collect arguments:

RGB output:
+ chroma upsampling and color conversion can make use of the original 10bit data
- after color conversion everything must be converted down to 8bit
- chroma upsampling algorithm is lower quality than what good renderers do
- user has to configure ffdshow's RGB output to match the display's level requirements (TV vs. PC levels)

NV12/YV12 output:
- video must be downconverted to 8bit right away
+ video renderer doesn't have to downconvert to 8bit after color conversion
+ chroma upsampling algorithm is higher quality
+ ffdshow doesn't have to care about PC vs. video levels

Please note that YCbCr -> RGB color conversion results in floating point data. So basically ffdshow has to dither the floating point RGB data down to 8bit integer. When using YV12/NV12, the video renderer doesn't have to do that, it can perform the color conversion in floating point and then maintain a much higher bitdepth in its internal processing chain.
madshi is offline   Reply With Quote
Old 11th January 2012, 11:06   #14534  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Thank you for your opinion.
Quote:
Originally Posted by madshi View Post
- after color conversion everything must be converted down to 8bit
Currently most people do not have 10-bit enabled display. If they want to make use of full 10-bit, they must use madVR anyway. If EVR is used, I think we should target 8-bit display. In that case, the RGB32 output of ffdshow is the final output to display. Usually no further processing is required.

For now, it's a rare setting to have 10-bit monitor. It may change in the future, but until then, EVR would have supported P016/P010.
Quote:
- chroma upsampling algorithm is lower quality than what good renderers do
Is the difference of upsampling algorithm more important than native conversion? I think you know how much is lost if 10-bit YCbCr is converted to 8-bit YCbCr and then to RGB32.
Quote:
- user has to configure ffdshow's RGB output to match the display's level requirements (TV vs. PC levels)
This may be the weak point. People who use projectors have to configure the option.

Quote:
+ video renderer doesn't have to downconvert to 8bit after color conversion
This is true only if it has high bit monitor.
Quote:
Please note that YCbCr -> RGB color conversion results in floating point data. So basically ffdshow has to dither the floating point RGB data down to 8bit integer. When using YV12/NV12, the video renderer doesn't have to do that, it can perform the color conversion in floating point and then maintain a much higher bitdepth in its internal processing chain.
Well, 10-bit to 8-bit YCbCr conversion is very lossy and NV12 to RGB32 conversion is lossy again. The video renderer has to dither the output to 8-bit RGB unless the PC has high bit monitor.

What are expected in video renderer's processing chain? Resize is done in 8-bit anyway either in RGB32 or NV12. Deinterlacing is the biggest problem, but I have never encountered an interlaced high bit material.

After all, EVR must support P010/P016!
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 11th January 2012, 11:45   #14535  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
A 10-bit -> 8-bit conversion may be lossy, but with proper dithering its "visually lossless", you don't see it. A forced RGB conversion may be visible, depending on what the renderer would do better with the raw YUV data.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 11th January 2012, 11:54   #14536  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
@haruhiko_yamagata:

I agree that it would be ideal if EVR supported P010/P016. I'm not sure if that is something Microsoft would have to implement, or maybe the media player devs could do that with a custom mixer? Don't really know...

I don't think that 10bit to 8bit YCbCr is "very" lossy. If you apply proper dithering the loss should be small.

You're saying that the ffdshow RGB output will be the final output with no further processing. This may be true in many cases, but not in all. E.g. users may use the video renderer to scale the image. In my projection setup (CIH, Cinemascope) I always have to scale 16:9 and 4:3 movies. So even with 1080p content and 1080p displays scaling may still be necessary sometimes. Then there are color changes, brightness/contrast changes, level changes, calibration, gamma adjustments. These are all things that the video renderer may perform. If you take all that into account, you can't be sure that the ffdshow RGB output will see no further processing.

You do have a valid point, though: *If* ffdshow's RGB output is the final output without any further processing being done by the video renderer, then having ffdshow output RGB would minimize bitdepth losses.

At the end of the day I don't really care much, because all of this applies to EVR/VMR, only. So if you prefer RGB output in this situation, that's just fine with me.
madshi is offline   Reply With Quote
Old 11th January 2012, 12:14   #14537  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
OK, I understand 10-bit YCbCr to 8-bit YCbCr conversion isn't too lossy. I'll keep it as it is.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 11th January 2012, 12:26   #14538  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by obieobieobie View Post
In rev4225, post processing with automatic quality control enabled is broken at least for XVID content. Works in rev3984.
I can't reproduce. I don't have many XVID samples that post processing is effective. Could you send us a sample?
Please pack exported settings with it.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 11th January 2012, 13:30   #14539  |  Link
ikarad
Registered User
 
Join Date: Apr 2008
Posts: 546
1)Problem with rgb32 output and ffdshow

With this video ffdshow doesn't work if I select rgb32 in output. If I check nv12 or p010 video works with mpc-hc and ffdshow.
video here: http://www.nyaa.eu/?page=torrentinfo&tid=270934

I tried with ffdshow 4238 and ffdshow 4079 there is the same problem.

edit: it's the same problem with all 10bit video and rgb24 output

edit2: If I use lav video and select only rgb32 output in lav video, video works well.

2) other problem.
a) If I turn on subtitles in ffdshow. If I open 10 bit video, ffdshow switch to rgb32 output and video do'esnt work (mpc and ffdshow open and close immediately like said in 1))
b) If I turn off subtitles in ffdshow. If I open 10 bit video, ffdshow swith to po10 output and video works. during the video, I can turn on subs and it works and subs are displayed.

There is a problem with turn on or turn off subs to select output color space when video start

3) question: When can I expect implementation of \t subs ? you have told 1 or 2 months in november.

Last edited by ikarad; 11th January 2012 at 14:35.
ikarad is offline   Reply With Quote
Old 11th January 2012, 13:42   #14540  |  Link
obieobieobie
Registered User
 
Join Date: Mar 2004
Posts: 182
Quote:
Originally Posted by haruhiko_yamagata View Post
I can't reproduce. I don't have many XVID samples that post processing is effective. Could you send us a sample?
Please pack exported settings with it.
For me, it happened in every XVID file. The symptom was for the quality slider to go to the lowest value at once when automatic quality control was enabled no matter what quality the XVID file had. Usually the quality slider fluctuates.

I will try and get you a sample, though.

Edit: Hm, I can't reproduce either. I will get back to you if I encounter it again. Just put this out of mind. Sorry.

Last edited by obieobieobie; 11th January 2012 at 14:34.
obieobieobie is offline   Reply With Quote
Reply

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 17:28.


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