aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-01 01:17:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-01 01:26:36 +0200
commitfd116b8dfa731122e1b6f8ededf00074940e2848 (patch)
tree04a8e8e78033b0d322262df3809efc7a9823153f
parenteb5a308d0e75120425c926b25b7141e2e8ea49bd (diff)
parent378a00087fdadcc9b34165c05cd10a1a15f3fe61 (diff)
downloadffmpeg-fd116b8dfa731122e1b6f8ededf00074940e2848.tar.gz
Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'
* commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61': mpegvideo: Move tables to a separate file Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/Makefile3
-rw-r--r--libavcodec/flvdec.c1
-rw-r--r--libavcodec/flvenc.c1
-rw-r--r--libavcodec/h261enc.c1
-rw-r--r--libavcodec/intelh263dec.c1
-rw-r--r--libavcodec/ituh263dec.c1
-rw-r--r--libavcodec/ituh263enc.c1
-rw-r--r--libavcodec/mpeg12.c1
-rw-r--r--libavcodec/mpeg12dec.c1
-rw-r--r--libavcodec/mpeg4videodec.c1
-rw-r--r--libavcodec/mpegvideo.c84
-rw-r--r--libavcodec/mpegvideo.h8
-rw-r--r--libavcodec/mpegvideo_enc.c1
-rw-r--r--libavcodec/mpegvideodata.c102
-rw-r--r--libavcodec/mpegvideodata.h33
-rw-r--r--libavcodec/msmpeg4.c1
-rw-r--r--libavcodec/rv10.c1
-rw-r--r--libavcodec/rv20enc.c1
18 files changed, 151 insertions, 92 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 648488df41..bfd6425fd5 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -87,7 +87,8 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
mpegaudiodsp_fixed.o \
mpegaudiodsp_float.o
OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideodsp.o rl.o \
- mpegvideo_motion.o mpegutils.o
+ mpegvideo_motion.o mpegutils.o \
+ mpegvideodata.o
OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o mpeg12data.o \
motion_est.o ratecontrol.o \
mpegvideoencdsp.o
diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c
index 5b2bed5d94..fd1971b2ab 100644
--- a/libavcodec/flvdec.c
+++ b/libavcodec/flvdec.c
@@ -23,6 +23,7 @@
#include "flv.h"
#include "h263.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
int ff_flv_decode_picture_header(MpegEncContext *s)
{
diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c
index 070b528df3..a54f5a81e2 100644
--- a/libavcodec/flvenc.c
+++ b/libavcodec/flvenc.c
@@ -21,6 +21,7 @@
#include "flv.h"
#include "h263.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number)
{
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 1c3f2ecf5a..8ef272dbf0 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -32,6 +32,7 @@
#include "mpegvideo.h"
#include "h263.h"
#include "h261.h"
+#include "mpegvideodata.h"
static uint8_t uni_h261_rl_len [64*64*2*2];
#define UNI_ENC_INDEX(last,run,level) ((last)*128*64 + (run)*128 + (level))
diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c
index 1a0dd59d6a..71e0112cc8 100644
--- a/libavcodec/intelh263dec.c
+++ b/libavcodec/intelh263dec.c
@@ -20,6 +20,7 @@
#include "mpegvideo.h"
#include "h263.h"
+#include "mpegvideodata.h"
/* don't understand why they choose a different header ! */
int ff_intel_h263_decode_picture_header(MpegEncContext *s)
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 8c612c4c68..bc699d34f7 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -42,6 +42,7 @@
#include "unary.h"
#include "flv.h"
#include "mpeg4video.h"
+#include "mpegvideodata.h"
// The defines below define the number of bits that are read at once for
// reading vlc values. Changing these may improve speed and data cache needs
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 8d5fb91812..3ea2d19441 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -32,6 +32,7 @@
#include "libavutil/attributes.h"
#include "avcodec.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "h263.h"
#include "mathops.h"
#include "mpegutils.h"
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 0fedbbdc48..e8a4048222 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -37,6 +37,7 @@
#include "error_resilience.h"
#include "mpeg12.h"
#include "mpeg12data.h"
+#include "mpegvideodata.h"
#include "bytestream.h"
#include "vdpau_internal.h"
#include "thread.h"
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index f321abc6d9..b0e5ae9adc 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -43,6 +43,7 @@
#include "mpeg12data.h"
#include "mpegutils.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "thread.h"
#include "version.h"
#include "vdpau_compat.h"
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 41caac6835..e151f9ee8e 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -28,6 +28,7 @@
#include "internal.h"
#include "mpegutils.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "mpeg4video.h"
#include "h263.h"
#include "thread.h"
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4b3e939a70..d4a84d43e3 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -41,6 +41,7 @@
#include "mathops.h"
#include "mpegutils.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "mjpegenc.h"
#include "msmpeg4.h"
#include "qpeldsp.h"
@@ -48,89 +49,6 @@
#include "wmv2.h"
#include <limits.h>
-static const uint8_t ff_default_chroma_qscale_table[32] = {
-// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
-};
-
-const uint8_t ff_mpeg1_dc_scale_table[128] = {
-// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-};
-
-static const uint8_t mpeg2_dc_scale_table1[128] = {
-// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-};
-
-const uint8_t *const ff_mpeg2_dc_scale_table[4] = {
- ff_mpeg1_dc_scale_table,
- mpeg2_dc_scale_table1,
- mpeg2_dc_scale_table2,
- mpeg2_dc_scale_table3,
-};
-
-const uint8_t ff_alternate_horizontal_scan[64] = {
- 0, 1, 2, 3, 8, 9, 16, 17,
- 10, 11, 4, 5, 6, 7, 15, 14,
- 13, 12, 19, 18, 24, 25, 32, 33,
- 26, 27, 20, 21, 22, 23, 28, 29,
- 30, 31, 34, 35, 40, 41, 48, 49,
- 42, 43, 36, 37, 38, 39, 44, 45,
- 46, 47, 50, 51, 56, 57, 58, 59,
- 52, 53, 54, 55, 60, 61, 62, 63,
-};
-
-const uint8_t ff_alternate_vertical_scan[64] = {
- 0, 8, 16, 24, 1, 9, 2, 10,
- 17, 25, 32, 40, 48, 56, 57, 49,
- 41, 33, 26, 18, 3, 11, 4, 12,
- 19, 27, 34, 42, 50, 58, 35, 43,
- 51, 59, 20, 28, 5, 13, 6, 14,
- 21, 29, 36, 44, 52, 60, 37, 45,
- 53, 61, 22, 30, 7, 15, 23, 31,
- 38, 46, 54, 62, 39, 47, 55, 63,
-};
-
static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s,
int16_t *block, int n, int qscale)
{
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index ec4a3b994f..f76e58e7ac 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -89,10 +89,6 @@ enum OutputFormat {
#define EXT_START_CODE 0x000001b5
#define USER_START_CODE 0x000001b2
-/* encoding scans */
-extern const uint8_t ff_alternate_horizontal_scan[64];
-extern const uint8_t ff_alternate_vertical_scan[64];
-
struct MpegEncContext;
/**
@@ -861,10 +857,6 @@ int ff_epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr,
int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index,
int ref_index, int size, int h, int add_rate);
-/* mpeg12.c */
-extern const uint8_t ff_mpeg1_dc_scale_table[128];
-extern const uint8_t * const ff_mpeg2_dc_scale_table[4];
-
void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
void ff_mpeg1_encode_mb(MpegEncContext *s,
int16_t block[8][64],
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index d608a6e090..d7279c15d3 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -40,6 +40,7 @@
#include "idctdsp.h"
#include "mpeg12.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "h261.h"
#include "h263.h"
#include "mjpegenc_common.h"
diff --git a/libavcodec/mpegvideodata.c b/libavcodec/mpegvideodata.c
new file mode 100644
index 0000000000..5c0c9c52b9
--- /dev/null
+++ b/libavcodec/mpegvideodata.c
@@ -0,0 +1,102 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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 FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+
+const uint8_t ff_default_chroma_qscale_table[32] = {
+// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 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_table3,
+};
+
+const uint8_t ff_alternate_horizontal_scan[64] = {
+ 0, 1, 2, 3, 8, 9, 16, 17,
+ 10, 11, 4, 5, 6, 7, 15, 14,
+ 13, 12, 19, 18, 24, 25, 32, 33,
+ 26, 27, 20, 21, 22, 23, 28, 29,
+ 30, 31, 34, 35, 40, 41, 48, 49,
+ 42, 43, 36, 37, 38, 39, 44, 45,
+ 46, 47, 50, 51, 56, 57, 58, 59,
+ 52, 53, 54, 55, 60, 61, 62, 63,
+};
+
+const uint8_t ff_alternate_vertical_scan[64] = {
+ 0, 8, 16, 24, 1, 9, 2, 10,
+ 17, 25, 32, 40, 48, 56, 57, 49,
+ 41, 33, 26, 18, 3, 11, 4, 12,
+ 19, 27, 34, 42, 50, 58, 35, 43,
+ 51, 59, 20, 28, 5, 13, 6, 14,
+ 21, 29, 36, 44, 52, 60, 37, 45,
+ 53, 61, 22, 30, 7, 15, 23, 31,
+ 38, 46, 54, 62, 39, 47, 55, 63,
+};
diff --git a/libavcodec/mpegvideodata.h b/libavcodec/mpegvideodata.h
new file mode 100644
index 0000000000..ebb9bbf1c5
--- /dev/null
+++ b/libavcodec/mpegvideodata.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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 FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_MPEGVIDEODATA_H
+#define AVCODEC_MPEGVIDEODATA_H
+
+#include <stdint.h>
+
+/* encoding scans */
+extern const uint8_t ff_alternate_horizontal_scan[64];
+extern const uint8_t ff_alternate_vertical_scan[64];
+
+extern const uint8_t ff_mpeg1_dc_scale_table[128];
+extern const uint8_t * const ff_mpeg2_dc_scale_table[4];
+
+extern const uint8_t ff_default_chroma_qscale_table[32];
+
+#endif /* AVCODEC_MPEGVIDEODATA_H */
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 7300af316e..c9a2108912 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -35,6 +35,7 @@
#include "h263.h"
#include "mpeg4video.h"
#include "msmpeg4data.h"
+#include "mpegvideodata.h"
#include "vc1data.h"
#include "libavutil/imgutils.h"
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 707b38e3aa..b009367304 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -36,6 +36,7 @@
#include "mpeg_er.h"
#include "mpegvideo.h"
#include "mpeg4video.h"
+#include "mpegvideodata.h"
#define RV_GET_MAJOR_VER(x) ((x) >> 28)
#define RV_GET_MINOR_VER(x) (((x) >> 20) & 0xFF)
diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c
index 03275c7654..f9926d8090 100644
--- a/libavcodec/rv20enc.c
+++ b/libavcodec/rv20enc.c
@@ -26,6 +26,7 @@
*/
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "h263.h"
#include "put_bits.h"