summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2021-07-22 10:17:30 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2021-07-22 10:17:30 +0000
commitca11beabae33eb59fb981b8adf50b1d47a2a98f0 (patch)
tree3e4691a396e6e54cd54224a190663d5cf976625b /lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h
parent27c8a50e8bbde7d28b1fc46d715a4c469e24f2c4 (diff)
Import Mesa 21.1.5
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h')
-rw-r--r--lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h b/lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h
index ee8b5f146..f777ddb0f 100644
--- a/lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h
+++ b/lib/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h
@@ -54,14 +54,14 @@ vl_video_buffer_adjust_size(unsigned *width, unsigned *height, unsigned plane,
bool interlaced)
{
if (interlaced) {
- *height /= 2;
+ *height = align(*height, 2) / 2;
}
if (plane > 0) {
if (chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420) {
- *width /= 2;
- *height /= 2;
+ *width = align(*width, 2) / 2;
+ *height = align(*height, 2) / 2;
} else if (chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) {
- *width /= 2;
+ *width = align(*width, 2) / 2;
}
}
}
@@ -119,7 +119,8 @@ vl_video_buffer_template(struct pipe_resource *templ,
const struct pipe_video_buffer *templat,
enum pipe_format resource_format,
unsigned depth, unsigned array_size,
- unsigned usage, unsigned plane);
+ unsigned usage, unsigned plane,
+ enum pipe_video_chroma_format chroma_format);
/**
* creates a video buffer, can be used as a standard implementation for pipe->create_video_buffer
@@ -135,7 +136,8 @@ struct pipe_video_buffer *
vl_video_buffer_create_ex(struct pipe_context *pipe,
const struct pipe_video_buffer *templat,
const enum pipe_format resource_formats[VL_NUM_COMPONENTS],
- unsigned depth, unsigned array_size, unsigned usage);
+ unsigned depth, unsigned array_size, unsigned usage,
+ enum pipe_video_chroma_format chroma_format);
/**
* even more extended create function, provide the pipe_resource for each plane
@@ -148,6 +150,8 @@ vl_video_buffer_create_ex2(struct pipe_context *pipe,
/* Create pipe_video_buffer by using resource_create with planar formats. */
struct pipe_video_buffer *
vl_video_buffer_create_as_resource(struct pipe_context *pipe,
- const struct pipe_video_buffer *tmpl);
+ const struct pipe_video_buffer *tmpl,
+ const uint64_t *modifiers,
+ int modifiers_count);
#endif /* vl_video_buffer_h */