ref: 98eb8af0377307b84a9777a1adff4a4962c82b81
parent: 17472077001bf54722ffaef82affd99d4d83c482
parent: 75afcee962c660b6fcd82e0eb8b1762aadee584f
author: John Koleszar <jkoleszar@google.com>
date: Wed Oct 27 02:50:02 EDT 2010
Merge "vpxenc: add deterministic output option"
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -430,6 +430,8 @@
struct EbmlGlobal
{
+ int debug;
+
FILE *stream;
uint64_t last_pts_ms;
vpx_rational_t framerate;
@@ -552,8 +554,10 @@
Ebml_SerializeUnsigned(ebml, TimecodeScale, 1000000);
Ebml_SerializeFloat(ebml, Segment_Duration,
ebml->last_pts_ms + frame_time);
- Ebml_SerializeString(ebml, 0x4D80, "vpxenc" VERSION_STRING);
- Ebml_SerializeString(ebml, 0x5741, "vpxenc" VERSION_STRING);
+ Ebml_SerializeString(ebml, 0x4D80,
+ ebml->debug ? "vpxenc" : "vpxenc" VERSION_STRING);
+ Ebml_SerializeString(ebml, 0x5741,
+ ebml->debug ? "vpxenc" : "vpxenc" VERSION_STRING);
Ebml_EndSubElement(ebml, &startInfo);
}
}
@@ -740,6 +744,8 @@
#include "args.h"
+static const arg_def_t debugmode = ARG_DEF("D", "debug", 0,
+ "Debug mode (makes output deterministic)");
static const arg_def_t outputfile = ARG_DEF("o", "output", 1,
"Output filename");
static const arg_def_t use_yv12 = ARG_DEF(NULL, "yv12", 0,
@@ -774,6 +780,7 @@
"Output IVF (default is WebM)");
static const arg_def_t *main_args[] =
{
+ &debugmode,
&outputfile, &codecarg, &passes, &pass_arg, &fpf_name, &limit, &deadline,
&best_dl, &good_dl, &rt_dl,
&verbosearg, &psnrarg, &use_ivf, &framerate,
@@ -1052,6 +1059,8 @@
write_webm = 0;
else if (arg_match(&arg, &outputfile, argi))
out_fn = arg.val;
+ else if (arg_match(&arg, &debugmode, argi))
+ ebml.debug = 1;
else
argj++;
}