[FFmpeg-devel] [PATCH] avfilter/dctdnoiz: rewrite [f/i]dct

Clément Bœsch u at pkh.me
Sun Aug 3 22:36:52 CEST 2014


On Sun, Aug 03, 2014 at 10:27:21PM +0200, Clément Bœsch wrote:
> This removes the avcodec dependency and make the code almost twice as
> fast. More to come.
> 
> The DCT factorization is based on "Fast and numerically stable
> algorithms for discrete cosine transforms" from Gerlind Plonkaa &
> Manfred Tasche (DOI: 10.1016/j.laa.2004.07.015).
> ---
>  configure                 |   2 -
>  libavfilter/vf_dctdnoiz.c | 328 +++++++++++++++++++++++++++++++++-------------
>  2 files changed, 240 insertions(+), 90 deletions(-)
> 

BTW, for the details on the factorization: https://github.com/ubitux/dct

I have a few more things planed to improve the performances; typically,
moving from 16x16 to 8x8 with the previous dct made the code something
like 6 or 7x faster, so I expect a similar gain with the new dct (I'll add
a runtime user option for this).

Also, the way color correction/decorrelation is implemented is kind of
very stupid and thus slow, so I'll fix that as well.

I would like to add tests, but the float are probably a no-go, but we
probably have a threshold system in FATE for this? (FUZZ?).

On a side note, I have an experiment with integer operations which worked
with the previous DCT, so maybe that's a solution for FATE (although I'm
uncertain about the performance gain and the precision loss).

Last thing is the threading. While it will definitely helps for the
simple sigma case, it will be a problem for the eval method. I guess I'll
just ignore threading when that option is selected by the user.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140803/d67d1952/attachment.asc>


More information about the ffmpeg-devel mailing list