Maxim Poliakovski
2d52834910
atrac3: Better name for imdct window initialization
...
Patch by Diego Biurrun.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
4fb8de08e1
atrac3: Remove unused gain compensation tables
...
Patch by Diego Biurrun.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
ed796fba76
atrac3: Better name for IMDCT window initialization
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Maxim Poliakovski
be76415047
atrac3: Remove unused gain compensation tables
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Maxim Poliakovski
79cbac8cd4
atrac3: Generalize gain compensation code
...
Move it to the ATRAC common code, to reuse in the upcoming ATRAC3+ decoder.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
5ce04c14dd
Use correct Doxygen syntax
11 years ago
Diego Biurrun
be0b4c70ec
atrac3: Replace a silly counter variable name with plain 'j'
11 years ago
Maxim Poliakovski
d49f3fa579
atrac3: Generalize gain compensation code
...
Move it to the ATRAC common code, so it can be reused
in the umpcoming ATRAC3+ decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
4fa2484067
atrac3/decode_gain_control: cosmetics
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
4978be2bc6
atrac3: rename num_gain_data to num_points
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
dc80e250fc
atrac3: Rename GainInfo to AtracGainInfo
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
7df9e693a3
cosmetics: Fix ATRAC codec name spelling
11 years ago
Luca Barbato
5eaed6d336
atrac3: fix error handling
...
decode_tonal_components returns a proper AVERROR.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
22e76ec635
atrac3: set the getbits context the right buffer_end
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
50cf5a7fb7
atrac3: Error on impossible encoding/channel combinations
...
Joint stereo encoded mono is impossible.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
874c8a17ac
atrac3: fix error handling
...
decode_tonal_components returns a proper AVERROR.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
12 years ago
Xi Wang
eba1ff3130
atrac3: avoid oversized shifting in decode_bytes()
...
When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.
(0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))
Avoid oversized shifting.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Justin Ruggles
9a75ace2b2
atrac3: decode directly to the user-provided AVFrame
12 years ago
Carl Eugen Hoyos
034a125c8c
Support more atrac3-in-mkv samples.
...
The mkv demuxer sometimes finds 12 bytes of realmedia
extradata after the matroska real audio properties.
12 years ago
Michael Niedermayer
c8f25cafd2
atrac3: fix buffer size for get_bits.
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Karcher
dcbb920f15
Fix atrac3 decoder broken in e55d53905f
...
Signed-off-by: Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Karcher
0e3afacd4d
atrac3: use correct loop variable in add_tonal_components()
...
Signed-off-by: Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Reimar Döffinger
8aa29f063c
atrac3: do not use init_static_data to init VLC data.
...
It would be called while registering the codec, which means
it needlessly wastes memory when it is never used.
Instead do the work when first opening the codec.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Peter Ross
9ccc349f77
ensure comment blocks that contain doxygen commands start with double asterix
...
Reveiwed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
13451f5520
atrac3dec: Check coding mode against channels.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
44d854a518
atrac3: return an error if extradata_size is not a specific known size
...
Also fixes 3 compiler warnings about using uninitialized variables.
12 years ago
Justin Ruggles
5d1007f74d
atrac3: initialize static tables in AVCodec.init_static_data()
12 years ago
Justin Ruggles
a1f4cd371a
atrac3: replace a calculation with FFALIGN()
...
This allocates 4 bytes less than the previous code if avctx->block_align is
a multiple of 4, but the extra 4 bytes is not really needed.
12 years ago
Justin Ruggles
78edce3f19
atrac3: separate window initialization from IMDCT initialization
12 years ago
Justin Ruggles
808686fc1e
atrac3: remove unused ATRAC3Context field, sample_rate
12 years ago
Justin Ruggles
c51311b907
atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used
12 years ago
Justin Ruggles
89a6c32bc1
atrac3: use sizeof(variable) instead of sizeof(type)
12 years ago
Justin Ruggles
327747de15
atrac3: simplify MDCT window calculation
12 years ago
Justin Ruggles
a2664c91fb
atrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used
12 years ago
Justin Ruggles
7e76f27081
atrac3: remove unused ATRAC3Context field, bit_rate
12 years ago
Justin Ruggles
7c1f93afe6
atrac3: remove unused ATRAC3Context field, samples_per_channel
12 years ago
Justin Ruggles
cdd0e0de81
atrac3: use AVCodecContext.block_align instead of keeping a private copy
12 years ago
Justin Ruggles
64ebbb8f89
atrac3: move the 'delay' field from ATRAC3Context to where it is used
12 years ago
Justin Ruggles
5ac673b553
atrac3: use AVCodecContext.channels instead of keeping a private copy
12 years ago
Justin Ruggles
56a9d2b44e
atrac3: move the 'version' field from ATRAC3Context to where it is used
12 years ago
Justin Ruggles
aefdb735c3
atrac3: simplify some loop indexing
12 years ago
Justin Ruggles
e55d53905f
atrac3: cosmetics: pretty-printing and renaming
...
also does some minor refactoring.
12 years ago
Justin Ruggles
9af4eaa8ea
atrac3: use float planar sample format
12 years ago
Michael Niedermayer
c5f0b6bf41
atrac3: replace powf(2,...) by exp2f()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago