From 40c9a6235c90ef8685f35b21b66be41e5013af98 Mon Sep 17 00:00:00 2001 From: Steve Lhomme <robUx4@videolabs.io> Date: Thu, 6 Apr 2017 13:49:36 +0200 Subject: [PATCH] transcode: video: clean code - remove unused final f_aspect set - remove useless cast Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> --- modules/stream_out/transcode/video.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c index 079fad2bd4b5..47491f1cdacb 100644 --- a/modules/stream_out/transcode/video.c +++ b/modules/stream_out/transcode/video.c @@ -468,11 +468,11 @@ static void transcode_video_size_init( sout_stream_t *p_stream, p_fmt_out->video.i_sar_den / p_fmt_out->video.i_height; - msg_Dbg( p_stream, "decoder aspect is %f:1", (double) f_aspect ); + msg_Dbg( p_stream, "decoder aspect is %f:1", f_aspect ); /* Change f_aspect from source frame to source pixel */ f_aspect = f_aspect * i_src_visible_height / i_src_visible_width; - msg_Dbg( p_stream, "source pixel aspect is %f:1", (double) f_aspect ); + msg_Dbg( p_stream, "source pixel aspect is %f:1", f_aspect ); /* Calculate scaling factor for specified parameters */ if( id->p_encoder->fmt_out.video.i_visible_width <= 0 && @@ -533,7 +533,7 @@ static void transcode_video_size_init( sout_stream_t *p_stream, /* Change aspect ratio from source pixel to scaled pixel */ f_aspect = f_aspect * f_scale_height / f_scale_width; - msg_Dbg( p_stream, "scaled pixel aspect is %f:1", (double) f_aspect ); + msg_Dbg( p_stream, "scaled pixel aspect is %f:1", f_aspect ); /* f_scale_width and f_scale_height are now final */ /* Calculate width, height from scaling @@ -545,9 +545,6 @@ static void transcode_video_size_init( sout_stream_t *p_stream, 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); - /* Change aspect ratio from scaled pixel to output frame */ - f_aspect = f_aspect * i_dst_visible_width / i_dst_visible_height; - /* Store calculated values */ id->p_encoder->fmt_out.video.i_width = i_dst_width; id->p_encoder->fmt_out.video.i_visible_width = i_dst_visible_width; -- GitLab