X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fxine%2Ffilter_deinterlace.c;h=9d122a974eeabbd4bd2f07da947ea754035f3212;hb=eae86b6ff2d11421e4839ffbe79c4c547d15751a;hp=e4b851ceec972a01f2f26d9c4ca0e61b3ef41b25;hpb=2e4eb8e703760fb408f86152451aeaf425f6a579;p=melted diff --git a/src/modules/xine/filter_deinterlace.c b/src/modules/xine/filter_deinterlace.c index e4b851c..9d122a9 100644 --- a/src/modules/xine/filter_deinterlace.c +++ b/src/modules/xine/filter_deinterlace.c @@ -85,17 +85,22 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * // Check that we want progressive and we aren't already progressive if ( *format == mlt_image_yuv422 && - !mlt_properties_get_int( mlt_frame_properties( this ), "progressive" ) && - mlt_properties_get_int( mlt_frame_properties( this ), "consumer_deinterlace" ) ) + !mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "progressive" ) && + mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "consumer_deinterlace" ) ) { // Get the input image error = mlt_frame_get_image( this, image, format, width, height, 1 ); // Determine deinterlace method - char *method_str = mlt_properties_get( mlt_filter_properties( filter ), "method" ); + char *method_str = mlt_properties_get( MLT_FILTER_PROPERTIES( filter ), "method" ); int method = DEINTERLACE_LINEARBLEND; - if ( strcmp( method_str, "bob" ) == 0 ) + if ( method_str == NULL ) + method_str = mlt_properties_get( MLT_FRAME_PROPERTIES( this ), "deinterlace_method" ); + + if ( method_str == NULL ) + mlt_properties_set( MLT_FILTER_PROPERTIES( filter ), "method", "linearblend" ); + else if ( strcmp( method_str, "bob" ) == 0 ) method = DEINTERLACE_BOB; else if ( strcmp( method_str, "weave" ) == 0 ) method = DEINTERLACE_BOB; @@ -108,7 +113,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * deinterlace_yuv( *image, image, *width * 2, *height, method ); // Make sure that others know the frame is deinterlaced - mlt_properties_set_int( mlt_frame_properties( this ), "progressive", 1 ); + mlt_properties_set_int( MLT_FRAME_PROPERTIES( this ), "progressive", 1 ); } else { @@ -142,7 +147,7 @@ mlt_filter filter_deinterlace_init( void *arg ) if ( this != NULL ) { this->process = deinterlace_process; - mlt_properties_set( mlt_filter_properties( this ), "method", arg == NULL ? "linearblend" : arg ); + mlt_properties_set( MLT_FILTER_PROPERTIES( this ), "method", arg ); } return this; }