Skip to contentSkip to conversation

Placement and cropping of video due to aspect ratio mismatch

DISCUSSION Jyotsana 2 participants 2 messages May 31, 2011 – Jun 2, 2011

lore
Share & tools
lore

Jyotsana

author
#0 lore raw

Hi,

I am playing video using "libva-1.0.7" and gstreamer-vaapi plugin.
A window is created and passed to the plugin so that video is rendered on it.
There is an observation if the aspect ratio of the window is different from the aspect ratio of the video, then some videos are aligned with top edge of the window, some appear in the middle and some aligned with the bottom edge of the window.
A particular video always gets rendered at the same location.
In some cases, the video is getting cropped.
I am not sure whether this is handled by the plugin or the driver.
Is this behaviour known.

Thanks and Regards,
Jyotsana.

#1 lore raw
Quoted 14 lines · Jyotsana

Hi,

I am playing video using "libva-1.0.7" and gstreamer-vaapi plugin. A window is created and passed to the plugin so that video is rendered on it.
There is an observation if the aspect ratio of the window is different from the aspect ratio of the video,
then some videos are aligned with top edge of the window, some appear in the middle and
some aligned with the bottom edge of the window.
A particular video always gets rendered at the same location. In some cases, the video is getting cropped.
I am not sure whether this is handled by the plugin or the driver. Is this behaviour known.

This is the behavior of the plugin. The plugin always tries to use the aspect ratio of the video to display this video.

.e.g
a video is 1280x536 (1280.0/536=2.388), the window is 300x300. the rendered region calculated by this plugin is 300x125 (300.0/125=2.4), and it is aligned with the top edge of the window.

Regards
Haihao

Quoted 9 lines

Thanks and Regards,
Jyotsana.

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx