On Tue, Apr 17, 2012 at 12:16:45PM +0100, Måns Rullgård wrote: > Diego Biurrun <di...@biurrun.de> writes: > > --- a/libavcodec/dv_tablegen.c > > +++ b/libavcodec/dv_tablegen.c > > @@ -20,14 +20,16 @@ > > > > +#include <inttypes.h> > > Please keep random cleanup out of patches doing other things. Every > extra change makes the patch harder to review.
Removed locally. > > #include <stdlib.h> > > + > > +#define LIBAV_CONFIG_H 0 > > That looks very, very wrong. Whatever you're trying to do, there's a > proper way to do it. I have to make sure that config.h is not #included so that target settings do not pollute objects/programs built for the host. Alternatively, I can add -DLIBAV_CONFIG_H=0 to HOSTCFLAGS for the tablegen programs. We already add -DCONFIG_SMALL=0/1 so that would be cleaner than adding a lonely #define to a single file. I do, however, think that we need to make sure config.h is not #included in any table generator. Right now we do no better than light a few candles and pray. Relying on hope is too brittle, I'll send a patch for HOSTCFLAGS. > > @@ -39,7 +41,7 @@ int main(void) > > > > write_fileheader(); > > > > - printf("static const struct dv_vlc_pair > > dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE] = {\n"); > > + printf("struct dv_vlc_pair > > dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE] = {\n"); > > What happened to const? Making these tables const is the entire point > of the hardcoded tables feature. > > > --- a/libavcodec/dv_tablegen.h > > +++ b/libavcodec/dv_tablegen.h > > @@ -23,29 +23,15 @@ > > #if CONFIG_HARDCODED_TABLES > > #define dv_vlc_map_tableinit() > > #include "libavcodec/dv_tables.h" > > #else > > -static struct dv_vlc_pair > > dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]; > > +#include "dvdata.h" > > + > > +struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]; > > I guess this is why you dropped the const above, but it's wrong. You > have to do it differently. > > This symbol is now lacking a proper prefix. Fixed locally. Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel