summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@gmail.com>2010-10-26 09:18:04 -0700
committerAustin Yuan <shengquan.yuan@gmail.com>2010-10-26 09:18:04 -0700
commitfe9ee747b973118f21a9b838dd02972b96924c1e (patch)
treef75edf0822c4d48a17f32444e4afb441c78c7e1a
parent37f6ccf3142b0cefdb0feb3b32716ecf38a29e8b (diff)
downloadlibva-fe9ee747b973118f21a9b838dd02972b96924c1e.tar.gz
fix build issue on Android
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
-rw-r--r--va/va_fool.c21
-rw-r--r--va/va_fool.h10
-rw-r--r--va/va_trace.c11
3 files changed, 38 insertions, 4 deletions
diff --git a/va/va_fool.c b/va/va_fool.c
index 3826e00..f4d866f 100644
--- a/va/va_fool.c
+++ b/va/va_fool.c
@@ -40,7 +40,20 @@
#include "va_fool_264.h"
-/* do dummy decode/encode, ignore the input data */
+
+/*
+ * Do dummy decode/encode, ignore the input data
+ * In order to debug memory leak or low performance issues, we need to isolate driver problems
+ * We export env "VA_FOOL", with which, we can do fake decode/encode:
+ *
+ * LIBVA_FOOL_DECODE:
+ * . if set, decode does nothing, but fill in some YUV data
+ * LIBVA_FOOL_ENCODE:
+ * . 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
+ */
+
/* global settings */
@@ -274,7 +287,7 @@ int va_FoolCreateSurfaces(
unsigned int chroma_v_offset;
unsigned int buffer_name;
void *buffer = NULL;
- char *Y_data, *U_data, *V_data;
+ unsigned char *Y_data, *U_data, *V_data;
int box_width = num_surfaces/2;
int row_shift = 0;
@@ -320,9 +333,9 @@ int va_FoolCreateSurfaces(
if (row_shift==(2*box_width))
row_shift= 0;
}
- return;
+ return 0; /* the return value is ignored */
}
- return ;
+ return 0; /* the return value is ignored */
}
VAStatus va_FoolCreateBuffer (
diff --git a/va/va_fool.h b/va/va_fool.h
index 6b49a83..792d6c6 100644
--- a/va/va_fool.h
+++ b/va/va_fool.h
@@ -86,4 +86,14 @@ VAStatus va_FoolUnmapBuffer (
VABufferID buf_id /* in */
);
+
+VAStatus va_FoolQuerySubpictureFormats (
+ VADisplay dpy,
+ VAImageFormat *format_list,
+ unsigned int *flags,
+ unsigned int *num_formats
+);
+
+
+
#endif
diff --git a/va/va_trace.c b/va/va_trace.c
index 9c5bc16..dd1181f 100644
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -38,6 +38,17 @@
#include <sys/stat.h>
#include <unistd.h>
+/*
+ * Export env "VA_TRACE" to debug some corruptions issues
+ * .LIBVA_TRACE=log_file: general VA parameters saved into log_file
+ * .LIBVA_TRACE_BUFDATA: dump VA buffer data into log_file (if not set, just calculate a checksum)
+ * .LIBVA_TRACE_CODEDBUF=coded_clip_file: save the coded clip into file coded_clip_file
+ * .LIBVA_TRACE_SURFACE=decoded_yuv_file: save the decoded YUV file decoded_yuv_file
+ * .LIBVA_TRACE_LOGSIZE=numeric number: truncate the log_file or coded_clip_file, or decoded_yuv_file
+ * when the size is bigger than the number
+ */
+
+
/* global settings */
/* LIBVA_TRACE */