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

Baptiste Coudurier baptiste.coudurier
Tue Apr 3 15:19:01 CEST 2007


Michael Niedermayer wrote:
> 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 ...

I see, and why not declaring a specific pixel format, and "fliping"
image when converting, therefore isolating negative linesize in specific
case and IMHO hack.

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

I see, vp6 in avi also it seems, and do you know/guess why they store it
that way ? Any evidence ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list