[vlc-devel] [PATCH 3/7] Reactivated an improved version of the crop-module.

VlcVelope 1034-135 at online.de
Mon Apr 23 23:52:09 CEST 2012


On 22.04.2012 22:49, Jean-Baptiste Kempf wrote:
> On Sun, Apr 22, 2012 at 10:38:12PM +0200, VlcVelope wrote :
>> The crop-module along is a mix of the crop-module with the croppadd-module.
>
>> +#define CFG_PREFIX "crop-"
>
> crop here
>
>> +    add_string( CFG_PREFIX "crop-geometry", NULL, GEOMETRY_TEXT,
> crop-crop-geometry?
>
>> -    add_integer_with_range( "autocrop-ratio-max", 2405, 0, RATIO_MAX,
>> +    add_integer_with_range( CFG_PREFIX "autocrop-ratio-max", 2405, 0, RATIO_MAX,
> crop-autocrop-ratio-max seems weird and I do not understand the change.
>
>> -    add_shortcut( "crop" )
> Why?
>
>> +    int i_width, i_height,
>> +        i_outwidth, i_outheight;
>
> Weird indentation.
>
>> +		p_sys->i_lastchange = 0;
> No tabs in source.
>
>> +        if( p_sys->b_slowchange&&  direction )  top += direction / abs( direction ) * 2;
>> +        else                                    top += direction;
>> +        if( abs( top-p_sys->i_y )<  2 )	        top = p_sys->i_y;
>> +        int newbottom=p_filter->fmt_in.video.i_height-(p_sys->i_height+p_sys->i_y);
>> +        direction=newbottom-bottom;
>> +        if( p_sys->b_slowchange&&  direction )  bottom += direction / abs( direction ) * 2;
>> +        else                                    bottom += direction;
>> +        if( abs( bottom - newbottom )<  2 )     bottom = newbottom;
>> +        if( top == p_sys->i_y&&  bottom == newbottom )
>> +            p_sys->b_changed = false;
>
> Please add newlines in some places.
>
>> +    uint8_t *p_in = p_pic->p[0].p_pixels;
>> +    int i_pitch = p_pic->p[0].i_pitch;
>> +    int i_visible_pitch = p_pic->p[0].i_visible_pitch;
>> +    int i_lines = p_pic->p[0].i_visible_lines;
>> +    int i_firstwhite = -1, i_lastwhite = -1, i;
>
> You should align around =
>
> Best regards,
>
Thanks for your information,
I must have overseen some of the tabs (my old editor was using tabs...) 
Should I better stay with the old variable names? The crop-crop really 
makes no sense. Also "geometry" is not used any more and I will remove 
that, too.



More information about the vlc-devel mailing list