many discontinuities (like concatenated blu-ray m2ts files) are handled
better.
git-svn-id: svn://localhost/HandBrake/trunk@2017
b64f7644-9d1e-0410-96f1-
a4d463321fa5
uint64_t pts; /* PTS from video stream */
};
uint64_t pts; /* PTS from video stream */
};
// get one (position, timestamp) sampple from a transport or program
// stream.
// get one (position, timestamp) sampple from a transport or program
// stream.
static double compute_stream_rate( struct pts_pos *pp, int n )
{
int i, j;
static double compute_stream_rate( struct pts_pos *pp, int n )
{
int i, j;
- double rates[NDURSAMPLES * NDURSAMPLES / 2];
+ double rates[NDURSAMPLES * NDURSAMPLES / 8];
double *rp = rates;
// the following nested loops compute the rates between all pairs.
double *rp = rates;
// the following nested loops compute the rates between all pairs.
// could easily fall in the inter-piece part of the data which
// would give a bogus estimate. The 'ns' index creates an
// asymmetry that favors locality.
// could easily fall in the inter-piece part of the data which
// would give a bogus estimate. The 'ns' index creates an
// asymmetry that favors locality.
- int ns = i + ( n >> 1 );
+ int ns = i + ( n >> 3 );
if ( ns > n )
ns = n;
for ( j = i+1; j < ns; ++j )
{
if ( ns > n )
ns = n;
for ( j = i+1; j < ns; ++j )
{
+ if ( (uint64_t)(pp[j].pts - pp[i].pts) > 90000LL*3600*6 )
+ break;
if ( pp[j].pts != pp[i].pts && pp[j].pos > pp[i].pos )
{
*rp = ((double)( pp[j].pts - pp[i].pts )) /
if ( pp[j].pts != pp[i].pts && pp[j].pos > pp[i].pos )
{
*rp = ((double)( pp[j].pts - pp[i].pts )) /