• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

修订版aa676947915a8fe0351e6537acbebaa9a1929e24 (tree)
时间2009-06-20 03:17:40
作者Austin Yuan <shengquan.yuan@inte...>
CommiterAustin Yuan

Log Message

Added more comments for vaCreateBufferFromV4L2Buffer

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>

更改概述

差异

--- a/src/va.c
+++ b/src/va.c
@@ -1224,7 +1224,14 @@ VAStatus vaSetDisplayAttributes (
12241224 return ctx->vtable.vaSetDisplayAttributes ( ctx, attr_list, num_attributes );
12251225 }
12261226
1227-
1227+/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear
1228+ * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information
1229+ * of the frame, and to determine if the frame can be wrapped as a VA surface
1230+ *
1231+ * Application should make sure the frame is idle before the frame is passed into VA stack
1232+ * and also a vaSyncSurface should be called before application tries to access the frame
1233+ * from CI stack
1234+ */
12281235 VAStatus vaCreateSurfaceFromCIFrame (
12291236 VADisplay dpy,
12301237 unsigned long frame_id,
@@ -1244,6 +1251,18 @@ VAStatus vaCreateSurfaceFromCIFrame (
12441251 }
12451252
12461253
1254+/* Wrap a V4L2 buffer as a VA surface, so that V4L2 camera, VA encode
1255+ * can share the data without copy
1256+ * The VA driver should query the camera device from v4l2_fd to see
1257+ * if camera device memory/buffer can be wrapped into a VA surface
1258+ * Buffer information is passed in by v4l2_fmt and v4l2_buf structure,
1259+ * VA driver also needs do further check if the buffer can meet encode
1260+ * hardware requirement, such as dimension, fourcc, stride, etc
1261+ *
1262+ * Application should make sure the buffer is idle before the frame into VA stack
1263+ * and also a vaSyncSurface should be called before application tries to access the frame
1264+ * from V4L2 stack
1265+ */
12471266 VAStatus vaCreateSurfaceFromV4L2Buf(
12481267 VADisplay dpy,
12491268 int v4l2_fd, /* file descriptor of V4L2 device */
@@ -1264,6 +1283,10 @@ VAStatus vaCreateSurfaceFromV4L2Buf(
12641283 return VA_STATUS_ERROR_UNKNOWN;
12651284 }
12661285
1286+/* It is a debug interface, and isn't exported in core VAAPI
1287+ * It is used to dump surface data into system memory
1288+ * Application should explicitly call free to release the buffer memory
1289+ */
12671290
12681291 VAStatus vaCopySurfaceToBuffer(VADisplay dpy,
12691292 VASurfaceID surface,