aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-11 14:25:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-11 14:25:38 +0200
commit567616c1b34a5fca1ecba82a6ff85939b6a1371e (patch)
treee973b46942bd0a8d91992b144c4133e3332a6b16 /libavcodec
parent38d1a5a27024b90523f9c688677f423ed67e4649 (diff)
parent8a776ad90e00ab2b98e8683ac6182d641a383c3a (diff)
downloadffmpeg-567616c1b34a5fca1ecba82a6ff85939b6a1371e.tar.gz
Merge commit '8a776ad90e00ab2b98e8683ac6182d641a383c3a'
* commit '8a776ad90e00ab2b98e8683ac6182d641a383c3a': h261: Move shared data tables from a header to a proper C file Conflicts: libavcodec/Makefile libavcodec/h261data.c libavcodec/h261dec.c libavcodec/h261enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/Makefile4
-rw-r--r--libavcodec/h261.h10
-rw-r--r--libavcodec/h261data.c4
-rw-r--r--libavcodec/h261data.h43
-rw-r--r--libavcodec/h261dec.c1
-rw-r--r--libavcodec/h261enc.c12
6 files changed, 22 insertions, 52 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index f65e0e9e45..0a8c95d95f 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -213,8 +213,8 @@ OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
OBJS-$(CONFIG_GSM_MS_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
-OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o h261data.o
-OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o h261data.o
+OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261data.o h261.o
+OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261data.o h261.o
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o ituh263dec.o \
mpeg4video.o mpeg4videodec.o flvdec.o\
intelh263dec.o
diff --git a/libavcodec/h261.h b/libavcodec/h261.h
index e673fdba1f..ff549628a3 100644
--- a/libavcodec/h261.h
+++ b/libavcodec/h261.h
@@ -29,6 +29,7 @@
#define AVCODEC_H261_H
#include "mpegvideo.h"
+#include "rl.h"
/**
* H261Context
@@ -50,6 +51,15 @@ typedef struct H261Context {
extern uint8_t ff_h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3];
+extern const uint8_t ff_h261_mba_code[35];
+extern const uint8_t ff_h261_mba_bits[35];
+extern const uint8_t ff_h261_mtype_code[10];
+extern const uint8_t ff_h261_mtype_bits[10];
+extern const int ff_h261_mtype_map[10];
+extern const uint8_t ff_h261_mv_tab[17][2];
+extern const uint8_t ff_h261_cbp_tab[63][2];
+extern RLTable ff_h261_rl_tcoeff;
+
void ff_h261_loop_filter(MpegEncContext *s);
int ff_h261_get_picture_format(int width, int height);
diff --git a/libavcodec/h261data.c b/libavcodec/h261data.c
index 83d775f567..0d1f305418 100644
--- a/libavcodec/h261data.c
+++ b/libavcodec/h261data.c
@@ -25,9 +25,9 @@
*/
#include <stdint.h>
-#include "h261.h"
-#include "h261data.h"
+#include "rl.h"
+#include "h261.h"
// H.261 VLC table for macroblock addressing
const uint8_t ff_h261_mba_code[35] = {
diff --git a/libavcodec/h261data.h b/libavcodec/h261data.h
deleted file mode 100644
index 2ae006d83e..0000000000
--- a/libavcodec/h261data.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
- * copyright (c) 2004 Maarten Daniels
- *
- * 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
- */
-
-/**
- * @file
- * H.261 tables.
- */
-
-#ifndef AVCODEC_H261DATA_H
-#define AVCODEC_H261DATA_H
-
-#include <stdint.h>
-
-#include "h261.h"
-
-extern const uint8_t ff_h261_mba_code[35];
-extern const uint8_t ff_h261_mba_bits[35];
-extern const uint8_t ff_h261_mtype_code[10];
-extern const uint8_t ff_h261_mtype_bits[10];
-extern const int ff_h261_mtype_map[10];
-extern const uint8_t ff_h261_mv_tab[17][2];
-extern const uint8_t ff_h261_cbp_tab[63][2];
-extern RLTable ff_h261_rl_tcoeff;
-
-#endif /* AVCODEC_H261DATA_H */
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 9646967d49..3341522bc1 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -30,7 +30,6 @@
#include "mpegvideo.h"
#include "h263.h"
#include "h261.h"
-#include "h261data.h"
#define H261_MBA_VLC_BITS 9
#define H261_MTYPE_VLC_BITS 6
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index bfdb3e68b6..23b8964dcc 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -30,7 +30,6 @@
#include "mpegvideo.h"
#include "h263.h"
#include "h261.h"
-#include "h261data.h"
int ff_h261_get_picture_format(int width, int height)
{
@@ -254,7 +253,8 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
}
/* MB is not skipped, encode MBA */
- put_bits(&s->pb, ff_h261_mba_bits[(h->current_mba - h->previous_mba) - 1],
+ put_bits(&s->pb,
+ ff_h261_mba_bits[(h->current_mba - h->previous_mba) - 1],
ff_h261_mba_code[(h->current_mba - h->previous_mba) - 1]);
/* calculate MTYPE */
@@ -273,7 +273,9 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
if (s->dquant)
h->mtype++;
- put_bits(&s->pb, ff_h261_mtype_bits[h->mtype], ff_h261_mtype_code[h->mtype]);
+ put_bits(&s->pb,
+ ff_h261_mtype_bits[h->mtype],
+ ff_h261_mtype_code[h->mtype]);
h->mtype = ff_h261_mtype_map[h->mtype];
@@ -295,7 +297,9 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
if (HAS_CBP(h->mtype)) {
av_assert1(cbp > 0);
- put_bits(&s->pb, ff_h261_cbp_tab[cbp - 1][1], ff_h261_cbp_tab[cbp - 1][0]);
+ put_bits(&s->pb,
+ ff_h261_cbp_tab[cbp - 1][1],
+ ff_h261_cbp_tab[cbp - 1][0]);
}
for (i = 0; i < 6; i++)
/* encode each block */