diff options
author | Carl Zhang <carl.zhang@intel.com> | 2020-08-19 12:20:02 -0400 |
---|---|---|
committer | XinfengZhang <carl.zhang@intel.com> | 2020-10-15 22:35:47 +0800 |
commit | 43009227c2f7410f8776a455a7e66fc88e01194c (patch) | |
tree | fc639cbff775e3ad7a59cf73d570e755e62ea9f5 | |
parent | d9676538e84319d6954f7d6fd70be0f3073d044f (diff) | |
download | libva-43009227c2f7410f8776a455a7e66fc88e01194c.tar.gz |
add a bufer type to adjust context priority dynamically
Signed-off-by: Carl Zhang <carl.zhang@intel.com>
-rw-r--r-- | va/va.h | 32 | ||||
-rw-r--r-- | va/va_str.c | 1 |
2 files changed, 32 insertions, 1 deletions
@@ -792,6 +792,7 @@ typedef enum VAConfigAttribMultipleFrame = 40, /** \brief priority setting for the context. Read-Write * attribute value is \c VAConfigAttribValContextPriority + * this setting also could be update by \c VAContextParameterUpdateBuffer */ VAConfigAttribContextPriority = 41, /**@}*/ @@ -1152,7 +1153,7 @@ typedef union _VAConfigAttribValMultipleFrame { uint32_t value; }VAConfigAttribValMultipleFrame; -/** brief Attribute value VAConfigAttribValContestPriority */ +/** brief Attribute value VAConfigAttribValContextPriority */ typedef union _VAConfigAttribValContextPriority{ struct{ /** \brief the priority , for the Query operation (read) it represents highest priority @@ -1775,10 +1776,38 @@ typedef enum * entry_offset_to_subset_array in VAPictureParameterBufferHEVC data structure. */ VASubsetsParameterBufferType = 57, + /** \brief adjust context parameters dynamically + * + * this parameter is used to update context parameters, detail parameter is in + * \c VAContextParameterUpdateBuffer + */ + VAContextParameterUpdateBufferType = 58, VABufferTypeMax } VABufferType; +/** \brief update the context parameter + * this structure is used to update context parameters, such as priority of the context + * backend driver should keep the parameter unchanged if there no new + * parameter updated. + */ +typedef struct _VAContextParameterUpdateBuffer +{ + union{ + struct { + /** \brief indicate whether context priority changed */ + uint32_t context_priority_update :1; + /** \brief Reserved bits for future use, must be zero */ + uint32_t reserved :31; + } bits; + uint32_t value; + }flags; + /** \brief task/context priority */ + VAConfigAttribValContextPriority context_priority; + /** \brief Reserved bytes for future use, must be zero */ + uint32_t reserved[VA_PADDING_MEDIUM]; +} VAContextParameterUpdateBuffer; + /** * Processing rate parameter for encode. */ @@ -2547,6 +2576,7 @@ typedef struct _VAEncMiscParameterCustomRoundingControl uint32_t value; } rounding_offset_setting; } VAEncMiscParameterCustomRoundingControl; + /** * There will be cases where the bitstream buffer will not have enough room to hold * the data for the entire slice, and the following flags will be used in the slice diff --git a/va/va_str.c b/va/va_str.c index 4b631ca..d6c0fa5 100644 --- a/va/va_str.c +++ b/va/va_str.c @@ -179,6 +179,7 @@ const char *vaBufferTypeStr(VABufferType bufferType) TOSTR(VAEncFEICTBCmdBufferType); TOSTR(VAEncFEICURecordBufferType); TOSTR(VASubsetsParameterBufferType); + TOSTR(VAContextParameterUpdateBufferType); case VABufferTypeMax: break; } return "<unknown buffer type>"; |