[Libva] Question about vaPutSurface

Jean-Yves Avenard jyavenard at gmail.com
Tue Jun 24 04:27:01 PDT 2014


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)

So I need to use destw of 1014 and a desth of 576. Those aren't exact,
it's the values I found that filled completely my screen and it
doesn't look like the people are on an extreme diet.

For a video that is 720x576
I have to use:
destw = 510
desth = 326

For a 1920x800, I use destw = 1800 and desth = 600

Any thoughts, feedbacks will be greatly appreciated.

Thanks !
JY


More information about the Libva mailing list