Commit Graph

14805 Commits

Author SHA1 Message Date
Mans Rullgard
179ae53fed proresdec: fix decode_slice() prototype
Make the function prototype match the argument of
AVCodecCntext.execute() and remove the cast hiding
this mismatch.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-12 00:02:47 +00:00
Mans Rullgard
599b4c6efd x86: cabac: replace explicit memory references with "m" operands
This replaces the explicit offset(reg) memory references with
"m" operands for the same locations.  As a result, one fewer
register operand is needed for these inline asm statements.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 22:29:22 +00:00
Mans Rullgard
4424fe9c02 wmapro: use av_float2int()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 18:55:16 +00:00
Mans Rullgard
a09bb3ba5e lavc: avoid invalid memcpy() in avcodec_default_release_buffer()
When the buf and last pointers are equal, the FFSWAP() results
in an invalid call to memcpy() with same source and destination
on some targets.  Although assigning a struct to itself is valid
C99, gcc does not check for this before calling memcpy().
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 18:54:28 +00:00
Mans Rullgard
3383a53e7d lavu: replace int/float punning functions
The existing functions defined in intfloat_readwrite.[ch] are
both slow and incorrect (infinities are not handled).

This introduces a new header with fast, inline conversion
functions using direct union punning assuming an IEEE-754
system, an assumption already made throughout the code.

The one use of Intel/Motorola extended 80-bit format is
replaced by simpler code sufficient under the present
constraints (positive normal values).

The old functions are marked deprecated and retained for
compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 18:47:19 +00:00
Mans Rullgard
373211d828 Remove extraneous semicolons
These semicolons cause invalid empty top-level declarations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 17:23:24 +00:00
Diego Biurrun
da9cea77e3 Fix a bunch of common typos. 2011-12-11 00:32:25 +01:00
Shitiz Garg
8bd1f1a4c8 ttadec: check channel count as read from extradata.
fixes floating-point exception due to channels being set to 0.
fixes Bug 128.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-10 14:54:19 -05:00
Paul B Mahol
65c1011404 cljr: remove unused code
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-12-10 20:11:28 +01:00
Janne Grunau
8d61eef917 ptx: fix inverted check for sufficient data
Fix regression introduced in 2b53e69.
2011-12-10 17:01:27 +01:00
Janne Grunau
2b53e696c8 ptx: emit a warning on insufficient picture data
Return the whole packet as consumed in this case and not the size the
packet should have had. Move the insufficient data check into the for
condition to fix a ISO C90 error on bigendian.
2011-12-10 15:29:54 +01:00
Kostya Shishkov
19341c58e0 Dxtory capture format decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-10 11:58:03 +01:00
Diego Biurrun
6b60a4c9c9 cljr: K&R cosmetics 2011-12-08 20:28:27 +01:00
Diego Biurrun
1c45c64c9d cljr: return a more sensible value when encountering invalid headers 2011-12-08 20:28:27 +01:00
Diego Biurrun
163682fab3 cljr: drop unnecessary emms_c() calls without MMX code 2011-12-08 20:28:26 +01:00
Mans Rullgard
bbc10185ee cljr: remove useless casts
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-08 15:56:31 +00:00
Mans Rullgard
baf3b6e594 cljr: group encode/decode parts under single ifdefs
This groups the encode/decode parts under single ifdefs and
eliminates the encode_init() function as it merely calls
common_init().  Also fix whitespace in moved code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-08 15:56:30 +00:00
Mans Rullgard
9a1420bfda cljr: remove stray semicolon
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-08 15:56:30 +00:00
Paul B Mahol
ca52bae6ec cljr: add missing return statement in decode_end()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-08 14:44:05 +00:00
John Brooks
8562d9bd6c shorten: avoid abort() on unknown audio types
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-08 11:30:24 +01:00
Paul B Mahol
e93947b7d8 cljr: add encoder
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-12-08 09:47:53 +01:00
Diego Biurrun
4dccfff9dd tests/examples: Mark some variables only used within their files as static. 2011-12-08 01:01:00 +01:00
Diego Biurrun
9a5d6c23c5 tests/tools/examples: Replace direct exit() calls by return. 2011-12-08 01:00:58 +01:00
Paul B. Mahol
04a5eaa1a5 cljr: release picture at end of decoding
Otherwise after transcoding from cljr we get: Found 1 unreleased buffers!

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-08 00:36:32 +01:00
Mans Rullgard
392107ad07 rv40: NEON optimised rv40 qpel motion compensation
Based on patch by Janne Grunau.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-07 22:38:14 +00:00
Hendrik Leppkes
bc057f7592 pcm-mpeg: implement new audio decoding api
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-07 13:52:00 -05:00
Ronald S. Bultje
8b03d7fe95 w32thread: port fixes to pthread_cond_broadcast() from x264. 2011-12-07 10:30:54 -08:00
Rafaël Carré
7efea2a051 dxva2.h: include d3d9.h to define LPDIRECT3DSURFACE9
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-07 16:54:23 +01:00
Diego Biurrun
ff159e7816 doxygen: Replace '\' by '@' in Doxygen markup tags. 2011-12-07 15:29:14 +01:00
Diego Biurrun
ee41963f19 cosmetics: drop some completely pointless parentheses 2011-12-07 15:29:13 +01:00
Paul B. Mahol
fc9489f6ad cljr: simplify CLJRContext
There is no need to have delta, offset and gb in CLJRContext.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-07 15:15:02 +01:00
Konstantin Todorov
4d9ec050a2 Code cleanup - mpegvideo.c - 500-1000line
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-06 11:32:38 -08:00
Janne Grunau
6c88988866 rv40: NEON optimised weighted prediction
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-06 13:48:25 +00:00
Janne Grunau
f5c05b9aa5 rv40: NEON optimised chroma MC
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-06 13:48:25 +00:00
Mans Rullgard
f054a82727 ARM: move NEON H264 chroma mc to a separate file
This allows sharing code with the rv40 version of these functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-06 13:48:24 +00:00
Janne Grunau
42d32cf53c rv34: NEON optimised inverse transform functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-06 13:48:24 +00:00
Diego Biurrun
e873c03ac7 misc Doxygen markup improvements 2011-12-05 13:06:58 +01:00
Diego Biurrun
c68fafe0d2 doxygen: eliminate Qt-style doxygen syntax 2011-12-05 13:06:58 +01:00
Sjoerd Simons
f32fd31858 g722: Change bits per sample to 4
Earlier, bits per sample was defined as 8, since
bits_per_coded_sample was used to indicate whether to ignore
the lower bits of the codeword, having values 6, 7 or 8.

g722 encodes 2 samples into one byte codeword, therefore the
bits per sample is 4. By changing this, the generated timestamps
for streams encoded with g722 become correct.

This makes timestamp generation for g722 data correct (both when
encoding and when demuxing from raw g722 files).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-05 12:41:46 +02:00
Martin Storsjö
6fcbb0f553 g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample
This avoids using bits_per_coded_sample for this information.
bits_per_coded_sample should be 4 for this codec normally,
since two samples are encoded into one 8 bit codeword.

In principle, this might be info that needs to be passed from
a demuxer, and in that case, a private AVOption isn't the best
choice, but no such samples are available at the moment, so
that use case is purely theoretical at the moment.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-05 12:41:23 +02:00
Justin Ruggles
0bafe04917 api-example: update to use avcodec_decode_audio4() 2011-12-04 18:29:51 -05:00
Chris Berov
dc6d043050 adpcmenc: cosmetics: pretty-printing
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-04 17:07:48 -05:00
Chris Berov
541d083a40 ac3dec: cosmetics: pretty-printing
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-04 16:15:48 -05:00
Paul B. Mahol
eda8731285 shorten: remove dead initialization
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-04 15:12:05 -05:00
Reimar Döffinger
7679bd6e60 roqvideodec: set AVFrame reference before reget_buffer.
Otherwise it might return a write-only frame which would break
decoding completely.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-04 16:04:27 +01:00
Carl Eugen Hoyos
1e92d58e44 bmp: fix some 1bit samples.
<= 8bpp BMP images always have palette.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-04 16:04:27 +01:00
Derek Buitenhuis
a548b6cbfc wavpack: Properly clip samples during lossy decode
When decoding lossy WavPack samples, they are supposed
to be clipped, in order to be decoded correctly.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 15:32:21 -08:00
Nathan Adil Maxson
8f8c785ffc zmbv.c: coding style clean-up.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 14:11:39 -08:00
Nathan Adil Maxson
6eedeefe0b xan.c: coding style clean-up.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 14:11:26 -08:00
Konstantin Todorov
363114e813 mpegvideo.c: code cleanup - first 500 lines.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 14:03:27 -08:00