Commit Graph

17799 Commits

Author SHA1 Message Date
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
Luca Barbato
ddf1b4a2f8 vorbis: simplify the inner loop in setup_classifs 2013-05-19 22:56:37 +02:00
Luca Barbato
36f1038004 vorbis: use normal integer values for iterators
No need to use fixed-size integers.
2013-05-19 22:56:37 +02:00
Luca Barbato
98186578a2 vorbis: refactor vorbis_residue_decode_internal 2013-05-19 22:56:37 +02:00
Jean-Baptiste Kempf
c360fb174b win32: Do not use GetProcAddress when compiled for Vista+
Instead link directly to the condition variable functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-19 18:22:39 +03:00
Luca Barbato
ed50673066 wavpack: validate samples size parsed in wavpack_decode_block
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-05-18 20:39:32 +02:00
Luca Barbato
8c34558131 wavpack: return meaningful errors
And forward those that were already meaningful.
2013-05-18 20:37:18 +02:00