[MPlayer-cvslog] r35801 - in trunk: fmt-conversion.c fmt-conversion.h gui/win32/skinload.c gui/wm/ws.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vf_lavfi.c libmpcodecs/vf_scale.c

diego subversion at mplayerhq.hu
Sun Jan 20 19:18:34 CET 2013


Author: diego
Date: Sun Jan 20 19:18:33 2013
New Revision: 35801

Log:
Replace PixelFormat and PIX_FMT_FOO by their AV_-prefixed counterparts.

Modified:
   trunk/fmt-conversion.c
   trunk/fmt-conversion.h
   trunk/gui/win32/skinload.c
   trunk/gui/wm/ws.c
   trunk/libmpcodecs/vd_ffmpeg.c
   trunk/libmpcodecs/vf_lavfi.c
   trunk/libmpcodecs/vf_scale.c

Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/fmt-conversion.c	Sun Jan 20 19:18:33 2013	(r35801)
@@ -26,130 +26,130 @@
 
 static const struct {
     int fmt;
-    enum PixelFormat pix_fmt;
+    enum AVPixelFormat pix_fmt;
 } conversion_map[] = {
-    {IMGFMT_ARGB,    PIX_FMT_ARGB},
-    {IMGFMT_BGRA,    PIX_FMT_BGRA},
-    {IMGFMT_BGR24,   PIX_FMT_BGR24},
-    {IMGFMT_BGR16BE, PIX_FMT_RGB565BE},
-    {IMGFMT_BGR16LE, PIX_FMT_RGB565LE},
-    {IMGFMT_BGR15BE, PIX_FMT_RGB555BE},
-    {IMGFMT_BGR15LE, PIX_FMT_RGB555LE},
-    {IMGFMT_BGR12BE, PIX_FMT_RGB444BE},
-    {IMGFMT_BGR12LE, PIX_FMT_RGB444LE},
-    {IMGFMT_BGR8,    PIX_FMT_RGB8},
-    {IMGFMT_BGR4,    PIX_FMT_RGB4},
-    {IMGFMT_BGR1,    PIX_FMT_MONOBLACK},
-    {IMGFMT_RGB1,    PIX_FMT_MONOBLACK},
-    {IMGFMT_RG4B,    PIX_FMT_BGR4_BYTE},
-    {IMGFMT_BG4B,    PIX_FMT_RGB4_BYTE},
-    {IMGFMT_RGB48LE, PIX_FMT_RGB48LE},
-    {IMGFMT_RGB48BE, PIX_FMT_RGB48BE},
-    {IMGFMT_ABGR,    PIX_FMT_ABGR},
-    {IMGFMT_RGBA,    PIX_FMT_RGBA},
-    {IMGFMT_RGB24,   PIX_FMT_RGB24},
-    {IMGFMT_RGB16BE, PIX_FMT_BGR565BE},
-    {IMGFMT_RGB16LE, PIX_FMT_BGR565LE},
-    {IMGFMT_RGB15BE, PIX_FMT_BGR555BE},
-    {IMGFMT_RGB15LE, PIX_FMT_BGR555LE},
-    {IMGFMT_RGB12BE, PIX_FMT_BGR444BE},
-    {IMGFMT_RGB12LE, PIX_FMT_BGR444LE},
-    {IMGFMT_RGB8,    PIX_FMT_BGR8},
-    {IMGFMT_RGB4,    PIX_FMT_BGR4},
-    {IMGFMT_BGR8,    PIX_FMT_PAL8},
-// NB: This works only because PIX_FMT_0RGB32 is a CPP Macro.
+    { IMGFMT_ARGB,       AV_PIX_FMT_ARGB },
+    { IMGFMT_BGRA,       AV_PIX_FMT_BGRA },
+    { IMGFMT_BGR24,      AV_PIX_FMT_BGR24 },
+    { IMGFMT_BGR16BE,    AV_PIX_FMT_RGB565BE },
+    { IMGFMT_BGR16LE,    AV_PIX_FMT_RGB565LE },
+    { IMGFMT_BGR15BE,    AV_PIX_FMT_RGB555BE },
+    { IMGFMT_BGR15LE,    AV_PIX_FMT_RGB555LE },
+    { IMGFMT_BGR12BE,    AV_PIX_FMT_RGB444BE },
+    { IMGFMT_BGR12LE,    AV_PIX_FMT_RGB444LE },
+    { IMGFMT_BGR8,       AV_PIX_FMT_RGB8 },
+    { IMGFMT_BGR4,       AV_PIX_FMT_RGB4 },
+    { IMGFMT_BGR1,       AV_PIX_FMT_MONOBLACK },
+    { IMGFMT_RGB1,       AV_PIX_FMT_MONOBLACK },
+    { IMGFMT_RG4B,       AV_PIX_FMT_BGR4_BYTE },
+    { IMGFMT_BG4B,       AV_PIX_FMT_RGB4_BYTE },
+    { IMGFMT_RGB48LE,    AV_PIX_FMT_RGB48LE },
+    { IMGFMT_RGB48BE,    AV_PIX_FMT_RGB48BE },
+    { IMGFMT_ABGR,       AV_PIX_FMT_ABGR },
+    { IMGFMT_RGBA,       AV_PIX_FMT_RGBA },
+    { IMGFMT_RGB24,      AV_PIX_FMT_RGB24 },
+    { IMGFMT_RGB16BE,    AV_PIX_FMT_BGR565BE },
+    { IMGFMT_RGB16LE,    AV_PIX_FMT_BGR565LE },
+    { IMGFMT_RGB15BE,    AV_PIX_FMT_BGR555BE },
+    { IMGFMT_RGB15LE,    AV_PIX_FMT_BGR555LE },
+    { IMGFMT_RGB12BE,    AV_PIX_FMT_BGR444BE },
+    { IMGFMT_RGB12LE,    AV_PIX_FMT_BGR444LE },
+    { IMGFMT_RGB8,       AV_PIX_FMT_BGR8 },
+    { IMGFMT_RGB4,       AV_PIX_FMT_BGR4 },
+    { IMGFMT_BGR8,       AV_PIX_FMT_PAL8 },
+// NB: This works only because AV_PIX_FMT_0RGB32 is a CPP Macro.
 //     note that most other PIX_FMT values are enums
-#ifdef PIX_FMT_0RGB32
-    {IMGFMT_BGR32,   PIX_FMT_0RGB32},
-    {IMGFMT_BGRA,    PIX_FMT_BGR0},
-    {IMGFMT_RGBA,    PIX_FMT_RGB0},
-    {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
-    {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
-    {IMGFMT_422A,    PIX_FMT_YUVA422P},
-    {IMGFMT_444A,    PIX_FMT_YUVA444P},
+#ifdef AV_PIX_FMT_0RGB32
+    { IMGFMT_BGR32,      AV_PIX_FMT_0RGB32 },
+    { IMGFMT_BGRA,       AV_PIX_FMT_BGR0 },
+    { IMGFMT_RGBA,       AV_PIX_FMT_RGB0 },
+    { IMGFMT_RGB64LE,    AV_PIX_FMT_RGBA64LE },
+    { IMGFMT_RGB64BE,    AV_PIX_FMT_RGBA64BE },
+    { IMGFMT_422A,       AV_PIX_FMT_YUVA422P },
+    { IMGFMT_444A,       AV_PIX_FMT_YUVA444P },
 #endif
 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
-    {IMGFMT_GBR24P,  PIX_FMT_GBRP},
-    {IMGFMT_GBR12PLE,  PIX_FMT_GBRP12LE},
-    {IMGFMT_GBR12PBE,  PIX_FMT_GBRP12BE},
-    {IMGFMT_GBR14PLE,  PIX_FMT_GBRP14LE},
-    {IMGFMT_GBR14PBE,  PIX_FMT_GBRP14BE},
-    {IMGFMT_420P14_LE,  PIX_FMT_YUV420P14LE},
-    {IMGFMT_420P14_BE,  PIX_FMT_YUV420P14BE},
-    {IMGFMT_420P12_LE,  PIX_FMT_YUV420P12LE},
-    {IMGFMT_420P12_BE,  PIX_FMT_YUV420P12BE},
-    {IMGFMT_422P14_LE,  PIX_FMT_YUV422P14LE},
-    {IMGFMT_422P14_BE,  PIX_FMT_YUV422P14BE},
-    {IMGFMT_422P12_LE,  PIX_FMT_YUV422P12LE},
-    {IMGFMT_422P12_BE,  PIX_FMT_YUV422P12BE},
-    {IMGFMT_444P14_LE,  PIX_FMT_YUV444P14LE},
-    {IMGFMT_444P14_BE,  PIX_FMT_YUV444P14BE},
-    {IMGFMT_444P12_LE,  PIX_FMT_YUV444P12LE},
-    {IMGFMT_444P12_BE,  PIX_FMT_YUV444P12BE},
-    {IMGFMT_Y8A,        PIX_FMT_GRAY8A},
+    { IMGFMT_GBR24P,     AV_PIX_FMT_GBRP },
+    { IMGFMT_GBR12PLE,   AV_PIX_FMT_GBRP12LE },
+    { IMGFMT_GBR12PBE,   AV_PIX_FMT_GBRP12BE },
+    { IMGFMT_GBR14PLE,   AV_PIX_FMT_GBRP14LE },
+    { IMGFMT_GBR14PBE,   AV_PIX_FMT_GBRP14BE },
+    { IMGFMT_420P14_LE,  AV_PIX_FMT_YUV420P14LE },
+    { IMGFMT_420P14_BE,  AV_PIX_FMT_YUV420P14BE },
+    { IMGFMT_420P12_LE,  AV_PIX_FMT_YUV420P12LE },
+    { IMGFMT_420P12_BE,  AV_PIX_FMT_YUV420P12BE },
+    { IMGFMT_422P14_LE,  AV_PIX_FMT_YUV422P14LE },
+    { IMGFMT_422P14_BE,  AV_PIX_FMT_YUV422P14BE },
+    { IMGFMT_422P12_LE,  AV_PIX_FMT_YUV422P12LE },
+    { IMGFMT_422P12_BE,  AV_PIX_FMT_YUV422P12BE },
+    { IMGFMT_444P14_LE,  AV_PIX_FMT_YUV444P14LE },
+    { IMGFMT_444P14_BE,  AV_PIX_FMT_YUV444P14BE },
+    { IMGFMT_444P12_LE,  AV_PIX_FMT_YUV444P12LE },
+    { IMGFMT_444P12_BE,  AV_PIX_FMT_YUV444P12BE },
+    { IMGFMT_Y8A,        AV_PIX_FMT_GRAY8A },
 #endif
-    {IMGFMT_Y16_LE,  PIX_FMT_GRAY16LE},
-    {IMGFMT_Y16_BE,  PIX_FMT_GRAY16BE},
-    {IMGFMT_YUY2,    PIX_FMT_YUYV422},
-    {IMGFMT_UYVY,    PIX_FMT_UYVY422},
-    {IMGFMT_NV12,    PIX_FMT_NV12},
-    {IMGFMT_NV21,    PIX_FMT_NV21},
-    {IMGFMT_Y800,    PIX_FMT_GRAY8},
-    {IMGFMT_Y8,      PIX_FMT_GRAY8},
-    {IMGFMT_YVU9,    PIX_FMT_YUV410P},
-    {IMGFMT_IF09,    PIX_FMT_YUV410P},
-    {IMGFMT_YV12,    PIX_FMT_YUV420P},
-    {IMGFMT_I420,    PIX_FMT_YUV420P},
-    {IMGFMT_IYUV,    PIX_FMT_YUV420P},
-    {IMGFMT_411P,    PIX_FMT_YUV411P},
-    {IMGFMT_422P,    PIX_FMT_YUV422P},
-    {IMGFMT_444P,    PIX_FMT_YUV444P},
-    {IMGFMT_440P,    PIX_FMT_YUV440P},
+    { IMGFMT_Y16_LE,     AV_PIX_FMT_GRAY16LE },
+    { IMGFMT_Y16_BE,     AV_PIX_FMT_GRAY16BE },
+    { IMGFMT_YUY2,       AV_PIX_FMT_YUYV422 },
+    { IMGFMT_UYVY,       AV_PIX_FMT_UYVY422 },
+    { IMGFMT_NV12,       AV_PIX_FMT_NV12 },
+    { IMGFMT_NV21,       AV_PIX_FMT_NV21 },
+    { IMGFMT_Y800,       AV_PIX_FMT_GRAY8 },
+    { IMGFMT_Y8,         AV_PIX_FMT_GRAY8 },
+    { IMGFMT_YVU9,       AV_PIX_FMT_YUV410P },
+    { IMGFMT_IF09,       AV_PIX_FMT_YUV410P },
+    { IMGFMT_YV12,       AV_PIX_FMT_YUV420P },
+    { IMGFMT_I420,       AV_PIX_FMT_YUV420P },
+    { IMGFMT_IYUV,       AV_PIX_FMT_YUV420P },
+    { IMGFMT_411P,       AV_PIX_FMT_YUV411P },
+    { IMGFMT_422P,       AV_PIX_FMT_YUV422P },
+    { IMGFMT_444P,       AV_PIX_FMT_YUV444P },
+    { IMGFMT_440P,       AV_PIX_FMT_YUV440P },
 
-    {IMGFMT_420A,  PIX_FMT_YUVA420P},
+    { IMGFMT_420A,       AV_PIX_FMT_YUVA420P },
 
-    {IMGFMT_420P16_LE,  PIX_FMT_YUV420P16LE},
-    {IMGFMT_420P16_BE,  PIX_FMT_YUV420P16BE},
-    {IMGFMT_420P10_LE,  PIX_FMT_YUV420P10LE},
-    {IMGFMT_420P10_BE,  PIX_FMT_YUV420P10BE},
-    {IMGFMT_420P9_LE,   PIX_FMT_YUV420P9LE},
-    {IMGFMT_420P9_BE,   PIX_FMT_YUV420P9BE},
-    {IMGFMT_422P16_LE,  PIX_FMT_YUV422P16LE},
-    {IMGFMT_422P16_BE,  PIX_FMT_YUV422P16BE},
-    {IMGFMT_422P10_LE,  PIX_FMT_YUV422P10LE},
-    {IMGFMT_422P10_BE,  PIX_FMT_YUV422P10BE},
-    {IMGFMT_422P9_LE,   PIX_FMT_YUV422P9LE},
-    {IMGFMT_422P9_BE,   PIX_FMT_YUV422P9BE},
-    {IMGFMT_444P16_LE,  PIX_FMT_YUV444P16LE},
-    {IMGFMT_444P16_BE,  PIX_FMT_YUV444P16BE},
-    {IMGFMT_444P10_LE,  PIX_FMT_YUV444P10LE},
-    {IMGFMT_444P10_BE,  PIX_FMT_YUV444P10BE},
-    {IMGFMT_444P9_LE,   PIX_FMT_YUV444P9LE},
-    {IMGFMT_444P9_BE,   PIX_FMT_YUV444P9BE},
+    { IMGFMT_420P16_LE,  AV_PIX_FMT_YUV420P16LE },
+    { IMGFMT_420P16_BE,  AV_PIX_FMT_YUV420P16BE },
+    { IMGFMT_420P10_LE,  AV_PIX_FMT_YUV420P10LE },
+    { IMGFMT_420P10_BE,  AV_PIX_FMT_YUV420P10BE },
+    { IMGFMT_420P9_LE,   AV_PIX_FMT_YUV420P9LE },
+    { IMGFMT_420P9_BE,   AV_PIX_FMT_YUV420P9BE },
+    { IMGFMT_422P16_LE,  AV_PIX_FMT_YUV422P16LE },
+    { IMGFMT_422P16_BE,  AV_PIX_FMT_YUV422P16BE },
+    { IMGFMT_422P10_LE,  AV_PIX_FMT_YUV422P10LE },
+    { IMGFMT_422P10_BE,  AV_PIX_FMT_YUV422P10BE },
+    { IMGFMT_422P9_LE,   AV_PIX_FMT_YUV422P9LE },
+    { IMGFMT_422P9_BE,   AV_PIX_FMT_YUV422P9BE },
+    { IMGFMT_444P16_LE,  AV_PIX_FMT_YUV444P16LE },
+    { IMGFMT_444P16_BE,  AV_PIX_FMT_YUV444P16BE },
+    { IMGFMT_444P10_LE,  AV_PIX_FMT_YUV444P10LE },
+    { IMGFMT_444P10_BE,  AV_PIX_FMT_YUV444P10BE },
+    { IMGFMT_444P9_LE,   AV_PIX_FMT_YUV444P9LE },
+    { IMGFMT_444P9_BE,   AV_PIX_FMT_YUV444P9BE },
 
     // YUVJ are YUV formats that use the full Y range and not just
     // 16 - 235 (see colorspaces.txt).
     // Currently they are all treated the same way.
-    {IMGFMT_YV12,  PIX_FMT_YUVJ420P},
-    {IMGFMT_422P,  PIX_FMT_YUVJ422P},
-    {IMGFMT_444P,  PIX_FMT_YUVJ444P},
-    {IMGFMT_440P,  PIX_FMT_YUVJ440P},
+    { IMGFMT_YV12,       AV_PIX_FMT_YUVJ420P },
+    { IMGFMT_422P,       AV_PIX_FMT_YUVJ422P },
+    { IMGFMT_444P,       AV_PIX_FMT_YUVJ444P },
+    { IMGFMT_440P,       AV_PIX_FMT_YUVJ440P },
 
-    {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC},
-    {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT},
-    {IMGFMT_VDPAU_MPEG1,     PIX_FMT_VDPAU_MPEG1},
-    {IMGFMT_VDPAU_MPEG2,     PIX_FMT_VDPAU_MPEG2},
-    {IMGFMT_VDPAU_H264,      PIX_FMT_VDPAU_H264},
-    {IMGFMT_VDPAU_WMV3,      PIX_FMT_VDPAU_WMV3},
-    {IMGFMT_VDPAU_VC1,       PIX_FMT_VDPAU_VC1},
-    {IMGFMT_VDPAU_MPEG4,     PIX_FMT_VDPAU_MPEG4},
-    {0, PIX_FMT_NONE}
+    { IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC },
+    { IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT },
+    { IMGFMT_VDPAU_MPEG1,     AV_PIX_FMT_VDPAU_MPEG1 },
+    { IMGFMT_VDPAU_MPEG2,     AV_PIX_FMT_VDPAU_MPEG2 },
+    { IMGFMT_VDPAU_H264,      AV_PIX_FMT_VDPAU_H264 },
+    { IMGFMT_VDPAU_WMV3,      AV_PIX_FMT_VDPAU_WMV3 },
+    { IMGFMT_VDPAU_VC1,       AV_PIX_FMT_VDPAU_VC1 },
+    { IMGFMT_VDPAU_MPEG4,     AV_PIX_FMT_VDPAU_MPEG4 },
+    { 0,                      AV_PIX_FMT_NONE }
 };
 
-enum PixelFormat imgfmt2pixfmt(int fmt)
+enum AVPixelFormat imgfmt2pixfmt(int fmt)
 {
     int i;
-    enum PixelFormat pix_fmt;
+    enum AVPixelFormat pix_fmt;
     for (i = 0; conversion_map[i].fmt; i++)
         if (conversion_map[i].fmt == fmt)
             break;
@@ -159,7 +159,7 @@ enum PixelFormat imgfmt2pixfmt(int fmt)
     return pix_fmt;
 }
 
-int pixfmt2imgfmt(enum PixelFormat pix_fmt)
+int pixfmt2imgfmt(enum AVPixelFormat pix_fmt)
 {
     int i;
     int fmt;
@@ -168,7 +168,7 @@ int pixfmt2imgfmt(enum PixelFormat pix_f
             break;
     fmt = conversion_map[i].fmt;
     if (!fmt)
-        mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported PixelFormat %i\n", pix_fmt);
+        mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported AVPixelFormat %i\n", pix_fmt);
     return fmt;
 }
 

Modified: trunk/fmt-conversion.h
==============================================================================
--- trunk/fmt-conversion.h	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/fmt-conversion.h	Sun Jan 20 19:18:33 2013	(r35801)
@@ -23,8 +23,8 @@
 #include "libavutil/avutil.h"
 #include "libavutil/samplefmt.h"
 
-enum PixelFormat imgfmt2pixfmt(int fmt);
-int pixfmt2imgfmt(enum PixelFormat pix_fmt);
+enum AVPixelFormat imgfmt2pixfmt(int fmt);
+int pixfmt2imgfmt(enum AVPixelFormat pix_fmt);
 enum AVSampleFormat affmt2samplefmt(int fmt);
 int samplefmt2affmt(enum AVSampleFormat sample_fmt);
 

Modified: trunk/gui/win32/skinload.c
==============================================================================
--- trunk/gui/win32/skinload.c	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/gui/win32/skinload.c	Sun Jan 20 19:18:33 2013	(r35801)
@@ -149,7 +149,7 @@ static image *pngRead(skin_t *skin, cons
       int src_stride[4] = { 4 * bmp.Width, 0, 0, 0 };
       uint8_t *dst[4] = { NULL, NULL, NULL, NULL };
       int dst_stride[4];
-      enum PixelFormat out_pix_fmt = PIX_FMT_NONE;
+      enum AVPixelFormat out_pix_fmt = PIX_FMT_NONE;
       struct SwsContext *sws;
       if      (skin->desktopbpp == 16) out_pix_fmt = PIX_FMT_RGB555;
       else if (skin->desktopbpp == 24) out_pix_fmt = PIX_FMT_RGB24;

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/gui/wm/ws.c	Sun Jan 20 19:18:33 2013	(r35801)
@@ -92,7 +92,7 @@ static int wsUseXShape = True;
     pixel <<= 5; \
     pixel  |= (r >> 3)
 
-static enum PixelFormat out_pix_fmt = PIX_FMT_NONE;
+static enum AVPixelFormat out_pix_fmt = PIX_FMT_NONE;
 
 /* --- */
 

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sun Jan 20 19:18:33 2013	(r35801)
@@ -58,7 +58,7 @@ LIBVD_EXTERN(ffmpeg)
 typedef struct {
     AVCodecContext *avctx;
     AVFrame *pic;
-    enum PixelFormat pix_fmt;
+    enum AVPixelFormat pix_fmt;
     int do_slices;
     int do_dr1;
     int nonref_dr; ///< allow dr only for non-reference frames
@@ -80,8 +80,8 @@ static void release_buffer(AVCodecContex
 static void draw_slice(struct AVCodecContext *s, const AVFrame *src, int offset[4],
                        int y, int type, int height);
 
-static enum PixelFormat get_format(struct AVCodecContext *avctx,
-                                   const enum PixelFormat *pix_fmt);
+static enum AVPixelFormat get_format(struct AVCodecContext *avctx,
+                                     const enum AVPixelFormat *pix_fmt);
 
 static int lavc_param_workaround_bugs= FF_BUG_AUTODETECT;
 static int lavc_param_error_resilience=2;
@@ -188,7 +188,9 @@ static int control(sh_video_t *sh, int c
     return CONTROL_UNKNOWN;
 }
 
-static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt){
+static void set_format_params(struct AVCodecContext *avctx,
+                              enum AVPixelFormat fmt)
+{
     int imgfmt;
     if (fmt == PIX_FMT_NONE)
         return;
@@ -471,7 +473,8 @@ static void draw_slice(struct AVCodecCon
 }
 
 
-static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){
+static int init_vo(sh_video_t *sh, enum AVPixelFormat pix_fmt)
+{
     vd_ffmpeg_ctx *ctx = sh->context;
     AVCodecContext *avctx = ctx->avctx;
     float aspect= av_q2d(avctx->sample_aspect_ratio) * avctx->width / avctx->height;
@@ -959,9 +962,10 @@ static mp_image_t *decode(sh_video_t *sh
     return mpi;
 }
 
-static enum PixelFormat get_format(struct AVCodecContext *avctx,
-                                    const enum PixelFormat *fmt){
-    enum PixelFormat selected_format;
+static enum AVPixelFormat get_format(struct AVCodecContext *avctx,
+                                     const enum AVPixelFormat *fmt)
+{
+    enum AVPixelFormat selected_format;
     int imgfmt;
     sh_video_t *sh = avctx->opaque;
     int i;

Modified: trunk/libmpcodecs/vf_lavfi.c
==============================================================================
--- trunk/libmpcodecs/vf_lavfi.c	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/libmpcodecs/vf_lavfi.c	Sun Jan 20 19:18:33 2013	(r35801)
@@ -33,12 +33,12 @@ struct vf_priv_s {
     AVFilterContext *out;
     int in_w;
     int in_h;
-    enum PixelFormat in_pixfmt;
+    enum AVPixelFormat in_pixfmt;
     int in_imgfmt;
     AVRational in_sar;
     int out_w;
     int out_h;
-    enum PixelFormat out_pixfmt;
+    enum AVPixelFormat out_pixfmt;
     int out_imgfmt;
     AVRational out_sar;
     struct AVFilterBufferRef *in_buf;
@@ -51,7 +51,7 @@ static void buf_mpi_free(AVFilterBuffer 
     av_free(buf);
 }
 
-static AVFilterBufferRef *mpi_to_bufref(mp_image_t *mpi, enum PixelFormat fmt,
+static AVFilterBufferRef *mpi_to_bufref(mp_image_t *mpi, enum AVPixelFormat fmt,
                                         AVRational sar)
 {
     AVFilterBufferRef *buf;
@@ -94,7 +94,7 @@ static int mpsink_query_formats(AVFilter
     struct mpsink_priv *c = ctx->priv;
     struct vf_instance *vf = c->vf;
     AVFilterFormats *all;
-    enum PixelFormat *sup;
+    enum AVPixelFormat *sup;
     unsigned i, nsup = 0;
     int ifmt;
 
@@ -186,7 +186,7 @@ static int mpsrc_init(AVFilterContext *c
 static int mpsrc_query_formats(AVFilterContext *ctx)
 {
     struct mpsrc_priv *c = ctx->priv;
-    enum PixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, PIX_FMT_NONE };
+    enum AVPixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, PIX_FMT_NONE };
     avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
     return 0;
 }

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Sun Jan 20 19:18:31 2013	(r35800)
+++ trunk/libmpcodecs/vf_scale.c	Sun Jan 20 19:18:33 2013	(r35801)
@@ -213,7 +213,7 @@ static int config(struct vf_instance *vf
     int round_w=0, round_h=0;
     int i;
     SwsFilter *srcFilter, *dstFilter;
-    enum PixelFormat dfmt, sfmt;
+    enum AVPixelFormat dfmt, sfmt;
 
     if(!best){
         mp_msg(MSGT_VFILTER,MSGL_WARN,"SwScale: no supported outfmt found :(\n");
@@ -642,7 +642,7 @@ struct SwsContext *sws_getContextFromCmd
 {
         int flags;
         SwsFilter *dstFilterParam, *srcFilterParam;
-        enum PixelFormat dfmt, sfmt;
+        enum AVPixelFormat dfmt, sfmt;
 
         dfmt = imgfmt2pixfmt(dstFormat);
         sfmt = imgfmt2pixfmt(srcFormat);


More information about the MPlayer-cvslog mailing list