Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: cenzhanquan2@gmail.com
To: ffmpeg-devel@ffmpeg.org
Cc: zhanquan cen <cenzhanquan2@gmail.com>, your_email@domain.com
Subject: [FFmpeg-devel] [PATCH v2 0/3] lavfi: Add volume scaling, dynamic routing, and abufsrc filter
Date: Mon, 21 Jul 2025 20:04:41 +0800
Message-ID: <20250721120444.2125750-1-cenzhanquan2@gmail.com> (raw)
In-Reply-To: <20250721112752.2105845-1-cenzhanquan2@gmail.com>

This series introduces three interdependent modules for real-time audio processing:
1. `volume` (PATCH 1/3): Provides sample-accurate gain control utilities with support for:
   - Linear and logarithmic volume scaling
   - Multi-format handling (s16/s32/flt/dbl, planar/non-planar) [7](@ref)
   - Runtime adjustment via player_volume/volume parameters
2. `mapping` (PATCH 2/3): Implements dynamic channel routing with:
   - Configurable output mapping via `map_str` option
   - Multi-output broadcasting with frame cloning to avoid data duplication
   - Runtime reconfiguration through command API
3. `abufsrc` (PATCH 3/3): Integrates volume/mapping as an audio source filter enabling:
   - Fade-in/out effects with sample-accurate timing
   - Asynchronous frame request via `on_event_cb` callback
   - Pause/resume with automatic fadeout on state transitions

Dependency Graph:
0001 (volume) → 0002 (mapping) → 0003 (abufsrc)

Technical Highlights:
- **Frame Efficiency**: Cloning instead of deep-copy for multi-output routing
- **Fade Algorithm**: Format-specific fade functions (e.g., `fade_samples_s16p` for planar 16-bit) [7](@ref)
- **Thread Safety**: Command API (`process_command`) for runtime parameter updates
- **ABI Stability**: No public struct field changes in VolumeContext/MappingContext

Testing:
- Volume: Validated scaling accuracy with 8/16/32-bit formats via FATE tests
- Mapping: Verified 8-channel routing permutations under buffer underrun
- abufsrc: Stress-tested fade transitions with 48kHz/5.1 audio streams

Signed-off-by: zhanquan cen <cenzhanquan2@gmail.com>

*** BLURB HERE ***

zhanquan cen (3):
  avfilter/volume: add volume scaling utilities.
  avfilter/mapping: implement dynamic routing logic.
  avfilter/abufsrc: integrate volume and mapping modules.

 asrc_abufsrc.c | 510 +++++++++++++++++++++++++++++++++++++++++++++++++
 mapping.c      |  51 +++++
 mapping.h      |  44 +++++
 volume.c       | 168 ++++++++++++++++
 volume.h       |  44 +++++
 5 files changed, 817 insertions(+)
 create mode 100644 asrc_abufsrc.c
 create mode 100644 mapping.c
 create mode 100644 mapping.h
 create mode 100644 volume.c
 create mode 100644 volume.h

-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2025-07-21 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 11:27 [FFmpeg-devel] [PATCH 1/1] avfilter/abufsrc: add audio buffer source filter with dynamic routing cenzhanquan2
2025-07-21 11:48 ` Nicolas George
2025-07-21 12:04 ` cenzhanquan2 [this message]
2025-07-21 12:04   ` [FFmpeg-devel] [PATCH v2 1/3] avfilter/volume: add volume scaling utilities cenzhanquan2
2025-07-21 13:48     ` Steven Liu
2025-07-21 12:04   ` [FFmpeg-devel] [PATCH v2 2/3] avfilter/mapping: implement dynamic routing logic cenzhanquan2
2025-07-21 12:04   ` [FFmpeg-devel] [PATCH v2 3/3] avfilter/abufsrc: integrate volume and mapping modules cenzhanquan2
2025-07-21 15:23   ` [FFmpeg-devel] [PATCH v2 0/3] lavfi: Add volume scaling, dynamic routing, and abufsrc filter Nicolas George

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250721120444.2125750-1-cenzhanquan2@gmail.com \
    --to=cenzhanquan2@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=your_email@domain.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git