summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2017-09-06 14:08:26 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2017-09-27 12:49:34 +0800
commit492b692005ccd0d8da190209d5b3ae7b7825f4b8 (patch)
tree0fa820a3369588da6eb29611ae5f2411fac23b9d
parent2d9c4d589b31507951ff2688fdb6784435de4a9d (diff)
downloadlibva-492b692005ccd0d8da190209d5b3ae7b7825f4b8.tar.gz
Update the comments for context and surface
Remove the limitation that a surface can't be shared between different contexts at the same time. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--va/va.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/va/va.h b/va/va.h
index e4b3d10..1c5bb12 100644
--- a/va/va.h
+++ b/va/va.h
@@ -864,14 +864,17 @@ VAStatus vaQueryConfigAttributes (
/**
* Contexts and Surfaces
*
- * Context represents a "virtual" video decode pipeline. Surfaces are render
- * targets for a given context. The data in the surfaces are not accessible
- * to the client and the internal data format of the surface is implementatin
- * specific.
+ * Context represents a "virtual" video decode, encode or video processing
+ * pipeline. Surfaces are render targets for a given context. The data in the
+ * surfaces are not accessible to the client except if derived image is supported
+ * and the internal data format of the surface is implementation specific.
*
- * Surfaces will be bound to a context when the context is created. Once
- * a surface is bound to a given context, it can not be used to create
- * another context. The association is removed when the context is destroyed
+ * Surfaces are provided as a hint of what surfaces will be used when the context
+ * is created through vaCreateContext(). A surface may be used by different contexts
+ * at the same time as soon as application can make sure the operations are synchronized
+ * between different contexts, e.g. a surface is used as the output of a decode context
+ * and the input of a video process context. Surfaces can only be destroyed after all
+ * contexts using these surfaces have been destroyed.
*
* Both contexts and surfaces are identified by unique IDs and its
* implementation specific internals are kept opaque to the clients
@@ -1105,7 +1108,7 @@ vaCreateSurfaces(
/**
* vaDestroySurfaces - Destroy resources associated with surfaces.
- * Surfaces can only be destroyed after the context associated has been
+ * Surfaces can only be destroyed after all contexts using these surfaces have been
* destroyed.
* dpy: display
* surfaces: array of surfaces to destroy
@@ -1126,7 +1129,7 @@ VAStatus vaDestroySurfaces (
* picture_height: coded picture height
* flag: any combination of the following:
* VA_PROGRESSIVE (only progressive frame pictures in the sequence when set)
- * render_targets: render targets (surfaces) tied to the context
+ * render_targets: a hint for render targets (surfaces) tied to the context
* num_render_targets: number of render targets in the above array
* context: created context id upon return
*/