aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-19 13:29:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-19 13:29:24 +0200
commitb0554fec0470bf59b0582c80697d28646e37b854 (patch)
tree1f111a02df3a1e29f29ed963fb32ccfa72f2cce1 /libavcodec
parentd50aa006fb3430bedc3872ba10e028a714499625 (diff)
parentc0329748b04e1f175dad8c9c2ebf22a5e2dc5b72 (diff)
downloadffmpeg-b0554fec0470bf59b0582c80697d28646e37b854.tar.gz
Merge commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72'
* commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72': fate: add a dependency helper macro Add support for building shared libraries with MSVC avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab gxf: Add a local copy of the relevant parts of the frame rate table configure: Split out msvc as a separate target OS aviobuf: Remove a senseless ifdef in avio_seek Conflicts: configure libavcodec/dirac.c libavcodec/mpeg12data.h libavcodec/mpeg12enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3tab.h2
-rw-r--r--libavcodec/cavsdec.c4
-rw-r--r--libavcodec/dca.h3
-rw-r--r--libavcodec/dirac.c2
-rw-r--r--libavcodec/mjpeg.h14
-rw-r--r--libavcodec/mpeg12.c8
-rw-r--r--libavcodec/mpeg12data.c2
-rw-r--r--libavcodec/mpeg12data.h2
-rw-r--r--libavcodec/mpeg12enc.c8
-rw-r--r--libavcodec/mpeg4audio.h2
-rw-r--r--libavcodec/mpegaudiodata.h6
-rw-r--r--libavcodec/mpegvideo_parser.c4
12 files changed, 30 insertions, 27 deletions
diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h
index d6e0eed86a..c41a93ecc4 100644
--- a/libavcodec/ac3tab.h
+++ b/libavcodec/ac3tab.h
@@ -33,7 +33,7 @@
extern const uint16_t ff_ac3_frame_size_tab[38][3];
extern const uint8_t ff_ac3_channels_tab[8];
-extern const uint16_t avpriv_ac3_channel_layout_tab[8];
+extern av_export const uint16_t avpriv_ac3_channel_layout_tab[8];
extern const uint8_t ff_ac3_enc_channel_map[8][2][6];
extern const uint8_t ff_ac3_dec_channel_map[8][2][6];
extern const uint16_t ff_ac3_sample_rate_tab[3];
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index a923ef502e..02d0d81460 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -1097,8 +1097,8 @@ static int decode_seq_header(AVSContext *h) {
s->low_delay = get_bits1(&s->gb);
h->mb_width = (s->width + 15) >> 4;
h->mb_height = (s->height + 15) >> 4;
- h->s.avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_code].num;
- h->s.avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_code].den;
+ h->s.avctx->time_base.den = ff_mpeg12_frame_rate_tab[frame_rate_code].num;
+ h->s.avctx->time_base.num = ff_mpeg12_frame_rate_tab[frame_rate_code].den;
h->s.avctx->width = s->width;
h->s.avctx->height = s->height;
if(!h->top_qp)
diff --git a/libavcodec/dca.h b/libavcodec/dca.h
index 4d2a829d00..3da93aa4d4 100644
--- a/libavcodec/dca.h
+++ b/libavcodec/dca.h
@@ -26,6 +26,7 @@
#define AVCODEC_DCA_H
#include <stdint.h>
+#include "libavutil/internal.h"
/** DCA syncwords, also used for bitstream type detection */
#define DCA_MARKER_RAW_BE 0x7FFE8001
@@ -36,6 +37,6 @@
/** DCA-HD specific block starts with this marker. */
#define DCA_HD_MARKER 0x64582025
-extern const uint32_t avpriv_dca_sample_rates[16];
+extern av_export const uint32_t avpriv_dca_sample_rates[16];
#endif /* AVCODEC_DCA_H */
diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c
index 79638acea3..4fcb3a2e07 100644
--- a/libavcodec/dirac.c
+++ b/libavcodec/dirac.c
@@ -164,7 +164,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
/* [DIRAC_STD] preset_frame_rate(video_params, index) */
if (source->frame_rate_index > 0) {
if (source->frame_rate_index <= 8)
- frame_rate = avpriv_frame_rate_tab[source->frame_rate_index]; /* [DIRAC_STD] Table 10.3 values 1-8 */
+ frame_rate = ff_mpeg12_frame_rate_tab[source->frame_rate_index];
else
/* [DIRAC_STD] Table 10.3 values 9-10 */
frame_rate = dirac_frame_rate[source->frame_rate_index-9];
diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h
index d826278216..96e18545a7 100644
--- a/libavcodec/mjpeg.h
+++ b/libavcodec/mjpeg.h
@@ -138,16 +138,16 @@ static inline void put_marker(PutBitContext *p, int code)
case 7: ret= (left + top)>>1; break;\
}
-extern const uint8_t avpriv_mjpeg_bits_dc_luminance[];
-extern const uint8_t avpriv_mjpeg_val_dc[];
+extern av_export const uint8_t avpriv_mjpeg_bits_dc_luminance[];
+extern av_export const uint8_t avpriv_mjpeg_val_dc[];
-extern const uint8_t avpriv_mjpeg_bits_dc_chrominance[];
+extern av_export const uint8_t avpriv_mjpeg_bits_dc_chrominance[];
-extern const uint8_t avpriv_mjpeg_bits_ac_luminance[];
-extern const uint8_t avpriv_mjpeg_val_ac_luminance[];
+extern av_export const uint8_t avpriv_mjpeg_bits_ac_luminance[];
+extern av_export const uint8_t avpriv_mjpeg_val_ac_luminance[];
-extern const uint8_t avpriv_mjpeg_bits_ac_chrominance[];
-extern const uint8_t avpriv_mjpeg_val_ac_chrominance[];
+extern av_export const uint8_t avpriv_mjpeg_bits_ac_chrominance[];
+extern av_export const uint8_t avpriv_mjpeg_val_ac_chrominance[];
void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
const uint8_t *bits_table,
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 953cd5ec94..3d01a2ebc2 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1290,8 +1290,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
//MPEG-1 fps
- avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num;
- avctx->time_base.num = avpriv_frame_rate_tab[s->frame_rate_index].den;
+ avctx->time_base.den = ff_mpeg12_frame_rate_tab[s->frame_rate_index].num;
+ avctx->time_base.num = ff_mpeg12_frame_rate_tab[s->frame_rate_index].den;
//MPEG-1 aspect
avctx->sample_aspect_ratio = av_d2q(1.0/ff_mpeg1_aspect[s->aspect_ratio_info], 255);
avctx->ticks_per_frame=1;
@@ -1299,8 +1299,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
//MPEG-2 fps
av_reduce(&s->avctx->time_base.den,
&s->avctx->time_base.num,
- avpriv_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num*2,
- avpriv_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
+ ff_mpeg12_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num*2,
+ ff_mpeg12_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
1 << 30);
avctx->ticks_per_frame = 2;
//MPEG-2 aspect
diff --git a/libavcodec/mpeg12data.c b/libavcodec/mpeg12data.c
index f4644f3f1d..d26c5da1d4 100644
--- a/libavcodec/mpeg12data.c
+++ b/libavcodec/mpeg12data.c
@@ -305,7 +305,7 @@ const uint8_t ff_mpeg12_mbMotionVectorTable[17][2] = {
{ 0xc, 10 },
};
-const AVRational avpriv_frame_rate_tab[16] = {
+const AVRational ff_mpeg12_frame_rate_tab[16] = {
{ 0, 0},
{24000, 1001},
{ 24, 1},
diff --git a/libavcodec/mpeg12data.h b/libavcodec/mpeg12data.h
index 7eac33baa5..0e289b2cb5 100644
--- a/libavcodec/mpeg12data.h
+++ b/libavcodec/mpeg12data.h
@@ -48,7 +48,7 @@ extern const uint8_t ff_mpeg12_mbPatTable[64][2];
extern const uint8_t ff_mpeg12_mbMotionVectorTable[17][2];
-extern const AVRational avpriv_frame_rate_tab[];
+extern const AVRational ff_mpeg12_frame_rate_tab[];
extern const AVRational ff_mpeg2_frame_rate_tab[];
extern const float ff_mpeg1_aspect[16];
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 42731eb392..c6154170e8 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -117,7 +117,7 @@ static int find_frame_rate_index(MpegEncContext *s){
for (ext.num=1; ext.num <= 4; ext.num++) {
for (ext.den=1; ext.den <= 32; ext.den++) {
- AVRational q = av_mul_q(ext, avpriv_frame_rate_tab[i]);
+ AVRational q = av_mul_q(ext, ff_mpeg12_frame_rate_tab[i]);
if(s->codec_id != AV_CODEC_ID_MPEG2VIDEO && (ext.den!=1 || ext.num!=1))
continue;
@@ -189,7 +189,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
if (s->tc_opt_str) {
- AVRational rate = avpriv_frame_rate_tab[s->frame_rate_index];
+ AVRational rate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
int ret = av_timecode_init_from_string(&s->tc, rate, s->tc_opt_str, s);
if (ret < 0)
return ret;
@@ -222,7 +222,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
if(aspect_ratio==0.0) aspect_ratio= 1.0; //pixel aspect 1:1 (VGA)
if (s->current_picture.f.key_frame) {
- AVRational framerate= avpriv_frame_rate_tab[s->frame_rate_index];
+ AVRational framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
/* mpeg1 header repeated every gop */
put_header(s, SEQ_START_CODE);
@@ -982,7 +982,7 @@ AVCodec ff_mpeg1video_encoder = {
.init = encode_init,
.encode2 = ff_MPV_encode_picture,
.close = ff_MPV_encode_end,
- .supported_framerates = avpriv_frame_rate_tab+1,
+ .supported_framerates = ff_mpeg12_frame_rate_tab + 1,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE },
.capabilities = CODEC_CAP_DELAY,
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
index 64839c6617..0f410455f5 100644
--- a/libavcodec/mpeg4audio.h
+++ b/libavcodec/mpeg4audio.h
@@ -40,7 +40,7 @@ typedef struct MPEG4AudioConfig {
int ps; ///< -1 implicit, 1 presence
} MPEG4AudioConfig;
-extern const int avpriv_mpeg4audio_sample_rates[16];
+extern av_export const int avpriv_mpeg4audio_sample_rates[16];
extern const uint8_t ff_mpeg4audio_channels[8];
/**
diff --git a/libavcodec/mpegaudiodata.h b/libavcodec/mpegaudiodata.h
index c0d595e4c0..29a26588b2 100644
--- a/libavcodec/mpegaudiodata.h
+++ b/libavcodec/mpegaudiodata.h
@@ -29,11 +29,13 @@
#include <stdint.h>
+#include "libavutil/internal.h"
+
#define MODE_EXT_MS_STEREO 2
#define MODE_EXT_I_STEREO 1
-extern const uint16_t avpriv_mpa_bitrate_tab[2][3][15];
-extern const uint16_t avpriv_mpa_freq_tab[3];
+extern av_export const uint16_t avpriv_mpa_bitrate_tab[2][3][15];
+extern av_export const uint16_t avpriv_mpa_freq_tab[3];
extern const int ff_mpa_sblimit_table[5];
extern const int ff_mpa_quant_steps[17];
extern const int ff_mpa_quant_bits[17];
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index a9ed81b33b..c60d3cd1cf 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -65,8 +65,8 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
did_set_size=1;
}
frame_rate_index = buf[3] & 0xf;
- pc->frame_rate.den = avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_index].num;
- pc->frame_rate.num = avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_index].den;
+ pc->frame_rate.den = avctx->time_base.den = ff_mpeg12_frame_rate_tab[frame_rate_index].num;
+ pc->frame_rate.num = avctx->time_base.num = ff_mpeg12_frame_rate_tab[frame_rate_index].den;
avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400;
avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
}