[Mesa-dev] [PATCH 2/2] st/vdpau: don't re-allocate interlaced buffer with packed YUV format

2017-09-30 Thread Leo Liu
It caused corruption, when vlVdpVideoSurfacePutBitsYCbCr putting YUV to the fields Cc: mesa-sta...@lists.freedesktop.org Cc: Andy Furniss --- src/gallium/state_trackers/vdpau/surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 3/3] Revert "gallium/radeon: consolidate PIPE_BIND_SHARED/SCANOUT handling"

2017-09-29 Thread Leo Liu
On 09/29/2017 11:37 AM, Leo Liu wrote: On 09/29/2017 10:45 AM, Andy Furniss wrote: Marek Olšák wrote: Can you test this? My mpv test case is fixed by radeonsi/uvd: fix planar formats broken since f70f6baaa3bb0f8b280ac2eaea69bb With Andy's information that this happens on newer MPV

Re: [Mesa-dev] [PATCH 3/3] Revert "gallium/radeon: consolidate PIPE_BIND_SHARED/SCANOUT handling"

2017-09-29 Thread Leo Liu
On 09/29/2017 10:45 AM, Andy Furniss wrote: Marek Olšák wrote: Can you test this? My mpv test case is fixed by radeonsi/uvd: fix planar formats broken since f70f6baaa3bb0f8b280ac2eaea69bb With Andy's information that this happens on newer MPV, and with Marek's fixes, we know MPV is

Re: [Mesa-dev] [PATCH] st/va: add dst rect to avoid scale on deint

2017-09-29 Thread Leo Liu
On 09/29/2017 07:40 AM, Andy Furniss wrote: Leo Liu wrote: On 2017-09-29 06:04 AM, Andy Furniss wrote: Leo Liu wrote: 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: us

Re: [Mesa-dev] [PATCH] st/va: add dst rect to avoid scale on deint

2017-09-29 Thread Leo Liu
On 2017-09-29 06:04 AM, Andy Furniss wrote: Leo Liu wrote: 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" Probably my

Re: [Mesa-dev] [PATCH 2/3] st/va: Implement vaExportSurfaceHandle()

2017-09-28 Thread Leo Liu
On 2017-09-28 06:12 PM, Mark Thompson wrote: This is a new interface in libva2 to support wider use-cases of passing surfaces to external APIs. In particular, this allows export of NV12 and P010 surfaces. Signed-off-by: Mark Thompson --- On 22/09/17 10:17, Christian König

[Mesa-dev] [PATCH] st/va: add dst rect to avoid scale on deint

2017-09-28 Thread Leo Liu
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 <leo@amd.com> --- src/gallium/state_trackers/v

Re: [Mesa-dev] [Mesa-stable] [PATCH] st/va: use pipe transfer_map to upload mapped buffer

2017-09-27 Thread Leo Liu
h. Leo If a 3D texture can't occur here but an array texture can, it needs to be box.depth = resource->array_size. Marek On Tue, Sep 26, 2017 at 5:04 PM, Leo Liu <leo@amd.com> wrote: The function pipe_buffer_map() is only for linear pipe buffer, with height as 0, and it's not for

[Mesa-dev] [PATCH] st/va: use pipe transfer_map to upload mapped buffer

2017-09-26 Thread Leo Liu
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 <leo@amd.com> Cc: mesa-sta...@lists.freedesktop.org Cc: Mark Thompson <s...@jkqxz.net> --- src/gallium/state_trackers/va/buffer.c | 12 +++

[Mesa-dev] [PATCH 05/15] st/omx: use new vl_compositor_yuv_deint_full() to deint

2017-09-21 Thread Leo Liu
v2: add dst rect to make sure no scale Acked-by: Christian König --- src/gallium/state_trackers/omx_bellagio/vid_dec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/omx_bellagio/vid_dec.c

Re: [Mesa-dev] [PATCH 00/14] Patches for VA-API State Tracker Postproc

2017-09-21 Thread Leo Liu
On 09/21/2017 03:03 AM, Mark Thompson wrote: On 21/09/17 03:17, Leo Liu wrote: On 09/20/2017 06:11 PM, Mark Thompson wrote: On 19/09/17 20:04, Leo Liu wrote: This series are for VA-API State Tracker Postproc, including: Deinterlacing I video for transcode; Scaling support in postproc

Re: [Mesa-dev] [PATCH 00/14] Patches for VA-API State Tracker Postproc

2017-09-20 Thread Leo Liu
On 09/20/2017 06:11 PM, Mark Thompson wrote: On 19/09/17 20:04, Leo Liu wrote: This series are for VA-API State Tracker Postproc, including: Deinterlacing I video for transcode; Scaling support in postproc for transcode; Frame grabber in postproc Thanks Andy Furniss <adf.li...@gmail.

[Mesa-dev] [PATCH 13/15] vl/csc: add a RGB to YUV CSC matrix

2017-09-20 Thread Leo Liu
--- src/gallium/auxiliary/vl/vl_csc.c | 9 + src/gallium/auxiliary/vl/vl_csc.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/vl/vl_csc.c b/src/gallium/auxiliary/vl/vl_csc.c index e4395d0..861eda6 100644 ---

[Mesa-dev] [PATCH 14/15] vl/compositor: convert RGB buffer to YUV with color conversion

2017-09-20 Thread Leo Liu
--- src/gallium/auxiliary/vl/vl_compositor.c | 69 src/gallium/auxiliary/vl/vl_compositor.h | 12 ++ 2 files changed, 81 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index c084de9..67ad7f5

[Mesa-dev] [PATCH 10/14] st/va: make internal func vlVaHandleSurfaceAllocate() call simpler

2017-09-19 Thread Leo Liu
--- src/gallium/state_trackers/va/picture.c| 2 +- src/gallium/state_trackers/va/surface.c| 7 ++- src/gallium/state_trackers/va/va_private.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c

[Mesa-dev] [PATCH 14/14] st/va/postproc: implement the DRM prime grabber

2017-09-19 Thread Leo Liu
--- src/gallium/state_trackers/va/postproc.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/va/postproc.c b/src/gallium/state_trackers/va/postproc.c index d99fc78..b20f334 100644 --- a/src/gallium/state_trackers/va/postproc.c

[Mesa-dev] [PATCH 13/14] vl/compositor: convert RGB buffer to YUV with color conversion

2017-09-19 Thread Leo Liu
--- src/gallium/auxiliary/vl/vl_compositor.c | 71 src/gallium/auxiliary/vl/vl_compositor.h | 12 ++ 2 files changed, 83 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index c084de9..b1c39e1

[Mesa-dev] [PATCH 12/14] vl/compositor: create RGB to YUV fragment shader

2017-09-19 Thread Leo Liu
--- src/gallium/auxiliary/vl/vl_compositor.c | 46 src/gallium/auxiliary/vl/vl_compositor.h | 5 2 files changed, 51 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 0749c47..c084de9

[Mesa-dev] [PATCH 11/14] st/va/postproc: use progressive target buffer for scaling

2017-09-19 Thread Leo Liu
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. --- src/gallium/state_trackers/va/postproc.c | 18 ++ 1

[Mesa-dev] [PATCH 09/14] st/va/postproc: add a full NV12 deint support from buffer I to P

2017-09-19 Thread Leo Liu
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

[Mesa-dev] [PATCH 05/14] st/omx: use new vl_compositor_yuv_deint_full() to deint

2017-09-19 Thread Leo Liu
--- src/gallium/state_trackers/omx_bellagio/vid_dec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/omx_bellagio/vid_dec.c b/src/gallium/state_trackers/omx_bellagio/vid_dec.c index 28741c0..b200abe 100644 ---

[Mesa-dev] [PATCH 06/14] st/va: use new vl_compositor_yuv_deint_full() to deint

2017-09-19 Thread Leo Liu
We also set src rectangle explicitly just in case of the mismatch of size between interlaced buffer and progressive buffer --- src/gallium/state_trackers/va/picture.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c

[Mesa-dev] [PATCH 08/14] vl/compositor: add Bob top and bottom to YUV deint function

2017-09-19 Thread Leo Liu
--- src/gallium/auxiliary/vl/vl_compositor.c | 34 ++-- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index f758f08..0749c47 100644 ---

[Mesa-dev] [PATCH 07/14] vl/compositor: remove vl_compositor_yuv_deint() function

2017-09-19 Thread Leo Liu
No longer used. --- src/gallium/auxiliary/vl/vl_compositor.c | 31 --- src/gallium/auxiliary/vl/vl_compositor.h | 9 - 2 files changed, 40 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index

[Mesa-dev] [PATCH 04/14] vl/compositor: add a new function for YUV deint

2017-09-19 Thread Leo Liu
It will replace previous deint function with abilities of scaling and field deinterlacing --- src/gallium/auxiliary/vl/vl_compositor.c | 30 ++ src/gallium/auxiliary/vl/vl_compositor.h | 12 2 files changed, 42 insertions(+) diff --git

[Mesa-dev] [PATCH 03/14] vl/compositor: extend YUV deint function to do field deint

2017-09-19 Thread Leo Liu
It will add Bob deint ability to interlaced video for HW encoder --- src/gallium/auxiliary/vl/vl_compositor.c | 26 +- src/gallium/auxiliary/vl/vl_compositor.h | 12 +--- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCH 02/14] vl/compositor: separate YUV part from shader video buffer function

2017-09-19 Thread Leo Liu
So that it can be re-used --- src/gallium/auxiliary/vl/vl_compositor.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 794c8b5..714b894 100644 ---

[Mesa-dev] [PATCH 00/14] Patches for VA-API State Tracker Postproc

2017-09-19 Thread Leo Liu
This series are for VA-API State Tracker Postproc, including: Deinterlacing I video for transcode; Scaling support in postproc for transcode; Frame grabber in postproc Thanks Andy Furniss <adf.li...@gmail.com> for lots of testing on these. Leo Liu (14): st/va/postproc: use video origina

[Mesa-dev] [PATCH 01/14] st/va/postproc: use video original size for postprocessing

2017-09-19 Thread Leo Liu
Otherwise the aligned size will make video scaled Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/va/postproc.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_trackers/va/postproc.c

Re: [Mesa-dev] [PATCH] radeonsi/uvd: fix interlaced video buffer height alignment

2017-09-12 Thread Leo Liu
On 2017-09-12 02:39 PM, Christian König wrote: The problem is: In si_uvd.c struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, const struct pipe_video_buffer *tmpl) { struct pipe_video_buffer template; template.height =

Re: [Mesa-dev] [PATCH] radeonsi/uvd: fix interlaced video buffer height alignment

2017-09-12 Thread Leo Liu
On 09/12/2017 11:37 AM, Christian König wrote: Am 12.09.2017 um 17:32 schrieb Leo Liu: On 09/12/2017 11:23 AM, Christian König wrote: I don't think this is correct. A long long time ago I've came up with this because the firmware didn't liked what you proposed below. Since this change only

Re: [Mesa-dev] [PATCH] radeonsi/uvd: fix interlaced video buffer height alignment

2017-09-12 Thread Leo Liu
why I was got workaround for OMX one year ago, but now encounter the same again, and it seems not easy to fix on the blit, since it's scaling, not like OMX case, I can use src rect for dst. Regards, Leo Regards, Christian. Am 12.09.2017 um 15:56 schrieb Leo Liu: In code

Re: [Mesa-dev] [PATCH] radeonsi/uvd: fix interlaced video buffer height alignment

2017-09-12 Thread Leo Liu
On 09/12/2017 10:24 AM, Emil Velikov wrote: Hi Leo, On 12 September 2017 at 14:56, Leo Liu <leo@amd.com> wrote: In code: template.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); ... template.height *= array_size; It turns out t

[Mesa-dev] [PATCH] radeonsi/uvd: fix interlaced video buffer height alignment

2017-09-12 Thread Leo Liu
t 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 v

Re: [Mesa-dev] [PATCH] radeon/uvd: fix the assertion check for YUYV format

2017-09-06 Thread Leo Liu
On 09/06/2017 03:51 AM, Michel Dänzer wrote: On 06/09/17 02:37 AM, Leo Liu wrote: Fixes:7319ff87("radeon/uvd: add YUYV format support for target buffer") Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 8 +--- 1 file changed, 5

[Mesa-dev] [PATCH] radeon/uvd: fix the assertion check for YUYV format

2017-09-05 Thread Leo Liu
Fixes:7319ff87("radeon/uvd: add YUYV format support for target buffer") Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src

Re: [Mesa-dev] [PATCH 3/6] vl/compositor: make vl_compositor_set_yuv_layer() static

2017-08-30 Thread Leo Liu
Hi Emil, Thanks Leo, for the split. There's a vl_compositor_set_yuv_layer reference loose in the header. Yeah, thanks for catching that. It's very appreciated. Leo Please remove that one with the patch, but don't bother resending. -Emil ___

[Mesa-dev] [PATCH 1/6] vl/compositor: make a helper function for YUV deinterlacing

2017-08-28 Thread Leo Liu
The similar function is in OMX, and only used by OMX. Now have it to vl/compositor for other state tracker to use later. Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/auxiliary/vl/vl_compositor.c | 31 +++ src/gallium/auxiliary/vl/vl_compositor.

[Mesa-dev] [PATCH 2/6] st/omx: use vl/compositor helper function for YUV deinterlacing

2017-08-28 Thread Leo Liu
v2: separate helper function in different patch Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/omx/vid_dec.c | 32 ++-- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/g

[Mesa-dev] [PATCH 6/6] Revert "st/va: add enviromental variable to disable interlace"

2017-08-28 Thread Leo Liu
This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. The environment variable is no longer needed with the previous change --- src/gallium/state_trackers/va/surface.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c

[Mesa-dev] [PATCH 5/6] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-28 Thread Leo Liu
v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture.c b/src/g

[Mesa-dev] [PATCH 4/6] st/va: reallocate the buffer if the layout isn't supported

2017-08-28 Thread Leo Liu
So that it makes more clear for buffer reallocation based on buffers layout for both decoder and encoder. Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/g

[Mesa-dev] [PATCH 3/6] vl/compositor: make vl_compositor_set_yuv_layer() static

2017-08-28 Thread Leo Liu
Since it's no longer being called outside of compositor Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/auxiliary/vl/vl_compositor.c | 60 +++- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c

Re: [Mesa-dev] [PATCH 1/3] st/omx: move YUV deinterlace function to common

2017-08-28 Thread Leo Liu
On 08/28/2017 05:01 AM, Emil Velikov wrote: On 28 August 2017 at 03:43, Leo Liu <leo@amd.com> wrote: On 08/27/2017 01:49 PM, Emil Velikov wrote: Hi Leo, On 24 August 2017 at 16:11, Leo Liu <leo@amd.com> wrote: Signed-off-by: Leo Liu <leo@amd.com> --- src

Re: [Mesa-dev] [PATCH 1/2] radeon/uvd: fix MJPEG quantization table index

2017-08-28 Thread Leo Liu
On 08/28/2017 04:53 AM, Emil Velikov wrote: On 28 August 2017 at 03:33, Leo Liu <leo@amd.com> wrote: On 08/27/2017 01:52 PM, Emil Velikov wrote: On 25 August 2017 at 18:17, Leo Liu <leo@amd.com> wrote: Signed-off-by: Leo Liu <leo@amd.com> --- src/gall

Re: [Mesa-dev] [PATCH 2/2] radeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction

2017-08-28 Thread Leo Liu
On 08/28/2017 05:04 AM, Emil Velikov wrote: On 28 August 2017 at 04:45, Leo Liu <leo@amd.com> wrote: On 08/27/2017 01:53 PM, Emil Velikov wrote: On 25 August 2017 at 18:17, Leo Liu <leo@amd.com> wrote: Signed-off-by: Leo Liu <leo@amd.com> Same here - please

Re: [Mesa-dev] [PATCH 2/2] radeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction

2017-08-27 Thread Leo Liu
On 08/27/2017 01:53 PM, Emil Velikov wrote: On 25 August 2017 at 18:17, Leo Liu <leo@amd.com> wrote: Signed-off-by: Leo Liu <leo@amd.com> Same here - please add a couple words of commit message alongside a fixes (or stable) tag. Well this is not a fix. It adds

Re: [Mesa-dev] [PATCH 1/3] st/omx: move YUV deinterlace function to common

2017-08-27 Thread Leo Liu
On 08/27/2017 01:49 PM, Emil Velikov wrote: Hi Leo, On 24 August 2017 at 16:11, Leo Liu <leo@amd.com> wrote: Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/auxiliary/vl/vl_compositor.c | 87 +--- src/gallium/auxiliary/vl/vl_compo

Re: [Mesa-dev] [PATCH 1/2] radeon/uvd: fix MJPEG quantization table index

2017-08-27 Thread Leo Liu
On 08/27/2017 01:52 PM, Emil Velikov wrote: On 25 August 2017 at 18:17, Leo Liu <leo@amd.com> wrote: Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/dr

Re: [Mesa-dev] [PATCH] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-25 Thread Leo Liu
+ } Should we bail out with an error here when it's the other way around? Although I cannot think of any of case that to get buffer Interlaced now, It's still a good idea to bail out here when it happnens Will add it in v4. It's not a error when case like buffer is deinterlaced,

Re: [Mesa-dev] [PATCH] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-25 Thread Leo Liu
On 08/25/2017 03:16 PM, Christian König wrote: Am 25.08.2017 um 17:15 schrieb Leo Liu: On 08/25/2017 10:53 AM, Leo Liu wrote: On 08/25/2017 02:57 AM, Christian König wrote: Am 24.08.2017 um 20:49 schrieb Leo Liu: v2: use deinterlace common function v3: make sure deinterlace only

[Mesa-dev] [PATCH 2/2] radeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction

2017-08-25 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 228f654af1..00d6267018 100644 --- a/src/gallium/d

[Mesa-dev] [PATCH 1/2] radeon/uvd: fix MJPEG quantization table index

2017-08-25 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 648a493b59..228f654af1 100644 --- a/src/gallium/d

Re: [Mesa-dev] [PATCH] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-25 Thread Leo Liu
On 08/25/2017 12:42 PM, Andy Furniss wrote: Leo Liu wrote: v2: use deinterlace common function v3: make sure deinterlace only Doesn't apply to master with git. I will attach you another one. should be good. Too much patches on the fly. Thanks, Leo patch was less fussy patch -p 1

Re: [Mesa-dev] [PATCH] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-25 Thread Leo Liu
On 08/25/2017 10:53 AM, Leo Liu wrote: On 08/25/2017 02:57 AM, Christian König wrote: Am 24.08.2017 um 20:49 schrieb Leo Liu: v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.

Re: [Mesa-dev] [PATCH 1/3] st/omx: move YUV deinterlace function to common

2017-08-25 Thread Leo Liu
On 08/24/2017 02:48 PM, Leo Liu wrote: On 08/24/2017 11:34 AM, Christian König wrote: Am 24.08.2017 um 17:11 schrieb Leo Liu: Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> for the series. Andy do you want to test this? Sh

[Mesa-dev] [PATCH 2/3] st/va move YUV content to deinterlaced buffer

2017-08-25 Thread Leo Liu
When reallocation for encoder v2: use deinterlace common function v3: make sure deinterlace only v4: bail out when reallocation for interlaced buffer Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 25 - 1 file chang

Re: [Mesa-dev] [PATCH] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-25 Thread Leo Liu
On 08/25/2017 02:57 AM, Christian König wrote: Am 24.08.2017 um 20:49 schrieb Leo Liu: v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 22 -- 1 file chang

[Mesa-dev] [PATCH] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-24 Thread Leo Liu
v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c

Re: [Mesa-dev] [PATCH 1/3] st/omx: move YUV deinterlace function to common

2017-08-24 Thread Leo Liu
On 08/24/2017 11:34 AM, Christian König wrote: Am 24.08.2017 um 17:11 schrieb Leo Liu: Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> for the series. Andy do you want to test this? Should make VA-API transcoding simpler to use

[Mesa-dev] [PATCH 2/3] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-24 Thread Leo Liu
v2: use deinterlace common function Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 47e6

[Mesa-dev] [PATCH 3/3] Revert "st/va: add enviromental variable to disable interlace"

2017-08-24 Thread Leo Liu
This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. The environment variable is no longer needed with the previous change --- src/gallium/state_trackers/va/surface.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c

[Mesa-dev] [PATCH 1/3] st/omx: move YUV deinterlace function to common

2017-08-24 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/auxiliary/vl/vl_compositor.c | 87 +--- src/gallium/auxiliary/vl/vl_compositor.h | 21 src/gallium/state_trackers/omx/vid_dec.c | 32 +--- 3 files changed, 68 insertions(+), 72 deletions(-)

Re: [Mesa-dev] [PATCH 1/2] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-24 Thread Leo Liu
On 08/24/2017 02:52 AM, Christian König wrote: Am 23.08.2017 um 23:41 schrieb Leo Liu: Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 40 + 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/src/g

Re: [Mesa-dev] [PATCH 2/2] Revert "st/va: add enviromental variable to disable interlace"

2017-08-24 Thread Leo Liu
On 08/24/2017 02:56 AM, Michel Dänzer wrote: On 24/08/17 06:41 AM, Leo Liu wrote: This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. Every revert commit should have justification in the commit log. In this case, I imagine it could be something like "The environment var

[Mesa-dev] [PATCH 1/2] st/va: move YUV content to deinterlaced buffer when reallocated for encoder

2017-08-23 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 40 + 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 47e6

[Mesa-dev] [PATCH 2/2] Revert "st/va: add enviromental variable to disable interlace"

2017-08-23 Thread Leo Liu
This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. --- src/gallium/state_trackers/va/surface.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index b116fc3f27..67773cf76a 100644 ---

[Mesa-dev] [PATCH] st/va: exclude the buffer reallocation for encode case

2017-08-23 Thread Leo Liu
Since encoder only support de-interlaced buffers. v2: move to parameter call to tell dec/enc Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture.c

Re: [Mesa-dev] [PATCH] st/va: exclude the buffer reallocation for encode case

2017-08-23 Thread Leo Liu
On 08/23/2017 02:10 PM, Christian König wrote: Am 23.08.2017 um 19:21 schrieb Leo Liu: Since encoder only support de-interlaced buffers. Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH] st/va: exclude the buffer reallocation for encode case

2017-08-23 Thread Leo Liu
Since encoder only support de-interlaced buffers. Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c

Re: [Mesa-dev] [PATCH] radeon/video: Return false explicitly for HEVC if not the case

2017-08-23 Thread Leo Liu
Hi Nicolai, Thanks for pointing out the issue. Appreciated. Leo On 08/23/2017 10:38 AM, Nicolai Hähnle wrote: On 23.08.2017 15:55, Leo Liu wrote: Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com> --- src/gallium/dr

[Mesa-dev] [PATCH] radeon/video: Return false explicitly for HEVC if not the case

2017-08-23 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index 7c2553364e..99b6676fee 100644 --- a/src/gallium/drivers/

[Mesa-dev] [PATCH 2/3] radeon/vcn: enable P016 mode support

2017-08-21 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_vcn_dec.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c index 51391627d5..a7a5

[Mesa-dev] [PATCH 3/3] st/va: enable P016 format i.e. reallocate buffer if format changed

2017-08-21 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index e0287d30f2..b2be7af8c4 100644 --- a/src/g

[Mesa-dev] [PATCH 1/3] radeon/vcn: correct target buffer pitch calculation

2017-08-21 Thread Leo Liu
since the way should be as same as UVD Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_vcn_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c

[Mesa-dev] [PATCH 17/20] radeon/uvd: add YUYV format support for target buffer

2017-08-18 Thread Leo Liu
YUYV is a packed YUV format, and there is no chorma plane Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 6 -- src/gallium/drivers/radeonsi/si_uvd.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/

[Mesa-dev] [PATCH] radeon/uvd: get the target buffer pitch correct for different format

2017-08-18 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index d5352d9de6..dd8c0e0eb0 100644 --- a/src/g

Re: [Mesa-dev] [PATCH 17/20] radeon/uvd: add YUYV format support for target buffer

2017-08-17 Thread Leo Liu
On 08/17/2017 06:35 AM, Christian König wrote: Am 17.08.2017 um 12:27 schrieb Leo Liu: On 08/17/2017 05:15 AM, Christian König wrote: Am 16.08.2017 um 19:53 schrieb Leo Liu: YUYV is a packed YUV format, and there is no chorma plane v2: add stream type check for YUYV pitch setup Signed

Re: [Mesa-dev] [PATCH 17/20] radeon/uvd: add YUYV format support for target buffer

2017-08-17 Thread Leo Liu
On 08/17/2017 05:15 AM, Christian König wrote: Am 16.08.2017 um 19:53 schrieb Leo Liu: YUYV is a packed YUV format, and there is no chorma plane v2: add stream type check for YUYV pitch setup Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd

[Mesa-dev] [PATCH 19/20] st/va: reallocate surface with YUYV stream

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/picture.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/

[Mesa-dev] [PATCH 06/20] st/va: add MJPEG picture to context

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/va_private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_pri

[Mesa-dev] [PATCH 11/20] st/va: add huffman table handling for MJPEG

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/picture_mjpeg.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture_mjpeg.c b

[Mesa-dev] [PATCH 14/20] st/va: make surface allocate functions more usefully

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/surface.c| 8 src/gallium/state_trackers/va/va_private.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/st

[Mesa-dev] [PATCH 13/20] radeon/uvd: reconstruct MJPEG bitstream

2017-08-16 Thread Leo Liu
The current tier 1 mjpeg firmware only supports at the bitstream level, the later tier 2 support will be at the buffers level with newer hardware. Signed-off-by: Leo Liu <leo@amd.com> Acked-by: Christian König <christian.koe...@amd.com> --- src/gallium/drivers/radeon/radeon

[Mesa-dev] [PATCH 09/20] st/va: add picture parameter handling for MJPEG

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/picture_mjpeg.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture_mjpeg.c b

[Mesa-dev] [PATCH 16/20] st/va: reallocate surface when interlaced

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/picture.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state

[Mesa-dev] [PATCH 18/20] st/va: detect MJPEG format from bitstream

2017-08-16 Thread Leo Liu
To find if the format is supported YUYV by sampling factor which is embedded from bitstream. So we could use this info for buffer relocation on the correct format. Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state

[Mesa-dev] [PATCH 15/20] radeon/video: MJPEG not support stacked video buffers

2017-08-16 Thread Leo Liu
So we have to detect it for relocation of de-interlaced buffers Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/drivers/radeon/radeon_video.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a

[Mesa-dev] [PATCH 08/20] st/va: add handles for MJPEG Buffers

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/Makefile.sources | 1 + src/gallium/state_trackers/va/picture.c| 19 ++ src/gallium/state_trackers/va/picture_m

[Mesa-dev] [PATCH 10/20] st/va: add iq matrix handling for MJPEG

2017-08-16 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/state_trackers/va/picture_mjpeg.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture_mjpeg.c b/src/gallium/st

[Mesa-dev] [PATCH 07/20] st/va: create decoder for MJPEG format

2017-08-16 Thread Leo Liu
Mjpeg doesn't need reference Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 338e

Re: [Mesa-dev] [PATCH 00/20] MJPEG decode support through VA-API

2017-08-16 Thread Leo Liu
On 08/16/2017 01:40 PM, Leo Liu wrote: On 08/16/2017 03:22 AM, Christian König wrote: Hi Leo, Patches #2, #4, #6, #8 - #12, #14, #18-#20 are Reviewed-by: Christian König <christian.koe...@amd.com> Patch #1: When you add new formats it would be nice to have u_reduce_video_p

Re: [Mesa-dev] [PATCH 00/20] MJPEG decode support through VA-API

2017-08-16 Thread Leo Liu
hat is clearly not correct in all cases. I will add stream type check in v2. Thanks for the review. Leo Regards, Christian. Am 15.08.2017 um 22:08 schrieb Leo Liu: The series is able to enable mjpeg decode support through vaapi, and that includes for the formats of 420(NV12) and 422(YUYV). Le

[Mesa-dev] [PATCH 04/20] radeon/uvd: add mjpeg stream type

2017-08-15 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeon/radeon_uvd.h b/src/gallium/drivers/radeon/radeon_uvd.h index 0c3797e22c..a927c843da 100644 --- a/src/gallium/drivers/

[Mesa-dev] [PATCH 00/20] MJPEG decode support through VA-API

2017-08-15 Thread Leo Liu
The series is able to enable mjpeg decode support through vaapi, and that includes for the formats of 420(NV12) and 422(YUYV). Leo Liu (20): vl: add mjpeg profile and format vl: add mjpeg picture description radeon/video: add mjpeg support radeon/uvd: add mjpeg stream type radeon/uvd

[Mesa-dev] [PATCH 03/20] radeon/video: add mjpeg support

2017-08-15 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/auxiliary/util/u_video.h | 3 +++ src/gallium/drivers/radeon/radeon_video.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h index 251e

[Mesa-dev] [PATCH 18/20] st/va: detect mjpeg format from bitstream

2017-08-15 Thread Leo Liu
To find if the format is supported yuyv by sampling factor which is embedded from bitstream. So we could use this info for buffer relocation on the correct format. Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 1 + src/gallium/state_track

[Mesa-dev] [PATCH 16/20] st/va: relocate surface when stack field false

2017-08-15 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 59594829dd..3af387ea5b 100644 --- a/src/g

[Mesa-dev] [PATCH 09/20] st/va: add picture parameter handling for mjpeg

2017-08-15 Thread Leo Liu
Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/state_trackers/va/picture_mjpeg.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/picture_mjpeg.c b/src/gallium/state_trackers/va/picture_mjpeg.c index b027

[Mesa-dev] [PATCH 17/20] radeon/uvd: add yuyv format support for target buffer

2017-08-15 Thread Leo Liu
YUYV is a packed YUV format, and there is no chorma plane Signed-off-by: Leo Liu <leo@amd.com> --- src/gallium/drivers/radeon/radeon_uvd.c | 8 ++-- src/gallium/drivers/radeonsi/si_uvd.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/

<    1   2   3   4   5   >