Justin Ruggles
4e09232070
use dsputil for float to signed 16-bit sample conversion
...
Originally committed as revision 9914 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 20:59:22 +00:00
Justin Ruggles
775369e028
cosmetics: indentation
...
Originally committed as revision 9911 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 20:32:57 +00:00
Justin Ruggles
7b4076a777
consolidate decoding of lfe and coupling channels with decoding of full-bandwidth channels.
...
Originally committed as revision 9910 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 19:19:48 +00:00
Justin Ruggles
5e61de0cc1
there are only 4 rematrixing bands
...
Originally committed as revision 9908 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 15:01:21 +00:00
Justin Ruggles
75b9b0369b
cosmetics: use more appropriate names for iterator variables.
...
Originally committed as revision 9907 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 13:52:56 +00:00
Justin Ruggles
8e2eb3b674
move some variables to a more local scope.
...
Originally committed as revision 9905 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 13:30:37 +00:00
Justin Ruggles
0bff58a59a
make exponent decoding consistent (prepare for merging coupling and lfe code with normal channel code).
...
Originally committed as revision 9904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 13:26:46 +00:00
Justin Ruggles
eaf84d970f
cosmetics: use braces when it makes the code easier to read.
...
Originally committed as revision 9893 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 12:04:41 +00:00
Justin Ruggles
fc59010bbf
change AC3DecodeContext variable to local variable
...
Originally committed as revision 9892 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 11:55:10 +00:00
Justin Ruggles
6d96d626c6
use array instead of bitmask
...
Originally committed as revision 9891 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 11:39:47 +00:00
Justin Ruggles
3357ff338b
use table for converting dynamic range codes to scale factors
...
Originally committed as revision 9889 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 03:27:05 +00:00
Justin Ruggles
5aefe3ebef
use floating-point mantissa dequantization tables
...
Originally committed as revision 9888 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 03:21:17 +00:00
Justin Ruggles
04ac5cada1
cosmetics: indentation
...
Originally committed as revision 9887 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 01:14:14 +00:00
Justin Ruggles
60f07fadd3
dither zero-bit mantissas by default. remove dithering only if it's explicitly turned off.
...
Originally committed as revision 9886 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 01:13:08 +00:00
Justin Ruggles
d63f6fea50
simplify coefficient decoding
...
Originally committed as revision 9884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 00:12:23 +00:00
Justin Ruggles
285bf28c67
merge decoding of coupling channel coefficients and regular channel coefficients
...
Originally committed as revision 9883 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-04 00:04:17 +00:00
Justin Ruggles
d7dc7ad05c
split out coupling coefficient reconstruction into a separate function
...
Originally committed as revision 9882 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-03 23:53:53 +00:00
Justin Ruggles
dfd57c366f
align array used in mdct. fixes segfault.
...
Originally committed as revision 9848 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-01 01:13:58 +00:00
Justin Ruggles
8b60bbbf5b
simplify stereo rematrixing
...
Originally committed as revision 9824 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-29 00:58:32 +00:00
Justin Ruggles
b6acc57f88
change 2 fields from context to local variables
...
Originally committed as revision 9823 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-29 00:35:30 +00:00
Justin Ruggles
8fbb368d2c
BLOCK_SIZE is not used properly, just use numbers instead to avoid confusion
...
Originally committed as revision 9822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-28 20:50:25 +00:00
Justin Ruggles
7bfd22f25a
remove broken downmixing. will add new implementation later.
...
Originally committed as revision 9821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-28 19:33:19 +00:00
Justin Ruggles
4611b64ec1
simplify snr offset and bit allocation
...
Originally committed as revision 9784 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-24 02:08:27 +00:00
Justin Ruggles
e9a3824880
only use sized data types when necessary
...
Originally committed as revision 9783 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-24 01:43:47 +00:00
Justin Ruggles
8f58a4c943
set bit allocation parameters directly instead of copying
...
Originally committed as revision 9782 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-24 01:35:25 +00:00
Justin Ruggles
e2cd6686fa
use enum value instead of numerical value for acmod
...
Originally committed as revision 9781 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-23 22:47:49 +00:00
Justin Ruggles
bc8edb7e53
use consistent data type for exponents. needs to be int8_t to pass to bit allocation.
...
Originally committed as revision 9780 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-23 22:23:37 +00:00
Justin Ruggles
878c40a137
change some bit masks to arrays
...
Originally committed as revision 9779 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-23 22:16:15 +00:00
Justin Ruggles
bec37145da
cosmetics: indentation
...
Originally committed as revision 9774 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-21 17:03:30 +00:00
Justin Ruggles
9fc1ab722e
Use shared AC-3 header parsing. Move some initializations to block parsing function.
...
Originally committed as revision 9773 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-21 16:28:12 +00:00
Justin Ruggles
9ef6039043
don't need to synchronize in the decoder. the parser does that already.
...
Originally committed as revision 9772 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-21 13:56:04 +00:00
Justin Ruggles
de34875c75
get rid of an ugly macro
...
Originally committed as revision 9771 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-21 11:54:19 +00:00
Justin Ruggles
614e9b2424
don't need to define ALT_BITSTREAM_READER
...
Originally committed as revision 9752 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 02:21:14 +00:00
Justin Ruggles
362664215d
update license header. add copyright for myself. correct and complete the statement about liba52.
...
Originally committed as revision 9751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 02:16:20 +00:00
Justin Ruggles
3bb004fcda
revise comment for exponent decoding function
...
Originally committed as revision 9750 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 02:09:58 +00:00
Justin Ruggles
4415076f55
new implementation of exponent decoding
...
Originally committed as revision 9749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 02:04:05 +00:00
Justin Ruggles
d699d38393
cosmetics: indentation
...
Originally committed as revision 9748 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 00:51:19 +00:00
Justin Ruggles
0ce668015f
remove portions of bit allocation which are no longer needed since they are shared with the encoder
...
Originally committed as revision 9747 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 00:50:31 +00:00
Justin Ruggles
0de73a46ff
fix the 256-point MDCT
...
Originally committed as revision 9685 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-15 14:47:39 +00:00
Justin Ruggles
623b79435d
use shared ac3 bit allocation function
...
Originally committed as revision 9684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-15 13:53:42 +00:00
Justin Ruggles
fa67992dea
no need for the decoder to have the license as a prefix
...
Originally committed as revision 9682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-15 01:38:13 +00:00
Justin Ruggles
76d357fd23
remove a debugging function and variable, and remove the commented-out code which uses them.
...
Originally committed as revision 9681 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-15 01:35:46 +00:00
Justin Ruggles
a39532b0d9
ABS -> FFABS
...
Originally committed as revision 9680 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-15 01:32:04 +00:00
Justin Ruggles
cc2a8443eb
move some common values to ac3.h and utilize them
...
Originally committed as revision 9679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-15 01:31:09 +00:00
Justin Ruggles
cb503702ee
use random number generator from libavutil
...
Originally committed as revision 9678 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 23:57:05 +00:00
Justin Ruggles
9d10960194
10l to me. I accidentally removed a word.
...
Originally committed as revision 9677 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 22:17:23 +00:00
Justin Ruggles
0ec2cc35f7
revise license header for simplicity and consistency
...
Originally committed as revision 9676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 18:53:56 +00:00
Justin Ruggles
283614b5fc
make ac3dec.c GPL until violations are fixed
...
Originally committed as revision 9674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:07:56 +00:00
Justin Ruggles
967d397a6c
AC-3 decoder, soc revision 402, Jul 14 13:45:14 2007 UTC by jbr
...
merge ac3_decoder.h into ac3_decoder.c
Originally committed as revision 9673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:06:14 +00:00
Loren Merritt
afb46fc092
AC-3 decoder, soc revision 148, Sep 28 18:38:27 2006 UTC by banan
...
Enable sse imdct, patch by Loren Merrit.
Originally committed as revision 9672 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:05:39 +00:00
Justin Ruggles
de17eee70f
AC-3 decoder, soc revision 109, Sep 22 22:42:54 2006 UTC by banan
...
Cosmetics.
Originally committed as revision 9671 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:05:13 +00:00
Justin Ruggles
1ea76064b4
AC-3 decoder, soc revision 72, Sep 7 04:20:00 2006 UTC by cloud9
...
fix short block imdct.
Originally committed as revision 9670 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:04:40 +00:00
Justin Ruggles
c7cfc48f37
AC-3 decoder, soc revision 71, Sep 4 09:47:12 2006 UTC by cloud9
...
Redundant code cleanup.
Optimized dither generation.
Minor optimization in bit allocation.
Comments.
Originally committed as revision 9669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:04:17 +00:00
Justin Ruggles
860fe8c908
AC-3 decoder, soc revision 70, Aug 31 18:04:23 2006 UTC by banan
...
Cosmetics, white space removal.
Originally committed as revision 9668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:03:47 +00:00
Justin Ruggles
6dc5d71f97
AC-3 decoder, soc revision 69, Aug 31 07:12:56 2006 UTC by cloud9
...
Fix the bugs:
1. The quality of output because of incorrect windowing coefficients.
New code for window generation.
2. Dynrng values were reset where dynrng value is present in the first block,
but not in the subsequent block.
Originally committed as revision 9667 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:03:14 +00:00
Justin Ruggles
d7bcc4adcf
AC-3 decoder, soc revision 58, Aug 19 14:20:45 2006 UTC by cloud9
...
Further optimizations.
Originally committed as revision 9666 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:02:32 +00:00
Justin Ruggles
1d0a6f5209
AC-3 decoder, soc revision 57, Aug 19 12:44:38 2006 UTC by cloud9
...
Optimization as suggested by Benjamin.
Originally committed as revision 9665 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:02:08 +00:00
Justin Ruggles
032732d49d
AC-3 decoder, soc revision 56, Aug 17 14:21:58 2006 UTC by cloud9
...
Acknowledgements.
Originally committed as revision 9664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:01:44 +00:00
Justin Ruggles
e6bca37c81
AC-3 decoder, soc revision 55, Aug 17 12:25:24 2006 UTC by cloud9
...
Remove more unnecessary headers.
Codec initialization changed to use name => argument notation.
Originally committed as revision 9663 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:01:14 +00:00
Justin Ruggles
3ff88ff45a
AC-3 decoder, soc revision 54, Aug 17 09:13:08 2006 UTC by cloud9
...
Remove unnecessary header files.
Originally committed as revision 9662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:00:38 +00:00
Justin Ruggles
262d8702a9
AC-3 decoder, soc revision 53, Aug 17 08:53:44 2006 UTC by cloud9
...
Converted the window from double to float.
Now sound produced is as good as sound produced by liba52.
Originally committed as revision 9661 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 16:00:05 +00:00
Justin Ruggles
67414da7f7
AC-3 decoder, soc revision 52, Aug 16 22:45:07 2006 UTC by cloud9
...
Reset the blksw and dithflag to 0 at the begining of each block.
Otherwise blockswitching propagates over multiple frames even if
block switching is not enabled for that frame.
Also reuse rematflg.
Originally committed as revision 9660 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:59:25 +00:00
Justin Ruggles
45b0ed13a8
AC-3 decoder, soc revision 48, Aug 16 11:27:49 2006 UTC by cloud9
...
I realized that the bug was not in the imdct routine but in the
get_transform_coeffs.
Fixed it.
Code now uses the ffmpeg's imdct routines.
All the mplayer's ac3 samples are decoded
successfully.
Also improved downmixing.
Now all the downmixing coeffcients for channels
are normalized such that the sum of coefficients
used to construct the output for single channel
never exceeds 1.0.
Originally committed as revision 9659 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:58:42 +00:00
Justin Ruggles
2fbbd087bb
AC-3 decoder, soc revision 40, Aug 9 00:10:14 2006 UTC by cloud9
...
More code cleanup.
Window is now runtime generated.
Fixed the bugs in rematrixing routine and
in Decoding AC3 Bitstreams when coupling is in use.
Still struggling to find out what affects the quality of
the produced sound. Can anybody have a look at the
imdct routines do_imdct_256 and do_imdct_512 and tell me
whether it is the correctly implemented as described in
standard.
Originally committed as revision 9658 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:57:51 +00:00
Justin Ruggles
98a27a8a84
AC-3 decoder, soc revision 38, Aug 7 00:03:00 2006 UTC by cloud9
...
major code cleanup.
correct implementation of imdct.
implemented imdct for block switching also.
when coupling is not in use all the
ac3 streams are decoded correctly.
but when coupling is in use there is a bug.
i am currently finding the root of the bug.
if anybody can help.
Originally committed as revision 9657 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:56:55 +00:00
Justin Ruggles
41277578b9
AC-3 decoder, soc revision 34, Jul 18 14:27:54 2006 UTC by cloud9
...
working decoder
imdct for block switching is to be implemented
various other things to do
Originally committed as revision 9656 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:51:00 +00:00
Justin Ruggles
6bd4660cdb
AC-3 decoder, soc revision 33, Jul 17 12:13:40 2006 UTC by cloud9
...
getting weired output
but its working
Originally committed as revision 9655 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:49:12 +00:00
Justin Ruggles
486637af8e
AC-3 decoder, soc revision 32, Jul 17 09:37:32 2006 UTC by cloud9
...
Latest commit.
There is no error in parsing and or recovering transform coefficients.
Double checked with ac3dec.
Getting consistent results with the bit allocation routine and transform
coefficients.
The code is able to parse valid ac3 bitstreams without error from start
to end.
I have also implemented the imdct when block switching is not enabled.
However, can anybody provide an insight into how to convert float samples to
int16_t ? lrint is of no help cuz it produces output -1, 0 or 1 whereas the
output should be between -32768 to 32767.
Originally committed as revision 9654 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:48:28 +00:00
Justin Ruggles
0058584580
AC-3 decoder, soc revision 31, Jul 14 23:53:28 2006 UTC by cloud9
...
Removed _ from names
Removed temporary storage for the exponents
Removed ctx->samples
Now each transform coefficients are stored in audio block as an array of transform coefficients for each channel
added ctx->delay (output of later half of previous block)
added audio_block->block_output(output of this block)
I am still not able to produce the output.
I checked the code twice completely. I am not missing anything in
parsing or in bit allocation. Yet it throws error in getting transform
coefficients sometimes. Can anyone review a code of get_transform_coeffs and
help me debug it further. I think the error is in do_bit_allocation routine cuz
get_transform_coeffs is dependent on the bit allocation parameters table.
I have checked the bit allocation algorithm thoroughly and it is as defined in the
standard. Tried everything and got stuck where to go further.
Please help me.
Originally committed as revision 9653 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:42:15 +00:00
Justin Ruggles
1b29343731
AC-3 decoder, soc revision 26, Jul 5 04:55:15 2006 UTC by cloud9
...
Mersenne Twister
Dynamic Range
Downmixing
IMDCT
Originally committed as revision 9652 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:41:27 +00:00
Justin Ruggles
2aa2c5c4dd
AC-3 decoder, soc revision 9, Jun 14 03:52:02 2006 UTC by cloud9
...
initial commit
NOTE: This and all subsequent ac3dec.c revisions from the soc repository
violate the GPL. This will be fixed after all soc revisions are imported.
This file is not compiled yet, so the license compliance of any builds in
the meantime will not be affected.
Originally committed as revision 9651 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-14 15:38:39 +00:00
Diego Biurrun
b7d3bfa6d3
Remove unused libac3 AC3 decoding interface.
...
Originally committed as revision 7923 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-02-11 12:27:11 +00:00
Diego Biurrun
b78e7197a8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
...
and fix GPL/LGPL version mismatches.
Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Diego Biurrun
5509bffa88
Update licensing information: The FSF changed postal address.
...
Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-01-12 22:43:26 +00:00
Diego Biurrun
bb270c0896
COSMETICS: tabs --> spaces, some prettyprinting
...
Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-22 01:10:11 +00:00
Diego Biurrun
115329f160
COSMETICS: Remove all trailing whitespace.
...
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-17 18:14:38 +00:00
Michael Niedermayer
95ae72b7e0
Compilation fixes part 1 patch by (Arvind R. and Burkhard Plaum, plaum, ipf uni-stuttgart de)
...
Originally committed as revision 4540 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-08-26 19:05:44 +00:00
Michael Niedermayer
53db1cae1c
data_size = 0 cleanup
...
Originally committed as revision 3146 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-05-21 14:37:16 +00:00
Michael Niedermayer
983e3246b7
per file doxy
...
Originally committed as revision 1634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-03-06 11:32:04 +00:00
Zdenek Kabelac
0c1a9edad4
* UINTX -> uintx_t INTX -> intx_t
...
Originally committed as revision 1578 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-02-11 16:35:48 +00:00
Fabrice Bellard
ff4ec49e64
license/copyright change
...
Originally committed as revision 599 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-25 22:45:33 +00:00
Zdenek Kabelac
076b09e9b3
* minor - slightly modified debug message
...
Originally committed as revision 401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-04-15 12:52:21 +00:00
Juanjo
e0d2714adc
- Fixed AC3 decoding for 5:1 AC3 streams. Now when calling av_audio_decode for
...
AC3 set avcodec_context->channels to the desired number channels, if the
setting is 0 AC3 decoder will set it to the channels found in the
stream.
- Changed ffmpeg to cope with the new "way" of AC3 decoding.
- ASF muxer now uses Tickers for PTS calculations.
Originally committed as revision 393 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-04-09 04:52:49 +00:00
Zdenek Kabelac
30b68f33aa
* encoding of AC3 with more than 2 channels
...
by Takashi Iwai <tiwai@suse.de>
Originally committed as revision 383 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-04-08 12:08:03 +00:00
Fabrice Bellard
1a56543279
win32 fixes
...
Originally committed as revision 84 to svn://svn.ffmpeg.org/ffmpeg/trunk
2001-08-13 21:48:05 +00:00
Fabrice Bellard
d771bcae33
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
...
Originally committed as revision 9 to svn://svn.ffmpeg.org/ffmpeg/trunk
2001-07-23 20:58:31 +00:00
Fabrice Bellard
de6d9b6404
Initial revision
...
Originally committed as revision 5 to svn://svn.ffmpeg.org/ffmpeg/trunk
2001-07-22 14:18:56 +00:00