summaryrefslogtreecommitdiff
path: root/va/va.c
AgeCommit message (Collapse)AuthorFilesLines
2017-02-18PROJECT HAS MOVEDHEADmasterSean V Kelley1-1877/+0
See https://github.com/01org/libva Signed-off-by: Sean V Kelley <seanvk@posteo.de>
2017-01-23va: Keep compatibility with the backend driver built against 0.39.xXiang, Haihao1-0/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99375 Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2016-10-27Add callbacks for error and info messages.Emmanuel Gil Peyrot1-0/+53
This lets any application using libva choose the best way to report info and error messages to the user, for example graphical application can open a popup on errors and write info messages in the toolbar. Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-08-01Properly terminate parsed environment values with '\0'.Tobias Stoeckmann1-2/+6
The function strncpy() does not guarantee to nul terminate the destination. In most cases, this cannot be triggered, but it is also used to parse user environment variables. These are allowed to be longer than 1023 characters, effectively resulting in an unterminated string. I've adjusted other places as well, because it won't hurt. https://bugs.freedesktop.org/show_bug.cgi?id=96677
2016-05-13add the support of multiple context tracingpeng.chen1-2/+14
Libva has a limited tracing function before. If more than one context is created in one instance, then this tracing can't work and output wrong log messages. This patch fixes this problem. Tracing is possible while multiple contexts are being used. Each log file name is suffixed by thread id. This file has all log message from this thread. Each surface or codedbuf dump file name is suffixed by context id. This file has all surface or codedbuf data of this context. Signed-off-by: peng.chen <peng.c.chen@intel.com> Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com> Tested-by: Daniel Charles <daniel.charles@intel.com>
2016-03-15Allow loading the backend driver built against VAAPI 0.38Xiang, Haihao1-0/+1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2015-11-23LIBVA_DRIVER_NAME needs to be used if set at allMatthew Waters1-2/+1
va_GetDriverName fails to find the vdpau driver returning something != SUCCESS and the driver name is not used at all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72822 Change-Id: I29ef398bf066badedc25de10873975ad0479dccf Signed-off-by: Philippe Coval <rzr@gna.org>
2015-05-22Bump VA API to 0.38Xiang, Haihao1-0/+1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2015-05-22Add one API to allow the user to specify the loaded backend driverZhao Yakui1-3/+88
Sometimes there exist multiple backend vaapi drivers on one system. In such case user hopes to load the specific driver based on the request. Currently it can be specified by using LIBVA_DRIVER_NAME environment. But it is not convenient. So one API is added to allow the user to specify the loaded backend vaapi driver. And it is called by using the following sequence: >vaGetDisplay( >vaSetDriverName(va_dpy, driver_name) >vaInitialize V1->V2: Use the reserved space to store override_driver_name based on Haihao's suggestion. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2014-12-29libva 1.5.0.pre1 for developmentXiang, Haihao1-0/+1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit 2fb37255e7c9ccb76e65ea74466f5ffafe9c68c0) Conflicts: configure.ac
2014-09-09Bump VA API to 0.361.4.0.pre1Xiang, Haihao1-0/+1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2014-09-09vatrace: fix a overwriteAustin Yuan1-1/+1
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 7f1b4be6623f5fe65063581252d2b68bd77fd076)
2014-09-09vafool: simplify VAFOOLAustin Yuan1-23/+11
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit ce00603a8d58f2e25c7a6bb312f60fda0833e042)
2014-09-09vatrace: make LIBVA_TRACE_SURFACE work even without LIBVA_TRACEAustin Yuan1-4/+4
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit e39ebdd95062995e4bdf082d50bd7d9005a3be6c)
2014-09-09vatrace: make standalone LIBVA_TRACE_CODEDBUF work w/o LIBVA_TRACEAustin Yuan1-1/+1
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 22925d9b7d1730468fc7435bee96d9d9c39f5987)
2014-09-07API: add support for buffer exports.Gwenole Beauchesne1-0/+28
Add interfaces for low-level buffer exports to suport interop with external APIs like EGL or OpenCL (OCL). Theory of operations: - vaAcquireBufferHandle(): locks buffer for external API usage. This is a synchronization point. Upon successful return, useful buffer details are returned in a somewhat implementation-specific way to support interop with external APIs. - vaReleaseBufferHandle(): unlocks buffer after usage from external API, and deallocates any resources that were needed. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> (cherry picked from commit 544d31d2fc096a838c21f4684cec05746cfdd7b6) Conflicts: va/va.h
2014-06-26va: release VADisplayContext at the end of vaTerminate()Xiang, Haihao1-3/+3
Otherwise it will result in invalid reading in va_TraceEnd() Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit d4988142a3f2256e38c5c5cdcdfc1b4f5f3c1ea9) Tested-by: Daniel Charles <daniel.charles@intel.com> on ChromiumOS
2014-03-18va: keep compatibility with the backend driver built against 0.34.xXiang, Haihao1-0/+1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2014-03-17vatrace: trace vaQuerySurfaceAttributesAustin Yuan1-13/+21
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit e468728f9e49603f91ccbce3a232aa3bd98d1fd4) [Haihao: Remove JPEG encode from this commit] Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-06-19Fix possible memory leakXiang, Haihao1-0/+1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit 0b07495fc24646b47952b8df7d4e6d2df2a0f72c)
2013-06-19va.c: need to check the symbol before calling itAustin Yuan1-1/+1
This is to fix Klockwork critical issue Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 40e5e45edf97049137bca014575607b52d3bca78)
2013-06-19va: fix vaErrorStr() to support new error codes.Gwenole Beauchesne1-0/+6
(cherry picked from commit 7b5c35273dc0e8e0e86cf40cf2a398119a766397)
2013-06-19vatrace: trace coded buffer create/destroyAustin Yuan1-2/+12
Change-Id: If0388cd5e2e141184d88ff5de5612d15e51e3d20 Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 880c916092c6d68096c95e49405714d8a21f9322)
2013-06-19LIBVA_DRIVER_NAME still needs va_getDriverName to open DRM deviceFei Jiang1-6/+12
va_getDriverName is bypassed when LIBVA_DRIVER_NAME is set, but driver needs DRM device fd which is only opened in va_getDriverName Change-Id: I4fe11edf9d8c328806255d4c93313cf99655a91d Signed-off-by: Fei Jiang <fei.jiang@intel.com> (cherry picked from commit 04706eb13ae410b53b6b38150413d544b7fdb524)
2013-06-19va_trace: refine the log formatElaine Wang1-3/+3
Signed-off-by: Elaine Wang <elaine.wang@intel.com> (cherry picked from commit 15a0fca64456d8c7de1f7aca2cb747c4929690cd)
2013-06-19va_parseConfig: still need to check env_valueAustin Yuan1-1/+2
env_value may be NULL which means the caller doens't care the value of the environment variable, just check if it is set. Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 2e11d2273b2974a7d1959cbcaf8db5b8e9aedd9e)
2013-06-19va_trace_surface: dumpe surface content after vaEndPicture callAustin Yuan1-8/+5
vaEndPicture will kick HW decode/encode, and at this time use CPU to dump surface content can keep GPU/CPU in parallel. Also for encode trace, don't need to wait current frame completions but for decode, we must wait decode till it is completed Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 0af365de4c03c12fc20183093a944f7513a1c7be)
2013-06-19klockwork: Fix libva klocwork scaning issuesElaine Wang1-4/+9
Fix NULL pointer dereference risk issues and uninitialized variables Signed-off-by: Elaine Wang <elaine.wang@intel.com> Change-Id: I839a9def7b08c41c1f075e4cd1cc06e8bb0c8c9e
2013-06-05Add default implementation for vaQuerySurfaceAttributes().Gwenole Beauchesne1-1/+138
Add an initial implementation for vaQuerySurfaceAttributes() in terms of vaGetSurfaceAttributes(). This is an inefficient approach because it dynamically allocates the whole set of surface attributes we guessed are available. This code is to be removed once the VA drivers are updated. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-06-05API: add vaQuerySurfaceAttributes().Gwenole Beauchesne1-5/+5
vaQuerySurfaceAttributes() is the recommended way to query the driver for all surface attributes that are supported by the underlying hardware. This is more useful than guessing the attribute values and testing them through vaGetSurfaceAttributes(). The older vaGetSurfaceAttributes() function is hereby removed. However, the relevant VA driver hook is kept for now, and will be removed/replaced for a future update. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-06-05va_TraceCreateSurface->va_TraceCreateSurfaces: correct name changeAustin Yuan1-2/+3
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
2013-06-05API: add surface attributes.Gwenole Beauchesne1-15/+54
2013-05-28API: bump version to 0.34.0 (libva 1.2.0).Gwenole Beauchesne1-0/+1
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-05-28vpp: add video processing hooks.Gwenole Beauchesne1-0/+89
2012-09-28android: use Android logging utilities.Daniel Charles1-4/+34
Log functions available are now Android compatible and log statements will show on user space android logging system. Defined a LOG_TAG and make it available for all versions of Android. Signed-off-by: Daniel Charles <daniel.charles@intel.com> Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-09-26drm: fix build without X11 headers.Dmitry Ermilov1-13/+9
Signed-off-by: Dmitry Ermilov <dmitry.ermilov@intel.com> Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-04-03Allow 0.32.x drivers.Gwenole Beauchesne1-4/+24
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-01-10Remove dependency on X11/Xlib.hXiang, Haihao1-0/+3
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2011-10-20va: fix compiler warnings (drop unused variables).Gwenole Beauchesne1-6/+0
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2011-10-20libva: fix reported version as the one from VA-API.Gwenole Beauchesne1-1/+1
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2011-10-18va: generate __vaDriverInit_*() function name at run-time.Gwenole Beauchesne1-3/+14
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2011-10-18va: don't explicitly include "config.h"Gwenole Beauchesne1-1/+0
sysdeps.h is the internal header file to include that will eventually include config.h, if necessary. e.g. we don't use it on Android. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2011-09-22vatrace/vafool: refine itAustin Yuan1-121/+78
remove va_fool_getframe.c which looks strange correct some coding style for file va.c simplify va_fool.c for both decode and encode refine the surface dump of va_trace.c Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
2011-05-06corrected vaBufferInfo interfaceAlexander I Osin1-1/+1
2011-04-01Fix build issue againAustin Yuan1-2/+2
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
2011-04-01Fix build issueAustin Yuan1-1/+1
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
2011-04-01 1. add interface VARenderDevice for output the video into an external ↵Austin Yuan1-15/+21
device when the WM is not aware of it 2. add interface VARenderMode for APP to swith between overlay and GPU post-processing 3. add VADisplayAttribOverlayColorKey/VADisplayAttribOverlayAutoPaintColorKey which is simliar to Xv for overlay post-processing 4. fix the build issue on Android 2.3 Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com> Signed-off-by: Jason Hu <jason.hu@intel.com> Signed-off-by: Zhaohan Ren <zhaohan.ren@intel.com>
2011-02-09Make VADriverContext.vtable a pointer.Gwenole Beauchesne1-45/+58
2011-02-09Bump VA-API version to 0.32.0. Fix __vaDriverInit*() function name.Gwenole Beauchesne1-4/+2
2011-01-14 Refine VA_FOOL, and delete the hard coded clip va_fool_264.hAustin Yuan1-26/+101
Move test/vainfo into test/vainfo/* Add prototype of vaCreateSurfacesForUserPtr for V4L2 user pointer support Fix klocwork critical issues. Use strnlen and snprintf instead of strlen and sprintf. New interface vaQuerySrufaceError for decode error report and concealment Encode data structure change (long term reference picture interface) Add h264 constrained baseline profile support. Signed-off-by: Elaine Wang <elaine.wang@intel.com> Signed-off-by: Bignlin Chen <binglin.chen.wang@intel.com> Signed-off-by: Yan Zhuang <yanx.zhunag@intel.com> Signed-off-by: Guoliang Ji <guoliangx.ji@intel.com>