summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va
Commit message (Collapse)AuthorAgeFilesLines
...
* st/va: clean up post process includesChristian König2015-12-141-6/+0
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Tested-by: Julien Isorce <j.isorce@samsung.com>
* st/va: cleanup filter color standard handlingChristian König2015-12-141-4/+4
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Tested-by: ulien Isorce <j.isorce@samsung.com>
* st/va: disable MPEG4 by default v2Christian König2015-12-071-1/+9
| | | | | | | | | | | | The workarounds are too hacky to enable them by default and otherwise MPEG4 doesn't work reliably. v2: add docs/envvars.html, CC stable and fix typos Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v1) Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (v1) Cc: "11.1.0" <mesa-stable@lists.freedesktop.org>
* st/va: move HEVC functions into separate file v2Christian König2015-12-074-168/+215
| | | | | | v2: actually copy all of it Signed-off-by: Christian König <christian.koenig@amd.com>
* st/va: also retrieve reference frames info for h264Julien Isorce2015-12-011-0/+52
| | | | | | | | Other hardwares than AMD require to parse: VAPictureParameterBufferH264.ReferenceFrames[16] Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: delay decoder creation until max_references is knownJulien Isorce2015-12-014-34/+68
| | | | | | | | | | | | | | | | | | In general max_references cannot be based on num_render_targets. This patch allows to allocate buffers with an accurate size. I.e. no more than necessary. For other codecs it is a fixed value 2. This is similar behaviour as vaapi/vdpau-driver. For now HEVC case defaults to num_render_targets as before. But it could also benefits this change by setting a more accurate max_references number in handlePictureParameterBuffer. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: add missing break statementEmil Velikov2015-11-291-0/+1
| | | | | | | | | | | | | | Earlier commit factored out the mpeg4 IQ matrix handling into separate function, although it forgot to add a break in its case statement. Thus the data ended up partially overwritten as the mpeg4 and h265 structs are members of the desc union. Spotted by Coverity (CID 1341052) Fixes: 64761a841db "st/va: move MPEG4 functions into separate file" Cc: Julien Isorce <j.isorce@samsung.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: add missing profiles in PipeToProfile's switch.Julien Isorce2015-11-261-0/+7
| | | | | | | Otherwise assert is raised from vlVaQueryConfigProfiles's for loop. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: fix indentationChristian König2015-11-241-7/+7
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: move MPEG4 functions into separate fileChristian König2015-11-244-180/+220
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: move VC-1 functions into separate fileChristian König2015-11-244-35/+70
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: move H264 functions into separate fileChristian König2015-11-244-72/+121
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: move MPEG12 functions into separate fileChristian König2015-11-244-49/+92
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: move post processing function into own fileChristian König2015-11-244-57/+100
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: fix post process dirty area handlingChristian König2015-11-241-4/+1
| | | | | | | | | | The dirty area in this call isn't related to the screen at all. v2: set clear dirty area to false as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: use the vl_screen dispatchEmil Velikov2015-11-203-16/+9
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-201-1/+1
| | | | | | | | | | | In a preparation of having proper multi-platform/backend handling in VL. With follow up commits we'll introduce a dispatch within vl_screen similar to the one in pipe_screen. This way any VL state-tracker can operate seamlessly, considering the backend/platform is properly setup. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* st/va: trivial cleanupEmil Velikov2015-11-201-9/+2
| | | | | | | Drop the temporary variable and fold the two conditional. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* st/va: use vl screen drm support from vl_wys_drmLeo Liu2015-11-081-21/+3
| | | | | | | v2: move the dup to vl_wys_drm for pipe loader Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: fix build fails with pipe loaderLeo Liu2015-11-081-2/+3
| | | | | | | There is no dev in drv, and dev should be from vl_screen here Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vaapi: fix vaapi VC-1 simple/main corruption v2Boyuan Zhang2015-11-061-0/+2
| | | | | | | | | | | Apply the start code fix only to advanced profile. v2 (chk): add commit message Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
* st/va: add support for RGBX and BGRX in VPPJulien Isorce2015-11-062-18/+23
| | | | | | | | | | | | | | Before it was only possible to convert a NV12 surface to RGBA or BGRA. This patch uses the same post processing function, "handleVAProcPipelineParameterBufferType", but add definitions for RGBX and BGRX. This patch also makes vlVaQuerySurfaceAttributes more generic to avoid copy and pasting the same lines. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian K<C3><B6>nig <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: properly use brackets in vlVaAcquireBufferHandle's switchJulien Isorce2015-11-061-5/+4
| | | | | | | | | In "switch (mem_type)" the brackets were surrounding "case+default" instead of "case" only. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian K<C3><B6>nig <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: properly indent buffer.c, config.c, image.c and picture.cJulien Isorce2015-11-064-56/+56
| | | | | | | | Some lines were using 4 indentation spaces instead of 3. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian K<C3><B6>nig <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: fix memory leak on error in vlVaCreateSurfaces2Julien Isorce2015-11-051-3/+9
| | | | | | | | Found by coverity: CID #1337953 Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: indent vlVaQuerySurfaceAttributes and vlVaCreateSurfaces2Julien Isorce2015-11-051-283/+283
| | | | | | | | Some lines were using 4 indentation spaces instead of 3. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: add support to export a surface as dmabufJulien Isorce2015-10-303-2/+144
| | | | | | | | | | | | | | | | | | | | I.e. implements: VaAcquireBufferHandle VaReleaseBufferHandle for memory of type VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME And apply relatives change to: vlVaMapBuffer vlVaUnMapBuffer vlVaDestroyBuffer Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver Tested with gstreamer-vaapi with nouveau driver. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: implement VaDeriveImageJulien Isorce2015-10-303-5/+138
| | | | | | | | | | | | | | | | | | | | | And apply relatives change to: vlVaBufferSetNumElements vlVaCreateBuffer vlVaMapBuffer vlVaUnmapBuffer vlVaDestroyBuffer vlVaPutImage It is unfortunate that there is no proper va buffer type and struct for this. Only possible to use VAImageBufferType which is normally used for normal user data array. On of the consequences is that it is only possible VaDeriveImage is only useful on surfaces backed with contiguous planes. Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBufferJulien Isorce2015-10-301-0/+6
| | | | | Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: add headless support, i.e. VA_DISPLAY_DRMJulien Isorce2015-10-302-6/+73
| | | | | | | | | This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: handle Video Post Processing for configsJulien Isorce2015-10-302-2/+25
| | | | | | | | | | | | | | Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: add colospace conversion through Video Post ProcessingJulien Isorce2015-10-304-52/+259
| | | | | | | | | | | | | | | | | | | | | | | Add support for VPP in the following functions: vlVaCreateContext vlVaDestroyContext vlVaBeginPicture vlVaRenderPicture vlVaEndPicture Add support for VAProcFilterNone in: vlVaQueryVideoProcFilters vlVaQueryVideoProcFilterCaps vlVaQueryVideoProcPipelineCaps Add handleVAProcPipelineParameterBufferType helper. One application is: VASurfaceNV12 -> gstvaapipostproc -> VASurfaceRGBA Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: implement dmabuf import for VaCreateSurfaces2Julien Isorce2015-10-301-1/+96
| | | | | | | | For now it is limited to RGBA, BGRA, RGBX, BGRX surfaces. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributesJulien Isorce2015-10-303-52/+249
| | | | | | | | | | | | | | | | | | Inspired from http://cgit.freedesktop.org/vaapi/intel-driver/ especially src/i965_drv_video.c::i965_CreateSurfaces2. This patch is mainly to support gstreamer-vaapi and tools that uses this newer libva API. The first advantage of using VaCreateSurfaces2 over existing VaCreateSurfaces, is that it is possible to select which the pixel format for the surface. Indeed with the simple VaCreateSurfaces function it is only possible to create a NV12 surface. It can be useful to create a RGBA surface to use with video post processing. The avaible pixel formats can be query with VaQuerySurfaceAttributes. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: do not destroy old buffer when new one failedJulien Isorce2015-10-301-6/+13
| | | | | | | | | | | If formats are not the same vlVaPutImage re-creates the video buffer with the right format. But if the creation of this new video buffer fails then the surface looses its current buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: properly defines VAImageFormat formats and improve VaCreateImageJulien Isorce2015-10-302-10/+55
| | | | | | | | | | | | | | | | | Added PIPE_VIDEO_CHROMA_FORMAT_NONE in p_format.h and return it by default in ChromaToPipe. Renamed YCbCrToPipe to VaFourccToPipeFormat because it now contains RGB. Implemented PipeFormatToVaFourcc which will be used later in VlVaDeriveImage. Note that gstreamer-vaapi check all the VAImageFormat fields. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: add VAAPI HEVC decode supportBoyuan Zhang2015-10-274-1/+208
| | | | | | Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/va: pass picture desc to begin and decodeJulien Isorce2015-10-261-2/+2
| | | | | | | | | | At least vl_mpeg12_decoder uses the picture desc in begin_frame and decode_bitstream. https://bugs.freedesktop.org/show_bug.cgi?id=92634 Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: Added support for NV12 to IYUV conversion in vlVaGetImageIndrajit Das2015-10-191-3/+5
| | | | Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: Used correct parameter to derive the value of the "h" variable in ↵Indrajit Das2015-10-191-1/+1
| | | | | | | | vlVaCreateImage Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: add flags parameter to pipe_screen::context_createMarek Olšák2015-08-261-1/+2
| | | | | | | | This allows creating compute-only and debug contexts. Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* st/va: add h264 decoder level supportLeo Liu2015-04-281-0/+5
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* automake: rework VL dependency trackingEmil Velikov2014-11-261-0/+1
| | | | | | | | | | | | | | | Set a single VL_{CFLAG,LIBS} for xcb and friends, and let each target check for it's relevant library alone. Required as with follow up commits we'll build aux/vl into a separate module, which needs VL_CFLAGS Cleanup add a couple of explicit LIBDRM_LIBS linking, as aux/vl itself requires libdrm, despite that LIBDRM_{RADEON,NOUVEAU...} may provide it as well. v2: Rebase. Make sure st/xvmc programs work. Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/va: surface: render subpictureMichael Varga2014-11-191-0/+120
| | | | Signed-off-by: Michael Varga <Michael.Varga@amd.com>
* st/va: subpicture implementationMichael Varga2014-11-192-13/+161
| | | | | | | | | added BGRA format create/destroy set image associate/deassociate Signed-off-by: Michael Varga <Michael.Varga@amd.com>
* st/va: added internal storage for VAImage and BGRA formatMichael Varga2014-11-192-26/+48
| | | | | | | When calling vaCreateImage() an internal copy of VAImage is maintained since the allocation of "image" may not be guaranteed to live long enough. Signed-off-by: Michael Varga <Michael.Varga@amd.com>
* st/va: added some calls to handle_table_remove()Michael Varga2014-11-193-0/+3
| | | | | | In a few locations handles were being added but not removed. Signed-off-by: Michael Varga <Michael.Varga@amd.com>
* st/va: MPEG4 call vlVaDecoderFixMPEG4Startcode()Michael Varga2014-11-101-0/+7
| | | | | | If the VOP and GOV headers were truncated they will be regenerated. Signed-off-by: Michael Varga <Michael.Varga@amd.com>
* st/va: MPEG4 generate GOV and VOP headerMichael Varga2014-11-101-0/+92
| | | | | | Also, Implemented a small locally used interface for writing bits to a buffer. Signed-off-by: Michael Varga <Michael.Varga@amd.com>
* st/va: MPEG4 populate the SPS structureMichael Varga2014-11-101-0/+6
| | | | Signed-off-by: Michael Varga <Michael.Varga@amd.com>