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

Måns Rullgård mans
Sat May 12 21:26:09 CEST 2007


"Jason Askew" <jason.askew at gmail.com> writes:

>> Doesn't p->data[0] point to the beginning of the buffer even if linesize
>> is negative ? If so the only thing to add is the abs.
>
> No, it doesn't.  I cleared this up with Michael with detailed
> questioning.  When line size is negative, the pointer goes to the
> first column of the last row.  Linesize being negative then moves the
> pointer 'up' through the frame.

It's useful to think of it as data[0] pointing to the top-left pixel,
wherever it is in the buffer.  Adding linesize takes you one line down
in the image, and so on.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list