Michael Niedermayer
5b73916d34
jpeg2000: Simplify init_tile()
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
33e665a6ab
jpeg2000: Update pixel format support
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
db13e02c6f
jpeg2000: Compute corrections of sub-band coordinates
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
690c8af97b
jpeg2000: Remove unneeded variable initialization
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
5bf208f659
jpeg2000: Use separate fields for int and float codepaths
...
Split stepsize and data into int and float variants.
Eliminates a number of casts and simplifies spotting errors.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
a458b91cf4
jpeg2000: Split int/float codepaths depending on the DWT
...
DWT53 is always int, DWT97 is always float.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
f9581f1414
jpeg2000: Improve reduced resolution decoding
...
Correctly scale down the component coordinates and
clean up some redundant code.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
952f7ed3c0
jpeg2000: Compute quantization for 'scalar derived' in the correct case.
...
Scalar derived case is represented by the JPEG2K_QSTY_SI define.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
4e11b15534
jpeg2000: Calculate code-block coord in ff_jpeg2000_init_component()
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
4cbd5ed11b
jpeg2000: Fix compute precedence error in lut_gain index
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
b44925ae6b
jpeg2000: Initialize code blocks structures in precincts to 0
...
Prevent use of uninitialized memory / valgrind failure.
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
cf04af2086
jpeg2000: Check that we have enough components for MCT
...
Avoid overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
b564784a20
jpeg2000: Check that there is a SOT before SOD
...
Avoid overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
2c3901b2c3
jpeg2000: Remove unneeded returns
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
ef35d6dbc6
jpeg2000: Propagate error code from get_cox()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
78962d3df4
jpeg2000: Check that nreslevels2decode has been initialized before use
...
Avoid buffer overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
86a2602e16
jpeg2000: Drop unused and writeonly fields
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
ac921338a4
jpeg2000: Correctly calculate sgnd
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
fd54dd028b
jpeg2000: check len before parsing header
...
Avoid overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
eae63e3c15
jpeg2000: Check component number in get_coc() and get_qcc()
...
Avoid overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
17e5d614a8
jpeg2000: Check zero bit-plane validity
...
Prevent integer overflows.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Luca Barbato
7e201d575d
jpeg2000: Validate block lengthinc
...
Currently we are using an array with a static data size.
Similar to a patch with the same purpose by Michael Niedermayer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
278a923c51
jpeg2000: Validate SIZ parsing
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
d3cb302b88
jpeg2000: Validate SOT parsing
...
Avoid some overreads.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
1a3598aae7
jpeg2000: Use bytestream2
...
Prevent a number of overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
5efadcb8cd
jpeg2000: Clean up return paths and error messages
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
be3271009e
jpeg2000: Define the maximum decomposition levels
...
And define the resolution levels according.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Michael Niedermayer
fbcc03db8f
jpeg2000: Check code-block size
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
5650e331a7
jpeg2000: Validate resolution levels
...
There are 32 maximum decomposition levels, thus 33 resolution levels.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
8bd9039900
Revert "indeo5: reject negative motion vectors"
...
Negative motion vectors are possible.
This reverts commit 1194a41080
.
2013-07-01 06:49:46 +02:00
Luca Barbato
b36e1893ef
indeo: check for reference when inheriting mvs
...
The same is done already for qdelta.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-01 04:20:58 +02:00
Luca Barbato
1194a41080
indeo5: reject negative motion vectors
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-01 04:20:51 +02:00
Luca Barbato
dd3754a488
indeo: use proper error code
2013-07-01 04:17:46 +02:00
Luca Barbato
7388c0c586
indeo: Properly forward the error codes
...
If the tile data size does not match the buffer size it did not
return an AVERROR_INVALIDDATA causing futher corruption later.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-01 04:17:46 +02:00
Loren Merritt
1221bb6239
x86: lpc: fix a segfault in av_evaluate_lls_sse2()
2013-06-30 23:11:19 +00:00
Luca Barbato
6765ee7b9c
mjpeg: Check the unescaped size for overflows
...
And contextually check init_get_bits success and fix the reporting
message.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-30 08:48:51 +02:00
Luca Barbato
7520d9779c
mjpeg: Move code out of else branch
...
Simplify the control flow and spare some vertical space.
2013-06-30 08:46:55 +02:00
Luca Barbato
02ec656af7
wmapro: error out on impossible scale factor offsets
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-29 18:11:59 +02:00
Luca Barbato
d4a217a408
wmapro: check the min_samples_per_subframe
...
Must be at least WMAPRO_BLOCK_MIN_SIZE.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-29 18:11:40 +02:00
Luca Barbato
183880cfc4
pictor: use the correct logging context
...
Broken in 6d97484d72
2013-06-29 18:11:12 +02:00
Loren Merritt
c93ccf5a4c
lpc: use levinson for the first pass of multipass cholesky
...
Levinson is faster, and cholesky is only needed if we want to apply different
weights to different samples, which doesn't happen on the first pass.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:26:52 +02:00
Loren Merritt
502ab21af0
x86: lpc: simd av_update_lls
...
4x-6x faster on sandybridge
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
41578f70cf
lpc: use function pointers, in preparation for asm
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
cc6714bb16
lpc: remove "decay" argument
...
We never used the rolling-average mode, and this makes av_update_lls 15% faster.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Luca Barbato
3822936252
wmapro: check num_vec_coeffs against the actual available buffer
...
Prevent yet another buffer overwrite.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-28 13:16:35 +02:00
Luca Barbato
6652338f43
wmapro: return early on unsupported condition
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-28 13:16:00 +02:00
Luca Barbato
e30b068ef7
wmapro: make sure there is room to store the current packet
...
Prevent horrid and hard to trace struct overwrite.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-28 13:15:40 +02:00
Luca Barbato
afe03092dd
lavc: move put_bits_left in put_bits.h
2013-06-28 13:14:12 +02:00
Luca Barbato
07c52e2c7c
aac: return meaningful errors
2013-06-27 01:22:36 +02:00
Luca Barbato
6d8629aac1
aac: K&R formatting cosmetics
2013-06-27 01:22:06 +02:00
Derek Buitenhuis
d9c89ef86b
cllc: Use outbuf in RGB and ARGB functions
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 14:55:01 -04:00
Derek Buitenhuis
1ef6ac1071
cllc: Implement YUV support
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 14:54:46 -04:00
Kieran Kunhya
95d5246454
lavc: Add option to encode MPEG-2 AAC with libfdk-aac
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-24 08:03:26 +02:00
Anton Khirnov
720a1de52f
lavc: free the padded last frame during audio encoding properly
2013-06-20 16:49:11 +02:00
Kostya Shishkov
bbb2945f2d
smacker: check the return value of smacker_decode_tree
...
Also prevent a memory leak.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:56:50 +02:00
Kostya Shishkov
f52edef301
smacker: fix an off by one in huff.length computation
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:55:53 +02:00
Janne Grunau
985f34b756
utils: fix avcodec_flush_buffers pre-reference counting compatibility
...
The to_free AVframe must be freed just like the other ones.
Indeed, the calling application may expect all frames to be
released.
(This regression caused use-after-free in VLC with hwaccel.)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:10:58 +02:00
Luca Barbato
f80b60ad59
bitstream: forward error values and drop few abort()
2013-06-16 09:30:26 +02:00
Luca Barbato
f776899a17
bitstream: K&R formatting cosmetics
2013-06-16 09:30:25 +02:00
Luca Barbato
9e80eda26d
h264_mp4toannexb_bsf: return a padded buffer
...
The code using the returned buffer might expect it to be
FF_INPUT_BUFFER_PADDING_SIZE padded as any other avpacket.
2013-06-15 16:14:45 +02:00
Luca Barbato
8d929afd25
h264_mp4toannexb_bsf: factor out extradata parsing
2013-06-15 16:14:33 +02:00
Luca Barbato
5d21ca4559
h264_mp4toannexb_bsf: K&R formatting cosmetics
2013-06-15 09:11:13 +02:00
Luca Barbato
59d7bb99b6
4xm: check bitstream_size boundary before using it
...
Prevent buffer overread.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
fbd0dacc8d
4xm: refactor decode_p_block
...
Directly return from code 1, 2 and 6 codepaths and simplify the
remaining one to have a single overflow check and a single call to
mcdc.
2013-06-12 14:45:46 +02:00
Luca Barbato
94aefb1932
4xm: do not overread the source buffer in decode_p_block
...
Check for out of picture macroblocks before calling mcdc.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
be373cb50d
4xm: do not overread the prestream buffer
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
de2e5777e2
4xm: validate the buffer size before parsing it
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
145023f572
4xm: reject frames not compatible with the declared version
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
1f0c607560
4xm: drop pointless assert
...
Make sure the value of wlog2 is always between 0 and 3.
2013-06-12 14:45:46 +02:00
Luca Barbato
b8b809908e
4xm: forward errors from decode_p_block
...
Partially mitigate out of memory writes.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
50ec1db62d
4xm: fold last_picture lazy allocation in decode_p_frame
2013-06-12 14:45:46 +02:00
Luca Barbato
e7a44f87d0
4xm: refactor fourxm_read_header
...
Split sound and video tag parsing in separate functions.
2013-06-12 14:45:46 +02:00
Luca Barbato
08859d19b4
4xm: use the correct logging context
2013-06-12 14:45:46 +02:00
Michael Niedermayer
7ad5708691
g2meet: Fix a typo in the height comparison
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-12 13:45:53 +02:00
Kostya Shishkov
7dfc3381dd
g2meet: do not leak buffers
2013-06-12 09:54:45 +02:00
Kostya Shishkov
4d960d7f60
g2meet: more graceful cursor loading
2013-06-12 09:54:45 +02:00
Kostya Shishkov
767ae86cee
g2meet: reset dimensions on header parsing errors
2013-06-12 09:54:45 +02:00
Anton Khirnov
84d3ff50cd
lavc: add a libwavpack encoder wrapper
2013-06-10 21:33:48 +02:00
Anton Khirnov
799f57ac96
lavc: use AVFrame API properly in pad_last_frame().
...
This also simplifies the code.
2013-06-10 21:19:51 +02:00
Yusuke Nakamura
252ee3d39b
utvideodec: Set colorspace by codec_tag.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-06-10 09:38:22 +02:00
Yusuke Nakamura
b441fdeb15
utvideodec: Support ULH0 and ULH2 formats.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-06-10 09:37:53 +02:00
Luca Barbato
a3b2b83f01
faxcompr: return meaningful errors
...
And optionally forward them to the caller instead of concealing them.
Unify err and ret in a single variable.
2013-06-07 17:23:53 +02:00
Luca Barbato
f32aefcf34
faxcompr: K&R formatting cosmetics
2013-06-07 17:23:53 +02:00
Luca Barbato
9c22169769
tiff: do not overread the source buffer
...
At least 2 bytes from the source are read every loop.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-07 17:23:53 +02:00
Luca Barbato
999ccd2d0a
tiff: cleanup the error paths
...
Return the proper error values and optionally report them.
2013-06-07 17:23:53 +02:00
Luca Barbato
016c5b066d
tiff: refactor fax support in a separate function
2013-06-07 17:23:53 +02:00
Luca Barbato
103937681d
tiff: refactor deflate support in a separate function
...
Report when zlib support is missing.
2013-06-07 17:23:53 +02:00
Luca Barbato
f8a4d5e970
h264_parser: K&R formatting cosmetics
2013-06-07 16:54:55 +02:00
Luca Barbato
92b3caa108
vorbis: return meaningful errors
2013-06-07 16:54:16 +02:00
Kostya Shishkov
2d66a58ccd
Go2Webinar decoder
2013-06-03 09:24:55 +02:00
Kostya Shishkov
31980b6abd
vmd: decode videos with no LZ buffer size provided - they might not need it
...
The buffer is used for an additional pass of frame compression, so videos
can be coded without ever using it (and some are coded so indeed, e.g. in
Woodruff and the Schnibble of Azimuth game).
2013-06-02 19:08:09 +02:00
Kostya Shishkov
0aed0bfc62
vmd: fix mode 3 decoding
2013-06-02 19:07:31 +02:00
Diego Biurrun
46ce9ded96
tiff: K&R formatting cosmetics
2013-06-02 17:59:34 +02:00
Kostya Shishkov
de421b2085
use my full first name instead of short one in copyrights
2013-06-01 13:38:50 +02:00
Kostya Shishkov
33f64fd5d5
indeo4: expand allowed quantiser range
...
Indeo 4 has quantiser range 0-31 instead of 0-23 for Indeo 5, and clipping
quantiser leads to incorrect quantisation and DC prediction on low-quality
videos.
This fixes bug 259.
2013-06-01 06:36:47 +02:00
Kostya Shishkov
0b0953baec
proresenc: alpha coding support
2013-05-30 09:23:26 +02:00
Martin Storsjö
86113667c0
arm: Include hpeldsp_neon.o if h264qpel is enabled
...
A few of the h264qpel neon functions are shared with other
hpeldsp functions in this file.
This fixes standalone compilation of the h264 decoder on arm.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-30 02:17:37 +03:00
Martin Storsjö
efb7968cfe
arm: Don't unconditionally build dsputil files
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-30 02:17:35 +03:00
Martin Storsjö
36a7df8cf1
arm: Only build the FFT init files if FFT is enabled
...
This fixes build errors in cases where FFT is disabled.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-30 02:17:33 +03:00
Diego Biurrun
186599ffe0
build: cosmetics: Place unconditional before conditional OBJS lines
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-30 02:17:31 +03:00
Diego Biurrun
9b9b2e9f30
build: arm: cosmetics: Place all OBJS declarations in alphabetical order
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-30 02:17:27 +03:00
Luca Barbato
701966730c
vmd: drop incomplete chunks and spurious samples
...
Odd chunk size makes no sense for stereo and incomplete chunks are
not supported.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-29 21:30:21 +02:00
Luca Barbato
676da248ca
vmd: refactor the inner decode loop
...
Simplify a little, assume empty frames are acceptable and
do not pointlessly reinit the bytestream2 contexts using
possibly wrong size values.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-29 12:11:47 +02:00
Luca Barbato
c8f3cb9119
vmd: return meaningful errors
...
CC: libav-stable@libav.org
2013-05-29 12:11:47 +02:00
Luca Barbato
91a6944e56
vmd: use the PALETTE_COUNT constant uniformly
...
While at it drop useless parentheses.
2013-05-29 12:11:47 +02:00
Janne Grunau
bf20cdbd86
mpeg12: skip frames consistently
...
The decoder did not start predicted frames with missing references but
called the end of frame handling on them anyway. This caused an
assertion in the VA API HW accelorator since it tried to render a
picture with uninitialized buffers.
2013-05-28 19:18:10 +02:00
Anton Khirnov
89806691b1
wavpack: check that all the channels were coded.
2013-05-28 17:47:24 +02:00
Anton Khirnov
eae1b8451a
wavpack: check that there aren't too many blocks per packet
2013-05-28 17:47:17 +02:00
Anton Khirnov
7d039e70a5
wavpack: extract channel information from the bitstream
...
This way we don't require the caller to parse the block header. It also
allows the channel configuration to change mid-stream.
2013-05-28 17:47:04 +02:00
Anton Khirnov
78f75b6fa4
wavpack: extract sample rate from the bitstream
...
This way we don't require the caller to parse the block header. It also
allows the sample rate to change mid-stream.
2013-05-28 17:46:03 +02:00
Kostya Shishkov
2cf5d29110
indeo4: reuse context block VLC for band instead of defaulting
...
Currently if no custom block VLC is specified for band, a default block VLC
will be used, while the global block VLC stored in the context should be used
instead.
This fixes decoding of one sample I have.
2013-05-28 14:10:58 +02:00
Kostya Shishkov
6647aa0426
indeo4: add missing Haar and slanted transforms
...
That involves fixing INV_HAAR4() macro and changing it to work with different
input and output like INV_HAAR8() instead of in-place transform.
2013-05-28 14:08:09 +02:00
Kostya Shishkov
3b03d7e251
dxtory v2 support
2013-05-28 13:35:09 +02:00
Michael Niedermayer
728214992e
vc1dec: Remove interlaced warning
...
Also add a note about the feature in the changelog.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:29 +03:00
Michael Niedermayer
d8b9dbe776
vc1dec: Fix mixed field/frame intensity compensation
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:24 +03:00
Michael Niedermayer
17410faa22
vc1dec: Match addressing between compensation and MC in vc1_mc_4mv_chroma4
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:20 +03:00
Michael Niedermayer
1be175f929
vc1dec: Handle top and bottom blocks in vc1_mc_4mv_chroma4() differently if needed
...
Now it can use different references for those blocks and even use
averaging.
This fixes several chroma artifacts in several videos.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:15 +03:00
Michael Niedermayer
c69765a2cc
vc1dec: Fix doxy for vc1_mc_4mv_chroma4()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:12 +03:00
Michael Niedermayer
b412f705b5
vc1dec: Drop old use_ic code from vc1_b_mc
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:08 +03:00
Michael Niedermayer
5053a9a1ff
vc1: Use shuffled use_ic instead of equally shuffled mv_mode
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:04 +03:00
Michael Niedermayer
3ced06f283
vc1dec: Implement intensity compensation for vc1_interp_mc()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:55:59 +03:00
Michael Niedermayer
28243b0d35
vc1dec: Redesign the intensity compensation
...
Use the intensity-compensated reference frame for subsequent
fields/B-frames.
Since we currently don't change the reference frame we have to
maintain lookup tables for intensity compensation in the following
dependent frames.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:55:55 +03:00
Michael Niedermayer
93b1281264
vc1dec: Shuffle field MVs after decoding, not before
...
This simplifies the code since copying MVs to the reference is not needed
anymore (and maybe something about fixing artifacts).
Also remove the unused mv_f_last.
Fixes a small number of artifacts in black_screen_VC-1.mkv
and several more artifacts in other videos.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:55:46 +03:00
Anton Khirnov
9b6f47c448
matroskadec: export full wavpack blocks.
...
This allows us to get rid of demuxer-specific hacks in the decoder and
will allow streamcopy from matroska once we have a wavpack muxer.
2013-05-28 08:14:35 +02:00
Anton Khirnov
5074f4545c
wavpack demuxer: export full wavpack blocks.
...
Currently the demuxer shaves the blocks and exports only the
information that is useful to the decoder.
Exporting the blocks just as they are stored is simpler to understand
and will make remuxing wavpack easier.
2013-05-28 08:14:05 +02:00
Anton Khirnov
72dee5f40b
wavpack: don't set sample format in init.
...
We don't know whether it will be float until we look at the data.
2013-05-28 08:04:07 +02:00
Anton Khirnov
35596bd4f4
wavpack: remove a useless parameter from wavpack_decode_block().
...
The decoder always returns output if an error does not occur.
2013-05-28 08:03:57 +02:00
Anton Khirnov
d1bec4be22
wavpack: return an error on 0-sized blocks
...
Such blocks are not valid.
2013-05-28 08:03:37 +02:00
Anton Khirnov
1d177200ce
wavpack: remove a useless check.
...
Number of samples in the first block is checked to be strictly positive
earlier in wavpack_decode_frame() and number of samples in all the other
blocks is checked to be equal to the first one.
2013-05-28 08:03:24 +02:00
Anton Khirnov
0f3a0b24dd
wavpack: add an error message to a failure.
2013-05-28 08:03:13 +02:00
Anton Khirnov
474fb0c9d9
wavpack: return 0 instead of samples count from decoding functions
...
The caller never cares about the number of decoded samples, so this only
confuses the reader.
2013-05-28 08:03:02 +02:00
Anton Khirnov
528daa3990
wavpack: switch to planar output
...
This simplifies the code and makes it faster.
2013-05-28 08:01:30 +02:00
Anton Khirnov
a7ec3a9a4e
wavpack: drop redundant if/else blocks
2013-05-28 08:01:16 +02:00
Anton Khirnov
7b44c99180
wavpack: remove the subframes codec cap
...
The decoder always consumes full packets.
2013-05-28 08:01:08 +02:00
Kostya Shishkov
268bb88544
smacker: add a clarification notice about audio decoding
2013-05-28 06:17:08 +02:00
Kostya Shishkov
5f30c6c8ed
Revert "smackaud: clip output samples"
...
Smacker audio uses overflows instead of clipping.
This reverts commit 375ca0aca8
.
2013-05-27 18:19:01 +02:00
Kostya Shishkov
0418cbf081
fix scalarproduct_and_madd_int16_altivec() for orders > 16
...
the second and third sources were incremented only by half of the needed size
2013-05-26 16:10:47 +02:00
Anton Khirnov
2a6eaeaa85
Move get_logical_cpus() from lavc/pthread to lavu/cpu.
...
It will be useful in lavfi, and could conceivably be useful to the user
applications as well.
2013-05-24 09:28:00 +02:00
Anton Khirnov
90f9a5830b
w32pthreads: move from lavc to compat/
...
It will be used in other places than lavc.
2013-05-24 09:26:54 +02:00
Yusuke Nakamura
3f1a7ceb2c
h264_parser: Set field_order and picture_structure.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-05-24 08:45:05 +02:00
Yusuke Nakamura
b493847df4
avcodec: Add picture structure information to AVCodecParserContext.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-05-24 08:43:14 +02:00
Luca Barbato
fd06291239
wavpack: check packet size early
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-22 22:02:57 +02:00
Luca Barbato
3f0b6d7a62
wavpack: use bytestream2 in wavpack_decode_block
...
Prevent most out of buffer reads.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-22 22:02:55 +02:00
Janne Grunau
3eae9b030c
mpegvideo: unref buffers in ff_mpeg_unref_picture on frame size changes
...
ff_mpeg_unref_picture clears the flag indicating that the frame needs to
be reallocated after a frame size change. Since we have now reference
counted buffers we can unref the buffers immediately.
2013-05-22 15:40:12 +02:00
Kostya Shishkov
03ece7b040
proresdec: simplify slice component offsets handling
2013-05-21 09:58:59 +02:00
Luca Barbato
cfbd98abe8
mjpegdec: validate parameters in mjpeg_decode_scan_progressive_ac
...
Prevent out of buffer write when decoding broken samples.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-21 09:46:02 +02:00
Luca Barbato
a030279a67
ljpeg: use the correct number of components in yuv
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-20 22:02:05 +02:00
Luca Barbato
8aa3500905
mjpeg: Validate sampling factors
...
They must be non-zero.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-20 22:02:05 +02:00
Janne Grunau
4b79668154
mpegvideo: unref old current_picture before allocating a new one
...
Allows decoding with only three frame buffers with frame reference
counting. Fixes VAAPI based decoding in vlc which uses only three
frame buffers for the mpegvideo-based codecs.
2013-05-19 23:02:35 +02:00
Luca Barbato
db347280eb
vorbis: fallback to normal division instead of crashing
...
The use of ff_inverse speeds up slightly arches + compilers that
do not provide a division faster than the whole machinery, such
as ppc32 + gcc4.7, but has operational limits.
Drop the always-enable assert and provide a fallback.
2013-05-19 22:56:37 +02:00