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 > > does every application need error checking due to this ? >
You're supposed to call av_pixelutils_get_sad_fn() to get sadfn, which has proper logging. You'd do the check here only, unless you want to define your own av_pixelutils_sad_fn, which makes little sense aside from testing. -- Clément B.
pgpG5dKPJ2MMT.pgp
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel