summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2014-02-27 15:36:17 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-09-09 01:16:43 +0800
commit5d4faa102b49ef6dbf8a1fcd04a82a8c04030e6a (patch)
tree93d20b8e683da8880f6afab91570179da03bade0
parent3b656e4063b484fa1d76e539c39454a119548ed8 (diff)
vafool: fix the vaMapBuffer for the buffer from vaDeriveImage
It is not desired to run into FOOL path for the vaMapBuffer from vaDeriveImage Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 2896166fefa36772ea6946ebc5df85024928dd6c)
-rw-r--r--va/va_fool.c12
-rw-r--r--va/va_trace.c4
2 files changed, 13 insertions, 3 deletions
diff --git a/va/va_fool.c b/va/va_fool.c
index 95d1880..9f7a045 100644
--- a/va/va_fool.c
+++ b/va/va_fool.c
@@ -252,8 +252,14 @@ VAStatus va_FoolBufferInfo(
unsigned int *num_elements /* out */
)
{
+ unsigned int magic;
+
DPY2FOOLCTX_CHK(dpy);
+ magic = buf_id & FOOL_BUFID_MASK;
+ if (magic != FOOL_BUFID_MAGIC)
+ return 0; /* could be VAImageBufferType from vaDeriveImage */
+
*type = buf_id & 0xff;
*size = fool_ctx->fool_buf_size[*type];
*num_elements = fool_ctx->fool_buf_element[*type];;
@@ -342,9 +348,13 @@ VAStatus va_FoolMapBuffer(
void **pbuf /* out */
)
{
- unsigned int buftype;
+ unsigned int magic, buftype;
DPY2FOOLCTX_CHK(dpy);
+ magic = buf_id & FOOL_BUFID_MASK;
+ if (magic != FOOL_BUFID_MAGIC)
+ return 0; /* could be VAImageBufferType from vaDeriveImage */
+
buftype = buf_id & 0xff;
*pbuf = fool_ctx->fool_buf[buftype];
diff --git a/va/va_trace.c b/va/va_trace.c
index c2479cd..5df619a 100644
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -2938,7 +2938,7 @@ void va_TraceRenderPicture(
case VAProfileNone:
for (j=0; j<num_elements; j++) {
- va_TraceMsg(trace_ctx, "\telement[%d] = ", j);
+ va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
va_TraceNoneBuf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
}
@@ -2946,7 +2946,7 @@ void va_TraceRenderPicture(
case VAProfileVP8Version0_3:
for (j=0; j<num_elements; j++) {
- va_TraceMsg(trace_ctx, "\telement[%d] = ", j);
+ va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
va_TraceVP8Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
}