Can someone point me to the source code/ or documentation of resizing code that Android VideoView uses to resize videos to fit the screen when videos of dimensions other than the screen resolution are attempted to be displayed?
Asked
Active
Viewed 61 times
0
-
What problem are you trying to solve? **videoView** is likely using the standard formula for [aspect ratio calculation](https://www.google.co.uk/search?q=aspect+ratio+formula). For landscape mode fit: `Disp_Width = ( (input_width / input_height) * Disp_Height );` and swap around the width/height if it's portrait mode needed to fit. In that code example you need to know height/width of your _input_ video and also the screen's _display_ resolution in height then it can tell you what number to set as displayed width of video. – VC.One Oct 28 '21 at 19:44
-
I am actually looking for the algorithm used for the rescaling operation - whether it is bilinear/bicubic or lanczos interpolations. – Avinab Saha Oct 30 '21 at 01:04