ogl_beamforming

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

Commit: 68d08191462ef969f191ac7f8b46ff8b78d23a2e
Parent: b3a4afbedb0611995713eed34044291d4683d20c
Author: Randy Palamar
Date:   Tue, 18 Mar 2025 16:24:56 -0600

core: support exporting the average frame

The expected use is to beamform a bunch of frames normally and
then on the last one ask for an export. It's a little janky but
will get the job done for now.

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

diff --git a/beamformer.c b/beamformer.c @@ -757,7 +757,10 @@ DEBUG_EXPORT BEAMFORMER_FRAME_STEP_FN(beamformer_frame_step) iptr f = ctx->platform.open_for_write(ctx->params->export_pipe_name); export->type = BW_SAVE_FRAME; export->output_frame_ctx.file_handle = f; - export->output_frame_ctx.frame = compute->frame; + if (ctx->params->raw.output_points.w > 1) + export->output_frame_ctx.frame = &ctx->averaged_frame; + else + export->output_frame_ctx.frame = compute->frame; beamform_work_queue_push_commit(ctx->beamform_work_queue); } ctx->params->export_next_frame = 0;