[FFmpeg-devel] [PATCH 1/5] avutil/pixelutils: add av_pixelutils_bdiff()

Clément Bœsch u at pkh.me
Fri Aug 15 12:44:48 CEST 2014


On Fri, Aug 15, 2014 at 10:30:38AM +0200, Hendrik Leppkes wrote:
> On Fri, Aug 15, 2014 at 7:56 AM, Clément Bœsch <u at pkh.me> wrote:
> > On Fri, Aug 15, 2014 at 01:23:59AM +0200, Michael Niedermayer wrote:
> >> On Thu, Aug 14, 2014 at 11:05:11PM +0200, Clément Bœsch wrote:
> >> > ---
> >> >  doc/APIchanges         |  3 +++
> >> >  libavutil/pixelutils.c | 21 +++++++++++++++++++++
> >> >  libavutil/pixelutils.h | 23 +++++++++++++++++++++++
> >> >  libavutil/version.h    |  2 +-
> >> >  4 files changed, 48 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/doc/APIchanges b/doc/APIchanges
> >> > index 067f60f..72cfe96 100644
> >> > --- a/doc/APIchanges
> >> > +++ b/doc/APIchanges
> >> > @@ -15,6 +15,9 @@ libavutil:     2014-08-09
> >> >
> >> >  API changes, most recent first:
> >> >
> >> > +2014-08-xx - xxxxxxx - lavu 54.04.100 - pixelutils.h
> >> > +  Add av_pixelutils_bdiff().
> >> > +
> >> >  2014-08-xx - xxxxxxx - lavu 54.03.0 - mem.h
> >> >    Add av_strndup().
> >> >
> >> > diff --git a/libavutil/pixelutils.c b/libavutil/pixelutils.c
> >> > index 10ff7e8..473d394 100644
> >> > --- a/libavutil/pixelutils.c
> >> > +++ b/libavutil/pixelutils.c
> >> > @@ -85,6 +85,27 @@ av_pixelutils_sad_fn av_pixelutils_get_sad_fn(int w_bits, int h_bits, int aligne
> >> >  #endif
> >> >  }
> >> >
> >> > +int64_t av_pixelutils_bdiff(const uint8_t *s1, ptrdiff_t stride1,
> >> > +                            const uint8_t *s2, ptrdiff_t stride2,
> >> > +                            av_pixelutils_sad_fn sadfn,
> >> > +                            int w, int h, int bsize)
> >> > +{
> >> > +#if !CONFIG_PIXELUTILS
> >> > +    return -1;
> >> > +#else
> 
> IMHO external API functions shouldn't really be disableable,
> especially in avutil.
> 
> Just my 2c.
> 

It was a request from Ronald to keep the size small initially.

Anyway, I'll drop this specific patch; the 2 loops can be inlined without
much effort anyway. I'll resend a patchset without it.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140815/b150829b/attachment.asc>


More information about the ffmpeg-devel mailing list