精妙的冒泡法排序x264 reflist0 reorder,从大到小

 do
    {
        b_ok = 1;
        for( i = 0; i < h->i_ref0 - 1; i++ )
        {
            if( h->fref0[i]->i_poc < h->fref0[i+1]->i_poc )
            {
                XCHG( x264_frame_t*, h->fref0[i], h->fref0[i+1] );
                b_ok = 0;
                break;// jump out of this loop
            }
        }
    } while( !b_ok );// reorder ,as 3 2 1 ,rising bubble.so smart

你可能感兴趣的:(精妙的冒泡法排序x264 reflist0 reorder,从大到小)