| Branch: | Revision:

ffmpeg / libavcodec / vorbis_dec.c @ 21b032c4

History | View | Annotate | Download (60.5 KB)

# Date Author Comment
21b032c4 02/08/2011 08:26 PM Alexander Strasser

vorbis dec: Remove obsolete comment

Signed-off-by: Michael Niedermayer <>

350b2bb1 02/08/2011 08:26 PM Alexander Strasser

vorbis dec: cosmetics: Indent CPP cond properly

Signed-off-by: Michael Niedermayer <>

6d173dae 02/08/2011 08:26 PM Alexander Strasser

vorbis dec: cosmetics: Indent consistently

Signed-off-by: Michael Niedermayer <>

b2a51e3d 02/08/2011 08:26 PM Alexander Strasser

vorbis dec: cosmetics: Indent after scope deletion

Signed-off-by: Michael Niedermayer <>

21494e55 02/08/2011 08:26 PM Alexander Strasser

vorbis dec: Delete useless scopes

Signed-off-by: Michael Niedermayer <>

fe2ff6d2 02/04/2011 02:08 AM Justin Ruggles

Separate format conversion DSP functions from DSPContext.

This will be beneficial for use with the audio conversion API without
requiring it to depend on all of dsputil.

Signed-off-by: Mans Rullgard <>
(cherry picked from commit c73d99e672329c8f2df290736ffc474c360ac4ae)

a8ae4e0e 02/02/2011 02:40 AM Justin Ruggles

Remove unneeded add bias from 3 functions.


Signed-off-by: Mans Rullgard <>
(cherry picked from commit 80ba1ddb58b5923b9f36a6acd542affc4ca722eb)

733dbe7d 01/28/2011 02:15 AM Justin Ruggles

Remove the add bias hack for the C version of DSPContext.float_to_int16_*().
(cherry picked from commit 9d06d7bce3babb82ed650c13ed13a57f6f626a71)

e7e2df27 01/28/2011 02:15 AM Diego Elio Pettenò

Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.

None of these symbols should be accessed directly, so declare them as

Signed-off-by: Mans Rullgard <>
(cherry picked from commit d36beb3f6902b1217beda576aa18abf7eb72b03c)

015f9f1a 01/23/2011 06:32 PM Justin Ruggles

Change DSPContext.vector_fmul() from dst=dst*src to dest=src0*src1.

Signed-off-by: Mans Rullgard <>
(cherry picked from commit 6eabb0d3ad42b91c1b4c298718c29961f7c1653a)

925aa969 01/15/2011 05:10 PM Frank Barchard

Second hunk from secrity fix from google.
The hunk is not fully understood but it just makes a check tighter so its
safer for us to apply until it is fully understood.

Might fix issue 2550 (and Chrome issue 68115 and unknown CERT issues).
Our bugtracker issue though should stay open until this has been fully...

13184036 01/15/2011 04:19 PM Frank Barchard

Check rangebits to avoid a possible crash.
Fixes issue 2548 (and Chrome issue 68115 and unknown CERT issues).

Patch by Frank Barchard, fbarchard at google

Originally committed as revision 26365 to svn://

5d6e4c16 11/12/2010 11:04 AM Stefano Sabatini

Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://

5fb2f134 11/12/2010 05:38 AM Alex Converse

10l: dx shouldn't exist.

sorry sorry sorry sorry

Originally committed as revision 25726 to svn://

0611f675 11/12/2010 05:34 AM Alex Converse

10l: vorbisdec: declare dy

Originally committed as revision 25725 to svn://

8455e8c7 11/12/2010 04:33 AM Gregory Maxwell

vorbisdec: Fix floor1 decoding

An intermediate value in the floor 1 linear interpolation was
resulting in obvious artifacts on some files.


Prior to this fix 87 out of 128 64kbit/s mono files decoded with ffmpeg...

3dde6675 10/27/2010 04:30 PM Jason Garrett-Glaser

Fix crashes in vorbis decoding found by zzuf
Fixes issue 2322.

Originally committed as revision 25591 to svn://

c740f737 08/30/2010 10:34 PM David Conrad

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://

51aaf511 08/06/2010 04:10 PM Alex Converse

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://

55aa55f2 08/03/2010 12:27 AM Alex Converse

vorbisdec: Return AVERROR on malloc() failure.

This is especially important because classifs can be very large.

Originally committed as revision 24676 to svn://

366d9190 08/03/2010 12:25 AM Alex Converse

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://

c934562c 08/02/2010 08:35 PM Måns Rullgård

vorbisdec: change a uint_fast32_t to 'unsigned', fix llvm-gcc build

Originally committed as revision 24669 to svn://

961b0c41 07/02/2010 05:05 PM Reimar Döffinger

Fix use of unintialized variable introduced in r20411.

Originally committed as revision 24005 to svn://

3c35da2f 07/01/2010 11:36 PM Måns Rullgård

vorbisdec: remove variable-length arrays

Originally committed as revision 23960 to svn://

a02bb835 06/27/2010 01:46 AM David Conrad

vorbisdec: Take channels into account when checking against residue overflow

Fixes issue1969

Originally committed as revision 23812 to svn://

54fdf5d1 06/27/2010 01:46 AM David Conrad

vorbisdec: Fix header parsing with no floor1 partitions

Originally committed as revision 23811 to svn://

780621b8 06/27/2010 01:46 AM David Conrad

vorbisdec: Remove write-only variable

Originally committed as revision 23810 to svn://

ba87f080 04/20/2010 02:45 PM Diego Biurrun

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://

72415b2a 03/30/2010 11:30 PM Stefano Sabatini

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://

1429224b 03/06/2010 02:34 PM Måns Rullgård

Move FFT parts from dsputil.h to fft.h

Originally committed as revision 22235 to svn://

4a27f326 01/29/2010 01:51 PM Robert Swain

Add support for vorbis 6.1 and 7.1 channel configurations as per the new spec

Originally committed as revision 21527 to svn://

b2cc8111 12/18/2009 03:50 PM Michael Niedermayer

More sane error message when extradata has not been set.

Originally committed as revision 20894 to svn://

7a41027c 10/28/2009 10:41 PM Reimar Döffinger

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://

f640478b 10/03/2009 02:59 PM Robert Swain

Reindent after channel layout commit from yesterday

Originally committed as revision 20156 to svn://

53a71e1b 10/02/2009 12:59 PM Robert Swain

Add vorbis channel layout support according to those defined in the Vorbis I

Originally committed as revision 20148 to svn://

a7adcf29 09/29/2009 11:43 AM Diego Biurrun

whitespace cosmetics, prettyprinting, K&R coding style

Originally committed as revision 20080 to svn://

0b8e7ab0 09/28/2009 09:46 PM Diego Biurrun

some more linebreak and brace placement cosmetics

Originally committed as revision 20071 to svn://

5e56b30e 09/28/2009 09:13 PM Diego Biurrun

brace placement and linebreak cosmetics

Originally committed as revision 20070 to svn://

c31afa5d 09/23/2009 03:30 PM Reimar Döffinger

Fix format string to match the types printed.

Originally committed as revision 20003 to svn://

aedc98b0 09/23/2009 02:19 PM Google Chrome

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://

0a01efd0 09/23/2009 01:18 PM Michael Niedermayer

Make error return sign consistent.

Originally committed as revision 19997 to svn://

36b7e983 09/23/2009 01:08 PM Google Chrome

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://

cdf1512e 09/23/2009 12:24 PM Google Chrome

Check res_setup->books.
15_more_residue_book_indexes.patch by chrome.

Originally committed as revision 19992 to svn://

993092dc 09/23/2009 12:17 PM Google Chrome

Check masterbook index and subclass book index.
14_floor_masterbook_index.patch by chrome

Originally committed as revision 19991 to svn://

e5b0cfb5 09/23/2009 12:09 PM Google Chrome

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://

79a42581 09/23/2009 12:02 PM Google Chrome

Check classbook value.
11_vorbis_residue_book_index.patch by chrome.

Originally committed as revision 19989 to svn://

96651e79 09/23/2009 10:45 AM Google Chrome

Fix book_idx check.
25_vorbis_floor0_index.patch by chrome.

Originally committed as revision 19984 to svn://

d70fa8f1 09/23/2009 10:40 AM Google Chrome

Sanity checks for magnitude and angle.
26_vorbis_mag_angle_index.patch by chrome

Originally committed as revision 19983 to svn://

08c8742c 09/23/2009 10:33 AM Google Chrome

= -> == typo.
27_vorbis_residue_loop_error.patch by chrome

Originally committed as revision 19982 to svn://

98f7bcb1 09/23/2009 08:35 AM Michael Niedermayer

Check dimensions against 0 too.
39_vorbis_zero_dims.patch from chrome

Originally committed as revision 19976 to svn://

9062cd35 09/23/2009 07:46 AM Michael Niedermayer

Check validity of channels & samplerate.
This may be security relevant.
Based on 2 patches by chrome.

Originally committed as revision 19975 to svn://

01b22147 09/20/2009 05:30 PM Måns Rullgård

Merge FFTContext and MDCTContext

Originally committed as revision 19931 to svn://

1de4ba71 07/08/2009 07:31 PM Reimar Döffinger

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://

37317794 05/20/2009 07:26 AM Siarhei Siamashka

Use iMDCT output scaling to simplify ffvorbis and make it slightly faster.

Originally committed as revision 18879 to svn://

7dfed8e1 05/20/2009 07:24 AM Siarhei Siamashka

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....

7d485f16 05/16/2009 02:17 PM Siarhei Siamashka

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....

460c0abf 05/14/2009 06:38 AM Siarhei Siamashka

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...

9106a698 04/13/2009 04:20 PM Stefano Sabatini

Rename bitstream.h to get_bits.h.

Originally committed as revision 18494 to svn://

7a00bbad 04/07/2009 03:59 PM Thilo Borgmann

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....

bad5537e 02/01/2009 02:00 AM Diego Biurrun

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://

05dee1b7 12/12/2008 05:12 AM Oded Shimon

Rename all vorbis encoder related typedefs to not use _t for POSIX compatibility

Originally committed as revision 16076 to svn://

c8562a6f 10/01/2008 09:47 PM Carl Eugen Hoyos

Fix memleak for currupt input.

Originally committed as revision 15507 to svn://

9d2b5cf2 10/01/2008 07:28 AM Siarhei Siamashka

Interleaved forward/backward channels processing in order to increase chances
of stepping on already cached data for the cores with extremely small data
Patch by Siarhei Siamashka: name dot surname at gmail

Originally committed as revision 15493 to svn://

c541e668 08/31/2008 10:49 PM Michael Niedermayer

Optimize vorbis_residue_decode() so that vr->type is a constant.
Based on a patch by Siarhei Siamashka.

Originally committed as revision 15134 to svn://

d46ac5bf 08/12/2008 12:38 AM Loren Merritt

mdct wrapper function to match fft

Originally committed as revision 14703 to svn://

46803f4f 08/12/2008 12:33 AM Loren Merritt

optimize imdct_half:
remove tmp buffer.
skip fft reinterleave pass, leaving data in a format more convenient for simd.
merge post-rotate with post-reorder.

Originally committed as revision 14700 to svn://

fd76c37f 07/31/2008 10:47 AM Peter Ross

Modify all codecs to report their supported input and output sample format(s).

Originally committed as revision 14482 to svn://

8a37920c 07/29/2008 02:17 PM Loren Merritt

r14205 broke vorbis float_to_int on ppc

Originally committed as revision 14466 to svn://

5eb0f2a4 07/16/2008 12:50 AM Loren Merritt

float_to_int16_interleave: change src to an array of pointers instead of assuming it's contiguous.
this has no immediate effect, but will allow it to be used in more codecs.

Originally committed as revision 14252 to svn://

633d9def 07/15/2008 11:04 PM Loren Merritt

vorbis: reduce memory by reusing buffers

Originally committed as revision 14251 to svn://

1a325367 07/15/2008 11:01 PM Loren Merritt

unroll another common case in vorbis_residue_decode

Originally committed as revision 14250 to svn://

b9fa3208 07/13/2008 03:03 PM Loren Merritt

exploit mdct symmetry
2% faster vorbis on conroe, k8. 7% on celeron.

Originally committed as revision 14207 to svn://

f27e1d64 07/13/2008 02:56 PM Loren Merritt

simplify vorbis windowing

Originally committed as revision 14205 to svn://

da95f225 06/25/2008 06:35 PM Michael Niedermayer

Set frame_size to the gcd of what the decoder can output.

Originally committed as revision 13971 to svn://

fe4bf374 06/12/2008 09:50 PM Stefano Sabatini

Make AVCodec long_names definition conditional depending on CONFIG_SMALL.

Originally committed as revision 13759 to svn://

a5c0969a 05/06/2008 09:20 AM Diego Biurrun

Remove one more set of useless parentheses from a return call.

Originally committed as revision 13070 to svn://

d5202e4f 04/27/2008 10:52 AM Stefano Sabatini

Add long names to many AVCodec declarations.
patch by Stefano Sabatini, stefano.sabatini-lala poste it

Originally committed as revision 13005 to svn://

98a6fff9 03/21/2008 03:11 AM Zuxy Meng

Apply 'cold' attribute to init/uninit functions in libavcodec

Originally committed as revision 12525 to svn://

8c4bd28b 02/01/2008 04:07 PM Michael Niedermayer


Originally committed as revision 11786 to svn://

1234585f 01/04/2008 01:18 PM Benoit Fouet

Initialize "saved" buffer to zero.
Patch by Vincent Penné vpenne wyplay com and Denes Balatoni

Originally committed as revision 11393 to svn://

90901860 12/01/2007 12:19 AM Michael Niedermayer

stupid code (casting of void*) found by

Originally committed as revision 11117 to svn://

e14356c8 10/31/2007 10:36 PM Michael Niedermayer

fix issue130

Originally committed as revision 10888 to svn://

7ae7300e 08/09/2007 12:57 AM Alex Beregszaszi

use skip_bits where appropriate

Originally committed as revision 10004 to svn://

5fc32c27 08/09/2007 12:13 AM Alex Beregszaszi

use get_bits1(..) instead get_bits(.., 1)

Originally committed as revision 9999 to svn://

975741e7 07/17/2007 07:12 AM Denes Balatoni

Don't segfault if an empty codebook gets used.
Patch by Denes Balatoni: [ dbalatoni interware hu ]
Original thread: [Ffmpeg-devel] [PATCH/BUGREPORT] crash in vorbis decoder
date: 02/04/2007 11:08 PM

Originally committed as revision 9711 to svn://

e5a389a1 07/05/2007 10:40 AM Diego Biurrun

license header consistency cosmetics

Originally committed as revision 9484 to svn://

07c55d8e 05/10/2007 03:24 PM Aurelien Jacobs

rename vorbis.c to vorbis_dec.c and vorbis_common.c to vorbis.c

Originally committed as revision 8981 to svn://