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

75 Commits

Author SHA1 Message Date
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
Alex Converse
5fb2f1347e 10l: dx shouldn't exist.
sorry sorry sorry sorry

Originally committed as revision 25726 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 05:38:57 +00:00
Alex Converse
0611f67525 10l: vorbisdec: declare dy
Originally committed as revision 25725 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 05:34:32 +00:00
Gregory Maxwell
8455e8c7c0 vorbisdec: Fix floor1 decoding
An intermediate value in the floor 1 linear interpolation was
overflowing
resulting in obvious artifacts on some files.

e.g.
http://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv

Prior to this fix 87 out of 128 64kbit/s mono files decoded with ffmpeg
have
lower PEAQ ODG values than the same files decoded with libvorbis. With
this
fix none of that set have significantly worse ODG values than libvorbis.

Fixes issue 2352

Patch by Gregory Maxwell <greg@xiph.org>

Originally committed as revision 25724 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 04:33:26 +00:00
Jason Garrett-Glaser
3dde66752d Fix crashes in vorbis decoding found by zzuf
Fixes issue 2322.

Originally committed as revision 25591 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 16:30:01 +00:00
David Conrad
c740f737e9 vorbisdec: Use int instead of uint16_fast_t for index variables
uint16_fast_t is unsigned int (or long) on Linux, which when compared
with int results in an unsigned compare.

Originally committed as revision 24994 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 22:34:09 +00:00
Alex Converse
51aaf51143 vorbis_dec: Change partition_class[] to uint8_t.
When sizeof(uint_fast8_t) >= sizeof(int) there are unintended size effects.

Originally committed as revision 24716 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 16:10:42 +00:00
Alex Converse
55aa55f2e1 vorbisdec: Return AVERROR(ENOMEM) on malloc() failure.
This is especially important because classifs can be very large.

Originally committed as revision 24676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 00:27:54 +00:00
Alex Converse
366d919016 vorbisdec: Prevent a potential integer overflow.
If sizeof uint_fast8_t > 1 and sizeof size_t <= 4, the expression that mallocs
classifs  is susceptible to integer overflow.

Originally committed as revision 24675 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 00:25:06 +00:00
Måns Rullgård
c934562c12 vorbisdec: change a uint_fast32_t to 'unsigned', fix llvm-gcc build
Originally committed as revision 24669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 20:35:50 +00:00
Reimar Döffinger
961b0c41b9 Fix use of unintialized variable introduced in r20411.
Originally committed as revision 24005 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-02 17:05:36 +00:00
Måns Rullgård
3c35da2f7f vorbisdec: remove variable-length arrays
Originally committed as revision 23960 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 23:36:48 +00:00
David Conrad
a02bb835ac vorbisdec: Take channels into account when checking against residue overflow
Fixes issue1969

Originally committed as revision 23812 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 01:46:23 +00:00
David Conrad
54fdf5d150 vorbisdec: Fix header parsing with no floor1 partitions
Originally committed as revision 23811 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 01:46:20 +00:00
David Conrad
780621b832 vorbisdec: Remove write-only variable
Originally committed as revision 23810 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 01:46:14 +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
Måns Rullgård
1429224b04 Move FFT parts from dsputil.h to fft.h
Originally committed as revision 22235 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 14:34:46 +00:00
Robert Swain
4a27f326c5 Add support for vorbis 6.1 and 7.1 channel configurations as per the new spec
http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9

Originally committed as revision 21527 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-29 13:51:25 +00:00
Michael Niedermayer
b2cc8111d6 More sane error message when extradata has not been set.
Originally committed as revision 20894 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-18 15:50:39 +00:00
Reimar Döffinger
7a41027cc4 vorbis_dec: factor out duplicated code for index reading, bounds checking and
error message into a shared macro.

Originally committed as revision 20411 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-28 22:41:45 +00:00
Robert Swain
f640478b56 Reindent after channel layout commit from yesterday
Originally committed as revision 20156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-03 14:59:40 +00:00
Robert Swain
53a71e1ba4 Add vorbis channel layout support according to those defined in the Vorbis I
specification

Originally committed as revision 20148 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-02 12:59:37 +00:00
Diego Biurrun
a7adcf29cf whitespace cosmetics, prettyprinting, K&R coding style
Originally committed as revision 20080 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-29 11:43:58 +00:00
Diego Biurrun
0b8e7ab059 some more linebreak and brace placement cosmetics
Originally committed as revision 20071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-28 21:46:22 +00:00
Diego Biurrun
5e56b30e1f brace placement and linebreak cosmetics
Originally committed as revision 20070 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-28 21:13:47 +00:00
Reimar Döffinger
c31afa5d24 Fix format string to match the types printed.
Originally committed as revision 20003 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 15:30:38 +00:00
Google Chrome
aedc98b0a4 Check submap indexes.
10_vorbis_submap_indexes.patch by chrome.
I am applying this even though Reimar had some comments to improve it as it fixes
a serious security issue and I do not want to leave such things unfixed.

Originally committed as revision 20001 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 14:19:17 +00:00
Michael Niedermayer
0a01efd0aa Make error return sign consistent.
Originally committed as revision 19997 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 13:18:29 +00:00
Google Chrome
36b7e983a6 Check begin/end/partition_size.
23_vorbis_sane_partition.patch by chrome.
Also this should be better documented but i prefer not to leave potential
security issues open due to missing documentation.

Originally committed as revision 19996 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 13:08:48 +00:00
Google Chrome
cdf1512eba Check res_setup->books.
15_more_residue_book_indexes.patch by chrome.

Originally committed as revision 19992 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 12:24:21 +00:00
Google Chrome
993092dcd3 Check masterbook index and subclass book index.
14_floor_masterbook_index.patch by chrome

Originally committed as revision 19991 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 12:17:54 +00:00
Google Chrome
e5b0cfb541 Add checks for per-packet mode indexes and per-header mode mapping indexes.
12_vorbis_mode_indexes.patch by chrome
maybe exploitable

Originally committed as revision 19990 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 12:09:33 +00:00
Google Chrome
79a4258141 Check classbook value.
11_vorbis_residue_book_index.patch by chrome.

Originally committed as revision 19989 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 12:02:31 +00:00
Google Chrome
96651e790c Fix book_idx check.
25_vorbis_floor0_index.patch by chrome.

Originally committed as revision 19984 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 10:45:14 +00:00
Google Chrome
d70fa8f131 Sanity checks for magnitude and angle.
26_vorbis_mag_angle_index.patch by chrome

Originally committed as revision 19983 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 10:40:33 +00:00
Google Chrome
08c8742cdb = -> == typo.
27_vorbis_residue_loop_error.patch by chrome

Originally committed as revision 19982 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 10:33:49 +00:00
Michael Niedermayer
98f7bcb119 Check dimensions against 0 too.
39_vorbis_zero_dims.patch from chrome

Originally committed as revision 19976 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 08:35:29 +00:00
Michael Niedermayer
9062cd3544 Check validity of channels & samplerate.
This may be security relevant.
Based on 2 patches by chrome.

Originally committed as revision 19975 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 07:46:51 +00:00
Måns Rullgård
01b2214758 Merge FFTContext and MDCTContext
Originally committed as revision 19931 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-20 17:30:20 +00:00
Reimar Döffinger
1de4ba7155 Make sure that values generated for ff_vorbis_len2vlc in
vorbis_parse_setup_hdr_codebooks are in the valid range (<=32).

Originally committed as revision 19373 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-08 19:31:04 +00:00
Siarhei Siamashka
373177949f Use iMDCT output scaling to simplify ffvorbis and make it slightly faster.
Originally committed as revision 18879 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-20 07:26:09 +00:00
Siarhei Siamashka
7dfed8e1dc Fix for a problem with inverted sign of output data from ffvorbis decoder.
Now the sign of audio samples in ffvorbis output is the same as in original
uncompressed audio file and this also allows the use of tiny_psnr to compare
ffvorbis with libvorbis/tremor.

Originally committed as revision 18878 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-20 07:24:38 +00:00
Siarhei Siamashka
7d485f165f Support for getting (i)MDCT output multiplied by a constant scaling factor.
Scaling (i)MDCT output has no runtime overhead and can be used to improve
performance of audio codecs. All the changes are only needed in
'ff_mdct_init' function and slow down initialization a bit.

Originally committed as revision 18855 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-16 14:17:08 +00:00
Siarhei Siamashka
460c0abfbb Fix for issue #829 ("ffvorbis outputs crackling sound, libvorbis plays fine")
This was off-by-one bug which affects floor0 encoded files. Tracked down
by valgrind (was reported as the use of uninitialized memory).

With this patch applied, tiny_psnr now reports the following when ffvorbis
is compared to libvorbis-1.0beta4 output for 'lsp-test.ogg' sample:
stddev:    0.76 PSNR: 98.69 bytes:  3498380/  3498452

Output from libvorbis-1.2 is substantially different:
stddev:  132.57 PSNR: 53.87 bytes:  3498424/  3498496

Originally committed as revision 18821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-14 06:38:49 +00:00
Stefano Sabatini
9106a698e7 Rename bitstream.h to get_bits.h.
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 16:20:26 +00:00
Thilo Borgmann
7a00bbad21 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.

Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread
"Google Summer of Code participation" on the mailinglist.

Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-07 15:59:50 +00:00
Diego Biurrun
bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Oded Shimon
05dee1b7df Rename all vorbis encoder related typedefs to not use _t for POSIX compatibility
Originally committed as revision 16076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-12 05:12:51 +00:00
Carl Eugen Hoyos
c8562a6fda Fix memleak for currupt input.
Originally committed as revision 15507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-01 21:47:49 +00:00