Commit Graph

361 Commits

Author SHA1 Message Date
Ronald S. Bultje 8c53d39e7f lavc: introduce VideoDSPContext
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-20 13:40:45 +01:00
Mans Rullgard a384f6a7f7 ppc: replace pointer casting with AV_COPY32
This removes warnings about strict aliasing violations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Mans Rullgard 031aac9861 ppc: fix some unused variable warnings
The third argument of OP_U8_ALTIVEC is evaluated at most once so
there is no need for a potentially unused temporary variable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Diego Biurrun ac56ff9cc9 build: non-x86: Only compile mpegvideo optimizations when necessary 2012-10-09 14:45:59 +02:00
Mans Rullgard f79364b2c3 ppc: fix Altivec build with old compilers
The vec_splat() intrinsic requires a constant argument for the
element number, and the code relies on the compiler unrolling
the loop to provide this.  Manually unrolling the loop avoids
this reliance and works with all compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-08 23:14:51 +01:00
Mans Rullgard 642b4efaf7 ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-05 22:33:32 +01:00
Martin Storsjö 33e112847d Add more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 10:49:54 +03:00
Martin Storsjö 70766c2182 Add some more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 23:48:48 +03:00
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Justin Ruggles a35738f424 dsputil: ppc: cosmetics: pretty-print 2012-07-22 17:38:55 -04:00
Mans Rullgard ffdd93a25e ppc: fix build with altivec disabled
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-18 13:34:42 +01:00
Mans Rullgard 28f9ab7029 vp3: move idct and loop filter pointers to new vp3dsp context
This moves all VP3-specific function pointers from dsputil to a
new vp3dsp context.  There is no reason to ever use the VP3 IDCT
where an MPEG2 IDCT is expected or vice versa.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-18 10:32:19 +01:00
Diego Biurrun af10feadc2 ppc: Rename H.264 optimization template file for consistency. 2012-06-12 23:20:05 +02:00
Justin Ruggles d5a7229ba4 Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
2012-06-08 13:14:38 -04:00
Justin Ruggles 98db4e2a4e PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil
This will allow for easier implementation of Altivec functions in libraries
other than libavcodec.
2012-06-08 13:14:38 -04:00
Diego Biurrun 3ea5429489 ppc: Drop unused header regs.h 2012-05-22 11:54:53 +02:00
Mans Rullgard c81d1e2390 ppc: add const where needed in scalarproduct_int16_altivec()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard ce82dad7eb ppc: remove shift parameter from scalarproduct_int16_altivec()
The shift parameter was removed from this interface in 7e1ce6a.
This updates the Altivec implementation to match.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard 4c387c7070 ppc: dsputil: do unaligned block accesses correctly
To load unaligned vector data in the usual way, explicit vec_ld()
should be used rather than dereferencing a pointer to a vector type.
When the VSX extension is enabled, gcc may compile vector pointer
dereferences using the VSX lxvw4x instruction instead of the lvx
instruction typically used with Altivec/VMX.  As the behaviour of
these instructions with unaligned addresses differs, it is important
that only lvx is used here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard 2bcbd98459 Remove lowres video decoding
This feature is complex, of questionable utility, and slows down
normal decoding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 18:56:19 +01:00
Diego Biurrun 0f53601ac6 ppc: drop unused function dct_quantize_altivec()
This also allows dropping some PPC-specific ugliness from dsputil.[ch].
2012-04-18 18:53:54 +02:00
Diego Biurrun 7bb3a302fe build: Consistently handle conditional compilation for all optimization OBJS. 2012-04-12 09:00:49 +02:00
Diego Biurrun 02c39f056a ppc: Add/remove a number of const qualifiers to fix related warnings. 2012-04-09 20:39:33 +02:00
Diego Biurrun 72ccfb3cb7 build: ppc: drop stray leftover backslash 2012-03-26 16:37:57 +02:00
Diego Biurrun ad0e31f134 build: prettyprinting cosmetics 2012-03-26 13:00:10 +02:00
Ronald S. Bultje bd66f073fe vp8: change int stride to ptrdiff_t stride.
On 64bit platforms with 32bit int, this means we won't have to sign-
extend the integer anymore.
2012-03-02 10:31:50 -08:00
Martin Storsjö 210f72845c ppc: Add ff_ prefix to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:29 +02:00
Martin Storsjö efd29844eb mpegvideo: Add ff_ prefix to nonstatic functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:23 +02:00
Martin Storsjö 9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Diego Biurrun 0bba26466f cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
Diego Biurrun 32f3c541bc doxygen: Do not include license boilerplates in Doxygen comment blocks. 2012-02-06 19:39:24 +01:00
Diego Biurrun 3dc99a18d4 cosmetics: drop some pointless parentheses 2012-01-07 22:13:07 +01:00
Diego Biurrun ff159e7816 doxygen: Replace '\' by '@' in Doxygen markup tags. 2011-12-07 15:29:14 +01:00
Mans Rullgard b034c95cc1 h264: fix ppc/altivec build
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-21 12:49:01 +01:00
Ronald S. Bultje c2d337429c H264: change weight/biweight functions to take a height argument.
Neon parts by Mans Rullgard <mans@mansr.com>.
2011-10-21 01:00:45 -07:00
Baptiste Coudurier 76741b0e56 h264: 4:2:2 intra decoding support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-21 01:00:41 -07:00
Mans Rullgard 6e4a35ced9 ppc: fix 32-bit PIC build
On 32-bit ppc, the GOT pointer must be loaded manually.
This adds a "get_got" assembler macro to compute the
GOT address.  The "movrel" macro is updated to take an
additional parameter containing the GOT address since
no register is reserved for this purpose on ppc32.
These changes have no effect on ppc64 builds.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-25 17:27:48 +01:00
Mans Rullgard ca6a904656 ppc: remove redundant setting of Altivec IDCT
This is already set by dsputil_init_ppc() and is best done in only
one place.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-27 20:14:12 +01:00
Mans Rullgard a617c6aaa3 dsputil: update per-arch init funcs for non-h264 high bit depth
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Mans Rullgard 874f1a901d dsputil: template get_pixels() for different bit depths
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Mans Rullgard 0a72533e98 jfdctint: add 10-bit version
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Mans Rullgard e7a972e113 simple_idct: add 10-bit version
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-20 17:49:48 +01:00
Diego Biurrun 21aed0ed92 ppc: remove disabled code 2011-07-16 02:56:52 +02:00
Mans Rullgard 6cbf2420b9 PPC: use Altivec IMDCT only for supported sizes
The Altivec IMDCT works with size 32 and higher only.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-05 16:01:56 +01:00
Jason Garrett-Glaser c90b94424c 4:4:4 H.264 decoding support
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
2011-06-13 21:16:30 -07:00
Diego Biurrun 1f6b9cc31d Replace some nonstandard DEBUG_* preprocessor directives by plain DEBUG. 2011-06-07 13:20:58 +02:00
Mans Rullgard 0b5e44ed29 mpegaudiodsp: fix x86 and ppc makefiles
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 16:32:24 +01:00
Mans Rullgard c4f5c2d6f4 Move some mpegaudio functions to new mpegaudiodsp subsystem
This separation allows these functions to be used in a cleaner
fashion from other codecs (e.g. qdm2) and simplifies creating
optimised versions of them.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 12:25:34 +01:00
Oskar Arvidsson 19a0729b4c Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
This patch lets e.g. dsputil_init chose dsp functions with respect to
the bit depth to decode. The naming scheme of bit depth dependent
functions is <base name>_<bit depth>[_<prefix>] (i.e. the old
clear_blocks_c is now named clear_blocks_8_c).

Note: Some of the functions for high bit depth is not dependent on the
bit depth, but only on the pixel size. This leaves some room for
optimizing binary size.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:36 -04:00
Ronald S. Bultje 18b6a69ce9 Revert "VC1: merge idct8x8, coeff adjustments and put_pixels."
This reverts commit f8bed30d8b. The reason
for this is that the overlap filter, which runs after IDCT, should run
on unclamped values, and thus IDCT and put_pixels() cannot be merged if
we want to attempt to be bitexact.
2011-05-04 07:40:01 -04:00