[FFmpeg-devel] [PATCH 01/N] RV30/40 Decoder - Core
Rich Felker
dalias
Sat Dec 8 05:48:49 CET 2007
On Sat, Dec 08, 2007 at 05:32:07AM +0100, Michael Niedermayer wrote:
> > /** macroblock partition width in 8x8 blocks */
> > static const uint8_t part_sizes_w[RV34_MB_TYPES] = { 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2 };
> >
> > /** macroblock partition height in 8x8 blocks */
> > static const uint8_t part_sizes_h[RV34_MB_TYPES] = { 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2 };
>
> these 2 tables can be overlapped to safe 7 bytes
> no iam not serious, this is just a joke :)
> but someone should write a linker which "compresses" const tables by by
> attempting to overlap them
Actually it would be the compiler's job not the linker's, but I
believe this is illegal for a C implementation. All objects have
unique, non-overlapping addresses. I.e. a program must be able to
determine, given a pointer, which object that pointer points into.
Rich
P.S. Yes there's some special reason why this does not apply to
anonymous string constants.. :) Perhaps they're not considered to have
static storage.
More information about the ffmpeg-devel
mailing list