[FFmpeg-devel] [PATCH] Parsing ALS object type in MPEG-4

Michael Niedermayer michaelni
Fri Aug 21 11:48:07 CEST 2009


On Thu, Aug 20, 2009 at 12:13:52PM -0400, Alexander Strange wrote:
>
> On Aug 20, 2009, at 3:48 AM, Ronald S. Bultje wrote:
>
>> Hi Reimar,
>>
>> On Thu, Aug 20, 2009 at 2:22 AM, Reimar
>> D?ffinger<Reimar.Doeffinger at gmx.de> wrote:
>>> On Wed, Aug 19, 2009 at 08:18:19PM -0400, Ronald S. Bultje wrote:
>>>> On Wed, Aug 19, 2009 at 8:10 PM, Thilo
>>>> Borgmann<thilo.borgmann at googlemail.com> wrote:
>>>>>>> +    if (get_bits_long(gb, 32) != 0x414C5300)
>>>>>> MKBETAG('A','L','S','\0')
>>>>> Done.
>>>> [..]
>>>>> +        if (show_bits_long(&gb, 24) != 0x414C53) {
>>>>
>>>> same here (MKBETAG(0, 'A', 'L', 'S'))?
>>>
>>> How about AV_RB24("ALS") and AV_RL24("ALS") ?
>>
>> (Completely irrelevant performance-wise, but ...) do they actually
>> expand to the same asm (with a reasonably modern gcc -O3-style
>> compiler)? Or is the string part of the generated asm for the second
>> case / is the first therefore in fact more efficient?
>>
>> (I've always preferred the MK*TAG() over string-parsing with the
>> assumption that it'd be more efficient...)
>>
>> Ronald
>
> They're just as efficient for plain-C code, but MKTAG is better if bswap.h 
> is using asm, since that can't be simplified. That seems to be about 90% of 
> the effect of that __builtin_bswap patch.
>
> How about changing MKTAG('a','b','c','d') to MKTAG("abcd") and introducing 
> MK(BE)TAG3 for 24-bit instead of using AV_RB/L for constants?

if AV_RB/L*() is inefficient it should be fixed by using 
__builtin_constant_p()

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090821/2d13ecd7/attachment.pgp>



More information about the ffmpeg-devel mailing list