aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-03-18 17:22:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-18 17:22:23 +0000
commita05c8d7177857c8a78144cbccc512c282065195a (patch)
treeec0abaadaa0b145b37324eac5c79a9d9fb35b954
parentc5a9ab69c26c6c3c567195c748671677d36a908f (diff)
downloadffmpeg-a05c8d7177857c8a78144cbccc512c282065195a.tar.gz
merging a small amount of the changes from BroadQ, the rest is either not clean / doesnt apply / or is PS2 specific (someone with a PS2 should merge/send a patch for the later)
Originally committed as revision 1690 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegaudiodec.c6
-rw-r--r--libavformat/avienc.c49
-rw-r--r--libavformat/utils.c6
3 files changed, 55 insertions, 6 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index a93c280abc..1d1074aa7d 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -86,9 +86,9 @@ typedef struct MPADecodeContext {
int mode;
int mode_ext;
int lsf;
- MPA_INT synth_buf[MPA_MAX_CHANNELS][512 * 2];
+ MPA_INT synth_buf[MPA_MAX_CHANNELS][512 * 2] __attribute__((aligned(16)));
int synth_buf_offset[MPA_MAX_CHANNELS];
- int32_t sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT];
+ int32_t sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT] __attribute__((aligned(16)));
int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */
#ifdef DEBUG
int frame_count;
@@ -170,7 +170,7 @@ static uint32_t scale_factor_mult3[4] = {
FIXR(1.68179283050742908605),
};
-static MPA_INT window[512];
+static MPA_INT window[512] __attribute__((aligned(16)));
/* layer 1 unscaling */
/* n = number of bits of the mantissa minus 1 */
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 8617b68373..e38b94af0b 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -59,6 +59,13 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
{ CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
{ CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
+
+ /* added based on MPlayer */
+ { CODEC_ID_H263I, MKTAG('i', '2', '6', '3') },
+ { CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },
+ { CODEC_ID_H263P, MKTAG('h', '2', '6', '3') },
+ { CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
+
{ CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
{ CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X'), .invalid_asf = 1 },
{ CODEC_ID_MPEG4, MKTAG('d', 'i', 'v', 'x'), .invalid_asf = 1 },
@@ -70,12 +77,54 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
{ CODEC_ID_MPEG4, MKTAG('m', '4', 's', '2') },
{ CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */
+
+ /* added based on MPlayer */
+ { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },
+ { CODEC_ID_MPEG4, MKTAG('d', 'i', 'v', '1') },
+ { CODEC_ID_MPEG4, MKTAG('X', 'v', 'i', 'D') },
+ { CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },
+ { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
+ { CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },
+
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3'), .invalid_asf = 1 }, /* default signature when using MSMPEG4 */
{ CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '3'), .invalid_asf = 1 },
{ CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
+
+ /* added based on MPlayer */
+ { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('m', 'p', 'g', '3') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('m', 'p', '4', '3') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '5') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '6') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '4') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('c', 'o', 'l', '1') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('c', 'o', 'l', '0') },
+
{ CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },
+
+ /* added based on MPlayer */
+ { CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },
+ { CODEC_ID_MSMPEG4V2, MKTAG('d', 'i', 'v', '2') },
+ { CODEC_ID_MSMPEG4V2, MKTAG('m', 'p', '4', '2') },
+
{ CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },
+
+ /* added based on MPlayer */
+ { CODEC_ID_MSMPEG4V1, MKTAG('D', 'I', 'V', '4') },
+ { CODEC_ID_MSMPEG4V1, MKTAG('d', 'i', 'v', '4') },
+ { CODEC_ID_MSMPEG4V1, MKTAG('m', 'p', 'g', '4') },
+
{ CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },
+
+ /* added based on MPlayer */
+ { CODEC_ID_WMV1, MKTAG('w', 'm', 'v', '1') },
+
{ CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1c1c406606..46dc4ea21c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -355,7 +355,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
/* if still no format found, error */
if (!fmt) {
err = AVERROR_NOFMT;
- goto fail;
+ goto fail1;
}
/* XXX: suppress this hack for redirectors */
@@ -383,7 +383,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
ic->priv_data = av_mallocz(fmt->priv_data_size);
if (!ic->priv_data) {
err = AVERROR_NOMEM;
- goto fail;
+ goto fail1;
}
} else
ic->priv_data = NULL;
@@ -397,7 +397,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
*ic_ptr = ic;
return 0;
fail1:
- if (!(fmt->flags & AVFMT_NOFILE)) {
+ if (!fmt || !(fmt->flags & AVFMT_NOFILE)) {
url_fclose(&ic->pb);
}
fail: