summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-07-15 08:31:25 -0600
committerChristian König <[email protected]>2013-08-19 10:21:15 +0200
commita15cbabb8b546fa063cfb6f528dd67ee0037079b (patch)
tree12c03b8f268ce819f1134bedbb893a451b4377e4 /src/gallium/state_trackers/vdpau
parentf2f7064e560a83fc78d0e5b1d3a7d4aaac119a49 (diff)
vl: add entrypoint to get_video_param
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c13
-rw-r--r--src/gallium/state_trackers/vdpau/mixer.c4
-rw-r--r--src/gallium/state_trackers/vdpau/query.c18
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c2
4 files changed, 25 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 09927c564e8..f25a0eb8c49 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -76,6 +76,7 @@ vlVdpDecoderCreate(VdpDevice device,
(
screen,
templat.profile,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_SUPPORTED
);
if (!supported) {
@@ -459,8 +460,10 @@ vlVdpDecoderRender(VdpDecoder decoder,
pipe_mutex_lock(vlsurf->device->mutex);
- buffer_support[0] = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE);
- buffer_support[1] = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_CAP_SUPPORTS_INTERLACED);
+ buffer_support[0] = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE);
+ buffer_support[1] = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_SUPPORTS_INTERLACED);
if (vlsurf->video_buffer == NULL ||
!screen->is_video_format_supported(screen, vlsurf->video_buffer->buffer_format, dec->profile) ||
@@ -471,10 +474,12 @@ vlVdpDecoderRender(VdpDecoder decoder,
vlsurf->video_buffer->destroy(vlsurf->video_buffer);
/* set the buffer format to the prefered one */
- vlsurf->templat.buffer_format = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_CAP_PREFERED_FORMAT);
+ vlsurf->templat.buffer_format = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_PREFERED_FORMAT);
/* also set interlacing to decoders preferences */
- vlsurf->templat.interlaced = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_CAP_PREFERS_INTERLACED);
+ vlsurf->templat.interlaced = screen->get_video_param(screen, dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_PREFERS_INTERLACED);
/* and recreate the video buffer */
vlsurf->video_buffer = dec->context->create_video_buffer(dec->context, &vlsurf->templat);
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index 26db5c8bd8b..18439a78f4a 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -132,8 +132,8 @@ vlVdpVideoMixerCreate(VdpDevice device,
VDPAU_MSG(VDPAU_WARN, "[VDPAU] Max layers > 4 not supported\n", vmixer->max_layers);
goto no_params;
}
- max_width = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_WIDTH);
- max_height = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_HEIGHT);
+ max_width = screen->get_video_param(screen, prof, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_MAX_WIDTH);
+ max_height = screen->get_video_param(screen, prof, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_MAX_HEIGHT);
if (vmixer->video_width < 48 ||
vmixer->video_width > max_width) {
VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for width\n", vmixer->video_width, max_width);
diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c
index a6b34c719b7..fff7d6ba55b 100644
--- a/src/gallium/state_trackers/vdpau/query.c
+++ b/src/gallium/state_trackers/vdpau/query.c
@@ -178,11 +178,15 @@ vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile,
}
pipe_mutex_lock(dev->mutex);
- *is_supported = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_SUPPORTED);
+ *is_supported = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_SUPPORTED);
if (*is_supported) {
- *max_width = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_MAX_WIDTH);
- *max_height = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_MAX_HEIGHT);
- *max_level = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_MAX_LEVEL);
+ *max_width = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_MAX_WIDTH);
+ *max_height = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_MAX_HEIGHT);
+ *max_level = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_MAX_LEVEL);
*max_macroblocks = (*max_width/16)*(*max_height/16);
} else {
*max_width = 0;
@@ -512,11 +516,13 @@ vlVdpVideoMixerQueryParameterValueRange(VdpDevice device, VdpVideoMixerParameter
switch (parameter) {
case VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH:
*(uint32_t*)min_value = 48;
- *(uint32_t*)max_value = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_WIDTH);
+ *(uint32_t*)max_value = screen->get_video_param(screen, prof, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_MAX_WIDTH);
break;
case VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT:
*(uint32_t*)min_value = 48;
- *(uint32_t*)max_value = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_HEIGHT);
+ *(uint32_t*)max_value = screen->get_video_param(screen, prof, PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_MAX_HEIGHT);
break;
case VDP_VIDEO_MIXER_PARAMETER_LAYERS:
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index bd11fc3cdec..a26f9b6bb49 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -75,6 +75,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
(
pipe->screen,
PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_PREFERED_FORMAT
);
p_surf->templat.chroma_format = ChromaToPipe(chroma_type);
@@ -84,6 +85,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
(
pipe->screen,
PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_PREFERS_INTERLACED
);
p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat);