[FFmpeg-devel] [PATCH] Don't check for chroma planes in mono formats.

Michael Niedermayer michaelni
Thu Aug 13 23:20:42 CEST 2009


On Thu, Aug 13, 2009 at 03:40:25PM -0300, Ramiro Polla wrote:
> On Thu, Aug 13, 2009 at 1:11 PM, Michael Niedermayer<michaelni at gmx.at> wrote:
> > On Thu, Aug 13, 2009 at 08:46:01AM -0300, Ramiro Polla wrote:
> >> On Wed, Aug 12, 2009 at 10:06 PM, Michael Niedermayer<michaelni at gmx.at> wrote:
> >> > On Wed, Aug 12, 2009 at 09:39:47PM -0300, Ramiro Polla wrote:
> >> >> $subj
> >> >
> >> >> ?swscale-example.c | ? ?7 ++++++-
> >> >> ?1 file changed, 6 insertions(+), 1 deletion(-)
> >> >> 2a03cd63f4129534b1cf545492b150072e501b4f ?0004-Don-t-check-for-chroma-planes-in-mono-formats.patch
> >> >> From 175aca0260da5797e765c757d788054cdbbf41e7 Mon Sep 17 00:00:00 2001
> >> >> From: Ramiro Polla <ramiro.polla at gmail.com>
> >> >> Date: Wed, 12 Aug 2009 20:24:29 -0300
> >> >> Subject: [PATCH] Don't check for chroma planes in mono formats.
> >> >>
> >> >> ---
> >> >> ?swscale-example.c | ? ?7 ++++++-
> >> >> ?1 files changed, 6 insertions(+), 1 deletions(-)
> >> >>
> >> >> diff --git a/swscale-example.c b/swscale-example.c
> >> >> index 89fdf5f..b4bd75a 100644
> >> >> --- a/swscale-example.c
> >> >> +++ b/swscale-example.c
> >> >> @@ -37,6 +37,11 @@ const char *sws_format_name(enum PixelFormat format);
> >> >> ? ? ? ? ?|| (x)==PIX_FMT_GRAY16BE ? ?\
> >> >> ? ? ? ? ?|| (x)==PIX_FMT_GRAY16LE ? ?\
> >> >> ? ? ?)
> >> >> +#define noChroma(x) ? ? ( ? ? ? ? ? \
> >> >> + ? ? ? ? ? ?isGray(x) ? ? ? ? ? ? ? \
> >> >> + ? ? ? ?|| (x)==PIX_FMT_MONOBLACK ? \
> >> >> + ? ? ? ?|| (x)==PIX_FMT_MONOWHITE ? \
> >> >> + ? ?)
> >> >> ?#define isALPHA(x) ? ? ?( ? ? ? ? ? \
> >> >> ? ? ? ? ? ? (x)==PIX_FMT_BGR32 ? ? ? \
> >> >> ? ? ? ? ?|| (x)==PIX_FMT_BGR32_1 ? ? \
> >> >
> >> > iam always in favor of non negated forms, its less confusing than
> >> >
> >> > !noChroma()
> >>
> >> Updated patch attached.
> >
> >> ?swscale-example.c | ? ?7 ++++++-
> >> ?1 file changed, 6 insertions(+), 1 deletion(-)
> >> 64bdf7fc1779f47aa6ca9fddfab1f8253a7b4669 ?hasChroma.diff
> 
> Is this md5sum hasChroma.diff? I get 9f05c85d6364312306adbdbf2ea5cb67

sha1sum

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090813/b18c55ba/attachment.pgp>



More information about the ffmpeg-devel mailing list