[vlc-commits] transcode: video: clean code
Steve Lhomme
git at videolan.org
Fri Apr 7 11:54:41 CEST 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Apr 6 13:49:36 2017 +0200| [40c9a6235c90ef8685f35b21b66be41e5013af98] | committer: Jean-Baptiste Kempf
transcode: video: clean code
- remove unused final f_aspect set
- remove useless cast
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40c9a6235c90ef8685f35b21b66be41e5013af98
---
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 079fad2..47491f1 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;
More information about the vlc-commits
mailing list