[FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

Paul B Mahol onemda at gmail.com
Sat Feb 13 11:39:44 CET 2016


On 2/13/16, Mats Peterson <matsp888-at-yahoo.com at ffmpeg.org> wrote:
> On 02/13/2016 11:28 AM, Mats Peterson wrote:
>>>> Once again, how are we supposed to know how many colors the palette
>>>> consists of at the end of avpkt->data?
>>>
>>> palette size = packet size - width*height
>>>
>>
>> Nope. You have to take the stride in account as well, not just the width
>> and height, and it varies in nut, depending on whether you use "-vcodec
>> copy" or "-vcodec rawvideo".
>>
>> Mats
>>
>
> And you'll have to calculate the stride by subtracting the palette size
> from the packet size, then divide by the height.

Nope, pixels outside of width x height are ignored.


More information about the ffmpeg-devel mailing list