[FFmpeg-devel] [PATCH] swscale alpha channel support

Cédric Schieli cschieli
Tue Mar 24 20:20:49 CET 2009


2009/3/24 Michael Niedermayer <michaelni at gmx.at>:
> On Tue, Mar 24, 2009 at 10:24:40AM +0100, C?dric Schieli wrote:
>> 2009/3/24 C?dric Schieli <cschieli at gmail.com>:
>> > 2009/3/24 Michael Niedermayer <michaelni at gmx.at>:
>> >> On Mon, Mar 23, 2009 at 03:53:28PM +0100, C?dric Schieli wrote:
>> >>> Hi all,
>>
>> [...]
>>
>> >>> #4 : palette8topacked32.patch
>> >>> use default value of 255 for the alpha channel in unscaled paletted to
>> >>> rgb32 converters
>> >>
>> >> a very quick looks gives me the feeling this is wrong?
>> >> isnt the alpha supposed to be in the palette already?
>> >
>> > true for PAL8, but not for BGR8/RGB8/BGR4_BYTE/RGB4_BYTE
>> > so a separate code path seems needed for PAL8 (what is the index for
>> > the alpha color in PAL8 ?)
>>
>> Ok, it's better to read the code before replying.
>> Attached is a new patch that use the alpha stored in the PAL8 palette,
>> and default to 255 for the BGR8/RGB8/BGR4_BYTE/RGB4_BYTE case.
>
> i still think this is wrong
> BGR8/RGB8/BGR4_BYTE/RGB4_BYTE should have a valid palette set and that
> should include the alpha byte

Well, that do not seem to be the case, at least not in ff_set_systematic_pal.
And as the palette is systematic, how can the alpha channel be guessed
at load time ?


Regards,
C?dric Schieli



More information about the ffmpeg-devel mailing list