diff options
author | Brian Paul <[email protected]> | 2011-07-14 08:09:21 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-07-14 08:14:14 -0600 |
commit | a5a942256162eb0ca4df2f8202a916b080396141 (patch) | |
tree | 283b1b84294178bb7f476fc2170f91eee424992c /src | |
parent | 9726947b681225a5a438eaa7cb70c5fa36ce85ea (diff) |
gallium: put video-related enums in separate header
The forward references to video enum types in p_context.h causes
a massive number of compiler warnings (ISO C forbids forward references
to ‘enum’ types).
By putting the new video enums in a separate header that can be included
by p_context.h and p_screen.h we can avoid this.
Acked-by Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/util/u_video.h | 1 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 8 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 41 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 1 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_video_enums.h | 74 |
5 files changed, 80 insertions, 45 deletions
diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h index 46da1361004..6b67881e648 100644 --- a/src/gallium/auxiliary/util/u_video.h +++ b/src/gallium/auxiliary/util/u_video.h @@ -33,6 +33,7 @@ extern "C" { #endif #include <pipe/p_defines.h> +#include <pipe/p_video_enums.h> /* u_reduce_video_profile() needs these */ #include <pipe/p_compiler.h> diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index ac290495a43..3f6d90d1bf4 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -29,6 +29,8 @@ #define PIPE_CONTEXT_H #include "p_compiler.h" +#include "p_format.h" +#include "p_video_enums.h" #ifdef __cplusplus extern "C" { @@ -57,12 +59,10 @@ struct pipe_stream_output_state; struct pipe_surface; struct pipe_vertex_buffer; struct pipe_vertex_element; +struct pipe_video_buffer; +struct pipe_video_decoder; struct pipe_viewport_state; -enum pipe_video_profile; -enum pipe_video_entrypoint; -enum pipe_video_chroma_format; -enum pipe_format; /** * Gallium rendering context. Basically: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 7f1bf0dee68..79b89699566 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -493,47 +493,6 @@ enum pipe_shader_cap PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */ }; -/* Video caps, can be different for each codec/profile */ -enum pipe_video_cap -{ - PIPE_VIDEO_CAP_SUPPORTED = 0, - PIPE_VIDEO_CAP_NPOT_TEXTURES = 1, - PIPE_VIDEO_CAP_MAX_WIDTH = 2, - PIPE_VIDEO_CAP_MAX_HEIGHT = 3, -}; - -enum pipe_video_codec -{ - PIPE_VIDEO_CODEC_UNKNOWN = 0, - PIPE_VIDEO_CODEC_MPEG12, /**< MPEG1, MPEG2 */ - PIPE_VIDEO_CODEC_MPEG4, /**< DIVX, XVID */ - PIPE_VIDEO_CODEC_VC1, /**< WMV */ - PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */ -}; - -enum pipe_video_profile -{ - PIPE_VIDEO_PROFILE_UNKNOWN, - PIPE_VIDEO_PROFILE_MPEG1, - PIPE_VIDEO_PROFILE_MPEG2_SIMPLE, - PIPE_VIDEO_PROFILE_MPEG2_MAIN, - PIPE_VIDEO_PROFILE_MPEG4_SIMPLE, - PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE, - PIPE_VIDEO_PROFILE_VC1_SIMPLE, - PIPE_VIDEO_PROFILE_VC1_MAIN, - PIPE_VIDEO_PROFILE_VC1_ADVANCED, - PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE, - PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN, - PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH -}; - -enum pipe_video_entrypoint -{ - PIPE_VIDEO_ENTRYPOINT_UNKNOWN, - PIPE_VIDEO_ENTRYPOINT_BITSTREAM, - PIPE_VIDEO_ENTRYPOINT_IDCT, - PIPE_VIDEO_ENTRYPOINT_MC -}; /** * Composite query types diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 87fdb20510d..6821edd4a56 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -41,6 +41,7 @@ #include "pipe/p_compiler.h" #include "pipe/p_format.h" #include "pipe/p_defines.h" +#include "pipe/p_video_enums.h" diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h new file mode 100644 index 00000000000..492ab84e33f --- /dev/null +++ b/src/gallium/include/pipe/p_video_enums.h @@ -0,0 +1,74 @@ +/************************************************************************** + * + * Copyright 2009 Younes Manton. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef PIPE_VIDEO_ENUMS_H +#define PIPE_VIDEO_ENUMS_H + +enum pipe_video_profile +{ + PIPE_VIDEO_PROFILE_UNKNOWN, + PIPE_VIDEO_PROFILE_MPEG1, + PIPE_VIDEO_PROFILE_MPEG2_SIMPLE, + PIPE_VIDEO_PROFILE_MPEG2_MAIN, + PIPE_VIDEO_PROFILE_MPEG4_SIMPLE, + PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE, + PIPE_VIDEO_PROFILE_VC1_SIMPLE, + PIPE_VIDEO_PROFILE_VC1_MAIN, + PIPE_VIDEO_PROFILE_VC1_ADVANCED, + PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE, + PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN, + PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH +}; + +/* Video caps, can be different for each codec/profile */ +enum pipe_video_cap +{ + PIPE_VIDEO_CAP_SUPPORTED = 0, + PIPE_VIDEO_CAP_NPOT_TEXTURES = 1, + PIPE_VIDEO_CAP_MAX_WIDTH = 2, + PIPE_VIDEO_CAP_MAX_HEIGHT = 3, +}; + +enum pipe_video_codec +{ + PIPE_VIDEO_CODEC_UNKNOWN = 0, + PIPE_VIDEO_CODEC_MPEG12, /**< MPEG1, MPEG2 */ + PIPE_VIDEO_CODEC_MPEG4, /**< DIVX, XVID */ + PIPE_VIDEO_CODEC_VC1, /**< WMV */ + PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */ +}; + +enum pipe_video_entrypoint +{ + PIPE_VIDEO_ENTRYPOINT_UNKNOWN, + PIPE_VIDEO_ENTRYPOINT_BITSTREAM, + PIPE_VIDEO_ENTRYPOINT_IDCT, + PIPE_VIDEO_ENTRYPOINT_MC +}; + + +#endif /* PIPE_VIDEO_ENUMS_H */ |