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. |
23rd January 2010, 19:28 | #10441 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
I had a similar crash on exit problem yesterday when updating the ffmpeg-mt code. After a lot of trial and error I discovered it was related to some members of the struct H264Context (in h264.h), namely list_count/list_counts/ref_count. Just their order mattered for whether it crashed or not. So there may be some kind of alignment issue.
__________________
MPC-HC 2.2.1 |
23rd January 2010, 22:08 | #10442 | Link |
Registered User
Join Date: Sep 2008
Posts: 496
|
Hey Guys,
It turns out I didn't take into account situations where frames are removed from the source (courtesy of avisynth filter), to support this, I made another slight change to ffdshow: frames won't be delivered if the image filter does not eventually return S_OK. however, for various reasons, some filters might not return the proper value. I'm posting a beta so we could identify the problematic filters / settings before I commit, if you're getting black screens / missing frames, please let me know which filter / config is the cause. Thanks! Tal build: http://iknowu.net/files/public/ffdsh...eturnValue.exe patch: http://iknowu.net/files/public/ffdsh...urnValue.patch Edit: found first problem: DGBob. Last edited by tal.aloni; 23rd January 2010 at 22:27. |
23rd January 2010, 23:10 | #10443 | Link | |
Registered User
Join Date: Oct 2008
Location: Portugal
Posts: 161
|
I came across with this same situation and instead of copying other's words, I prefer to quote someone that already tested and provided the results:
Quote:
Would it be possible for ffdshow to output the same format as the input in lossless codecs and try to ouput 32bit float (and fallback to 32bit int or 24bit int, etc) in lossy codecs? Because as you see in el Filou's point 1 and 2, ffdshow isn't making the most correct choices. Bat
__________________
Win 11 x64, Geforce RTX 4060 Ti 16GB, TV Sony KD-55X8509C HDMI, Denon AVR-X2700H, Core i7-9700K, 32GB DDR4, Creative Labs Gigaworks S750 7.1 speakers MPC Home-Cinema madVR LAV Filters |
|
23rd January 2010, 23:34 | #10444 | Link | |
Registered User
Join Date: Feb 2005
Posts: 140
|
Quote:
|
|
23rd January 2010, 23:51 | #10445 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
Yes, it works OK with the order that is in your git tree. That order is also used in ffdshow's copy of ffmpeg-mt. I initially used the order that is used in regular ffmpeg. That was when I got the crashes.
Is my assumption correct that this is an alignment issue? Or this there some other hidden bug?
__________________
MPC-HC 2.2.1 |
23rd January 2010, 23:56 | #10446 | Link |
Registered User
Join Date: Feb 2005
Posts: 140
|
It's because mt does a memcpy() of some fields between threads, and that one was added in the middle of one of them upstream. But it's not appropriate to copy that one (it's a pointer to a per-frame table) so I moved it up in the context rather than splitting the memcpy up.
|
24th January 2010, 07:01 | #10447 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 4,926
|
Quote:
yep 3223 still crashing you do File->Close in MPC-HC and bye bye libavcodec.dll crashes it's not bad as the playback is over but it didn't happen before 3217 bigger problem though is that this 60 FPS sample is artifacting with ffdshow DXVA when with MPC-HC DXVA its fine
__________________
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; 24th January 2010 at 07:07. |
|
24th January 2010, 09:47 | #10449 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
With these newer ffdshow trunk builds you also need to do this to get the benefit of the patch though. At least for mvtools2 frame doubler: Decoder options tab Uncheck "Detect soft telecine and average frame durations" So if somebody says the patch doesn't fix their problem I would ask them if this is unchecked or not. It may be it only needs to be unchecked for mvtools2 frame doubler, but I don't check every plugin and option so I don't know. I updated the ffdshow wiki: link
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity. Last edited by Jeremy Duncan; 24th January 2010 at 13:21. |
|
24th January 2010, 19:44 | #10450 | Link | |
Media Control author
Join Date: Dec 2006
Location: Paris
Posts: 1,014
|
Quote:
This is the reason why liba52 and libdts are better for AC3/DTS decoding and this is indeed the reason why we keep them inside FFDShow About libavcodec TrueHD, I think that it is able to output 32 bits. About FFDShow output logic, I am not very familiar with it but I know that for example if you let 16 bits check, you will get 16 bits only. Try to test with 24 or 32 bits only Also there is the windows mixer that should be set to output this sample format. |
|
24th January 2010, 20:08 | #10451 | Link |
Registered User
Join Date: Jun 2005
Posts: 278
|
libavcodec won't do 24 bit since that is a pain to work with - alignment issues, can't easily use SIMD instructions on it etc.
Ideally the decoders should set AVCodecContext.bits_per_raw_sample to indicate how many bits actually are relevant. The AC3 decoder in libavcodec should be "trivial" to change to output either float or 32 bit integer (basically just replace the float_to_int16_interleave at the end of ac3_decode_frame). I'm not sure there's actually a point in doing so though. |
24th January 2010, 20:59 | #10452 | Link | |
Registered User
Join Date: Jul 2006
Posts: 276
|
Quote:
|
|
24th January 2010, 21:10 | #10453 | Link | |
Media Control author
Join Date: Dec 2006
Location: Paris
Posts: 1,014
|
Quote:
I think that you should propose your patch to ffmpeg team In that way we will be able to drop liba52. Same thing for DCA (DTS) |
|
24th January 2010, 22:20 | #10454 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 4,926
|
Thx tal.aloni for fixing the crashing problem with libavcodec.dll in ffdshow DXVA on close (that bug is history now)
__________________
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 |
24th January 2010, 22:42 | #10455 | Link |
Media Control author
Join Date: Dec 2006
Location: Paris
Posts: 1,014
|
I have bad news : I have spent a few hours on multithreading the copy of DXVA buffers into system memory to speed up full postprocessing, with no luck
Things are going a little faster, but that's all. Either we are doing something wrong (but I begin to doubt it), or else the sense GPU=>CPU gives by designed slow transfers I hope that one will be able to get in touch with the intel's guy who wrote this article (but I guess that he only tried with low res videos) Otherwise there is the DXVA HD feature that lets do non linear resize but this is too much work (at least for now) |
24th January 2010, 23:18 | #10456 | Link | |
Registered User
Join Date: Apr 2009
Posts: 89
|
Quote:
I have some questions. Maybe I'm missing something. You need to copy dxva buffers in memory to enable some filters and this is only for dxva 1. As I know with dxva 2 this is not needed. So are trying to do this because you want to implement dxva 1 in ffdshow? If that's the case then why not implement just subtitles for dxva 1 and use dxva 2 for the other case. And I know that windows xp has just dxva 1 but people are starting to use windows vista/7 so my oppinion is that it's enough to support dxva 1 with subtitles for windows xp. |
|
24th January 2010, 23:34 | #10458 | Link | |
Registered User
Join Date: Oct 2008
Location: Portugal
Posts: 161
|
Quote:
The thing is, that on lossless codecs is always better to output the same as a the source, for example it is better to output TrueHD 24bits if the source is also 24bits. But if the 32bits is ticked, it now outputs 32bit. It should somehow recognize TrueHD and don't output more than the source format. This should be the case for all other lossless codecs. One may think it's better to decode a lossless codec in a higher precision, but it's not. It could sometimes even be worse. On the other hand, lossy codecs like DTS, AC3, MP3, etc should always be decoded in the higher precision possible (32bit float when possible) no matter what the source is. leeperry could help me elaborate here if needed... When one ticks 16bit, 24bit, 32bit and 32bit float, the goal isn't to always output the highest possible, but to identify the source codec and output the best format for that codec. My question is, what can be done to ffdshow that could identify the type of codec and then choose the appropriate format considering what I just explained. The goal of ffdshow is to achieve the best decoding quality possible, isn't it? Bat PS: Another thing I've noticed is that checking LFE Crossover changes from 32bit integer to 32bit float, on a TrueHD track, for example. Why?
__________________
Win 11 x64, Geforce RTX 4060 Ti 16GB, TV Sony KD-55X8509C HDMI, Denon AVR-X2700H, Core i7-9700K, 32GB DDR4, Creative Labs Gigaworks S750 7.1 speakers MPC Home-Cinema madVR LAV Filters Last edited by BatKnight; 24th January 2010 at 23:43. |
|
25th January 2010, 02:14 | #10459 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
- The cpu reads the stuff from the ram in bits. - The gpu has it's own hw that acts as a cpu and the gpu has it's own ram on the videocard. But the way the gpu reads the ram is also in bits. With these two facts agreed on, then integrating them, one for postprocessing the other for dxva, you would need to harmonize the way the read the ram and interact with each other. I think the problem is they don't mesh together and they are trying to make it primarily cpu or gpu. To fix this problem let the cpu and gpu sense each other so they don't try and make it either cpu or gpu only.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity. |
|
Tags |
ffdshow, ffdshow tryouts, ffdshow-mt, ffplay, icl |
|
|