summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorSil Vilerino <sivileri@microsoft.com>2022-05-06 13:21:32 -0700
committerMarge Bot <emma+marge@anholt.net>2022-05-17 21:02:25 +0000
commite1f2db752775265cb993a8b0caae0b2bc14f9059 (patch)
tree0c098b73136957663eddb5e488d768c48ebeabf4 /src/gallium/include/pipe
parenta8831ba0ca5f16a94a43b199663e732db5c530f0 (diff)
gallium: Add values to pipe_video_cap for multi-slice and multi-reference encode
Acked-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_video_enums.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h
index 5064ddcb0d9..f78535283fe 100644
--- a/src/gallium/include/pipe/p_video_enums.h
+++ b/src/gallium/include/pipe/p_video_enums.h
@@ -91,9 +91,47 @@ enum pipe_video_cap
PIPE_VIDEO_CAP_STACKED_FRAMES = 9,
PIPE_VIDEO_CAP_MAX_MACROBLOCKS = 10,
PIPE_VIDEO_CAP_MAX_TEMPORAL_LAYERS = 11,
- PIPE_VIDEO_CAP_EFC_SUPPORTED = 12
+ PIPE_VIDEO_CAP_EFC_SUPPORTED = 12,
+ PIPE_VIDEO_CAP_ENC_MAX_SLICES_PER_FRAME = 13,
+ PIPE_VIDEO_CAP_ENC_SLICES_STRUCTURE = 14,
+ PIPE_VIDEO_CAP_ENC_MAX_REFERENCES_PER_FRAME = 15,
};
+/* To be used with cap PIPE_VIDEO_CAP_ENC_SLICES_STRUCTURE*/
+/**
+ * pipe_video_cap_slice_structure
+ *
+ * This attribute determines slice structures supported by the
+ * driver for encoding. This attribute is a hint to the user so
+ * that he can choose a suitable surface size and how to arrange
+ * the encoding process of multiple slices per frame.
+ *
+ * More specifically, for H.264 encoding, this attribute
+ * determines the range of accepted values to
+ * h264_slice_descriptor::macroblock_address and
+ * h264_slice_descriptor::num_macroblocks.
+ */
+enum pipe_video_cap_slice_structure
+{
+ /* Driver does not supports multiple slice per frame.*/
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_NONE = 0x00000000,
+ /* Driver supports a power-of-two number of rows per slice.*/
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_POWER_OF_TWO_ROWS = 0x00000001,
+ /* Driver supports an arbitrary number of macroblocks per slice.*/
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS = 0x00000002,
+ /* Driver support 1 row per slice*/
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_ROWS = 0x00000004,
+ /* Driver support max encoded slice size per slice */
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_MAX_SLICE_SIZE = 0x00000008,
+ /* Driver supports an arbitrary number of rows per slice. */
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_ARBITRARY_ROWS = 0x00000010,
+ /* Driver supports any number of rows per slice but they must be the same
+ * for all slices except for the last one, which must be equal or smaller
+ * to the previous slices. */
+ PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_MULTI_ROWS = 0x00000020,
+};
+
+
enum pipe_video_entrypoint
{
PIPE_VIDEO_ENTRYPOINT_UNKNOWN,