Commit e644e7ea authored by Loren Merritt's avatar Loren Merritt

change the meaning of --ref: it now selects DPB size (including B-frames),...

change the meaning of --ref: it now selects DPB size (including B-frames), rather than L0 size (which B-frames are added to)


git-svn-id: svn://svn.videolan.org/x264/trunk@721 df754926-b1dd-0310-bc7b-ec298dee348c
parent 8105162b
......@@ -885,7 +885,7 @@ static inline void x264_reference_build_list( x264_t *h, int i_poc )
h->i_ref1 = X264_MIN( h->i_ref1, h->frames.i_max_ref1 );
h->i_ref0 = X264_MIN( h->i_ref0, h->frames.i_max_ref0 );
h->i_ref0 = X264_MIN( h->i_ref0, h->param.i_frame_reference ); // if reconfig() has lowered the limit
h->i_ref0 = X264_MIN( h->i_ref0, 16 - h->i_ref1 );
assert( h->i_ref0 + h->i_ref1 <= 16 );
h->mb.pic.i_fref[0] = h->i_ref0;
h->mb.pic.i_fref[1] = h->i_ref1;
}
......
......@@ -196,7 +196,7 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
/* extra slot with pyramid so that we don't have to override the
* order of forgetting old pictures */
sps->vui.i_max_dec_frame_buffering =
sps->i_num_ref_frames = X264_MIN(16, param->i_frame_reference + sps->vui.i_num_reorder_frames + param->b_bframe_pyramid);
sps->i_num_ref_frames = X264_MIN(16, X264_MAX(param->i_frame_reference, 1 + sps->vui.i_num_reorder_frames));
sps->vui.b_bitstream_restriction = 1;
if( sps->vui.b_bitstream_restriction )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment