[Ffmpeg-devel] Re: pixel format names in swscale

Michel Bardiaux mbardiaux
Mon Mar 27 11:33:03 CEST 2006


Michael Niedermayer wrote:
> Hi
> 
> On Mon, Mar 27, 2006 at 10:42:04AM +0200, Michel Bardiaux wrote:
> 
>>Michael Niedermayer wrote:
>>
>>>Hi
>>>
>>>On Fri, Mar 24, 2006 at 12:28:29PM +0100, Michel Bardiaux wrote:
>>>
>>
>>[snip]
>>
>>
>>>>Just a suggestion on the side: would this not be a good time to change
>>>>the definition of RGBA32 from endian-dependent to strict byte order,
>>>
>>>
>>>no
>>
>>Why?
> 
> 
> optimized code accesses RGBA32 with 32bit or larger types so having pix_fmts
> which are based on native types is the logic choice
> 
> [...]

The problem is that code optimized *inside* lavc may no longer be 
optimal in the overall application. I have g-profiles showing that 
converting from the endian-dependent RGBA32 to the byte order needed for 
the X server uses a significant amount of CPU time, so that overall the 
optimal code is to convert directly to what one needs, and this is 
currently impossible.

Do you confirm that the use of an endian-dependent definition of RGBA32 
is *only* a matter of optimizing the colorspace conversion code, or does 
that have implications elesewhere? If you confirm, then a patch that 
would introduce the 4 endian-independent 32-bits R,G,B,A variants 
*without compromising speed* should be acceptable?

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/





More information about the ffmpeg-devel mailing list