• 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

修订版c21aaad55d016ef0c5d0d1ebc1772c3f3d5d8cb5 (tree)
时间2009-06-19 03:59:00
作者Austin Yuan <shengquan.yuan@inte...>
CommiterAustin Yuan

Log Message

Rename vaDbgCopySurfaceToBuffer ->vaCopySurfaceToBuffer, vaDbgCreateSurfaceFromMrstVL42Buffer->vaCreateSurfaceFromMrstVL42Buffer

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

更改概述

差异

--- a/src/va.c
+++ b/src/va.c
@@ -223,7 +223,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
223223 CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes);
224224 CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes);
225225 CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes);
226- CHECK_VTABLE(vaStatus, ctx, DbgCopySurfaceToBuffer);
227226 }
228227 if (VA_STATUS_SUCCESS != vaStatus)
229228 {
@@ -537,20 +536,6 @@ VAStatus vaCreateSurfaces (
537536 }
538537
539538
540-VAStatus vaCreateSurfaceFromCIFrame (
541- VADisplay dpy,
542- unsigned long frame_id,
543- VASurfaceID *surface /* out */
544-)
545-{
546- VADriverContextP ctx;
547- CHECK_DISPLAY(dpy);
548- ctx = CTX(dpy);
549-
550- TRACE(vaCreateSurfacesFromCIFrame);
551- return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
552-}
553-
554539 VAStatus vaDestroySurfaces (
555540 VADisplay dpy,
556541 VASurfaceID *surface_list,
@@ -1238,23 +1223,26 @@ VAStatus vaSetDisplayAttributes (
12381223 }
12391224
12401225
1241-#warning TODO: Remove vaDbgCopySurfaceToBuffer in rev 0.29
1242-VAStatus vaDbgCopySurfaceToBuffer(VADisplay dpy,
1243- VASurfaceID surface,
1244- void **buffer, /* out */
1245- unsigned int *stride /* out */
1226+VAStatus vaCreateSurfaceFromCIFrame (
1227+ VADisplay dpy,
1228+ unsigned long frame_id,
1229+ VASurfaceID *surface /* out */
12461230 )
12471231 {
12481232 VADriverContextP ctx;
12491233 CHECK_DISPLAY(dpy);
12501234 ctx = CTX(dpy);
12511235
1252- TRACE(vaDbgCopySurfaceToBuffer);
1253- return ctx->vtable.vaDbgCopySurfaceToBuffer( ctx, surface, buffer, stride );
1236+ TRACE(vaCreateSurfacesFromCIFrame);
1237+
1238+ if (ctx->vtable.vaCreateSurfaceFromCIFrame)
1239+ return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
1240+ else
1241+ return VA_STATUS_ERROR_UNKNOWN;
12541242 }
12551243
1256-#warning TODO: Remove vaDbgCreateSurfaceFromMrstV4L2Buf in rev 0.29
1257-VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf(
1244+
1245+VAStatus vaCreateSurfaceFromMrstV4L2Buf(
12581246 VADisplay dpy,
12591247 unsigned int width,
12601248 unsigned int height,
@@ -1273,7 +1261,34 @@ VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf(
12731261 CHECK_DISPLAY(dpy);
12741262 ctx = CTX(dpy);
12751263
1276- TRACE(vtable.vaDbgCreateSurfaceFromMrstV4L2Buf);
1277- return ctx->vtable.vaDbgCreateSurfaceFromMrstV4L2Buf( ctx, width, height, size, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, surface );
1264+ TRACE(vtable.vaCreateSurfaceFromMrstV4L2Buf);
1265+
1266+ if (ctx->vtable.vaCreateSurfaceFromMrstV4L2Buf)
1267+ return ctx->vtable.vaCreateSurfaceFromMrstV4L2Buf( ctx, width, height, size, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, surface );
1268+ else
1269+ return VA_STATUS_ERROR_UNKNOWN;
12781270 }
12791271
1272+
1273+VAStatus vaCopySurfaceToBuffer(VADisplay dpy,
1274+ VASurfaceID surface,
1275+ unsigned int *fourcc, /* following are output argument */
1276+ unsigned int *luma_stride,
1277+ unsigned int *chroma_u_stride,
1278+ unsigned int *chroma_v_stride,
1279+ unsigned int *luma_offset,
1280+ unsigned int *chroma_u_offset,
1281+ unsigned int *chroma_v_offset,
1282+ void **buffer
1283+)
1284+{
1285+ VADriverContextP ctx;
1286+ CHECK_DISPLAY(dpy);
1287+ ctx = CTX(dpy);
1288+
1289+ TRACE(vaCopySurfaceToBuffer);
1290+ if (ctx->vtable.vaCopySurfaceToBuffer)
1291+ return ctx->vtable.vaCopySurfaceToBuffer( ctx, surface, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, buffer);
1292+ else
1293+ return VA_STATUS_ERROR_UNKNOWN;
1294+}
--- a/src/va_backend.h
+++ b/src/va_backend.h
@@ -100,12 +100,6 @@ struct VADriverVTable
100100 VASurfaceID *surfaces /* out */
101101 );
102102
103- VAStatus (*vaCreateSurfaceFromCIFrame) (
104- VADriverContextP ctx,
105- unsigned long frame_id,
106- VASurfaceID *surface /* out */
107- );
108-
109103 VAStatus (*vaDestroySurfaces) (
110104 VADriverContextP ctx,
111105 VASurfaceID *surface_list,
@@ -380,14 +374,15 @@ struct VADriverVTable
380374 int num_attributes
381375 );
382376
383-
384- VAStatus (*vaDbgCopySurfaceToBuffer) (
377+ /* device specific */
378+ VAStatus (*vaCreateSurfaceFromCIFrame) (
385379 VADriverContextP ctx,
386- VASurfaceID surface,
387- void **buffer, /* out */
388- unsigned int *stride /* out */
380+ unsigned long frame_id,
381+ VASurfaceID *surface /* out */
389382 );
390- VAStatus (*vaDbgCreateSurfaceFromMrstV4L2Buf) (
383+
384+
385+ VAStatus (*vaCreateSurfaceFromMrstV4L2Buf) (
391386 VADriverContextP ctx,
392387 unsigned int width,
393388 unsigned int height,
@@ -401,6 +396,19 @@ struct VADriverVTable
401396 unsigned int chroma_v_offset,
402397 VASurfaceID *surface /* out */
403398 );
399+
400+ VAStatus (*vaCopySurfaceToBuffer) (
401+ VADriverContextP ctx,
402+ VASurfaceID surface,
403+ unsigned int *fourcc, /* out for follow argument */
404+ unsigned int *luma_stride,
405+ unsigned int *chroma_u_stride,
406+ unsigned int *chroma_v_stride,
407+ unsigned int *luma_offset,
408+ unsigned int *chroma_u_offset,
409+ unsigned int *chroma_v_offset,
410+ void **buffer
411+ );
404412 };
405413
406414 struct VADriverContext