[FFmpeg-devel] flashsvenc.c path - fix ability to handle negative linesize

Michael Niedermayer michaelni
Sat May 12 20:22:42 CEST 2007


Hi

On Sat, May 12, 2007 at 10:03:12AM -0500, Jason Askew wrote:
> Can this be applied now?

dont top post


[...]
> > @@ -27,6 +27,7 @@
> >   * Flash Screen Video encoder
> >   * @author Alex Beregszaszi
> >   * @author Benjamin Larsson
> > + * @author Jason Askew - jason dot askew at gmail dot com
> >   */

i dont think a simple bugfix is enough to add yourself to the authors
but iam not maintainer of flashvenc so my oppinion doesnt really matter here


> >
> >  /* Bitstream description
> > @@ -49,6 +50,15 @@
> >   * block sizes should give a better result than to just use a fixed size.
> >   */
> >
> > +/*
> > + * Jason Askew (2007/5/10):
> > + * Added support for instances where linesize[0] is negative
> > + *
> > + * Basicaly changed the previous frame buffer pointer to behave the
> > same as the current frame pointer,
> > + * i.e., move from the last row to first row when linesize is negative

this patch is mangled and cannot be applied, just try it it wont work

also we have svn and soon git to keep track of who changed what so theres
no need nor sense in addng this as comment into the file


[...]
> > @@ -297,10 +307,22 @@ static int flashsv_encode_frame(AVCodecC
> >          return -1;
> >      }
> >
> > -    res = encode_bitstream(s, p, buf, buf_size, opt_w*16, opt_h*16,
> > s->previous_frame, &I_frame);
> > +       uint8_t *pfptr;
> > +       pfptr = s->previous_frame;
> > +       //if linesize is negative, prep pointer to match upside down ptr
> > movement of data[0]
> > +       if(p->linesize[0] < 0) {
> > +               pfptr = pfptr - ((s->image_height-1) * p->linesize[0]);
> > +       }
> > +
> > +    res = encode_bitstream(s, p, buf, buf_size, opt_w*16, opt_h*16,
> > pfptr, &I_frame);

the indention is wrong also this will not compile on gcc 2.95


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070512/9b6fbbf0/attachment.pgp>



More information about the ffmpeg-devel mailing list