View Full Version : ffdshow tryout project : HD audio discussion
SamuriHL
5th December 2009, 21:35
I'm still working on it, albain. Give me some time. I don't necessarily think that's it either. I tried setting a check on size != 0 and it didn't help. Not sure what's going on exactly yet, but, I'm working on it.
Sebastiii
5th December 2009, 21:46
Here is an updated build (http://damienbt.free.fr/ffdshow_rev3140_20091205_dbt_bitstream_beta47.exe) with a check on size of the vector before clearing it
Hope that it will fix it but I have doubts
Hi :)
I think it's the other build 47, if i can help :
Here is an updated build 48 :) (http://damienbt.free.fr/ffdshow_rev3140_20091205_dbt_bitstream_beta48.exe)
Good luck :)
Seb.
SamuriHL
5th December 2009, 22:04
I was a line off, albain. Sorry about that. As I said, I'm a bit rusty. :)
backupbuf.append(&newsrcBuffer->begin(), newsrcBuffer->size());
That's the line that's blowing up. I've tried all kinds of tricks to make that freaking code work. Nothing helps. On certain renderers it just blows up.
albain
5th December 2009, 22:05
Ok, I wait ;-)
SamuriHL
5th December 2009, 22:12
It works fine if I comment out that line. Do we need it? :D No more crashing. LOL! Something about the address coming back from the $newsrcBuffer->begin() is not making it happy.
SamuriHL
5th December 2009, 22:22
I don't know. That's the line it breaks on. I have no idea why. I'm done looking at it for now. It works some times, doesn't work other times and I can't figure out any pattern to it. That's some seriously freaky code.
SamuriHL
5th December 2009, 22:30
For the love of God. I decided to try one last thing and it seems to have fixed it. I have no idea why...my pointer stuff is REALLY beyond rusty at this point. albain, try this:
backupbuf.append(&*newsrcBuffer->begin(), newsrcBuffer->size());
Notice I added the * after the &. Why the hell that should make any difference at all I don't know as like I said, pointers and I are a world apart at this point. However, it no longer crashes in any of the renderers *SO FAR*. :) Maybe that makes sense to you and you can explain it to me.
whurlston
5th December 2009, 23:08
NM.. didn't make sense
SamuriHL
5th December 2009, 23:10
Whurlston, same code I was messing with, but, see my previous post. Does that make sense?
whurlston
5th December 2009, 23:13
Not much about c++ makes sense to me. :D
But I'll test that. I missed it earlier.
SamuriHL
5th December 2009, 23:15
Thanks. I spent all day trying to crack this bug. I was not able to get it to crash after making that change. Of course, albain didn't commit his latest changes to SVN last I checked so my version doesn't have his DTS-HD fix, but, anyway it still works. Watching Monsters Inc with my son right now. We never got to finish it the other night.
whurlston
5th December 2009, 23:25
I let my compile finish and tested it anyway and this works. TaudioParser block starting at line 437 (addition in bold):
if (useDTSHDPassthrough && newsrcBuffer->size() > 0)
{
if (backupbuf.size()!=0)
backupbuf.append(&newsrcBuffer->begin(), newsrcBuffer->size());
newsrcBuffer->clear();
audioParserData.frames.clear();
}
I'm going to remove the line and test your change now.
SamuriHL
5th December 2009, 23:27
Ok. When I checked the size on backupbuf even during working runs it was 0, so, I didn't think that was a viable option. Basically your code is never going to fill that backupbuf. And I'm not sure what it even does. It's no different than commenting out the line, though.
whurlston
5th December 2009, 23:32
That's what I was thinking which is why I deleted my previous post. Your change works for me as well so I say go with yours unless albain shoots us both down. :D
if (useDTSHDPassthrough && newsrcBuffer->size() > 0)
{
backupbuf.append(&*newsrcBuffer->begin(), newsrcBuffer->size());
newsrcBuffer->clear();
audioParserData.frames.clear();
}
SamuriHL
5th December 2009, 23:34
Sweet. That was fun. LOL :)
albain
5th December 2009, 23:39
Hi, sorry for the delay
You found the solution actually : this &* thing is the solution, it is reproduced elsewhere in the code. I think this is a matter of cast to get the right address.
This block of code line 437 corresponds to that case :
in the previous parsing loop I detected a DTS core block and added it to the output buffer (newsrcbuffer).
But after that I detected a DTS HD block : so the stream format is not DTS but DTS HD.
And I cannot let this DTS block into the output buffer if I don't have a full DTS HD block because DTS HD bitstream are pairs of 1 DTS core and 1 DTS HD block
So I have to remove it, back it up and get it back once I have my full HD block.
Great job, I wouldn't have suspected this. When you're looking for errors, you don't look after missing stars between & and a variable ! :-)
Would you join the developers team ?
EDIT : by the way there is a similar mistake line 748, it concerns DD+ (and it would explain crashes with this format a few weeks ago)
THANKS AGAIN !
EDIT2 : also the last build should work better I hope with non working DTS HD samples. I am committing the sources so that you get the last fixes
SamuriHL
5th December 2009, 23:41
Awesome. That was a tough little bug to find and fix! But I'm glad that solution works. Very nice.
albain
5th December 2009, 23:52
Yes, awesome buddy ! :thanks: :)
Fixes committed in revision 3145
And here comes a new build too (http://damienbt.free.fr/ffdshow_rev3140_20091205_dbt_bitstream_beta49.exe)
So now can we say that TrueHD and DTS HD are fully functional on the ATI 5xxx series ?
whurlston
5th December 2009, 23:55
So now can we say that TrueHD and DTS HD are fully functional on the ATI 5xxx series ?Seconded.
SamuriHL
5th December 2009, 23:56
Mostly I would agree with that, yes. WaveOut does not work on DTS-HD MA for me. The receiver never locks...keeps searching for an audio signal. But all the other renderers work for me. (Well, arcsoft doesn't but that's never done anything for me.) DirectShow both default and ATI, MPC, etc. All working now. Thanks so much for your work on this!!!!!!
albain
6th December 2009, 00:06
Thanks to you on this one fellows
Man, if I knew that I would have built 47 betas to get this working (compared to the 23 betas for the initial implementation of the audio parser for Truehd and DD+ decoding, also with madshi's contribution).
SamuriHL
6th December 2009, 00:09
It probably would have been easier on you had I set up a dev environment on that machine earlier. sigh. I was just afraid of breaking my only working player at the time. And indeed, if VS is running, TMT3 refuses to start. However, it's ok as long as VS isn't running, so at least now I know I can have both on the same machine. If you need help with anything else, just yell.
sub24ox7
6th December 2009, 00:12
Okay with build 49 and my xonar and arcsoft renderer DTS-HD movies that crashed (well all dts-hd movies crashed before) now don't crash in fact i can't find any movies that will crash it i think you fixed it 100% as for as the bug you were looking for.
I can also skip anywhere in the movie and voila the audio doesn't miss a beat. This build is close to perfection for the xonar with arcsoft renderer, I am sure you would like to get the xonar to work with direct sound or waveout because you can't incorporate arcsoft renderer into ffdshow, and it would be nice if the same renderer worked with both the xonar and the ati 5*** series cards. Anyway I thought I would share the xonar side of your success. And by the way awesome job Samurihl in finding the reason for the app crash.
Cheers
SamuriHL
6th December 2009, 00:17
That's really good news that it's not crashing for you on the Xonar, as well! Sweet!! It took WAY longer to find this bug than it should have. I was stubborn and was looking for a way to trace into the code directly. I finally gave up on that and started adding dprintf's all over the place. That helped me narrow it down, but, even then I got it wrong a couple times. Java is so much easier. :D I used to be very good at C++ but I haven't really done much with it in a few years. It's coming back to me now, though. I'm just glad I was able to find this as it was driving me insane. Working with one renderer, not with another, then working on one run but not the next. BLAH! :D I'm putting together a list of renderers that don't work with the ATI card now.
albain
6th December 2009, 00:25
I have updated the first post according to the last (good) results
I hope now that DD+ is working too and that I'll figure out a solution for the xonar.
Last step after that LPCM support and we are done!
I will continue tomorrow.
Thanks again SamuriHl for your hard work
SamuriHL
6th December 2009, 00:27
DTS-HD MA (Monsters Inc which was crashing until the new build):
ATI HDMI Output - Doesn't lock and continues to search for the audio track
Default WaveOut Device - see above, same as ATI HDMI Output
Cyberlink Audio Renderer - LPCM as always
MPC - Working
Default DirectSound - Working
DirectSound: ATI HDMI Output - Working
ArcSoft - No audio, doesn't even try to find an audio stream
TrueHD (Mounted ISO rebuilt with tsMuxer):
ATI HDMI Output - Working
Default WaveOut Device - Working
Cyberlink Audio Renderer - LPCM as always, INSANELY SLOW playback...audio really messed up
MPC - Working
Default DirectSound - Working
DirectSound: ATI HDMI Output - Working
ArcSoft - No audio, doesn't even try to find an audio stream
As you can see there are differences between TrueHD and DTS-HD MA. albain, let me know if you need anything from me.
sub24ox7
6th December 2009, 00:28
I am trying this very minute the TrondheimSolistene divertimenti blu-ray on my hdd and i am having complete success with it on both the dts-hd 192,000hz 24bit 5.1 channel and the true-hd 192,000hz 24bit 5.1 channel track. so it seems to work with the 192,000hz tracks of both perfectly!!! this with the same setup as my previous post! beta 49. I even had trouble getting the dts-hd track of this one with the official totalmedia theatre 3 from arcsoft, but not with ffdshow I can get both the lpcm(obviously most likely molested) which never worked and the dolby-true hd and dts-hd bitperfect to receiver awesome!
SamuriHL
6th December 2009, 00:30
DD+ still not working for me either from an m2ts or mkv. It gives me LPCM.
rica
6th December 2009, 00:30
47 and 49 trials:
Vista 32/SP2:
THD gives core ac3
DTSHD-MA gives core ac3 :p
SamuriHL
6th December 2009, 00:33
I am trying this very minute the divermenti blu-ray on my hdd and i am having complete success with it on both the dts-hd 192,000hz 24bit 5.1 channel and the true-hd 192,000hz 24bit 5.1 channel track. so it seems to work with the 192,000hz tracks of both perfectly!!! this with the same setup as my previous post! beta 49
Most impressive! :) This is awesome!! I just watched all of Monsters Inc with my son using this. I could have used PDVD9, but, it's SO nice to just throw the disc in, open MPC-HC, file Open DVD, and it brings you right to the main movie and bitstreams the audio flawlessly. YEY!!!!
rica
6th December 2009, 00:33
Albain pls forget xonar for the time being and get a passive Ati card; it's on the market afaik.
rica
6th December 2009, 00:50
btw, ffdshow 49 is working on 7/64 over the Ati but never works on Vista.
sub24ox7
6th December 2009, 00:57
Respectively rica why forget the xonar? there are plenty of people that have them and there the type of people who appreciate this feature being incorporated into ffdshow. It is working so well already with the newest beta49 that I am sure a person would want to finish the last little bit for it.
rica
6th December 2009, 00:59
Step by step method is better, believe me :)
There might be a conflict, so the developer must have both Ati and Xonar while developing the SW :)
Not a "should" but a "must"; this is what i think.
SamuriHL
6th December 2009, 01:12
Clearly that's not the case as albain didn't have either and look where we are. :)
piit
6th December 2009, 01:17
Hi guys, finally, my 5 day grace period here on the forum (only registered on 30 November) and I can provide some input :)
At first, let me say, what an IMPRESSIVE piece of work! Who would have guessed - Cyberlink only made it work (public) a month ago - and ffdshow has caught up! I'm so happy I don't have to use PowerDVD to get full HD passthru (never liked the term bitstreaming) and I can keep my favourite solution - MPC-HC+ffdshow.
Now for my input. Build 48 working VERY well and pretty reliable on my 5750 (friends now watching Taken so can't test build 49) - tested on about 15 different TrueHD/DTS-HD MA blurays.
However, is DTS-HD HR supposed to be working? I can't get it to play on Reservoir Dogs blu-ray. The AVR shows DTS-HD HR and I get sound for about 3 seconds, but then the display switches back to PL IIx (which is the idle display without any input on my Denon AVR-1910), the sound stops and the movie freezes.
Can somebody please quickly explain how can I test and provide some more helpful info about the problem? I could also cut the first 15 seconds of the movie for somebody better equipped to test and investigate - but I'd be happy to do it myself, I owe you all loads ;)
Pete
whurlston
6th December 2009, 01:25
DD+ still not working for me either from an m2ts or mkv. It gives me LPCM.
Same here.
rica
6th December 2009, 01:29
Clearly that's not the case as albain didn't have either and look where we are. :)
Sure, i always appreciate to albain, but do not forget the efforts of the testers of that blind SW development.
I wish he had the cards, at least one of them :devil:
SamuriHL
6th December 2009, 01:44
Hi guys, finally, my 5 day grace period here on the forum (only registered on 30 November) and I can provide some input :)
At first, let me say, what an IMPRESSIVE piece of work! Who would have guessed - Cyberlink only made it work (public) a month ago - and ffdshow has caught up! I'm so happy I don't have to use PowerDVD to get full HD passthru (never liked the term bitstreaming) and I can keep my favourite solution - MPC-HC+ffdshow.
Now for my input. Build 48 working VERY well and pretty reliable on my 5750 (friends now watching Taken so can't test build 49) - tested on about 15 different TrueHD/DTS-HD MA blurays.
However, is DTS-HD HR supposed to be working? I can't get it to play on Reservoir Dogs blu-ray. The AVR shows DTS-HD HR and I get sound for about 3 seconds, but then the display switches back to PL IIx (which is the idle display without any input on my Denon AVR-1910), the sound stops and the movie freezes.
Can somebody please quickly explain how can I test and provide some more helpful info about the problem? I could also cut the first 15 seconds of the movie for somebody better equipped to test and investigate - but I'd be happy to do it myself, I owe you all loads ;)
Pete
First off, you absolutely want to test on build 49. Second, what audio renderer are you using in MPC-HC for output? I recommend default directsound or the DirectSound: ATI HDMI renderers as they both play everything flawlessly. But build 49 has a couple DTS-HD MA fixes and who knows if it affects your DTS-HR track. if it still doesn't work, we can provide you with the method needed to generate a log. That'd tell us quite a bit. You'll need DbgView and to add this to your registry:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\GNU\ffdshow]
"allowDPRINTF"=dword:00000001
Then just load up DbgView, run MPC-HC and open your DTS-HR movie, play a bit of it, save the log, and post it here for albain to look at.
SamuriHL
6th December 2009, 01:46
Sure, i always appreciate to albain, but do not forget the efforts of the testers of that blind SW development.
I wish he had the cards, at least one of them :devil:
We all wish he had one of these cards....but I bet NO ONE wishes he had one more than albain himself! :D You know what rocks, though? I want everyone here to think about this for a minute. He started this in September with absolutely no equipment to test it on. Going by our logs and madshi's help, albain was able to get bitstreaming support working while flying blind before he even got his ATI card. Now when he gets one, he has a full bitstreaming solution available to him that works great. :D Now *THAT* is an accomplishment!!!
rica
6th December 2009, 01:54
Now *THAT* is an accomplishment!!!
Sure it is :thanks: He is a real crazy, i know :)
Sebastiii
6th December 2009, 01:58
Great news and Great works for all of you :)
SamuriHL
6th December 2009, 02:55
@whurlston or albain
When I compile the code I get errors in TsampleFormat.cpp. The KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL is undeclared which leads to a bunch of other errors. I commented that line out earlier. Trying to compile the newest code and wanted to see if anyone knows why I'm getting this error andwhat I should do about it other than commenting it out. :)
SamuriHL
6th December 2009, 03:16
I see what the issue is. albain screwed over the Windows 7 people. :p
//AC3
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL, 0x00000092, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
Can you add that to ffdshow_mediaguids.h please? I think that's the right value...not 100% sure on that, but, I can now compile without wiping out AC3 support. :D
SamuriHL
6th December 2009, 03:30
EAC3 MKV. As you can see, until the ATI driver supports it, I'm thinking it ain't going to happen for us. Unless you try something crazy like throwing it through TrueHD media type and faking out the driver. LOL :)
http://pastebin.com/pastebin.php?dl=d35989bee
whurlston
6th December 2009, 04:45
@whurlston or albain
When I compile the code I get errors in TsampleFormat.cpp. The KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL is undeclared which leads to a bunch of other errors. I commented that line out earlier. Trying to compile the newest code and wanted to see if anyone knows why I'm getting this error andwhat I should do about it other than commenting it out. :)
I'm not getting that error. Did you add the Win 7 SDK to your additional Includes?
SamuriHL
6th December 2009, 04:49
I'm not getting that error. Did you add the Win 7 SDK to your additional Includes?
I thought I did. Will check later. Watching a movie right now.
whurlston
6th December 2009, 05:00
alternatively you can add it to the "#ifndef KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_MLP" section at the bottom of ffdshow_mediaguids.h but I just adding the Win7 Include and Lib (x86) directories along with the DirectShow.
SamuriHL
6th December 2009, 05:02
That's what I did and was the change I proposed to albain above. :)
whurlston
6th December 2009, 05:03
Yeah, it would make sense to add it there.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.