1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

80 Commits

Author SHA1 Message Date
Justin Ruggles
461ba7e97a apedec: output in planar sample format 2012-10-01 13:42:43 -04:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Christophe Gisquet
706b998cdc ape: Use unsigned integer maths
This involves a division that should be a shift.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-10 16:40:43 +02:00
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>
2012-04-06 22:37:38 +03:00
Michael Niedermayer
420d1df2e2 apedec: check bits <= 32.
Fixes a floating-point exception further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-03-31 14:01:12 -04:00
Martin Storsjö
9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Justin Ruggles
37390d5cca apedec: allow the user to set the maximum number of output samples per call
It makes sense in some cases to split up the output packet to save on memory
usage (ape frames can be very large), but the current/default size is
arbitrary. Allowing the user to configure this gives more flexibility and
requires minimal additional code.
2012-02-07 10:01:15 -05:00
Justin Ruggles
39575eead2 apedec: do not unnecessarily zero output samples for mono frames 2012-02-07 10:01:15 -05:00
Justin Ruggles
1d3c672d27 apedec: allocate a single flat buffer for decoded samples
This will allow the decoder to return samples for the full packet, and it also
makes the decoded buffer pointers aligned.
2012-02-07 10:01:14 -05:00
Justin Ruggles
32c61400c0 apedec: use sizeof(field) instead of sizeof(type) 2012-02-07 10:01:14 -05:00
Paul B Mahol
b60620bf7e apedec: 8bit and 24bit support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-04 14:03:20 -05:00
Justin Ruggles
22c0babbb2 apedec: remove unneeded #include of get_bits.h and associated macro 2012-02-02 21:07:01 -05:00
Justin Ruggles
e4169612a1 apedec: av_fast_malloc() instead of av_realloc()
av_realloc() does not guarantee alignment, which is required for
DSPContext.bswap_buf().
2012-02-02 21:07:01 -05:00
Justin Ruggles
0759c8eb10 apedec: fix handling of packet sizes that are not a multiple of 4 bytes 2012-02-02 21:07:01 -05:00
Diego Biurrun
aaf47bcde7 Drop ALT_ prefix from BITSTREAM_READER_LE name.
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
2011-12-22 16:51:23 +01:00
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.
2011-12-02 17:40:40 -05:00
Mans Rullgard
644bff6c9b apedec: fix signed integer overflows
This bit manipulation is equivalent but avoids undefined
shifts and overflows.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
Justin Ruggles
c298b2b8db apedec: consume the whole packet when copying to the decoder buffer.
This avoids artifically consuming a partial packet but ignoring remaining data
in subsequent calls.
2011-11-10 10:25:47 -05:00
Justin Ruggles
de157f2118 apedec: do not needlessly copy s->samples to nblocks.
also move nblocks to the local scope where it is used.
2011-11-10 10:25:47 -05:00
Justin Ruggles
4315c7d35a apedec: check output buffer size after calculating actual output size 2011-11-10 10:25:47 -05:00
Justin Ruggles
ad17207b51 apedec: remove unneeded entropy decoder normalization.
The decoder already skips data at the end of the packet without this.
Also remove 2 APEContext fields that were only used for the end-of-frame
normalization.
2011-11-10 10:25:47 -05:00
Justin Ruggles
9a33264478 apedec: assert that s->samples is not negative before trying to decode 2011-10-28 11:47:29 -04:00
Justin Ruggles
0927154d37 apedec: use FFALIGN macro for internal data buffer size 2011-10-28 11:47:28 -04:00
Justin Ruggles
5b8009f4c8 apedec: do not keep incrementing the input data pointer past the end of the
buffer during entropy decoding.

The pointer address could overflow, which would likely segfault. Instead set
the context error flag to indicate that the decoder tried to read past the
end of the packet data.
2011-10-28 11:47:28 -04:00
Justin Ruggles
a4c32c9a63 apedec: check for input buffer overflow while reading frame header 2011-10-28 11:47:28 -04:00
Justin Ruggles
fd244ae3a0 apedec: use unsigned int for offset
avoids implementation-defined unsigned-to-signed conversion and simplifies
the bounds checking.
2011-10-28 11:47:28 -04:00
Justin Ruggles
89ec474a43 apedec: remove pointless increment of 'buf'
The variable is not used anymore at that point.
2011-10-28 11:47:28 -04:00
Justin Ruggles
52d4fb2a3d apedec: set s->currentframeblocks after validating nblocks 2011-10-28 11:47:28 -04:00
Justin Ruggles
2cab578489 apedec: use unsigned int for 'nblocks' and make sure that it's within int range 2011-10-28 11:47:27 -04:00
Justin Ruggles
b7e5145759 apedec: do not set s->samples until after validation.
This prevents errors and/or invalid writes in the next decode call due to
s->samples still being negative.
2011-10-28 11:47:27 -04:00
Justin Ruggles
11ca8b2d74 apedec: check for data buffer realloc failure 2011-10-28 11:47:27 -04:00
Justin Ruggles
91b71460b5 apedec: return meaningful error values in ape_decode_frame() 2011-10-28 11:47:27 -04:00
Justin Ruggles
c6defb41ef apedec: correct an error message 2011-10-28 11:47:27 -04:00
Justin Ruggles
da55e0980e apedec: cosmetics
break some excessively long lines and remove space after '*'
2011-10-28 11:46:41 -04:00
Justin Ruggles
f64e0a2f37 apedec: return meaningful error codes from ape_decode_init() 2011-10-28 11:41:39 -04:00
Justin Ruggles
7500781313 apedec: check for filter buffer allocation failure 2011-10-28 11:41:39 -04:00
Justin Ruggles
b9d6b02713 apedec: use memcpy for pseudo-stereo mode 2011-10-28 11:41:39 -04:00
Justin Ruggles
3c25209bd9 apedec: remove unneeded check for zero-size packet.
This is already checked by avcodec_decode_audio3().
2011-10-28 11:41:39 -04:00
Anton Khirnov
ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Reinhard Tartler
21a19b7912 doxygen: Prefer member groups over grouping into modules
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.

Additionally, this commit streamlines some spelling and appearances.
2011-07-02 13:52:29 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Anton Khirnov
c2fcd0a7a4 Replace remaining occurrences of deprecated CH_* with AV_CH_*
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 08:26:12 -05:00
Diego Elio Pettenò
d36beb3f69 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Stefano Sabatini
5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Måns Rullgård
df92772c55 apedec: add flush function
Originally committed as revision 23900 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 09:33:59 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Stefano Sabatini
72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00