allow 16 refs (instead of 15)
authorLoren Merritt <pengvado@videolan.org>
Sat, 5 Mar 2005 04:16:05 +0000 (04:16 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sat, 5 Mar 2005 04:16:05 +0000 (04:16 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@152 df754926-b1dd-0310-bc7b-ec298dee348c

common/common.h
encoder/encoder.c
encoder/ratecontrol.c
vfw/config.c

index 80f41dc..66657c0 100644 (file)
@@ -265,9 +265,9 @@ struct x264_t
 
     /* references lists */
     int             i_ref0;
-    x264_frame_t    *fref0[16];       /* ref list 0 */
+    x264_frame_t    *fref0[16+3];     /* ref list 0 */
     int             i_ref1;
-    x264_frame_t    *fref1[16];       /* ref list 1 */
+    x264_frame_t    *fref1[16+3];     /* ref list 1 */
     int             b_ref_reorder[2];
 
 
index 1e7552c..7d97a02 100644 (file)
@@ -373,7 +373,7 @@ x264_t *x264_encoder_open   ( x264_param_t *param )
     }
 
     /* Fix parameters values */
-    h->param.i_frame_reference = x264_clip3( h->param.i_frame_reference, 1, 15 );
+    h->param.i_frame_reference = x264_clip3( h->param.i_frame_reference, 1, 16 );
     if( h->param.i_keyint_max <= 0 )
         h->param.i_keyint_max = 1;
     h->param.i_keyint_min = x264_clip3( h->param.i_keyint_min, 1, h->param.i_keyint_max/2+1 );
index 6d51d68..6057515 100644 (file)
@@ -852,7 +852,7 @@ static float rate_estimate_qscale(x264_t *h, int pict_type)
 
     if(rce->pict_type == SLICE_TYPE_B)
     {
-        if(rce->kept_as_ref)
+        if(h->fenc->b_kept_as_ref)
             return rcc->last_qscale * sqrtf(h->param.rc.f_pb_factor);
         else
             return rcc->last_qscale * h->param.rc.f_pb_factor;
index 9159c8c..8712439 100644 (file)
@@ -606,9 +606,9 @@ BOOL CALLBACK callback_advanced( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
                 break;
             case IDC_REFFRAMES :
                 config->i_refmax = GetDlgItemInt( hDlg, IDC_REFFRAMES, FALSE, FALSE );
-                if( config->i_refmax > 15 )
+                if( config->i_refmax > 16 )
                 {
-                    config->i_refmax = 15;
+                    config->i_refmax = 16;
                     SetDlgItemInt( hDlg, IDC_REFFRAMES, config->i_refmax, FALSE );
                 }
                 break;