Jakub Stachowski
8501bed08c
Don't restrict reverse decorrelation to both coded channels. It is also used for mono data.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Jakub Stachowski
035a394eac
WMAL: do not output last frame again if nothing was decoded in current packet
...
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Mashiat Sarker Shakkhar
f92f452378
WMAL: do not start decoding if frame does not end in current packet
...
This fixes decoding of frames which span more than two packets. Tested with
recit24.wma.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Jakub Stachowski
93bf1aac6a
wmalossless: Ensure that last frame is not written again if nothing was decoded in current packet.
...
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Jakub Stachowski
56dcfe87ef
Clear residues only in not coded channel. This fixes overwriting coded residues with zeros if first channel is coded and second is not.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
64bd7f8e4d
wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
dac79c2737
wmal: vertical alignment cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Mashiat Sarker Shakkhar
2e13f57993
wmal: Warn about missing bitstream splicing feature and ask for sample.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Mashiat Sarker Shakkhar
9900dd2d9c
wmal: Skip seekable_frame_in_packet.
...
There is no point in storing the value in a variable, since it is not
used anywhere else in the decoder.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Mashiat Sarker Shakkhar
07933b44dd
wmal: Drop unused variable num_possible_block_size.
...
This is probably a leftover from WMA Pro.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Michael Niedermayer
b3a4351582
wmalosslessdec: Fix reading too many bits in decode_channel_residues()
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2a7063de54
wmalosslessdec: fix a get_bits(0) in decode_ac_filter
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a0abefb0af
wmalosslessdec: make mclms arrays big enough for whats written into them.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d442c4462a
wmalosslessdec: Make arrays WMALL_BLOCK_MAX_SIZE big and check samples_per_frame.
...
The samples_per_frame check is ported from wmaprodec.c
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
680097cb6d
WMAL: Do not try to read rawpcm coefficients if bits is invalid
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jakub Stachowski
3b00fd5985
wmalosslessdec: Reset residues to 0 if they were not decoded from bitstream.
...
If channel residues are have not been decoded from bitstream, they should be
initialized to 0 instead of using values from previous subframe.
This causes bursts of noise in silent parts of some files.
This patch fixes bug #1055
Reviewed-by: Benjamin Larsson <benjamin@southpole.se>
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
59edf33f7b
wmalosslessdec: rawpcm_tile fixes to keep get_bits() values within defined range.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d0212bb032
wmalosslessdec: channel residues can be 32 bit thus need _long bitreader.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
28e8c4d59a
WMAL: Remove inaccurate and unnecessary doxy
...
A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Ronald S. Bultje
d360dd902c
wmall: fix seeking.
13 years ago
Ronald S. Bultje
3c9267673e
wmalossless: error out if a subframe is not used by any channel.
...
Prevents infinite loop because min_channel_len never increments.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
d462949974
wmalossless: reset sample pointer for each subframe.
...
Prevents overwrites when some subframes only encode some channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
326f7a68bb
wmalossless: error out on invalid values for order.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Kostya Shishkov
87818103a0
wmall: output packet only if we have decoded some samples
...
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
13 years ago
Ronald S. Bultje
626964a4c4
wmall: fix build with -DDEBUG enabled.
13 years ago
Diego Biurrun
8ca6e523a6
wma: Refactor common code to fix standalone compilation of WMA lossless decoder.
13 years ago
Carl Eugen Hoyos
18794000c6
Remove AV_LOG_DEBUG from av_dlog() calls.
...
AV_LOG_DEBUG is forced by the av_dlog definition.
13 years ago
Mashiat Sarker Shakkhar
9d25f1f619
Windows Media Audio Lossless decoder
...
Decodes 16-bit WMA Lossless encoded files. 24-bit is not supported yet.
Bitstream parser written by Andreas Öman with contributions from
Baptiste Coudurier and Ulion.
Includes a number of bug-fixes from Benjamin Larsson, Michael Niedermayer and
Konstantin Shishkov, shine and polish by Diego Biurrun.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Michael Niedermayer
f4f386dd00
wmalossless: Fix infinite loop.
...
Fixes more of Ticket1000
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
886b40b94a
wmalossless: Switch to new audio API
...
Partially fixes Ticket1000
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b240866c5b
wmalossless: remove tab
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
a520a9946f
Perform inter-channel decorr. only if both channels are coded
13 years ago
Benjamin Larsson
7f215e3e72
Use fixed-length array in revert_mclms()
13 years ago
Mashiat Sarker Shakkhar
d1ea26f640
Do not try to read residue if ave_mean <= 1
...
Otherwise, we end up with with log(0) or log(1). av_ceil_log2 simply
assumes the argument is non-zero and returns wrong result when it is.
(Not that there is a proper way of returning an undefined value.)
13 years ago
Mashiat Sarker Shakkhar
59df25effd
Move some variable declarations to comply with C90
13 years ago
Mashiat Sarker Shakkhar
3ce50bf51d
Cosmetics: fix some whitespace errors
13 years ago
Mashiat Sarker Shakkhar
6345184fc9
Support 24-bit decoding
13 years ago
Michael Niedermayer
dc08e7ea0f
wmall: remove ;;
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
bfbd22f9f0
Cosmetics: Fix some whitespace errors and indentation
13 years ago
Mashiat Sarker Shakkhar
6ca1016b3a
Use correct variable type for 32-bit samples buffer
13 years ago
Michael Niedermayer
1ce8377c78
wmalossless: Fix incompatoble pointer type warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6429269096
wmall: remove ;;
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
2083a10abf
Fix audio output
...
Up until now, the decoder didn't output anything
in the data buffer. This fixes all the issues
related to sample format, removes leftover code
and actually outputs some audio to data buffer.
With this, the only sample we have can be played.
Seeking is still broken though.
13 years ago
Mashiat Sarker Shakkhar
f7166f7d8d
Suppress dumping of residues buffer
13 years ago
Mashiat Sarker Shakkhar
3d84495128
Use quantizer value read from bitstream
...
Currently the code initializes quantizer even
before reading it from bitstream and uses that
to dequantize samples.
13 years ago
Mashiat Sarker Shakkhar
a6da23f146
Cosmetics: Remove two empty lines and realign some code
13 years ago
Mashiat Sarker Shakkhar
8dc8dd9f6f
Reset acfilter_prevvalues buffer in clear_codec_buffers()
13 years ago
Mashiat Sarker Shakkhar
001a74ff53
Fix AC filter buffers and AC filter reversion
13 years ago
Mashiat Sarker Shakkhar
70dd5a603c
Perform dequantization of channel coefficients
13 years ago
Mashiat Sarker Shakkhar
cf6284b273
Perform inverse inter-channel decorrelation and ac-filter
13 years ago