---
libswscale/colorspace-test.c | 2 +-
libswscale/input.c | 11 +++--------
libswscale/options.c | 6 +++---
libswscale/output.c | 13 ++++---------
libswscale/rgb2rgb.c | 6 ++----
libswscale/rgb2rgb.h | 3 ++-
libswscale/swscale-test.c | 5 ++++-
libswscale/swscale.c | 12 ++++--------
libswscale/swscale.h | 3 ++-
libswscale/swscale_internal.h | 8 ++++----
libswscale/swscale_unscaled.c | 6 ++----
libswscale/utils.c | 34 +++++++++++++++++-----------------
libswscale/version.h | 6 ++++--
libswscale/x86/rgb2rgb.c | 1 -
libswscale/x86/swscale.c | 3 ---
libswscale/x86/yuv2rgb.c | 5 -----
libswscale/yuv2rgb.c | 7 ++-----
17 files changed, 54 insertions(+), 77 deletions(-)
diff --git a/libswscale/colorspace-test.c b/libswscale/colorspace-test.c
index fbf595d..ec5077b 100644
--- a/libswscale/colorspace-test.c
+++ b/libswscale/colorspace-test.c
@@ -19,7 +19,7 @@
*/
#include <stdio.h>
-#include <string.h> /* for memset() */
+#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
diff --git a/libswscale/input.c b/libswscale/input.c
index 2e8d43f..ac3f166 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -19,21 +19,16 @@
*/
#include <assert.h>
-#include <math.h>
#include <stdint.h>
#include <stdio.h>
-#include <string.h>
-#include "libavutil/avutil.h"
+#include "config.h"
+#include "swscale_internal.h"
+
#include "libavutil/bswap.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
-#include "config.h"
-#include "rgb2rgb.h"
-#include "swscale.h"
-#include "swscale_internal.h"
#define RGB2YUV_SHIFT 15
#define BY ((int)(0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
diff --git a/libswscale/options.c b/libswscale/options.c
index e7765d6..ed95864 100644
--- a/libswscale/options.c
+++ b/libswscale/options.c
@@ -18,12 +18,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/avutil.h"
-#include "libavutil/opt.h"
-#include "libavutil/pixfmt.h"
#include "swscale.h"
#include "swscale_internal.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixfmt.h"
+
static const char *sws_context_to_name(void *ptr)
{
return "swscaler";
diff --git a/libswscale/output.c b/libswscale/output.c
index e1d01b0..b0d2dca 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -18,23 +18,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <assert.h>
-#include <math.h>
#include <stdint.h>
#include <stdio.h>
-#include <string.h>
+
+#include "config.h"
+#include "swscale.h"
+#include "swscale_internal.h"
#include "libavutil/attributes.h"
-#include "libavutil/avutil.h"
#include "libavutil/bswap.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
-#include "config.h"
-#include "rgb2rgb.h"
-#include "swscale.h"
-#include "swscale_internal.h"
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_4)[2][8]={
{ 1, 3, 1, 3, 1, 3, 1, 3, },
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c
index 21adfe1..32aa9e4 100644
--- a/libswscale/rgb2rgb.c
+++ b/libswscale/rgb2rgb.c
@@ -25,12 +25,10 @@
#include <inttypes.h>
-#include "libavutil/attributes.h"
-#include "libavutil/bswap.h"
#include "config.h"
#include "rgb2rgb.h"
-#include "swscale.h"
-#include "swscale_internal.h"
+
+#include "libavutil/attributes.h"
void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
diff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h
index 79c378d..a4cc622 100644
--- a/libswscale/rgb2rgb.h
+++ b/libswscale/rgb2rgb.h
@@ -28,9 +28,10 @@
#include <inttypes.h>
-#include "libavutil/avutil.h"
#include "swscale.h"
+#include "libavutil/avutil.h"
+
/* A full collection of RGB to RGB(BGR) converters */
extern void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size);
extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c
index 12fa9ed..bcd5488 100644
--- a/libswscale/swscale-test.c
+++ b/libswscale/swscale-test.c
@@ -24,14 +24,17 @@
#include <inttypes.h>
#include <stdarg.h>
+//FIXME: why this undef?
#undef HAVE_AV_CONFIG_H
+
+#include "swscale.h"
+
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/avutil.h"
#include "libavutil/crc.h"
#include "libavutil/pixdesc.h"
#include "libavutil/lfg.h"
-#include "swscale.h"
/* HACK Duplicated from swscale_internal.h.
* Should be removed when a cleaner pixel format system exists. */
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 7756e1b..0cacf55 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -19,21 +19,17 @@
*/
#include <assert.h>
-#include <inttypes.h>
-#include <math.h>
#include <stdio.h>
#include <string.h>
-#include "libavutil/avutil.h"
+#include "config.h"
+#include "swscale.h"
+#include "swscale_internal.h"
+
#include "libavutil/bswap.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
-#include "config.h"
-#include "rgb2rgb.h"
-#include "swscale_internal.h"
-#include "swscale.h"
DECLARE_ALIGNED(8, const uint8_t, ff_dither_8x8_128)[8][8] = {
{ 36, 68, 60, 92, 34, 66, 58, 90, },
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index e69a694..6e9ad89 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -29,10 +29,11 @@
#include <stdint.h>
+#include "version.h"
+
#include "libavutil/avutil.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
-#include "version.h"
/**
* Return the LIBSWSCALE_VERSION_INT constant.
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 5737724..9201947 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -23,10 +23,6 @@
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
-
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"
#include "libavutil/common.h"
@@ -34,6 +30,10 @@
#include "libavutil/pixfmt.h"
#include "libavutil/pixdesc.h"
+#if HAVE_ALTIVEC_H
+#include <altivec.h>
+#endif
+
#define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long
#define FAST_BGR2YV12 // use 7-bit instead of 15-bit coefficients
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 3e5f49e..60a7570 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -18,19 +18,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <inttypes.h>
#include <string.h>
-#include <math.h>
#include <stdio.h>
#include "config.h"
#include <assert.h>
+
#include "swscale.h"
#include "swscale_internal.h"
#include "rgb2rgb.h"
+
#include "libavutil/intreadwrite.h"
#include "libavutil/cpu.h"
-#include "libavutil/avutil.h"
-#include "libavutil/mathematics.h"
#include "libavutil/bswap.h"
#include "libavutil/pixdesc.h"
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 2781985..e22f31a 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -20,38 +20,38 @@
#include "config.h"
-#define _SVID_SOURCE // needed for MAP_ANONYMOUS
+// needed for MAP_ANONYMOUS
+#define _SVID_SOURCE
+
#include <assert.h>
-#include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
+
+#include "swscale.h"
+#include "swscale_internal.h"
+#include "rgb2rgb.h"
+
+#include "libavutil/attributes.h"
+#include "libavutil/cpu.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/ppc/cpu.h"
+#include "libavutil/x86/asm.h"
+#include "libavutil/x86/cpu.h"
+
#if HAVE_SYS_MMAN_H
#include <sys/mman.h>
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
#endif
+
#if HAVE_VIRTUALALLOC
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
-#include "libavutil/attributes.h"
-#include "libavutil/avutil.h"
-#include "libavutil/bswap.h"
-#include "libavutil/cpu.h"
-#include "libavutil/intreadwrite.h"
-#include "libavutil/mathematics.h"
-#include "libavutil/opt.h"
-#include "libavutil/pixdesc.h"
-#include "libavutil/ppc/cpu.h"
-#include "libavutil/x86/asm.h"
-#include "libavutil/x86/cpu.h"
-#include "rgb2rgb.h"
-#include "swscale.h"
-#include "swscale_internal.h"
-
unsigned swscale_version(void)
{
return LIBSWSCALE_VERSION_INT;
diff --git a/libswscale/version.h b/libswscale/version.h
index 5483673..1b2ff8f 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -19,13 +19,14 @@
#ifndef SWSCALE_VERSION_H
#define SWSCALE_VERSION_H
+#include "libavutil/avutil.h"
+
+
/**
* @file
* swscale version macros
*/
-#include "libavutil/avutil.h"
-
#define LIBSWSCALE_VERSION_MAJOR 2
#define LIBSWSCALE_VERSION_MINOR 1
#define LIBSWSCALE_VERSION_MICRO 2
@@ -49,6 +50,7 @@
#ifndef FF_API_SWS_GETCONTEXT
#define FF_API_SWS_GETCONTEXT (LIBSWSCALE_VERSION_MAJOR < 3)
#endif
+
#ifndef FF_API_SWS_CPU_CAPS
#define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 3)
#endif
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
index d4f2580..c009992 100644
--- a/libswscale/x86/rgb2rgb.c
+++ b/libswscale/x86/rgb2rgb.c
@@ -30,7 +30,6 @@
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavutil/cpu.h"
-#include "libavutil/bswap.h"
#include "libswscale/rgb2rgb.h"
#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
index 0b5f870..d40f354 100644
--- a/libswscale/x86/swscale.c
+++ b/libswscale/x86/swscale.c
@@ -18,16 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <inttypes.h>
#include "config.h"
#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
#include "libavutil/attributes.h"
-#include "libavutil/intreadwrite.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavutil/cpu.h"
-#include "libavutil/pixdesc.h"
#if HAVE_INLINE_ASM
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
index 9968a8d..8bb74d6 100644
--- a/libswscale/x86/yuv2rgb.c
+++ b/libswscale/x86/yuv2rgb.c
@@ -25,13 +25,8 @@
*/
#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <assert.h>
#include "config.h"
-#include "libswscale/rgb2rgb.h"
-#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
#include "libavutil/attributes.h"
#include "libavutil/x86/asm.h"
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index f939bbe..0afafca 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -24,17 +24,14 @@
*/
#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
#include <assert.h>
-#include "libavutil/cpu.h"
-#include "libavutil/bswap.h"
#include "config.h"
-#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"
+#include "libavutil/bswap.h"
+
const int32_t ff_yuv2rgb_coeffs[8][4] = {
{ 117504, 138453, 13954, 34903 }, /* no sequence_display_extension */
{ 117504, 138453, 13954, 34903 }, /* ITU-R Rec. 709 (1990) */
--
1.7.9.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel