summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/omx
Commit message (Collapse)AuthorAgeFilesLines
* st/omx/dec: disable tunnel for size different caseLeo Liu2016-11-013-1/+11
| | | | | | | | | | | When the video coded size is different from frame size, we need the result buffers are same as coded size, which are not size compatible with encode required size, so that simply use no tunnel for this case instead of frame by frame converting. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: 13.0 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 06e3cd6a45ae2ad19f77e0f283c46d5f85112847)
* st/omx/dec: result buffers size should match codec decoder sizeLeo Liu2016-11-013-19/+18
| | | | | | | | | Otherwise fails the check of matching between decoder size and buffers size in kernel. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: 13.0 <mesa-stable@lists.freedesktop.org> (cherry picked from commit d9b2c4048d55011bb04bd9848a3b47af7216389f)
* st/omx/dec/h265: add scaling list dataLeo Liu2016-10-041-5/+97
| | | | | | | | | Specified by subclause 7.3.4 v2: get the loop optimized Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h265: fix the skip for before and after listLeo Liu2016-10-041-3/+4
| | | | | | | | | | For reference picture sets, there are cases that rps will not always be used. Once detect the unused flag from encoded bitstream, we should not add this rps to any list, otherwise pass the incorrect reference and skip the correct rps. Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* st/omx/dec/h265: set the default reference picture set for referenceLeo Liu2016-10-041-2/+4
| | | | | | | | | | It will fix the corruption for frame, that only has one stort term ref picture set, we set NULL rps for this case previously, causing taking incorrect reference. Instead we should take that only short term set as reference Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* st/omx/dec/h265: decoder size should follow from spsLeo Liu2016-10-042-7/+8
| | | | | | | | | | | | | The video size from format container is not always compatible with the size from codec bitstream, the HW decoder should take the size information from bitstream, otherwise the corruption appears with clip that has different size info between bitstream and format container So we are passing width(height)_in_samples from sequence parameter set to video decoder. Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* st/omx/dec/h265: increase dpb max size to 32Leo Liu2016-10-041-1/+1
| | | | | | For clip with frame delta poc over 16 Signed-off-by: Leo Liu <leo.liu@amd.com>
* st/omx/dec/h265: Correct the timestampingIndrajit Das2016-09-201-1/+12
| | | | | | | | | | | (derived from commit 3b6bda665a5a890f2c98e19d2939d7de92b8cb4c) v2: fix the tabs(Leo) Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Nishanth Peethambaran <nishanth.peethambaran@amd.com> Signed-off-by: Indrajit Das <indrajit-kumar.das@amd.com> Signed-off-by: Leo Liu <leo.liu@amd.com>
* st/omx/dec: enable hevc omx decode supportLeo Liu2016-09-062-1/+25
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h265: get the reference list for uvdLeo Liu2016-09-061-0/+39
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h265: add short term reference picture setsLeo Liu2016-09-061-4/+110
| | | | | | | Specified by subclause 7.3.7 Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h265: add slice headerLeo Liu2016-09-062-2/+216
| | | | | | | Specified by subclause 7.3.6.1 Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h265: add picture parameter setsLeo Liu2016-09-061-0/+98
| | | | | | | Specified by subclause 7.3.2.3 Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h265: add sequence parameter setsLeo Liu2016-09-062-0/+297
| | | | | | | Specified by subclause 7.3.2.2 Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec: add initial omx hevc supportLeo Liu2016-09-063-0/+160
| | | | | | | Mainly based on the h264 implementation. Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/omx/dec: set dst rect to match src sizeLeo Liu2016-09-061-2/+11
| | | | | | | | | | | | | | | When creating interlaced video buffer, hegith set to "template.height = align(tmpl->height/ array_size, VL_MACROBLOCK_HEIGHT);", and we use "template.height *= array_size;" for the buffer height, so it actually aligned with 32. With progressive video buffer it still aligned with 16, thus causing different height between interlaced buffer and progressive buffer for 4K (height=2160), and 720p (height=720). When transcode the video, this will cause the 16 lines corruption at the bottom of the encode video. Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h264: pass default scaling lists in raster formatIndrajit Das2016-08-111-20/+20
| | | | | Tested-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/omx/enc: check uninitialized list from task releaseLeo Liu2016-07-151-2/+2
| | | | | | | | | The uninitialized list should be checked and returned. Thank Julien for the notification and suggested fix. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* st/omx: assign previous values to new structureBoyuan Zhang2016-07-141-0/+10
| | | | | | | | Assign previously hardcoded values for OMX to newly defined structure. As a result, OMX behaviour will not change at all. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/dec: convert decoder video buffer to progressiveLeo Liu2016-07-122-3/+68
| | | | | | | | | | | | | | | | | | | | | | with encode tunneling The idea of encode tunneling is to use video buffer directly for encoder, but currently the encoder doesn’t support interlaced surface, the OMX decoder set progressive surface before on that purpose. Since now we are polling the driver for interlacing information for decoder, we got the interlaced as preferred as other APIs(VDPAU, VA-API), thus breaking the transcode with tunneling. The solution is when with tunnel detected, re-allocate progressive target buffers, and then converting the interlaced decoder results to there. This has been tested with transcode results bit to bit matching as before with surface from progressive to progressive. Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Tested-by: Julien Isorce <j.isorce@samsung.com>
* st/omx: fix decoder fillout for the OMX result bufferLeo Liu2016-06-281-4/+5
| | | | | | | | | | | | | The call for vl_video_buffer_adjust_size is with wrong order of arguments, apparently it will have problem when interlaced false; The size of OMX result buffer depends on real size of clips, vl buffer dimension is aligned with 16, so 1080p(1920*1080) video will overflow the OMX buffer Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Tested-by: Julien Isorce <j.isorce@samsung.com>
* st/omx: count number of slicesJulien Isorce2016-06-271-0/+3
| | | | | | | | | Used by nouveau driver. Similar patch was done for st/va: 851e7e12aa628d6781b5a3af2f2fc16ee73f435f Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx: add support for nouveau / interlacedJulien Isorce2016-06-271-25/+26
| | | | | Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx: retrieve preferred interlaced and buffer_formatsJulien Isorce2016-06-271-2/+24
| | | | | | | Interlaced can be true for nouveau driver. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* Treewide: Remove Elements() macroJan Vesely2016-05-171-2/+2
| | | | | Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/omx/enc: fix incorrect reference picture order for B framesLeo Liu2016-05-051-7/+12
| | | | | | | | | Stacking frames is for driver that's capable to do dual instances encoding. Such feature is not enabled for B frames currently. Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
* st/omx: don't return early in vid_enc_EncodeFrame()Emil Velikov2016-04-291-1/+2
| | | | | | | | | | | | | | Earlier commit plugged a memory leak, although it missed a pair of brackets. Thus we unconditionally returned even in the case of no error. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95203 Fixes: b87856d25d1 ("st/omx: Fix resource leak on OMX_ErrorNone") Tested-by: Andy Furniss <adf.lists@gmail.com> Acked-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> --- What an embarassing bug - missing brackets. Andy can you confirm that it resolves the issue ?
* st/omx: Fix resource leak on OMX_ErrorNoneRobert Foss2016-04-251-0/+1
| | | | | | | | Avoid leaking buffer allocated for task if an error has occured. Coverity id: 1213929 Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* st/omx/dec: Correct the timestampingNishanth Peethambaran2016-03-204-8/+34
| | | | | | | | | Attach the timestamp to the dpb buffer and use that timestamp while pushing buffer from dpb list to the omx client. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nishanth Peethambaran <nishanth.peethambaran@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
* st/omx: Remove trailing spacesNishanth Peethambaran2016-03-203-31/+31
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nishanth Peethambaran <nishanth.peethambaran@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
* st/omx/dec/h264: fix corruption when scaling matrix present flag setLeo Liu2016-02-021-2/+5
| | | | | | | | | | | The scaling list should be filled out with zig zag scan v2: integrate zig zag scan for list 4x4 to vl(Christian) v3: move list determination out from the loop(Ilia) Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx: Avoid segfault in deconstructor if constructor failsTom St Denis2016-01-121-0/+3
| | | | | | | | | If the constructor fails before the LIST_INIT calls the pointers will be null and the deconstructor will segfault. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* gallium: Remove unnecessary semicolonsEdward O'Callaghan2016-01-061-1/+1
| | | | | | | | | Fix silly issue with MSVC case fall-though support to need a extra 'break;' Found-by: Coccinelle Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/omx: use the vl_screen dispatchEmil Velikov2015-11-201-6/+5
| | | | | 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/omx: straighten get/put_screenEmil Velikov2015-11-201-16/+16
| | | | | | | | | | | | | | | | | | | | | The current code is busted in a number of ways. - initially checks for omx_display (rather than omx_screen), which may or may not be around. - blindly feeds the empty env variable string to loader_open_device() - reads the env variable every time get_screen is called - the latter manifests into memory leaks, and other issues as one sets the variable between two get_screen calls. Additionally it cleans up a couple of extra bits - drops unneeded set/check of omx_display. - make the teardown (put_screen) order was not symmetrical to the setup (get_screen) v2: Drop the "is empty string" check (Leo) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/omx: add headless supportLeo Liu2015-11-081-10/+35
| | | | | | | | | | | This will allow dec/enc/transcode without X v2: use env override even with X, use loader_open_device instead of open v3: clean up Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h264: fix field picture type 0 poc disorderLeo Liu2015-10-191-4/+8
| | | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
* gallium: add flags parameter to pipe_screen::context_createMarek Olšák2015-08-262-3/+3
| | | | | | | | 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/omx/enc: stack frame tasks for the gatheringLeo Liu2015-08-142-2/+22
| | | | | | | | Put tasks to the FIFO queue for results Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/enc: flush after eos handling v2Leo Liu2015-08-141-0/+1
| | | | | | | | v2 (chk): reorder the flush Signed-off-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* util: Move gallium's linked list to utilJason Ekstrand2015-05-082-2/+2
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* st/omx/dec: add h264 decoder level supportLeo Liu2015-04-281-3/+7
| | | | | | | v2: use sps level idc as level to driver Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/dec: separate create_video_codec to different codecsLeo Liu2015-04-284-18/+30
| | | | | | | v2: get frame size from port info Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/enc: export framerate to vce driverLeo Liu2015-03-311-4/+4
| | | | | | | The framerate will be used for video usability info support by VCE driver Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/omx/dec/h264: fix picture out-of-order with poc type 0 v2Leo Liu2015-02-241-0/+5
| | | | | | | | | | | | poc counter should be reset with IDR frame, otherwise there would be a re-order issue with frames before and after IDR v2: add commit message Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
* 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>
* omx/h264: remove stray semicolon after ifDave Airlie2014-09-031-1/+1
| | | | | | | Coverity reported this, looks wrong to me. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* st/omx: use makefile.sources to handle sources listsEmil Velikov2014-08-282-6/+11
| | | | | | | | ... and add the headers so that 'make check' is happy. Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>