summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJuanjo <pulento@users.sourceforge.net>2002-04-15 02:28:05 +0000
committerJuanjo <pulento@users.sourceforge.net>2002-04-15 02:28:05 +0000
commit4b1f4f236b1019e69396676f1eb455bbea0d8e17 (patch)
treeaac32420abdbb0e34991150d71f2d86bac11bcae /libavcodec
parent101bea5f2272dfcca084aeeb78ccb1c2e925b12b (diff)
- Versions defined for libav/libavcodec.
- Bug fix in wav muxer for MP2 audio. - ffmpeg/libavcodec version in MPEG-4 user data. Originally committed as revision 400 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h8
-rw-r--r--libavcodec/h263.c6
-rw-r--r--libavcodec/mpegaudiodec.c16
-rw-r--r--libavcodec/utils.c1
4 files changed, 26 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index c5209bdac6..07d6d5889c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3,6 +3,11 @@
#include "common.h"
+#define LIBAVCODEC_VERSION_INT 0x000406
+#define LIBAVCODEC_VERSION "0.4.6"
+#define LIBAVCODEC_BUILD 4600
+#define LIBAVCODEC_BUILD_STR "4600"
+
enum CodecID {
CODEC_ID_NONE,
CODEC_ID_MPEG1VIDEO,
@@ -70,7 +75,7 @@ enum Motion_Est_ID {
extern int motion_estimation_method;
/* ME algos sorted by quality */
-static const int Motion_Est_QTab[] = { -4, -1, -2, 1, 0, -3 };
+static const int Motion_Est_QTab[] = { 1, 4, 3, 6, 5, 2 };
/* encoding support */
/* note not everything is supported yet */
@@ -229,6 +234,7 @@ extern AVCodec mpeg_decoder;
extern AVCodec h263i_decoder;
extern AVCodec rv10_decoder;
extern AVCodec mjpeg_decoder;
+extern AVCodec mp2_decoder;
extern AVCodec mp3_decoder;
/* pcm codecs */
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 429caf3f5a..f415e00661 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -873,7 +873,8 @@ static void put_string(PutBitContext * pbc, char *s)
static void mpeg4_encode_vol_header(MpegEncContext * s)
{
int vo_ver_id=1; //must be 2 if we want GMC or q-pel
-
+ char buf[255];
+
if(get_bit_count(&s->pb)!=0) mpeg4_stuffing(&s->pb);
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x100); /* video obj */
@@ -926,7 +927,8 @@ static void mpeg4_encode_vol_header(MpegEncContext * s)
mpeg4_stuffing(&s->pb);
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x1B2); /* user_data */
- put_string(&s->pb, "ffmpeg"); //FIXME append some version ...
+ sprintf(buf, "FFmpeg v%s / libavcodec build: %s", FFMPEG_VERSION, LIBAVCODEC_BUILD_STR);
+ put_string(&s->pb, buf);
s->no_rounding = 0;
}
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index b423788ca8..f533743bda 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -2393,9 +2393,9 @@ static int decode_frame(AVCodecContext * avctx,
return buf_ptr - buf;
}
-AVCodec mp3_decoder =
+AVCodec mp2_decoder =
{
- "mpegaudio",
+ "mp2",
CODEC_TYPE_AUDIO,
CODEC_ID_MP2,
sizeof(MPADecodeContext),
@@ -2404,3 +2404,15 @@ AVCodec mp3_decoder =
NULL,
decode_frame,
};
+
+AVCodec mp3_decoder =
+{
+ "mp3",
+ CODEC_TYPE_AUDIO,
+ CODEC_ID_MP3LAME,
+ sizeof(MPADecodeContext),
+ decode_init,
+ NULL,
+ NULL,
+ decode_frame,
+};
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index e74926841a..a1df40898f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -454,6 +454,7 @@ void avcodec_register_all(void)
register_avcodec(&h263i_decoder);
register_avcodec(&rv10_decoder);
register_avcodec(&mjpeg_decoder);
+ register_avcodec(&mp2_decoder);
register_avcodec(&mp3_decoder);
#ifdef CONFIG_AC3
register_avcodec(&ac3_decoder);