diff options
author | Brian Paul <brianp@vmware.com> | 2011-07-14 08:09:21 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2011-07-14 08:14:14 -0600 |
commit | a5a942256162eb0ca4df2f8202a916b080396141 (patch) | |
tree | 283b1b84294178bb7f476fc2170f91eee424992c | |
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 <deathsimple@vodafone.de>
-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" { | |||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #include <pipe/p_defines.h> | 35 | #include <pipe/p_defines.h> |
36 | #include <pipe/p_video_enums.h> | ||
36 | 37 | ||
37 | /* u_reduce_video_profile() needs these */ | 38 | /* u_reduce_video_profile() needs these */ |
38 | #include <pipe/p_compiler.h> | 39 | #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 @@ | |||
29 | #define PIPE_CONTEXT_H | 29 | #define PIPE_CONTEXT_H |
30 | 30 | ||
31 | #include "p_compiler.h" | 31 | #include "p_compiler.h" |
32 | #include "p_format.h" | ||
33 | #include "p_video_enums.h" | ||
32 | 34 | ||
33 | #ifdef __cplusplus | 35 | #ifdef __cplusplus |
34 | extern "C" { | 36 | extern "C" { |
@@ -57,12 +59,10 @@ struct pipe_stream_output_state; | |||
57 | struct pipe_surface; | 59 | struct pipe_surface; |
58 | struct pipe_vertex_buffer; | 60 | struct pipe_vertex_buffer; |
59 | struct pipe_vertex_element; | 61 | struct pipe_vertex_element; |
62 | struct pipe_video_buffer; | ||
63 | struct pipe_video_decoder; | ||
60 | struct pipe_viewport_state; | 64 | struct pipe_viewport_state; |
61 | 65 | ||
62 | enum pipe_video_profile; | ||
63 | enum pipe_video_entrypoint; | ||
64 | enum pipe_video_chroma_format; | ||
65 | enum pipe_format; | ||
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Gallium rendering context. Basically: | 68 | * 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 | |||
493 | PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */ | 493 | PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */ |
494 | }; | 494 | }; |
495 | 495 | ||
496 | /* Video caps, can be different for each codec/profile */ | ||
497 | enum pipe_video_cap | ||
498 | { | ||
499 | PIPE_VIDEO_CAP_SUPPORTED = 0, | ||
500 | PIPE_VIDEO_CAP_NPOT_TEXTURES = 1, | ||
501 | PIPE_VIDEO_CAP_MAX_WIDTH = 2, | ||
502 | PIPE_VIDEO_CAP_MAX_HEIGHT = 3, | ||
503 | }; | ||
504 | |||
505 | enum pipe_video_codec | ||
506 | { | ||
507 | PIPE_VIDEO_CODEC_UNKNOWN = 0, | ||
508 | PIPE_VIDEO_CODEC_MPEG12, /**< MPEG1, MPEG2 */ | ||
509 | PIPE_VIDEO_CODEC_MPEG4, /**< DIVX, XVID */ | ||
510 | PIPE_VIDEO_CODEC_VC1, /**< WMV */ | ||
511 | PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */ | ||
512 | }; | ||
513 | |||
514 | enum pipe_video_profile | ||
515 | { | ||
516 | PIPE_VIDEO_PROFILE_UNKNOWN, | ||
517 | PIPE_VIDEO_PROFILE_MPEG1, | ||
518 | PIPE_VIDEO_PROFILE_MPEG2_SIMPLE, | ||
519 | PIPE_VIDEO_PROFILE_MPEG2_MAIN, | ||
520 | PIPE_VIDEO_PROFILE_MPEG4_SIMPLE, | ||
521 | PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE, | ||
522 | PIPE_VIDEO_PROFILE_VC1_SIMPLE, | ||
523 | PIPE_VIDEO_PROFILE_VC1_MAIN, | ||
524 | PIPE_VIDEO_PROFILE_VC1_ADVANCED, | ||
525 | PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE, | ||
526 | PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN, | ||
527 | PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH | ||
528 | }; | ||
529 | |||
530 | enum pipe_video_entrypoint | ||
531 | { | ||
532 | PIPE_VIDEO_ENTRYPOINT_UNKNOWN, | ||
533 | PIPE_VIDEO_ENTRYPOINT_BITSTREAM, | ||
534 | PIPE_VIDEO_ENTRYPOINT_IDCT, | ||
535 | PIPE_VIDEO_ENTRYPOINT_MC | ||
536 | }; | ||
537 | 496 | ||
538 | /** | 497 | /** |
539 | * Composite query types | 498 | * 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 @@ | |||
41 | #include "pipe/p_compiler.h" | 41 | #include "pipe/p_compiler.h" |
42 | #include "pipe/p_format.h" | 42 | #include "pipe/p_format.h" |
43 | #include "pipe/p_defines.h" | 43 | #include "pipe/p_defines.h" |
44 | #include "pipe/p_video_enums.h" | ||
44 | 45 | ||
45 | 46 | ||
46 | 47 | ||
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 @@ | |||
1 | /************************************************************************** | ||
2 | * | ||
3 | * Copyright 2009 Younes Manton. | ||
4 | * All Rights Reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * The above copyright notice and this permission notice (including the | ||
15 | * next paragraph) shall be included in all copies or substantial portions | ||
16 | * of the Software. | ||
17 | * | ||
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||
21 | * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR | ||
22 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
25 | * | ||
26 | **************************************************************************/ | ||
27 | |||
28 | #ifndef PIPE_VIDEO_ENUMS_H | ||
29 | #define PIPE_VIDEO_ENUMS_H | ||
30 | |||
31 | enum pipe_video_profile | ||
32 | { | ||
33 | PIPE_VIDEO_PROFILE_UNKNOWN, | ||
34 | PIPE_VIDEO_PROFILE_MPEG1, | ||
35 | PIPE_VIDEO_PROFILE_MPEG2_SIMPLE, | ||
36 | PIPE_VIDEO_PROFILE_MPEG2_MAIN, | ||
37 | PIPE_VIDEO_PROFILE_MPEG4_SIMPLE, | ||
38 | PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE, | ||
39 | PIPE_VIDEO_PROFILE_VC1_SIMPLE, | ||
40 | PIPE_VIDEO_PROFILE_VC1_MAIN, | ||
41 | PIPE_VIDEO_PROFILE_VC1_ADVANCED, | ||
42 | PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE, | ||
43 | PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN, | ||
44 | PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH | ||
45 | }; | ||
46 | |||
47 | /* Video caps, can be different for each codec/profile */ | ||
48 | enum pipe_video_cap | ||
49 | { | ||
50 | PIPE_VIDEO_CAP_SUPPORTED = 0, | ||
51 | PIPE_VIDEO_CAP_NPOT_TEXTURES = 1, | ||
52 | PIPE_VIDEO_CAP_MAX_WIDTH = 2, | ||
53 | PIPE_VIDEO_CAP_MAX_HEIGHT = 3, | ||
54 | }; | ||
55 | |||
56 | enum pipe_video_codec | ||
57 | { | ||
58 | PIPE_VIDEO_CODEC_UNKNOWN = 0, | ||
59 | PIPE_VIDEO_CODEC_MPEG12, /**< MPEG1, MPEG2 */ | ||
60 | PIPE_VIDEO_CODEC_MPEG4, /**< DIVX, XVID */ | ||
61 | PIPE_VIDEO_CODEC_VC1, /**< WMV */ | ||
62 | PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */ | ||
63 | }; | ||
64 | |||
65 | enum pipe_video_entrypoint | ||
66 | { | ||
67 | PIPE_VIDEO_ENTRYPOINT_UNKNOWN, | ||
68 | PIPE_VIDEO_ENTRYPOINT_BITSTREAM, | ||
69 | PIPE_VIDEO_ENTRYPOINT_IDCT, | ||
70 | PIPE_VIDEO_ENTRYPOINT_MC | ||
71 | }; | ||
72 | |||
73 | |||
74 | #endif /* PIPE_VIDEO_ENUMS_H */ | ||