It is only used by gmc/gmc1 which is only used by the MPEG-4
decoder, so move it to Mpeg4DecContext and rename it
to Mpeg4VideoDSP. Also compile it iff the MPEG-4 decoder is compiled.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Currently, SVQ1EncContext is defined in a header that is also
included by the arch-specific code that initializes the one
and only dsp function that this encoder uses directly.
But the arch-specific functions to set this dsp function
do not need anything from SVQ1EncContext. This commit therefore
adds a small SVQ1EncDSPContext whose only member is said
function pointer and renames svq1enc.h to svq1encdsp.h
to avoid exposing unnecessary internals to these init
functions (and the whole mpegvideo with it).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
While this probably never overflows, we are better safe than sorry.
The callback prototype should probably also use ptrdiff_t or size_t,
but I diggress (this would affect the DSP callback prototype).
Reviewed-by: Peter Ross <pross@xvid.org>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Some files currently rely on libavutil/cpu.h to include it for them;
yet said file won't use include it any more after the currently
deprecated functions are removed, so include attributes.h directly.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The affected functions could also be changed into macros, this is the
smaller change to fix it though. And avoids (probably) less readable macros
The extra code should be optimized out when optimizations are done as all values
are known at build after inlining.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
GCC requires the argument to vec_splat_u32 to be a literal. The easiest
way to accomplish this is to change 'shift' to be const in scale (as it
is in the transform routine above), and convert both routines to be
inline. This way, GCC can coerce the values to literals.
Tested on a 970 (Apple G5) and POWER9 (Talos II); passed fate and played
a clip of Big Buck Bunny correctly.
Fixes ticket #7048
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Silences the following gcc warnings:
src/libavcodec/ppc/h264dsp.c: In function 'ff_h264dsp_init_ppc':
src/libavcodec/ppc/h264dsp.c:809:40: warning: assignment from incompatible pointer type
src/libavcodec/ppc/h264dsp.c:810:40: warning: assignment from incompatible pointer type
src/libavcodec/ppc/h264dsp.c:811:40: warning: assignment from incompatible pointer type
src/libavcodec/ppc/h264dsp.c:812:40: warning: assignment from incompatible pointer type
Silences a gcc warning:
src/libavcodec/ppc/svq1enc_altivec.c: In function 'ff_svq1enc_init_ppc':
src/libavcodec/ppc/svq1enc_altivec.c:80:26: warning: assignment from incompatible pointer type
This was broken by the following Libav commit:
4c387c7 ppc: dsputil: do unaligned block accesses correctly
The following tests fail due to this:
fate-checkasm
fate-vsynth1-dnxhd-2k-hr-hq fate-vsynth1-dnxhd-edge1-hr
fate-vsynth1-dnxhd-edge2-hr fate-vsynth1-dnxhd-edge3-hr
fate-vsynth1-dnxhd-hr-sq-mov fate-vsynth1-dnxhd-hr-hq-mov
fate-vsynth2-dnxhd-2k-hr-hq fate-vsynth2-dnxhd-edge1-hr
fate-vsynth2-dnxhd-edge2-hr fate-vsynth2-dnxhd-edge3-hr
fate-vsynth2-dnxhd-hr-sq-mov fate-vsynth2-dnxhd-hr-hq-mov
fate-vsynth3-dnxhd-2k-hr-hq fate-vsynth3-dnxhd-edge1-hr
fate-vsynth3-dnxhd-edge2-hr fate-vsynth3-dnxhd-edge3-hr
fate-vsynth3-dnxhd-hr-sq-mov fate-vsynth3-dnxhd-hr-hq-mov
Fixes trac ticket #5508.
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.
Also adjust parameter names to be "stride" everywhere.
This avoids SIMD-optimized functions having to sign-extend their
stride argument manually to be able to do pointer arithmetic.
Also adjust parameter names to be "stride" everywhere.
... and attempt to preserve compatibility with clang that was
introduced in 311a953c76 (untested)
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit fixes a broken build when compiling libavcodec with LLVM
compiler. These assembly files use non-standard format that is only
supported by GCC compiler. It would be nice to use a common standard
format. With this patch, both GCC and LLVM can build and generate the
same objects.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Restore alphabetical order in lists, break overly long lines, do some
prettyprinting, add some explanatory section comments, group parts
together that belong together logically.