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 = align(tmpl->heigh

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

2017-09-12 Thread Christian König
Am 12.09.2017 um 18:10 schrieb 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 yo

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 Christian König
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 affects 720p video, so I did quite a bit tests on

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

2017-09-12 Thread 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 affects 720p video, so I did quite a bit tests on 720p video dec/enc, and haven't see any

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

2017-09-12 Thread Christian König
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. Instead we should rather fix the scaler to use the original width/height of the video buffer and not the adjusted width/height of the resources. Regards, Chris

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 wrote: In code: template.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); ... template.height *= array_size; It turns out the height will be aligned with 2*

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

2017-09-12 Thread Emil Velikov
Hi Leo, On 12 September 2017 at 14:56, Leo Liu wrote: > In code: > template.height = align(tmpl->height / array_size, > VL_MACROBLOCK_HEIGHT); > ... > template.height *= array_size; > > It turns out the height will be aligned with 2*VL_MACROBLOCK_HEIGHT. > The problematic