path: root/video/csputils.h
diff options
authorwm4 <wm4@nowhere>2013-06-28 21:14:43 +0200
committerwm4 <wm4@nowhere>2013-06-28 21:20:42 +0200
commita5b90bde0c5b735855563694ca17aacd4dbf092f (patch)
tree144081f4cca7feae1d0eb45865a3af52ed672058 /video/csputils.h
parentac266da6588f25a449a739f7a6a3d2c69ca80e19 (diff)
csputils.h: don't recursively include libavcodec header
Some functions (avcol_spc_to_mp_csp() etc.) used libavcodec enum types as parameters. Remove these in order to get rid of the avcodec.h include statement. This prevents that avcodec.h is recursively included by dozens of files. Fix mp_image.c, which used the header without explicitly including avcodec.h.
Diffstat (limited to 'video/csputils.h')
1 files changed, 5 insertions, 7 deletions
diff --git a/video/csputils.h b/video/csputils.h
index af510299cf..7c528d1b86 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -27,8 +27,6 @@
#include <stdbool.h>
#include <stdint.h>
-#include "libavcodec/avcodec.h"
/* NOTE: the csp and levels AUTO values are converted to specific ones
* above vf/vo level. At least vf_scale relies on all valid settings being
* nonzero at vf/vo level.
@@ -132,17 +130,17 @@ int mp_csp_equalizer_set(struct mp_csp_equalizer *eq, const char *property,
int mp_csp_equalizer_get(struct mp_csp_equalizer *eq, const char *property,
int *out_value);
-enum mp_csp avcol_spc_to_mp_csp(enum AVColorSpace colorspace);
+enum mp_csp avcol_spc_to_mp_csp(int avcolorspace);
-enum mp_csp_levels avcol_range_to_mp_csp_levels(enum AVColorRange range);
+enum mp_csp_levels avcol_range_to_mp_csp_levels(int avrange);
-enum AVColorSpace mp_csp_to_avcol_spc(enum mp_csp colorspace);
+int mp_csp_to_avcol_spc(enum mp_csp colorspace);
-enum AVColorRange mp_csp_levels_to_avcol_range(enum mp_csp_levels range);
+int mp_csp_levels_to_avcol_range(enum mp_csp_levels range);
enum mp_csp mp_csp_guess_colorspace(int width, int height);
-enum mp_chroma_location avchroma_location_to_mp(enum AVChromaLocation loc);
+enum mp_chroma_location avchroma_location_to_mp(int avloc);
void mp_get_chroma_location(enum mp_chroma_location loc, int *x, int *y);