#include "vl_mpeg12_decoder.h"
bool
-vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile)
+vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint)
{
assert(screen);
switch (u_reduce_video_profile(profile)) {
(
pipe->screen,
templat->profile,
+ templat->entrypoint,
PIPE_VIDEO_CAP_NPOT_TEXTURES
);
* check if a given profile is supported with shader based decoding
*/
bool
-vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile);
+vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint);
/**
* get the maximum supported level for the given profile with shader based decoding
(
pipe->screen,
PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
PIPE_VIDEO_CAP_NPOT_TEXTURES
);
static int
ilo_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return vl_profile_supported(screen, profile);
+ return vl_profile_supported(screen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
static int
nouveau_screen_get_video_param(struct pipe_screen *pscreen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return vl_profile_supported(pscreen, profile);
+ return vl_profile_supported(pscreen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
int
nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
int chipset = nouveau_screen(pscreen)->device->chipset;
int
nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
boolean
int
nv84_screen_get_video_param(struct pipe_screen *pscreen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
boolean
int
nv84_screen_get_video_param(struct pipe_screen *pscreen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
static int r300_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return vl_profile_supported(screen, profile);
+ return vl_profile_supported(screen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 0;
case PIPE_VIDEO_CAP_MAX_WIDTH:
static int r600_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return vl_profile_supported(screen, profile);
+ return vl_profile_supported(screen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
int r600_uvd_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
/*
int r600_uvd_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
struct r600_screen *rscreen = (struct r600_screen *)screen;
}
}
- return ruvd_get_video_param(screen, profile, param);
+ return ruvd_get_video_param(screen, profile, entrypoint, param);
}
int ruvd_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
/* returns supported codecs and other parameters */
int ruvd_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
/* the hardware only supports NV12 */
static int r600_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return vl_profile_supported(screen, profile);
+ return vl_profile_supported(screen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
static int
softpipe_get_video_param(struct pipe_screen *screen,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return vl_profile_supported(screen, profile);
+ return vl_profile_supported(screen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 0;
case PIPE_VIDEO_CAP_MAX_WIDTH:
*/
int (*get_video_param)( struct pipe_screen *,
enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param );
/**
(
screen,
templat.profile,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_SUPPORTED
);
if (!supported) {
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) ||
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);
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);
}
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;
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:
(
pipe->screen,
PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_PREFERED_FORMAT
);
p_surf->templat.chroma_format = ChromaToPipe(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);
tex_templ.last_level = 0;
if (pipe->screen->get_video_param(pipe->screen,
PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
PIPE_VIDEO_CAP_NPOT_TEXTURES)) {
tex_templ.width0 = width;
tex_templ.height0 = height;
tmpl.buffer_format = pipe->screen->get_video_param
(
pipe->screen,
- PIPE_VIDEO_PROFILE_MPEG2_MAIN,
+ context_priv->decoder->profile,
+ context_priv->decoder->entrypoint,
PIPE_VIDEO_CAP_PREFERED_FORMAT
);
tmpl.chroma_format = context_priv->decoder->chroma_format;
tmpl.interlaced = pipe->screen->get_video_param
(
pipe->screen,
- PIPE_VIDEO_PROFILE_MPEG2_MAIN,
+ context_priv->decoder->profile,
+ context_priv->decoder->entrypoint,
PIPE_VIDEO_CAP_PREFERS_INTERLACED
);