[vlc-devel] [WIP] sharpen: reimplement with SKIPSM

Tristan Matthews le.businessman at gmail.com
Fri May 23 10:16:40 CEST 2014


On Fri, May 23, 2014 at 3:14 AM, Ilkka Ollakka <ileoo at videolan.org> wrote:
> On Thu, May 22, 2014 at 11:30:28AM -0400, Tristan Matthews wrote:
>> SKIPSM (Separated-Kernel Image Processing using finite-State Machines) allows
>> sharpening with fewer repeated operations. Two finite-state machines
>> (a 2 element row FSM, and a width-element column FSM) are used to to avoid
>> duplicate reads/arithmetic.
>
>> This is a WIP. sharpen2 is meant to replace sharpen but both are included here
>> for ease of live comparison.
>
> Hi,
>
> Nice patch, maybe the UI part could go to separated patch later on.

Yeah when I send the actual patch, there shouldn't be any UI changes,
there would just be a new implementation of sharpen.

>
>> +/*****************************************************************************
>> + * sharpen2.c: Sharpen video filter
>> + *****************************************************************************
>> + * Copyright (C) 2003-2007 VLC authors and VideoLAN
>
> Are you sure about those years? ;)
>
>> + * Author: Jérémy DEMEULE <dj_mulder at djduron dot no-ip dot org>
>> + *         Jean-Baptiste Kempf <jb at videolan dot org>
>
> You are not authors?

I am for the new Filter() code, I could put my name in there ;)

>> +#define SIG_TEXT N_("Sharpen strength (0-2)")
>> +#define SIG_LONGTEXT N_("Set the Sharpen strength, between 0 and 2. Defaults to 0.05.")
>
> I think that with range vlc outputs limits automaticly, so maybe those
> are not needed as translatable strings.
>
>> +/*****************************************************************************
>> + * clip: avoid negative value and value > 255
>> + *****************************************************************************/
>> +inline static uint8_t clip( int32_t a )
>> +{
>> +    return (a > 255) ? 255 : (a < 0) ? 0 : a;
>> +}
>
> VLC_CLIP() ?

Yeah I'll see how that fares.

>
>> +    /* perform convolution only on Y plane. Avoid border line. */
>> +    vlc_mutex_lock( &p_filter->p_sys->lock );
>
> I think it would be better in callback just to set boolean/flag to tell
> to call precalc_table on next Filter call. As current way callback could
> end und being blocked for relative long time and it's not preferred to
> do so. So checking the need for init_precalc_table in Filter would be
> better and just set flag for it in SharpenCallback().

Ok I'll try that, thanks.

>
> --
> Ilkka Ollakka
> To be or not to be.
>                 -- Shakespeare
> To do is to be.
>                 -- Nietzsche
> To be is to do.
>                 -- Sartre
> Do be do be do.
>                 -- Sinatra
>
> _______________________________________________
> 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