hardware/intel/common/libva
修订版 | c21aaad55d016ef0c5d0d1ebc1772c3f3d5d8cb5 (tree) |
---|---|
时间 | 2009-06-19 03:59:00 |
作者 | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Austin Yuan |
Rename vaDbgCopySurfaceToBuffer ->vaCopySurfaceToBuffer, vaDbgCreateSurfaceFromMrstVL42Buffer->vaCreateSurfaceFromMrstVL42Buffer
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
@@ -223,7 +223,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) | ||
223 | 223 | CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes); |
224 | 224 | CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes); |
225 | 225 | CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes); |
226 | - CHECK_VTABLE(vaStatus, ctx, DbgCopySurfaceToBuffer); | |
227 | 226 | } |
228 | 227 | if (VA_STATUS_SUCCESS != vaStatus) |
229 | 228 | { |
@@ -537,20 +536,6 @@ VAStatus vaCreateSurfaces ( | ||
537 | 536 | } |
538 | 537 | |
539 | 538 | |
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 | - | |
554 | 539 | VAStatus vaDestroySurfaces ( |
555 | 540 | VADisplay dpy, |
556 | 541 | VASurfaceID *surface_list, |
@@ -1238,23 +1223,26 @@ VAStatus vaSetDisplayAttributes ( | ||
1238 | 1223 | } |
1239 | 1224 | |
1240 | 1225 | |
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 */ | |
1246 | 1230 | ) |
1247 | 1231 | { |
1248 | 1232 | VADriverContextP ctx; |
1249 | 1233 | CHECK_DISPLAY(dpy); |
1250 | 1234 | ctx = CTX(dpy); |
1251 | 1235 | |
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; | |
1254 | 1242 | } |
1255 | 1243 | |
1256 | -#warning TODO: Remove vaDbgCreateSurfaceFromMrstV4L2Buf in rev 0.29 | |
1257 | -VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf( | |
1244 | + | |
1245 | +VAStatus vaCreateSurfaceFromMrstV4L2Buf( | |
1258 | 1246 | VADisplay dpy, |
1259 | 1247 | unsigned int width, |
1260 | 1248 | unsigned int height, |
@@ -1273,7 +1261,34 @@ VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf( | ||
1273 | 1261 | CHECK_DISPLAY(dpy); |
1274 | 1262 | ctx = CTX(dpy); |
1275 | 1263 | |
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; | |
1278 | 1270 | } |
1279 | 1271 | |
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 | +} |
@@ -100,12 +100,6 @@ struct VADriverVTable | ||
100 | 100 | VASurfaceID *surfaces /* out */ |
101 | 101 | ); |
102 | 102 | |
103 | - VAStatus (*vaCreateSurfaceFromCIFrame) ( | |
104 | - VADriverContextP ctx, | |
105 | - unsigned long frame_id, | |
106 | - VASurfaceID *surface /* out */ | |
107 | - ); | |
108 | - | |
109 | 103 | VAStatus (*vaDestroySurfaces) ( |
110 | 104 | VADriverContextP ctx, |
111 | 105 | VASurfaceID *surface_list, |
@@ -380,14 +374,15 @@ struct VADriverVTable | ||
380 | 374 | int num_attributes |
381 | 375 | ); |
382 | 376 | |
383 | - | |
384 | - VAStatus (*vaDbgCopySurfaceToBuffer) ( | |
377 | + /* device specific */ | |
378 | + VAStatus (*vaCreateSurfaceFromCIFrame) ( | |
385 | 379 | VADriverContextP ctx, |
386 | - VASurfaceID surface, | |
387 | - void **buffer, /* out */ | |
388 | - unsigned int *stride /* out */ | |
380 | + unsigned long frame_id, | |
381 | + VASurfaceID *surface /* out */ | |
389 | 382 | ); |
390 | - VAStatus (*vaDbgCreateSurfaceFromMrstV4L2Buf) ( | |
383 | + | |
384 | + | |
385 | + VAStatus (*vaCreateSurfaceFromMrstV4L2Buf) ( | |
391 | 386 | VADriverContextP ctx, |
392 | 387 | unsigned int width, |
393 | 388 | unsigned int height, |
@@ -401,6 +396,19 @@ struct VADriverVTable | ||
401 | 396 | unsigned int chroma_v_offset, |
402 | 397 | VASurfaceID *surface /* out */ |
403 | 398 | ); |
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 | + ); | |
404 | 412 | }; |
405 | 413 | |
406 | 414 | struct VADriverContext |