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

Hendrik Leppkes h.leppkes at gmail.com
Fri Aug 15 10:30:38 CEST 2014


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.

- Hendrik


More information about the ffmpeg-devel mailing list