VfW: mixed refs.
authorLoren Merritt <pengvado@videolan.org>
Thu, 13 Oct 2005 18:19:38 +0000 (18:19 +0000)
committerLoren Merritt <pengvado@videolan.org>
Thu, 13 Oct 2005 18:19:38 +0000 (18:19 +0000)
patch by celtic_druid.

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

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

index a30eb43..9ad897e 100644 (file)
@@ -262,6 +262,9 @@ LRESULT compress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiO
     if( config->b_i8x8 )
         param.analyse.inter |= X264_ANALYSE_I8x8;
     param.analyse.b_transform_8x8 = config->b_dct8x8;
+    if( config->b_mixedref )
+        param.analyse.b_mixed_references = 1;
+
 
     switch( config->i_encoding_type )
     {
index c11b64b..ad2b67b 100644 (file)
@@ -121,7 +121,8 @@ static const reg_int_t reg_int_table[] =
     { "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 }
+    { "subpel",         &reg.i_subpel_refine,   4 },
+    { "mixedref",       &reg.b_mixedref,        0 }
 
 };
 
@@ -495,6 +496,8 @@ 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 */
@@ -596,6 +599,9 @@ BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
                 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 );
+                break;
             case IDC_CHROMAME :
                 config->b_chroma_me = ( IsDlgButtonChecked( hTabs[3], IDC_CHROMAME ) == BST_CHECKED );
                 break;
index 891324c..6c7a062 100644 (file)
@@ -77,6 +77,7 @@
 #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
index 67b324f..d6234fd 100644 (file)
@@ -58,25 +58,26 @@ 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,27,WS_DISABLED
-    GROUPBOX        "Partitions",IDC_STATIC,6,31,186,79,WS_DISABLED
+    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
-    CONTROL         "8x8 Transform",IDC_DCT8X8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,12,60,12,WS_EX_TRANSPARENT
-    CONTROL         "8x8 Intra search",IDC_I8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,81,66,12,WS_EX_TRANSPARENT
-    CONTROL         "4x4 Intra search",IDC_I4X4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,94,66,12,WS_EX_TRANSPARENT
-    CONTROL         "8x16, 16x8 and 8x8 P-frame search",IDC_P16X16,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,42,127,12,WS_EX_TRANSPARENT
-    CONTROL         "4x8, 8x4 and 4x4 P-frame search",IDC_P8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,68,119,12,WS_EX_TRANSPARENT
-    LTEXT           "Max ref frames",IDC_STATIC,95,12,49,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
-    EDITTEXT        IDC_REFFRAMES,148,12,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    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,55,127,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
 END
 
 IDD_TAB_RATECONTROL DIALOGEX 0, 0, 200, 188
index 6bea6f4..c853cc7 100644 (file)
@@ -66,6 +66,7 @@ typedef struct
     int b_psub8x8;
     int b_bsub16x16;
     int b_dct8x8;
+    int b_mixedref;
 
     int i_bframe;
     int i_subpel_refine;