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

MacOS build fixes #1374

Merged
merged 1 commit into from
Aug 4, 2022
Merged

MacOS build fixes #1374

merged 1 commit into from
Aug 4, 2022

Conversation

srcejon
Copy link
Collaborator

@srcejon srcejon commented Aug 4, 2022

A couple of fixes to M17 and DATV Demod so that it builds on MacOS Mohave.

@f4exb f4exb merged commit 30349f2 into f4exb:master Aug 4, 2022
@f4exb
Copy link
Owner

f4exb commented Aug 4, 2022

So if I get it correctly we will have soft LDPC decoding only for Linux (we drop it for Windows as well) ?

@srcejon
Copy link
Collaborator Author

srcejon commented Aug 4, 2022

No - I've just defined out some unused code as it doesn't compile on Mac. But yes, it is a bit confusing and could do with a further tidy up.

In datvdemodsink.cpp, before any of these LDPC changes, there was some code that was defined out:

#if 0
    // Doesn't work...
    // Soft LDPC decoder mode.
    // Deinterleave into soft bits.
    p_fecframes = new leansdr::pipebuf<leansdr::fecframe<leansdr::llr_sb> >(m_objScheduler, "FEC frames", BUF_FRAMES);
    p_s2_deinterleaver = new leansdr::s2_deinterleaver<leansdr::llr_ss, leansdr::llr_sb>(
        m_objScheduler,
        *(leansdr::pipebuf< leansdr::plslot<leansdr::llr_ss> > *) p_slots_dvbs2,
        *(leansdr::pipebuf< leansdr::fecframe<leansdr::llr_sb> > * ) p_fecframes
    );
    r_fecdecsoft = new leansdr::s2_fecdec_soft<leansdr::llr_t,leansdr::llr_sb>(
        m_objScheduler, *(leansdr::pipebuf< leansdr::fecframe<leansdr::llr_sb> > * ) p_fecframes,
        *(leansdr::pipebuf<leansdr::bbframe> *) p_bbframes,
        m_modcodModulation < 0 ? 0 : m_modcodModulation,
        true, 5,
        p_vbitcount,
        p_verrcount
    );
#else
    // External LDPC decoder mode.
    // Deinterleave into soft bits.
   ....

The bit of code I added the #ifdef LINUX for in this commit is only used inside the #if 0 here - so both bits of code could potentially be removed completely, unless you see a future need for them.

The "External LDPC decoder mode" above is the code that is currently used, even though the decoder is no longer external, so that could do with a bit of a tidy up as well.

We could also remove the USE_LDPC_TOOL #defined code as well. Depends if you just want to move forward with only the one implementation.

@f4exb
Copy link
Owner

f4exb commented Aug 4, 2022

OK I probably skipped some details indeed the original code is not very readable.

We could also remove the USE_LDPC_TOOL #defined code as well. Depends if you just want to move forward with only the one implementation.

In fact I have been testing the "internal" implementation with QO-100 DATV and it works at least as well as with the "external" implementation. There might even be some gain in processing since there is not the overhead of spawning a full process. So I think that eventually yes the old code could be removed.

@srcejon srcejon deleted the fix_m17_mac branch September 16, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants