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

Ramiro Polla ramiro.polla
Thu Aug 13 13:46:01 CEST 2009


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hasChroma.diff
Type: text/x-diff
Size: 1040 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090813/a083a72e/attachment.diff>



More information about the ffmpeg-devel mailing list