[FFmpeg-devel] [GSoC] Qualification Task

Michael Niedermayer michaelni at gmx.at
Tue Mar 22 15:40:27 CET 2011


On Tue, Mar 22, 2011 at 03:14:28PM +0100, Stefano Sabatini wrote:
> On date Tuesday 2011-03-22 13:42:33 +0200, Mina Nagy Zaki encoded:
> > On Tuesday 22 March 2011 13:01:24 Stefano Sabatini wrote:
> > > On date Tuesday 2011-03-22 21:28:10 +1100, Peter Ross encoded:
> > > > On Tue, Mar 22, 2011 at 09:54:02AM +0200, Mina Nagy Zaki wrote:
> > > > > Hi,
> > > > > I've ported a small filter from sox, the 'earwax' filter, essentially a
> > > > > stereo widening effect. It's a relatively simple filter, I was
> > > > > actually looking to write a general sox wrapper but turns out there
> > > > > would be a few things that would make this slightly difficult.
> > > > 
> > > > Can you elaborate on this, just curious.
> > > 
> > > I remeber the mail from Hemanth, he said that there was the need to
> > > use threading for it. I have the last patch from Hemanth, and the
> > > mails with the discussion, and I can ask Hemanth to comment on this.
> > 
> > IMHO threading could be avoided. I would like to see discussion/patches as 
> > well.
> 
> From a private mail I received on 2011-01-28:
> > Attached is the most recent patch I could find. There is a bottleneck
> > however with sox:
> >
> > The sox API that starts off the filtering of data - sox_flow_effects() -
> > keeps trying to pull data from the input effect defined in lavfi until
> > it sends EOF, otherwise doesn't return. So I changed the af_sox input
> > effect behavior in the patch below to always send EOF after giving every
> > buffer to the sox chain. This means the sox chain would be reinitialized
> > when calling sox_flow_effects for each audio buffer. This causes sox to
> > crash after playing out a few buffers.
> >
> > Instead, it might be better to call sox_flow_effects once in a new
> > thread and let it fetch and output its buffers from/to the FIFOs at the
> > input and output.
> >
> > Hope that helps.
> >
> > Regards,
> > Hemanth
> 
> Attached patch, compile but completely untested. You need to configure
> FFmpeg with --enable-libsox.
> -- 
> FFmpeg = Friendly & Fierce Monstrous Portable Educated Generator

>  configure                |    4 
>  libavfilter/Makefile     |    1 
>  libavfilter/af_sox.c     |  352 +++++++++++++++++++++++++++++++++++++++++++++++
>  libavfilter/allfilters.c |    1 
>  4 files changed, 358 insertions(+)
> f4251001dadbc93e472d1adcc573cc935e673d4b  0013-lavfi-add-sox-wrapper.patch
> From 09d63f71bee9a04741582955c7d0d344bbd84976 Mon Sep 17 00:00:00 2001
> From: S.N. Hemanth Meenakshisundaram <smeenaks at ucsd.edu>
> Date: Tue, 22 Mar 2011 15:10:15 +0100
> Subject: [PATCH] lavfi: add sox wrapper

is there a reason not to push this into main?

if its disabled by default it cant break anything

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110322/6816f1fb/attachment.asc>


More information about the ffmpeg-devel mailing list