OSDN Git Service

Move some common macro definitions to the new internal header
authorMark Thompson <sw@jkqxz.net>
Mon, 19 Jun 2017 18:09:12 +0000 (19:09 +0100)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 27 Sep 2017 04:48:16 +0000 (12:48 +0800)
Signed-off-by: Mark Thompson <sw@jkqxz.net>
va/android/va_android.cpp
va/egl/va_egl.c
va/va.c
va/va_internal.h
va/va_tpi.c
va/x11/va_x11.c

index 6f0324b..873609c 100644 (file)
@@ -165,9 +165,6 @@ VADisplay vaGetDisplay (
     return dpy;
 }
 
-#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
-#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
-
 
 extern "C"  {
     extern int fool_postp; /* do nothing for vaPutSurface if set */
index 36e5504..3462183 100644 (file)
@@ -57,9 +57,8 @@
 #include "va.h"
 #include "va_backend_egl.h"
 #include "va_egl.h"
+#include "va_internal.h"
 
-#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
-#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
 
 VAStatus vaGetEGLClientBufferFromSurface (
     VADisplay dpy,
diff --git a/va/va.c b/va/va.c
index 813a552..bc267d4 100644 (file)
--- a/va/va.c
+++ b/va/va.c
@@ -50,9 +50,6 @@
 
 #define DRIVER_EXTENSION       "_drv_video.so"
 
-#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
-#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
-
 #define ASSERT         assert
 #define CHECK_VTABLE(s, ctx, func) if (!va_checkVtable(ctx->vtable->va##func, #func)) s = VA_STATUS_ERROR_UNKNOWN;
 #define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN;
index 4d60368..6639803 100644 (file)
@@ -25,6 +25,9 @@
 #ifndef VA_INTERNAL_H
 #define VA_INTERNAL_H
 
+#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
+#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
+
 void va_errorMessage(const char *msg, ...);
 void va_infoMessage(const char *msg, ...);
 
index 21d547d..46cf384 100644 (file)
@@ -27,6 +27,7 @@
 #include "va.h"
 #include "va_backend.h"
 #include "va_backend_tpi.h"
+#include "va_internal.h"
 
 #include <assert.h>
 #include <stdarg.h>
@@ -36,9 +37,6 @@
 #include <dlfcn.h>
 #include <unistd.h>
 
-#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
-#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
-
 
 /*
  * Create surfaces with special inputs/requirements
index a8db4c8..ab53b9b 100644 (file)
@@ -195,8 +195,6 @@ VADisplay vaGetDisplay (
   return dpy;
 }
 
-#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
-#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
 
 void va_TracePutSurface (
     VADisplay dpy,