Browse Source

DATV: Replace DVB-S2 pilot VLA buffers with std::vector

Replace variable-length arrays used for DVB-S2 pilot symbol matching with
std::vector allocations.

Use vector::data() when passing buffers to the existing pointer-based
match_ph_amp() function. This removes non-standard VLA usage and improves
C++ portability without changing behavior.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 4 months ago
parent
commit
f57e6d3568
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 4
      plugins/channelrx/demoddatv/leansdr/dvbs2.h

4
plugins/channelrx/demoddatv/leansdr/dvbs2.h

@ -1610,13 +1610,13 @@ struct s2_frame_receiver : runnable @@ -1610,13 +1610,13 @@ struct s2_frame_receiver : runnable
float interp_match_sof(sampler_state *pss)
{
std::complex<T> symbols[pilot.LENGTH];
std::vector<std::complex<T>> symbols(pilot.LENGTH);
for (int i=0; i<sof.LENGTH; ++i) {
symbols[i] = interp_next(pss) * pss->gain;
}
return match_ph_amp(sof.symbols, symbols, sof.LENGTH, pss);
return match_ph_amp(sof.symbols, symbols.data(), sof.LENGTH, pss);
}
// Estimate phase and amplitude from known symbols.

Loading…
Cancel
Save