示例#1
0
文件: lookahead.c 项目: ljbatwh/b264
static void x264_lookahead_update_last_nonb( x264_t *h, x264_frame_t *new_nonb )
{
    if( h->lookahead->last_nonb )
        x264_frame_push_unused( h, h->lookahead->last_nonb );
    h->lookahead->last_nonb = new_nonb;
    new_nonb->i_reference_count++;
}
示例#2
0
文件: lookahead.c 项目: ljbatwh/b264
void x264_lookahead_get_frame( x264_t *h )
{
    if( h->frames.current || !h->lookahead->current_frame )
        return ;

    x264_slicetype_decide( h );

    if( h->lookahead->last_nonb )
        x264_frame_push_unused( h, h->lookahead->last_nonb );
    h->lookahead->last_nonb = h->lookahead->current_frame;
    h->lookahead->current_frame->i_reference_count++;

    h->frames.current = h->lookahead->current_frame;
    h->lookahead->current_frame = 0;
}
示例#3
0
void x264_lookahead_delete( x264_t *h )
{
    if( h->param.i_sync_lookahead )
    {
        h->lookahead->b_exit_thread = 1;
        x264_pthread_cond_broadcast( &h->lookahead->ifbuf.cv_fill );
        x264_pthread_join( h->thread[h->param.i_threads]->thread_handle, NULL );
        x264_macroblock_cache_end( h->thread[h->param.i_threads] );
        x264_free( h->thread[h->param.i_threads] );
    }
    x264_synch_frame_list_delete( &h->lookahead->ifbuf );
    x264_synch_frame_list_delete( &h->lookahead->next );
    if( h->lookahead->last_nonb )
        x264_frame_push_unused( h, h->lookahead->last_nonb );
    x264_synch_frame_list_delete( &h->lookahead->ofbuf );
    x264_free( h->lookahead );
}
示例#4
0
文件: lookahead.c 项目: ljbatwh/b264
void x264_lookahead_delete( x264_t *h )
{
    if( h->lookahead->last_nonb )
        x264_frame_push_unused( h, h->lookahead->last_nonb );
}