[Ffmpeg-devel] [PATCH] ported SGI decoder to the new API

Michael Niedermayer michaelni
Tue Apr 3 15:06:29 CEST 2007


Hi

On Tue, Apr 03, 2007 at 02:56:34PM +0200, Baptiste Coudurier wrote:
> Hi
> 
> Michael Niedermayer wrote:
> > Hi
> > 
> > On Tue, Apr 03, 2007 at 08:09:35PM +0800, Xiaohui Sun wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Michael Niedermayer wrote:
> >>> Hi
> >>>
> >>> On Tue, Apr 03, 2007 at 12:46:36AM +0800, Xiaohui Sun wrote:
> >>>> I have updated the patch.
> >> [...]
> >>>> +            if (expand_rle_row(in_buf + start_offset, end_buf, dest_row,
> >>>> +                dest_row + s->linesize, z, s->depth) != s->width)
> >>>> +                return AVERROR_INVALIDDATA;
> >>> linesize can be negative
> >> I am sorry but I am not quite clear about the meaning of negative
> >> linesize and found not much code/comment on it.
> >> I wonder if the linesize is negative, then the
> >> p->data[0] is the end address of the image buffer and the start address
> >>  is p->data[0] + (avctx->height - 1) * p->linesize[0]?
> > 
> > yes
> 
> By curiosity, why is it used/useful ?

zero memcpy flip ...

raw rgb is stored upside down in avi, IIRC vp3 is stored upside down
also IIRC some binary codecs output the image upside down

so flip is sometimes needed ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20070403/f1f0be8c/attachment.pgp>



More information about the ffmpeg-devel mailing list