[Libav-user] Preserve aspect ration while using sws_scale() API

rohit khali khali.rohit at gmail.com
Mon Aug 3 09:47:47 EEST 2020


Hi,

I am using sws_scale() API to scale my decoded YUV(any format) to YUV420P
with 'new' width and height.
Instead of hardcoding destination width and height, I want to preserve the
original aspect ratio. My idea was to provide destination height and let
API decide on width using aspect ratio.
Is there a way to achieve this?
Thanks in advance for the help!

Regards,
Rohit Khali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200803/f4673255/attachment.html>


More information about the Libav-user mailing list