Attached the patch updating the softening phase as mentioned below<div><br></div><div>-Dharani<br><br><div class="gmail_quote">On Mon, May 9, 2011 at 12:51 AM, Laurent Aimar <span dir="ltr"><<a href="mailto:fenrir@elivagar.org">fenrir@elivagar.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
On Mon, May 09, 2011 at 12:37:17AM +0530, dharani prabhu wrote:<br>
> Attached the changes ...<br>
<div class="im">> +    /******* Temporal softening phase. Adapted from code by Steven Don ******/<br>
> +    uint8_t *src1, *src2;<br>
</div>> +    int ofs = (i_num_lines * i_out_pitch + i_num_cols);<br>
> +    int pitch = i_out_pitch;<br>
<div class="im">> +    src1 = p_outpic->p[Y_PLANE].p_pixels;<br>
> +    src2 = p_filter->p_sys->p_old_data;<br>
> +<br>
> +    do<br>
> +    {<br>
</div>> +        int diff = abs(*src1 - *src2);<br>
<div class="im">> +        if (diff < i_softening)<br>
> +        {<br>
> +            if (diff > (i_softening >> 1))<br>
> +            {<br>
</div>> +                *src2 = (*src1 + *src1 + *src2 )/ 3;<br>
<div class="im">> +            }<br>
> +        }<br>
> +        else<br>
> +        {<br>
> +            *src2 = *src1;<br>
> +        }<br>
> +        *src1 = *src2;<br>
> +        src1++; src2++;<br>
</div>> +        if( --pitch == 0 )<br>
> +        {<br>
> +          src2 += (p_filter->fmt_in.video.i_width - i_out_pitch );<br>
> +          pitch = i_out_pitch;<br>
> +        }<br>
> +    } while (--ofs);<br>
This cannot work, as p_filter->fmt_in.video.i_width will usually be lower than i_out_pitch.<br>
Why not simply doing a double loops like:<br>
for( int i_line = 0 ; i_line < i_num_lines ; i_line++ )<br>
{<br>
    for( int i_col = 0; i_col < i_num_cols  ; i_col++ )<br>
    {<br>
    }<br>
}<br>
as you did in your code (a bit above)?<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">fenrir<br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br></div>