[Mesa-dev] [PATCH 2/2] st/vdapu: use lanczos filter for scaling

Nayan Deshmukh nayan26deshmukh at gmail.com
Mon Jul 18 16:42:50 UTC 2016


Hi Emil,


On Mon, Jul 18, 2016 at 4:44 PM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:

> Hi Nayan,
>
> A couple of suggestions, which I hope will be less controversial than
> the "s/.f/.0f/" from earlier ;-)
>
> On 14 July 2016 at 21:58, Nayan Deshmukh <nayan26deshmukh at gmail.com>
> wrote:
> > HIGH_QUALITY_SCALING_L2 to HIGH_QUALTIY_SCALING_L9
> > uses lanczos filter with number representing the size
> > of the sinc window.
> >
> > Signed-off-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
> > ---
> >  src/gallium/state_trackers/vdpau/mixer.c         | 150
> ++++++++++++++++++-----
> >  src/gallium/state_trackers/vdpau/query.c         |   8 ++
> >  src/gallium/state_trackers/vdpau/vdpau_private.h |   7 ++
> >  3 files changed, 131 insertions(+), 34 deletions(-)
> >  mode change 100644 => 100755 src/gallium/state_trackers/vdpau/mixer.c
> >  mode change 100644 => 100755 src/gallium/state_trackers/vdpau/query.c
> >  mode change 100644 => 100755
> src/gallium/state_trackers/vdpau/vdpau_private.h
> >
> Please don't add the execute bit on source files.
>
> Sorry for this, I'll take care of this in the next version.


> > @@ -660,6 +691,54 @@ vlVdpVideoMixerSetFeatureEnables(VdpVideoMixer
> mixer,
> >           vlVdpVideoMixerUpdateBicubicFilter(vmixer);
> >           break;
> >
> > +      case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2:
> [...]
> > +      case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9:
> > +         vmixer->lanczos.enabled = feature_enables[i];
> > +         vmixer->lanczos.size = 9;
> > +         vlVdpVideoMixerUpdateLanczosFilter(vmixer);
> > +         break;
> > +
> Considering that libvdpau cannot break its ABI the above is simply:
>
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8:
>       case VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9:
>          vmixer->lanczos.enabled = feature_enables[i];
>          vmixer->lanczos.size = features[i] -
> VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 + 1;
>          vlVdpVideoMixerUpdateLanczosFilter(vmixer);
>          break;
>
> A much better approach. Thanks.

Regards,
Nayan.

Regards,
> Emil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160718/dfb228d9/attachment.html>


More information about the mesa-dev mailing list