[FFmpeg-cvslog] libx264: add 'stats' private option for setting 2pass stats filename.

Anton Khirnov git at videolan.org
Wed Mar 14 03:54:17 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Mar 12 17:20:20 2012 +0100| [d533e395e14d403948ca2424efbcee92429ef8e1] | committer: Anton Khirnov

libx264: add 'stats' private option for setting 2pass stats filename.

x264 always opens the file itself with fopen, so we cannot use the
standard lavc stats mechanism.

CC: libav-stable at libav.org

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

 libavcodec/libx264.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index a3b22ae..fdde630 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -66,6 +66,7 @@ typedef struct X264Context {
     char *partitions;
     int direct_pred;
     int slice_max_size;
+    char *stats;
 } X264Context;
 
 static void X264_log(void *p, int level, const char *fmt, va_list args)
@@ -325,6 +326,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
     PARSE_X264_OPT("psy-rd", psy_rd);
     PARSE_X264_OPT("deblock", deblock);
     PARSE_X264_OPT("partitions", partitions);
+    PARSE_X264_OPT("stats", stats);
     if (x4->psy >= 0)
         x4->params.analyse.b_psy  = x4->psy;
     if (x4->rc_lookahead >= 0)
@@ -507,6 +509,7 @@ static const AVOption options[] = {
     { "temporal",      NULL,      0,    AV_OPT_TYPE_CONST, { X264_DIRECT_PRED_TEMPORAL }, 0, 0, VE, "direct-pred" },
     { "auto",          NULL,      0,    AV_OPT_TYPE_CONST, { X264_DIRECT_PRED_AUTO },     0, 0, VE, "direct-pred" },
     { "slice-max-size","Limit the size of each slice in bytes",           OFFSET(slice_max_size),AV_OPT_TYPE_INT,    {-1 }, -1, INT_MAX, VE },
+    { "stats",         "Filename for 2 pass stats",                       OFFSET(stats),         AV_OPT_TYPE_STRING, { 0 },  0,       0, VE },
     { NULL },
 };
 



More information about the ffmpeg-cvslog mailing list