Ronald S. Bultje
f3cd2302a9
wmavoice: remove unused or write-only variables.
8 years ago
Alexandra Hájková
f7ec7f546f
wma: Convert to the new bitstream reader
8 years ago
Andreas Cadhalpun
e8651f51aa
wmavoice: validate block alignment
...
This prevents a division by zero crash in wmavoice_decode_packet.
The problem was introduced by commit
3deb4b54a2
.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Andreas Cadhalpun
91e6a64d2e
wmavoice: truncate spillover_nbits if too large
...
This fixes triggering the av_assert0(ret <= tmp.size).
The problem was reintroduced by commit
7b27dd5c16
and originally fixed by
2a4700a4f0
.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Ronald S. Bultje
33d7f822f8
wmavoice: protect against zero-energy in adaptive gain control.
...
Otherwise the scale factor becomes NaN, resulting in corrupt output.
Fixes #5426 .
8 years ago
Ronald S. Bultje
7b27dd5c16
wmavoice: move overflow handling to common code.
8 years ago
Ronald S. Bultje
b011bb5f8b
wmavoice: reindent.
8 years ago
Ronald S. Bultje
3deb4b54a2
wmavoice: disable bitstream checking.
...
The checked bitstream reader does that already. To allow parsing of
superframes split over a packet boundary, we always decode the last
superframe in each packet at the start of the next packet, even if
theoretically we could have decoded it. The last superframe in the
last packet is decoded using AV_CODEC_CAP_DELAY.
8 years ago
Ronald S. Bultje
992cb15e67
wmavoice: move wmavoice_flush() up.
8 years ago
Diego Biurrun
72eba6558e
wmavoice: Simplify GetBitContext initialization
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Andreas Cadhalpun
2a4700a4f0
wmavoice: limit wmavoice_decode_packet return value to packet size
...
Claiming to have decoded more bytes than the packet size is wrong.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Diego Biurrun
03039f4c8c
miscellaneous typo fixes
11 years ago
Luca Barbato
d14a26edb7
wmavoice: conceal clearly corrupted blocks
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
f5c48f5ada
wmavoice: use init_static_data
12 years ago
Luca Barbato
04e9853a21
wmavoice: return meaningful error codes
12 years ago
Diego Biurrun
a5f8873620
silly typo fixes
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> 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
5a7288822f
wmavoice: decode directly to the user-provided AVFrame
12 years ago
Michael Niedermayer
96a08d8627
wmavoice: silence may be used uninitialized warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3939b790f2
wmavoicedec: use the checked bitstream, reader
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Ronald S. Bultje
d56668bd80
floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
...
This makes the aac decoder and all voice codecs independent of dsputil.
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
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Justin Ruggles
f7b8506573
wmavoice: set channel layout
12 years ago
Diego Biurrun
5bac2d0c30
avutil: Move memcpy_backptr() to mem.c
...
The function is used elsewhere and does not belong with the LZO code.
12 years ago
Diego Biurrun
8f4c414df6
Improve wording and spelling of av_log_missing_feature messages.
12 years ago
Michael Niedermayer
248b1ff26b
Fix various uses of av_log_missing_feature()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
717addecad
Use proper return values in case of missing features
12 years ago
Michael Niedermayer
d5fd610dab
wmavoice: initialize best_hist_ptr to NULL to prevent (incorrect) warning.
...
As a sideeffect this makes the code more robust if a future change leaves
a path where it may be uninitialized otherwise.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
19008e06c6
wmavoice: switch to av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
dafcbfe443
celp_math: Replace duplicate ff_dot_productf() by ff_scalarproduct_c()
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Ronald S. Bultje
262196445c
wmavoice: fix stack overread.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Diego Biurrun
cfac648e6a
doxygen: Remove documentation for non-existing parameters; misc small fixes.
13 years ago
Ronald S. Bultje
8cfbbd928c
get_bits: introduce safe bitreading to prevent overreads.
...
When turned on, H264/CAVLC gets ~15% (CVPCMNL1_SVA_C.264) slower for
ultra-high-bitrate files, or ~2.5% (CVFI1_SVA_C.264) for lower-bitrate
files. Other codecs are affected to a lesser extent because they are
less optimized; e.g., VC-1 slows down by less than 1% (all on x86).
The patch generated 3 extra instructions (cmp, cmovae and mov) per
call to get_bits().
The performance penalty on ARM is within the error margin for most
files, up to 4% in extreme cases such as CVPCMNL1_SVA_C.264.
Based on work (for GCI) by Aneesh Dogra <lionaneesh@gmail.com>, and
inspired by patch in Chromium by Chris Evans <cevans@chromium.org>.
13 years ago
Diego Biurrun
da9cea77e3
Fix a bunch of common typos.
13 years ago
Justin Ruggles
0eea212943
Add avcodec_decode_audio4().
...
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
13 years ago
Alex Converse
f11b0e9543
wmavoice: Make format string match variable type.
13 years ago
Justin Ruggles
813907d424
wmavoice: move output buffer size check to synth_superframe().
...
this allows for checking against the actual output size instead of max size.
13 years ago
Justin Ruggles
d064076570
wmavoice: only set data_size to 0 when necessary
13 years ago
Anton Khirnov
9f51c682ee
lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
...
They are used in lavf.
13 years ago