Commit Graph

17602 Commits

Author SHA1 Message Date
Ronald S. Bultje
cb7ecb7563 vp56: Use hpeldsp instead of dsputil for half-pel functions
This makes vp5 and vp6 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:33 +03:00
Ronald S. Bultje
3bd062bf7f vp3: Use hpeldsp instead of dsputil for half-pel functions
This makes vp3 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:26 +03:00
Ronald S. Bultje
68d8238cca hpeldsp: Add half-pel functions (currently copies of dsputil)
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:17 +03:00
Anton Khirnov
5e83d9aced h264: fully support cropping.
Based on a patch by Vittorio Giovara <vittorio.giovara@gmail.com>

Fixes Bug 378.
2013-04-19 09:28:08 +02:00
Anton Khirnov
a7f46586bf ff_get_buffer(): allocate the frame for max(coded,display) dimensions
Needed e.g. for h264 cropping to work properly.
2013-04-19 09:26:53 +02:00
Anton Khirnov
a0a872d073 indeo3: check motion vectors.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 12:10:42 +02:00
Anton Khirnov
34e6af9e20 indeo3: fix data size check
The data offsets are relative to the bistream header, which is 16 bytes
after the start of the data.
Fixes invalid reads with corrupted files.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 12:09:36 +02:00
Anton Khirnov
66531d634e indeo3: switch parsing the header to bytestream2
Also add an additional sanity check to the alt_quant table.
Fixes invalid reads with corrupted files.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 12:08:49 +02:00
Anton Khirnov
01d376f598 rv10: check that extradata is large enough
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-04-17 11:01:52 +02:00
Anton Khirnov
bac8d38c0a rv10: return meaningful error codes.
Also improve some error messages.
2013-04-17 11:01:17 +02:00
Anton Khirnov
69f6f03cd1 rv10: cosmetics, reformat 2013-04-17 10:58:29 +02:00
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