Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add output value interface for the values from driver #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions va/va.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,22 @@ VAStatus vaQuerySurfaceError (
return va_status;
}

VAStatus vaQueryOutputValue(
VADisplay dpy,
VAContextID context,
VAOutputValueTypes output_value_type,
void *output_value)
{
VAStatus va_status;
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);

va_status = ctx->vtable->vaQueryOutputValue( ctx,context,output_value_type, output_value );

return va_status;
}

/* Get maximum number of image formats supported by the implementation */
int vaMaxNumImageFormats (
VADisplay dpy
Expand Down
18 changes: 18 additions & 0 deletions va/va.h
Original file line number Diff line number Diff line change
Expand Up @@ -3625,6 +3625,24 @@ VAStatus vaQuerySurfaceError(
void **error_info
);

/**out put value types, used by \vaQueryOutputValue */
typedef enum
{
VAOutputDecodeCRC = 1
}VAOutputValueTypes;

/**
* this interface is to get some values from driver or HW
* after calling vaSyncSurface, the value type is defined with \c VAOutputValueTypes
* the output_value should be a pointer allocated by application.
* it can be a single value or a structure.
*/
VAStatus vaQueryOutputValue(
VADisplay dpy,
VAContextID context,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also add the surfaceID 'VASurfaceID render_target' in this interface? it maybe more flexiable for usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jexu, if add VASurfaceID render_target, it seems that it was changed to another function, calculate the input surface CRC?

VAOutputValueTypes output_value_type,
void *output_value);

/**
* Images and Subpictures
* VAImage is used to either get the surface data to client memory, or
Expand Down
9 changes: 8 additions & 1 deletion va/va_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,15 @@ struct VADriverVTable
void *descriptor /* out */
);

VAStatus
(*vaQueryOutputValue)(
VADriverContextP ctx,
VAContextID context, /* in */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also add the surfaceID 'VASurfaceID render_target' in this interface? it maybe more flexiable for usage.

VAOutputValueTypes output_value_type,/* in */
void *output_value /* out */
);
/** \brief Reserved bytes for future use, must be zero */
unsigned long reserved[57];
unsigned long reserved[56];
};

struct VADriverContext
Expand Down