ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | LICENSE

Commit: 4759af3eb6a60f3cfc6d1db995d49f0ebb273879
Parent: 4b1ee71433eff9f81960d8d9238440b7445c748a
Author: Randy Palamar
Date:   Thu, 28 Nov 2024 15:05:47 -0700

always allocate an output frame

This was a dumb oversight when fixing the averaging crash

Diffstat:
Mbeamformer.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/beamformer.c b/beamformer.c @@ -209,7 +209,9 @@ beamform_work_queue_push(BeamformerCtx *ctx, Arena *a, enum beamform_work work_t result->compute_ctx.frame = ctx->beamform_frames + ctx->displayed_frame_index; result->compute_ctx.first_pass = 1; - u32 needed_frames = ctx->params->raw.output_points.w; + u32 needed_frames = 1; + if (ctx->params->raw.output_points.w > 0) + needed_frames = ctx->params->raw.output_points.w; for (u32 i = 0; i < needed_frames; i++) { u32 frame_index = (ctx->displayed_frame_index - i) % ARRAY_COUNT(ctx->beamform_frames);