[vlc-devel] [PATCH] Refactored deinterlacer module

Juha Jeronen juha.jeronen at jyu.fi
Sat Apr 30 20:00:16 CEST 2011

Hi all,

Attached is a first attempt at refactoring the deinterlacer module.
Comments would be appreciated.

Splitting is complete. Some minor things are left. Changes and
no-changes are detailed below.

Functionally this is identical to the previous version; the only change
is the refactoring of the code.

The patch is based on [bf3f6f18b9cffbc0f0c60c2d5e882c32aaf9ce69].

  - Make a subdirectory (in video_filter), move deinterlace.c there
  - Update Modules.am
  - Keep general stuff in deinterlace.c
  - Keep general-use data in filter_sys_t
  - Move filter_sys_t to header
  - Move each algorithm into its own file
    - Note: "basic" algorithms Discard, Bob, Linear, Blend and Mean are
in algo_basic.[ch]; more advanced ones have one algo_*.[ch] per algorithm.
  - Move general-use helper functions into one file
  - Move private data into private structs; add init/uninit API
    - Note: no general API was made at this point. Open() initializes
Phosphor settings, and ClearIVTC() is called from Open() and Flush(),
just like before.
  - Use an enum instead of a bunch of #defines for the modes.
  - Wrap the code to 79 columns or less.
    - Note: done, but not strictly. Some offending lines go a few
characters beyond.
  - Doxygenize comments.
    - Note: done where it makes sense.

TODO / reconsider if worth doing:
  - In all modes, loop over y instead of p_out.
  - Use the new helper function (PlaneToFieldPlane()) where possible.
This applies at least to Bob, Linear and Discard.
  - Make a field/plane merge helper function and use it in all
modes/functions that can be simplified using one. At least
ComposeFrame() and Linear would benefit, and maybe also Mean and Blend.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactored-deinterlacer-module.patch
Type: text/x-patch
Size: 534531 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110430/790b4ae8/attachment.bin>

More information about the vlc-devel mailing list