[vlc-devel] [PATCH] video filter refactor (trying to reuse functions)

Rémi Denis-Courmont remi at remlab.net
Fri Dec 24 16:57:34 CET 2010

If nobody objects, I'll merge this.

On Saturday 11 December 2010, Branko Kokanovic wrote:
> Hi,
> As discussed in thread[1], I recently created "technical debt" when not
> reusing existing functions. Since sepia filter is pushed, this patch now
> tries to fix that. Not that much is changed, but end result is:
> * posterize.c now contains only functions related to posterizing
> * sepia.c now contains only functions related to sepia
> * filter_picture.h now have three more functions:
> ** for getting packed rgb indexes
> ** yuv->rgb conversion and
> ** rgb->yuv conversion
> * filter_picture.h's GetPackedYuvOffsets() functions got another case in
> switch (VLC_CODEC_VYUY) because:
> ** sepia.c needs it (backward compatibility)
> ** I thought it should be there and
> ** it will not break existing filters that use it
> blend.c got some more potential candidates for reusing, but I leaved
> them there for now, and will move them to filter_picture.h if I ever use
> them.
> I tested posterize, blend and sepia filter with several different video
> chromas, it all works.
> I'm hoping this will pay my debts:)
> Greetings, kokan
> [1]
> http://mailman.videolan.org/pipermail/vlc-devel/2010-November/077766.html
Rémi Denis-Courmont

More information about the vlc-devel mailing list