[FFmpeg-devel] [PATCH] lsws: undeprecate sws_getContext()
Stefano Sabatini
stefano.sabatini-lala
Tue Feb 22 18:57:56 CET 2011
Undeprecate sws_getContext(). The function is still used in cmdutils.c
and the replacement is not yet ready (as it requires some changes to
lavc).
---
libswscale/swscale.h | 7 -------
libswscale/utils.c | 2 --
2 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index 3cc3202..a93eda2 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -47,9 +47,6 @@
* Those FF_API_* defines are not part of public API.
* They may change, break or disappear at any time.
*/
-#ifndef FF_API_SWS_GETCONTEXT
-#define FF_API_SWS_GETCONTEXT (LIBSWSCALE_VERSION_MAJOR < 1)
-#endif
/**
* Returns the LIBSWSCALE_VERSION_INT constant.
@@ -172,7 +169,6 @@ int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFi
*/
void sws_freeContext(struct SwsContext *swsContext);
-#if FF_API_SWS_GETCONTEXT
/**
* Allocates and returns a SwsContext. You need it to perform
* scaling/conversion operations using sws_scale().
@@ -185,14 +181,11 @@ 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()
*/
-attribute_deprecated
struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, enum PixelFormat dstFormat,
int flags, SwsFilter *srcFilter,
SwsFilter *dstFilter, const double *param);
-#endif
/**
* Scales the image slice in srcSlice and puts the resulting scaled
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 166e983..e719cb5 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1133,7 +1133,6 @@ fail: //FIXME replace things by appropriate error codes
return -1;
}
-#if FF_API_SWS_GETCONTEXT
SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, enum PixelFormat dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param)
@@ -1166,7 +1165,6 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
return c;
}
-#endif
SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
float lumaSharpen, float chromaSharpen,
--
1.7.2.3
More information about the ffmpeg-devel
mailing list