aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale-example.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2009-07-09 02:27:39 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2009-07-09 02:27:39 +0000
commit71ed6c8f0662fad1b4ad30b6f9ba71467c458ae9 (patch)
tree87a4100da7f12bc42a24bf094d6d9fa87b702428 /libswscale/swscale-example.c
parent16c2e21488b0da96b445ea4b098b389ca4ef0943 (diff)
downloadffmpeg-71ed6c8f0662fad1b4ad30b6f9ba71467c458ae9.tar.gz
Remove dependency from swscale_internal.h to lavu/internal.h, it is no longer
needed for DECLARE_ALIGNED. Remove dependency from swscale-example.c to swscale_internal.h by duplicating the necessary code. The duplicated code is a hack and should be removed once a cleaner pixel format information system exists. swscale-example.c is example code on how to use the library and therefore shouldn't rely on internal headers. Originally committed as revision 29415 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale-example.c')
-rw-r--r--libswscale/swscale-example.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c
index c9916e5489..f90e2f3f6f 100644
--- a/libswscale/swscale-example.c
+++ b/libswscale/swscale-example.c
@@ -28,13 +28,17 @@
#include "libavutil/avutil.h"
#include "libavutil/lfg.h"
#include "swscale.h"
-#include "swscale_internal.h"
-#undef fprintf
-#undef free
-#undef malloc
-#undef perror
-#undef printf
+/* HACK Duplicated from swscale_internal.h.
+ * Should be removed when a cleaner pixel format system exists. */
+const char *sws_format_name(enum PixelFormat format);
+#define isALPHA(x) ( \
+ (x)==PIX_FMT_BGR32 \
+ || (x)==PIX_FMT_BGR32_1 \
+ || (x)==PIX_FMT_RGB32 \
+ || (x)==PIX_FMT_RGB32_1 \
+ || (x)==PIX_FMT_YUVA420P \
+ )
static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, int w, int h){
int x,y;