Commit Graph

40026 Commits

Author SHA1 Message Date
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
Nicolas George
b27383e453 ffprobe: do not try to decode empty packets.
Fixes sporadic decode failures and trac ticket #997.
2012-04-21 14:02:08 +02:00
Stefano Sabatini
dd3043d1c0 lavfi/setfield: remove stray argument in av_log()
Fix warning:
libavfilter/vf_setfield.c: In function ‘init’:
libavfilter/vf_setfield.c:64:20: warning: too many arguments for format [-Wformat-extra-args]
2012-04-21 12:32:50 +02:00
Stefano Sabatini
459414b4d9 lavfi/setfield: rename variable top_field_first to mode
The new name better reflects the meaning of the variable, after the
recent change.
2012-04-21 12:32:38 +02:00
Tim Nicholson
c97201dd29 lavfi/setfield: add "progressive" option
Add "prog" parameter value, and deprecate numeric values.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-04-21 10:09:49 +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
Andrew Wason
e9b1d5ae5e fix swr_convert buffering of packed audio
swr_convert is not properly buffering packed input audio when the
output is not large enough, and when resampling is not actually needed
(same samplerate and no SWR_FLAG_RESAMPLE).

buf_set() is only handling the first channel and leaving the others as-is.

Sample program to reproduce the problem is here https://gist.github.com/2431768

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-21 01:57:21 +02: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
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
Reimar Döffinger
9b1f776d75 Fix compilation with NASM.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-20 21:16:12 +02:00
Reimar Döffinger
dd5e1fc22e mxfdec: fix memleak on read error/EOF.
This also matches the rest of the demuxer which will return
partial packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-20 20:58:45 +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
Nicolas George
34c426be4a ffmpeg: check encoder earlier.
Fixes a segfault with Ogg output, libtheora not compiled in
and no codec specified.
2012-04-20 16:30:58 +02:00
Justin Ruggles
acb1730218 FATE: allow lavf tests to alter input parameters
Change some lavf tests to avoid resampling and channel mixing.
2012-04-20 10:23:57 -04:00
Justin Ruggles
5052980400 FATE: replace the acodec-pcm_s24daud test with an enc_dec_pcm checksum test
This avoids resampling and channel mixing by using a source with
the correct channel layout and sample rate.
2012-04-20 10:23:57 -04:00
Justin Ruggles
03caef1bed FATE: replace the acodec-g726 test with 4 new encode/decode tests
Avoids resampling and channel mixing. This only tests the behavior
with respect to input and output audio rather than also testing changes
to the encoder or muxer that do not affect the resulting decoded output.
2012-04-20 10:23:57 -04:00
Justin Ruggles
a6c8cca2a8 FATE: replace current g722 encoding tests with an encode/decode test
Avoids resampling and channel mixing. This only tests the behavior
with respect to input and output audio rather than also testing changes
to the encoder or muxer that do not affect the resulting decoded output.
2012-04-20 10:23:57 -04:00
Justin Ruggles
870165e217 FATE: add a pattern rule for generating asynth wav files 2012-04-20 10:23:57 -04:00
Justin Ruggles
010943c6ce FATE: optionally write a WAVE header in audiogen 2012-04-20 10:23:57 -04:00
Justin Ruggles
0c0d1bce7c avutil: add audio fifo buffer
The functions operate on the sample level rather than the byte level and work
with all audio sample formats.
2012-04-20 09:43:11 -04: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
Stefano Sabatini
9750254885 lavfi/mp: remove libmpcodecs mirror filter
The native libavfilter hflip filter does the same thing.
2012-04-20 01:01:24 +02:00
Robert Nagy
65fa7bc1f8 lavfi: add avfilter_unref_bufferp()
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-04-20 01:01:17 +02:00
Michael Niedermayer
455fcf29b8 avidec: zero extradata padding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 22:52:34 +02:00
Michael Niedermayer
ee402df9a2 mtvdec: check that the buf is large enough for probing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 22:11:19 +02:00
Michael Niedermayer
2a70d8304d jvdec: Make sure there is enough data for the id string.
Previously too little data could lead to a false detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 21:43:15 +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
2ff935f4bb build system: remove -wcast-qual
Generating warnings when casting const away leads to tight constraints
on the code if one wants to avoid warnings. This is especially true for
generic code that is supposed to work with both const and non const.
These tight constrains cause people to waste time trying to find a
way to write code so it doesnt generate any warning, while people
should rather spend their time thinking on how to write fast,
clean, maintainable and bug free code.
Removing this class of warnings fixes this issue.

Approved-by: Nicolas George <nicolas.george@normalesup.org>
Approved-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 20:01:33 +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
Nico Weber
a4a88fd42c Remove .rodata alignment kludge for Mach-O if a recent enough yasm is used.
Yasm was fixed in its r2161 and yasm 0.8.0 (Apr 2010) contained this fix.
Nasm was fixed in 2.06 (Jun 2009):
https://groups.google.com/group/alt.lang.asm/browse_thread/thread/fcc85bbc3745d893

I tested with yasm  0.7.99 and yasm 1.2.0.7, where this works fine.

I also tested with nasm. The nasm shipping with Xcode is too old to understand
ffmpeg's assembly, before and after the patch. Nasm 2.10 fails to compile
fft_mmx.asm on trunk with

  libavcodec/x86/fft_mmx.asm:88: panic: section ".text" has already been specified with alignment 32, conflicts with new alignment of 16

but builds fine if I change the two alignment "16"s in x86inc.asm to "32". With this patch,
nasm 2.10 fails with

  libavcodec/x86/fft_mmx.asm:39: panic: section ".rodata" has already been specified with alignment 32, conflicts with new alignment of 16

instead, but again builds fine with s/16/32/.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 17:14:47 +02:00
Carl Eugen Hoyos
b4043ef504 Print unexpected length of flicvideo extradata. 2012-04-19 16:08:12 +02:00
Matthieu Bouron
cbda76c7c6 mxfdec: Add missing break in frame layout parsing
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 15:08:22 +02:00
Matthieu Bouron
70ca163bc5 mxf: Fix frame layout values
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 15:08:13 +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