[vlc-devel] [PATCH] hqdn3d video filter, ported from mplayer

Cheng Sun cheng.sun at ymail.com
Wed Nov 23 20:11:12 CET 2011


On 23/11/11 06:40, Rémi Denis-Courmont wrote:
> On Tue, 22 Nov 2011 18:48:35 -0500, Rafaël Carré <funman at videolan.org>
> wrote:
>>> +    deNoise(src->p[0].p_pixels, dst->p[0].p_pixels,
>>> +            cfg->Line, &cfg->Frame[0], sys->w[0], sys->h[0],
>>> +            src->p[0].i_pitch, dst->p[0].i_pitch,
>>> +            cfg->Coefs[0],
>>> +            cfg->Coefs[0],
>>> +            cfg->Coefs[1]);
>>> +    deNoise(src->p[1].p_pixels, dst->p[1].p_pixels,
>>> +            cfg->Line, &cfg->Frame[1], sys->w[1], sys->h[1],
>>> +            src->p[1].i_pitch, dst->p[1].i_pitch,
>>> +            cfg->Coefs[2],
>>> +            cfg->Coefs[2],
>>> +            cfg->Coefs[3]);
>>> +    deNoise(src->p[2].p_pixels, dst->p[2].p_pixels,
>>> +            cfg->Line, &cfg->Frame[2], sys->w[2], sys->h[2],
>>> +            src->p[2].i_pitch, dst->p[2].i_pitch,
>>> +            cfg->Coefs[2],
>>> +            cfg->Coefs[2],
>>> +            cfg->Coefs[3]);
>> can this be a for loop?
> Indeed. And does it really work with the same Line for each plane? That
> seems very suspicious.
Yes this is correct. cfg->Line means nothing between function calls, it
is just temporary space. We could malloc memory on each deNoise call,
but that's wasteful.

(as the previous patch was cut off, I'll try attaching this time.)

Cheng
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hqdn3d.patch
Type: text/x-patch
Size: 17012 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111123/b1fd2c57/attachment.bin>


More information about the vlc-devel mailing list