Commit 756ceff1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

transcode: video: Simplify dimension rounding.

Do not round visible dimensions
parent 5d1a7f70
......@@ -522,10 +522,13 @@ static void transcode_video_size_init( sout_stream_t *p_stream,
* Make sure its multiple of 2
*/
/* width/height of output stream */
int i_dst_visible_width = 2 * lroundf(f_scale_width*i_src_visible_width/2);
int i_dst_visible_height = 2 * lroundf(f_scale_height*i_src_visible_height/2);
int i_dst_width = 2 * lroundf(f_scale_width*p_fmt_out->video.i_width/2);
int i_dst_height = 2 * lroundf(f_scale_height*p_fmt_out->video.i_height/2);
int i_dst_visible_width = lroundf(f_scale_width*i_src_visible_width);
int i_dst_visible_height = lroundf(f_scale_height*i_src_visible_height);
int i_dst_width = lroundf(f_scale_width*p_fmt_out->video.i_width);
int i_dst_height = lroundf(f_scale_height*p_fmt_out->video.i_height);
if( i_dst_width & 1 ) ++i_dst_width;
if( i_dst_height & 1 ) ++i_dst_height;
/* Store calculated values */
id->p_encoder->fmt_out.video.i_width = i_dst_width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment