Also adjust the headers as needed.
---
 libavcodec/dxva2_h264.c       |  1 +
 libavcodec/dxva2_mpeg2.c      |  1 +
 libavcodec/dxva2_vc1.c        |  1 +
 libavcodec/h264.c             |  1 +
 libavcodec/h264.h             |  1 +
 libavcodec/h264_cabac.c       |  1 +
 libavcodec/h264_direct.c      |  1 +
 libavcodec/h264_loopfilter.c  |  1 +
 libavcodec/h264_parser.c      |  1 +
 libavcodec/h264_refs.c        |  1 +
 libavcodec/mpeg12dec.c        |  1 +
 libavcodec/mpegvideo.c        |  1 +
 libavcodec/mpegvideo.h        | 12 ++----------
 libavcodec/mpegvideo_enc.c    |  1 +
 libavcodec/mpegvideo_motion.c |  1 +
 libavcodec/mpegvideo_xvmc.c   |  1 +
 libavcodec/picttype.h         | 35 +++++++++++++++++++++++++++++++++++
 libavcodec/svq1enc.c          |  1 +
 libavcodec/svq3.c             |  1 +
 libavcodec/vaapi_h264.c       |  1 +
 libavcodec/vaapi_mpeg2.c      |  1 +
 libavcodec/vdpau_h264.c       |  1 +
 22 files changed, 57 insertions(+), 10 deletions(-)
 create mode 100644 libavcodec/picttype.h

diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 049f816..8c4eee0 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -23,6 +23,7 @@
 #include "dxva2_internal.h"
 #include "h264.h"
 #include "h264data.h"
+#include "picttype.h"
 
 struct dxva2_picture_context {
     DXVA_PicParams_H264   pp;
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index e0b2efa..2ea61a3 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -22,6 +22,7 @@
 
 #include "libavutil/log.h"
 #include "dxva2_internal.h"
+#include "picttype.h"
 
 #define MAX_SLICES 1024
 struct dxva2_picture_context {
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index a72d91e..3bae6ad 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -21,6 +21,7 @@
  */
 
 #include "dxva2_internal.h"
+#include "picttype.h"
 #include "vc1.h"
 #include "vc1data.h"
 
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5122892..ac74caf 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -42,6 +42,7 @@
 #include "h264_mvpred.h"
 #include "golomb.h"
 #include "mathops.h"
+#include "picttype.h"
 #include "rectangle.h"
 #include "svq3.h"
 #include "thread.h"
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 1432407..917af49 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -38,6 +38,7 @@
 #include "h264dsp.h"
 #include "h264pred.h"
 #include "h264qpel.h"
+#include "picttype.h"
 #include "rectangle.h"
 
 #define H264_MAX_PICTURE_COUNT 32
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 654eab7..f057be2 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -38,6 +38,7 @@
 #include "h264data.h"
 #include "h264_mvpred.h"
 #include "golomb.h"
+#include "picttype.h"
 
 #if ARCH_X86
 #include "x86/h264_i386.h"
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index f62251d..c08150c 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -29,6 +29,7 @@
 #include "avcodec.h"
 #include "mpegvideo.h"
 #include "h264.h"
+#include "picttype.h"
 #include "rectangle.h"
 #include "thread.h"
 
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 88ed34c..556c327 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -32,6 +32,7 @@
 #include "mpegvideo.h"
 #include "h264.h"
 #include "mathops.h"
+#include "picttype.h"
 #include "rectangle.h"
 
 #include <assert.h>
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index a16229a..65c580a 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -30,6 +30,7 @@
 #include "h264data.h"
 #include "golomb.h"
 #include "internal.h"
+#include "picttype.h"
 
 #include <assert.h>
 
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 277bc09..dd565c3 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -29,6 +29,7 @@
 #include "avcodec.h"
 #include "h264.h"
 #include "golomb.h"
+#include "picttype.h"
 
 #include <assert.h>
 
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index cb713fd..3cc76f8 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -37,6 +37,7 @@
 #include "mpeg12.h"
 #include "mpeg12data.h"
 #include "mpegvideo.h"
+#include "picttype.h"
 #include "thread.h"
 #include "version.h"
 #include "xvmc_internal.h"
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 1564ac8..efd3269 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -39,6 +39,7 @@
 #include "mpegvideo.h"
 #include "mjpegenc.h"
 #include "msmpeg4.h"
+#include "picttype.h"
 #include "xvmc_internal.h"
 #include "thread.h"
 #include <limits.h>
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 6c3fc42..d80fd2b 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -85,12 +85,6 @@ enum OutputFormat {
 #define EXT_START_CODE          0x000001b5
 #define USER_START_CODE         0x000001b2
 
-/**
- * Value of Picture.reference when Picture is not a reference picture, but
- * is held for delayed output.
- */
-#define DELAYED_PIC_REF 4
-
 struct MpegEncContext;
 
 /**
@@ -639,11 +633,9 @@ typedef struct MpegEncContext {
     /* MPEG-2-specific - I wished not to have to support this mess. */
     int progressive_sequence;
     int mpeg_f_code[2][2];
+
+    // picture structure defines are loaded from picttype.h
     int picture_structure;
-/* picture type */
-#define PICT_TOP_FIELD     1
-#define PICT_BOTTOM_FIELD  2
-#define PICT_FRAME         3
 
     int intra_dc_precision;
     int frame_pred_frame_dct;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 091bee3..24d94a7 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -52,6 +52,7 @@
 #include "mpeg4video.h"
 #include "internal.h"
 #include "bytestream.h"
+#include "picttype.h"
 #include <limits.h>
 
 static int encode_picture(MpegEncContext *s, int picture_number);
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index 42def5e..ce7bffb 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -30,6 +30,7 @@
 #include "mpegvideo.h"
 #include "mjpegenc.h"
 #include "msmpeg4.h"
+#include "picttype.h"
 #include <limits.h>
 
 static void gmc1_motion(MpegEncContext *s,
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index ec218c2..d69250a 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
@@ -23,6 +23,7 @@
 #include <X11/extensions/XvMC.h>
 
 #include "avcodec.h"
+#include "picttype.h"
 #include "mpegvideo.h"
 
 #undef NDEBUG
diff --git a/libavcodec/picttype.h b/libavcodec/picttype.h
new file mode 100644
index 0000000..ffd6841
--- /dev/null
+++ b/libavcodec/picttype.h
@@ -0,0 +1,35 @@
+/*
+ * Generic picture type
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_PICTTYPE_H
+#define AVCODEC_PICTTYPE_H
+
+/* picture type */
+#define PICT_TOP_FIELD     1
+#define PICT_BOTTOM_FIELD  2
+#define PICT_FRAME         3
+
+/**
+ * Value of Picture.reference when Picture is not a reference picture, but
+ * is held for delayed output.
+ */
+#define DELAYED_PIC_REF 4
+
+#endif /* AVCODEC_PICTTYPE_H */
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 3cd3a4a..8ae0304 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -32,6 +32,7 @@
 #include "mpegvideo.h"
 #include "h263.h"
 #include "internal.h"
+#include "picttype.h"
 #include "svq1.h"
 #include "svq1enc_cb.h"
 
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 09b0317..9021bac 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -51,6 +51,7 @@
 #include "h264_mvpred.h"
 #include "golomb.h"
 #include "hpeldsp.h"
+#include "picttype.h"
 #include "rectangle.h"
 
 #if CONFIG_ZLIB
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 0fcd416..e3bb4fd 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -22,6 +22,7 @@
 
 #include "vaapi_internal.h"
 #include "h264.h"
+#include "picttype.h"
 
 /**
  * @file
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index cf0a4b5..ec0e3d6 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "picttype.h"
 #include "vaapi_internal.h"
 
 /** Reconstruct bitstream f_code */
diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c
index 6374e04..1b48cf1 100644
--- a/libavcodec/vdpau_h264.c
+++ b/libavcodec/vdpau_h264.c
@@ -25,6 +25,7 @@
 
 #include "avcodec.h"
 #include "h264.h"
+#include "picttype.h"
 #include "vdpau.h"
 #include "vdpau_internal.h"
 
-- 
1.8.3.4 (Apple Git-47)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to