]> granicus.if.org Git - libx264/commitdiff
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 80f41dc588012a35d506da12afde653780f8a36b..66657c0db047e203a0392a75b772e0ba3a59a440 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 1e7552cdc760d09aab5b2eaa4ed1374c395142ab..7d97a028171cfd01260cd5d0eaed8b3a9180744a 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 6d51d68b05b994b208d6c68f1fb099e5b8523b4a..6057515a1cbf5c0217e9e1905013172ddd7e8903 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 9159c8cde281f3bf90f41d6b0d93a6b1eebdd7ff..87124391b432f191e550af2c470f4b338578fb75 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;