[FFmpeg-devel] [libav-devel] [PATCH] fifo: add av_fifo_peek2()

Stefano Sabatini stefano.sabatini-lala at poste.it
Sun Aug 14 10:10:34 CEST 2011


On date Monday 2011-07-18 01:57:45 +0200, Michael Niedermayer encoded:
> On Sat, Jul 16, 2011 at 10:25:58AM +0200, Stefano Sabatini wrote:
> > On date Saturday 2011-07-16 01:33:12 +0200, Stefano Sabatini encoded:
> > > On date Friday 2011-07-15 16:32:52 +0200, Michael Niedermayer encoded:
> > > > On Thu, Jul 14, 2011 at 12:18:49AM +0200, Stefano Sabatini wrote:
> > [...]
> > > > > > From 2ec24f2f0c79414edfd558f3c55b7d7969018912 Mon Sep 17 00:00:00 2001
> > > > > > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > > > > > Date: Wed, 29 Jun 2011 17:30:23 +0200
> > > > > > Subject: [PATCH] fifo: add av_fifo_peek2()
> > > > > > 
> > > > > > The new function provides a more generic interface than av_fifo_peek()
> > > > > > for peeking at a FIFO buffer data.
> > > > > > ---
> > > > > >  libavutil/fifo.h |   21 +++++++++++++++++++++
> > > > > >  1 files changed, 21 insertions(+), 0 deletions(-)
> > > > > 
> > > > > Ping.
> > > > 
> > > > I still think the % are a bad idea, they probably make the code 10
> > > > times slower ...
> > > > and in what use case would they be needed ?
> > > 
> > > Possibly none, I thought it could be useful to return a pointer to the
> > > buffer rather than NULL, without considering performance issues. I'll
> > > update the patch accordingly.
> > 
> > Patches updated.
> > 
> > I dropped the "circular buffer" idea due to the use of the module
> > operator, I'm still keeping support to negative offsets although the
> > same could be achieved with av_fifo_peek2(fifo, size - offs), but it
> > may slightly simplify the code use in some situations and with almost
> > no performance hits.
> 
> >  doc/APIchanges      |    3 +++
> >  libavformat/dvenc.c |    4 ++--
> >  libavutil/avutil.h  |    3 +++
> >  libavutil/fifo.h    |   30 +++++++++++++++++++++++++++---
> >  4 files changed, 35 insertions(+), 5 deletions(-)
> > 7b8a087c888ac40e4191bbf77a9d63fb5a524555  0001-fifo-add-av_fifo_peek2-and-deprecate-av_fifo_peek.patch
> > From 8c3618c4c65be777a2a3769e3c235b7510489cd0 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Wed, 29 Jun 2011 17:30:23 +0200
> > Subject: [PATCH] fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
> > 
> > The new function provides a more generic interface than av_fifo_peek()
> > for peeking at a FIFO buffer data.
> 
> LGTM

Applied.
-- 
FFmpeg = Freaking and Formidable Multipurpose Peaceless Emblematic Gargoyle


More information about the ffmpeg-devel mailing list