[Mesa-dev] Fwd: [PATCH] st/vdpau: use bicubic filter for scaling

Christian König deathsimple at vodafone.de
Mon Jun 27 14:20:36 UTC 2016


This code fragment:

+   /* t = frac(i_vtex*size)
...
+   ureg_MUL(shader, t, i_vtex, ureg_imm1f(shader, size));

Probably doesn't do what you expect it to do when the pixel center is at 
0.5 instead of 0.0.

For the matrix and most other filters the difference doesn't matter 
because you get the same offset on x/y as input you need to apply in the 
texture instructions as well.

Regards,
Christian.

Am 27.06.2016 um 15:51 schrieb Nayan Deshmukh:
> Hi Christian,
>
> I haven't taken that into account, but how will it any way affect my 
> calculation. I have written
> the code taking inspiration from the way matrix_filter uses offsets.
>
> Regards,
> Nayan.
>
> On Mon, Jun 27, 2016 at 6:55 PM, Christian König 
> <deathsimple at vodafone.de <mailto:deathsimple at vodafone.de>> wrote:
>
>     Hi guys,
>
>     Nayan have you taken into account that the pixel center is at 0.5
>     and not 0.0?
>
>     Regards,
>     Christian.
>
>
>     Am 26.06.2016 um 22:30 schrieb Andy Furniss:
>
>         Nayan Deshmukh wrote:
>
>             Hi Andy,
>
>             On Sun, Jun 26, 2016 at 12:25 AM, Andy Furniss
>             <adf.lists at gmail.com <mailto:adf.lists at gmail.com>> wrote:
>
>                 Nayan Deshmukh wrote:
>
>                     Hi Andy,
>
>                     Thanks for testing the patches.
>
>                     Please send me the videos and ratios with which
>                     there is corruption.
>
>
>
>                 https://drive.google.com/file/d/0BxP5-S1t9VEEaHZEM203RFpyNEE/view?usp=sharing
>
>
>                 This has no aspect encoded and displayed fullscreen on
>                 a 1920x1080
>                 monitor shows vertical line artifacts over the first
>                 2/3 of the image.
>
>                 When I say lines they are not lines as such just that
>                 the distortion
>                 on the pendulum shows as it passes over imaginary
>                 lines at fixed
>                 points on the screen.
>
>                 with mplayer -aspect 4/3 or 16/9 it doesn't.
>
>
>             I tested the videos and found out that the distortion is
>             because of the
>             amount
>             of calculation done in the fragment shader. I tested the
>             video with
>             vl_median_filter
>             and it showed no distortion however, with
>             vl_matrix_filter( which requires
>             more
>             calculations than vl_median_filter) it showed the same
>             distortion. I'll try
>             to make it
>             more efficient. But it still requires a lot of processing
>             for a single
>             pixel as it uses
>             15 neighbouring pixel.
>
>
>         Seems a bit strange, does the processing needed vary greatly with
>         similar scale amounts? I have a powerful GPU and can force clocks
>         high, but it makes no difference.
>
>         Below is a png showing the artifacts I see on pendulum fullscreen
>         are these what you see?
>
>         If rather than full screen I stretch out the window to scale,
>         there
>         will be many sizes that don't produce those.
>
>         https://drive.google.com/file/d/0BxP5-S1t9VEEd2hwNVp0ZXRSZTA/view?usp=sharing
>
>
>             Also I don't see any offsets with the videos, may be I am
>             missing something.
>             If could tell me more about the offsets, I'll try to debug
>             them.
>
>
>         https://drive.google.com/file/d/0BxP5-S1t9VEEUGZTbndOMzBNZnM/view?usp=sharing
>
>
>         Is a default scale, if you download both pngs and use something to
>         display them both at the same time and line up the windows one on
>         top of the other then flip between them you can see although the
>         windows are lined up the images contained are not.
>
>         You can make your own screen/window shots with xwd and display
>         them
>         with xwud. For me using fluxbox as a desktop it's easy to line up
>         windows as they snap a bit towards the edge of the screen YMMV.
>
>         _______________________________________________
>         mesa-dev mailing list
>         mesa-dev at lists.freedesktop.org
>         <mailto:mesa-dev at lists.freedesktop.org>
>         https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160627/ad6ca57d/attachment-0001.html>


More information about the mesa-dev mailing list