Files
FFmpeg/libavfilter
Raja-89 c60ac8f256 avfilter/dnn: implement batching for Torch backend
Add batch processing support to the LibTorch DNN backend, following
the same pattern used by the OpenVINO backend.

Key changes:
- Add batch_size AVOption (range 1-1000, default 1) to DnnContext
- Accumulate lltasks in the queue, trigger inference when batch_size
  lltasks are ready (matching the OpenVINO batch execution pattern)
- Pre-allocate a single contiguous memory buffer for the entire batch
  in fill_model_input_th() to avoid unnecessary tensor copies
- Split batched output in infer_completion_callback() and dispatch
  each slice to its corresponding task

Tested with:
ffmpeg -f lavfi -i testsrc=duration=5:size=640x480:rate=25 -vf format=rgb24,dnn_processing=dnn_backend=torch:model=dummy_model.pt:batch_size=4 -f null -

Signed-off-by: Raja Rathour <imraja729@gmail.com>
2026-07-18 02:56:18 +00:00
..
2024-08-19 21:48:04 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2024-08-19 21:48:04 +02:00
2026-07-13 18:16:18 +00:00
2024-08-19 21:48:04 +02:00
2024-08-19 21:48:04 +02:00
2025-12-14 12:41:00 +05:30
2025-08-03 13:48:47 +02:00
2024-08-19 21:48:04 +02:00
2026-07-13 18:16:18 +00:00
2024-08-19 21:48:04 +02:00
2025-08-03 13:48:47 +02:00
2024-08-19 21:48:04 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2024-08-19 21:48:04 +02:00
2025-06-15 21:00:38 +05:30
2025-10-16 18:41:19 +02:00
2025-07-04 01:32:27 +02:00
2025-07-04 01:32:27 +02:00
2026-05-15 20:29:29 +02:00
2026-05-15 20:29:29 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-04-22 20:45:57 +02:00