Commit Graph

17591 Commits

Author SHA1 Message Date
Anton Khirnov
34f87a5853 qdm2: check that the FFT size is a power of 2
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 10:56:11 +02:00
Anton Khirnov
ecff5acb5a svq1dec: clip motion vectors to the frame size.
Fixes invalid reads for corrupted files.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 10:55:51 +02:00
Anton Khirnov
b1bb8fb860 svq1dec: check that the reference frame has the same dimensions as the current one
They can be different if the last keyframe failed to decode correctly.
Fixes possible invalid reads in such a case.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 10:55:30 +02:00
Ronald S. Bultje
015821229f vp3: Use full transpose for all IDCTs
This way, the special IDCT permutations are no longer needed. This
is similar to how H264 does it, and removes the dsputil dependency
imposed by the scantable code.

Also remove the unused type == 0 cases from the plain C version
of the idct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-15 12:32:05 +03:00
Martin Storsjö
5941978e71 vp3: bfin: Transpose the IDCTs
While this change isn't bitexact, the IDCTs weren't bitexact to
start with either.

This simplifies decoupling vp3 from dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-15 12:31:52 +03:00
Ronald S. Bultje
c46819f229 x86: Move constants to the only place where they are used
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-15 12:17:39 +03:00
Martin Storsjö
c0dcf89887 bfin: Match DEFUN_END macros to the right functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-15 12:13:26 +03:00
Diego Biurrun
a3cb865310 x86: dsputil: Move some ifdefs to avoid unused variable warnings 2013-04-12 09:36:47 +02:00
Diego Biurrun
2004c7c8f7 x86: dsputil: cosmetics: Remove two pointless variable indirections 2013-04-12 09:36:47 +02:00
Diego Biurrun
c51a3a5bd9 x86: dsputil: Refactor some ff_{avg|put}_pixels function declarations 2013-04-12 09:36:46 +02:00
Diego Biurrun
e027032fc6 x86: dsputil: ff_h263_*_loop_filter declarations to a more suitable place 2013-04-12 09:36:46 +02:00
Diego Biurrun
a89c05500f x86: h264qpel: int --> ptrdiff_t for some line_size parameters 2013-04-12 09:30:12 +02:00
Diego Biurrun
ac9362c5d9 Move misplaced file author information where it belongs 2013-04-11 02:42:11 +02:00
Anton Khirnov
9de9b828ef lavc: don't overwrite display dimensions with coded dimensions. 2013-04-10 20:54:27 +02:00
Anton Khirnov
2d6edb2b7e lavc: extend / update the [coded_]{width,height} doxy 2013-04-10 20:54:22 +02:00
Diego Biurrun
20429ba96e h261: Move encoder/decoder shared table init to common code 2013-04-10 13:32:04 +02:00
Diego Biurrun
8a776ad90e h261: Move shared data tables from a header to a proper C file 2013-04-10 13:32:04 +02:00
Ronald S. Bultje
b93b27edb0 dsputil: Make dsputil selectable
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:04:05 +03:00
Ronald S. Bultje
85deb51a01 h264: Only initialize dsputil if error resilience is enabled
It is only used for error resilience. This allows building the
h264 decoder without dsputil, if error resilience is disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:03:53 +03:00
Ronald S. Bultje
62844c3fd6 h264: Integrate clear_blocks calls with IDCT
The non-intra-pcm branch in hl_decode_mb (simple, 8bpp) goes from 700
to 672 cycles, and the complete loop of decode_mb_cabac and hl_decode_mb
(in the decode_slice loop) goes from 1759 to 1733 cycles on the clip
tested (cathedral), i.e. almost 30 cycles per mb faster.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:03:06 +03:00
Martin Storsjö
e8cafd2773 h264: Clear the mb members via memset instead of using dsputil
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:01:21 +03:00
Ronald S. Bultje
6d25c9db11 dsputil: Make square put/avg_pixels functions local to h264qpel
Put a copy of the 8bit functions only in dsputil, where they are
used for some other things (e.g. mpeg4qpel, mspel, cavsqpel).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 10:59:14 +03:00
Kostya Shishkov
56c1b92576 dfa: implement missing TDLT coding method 2013-04-09 18:32:00 +02:00
Martin Storsjö
bc0522dffa h264pred: Add a few missing const declarations for ff_cropTbl derived pointers
The pointers that get assigned ff_cropTbl were made const in
9e0f14f1, but other variables that transitively are assigned
based on these variables were missed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 21:39:15 +03:00
Ronald S. Bultje
d2ec6ea6c6 lavc: Move ff_cropTbl and ff_zigzag_direct from dsputil to mathtables
These are widely used throughout libavcodec, nothing dsputil-specific.

Change ff_cropTbl to a statically initialized table, to avoid
initializing it with a function call.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:38:33 +03:00
Martin Storsjö
9e0f14f16c lavc: Make pointers to ff_cropTbl const
There's no point in these pointers not being const.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:38:33 +03:00
Ronald S. Bultje
18df366a18 vp3: Embed idct_permutation array directly in VP3DecoderContext
This makes the vp3 decoder less dependent on dsputil, and will aid
in making it (eventually) dsputil-independent.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:38:33 +03:00
Ronald S. Bultje
610b18e2e3 x86: qpel: Move fullpel and l2 functions to a separate file
This way, they can be shared between mpeg4qpel and h264qpel without
requiring either one to be compiled unconditionally.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:38:33 +03:00
Martin Storsjö
0f59845708 bfin: Make vp3 functions static
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:29:40 +03:00
Martin Storsjö
aa8d89536d bfin: Don't use the vp3 idct functions if bitexact behaviour is expected
In the non-bitexact mode, vp3 currently decodes to the same
frame crcs as before 28f9ab702 (and the output visually looks
correct).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:28:52 +03:00
Christophe Gisquet
f4b0d12f5b x86: sbrdsp: Implement SSE neg_odd_64
Timing on Arrandale:
        C   SSE
Win32:  57   44
Win64:  47   38
Unrolling and not storing mask both save some cycles.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-05 22:47:04 +02:00
Diego Biurrun
52cd84d4d4 h261: Move mvmap table to the only place it is used 2013-04-05 12:25:12 +02:00
Diego Biurrun
0404ec619d h261: cosmetics: Move functions to avoid forward declarations 2013-04-05 12:25:12 +02:00
Diego Biurrun
b78f81c803 h261: K&R formatting and prettyprinting cosmetics 2013-04-05 12:25:12 +02:00
Diego Biurrun
66ac3dbf1e h261: Move function declarations to h261.h 2013-04-05 12:25:12 +02:00
Diego Biurrun
ed16c2dbf4 h261: Remove H.261 loop filter from dsputil
There is no arch-optimized version of the H.261 loop filter and there
likely will never be, so the dsputil overhead does not give any benefit.
2013-04-05 12:24:28 +02:00
Diego Biurrun
ae35d91d44 h261: Move ff_h261_rl_table_store declaration to header file 2013-04-05 12:24:28 +02:00
Nicolas Bertrand
28a807e28b libopenjpeg: Add support for XYZ colorspace, found in DCINEMA frames
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-04 19:53:07 +02:00
Anton Khirnov
b88f902125 bmv: check for len being valid in bmv_decode_frame().
It can be 0 or -1 for invalid files, which may result in invalid memory
access.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:27 +02:00
Anton Khirnov
3623589edc dfa: check for invalid access in decode_wdlt().
This can happen when the number of skipped lines is not consistent with
the number of coded lines.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:07 +02:00
Peter Meerwald
dfcbe8cbd7 doc: Fix best_nb_channells typo
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-04-04 07:51:28 +02:00
Matt Wolenetz
1d6e618939 vp8: Fix pthread_cond and pthread_mutex leaks
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-30 16:08:50 +01:00
Alexandra Khirnova
0afcf97e1e vmdav: convert to bytestream2
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-28 08:30:38 +01:00
Martin Storsjö
3891a270f5 msmpeg4: Split decoding related functions to a separate file
This fixes standalone compilation of the msmpeg4v2, msmpeg4v3
and wmv2 encoders, that previously failed to link due to the
decoder codepaths requiring error_resilience.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 15:45:56 +02:00
Diego Biurrun
e557584aa7 mpeg12: Move Mpeg1Context declaration to the only place it is used 2013-03-27 14:26:11 +01:00
Diego Biurrun
1b6d66745a Split MPEG-1/2 decoder code off from MPEG-1/2 common code 2013-03-27 14:26:11 +01:00
Diego Biurrun
eee2000b41 mpeg12: Move some ff_mpeg1_* function declarations to a more suitable place 2013-03-27 14:21:45 +01:00
Diego Biurrun
b6649ab503 cosmetics: Remove unnecessary extern keywords from function declarations 2013-03-27 14:21:45 +01:00
Diego Biurrun
1db6a080bd dca: Move ff_dca_convert_bitstream() to the DCA common code
This makes the DCA parser and decoder independent.
2013-03-27 14:21:45 +01:00
Janne Grunau
b247253929 vdpau: wrap codec specific functions in appropiate #ifs
Fixes linking when only a subset of the deprecated vdpau decoders is
enabled.
2013-03-27 13:20:13 +01:00