[Ffmpeg-devel] Another question about cropping and scaling

Luca Abeni lucabe72
Thu Mar 9 17:10:14 CET 2006

Hi all,

I think I finally understood how cropping, padding, and rescaling
I still think that they can be performed in three separate steps (crop
first, then rescale, and finally pad) without that any step knows
anything about the others.
This would simplify the image rescaler a lot, and would help the
swscaler integration.

So, my question is: if I provide a patch that "separates" such three
steps, would it be accepted? (I think this will also simplify the
ffmpeg.c code).

To better explain what I mean, I attach a patch showing how I think that
this "separation" can be performed. It seems to work ok for me (but I
only lightly tested it), and diffstat says
1 files changed, 67 insertions(+), 85 deletions(-)
Also note that if something like this is accepted then
libavcodec/imgresample.c could be simplified (removing all the cropping
and padding code from the rescaling functions).

The patch is not ready for inclusion (it probably contains some cosmetic
changes and some tabs), but I send it so that people can comment on it,
saying if this is the way to go or if it will never be accepted.

I see that there is another crop patch (by Baptiste COUDURIER) arond; if
needed, I can rebase my patch on it.

Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 Per i progetti che rimandi da tempo, Findomestic ti offre la soluzione ideale per te, con semplicit? e senza anticipi! Clicca e scopri come
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3936&d=9-3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffcroppad.diff
Type: text/x-patch
Size: 8737 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060309/76e40b51/attachment.bin>

More information about the ffmpeg-devel mailing list