changeset 322:ce35fd27bbb0 libavcodec

- Versions defined for libav/libavcodec. - Bug fix in wav muxer for MP2 audio. - ffmpeg/libavcodec version in MPEG-4 user data.
author pulento
date Mon, 15 Apr 2002 02:28:05 +0000
parents 2b00e171b1d4
children 68cc7650c645
files avcodec.h h263.c mpegaudiodec.c utils.c
diffstat 4 files changed, 26 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Sun Apr 14 22:17:40 2002 +0000
+++ b/avcodec.h	Mon Apr 15 02:28:05 2002 +0000
@@ -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 @@
 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 h263i_decoder;
 extern AVCodec rv10_decoder;
 extern AVCodec mjpeg_decoder;
+extern AVCodec mp2_decoder;
 extern AVCodec mp3_decoder;
 
 /* pcm codecs */
--- a/h263.c	Sun Apr 14 22:17:40 2002 +0000
+++ b/h263.c	Mon Apr 15 02:28:05 2002 +0000
@@ -873,7 +873,8 @@
 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 @@
     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;
 }
--- a/mpegaudiodec.c	Sun Apr 14 22:17:40 2002 +0000
+++ b/mpegaudiodec.c	Mon Apr 15 02:28:05 2002 +0000
@@ -2393,9 +2393,9 @@
     return buf_ptr - buf;
 }
 
-AVCodec mp3_decoder =
+AVCodec mp2_decoder =
 {
-    "mpegaudio",
+    "mp2",
     CODEC_TYPE_AUDIO,
     CODEC_ID_MP2,
     sizeof(MPADecodeContext),
@@ -2404,3 +2404,15 @@
     NULL,
     decode_frame,
 };
+
+AVCodec mp3_decoder =
+{
+    "mp3",
+    CODEC_TYPE_AUDIO,
+    CODEC_ID_MP3LAME,
+    sizeof(MPADecodeContext),
+    decode_init,
+    NULL,
+    NULL,
+    decode_frame,
+};
--- a/utils.c	Sun Apr 14 22:17:40 2002 +0000
+++ b/utils.c	Mon Apr 15 02:28:05 2002 +0000
@@ -454,6 +454,7 @@
     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);