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 13th March 2012, 12:55   #14861  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by ryrynz View Post
Haruhiko, have you ever considered a version with has the audio and video decoders removed?
Nope.
You can disable a filter from its dialog, DirectShow control -> Multiple ffdshow instances: "none disabled".
I think it is possible to register filters separately by some code change, although I have no plan. You might ask clsid for an opinion.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 13th March 2012, 13:06   #14862  |  Link
Nya_Su
Registered User
 
Join Date: Mar 2012
Posts: 17
Quote:
Originally Posted by haruhiko_yamagata View Post
@Nya_Su,
fixed at rev 4382. Thanks.
Thanks a lot!
Nya_Su is offline   Reply With Quote
Old 13th March 2012, 21:18   #14863  |  Link
VipZ
Registered User
 
Join Date: Jun 2009
Location: London
Posts: 378
Quote:
Originally Posted by haruhiko_yamagata View Post
Nope.
You can disable a filter from its dialog, DirectShow control -> Multiple ffdshow instances: "none disabled".
I think it is possible to register filters separately by some code change, although I have no plan. You might ask clsid for an opinion.
If you interested I have made a patch previously to do just that, I just replicated the option code for DXVA to all the other filters. Just like DXVA code, if the registry value isn't set its as if there is no change.

Patch, http://www.mediafire.com/file/5i0rhl...regpatch.patch

The above isn't tested to latest SVN, last time I used this was against 3985.
__________________
Windows 11 Pro, CPU: Ryzen 9 5900X, GPU: GeForce RTX 3090 /w 512.95, Audio: HDMI to Yamaha RX-A3060 (5.1)
VipZ is offline   Reply With Quote
Old 14th March 2012, 19:44   #14864  |  Link
kasper93
MPC-HC Developer
 
Join Date: May 2010
Location: Poland
Posts: 586
Could you look at this sample http://dl.dropbox.com/u/16282309/LAV/AR.2.ts at beginning AR is 4:3 and than AR is 16:9. It crash whole player on aspect ratio change point with ffdshow video decoder. Works fine with Microsoft DTV-DVD Video Decoder.

Last edited by kasper93; 14th March 2012 at 19:54.
kasper93 is offline   Reply With Quote
Old 16th March 2012, 13:22   #14865  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by kasper93 View Post
Could you look at this sample http://dl.dropbox.com/u/16282309/LAV/AR.2.ts at beginning AR is 4:3 and than AR is 16:9. It crash whole player on aspect ratio change point with ffdshow video decoder. Works fine with Microsoft DTV-DVD Video Decoder.
Crash confirmed. I'll take a look.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 17th March 2012, 14:41   #14866  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by kasper93 View Post
Could you look at this sample http://dl.dropbox.com/u/16282309/LAV/AR.2.ts at beginning AR is 4:3 and than AR is 16:9. It crash whole player on aspect ratio change point with ffdshow video decoder. Works fine with Microsoft DTV-DVD Video Decoder.
The crash has been fixed at rev 4389. But sorry, it just avoid crashing.
Libav says, "Width/height/bit depth/chroma idc changing with threads is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented."
So if you set "Number of decoding threads:" 1, everything is fine.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 01:59   #14867  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Fix linker warnings

To fix the linker warnings saying that the TargetPath doesn't match with OutputFile, I have written a patch.
The warning goes away but more files appear in bin directory.
Is this OK? More files may be a bit annoying...
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 03:24   #14868  |  Link
FlashGordon
Registered User
 
Join Date: Oct 2010
Posts: 42
I think I've found some odd behavior using ffdshow build 4332. Using libmpeg2 as decoder and opening a specific PAL DVD with mpc-hc, there are certain specific parts where the decoder seems to drop frames. For me, the "glitch" is 100% reproducible under the same conditions, it is always the same times that drop these frames. Here's the odd part: opening just the VOB and playing these parts with libmpeg2 doesn't produce the 'glitch'. Opening the full DVD but using libavcodec for mpeg2 will also play fine. The filter chain when this happens includes the MS DVD navigator (all the others seem to not affect it).

Wish I could get a working sample, but like I said, the individual VOB plays fine with libmpeg2, this only happens when the MS DVD navigator is in use.

Is there any reason why libmpeg2 would be glitching at these parts and libavcodec plays them fine?
FlashGordon is offline   Reply With Quote
Old 18th March 2012, 04:02   #14869  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by FlashGordon View Post
Is there any reason why libmpeg2 would be glitching at these parts and libavcodec plays them fine?
I don't know.
I think libavcodec is better as MPEG-2 decoder. For example, color space conversion matrix is decoded by libavcodec. libavcodec is faster on current CPU. etc...
Currently libmpeg2 is not maintained. In my opinion, there is no point in maintaining libmpeg2. Recently Intel Quick Sync decoder has been added. Three is too many choice for users.
If no objection, I would remove it.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 04:12   #14870  |  Link
FlashGordon
Registered User
 
Join Date: Oct 2010
Posts: 42
I see. Would the IDCT options under "decoder options" affect this? libmpeg2 doesn't use these settings, right? So I'm thinking maybe the DVD company transferred the film badly and libavcodec somehow deals with these glitches better...

Right now I have IDCT on 'auto', workaround encoder bugs on 'autodetect', error recognition on 'careful' and error concealment on 'guess MVS + deblock'. Are these recommended settings?
FlashGordon is offline   Reply With Quote
Old 18th March 2012, 04:52   #14871  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by FlashGordon View Post
I see. Would the IDCT options under "decoder options" affect this? libmpeg2 doesn't use these settings, right?
libmpeg2 does not use the settings.
Quote:
Right now I have IDCT on 'auto', workaround encoder bugs on 'autodetect', error recognition on 'careful' and error concealment on 'guess MVS + deblock'. Are these recommended settings?
The default settings for Error recognition is "very aggressive". I have not tried various options for that though.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 05:01   #14872  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
NV12 preferred

Because current GPU prefer NV12 to YV12, I have written a patch to prefer NV12 as an output color space.
It doesn't affect image filters except the output filter.
Code:
Index: src/imgFilters/ffImgfmt.cpp
===================================================================
--- src/imgFilters/ffImgfmt.cpp	(revision 4388)
+++ src/imgFilters/ffImgfmt.cpp	(working copy)
@@ -420,6 +420,13 @@
             *rank = 200;
         return outPrimaryCSP|(inCSP&~FF_CSPS_MASK);
     }
+
+    // prefer YV12 to NV12 conversion for the final output. Currently rank is set only for the final output.
+    if (rank && (inCSP & FF_CSPS_MASK) == FF_CSP_420P && (wantedCSPS & FF_CSP_NV12)) {
+        *rank = 101;
+        return FF_CSP_NV12|(inCSP&~FF_CSPS_MASK);
+    }
+
     uint64_t outCSP=inCSP&wantedCSPS&FF_CSPS_MASK;
     if (outCSP) {
         if (rank) {
@@ -1182,8 +1189,8 @@
                 FF_CSP_P216 ,
                 FF_CSP_444P10,
                 FF_CSP_Y416 ,
+                FF_CSP_NV12 ,
                 FF_CSP_420P ,
-                FF_CSP_NV12 ,
                 FF_CSP_YUY2 ,
                 FF_CSP_UYVY ,
                 FF_CSP_YVYU ,
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 05:46   #14873  |  Link
FlashGordon
Registered User
 
Join Date: Oct 2010
Posts: 42
Quote:
Originally Posted by haruhiko_yamagata View Post
The default settings for Error recognition is "very aggressive". I have not tried various options for that though.
Is there a reason why that is the default? According to the wiki, it states that valid parts may be detected as errors... would this decrease image quality?
FlashGordon is offline   Reply With Quote
Old 18th March 2012, 06:01   #14874  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by FlashGordon View Post
Is there a reason why that is the default?
Looks like a bug.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 09:36   #14875  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
Quote:
Originally Posted by haruhiko_yamagata View Post
I don't know.
I think libavcodec is better as MPEG-2 decoder. For example, color space conversion matrix is decoded by libavcodec. libavcodec is faster on current CPU. etc...
Currently libmpeg2 is not maintained. In my opinion, there is no point in maintaining libmpeg2. Recently Intel Quick Sync decoder has been added. Three is too many choice for users.
If no objection, I would remove it.
What ?

in my experience Libmpeg2 is still one of the fastest Single threaded Software decoder (and it can keep very low latency @ the same time), and especially Gabest Decoder used in MPC-HC shows this to it's full potential on Windows especially if you pressure it to the extreme and combine iqualitycontrol with it

and im on Sandy Bridge see https://forum.doom9.org/showpost.php...postcount=9946

Lav Videos used avcodec has no chance it stucks and halts so heavily and due to the multithreading it's latency seems severely higher, and without multithreading i couldn't reach the speeds of libmpeg2 in singlethreaded performance
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 18th March 2012 at 10:02.
CruNcher is offline   Reply With Quote
Old 18th March 2012, 10:02   #14876  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,640
Quote:
Originally Posted by haruhiko_yamagata View Post
Because current GPU prefer NV12 to YV12, I have written a patch to prefer NV12 as an output color space.
It doesn't affect image filters except the output filter.
Preferring NV12 output is fine with me.
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Old 18th March 2012, 10:04   #14877  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,640
Quote:
Originally Posted by haruhiko_yamagata View Post
To fix the linker warnings saying that the TargetPath doesn't match with OutputFile, I have written a patch.
The warning goes away but more files appear in bin directory.
Is this OK? More files may be a bit annoying...
I rather have a warning than a mess of files.
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Old 18th March 2012, 10:36   #14878  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by CruNcher View Post
What ?

in my experience Libmpeg2 is still one of the fastest Single threaded Software decoder (and it can keep very low latency @ the same time), and especially Gabest Decoder used in MPC-HC shows this to it's full potential on Windows especially if you pressure it to the extreme and combine iqualitycontrol with it

and im on Sandy Bridge see https://forum.doom9.org/showpost.php...postcount=9946

Lav Videos used avcodec has no chance it stucks and halts so heavily and due to the multithreading it's latency seems severely higher, and without multithreading i couldn't reach the speeds of libmpeg2 in singlethreaded performance
Who has single core CPU? I don't think ffdshow should work on Atom. Single threaded performance has no meaning to me.
The latency is higher with frame based multithreading. But what's the inconvenience with it?
The point is that the maintenance is hard. I want to drop it unless the merit is big enough.

// EDIT
As for the dropped frames, I doubt that the performance is relevant. More likely, timestamps are wrong. If frames are dropped using ffdshow, please send me the sample.
IQualityControl: How is it used? It wouldn't be necessary for MPEG-2 at least on Sandy Bridge.
__________________
[ Download ffdshow | Wiki ]

Last edited by haruhiko_yamagata; 18th March 2012 at 10:51.
haruhiko_yamagata is offline   Reply With Quote
Old 18th March 2012, 11:00   #14879  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
I cant do this test with ffdshow because i cant activate SPP to pressure 1 core completely this is just ffdshow used as PP after the decoding and displaying the latency stats of the PP (OSD,SPP overhead distributed to 1 virtual core (25%), while decoding on the same). Also if you say you not interested in Single threading then you should boost some of the PP stuff to Multi threading.
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 18th March 2012 at 11:08.
CruNcher is offline   Reply With Quote
Old 18th March 2012, 11:17   #14880  |  Link
haruhiko_yamagata
Registered User
 
Join Date: Feb 2006
Location: Japan
Posts: 1,560
Quote:
Originally Posted by CruNcher View Post
I cant do this test with ffdshow because i cant activate SPP to pressure 1 core completely this is just ffdshow used as PP after the decoding and displaying the latency stats of the PP (OSD,SPP overhead distributed to 1 virtual core (25%), while decoding on the same). Also if you say you not interested in Single threading then you should boost some of the PP stuff to Multi threading.
Multitheading of PP may be a good feature if I have time to implement.
In my opinion, just single thread performance is not worth for maintenance effort. ffdshow has too many features to maintain. Please understand it is important to drop old stuffs.
__________________
[ Download ffdshow | Wiki ]
haruhiko_yamagata 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 10:39.


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