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 surface hint for recon/reference/raw #344

Closed
wants to merge 1 commit into from
Closed
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
23 changes: 22 additions & 1 deletion va/va.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,10 @@ typedef enum
* implementation, multiple frames encode/decode can improve HW concurrency
*/
VAConfigAttribMultipleFrame = 40,
/** \brief this attribute is used to check addtional surface requirement
* the default value is 0, other value need to check /c VAConfigAttribValSurfaceReq
*/
VAConfigAttribSurfaceReq = 41,
/**@}*/
VAConfigAttribTypeMax
} VAConfigAttribType;
Expand Down Expand Up @@ -876,6 +880,20 @@ typedef struct _VAConfigAttrib {
/** \brief Driver supports base mode for slice decoding */
#define VA_DEC_SLICE_MODE_BASE 0x00000002

/** @name Attribute values for VAConfigAttribValSurfaceReq */
/**@{*/
typedef union _VAConfigAttribValSurfaceReq{
struct {
/** \brief encode raw input surface and recon surface is with different layout inside backend driver
* default value is zero, when it is 1, application need to set surface usage hint
* /c VA_SURFACE_ATTRIB_USAGE_HINT_RECON & VA_SURFACE_ATTRIB_USAGE_HINT_RAW when call vaCreateSurfaces to create surfaces */
uint32_t input_recon_diff :1;
/** \brief Reserved for future use. must be zero */
uint32_t reserved:31;
}bits;
uint32_t value;
}VAConfigAttribValSurfaceReq;

/** @name Attribute values for VAConfigAttribDecJPEG */
/**@{*/
typedef union _VAConfigAttribValDecJPEG {
Expand Down Expand Up @@ -1431,7 +1449,10 @@ typedef struct _VASurfaceAttribExternalBuffers {
/** \brief Surface used for export to third-party APIs, e.g. via
* vaExportSurfaceHandle(). */
#define VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT 0x00000020

/** \brief Surface used as reconstruct/reference */
#define VA_SURFACE_ATTRIB_USAGE_HINT_RECON 0x00000100
/** \brief Surface used for raw input */
#define VA_SURFACE_ATTRIB_USAGE_HINT_RAW 0X00000200
/**@}*/

/**
Expand Down
1 change: 1 addition & 0 deletions va/va_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
TOSTR(VAConfigAttribMaxFrameSize);
TOSTR(VAConfigAttribPredictionDirection);
TOSTR(VAConfigAttribMultipleFrame);
TOSTR(VAConfigAttribSurfaceReq);
case VAConfigAttribTypeMax: break;
}
return "<unknown config attribute type>";
Expand Down