summaryrefslogtreecommitdiff
path: root/va/va_fool.c
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@gmail.com>2010-10-26 10:18:11 -0700
committerAustin Yuan <shengquan.yuan@gmail.com>2010-10-26 10:18:11 -0700
commit866360c82ea76182bfa601a074c87d4c83325419 (patch)
treebcdf75eea76d17a67707625cccdc9d3803cd98cb /va/va_fool.c
parentfe9ee747b973118f21a9b838dd02972b96924c1e (diff)
downloadlibva-866360c82ea76182bfa601a074c87d4c83325419.tar.gz
more trace for displayattribute/vaPutSurface
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
Diffstat (limited to 'va/va_fool.c')
-rw-r--r--va/va_fool.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/va/va_fool.c b/va/va_fool.c
index f4d866f..bdb2fb9 100644
--- a/va/va_fool.c
+++ b/va/va_fool.c
@@ -52,28 +52,31 @@
* . if set, encode does nothing, but fill in a hard-coded 720P clip into coded buffer.
* . VA CONTEXT/CONFIG/SURFACE will call into drivers, but VA Buffer creation is done in here
* . Bypass all ~SvaBeginPic/vaRenderPic/vaEndPic~T
+ * LIBVA_FOOL_POSTP:
+ * . if set, do nothing for vaPutSurface
*/
/* global settings */
-/* LIBVA_FOOL_DECODE/LIBVA_FOOL_ENCODE */
+/* LIBVA_FOOL_DECODE/LIBVA_FOOL_ENCODE/LIBVA_FOOL_POSTP */
static int fool_decode = 0;
static int fool_encode = 0;
+int fool_postp = 0;
#define FOOL_CONTEXT_MAX 4
/* per context settings */
static struct _fool_context {
- VADisplay dpy;
+ VADisplay dpy; /* should use context as the key */
VAProfile fool_profile; /* current profile for buffers */
VAEntrypoint fool_entrypoint; /* current entrypoint */
FILE *fool_fp_codedclip; /* load a clip from disk for fooling encode*/
- /* all buffers with same type share one memory
+ /* all buffers with same type share one malloc-ed memory
* bufferID = (buffer numbers with the same type << 8) || type
- * the buffer memory can be find by fool_buf[bufferID & 0xff]
+ * the malloc-ed memory can be find by fool_buf[bufferID & 0xff]
* the size is ignored here
*/
char *fool_buf[VABufferTypeMax]; /* memory of fool buffers */
@@ -146,6 +149,9 @@ void va_FoolInit(VADisplay dpy)
if (fool_index == FOOL_CONTEXT_MAX)
return;
+ if (va_parseConfig("LIBVA_FOOL_POSTP", NULL) == 0)
+ fool_postp = 1;
+
if (va_parseConfig("LIBVA_FOOL_DECODE", NULL) == 0)
fool_decode = 1;