[FFmpeg-devel] Realmedia patch

Ronald S. Bultje rsbultje
Wed Aug 27 22:08:06 CEST 2008


Hi,

On Wed, Aug 27, 2008 at 9:24 AM, Olivier Galibert <galibert at pobox.com> wrote:
> On Wed, Aug 27, 2008 at 09:09:07AM -0400, Ronald S. Bultje wrote:
>> On Wed, Aug 27, 2008 at 9:04 AM, Reimar D?ffinger
>> <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
>> > On Wed, Aug 27, 2008 at 07:53:14AM -0400, Ronald S. Bultje wrote:
>> >> I tried the following:
>> >>
>> >>     int i;
>> >>     char *orig_buf = buf;
>> >>     const char hex_table[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
>> >>                                  '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
>> >
>> > Why not static?
>>
>> Ah, now it gets interesting. So, I first made it static const (or
>> const static), but since it's const, I figured it didn't make a
>> difference except for keeping it alive between multiple function-calls
>> which doesn't seem all that useful, so I removed it. Apparently I'm
>> not quite getting it, so: what's the difference between const static
>> and "just" const? Is one more efficient in memory-usage than the
>> other?
>
> Actually the code produced by gcc 4.1.1 on x86_64 and x86 is strictly
> identical whether there is static or not, and corresponds to what a
> naive compiler would do with static added.

Then I guess static is the way to go, new patch attached.

Other suggested improvements are not added since I don't see any
noticeable speed gain at -O2.

Ronald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sdp-change-data_to_hex.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080827/3530f46b/attachment.txt>



More information about the ffmpeg-devel mailing list