Commit 70ce7a4b authored by Loren Merritt's avatar Loren Merritt

VfW: Enable multipass by default, increase the configurable range of I and B quant ratios.

core: Tweak error messages.


git-svn-id: svn://svn.videolan.org/x264/trunk@116 df754926-b1dd-0310-bc7b-ec298dee348c
parent 2796ba01
......@@ -323,7 +323,7 @@ x264_t *x264_encoder_open ( x264_param_t *param )
if( param->i_width % 16 != 0 || param->i_height % 16 != 0 )
{
x264_log( h, X264_LOG_ERROR, "width %% 16 != 0 pr height %% 16 != 0 (%dx%d)\n",
x264_log( h, X264_LOG_ERROR, "width %% 16 != 0 or height %% 16 != 0 (%dx%d)\n",
param->i_width, param->i_height );
free( h );
return NULL;
......
......@@ -970,11 +970,13 @@ static int init_pass2( x264_t *h )
avgq = qscale2qp(avgq / rcc->num_entries);
x264_log(h, X264_LOG_ERROR, "Error: 2pass curve failed to converge\n");
x264_log(h, X264_LOG_ERROR, "expected bits: %llu, available: %llu, avg QP: %.4lf\n", (uint64_t)expected_bits, all_available_bits, avgq);
if(expected_bits < all_available_bits && avgq < h->param.rc.i_qp_min + 1)
x264_log(h, X264_LOG_ERROR, "expected: %.0f KiB, available: %.0f KiB, avg QP: %.4f\n", expected_bits/8192., all_available_bits/8192., avgq);
if(expected_bits < all_available_bits && avgq < h->param.rc.i_qp_min + 2)
x264_log(h, X264_LOG_ERROR, "try reducing bitrate or reducing qp_min\n");
if(expected_bits > all_available_bits && avgq > h->param.rc.i_qp_min - 1)
else if(expected_bits > all_available_bits && avgq > h->param.rc.i_qp_min - 2)
x264_log(h, X264_LOG_ERROR, "try increasing bitrate or increasing qp_max\n");
else
x264_log(h, X264_LOG_ERROR, "internal error\n");
return -1;
}
......
......@@ -74,7 +74,7 @@ static const reg_int_t reg_int_table[] =
{ "passbitrate", &reg.i_2passbitrate, 800 },
{ "pass_number", &reg.i_pass, 1 },
{ "fast1pass", &reg.b_fast1pass, 1 },
{ "updatestats", &reg.b_updatestats, 0 },
{ "updatestats", &reg.b_updatestats, 1 },
/* Advance dialog */
{ "cabac", &reg.b_cabac, 1 },
......@@ -101,7 +101,7 @@ static const reg_int_t reg_int_table[] =
static const reg_str_t reg_str_table[] =
{
{ "fourcc", reg.fcc, "h264", 5 },
{ "fourcc", reg.fcc, "H264", 5 },
{ "statsfile", reg.stats, ".\\x264.stats", MAX_PATH }
};
......@@ -620,9 +620,9 @@ BOOL CALLBACK callback_advanced( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
config->i_key_boost = 0;
SetDlgItemInt( hDlg, IDC_IPRATIO, config->i_key_boost, FALSE );
}
else if (config->i_key_boost > 60)
else if (config->i_key_boost > 70)
{
config->i_key_boost = 60;
config->i_key_boost = 70;
SetDlgItemInt( hDlg, IDC_IPRATIO, config->i_key_boost, FALSE );
}
break;
......@@ -633,9 +633,9 @@ BOOL CALLBACK callback_advanced( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
config->i_b_red = 0;
SetDlgItemInt( hDlg, IDC_PBRATIO, config->i_b_red, FALSE );
}
else if (config->i_b_red > 50)
else if (config->i_b_red > 60)
{
config->i_b_red = 50;
config->i_b_red = 60;
SetDlgItemInt( hDlg, IDC_PBRATIO, config->i_b_red, FALSE );
}
break;
......
......@@ -83,11 +83,11 @@ BEGIN
BS_AUTORADIOBUTTON,13,7,77,10
CONTROL "Single Pass - Quantizer",IDC_RADIOQUANT,"Button",
BS_AUTORADIOBUTTON,13,57,87,10
CONTROL "Two Pass",IDC_RADIOTWOPASS,"Button",BS_AUTORADIOBUTTON,
13,108,45,10
CONTROL "First Pass",IDC_2PASS1,"Button",BS_AUTORADIOBUTTON |
CONTROL "Multipass",IDC_RADIOTWOPASS,"Button",BS_AUTORADIOBUTTON,
13,108,43,10
CONTROL "First pass",IDC_2PASS1,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,27,123,46,10
CONTROL "Second Pass",IDC_2PASS2,"Button",BS_AUTORADIOBUTTON,87,
CONTROL "Nth pass",IDC_2PASS2,"Button",BS_AUTORADIOBUTTON,87,
123,58,10
CONTROL "Slider1",IDC_2PASSBITRATE_S,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,13,148,175,15
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment