[FFmpeg-devel] [PATCH] libavfilter image transformations
Thu Apr 22 20:28:00 CEST 2010
I am the guy who wrote the stabilizer/deshaker plugin for transcode. Daniel an
my are going to port it to ffmpeg, hopefully ;-) First of all, thank you guys
for the helpful comments so far.
>> This is useful for any filter that might want to transform video frames in
>> any way in the future. I have at least one filter that will use this but
>> is waiting on motion estimation stuff (deshake/stabilize video).
>First, are these transforms separable? I'm not familiar with affine
> rotations to know how to split them into 1D.
What do you mean be 1D?
The transforms are separable into translation, rotation and scaling, but it is
better to combine them since interpolation is required.
Just to make sure here is how these transformations are represented, see
p'=M p where p=(x,y,1) is the source pixel coordinate in homogeneous
coordinates. And M is the transformation matrix:
M = [sx*cos(a), sx*sin(a), tx], [-sy*sin(a), sy*cos(a), ty],[0, 0, 1]
where sx,sy are the scaling factors (usually identical), a is the rotation
angle and tx,ty are the translations.
>Second, can they be done in fixed-point?
Well, if 16.16 this is certainly enough.
>This won't work for downscaling because it won't sample any more than 4
> source pixels.
Yeah that's true. We have to sample more pixels in this case. For our original
purposes such zoom-values are not probable, but of course we need to fix it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part.
More information about the ffmpeg-devel