[FFmpeg-cvslog] Do not (re-) set libx264 parameter b_tff if interlaced encoding was not requested.

Carl Eugen Hoyos git at videolan.org
Mon Mar 18 02:26:10 CET 2013


ffmpeg | branch: release/0.9 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Mar 16 20:13:44 2013 +0100| [8b597077ae1b59a29350b96683cd406cfc4f801d] | committer: Carl Eugen Hoyos

Do not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.

Reconfiguring can break x264 lossless encoding.

Fixes ticket #2165.
(cherry picked from commit 75c7e4583f4fd727d236a12763a265502fe00988)

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

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

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 38351e5..acc4cac 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -174,7 +174,7 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
             frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
             frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
                                             X264_TYPE_AUTO;
-        if (x4->params.b_tff != frame->top_field_first) {
+        if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) {
             x4->params.b_tff = frame->top_field_first;
             x264_encoder_reconfig(x4->enc, &x4->params);
         }



More information about the ffmpeg-cvslog mailing list