yakutozcan / doubango

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

Video feed stretched when source and destination aspect ratio is different #397

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Chose a default video quality that is a higher resolution than the device 
camera. 720p while using iPhone 4s front facing camera.
2. Initiate a video session with a device that supports 720p.
3. Notice that the video is stretched.

What is the expected output? What do you see instead?
Video should be cropped into new aspect ratio rather than stretched.

What version of the product are you using? On what operating system?
Latest Doubango and iOS NGN stack.

Please provide any additional information below.

When a video session is negotiated at a resolution higher than the default 
device camera resolution. The video is upscaled to fit the negotiated video 
size. However, the upscaling is stretching the video rather than cropping.
I have tracked down the issue down to this method in tdav_converter_video.cxx

static tsk_size_t tdav_converter_video_libyuv_process(tmedia_converter_video_t* 
_self, const void* buffer, void** output, tsk_size_t* output_max_size)

It appears that this method assumes that the source and destination aspect 
ratio are the same during the scaling process.

Original issue reported on code.google.com by af...@kacaj.net on 16 Jul 2014 at 12:15