Vittorio Giovara
fb13fe8342
golomb: reduce scope of a few variables
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Vittorio Giovara
2c993e8b5e
golomb: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
a92816c4eb
get_se_golomb: fix decoding of very large values
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fd165ace7b
golomb: check log validity before shifting
...
Fixes invalid right shift in fate-cavs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
9a2e79116d
golomb: use unsigned arithmetics in svq3_get_ue_golomb()
...
This prevents undefined behaviour of signed left shift if the coded
value is larger than 2^31. Large values are most likely invalid and
caused errors or by feeding random.
Validate every use of svq3_get_ue_golomb() and changed the place there
the return value was compared with negative numbers. dirac.c was clean,
fixed rv30 and svq3.
12 years ago
Diego Biurrun
6f6b0311a3
avcodec: Drop some silly commented-out av_log() invocations
12 years ago
Diego Biurrun
80412997c8
golomb: const correctness for get_ue()/get_se() function arguments
12 years ago
Justin Ruggles
4795362660
golomb: check remaining bits during unary decoding in get_ur_golomb_jpegls()
...
Fixes infinite loop in FLAC decoding in case of a truncated bitstream due to
the safe bitstream reader returning 0's at the end.
Fixes Bug 310.
CC:libav-stable@libav.org
13 years ago
Michael Niedermayer
28e4f906fa
golomb: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
46b3fbc30b
golomb: use HAVE_BITS_REMAINING() macro to prevent infloop on EOF.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
52e4018be4
flac: fix infinite loops on all-zero input or end-of-stream.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
c6643fddba
golomb: avoid infinite loop on all-zero input (or end of buffer).
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Michael Niedermayer
964506bb97
golomb: Fix infinite loop in svq3_get_ue_golomb()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fc739b79ad
golomb: fix end of bitstream check
...
Fixes Ticket806
Bug found by Oana Stratulat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nir Ben David
083d9ba448
golomb: Fix overread in get_ur_golomb_jpegls()
...
Fixes Ticket600
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
fdba370f8a
h264: fix HRD parameters parsing
...
The bit_rate_value_minus1 and cpb_size_value_minus1 elements
allow a wider range than get_ue_golomb() supports. This
adds a get_ue_golomb_long() function supporting up to 31
leading zeros, which is the maximum for these syntax
elements, and uses it in decode_hrd_parameters().
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
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
15 years ago
Lars Täuber
6fa6c481b9
Make get_ur_golomb capable of reading 16 bit values.
...
Patch by Lars Täuber: firstname taeuber gmx net
Originally committed as revision 19821 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
9106a698e7
Rename bitstream.h to get_bits.h.
...
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Stefano Sabatini
b275500706
Split bitstream.h, put the bitstream writer stuff in the new file
...
put_bits.h.
Originally committed as revision 18461 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Måns Rullgård
d4f2a6250a
Fix get_ur_golomb_jpegls() with A32_BITSTREAM_READER
...
If k==0, log==0 can indicate that the coded value uses more than
MIN_CACHE_BITS bits. With MIN_CACHE_BITS==32, the fast branch is
incorrectly taken in this case unless explicitly forbidden.
Originally committed as revision 17550 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
9392863d1b
Clarify get_ue_golomb_31() behavior with >31.
...
Originally committed as revision 17429 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
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
16 years ago
Michael Niedermayer
0e921e97c1
Add get_ue_golomb_31()
...
Originally committed as revision 16298 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
740c14dbd7
Fix regression test failure caused by golomb limit not being considered
...
in r15334.
Originally committed as revision 15338 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
631e8afb8c
Correct the threshold of get_ur_golomb_jpegls() at which the optimized
...
case is used.
Fix issue245.
Originally committed as revision 15334 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Stefano Sabatini
987903826b
Globally rename the header inclusion guard names.
...
Consistently apply this rule: the guard name is obtained from the
filename by stripping the leading "lib", converting '/' and '.' to
'_' and uppercasing the resulting name. Guard names in the root
directory have to be prefixed by "FFMPEG_".
Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Ramiro Polla
6647ab80e3
bitstream: move put_sbits() from flacenc.c to bitstream.h and use it
...
throughout libavcodec.
Originally committed as revision 14204 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Diego Biurrun
5b21bdabe4
Add FFMPEG_ prefix to all multiple inclusion guards.
...
Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Marco Gerards
9df4ce5e5b
Make the Golomb decoder work for Dirac
...
Originally committed as revision 10119 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Diego Biurrun
e5a389a1b7
license header consistency cosmetics
...
Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Guillaume Poirier
efb775777f
add a comment to indicate which #endif belong to which #define
...
Originally committed as revision 9356 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Måns Rullgård
699b3f99d0
add multiple inclusion guards to headers
...
Originally committed as revision 9345 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Måns Rullgård
99545457bf
include all prerequisites in header files
...
Originally committed as revision 9344 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Kostya Shishkov
76aca7a8bf
handle limit>32 for set_ur_golomb_jpegls()
...
Originally committed as revision 6754 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Diego Biurrun
b78e7197a8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
...
and fix GPL/LGPL version mismatches.
Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
9e96ab0389
first rudimentary version of (Justin Ruggles jruggle earthlink net) flac encoder
...
Originally committed as revision 5514 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Diego Biurrun
5509bffa88
Update licensing information: The FSF changed postal address.
...
Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Diego Biurrun
bb270c0896
COSMETICS: tabs --> spaces, some prettyprinting
...
Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Diego Biurrun
115329f160
COSMETICS: Remove all trailing whitespace.
...
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Alex Beregszaszi
e134e10f37
set_se_golomb can only write 16bits, add a note about this (ok, maybe it's brain dead using it with more than 16bits, but..)
...
Originally committed as revision 4635 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Michael Niedermayer
85ad569574
shorten decoder by (Jeff Muizelaar <jrmuizel gmail com>)
...
Originally committed as revision 3984 to svn://svn.ffmpeg.org/ffmpeg/trunk
20 years ago
Michael Niedermayer
895345da9a
svq3_get_se_golomb() fix
...
Originally committed as revision 3849 to svn://svn.ffmpeg.org/ffmpeg/trunk
20 years ago
Loïc Le Loarer
61f040dd1a
compile with TRACE define patch by (Loic <lll+ffmpeg m4x org>)
...
Originally committed as revision 3848 to svn://svn.ffmpeg.org/ffmpeg/trunk
20 years ago
Michael Niedermayer
a6c01275ad
get/set_sr_golomb() cleanup
...
Originally committed as revision 3451 to svn://svn.ffmpeg.org/ffmpeg/trunk
20 years ago
Alex Beregszaszi
4579adb00c
new signed golomb routines
...
Originally committed as revision 3444 to svn://svn.ffmpeg.org/ffmpeg/trunk
20 years ago
Michael Niedermayer
cceb990ef9
1000l to the ffsvq3 author, our default bitstream reader is only guranteed to be able to read 25bit at a time
...
Originally committed as revision 3237 to svn://svn.ffmpeg.org/ffmpeg/trunk
21 years ago
Michael Niedermayer
ac2570a8b0
flac fixes:
...
fix data types of residual&decoded
fix twos complement bitfields
fix utf8 (no, utf8 is not the same as the simple and compact uvlc used in nut)
add truncated bitstream support, both ogg and flac demuxers in mplayer cvs provide incomplete frames, and furthermore it isnt possible to find frameboundaries in flac without decoding it completly
add escape-less golomb rice decoder (=flac style golomb rice) (ultra efficient, the longest vlc code is just 2^32-1 bits)
printf->av_log
fix bps for non independant channels
fix a few +-1 bugs
fix sample order for independant channels
fix data_size
Originally committed as revision 2791 to svn://svn.ffmpeg.org/ffmpeg/trunk
21 years ago
Michael Niedermayer
ce3299529b
10l
...
Originally committed as revision 2041 to svn://svn.ffmpeg.org/ffmpeg/trunk
22 years ago