Commit Graph

16492 Commits

Author SHA1 Message Date
Diego Biurrun
e0c6cce447 x86: Replace checks for CPU extensions and flags by convenience macros
This separates code relying on inline from that relying on external
assembly and fixes instances where the coalesced check was incorrect.
2012-09-08 18:18:34 +02:00
Hendrik Leppkes
fb4e983e0c x86: mlpdsp: mlp_filter_channel_x86 requires inline asm
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-08 15:41:44 +03:00
Diego Biurrun
1169f0d0af x86: more specific checks for availability of required assembly capabilities 2012-09-07 18:16:04 +02:00
Diego Biurrun
8cb7ed5562 x86: avcodec: Drop silly "_mmx" suffix from dsputil template names 2012-09-07 13:50:52 +02:00
Mans Rullgard
6efb698883 cavsdsp: set idct permutation independently of dsputil
CAVS uses its own idct so using dsputil to set the permutation
is fragile.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-07 11:42:35 +01:00
Mans Rullgard
5fe64d88f6 x86: allow using add_hfyu_median_prediction_cmov on any cpu with cmov
For some reason add_hfyu_median_prediction_cmov is only selected
on 3Dnow-capable CPUs, even though it uses no 3Dnow instructions.
This patch allows it to be selected on any cpu with cmov with the
possibility of being overridden by the mmxext version.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-07 11:42:35 +01:00
Alberto Delmás
290d1022b2 mss2: simplify loop in decode_rle()
It calculates the sum of power of two series, which can be done in one step.

Suggested by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-09-06 20:48:07 +02:00
Alberto Delmás
9699b3a2d7 mss12: avoid unnecessary division in arith*_get_bit()
That division can be replaced with a comparison:
((c->value - c->low) << 1) + 1 >= range

By expanding 'range' definition and simplifying this inequation we obtain
the final expression.

Suggested by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-09-06 20:44:04 +02:00
Alberto Delmás
6ceef07b21 mss2: do not try to read too many palette entries
Reported by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-09-06 20:38:22 +02:00
Janne Grunau
59383d5740 mpegvideo: set AVFrame fields to NULL after freeing the base memory
Prevents dangling pointers and makes access after free more obvious.
Setting AVFrame.qscale_table to NULL is required for successfully
allocating a previously freed Picture with ff_alloc_picture().
2012-09-06 19:02:43 +02:00
Diego Biurrun
ef6ba1f237 x86: dsputil: Do not redundantly check for CPU caps before calling init funcs
The init functions check for CPU capabilities on their own already.
2012-09-06 09:05:52 +02:00
Hendrik Leppkes
d914ea6fd8 x86: vp56: cmov version of vp56_rac_get_prob requires inline asm
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-05 21:30:46 +02:00
Luca Barbato
0db2d94280 dsputil: workaround __VA_ARGS__ missing tokenization for MSVC
A second expansion forces the preprocessor to tokenize properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-05 17:07:24 +03:00
Martin Storsjö
6d65496990 parser: Don't use pc as context for av_dlog
The ParserContext class doesn't have an AVClass, required for
using it as a logging class.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-05 16:01:40 +03:00
Michael Niedermayer
5e997688f8 h264: Remove an assert on current_picture_ptr being null
It is possible in various error paths as well as gap handling
that this has already been allocated. It is not clear why that
would be a problem with the current code, thus disable the
assert to avoid a common assert failure when asserts are enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-05 14:28:41 +03:00
Martin Storsjö
c7b610aa0b avopt: Explicitly store float/double option defaults in .dbl
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:51 +03:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer
2d7d91f06d svq1enc: Set picture_structure correctly
This fixes assert failures when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 18:38:02 +03:00
Michael Niedermayer
91672504a4 mpegvideo: remove last_picture_ptr / h264 assert.
This assert is no longer true since h264 error concealment needs
last_picture_ptr to be set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 18:38:02 +03:00
Michael Niedermayer
19000122a4 mpegvideo_enc: remove assert that has become obsolete with the new API
It now just checks uninitialized and unused data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 18:37:58 +03:00
Michael Niedermayer
2c340596ca elbg: Fix an assert
It seems the condition was flipped from what was intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 18:37:54 +03:00
Martin Storsjö
cc86bd4ccc proresenc: Don't free a buffer not owned by the codec
The data in coded_frame isn't allocated using get_buffer, but
is copied from the input frame to the encoder, so we should
not try to free it ourselves.

This fixes an assert failure when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 15:32:12 +03:00
Martin Storsjö
6d9e74cd41 proresenc: Write the full value in one put_bits call
Previously, the put_bits call writing the value wrote a value
larger than the number of bits specified, failing asserts
in debug mode. There was no actual bitstream writer corruption,
since the overwritten bit already always was set to 1.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 15:31:47 +03:00
Michael Niedermayer
aa264da5bf adpcmenc: Calculate the IMA_QT predictor without overflow
Previously, the value given to put_bits was 10 bits long for positive
predictors, even though 9 bits were to be written. The extra bit could
in some cases overwrite existing bits in the bitstream writer cache.

This fixes a failed assert in put_bits.h, when running a version
built with -DDEBUG.

The fate test result gets slightly improved, thanks to getting rid
of the overwritten bits in the bitstream writer cache.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 15:30:58 +03:00
Diego Biurrun
a84ac7a860 x86: h264dsp: drop some unnecessary ifdefs around prototype declarations 2012-09-04 01:44:59 +02:00
Alberto Delmás
344fbc47c7 mss12: merge decode_pixel() and decode_top_left_pixel()
No meaningful generated code differences using gcc -O3.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-09-03 14:41:59 +02:00
Alberto Delmás
626c1a33ed mss12: reduce SliceContext size from 1067 to 164 KB
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-09-03 14:39:37 +02:00
Alberto Delmás
a97ee41bee mss12: move SliceContexts out of the common context into the codec contexts
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-09-03 14:39:19 +02:00
Diego Biurrun
eb239a577f build: avcodec: order cosmetics 2012-09-03 11:33:49 +02:00
Diego Biurrun
7681b8837a intrax8dsp: Add missing #include to make header standalone 2012-09-03 11:31:47 +02:00
Diego Biurrun
13b6b7e0e2 Delete motion-test tool; it is of doubtful utility. 2012-09-03 10:43:21 +02:00
Mans Rullgard
15616eb042 intrax8: move functions from dsputil to own context
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-02 16:32:57 +01:00
Alberto Delmás
ede3d6400d MSS1 and MSS2: set final pixel format after common stuff has been initialised
This way it won't interfere with WMV9 initialisation inside MSS2 decoder and
avplay will play it fine.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-08-31 08:08:43 +02:00
Alberto Delmás
ee769c6a7c MSS2 decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-08-31 07:37:16 +02:00
Diego Biurrun
17337f54c0 x86: Split inline and external assembly #ifdefs 2012-08-31 01:53:25 +02:00
Diego Biurrun
ec36aa6944 x86: Fix linking with some or all of yasm, mmx, optimizations disabled
Some optimized template functions reference optimized symbols, so they
must be explicitly disabled when those symbols are unavailable.
2012-08-30 19:37:32 +02:00
Diego Biurrun
a886b279a0 x86: cosmetics: Comment some #endifs for better readability 2012-08-30 18:50:33 +02:00
Kostya Shishkov
04fc5c6bde g723_1: add comfort noise generation 2012-08-30 18:21:12 +02:00
Michael Niedermayer
040405b59e utvideoenc: Switch to dsputils' median prediction
Also, align the mangled RGB planes, which is required for the
SIMD versions of dsputils' median predict.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-30 11:59:19 -04:00
Michael Niedermayer
bbefd27e52 utvideoenc: Avoid writing into the input picture
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-30 11:59:19 -04:00
Anton Khirnov
a2318326f1 lavc: add lossy/lossless codec properties. 2012-08-30 13:55:55 +02:00
Anton Khirnov
bbabeb56fa Add reminders to update the codec descriptor list with new codec IDs. 2012-08-29 10:47:59 +02:00
Diego Biurrun
2e6f93a284 x86: Always compile files with functions that are called unconditionally 2012-08-29 00:27:06 +02:00
Diego Biurrun
2f2aa2e542 x86: mpegvideoenc: fix linking with --disable-mmx
The optimized dct_quantize template functions reference optimized
fdct symbols, so these functions must only be enabled if the relevant
optimizations have been enabled by configure.
2012-08-29 00:26:56 +02:00
Diego Biurrun
d39791bf39 x86: mpegvideoenc: Do not abuse HAVE_ variables for template instantiation
This avoids trouble if HAVE_ variables are used elsewhere in the file.
2012-08-29 00:14:52 +02:00
Martin Storsjö
3ad9eac5a0 testprogs: Remove unused includes
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-29 00:23:51 +03:00
Diego Biurrun
bcc45d6348 x86: avcodec: Drop silly "_mmx" suffixes from filenames 2012-08-28 18:37:34 +02:00
Diego Biurrun
efbd04c332 x86: avcodec: Drop silly "_sse" suffixes from filenames 2012-08-28 18:37:33 +02:00