Diego Biurrun <di...@biurrun.de> writes: > diff --git a/libavcodec/dv_tablegen.c b/libavcodec/dv_tablegen.c > index f463550..90db968 100644 > --- a/libavcodec/dv_tablegen.c > +++ b/libavcodec/dv_tablegen.c > @@ -20,14 +20,16 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > */ > > +#include <inttypes.h>
Please keep random cleanup out of patches doing other things. Every extra change makes the patch harder to review. > #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. > #define CONFIG_HARDCODED_TABLES 0 > #ifndef CONFIG_SMALL > #error CONFIG_SMALL must be defined to generate tables > #endif > #include "dv_tablegen.h" > #include "tableprint.h" > -#include <inttypes.h> > > WRITE_1D_FUNC_ARGV(dv_vlc_pair, 7, > "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > @@ -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. > write_dv_vlc_pair_2d_array(dv_vlc_map, DV_VLC_MAP_RUN_SIZE, > DV_VLC_MAP_LEV_SIZE); > printf("};\n"); > > diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h > index 05831ea..42cf6f6 100644 > --- a/libavcodec/dv_tablegen.h > +++ b/libavcodec/dv_tablegen.h > @@ -23,29 +23,15 @@ > #ifndef AVCODEC_DV_TABLEGEN_H > #define AVCODEC_DV_TABLEGEN_H > > -#include <stdint.h> > - > #include "dv_vlc_data.h" > > -#if CONFIG_SMALL > -#define DV_VLC_MAP_RUN_SIZE 15 > -#define DV_VLC_MAP_LEV_SIZE 23 > -#else > -#define DV_VLC_MAP_RUN_SIZE 64 > -#define DV_VLC_MAP_LEV_SIZE 512 //FIXME sign was removed so this should be > /2 but needs check > -#endif > - > -/* VLC encoding lookup table */ > -typedef struct dv_vlc_pair { > - uint32_t vlc; > - uint32_t size; > -} dv_vlc_pair; > - > #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. -- Måns Rullgård m...@mansr.com _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel