summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/surface.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add a pipe_context parameter to resource_get_handleMarek Olšák2016-08-251-1/+2
| | | | | | | | radeonsi needs to do some operations (DCC decompression) for OpenGL-OpenCL interop and this is the only way to make it coherent with the current context. It can optionally be set to NULL. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: add render_condition_enable param to clear_render_target/depth_stencilMarek Olšák2016-08-101-1/+1
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | to reduce the call indirections with u_resource_vtbl. The worst call tree you could get was: - u_transfer_inline_write_vtbl - u_default_transfer_inline_write - u_transfer_map_vtbl - driver_transfer_map - u_transfer_unmap_vtbl - driver_transfer_unmap That's 6 indirect calls. Some drivers only had 5. The goal is to have 1 indirect call for drivers that care. The resource type can be determined statically at most call sites. The new interface is: pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data) pipe_context::texture_subdata(ctx, resource, level, usage, box, data, stride, layer_stride) v2: fix whitespace, correct ilo's behavior Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Acked-by: Roland Scheidegger <sroland@vmware.com>
* st/vdpau: check for null pointer in get/put bits.Nayan Deshmukh2016-06-021-0/+6
| | | | | | | | Check for null pointer before accessing arrays in get/put bits native/YCbCr/Indexed in VdpOutputSurface and VdpVideoSurface. Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: correct null checkThomas Hindoe Paaboel Andersen2016-03-301-4/+4
| | | | | | | The null check of result was the wrong way around. Also, move memset and dereference of result after the null check. Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: implement the new DMA-buf based interop v2Christian König2016-03-291-0/+69
| | | | | | | | | That should allow us to get away from passing internal structures around. v2: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/vdpau: use vl_video_buffer_adjust_sizeChristian König2016-01-121-10/+3
| | | | | | | Use the new helper function instead of open coding it. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/vdpau: move common functions to utilLeo Liu2014-10-011-77/+4
| | | | | | | | Break out these functions so that they can be shared with a other state trackers. They will be used in subsequent patches for the new VA-API state tracker. Signed-off-by: Leo Liu <leo.liu@amd.com>
* st/vdpau: add device reference countingChristian König2014-08-141-1/+3
| | | | | | | | | | This fixes an issue with flash where it tries to destroy a decoder after already destroying the device associated with the decoder. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82517 Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* implement NV_vdpau_interop v7Christian König2013-10-261-0/+21
| | | | | | | | | | | | | | | | | | | v2: Actually implement interop between the gallium state tracker and the VDPAU backend. v3: Make it also available in non legacy contexts, fix video buffer sharing. v4: deny interop if we don't have the same screen object v5: rebased on upstream changes v6: implemented VDPAUGetSurfaceivNV, improved error handling, unregister all surfaces in VDPAUFiniNV v7: squash merge with Mareks changes Signed-off-by: Christian König <christian.koenig@amd.com>
* st/vdpau: add format conversions for GetBitsYCbCrGrigori Goronzy2013-10-131-8/+117
| | | | | | | | Add simple plain C routines for NV12<->YV12 and YUYV<->UYVY conversions. The NV12->YV12 conversion is commonly used, for instance by VLC. Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: Include u_surface.h for u_copy_rect.Vinson Lee2013-09-301-0/+1
| | | | | | | | | | | | | | Fix build errors. CC surface.lo surface.c: In function 'vlVdpVideoSurfaceGetBitsYCbCr': surface.c:247:10: error: implicit declaration of function 'util_copy_rect' [-Werror=implicit-function-declaration] CC output.lo output.c: In function 'vlVdpOutputSurfaceGetBitsNative': output.c:216:4: error: implicit declaration of function 'util_copy_rect' [-Werror=implicit-function-declaration] Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* st/vdpau: don't try to create video buffer when the format is FORMAT_NONEEmil Velikov2013-08-191-1/+4
| | | | | | | | Not seen in the wild yet, but seems like a reasonable thing to do. [suggested by Christian] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* vdpau/vl 422 chroma width/height mix upAndy Furniss2013-08-191-1/+1
| | | | | | | | | | | | | | | I was looking into some minor 422 issues/discrepencies I noticed long ago using vdpau on my rv790. I noticed that there is code that is halving height rather than width - 422 is full height AFAIK. Making the changes below doesn't actually make any noticable difference to what I was looking into. Maybe there are more but here's three I've found so far Reviewed-by: Christian König <christian.koenig@amd.com>
* vl: add entrypoint to get_video_paramChristian König2013-08-191-0/+2
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* st/vdpau: remove vlCreateHTAB from surface functionsChristian König2013-05-271-9/+0
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* st/vdpau: invalidate the handles on destructionChristian König2013-05-271-0/+2
| | | | | | Fixes a problem with xbmc when switching channels. Signed-off-by: Christian König <christian.koenig@amd.com>
* vl/buffer: use 2D_ARRAY instead of 3D texturesChristian König2013-05-011-4/+4
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-041-1/+1
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
* st/vdpau: Fix vlVdpVideoSurfaceSize for interlaced buffersMaarten Lankhorst2012-11-171-2/+2
| | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* gallium: unify transfer functionsMarek Olšák2012-10-111-10/+3
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <brianp@vmware.com>
* st/vdpau: clear Cb&Cr with 0.5fChristian König2012-06-201-2/+5
| | | | | | That makes the output black in case of decoding errors. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: fix YCbCr down/up-loads for buffers larger than requestedChristian König2012-06-141-2/+27
| | | | | | | | | | When the video buffer turns out to be larger than requested by the application we shouldn't upload or download more data into / from it original requested. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39309 Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: clear video surface at least onceChristian König2012-03-261-0/+29
| | | | | | | | So if anything goes wrong we won't display a random image. v2: flush before using the surface with the decoder. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: add xine workaroundChristian König2012-03-091-1/+1
| | | | | | | For reasons I don't understand xine tries to set the surface format by using a zero pitch. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: make the interface thread saveChristian König2012-03-051-4/+21
| | | | Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: implement VideoSurfaceGetBitsYCbCrChristian König2012-03-021-8/+53
| | | | Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl: rework winsys interfaceChristian König2012-02-251-2/+2
| | | | | | Throw out all the old and now unneeded stuff. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: Use transfer_inline_write to upload ycbcr dataChristian König2012-02-211-18/+5
| | | | | | Uses less code and looks at least a bit cleaner than mapping manually. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: remove unnecessary tracing and adjust tracing levels a bitChristian König2012-02-211-2/+0
| | | | | | | | | Tracing function entry/exits is a bit pointless when VDPAU_TRACE=1 does the same thing. v2: use WARN instead of ERR for application problems Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: use interlacing capabilitiesChristian König2012-02-061-0/+6
| | | | | | Recreate video buffer if need arises. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: implement uploads to interlaced video buffersChristian König2012-02-061-21/+27
| | | | Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl: fix YV12 handlingChristian König2012-01-151-1/+1
| | | | | | We actually implemented YV21 instead of YV12, so fix the plane ordering. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: recreate video buffer if format doesn't matchChristian König2012-01-151-18/+36
| | | | | | Recreate the video buffer in PutBitsYCbCr if the format doesn't match. Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl: reintroduce PIPE_VIDEO_CAP_PREFERED_FORMATChristian König2012-01-151-1/+6
| | | | | | | Create the video buffers in the format the driver preffers. This temporary creates problems with decoder less VDPAU video playback. Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl/video_buffer: use template style create paramsChristian König2012-01-151-3/+7
| | | | | | | Just like in the rest of gallium, this reduces the number of parameters significantly. Signed-off-by: Christian König <deathsimple@vodafone.de>
* st/vdpau: Add documentation from the VDPAU API and update some tracesEmeric Grange2011-09-141-0/+17
| | | | | Signed-off-by: Emeric Grange <emeric.grange@gmail.com> Reviewed-by: Christian König <deathsimple@vodafone.de>
* vdpau: Fix include styleKai Wasserbäch2011-08-291-4/+4
| | | | | | | | | | | As explained in the thread starting at [0], the internal include style should be »#include "path/to/header.h"« for non-system includes. [0] <http://news.gmane.org/find-root.php?message_id=%3c4E5802BE.6020206%40vmware.com%3e> Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org> Signed-off-by: Brian Paul <brianp@vmware.com>
* vdpau: implement VdpOutputSurfaceGetParametersChristian König2011-07-101-1/+1
|
* [g3dvl] and finally remove pipe_video_contextChristian König2011-07-081-4/+1
|
* [g3dvl] move video buffer creation out of video contextChristian König2011-07-081-2/+2
|
* [g3dvl] remove sampler view handling from video contextChristian König2011-07-081-2/+22
|
* vdpau: make state tracker far less noisyChristian König2011-05-041-1/+1
|
* vdpau: add stups for the missing functionsChristian König2011-04-261-5/+8
|
* [g3dvl] start supporting different render target formatsChristian König2011-04-241-1/+1
| | | | Let's start with NV12, but anything else shouldn't be much of a problem any more.
* [g3dvl] remove resource_format workaroundChristian König2011-04-241-7/+0
|
* vdpau: switch cb cr planes in vlVdpVideoSurfacePutBitsYCbCrChristian König2011-04-121-1/+1
|
* [g3dvl] make resource format selection a public interfaceChristian König2011-04-121-0/+7
|
* vdpau: Implement basic output functionalityChristian König2011-04-091-1/+1
| | | | | Even with totally wrong color space conversion we finally se a picture with VDPAU. Yeah!