Commit Graph

18516 Commits

Author SHA1 Message Date
Paul B Mahol
8e45005a84 libopenjpegenc: use pix_fmt descriptor to get bpp
This will also simplify adding support for RGB565 and similar.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 04:59:18 +02:00
Paul B Mahol
06b0c6a655 libopenjpegenc: use pix_fmt descriptor to get numcomps
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 04:58:44 +02:00
Michael Niedermayer
140c54ea0b indeo4: better mv check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 03:46:06 +02:00
Michael Niedermayer
c855ece101 indeo5: check motion vectors.
fixes out of frame reading

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 03:45:45 +02:00
Paul B Mahol
25b67dc765 png: fix warning about discarding qualifiers [-Wincompatible-pointer-types]
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 01:02:11 +02:00
Aaron Colwell
aa9c2e41b6 pthread : Remove lock/unlock pairs in worker loop to avoid unexpected state changes.
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 00:09:50 +02:00
Michael Niedermayer
9621646eb3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: prettyprint gcc inline asm
  x86: K&R prettyprinting cosmetics for dsputil_mmx.c
  x86: conditionally compile H.264 QPEL optimizations
  dsputil_mmx: Surround QPEL macros by "do { } while (0);" blocks.
  Ignore generated files below doc/.
  dpcm: convert to bytestream2.
  interplayvideo: convert to bytestream2.
  movenc: Merge if statements
  h264: fix memleak in error path.
  pthread: Immediately release all frames in ff_thread_flush()
  h264: Add check for invalid chroma_format_idc
  utvideo: port header reading to bytestream2.

Conflicts:
	.gitignore
	configure
	libavcodec/h264_ps.c
	libavcodec/interplayvideo.c
	libavcodec/pthread.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 23:10:30 +02:00
Philip Langdale
1318b14379 CrystalHD: Remove EXPERIMENTAL flag for known good formats.
With the flag in place, it's hard to actually use the decoder, and
I'm happy with how it works, with the exception of DivX3 where I've
never found a sample that worked that I was confident actually
matched what the hardware claimed to support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 12:22:06 +02:00
Marton Balint
5420523ae3 pthread: return proper error code on pthread_create failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 12:22:06 +02:00
Reimar Döffinger
6d797ac70f VC1: Do not needlessly use signed types.
This might even have prevented the compiler from some optimizations,
since both signed and unsigned types are used for the dezigzag tables/
table pointers, and if a branches uses both the compiler needs to
create more complex code.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-25 12:24:15 +02:00
Reimar Döffinger
31ff2cb266 DV: detect another case of broken DV files.
See trac issue #217.
Only the dsf field seems to be used to distinguish between PAL and NTSC.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-25 12:23:44 +02:00
Reimar Döffinger
feda266db5 DV: check coded_width/height instead of width/height.
This makes the workaround also work with lowres.
Fixes issue #633.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-25 12:23:44 +02:00
Reimar Döffinger
535eed9301 vqavideo: fix decoding of samples with no partial updates.
Fixes playback of
http://samples.mplayerhq.hu/game-formats/vqa/landsoflore/B0EB8711.VQA
(trac issue #710).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-25 12:23:44 +02:00
Diego Biurrun
62ce9defb8 x86: dsputil: prettyprint gcc inline asm 2012-03-25 11:50:48 +02:00
Diego Biurrun
3b54912113 x86: K&R prettyprinting cosmetics for dsputil_mmx.c 2012-03-25 11:50:48 +02:00
Diego Biurrun
915a2a0a65 x86: conditionally compile H.264 QPEL optimizations 2012-03-25 11:50:45 +02:00
Diego Biurrun
3816642eab dsputil_mmx: Surround QPEL macros by "do { } while (0);" blocks.
This makes them safe to use in non-fully braced if-blocks and similar.
2012-03-25 11:48:37 +02:00
Ronald S. Bultje
3a3f06b05e dpcm: convert to bytestream2. 2012-03-24 19:02:26 -07:00
Michael Niedermayer
8bf95e8bd5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avc: Add a function for converting mp4 style extradata to annex b
  pthread: free progress if buffer allocation failed.
  lavc/avconv: support changing frame sizes in codecs with frame mt.
  libavformat: Document who sets the AVStream.id field
  utvideo: mark output picture as keyframe.
  sunrast: Add support for negative linesize.
  vp8: fix update_lf_deltas in libavcodec/vp8.c
  ralf: read Huffman code lengths without GetBitContext

Conflicts:
	ffmpeg.c
	libavcodec/sunrastenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 01:56:53 +01:00
Ronald S. Bultje
f31a68e78c interplayvideo: convert to bytestream2. 2012-03-24 17:09:18 -07:00
Paul B Mahol
bcae7f432a libaacplus: switch to encode2()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 23:35:09 +01:00
Alexander Strange
cb34867780 h264: fix memleak in error path.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:34:33 -07:00
Alexander Strange
147ee4cf06 pthread: Immediately release all frames in ff_thread_flush()
Before this, they were only added to the delayed release queue and not
freed until later. This could lead to unnecessary memory use or buffer
exhaustion.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:29:51 -07:00
Alexander Strange
6ef4063957 h264: Add check for invalid chroma_format_idc
Fixes a crash when FF_DEBUG_PICT_INFO is used.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:29:38 -07:00
Ronald S. Bultje
ec0ed97b04 utvideo: port header reading to bytestream2.
Fixes crash during slice size reading if slice_end goes negative.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-24 15:15:56 -07:00
Ronald S. Bultje
2ee01fbded pthread: free progress if buffer allocation failed.
Else we run out of progress variables after a few failed buffer
allocations.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-24 21:29:35 +01:00
Ronald S. Bultje
bc1ef85520 lavc/avconv: support changing frame sizes in codecs with frame mt.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-24 21:29:16 +01:00
Kostya Shishkov
72dadaa957 utvideo: mark output picture as keyframe.
Spotted by Антон.
2012-03-24 20:21:33 +01:00
Paul B Mahol
f8ba7c4658 adxenc: fix error in merging from qatar
Pointed out by FATE.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 17:52:53 +01:00
Paul B Mahol
7ed9abf793 sonic: mark as experimental
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 17:48:03 +01:00
Michael Niedermayer
229e4c1332 indeo5dec: Make sure we have had a valid gop header.
This prevents decoding happening on a half initialized context.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 17:43:55 +01:00
Michael Niedermayer
9879b506b0 truemotion2dec: Fix overread of input.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 17:42:14 +01:00
Michael Niedermayer
71e78e1f51 cavsdec: check stc in decode_slice_header()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 16:29:46 +01:00
Aneesh Dogra
cc965300cb sunrast: Add support for negative linesize.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-24 11:27:20 -04:00
Michael Niedermayer
9a57a37b70 h264: move resolution change check further up.
This prevents some variables from being changed in case of a
rejected resolution change.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 16:23:40 +01:00
Janne Salonen
14ba7472dc vp8: fix update_lf_deltas in libavcodec/vp8.c
lf_delta.ref[i] and lf_delta.mode[i] were incorrectly reset to 0 if
specific delta value was not updated. Fixed to keep the previous value
if flag indicates that element in question is not updated.

Signed-off-by: Janne Salonen <jsalonen@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 08:22:05 -07:00
Michael Niedermayer
9d3032b960 alsdec: check opt_order.
Fixes out of array write in quant_cof

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 14:54:12 +01:00
Michael Niedermayer
2c0559d5e2 mpegvideo: increase buffer sizes.
Fixes buffer overflow

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 14:54:12 +01:00
Michael Niedermayer
8a20774a24 indeo4: Fix global array overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 14:54:11 +01:00
Carl Eugen Hoyos
5cddfc58d8 Fix linking without yasm. 2012-03-24 14:54:06 +01:00
Kostya Shishkov
494bce6224 ralf: read Huffman code lengths without GetBitContext
Those descriptions are stored in nibbles, so they are easy to extract.
And this way we don't need to pad tables for possible bit reader overreads.
2012-03-24 11:53:26 +01:00
Michael Niedermayer
f58f75dd92 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rv34: error out on size changes with frame threading
  aacsbr: Add a debug check to sbr_mapping.
  aac: Reset some state variables when turning SBR off
  aac: Reset PS parameters on header decode failure.
  fate: add wmalossless test.
  aacsbr: handle m_max values smaller than 4.

Conflicts:
	libavcodec/aacsbr.c
	tests/fate/lossless-audio.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 10:59:43 +01:00
Paul B Mahol
b222c28ee8 libopenjpegenc: switch to encode2()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 05:47:11 +01:00
Paul B Mahol
a5b823368a libopenjpeg: make .long_name usefull
Fixes following strange output:

DEV D  libopenjpeg     OpenJPEG based JPEG 2000 encoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 05:45:57 +01:00
Paul B Mahol
68a257e673 bintext: build decoders only if they are actually enabled
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 05:44:37 +01:00
Michael Niedermayer
d85b3c4fff vp56dec: avoid freeing the returned frame before returning it.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 05:21:39 +01:00
Michael Niedermayer
25715064c2 cavsdec: check for changing w/h.
Our decoder does not support changing w/h.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 03:26:52 +01:00
Michael Niedermayer
ba775a54bc indeo3: fix out of picture write.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 03:26:51 +01:00
Michael Niedermayer
59a4b73531 pthread/mpegvideo: detect and block attempts to init frames after setup.
This fixes race conditions that ultimately lead to memory corruption.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 00:32:18 +01:00
Janne Grunau
cb7190cd2c rv34: error out on size changes with frame threading 2012-03-23 23:11:55 +01:00