From 1d4d0ee4b02bfd741ef4d6bba5035018d8574f72 Mon Sep 17 00:00:00 2001 From: James Almer Date: Thu, 12 Jan 2017 19:37:16 -0300 Subject: [PATCH] avutil/reverse: move the ff_reverse declaration to a separate header Fixes compilation with hardcoded tables after eaff1aa09e90e2711207c9463db8bf8e8dec8178 and e71b8119e7db675dd2dac3f7fb069b0df2943c38 Reviewed-by: Timo Rothenpieler Signed-off-by: James Almer --- libavcodec/mathops.h | 2 +- libavutil/eval.c | 1 + libavutil/internal.h | 2 -- libavutil/reverse.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 libavutil/reverse.h diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h index 2d56d007aa..2cc8963a98 100644 --- a/libavcodec/mathops.h +++ b/libavcodec/mathops.h @@ -25,7 +25,7 @@ #include #include "libavutil/common.h" -#include "libavutil/internal.h" +#include "libavutil/reverse.h" #include "config.h" #define MAX_NEG_CROP 1024 diff --git a/libavutil/eval.c b/libavutil/eval.c index d291c5d6d5..2d49154c37 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -38,6 +38,7 @@ #include "time.h" #include "avstring.h" #include "timer.h" +#include "reverse.h" typedef struct Parser { const AVClass *class; diff --git a/libavutil/internal.h b/libavutil/internal.h index e995af97e4..a19975d474 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -340,6 +340,4 @@ void ff_check_pixfmt_descriptors(void); */ int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp); -extern const uint8_t ff_reverse[256]; - #endif /* AVUTIL_INTERNAL_H */ diff --git a/libavutil/reverse.h b/libavutil/reverse.h new file mode 100644 index 0000000000..4eb6123932 --- /dev/null +++ b/libavutil/reverse.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_REVERSE_H +#define AVUTIL_REVERSE_H + +#include + +extern const uint8_t ff_reverse[256]; + +#endif /* AVUTIL_REVERSE_H */