$OpenBSD: patch-ffmpeg_tools_h,v 1.1 2009/08/17 00:24:38 jolan Exp $
--- ffmpeg_tools.h.orig	Sat Oct 11 10:40:47 2008
+++ ffmpeg_tools.h	Sun Aug 16 18:39:08 2009
@@ -31,17 +31,60 @@
    obligated to do so. If you do not wish to do so, delete this exception
    statement from your version.
 
- */
+*/
 
 #ifndef FFMPEG_TOOLS_H
 #define FFMPEG_TOOLS_H
 
 #include <avcodec.h>
+#include <swscale.h>
 
-int ffmpeg_img_convert(
-        AVPicture *dst, int dst_pix_fmt,
-        AVPicture *src, int src_pix_fmt,
-        int src_width, int src_height);
+// Starting from this version, ImgReSampleContext doesn't exist anymore.
+// This code implements the previous functions with a similar interface
+typedef struct phpImgReSampleContext {
+    /** The context used for resizing */
+    struct SwsContext *context;
+    /** The source's width */
+    int width;
+    /** The source's height */
+    int height;
+    /** The banding used */
+    int bandLeft;
+    /** The banding used */
+    int bandRight;
+    /** The banding used */
+    int bandTop;
+    /** The banding used */
+    int bandBottom;
+    /** The padding used */
+    int padLeft;
+    /** The padding used */
+    int padRight;
+    /** The padding used */
+    int padTop;
+    /** The padding used */
+    int padBottom;
+    /** The output width */
+    int outWidth;
+    /** The output height */
+    int outHeight;
+} phpImgReSampleContext;
+
+int phpimg_convert(AVPicture *dst, int dst_pix_fmt,
+        AVPicture *src, int src_pix_fmt, int src_width, int src_height);
+
+void phpimg_resample_close(phpImgReSampleContext *s);
+
+void phpimg_resample(phpImgReSampleContext * context, AVPicture * out, const AVPicture * in);
+
+phpImgReSampleContext * phpimg_resample_full_init (int owidth, int oheight, 
+        int iwidth, int iheight,
+        int topBand, int 
+        bottomBand, int leftBand, int rightBand,
+        int padtop, int 
+        padbottom, int padleft, int padright);
+
+phpImgReSampleContext * phpimg_resample_init (int owidth, int oheight, int iwidth, int iheight);
 
 #endif // FFMPEG_TOOLS_H
 
