Commit Graph

19031 Commits

Author SHA1 Message Date
Mans Rullgard
3d11c2d76d vp8: armv6: fix non-armv6t2 build
The assembler may fail to place literal pools close enough to
instructions referencing them.  An explicit .ltorg directive
fixes this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:16:31 +01:00
Mans Rullgard
e4ac031233 vp8: armv6 optimisations
Based on patch by Ronald S. Bultje <rsbultje@gmail.com>,
partially ported from libvpx.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Mans Rullgard
b692d246ea vp8: arm: separate ARMv6 functions from NEON
This is a preparation for complete ARMv6 optimisations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Mans Rullgard
dac78fd1d7 ARM: add some compatibility macros
This adds some macros simplifying Thumb and pre-v6T2 compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Michael Niedermayer
cab15f9db4 ffv1: remove clear_state(), it has become unused
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 18:05:40 +02:00
Michael Niedermayer
83bf9fb6ec ffv1: move clear_state() to clear_slice_state() in encoding threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 18:05:29 +02:00
Michael Niedermayer
68a9194bb6 ffv1: indent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 17:51:17 +02:00
Michael Niedermayer
3f4c0dad16 ffv1: move init_slice_state() into the decoder threads.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 17:50:55 +02:00
Michael Niedermayer
60217b5b9c ffv1: Remove slice count field with 1.3 and just count slices.
This field was problematic because in case of damaged slices it can be
lost

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 15:01:32 +02:00
Michael Niedermayer
3ed6917ab8 ffv1: store slice size with all slices in 1.3
This simplifies handling by removing a special case.
Its also needed to make the next change possible.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 14:59:15 +02:00
Michael Niedermayer
c24ca7b88e ffv1: add 1 status byte to slices in in case crcs are stored too.
This will allow storing of information about corrected and uncorrectable
errors.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 12:05:06 +02:00
Michael Niedermayer
0c27854532 ffv1: Always store slice size when error reobustness is enabled.
This simplifies finding slices within a damaged bitstream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 12:01:44 +02:00
Michael Niedermayer
16524d1be0 ffv1: include solution hint in the slice error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-25 11:21:30 +02:00
Michael Niedermayer
fe5bc46f60 ffv1: support vlc mode in 1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 23:29:09 +02:00
Michael Niedermayer
3158160334 ffv1: move the decoder side ac->vlc switch to decode_slice()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 23:29:09 +02:00
Michael Niedermayer
44f789c092 ffv1: allow selecting 1.3 by using -level
Note, 1.3 is not finalized and the bitstream will still change
do not use it yet. This option is just to make playing with it
easier, otherwise one would have to edit the source

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 23:29:09 +02:00
Michael Niedermayer
e37419a806 ffv1: move ac->vlc switch to encode_slice()
This will allow us to use vlc coding in 1.3 too

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 23:29:09 +02:00
Carl Eugen Hoyos
ae0591f913 Add missing newline in shorten decoder. 2012-04-24 17:23:43 +02:00
Michael Niedermayer
9c99bc433e mpc8: print error messages on maxband(s) errors
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 11:09:12 +02:00
Michael Niedermayer
88ee2aa5ad mpc8: make maxband check less picky.
Fixes Ticket1245

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 11:09:12 +02:00
Michael Niedermayer
3bbf3f7e42 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  matroska: Clear prev_pkt between seeks.
  avutil: change default buffer size alignment for sample buffer functions
  audemux: Add a sanity check for the number of channels
  Remove libdirac decoder.
  matroska: Add incremental parsing of clusters.
  avconv: fix off by one check in complex_filter
  mpegts: Try seeking back even for nonseekable protocols
  swscale: K&R formatting cosmetics (part III)

Conflicts:
	configure
	doc/general.texi
	doc/platform.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/libdirac.h
	libavcodec/libdiracdec.c
	libavformat/au.c
	libavformat/mpegts.c
	libswscale/input.c
	tests/ref/seek/lavf_mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-24 02:30:41 +02:00
Michael Niedermayer
2954574126 indeo4: check quant_mat more fully.
quant_mats valid range depends on the block size.
This fixes a global array overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-23 21:59:34 +02:00
Michael Niedermayer
068d0b4e25 h264: some fields in SEIs are longer than 25 bits thus use get_bits_long()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-23 19:41:46 +02:00
Michael Niedermayer
4d87001096 vp8: fix crash due to skiped update_dimensions().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-23 10:47:33 +02:00
Diego Biurrun
a229d6c285 Remove libdirac decoder.
libschroedinger is the preferred way to decode Dirac video.
2012-04-23 09:20:24 +02:00
Michael Niedermayer
70d54392f5 lowres2 support.
The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 22:26:55 +02:00
Michael Niedermayer
92ef4be4ab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: allow runtime masking of CPU features
  dsputil: remove unused functions
  mov: Treat keyframe indexes as 1-origin if starting at non-zero.
  mov: Take stps entries into consideration also about key_off.
  Remove lowres video decoding

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/libopenjpegdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegvideo.c
	libavcodec/utils.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 22:26:42 +02:00
Carl Eugen Hoyos
2e07f42957 Support flicvideo with 904 bytes extradata.
Fixes ticket #1234.
2012-04-22 22:07:02 +02:00
Michael Niedermayer
951cbea56f mpeg12dec: reset data size after parsing extradata.
This ended up corrupting data structures and may possibly
lead to a double free.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 20:03:53 +02:00
Michael Niedermayer
41abc9da50 iff: fix null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 17:27:54 +02:00
Michael Niedermayer
9a4f5b7616 mjpegbdec: check SOS/SOF ordering.
Fixes null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 14:58:28 +02:00
Michael Niedermayer
abec6549ae ffv1dec: Require a valid keyframe for decoding non keyframes.
Before this the context could become inconsistent, this lead to a null ptr
dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 14:58:28 +02:00
Mans Rullgard
d526c5338d ARM: allow runtime masking of CPU features
This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-22 12:30:45 +01:00
Michael Niedermayer
605f2b6b00 asv1dec: check extradatasize before reading.
Fixes null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 12:16:29 +02:00
Michael Niedermayer
fa5dacce14 indeo5: check against scaleable frames in non scaleable streams.
Fixes a null ptr dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 12:09:59 +02:00
Michael Niedermayer
f7c67536fe svq1dec: Fix overread on very small input
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 11:10:17 +02:00
Michael Niedermayer
b21ba20cc8 wmaprodec: tighter check for num_vec_coeffs
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 03:49:13 +02:00
Michael Niedermayer
c047afb80c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: remove AVCodecContext.dsp_mask
  avconv: fix a segfault when default encoder for a format doesn't exist.
  utvideo: general cosmetics
  aac: Handle HE-AACv2 when sniffing a channel order.
  movenc: Support high sample rates in isomedia formats by setting the sample rate field in stsd to 0.
  xxan: Remove write-only variable in xan_decode_frame_type0().
  ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().

Conflicts:
	ffmpeg.c
	libavcodec/utvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 22:56:07 +02:00
Carl Eugen Hoyos
2f06b56382 Support broken v210 files with 64 byte padding.
Fixes ticket #743.

Reviewed-by: Paul B Mahol
2012-04-21 22:31:11 +02:00
Michael Niedermayer
6c0027bb39 dnxhddec: check that the indicated bit depth matches the tables.
Fixes crash

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 21:39:18 +02:00
Michael Niedermayer
8c59e0c362 xldec: move buffer size check up, it can be done before allocating a frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 21:31:25 +02:00
Michael Niedermayer
94b42da696 xldec: Check that width is a multiple of 4
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 21:30:23 +02:00
Mans Rullgard
d7458bc8c6 dsputil: remove unused functions
These functions were left unused by the lowres removal.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 20:00:39 +01:00
Mans Rullgard
2bcbd98459 Remove lowres video decoding
This feature is complex, of questionable utility, and slows down
normal decoding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 18:56:19 +01:00
Mans Rullgard
95510be8c3 avcodec: remove AVCodecContext.dsp_mask
This removes all references to AVCodecContext.dsp_mask and marks
it for eviction at the next version bump.  It has been superseded
by av_set_cpu_flag_mask() which, unlike this field, works everywhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 18:30:01 +01:00
Michael Niedermayer
5a35bd92ad cook: check subacket count
Fixes out of array writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 19:28:35 +02:00
Jakub Stachowski
93bf1aac6a wmalossless: Ensure that last frame is not written again if nothing was decoded in current packet.
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 19:05:16 +02:00
Michael Niedermayer
9849515214 Revert "h264: assembly version of get_cabac for x86_64 with PIC (v4)"
This broke compilation on darwin, revert until a better solution is found.

This reverts commit a812b599b5.
2012-04-21 02:09:27 +02:00
Jan Ekström
b5c3f0b994 utvideo: general cosmetics
General cosmetics, such as keeping lines under 80 characters,
fixing a couple of typos (predition -> prediction) and a
general style fix that was pointed out by Derek when I was having
my sliced multithreading patch in review by him.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-20 18:37:34 -04:00
Roland Scheidegger
a812b599b5 h264: assembly version of get_cabac for x86_64 with PIC (v4)
This adds a hand-optimized assembly version for get_cabac much like the
existing one, but it works if the table offsets are RIP-relative.
Compared to the non-RIP-relative version this adds 2 lea instructions
and it needs one extra register.
There is a surprisingly large performance improvement over the c version (more
so than the generated assembly seems to suggest) just in get_cabac, I measured
roughly 40% faster for get_cabac on a K8. However, overall the difference is
not that big, I measured roughly 5% on a test clip on a K8 and a Core2.
Hopefully it still compiles on x86 32bit...
v2: incorporated feedback from Loren Merritt to avoid rip-relative movs
for every table, and got rid of unnecessary @GOTPCREL.
v3: apply similar fixes to the the decode_significance functions, and use
same macro arguments for non-pic case.
v4: prettify inline asm arguments, add a non-fast-cmov version (as I expect
the c code to be faster otherwise since both cmov and sbb suck hard on a
Prescott, even can't construct the mask with a 64bit shift as that's just as
terrible - it's quite difficult to find usable instructions on that chip...).
This is tested to work but not on a P4, in theory it _should_ be fast there.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 00:27:06 +02:00
Alex Converse
7eacd70fea aac: Handle HE-AACv2 when sniffing a channel order. 2012-04-20 14:06:28 -07:00
Michael Niedermayer
3194ab78a6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: add a cook parser to get subpacket duration
  FATE: allow lavf tests to alter input parameters
  FATE: replace the acodec-pcm_s24daud test with an enc_dec_pcm checksum test
  FATE: replace the acodec-g726 test with 4 new encode/decode tests
  FATE: replace current g722 encoding tests with an encode/decode test
  FATE: add a pattern rule for generating asynth wav files
  FATE: optionally write a WAVE header in audiogen
  avutil: add audio fifo buffer

Conflicts:
	doc/APIchanges
	libavcodec/version.h
	libavutil/avutil.h
	tests/Makefile
	tests/codec-regression.sh
	tests/fate/voice.mak
	tests/lavf-regression.sh
	tests/ref/acodec/g722
	tests/ref/acodec/g726
	tests/ref/acodec/pcm_s24daud
	tests/ref/lavf/dv_fmt
	tests/ref/lavf/gxf
	tests/ref/lavf/mxf
	tests/ref/lavf/mxf_d10
	tests/ref/seek/lavf_dv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 22:18:26 +02:00
Diego Biurrun
f973a85d4a xxan: Remove write-only variable in xan_decode_frame_type0().
libavcodec/xxan.c:293:13: warning: variable ‘corr_end’ set but not used
2012-04-20 21:08:35 +02:00
Diego Biurrun
b1563d0cf9 ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().
This simplifies the code a bit and avoids an uninitialized variable warning.
2012-04-20 21:08:34 +02:00
Michael Niedermayer
4a80ebe491 indeo3: Fix reallocation code so that it doesnt become inconsistent.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 18:13:29 +02:00
Justin Ruggles
b0e9edc44f avcodec: add a cook parser to get subpacket duration
Fixes jittery video playback of rm files with cook audio.
2012-04-20 12:11:20 -04:00
Michael Niedermayer
2c22701c37 ac3dec: Check number of output channels.
Fixes out of array write.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 17:52:33 +02:00
Michael Niedermayer
1df49142ba avsdec: Set dimensions instead of relying on the demuxer.
This fixes out of array writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 17:42:18 +02:00
Michael Niedermayer
044f7275d3 ffv1: add optional per slice CRCs to detect undamaged slices.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
b4fc53856d ffv1: move most fields from the frame header to the slice headers with ffv1.3
This will allow decoding a single undamaged slice even if all others are lost

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
9408316a85 ffv1: refactor slice decoding init loop so that the first is less a special case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
8456089f50 ffv1: clear slice state in decode_slice()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
c7a435aab2 ffv1: split clear_slice_state() out so individual slices can be cleared.
This allows us to clear outside of the main thread for example.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
32883c0667 ffv1: split init_slice_state() out so individual slices can be inited
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
d7a4c43f18 ffv1: Add a CRC check to the global header with version 1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-20 15:37:23 +02:00
Michael Niedermayer
2a976debc1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dv: Initialize encoder tables during encoder init.
  dv: Replace some magic numbers by the appropriate #define.
  FATE: pass the decoded output format and audio source file to enc_dec_pcm
  FATE: specify the input format when decoding in enc_dec_pcm()
  x86inc: support AVX abstraction for 2-operand instructions
  configure: detect PGI compiler and set suitable flags
  avconv: check for an incompatible changing channel layout
  avio: make AVIOContext.av_class pointer to const
  nutdec: add malloc check and fix const to non-const conversion warnings

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 21:23:52 +02:00
Michael Niedermayer
a9cd12ee2a mlpdec: set channel variables after checking them
This fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 20:01:33 +02:00
Carl Eugen Hoyos
ab75ad0116 Make targa-in-mov QuickTime-compatible for more colour-spaces.
See ticket #1228.
2012-04-19 17:29:17 +02:00
Carl Eugen Hoyos
b4043ef504 Print unexpected length of flicvideo extradata. 2012-04-19 16:08:12 +02:00
Michael Niedermayer
c90b8a7480 h263dec: Check for width/height changes on frame skips too.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 14:37:35 +02:00
Diego Biurrun
2b98377935 dv: Initialize encoder tables during encoder init. 2012-04-19 14:35:22 +02:00
Michael Niedermayer
903ccf71b7 error_concealment: Check that the reference is not NULL
In normal picture decoding this does not need to be checked but as
error concealment is run in the case of errors the availability of
references is less certain. This may be fixed differently at some
point so that all references are always filled in before the EC
code, in which case this should then be changed to an assert()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 12:56:49 +02:00
Michael Niedermayer
b066046046 error_concealment: make sure mbaff flags are 0 as interlaced is not supported.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 12:56:49 +02:00
Michael Niedermayer
b7c2358f62 error_concealment: switch asserts mostly to av_asserts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 12:56:49 +02:00
Michael Niedermayer
5e59a77cec vc1dec: check that coded slice positions and interlacing match.
This fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 11:16:56 +02:00
Michael Niedermayer
df23d64e07 h263dec: always enable picture dimensions reverting check.
This does not need to be limited to threads and may help with error
resilience on single thread

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 11:16:50 +02:00
Diego Biurrun
f2e4465522 dv: Replace some magic numbers by the appropriate #define. 2012-04-19 10:43:32 +02:00
Michael Niedermayer
74e4bb6912 Merge remote-tracking branch 'hexene/stagefright'
* hexene/stagefright:
  libstagefright: avoid memory leak
  libstagefright: support more output pixel formats
  libstagefright: avoid potential deadlock on output MediaBuffer
  libstagefright: explicitly set positive timestamps as stagefright expects them so
  Merge branches 'stagefright' and 'stagefright-test' into stagefright-test

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 01:58:30 +02:00
Mohamed Naufal
f51b7e52a6 libstagefright: avoid memory leak 2012-04-19 03:00:41 +05:30
Carl Eugen Hoyos
dddd06d5b4 Make tiff-in-mov QuickTime-compatible for more colour-spaces.
Fixes ticket #1228.
2012-04-18 22:33:51 +02:00
Mohamed Naufal
2343a99cf2 libstagefright: support more output pixel formats 2012-04-19 01:42:12 +05:30
Michael Niedermayer
e366e6bfab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ppc: drop unused function dct_quantize_altivec()
  mpegaudiodec: Do not discard mp_decode_frame() return value.
  matroska: do not set invalid default duration if frame rate is zero
  mkv: use av_reduce instead of av_d2q for framerate estimation
  mkv: report average framerate as minimal as well
  avcodec_string: Favor AVCodecContext.codec over the default codec.
  cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow.

Conflicts:
	libavcodec/cook.c
	libavcodec/ppc/mpegvideo_altivec.c
	libavcodec/utils.c
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 22:08:28 +02:00
Mohamed Naufal
1d48e88d41 libstagefright: avoid potential deadlock on output MediaBuffer
Maintain an output queue of AVFrames instead of MediaBuffers
so that the latter can be released early. This avoids a potential deadlock
between the stagefright decoder::read() and Stagefright_decode_frame()
2012-04-19 01:08:50 +05:30
Michael Niedermayer
a02f8ef1d2 h263dec: Prevent dimension changes from leaking on errors in header parsing.
This fixes crashes with frame threads caused by inconsistent context parameters.

Fixes Ticket1207

Found-by: John Villamil
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 21:21:28 +02:00
Mohamed Naufal
7b915a4045 libstagefright: explicitly set positive timestamps as stagefright expects them so 2012-04-19 00:02:53 +05:30
Diego Biurrun
0f53601ac6 ppc: drop unused function dct_quantize_altivec()
This also allows dropping some PPC-specific ugliness from dsputil.[ch].
2012-04-18 18:53:54 +02:00
Diego Biurrun
aa3f2cb584 mpegaudiodec: Do not discard mp_decode_frame() return value.
This fixes the warning:
libavcodec/mpegaudiodec.c:1704:14: warning: variable ‘out_size’ set but not used
2012-04-18 18:28:24 +02:00
Michael Niedermayer
601d072e68 diracdec: check xybsep
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 16:49:46 +02:00
Michael Niedermayer
e531e73a6f indeo: Make sure the to be used vlc table has been initilaized.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 16:42:34 +02:00
Robert Nagy
c58290e5e5 Reset pts_correction state on codec flush.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 15:34:34 +02:00
Michael Niedermayer
8201092241 h264: reset current_slice on context reinit
This fixes a null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 15:30:34 +02:00
Alexander Bokovikov
fc882b6e9c Fix build dependencies for libvo-aac and libopencore-amrnb. 2012-04-18 10:32:13 +02:00
Michael Niedermayer
124eb7e476 aacdec: drop channel reseting code.
its no longer needed and causes a race with the flv demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 09:43:13 +02:00
Michael Niedermayer
aa0f84df5a aacdec: disable new chan_config guessing code from libav.
It causes more problems than it solves.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 09:37:38 +02:00
Michael Niedermayer
dbe29db8cb aacdec: more verbose overread error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 09:36:41 +02:00
Michael Niedermayer
68526dbc29 aacdec: reduce difference to alexs version of aacdec.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 00:50:18 +02:00
Michael Niedermayer
1232723741 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacenc: Fix issues with huge values of bit_rate.
  dv_tablegen: Drop unnecessary av_unused attribute from dv_vlc_map_tableinit().
  proresenc: multithreaded quantiser search
  riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE header
  avconv: only set the "channels" option when it exists for the specified input format
  avplay: update get_buffer to be inline with avconv
  aacdec: More robust output configuration.
  faac: Fix multi-channel ordering
  faac: Add .channel_layouts
  rtmp: Support 'rtmp_playpath', an option which overrides the stream identifier
  rtmp: Support 'rtmp_app', an option which overrides the name of application
  avutil: add better documentation for AVSampleFormat

Conflicts:
	libavcodec/aac.h
	libavcodec/aacdec.c
	libavcodec/aacenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 00:28:06 +02:00
Alex Converse
df8d5eaa14 avcodec_string: Favor AVCodecContext.codec over the default codec.
This improves output for formats with more than one AVCodec.
2012-04-17 14:51:23 -07:00
Alex Converse
b5d2bf964b cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow. 2012-04-17 14:51:23 -07:00
Michael Niedermayer
a66675268f indeo5: dont run the wavelet transform over partially decoded bands.
This fixes a null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 20:02:13 +02:00
sebist
7a3d2258a6 CrystalHD: Set aspect ratio.
Signed-off-by: sebist <sebok.istvan@gmail.com>
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 19:36:15 +02:00
sebist
e128182afd CrystalHD: fix pStride value.
Signed-off-by: sebist <sebok.istvan@gmail.com>
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 19:34:51 +02:00
Michael Niedermayer
ebf6d1d295 nuv: check buffer size before checking content.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 19:32:04 +02:00
Reimar Döffinger
0f96f0d996 aacenc: Fix issues with huge values of bit_rate.
Do not pointlessly call ff_alloc_packet multiple times,
and fix an infinite loop by clamping the maximum
number of bits to target in the algorithm that does
not use lambda.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-17 10:25:28 -04:00
Diego Biurrun
db6e26d70c dv_tablegen: Drop unnecessary av_unused attribute from dv_vlc_map_tableinit(). 2012-04-17 13:36:43 +02:00
Michael Niedermayer
15141f939d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo3: add parens around some macro arguments
  h264: use proper PROLOGUE statement for a function using 8 registers.
  doc: Update sample Vim config with suitable (function) indentation settings.
  dv: Merge dvquant.h into dvdata.c where all other DV tables reside.
  dv: Move static tables only used in one place to where they are used.
  graphparser: set next to NULL on an entry extracted from inputs list
  doc/filters: update documentation.
  avconv: flush decoders immediately after an EOF.
  avconv: send EOF to vsrc_buffer.
  avconv: reindent.

Conflicts:
	doc/filters.texi
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 12:13:22 +02:00
Kostya Shishkov
83632cbb11 proresenc: multithreaded quantiser search 2012-04-17 07:43:59 +02:00
Michael Niedermayer
84cd3729ef imgconvert: fix regression with fate-gif colorspaces.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 04:05:14 +02:00
Alex Converse
9fb7e14635 aacdec: More robust output configuration.
Save the old output configuration (if it has been used
successfully) when trying a new configuration. If the new configuration
fails to decode, restore the last successful configuration.
2012-04-16 14:09:52 -07:00
Carl Eugen Hoyos
af2f655c02 faac: Fix multi-channel ordering
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-04-16 14:09:52 -07:00
Alex Converse
ca332b1d8c faac: Add .channel_layouts 2012-04-16 14:09:51 -07:00
Michael Niedermayer
4fa706a4a6 svq3: check the watermark height.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 18:36:40 +02:00
Michael Niedermayer
efe1ba7201 diracdec: check lowdelay bytes.
Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 18:36:39 +02:00
Michael Niedermayer
c963189bc2 g729dec: initialize pitch_delay_int_prev to the minimum valid value.
This prevents an out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 18:36:34 +02:00
Mans Rullgard
8b84e082ed indeo3: add parens around some macro arguments
Without these, the expansion contains things like --1 with
some compilers resulting in build errors.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-16 16:09:08 +01:00
Ronald S. Bultje
87a246341b h264: use proper PROLOGUE statement for a function using 8 registers.
Fixes crashes when using biweight on win64.
2012-04-16 08:07:21 -07:00
Michael Niedermayer
31a45014f4 loco: fix 10l typo (missing case)
Found-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 16:46:53 +02:00
Michael Niedermayer
47f0beadba dsicinav: Check for overread in RLE decode.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 16:44:12 +02:00
Michael Niedermayer
71d3c25a7e smacker: Check get_vlc() return values.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 16:39:02 +02:00
Michael Niedermayer
8e77c3846e dcadec: fix global array overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 16:27:34 +02:00
Carl Eugen Hoyos
bdeb54e176 Support decoding LOCO_CRGBA.
Fixes a part of ticket #1222.
2012-04-16 16:19:41 +02:00
Michael Niedermayer
884efd4e09 indeo4: avoid storing invalid values in quant_mat.
Fixes a global array overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 15:27:39 +02:00
Michael Niedermayer
a10f71c1d6 vc1dec: add missing terminating element to mpeg4_video_profiles
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 13:41:17 +02:00
Michael Niedermayer
e985cfd18b vc1dec: check end_mb_y / start_mb_y validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 13:36:11 +02:00
Michael Niedermayer
fa1b2c8e18 ffv1: attempt to workaround intel CC fate issue.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 12:01:46 +02:00
Diego Biurrun
a3dbd459ff dv: Merge dvquant.h into dvdata.c where all other DV tables reside. 2012-04-16 10:04:57 +02:00
Diego Biurrun
05afc5f57d dv: Move static tables only used in one place to where they are used. 2012-04-16 10:04:56 +02:00
Michael Niedermayer
8dfb13ea59 adxdec: Check available space before decoding block.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-16 02:18:10 +02:00
Michael Niedermayer
88a97d660d indeo5: check for unsupported luma block type
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 21:02:01 +02:00
Michael Niedermayer
fefc65675e tiffdec: check overread for packbits
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 20:20:43 +02:00
Thilo Borgmann
2837d8dc27 alsdec: fix number of decoded samples in first sub-block in BGMC mode.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 20:20:37 +02:00
Michael Niedermayer
44c4170c52 lzw: check for overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 18:21:53 +02:00
Michael Niedermayer
a63c813797 pngdec: check bits_per_pixel for palette mode.
This fixes a out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 18:21:53 +02:00
Michael Niedermayer
c7dc19d68f png: make sure the previous frames dimensions match before using it as reference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 18:21:53 +02:00
Michael Niedermayer
3118e3b137 ff_lag_rac_init: fix signedness error leading to out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 17:01:38 +02:00
Michael Niedermayer
20335598f2 qdm2_fft_decode_tones: fix infinite loop
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 17:01:38 +02:00
Michael Niedermayer
1a974679d0 qdm2: Check vlc_stage3_values index.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 16:54:55 +02:00
Carl Eugen Hoyos
cb8f5194b3 Set bits_per_coded_sample when encoding Microsoft Video-1.
Fixes ticket #1193.
2012-04-15 16:35:03 +02:00
Carl Eugen Hoyos
8cb9f99e9f Support decoding unaligned rgb24 lagarith.
Fixes ticket #1214.
2012-04-15 16:34:33 +02:00
Michael Niedermayer
b1096b6ee7 xan: check for vector_segment overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 16:06:52 +02:00
Michael Niedermayer
b962932cba eatgv: check vector_bits
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 16:06:51 +02:00
Michael Niedermayer
93927eb334 ff_ivi_decode_blocks: fix negative scan_pos case.
Fixes out of global array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 14:59:21 +02:00
Michael Niedermayer
f0bf9e9c2a indeo: Check allocated tile size in ff_ivi_process_empty_tile()
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 14:59:20 +02:00
Michael Niedermayer
5ad7335eba indeo5: check tile size in decode_mb_info().
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 14:59:20 +02:00
Michael Niedermayer
af38823709 indeo5: set transform_size like indeo4 does to prevent useage of too large transforms.
I dont know if this is needed, its a precautionary change.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 13:33:18 +02:00
Michael Niedermayer
0846719dd1 indeo4: check transform size.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 13:26:19 +02:00
Derek Buitenhuis
5a59d2c40b utvideo: Remove unused variable 'src_size'
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-15 00:24:19 -04:00
Derek Buitenhuis
5096399df2 utvideo: Remove unused variable 'src_size'
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-15 00:18:28 -04:00
Michael Niedermayer
c354576457 mpegvideo_enc: fix dts
Fixes Ticket1200

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 01:08:13 +02:00
Michael Niedermayer
7432bcfe5a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vsrc_buffer: fix check from 7ae7c41.
  libxvid: Reorder functions to avoid forward declarations; make functions static.
  libxvid: drop some pointless dead code
  wmal: vertical alignment cosmetics
  wmal: Warn about missing bitstream splicing feature and ask for sample.
  wmal: Skip seekable_frame_in_packet.
  wmal: Drop unused variable num_possible_block_size.
  avfiltergraph: make the AVFilterInOut alloc/free API public
  graphparser: allow specifying sws flags in the graph description.
  graphparser: fix the order of connecting unlabeled links.
  graphparser: add avfilter_graph_parse2().
  vsrc_buffer: allow using a NULL buffer to signal EOF.
  swscale: handle last pixel if lines have an odd width.
  qdm2: fix a dubious pointer cast
  WMAL: Do not try to read rawpcm coefficients if bits is invalid
  mov: Fix detecting there is no sync sample.
  tiffdec: K&R cosmetics
  avf: has_duration does not check the global one
  dsputil: fix optimized emu_edge function on Win64.

Conflicts:
	doc/APIchanges
	libavcodec/libxvid_rc.c
	libavcodec/libxvidff.c
	libavcodec/tiff.c
	libavcodec/wmalosslessdec.c
	libavfilter/avfiltergraph.h
	libavfilter/graphparser.c
	libavfilter/version.h
	libavfilter/vsrc_buffer.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 22:37:43 +02:00