From bb99b3f6402fcf7055e9f5bdbd18b8c7fe8770a6 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 2 Jan 2010 16:47:26 +0000 Subject: [PATCH 1/7] Disable vidix on 64 bit MinGW compiles, it seems to fail compiling and certainly was never tested. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30167 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index c3477e9f56..23a3f2ad1f 100755 --- a/configure +++ b/configure @@ -4529,6 +4529,7 @@ if test "$_vidix" = auto ; then _vidix=no x86 && (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32) \ && _vidix=yes + x86_64 && win32 && vidix=no (ppc || alpha) && linux && _vidix=yes fi echores "$_vidix" From f4f37e555a0fd2041009cbf431ea9ec58203f5de Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 2 Jan 2010 16:55:41 +0000 Subject: [PATCH 2/7] Fix typo in code disabling VIDIX on mingw64 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30168 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 23a3f2ad1f..a8ed79b24a 100755 --- a/configure +++ b/configure @@ -4529,7 +4529,7 @@ if test "$_vidix" = auto ; then _vidix=no x86 && (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32) \ && _vidix=yes - x86_64 && win32 && vidix=no + x86_64 && win32 && _vidix=no (ppc || alpha) && linux && _vidix=yes fi echores "$_vidix" From 12760fc513cb66f0fd39536c35a5898b6cc19498 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 2 Jan 2010 17:41:11 +0000 Subject: [PATCH 3/7] Several hacks to fix compilation of tvi_dshow on MinGW64. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30169 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/wine/basetsd.h | 4 ++-- loader/wine/winnt.h | 7 ++++--- stream/tvi_dshow.c | 5 +++++ stream/tvi_dshow.h | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/loader/wine/basetsd.h b/loader/wine/basetsd.h index 0cc60c11e3..7a13d58dba 100644 --- a/loader/wine/basetsd.h +++ b/loader/wine/basetsd.h @@ -72,8 +72,8 @@ typedef unsigned __int64 __uint64; #if defined(_WIN64) -typedef __uint32 __ptr32; -typedef void *__ptr64; +//typedef __uint32 __ptr32; +//typedef void *__ptr64; #else /* FIXME: defined(_WIN32) */ diff --git a/loader/wine/winnt.h b/loader/wine/winnt.h index b4c8ee1573..b79b528752 100644 --- a/loader/wine/winnt.h +++ b/loader/wine/winnt.h @@ -620,7 +620,8 @@ typedef struct CONTEXT #endif /* __sparc__ */ #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED) -#error You need to define a CONTEXT for your CPU +#warning You need to define a CONTEXT for your CPU +typedef void CONTEXT; #endif typedef CONTEXT *PCONTEXT; @@ -747,7 +748,7 @@ typedef HANDLE *PHANDLE; #endif /* __sparc__ */ #ifndef DEFINE_REGS_ENTRYPOINT_0 -#error You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU +#warning You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU #endif #ifdef __i386__ @@ -758,7 +759,7 @@ typedef HANDLE *PHANDLE; #endif #if !defined(GET_IP) && !defined(RC_INVOKED) -# error You must define GET_IP for this CPU +#warning You must define GET_IP for this CPU #endif /* diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c index 97fb5f0d5f..46accd81ed 100644 --- a/stream/tvi_dshow.c +++ b/stream/tvi_dshow.c @@ -89,6 +89,11 @@ #include "tvi_dshow.h" +#ifndef STDCALL +// mingw64 needs this +#define STDCALL __stdcall +#endif + static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param); /* diff --git a/stream/tvi_dshow.h b/stream/tvi_dshow.h index dc5a7c3741..3dea9d348a 100644 --- a/stream/tvi_dshow.h +++ b/stream/tvi_dshow.h @@ -434,6 +434,8 @@ DECLARE_INTERFACE(IAMCrossbar) STDMETHOD(get_CrossbarPinInfo) (THIS_ BOOL, long, long *, long *); }; +#ifndef __IPropertyBag_INTERFACE_DEFINED__ +#define __IPropertyBag_INTERFACE_DEFINED__ #undef INTERFACE #define INTERFACE IPropertyBag DECLARE_INTERFACE(IPropertyBag) @@ -444,6 +446,7 @@ DECLARE_INTERFACE(IPropertyBag) STDMETHOD(Read) (THIS_ LPCOLESTR, LPVARIANT, LPERRORLOG); STDMETHOD(Write) (THIS_ LPCOLESTR, LPVARIANT); }; +#endif #undef INTERFACE #define INTERFACE IAMStreamConfig @@ -678,6 +681,19 @@ DECLARE_INTERFACE(IVideoWindow) STDMETHOD(IsCursorHidden) (THIS_ long *); }; +#ifndef DECLARE_ENUMERATOR_ +#define DECLARE_ENUMERATOR_(I,T) \ + DECLARE_INTERFACE_(I,IUnknown) \ + { \ + STDMETHOD(QueryInterface)(I*, REFIID,PVOID*); \ + STDMETHOD_(ULONG,AddRef)(I*); \ + STDMETHOD_(ULONG,Release)(I*); \ + STDMETHOD(Next)(I*, ULONG,T*,ULONG*); \ + STDMETHOD(Skip)(I*, ULONG); \ + STDMETHOD(Reset)(I*); \ + STDMETHOD(Clone)(I*, I**); \ + } +#endif DECLARE_ENUMERATOR_(IEnumFilters, LPBASEFILTER); DECLARE_ENUMERATOR_(IEnumPins, LPPIN); DECLARE_ENUMERATOR_(IEnumMediaTypes, AM_MEDIA_TYPE *); From 13fe3d4986be4e4b3abda207923677adfaa2ca35 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 2 Jan 2010 20:45:27 +0000 Subject: [PATCH 4/7] Mark AC3 as 16-bit format, this simplifies alignment calculation and fixes hwac3 with ALSA reportedly broken by r29750. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30170 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libaf/af_format.h b/libaf/af_format.h index 66a74c901e..e5e5c1cb05 100644 --- a/libaf/af_format.h +++ b/libaf/af_format.h @@ -59,7 +59,7 @@ #define AF_FORMAT_MU_LAW (1<<6) #define AF_FORMAT_A_LAW (2<<6) #define AF_FORMAT_MPEG2 (3<<6) // MPEG(2) audio -#define AF_FORMAT_AC3 (4<<6) // Dolby Digital AC3 +#define AF_FORMAT_AC3 ((4<<6)|AF_FORMAT_16BIT) // Dolby Digital AC3 #define AF_FORMAT_IMA_ADPCM (5<<6) #define AF_FORMAT_SPECIAL_MASK (7<<6) From f192bfea2a434a6f53e149a5673c990725049add Mon Sep 17 00:00:00 2001 From: stefano Date: Sun, 3 Jan 2010 00:09:24 +0000 Subject: [PATCH 5/7] Simplify getSubSampleFactors(), make it use the values provided by av_pix_fmt_descriptors(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30171 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 49 ++------------------------------------------ 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f46e2451fb..9f81a8b3a8 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2280,53 +2280,8 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli static void getSubSampleFactors(int *h, int *v, int format) { - switch(format) { - case PIX_FMT_UYVY422: - case PIX_FMT_YUYV422: - *h=1; - *v=0; - break; - case PIX_FMT_YUV420P: - case PIX_FMT_YUV420P16LE: - case PIX_FMT_YUV420P16BE: - case PIX_FMT_YUVA420P: - case PIX_FMT_GRAY16BE: - case PIX_FMT_GRAY16LE: - case PIX_FMT_GRAY8: //FIXME remove after different subsamplings are fully implemented - case PIX_FMT_NV12: - case PIX_FMT_NV21: - *h=1; - *v=1; - break; - case PIX_FMT_YUV440P: - *h=0; - *v=1; - break; - case PIX_FMT_YUV410P: - *h=2; - *v=2; - break; - case PIX_FMT_YUV444P: - case PIX_FMT_YUV444P16LE: - case PIX_FMT_YUV444P16BE: - *h=0; - *v=0; - break; - case PIX_FMT_YUV422P: - case PIX_FMT_YUV422P16LE: - case PIX_FMT_YUV422P16BE: - *h=1; - *v=0; - break; - case PIX_FMT_YUV411P: - *h=2; - *v=0; - break; - default: - *h=0; - *v=0; - break; - } + *h = av_pix_fmt_descriptors[format].log2_chroma_w; + *v = av_pix_fmt_descriptors[format].log2_chroma_h; } static uint16_t roundToInt16(int64_t f) From e786fb79c5a57badc6b9f02d54a9a3c0e54e8ff3 Mon Sep 17 00:00:00 2001 From: stefano Date: Sun, 3 Jan 2010 00:22:49 +0000 Subject: [PATCH 6/7] Simplify usePal() macro, make it use av_pix_fmt_descriptors. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30172 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 9f81a8b3a8..12bc60850d 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -188,13 +188,7 @@ const char * swscale_license(void) || isRGB(x) \ || isBGR(x) \ ) -#define usePal(x) ( \ - (x)==PIX_FMT_PAL8 \ - || (x)==PIX_FMT_BGR4_BYTE \ - || (x)==PIX_FMT_RGB4_BYTE \ - || (x)==PIX_FMT_BGR8 \ - || (x)==PIX_FMT_RGB8 \ - ) +#define usePal(x) (av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) #define RGB2YUV_SHIFT 15 #define BY ( (int)(0.114*219/255*(1< Date: Sun, 3 Jan 2010 00:50:15 +0000 Subject: [PATCH 7/7] Also support decoding of 8-bit-per-component dpx files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30173 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/codecs.conf b/etc/codecs.conf index be548cac61..0c082420c3 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -362,7 +362,7 @@ videocodec ffdpx fourcc "dpx " ; "dpx " is an internal MPlayer FOURCC driver ffmpeg dll dpx - out RGB48BE,RGB48LE + out RGB48BE,RGB48LE,RGB24,RGB32,BGR32 videocodec ffgif info "FFmpeg GIF"