Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest FAAD2 Commit #354

Merged
merged 5 commits into from
Mar 7, 2025
Merged

Conversation

TheDaChicken
Copy link
Contributor

@TheDaChicken TheDaChicken commented Jan 1, 2025

I saw FAAD2 now provides a CMakeLists which makes compiling a patched faad hdc a bit easier. I updated the patch for the latest commit. It's still not good as fdk-aac.

Works just fine for me here: https://youtu.be/KYT2bGjVlQo

I wanted to nrsc5 to be able to compile easier. Most people use CMake. I am not very familiar with libtoolize.

I originally wanted to compile nrsc5 with MSVC because it doesn't depend on libc++. Plus, some people online disagree that -static is a good flag bla bla. nrsc5 requires lots of changes to get MSVC. I ended up just bringing libc with me.

@argilo
Copy link
Collaborator

argilo commented Mar 6, 2025

Stereo seems to be broken for secondary streams (HD2, HD3, etc). We'll have to investigate why that happened.

@argilo
Copy link
Collaborator

argilo commented Mar 6, 2025

I bisected faad2, and found that the problem began in this commit: knik0/faad2@d5104df

It added an extra check for parametric stereo in the DRM case, and I suspect we'll need to update our patch to do the same in the HDC case. (At present, that commit causes parametric stereo to be completely ignored in the HDC case.)

@argilo
Copy link
Collaborator

argilo commented Mar 7, 2025

I pushed an updated patch that incorporates the upstream change.

@@ -888,7 +902,11 @@ static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
 #ifdef DRM_PS
     case DRM_PARAMETRIC_STEREO:
         /* If not expected then only decode but do not expose. */
+#ifdef HDC
+        if (sbr->Is_DRM_SBR || sbr->Is_HDC_SBR)
+#else
         if (sbr->Is_DRM_SBR)
+#endif
         {
             sbr->ps_used = 1;
         }

After this change, the audio output is unchanged (compared to nrsc5's master branch), apart from variations in the least significant bit.

@argilo argilo merged commit dccb972 into theori-io:master Mar 7, 2025
4 checks passed
@argilo argilo mentioned this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants