[FFmpeg-devel] [PATCH] Transpose filter

Stefano Sabatini stefano.sabatini-lala
Sun Oct 17 13:22:26 CEST 2010


On date Sunday 2010-10-17 11:07:45 +0200, Michael Niedermayer encoded:
> On Thu, Oct 14, 2010 at 01:29:22PM +0200, Stefano Sabatini wrote:
[...]
> > +        for (y = 0; y < outh; y++) {
> > +            for (x = 0; x < outw; x++) {
> > +                int32_t v;
> > +
> > +                switch (pixstep) {
> > +                case 1:
> > +                    *(out + x) = *(in + x*inlinesize + y);
> > +                    break;
> > +                case 2:
> > +                    *((uint16_t *)(out + 2*x)) = *((uint16_t *)(in + x*inlinesize + y*2));
> > +                    break;
> > +                case 3:
> > +                    v = AV_RB24(in + x*inlinesize + y*3);
> > +                    AV_WB24(out + 3*x, v);
> > +                    break;
> > +                case 4:
> > +                    *((uint32_t *)(out + 4*x)) = *((uint32_t *)(in + x*inlinesize + y*4));
> > +                    break;
> > +                }
> 
> please put the for loop inside the switch

Updated.
-- 
FFmpeg = Foolish Fundamentalist Multipurpose Programmable Empowered Gymnast



More information about the ffmpeg-devel mailing list