[vlc-devel] [PATCH 03/10] video_filter:deinterlace: make sure we use the same setup for auto and X
Steve Lhomme
robux4 at gmail.com
Tue Jun 27 08:21:05 CEST 2017
On Mon, Jun 26, 2017 at 7:48 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 26 juin 2017 19:20:12 GMT+02:00, Steve Lhomme <robux4 at videolabs.io> a
> écrit :
>>
>> ---
>> modules/video_filter/deinterlace/deinterlace.c | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/modules/video_filter/deinterlace/deinterlace.c
>> b/modules/video_filter/deinterlace/deinterlace.c
>> index 2be5422c3a..57df63c813 100644
>> --- a/modules/video_filter/deinterlace/deinterlace.c
>> +++ b/modules/video_filter/deinterlace/deinterlace.c
>> @@ -155,7 +155,7 @@ static void SetFilterMethod( filter_t *p_filter, const
>> char *mode, bool pack )
>> p_sys->b_half_height = false;
>> p_sys->b_use_frame_history = false;
>>
>> - if ( !strcmp( mode, "auto" ) )
>> + if ( !strcmp( mode, "auto" ) || !strcmp( mode, "x" ) )
>> {
>> p_sys->i_mode = DEINTERLACE_X;
>> }
>> @@ -206,10 +206,6 @@ static void SetFilterMethod( filter_t *p_filter,
>> const char *mode, bool pack )
>> " for high depth format", mode );
>> return SetFilterMethod(p_filter, "auto", pack);
>> }
>> - else if( !strcmp( mode, "x" ) )
>> - {
>> - p_sys->i_mode = DEINTERLACE_X;
>> - }
>> else if( !strcmp( mode, "phosphor" ) )
>> {
>> p_sys->i_mode = DEINTERLACE_PHOSPHOR;
>
>
> I don't see the point. It makes it harder to change the default algorithm,
> and the compiler should be capable of vectoring the code if it helps.
With further patches the X mode sets a few extra variables that would
need to be copied in both cases. But I guess it's cleaner to check
"auto" and rewrite the value to somehting else (or call recursively
like it's already done).
> Also typo.
> --
> Rémi Denis-Courmont
> Typed on an inconvenient virtual keyboard
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list