Commit c90534d6 authored by Loren Merritt's avatar Loren Merritt

Adaptive B skipped some POC numbers (slightly reducing b_direct efficiency).


git-svn-id: svn://svn.videolan.org/x264/trunk@154 df754926-b1dd-0310-bc7b-ec298dee348c
parent d0bd44f7
......@@ -213,12 +213,12 @@ struct x264_t
/* frame number/poc */
int i_frame;
int i_poc;
int i_frame_offset; /* decoding only */
int i_frame_num; /* decoding only */
int i_poc_msb; /* decoding only */
int i_poc_lsb; /* decoding only */
int i_poc; /* decoding only */
/* We use only one SPS and one PPS */
x264_sps_t sps_array[32];
......
......@@ -450,7 +450,6 @@ x264_t *x264_encoder_open ( x264_param_t *param )
h->i_frame = 0;
h->i_frame_num = 0;
h->i_poc = 0;
h->i_idr_pic_id = 0;
h->sps = &h->sps_array[0];
......@@ -1108,8 +1107,9 @@ do_encode:
i_slice_type = SLICE_TYPE_B;
}
h->fdec->i_poc =
h->fenc->i_poc = 2 * (h->fenc->i_frame - h->frames.i_last_idr);
h->fdec->i_type = h->fenc->i_type;
h->fdec->i_poc = h->fenc->i_poc;
h->fdec->i_frame = h->fenc->i_frame;
h->fenc->b_kept_as_ref =
h->fdec->b_kept_as_ref = i_nal_ref_idc != NAL_PRIORITY_DISPOSABLE;
......@@ -1258,16 +1258,12 @@ do_encode:
x264_frame_t *tmp;
/* Reset */
h->i_poc = 0;
h->i_frame_num = 0;
/* Reinit field of fenc */
h->fenc->i_type = X264_TYPE_IDR;
h->fenc->i_poc = 0;
/* Next Poc */
h->i_poc += 2;
/* Put enqueued frames back in the pool */
while( (tmp = x264_frame_get( h->frames.current ) ) != NULL )
x264_frame_put( h->frames.next, tmp );
......
......@@ -385,7 +385,6 @@ void x264_slicetype_decide( x264_t *h )
}
else
{
h->i_poc = 0;
h->i_frame_num = 0;
}
}
......@@ -400,9 +399,6 @@ void x264_slicetype_decide( x264_t *h )
frm->i_type = X264_TYPE_P;
}
frm->i_poc = h->i_poc;
h->i_poc += 2;
if( frm->i_type != X264_TYPE_AUTO && frm->i_type != X264_TYPE_B && frm->i_type != X264_TYPE_BREF )
break;
......
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