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
{
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