1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-02 06:23:23 +02:00
Commit Graph

15256 Commits

Author SHA1 Message Date
Vitor Sessak
58c61492c6 g729dec: fix warnings:
libavcodec/g729postfilter.c: In function ‘long_term_filter’:
libavcodec/g729postfilter.c:114: warning: unused variable ‘n’

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 21:17:22 +02:00
Vitor Sessak
82d99e0b41 g729dec: Fix warnings:
libavcodec/g729dec.c: In function ‘decode_frame’:
libavcodec/g729dec.c:662: warning: passing argument 3 of ‘ff_g729_postfilter’ from incompatible pointer type
libavcodec/g729postfilter.h:96: note: expected ‘int16_t *’ but argument is of type ‘int *’

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 21:16:55 +02:00
Vitor Sessak
1c4712db81 g729dec: Add ff_ prefix to g729_postfilter() and g729_adaptive_gain_control()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 21:13:19 +02:00
Justin Ruggles
88f908fbdc cosmetics: reindent and pretty-print 2011-09-25 14:38:08 -04:00
Justin Ruggles
8febd6afbc libgsm: split init and close fuctions for encoder and decoder.
The decoder shouldn't be allocating coded_frame. It's also cleaner to split
them than to check avctx->codec->encode and avctx->codec->decode.
2011-09-25 14:38:08 -04:00
Mans Rullgard
6e4a35ced9 ppc: fix 32-bit PIC build
On 32-bit ppc, the GOT pointer must be loaded manually.
This adds a "get_got" assembler macro to compute the
GOT address.  The "movrel" macro is updated to take an
additional parameter containing the GOT address since
no register is reserved for this purpose on ppc32.
These changes have no effect on ppc64 builds.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-25 17:27:48 +01:00
Carl Eugen Hoyos
ef8756dab2 Support LZW and ZLIB compressed 4bpp tiff samples.
Fixes ticket #439 and ticket #440.
2011-09-25 17:21:46 +02:00
Alexander Strasser
baad01d8b4 h264: improve checks before calling ff_h264_decode_extradata
The ff_h264_decode_extradata routine now checks for the buffer size
and pointer internally. This makes it possible to remove the external
checks in ff_h264_decode_init.

  In decode_frame there was a size check missing because the buffer
gets tested prior to the invocation of ff_h264_decode_extradata().

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2011-09-25 17:16:44 +02:00
Alexander Strasser
715f259bf9 h264: ff_h264_decode_extradata: check buffer args
The buffer size and pointer were not checked prior to testing the first
byte of the buffer. These were sometimes checked before calling, but it is
better to add it inside the function as it takes buf and size arguments.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2011-09-25 17:16:44 +02:00
Jean First
251345a3fe cosmetics, remove unused and rename variables for consistency 2011-09-25 16:43:23 +02:00
Justin Ruggles
4568c2bf97 vmdaudio: fix decoding of 16-bit audio format.
The initial sample of each block is raw 16-bit PCM, not DPCM.
Fixes decoding of all samples in:
http://streams.videolan.org/samples/game-formats/sierra-vmd/Lighthouse/
2011-09-25 10:39:00 -04:00
Jean First
1a0770f3f7 tiffenc: Enable RGB48LE (16-bit) encoding support 2011-09-25 16:14:33 +02:00
Jean First
72381b2b47 tiffdec: add RGB48 (16bit) support 2011-09-25 16:00:04 +02:00
Laurent Aimar
d1186ff72d h264: check for out of bounds reads in ff_h264_decode_extradata().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-25 15:04:58 +02:00
Michael Niedermayer
035320a52f dnxhdenc: remove unneeded entries from array.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 14:56:40 +02:00
Michael Niedermayer
b8bad984ef dnxhdenc: optimize whats left of dnxhd_switch_matrix()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 13:06:04 +02:00
Michael Niedermayer
a2eae0ffd4 amvenc: another quant table fix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 12:29:20 +02:00
Michael Niedermayer
2aaf32f52f mpegvideo: support encoding with chroma intra tables that differ from luma.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 12:29:20 +02:00
Michael Niedermayer
a2f27818b5 amvenc: fix quant tables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 04:33:58 +02:00
Michael Niedermayer
f2f28861da AMV video encoder.
Authors are Vladimir Voroshilov and Dobrica Pavlinušić based on svn blame/log
For full details of authorship see http://code.google.com/p/amv-codec-tools/

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 04:33:16 +02:00
Laurent Aimar
35cb6854bb Fix potential pointer arithmetic overflows in rle_unpack() of vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 00:42:42 +02:00
Laurent Aimar
4749e07498 Fix out of bound reads in rle_unpack() of vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 00:42:06 +02:00
Laurent Aimar
e07377e736 Check for out of bound reads in vmd_decode() of vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 00:34:39 +02:00
Laurent Aimar
78cb39d2b2 Fix potential pointer arithmetic overflows in lz_unpack of vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 00:27:29 +02:00
Laurent Aimar
5127f465bd Prevent out of bound read in lz_unpack in vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 00:25:42 +02:00
Laurent Aimar
6a6383bebc Prevent NULL dereferences when the previous frame is missing in vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 23:42:49 +02:00
Laurent Aimar
e7aed1280e Check for invalid update parameters in vmd video decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 23:42:49 +02:00
Laurent Aimar
00cbe9e405 Fix potential overread in vmd audio decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 23:42:49 +02:00
Michael Niedermayer
eae3cf06a5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: Fix invalid pointer deferences when parsing index
  configure: disable hardware capabilities ELF section with suncc on Solaris x86
  Use explicit struct initializers for AVCodec declarations.
  Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
  adpcmenc: Set bits_per_coded_sample
  adpcmenc: fix QT IMA ADPCM encoder
  adpcmdec: Fix QT IMA ADPCM decoder
  permit decoding of multichannel ADPCM_EA_XAS
  Fix input buffer size check in adpcm_ea decoder.
  fft: avoid a signed overflow
  mpegps: Handle buffer exhaustion when reading packets.

Conflicts:
	libavcodec/adpcm.c
	libavcodec/adpcmenc.c
	libavdevice/alsa-audio-enc.c
	libavformat/flvdec.c
	libavformat/mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 22:39:52 +02:00
Sascha Sommer
780d45473c Fix segfault in save_bits:
use put_bits_count to get the buffer fill state instead of
num_saved_bits as num_saved_bits is sometimes reset when
frames are lost
(Ticket 495)
2011-09-24 21:29:08 +02:00
Michael Niedermayer
43e05685f2 g729dec: disable all cpu acceleration, the code does not provide any alignment.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 21:11:01 +02:00
Michael Niedermayer
91c5f81b74 g729dec: set sample format.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
5d5b3e527a Disable MMX 2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
8db3b85616 Fix comments about implemented codecs 2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
682337672c Adaptive gain control 2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
aca516cd67 G.729 postfilter 2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
16bbb8dfea Replace pitch_delay_int with array 2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
bfbfe56f94 G.729 build environment 2011-09-24 21:11:00 +02:00
Michael Niedermayer
ce7c954800 g729dec: Make 2 functions static that are not used outside g729dec.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
c458bff934 High-pass filter 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
e610c5f383 Add G.729D decoder 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
b7c7fc3359 Synthesis filter 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
4920a1a913 Indentation fix after gain codes decoding2 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
0b42463aec Gain pitch and gain code for G729D 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
12081d0599 Indentation fix 2 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
f7980a7bed Convert gain pitch and gain code to arrays 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
f830d1b7da Interolate excitation signal 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
0a3337883f Fixed- and adaptive-codebook gains 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
7fadc0151c Frame erasure support for fixed-codebook vectors 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
9297c7822f Fixed-codebook vector decoding 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
70efd101f1 Add packet_type 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
50cad25625 Frame erasure support for pitch delay decoding 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
d1a643e749 Doxy for LSF erasure case 2011-09-24 21:11:00 +02:00
Vladimir Voroshilov
b29e5a6780 doxy comments for LSF array 2011-09-24 21:10:59 +02:00
Vladimir Voroshilov
cd3e2820d3 Indentation fix in LSF 2011-09-24 21:10:59 +02:00
Vladimir Voroshilov
388f225561 Frame erasure support for LSF decoding 2011-09-24 21:10:59 +02:00
Michael Niedermayer
a5e0c4ddb5 Revert "g729: Merge g729.h into g729dec.c."
This reverts commit a2077b85da.
2011-09-24 21:10:27 +02:00
Michael Niedermayer
0b61af7382 Restore WIP g729 code that has been remvoed by diego biurrun.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 19:39:18 +02:00
Laurent Aimar
1aad9cd9d2 vp56:Fix error recovery code on size changes in vp5/6 decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 19:13:37 +02:00
Laurent Aimar
91f104496b vp6:Reset the internal state when aborting key frames header parsing in vp6 decoder.
It prevents leaving the state only half initialized.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 19:13:37 +02:00
Laurent Aimar
57764c6996 h264: Check for out of bounds reads in ff_h264_decode_extradata().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 16:54:16 +02:00
Diego Biurrun
8671488799 Use explicit struct initializers for AVCodec declarations. 2011-09-24 12:11:19 +02:00
Jean First
9569a3c9f4 Add new pix_fmt RGBA64 2011-09-24 06:01:45 +02:00
Justin Ruggles
9ff6d0791b adpcmenc: Set bits_per_coded_sample 2011-09-23 20:54:29 -04:00
Baptiste Coudurier
b304244b54 adpcmenc: fix QT IMA ADPCM encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 20:54:29 -04:00
Baptiste Coudurier
bf334535b4 adpcmdec: Fix QT IMA ADPCM decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 20:54:28 -04:00
Peter Ross
3a549eb82b permit decoding of multichannel ADPCM_EA_XAS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 20:54:28 -04:00
Reimar Döffinger
ffe92ff9f0 Fix input buffer size check in adpcm_ea decoder.
Unfortunately the output buffer size check assumes that the
input buffer is never over-consumed, thus this actually
also allowed to write outside the output buffer if "lucky".

Based on:
git.videolan.org/ffmpeg.git
commit 701d0eb185
2011-09-23 20:54:28 -04:00
Sean McGovern
c2d3f56107 fft: avoid a signed overflow
As a signed integer, 1<<31 overflows, so force it to unsigned.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-23 17:02:58 -07:00
Michael Niedermayer
a7758884db Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtp: factorize  dynamic payload type fallback
  flvdec: Ignore the index if it's from a creator known to be different
  cmdutils: move grow_array out of #if CONFIG_AVFILTER
  avconv: actually set InputFile.rate_emu
  ratecontrol: update last_qscale_for sooner
  Fix unnecessary shift with 9/10bit vertical scaling
  prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()
  prores: return more meaningful error values
  prores: improve error message wording
  prores: cosmetics: prettyprinting, drop useless parentheses
  prores: lowercase AVCodec name entry

Conflicts:
	cmdutils.c
	libavcodec/proresdec_lgpl.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 01:03:07 +02:00
Jean First
f7e797aa5c tiffenc: initialize forgotten avctx. 2011-09-23 23:39:51 +02:00
Jean First
43c481e569 tiffenc: Add forgotten avclass to context. 2011-09-23 23:39:26 +02:00
Michael Niedermayer
0bc5d4fd8b aacdec: fix channel reconfigs on LATM
Fixes Ticket200

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 22:41:10 +02:00
Michael Niedermayer
b6aaa6d9a0 aacdec: Make aac-latm closer to the spec (not reading random data leading to random false configurations)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 22:34:26 +02:00
Michael Niedermayer
ad51833a1a aacsbr: prevent multiple ff_aac_sbr_ctx_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 22:31:57 +02:00
Michael Niedermayer
abe0dbea2e aacsbr: add a assert0 to check for a inconsistency that
occurd during debug. I dont know if this can happen normally but if so
it would be quite bad.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 22:30:27 +02:00
Michael Niedermayer
9b73fbcff6 h264dec: Decode in stream avc extradata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 06:01:45 +02:00
Michael Niedermayer
4ba396834d h264: pass buffer & size to ff_h264_decode_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 06:01:45 +02:00
Michael Niedermayer
9815039053 aacdec: disable locking code for parse_adts_frame_header() non zero chan config.
This fixes changing channels
It possibly might cause regressions but i cant avoid this without having a test
case that needs the locking code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 02:43:57 +02:00
Luca Barbato
d554b33efe ratecontrol: update last_qscale_for sooner
In order to make ratecontrol converge properly update the
last_qscale_for values when populating the qscale array.

It fixes the issue reported on
http://lists.libav.org/pipermail/libav-tools/2011-September/000050.html
2011-09-22 17:25:48 -07:00
Diego Biurrun
167d3b1673 prores: return more meaningful error values 2011-09-23 01:42:13 +02:00
Diego Biurrun
2161282439 prores: improve error message wording 2011-09-23 01:42:12 +02:00
Diego Biurrun
27ba121e90 prores: cosmetics: prettyprinting, drop useless parentheses 2011-09-23 01:42:12 +02:00
Diego Biurrun
2983f1f3be prores: lowercase AVCodec name entry
All other codecs use lowercase names in that field.
2011-09-23 01:42:11 +02:00
Michael Niedermayer
93c220e895 forgot git add prores_*c
Authorship of the decoders is elvis / maxim. For more details see previous
comits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 01:12:29 +02:00
Michael Niedermayer
28d3738428 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add LATM demuxer
  avplay: flush audio decoder with empty packets at EOF if the decoder has CODEC_CAP_DELAY set.
  8svx/iff: fix decoding of compressed stereo 8svx files.
  8svx: log an error message if output buffer is too small
  8svx: check packet size before reading the initial sample value.
  8svx: output 8-bit samples instead of 16-bit.
  8svx: split delta decoding into a separate function.
  mp4: Don't read an empty Decoder Config Descriptor
  fate.sh: Ignore errors from rm command during cleanup.
  fate.sh: Run git-pull in quiet mode to avoid console spam.
  Apple ProRes decoder
  rtmp: Make the input FLV parser handle data cut at any point
  rv34: Check for invalid slices offsets
  eval: test isnan(sqrt(-1)) instead of just sqrt(-1)

Conflicts:
	Changelog
	libavcodec/8svx.c
	libavcodec/proresdec.c
	libavcodec/version.h
	libavformat/iff.c
	libavformat/version.h
	tests/ref/fate/eval

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 00:35:31 +02:00
Justin Ruggles
1993c6849c 8svx/iff: fix decoding of compressed stereo 8svx files.
Make the iff demuxer send the whole audio chunk to the decoder as a
single packet and move stereo interleaving from the iff demuxer to the
decoder.

Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Justin Ruggles
fda459cee7 8svx: log an error message if output buffer is too small
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Justin Ruggles
0ac3b8fc4a 8svx: check packet size before reading the initial sample value. 2011-09-22 14:11:34 -04:00
Justin Ruggles
e371878416 8svx: output 8-bit samples instead of 16-bit.
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Justin Ruggles
ac68607bfe 8svx: split delta decoding into a separate function.
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Michael Niedermayer
f9bb7395a1 mpeg4videoenc: remove forgotten return -1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 18:16:57 +02:00
Michael Niedermayer
394781a897 mpeg4videoenc: guess a good aspect when we cant store the exact one.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 14:18:17 +02:00
Maxim Poliakovski
be64629a13 Apple ProRes decoder
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-22 14:54:46 +03:00
Laurent Aimar
fe476e5a9b rv34: Check for invalid slices offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-22 10:35:06 +03:00
Jonne Ahner
8a73246391 prores: skip alpha if present 2011-09-22 06:26:52 +02:00
Laurent Aimar
7c249d4fba Check for huffman tree building error in vp6 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 00:42:28 +02:00
Laurent Aimar
dba20b8478 Release old pictures after a resolution change in vp5/6 decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 00:42:28 +02:00
Laurent Aimar
6a0e78929a Check for missing reference in vp5/6 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 00:42:28 +02:00
Laurent Aimar
b64269ce55 Check for invalid slices offsets in RV30/40 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 00:42:28 +02:00