1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 23:43:43 -04:00

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>
This commit is contained in:
Robin Getz
2026-07-26 14:54:12 -04:00
parent def0a877db
commit f57e6d3568
+2 -2
View File
@@ -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.