Ronald S. Bultje
33cd32b389
kgv1: use avctx->get/release_buffer().
...
Also fixes crashes on corrupt bitstreams.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Dale Curtis
b716542691
mpegaudiodec: Prevent premature clipping of mp3 input buffer.
...
Instead of clipping extrasize based on EXTRABYTES, clip based on the
amount of buffer actually left. Without this fix, there are warbles
and other distortions in the test case below.
http://kevincennis.com/mix/assets/sounds/1901_voxfx.mp3
13 years ago
Ronald S. Bultje
be129271ea
lcl: error out if uncompressed input buffer is smaller than framesize.
...
This prevents crashes when trying to read beyond the end of the buffer
while decoding frame data.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
ab492ca2ab
mjpeg: abort decoding if packet is too large.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
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
b44b41633f
get_bits: add HAVE_BITS_REMAINING macro.
13 years ago
Michael Niedermayer
388b7ac07a
Revert "Set channel layout in flac decoder."
...
This reverts commit 2ef2496cd1
.
Conflicts:
libavcodec/Makefile
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
003e024bfb
Revert "Fix channel layout for some stereo flac files."
...
This reverts commit d2ee3c913d
.
13 years ago
Michael Niedermayer
3be7917894
proresenc_anatoliy: switch to encode2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
73f8f7e839
msvideo1enc: switch to encode2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8060403011
j2kenc: switch to encode2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
131698af55
flashsv2enc: switch to encode2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
32e74395a8
Revert "Improve decoding quality for lossy wavpack."
...
This has been implemented more correctly.
This reverts commit a915618a29
.
13 years ago
Alex Converse
447363870f
tiff: Prevent overreads in the type_sizes array.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
e32548d133
tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned.
...
TIFF v6.0 (unimplemented) adds signed equivalents.
13 years ago
Christophe GISQUET
2784d18791
SBR DSP x86: implement SSE sbr_hf_g_filt
...
Unrolling the main loop to process, instead of 4 elements:
- 8: minor gain of 2 cycles (not worth the extra object size)
- 2: loss of 8 cycles.
Assigning STEP to a register is a loss. Output address (Y) is almost always
unaligned.
Timings:
- C (32/64 bits): 117/109 cycles
- SSE: 57 cycles
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Christophe GISQUET
34454c761f
SBR DSP x86: implement SSE sbr_sum_square_sse
...
The 32bits targets have been compiled with -mfpmath=sse for proper reference.
sbr_sum_square C /32bits: 82c (unrolled)/102c
C /64bits: 69c (unrolled)/82c
SSE/32bits: 42c
SSE/64bits: 31c
Use of SSE4.1 dpps to perform the final sum is slower.
Not unrolling to perform 8 operations in a loop yields 10 more cycles.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Christophe GISQUET
2e74a5abc2
SBR DSP: use intptr_t for the ixh parameter.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Paul B Mahol
1b93244381
v408enc: switch to encode2()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
1f801f3a70
yuv4enc: switch to encode2()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
d1ede561a6
v308enc: switch to encode2()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Derek Buitenhuis
480b133e6f
wavpack: Don't shift minclip/maxclip
...
Since we are clipping before we shift the values to
16 or 32 bits, we should not shift the min/max clip
values to compensate.
Fixes 8 and 24 bit lossy decoding.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
ff311c0918
lavc: drop encode() support for video.
...
All video encoders have been converted to encode2(), all new encoders
should also use only encode2().
13 years ago
Anton Khirnov
171273fec8
snowenc: switch to encode2().
13 years ago
Anton Khirnov
8d3348c2c4
snowenc: don't abuse input picture for storing information.
13 years ago
Anton Khirnov
7340008f18
a64multienc: switch to encode2().
...
We have no decoder, so cannot test if the output is decodable.
13 years ago
Anton Khirnov
cfc6ab3199
a64multienc: don't write into output buffer when there's no output.
13 years ago
Anton Khirnov
4da6d194e5
libxvid: switch to encode2().
13 years ago
Anton Khirnov
760b004086
tiffenc: switch to encode2().
13 years ago
Anton Khirnov
62acb4937e
tiffenc: properly forward error codes in encode_frame().
13 years ago
Anton Khirnov
2257f66ec5
lavc: drop libdirac encoder.
...
Libschroedinger is the preferred way to encode dirac video now, it
produces better output and has a nicer API.
13 years ago
Anton Khirnov
577fed3b7c
gifenc: switch to encode2().
13 years ago
Anton Khirnov
d8f3365fb0
libvpxenc: switch to encode2().
13 years ago
Anton Khirnov
0ecf54f9dc
flashsvenc: switch to encode2().
13 years ago
Ronald S. Bultje
01cb62aba2
lcl: don't overwrite input memory.
...
If the PNG filter is enabled, a PNG-style filter will run over the
input buffer, writing into the buffer. Therefore, if no zlib compression
was used, ensure that we copy into a temporary buffer, otherwise we
overwrite user-provided input data.
13 years ago
Anton Khirnov
84db922bf9
libxavs: switch to encode2().
13 years ago
Anton Khirnov
d3b577f00d
libxavs: add an AVClass at the beginning of XavsContext.
13 years ago
Anton Khirnov
a5f848c86d
libxavs: split extradata writing out of encode_nals().
...
This is done in preparation for the following patch implementing
encode2().
This commit is analogous to 05d699222d
for
libx264.
13 years ago
Anton Khirnov
8e8124e173
ljpegenc: switch to encode2().
13 years ago
Ronald S. Bultje
2b83e8b700
truemotion2: error out if the huffman tree has no nodes.
...
This prevents crashers and errors further down when reading nodes in the
empty tree.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Anton Khirnov
3c0ed7d1a8
asv1enc: switch to encode2().
13 years ago
Anton Khirnov
df53a47317
libschroedingerenc: switch to encode2().
13 years ago
Anton Khirnov
278d88689b
ffv1enc: switch to encode2().
13 years ago
Anton Khirnov
f7fa73ac91
libtheoraenc: switch to encode2().
13 years ago
Anton Khirnov
6d9c27dc85
jpeglsenc: switch to encode2().
13 years ago
Anton Khirnov
148fc99506
lclenc: switch to encode2().
13 years ago
Anton Khirnov
21b46747ad
qtrleenc: switch to encode2().
13 years ago
Justin Ruggles
62d5f9e5ca
flacdec: set channel_layout based on channel count
...
Channel layouts are specified in the FLAC format description at
http://flac.sourceforge.net/format.html
fixes Bug 209
13 years ago
Justin Ruggles
3798205a77
mov: set channel layout for AC-3 streams based on the 'dac3' atom info
...
fixes Bug 225
13 years ago
Alex Converse
1cd9a6154b
aac: fix infinite loop on end-of-frame with sequence of 1-bits.
...
Based-on-work-by: Ronald S. Bultje <rsbultje@gmail.com>
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago