From 4f27756d35447b98d72cb068d48d6c35cd109e71 Mon Sep 17 00:00:00 2001 From: jbrjake Date: Fri, 24 Aug 2007 19:07:43 +0000 Subject: [PATCH] Major oops. Reverts previous two check-ins, which ended up in tags/0.9.0 instead of trunk because I was being really stupid. git-svn-id: svn://svn.handbrake.fr/HandBrake/tags/0.9.0@860 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/decmpeg2.c | 20 ++++++++++---------- libhb/stream.c | 9 +++------ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c index fad85017..77c6c0b9 100644 --- a/libhb/decmpeg2.c +++ b/libhb/decmpeg2.c @@ -25,7 +25,7 @@ #define BTB_PROG 64 #define TB_PROG 128 #define TBT_PROG 256 -int cadence[12]; +int cadence[6]; int flag = 0; /********************************************************************** @@ -213,11 +213,11 @@ int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, hb_log("fields: %d", m->info->display_picture->nb_fields); */ /* Rotate the cadence tracking. */ - int i = 0; - for(i=11; i > 0; i--) - { - cadence[i] = cadence[i-1]; - } + cadence[5] = cadence[4]; + cadence[4] = cadence[3]; + cadence[3] = cadence[2]; + cadence[2] = cadence[1]; + cadence[1] = cadence[0]; if ( !(flag & PROGRESSIVE) && !(flag & TOP_FIRST) ) { @@ -273,10 +273,10 @@ int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, cadence[0] = TBT_PROG; } - if ( (cadence[2] <= TB) && (cadence[1] <= TB) && (cadence[0] > TB) && (cadence[11]) ) - hb_log("%fs: Interlaced -> Progressive", (float)buf->start / 90000); - if ( (cadence[2] > TB) && (cadence[1] <= TB) && (cadence[0] <= TB) && (cadence[11]) ) - hb_log("%fs: Progressive -> Interlaced", (float)buf->start / 90000); + if ( (cadence[2] <= TB) && (cadence[1] <= TB) && (cadence[0] > TB) && (cadence[0]) && (cadence[1]) ) + hb_log("PTS %lld: Interlaced -> Progressive", buf->start); + if ( (cadence[2] > TB) && (cadence[1] <= TB) && (cadence[0] <= TB) && (cadence[0]) && (cadence[1]) ) + hb_log("PTS %lld: Progressive -> Interlaced", buf->start); /* Store picture flags for later use by filters */ buf->flags = m->info->display_picture->flags; diff --git a/libhb/stream.c b/libhb/stream.c index ab8963c4..1e8e3364 100755 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -83,11 +83,8 @@ int hb_stream_is_stream_type( char * path ) { if ((strstr(path,".mpg") != NULL) || (strstr(path,".vob") != NULL) || - (strstr(path, ".VOB") != NULL) || - (strstr(path, ".mpeg") != NULL) || (strstr(path,".ts") != NULL) || - (strstr(path, ".m2t") != NULL) || - (strstr(path, ".TS") != NULL)) + (strstr(path, ".m2t") != NULL)) { return 1; } @@ -115,12 +112,12 @@ hb_stream_t * hb_stream_open( char * path ) d->path = strdup( path ); - if ( ( strstr(d->path,".ts") != NULL) || ( strstr(d->path,".m2t") != NULL) || ( strstr(d->path,".TS") != NULL) ) + if ( ( strstr(d->path,".ts") != NULL) || ( strstr(d->path,".m2t") != NULL)) { d->stream_type = hb_stream_type_transport; hb_ts_stream_init(d); } - else if (( strstr(d->path,".mpg") != NULL) || ( strstr(d->path,".vob") != NULL) || ( strstr(d->path,".mpeg") != NULL) || ( strstr(d->path,".VOB") != NULL)) + else if (( strstr(d->path,".mpg") != NULL) || ( strstr(d->path,".vob") != NULL)) { d->stream_type = hb_stream_type_program; } -- 2.11.4.GIT