]> git.sesse.net Git - x264/commitdiff
Make interlaced detection in avisynth only apply to field-based input
authorSteven Walters <kemuri9@gmail.com>
Tue, 13 Apr 2010 12:44:37 +0000 (08:44 -0400)
committerFiona Glaser <fiona@x264.com>
Wed, 14 Apr 2010 09:31:43 +0000 (02:31 -0700)
Fixes improper flagging of progressive sources.

input/avs.c

index 59634f4fcad7ef41a406e2ed5d2f600796f761b8..9e3aa55b6873f55dbcf19134f9a06d0c99a8e629 100644 (file)
@@ -233,6 +233,8 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
             return -1;
         }
         res = update_clip( h, &vi, tmp, res );
+        info->interlaced = 1;
+        info->tff = avs_is_tff( vi );
     }
     if( vi->width&1 || vi->height&1 )
     {
@@ -240,14 +242,6 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
                  vi->width, vi->height );
         return -1;
     }
-    /* bff/tff flags in avisynth are not technically mutually exclusive, which can lead to both being set.
-     * avisynth's own functions enact mutual exclusion, but source filters are not guaranteed to do this. */
-    int tff = avs_is_tff( vi );
-    if( avs_is_bff( vi ) ^ tff )
-    {
-        info->interlaced = 1;
-        info->tff = !!tff;
-    }
     /* always call ConvertToYV12 to convert non YV12 planar colorspaces to YV12 when user's AVS supports them,
        as all planar colorspaces are flagged as YV12. If it is already YV12 in this case, the call does nothing */
     if( !avs_is_yv12( vi ) || avs_version >= AVS_INTERFACE_OTHER_PLANAR )