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

Branko Kokanovic branko.kokanovic at gmail.com
Sat Dec 11 19:14:32 CET 2010

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

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-video-filter-refactor-trying-to-reuse-functions.patch
Type: text/x-patch
Size: 13816 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20101211/c68307f5/attachment.bin>

More information about the vlc-devel mailing list