"Ronald S. Bultje" <[email protected]> writes:

> Hi,
>
> On Thu, Jun 9, 2011 at 4:13 PM, Diego Biurrun <[email protected]> wrote:
>> On Thu, Jun 09, 2011 at 03:25:41PM -0400, Ronald S. Bultje wrote:
>>> This is part of the Great Evil Plan to simplify swscale.
>>>
>>> --- a/libswscale/swscale.c
>>> +++ b/libswscale/swscale.c
>>> @@ -528,6 +528,104 @@ static void name ## ext ## _1_c(SwsContext *c, const 
>>> uint16_t *buf0, \
>>>
>>> +static av_always_inline void
>>> +yuv2mono_X_c_template(SwsContext *c, const int16_t *lumFilter,
>>> +                      const int16_t **lumSrc, int lumFilterSize,
>>> +                      const int16_t *chrFilter, const int16_t **chrUSrc,
>>> +                      const int16_t **chrVSrc, int chrFilterSize,
>>> +                      const int16_t **alpSrc, uint8_t *dest, int dstW,
>>> +                      int y, enum PixelFormat target)
>>> +
>>> +static av_always_inline void
>>> +yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0,
>>> +                      const uint16_t *buf1, const uint16_t *ubuf0,
>>> +                      const uint16_t *ubuf1, const uint16_t *vbuf0,
>>> +                      const uint16_t *vbuf1, const uint16_t *abuf0,
>>> +                      const uint16_t *abuf1, uint8_t *dest, int dstW,
>>> +                      int yalpha, int uvalpha, int y,
>>> +                      enum PixelFormat target)
>>> +
>>> +static av_always_inline void
>>> +yuv2mono_1_c_template(SwsContext *c, const uint16_t *buf0,
>>> +                      const uint16_t *ubuf0, const uint16_t *ubuf1,
>>> +                      const uint16_t *vbuf0, const uint16_t *vbuf1,
>>> +                      const uint16_t *abuf0, uint8_t *dest, int dstW,
>>> +                      int uvalpha, enum PixelFormat dstFormat,
>>> +                      int flags, int y, enum PixelFormat target)
>>
>> nit: Please use K&R style for newly added code, i.e. place the function
>> declarations on one line.
>
> There's a problem that I have. Normally I would have, but here you can
> probably guess that that means they don't fit in 80 lines anymore, so
> I can either do :
>
> static av_always_inline void insanely_long_function_name(
>     arguments)
> {
> }
>
> or do what I did here... I don't have a strong preference between
> these two, but anyway, this was the logic.

I prefer the variant in the patch.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to