1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

36002 Commits

Author SHA1 Message Date
Shitiz Garg
e614fac2e6 adpcm: Check for channels to be a non-zero integer
channels would be 0 sometimes and would cause floating point exception
Fixes bugzilla #124

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-17 09:44:19 -05:00
Ronald S. Bultje
4391805916 swscale: fix overflows in RGB rounding constants.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-17 14:36:09 +00:00
Ronald S. Bultje
8cfbbd928c get_bits: introduce safe bitreading to prevent overreads.
When turned on, H264/CAVLC gets ~15% (CVPCMNL1_SVA_C.264) slower for
ultra-high-bitrate files, or ~2.5% (CVFI1_SVA_C.264) for lower-bitrate
files. Other codecs are affected to a lesser extent because they are
less optimized; e.g., VC-1 slows down by less than 1% (all on x86).
The patch generated 3 extra instructions (cmp, cmovae and mov) per
call to get_bits().

The performance penalty on ARM is within the error margin for most
files, up to 4% in extreme cases such as CVPCMNL1_SVA_C.264.

Based on work (for GCI) by Aneesh Dogra <lionaneesh@gmail.com>, and
inspired by patch in Chromium by Chris Evans <cevans@chromium.org>.
2011-12-17 14:03:41 +00:00
Michael Niedermayer
83b46713f0 lavc: Check codec_ids against insertion/removial typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 06:09:13 +01:00
Michael Niedermayer
75f2cc5134 avutil: check sampleformats enum, pict type enum and media type enum against insert/remove mistakes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 05:47:37 +01:00
Michael Niedermayer
68230eb375 pixfmts: Selfcheck against insertions / deletions in the enum.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 05:41:42 +01:00
Michael Niedermayer
f37b2d5a68 aacdec: Fix null pointer crash
Fixes bug170
Bug found by: Gautam Gupta

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 05:04:56 +01:00
Michael Niedermayer
4d70023a2a h264: fix init of topleft ref/mv.
Fixes Ticket778

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 04:42:04 +01:00
Michael Niedermayer
53b6503184 avienc: Fix rawvideo 32bit
Bug found by: Rik Maes <rik.maes54@gmail.com>
Change based on suggestion by Rik Maes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 03:25:46 +01:00
Michael Niedermayer
9af6abdc17 atrac3: Fix crash in tonal component decoding.
Fixes Ticket780
Bug Found by: cosminamironesei

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 03:18:58 +01:00
Michael Niedermayer
552ec4c9fd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  get_bits: remove A32 variant
  avconv: support stream specifiers in -metadata and -map_metadata
  wavpack: Fix 32-bit clipping
  wavpack: Clip samples after shifting
  h264: don't drop B-frames after next keyframe on POC reset.
  get_bits: remove useless pointer casts
  configure: refactor lists of tests and components into variables
  rv40: NEON optimised weak loop filter
  mpegts: replace some magic numbers with the existing define
  swscale: add unscaled packed 16 bit per component endianess conversion

Conflicts:
	libavcodec/get_bits.h
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 02:18:16 +01:00
Mans Rullgard
a1e98f198e get_bits: remove A32 variant
The A32 bitstream reader variant is only used on ARMv5 and for
Prores due to the larger bit cache this decoder requires.

In benchmarks on ARMv5 (Marvell Sheeva) with gcc 4.6, the only
statistically significant difference between ALT and A32 is
a 4% advantage for ALT in FLAC decoding.  There is thus no (longer)
any reason to keep the A32 reader from this point of view.

This patch adds an option to the ALT reader increasing the bit
cache to 32 bits as required by the Prores decoder.  Benchmarking
shows no significant change in speed on Intel i7.  Again, the
A32 reader fails to justify its existence.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-16 21:21:48 +00:00
Alexandra Khirnova
a7b5e841ff avconv: support stream specifiers in -metadata and -map_metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-16 21:12:53 +01:00
Derek Buitenhuis
bb9747c8ee wavpack: Fix 32-bit clipping
In the case that (frame_flags & 0x03) == 3, hybrid_maxclip
may have had a signed integer overflow.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-16 20:55:53 +01:00
Derek Buitenhuis
365e1ec26d wavpack: Clip samples after shifting
It doesn't make much sense to clip pre-shift,
nor is it correct for proper decoding.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-16 20:55:46 +01:00
Michael Niedermayer
6d8e6fe9db CODEC_ID_SOL_DPCM: Fix used write buffer.
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 20:34:34 +01:00
Ronald S. Bultje
0b4c323213 h264: don't drop B-frames after next keyframe on POC reset.
The keyframe after a POC reset may not be the first to be returned to
the user. Therefore, don't reset the expected next POC once we return
a keyframe to the user, but once we know that the next frame in the
return-queue is a keyframe.
2011-12-16 11:24:18 -08:00
Shitiz Garg
4af0262f7d cljr: Check if width or height are positive integers
width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 20:23:38 +01:00
Michael Niedermayer
7b92863f30 ffmpeg: Fix killing [Y/n] prompt with ctrl-c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 19:43:54 +01:00
Michael Niedermayer
cf7076ee96 ffmpeg: exit() on repeated ctrl-c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 19:37:32 +01:00
Michael Niedermayer
3d07e0aba0 h264: return the consumed amountg in case of Q264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 19:05:19 +01:00
Michael Niedermayer
227960427b h264: retuen the amount read in case of NAL_END_SEQUENCE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 18:55:04 +01:00
Michael Niedermayer
902c090413 h264: reset nal_unit_type so that decoding frames without any nal units
dont leave its value at something random.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 18:52:56 +01:00
Michael Niedermayer
f890cb948c mtvdemuxer: fix segfault caused by truncated packets.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 16:59:28 +01:00
Michael Niedermayer
ee181f84a3 lavf: print an error if a packet has been truncated due to filesize
in av_get_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 16:59:24 +01:00
Michael Niedermayer
207d9eab5a txd/westwood: remove demuxer specific overallocate solutions as the new generic code
handles it fine.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 16:58:20 +01:00
Michael Niedermayer
559ae20dda lavf: Update AVIOContext.maxsize when hitting the end.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 16:58:12 +01:00
Mans Rullgard
b8909cb364 get_bits: remove useless pointer casts
These pointers are already of the correct type.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-16 15:34:35 +00:00
Diego Biurrun
54e75be420 configure: refactor lists of tests and components into variables 2011-12-16 15:46:34 +01:00
Mans Rullgard
11b1db2759 rv40: NEON optimised weak loop filter
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-16 14:36:01 +00:00
Dominique Leuenberger
39f59a8da7 RELEASE: We're now at 0.9.0.git
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 15:20:13 +01:00
Tomas Härdin
0e764cf541 mxfdec: Don't parse slices or DeltaEntryArrays
The most recent demuxing/seeking code doesn't need them
2011-12-16 11:54:08 +01:00
Tomas Härdin
f98726551c mxfdec: Remove dead/useless code 2011-12-16 11:54:07 +01:00
Tomas Härdin
2eba8da675 mxfdec: Hybrid demuxing/seeking solution
This uses the old demuxing code for OP1a and separate demuxing code for OPAtom.
Timestamp output is added to the old demuxing code.
The seeking code is made to seek to the start of the desired EditUnit only,
from which the normal demuxing code takes over (if OP1a). This means we don't
use delta entries or slices, only StreamOffsets.
OPAtom seeking basically works like before.
This also makes D-10 seeking behave the same way as OP1a and OPAtom. In other
words, we allow seeking before the start or past the end for D-10 too.
This fixes ticket #746.
2011-12-16 11:54:03 +01:00
Tomas Härdin
36c305f9db mxfdec: Add mxf_edit_unit_absolute_offset()
This maps an EditUnit in an index table to the corresponding absolute offset
in the file.
2011-12-16 11:48:02 +01:00
Tomas Härdin
b56adc7842 mxfdec: Replace zero IndexDurations with st->duration
The mxf_d10 muxer outputs files with zero IndexDurations..
2011-12-16 11:48:02 +01:00
Tomas Härdin
2212e040b7 mxfdec: Add "fake" index to MXFIndexTable to assist seeking
This changes mxf_compute_ptses() to be used for MXFIndexTable, and also adds
code for computing the fake index to it.
This also temporarily disables PTS computation. A future patch will restore it.
2011-12-16 11:45:40 +01:00
Tomas Härdin
8ce41721a4 mxfdec: Add MXFIndexTables
This structs collects MXFIndexTableSegments belonging to one IndexSID and some
other bits of useful information.
2011-12-16 11:32:52 +01:00
Tomas Härdin
31029e30fa mxfdec: Move mxf_read_packet*() near the bottom of the file
This simplifies future commits.
2011-12-16 11:32:52 +01:00
Vladimir Pantelic
65a25adc97 mpegts: replace some magic numbers with the existing define
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-16 11:45:36 +02:00
Michael Niedermayer
62adc60b97 avidec: Check that the header chunks fit in the available filesize.
Fixes Ticket771
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 06:13:04 +01:00
Michael Niedermayer
f72601d063 txddemux: Limit allocated packets to filesize.
Fixes Ticket772
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 06:02:56 +01:00
Michael Niedermayer
a000975444 thp: simplify overallocate checks.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 06:02:14 +01:00
Michael Niedermayer
47572323f2 lavf: add internal AVIOContext.maxsize
This allows simple and generic limiting of allocations used for packets.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 05:59:43 +01:00
Michael Niedermayer
482ee63641 thpdemux: Check that packed sizes are within the files data size and filesize.
Fixes Ticket774
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 05:35:04 +01:00
Michael Niedermayer
e098fba5d9 avidec: Fix infinite loop caused by rounding of timestamps in non interleaved avis.
Fixes Ticket775
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 05:13:58 +01:00
Michael Niedermayer
84e57702ea configure: disable avconv again.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 04:34:03 +01:00
Michael Niedermayer
1f99939a63 j2kdec: Fix integer overflow leading to a segfault
Fixes Ticket776
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 04:16:01 +01:00
Michael Niedermayer
0988a6a035 movenc: disable iods by default
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Approved-by: MP4_maniac
Approved-by: Baptiste Coudurier
2011-12-16 03:50:19 +01:00
Michael Niedermayer
c402c1c976 smackerdemuxer: check some values before instead of just after malloc()
Fixes Ticket777
Bug Found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 03:25:20 +01:00