[Libva] Question about vaPutSurface

Jean-Yves Avenard jyavenard at gmail.com
Tue Jun 24 18:14:47 PDT 2014


Hi

On 25 June 2014 11:07, Zhao, Yakui <yakui.zhao at intel.com> wrote:
>> 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);
>>
>
> The vaPutSurface contains two groups of parameters to determine how to
> display the corresponding video.
>   >Src rectangle: This determines the region of source region.
>   >Dest rectangle: This determines where the video is displayed on the
> target window/pixmap
>
> Under some scenarios the dimension of the video source is different with
> that of the target window/pixmap. In such case it will use the
> width/height ratio of the source video to calibrate the corresponding
> dest region, which is to avoid the stretching.
> Of course you can use any region to display it if the stretching doesn't
> matter.

Thanks for your answer.

However, it doesn't make much sense to me.
I'm already making use of the src and dest rectangle as you can see in
my snippet above.

And more importantly, the GL viewport of the destination rectangle is
set to be of the dimension of the source rectangle.

There should be no stretching, scaling to be done of any kind, seeing
that source rectangle and destination rectangle are of the same
dimension.

Yet, somehow, vaPutSurface doesn't respect that and apply some
stretching magic I'm yet to comprehend


More information about the Libva mailing list