• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

Revisión5d4faa102b49ef6dbf8a1fcd04a82a8c04030e6a (tree)
Tiempo2014-09-09 02:16:43
AutorAustin Yuan <shengquan.yuan@inte...>
CommiterXiang, Haihao

Log Message

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)

Cambiar Resumen

Diferencia incremental

--- a/va/va_fool.c
+++ b/va/va_fool.c
@@ -252,8 +252,14 @@ VAStatus va_FoolBufferInfo(
252252 unsigned int *num_elements /* out */
253253 )
254254 {
255+ unsigned int magic;
256+
255257 DPY2FOOLCTX_CHK(dpy);
256258
259+ magic = buf_id & FOOL_BUFID_MASK;
260+ if (magic != FOOL_BUFID_MAGIC)
261+ return 0; /* could be VAImageBufferType from vaDeriveImage */
262+
257263 *type = buf_id & 0xff;
258264 *size = fool_ctx->fool_buf_size[*type];
259265 *num_elements = fool_ctx->fool_buf_element[*type];;
@@ -342,9 +348,13 @@ VAStatus va_FoolMapBuffer(
342348 void **pbuf /* out */
343349 )
344350 {
345- unsigned int buftype;
351+ unsigned int magic, buftype;
346352 DPY2FOOLCTX_CHK(dpy);
347353
354+ magic = buf_id & FOOL_BUFID_MASK;
355+ if (magic != FOOL_BUFID_MAGIC)
356+ return 0; /* could be VAImageBufferType from vaDeriveImage */
357+
348358 buftype = buf_id & 0xff;
349359 *pbuf = fool_ctx->fool_buf[buftype];
350360
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -2938,7 +2938,7 @@ void va_TraceRenderPicture(
29382938
29392939 case VAProfileNone:
29402940 for (j=0; j<num_elements; j++) {
2941- va_TraceMsg(trace_ctx, "\telement[%d] = ", j);
2941+ va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
29422942
29432943 va_TraceNoneBuf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
29442944 }
@@ -2946,7 +2946,7 @@ void va_TraceRenderPicture(
29462946
29472947 case VAProfileVP8Version0_3:
29482948 for (j=0; j<num_elements; j++) {
2949- va_TraceMsg(trace_ctx, "\telement[%d] = ", j);
2949+ va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
29502950
29512951 va_TraceVP8Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
29522952 }