[vlc-commits] transcode: do not include the decoder padding in the output SAR

Steve Lhomme git at videolan.org
Wed Apr 4 18:27:52 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Apr  4 12:10:17 2018 +0200| [eccdfc20172c725de90ff54f6b4d4d46988a1cf9] | committer: Steve Lhomme

transcode: do not include the decoder padding in the output SAR

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eccdfc20172c725de90ff54f6b4d4d46988a1cf9
---

 modules/stream_out/transcode/video.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 1a641bb929..74856c870b 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -576,8 +576,10 @@ static void transcode_video_sar_init( sout_stream_t *p_stream,
     {
         vlc_ureduce( &id->p_encoder->fmt_out.video.i_sar_num,
                      &id->p_encoder->fmt_out.video.i_sar_den,
-                     (uint64_t)p_vid_out->i_sar_num * id->p_encoder->fmt_out.video.i_width * p_vid_out->i_height,
-                     (uint64_t)p_vid_out->i_sar_den * id->p_encoder->fmt_out.video.i_height * p_vid_out->i_width,
+                     (uint64_t)p_vid_out->i_sar_num * (id->p_encoder->fmt_out.video.i_x_offset + id->p_encoder->fmt_out.video.i_visible_width)
+                                                    * (p_vid_out->i_x_offset + p_vid_out->i_visible_height),
+                     (uint64_t)p_vid_out->i_sar_den * (id->p_encoder->fmt_out.video.i_y_offset + id->p_encoder->fmt_out.video.i_visible_height)
+                                                    * (p_vid_out->i_y_offset + p_vid_out->i_visible_width),
                      0 );
     }
     else



More information about the vlc-commits mailing list