VfW: support trellis, brdo, nr, bime.
authorLoren Merritt <pengvado@videolan.org>
Sat, 11 Feb 2006 20:11:05 +0000 (20:11 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sat, 11 Feb 2006 20:11:05 +0000 (20:11 +0000)
patch by Dan Nelson (dnelson at allantgroup dot com).

git-svn-id: svn://svn.videolan.org/x264/trunk@430 df754926-b1dd-0310-bc7b-ec298dee348c

vfw/codec.c
vfw/config.c
vfw/resource.h
vfw/resource.rc
vfw/x264vfw.h

index 27b8582..f9cd9c3 100644 (file)
@@ -199,6 +199,7 @@ LRESULT compress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiO
     param.rc.psz_stat_out = malloc (MAX_PATH);
     param.rc.psz_stat_in = malloc (MAX_PATH);
     param.i_threads = config->i_threads;
+    param.analyse.i_noise_reduction = config->i_noise_reduction;
 
     param.i_log_level = config->i_log_level - 1;
     param.pf_log = x264_log_vfw;
@@ -225,6 +226,9 @@ LRESULT compress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiO
     param.rc.i_qp_step = config->i_qp_step;
     param.b_deblocking_filter = config->b_filter;
     param.b_cabac = config->b_cabac;
+    if( config->b_cabac && config->i_trellis )
+        param.analyse.i_trellis = 1;
+
     param.analyse.b_chroma_me = config->b_chroma_me;
     param.rc.f_ip_factor = 1 + (float)config->i_key_boost / 100;
     param.rc.f_pb_factor = 1 + (float)config->i_b_red / 100;
@@ -238,8 +242,15 @@ LRESULT compress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiO
     if( config->i_bframe > 1 && config->b_b_refs)
         param.b_bframe_pyramid = 1;
     param.b_bframe_adaptive = config->b_bframe_adaptive;
+    param.analyse.b_bidir_me = config->b_bidir_me;
     param.i_bframe_bias = config->i_bframe_bias;
-    param.analyse.i_subpel_refine = config->i_subpel_refine + 1; /* 0..4 -> 1..5 */
+    param.analyse.i_subpel_refine = config->i_subpel_refine + 1; /* 0..5 -> 1..6 */
+    if (param.analyse.i_subpel_refine == 7)
+    {
+        param.analyse.i_subpel_refine = 6;
+        param.analyse.b_bframe_rdo = 1;
+    }
+
     param.analyse.i_me_method = config->i_me_method;
     param.analyse.i_me_range = config->i_me_range;
 
index ad2b67b..813eb9d 100644 (file)
@@ -72,6 +72,7 @@ typedef struct
 } reg_str_t;
 
 CONFIG reg;
+HWND hTooltip;
 HWND hTabs[8];
 static const reg_int_t reg_int_table[] =
 {
@@ -100,6 +101,7 @@ static const reg_int_t reg_int_table[] =
     { "b_refs",         &reg.b_b_refs,          0 },
     { "b_bias",         &reg.i_bframe_bias,     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 },
@@ -108,7 +110,7 @@ static const reg_int_t reg_int_table[] =
     { "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 },
 
     /* analysis */
@@ -122,7 +124,8 @@ static const reg_int_t reg_int_table[] =
     { "me_range",       &reg.i_me_range,       16 },
     { "chroma_me",      &reg.b_chroma_me,       1 },
     { "subpel",         &reg.i_subpel_refine,   4 },
-    { "mixedref",       &reg.b_mixedref,        0 }
+    { "mixedref",       &reg.b_mixedref,        0 },
+    { "trellis",        &reg.i_trellis,         1 }
 
 };
 
@@ -232,6 +235,30 @@ void config_reg_defaults( CONFIG *config )
 }
 
 
+/* assigns tooltips */
+
+BOOL CALLBACK enum_tooltips(HWND hWnd, LPARAM lParam)
+{
+    char help[500];
+
+       /* The tooltip for a control is named the same as the control itself */
+    if (LoadString(g_hInst, GetDlgCtrlID(hWnd), help, 500))
+    {
+        TOOLINFO ti;
+
+        ti.cbSize = sizeof(TOOLINFO);
+        ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
+        ti.hwnd = GetParent(hWnd);
+        ti.uId  = (LPARAM)hWnd;
+        ti.lpszText = help;
+
+        SendMessage(hTooltip, TTM_ADDTOOL, 0, (LPARAM)&ti);
+    }
+
+    return TRUE;
+}
+
+
 /* Main window */
 
 BOOL CALLBACK callback_main( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
@@ -266,6 +293,15 @@ BOOL CALLBACK callback_main( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
             MoveWindow(hTabs[2], rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top-40, TRUE);
             MoveWindow(hTabs[3], rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top-40, TRUE);
 
+            if ((hTooltip = CreateWindow(TOOLTIPS_CLASS, NULL, TTS_ALWAYSTIP,
+                CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+                NULL, NULL, g_hInst, NULL)))
+            {
+                SetWindowPos(hTooltip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+                SendMessage(hTooltip, TTM_SETMAXTIPWIDTH, 0, 400);
+                EnumChildWindows(hDlg, enum_tooltips, 0);
+            }
+
             tabs_enable_items( hDlg, config );
             tabs_update_items( hDlg, config );
             ShowWindow( hTabs[0], SW_SHOW );
@@ -336,7 +372,7 @@ void tabs_enable_items( HWND hDlg, CONFIG * config )
 {
     char szTmp[1024];
     sprintf( szTmp, "Core %d%s, build %s %s", X264_BUILD, X264_VERSION, __DATE__, __TIME__ );
-    SetDlgItemText( hTabs[3], IDC_BUILDREV,  szTmp );
+    SetDlgItemText( hTabs[0], IDC_BUILDREV,  szTmp );
 
     switch( config->i_encoding_type )
     {
@@ -385,10 +421,12 @@ void tabs_enable_items( HWND hDlg, CONFIG * config )
     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[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 );
 }
 
 void tabs_update_items( HWND hDlg, CONFIG * config )
@@ -466,8 +504,11 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
 
     /* update misc. tab */
     SetDlgItemInt( hTabs[3], IDC_THREADEDIT, config->i_threads, FALSE );
+    SetDlgItemInt( hTabs[3], IDC_NR, config->i_noise_reduction, FALSE );
     CheckDlgButton( hTabs[3],IDC_CABAC,
                     config->b_cabac ? BST_CHECKED : BST_UNCHECKED );
+    CheckDlgButton( hTabs[3],IDC_TRELLIS,
+                    config->i_trellis ? BST_CHECKED: BST_UNCHECKED );
     CheckDlgButton( hTabs[3],IDC_LOOPFILTER,
                     config->b_filter ? BST_CHECKED: BST_UNCHECKED );
 
@@ -505,6 +546,8 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
                     config->b_b_wpred ? BST_CHECKED: BST_UNCHECKED );
     CheckDlgButton( hTabs[2],IDC_BADAPT,
                     config->b_bframe_adaptive ? BST_CHECKED: BST_UNCHECKED );
+    CheckDlgButton( hTabs[2],IDC_BIDIR_ME,
+                    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,
@@ -533,7 +576,8 @@ void tabs_update_items( HWND hDlg, CONFIG * config )
         SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"3");
         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 - Slowest)");
+        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_ME_METHOD, CB_SETCURSEL, (config->i_me_method), 0);
@@ -564,6 +608,10 @@ 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 );
@@ -579,6 +627,9 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
             case IDC_BADAPT :
                 config->b_bframe_adaptive = ( IsDlgButtonChecked( hTabs[2], IDC_BADAPT ) == BST_CHECKED );
                 break;
+            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 );
@@ -643,6 +694,8 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
             case IDC_FOURCC :
                 GetDlgItemText( hTabs[3], IDC_FOURCC, config->fcc, 5 );
                 break;
+            case IDC_NR :
+                config->i_noise_reduction = GetDlgItemInt( hTabs[3], IDC_NR, FALSE, FALSE );
             case IDC_THREADEDIT :
                 config->i_threads = GetDlgItemInt( hTabs[3], IDC_THREADEDIT, FALSE, FALSE );
                 if (config->i_threads < 1)
@@ -765,6 +818,7 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
                 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;
index 6c7a062..c76200a 100644 (file)
 #define IDC_BITRATESLIDER               1002
 #define IDC_BITRATEEDIT                 1003
 #define IDC_BITRATESLIDER2              1004
-#define IDC_QUANTSLIDER                 1004
-#define IDC_CABAC                       1005
-#define IDC_BITRATEEDIT2                1005
-#define IDC_QUANTEDIT                   1005
-#define IDC_B16X16                      1006
-#define IDC_2PASSBITRATE_S              1006
-#define IDC_LOOPFILTER                  1007
-#define IDC_2PASSBITRATE                1007
-#define IDC_I4X4                        1008
-#define IDC_BITRATELOW                  1009
-#define IDC_P16X16                      1009
-#define IDC_BITRATELOW2                 1010
-#define IDC_P8X8                        1010
-#define IDC_BITRATEHIGH                 1011
-#define IDC_BFRAMES                     1012
-#define IDC_BITRATEHIGH2                1012
-#define IDC_KEYINTMIN                   1012
-#define IDC_BFRAMES2                    1013
-#define IDC_KEYINTMAX                   1013
-#define IDC_BITRATELOW3                 1013
-#define IDC_EDIT3                       1014
-#define IDC_REFFRAMES                   1014
-#define IDC_BITRATEHIGH3                1014
-#define IDC_BFRAME                      1015
-#define IDC_DEFAULTS                    1016
-#define IDC_CHECK3                      1017
-#define IDC_ADVANCED                    1018
-#define IDC_RADIO1                      1022
-#define IDC_RADIOBITRATE                1022
-#define IDC_MODE                        1023
-#define IDC_RADIOQUALITY                1024
-#define IDC_RADIOQUANT                  1024
-#define IDC_RADIOTWOPASS                1026
-#define IDC_USEADVANCED                 1029
-#define IDC_ADVDEFAULTS                 1030
-#define IDC_HOMEPAGE                    1034
-#define IDC_X264                        1035
-#define IDC_BUILD                       1036
-#define IDC_FOURCC                      1039
-#define IDC_SUBPEL                      1040
-#define IDC_DIRECTPRED                  1041
-#define IDC_2PASS1                      1041
-#define IDC_2PASS2                      1042
-#define IDC_INLOOP_A                    1044
-#define IDC_LOOPA_TXT                   1047
-#define IDC_FAST1PASS                   1049
-#define IDC_IPRATIO                     1050
-#define IDC_PBRATIO                     1051
-#define IDC_CURVECOMP                   1052
-#define IDC_UPDATESTATS                 1053
-#define IDC_STATSFILE                   1054
-#define IDC_STATSFILE_BROWSE            1055
-#define IDC_CONSOLE                     1056
-#define IDC_COPYCLIP                    1057
-#define IDC_BREFS                       1058
-#define IDC_WBPRED                      1059
-#define IDC_THREADS                     1060
-#define IDC_THREADEDIT                  1061
-#define IDC_SAR_W                       1062
-#define IDC_SAR_H                       1063
-#define IDC_I8X8                        1064
-#define IDC_DCT8X8                      1065
-#define IDC_ME_METHOD                   1066
-#define IDC_MIXEDREF                    1066
-#define IDC_CHROMAME                    1067
-#define IDC_MERANGE                     1068
-#define IDC_BADAPT                      1070
-#define IDC_BBIASSLIDER                 1072
-#define IDC_BBIAS                       1073
-#define IDC_QPMIN                       1074
-#define IDC_QPMAX                       1075
-#define IDC_QPSTEP                      1076
-#define IDC_INLOOP_B                    1077
-#define IDC_LOOPB_TXT                   1078
-#define IDC_LOG                         1079
+#define IDC_QUANTSLIDER                 1005
+#define IDC_CABAC                       1006
+#define IDC_BITRATEEDIT2                1007
+#define IDC_QUANTEDIT                   1008
+#define IDC_B16X16                      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_BITRATELOW2                 1016
+#define IDC_P8X8                        1017
+#define IDC_BITRATEHIGH                 1018
+#define IDC_BFRAMES                     1019
+#define IDC_BITRATEHIGH2                1020
+#define IDC_KEYINTMIN                   1021
+#define IDC_BFRAMES2                    1022
+#define IDC_KEYINTMAX                   1023
+#define IDC_BITRATELOW3                 1024
+#define IDC_EDIT3                       1025
+#define IDC_REFFRAMES                   1026
+#define IDC_BITRATEHIGH3                1027
+#define IDC_BFRAME                      1028
+#define IDC_DEFAULTS                    1029
+#define IDC_CHECK3                      1030
+#define IDC_ADVANCED                    1031
+#define IDC_RADIO1                      1032
+#define IDC_RADIOBITRATE                1033
+#define IDC_MODE                        1034
+#define IDC_RADIOQUALITY                1035
+#define IDC_RADIOQUANT                  1036
+#define IDC_RADIOTWOPASS                1037
+#define IDC_USEADVANCED                 1038
+#define IDC_ADVDEFAULTS                 1039
+#define IDC_HOMEPAGE                    1040
+#define IDC_X264                        1041
+#define IDC_BUILD                       1042
+#define IDC_FOURCC                      1043
+#define IDC_SUBPEL                      1044
+#define IDC_DIRECTPRED                  1045
+#define IDC_2PASS1                      1046
+#define IDC_2PASS2                      1047
+#define IDC_INLOOP_A                    1048
+#define IDC_LOOPA_TXT                   1049
+#define IDC_FAST1PASS                   1050
+#define IDC_IPRATIO                     1051
+#define IDC_PBRATIO                     1052
+#define IDC_CURVECOMP                   1053
+#define IDC_UPDATESTATS                 1054
+#define IDC_STATSFILE                   1055
+#define IDC_STATSFILE_BROWSE            1056
+#define IDC_CONSOLE                     1057
+#define IDC_COPYCLIP                    1058
+#define IDC_BREFS                       1059
+#define IDC_WBPRED                      1060
+#define IDC_THREADS                     1061
+#define IDC_THREADEDIT                  1062
+#define IDC_SAR_W                       1063
+#define IDC_SAR_H                       1064
+#define IDC_I8X8                        1065
+#define IDC_DCT8X8                      1066
+#define IDC_NR                          1067
+#define IDC_ME_METHOD                   1068
+#define IDC_MIXEDREF                    1069
+#define IDC_CHROMAME                    1070
+#define IDC_MERANGE                     1071
+#define IDC_BADAPT                      1072
+#define IDC_BBIASSLIDER                 1073
+#define IDC_BBIAS                       1074
+#define IDC_QPMIN                       1075
+#define IDC_QPMAX                       1076
+#define IDC_QPSTEP                      1077
+#define IDC_INLOOP_B                    1078
+#define IDC_LOOPB_TXT                   1079
+#define IDC_LOG                         1080
 #define IDC_DEBUG                       1084
 #define IDC_CPU_MMX                     1086
 #define IDC_SCENECUT                    1087
@@ -97,6 +98,8 @@
 #define IDC_BITRATELABEL                1092
 #define IDC_LOGO                        1093
 #define IDC_BUILDREV                    1095
+#define IDC_TRELLIS                     1097
+#define IDC_BIDIR_ME                    1098
 
 // Next default values for new objects
 // 
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        109
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1096
+#define _APS_NEXT_CONTROL_VALUE         1101
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif
index d6234fd..3b78e9a 100644 (file)
@@ -52,6 +52,7 @@ BEGIN
     LTEXT           "Statsfile name",IDC_STATIC,12,156,48,12,SS_CENTERIMAGE
     EDITTEXT        IDC_STATSFILE,60,156,102,12,ES_AUTOHSCROLL
     PUSHBUTTON      "...",IDC_STATSFILE_BROWSE,168,156,18,12
+    CTEXT           "BUILD",IDC_BUILDREV,7,52,186,8,SS_CENTERIMAGE | WS_DISABLED
 END
 
 IDD_TAB_IPFRAMES DIALOGEX 0, 0, 200, 188
@@ -78,6 +79,7 @@ BEGIN
     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
 END
 
 IDD_TAB_RATECONTROL DIALOGEX 0, 0, 200, 188
@@ -88,7 +90,7 @@ BEGIN
     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,25,78,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
@@ -113,10 +115,10 @@ 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,82,140,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "Threshold",IDC_STATIC,82,153,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "0",IDC_LOOPA_TXT,166,140,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    LTEXT           "0",IDC_LOOPB_TXT,166,153,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+    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
     LTEXT           "Partition decision",IDC_STATIC,30,12,60,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
     LTEXT           "Method",IDC_STATIC,30,30,30,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
@@ -127,21 +129,23 @@ BEGIN
     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
-    CONTROL         "CABAC",IDC_CABAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,126,39,12,WS_EX_TRANSPARENT
-    CONTROL         "Deblocking filter:",IDC_LOOPFILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,140,66,12
-    CONTROL         "",IDC_INLOOP_A,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,118,141,42,12,WS_EX_TRANSPARENT
-    CONTROL         "",IDC_INLOOP_B,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,118,153,42,12,WS_EX_TRANSPARENT
+    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         "",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
-    CTEXT           "BUILD",IDC_BUILDREV,12,169,174,8,SS_CENTERIMAGE | WS_DISABLED
     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
 END
 
 
@@ -191,6 +195,7 @@ BEGIN
         RIGHTMARGIN, 193
         TOPMARGIN, 7
         BOTTOMMARGIN, 181
+        HORZGUIDE, 179
     END
 END
 #endif    // APSTUDIO_INVOKED
@@ -202,6 +207,30 @@ END
 //
 
 IDB_LOGO                BITMAP                  "x264.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE 
+BEGIN
+    IDC_BADAPT              "Use fewer B-frames if needed"
+    IDC_BBIAS               "Influence how often B-frames are used"
+    IDC_BFRAME              "Limit consecutive runs of B-frames"
+    IDC_BIDIR_ME            "Jointly optimize both MVs in B-frames"
+    IDC_BREFS               "Keep some B-frames as references"
+    IDC_DEFAULTS            "Reset everything"
+    IDC_DIRECTPRED          "B-Direct MV prediction mode"
+    IDC_KEYINTMIN           "Minimum GOP size"
+    IDC_KEYINTMAX           "Maximum GOP size"
+    IDC_MIXEDREF            "Decide references on a per partition basis"
+    IDC_NR                  "DCT noise reduction amount"
+    IDC_SCENECUT            "How aggressively to insert extra I-frames"
+    IDC_TRELLIS             "Trellis quantization on the final MB"
+    IDC_WBPRED              "Weighted prediction for B-frames"
+END
+
 #endif    // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////
 
index 6ce83e5..4fd6dd4 100644 (file)
@@ -99,7 +99,10 @@ typedef struct
     int b_save;
     /* fourcc used */
     char fcc[4+1];
-    int  i_encoding_type;
+    int i_encoding_type;
+    int i_trellis;
+    int b_bidir_me;
+    int i_noise_reduction;
 } CONFIG;
 
 /* CODEC: vfw codec instance