[vlc-devel] [PATCH] transcode: video: clean code
Steve Lhomme
robux4 at videolabs.io
Thu Apr 6 13:49:36 CEST 2017
- remove unused final f_aspect set
- remove useless cast
---
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 079fad2bd4..47491f1cda 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;
--
2.11.1
More information about the vlc-devel
mailing list