Message ID | 20210128162646.2811269-6-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | e742bf3421f1a3077334ec0761ac2116c70e7a07 |
Headers | show |
Series | [FFmpeg-devel,1/6] avcodec/aac_defines: Make macro more general | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
Jan 28, 2021, 17:26 by andreas.rheinhardt@gmail.com: > It is only valid for the target, not the host and therefore it must not > be included when building the tables when hardcoded tables are enabled. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavcodec/aacps_fixed_tablegen.h | 6 +++++- > libavcodec/aacps_tablegen_template.c | 1 + > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/aacps_fixed_tablegen.h b/libavcodec/aacps_fixed_tablegen.h > index 356fb8b293..8fb1da5076 100644 > --- a/libavcodec/aacps_fixed_tablegen.h > +++ b/libavcodec/aacps_fixed_tablegen.h > @@ -36,8 +36,12 @@ > #else > #include "libavutil/common.h" > #include "libavutil/mathematics.h" > -#include "libavutil/mem.h" > +#ifdef BUILD_TABLES > +#undef DECLARE_ALIGNED > +#define DECLARE_ALIGNED(align, type, variable) type variable > +#else > #include "libavutil/mem_internal.h" > +#endif > > #include "aac_defines.h" > #include "libavutil/softfloat.h" > diff --git a/libavcodec/aacps_tablegen_template.c b/libavcodec/aacps_tablegen_template.c > index 341bd44409..e70edf884b 100644 > --- a/libavcodec/aacps_tablegen_template.c > +++ b/libavcodec/aacps_tablegen_template.c > @@ -21,6 +21,7 @@ > */ > > #include <stdlib.h> > +#define BUILD_TABLES > #define CONFIG_HARDCODED_TABLES 0 > #include "aac_defines.h" > LGTM (and to all AAC patches from the set that I might have forgotten)
diff --git a/libavcodec/aacps_fixed_tablegen.h b/libavcodec/aacps_fixed_tablegen.h index 356fb8b293..8fb1da5076 100644 --- a/libavcodec/aacps_fixed_tablegen.h +++ b/libavcodec/aacps_fixed_tablegen.h @@ -36,8 +36,12 @@ #else #include "libavutil/common.h" #include "libavutil/mathematics.h" -#include "libavutil/mem.h" +#ifdef BUILD_TABLES +#undef DECLARE_ALIGNED +#define DECLARE_ALIGNED(align, type, variable) type variable +#else #include "libavutil/mem_internal.h" +#endif #include "aac_defines.h" #include "libavutil/softfloat.h" diff --git a/libavcodec/aacps_tablegen_template.c b/libavcodec/aacps_tablegen_template.c index 341bd44409..e70edf884b 100644 --- a/libavcodec/aacps_tablegen_template.c +++ b/libavcodec/aacps_tablegen_template.c @@ -21,6 +21,7 @@ */ #include <stdlib.h> +#define BUILD_TABLES #define CONFIG_HARDCODED_TABLES 0 #include "aac_defines.h"
It is only valid for the target, not the host and therefore it must not be included when building the tables when hardcoded tables are enabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/aacps_fixed_tablegen.h | 6 +++++- libavcodec/aacps_tablegen_template.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)