summaryrefslogtreecommitdiff
path: root/libswscale/swscale.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-09-26 19:33:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-09-26 19:33:57 +0000
commit635d4aed609c8168904f12ec65000125065d338c (patch)
treea9d698ef1acab6b0888e77d704dfeca6d977c438 /libswscale/swscale.h
parentf4203ff3d91deb05bab7625b193d1d98f7349964 (diff)
Split alloc and init of context so that parameters can be set in the context
instead of requireing being passed through function parameters. This also makes sws work with AVOptions. Originally committed as revision 32368 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.h')
-rw-r--r--libswscale/swscale.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index 4e11c9ad82..fb5b6deaa7 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -144,6 +144,17 @@ int sws_isSupportedInput(enum PixelFormat pix_fmt);
int sws_isSupportedOutput(enum PixelFormat pix_fmt);
/**
+ * Alloctaes an empty SwsContext, this must be filled and passed to sws_init_context().
+ * For filling see AVOptions, options.c and sws_setColorspaceDetails().
+ */
+struct SwsContext *sws_alloc_context(void);
+
+/**
+ * Initializs the swscaler context sws_context.
+ */
+int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
+
+/**
* Frees the swscaler context swsContext.
* If swsContext is NULL, then does nothing.
*/
@@ -161,6 +172,7 @@ void sws_freeContext(struct SwsContext *swsContext);
* @param dstFormat the destination image format
* @param flags specify which algorithm and options to use for rescaling
* @return a pointer to an allocated context, or NULL in case of error
+ * @deprecated use sws_alloc_context() and sws_init_context()
*/
struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, enum PixelFormat dstFormat,