[x264-devel] commit: Fix fastfirstpass (Jason Garrett-Glaser )
git version control
git at videolan.org
Tue Feb 23 18:51:11 CET 2010
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Tue Feb 23 09:50:12 2010 -0800| [7fcffde1f5bdae55def6c36ef7d9743485adb72c] | committer: Jason Garrett-Glaser
Fix fastfirstpass
Apparently the libx264 preset changes made "fastfirstpass" into "fastsecondpass" inadvertantly.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=7fcffde1f5bdae55def6c36ef7d9743485adb72c
---
common/common.c | 2 +-
x264.c | 7 +++----
x264.h | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/common/common.c b/common/common.c
index 51d8929..923b4e9 100644
--- a/common/common.c
+++ b/common/common.c
@@ -374,7 +374,7 @@ int x264_param_default_preset( x264_param_t *param, const char *preset, const ch
void x264_param_apply_fastfirstpass( x264_param_t *param )
{
/* Set faster options in case of turbo firstpass. */
- if( param->rc.b_stat_read && !param->rc.b_stat_write )
+ if( param->rc.b_stat_write && !param->rc.b_stat_read )
{
param->i_frame_reference = 1;
param->analyse.b_transform_8x8 = 0;
diff --git a/x264.c b/x264.c
index 66f505c..aabb78b 100644
--- a/x264.c
+++ b/x264.c
@@ -818,17 +818,16 @@ static int Parse( int argc, char **argv, x264_param_t *param, cli_opt_t *opt )
if( c == -1 )
break;
if( c == OPT_PRESET )
- {
preset = optarg;
- if( !strcmp( preset, "placebo" ) )
- b_turbo = 0;
- }
if( c == OPT_TUNE )
tune = optarg;
else if( c == '?' )
return -1;
}
+ if( preset && !strcmp( preset, "placebo" ) )
+ b_turbo = 0;
+
if( x264_param_default_preset( param, preset, tune ) < 0 )
return -1;
diff --git a/x264.h b/x264.h
index 7474a50..ccae5e6 100644
--- a/x264.h
+++ b/x264.h
@@ -413,7 +413,7 @@ static const char * const x264_tune_names[] = { "film", "animation", "grain", "p
int x264_param_default_preset( x264_param_t *, const char *preset, const char *tune );
/* x264_param_apply_fastfirstpass:
- * If first-pass mode is set (rc.b_stat_read == 1, rc.b_stat_write == 0),
+ * If first-pass mode is set (rc.b_stat_read == 0, rc.b_stat_write == 1),
* modify the encoder settings to disable options generally not useful on
* the first pass. */
void x264_param_apply_fastfirstpass( x264_param_t * );
More information about the x264-devel
mailing list