[FFmpeg-soc] [soc]: r3419 - in eac3: ac3dec.c eac3dec.c ffmpeg.patch
jbr
subversion at mplayerhq.hu
Mon Aug 18 01:10:44 CEST 2008
Author: jbr
Date: Mon Aug 18 01:10:44 2008
New Revision: 3419
Log:
update E-AC-3 decoder to match FFmpeg SVN
Modified:
eac3/ac3dec.c
eac3/eac3dec.c
eac3/ffmpeg.patch
Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c (original)
+++ eac3/ac3dec.c Mon Aug 18 01:10:44 2008
@@ -35,11 +35,7 @@
#include <string.h>
#include "libavutil/crc.h"
-#include "libavutil/random.h"
-#include "avcodec.h"
#include "ac3_parser.h"
-#include "bitstream.h"
-#include "dsputil.h"
#include "ac3dec.h"
#include "ac3dec_data.h"
@@ -200,7 +196,7 @@ static av_cold int ac3_decode_init(AVCod
ff_mdct_init(&s->imdct_512, 9, 1);
ff_kbd_window_init(s->window, 5.0, 256);
dsputil_init(&s->dsp, avctx);
- av_init_random(0, &s->dith_state);
+ av_lfg_init(&s->dith_state, 0);
/* set bias values for float to int16 conversion */
if(s->dsp.float_to_int16_interleave == ff_float_to_int16_interleave_c) {
@@ -464,7 +460,7 @@ static void ac3_get_transform_coeffs_ch(
tbap = bap[i];
switch (tbap) {
case 0:
- coeffs[i] = (av_random(&s->dith_state) & 0x7FFFFF) - 0x400000;
+ coeffs[i] = (av_lfg_get(&s->dith_state) & 0x7FFFFF) - 0x400000;
break;
case 1:
Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c (original)
+++ eac3/eac3dec.c Mon Aug 18 01:10:44 2008
@@ -121,7 +121,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
if (!hebap) {
/* zero-mantissa dithering */
for (blk = 0; blk < 6; blk++) {
- s->pre_mantissa[ch][bin][blk] = (av_random(&s->dith_state) & 0x7FFFFF) - 0x400000;
+ s->pre_mantissa[ch][bin][blk] = (av_lfg_get(&s->dith_state) & 0x7FFFFF) - 0x400000;
}
} else if (hebap < 8) {
/* Vector Quantization */
Modified: eac3/ffmpeg.patch
==============================================================================
--- eac3/ffmpeg.patch (original)
+++ eac3/ffmpeg.patch Mon Aug 18 01:10:44 2008
@@ -1,8 +1,8 @@
Index: libavcodec/ac3dec.h
===================================================================
---- libavcodec/ac3dec.h (revision 14773)
+--- libavcodec/ac3dec.h (revision 14819)
+++ libavcodec/ac3dec.h (working copy)
-@@ -169,4 +169,16 @@
+@@ -168,4 +168,16 @@
///@}
} AC3DecodeContext;
@@ -21,7 +21,7 @@ Index: libavcodec/ac3dec.h
#endif /* FFMPEG_AC3DEC_H */
Index: libavcodec/Makefile
===================================================================
---- libavcodec/Makefile (revision 14773)
+--- libavcodec/Makefile (revision 14819)
+++ libavcodec/Makefile (working copy)
@@ -26,7 +26,7 @@
OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o
@@ -34,7 +34,7 @@ Index: libavcodec/Makefile
OBJS-$(CONFIG_AMV_DECODER) += sp5xdec.o mjpegdec.o mjpeg.o
Index: libavcodec/ac3enc.c
===================================================================
---- libavcodec/ac3enc.c (revision 14773)
+--- libavcodec/ac3enc.c (revision 14819)
+++ libavcodec/ac3enc.c (working copy)
@@ -1365,5 +1365,5 @@
AC3_encode_close,
More information about the FFmpeg-soc
mailing list