[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec Makefile, 1.205, 1.206 allcodecs.c, 1.111, 1.112 avcodec.h, 1.424, 1.425 mpegaudio.c, 1.23, 1.24 mpegaudio.h, 1.8, 1.9 mpegaudiodec.c, 1.61, 1.62
Roberto Togni CVS
rtognimp
Tue Oct 18 22:16:45 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv4913/libavcodec
Modified Files:
Makefile allcodecs.c avcodec.h mpegaudio.c mpegaudio.h
mpegaudiodec.c
Log Message:
QDM2 compatible decoder
Index: Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -d -r1.205 -r1.206
--- Makefile 14 Oct 2005 18:17:47 -0000 1.205
+++ Makefile 18 Oct 2005 20:16:42 -0000 1.206
@@ -18,7 +18,7 @@
fft.o mdct.o raw.o golomb.o cabac.o\
dpcm.o adx.o faandct.o parser.o g726.o \
vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o dvdsub.o dvbsub.o dvbsubdec.o\
- opt.o truemotion2.o
+ opt.o qdm2.o truemotion2.o
ifeq ($(CONFIG_AASC_DECODER),yes)
OBJS+= aasc.o
Index: allcodecs.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/allcodecs.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- allcodecs.c 13 Oct 2005 04:31:55 -0000 1.111
+++ allcodecs.c 18 Oct 2005 20:16:42 -0000 1.112
@@ -491,6 +491,9 @@
#ifdef CONFIG_LIBGSM
register_avcodec(&libgsm_decoder);
#endif //CONFIG_LIBGSM
+#ifdef CONFIG_QDM2_DECODER
+ register_avcodec(&qdm2_decoder);
+#endif //CONFIG_QDM2_DECODER
#endif /* CONFIG_DECODERS */
#ifdef AMR_NB
Index: avcodec.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.424
retrieving revision 1.425
diff -u -d -r1.424 -r1.425
--- avcodec.h 13 Oct 2005 04:31:55 -0000 1.424
+++ avcodec.h 18 Oct 2005 20:16:42 -0000 1.425
@@ -185,6 +185,7 @@
CODEC_ID_ALAC,
CODEC_ID_WESTWOOD_SND1,
CODEC_ID_GSM,
+ CODEC_ID_QDM2,
CODEC_ID_OGGTHEORA= 0x16000,
@@ -2000,6 +2001,7 @@
extern AVCodec mp3_decoder;
extern AVCodec mp3adu_decoder;
extern AVCodec mp3on4_decoder;
+extern AVCodec qdm2_decoder;
extern AVCodec mace3_decoder;
extern AVCodec mace6_decoder;
extern AVCodec huffyuv_decoder;
Index: mpegaudio.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudio.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mpegaudio.c 10 May 2005 20:39:11 -0000 1.23
+++ mpegaudio.c 18 Oct 2005 20:16:42 -0000 1.24
@@ -28,8 +28,6 @@
/* currently, cannot change these constants (need to modify
quantization stage) */
-#define FRAC_BITS 15
-#define WFRAC_BITS 14
#define MUL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
#define FIX(a) ((int)((a) * (1 << FRAC_BITS)))
Index: mpegaudio.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudio.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- mpegaudio.h 30 Jan 2005 14:04:55 -0000 1.8
+++ mpegaudio.h 18 Oct 2005 20:16:42 -0000 1.9
@@ -22,8 +22,42 @@
#define SAME_HEADER_MASK \
(0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19))
+/* define USE_HIGHPRECISION to have a bit exact (but slower) mpeg
+ audio decoder */
+
+#ifdef USE_HIGHPRECISION
+#define FRAC_BITS 23 /* fractional bits for sb_samples and dct */
+#define WFRAC_BITS 16 /* fractional bits for window */
+#else
+#define FRAC_BITS 15 /* fractional bits for sb_samples and dct */
+#define WFRAC_BITS 14 /* fractional bits for window */
+#endif
+
+#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
+typedef int32_t OUT_INT;
+#define OUT_MAX INT32_MAX
+#define OUT_MIN INT32_MIN
+#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 31)
+#else
+typedef int16_t OUT_INT;
+#define OUT_MAX INT16_MAX
+#define OUT_MIN INT16_MIN
+#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
+#endif
+
+#if FRAC_BITS <= 15
+typedef int16_t MPA_INT;
+#else
+typedef int32_t MPA_INT;
+#endif
+
int l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
int mpa_decode_header(AVCodecContext *avctx, uint32_t head);
+void ff_mpa_synth_init(MPA_INT *window);
+void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset,
+ MPA_INT *window, int *dither_state,
+ OUT_INT *samples, int incr,
+ int32_t sb_samples[SBLIMIT]);
extern const uint16_t mpa_bitrate_tab[2][3][15];
extern const uint16_t mpa_freq_tab[3];
Index: mpegaudiodec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudiodec.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- mpegaudiodec.c 15 Oct 2005 16:29:58 -0000 1.61
+++ mpegaudiodec.c 18 Oct 2005 20:16:42 -0000 1.62
@@ -25,7 +25,6 @@
//#define DEBUG
#include "avcodec.h"
#include "bitstream.h"
-#include "mpegaudio.h"
#include "dsputil.h"
/*
@@ -40,25 +39,7 @@
#define USE_HIGHPRECISION
#endif
-#ifdef USE_HIGHPRECISION
-#define FRAC_BITS 23 /* fractional bits for sb_samples and dct */
-#define WFRAC_BITS 16 /* fractional bits for window */
-#else
-#define FRAC_BITS 15 /* fractional bits for sb_samples and dct */
-#define WFRAC_BITS 14 /* fractional bits for window */
-#endif
-
-#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
-typedef int32_t OUT_INT;
-#define OUT_MAX INT32_MAX
-#define OUT_MIN INT32_MIN
-#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 31)
-#else
-typedef int16_t OUT_INT;
-#define OUT_MAX INT16_MAX
-#define OUT_MIN INT16_MIN
-#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
-#endif
+#include "mpegaudio.h"
#define FRAC_ONE (1 << FRAC_BITS)
@@ -75,12 +56,6 @@
return ((int64_t)(a) * (int64_t)(b))>>32;
}
-#if FRAC_BITS <= 15
-typedef int16_t MPA_INT;
-#else
-typedef int32_t MPA_INT;
-#endif
-
/****************/
#define HEADER_SIZE 4
More information about the ffmpeg-cvslog
mailing list