• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 VMWARE 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 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 enum pipe_video_format
36 {
37    PIPE_VIDEO_FORMAT_UNKNOWN = 0,
38    PIPE_VIDEO_FORMAT_MPEG12,   /**< MPEG1, MPEG2 */
39    PIPE_VIDEO_FORMAT_MPEG4,    /**< DIVX, XVID */
40    PIPE_VIDEO_FORMAT_VC1,      /**< WMV */
41    PIPE_VIDEO_FORMAT_MPEG4_AVC,/**< H.264 */
42    PIPE_VIDEO_FORMAT_HEVC,     /**< H.265 */
43    PIPE_VIDEO_FORMAT_JPEG,     /**< JPEG */
44    PIPE_VIDEO_FORMAT_VP9,      /**< VP9 */
45    PIPE_VIDEO_FORMAT_AV1       /**< AV1 */
46 };
47 
48 enum pipe_video_profile
49 {
50    PIPE_VIDEO_PROFILE_UNKNOWN,
51    PIPE_VIDEO_PROFILE_MPEG1,
52    PIPE_VIDEO_PROFILE_MPEG2_SIMPLE,
53    PIPE_VIDEO_PROFILE_MPEG2_MAIN,
54    PIPE_VIDEO_PROFILE_MPEG4_SIMPLE,
55    PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE,
56    PIPE_VIDEO_PROFILE_VC1_SIMPLE,
57    PIPE_VIDEO_PROFILE_VC1_MAIN,
58    PIPE_VIDEO_PROFILE_VC1_ADVANCED,
59    PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
60    PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE,
61    PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,
62    PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED,
63    PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
64    PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10,
65    PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422,
66    PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444,
67    PIPE_VIDEO_PROFILE_HEVC_MAIN,
68    PIPE_VIDEO_PROFILE_HEVC_MAIN_10,
69    PIPE_VIDEO_PROFILE_HEVC_MAIN_STILL,
70    PIPE_VIDEO_PROFILE_HEVC_MAIN_12,
71    PIPE_VIDEO_PROFILE_HEVC_MAIN_444,
72    PIPE_VIDEO_PROFILE_JPEG_BASELINE,
73    PIPE_VIDEO_PROFILE_VP9_PROFILE0,
74    PIPE_VIDEO_PROFILE_VP9_PROFILE2,
75    PIPE_VIDEO_PROFILE_AV1_MAIN,
76    PIPE_VIDEO_PROFILE_AV1_PROFILE2,
77    PIPE_VIDEO_PROFILE_MAX
78 };
79 
80 /* Video caps, can be different for each codec/profile */
81 enum pipe_video_cap
82 {
83    PIPE_VIDEO_CAP_SUPPORTED = 0,
84    PIPE_VIDEO_CAP_NPOT_TEXTURES = 1,
85    PIPE_VIDEO_CAP_MAX_WIDTH = 2,
86    PIPE_VIDEO_CAP_MAX_HEIGHT = 3,
87    PIPE_VIDEO_CAP_PREFERED_FORMAT = 4,
88    PIPE_VIDEO_CAP_PREFERS_INTERLACED = 5,
89    PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE = 6,
90    PIPE_VIDEO_CAP_SUPPORTS_INTERLACED = 7,
91    PIPE_VIDEO_CAP_MAX_LEVEL = 8,
92    PIPE_VIDEO_CAP_STACKED_FRAMES = 9,
93    PIPE_VIDEO_CAP_MAX_MACROBLOCKS = 10,
94    PIPE_VIDEO_CAP_MAX_TEMPORAL_LAYERS = 11,
95    PIPE_VIDEO_CAP_SKIP_CLEAR_SURFACE = 12,
96    PIPE_VIDEO_CAP_ENC_MAX_SLICES_PER_FRAME = 13,
97    PIPE_VIDEO_CAP_ENC_SLICES_STRUCTURE = 14,
98    PIPE_VIDEO_CAP_ENC_MAX_REFERENCES_PER_FRAME = 15,
99    PIPE_VIDEO_CAP_VPP_ORIENTATION_MODES = 16,
100    PIPE_VIDEO_CAP_VPP_BLEND_MODES = 17,
101    PIPE_VIDEO_CAP_VPP_MAX_INPUT_WIDTH = 18,
102    PIPE_VIDEO_CAP_VPP_MAX_INPUT_HEIGHT = 19,
103    PIPE_VIDEO_CAP_VPP_MIN_INPUT_WIDTH = 20,
104    PIPE_VIDEO_CAP_VPP_MIN_INPUT_HEIGHT = 21,
105    PIPE_VIDEO_CAP_VPP_MAX_OUTPUT_WIDTH = 22,
106    PIPE_VIDEO_CAP_VPP_MAX_OUTPUT_HEIGHT = 23,
107    PIPE_VIDEO_CAP_VPP_MIN_OUTPUT_WIDTH = 24,
108    PIPE_VIDEO_CAP_VPP_MIN_OUTPUT_HEIGHT = 25,
109    PIPE_VIDEO_CAP_ENC_QUALITY_LEVEL = 26,
110    /* If true, when mapping planar textures like NV12 or P016 the mapped buffer contains
111    all the planes contiguously. This allows for use with some frontends functions that
112    require this like vaDeriveImage */
113    PIPE_VIDEO_CAP_SUPPORTS_CONTIGUOUS_PLANES_MAP = 27,
114    PIPE_VIDEO_CAP_ENC_SUPPORTS_MAX_FRAME_SIZE = 28,
115    PIPE_VIDEO_CAP_ENC_HEVC_BLOCK_SIZES = 29,
116    PIPE_VIDEO_CAP_ENC_HEVC_FEATURE_FLAGS = 30,
117    PIPE_VIDEO_CAP_ENC_HEVC_PREDICTION_DIRECTION = 31,
118    /*
119       If reported by the driver, then pipe_video_codec.flush(...)
120       needs to be called after pipe_video_codec.end_frame(...)
121       to kick off the work in the device
122    */
123    PIPE_VIDEO_CAP_REQUIRES_FLUSH_ON_END_FRAME = 32,
124    PIPE_VIDEO_CAP_MIN_WIDTH = 34,
125    PIPE_VIDEO_CAP_MIN_HEIGHT = 35,
126    PIPE_VIDEO_CAP_ENC_RATE_CONTROL_QVBR = 36,
127    /*
128       AV1 encoding features list
129    */
130    PIPE_VIDEO_CAP_ENC_AV1_FEATURE = 37,
131    PIPE_VIDEO_CAP_ENC_AV1_FEATURE_EXT1 = 38,
132    PIPE_VIDEO_CAP_ENC_AV1_FEATURE_EXT2 = 39,
133    PIPE_VIDEO_CAP_ENC_SUPPORTS_TILE = 40,
134    PIPE_VIDEO_CAP_ENC_MAX_TILE_ROWS = 41,
135    PIPE_VIDEO_CAP_ENC_MAX_TILE_COLS = 42,
136    PIPE_VIDEO_CAP_ENC_INTRA_REFRESH = 43,
137    PIPE_VIDEO_CAP_ENC_SUPPORTS_FEEDBACK_METADATA = 44,
138    /*
139     * uses pipe_video_h264_enc_dbk_filter_mode_flags and sets the
140     * supported modes to set in disable_deblocking_filter_idc
141    */
142    PIPE_VIDEO_CAP_ENC_H264_DISABLE_DBK_FILTER_MODES_SUPPORTED = 45,
143    /* max number of intra refresh cycles before the beginning of a new
144     * intra-refresh wave (e.g pipe_enc_intra_refresh.offset is 0 again)
145    */
146    PIPE_VIDEO_CAP_ENC_INTRA_REFRESH_MAX_DURATION = 46,
147    PIPE_VIDEO_CAP_ENC_H264_SUPPORTS_CABAC_ENCODE = 47,
148    /*
149       crop and partial decode support
150    */
151    PIPE_VIDEO_CAP_ROI_CROP_DEC = 48,
152    /*
153     * Encoding Region Of Interest feature
154     */
155    PIPE_VIDEO_CAP_ENC_ROI = 49,
156    /*
157     * Encoding surface width/height alignment
158     */
159    PIPE_VIDEO_CAP_ENC_SURFACE_ALIGNMENT = 50,
160    /*
161     * HEVC range extension support pipe_h265_enc_cap_range_extension
162     */
163    PIPE_VIDEO_CAP_ENC_HEVC_RANGE_EXTENSION_SUPPORT = 51,
164    /*
165     * HEVC range extension support pipe_h265_enc_cap_range_extension_flags
166     */
167    PIPE_VIDEO_CAP_ENC_HEVC_RANGE_EXTENSION_FLAGS_SUPPORT = 52,
168    /*
169     * Video Post Processing support HDR content
170     */
171    PIPE_VIDEO_CAP_VPP_SUPPORT_HDR_INPUT = 53,
172    PIPE_VIDEO_CAP_VPP_SUPPORT_HDR_OUTPUT = 54,
173 };
174 
175 enum pipe_video_h264_enc_dbk_filter_mode_flags
176 {
177    PIPE_VIDEO_H264_ENC_DBK_MODE_NONE	= 0,
178    PIPE_VIDEO_H264_ENC_DBK_MODE_ALL_LUMA_CHROMA_SLICE_BLOCK_EDGES_ALWAYS_FILTERED	= 0x1,
179    PIPE_VIDEO_H264_ENC_DBK_MODE_DISABLE_ALL_SLICE_BLOCK_EDGES	= 0x2,
180    PIPE_VIDEO_H264_ENC_DBK_MODE_DISABLE_SLICE_BOUNDARIES_BLOCKS = 0x4,
181    PIPE_VIDEO_H264_ENC_DBK_MODE_USE_TWO_STAGE_DEBLOCKING = 0x8,
182    PIPE_VIDEO_H264_ENC_DBK_MODE_DISABLE_CHROMA_BLOCK_EDGES	= 0x10,
183    PIPE_VIDEO_H264_ENC_DBK_MODE_DISABLE_CHROMA_BLOCK_EDGES_AND_LUMA_BOUNDARIES = 0x20,
184    PIPE_VIDEO_H264_ENC_DBK_MODE_DISABLE_CHROMA_BLOCK_EDGES_AND_USE_LUMA_TWO_STAGE_DEBLOCKING = 0x40,
185 };
186 
187 enum pipe_video_feedback_encode_result_flags
188 {
189    /* Requires PIPE_VIDEO_FEEDBACK_METADATA_TYPE_ENCODE_RESULT */
190    PIPE_VIDEO_FEEDBACK_METADATA_ENCODE_FLAG_OK = 0x0,
191    PIPE_VIDEO_FEEDBACK_METADATA_ENCODE_FLAG_FAILED = 0x1,
192    /* Requires PIPE_VIDEO_FEEDBACK_METADATA_TYPE_MAX_FRAME_SIZE_OVERFLOW */
193    PIPE_VIDEO_FEEDBACK_METADATA_ENCODE_FLAG_MAX_FRAME_SIZE_OVERFLOW = 0x2,
194 };
195 
196 enum codec_unit_location_flags
197 {
198    PIPE_VIDEO_CODEC_UNIT_LOCATION_FLAG_NONE = 0x0,
199    /* Requires PIPE_VIDEO_FEEDBACK_METADATA_TYPE_MAX_SLICE_SIZE_OVERFLOW */
200    PIPE_VIDEO_CODEC_UNIT_LOCATION_FLAG_MAX_SLICE_SIZE_OVERFLOW = 0x1,
201    PIPE_VIDEO_CODEC_UNIT_LOCATION_FLAG_SINGLE_NALU = 0x2,
202 };
203 
204 /* To be used with PIPE_VIDEO_CAP_ENC_SUPPORTS_FEEDBACK_METADATA
205  * for checking gallium driver support and to indicate the
206  * different metadata types in an encode operation
207 */
208 enum pipe_video_feedback_metadata_type
209 {
210    PIPE_VIDEO_FEEDBACK_METADATA_TYPE_BITSTREAM_SIZE           = 0x0,
211    PIPE_VIDEO_FEEDBACK_METADATA_TYPE_ENCODE_RESULT            = 0x1,
212    PIPE_VIDEO_FEEDBACK_METADATA_TYPE_CODEC_UNIT_LOCATION      = 0x2,
213    PIPE_VIDEO_FEEDBACK_METADATA_TYPE_MAX_FRAME_SIZE_OVERFLOW  = 0x4,
214    PIPE_VIDEO_FEEDBACK_METADATA_TYPE_MAX_SLICE_SIZE_OVERFLOW  = 0x8,
215    PIPE_VIDEO_FEEDBACK_METADATA_TYPE_AVERAGE_FRAME_QP         = 0x10,
216 };
217 
218 enum pipe_video_av1_enc_filter_mode
219 {
220    PIPE_VIDEO_CAP_ENC_AV1_INTERPOLATION_FILTER_EIGHT_TAP = (1 << 0),
221    PIPE_VIDEO_CAP_ENC_AV1_INTERPOLATION_FILTER_EIGHT_TAP_SMOOTH = (1 << 1),
222    PIPE_VIDEO_CAP_ENC_AV1_INTERPOLATION_FILTER_EIGHT_TAP_SHARP = (1 << 2),
223    PIPE_VIDEO_CAP_ENC_AV1_INTERPOLATION_FILTER_BILINEAR = (1 << 3),
224    PIPE_VIDEO_CAP_ENC_AV1_INTERPOLATION_FILTER_SWITCHABLE = (1 << 4),
225 
226 };
227 
228 enum pipe_video_av1_enc_tx_mode
229 {
230    PIPE_VIDEO_CAP_ENC_AV1_TX_MODE_ONLY_4X4 = (1 << 0),
231    PIPE_VIDEO_CAP_ENC_AV1_TX_MODE_LARGEST = (1 << 1),
232    PIPE_VIDEO_CAP_ENC_AV1_TX_MODE_SELECT = (1 << 2),
233 };
234 
235 /* To be used with PIPE_VIDEO_CAP_VPP_ORIENTATION_MODES and for VPP state*/
236 enum pipe_video_vpp_orientation
237 {
238    PIPE_VIDEO_VPP_ORIENTATION_DEFAULT = 0x0,
239    PIPE_VIDEO_VPP_ROTATION_90 = 0x01,
240    PIPE_VIDEO_VPP_ROTATION_180 = 0x02,
241    PIPE_VIDEO_VPP_ROTATION_270 = 0x04,
242    PIPE_VIDEO_VPP_FLIP_HORIZONTAL = 0x08,
243    PIPE_VIDEO_VPP_FLIP_VERTICAL = 0x10,
244 };
245 
246 /* To be used with PIPE_VIDEO_CAP_VPP_BLEND_MODES and for VPP state*/
247 enum pipe_video_vpp_blend_mode
248 {
249    PIPE_VIDEO_VPP_BLEND_MODE_NONE = 0x0,
250    PIPE_VIDEO_VPP_BLEND_MODE_GLOBAL_ALPHA = 0x1,
251 };
252 
253 /* To be used for VPP state*/
254 enum pipe_video_vpp_color_standard_type
255 {
256    PIPE_VIDEO_VPP_COLOR_STANDARD_TYPE_NONE = 0x0,
257    PIPE_VIDEO_VPP_COLOR_STANDARD_TYPE_BT601 = 0x1,
258    PIPE_VIDEO_VPP_COLOR_STANDARD_TYPE_BT709 = 0x2,
259    PIPE_VIDEO_VPP_COLOR_STANDARD_TYPE_BT2020 = 0xC,
260    PIPE_VIDEO_VPP_COLOR_STANDARD_TYPE_EXPLICIT = 0xD,
261    PIPE_VIDEO_VPP_COLOR_STANDARD_TYPE_COUNT,
262 };
263 
264 /* To be used for VPP state*/
265 enum pipe_video_vpp_color_range
266 {
267    PIPE_VIDEO_VPP_CHROMA_COLOR_RANGE_NONE     = 0x00,
268    PIPE_VIDEO_VPP_CHROMA_COLOR_RANGE_REDUCED  = 0x01,
269    PIPE_VIDEO_VPP_CHROMA_COLOR_RANGE_FULL     = 0x02,
270 };
271 
272 /* To be used for VPP state*/
273 enum pipe_video_vpp_chroma_siting
274 {
275    PIPE_VIDEO_VPP_CHROMA_SITING_NONE              = 0x00,
276    PIPE_VIDEO_VPP_CHROMA_SITING_VERTICAL_TOP      = 0x01,
277    PIPE_VIDEO_VPP_CHROMA_SITING_VERTICAL_CENTER   = 0x02,
278    PIPE_VIDEO_VPP_CHROMA_SITING_VERTICAL_BOTTOM   = 0x04,
279    PIPE_VIDEO_VPP_CHROMA_SITING_HORIZONTAL_LEFT   = 0x10,
280    PIPE_VIDEO_VPP_CHROMA_SITING_HORIZONTAL_CENTER = 0x20,
281 };
282 
283 /* To be used for VPP state*/
284 enum pipe_video_vpp_color_primaries {
285     PIPE_VIDEO_VPP_PRI_RESERVED0    = 0,
286     PIPE_VIDEO_VPP_PRI_BT709        = 1,
287     PIPE_VIDEO_VPP_PRI_UNSPECIFIED  = 2,
288     PIPE_VIDEO_VPP_PRI_RESERVED     = 3,
289     PIPE_VIDEO_VPP_PRI_BT470M       = 4,
290     PIPE_VIDEO_VPP_PRI_BT470BG      = 5,
291     PIPE_VIDEO_VPP_PRI_SMPTE170M    = 6,
292     PIPE_VIDEO_VPP_PRI_SMPTE240M    = 7,
293     PIPE_VIDEO_VPP_PRI_FILM         = 8,
294     PIPE_VIDEO_VPP_PRI_BT2020       = 9,
295     PIPE_VIDEO_VPP_PRI_SMPTE428     = 10,
296     PIPE_VIDEO_VPP_PRI_SMPTEST428_1 = PIPE_VIDEO_VPP_PRI_SMPTE428,
297     PIPE_VIDEO_VPP_PRI_SMPTE431     = 11,
298     PIPE_VIDEO_VPP_PRI_SMPTE432     = 12,
299     PIPE_VIDEO_VPP_PRI_EBU3213      = 22,
300     PIPE_VIDEO_VPP_PRI_JEDEC_P22    = PIPE_VIDEO_VPP_PRI_EBU3213,
301     PIPE_VIDEO_VPP_PRI_COUNT,
302 };
303 
304 /* To be used for VPP state*/
305 enum pipe_video_vpp_transfer_characteristic {
306     PIPE_VIDEO_VPP_TRC_RESERVED0    = 0,
307     PIPE_VIDEO_VPP_TRC_BT709        = 1,
308     PIPE_VIDEO_VPP_TRC_UNSPECIFIED  = 2,
309     PIPE_VIDEO_VPP_TRC_RESERVED     = 3,
310     PIPE_VIDEO_VPP_TRC_GAMMA22      = 4,
311     PIPE_VIDEO_VPP_TRC_GAMMA28      = 5,
312     PIPE_VIDEO_VPP_TRC_SMPTE170M    = 6,
313     PIPE_VIDEO_VPP_TRC_SMPTE240M    = 7,
314     PIPE_VIDEO_VPP_TRC_LINEAR       = 8,
315     PIPE_VIDEO_VPP_TRC_LOG          = 9,
316     PIPE_VIDEO_VPP_TRC_LOG_SQRT     = 10,
317     PIPE_VIDEO_VPP_TRC_IEC61966_2_4 = 11,
318     PIPE_VIDEO_VPP_TRC_BT1361_ECG   = 12,
319     PIPE_VIDEO_VPP_TRC_IEC61966_2_1 = 13,
320     PIPE_VIDEO_VPP_TRC_BT2020_10    = 14,
321     PIPE_VIDEO_VPP_TRC_BT2020_12    = 15,
322     PIPE_VIDEO_VPP_TRC_SMPTE2084    = 16,
323     PIPE_VIDEO_VPP_TRC_SMPTEST2084  = PIPE_VIDEO_VPP_TRC_SMPTE2084,
324     PIPE_VIDEO_VPP_TRC_SMPTE428     = 17,
325     PIPE_VIDEO_VPP_TRC_SMPTEST428_1 = PIPE_VIDEO_VPP_TRC_SMPTE428,
326     PIPE_VIDEO_VPP_TRC_ARIB_STD_B67 = 18,
327     PIPE_VIDEO_VPP_TRC_COUNT,
328 };
329 
330 /* To be used for VPP state*/
331 enum pipe_video_vpp_matrix_coefficients {
332     PIPE_VIDEO_VPP_MCF_RGB         = 0,
333     PIPE_VIDEO_VPP_MCF_BT709       = 1,
334     PIPE_VIDEO_VPP_MCF_UNSPECIFIED = 2,
335     PIPE_VIDEO_VPP_MCF_RESERVED    = 3,
336     PIPE_VIDEO_VPP_MCF_FCC         = 4,
337     PIPE_VIDEO_VPP_MCF_BT470BG     = 5,
338     PIPE_VIDEO_VPP_MCF_SMPTE170M   = 6,
339     PIPE_VIDEO_VPP_MCF_SMPTE240M   = 7,
340     PIPE_VIDEO_VPP_MCF_YCGCO       = 8,
341     PIPE_VIDEO_VPP_MCF_YCOCG       = PIPE_VIDEO_VPP_MCF_YCGCO,
342     PIPE_VIDEO_VPP_MCF_BT2020_NCL  = 9,
343     PIPE_VIDEO_VPP_MCF_BT2020_CL   = 10,
344     PIPE_VIDEO_VPP_MCF_SMPTE2085   = 11,
345     PIPE_VIDEO_VPP_MCF_CHROMA_DERIVED_NCL = 12,
346     PIPE_VIDEO_VPP_MCF_CHROMA_DERIVED_CL = 13,
347     PIPE_VIDEO_VPP_MCF_ICTCP       = 14,
348     PIPE_VIDEO_VPP_MCF_IPT_C2      = 15,
349     PIPE_VIDEO_VPP_MCF_YCGCO_RE    = 16,
350     PIPE_VIDEO_VPP_MCF_YCGCO_RO    = 17,
351     PIPE_VIDEO_VPP_MCF_COUNT,
352 };
353 
354 /* To be used with cap PIPE_VIDEO_CAP_ENC_SLICES_STRUCTURE*/
355 /**
356  * pipe_video_cap_slice_structure
357  *
358  * This attribute determines slice structures supported by the
359  * driver for encoding. This attribute is a hint to the user so
360  * that he can choose a suitable surface size and how to arrange
361  * the encoding process of multiple slices per frame.
362  *
363  * More specifically, for H.264 encoding, this attribute
364  * determines the range of accepted values to
365  * h264_slice_descriptor::macroblock_address and
366  * h264_slice_descriptor::num_macroblocks.
367  */
368 enum pipe_video_cap_slice_structure
369 {
370    /* Driver does not supports multiple slice per frame.*/
371    PIPE_VIDEO_CAP_SLICE_STRUCTURE_NONE = 0x00000000,
372    /* Driver supports a power-of-two number of rows per slice.*/
373    PIPE_VIDEO_CAP_SLICE_STRUCTURE_POWER_OF_TWO_ROWS = 0x00000001,
374    /* Driver supports an arbitrary number of macroblocks per slice.*/
375    PIPE_VIDEO_CAP_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS = 0x00000002,
376    /* Driver support 1 row per slice*/
377    PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_ROWS = 0x00000004,
378    /* Driver support max encoded slice size per slice */
379    PIPE_VIDEO_CAP_SLICE_STRUCTURE_MAX_SLICE_SIZE = 0x00000008,
380    /* Driver supports an arbitrary number of rows per slice. */
381    PIPE_VIDEO_CAP_SLICE_STRUCTURE_ARBITRARY_ROWS = 0x00000010,
382    /* Driver supports any number of rows per slice but they must be the same
383    *  for all slices except for the last one, which must be equal or smaller
384    *  to the previous slices. */
385    PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_MULTI_ROWS = 0x00000020,
386 };
387 
388 enum pipe_video_enc_intra_refresh_mode
389 {
390    /* no intra-refresh is supported */
391    PIPE_VIDEO_ENC_INTRA_REFRESH_NONE      = 0x00000,
392    /* intra-refresh is column based */
393    PIPE_VIDEO_ENC_INTRA_REFRESH_COLUMN    = 0x00001,
394    /* intra-refresh is row based */
395    PIPE_VIDEO_ENC_INTRA_REFRESH_ROW       = 0x00002,
396    /* intra-refresh could be adaptive, and decided by application */
397    PIPE_VIDEO_ENC_INTRA_REFRESH_ADAPTIVE  = 0x00010,
398    /* intra-refresh could be cyclic, decided by application */
399    PIPE_VIDEO_ENC_INTRA_REFRESH_CYCLIC    = 0x00020,
400    /* intra-refresh can be on P frame */
401    PIPE_VIDEO_ENC_INTRA_REFRESH_P_FRAME   = 0x10000,
402    /* intra-refresh can be on B frame */
403    PIPE_VIDEO_ENC_INTRA_REFRESH_B_FRAME   = 0x20000,
404    /* intra-refresh support multiple reference encoder */
405    PIPE_VIDEO_ENC_INTRA_REFRESH_MULTI_REF = 0x40000,
406 };
407 
408 enum pipe_video_slice_mode
409 {
410    /*
411     * Partitions the frame using block offsets and block numbers
412    */
413    PIPE_VIDEO_SLICE_MODE_BLOCKS = 0,
414    /*
415     * Partitions the frame using max slice size per coded slice
416    */
417    PIPE_VIDEO_SLICE_MODE_MAX_SLICE_SIZE = 1,
418 };
419 
420 enum pipe_video_entrypoint
421 {
422    PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
423    PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
424    PIPE_VIDEO_ENTRYPOINT_IDCT,
425    PIPE_VIDEO_ENTRYPOINT_MC,
426    PIPE_VIDEO_ENTRYPOINT_ENCODE,
427    PIPE_VIDEO_ENTRYPOINT_PROCESSING,
428 };
429 
430 #if defined(__cplusplus)
431 }
432 #endif
433 
434 #endif /* PIPE_VIDEO_ENUMS_H */
435