[Ffmpeg-devel] [PATCH] ported SGI decoder to the new API
Michael Niedermayer
michaelni
Thu Apr 5 16:31:59 CEST 2007
Hi
On Thu, Apr 05, 2007 at 07:23:44PM +0800, Xiaohui Sun wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Michael Niedermayer wrote:
> > Hi
> >
> > On Thu, Apr 05, 2007 at 09:42:59AM +0800, Xiaohui Sun wrote:
> > [...]
> >
> >> + uint8_t *ptr = in_buf;
> >> + unsigned int offset = s->height * s->width;
> >> +
> >> + /* test buffer size */
> >> + if (offset * s->depth > end_buf - in_buf) {
> >> + return -1;
> >> + }
> >> +
> >> + for (y = s->height - 1; y >= 0; y--) {
> >
> >> + dest_row = out_ptr + (y * FFABS(s->linesize));
> >
> > this looks wrong
>
> the output image can also be flipped, that is the dest_row can be less
> than the out_ptr, which points to p->data[0]?
the nth line is p->data[0] + n*linesize no matter if linesize is positive
or negative
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- 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/20070405/5fe8ee99/attachment.pgp>
More information about the ffmpeg-devel
mailing list