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

19135 Commits

Author SHA1 Message Date
Michael Niedermayer
e890b68962 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputil: fix invalid array indexing
  configure: add libavresample to rpath
  build: icc: silence some warnings
  fft-test: add option to set cpuflag mask
  cpu: recognise only cpu flag names pertinent to the architecture
  avutil: add av_parse_cpu_flags() function
  vp8: armv6: fix non-armv6t2 build
  vp8: armv6 optimisations
  vp8: arm: separate ARMv6 functions from NEON
  ARM: add some compatibility macros
  mov: support eac3 audio
  avf: fix faulty check in has_duration

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/arm/Makefile
	libavcodec/arm/asm.S
	libavcodec/arm/vp8dsp_armv6.S
	libavcodec/arm/vp8dsp_init_arm.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-26 22:24:58 +02:00
Mans Rullgard
0a07f2b346 dsputil: fix invalid array indexing
Indexing outside an array is invalid and causes errors with
gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-26 17:07:43 +01:00
Michael Niedermayer
a4b58fd9e8 ffv1: add examples of supported slices counts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-26 04:35:30 +02:00
Mans Rullgard
b6a6e90a7c fft-test: add option to set cpuflag mask
This can be useful for testing.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
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
Michael Niedermayer
01bf2ad735 indeo4: setup width/height properly.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 20:04:51 +02:00
Michael Niedermayer
83c7803f55 lagarith: check count before writing zeros.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 18:54:10 +02:00
Jakub Stachowski
56dcfe87ef Clear residues only in not coded channel. This fixes overwriting coded residues with zeros if first channel is coded and second is not.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 18:54:09 +02:00
Diego Biurrun
219a9ed19e libxvid: Reorder functions to avoid forward declarations; make functions static. 2012-04-14 17:45:38 +02:00
Diego Biurrun
7a0cb74fee libxvid: drop some pointless dead code 2012-04-14 17:45:38 +02:00
Michael Niedermayer
64bd7f8e4d wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 16:33:42 +02:00
Mashiat Sarker Shakkhar
dac79c2737 wmal: vertical alignment cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:02:25 +02:00
Mashiat Sarker Shakkhar
2e13f57993 wmal: Warn about missing bitstream splicing feature and ask for sample.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:02:24 +02:00
Mashiat Sarker Shakkhar
9900dd2d9c wmal: Skip seekable_frame_in_packet.
There is no point in storing the value in a variable, since it is not
used anywhere else in the decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:02:22 +02:00
Mashiat Sarker Shakkhar
07933b44dd wmal: Drop unused variable num_possible_block_size.
This is probably a leftover from WMA Pro.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:01:23 +02:00
Michael Niedermayer
b3a4351582 wmalosslessdec: Fix reading too many bits in decode_channel_residues()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 14:51:49 +02:00
Michael Niedermayer
2a7063de54 wmalosslessdec: fix a get_bits(0) in decode_ac_filter
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 14:50:48 +02:00
Michael Niedermayer
a0abefb0af wmalosslessdec: make mclms arrays big enough for whats written into them.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 14:49:51 +02:00
Michael Niedermayer
d442c4462a wmalosslessdec: Make arrays WMALL_BLOCK_MAX_SIZE big and check samples_per_frame.
The samples_per_frame check is ported from wmaprodec.c

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 13:35:29 +02:00
Michael Niedermayer
9166f483c5 wmaprodec: check min_samples_per_subframe
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 13:13:48 +02:00
Michael Niedermayer
b28c678ba8 wmaprodec; fix get_bits(0) case.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 12:03:31 +02:00
Michael Niedermayer
97a5addfcf wmaprodec: check num_vec_coeffs for validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 11:46:23 +02:00
Michael Niedermayer
cca9528524 mp3on4: allocate a large enough frame.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 00:24:38 +02:00
Michael Niedermayer
72b9537d88 dfa: Fix out of array write in decode_dds1()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 22:59:33 +02:00
Michael Niedermayer
d1c95d2ce3 dfa: fix out of array write in decode_wdlt()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 22:58:54 +02:00
Mans Rullgard
f5be7958e3 qdm2: fix a dubious pointer cast
This reworks a loop to get rid of an ugly pointer cast,
fixing errors seen with the PathScale ENZO compiler.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-13 21:42:22 +01:00
Michael Niedermayer
680097cb6d WMAL: Do not try to read rawpcm coefficients if bits is invalid
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-13 23:13:03 +03:00
Alex Converse
f346b6bbeb tiffdec: K&R cosmetics 2012-04-13 12:58:19 -07:00
Michael Niedermayer
367d9b2957 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: K&R formatting cosmetics (part II)
  tiffdec: Add a malloc check and refactor another.
  faxcompr: Check malloc results and unify return path
  configure: escape colons in values written to config.fate
  ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
  matroska: Fix leaking memory allocated for laces.
  pthread: Fix crash due to fctx->delaying not being cleared.
  vp3: Assert on invalid filter_limit values.
  h264: fix 10bit biweight functions after recent x86inc.asm fixes.
  ffv1: Fix size mismatch in encode_line.
  movenc: Remove a dead initialization
  git-howto: Explain how to avoid Windows line endings in git checkouts.
  build: Move all arch OBJS declarations into arch subdirectory Makefiles.

Conflicts:
	configure
	libavcodec/vp3.c
	libavformat/matroskadec.c
	libavutil/Makefile
	libswscale/Makefile
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 21:50:37 +02:00
Ronald S. Bultje
b089ca871a dsputil: fix optimized emu_edge function on Win64.
Recent register allocation changes (x86inc.asm update) changed the
register order and thus opcodes for the inner loops. One of them became
>128bytes, which confuses other parts of this function where it jumps
to fixed-offset positions to extend the edge by fixed amounts. A simple
register change fixes this.
2012-04-13 11:28:30 -07:00
Alex Converse
90a4306007 tiffdec: Add a malloc check and refactor another. 2012-04-13 09:49:13 -07:00
Alex Converse
99a335299f faxcompr: Check malloc results and unify return path 2012-04-13 09:49:13 -07:00
Michael Niedermayer
2ec8789eb8 avpicture_layout: use a endian independant format for the palette.
This should fix the failing fate PAL8 tests.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 18:21:51 +02:00
Dale Curtis
a9d114dc8a pthread: Fix crash due to fctx->delaying not being cleared.
corrects invalid return when avpkt->size == 0.

Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 11:10:38 +02:00
Justin Ruggles
de7f22ab0c ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
Fixes ac3-encode and eac3-encode FATE test failures with SSE2 disabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:33:04 -07:00
Dale Curtis
97ae370078 pthread: Fix crash due to fctx->delaying not being cleared.
Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:32:01 -07:00
Dale Curtis
27c2fb0f72 vp3: Assert on invalid filter_limit values.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:31:55 -07:00
Ronald S. Bultje
76538d7a78 h264: fix 10bit biweight functions after recent x86inc.asm fixes.
This should have been updated in the x86inc.asm update, but was
accidently forgotten.
2012-04-12 21:13:57 -07:00
Alex Converse
2b8374e920 ffv1: Fix size mismatch in encode_line. 2012-04-12 18:34:45 -07:00
Dale Curtis
e9dc616472 vp3: Assert on invalid filter_limit values.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 02:12:22 +02:00
Michael Niedermayer
ca19862d38 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libxvid: remove disabled code
  qdm2: make a table static const
  qdm2: simplify bitstream reader setup for some subpacket types
  qdm2: use get_bits_left()
  build: Consistently handle conditional compilation for all optimization OBJS.
  avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics
  msrle: convert MS RLE decoding function to bytestream2.
  x86inc improvements for 64-bit

Conflicts:
	common.mak
	libavcodec/avpacket.c
	libavcodec/bfi.c
	libavcodec/msrledec.c
	libavcodec/qdm2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 00:39:19 +02:00
Reimar Döffinger
4561feb4bf vorbisdec: use correct channels variable.
All code should use the local variable, the
AVCodecContext might not yet have the updated value.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:32:08 +02:00
Diego Biurrun
18e8fef7c9 libxvid: remove disabled code 2012-04-12 13:10:38 +02:00
Michael Niedermayer
e8c63981e5 ratecontrol: Use ticks_per_frame to calculate fps.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 12:54:54 +02:00
Jakub Stachowski
3b00fd5985 wmalosslessdec: Reset residues to 0 if they were not decoded from bitstream.
If channel residues are have not been decoded from bitstream, they should be
initialized to 0 instead of using values from previous subframe.
This causes bursts of noise in silent parts of some files.
This patch fixes bug #1055

Reviewed-by: Benjamin Larsson <benjamin@southpole.se>
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 12:41:53 +02:00
Mans Rullgard
9f3e781eab qdm2: make a table static const
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-12 10:59:23 +01:00
Mans Rullgard
9ffe8ee7c5 qdm2: simplify bitstream reader setup for some subpacket types
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-12 10:59:23 +01:00
Mans Rullgard
a31787ee3b qdm2: use get_bits_left()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-12 10:59:23 +01:00
Michael Niedermayer
9e938d22c5 msmpeg4enc: fix stored fps value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 11:36:17 +02:00
Diego Biurrun
7bb3a302fe build: Consistently handle conditional compilation for all optimization OBJS. 2012-04-12 09:00:49 +02:00
Diego Biurrun
2ef15b46e4 avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics 2012-04-12 09:00:49 +02:00
Michael Niedermayer
0cd17a6291 mjpeg: fix crash with lowres and flipped images
Fixes Ticket1155

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 02:02:30 +02:00
Michael Niedermayer
4f6df20a00 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avplay: Don't free video filters string until the end of decoding.
  movenc: small refactor mov_write_packet
  movenc: remove redundant check
  interplayvideo: fix av_dlog parameter type mismatch
  Drop some pointless #ifdefs.

Conflicts:
	libavcodec/interplayvideo.c
	libavcodec/libxvidff.c
	libavcodec/snowenc.c
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 22:50:22 +02:00
Ronald Bultje
992f71e95d msrle: convert MS RLE decoding function to bytestream2.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-11 16:30:41 -04:00
Henrik Gramner
729f90e268 x86inc improvements for 64-bit
Add support for all x86-64 registers
Prefer caller-saved register over callee-saved on WIN64
Support up to 15 function arguments

Also (by Ronald S. Bultje)
Fix up our asm to work with new x86inc.asm.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-11 15:47:00 -04:00
Reimar Döffinger
5735f768b0 h261: move tables from header to .c file.
Currently they end up twice in the binary, since both
encoder and decoder include the header and thus each gets
their own copy.
This is clearly nonsense for the const tables, but shouldn't
be necessary for the RLTable either.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-11 21:46:33 +02:00
Michael Niedermayer
6952301f33 ff_samples_to_time_base: support AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 20:30:55 +02:00
Dale Curtis
309a931a38 Fix memory leaks on failed ff_h264_decode_init()
During failure conditions ff_h264_decode_init() leaks memory
allocated for nal units.  Found via valgrind.

Valgrind traces: http://pastebin.com/GqTqxs8T

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 15:54:53 +02:00
Diego Biurrun
9676d8eb67 interplayvideo: fix av_dlog parameter type mismatch
libavcodec/interplayvideo.c:909:13: warning: format ‘%p’ expects argument of type ‘void *’, but argument 7 has type ‘GetByteContext’ [-Wformat]
2012-04-11 10:43:47 +02:00
Michael Niedermayer
8702e35b9b vda: try to fix compile
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 23:37:30 +02:00
Michael Niedermayer
e387c9d5dd Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  rv40dsp x86: use only one register, for both increment and loop counter
  rv40dsp: implement prescaled versions for biweight.
  avconv: use default channel layouts when they are unknown
  avconv: parse channel layout string
  nutdec: K&R formatting cosmetics
  vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
  mem: Consistently return NULL for av_malloc(0)
  vf_overlay: implement poll_frame()
  vf_scale: support named constants for sws flags.
  lavc doxy: add all installed headers to doxy groups.
  lavc doxy: add avfft to the main lavc group.
  lavc doxy: add remaining avcodec.h functions to a misc doxygen group.
  lavc doxy: add AVPicture functions to a doxy group.
  lavc doxy: add resampling functions to a doxy group.
  lavc doxy: replace \ with /
  lavc doxy: add encoding functions to a doxy group.
  lavc doxy: add decoding functions to a doxy group.
  lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}
  lavc doxy: add AVPacket-related stuff to a separate doxy group.
  lavc doxy: add core functions/definitions to a doxy group.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/avcodec.h
	libavcodec/vda.c
	libavcodec/x86/rv40dsp.asm
	libavfilter/vf_scale.c
	libavformat/nutdec.c
	libavutil/mem.c
	tests/ref/acodec/pcm_s24daud

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 22:53:25 +02:00
Reimar Döffinger
1ac606bae6 aacsbr: silence message for SBR extension "padding".
Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.
Fixes trac issue #836.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-10 20:51:20 +02:00
Diego Biurrun
679481b3b6 Drop some pointless #ifdefs.
The files are only compiled if the #ifdef conditions are met.
2012-04-10 19:27:38 +02:00
Christophe GISQUET
2130bd8f5b rv40dsp x86: use only one register, for both increment and loop counter
Around 10 cycles faster for luma.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-10 10:07:09 -07:00
Christophe GISQUET
272b252c01 rv40dsp: implement prescaled versions for biweight.
Quite often, the original weights are multiple of 512. By prescaling them
by 1/512 when they are computed (once per frame), no intermediate shifting
is needed, and no prescaling on each call either.

The x86 code already used that trick.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-10 10:06:48 -07:00
Sebastien Zwickert
a40ba3afe8 vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-10 15:50:56 +03:00
Michael Niedermayer
6bfb3042b3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: use default alignment for audio buffer
  avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
  avutil: use align == 0 for default alignment in audio sample buffer functions
  avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc()
  avconv: remove OutputStream.picref.
  avconv: only set SAR once on the decoded frame.
  avcodec: validate the channel layout vs. channel count for decoders
  audioconvert: make av_get_channel_layout accept composite names.
  avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()

Conflicts:
	doc/APIchanges
	ffmpeg.c
	libavcodec/utils.c
	libavcodec/version.h
	libavutil/audioconvert.c
	libavutil/audioconvert.h
	libavutil/avutil.h
	libavutil/samplefmt.c
	libavutil/samplefmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 23:02:33 +02:00
Anton Khirnov
7c59b5c2a5 lavc doxy: add all installed headers to doxy groups. 2012-04-09 21:25:17 +02:00
Anton Khirnov
ec57b7de74 lavc doxy: add avfft to the main lavc group. 2012-04-09 21:24:46 +02:00
Anton Khirnov
8a74029ea2 lavc doxy: add remaining avcodec.h functions to a misc doxygen group. 2012-04-09 21:18:47 +02:00
Anton Khirnov
6aadfbda09 lavc doxy: add AVPicture functions to a doxy group. 2012-04-09 21:18:28 +02:00
Anton Khirnov
56512ce104 lavc doxy: add resampling functions to a doxy group. 2012-04-09 21:18:19 +02:00
Anton Khirnov
40ca0e6a75 lavc doxy: replace \ with /
It's the more proper symbol to use and it prevents doxygen from thinking
it's a command.
2012-04-09 21:16:37 +02:00
Anton Khirnov
f038515f0a lavc doxy: add encoding functions to a doxy group. 2012-04-09 21:16:24 +02:00
Anton Khirnov
c8ef8464c2 lavc doxy: add decoding functions to a doxy group. 2012-04-09 21:14:05 +02:00
Anton Khirnov
199ada4944 lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO} 2012-04-09 21:13:49 +02:00
Anton Khirnov
30f3f62563 lavc doxy: add AVPacket-related stuff to a separate doxy group.
Also move AV_PKT_DATA_PARAM_CHANGE/AV_PKT_DATA_H263_MB_INFO to the
proper place.
2012-04-09 21:13:17 +02:00
Anton Khirnov
294b3a5074 lavc doxy: add core functions/definitions to a doxy group. 2012-04-09 21:12:53 +02:00
Michael Niedermayer
3532a87a25 exr: optimize exr_halflt2uint()
30% faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 20:55:09 +02:00
Diego Biurrun
02c39f056a ppc: Add/remove a number of const qualifiers to fix related warnings. 2012-04-09 20:39:33 +02:00
Reimar Döffinger
438f3ef821 RV20: try keeping aspect during resolution changes.
Resolution changes are usually only used to scale with
network bandwidth, the (full) resolution specified in the
RM header really is authoritative.
While I am not sure this is the best solution, it is a
conservative approach that still should fix the most
common cases.
In particular, it fixes aspect with the sample from trac
issue #785 (in MPlayer, ffplay seems to just ignore
sample aspect changes in mid-playback).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-09 17:21:34 +02:00
Reimar Döffinger
1d130328ed aacdec: update debug code to always print the processed data.
When decoding LATM, this function will not process extradata
but a different buffer.
It seems this was forgotten to update when LATM support
was added.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-09 17:21:34 +02:00
Justin Ruggles
c58846f3a8 avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
Use default alignment in audio_get_buffer()
2012-04-09 10:20:35 -04:00
Justin Ruggles
1337de0c4b avcodec: validate the channel layout vs. channel count for decoders
Set avctx->channel_layout to 0 if the channel count does not match
avctx->channels.
2012-04-08 18:45:58 -04:00
Michael Niedermayer
5d6a40bc74 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtsp: Don't use av_malloc(0) if there are no streams
  rtsp: Don't use uninitialized data if there are no streams
  vaapi: mpeg2: fix slice_vertical_position calculation.
  hwaccel: mpeg2: decode first field, if requested.
  cosmetics: Fix indentation
  rtsp: Don't expose the MS-RTSP RTX data stream to the caller

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 20:55:11 +02:00
Reimar Döffinger
03ef5047d1 Fix nellymoser encoder crash with hardcoded tables.
Use the correct init function to avoid crashes due to writing
to a rodata location.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-08 20:26:25 +02:00
Michael Niedermayer
1d80c8db27 ffv1: set slice geometry based on user specified slices.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 17:03:38 +02:00
Michael Niedermayer
8dfbc1c5cf ffv1: allow enabling of version 2 by using some of its features.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 16:48:34 +02:00
Michael Niedermayer
1b295a17d7 ffv1: fix version=2 chroma handling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 16:01:37 +02:00
Michael Niedermayer
5612359501 ffv1: add a minor version field beginning with ffv1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 16:01:36 +02:00
Reimar Döffinger
069cf86d32 Fix side-data memleak also for audio.
This uses the same code as in decode_video also in decode_audio.
Should fix valgrind FATE failures for nellymoser encode test.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-08 13:06:13 +02:00
Gwenole Beauchesne
58e1032d8f vaapi: mpeg2: fix slice_vertical_position calculation.
VASliceParameterBufferMPEG2.slice_vertical_position shall express
the slice vertical position from the original bitstream. The HW
decoder will correctly decode to the right line computed from the
appropriate top_field_first and is_first_field flags.

This patch aligns with DXVA's definition, which is what most HW and
drivers expect. In particular, Intel PowerVR (Cedarview et al.) and
NVIDIA (through VA-to-VDPAU layer). Since it looks more complex to fix
binary drivers, I aligned the Intel Gen driver (Sandy Bridge et al.)
to this behaviour, while maintaining compatibility with codec layers
not providing this patch yet.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 13:10:20 +03:00
Gwenole Beauchesne
9cb150c9ab hwaccel: mpeg2: decode first field, if requested.
If user opted to present fields as they come, then the first field
picture needs to be submitted to the HW for decoding. In particular,
this fixes MPEG-2 decoding of interlaced streams.

Tested on Intel Cedar Trail, Sandy Bridge and Ivy Bridge platforms.
Someone reported on the ffmpeg-devel@ list this also works on DXVA
(Windows) and other Linux platforms (NVIDIA, through the VA wrapper).

This also means a similar patch to non-hwaccel VDPAU may be necessary.

Note: I believe the SLICE_FLAG_ALLOW_FIELD is useless since the first
field shall always be submitted to the HW anyway. Nobody uses HW accels
(dxva, vaapi, vdpau, etc.) without that flag though.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 13:08:52 +03:00
Reimar Döffinger
e9841505d2 Allow setting CODEC_FLAG2_CHUNKS via the name "chunks".
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-08 02:43:56 +02:00
Michael Niedermayer
6101e5322f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
  asfdec: Add an option for not searching for the packet markers
  cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
  cosmetics: Align codec declarations
  cosmetics: Convert mimic.c to utf-8
  avconv: remove an unused function parameter.
  avconv: remove now pointless variables.
  avconv: drop support for building without libavfilter.
  nellymoserenc: fix crash due to memsetting the wrong area.
  libavformat: Only require first packet to be known for audio/video streams
  avplay: Don't try to scale timestamps if the tb isn't set

Conflicts:
	Changelog
	configure
	ffmpeg.c
	libavcodec/aacenc.c
	libavcodec/bmpenc.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/ffv1.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/libopenjpegdec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/pamenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngenc.c
	libavcodec/qtrleenc.c
	libavcodec/rawdec.c
	libavcodec/sgienc.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.c
	libavcodec/wmv2dec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 22:41:37 +02:00
Reimar Döffinger
5012c07336 Support detecting and demuxing EIA-608 subtitles in mov.
The format is slightly proprietary.
DVDs use a format of
code byte (0x00, 0x01, 0xfe or 0xff), two data bytes
MOV uses instead
cdat/cdt2 atom, two data bytes
Auto-detecting and supporting both in one decoder is trivial,
so a single codec ID is used.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-07 22:11:21 +02:00
Michael Niedermayer
50ec8a2acd mpeg4videodec: Force quant_precision to stay within the valid range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
59edf33f7b wmalosslessdec: rawpcm_tile fixes to keep get_bits() values within defined range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
d0212bb032 wmalosslessdec: channel residues can be 32 bit thus need _long bitreader.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
a931d87727 mpeg12dec: Prevent f_code from becoming invalid.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
6c3d6a214c alsdec: Check k used for rice decoder.
Values that fail this check will cause failure of decode_rice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00