[FFmpeg-devel] [PATCH][RFC] perspective filter port

Stefano Sabatini stefano.sabatini-lala at poste.it
Sat Apr 30 19:04:33 CEST 2011


Hi all,

in attachment a mechanical port of the libmpcodecs perspective filter.

Todo:
* add support to RGB path
* add support to more formats (many of them should be already
  supported out of the box)
* make the filter parametric
* make the filter support outw/h != inw/h
* write an affine transform wrapper (perspective transforms are a
  superclass of the affine transforms)
* add support to a fill color for filling the background
* rework the interface, maybe we could make the filter accepts a
  matrix textual representation (e.g. adopting the MATLAB/Octave
  notation), the parsing routines may be useful in other parts of the
  code

Note that this filter uses float arithmetic, so I believe it is still
a good idea to keep a separate non-float implementation of a rotozoom
filter (I have no idea at this point if the same could be done with
this filter).

But in order to do this I need to understand the math behind the code.

Michael, can you describe the meaning of
    int32_t coeff[1<<SUB_PIXEL_BITS][4];
    int32_t (*pv)[2];
    int pvStride;
?

and eventually provide a link to some reference material?

pvStride in particular is defined like the input width, so maybe at
least that parameter may be removed.

The accidental motivation for this patch is adding support to affine
transforms, in order to support transforms annotated in MOV metadata
through the automatic insertion of a filter in the filterchain.

Note: I changed the license from GPL to LGPL, Micheal are you fine
with that?
-- 
FFmpeg = Fanciful and Foolish Most Prodigious Erroneous Glue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-lavfi-add-perspective-filter.patch
Type: text/x-diff
Size: 14858 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110430/dd9ed808/attachment.bin>


More information about the ffmpeg-devel mailing list