aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va
Commit message (Collapse)AuthorAgeFilesLines
...
* st/va: add dst rect to avoid scale on deintLeo Liu2017-09-291-6/+6
| | | | | | | | | | | For 1080p video transcode, the height will be scaled to 1088 when deint to progressive buffer. Set dst rect to make sure no scale. Fixes: 3ad8687 "st/va: use new vl_compositor_yuv_deint_full() to deint" Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Andy Furniss <[email protected]>
* st/va: use pipe transfer_map to map upload bufferLeo Liu2017-09-281-3/+9
| | | | | | | | | | The function pipe_buffer_map() is only for linear pipe buffer, with height as 0, and it's not for any 2D textures. Signed-off-by: Leo Liu <[email protected]> Cc: [email protected] Cc: Mark Thompson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/va/postproc: implement the DRM prime grabberLeo Liu2017-09-251-2/+16
| | | | Acked-by: Christian König <[email protected]>
* st/va/postproc: use progressive target buffer for scalingLeo Liu2017-09-251-0/+18
| | | | | | | | | Scaling between interlaced buffers, esp. for scale-up, because blit will scale up top filed and bottom field separately. it'll result in the weaving for these buffer with lack of accuracy. So use shader deint for the case. Acked-by: Christian König <[email protected]>
* st/va: make internal func vlVaHandleSurfaceAllocate() call simplerLeo Liu2017-09-253-7/+4
| | | | Acked-by: Christian König <[email protected]>
* st/va/postproc: add a full NV12 deint support from buffer I to PLeo Liu2017-09-251-1/+21
| | | | | | | | | | | Before it's impossible to transcode an interlaced video, becasue if in order for encoder to work, we have to force buffer to progessive, but the deint with buffer from I to P is missing. Now along With the new YUV deint full function, it works with weave and bob deint. Also this will benefit transcoding video with scaling parameters. Acked-by: Christian König <[email protected]>
* st/va: use new vl_compositor_yuv_deint_full() to deintLeo Liu2017-09-251-3/+11
| | | | | | | We also set src rectangle explicitly just in case of the mismatch of size between interlaced buffer and progressive buffer Acked-by: Christian König <[email protected]>
* st/va/postproc: use video original size for postprocessingLeo Liu2017-09-251-6/+8
| | | | | | | Otherwise the aligned size will make video scaled Cc: [email protected] Reviewed-by: Christian König <[email protected]>
* Revert "st/va: add enviromental variable to disable interlace"Leo Liu2017-09-071-4/+0
| | | | | | | | This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. The environment variable is no longer needed with the previous change Reviewed-by: Christian König <[email protected]>
* st/va: move YUV content to deinterlaced buffer when reallocated for encoderLeo Liu2017-09-071-1/+10
| | | | | | | | v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: reallocate the buffer if the layout isn't supportedLeo Liu2017-09-071-9/+12
| | | | | | | | So that it makes more clear for buffer reallocation based on buffers layout for both decoder and encoder. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: exclude the buffer reallocation for encode caseLeo Liu2017-08-231-1/+1
| | | | | | | | | Since encoder only support de-interlaced buffers. v2: move to parameter call to tell dec/enc Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: enable P016 format i.e. reallocate buffer if format changedLeo Liu2017-08-221-0/+12
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add MJPEG for configLeo Liu2017-08-212-1/+5
| | | | | | | To enable MJPEG HW decode Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: reallocate surface with YUYV streamLeo Liu2017-08-211-0/+17
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: detect MJPEG format from bitstreamLeo Liu2017-08-213-0/+10
| | | | | | | | | To find if the format is supported YUYV by sampling factor which is embedded from bitstream. So we could use this info for buffer reallocation on the correct format. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: reallocate surface when interlacedLeo Liu2017-08-211-0/+22
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: make surface allocate functions more usefullyLeo Liu2017-08-212-4/+5
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add slice parameter handling for MJPEGLeo Liu2017-08-211-1/+23
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add huffman table handling for MJPEGLeo Liu2017-08-211-1/+18
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add iq matrix handling for MJPEGLeo Liu2017-08-211-1/+6
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add picture parameter handling for MJPEGLeo Liu2017-08-211-1/+20
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add handles for MJPEG BuffersLeo Liu2017-08-214-0/+72
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: create decoder for MJPEG formatLeo Liu2017-08-211-3/+6
| | | | | | | Mjpeg doesn't need reference Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add MJPEG picture to contextLeo Liu2017-08-211-0/+1
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: change frame_idx from array to hash tableJulien Isorce2017-08-143-5/+28
| | | | | | | | | | | | | | | | | | | | | | | The picture_id was assumed to be a frame number so in 0-31. But the vaapi client gstreamer-vaapi uses the surfaces handles as identifier which are unsigned int. This bug can happen when using a lot of vaapi surfaces within the same process. Indeed Mesa/st/va increments a counter for the surface ID: mesa/util/u_handle_table.c::handle_table_add which starts from 0 and incremented by 1 at each call. So creating more than 32 surfaces was a problem. The following bug contains a test that reproduces the problem by running a couple of vaapih264enc in the same process. The above also explains why there was no pb when running them in separated processes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102006 Signed-off-by: Julien Isorce <[email protected]> Tested-by: Tomas Rataj <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-and-tested-by: Boyuan Zhang <[email protected]>
* st/va: Fix scaling list ordering for H.265Mark Thompson2017-07-171-7/+26
| | | | | | | | | | | | | Mesa here requires the scaling lists in diagonal scan order, but VAAPI passes them in raster scan order. Therefore, rearrange the elements when copying. v2: Move scan tables to vl_zscan.c. Fix type in size assertion. Cc: [email protected] Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* change va max_entrypointsChandu Babu N2017-06-222-1/+3
| | | | | | | | | | | As encode support is added along with decode, increase max_entrypoints to two. vaMaxNumEntrypoints was returning incorrect value and causing memory corruption before this commit v2: assert when max_entrypoints needs to be bigger CC: [email protected] Reviewed-by: Christian König <[email protected]>
* st/va: Fix leak in VAAPI subpicturesChandu Babu N2017-06-221-0/+1
| | | | | | | sampler view allocated in vaAssociateSubpicture is not cleared in vaiDeassociateSubpicture. Reviewed-by: Christian König <[email protected]>
* vl,omx,va,vdpau,xvmc: don't set the priv pointer in context_createMarek Olšák2017-06-121-1/+1
| | | | | | Unused and radeonsi ignores it anyway. Acked-by: Nicolai Hähnle <[email protected]>
* util: Port nir_array functionality to u_dynarrayThomas Helland2017-06-071-1/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: Add missing includesThomas Helland2017-06-072-0/+2
| | | | | | | | These will need to be in place to avoid regressions when removing these includes from the u_dynarray Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/va: check if vl_*_screen_create has failed only onceEmil Velikov2017-05-191-4/+3
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: fix misplaced closing bracketEmil Velikov2017-05-191-1/+1
| | | | | | | | | | | It's been like this since the code was introduced. Fixes: 86eb4131a90 (st/va: add headless support, i.e. VA_DISPLAY_DRM) Cc: <[email protected]> Cc: Julien Isorce <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: move variable declaration to where its usedEmil Velikov2017-05-191-2/+1
| | | | | | | | ... and make it const, since we shouldn't tinker with it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* auxiliary/vl: use vl_*_screen_create stubs when building w/o platformEmil Velikov2017-05-191-2/+0
| | | | | | | | | | | | | | | | | | | | Provide a dummy stub when the user has opted w/o said platform, thus we can build the binaries without unnecessarily requiring X11/other headers. In order to avoid build and link-time issues, we remove the HAVE_DRI3 guards in the VA and VDPAU state-trackers. With this change st/va will return VA_STATUS_ERROR_ALLOCATION_FAILED instead of VA_STATUS_ERROR_UNIMPLEMENTED. That is fine since upstream users of libva such as vlc and mpv do little error checking, let alone distinguish between the two. Cc: Leo Liu <[email protected]> Cc: Guttula, Suresh <[email protected]> Cc: [email protected] Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* configure: check once for DRI3 dependenciesEmil Velikov2017-05-191-0/+1
| | | | | | | | | | | | | | | | Currently we are having the XCB_DRI3 dependencies duplicated, partially. Just do a once-off check and add all of the respective CFLAGS/LIBS where needed. As a nice side effect this helps us solve a couple of FIXMEs. DRI3 is not a thing w/o X11 so disable it in such cases. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/va: remove assert for single sliceNayan Deshmukh2017-03-281-1/+1
| | | | | | | | | we anyway allow for multiple slices v2: do not remove assert to check for buf->size Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: add config support for 10bit decoding v2Christian König2017-03-132-4/+21
| | | | | | | | | Advertise 10bpp support if the driver supports decoding to a P016 surface. v2: Advertise 10bpp for the decoder as well. Signed-off-by: Christian König <[email protected]> Signed-off-by: Mark Thompson <[email protected]>
* st/va: add support for allocating 10bpp surfacesChristian König2017-03-131-9/+15
| | | | | | | We support P010 and P016 as targets for 10bpp video decoding. Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
* st/va: add support for P010 and P016 formats v3Christian König2017-03-134-3/+22
| | | | | | | | | | | | No hardware I know off can actually support P010 natively. But we can easily support P016 and as long as nobody decodes anything into the lower 6bits it doesn't make any difference to P010. v2: allow P0160 for post processing as well v3: fix post processing once more Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
* st/va: clear the video surface on allocationChristian König2017-03-131-4/+35
| | | | | | | This makes debugging of decoding problems quite a bit easier. Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
* st/va: cleanup error handling in vlVaCreateSurfaces2Christian König2017-03-131-25/+27
| | | | | | | No need to have that twice. Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-077-79/+79
| | | | | | | | | | pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2017-03-077-35/+35
| | | | | | | | | | replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_destroy() with mtx_destroy()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | | pipe_mutex_destroy() was made unnecessary with fd33a6bcd7f12. Replace was done with: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_destroy(\([^)]*\)):mtx_destroy(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_init() with mtx_init()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | | pipe_mutex_init() was made unnecessary with fd33a6bcd7f12. Replace was done using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_init(\([^)]*\)):(void) mtx_init(\&\1, mtx_plain):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex with mtx_tTimothy Arceri2017-03-071-1/+1
| | | | | | pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* st/va: Fix forward/backward referencing for deinterlacingMark Thompson2017-03-062-7/+7
| | | | | | | | | | | | | | | | The VAAPI documentation is not very clear here, but the intent appears to be that a forward reference is forward from a frame in the past, not forward to a frame in the future (that is, forward as in forward prediction, not as in a forward reference in source code). This interpretation is derived from other implementations, in particular the i965 driver and the gstreamer client. In order to match those other implementations, this patch swaps the meaning of forward and backward references as they currently appear for motion-adaptive deinterlacing. Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: Support fractional framerate in misc parameterMark Thompson2017-03-061-1/+7
| | | | | Signed-off-by: Mark Thompson <[email protected]> Acked-by: Christian König <[email protected]>