Commit Graph

14600 Commits

Author SHA1 Message Date
Justin Ruggles
f7f7c1942b adpcmdec: remove unneeded zeroing of *data_size 2011-10-14 15:53:40 -04:00
Mans Rullgard
d341d5fd2c dnxhdenc: fixed signed multiplication overflow
The low 32 bits of a multiplication are the same for signed
and unsigned operands.  Casting to unsigned before multiplying
is thus equivalent while avoiding signed overflow, which is
undefined by the C99 standard.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-14 20:45:22 +01:00
Ronald S. Bultje
05c8f119cc proresdsp: fix function prototypes.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-14 21:34:46 +02:00
Ronald S. Bultje
f78cd0c243 prores-idct: fix overflow in c code.
Fix the fate ref for prores-422_proxy by reverting the changes to it
in commit f492df0927

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-14 21:34:20 +02:00
Janne Grunau
19ec283f49 prores: add missing feature warning for alpha 2011-10-14 21:07:53 +02:00
Dustin Brody
582f231142 lavc: add a flag-based error_recognition field to AVCodecContext and deprecate non-flag-based ER field
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-14 09:00:21 +02:00
Dustin Brody
ac90a71459 lavc: rename deprecation symbol FF_API_VERY_AGGRESSIVE to FF_API_ER
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-14 09:00:04 +02:00
Justin Ruggles
617a51f9b7 shorten: remove the flush function.
The shorten decoder does not support seeking.
2011-10-13 16:31:16 -04:00
Justin Ruggles
c6ac30c84b truespeech: use sizeof() instead of hardcoded sizes 2011-10-13 16:26:00 -04:00
Justin Ruggles
6d55506c8b truespeech: remove unneeded variable, 'consumed'
increment the 'buf' pointer instead, and consume the whole packet.
2011-10-13 16:26:00 -04:00
Justin Ruggles
b84048935e truespeech: simplify truespeech_read_frame() by using get_bits() 2011-10-13 16:25:59 -04:00
Justin Ruggles
5e5ce70f19 truespeech: decode directly to output buffer instead of a temp buffer 2011-10-13 16:25:59 -04:00
Justin Ruggles
3e7a176759 truespeech: check to make sure channels == 1 2011-10-13 16:25:59 -04:00
Justin Ruggles
a8f8db2636 truespeech: check for large enough output buffer rather than truncating output 2011-10-13 16:25:59 -04:00
Justin Ruggles
595cf1a1aa truespeech: remove unneeded zero-size packet check.
This is already checked in avcodec_decode_audio3()
2011-10-13 16:25:59 -04:00
Justin Ruggles
82be06bbb3 mlpdec: return meaningful error codes instead of -1 2011-10-13 15:13:02 -04:00
Justin Ruggles
e1b8d88d52 mlpdec: remove unnecessary wrapper function 2011-10-13 15:13:02 -04:00
Justin Ruggles
37b67f1bff mlpdec: only calculate output size once 2011-10-13 15:13:02 -04:00
Justin Ruggles
caa845851d mlpdec: validate that the reported channel count matches the actual output
channel count
2011-10-13 15:13:02 -04:00
Mans Rullgard
b45eb9d619 pcm: reduce pointer type casting
Making 'samples' a pointer to uint8_t simplifies the DECODE
macro and reduces the amount of type casting overall.

This also fixes some signed overflows on left shift.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-13 17:56:13 +01:00
Mans Rullgard
f59bb3d8f3 mathops: remove undefined behaviour from sign_extend()
This function intentionally overflows the signed range on
the left shift.  Using this type-punning avoids errors from
the overflow checker without disabling this test globally.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-13 15:40:16 +01:00
Kostya Shishkov
42feaf4070 vc1: explicitly zero interlaced mode coding variables for progressive mode
Both v->fcm and v->field_mode are used in common code, now they won't be
reset for progressive frame after interlaced one causing writing past the
frame end for example.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-13 07:35:07 -07:00
Jean First
47a1d794db tiffenc: initialize forgotten avctx. 2011-10-12 18:20:18 -04:00
Kostya Shishkov
50f9721904 vc1: more prettyprinting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya Shishkov
94e725ca2b vc1: prettyprint some tables
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya Shishkov
b18c68ad25 vc1: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Anton Khirnov
145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Anton Khirnov
641c7afe3c AVOptions: add new API for enumerating children.
This will allow the caller to enumerate child contexts in a generic way
and since the API is recursive, it also allows for deeper nesting (e.g.
AVFormatContext->AVIOContext->URLContext)

This will also allow the new setting/reading API to transparently apply
to children contexts.
2011-10-12 16:51:16 +02:00
Janne Grunau
1bca8f4bc5 rv34: move inverse transform functions to DSP context 2011-10-12 15:52:22 +02:00
Mans Rullgard
318efbfc10 h264: change unsupported bit depth message to error level
Unsupported bit depth is certainly an error the user will
want to know about.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-12 12:39:52 +01:00
Mans Rullgard
c682514a8f qdm2: fix signed multiplication overflow
This code relies on the result wrapping as for unsigned
values, and the sign is not used.  Thus an unsigned type
is proper here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-12 12:28:08 +01:00
Anton Khirnov
46c3c53bae libx264: support yuv422/444 output. 2011-10-12 08:27:36 +02:00
John Stebbins
5f3fb59953 fix AC3ENC_OPT_MODE_ON/OFF
The values were reversed.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-11 14:57:58 -04:00
Mans Rullgard
fdba370f8a h264: fix HRD parameters parsing
The bit_rate_value_minus1 and cpb_size_value_minus1 elements
allow a wider range than get_ue_golomb() supports.  This
adds a get_ue_golomb_long() function supporting up to 31
leading zeros, which is the maximum for these syntax
elements, and uses it in decode_hrd_parameters().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 18:24:51 +01:00
Ronald S. Bultje
91f4732913 prores: implement multithreading.
60% speedup (overall decoding time) at 2 threads, and another 60%
speedup at 4 threads.
2011-10-11 07:50:49 -07:00
Ronald S. Bultje
e3f530feca prores: idct sse2/sse4 optimizations.
~3.0-3.5x as fast as original C version, 1.6x as fast overall.
2011-10-11 07:50:48 -07:00
Ronald S. Bultje
92fb52d906 prores: extract idct into its own dspcontext and merge with put_pixels. 2011-10-11 07:50:48 -07:00
Mans Rullgard
8babfc033e h264: fix invalid shifts in init_cavlc_level_tab()
The level_code expression includes a shift which is invalid in
those cases where the value is not used.  Moving the calculation
to the branch where the result is used avoids these.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 15:00:56 +01:00
Diego Biurrun
4b7f49082f flashsv: return more meaningful error value 2011-10-11 14:28:23 +02:00
Diego Biurrun
f9a9c8f9bc flashsv: fix typo in av_log() message 2011-10-11 14:28:23 +02:00
Justin Ruggles
ff1f89de2d smacker: validate channels and sample format. 2011-10-11 07:48:16 -04:00
Justin Ruggles
cf044f8bff smacker: check buffer size before reading output size 2011-10-11 07:48:16 -04:00
Justin Ruggles
e190e453bd smacker: validate number of channels 2011-10-11 07:48:16 -04:00
Mans Rullgard
be1242a3f2 h264: fix detection of optional trailing PPS elements
The PPS may contain a few trailing elements whose presence is
only signalled by data remaining after the the mandatory part
has been parsed.  The current code fails to take into account
the rbsp_trailing_bits() when deciding whether to parse these
optional elements.  Assuming no unnecessary padding bytes are
passed to this function, the optional elements are present if
either more than 8 extra bits remain or the remaining bits do
not form a valid rbsp_trailing_bits() after the mandatory PPS
elements have been parsed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 12:05:51 +01:00
Mans Rullgard
c79d2a20ba sipr: fix get_bits(0) calls
Zero-length get_bits() is undefined, must check before calling.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 12:05:51 +01:00
Mans Rullgard
cb668476ab motion_est: make MotionExtContext.map_generation unsigned
The way this value is used, it should be an unsigned type.
While the numerical value has no meaning, unsigned wraparound
is relied upon.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 12:05:50 +01:00
Laurent Aimar
4c7a232fc8 h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:36 +02:00
Laurent Aimar
e8ac80fb2c error_resilience: fix the check for missing references in ff_er_frame_end() for H264
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:36 +02:00
Laurent Aimar
1b1182ce97 4xm: prevent NULL dereference with invalid huffman table
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:36 +02:00
Laurent Aimar
8d518a9c4f 4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffers
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:35 +02:00
Laurent Aimar
dc64f203a6 ptx: check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:15 +02:00
Laurent Aimar
04a845caa7 tiffdec: fix out of bound reads/writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:13 +02:00
Laurent Aimar
46cb2f6a29 eacmv: check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:13 +02:00
Laurent Aimar
8df8a87e3f eacmv: fix potential pointer arithmetic overflows
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar
c7f89064e2 adpcm: fix out of bound reads due to integer overflow
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar
2475f1a83c anm: prevent infinite loop
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar
de049a95f4 avs: check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Baptiste Coudurier
11a32d53ca dnxhddec: handle cid change in bitstream. 2011-10-10 09:40:26 -07:00
Kostya Shishkov
109d8aa1e6 vc1: K&R reformatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-10 18:35:35 +02:00
Justin Ruggles
8f8f5ae991 ra288: log an error message when output buffer is too small.
also return AVERROR(EINVAL) instead of -1.
2011-10-10 11:38:58 -04:00
Justin Ruggles
fa6be04bf7 ra288: use a more descriptive calculation for output data size 2011-10-10 11:38:58 -04:00
Justin Ruggles
f10524d51c ra144: use macro constants to make the code more understandable. 2011-10-10 11:38:58 -04:00
Justin Ruggles
cadd4d332a ra144dec: log an error message when output buffer is too small.
also return AVERROR(EINVAL) instead of -1.
2011-10-10 11:38:58 -04:00
Justin Ruggles
80bdf7e0b7 ra144dec: use a more descriptive calculation for output data size 2011-10-10 11:38:57 -04:00
Mashiat Sarker Shakkhar
51757ac789 lavc: Micro version bump for VC1 interlaced decoding support
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-10 15:26:37 +02:00
Mashiat Sarker Shakkhar
cad16562c8 vc1dec: interlaced stream decoding support 3/3
Cosmetics: break some lines and reformat TODOs

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-10 15:26:37 +02:00
Mashiat Sarker Shakkhar
f0c02e1cbc vc1dec: interlaced stream decoding support 2/3
Cosmetics: reformat some data tables in vc1data.c

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-10 15:26:37 +02:00
Mashiat Sarker Shakkhar
d5b015e42d vc1dec: interlaced stream decoding support 1/3
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-10 15:26:37 +02:00
Gwenole Beauchesne
53efb758c0 vaapi: Fix VC-1 decoding (reconstruct bitstream TTFRM correctly).
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-10 14:11:02 +02:00
Mans Rullgard
581810f502 mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 23:28:54 +01:00
Mans Rullgard
aa498fef0d mpeg124: use sign_extend() function
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 23:22:14 +01:00
Mans Rullgard
633ddb8519 ac3dec: use get_sbits() instead of manually sign-extending
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 23:21:31 +01:00
Mans Rullgard
84dda40762 4xm: fix signed overflow
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 23:13:35 +01:00
Mans Rullgard
ba3f07d061 wmavoice: fix a signed overflow
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 23:04:03 +01:00
Mans Rullgard
05795f35be mpegvideo_enc: fix a signed overflow
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 23:03:46 +01:00
Mans Rullgard
282847ba80 zmbv: remove memcpy() of decoded frame
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 13:58:19 +01:00
Mans Rullgard
2f329db90e mpeg12enc: use sign_extend() function
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 13:58:17 +01:00
Mans Rullgard
60f10e0ad3 h264pred: use unsigned types for pixel values, fix signed overflows
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 12:27:19 +01:00
Mans Rullgard
4d1418cd4f h264: fix signed overflows in x*0x01010101 expressions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 12:27:19 +01:00
Mans Rullgard
d66b9dec11 h264pred: remove unused variables
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 12:27:19 +01:00
Mans Rullgard
bb59156606 vp8: fix signed overflows
In addition to avoiding undefined behaviour, an unsigned type
makes more sense for packing multiple 8-bit values.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:03:55 +01:00
Mans Rullgard
e708afd3c0 motion_est: fix some signed overflows
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:03:55 +01:00
Mans Rullgard
559c244d42 dca: fix signed overflow in shift
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:03:55 +01:00
Mans Rullgard
d12294304a aacdec: fix undefined shifts
Since nnz can be zero, this is needed to avoid a shift by 32.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:03:55 +01:00
Laurent Aimar
a00676e48e bink: Check for various out of bound writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-08 16:32:01 +02:00
Laurent Aimar
24adf7832b bink: Check for out of bound writes when building tree
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-08 16:25:56 +02:00
Mans Rullgard
ac6eab1496 put_bits: fix invalid shift by 32 in flush_put_bits()
If flush_put_bits() is called when the 32-bit buffer is empty,
e.g. after writing a multiple of 32 bits, and invalid shift by
32 is performed.  Since flush_put_bits() is called infrequently,
this additional check should have negligible performance impact.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 02:41:58 +01:00
Laurent Aimar
9bd854b1ff mpc8: Check out of bound bands limit
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 17:15:45 +02:00
Laurent Aimar
7d17a794f0 xan: Prevent NULL dereference with missing palette
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 17:15:31 +02:00
Laurent Aimar
3db3fdf4c6 xan: Check for out of bound reads in xan_huffman_decode()
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:32 +02:00
Laurent Aimar
3e0757c2a8 xan: Fixed out of bound accesses in xan_unpack()
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:32 +02:00
Laurent Aimar
1cd0a55163 motionpixels: Prevent calling init_vlc() with invalid parameters
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:32 +02:00
Laurent Aimar
5f05cf4ea9 shorten: Fix out of bound writes in fix_bitshift()
The data pointers s->decoded[*] already take into account s->nwrap.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
1720603287 dsicinav: Check for out of bounds writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
64263dd526 tiertexseqv: Check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
4fd56f842c quickdraw: Check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
e3ca9b93d9 dsicinav: Check for out of bounds reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
210c80331e motionpixels: Fix the size of workspace buffers
Some buffers must be mod 4 in width and/or height.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
d337dd3a90 motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
d99427cb8b wmavoice: Check for corrupted extra data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
1c1449b548 wmavoice: Check for out of bound writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
06be075cda xan: Prevent NULL dereferences with missing reference frame
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
c7e631986b bink: Prevent NULL dereferences with missing reference frame
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
2c6cf13940 wavpack: Reset internal state on corrupted blocks
wavpack_decode_block() supposes that it is called back with the exact
same buffer unless it has returned with an error. With multi-channels
files, wavpack_decode_frame() was breaking this assumption.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
2c1ba79941 wmapro: Validate the number of audio channels before using it
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Laurent Aimar
95010d18b2 shorten: Prevent block size from increasing
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Laurent Aimar
124a16f678 xan: Prevent out of bound accesses
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Michael Niedermayer
14c21c1ff5 H264: Only wait before triggering ff_thread_setup_complete() until the next slice that contains a start-of-field/frame macroblock
This allows concurrent decoding of the last field/frame, rather than
only the last slice, of data packets with multiple NAL units packed
together.

This will fix the slowdown reported in e.g. bug 52.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-07 14:23:26 +02:00
Laurent Aimar
a72cad0a6c vp6: Reset the internal state when aborting key frames header parsing
It prevents leaving the state only half initialized.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 00:37:32 +02:00
Laurent Aimar
3d09d0017d vp56: Release old pictures after a resolution changes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 00:27:24 +02:00
Laurent Aimar
066fff755a vp6: Check for huffman tree build errors
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 00:27:03 +02:00
Laurent Aimar
0ec6d6e9b6 vp56: Check for missing reference frame data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 00:25:43 +02:00
Laurent Aimar
d239d4b447 cinepak: Fix invalid read access on extra data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-06 23:35:29 +02:00
Laurent Aimar
c0cbe36b18 vmd: fix segfaults on corruped streams
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-06 23:33:09 +02:00
Laurent Aimar
3a742470a8 cook: Fix js_vlc_bits value validation for joint stereo
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-06 23:31:06 +02:00
Laurent Aimar
69a0bce753 Fixed deference of NULL pointer in motionpixels decoder.
Some of the arguments given to init_vlc() come from the stream
and can be corrupted.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-06 22:29:12 +02:00
Anton Khirnov
d97efd7f87 libx264: support 9- and 10-bit output. 2011-10-06 09:16:06 +02:00
Ronald S. Bultje
4418aa9cb3 h264: correct implicit_weight for field-interlaced pictures. 2011-10-05 04:01:23 -07:00
Ronald S. Bultje
330deb7592 mpegvideo: set correct offset for edge emulation buffer.
Using the old code, half of it was unused and the other half was too
small for e.g. >8bpp interlaced data, causing random buffer overruns.
2011-10-05 04:01:23 -07:00
Ronald S. Bultje
0884dd5a1b mpegvideo: fix position of bottom edge.
It was wrong in colorspaces where horizontal and vertical chroma
subsampling are not the same, e.g. 422.
2011-10-05 04:01:23 -07:00
Diego Biurrun
e83c2ddebf Fix 'heigth' vs. 'height' typos. 2011-10-05 11:12:01 +02:00
Anton Khirnov
a4ea00d021 lavc/lavf: use unique private classes.
This is needed by the new AVOptions API.
2011-10-05 07:52:30 +02:00
Anton Khirnov
0ba1e1978d lavc: use designated initializers for av_codec_context_class 2011-10-05 07:52:05 +02:00
Justin Ruggles
dd376b1a12 qcelpdec: cosmetics: do not add line break before opening bracket in 'for',
'while', 'if/else', and 'switch' statements.

also fixes some spacing, but only if already changing a line
2011-10-04 17:10:11 -04:00
Justin Ruggles
e43dd3d2a8 qcelp: check output buffer size before decoding 2011-10-04 17:10:11 -04:00
Chris Rankin
bde2570013 qcelpdec: fix the return value of qcelp_decode_frame().
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-04 17:09:53 -04:00
Justin Ruggles
1b5a189f06 sipr: fix the output data size check and only calculate it once. 2011-10-04 16:13:20 -04:00
Diego Biurrun
12bd8532cf Synchronize various 4CCs and codec tags from FFmpeg. 2011-10-04 11:58:53 +02:00
Justin Ruggles
7d49f79f1c qdm2: check output buffer size before decoding 2011-10-03 21:34:19 -04:00
Laurent Aimar
5a19acb17c Fix out of bound reads in the QDM2 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-03 21:34:19 -04:00
Laurent Aimar
291d74a46d Check for out of bound writes in the QDM2 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-03 21:34:19 -04:00
Anton Khirnov
24ec9ac475 libvpx: fix build with older libvpx versions.
VPX_ERROR_RESILIENT_DEFAULT and VPX_ERROR_RESILIENT_PARTITIONS weren't
defined before 4cb0ebe5b27d35ccc2a78c1d16f2622ddef21f74 (CommitDate: Tue
Jun 28 11:10:17 2011)
2011-10-03 13:06:24 +02:00
Mans Rullgard
6308729e68 ARM: check for inline asm 'y' operand modifier support
The inline asm added in bf5d46d uses the 'y' modifier which
is only supported from gcc 4.5.  This check allows building
with older compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-03 08:56:24 +01:00
Justin Ruggles
5674d4b0a3 mpc8: check output buffer size before decoding 2011-10-02 10:34:39 -04:00
Justin Ruggles
8290d1f38b mpc7: return error if packet is too small. 2011-10-02 10:34:39 -04:00
Justin Ruggles
c8b5c4d274 mpc7: check output buffer size before decoding 2011-10-02 10:34:39 -04:00
Justin Ruggles
fac6b7f9f2 nellymoserdec: allocate float_buf only when decoding to int16 2011-10-02 10:19:04 -04:00
Justin Ruggles
32b484464c nellymoserdec: use NELLY_BUF_LEN instead of 128 2011-10-02 10:19:04 -04:00
Justin Ruggles
ded0800d44 nellymoserdec: use NELLY_BLOCK_LEN instead of 64 when appropriate. 2011-10-02 10:19:04 -04:00
Justin Ruggles
84464b2e7f nellymoserdec: allow user to request SAMPLE_FMT_FLT for output samples. 2011-10-02 10:19:04 -04:00
Justin Ruggles
8b31c086b6 nellymoser: check output buffer size before decoding 2011-10-02 10:19:04 -04:00
Luca Barbato
0e5cc174bb win32: improve threading algorithm warning
If no threading is requested do not issue warning about unsupported
threading algorithm.
2011-10-02 08:58:08 +02:00
Anton Khirnov
b036a7180c lavc: add video/audio/encoding flags to global_quality option 2011-10-01 07:16:56 +02:00
Luca Barbato
6450f26c9a libvpxenc: use libvpx's own defaults for some parameters
Specifically, qmin/qmax, gop_size and keyint_min.

Fixes bug 47.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-01 07:16:56 +02:00
Luca Barbato
e3eb015ba4 vpxenc: add private options
Make libvpx support close to the libx264 one. Thanks to
Jan Gerber <j@v2v.cc> for the support.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-01 07:16:56 +02:00
Justin Ruggles
08bd22a61b dpcm: return error if packet is too small 2011-09-30 18:15:53 -04:00
Justin Ruggles
0354fb7ebe dpcm: use smaller data types for static tables 2011-09-30 18:15:53 -04:00
Justin Ruggles
5a54d51017 dpcm: use sol_table_16 directly instead of through the DPCMContext. 2011-09-30 18:15:53 -04:00
Justin Ruggles
f47f7efd14 dpcm: replace short with int16_t 2011-09-30 18:15:53 -04:00
Justin Ruggles
8d77d12a2b dpcm: check to make sure channels is 1 or 2. 2011-09-30 18:15:53 -04:00
Justin Ruggles
4bad464e7f dpcm: misc pretty-printing 2011-09-30 18:15:53 -04:00
Justin Ruggles
1de8401c56 dpcm: remove unnecessary variable by using bytestream functions.
Uses 'buf' directly instead of a separate iterator variable 'in'.
2011-09-30 18:15:53 -04:00
Justin Ruggles
fc6faee0d1 dpcm: move codec-specific variable declarations to their corresponding decoding blocks. 2011-09-30 18:15:53 -04:00
Justin Ruggles
989bb7bd04 dpcm: consistently use the variable name 'n' for the next input byte. 2011-09-30 18:15:52 -04:00
Justin Ruggles
04b24cf94b dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2.
Uses the native sample format for the codec instead of left-shifting all
samples by 8.
2011-09-30 18:15:52 -04:00
Justin Ruggles
76db17dc7d dpcm: calculate and check actual output data size prior to decoding. 2011-09-30 18:15:52 -04:00
Justin Ruggles
3db8db406f dpcm: factor out the stereo flag calculation 2011-09-30 18:15:52 -04:00
Justin Ruggles
b09c7eefb7 dpcm: cosmetics: rename channel_number to ch
Make the code easier to read.
2011-09-30 18:15:52 -04:00
Carl Eugen Hoyos
bcb1555489 dxva2_h264: pass the correct 8x8 scaling lists
Copy the Inter 8x8 scaling list as second 8x8 matrix into DXVA2's
quantization matrix data structure instead of a potentially unset
Intra chroma scaling matrix.

Fix dxva2 decoding for some H264 samples.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-30 20:15:17 +02:00
Mans Rullgard
bf5d46d8e6 dca: NEON optimised high freq VQ decoding
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-30 19:01:23 +01:00
Justin Ruggles
6326afd5e9 avcodec: reject audio packets with NULL data and non-zero size
There is no valid reason the user should ever send such packets in the
first place, but the documentation for CODEC_CAP_DELAY states that the
codec is guaranteed not to get a NULL packet unless that capability is
set. That isn't true without preventing this case.
2011-09-30 11:02:50 -04:00
Joakim Plate
dcce09d64b dxva: Add ability to enable workaround for older ATI cards
The workaround needs to be enabled per PCI ID which cannot be detected inside
libavcodec. So add a flag to manually enable the alternate behavior.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-30 11:17:53 +02:00
Justin Ruggles
e562fbd003 adpcm: move codec-specific variable declarations to the sections for the corresponding codecs. 2011-09-29 16:54:01 -04:00
Justin Ruggles
9662539c10 adpcm: check buffer size in Funcom ISS decoder before reading header.
Also use the post-header data size to control termination of the main
decoding loop.
2011-09-29 16:54:01 -04:00
Justin Ruggles
ba5d2890d7 adpcm: simplify reading of Funcom ISS frame header. 2011-09-29 16:54:01 -04:00
Justin Ruggles
5c9eb4fabb adpcm: check buffer size in IMA DK4 decoder before reading header.
Also use the post-header data size to control termination of the main
decoding loop.
2011-09-29 16:54:01 -04:00
Justin Ruggles
a57ea1a87e adpcm: simplify reading of IMA DK4 frame header. 2011-09-29 16:54:01 -04:00
Justin Ruggles
8114f94ac9 adpcm_ms: clean up reading of predictor coefficients 2011-09-29 16:54:01 -04:00
Justin Ruggles
943f4db552 adpcm_4xm: process planar packets sequentially rather than simultaneously.
Also properly clip the right channel step_index.
2011-09-29 16:54:00 -04:00
Justin Ruggles
119974b164 adpcm_ima_wav: process channel-interleaved blocks sequentially rather than simultaneously.
Speeds up the ADPCM IMA WAV decoder by 15-20% overall.
2011-09-29 16:54:00 -04:00
Justin Ruggles
7c287b18a0 adpcm: update reference links
Add Multimedia Wiki link.
Mark dead links with [dead]. Some can still be accessed through archive.org.
Update URLs for pages which have moved.
Replace duplicated links in adpcmenc.c with a note to see the ADPCM decoder
reference documents.
2011-09-29 16:54:00 -04:00
Justin Ruggles
ac94b8bcc6 adpcm: simplify packet size bounds checking in the ADPCM IMA QT decoder.
This is easier to understand. It also avoids returning existing samples mixed
with new samples when the packet is too small.
2011-09-29 16:54:00 -04:00
Justin Ruggles
de0b586a87 adpcm: simplify and speed up several ADPCM decoders. 2011-09-29 16:54:00 -04:00
Justin Ruggles
5a9ed7c110 adpcm: pretty-print tables 2011-09-29 16:54:00 -04:00
Alex Converse
fcbe421cee prores: Handle 0 or fewer bits left
show_bits() is undefined when the number of bits is less than or equal to
zero.
2011-09-29 09:45:57 -07:00
Mans Rullgard
bf00a73ace dca: clear inactive subbands only once in qmf_32_subbands()
Writing zeros to the high entries in the array need only be
done once as the cutoff position is constant throughout the
loop.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-29 12:34:17 +01:00
Mans Rullgard
baf6b738f2 ARM: NEON optimised vector_fmac_scalar()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-28 15:56:09 +01:00
Mans Rullgard
a92a1b93b4 dca: use vector_fmac_scalar from dsputil
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-28 15:56:09 +01:00
Mans Rullgard
fcca826a63 dsputil: add vector_fmac_scalar()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-28 15:56:08 +01:00
Justin Ruggles
3d371f417e ws_snd: misc cosmetic clean-ups 2011-09-26 16:23:58 -04:00
Justin Ruggles
659c719bc7 ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead. 2011-09-26 16:23:15 -04:00
Justin Ruggles
618b067d21 ws_snd: use memcpy() and memset() instead of loops 2011-09-26 16:23:14 -04:00
Justin Ruggles
6896aa7a38 ws_snd: use samples pointer for loop termination instead of a separate
iterator variable.
2011-09-26 16:23:14 -04:00
Justin Ruggles
6a818cb3ff ws_snd: make sure number of channels is 1 2011-09-26 16:23:10 -04:00
Justin Ruggles
417364ce1f ws_snd: add some checks to prevent buffer overread or overwrite. 2011-09-26 15:49:50 -04:00
Justin Ruggles
2322ced8da ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.
8-bit unsigned is the native sample format.
2011-09-26 15:49:50 -04:00
Justin Ruggles
4c5e7b27d5 flacdec: fix buffer size checking in get_metadata_size()
Adds an additional check before reading the next block header and avoids a
potential integer overflow when checking the metadata size against the
remaining buffer size.
2011-09-26 15:29:45 -04:00
Nicolas George
4ca59d1948 oggdec: add support for Xiph's CELT codec
This patch also introduces CODEC_ID_CELT.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-09-26 13:51:29 +02:00
Justin Ruggles
88f908fbdc cosmetics: reindent and pretty-print 2011-09-25 14:38:08 -04:00
Justin Ruggles
8febd6afbc libgsm: split init and close fuctions for encoder and decoder.
The decoder shouldn't be allocating coded_frame. It's also cleaner to split
them than to check avctx->codec->encode and avctx->codec->decode.
2011-09-25 14:38:08 -04:00
Mans Rullgard
6e4a35ced9 ppc: fix 32-bit PIC build
On 32-bit ppc, the GOT pointer must be loaded manually.
This adds a "get_got" assembler macro to compute the
GOT address.  The "movrel" macro is updated to take an
additional parameter containing the GOT address since
no register is reserved for this purpose on ppc32.
These changes have no effect on ppc64 builds.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-25 17:27:48 +01:00
Justin Ruggles
4568c2bf97 vmdaudio: fix decoding of 16-bit audio format.
The initial sample of each block is raw 16-bit PCM, not DPCM.
Fixes decoding of all samples in:
http://streams.videolan.org/samples/game-formats/sierra-vmd/Lighthouse/
2011-09-25 10:39:00 -04:00
Laurent Aimar
d1186ff72d h264: check for out of bounds reads in ff_h264_decode_extradata().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-25 15:04:58 +02:00
Diego Biurrun
8671488799 Use explicit struct initializers for AVCodec declarations. 2011-09-24 12:11:19 +02:00
Justin Ruggles
9ff6d0791b adpcmenc: Set bits_per_coded_sample 2011-09-23 20:54:29 -04:00
Baptiste Coudurier
b304244b54 adpcmenc: fix QT IMA ADPCM encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 20:54:29 -04:00
Baptiste Coudurier
bf334535b4 adpcmdec: Fix QT IMA ADPCM decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 20:54:28 -04:00
Peter Ross
3a549eb82b permit decoding of multichannel ADPCM_EA_XAS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 20:54:28 -04:00
Reimar Döffinger
ffe92ff9f0 Fix input buffer size check in adpcm_ea decoder.
Unfortunately the output buffer size check assumes that the
input buffer is never over-consumed, thus this actually
also allowed to write outside the output buffer if "lucky".

Based on:
git.videolan.org/ffmpeg.git
commit 701d0eb185
2011-09-23 20:54:28 -04:00
Sean McGovern
c2d3f56107 fft: avoid a signed overflow
As a signed integer, 1<<31 overflows, so force it to unsigned.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-23 17:02:58 -07:00
Luca Barbato
d554b33efe ratecontrol: update last_qscale_for sooner
In order to make ratecontrol converge properly update the
last_qscale_for values when populating the qscale array.

It fixes the issue reported on
http://lists.libav.org/pipermail/libav-tools/2011-September/000050.html
2011-09-22 17:25:48 -07:00
Diego Biurrun
167d3b1673 prores: return more meaningful error values 2011-09-23 01:42:13 +02:00
Diego Biurrun
2161282439 prores: improve error message wording 2011-09-23 01:42:12 +02:00
Diego Biurrun
27ba121e90 prores: cosmetics: prettyprinting, drop useless parentheses 2011-09-23 01:42:12 +02:00
Diego Biurrun
2983f1f3be prores: lowercase AVCodec name entry
All other codecs use lowercase names in that field.
2011-09-23 01:42:11 +02:00
Justin Ruggles
1993c6849c 8svx/iff: fix decoding of compressed stereo 8svx files.
Make the iff demuxer send the whole audio chunk to the decoder as a
single packet and move stereo interleaving from the iff demuxer to the
decoder.

Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Justin Ruggles
fda459cee7 8svx: log an error message if output buffer is too small
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Justin Ruggles
0ac3b8fc4a 8svx: check packet size before reading the initial sample value. 2011-09-22 14:11:34 -04:00
Justin Ruggles
e371878416 8svx: output 8-bit samples instead of 16-bit.
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Justin Ruggles
ac68607bfe 8svx: split delta decoding into a separate function.
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Maxim Poliakovski
be64629a13 Apple ProRes decoder
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-22 14:54:46 +03:00
Laurent Aimar
fe476e5a9b rv34: Check for invalid slices offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-22 10:35:06 +03:00
Mans Rullgard
ae2e89717b dct-test: factor out some common code and do whas was likely intended
This fixes some nonsensical code by moving some should-be-shared
code to separate functions and using these.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-21 15:43:59 +01:00
Anton Khirnov
609a2fa1fa Remove some forgotten AVCodecContext.palctrl usage. 2011-09-21 13:51:53 +02:00
Anton Khirnov
9ecfbb3e57 lavc/utils: move avcodec_init() higher in the file.
Fixes build on next major bump.
2011-09-21 13:51:53 +02:00
Anton Khirnov
e5b29c1f6b lavc: replace some deprecated FF_*_TYPE with AV_PICTURE_TYPE_* 2011-09-21 13:51:53 +02:00
Anton Khirnov
feedc0754b ac3dec: actually use drc_scale private option 2011-09-21 13:51:53 +02:00
Anton Khirnov
63e4c8a653 lavc: undeprecate AVPALETTE_SIZE and AVPALETTE_COUNT macros
They are still being used and shouldn't be removed.
2011-09-21 13:51:53 +02:00
Diego Biurrun
a3e0135dbb msmpeg4: remove leftover unused debug variable declaration 2011-09-21 09:57:33 +02:00
Diego Biurrun
95a06eb4d5 Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
Diego Biurrun
35a6855868 Fix av_dlog invocations with wrong or missing logging context.
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
Laurent Aimar
4cc7732386 rv34: Check for invalid slice offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-20 10:29:55 +03:00
Laurent Aimar
b4ed3d78cb rv34: Fix potential overreads
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar
d2213b6493 rv34: Fix buffer size used for MC of B frames after a resolution change
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar
d0f6ab0298 rv34: Avoid NULL dereference on corrupted bitstream
rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar
4a29b47186 rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 14:58:33 +03:00
Luca Barbato
3a78fb57de libx264: introduce slice-max-size option
Yet another option useful for low latency streaming.
2011-09-16 07:56:17 -07:00
Laurent Aimar
b59efc9434 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-15 13:23:04 -07:00
Michael Niedermayer
5166376f24 smacker: fix a few off by 1 errors
stereo & 16bit is untested due to lack of samples

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 11:13:54 +03:00
Laurent Aimar
6489455495 Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 10:40:31 +03:00
Laurent Aimar
9676ffba83 Check and propagate errors when VLC trees cannot be built in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 10:38:49 +03:00
Justin Ruggles
3ed7860943 include stdint.h in adpcm_data.h
fixes make checkheaders
2011-09-13 10:59:47 -04:00
Diego Biurrun
a05ea77c9f mpeg12: reorder functions to avoid ugly forward declarations 2011-09-13 15:53:05 +02:00
Alex Converse
0872bb23b4 xan: Add some buffer checks 2011-09-12 11:18:57 -07:00
Alex Converse
350f57bd7b xan: Remove extra trailing newline 2011-09-12 11:18:57 -07:00
Laurent Aimar
393d5031c6 Fixed size given to init_get_bits() in xan decoder. 2011-09-12 11:18:57 -07:00
Justin Ruggles
826c56d16e adpcm: split ADPCM encoders and decoders into separate files.
Move shared tables to a separate file as well.
2011-09-12 11:26:11 -04:00
Kostya Shishkov
23a1f0c592 rv34: check that subsequent slices have the same type as first one.
This prevents some crashes when corrupted bitstream reports e.g. P-type
slice in I-frame. Official RealVideo decoder demands all slices to be
of the same type too.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 15:51:30 +02:00
Anton Khirnov
af1e247038 libxavs: add private options corresponding to deprecated global options
Code mostly copied from libx264 wrapper.
2011-09-12 08:45:55 +02:00
Anton Khirnov
d242d80e36 avconv: remove me_threshold option.
It's only shadowing the AVOption with the same name.
2011-09-11 17:30:04 +02:00
Laurent Aimar
8bfea4ab4e Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-10 18:58:57 +03:00
Alex Converse
0c1f5b93d9 cljr: init_get_bits size in bits instead of bytes 2011-09-09 15:01:00 -07:00
Alex Converse
b7ce4f1d1c indeo2: fail if input buffer too small 2011-09-09 15:01:00 -07:00
Alex Converse
68ca330cbd indeo2: init_get_bits size in bits instead of bytes 2011-09-09 15:01:00 -07:00
Laurent Aimar
46b004959b ffv1: Fixed size given to init_get_bits() in decoder.
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-09 15:00:28 -07:00
Alex Converse
dba2b63a98 wavpack: Check error codes rather than working around error conditions. 2011-09-08 11:02:43 -07:00
Laurent Aimar
55354b7de2 Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:04:06 +03:00
Laurent Aimar
0aedab0340 Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:00:13 +03:00
Laurent Aimar
beefafda63 Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 11:57:13 +03:00
Kieran Kunhya
0ca36b4de7 Add LATM muxer
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-07 12:57:55 +02:00
Baptiste Coudurier
635bbecfc3 v210enc: clip values according to specifications
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 12:50:11 +02:00
Baptiste Coudurier
d239b83e2e v210enc: switch to PIX_FMT_422P10
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 12:16:21 +02:00
Baptiste Coudurier
08fa23d6c2 v210dec: switch to PIX_FMT_422P10
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 12:16:15 +02:00
Anton Khirnov
79eff91325 AVOptions: deprecate av_opt_set_defaults2
It's a hack which was created to allow for multiple options with
different defaults to refer to same field (e.g. 'b' vs 'ab'). There is
no need for it anymore.
2011-09-07 11:19:43 +02:00
Anton Khirnov
0962f23b35 libx264: fix setting some more parameters
Specifically, trellis, nr, me_range, me_method, subq, b_strategy,
keyint_min, chroma_me and coder.
Change their defaults to -1 and apply them after
x264_param_default_preset() if the user explicitly set them.
2011-09-07 10:36:15 +02:00
Andrej Peterka
2bb5d637fc libx264: fix setting the H.264 level
Move setting it after x264_param_default_preset()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 09:16:06 +02:00
Anton Khirnov
9c684feadc libx264: add 'direct-pred' private option
Deprecate AVCodecContext.directpred
2011-09-07 07:27:55 +02:00
Anton Khirnov
0635a8aa21 libx264: add 'partitions' private option
Deprecate AVCodecContext.partitions.
2011-09-07 07:27:18 +02:00
Anton Khirnov
7042337673 libx264: add 'cplxblur' private option
Deprecate AVCodecContext.complexityblur
2011-09-06 21:03:41 +02:00
Anton Khirnov
71b5f4427b libx264: add 'deblock' private option
Deprecate AVCodecContext.deblockalpha/deblockbeta
2011-09-06 21:02:45 +02:00
Anton Khirnov
f83c45183e libx264: add 'b-bias' private option
Deprecate AVCodecContext.bframebias.
2011-09-06 20:14:35 +02:00
Anton Khirnov
bb73cda2f6 libx264: fix setting some options.
Specifically: gop_size, max_b_frames, scenechange_threshold, qmin, qmax,
max_qdiff, qblur, qcompress and refs.

Change their default values to -1 and only use them if the user
explicitly set them. Otherwise x264 defaults are used.

Move setting those options after x264_param_default_preset(), so they
don't get overwritten by it.
2011-09-06 20:13:28 +02:00
Anton Khirnov
d8dee0e7bd libx264: remove useless assignment
priv_data is memset to 0.
2011-09-06 20:13:11 +02:00
Reimar Döffinger
459fe331e9 ac3dec: avoid pointless alloc and indirection for input_buffer
Since we now always allocate it, it can simply be made part of the context
instead.
2011-09-06 12:43:16 -04:00
Diego Biurrun
6192b6f3e7 mpeg12: cosmetics: reformat as K&R 2011-09-06 11:46:57 +02:00
Justin Ruggles
ae264bb29b ac3enc: Add channel coupling support for the fixed-point AC-3 encoder.
Update FATE references accordingly.
2011-09-05 10:09:44 -04:00
Justin Ruggles
a0d17b6d45 ac3enc: scale floating-point coupling channel coefficients in
scale_coefficients() rather than in apply_channel_coupling()
2011-09-05 10:07:43 -04:00
Justin Ruggles
3e5722a8ca ac3enc: fix encoding of stereo ac3 files when rematrixing is disabled.
The number of rematrixing bands still needs to be calculated.
2011-09-05 09:24:59 -04:00
Kostya Shishkov
bcd4aa8bec wavpack: fix wrong return value in wavpack_decode_block()
This function should return number of samples decoded, not number of bytes
decoded.
Spotted by Uoti Urpala.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-05 12:44:26 +02:00
Dustin Brody
ff17fc6353 mpeg12: propagate more real return values through chunk decode error return and fix some indentation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-05 11:19:14 +02:00
Kostya Shishkov
9bc4e21a9b wavpack: use context reset in appropriate places
This fixes improper flushing in the cases when the same frame is decoded in
several iterations (for being too large to fit into output buffer) and flush is
called mid-decoding and it also resets context in case of decoding errors.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-05 11:18:27 +02:00
Anton Khirnov
fb47997edb lavc: fix type for thread_type option
It should be flags, not int.
2011-09-04 13:15:36 +02:00
Anton Khirnov
fb4ca26bdb lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions. 2011-09-03 20:53:35 +02:00
Anton Khirnov
c11fb8288d AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
2011-09-03 20:52:21 +02:00
Anton Khirnov
9bc9188e58 libmp3lame: fix typo
FF_API_LAME_GLOBAL_OPTIONS => FF_API_LAME_GLOBAL_OPTS

Thanks to Clément Bœsch for spotting.
2011-09-01 10:37:19 +02:00
Anton Khirnov
1440037411 libx264: use X264_THREADS_AUTO constant instead of 0. 2011-09-01 10:12:30 +02:00
Anton Khirnov
5d06f15235 libx264: set default thread count to 0 (auto) 2011-08-31 17:39:13 +02:00
Anton Khirnov
f013cb8118 lavc: cosmetics, group deprecated codec flags 2011-08-31 13:28:54 +02:00
Anton Khirnov
aed7900704 mpeg12: add 'scan_offset' private option.
Deprecate CODEC_FLAG_SVCD_SCAN_OFFSET
2011-08-31 13:28:41 +02:00
Anton Khirnov
4bcee8e7f8 h263/p encoder: add 'structured_slices' private option.
Deprecate CODEC_FLAG_H263P_SLICE_STRUCT
2011-08-31 13:28:26 +02:00
Anton Khirnov
0d904de89d h263/p encoder: add 'obmc' private option.
Deprecate CODEC_FLAG_OBMC
2011-08-31 13:28:11 +02:00
Anton Khirnov
e3922d1110 h263p encoder: add 'aiv' private option.
Deprecate CODEC_FLAG_H263P_AIV
2011-08-31 13:27:59 +02:00
Anton Khirnov
9bb2d1a3f0 h263p encoder: add 'umv' private option.
Deprecate CODEC_FLAG_H263P_UMV
2011-08-31 13:27:36 +02:00
Anton Khirnov
0e5d37309f mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option.
Deprecate CODEC_FLAG_ALT_SCAN
2011-08-31 13:26:26 +02:00
Anton Khirnov
1f0c7020a1 mjpegdec: add 'extern_huff' private option.
Deprecate CODEC_FLAG_EXTERN_HUFF
2011-08-31 13:25:54 +02:00
Anton Khirnov
4623420d84 mpeg4enc: add 'data_partitioning' private option.
Deprecate CODEC_FLAG_PART
2011-08-31 13:25:18 +02:00
Anton Khirnov
0cc06b9e23 snow: add 'memc_only' private option.
Deprecate CODEC_FLAG2_MEMC_ONLY
2011-08-31 13:24:16 +02:00
Anton Khirnov
0dc5e12f1e libx264: add 'mbtree' private option.
Deprecate CODEC_FLAG2_MBTREE
2011-08-31 13:24:02 +02:00
Anton Khirnov
38934f19fe libx264: add 'psy' private option.
Deprecate CODEC_FLAG2_PSY
2011-08-31 13:23:37 +02:00
Anton Khirnov
a7cec3a094 libmp3lame: add 'reservoir' private option.
Deprecate CODEC_FLAG2_BIT_RESERVOIR
2011-08-31 13:22:53 +02:00
Anton Khirnov
88262ca87d mpeg2enc: add 'non_linear_quant' private option
Deprecate CODEC_FLAG2_NON_LINEAR_QUANT
2011-08-31 13:21:59 +02:00
Anton Khirnov
2c5e1efc09 mpeg12enc: add drop_frame_timecode private option.
Deprecate CODEC_FLAG2_DROP_FRAME_TIMECODE
2011-08-31 13:21:05 +02:00
Anton Khirnov
297d9cb3dc mpeg12enc: add intra_vlc private option.
Deprecate CODEC_FLAG2_INTRA_VLC.
2011-08-31 13:19:14 +02:00
Alberto Delmás
d2f119a1f2 VC1: Support dynamic dimension changes
Fixes SA00072, SA00073, SA10150, SA10151, Issue2076

Improves SA10153

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-31 13:11:23 +02:00
Dustin Brody
a18e04bcf9 mjpeg: treat external huffman table setup failure as codec init failure if external huffman table use requested
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-31 10:28:29 +02:00
Anton Khirnov
7485e54708 lavc: deprecate CODEC_FLAG2_BRDO
It's been unused for the last 3 years.
2011-08-31 10:26:21 +02:00
Anton Khirnov
cf90c5d0e0 libx264: add 'aud' private option.
Deprecate CODEC_FLAG2_AUD.
2011-08-31 10:26:11 +02:00
Anton Khirnov
3b82aeeec0 libx264: add 'fast-pskip' private option.
Deprecate CODEC_FLAG2_FASTPSKIP.
2011-08-31 10:25:54 +02:00
Anton Khirnov
373257fa79 libx264: add '8x8dct' private option.
Deprecate CODEC_FLAG2_8X8DCT.
2011-08-31 10:25:34 +02:00
Anton Khirnov
eab21c32e3 libx264: add 'mixed-refs' private option.
Deprecate CODEC_FLAG2_MIXED_REFS.
2011-08-31 10:25:06 +02:00
Anton Khirnov
0f29699db7 libx264: add 'weightb' private option.
Deprecate CODEC_FLAG2_BPYRAMID.
2011-08-31 10:24:56 +02:00
Anton Khirnov
34dda1251d libx264: add 'b-pyramid' private option.
Deprecate CODEC_FLAG2_BPYRAMID.
2011-08-31 10:24:17 +02:00
Anton Khirnov
5d4a1048ee libx264: add 'intra-refresh' private option.
Deprecate CODEC_FLAG2_INTRA_REFRESH.
2011-08-31 10:23:26 +02:00
Anton Khirnov
faaecd4708 libx264: add 'ssim' private option.
Deprecate CODEC_FLAG2_SSIM.
2011-08-31 10:23:03 +02:00
Anton Khirnov
3b81636f33 libx264: make options compatible with x264
Replace '_' with '-', merge psy-trellis into psy-rd and rename cqp->qp
Also fix typo pdy-rd -> psy-rd
2011-08-31 10:21:36 +02:00
Luca Barbato
dde372934a avcodec: remove misleading comment
coded_width is the width before lowres scaling,
coded_height is the height before lowres scaling.
2011-08-31 09:57:46 +02:00
Kostya Shishkov
a80852316e RV40: reuse some H.264 motion compensation functions in RV40.
Since RV40 is based on H.264, it uses the same interpolation filters and
functions for halfpel interpolation in one direction can be reused.
Unfortunately other cases are implemented differently and produce slightly
different output because of rounding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-08-30 12:04:46 +01:00
Luca Barbato
22141917a9 Revert "h264: Properly set coded_{width, height} when parsing H.264."
This reverts commit b47904d158.

coded_{width, height} overwrites width and height in avcodec_open and
it currently just report the non-lowres size.
2011-08-29 18:32:31 +02:00
Diego Biurrun
0249478756 doxygen: fix wrong comment syntax, //< vs. ///< 2011-08-26 18:34:28 +02:00
Diego Biurrun
0138a8dead doxygen: drop pointless star from pointer variable names 2011-08-26 18:08:38 +02:00
Dustin Brody
f913eeea43 vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-25 15:49:56 -07:00
Dustin Brody
09c274e067 mpeg12: propagate chunk decode errors and fix conditional indentation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-25 15:49:28 -07:00
John Stebbins
0d802ac54e vc1: fix VC-1 Pulldown handling.
Pulldown flags are being set incorrectly and AVFrame->repeat_pict is not
being set.  Also, skipped frames exit header parsing too early and do not
set pulldown flags appropriately. Ticks_per_frame needs to be set and
time_base adjusted so player can extend frame duration by a field time.

This fixes problems encountered when attempting to transcode HD-DVD EVOB
files with HandBrake. Also makes these files play smoothly in avplay.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-25 12:41:45 -07:00
Alberto Delmás
1cf82cab08 VC1: Fix first/last row checks with slices
In some places 0/mb_height were used in place of start_mb_y/end_mb_y.

Fixes SA00049, SA00058, SA10091, SA10097, SA10131, SA20021, SA30030

Improves PSNR in SA00054, SA00059, SA00060, SA10096, SA10098, SA20022,
SA30031, SA30032, SA40012, SA40013

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-25 12:33:58 -07:00
Ronald S. Bultje
d4b9974465 vc1: properly zero coded_block[] edges on new slice entry.
Previously, we would leave the left edge uninitialized, which led to
CBP prediction errors on slice edges, e.g. in SA10098.vc1.
2011-08-24 22:06:06 -07:00
Anton Khirnov
4ae30cac22 libx264: add 'crf_max' private option.
Deprecate corresponding global option.
2011-08-24 14:33:40 +02:00
Anton Khirnov
c5dd0bc4ca libx264: add 'weightp' private option.
Deprecate corresponding global option.
2011-08-24 14:32:24 +02:00
Anton Khirnov
d4b9671318 libx264: add 'rc_lookahead' private option.
Deprecate corresponding global option.
2011-08-24 14:31:55 +02:00
Anton Khirnov
2a44a8f609 libx264: add 'psy_trellis' private option.
Deprecate corresponding global option.
2011-08-24 14:31:07 +02:00
Anton Khirnov
93e623c642 libx264: add 'psy_rd' private option.
Deprecate corresponding global option.
2011-08-24 14:30:25 +02:00
Anton Khirnov
5c75b2a0b7 libx264: add 'aq_strength' private option.
Deprecate corresponding global option.
2011-08-24 14:30:00 +02:00
Anton Khirnov
85254fcb46 libx264: add 'aq_mode' private option.
Deprecate corresponding global option.
2011-08-24 14:28:40 +02:00
Anton Khirnov
9d508e4914 libx264: add 'cqp' private option.
Deprecate corresponding global option.
2011-08-24 14:28:07 +02:00
Anton Khirnov
d5dc8cc297 libx264: add 'crf' private option.
Deprecate corresponding global option.

Ideally all x264 private options should be generated automatically, but
x264 doesn't provide the API for this yet.
2011-08-24 14:26:12 +02:00
Anton Khirnov
8ee18b4bee lavc: remove vbv_delay option
It's broken and serves no purpose as it's a read-only field.
2011-08-24 14:07:39 +02:00
Alberto Delmás
45ecda8554 Windows Media Image decoder (WMVP/WVP2)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-23 11:18:35 +02:00
Justin Ruggles
3be5a94351 ac3enc: remove outdated TODO comment for apply_channel_coupling() 2011-08-22 12:14:57 -04:00
Anton Khirnov
ae60927aef libx264: only use ABR mode when the user explicitly set bitrate. 2011-08-22 07:17:39 +02:00
Anton Khirnov
03eff2bf43 libx264: use medium preset by default. 2011-08-22 07:17:38 +02:00
Anton Khirnov
0a593de38a mp2 encoder: make 128k the default bitrate. 2011-08-22 07:17:38 +02:00
Stefano Sabatini
143d6a3fa7 lavc: add A|E|D flags to "ac" and "ar" options
Fix setting of the corresponding AVCodecContext fields via
cmdutils.c:filter_codec_opts().
In particular, fix ffplay -ac and -ar options.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-21 16:06:16 +02:00
Kostya Shishkov
4ba8c521b1 WavPack decoder: implement flush function
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-21 12:54:34 +02:00
Jeff Downs
6581e161c5 h264: fix PCM intra-coded blocks in monochrome case
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-19 16:02:33 +02:00
Jeff Downs
87cf70eb23 h264: correct implicit weight table computation for long ref pics
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-19 14:36:52 +02:00
Jeff Downs
29a09eae9a h264: correct the check for invalid long term frame index in MMCO decode
The current check 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.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-19 14:36:40 +02:00
Alex Converse
44920d04ba aac: Only set sample rate and object type from ADTS if output hasn't been configured.
Long term it would be nice to support error resilient reconfiguration
but right now setting this every frame does more harm than help.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-18 22:29:41 +02:00
Alex Converse
06d37fede4 aac: Set SBR and PS to unsignalled during headerless and ADTS initialization.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-18 22:29:41 +02:00
Alex Converse
d8425ed4af aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-18 22:29:41 +02:00
Dustin Brody
b490f0c2bc h264: hide reference frame errors unless requested
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-17 20:56:54 -07:00
Ronald S. Bultje
38e06c2969 Move clipd macros to x86util.asm.
This allows sharing them between multiple .asm files.
2011-08-17 20:56:06 -07:00
Kostya Shishkov
91e209d720 RV3/4 parser: remove unused variable 'off'
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-17 15:31:40 +02:00
Kostya Shishkov
48ce8b8da7 Use parsers for RealVideo 3/4 to determine correct PTS
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-17 15:00:42 +02:00
Kostya Shishkov
331971116d rv10/20: tell decoder to use edge emulation
This removes out-of-edge motion compensation artifacts (easily spotted green
blocks in avplay, gray blocks in transcoding), for example here:
http://samples.libav.org/samples/real/tv_watching_t1.rm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-17 14:53:34 +02:00
Anton Khirnov
bca06e77e1 lavc: add avcodec_get_type() for mapping codec_id -> type. 2011-08-16 20:24:20 +02:00
Anton Khirnov
64db1a82d6 lavc: add audio flag to the 'b' option, deprecate 'ab'.
Its only reason for its existence was ffmpeg's inability to properly assign
AVOptions to streams. Now this is not a problem anymore, so 'ab' should
go.
2011-08-16 06:20:43 +02:00
Dustin Brody
a3e215cdc9 svq3: propagate codec memory allocation failure in context init
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-15 21:26:34 +02:00
Dave Yeo
cc73511e8e Fix NASM include directive
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-15 11:24:35 -07:00
Alex Converse
48f7163f13 dsputil_mmx: Honor HAVE_AMD3DNOW 2011-08-15 11:20:08 -07:00
Reimar Döffinger
0e86965514 VC-1: fix reading of custom PAR.
Custom PAR num/denum are in 1-256 range.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-15 16:36:58 +02:00
Dustin Brody
2bfdb34c8a mpeg12: remove repeat-field code disabled since May 2002
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-15 13:03:20 +02:00