From: Loren Merritt Date: Sat, 5 Feb 2005 22:55:48 +0000 (+0000) Subject: VfW: Enable multipass by default, increase the configurable range of I and B quant... X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=70ce7a4be261f638a614918ed0e822b7f60d8269;p=x264.git 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 --- diff --git a/encoder/encoder.c b/encoder/encoder.c index ad073192..8e4a2c73 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -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; diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 5441144b..c405cba1 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -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; } diff --git a/vfw/config.c b/vfw/config.c index 19535183..ed1ee989 100644 --- a/vfw/config.c +++ b/vfw/config.c @@ -74,7 +74,7 @@ static const reg_int_t reg_int_table[] = { "passbitrate", ®.i_2passbitrate, 800 }, { "pass_number", ®.i_pass, 1 }, { "fast1pass", ®.b_fast1pass, 1 }, - { "updatestats", ®.b_updatestats, 0 }, + { "updatestats", ®.b_updatestats, 1 }, /* Advance dialog */ { "cabac", ®.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; diff --git a/vfw/resource.rc b/vfw/resource.rc index b6d07e70..00397426 100644 --- a/vfw/resource.rc +++ b/vfw/resource.rc @@ -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