[FFmpeg-devel] [PATCH] libavfilter-soc: implement pad filter
Stefano Sabatini
stefano.sabatini-lala
Tue Apr 28 22:03:53 CEST 2009
On date Tuesday 2009-04-28 11:33:32 +0100, vmrsss encoded:
> Hi Stefano,
>
> I am glad you resurrected this, well done. Apart lacking RGB support,
> the way I remember it is that the filter worked well, but Michael wanted
> memcpy removed in favour or direct rendering and I did not know how to
> achieve that. (Also, at the time some necessary info about the input
> stream was missing from the AVFilter structures, but this might not be
> the case now.)
>
> Regards,
> -vmrsss
>
> PS. Besides the padcolor option (yes, it would be nice to extract some
> of the code I had written to a colourutil.[hc]), I still think that some
> of the other options I had originally considered add flexibility and
> although not vital may still be useful, in particular:
>
> w / h = - N or h=-N to enlarge by N pixels
This is already implemented.
> a = r to require expansion to fit a particular aspect ratio (rather
> than size)
>
> for instance
>
> pad=w=-32:a=16/9 (enlarge width by 32 pixel and then height
> as required to yield overall aspect ratio 16/9).
>
> pad=w=-32:a=-1 (enlarge width by 32 pixel and then height
> as required to keep original aspect ratio).
>
> I suppose the first form you could write as "pad=w=-32:h=w*9/16", which
> is very pretty, how about the second?
w=-32:h=W*h/w
(Now that I think at it it would be a lot less confusing the form:
W=-32:H=W*h/w.)
But unfortunately expressions are evaluated in this order:
W H x y
so you can't do for example:
h=-32:w=w*H/h
since when evaluating the expression for W, the value for H has not
still been defined.
I have an idea to fix this problem, but it would require a deep rework
of the options system.
Regards.
--
FFmpeg = Fundamental and Foolish Mean Plastic Elitist Geek
More information about the ffmpeg-devel
mailing list