ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Thu Jun 18 
14:40:11 2015 +0200| [7b1c03aa744f1f82fe30ea2cd2aeef2ea01d5ce9] | committer: 
Michael Niedermayer

avcodec/libx264: Avoid reconfig on equivalent aspect ratios

Signed-off-by: Michael Niedermayer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b1c03aa744f1f82fe30ea2cd2aeef2ea01d5ce9
---

 libavcodec/libx264.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 220d43e..4f34d06 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -170,8 +170,7 @@ static void reconfig_encoder(AVCodecContext *ctx, const 
AVFrame *frame)
         x4->params.b_tff = frame->top_field_first;
         x264_encoder_reconfig(x4->enc, &x4->params);
     }
-    if (x4->params.vui.i_sar_height != ctx->sample_aspect_ratio.den ||
-        x4->params.vui.i_sar_width  != ctx->sample_aspect_ratio.num) {
+    if (x4->params.vui.i_sar_height*ctx->sample_aspect_ratio.num != 
ctx->sample_aspect_ratio.den * x4->params.vui.i_sar_width) {
         x4->params.vui.i_sar_height = ctx->sample_aspect_ratio.den;
         x4->params.vui.i_sar_width  = ctx->sample_aspect_ratio.num;
         x264_encoder_reconfig(x4->enc, &x4->params);

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to