Old version divided it wrong, which resulted in chroma drift (visible on FATE
sample too as dirty trails left by clouds).
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Use AV_PKT_FLAG_CORRUPT flag to mark packets that might be incomplete
or have errors. Formats that have a mean to validate their packets
should use this flag to deliver such information instead of silently
dropping the packets.
Inspection of compiled code shows gcc handles these fine on its own.
Benchmarking also shows no measurable speed difference.
Removing the remaining cases in get_cabac_bypass_sign_x86() does
cause more substantial changes to the compiled code with uncertain
impact.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The current checks on MMCO parameters prohibits a "max long term frame index
plus 1" of 16 (frame idx of 15) for the "set max long term frame index" MMCO.
Fix this off-by-one error to allow the full range of legal values.
"SAR" (Sample Aspect Ratio) is globally preferred over "PAR" (Pixel
Aspect Ratio), although the two terms share the same semantics.
For example the corresponding AVStream field is called
sample_aspect_ratio, and libavfilter has a filter named setsar.
Therefore prefer the term "SAR" over "PAR" in the
libavformat/utils.c:dump_stream_format() and avcodec_string() output
for avoiding confusion.
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>
Avoid the use of the brittle/inconsistent information in
PixFmtInfo.depth, and implement a possibly more robust logic which
exposes the information in pixdesc.
Also allow the removal of PixFmtInfo.depth, since this is the only use
of it.
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>
We dereferenced the pointer two lines above, no point in
checking for NULL afterwards.
In addition it cannot be NULL the way it was initialized
just one line further above.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
The field is only used for checking if a format is YUV planar
and if the format is paletted.
This patch replaces the current is_planar_yuv() code with a function
which uses the pixdesc information. The new implementation is less
efficient, but this should not be an issue as the functions which use
it (av_picture_crop/pad()) are deprecated and currently never used in
the codebase.