The functions and tables initialised in this function rely on an
initialised DSPContext. Make sure they always have one.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Since IDCT transforming 32-bit input to 8-bit output is unusual and unpractical
for most codecs, move Bink IDCT into separate context. Get rid of an additional
permutation table while at it since SIMD support for Bink IDCT is unlikely to
be implemented in foreseeable future.
Quantisation tables also have to change type to signed for proper
dequantisation of DCT coefficients.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The upcoming gcc 4.7 has more advanced constant propagation
resulting some inline asm operands becoming constants and thus
emitted as literals, sometimes in contexts where this results
in invalid instructions.
This patch changes the constraints of the relevant operands
to "rm" thus forcing a valid type. While obviously suboptimal,
this is what older gcc versions already did, and there is no
change to the code generated with these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
High bitdepth H.264 needs 32-bit transform coefficients, whereas
dnxhd does not. This creates a conflict with the templated
functions operating on DCTELEM data. This patch adds a field
allowing the caller to choose the element size in dsputil_init()
and adds the required functions.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This ensures the linker picks the just built libraries even
if LDFLAGS for some reason contains -L flags pointing at
other directories containing libav libraries.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Using Sun's compiler on Solaris, -xc99 is as much a linker flag as a
compiler flag, so add it to LDFLAGS.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Mpegvideo would free frames as soon as they're not the next or prev
picture. This is fine for a single-threading model, but fails miserably
in a system where pictures can be referenced (as e.g. last/prev pic)
in other threads. Keeping track of ownership of pictures keeps image
references (e.g. motion vectors, or the reference of a motion vector)
alive as long as the picture data itself is alive.
This also happens to fix make THREADS=[3-16] fate-vsynth[12]-error.