[FFmpeg-devel] [PATCH v1] swscale/swscale: various cosmetics for the code style

Moritz Barsnick barsnick at gmx.net
Sun Sep 8 14:53:12 EEST 2019


On Sat, Sep 07, 2019 at 16:20:35 -0400, Andriy Gelman wrote:
> >      if (isPacked(c->srcFormat)) {
> > -        src[0] =
> > -        src[1] =
> > -        src[2] =
> > -        src[3] = src[0];
> > -        srcStride[0] =
> > -        srcStride[1] =
> > -        srcStride[2] =
> > -        srcStride[3] = srcStride[0];
>
> > +        for ( int i = 0; i < 4; i++ ) {
>
> extra spaces and I guess you can start i from 1

I actually wonder what the original point was of assigning src[0] to
src[0].

> > -    if (   (uintptr_t)dst[0]&15 || (uintptr_t)dst[1]&15 || (uintptr_t)dst[2]&15
> > +    if ((uintptr_t)dst[0]&15 || (uintptr_t)dst[1]&15 || (uintptr_t)dst[2]&15
> >          || (uintptr_t)src[0]&15 || (uintptr_t)src[1]&15 || (uintptr_t)src[2]&15

BTW, the original indentation was meant for alignment.

> > +        for(int i = 0; i < 4; i++)

"for (" is the correct style.

Moritz


More information about the ffmpeg-devel mailing list