[Libva] Question about vaPutSurface
Gwenole Beauchesne
gb.devel at gmail.com
Tue Jun 24 21:35:38 PDT 2014
Hi,
2014-06-24 13:27 GMT+02:00 Jean-Yves Avenard <jyavenard at gmail.com>:
> Hi.
>
> Following earlier discussion, I've replaced our use of
> vaCopySurfaceGLC with a call to vaPutSurface.
>
> This is the resulting change:
> https://github.com/MythTV/mythtv/commit/9ef798e543e63785d898eb23e77ca1a2a7d08c4b
>
> I have issue with the way the frame is scaled on the screen following
> that change, and I can't make the logic of it.
>
> On my laptop, 11" macbook air with haswell i6-4650U with HD5000
> graphic adapter. It has a 1366x768 screen. The resolution of the
> screen is probably irrelevant as it doesn't matter the size of the
> window I'm displaying to, it always exhibit the same behaviour.
>
> To have a 1440x1080 video properly scaled, I need to call vaPutSurface with:
> va_status = vaPutSurface(m_display->m_va_disp, surface,
> pic->m_pixmap,
> 0, 0,
> m_size.width(), m_size.height(),
> 0, 0,
> 1014, 576, //m_size.width(), m_size.height(),
> NULL, 0,
> field);
>
> m_size.width() return 1440, and m_size.height() returns 1080.
> The texture and XPixmap created are also 1440x1080 (same size as the
> video being played)
Have you checked with the XPixmap or through TFP/GL only?
You can use the X RENDER extension to display that pixmap if you want.
Note: if your clip provides clipping regions, this needs to be
honoured as follows:
src_rect will be the crop region
dst_rect will be the source video size minus the crop size, with
origin = (0,0). You pixmap should have the cropped size too btw.
The first step is to validate the X pixmap itself. If you don't have
cropping in the clip, then vaPutSurface() to a Pixmap must work as
follows:
src_rect to match the video size with origin = (0, 0)
dst_rect to match the pixmap size with origin = (0, 0)
If this doesn't work, please fill in a bug report. This must be fixed.
Thanks,
Gwenole.
More information about the Libva
mailing list