[x264-devel] [patch] fixes for VfW under revision 93+

Riccardo Stievano walkunafraid at tin.it
Thu Jan 13 18:57:21 CET 2005


hi,

here's a patch that fixes the VfW frontend after the changes made in 
revision 93 (GOP size management). Default values for i_keyint_max 
and i_keyint_min have been set to 250 and 10, respectively.

--virus

-------------- next part --------------
Index: config.c
===================================================================
--- config.c	(revision 94)
+++ config.c	(working copy)
@@ -76,8 +76,8 @@
     /* Advance dialog */
     { "cabac",          &reg.b_cabac,           1 },
     { "loop_filter",    &reg.b_filter,          1 },
-    { "idrframe",       &reg.i_idrframe,        1 },
-    { "iframe",         &reg.i_iframe,          250},
+    { "idrframe",       &reg.i_keyint_min,      10 },
+    { "iframe",         &reg.i_keyint_max,      250},
     { "refmax",         &reg.i_refmax,          1 },
     { "bmax",           &reg.i_bframe,          0 },
     {"direct_pred",     &reg.i_direct_mv_pred,  2 },
@@ -467,8 +467,8 @@
     CheckDlgButton( hDlg,IDC_I4X4,
                     config->b_i4x4 ? BST_CHECKED: BST_UNCHECKED );
 
-    SetDlgItemInt( hDlg, IDC_IDRFRAMES, config->i_idrframe, FALSE );
-    SetDlgItemInt( hDlg, IDC_IFRAMES, config->i_iframe, FALSE );
+    SetDlgItemInt( hDlg, IDC_IDRFRAMES, config->i_keyint_min, FALSE );
+    SetDlgItemInt( hDlg, IDC_IFRAMES, config->i_keyint_max, FALSE );
     SetDlgItemInt( hDlg, IDC_KEYFRAME, config->i_refmax, FALSE );
     SetDlgItemInt( hDlg, IDC_BFRAME, config->i_bframe, FALSE );
 
@@ -544,10 +544,10 @@
             switch( LOWORD( wParam ) )
             {
             case IDC_IDRFRAMES :
-                config->i_idrframe = GetDlgItemInt( hDlg, IDC_IDRFRAMES, FALSE, FALSE );
+                config->i_keyint_min = GetDlgItemInt( hDlg, IDC_IDRFRAMES, FALSE, FALSE );
                 break;
             case IDC_IFRAMES :
-                config->i_iframe = GetDlgItemInt( hDlg, IDC_IFRAMES, FALSE, FALSE );
+                config->i_keyint_max = GetDlgItemInt( hDlg, IDC_IFRAMES, FALSE, FALSE );
                 break;
             case IDC_KEYFRAME :
                 config->i_refmax = GetDlgItemInt( hDlg, IDC_KEYFRAME, FALSE, FALSE );
Index: resource.rc
===================================================================
--- resource.rc	(revision 94)
+++ resource.rc	(working copy)
@@ -105,13 +105,13 @@
     DEFPUSHBUTTON   "OK",IDOK,245,237,50,14
     CONTROL         "CABAC",IDC_CABAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
                     16,23,61,10
-    EDITTEXT        IDC_IDRFRAMES,36,126,22,14,ES_AUTOHSCROLL | ES_NUMBER
-    LTEXT           "Every",IDC_STATIC,15,128,19,8
+    EDITTEXT        IDC_IDRFRAMES,68,126,22,14,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "Intra closer than",IDC_STATIC,13,128,53,8
     GROUPBOX        "H.264 features",IDC_STATIC,7,7,288,228
     EDITTEXT        IDC_KEYFRAME,255,20,33,14,ES_AUTOHSCROLL | ES_NUMBER
     LTEXT           "Max Reference Frames:",IDC_STATIC,170,24,76,8
     EDITTEXT        IDC_IFRAMES,114,107,24,14,ES_AUTOHSCROLL | ES_NUMBER
-    LTEXT           "Max Keyframe Interval:",IDC_STATIC,13,110,76,8
+    LTEXT           "Max IDR-Keyframe Interval:",IDC_STATIC,13,110,95,8
     EDITTEXT        IDC_FOURCC,223,107,25,14,ES_AUTOHSCROLL
     LTEXT           "FourCC:",IDC_STATIC,193,110,26,8
     CONTROL         "8x16, 16x8 and 8x8 B-frame search",IDC_B16X16,"Button",
@@ -137,8 +137,8 @@
     CONTROL         "Slider1",IDC_INLOOP_B,"msctls_trackbar32",TBS_NOTICKS | 
                     WS_TABSTOP,56,66,47,10
     LTEXT           "Strength (B)",IDC_STATIC,15,66,39,8
-    LTEXT           "th INTRA frame\n  becomes a keyframe",IDC_STATIC,61,128,
-                    85,16
+    LTEXT           "frames are coded as non-IDR",IDC_STATIC,93,128,
+                    60,16
     GROUPBOX        "More Encoder Settings",IDC_STATIC,7,93,145,66
     GROUPBOX        "VfW settings",IDC_STATIC,151,93,144,66
     LTEXT           "0",IDC_LOOPA_TXT,109,53,8,8
Index: x264vfw.h
===================================================================
--- x264vfw.h	(revision 94)
+++ x264vfw.h	(working copy)
@@ -45,8 +45,8 @@
 
     /* Our config */
     int i_refmax;
-    int i_idrframe;
-    int i_iframe;
+    int i_keyint_max;
+    int i_keyint_min;
 
     int i_qp;
     int b_filter;
Index: codec.c
===================================================================
--- codec.c	(revision 94)
+++ codec.c	(working copy)
@@ -156,8 +156,8 @@
     param.i_fps_den = codec->fincr;
 
     param.i_frame_reference = config->i_refmax;
-    param.i_idrframe = config->i_idrframe;
-    param.i_iframe   = config->i_iframe;
+    param.i_keyint_min = config->i_keyint_min;
+    param.i_keyint_max   = config->i_keyint_max;
     param.b_deblocking_filter = config->b_filter;
     param.b_cabac = config->b_cabac;
 


More information about the x264-devel mailing list