[FFmpeg-devel] [PATCH] Factorize dither string logging in sws_getContext()
Stefano Sabatini
stefano.sabatini-lala
Sat Jan 16 20:11:27 CET 2010
On date Saturday 2010-01-16 19:43:44 +0100, Michael Niedermayer encoded:
> On Sat, Jan 16, 2010 at 05:16:36PM +0100, Stefano Sabatini wrote:
> > On date Saturday 2010-01-16 17:03:59 +0100, Reimar D?ffinger encoded:
> > > On Sat, Jan 16, 2010 at 04:45:50PM +0100, Stefano Sabatini wrote:
> > > > Hi, another very minor minor factorization.
> > > > --
> > > > FFmpeg = Freak and Faithful Magic Portable Elaborated Gadget
> > >
> > > > Index: ffmpeg/libswscale/swscale.c
> > > > ===================================================================
> > > > --- ffmpeg.orig/libswscale/swscale.c 2010-01-16 16:39:19.000000000 +0100
> > > > +++ ffmpeg/libswscale/swscale.c 2010-01-16 16:43:08.000000000 +0100
> > > > @@ -2827,11 +2827,6 @@
> > > > assert(c->chrDstH <= dstH);
> > > >
> > > > if (flags&SWS_PRINT_INFO) {
> > > > -#ifdef DITHER1XBPP
> > > > - const char *dither= " dithered";
> > > > -#else
> > > > - const char *dither= "";
> > > > -#endif
> > > > for (i = 0; i < FF_ARRAY_ELEMS(scaler_algos); i++)
> > > > if (flags & scaler_algos[i].flag) {
> > > > av_log(c, AV_LOG_INFO, "%s scaler, ", scaler_algos[i].description);
> > > > @@ -2842,7 +2837,13 @@
> > > >
> > > > av_log(c, AV_LOG_INFO, "from %s to%s %s ",
> > > > sws_format_name(srcFormat),
> > > > - dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 ? dither : "",
> > > > + dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 ?
> > > > +#ifdef DITHER1XBPP
> > > > + " dithered"
> > > > +#else
> > > > + ""
> > > > +#endif
> > > > + : "",
> > >
> > > What? A bit much obfuscated.
> > >
> > > #ifdef DITHER1XBPP
> > > dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 ? " dithered" : "",
> > > #else
> > > "",
> > > #endif
> >
> > Yes that's better.
> >
> > > Or make DITHER1XBPP 0/1 and do
> > > DITHER1XBPP && (dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565) ? " dithered" : "",
> >
> > Regards.
> > --
> > FFmpeg = Forgiving & Friendly Muttering Patchable Encoding/decoding Gorilla
>
> > swscale.c | 11 +++++------
> > 1 file changed, 5 insertions(+), 6 deletions(-)
> > 6d232b559a36505bf2159ca6e35c2c7737ce63b5 lsws-factorize-dither-str.patch
>
> ok
Applied.
--
FFmpeg = Frenzy Fantastic Most Portentous Ermetic God
More information about the ffmpeg-devel
mailing list