Commit: 546cadabb753ca1f53d2da759f520f3e317c121b
Parent: bec4414befb123795eb4d38e2dead40b83860b88
Author: Randy Palamar
Date: Wed, 26 Mar 2025 10:25:35 -0600
core: export the correct average frame
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/beamformer.c b/beamformer.c
@@ -783,8 +783,8 @@ DEBUG_EXPORT BEAMFORMER_FRAME_STEP_FN(beamformer_frame_step)
export->type = BW_SAVE_FRAME;
export->output_frame_ctx.file_handle = f;
if (ctx->params->raw.output_points.w > 1) {
- u32 a_index = ctx->averaged_frame_index %
- ARRAY_COUNT(ctx->averaged_frames);
+ u32 a_index = !(ctx->averaged_frame_index %
+ ARRAY_COUNT(ctx->averaged_frames));
BeamformFrame *aframe = ctx->averaged_frames + a_index;
ComputeShaderStats *astats = ctx->averaged_frame_compute_stats + a_index;
export->output_frame_ctx.frame.store = aframe;