VfW: cosmetics
authorLoren Merritt <pengvado@videolan.org>
Sat, 11 Feb 2006 22:04:57 +0000 (22:04 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sat, 11 Feb 2006 22:04:57 +0000 (22:04 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@431 df754926-b1dd-0310-bc7b-ec298dee348c

configure
vfw/config.c
vfw/resource.h
vfw/resource.rc

index 07dcdef..8b51478 100755 (executable)
--- a/configure
+++ b/configure
@@ -30,7 +30,7 @@ int main () { $3 return 0; }
 EOF
     $CC $CFLAGS $LDFLAGS $2 conftest.c -o conftest 2>$DEVNULL
     TMP="$?"
-    rm -f conftest.c conftest
+    rm -f conftest.c conftest*
     return $TMP
 }
 
index 813eb9d..1ca227f 100644 (file)
@@ -84,48 +84,50 @@ static const reg_int_t reg_int_table[] =
     { "pass_number",    &reg.i_pass,            1 },
     { "fast1pass",      &reg.b_fast1pass,       1 },
     { "updatestats",    &reg.b_updatestats,     1 },
-    { "threads",        &reg.i_threads,         1 },
 
-    /* Advance dialog */
-    { "cabac",          &reg.b_cabac,           1 },
-    { "loop_filter",    &reg.b_filter,          1 },
-    { "keyint_max",     &reg.i_keyint_max,    250 },
-    { "keyint_min",     &reg.i_keyint_min,     25 },
-    { "scenecut",       &reg.i_scenecut_threshold, 40 },
+    /* Rate Control */
+    { "key_boost",      &reg.i_key_boost,      40 },
+    { "b_red",          &reg.i_b_red,          30 },
+    { "curve_comp",     &reg.i_curve_comp,     60 },
     { "qp_min",         &reg.i_qp_min,         10 },
     { "qp_max",         &reg.i_qp_max,         51 },
     { "qp_step",        &reg.i_qp_step,         4 },
-    { "refmax",         &reg.i_refmax,          1 },
+    { "scenecut",       &reg.i_scenecut_threshold, 40 },
+    { "keyint_min",     &reg.i_keyint_min,     25 },
+    { "keyint_max",     &reg.i_keyint_max,    250 },
+
+    /* MBs&Frames */
+    { "dct8x8",         &reg.b_dct8x8,          1 },
+    { "psub16x16",      &reg.b_psub16x16,       1 },
+    { "bsub16x16",      &reg.b_bsub16x16,       1 },
+    { "psub8x8",        &reg.b_psub8x8,         0 },
+    { "i8x8",           &reg.b_i8x8,            1 },
+    { "i4x4",           &reg.b_i4x4,            1 },
     { "bmax",           &reg.i_bframe,          2 },
-    { "direct_pred",    &reg.i_direct_mv_pred,  1 },
-    { "b_refs",         &reg.b_b_refs,          0 },
     { "b_bias",         &reg.i_bframe_bias,     0 },
+    { "b_refs",         &reg.b_b_refs,          0 },
     { "b_adapt",        &reg.b_bframe_adaptive, 1 },
     { "b_bidir_me",     &reg.b_bidir_me,        0 },
     { "b_wpred",        &reg.b_b_wpred,         1 },
-    { "inloop_a",       &reg.i_inloop_a,        0 },
-    { "inloop_b",       &reg.i_inloop_b,        0 },
-    { "key_boost",      &reg.i_key_boost,      40 },
-    { "b_red",          &reg.i_b_red,          30 },
-    { "curve_comp",     &reg.i_curve_comp,     60 },
-    { "sar_width",      &reg.i_sar_width,       1 },
-    { "sar_height",     &reg.i_sar_height,      1 },
-    { "noise_reduction",&reg.i_noise_reduction, 0 },
-    { "log_level",      &reg.i_log_level,       1 },
+    { "direct_pred",    &reg.i_direct_mv_pred,  1 },
 
     /* analysis */
-    { "i4x4",           &reg.b_i4x4,            1 },
-    { "i8x8",           &reg.b_i8x8,            1 },
-    { "dct8x8",         &reg.b_dct8x8,          0 },
-    { "psub16x16",      &reg.b_psub16x16,       1 },
-    { "psub8x8",        &reg.b_psub8x8,         1 },
-    { "bsub16x16",      &reg.b_bsub16x16,       1 },
+    { "subpel",         &reg.i_subpel_refine,   4 },
     { "me_method",      &reg.i_me_method,       1 },
     { "me_range",       &reg.i_me_range,       16 },
     { "chroma_me",      &reg.b_chroma_me,       1 },
-    { "subpel",         &reg.i_subpel_refine,   4 },
+    { "refmax",         &reg.i_refmax,          1 },
     { "mixedref",       &reg.b_mixedref,        0 },
-    { "trellis",        &reg.i_trellis,         1 }
+    { "sar_width",      &reg.i_sar_width,       1 },
+    { "sar_height",     &reg.i_sar_height,      1 },
+    { "threads",        &reg.i_threads,         1 },
+    { "cabac",          &reg.b_cabac,           1 },
+    { "trellis",        &reg.i_trellis,         1 },
+    { "noise_reduction",&reg.i_noise_reduction, 0 },
+    { "loop_filter",    &reg.b_filter,          1 },
+    { "inloop_a",       &reg.i_inloop_a,        0 },
+    { "inloop_b",       &reg.i_inloop_b,        0 },
+    { "log_level",      &reg.i_log_level,       1 }
 
 };
 
@@ -386,6 +388,10 @@ void tabs_enable_items( HWND hDlg, CONFIG * config )
         EnableWindow( GetDlgItem( hTabs[0], IDC_UPDATESTATS ), FALSE );
         EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE ), FALSE );
         EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE_BROWSE ), FALSE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_CURVECOMP ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPMIN ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPMAX ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPSTEP ), TRUE );
         break;
 
     case 1 : /* 1 Pass, Quantizer Based */
@@ -398,6 +404,10 @@ void tabs_enable_items( HWND hDlg, CONFIG * config )
         EnableWindow( GetDlgItem( hTabs[0], IDC_UPDATESTATS ), FALSE );
         EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE ), FALSE );
         EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE_BROWSE ), FALSE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_CURVECOMP ), FALSE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPMIN ), FALSE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPMAX ), FALSE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPSTEP ), FALSE );
         break;
 
     case 2 : /* 2 Pass */
@@ -410,23 +420,30 @@ void tabs_enable_items( HWND hDlg, CONFIG * config )
         EnableWindow( GetDlgItem( hTabs[0], IDC_UPDATESTATS ), TRUE );
         EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE ), TRUE );
         EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE_BROWSE ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_CURVECOMP ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPMIN ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPMAX ), TRUE );
+        EnableWindow( GetDlgItem( hTabs[1], IDC_QPSTEP ), TRUE );
         break;
     }
 
-    EnableWindow( GetDlgItem( hTabs[1], IDC_DIRECTPRED  ), config->i_bframe > 0 );
+    EnableWindow( GetDlgItem( hTabs[2], IDC_DIRECTPRED  ), config->i_bframe > 0 );
     EnableWindow( GetDlgItem( hTabs[3], IDC_INLOOP_A    ), config->b_filter );
     EnableWindow( GetDlgItem( hTabs[3], IDC_INLOOP_B    ), config->b_filter );
-    EnableWindow( GetDlgItem( hTabs[2], IDC_P8X8        ), config->b_psub16x16 );
+    EnableWindow( GetDlgItem( hTabs[2], IDC_P4X4        ), config->b_psub16x16 );
     EnableWindow( GetDlgItem( hTabs[2], IDC_I8X8        ), config->b_dct8x8 );
+    EnableWindow( GetDlgItem( hTabs[2], IDC_B8X8        ), config->i_bframe > 0 );
     EnableWindow( GetDlgItem( hTabs[2], IDC_BREFS       ), config->i_bframe > 1 );
     EnableWindow( GetDlgItem( hTabs[2], IDC_WBPRED      ), config->i_bframe > 1 );
     EnableWindow( GetDlgItem( hTabs[2], IDC_BADAPT      ), config->i_bframe > 0 );
     EnableWindow( GetDlgItem( hTabs[2], IDC_BIDIR_ME    ), config->i_bframe > 0 );
-    EnableWindow( GetDlgItem( hTabs[2], IDC_BBIAS       ), config->i_bframe > 0 );
-    EnableWindow( GetDlgItem( hTabs[2], IDC_BBIASSLIDER ), config->i_bframe > 0 );
+    EnableWindow( GetDlgItem( hTabs[2], IDC_BBIAS       ), config->i_bframe > 0 && config->b_bframe_adaptive );
+    EnableWindow( GetDlgItem( hTabs[2], IDC_BBIASSLIDER ), config->i_bframe > 0 && config->b_bframe_adaptive );
+    EnableWindow( GetDlgItem( hTabs[1], IDC_PBRATIO     ), config->i_bframe > 0 );
     EnableWindow( GetDlgItem( hTabs[3], IDC_MERANGE     ), config->i_me_method > 1 );
     EnableWindow( GetDlgItem( hTabs[3], IDC_CHROMAME    ), config->i_subpel_refine >= 4 );
     EnableWindow( GetDlgItem( hTabs[3], IDC_TRELLIS     ), config->b_cabac );
+    EnableWindow( GetDlgItem( hTabs[3], IDC_MIXEDREF    ), config->i_refmax > 1 );
 }
 
 void tabs_update_items( HWND hDlg, CONFIG * config )
@@ -474,10 +491,10 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
     SetDlgItemText( hTabs[0], IDC_STATSFILE, config->stats );
 
     /* update rate control tab */
-    if (SendMessage( GetDlgItem(hTabs[1],IDC_DIRECTPRED), CB_GETCOUNT, 0, 0 ) == 0)
+    if (SendMessage( GetDlgItem(hTabs[2],IDC_DIRECTPRED), CB_GETCOUNT, 0, 0 ) == 0)
     {
-        SendDlgItemMessage(hTabs[1], IDC_DIRECTPRED, CB_ADDSTRING, 0, (LPARAM)"Spatial");
-        SendDlgItemMessage(hTabs[1], IDC_DIRECTPRED, CB_ADDSTRING, 0, (LPARAM)"Temporal");
+        SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_ADDSTRING, 0, (LPARAM)"Spatial");
+        SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_ADDSTRING, 0, (LPARAM)"Temporal");
     }
     SetDlgItemInt( hTabs[1], IDC_QPMIN, config->i_qp_min, FALSE );
     SetDlgItemInt( hTabs[1], IDC_QPMAX, config->i_qp_max, FALSE );
@@ -485,7 +502,6 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
     SetDlgItemInt( hTabs[1], IDC_IPRATIO, config->i_key_boost, FALSE );
     SetDlgItemInt( hTabs[1], IDC_PBRATIO, config->i_b_red, FALSE );
     SetDlgItemInt( hTabs[1], IDC_CURVECOMP, config->i_curve_comp, FALSE );
-    SendDlgItemMessage(hTabs[1], IDC_DIRECTPRED, CB_SETCURSEL, (config->i_direct_mv_pred), 0);
 
     /* update debug tab */
     if (SendMessage( GetDlgItem(hTabs[3],IDC_LOG), CB_GETCOUNT, 0, 0 ) == 0)
@@ -527,9 +543,9 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
     set_dlgitem_int( hTabs[3], IDC_LOOPB_TXT, config->i_inloop_b);
 
     /* update i/p-frames tab */
-    CheckDlgButton( hTabs[2],IDC_P16X16,
-                    config->b_psub16x16 ? BST_CHECKED: BST_UNCHECKED );
     CheckDlgButton( hTabs[2],IDC_P8X8,
+                    config->b_psub16x16 ? BST_CHECKED: BST_UNCHECKED );
+    CheckDlgButton( hTabs[2],IDC_P4X4,
                     config->b_psub8x8 ? BST_CHECKED: BST_UNCHECKED );
     CheckDlgButton( hTabs[2],IDC_I4X4,
                     config->b_i4x4 ? BST_CHECKED: BST_UNCHECKED );
@@ -537,9 +553,6 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
                     config->b_i8x8 ? BST_CHECKED: BST_UNCHECKED );
     CheckDlgButton( hTabs[2],IDC_DCT8X8,
                     config->b_dct8x8 ? BST_CHECKED: BST_UNCHECKED );
-    CheckDlgButton( hTabs[2],IDC_MIXEDREF,
-                    config->b_mixedref ? BST_CHECKED: BST_UNCHECKED );
-    SetDlgItemInt( hTabs[2], IDC_REFFRAMES, config->i_refmax, FALSE );
 
     /* update b-frames tab */
     CheckDlgButton( hTabs[2],IDC_WBPRED,
@@ -550,7 +563,7 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
                     config->b_bidir_me ? BST_CHECKED: BST_UNCHECKED );
     CheckDlgButton( hTabs[2],IDC_BREFS,
                     config->b_b_refs ? BST_CHECKED: BST_UNCHECKED );
-    CheckDlgButton( hTabs[2],IDC_B16X16,
+    CheckDlgButton( hTabs[2],IDC_B8X8,
                     config->b_bsub16x16 ? BST_CHECKED: BST_UNCHECKED );
     SetDlgItemInt( hTabs[2], IDC_BFRAME, config->i_bframe, FALSE );
     SetDlgItemInt( hTabs[2], IDC_BBIAS, config->i_bframe_bias, TRUE );
@@ -558,6 +571,7 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
                         (LPARAM) MAKELONG( -100, 100 ) );
     SendDlgItemMessage( hTabs[2], IDC_BBIASSLIDER, TBM_SETPOS, TRUE,
                         config->i_bframe_bias );
+    SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_SETCURSEL, (config->i_direct_mv_pred), 0);
 
     /* update scene-cuts tab */
     SetDlgItemInt( hTabs[1], IDC_KEYINTMIN, config->i_keyint_min, FALSE );
@@ -577,7 +591,7 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
         SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"4");
         SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"5 (High Quality)");
         SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"6 (RDO)");
-        SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"7 (RDO on B-frames)");
+        SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"6b (RDO on B-frames)");
     }
 
     SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_SETCURSEL, (config->i_me_method), 0);
@@ -585,6 +599,9 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
     SetDlgItemInt( hTabs[3], IDC_MERANGE, config->i_me_range, FALSE );
     CheckDlgButton( hTabs[3],IDC_CHROMAME,
                     config->b_chroma_me ? BST_CHECKED: BST_UNCHECKED );
+    SetDlgItemInt( hTabs[3], IDC_REFFRAMES, config->i_refmax, FALSE );
+    CheckDlgButton( hTabs[3],IDC_MIXEDREF,
+                    config->b_mixedref ? BST_CHECKED: BST_UNCHECKED );
 }
 
 BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
@@ -608,15 +625,12 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
             {
             case IDC_CABAC :
                 config->b_cabac = ( IsDlgButtonChecked( hTabs[3], IDC_CABAC ) == BST_CHECKED );
-                EnableWindow( GetDlgItem( hTabs[3], IDC_TRELLIS ), config->b_cabac );
                 break;
             case IDC_TRELLIS :
                 config->i_trellis = ( IsDlgButtonChecked( hTabs[3], IDC_TRELLIS ) == BST_CHECKED );
                 break;
             case IDC_LOOPFILTER :
                 config->b_filter = ( IsDlgButtonChecked( hTabs[3], IDC_LOOPFILTER ) == BST_CHECKED );
-                EnableWindow( GetDlgItem( hTabs[3], IDC_INLOOP_A ), config->b_filter );
-                EnableWindow( GetDlgItem( hTabs[3], IDC_INLOOP_B ), config->b_filter );
                 break;
             case IDC_BREFS :
                 config->b_b_refs = ( IsDlgButtonChecked( hTabs[2], IDC_BREFS ) == BST_CHECKED );
@@ -630,15 +644,14 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
             case IDC_BIDIR_ME :
                 config->b_bidir_me = ( IsDlgButtonChecked( hTabs[2], IDC_BIDIR_ME ) == BST_UNCHECKED );
                 break;
-            case IDC_P16X16 :
-                config->b_psub16x16 = ( IsDlgButtonChecked( hTabs[2], IDC_P16X16 ) == BST_CHECKED );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_P8X8 ), config->b_psub16x16 );
-                break;
             case IDC_P8X8 :
-                config->b_psub8x8 = ( IsDlgButtonChecked( hTabs[2], IDC_P8X8 ) == BST_CHECKED );
+                config->b_psub16x16 = ( IsDlgButtonChecked( hTabs[2], IDC_P8X8 ) == BST_CHECKED );
                 break;
-            case IDC_B16X16 :
-                config->b_bsub16x16 = ( IsDlgButtonChecked( hTabs[2], IDC_B16X16 ) == BST_CHECKED );
+            case IDC_P4X4 :
+                config->b_psub8x8 = ( IsDlgButtonChecked( hTabs[2], IDC_P4X4 ) == BST_CHECKED );
+                break;
+            case IDC_B8X8 :
+                config->b_bsub16x16 = ( IsDlgButtonChecked( hTabs[2], IDC_B8X8 ) == BST_CHECKED );
                 break;
             case IDC_I4X4 :
                 config->b_i4x4 = ( IsDlgButtonChecked( hTabs[2], IDC_I4X4 ) == BST_CHECKED );
@@ -648,10 +661,9 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
                 break;
             case IDC_DCT8X8 :
                 config->b_dct8x8 = ( IsDlgButtonChecked( hTabs[2], IDC_DCT8X8 ) == BST_CHECKED );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_I8X8 ), config->b_dct8x8 );
                 break;
             case IDC_MIXEDREF :
-                config->b_mixedref = ( IsDlgButtonChecked( hTabs[2], IDC_MIXEDREF ) == BST_CHECKED );
+                config->b_mixedref = ( IsDlgButtonChecked( hTabs[3], IDC_MIXEDREF ) == BST_CHECKED );
                 break;
             case IDC_CHROMAME :
                 config->b_chroma_me = ( IsDlgButtonChecked( hTabs[3], IDC_CHROMAME ) == BST_CHECKED );
@@ -791,11 +803,16 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
                 config->i_sar_height = GetDlgItemInt( hTabs[3], IDC_SAR_H, FALSE, FALSE );
                 break;
             case IDC_REFFRAMES :
-                config->i_refmax = GetDlgItemInt( hTabs[2], IDC_REFFRAMES, FALSE, FALSE );
+                config->i_refmax = GetDlgItemInt( hTabs[3], IDC_REFFRAMES, FALSE, FALSE );
                 if( config->i_refmax > 16 )
                 {
                     config->i_refmax = 16;
-                    SetDlgItemInt( hTabs[2], IDC_REFFRAMES, config->i_refmax, FALSE );
+                    SetDlgItemInt( hTabs[3], IDC_REFFRAMES, config->i_refmax, FALSE );
+                }
+                if( config->i_refmax < 1 )
+                {
+                    config->i_refmax = 1;
+                    SetDlgItemInt( hTabs[3], IDC_REFFRAMES, config->i_refmax, FALSE );
                 }
                 break;
             case IDC_MERANGE :
@@ -814,13 +831,6 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
                     config->i_bframe = 5;
                     SetDlgItemInt( hTabs[2], IDC_BFRAME, config->i_bframe, FALSE );
                 }
-                EnableWindow( GetDlgItem( hTabs[2], IDC_BREFS ), config->i_bframe > 1 );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_WBPRED ), config->i_bframe > 1 );
-                EnableWindow( GetDlgItem( hTabs[1], IDC_DIRECTPRED ), config->i_bframe > 0 );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_BADAPT ), config->i_bframe > 0 );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_BIDIR_ME ), config->i_bframe > 0 );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_BBIAS ), config->i_bframe > 0 );
-                EnableWindow( GetDlgItem( hTabs[2], IDC_BBIASSLIDER ), config->i_bframe > 0 );
                 break;
             case IDC_BBIAS :
                 config->i_bframe_bias = GetDlgItemInt( hTabs[2], IDC_BBIAS, FALSE, TRUE );
@@ -883,15 +893,13 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
             switch ( LOWORD( wParam ) )
             {
             case IDC_DIRECTPRED:
-                config->i_direct_mv_pred = SendDlgItemMessage(hTabs[1], IDC_DIRECTPRED, CB_GETCURSEL, 0, 0);
+                config->i_direct_mv_pred = SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_GETCURSEL, 0, 0);
                 break;
             case IDC_SUBPEL:
                 config->i_subpel_refine = SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_GETCURSEL, 0, 0);
-                EnableWindow( GetDlgItem( hTabs[3], IDC_CHROMAME ), config->i_subpel_refine >= 4 );
                 break;
             case IDC_ME_METHOD:
                 config->i_me_method = SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_GETCURSEL, 0, 0);
-                EnableWindow( GetDlgItem( hTabs[3], IDC_MERANGE ), config->i_me_method > 1 );
                 break;
             case IDC_LOG:
                 config->i_log_level = SendDlgItemMessage(hTabs[3], IDC_LOG, CB_GETCURSEL, 0, 0);
@@ -920,7 +928,6 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
                     config->i_pass = 2;
                     break;
                 }
-                tabs_enable_items( hDlg, config );
                 tabs_update_items( hDlg, config );
                 break;
             }
@@ -985,6 +992,7 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
         return 0;
     }
 
+    tabs_enable_items( hDlg, config );
     return 1;
 }
 
index c76200a..61e9d4e 100644 (file)
 #define IDC_CABAC                       1006
 #define IDC_BITRATEEDIT2                1007
 #define IDC_QUANTEDIT                   1008
-#define IDC_B16X16                      1009
+#define IDC_B8X8                        1009
 #define IDC_2PASSBITRATE_S              1010
 #define IDC_LOOPFILTER                  1011
 #define IDC_2PASSBITRATE                1012
 #define IDC_I4X4                        1013
 #define IDC_BITRATELOW                  1014
-#define IDC_P16X16                      1015
+#define IDC_P8X8                        1015
 #define IDC_BITRATELOW2                 1016
-#define IDC_P8X8                        1017
+#define IDC_P4X4                        1017
 #define IDC_BITRATEHIGH                 1018
 #define IDC_BFRAMES                     1019
 #define IDC_BITRATEHIGH2                1020
index 3b78e9a..5f0fe93 100644 (file)
@@ -59,27 +59,25 @@ IDD_TAB_IPFRAMES DIALOGEX 0, 0, 200, 188
 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
 FONT 8, "MS Shell Dlg", 0, 0, 0x0
 BEGIN
-    GROUPBOX        "Other",IDC_STATIC,6,2,186,39,WS_DISABLED
-    GROUPBOX        "Partitions",IDC_STATIC,6,43,186,67,WS_DISABLED
-    GROUPBOX        "B Frames",IDC_STATIC,6,112,186,68,WS_DISABLED
+    GROUPBOX        "Partitions",IDC_STATIC,6,2,186,90,WS_DISABLED
     CONTROL         "8x8 Transform",IDC_DCT8X8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,11,60,12,WS_EX_TRANSPARENT
-    CONTROL         "8x8 Intra search",IDC_I8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,93,66,12,WS_EX_TRANSPARENT
-    CONTROL         "4x4 Intra search",IDC_I4X4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,104,93,66,12,WS_EX_TRANSPARENT
-    CONTROL         "8x16, 16x8 and 8x8 P-frame search",IDC_P16X16,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,54,127,12,WS_EX_TRANSPARENT
-    CONTROL         "4x8, 8x4 and 4x4 P-frame search",IDC_P8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,80,119,12,WS_EX_TRANSPARENT
-    LTEXT           "Max Ref. frames",IDC_STATIC,31,24,54,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    EDITTEXT        IDC_REFFRAMES,89,24,24,12,ES_AUTOHSCROLL | ES_NUMBER
-    CONTROL         "Adaptive",IDC_BADAPT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,135,43,12,WS_EX_TRANSPARENT
-    CONTROL         "Use as references",IDC_BREFS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,123,71,12,WS_EX_TRANSPARENT
-    CONTROL         "Weighted biprediction",IDC_WBPRED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,78,135,82,12,WS_EX_TRANSPARENT
-    CONTROL         "8x16, 16x8 and 8x8 B-frame search",IDC_B16X16,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,67,127,12,WS_EX_TRANSPARENT
-    LTEXT           "Max consecutive",IDC_STATIC,30,148,60,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    EDITTEXT        IDC_BFRAME,126,148,24,12,ES_AUTOHSCROLL | ES_NUMBER
-    LTEXT           "Bias",IDC_STATIC,30,162,14,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    CONTROL         "",IDC_BBIASSLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,48,162,72,12,WS_EX_TRANSPARENT
-    EDITTEXT        IDC_BBIAS,126,162,24,12,ES_AUTOHSCROLL
-    CONTROL         "Mixed Refs",IDC_MIXEDREF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,122,24,48,12,WS_EX_TRANSPARENT
-    CONTROL         "Bidirectional ME",IDC_BIDIR_ME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,123,72,12,WS_EX_TRANSPARENT
+    CONTROL         "8x8, 8x16 and 16x8 P-frame search",IDC_P8X8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,24,127,12,WS_EX_TRANSPARENT
+    CONTROL         "8x8, 8x16 and 16x8 B-frame search",IDC_B8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,37,127,12,WS_EX_TRANSPARENT
+    CONTROL         "4x4, 4x8 and 8x4 P-frame search",IDC_P4X4,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,50,119,12,WS_EX_TRANSPARENT
+    CONTROL         "8x8 Intra search",IDC_I8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,63,66,12,WS_EX_TRANSPARENT
+    CONTROL         "4x4 Intra search",IDC_I4X4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,76,66,12,WS_EX_TRANSPARENT
+    GROUPBOX        "B Frames",IDC_STATIC,6,94,186,86,WS_DISABLED
+    LTEXT           "Max consecutive",IDC_STATIC,30,103,60,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    EDITTEXT        IDC_BFRAME,126,103,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "Bias",IDC_STATIC,30,117,14,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    CONTROL         "",IDC_BBIASSLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,48,117,72,12,WS_EX_TRANSPARENT
+    EDITTEXT        IDC_BBIAS,126,117,24,12,ES_AUTOHSCROLL
+    CONTROL         "Use as references",IDC_BREFS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,133,71,12,WS_EX_TRANSPARENT
+    CONTROL         "Bidirectional ME",IDC_BIDIR_ME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,133,72,12,WS_EX_TRANSPARENT
+    CONTROL         "Weighted biprediction",IDC_WBPRED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,78,145,82,12,WS_EX_TRANSPARENT
+    CONTROL         "Adaptive",IDC_BADAPT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,145,43,12,WS_EX_TRANSPARENT
+    LTEXT           "Direct mode",IDC_STATIC,30,161,42,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    COMBOBOX        IDC_DIRECTPRED,114,161,54,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
 END
 
 IDD_TAB_RATECONTROL DIALOGEX 0, 0, 200, 188
@@ -87,65 +85,66 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
 FONT 8, "MS Shell Dlg", 0, 0, 0x0
 BEGIN
     GROUPBOX        "Bitrate",IDC_STATIC,6,2,186,53,WS_DISABLED
-    GROUPBOX        "Quantization Limits",IDC_STATIC,6,56,186,52,WS_DISABLED
-    GROUPBOX        "Scene Cuts",IDC_STATIC,6,110,186,70,WS_DISABLED
     LTEXT           "Keyframe boost (%)",IDC_STATIC,42,10,68,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     LTEXT           "B-frames reduction (%)",IDC_STATIC,42,24,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     LTEXT           "Bitrate variability (%)",IDC_STATIC,42,38,68,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Min QP",IDC_STATIC,42,64,24,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Max QP",IDC_STATIC,42,78,26,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Max QP Step",IDC_STATIC,42,92,43,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Scene Cut Threshold",IDC_STATIC,42,119,72,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Min IDR-frame interval",IDC_STATIC,42,133,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Max IDR-frame interval",IDC_STATIC,42,147,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     EDITTEXT        IDC_IPRATIO,126,10,24,12,ES_AUTOHSCROLL | ES_NUMBER
     EDITTEXT        IDC_PBRATIO,126,24,24,12,ES_AUTOHSCROLL | ES_NUMBER
     EDITTEXT        IDC_CURVECOMP,126,38,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    GROUPBOX        "Quantization Limits",IDC_STATIC,6,56,186,52,WS_DISABLED
+    LTEXT           "Min QP",IDC_STATIC,42,64,24,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    LTEXT           "Max QP",IDC_STATIC,42,78,26,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    LTEXT           "Max QP Step",IDC_STATIC,42,92,43,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     EDITTEXT        IDC_QPMIN,126,64,24,12,ES_AUTOHSCROLL
     EDITTEXT        IDC_QPMAX,126,78,24,12,ES_AUTOHSCROLL
     EDITTEXT        IDC_QPSTEP,126,92,24,12,ES_AUTOHSCROLL
+    GROUPBOX        "Scene Cuts",IDC_STATIC,6,110,186,56,WS_DISABLED
+    LTEXT           "Scene Cut Threshold",IDC_STATIC,42,119,72,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    LTEXT           "Min IDR-frame interval",IDC_STATIC,42,133,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    LTEXT           "Max IDR-frame interval",IDC_STATIC,42,147,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     EDITTEXT        IDC_SCENECUT,126,119,24,12,ES_AUTOHSCROLL
     EDITTEXT        IDC_KEYINTMIN,126,133,24,12,ES_AUTOHSCROLL | ES_NUMBER
     EDITTEXT        IDC_KEYINTMAX,126,147,24,12,ES_AUTOHSCROLL | ES_NUMBER
-    LTEXT           "Direct mode",IDC_STATIC,42,161,42,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    COMBOBOX        IDC_DIRECTPRED,126,161,54,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
 END
 
 IDD_TAB_MISC DIALOGEX 0, 0, 200, 188
 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
 FONT 8, "MS Shell Dlg", 0, 0, 0x0
 BEGIN
-    LTEXT           "Strength",IDC_STATIC,87,154,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Threshold",IDC_STATIC,87,167,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "0",IDC_LOOPA_TXT,171,154,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "0",IDC_LOOPB_TXT,171,167,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    GROUPBOX        "Motion Estimation",IDC_STATIC,7,2,186,64,WS_DISABLED
+    GROUPBOX        "Motion Estimation",IDC_STATIC,7,2,186,82,WS_DISABLED
     LTEXT           "Partition decision",IDC_STATIC,30,12,60,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    COMBOBOX        IDC_SUBPEL,90,12,84,77,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Method",IDC_STATIC,30,30,30,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    COMBOBOX        IDC_ME_METHOD,84,30,90,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Range",IDC_STATIC,30,48,24,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Log level",IDC_STATIC,100,85,36,12,SS_CENTERIMAGE
-    GROUPBOX        "Debug",IDC_STATIC,94,75,96,46,WS_DISABLED
-    LTEXT           "FourCC",IDC_STATIC,100,103,36,12,SS_CENTERIMAGE
-    LTEXT           "Sample AR",IDC_STATIC,10,85,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Threads",IDC_THREADS,10,103,30,12,SS_CENTERIMAGE
-    CTEXT           ":",IDC_STATIC,61,85,12,12,SS_CENTERIMAGE
+    EDITTEXT        IDC_MERANGE,60,48,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    CONTROL         "Chroma ME",IDC_CHROMAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,126,48,48,12,WS_EX_TRANSPARENT
+    LTEXT           "Max Ref. frames",IDC_STATIC,30,66,54,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    EDITTEXT        IDC_REFFRAMES,88,66,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    CONTROL         "Mixed Refs",IDC_MIXEDREF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,126,66,48,12,WS_EX_TRANSPARENT
+    GROUPBOX        "Debug",IDC_STATIC,94,91,96,46,WS_DISABLED
+    LTEXT           "Log level",IDC_STATIC,100,101,36,12,SS_CENTERIMAGE
+    LTEXT           "FourCC",IDC_STATIC,100,119,36,12,SS_CENTERIMAGE
+    COMBOBOX        IDC_LOG,136,101,48,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    EDITTEXT        IDC_FOURCC,136,119,30,12,ES_AUTOHSCROLL
+    GROUPBOX        "Misc. options",IDC_STATIC,7,86,186,95,WS_DISABLED
+    LTEXT           "Sample AR",IDC_STATIC,10,101,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    CTEXT           ":",IDC_STATIC,61,101,12,12,SS_CENTERIMAGE
+    EDITTEXT        IDC_SAR_W,46,101,18,12,ES_AUTOHSCROLL | ES_NUMBER
+    EDITTEXT        IDC_SAR_H,70,101,18,12,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "Threads",IDC_THREADS,10,119,30,12,SS_CENTERIMAGE
+    EDITTEXT        IDC_THREADEDIT,46,119,18,12,ES_AUTOHSCROLL | ES_NUMBER
     CONTROL         "CABAC",IDC_CABAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,140,39,12,WS_EX_TRANSPARENT
     CONTROL         "Deblocking filter:",IDC_LOOPFILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,154,66,12
+    CONTROL         "Trellis",IDC_TRELLIS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,140,37,12,WS_EX_TRANSPARENT
+    LTEXT           "Noise Reduction",IDC_STATIC,111,140,56,12,SS_CENTERIMAGE
+    EDITTEXT        IDC_NR,168,140,21,12,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "Strength",IDC_STATIC,87,154,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    LTEXT           "Threshold",IDC_STATIC,87,167,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     CONTROL         "",IDC_INLOOP_A,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,123,155,42,12,WS_EX_TRANSPARENT
     CONTROL         "",IDC_INLOOP_B,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,123,167,42,12,WS_EX_TRANSPARENT
-    EDITTEXT        IDC_SAR_W,46,85,18,12,ES_AUTOHSCROLL | ES_NUMBER
-    EDITTEXT        IDC_SAR_H,70,85,18,12,ES_AUTOHSCROLL | ES_NUMBER
-    EDITTEXT        IDC_THREADEDIT,46,103,18,12,ES_AUTOHSCROLL | ES_NUMBER
-    COMBOBOX        IDC_LOG,136,85,48,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    EDITTEXT        IDC_FOURCC,136,103,30,12,ES_AUTOHSCROLL
-    CONTROL         "Chroma ME",IDC_CHROMAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,126,48,48,12,WS_EX_TRANSPARENT
-    COMBOBOX        IDC_SUBPEL,90,12,84,77,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_ME_METHOD,84,30,90,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    EDITTEXT        IDC_MERANGE,60,48,24,12,ES_AUTOHSCROLL | ES_NUMBER
-    GROUPBOX        "Misc. options",IDC_STATIC,7,68,186,113,WS_DISABLED
-    CONTROL         "Trellis",IDC_TRELLIS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,140,37,12,WS_EX_TRANSPARENT
-    LTEXT           "Noise Reduction",IDC_STATIC,10,121,56,12,SS_CENTERIMAGE
-    EDITTEXT        IDC_NR,67,121,21,12,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "0",IDC_LOOPA_TXT,171,154,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    LTEXT           "0",IDC_LOOPB_TXT,171,167,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
 END