[Mesa-dev] [PATCH] vl/compositor: fix weave shader bugs

Maarten Lankhorst maarten.lankhorst at canonical.com
Tue Dec 18 04:21:31 PST 2012


Op 18-12-12 13:04, Maarten Lankhorst schreef:
> Op 18-12-12 11:42, Christian König schreef:
>> On 18.12.2012 09:18, Maarten Lankhorst wrote:
>>> Writemask was XY instead of YZ (thanks to calim for spotting it).
>>>
>>> The pixel calculation resulted in the pixel always being off by one.
>>> If y was .5:
>>>
>>> y' = round(y) + 0.5 = 1.5
>>>
>>> Fixing this also means the LRP function has to swap the pixels it, since
>>> it's now the other way around for top/bottom.
>>>
>>> WIth these fixes only chroma for top and bottom pixel rows are wrongly interpolated
>>> in my test program:
>> Sounds good, but what's the reason that first and last row is interpolated wrong? Just some issues with the border color/wrap handling?
> If I had to guess it interpolates the first and last row, rather than using the exact value of that line for the top/bottom chroma samples
> there. So it's just border handling sampling from both surfaces that's wrong I think.
>
> As you can see in the diff below, it repeats the cbcr[1] value for cbcr[0], similar for cbcr[63] and cbcr[62]:
>>> --- nvidia
>>> +++ nouveau
>>> @@ -1,4 +1,4 @@
>>> -YCbCr[0] = 00c080
>>> +YCbCr[0] = 00b070
>>>   YCbCr[1] = 00b070
>>>   YCbCr[2] = 029050
>>>   YCbCr[3] = 207050
>>> @@ -61,4 +61,4 @@
>>>   YCbCr[60] = 0c5070
>>>   YCbCr[61] = c05090
>>>   YCbCr[62] = 0e70b0
>>> -YCbCr[63] = e080c0
>>> +YCbCr[63] = e070b0
>>>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
>> Reviewed-by: Christian König <christian.koenig at amd.com>
> Thanks, will commit.
>
> The program I used for testing is attached.
Now it is!
> Also I seem to be getting a lockup if I convert  that program to use YV12 format instead, nouveau requires the interlaced buffer handling for vdec,
> and disables support for progressive video buffers. Would probably also need the separate patch, for fixing up vl_video_buffer_surfaces.
>
> ~Maarten

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vdpow-luma.c
Type: text/x-csrc
Size: 15980 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121218/c5d23a08/attachment.c>


More information about the mesa-dev mailing list