[FFmpeg-devel] Realmedia patch

Olivier Galibert galibert
Wed Aug 27 15:24:44 CEST 2008


On Wed, Aug 27, 2008 at 09:09:07AM -0400, Ronald S. Bultje wrote:
> Hi Benoit,
> 
> 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.

  OG.





More information about the ffmpeg-devel mailing list