Justin Ruggles
f47f7efd14
dpcm: replace short with int16_t
2011-09-30 18:15:53 -04:00
Justin Ruggles
8d77d12a2b
dpcm: check to make sure channels is 1 or 2.
2011-09-30 18:15:53 -04:00
Justin Ruggles
4bad464e7f
dpcm: misc pretty-printing
2011-09-30 18:15:53 -04:00
Justin Ruggles
1de8401c56
dpcm: remove unnecessary variable by using bytestream functions.
...
Uses 'buf' directly instead of a separate iterator variable 'in'.
2011-09-30 18:15:53 -04:00
Justin Ruggles
fc6faee0d1
dpcm: move codec-specific variable declarations to their corresponding decoding blocks.
2011-09-30 18:15:53 -04:00
Justin Ruggles
989bb7bd04
dpcm: consistently use the variable name 'n' for the next input byte.
2011-09-30 18:15:52 -04:00
Justin Ruggles
04b24cf94b
dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2.
...
Uses the native sample format for the codec instead of left-shifting all
samples by 8.
2011-09-30 18:15:52 -04:00
Justin Ruggles
76db17dc7d
dpcm: calculate and check actual output data size prior to decoding.
2011-09-30 18:15:52 -04:00
Justin Ruggles
3db8db406f
dpcm: factor out the stereo flag calculation
2011-09-30 18:15:52 -04:00
Justin Ruggles
b09c7eefb7
dpcm: cosmetics: rename channel_number to ch
...
Make the code easier to read.
2011-09-30 18:15:52 -04:00
Carl Eugen Hoyos
bcb1555489
dxva2_h264: pass the correct 8x8 scaling lists
...
Copy the Inter 8x8 scaling list as second 8x8 matrix into DXVA2's
quantization matrix data structure instead of a potentially unset
Intra chroma scaling matrix.
Fix dxva2 decoding for some H264 samples.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-30 20:15:17 +02:00
Mans Rullgard
bf5d46d8e6
dca: NEON optimised high freq VQ decoding
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-30 19:01:23 +01:00
Justin Ruggles
6326afd5e9
avcodec: reject audio packets with NULL data and non-zero size
...
There is no valid reason the user should ever send such packets in the
first place, but the documentation for CODEC_CAP_DELAY states that the
codec is guaranteed not to get a NULL packet unless that capability is
set. That isn't true without preventing this case.
2011-09-30 11:02:50 -04:00
Joakim Plate
dcce09d64b
dxva: Add ability to enable workaround for older ATI cards
...
The workaround needs to be enabled per PCI ID which cannot be detected inside
libavcodec. So add a flag to manually enable the alternate behavior.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-30 11:17:53 +02:00
Justin Ruggles
e562fbd003
adpcm: move codec-specific variable declarations to the sections for the corresponding codecs.
2011-09-29 16:54:01 -04:00
Justin Ruggles
9662539c10
adpcm: check buffer size in Funcom ISS decoder before reading header.
...
Also use the post-header data size to control termination of the main
decoding loop.
2011-09-29 16:54:01 -04:00
Justin Ruggles
ba5d2890d7
adpcm: simplify reading of Funcom ISS frame header.
2011-09-29 16:54:01 -04:00
Justin Ruggles
5c9eb4fabb
adpcm: check buffer size in IMA DK4 decoder before reading header.
...
Also use the post-header data size to control termination of the main
decoding loop.
2011-09-29 16:54:01 -04:00
Justin Ruggles
a57ea1a87e
adpcm: simplify reading of IMA DK4 frame header.
2011-09-29 16:54:01 -04:00
Justin Ruggles
8114f94ac9
adpcm_ms: clean up reading of predictor coefficients
2011-09-29 16:54:01 -04:00
Justin Ruggles
943f4db552
adpcm_4xm: process planar packets sequentially rather than simultaneously.
...
Also properly clip the right channel step_index.
2011-09-29 16:54:00 -04:00
Justin Ruggles
119974b164
adpcm_ima_wav: process channel-interleaved blocks sequentially rather than simultaneously.
...
Speeds up the ADPCM IMA WAV decoder by 15-20% overall.
2011-09-29 16:54:00 -04:00
Justin Ruggles
7c287b18a0
adpcm: update reference links
...
Add Multimedia Wiki link.
Mark dead links with [dead]. Some can still be accessed through archive.org.
Update URLs for pages which have moved.
Replace duplicated links in adpcmenc.c with a note to see the ADPCM decoder
reference documents.
2011-09-29 16:54:00 -04:00
Justin Ruggles
ac94b8bcc6
adpcm: simplify packet size bounds checking in the ADPCM IMA QT decoder.
...
This is easier to understand. It also avoids returning existing samples mixed
with new samples when the packet is too small.
2011-09-29 16:54:00 -04:00
Justin Ruggles
de0b586a87
adpcm: simplify and speed up several ADPCM decoders.
2011-09-29 16:54:00 -04:00
Justin Ruggles
5a9ed7c110
adpcm: pretty-print tables
2011-09-29 16:54:00 -04:00
Alex Converse
fcbe421cee
prores: Handle 0 or fewer bits left
...
show_bits() is undefined when the number of bits is less than or equal to
zero.
2011-09-29 09:45:57 -07:00
Mans Rullgard
bf00a73ace
dca: clear inactive subbands only once in qmf_32_subbands()
...
Writing zeros to the high entries in the array need only be
done once as the cutoff position is constant throughout the
loop.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-29 12:34:17 +01:00
Mans Rullgard
baf6b738f2
ARM: NEON optimised vector_fmac_scalar()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-28 15:56:09 +01:00
Mans Rullgard
a92a1b93b4
dca: use vector_fmac_scalar from dsputil
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-28 15:56:09 +01:00
Mans Rullgard
fcca826a63
dsputil: add vector_fmac_scalar()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-28 15:56:08 +01:00
Justin Ruggles
3d371f417e
ws_snd: misc cosmetic clean-ups
2011-09-26 16:23:58 -04:00
Justin Ruggles
659c719bc7
ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead.
2011-09-26 16:23:15 -04:00
Justin Ruggles
618b067d21
ws_snd: use memcpy() and memset() instead of loops
2011-09-26 16:23:14 -04:00
Justin Ruggles
6896aa7a38
ws_snd: use samples pointer for loop termination instead of a separate
...
iterator variable.
2011-09-26 16:23:14 -04:00
Justin Ruggles
6a818cb3ff
ws_snd: make sure number of channels is 1
2011-09-26 16:23:10 -04:00
Justin Ruggles
417364ce1f
ws_snd: add some checks to prevent buffer overread or overwrite.
2011-09-26 15:49:50 -04:00
Justin Ruggles
2322ced8da
ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.
...
8-bit unsigned is the native sample format.
2011-09-26 15:49:50 -04:00
Justin Ruggles
4c5e7b27d5
flacdec: fix buffer size checking in get_metadata_size()
...
Adds an additional check before reading the next block header and avoids a
potential integer overflow when checking the metadata size against the
remaining buffer size.
2011-09-26 15:29:45 -04:00
Nicolas George
4ca59d1948
oggdec: add support for Xiph's CELT codec
...
This patch also introduces CODEC_ID_CELT.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-09-26 13:51:29 +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
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
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
Diego Biurrun
8671488799
Use explicit struct initializers for AVCodec declarations.
2011-09-24 12:11:19 +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
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
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
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
Mans Rullgard
ae2e89717b
dct-test: factor out some common code and do whas was likely intended
...
This fixes some nonsensical code by moving some should-be-shared
code to separate functions and using these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-21 15:43:59 +01:00
Anton Khirnov
609a2fa1fa
Remove some forgotten AVCodecContext.palctrl usage.
2011-09-21 13:51:53 +02:00
Anton Khirnov
9ecfbb3e57
lavc/utils: move avcodec_init() higher in the file.
...
Fixes build on next major bump.
2011-09-21 13:51:53 +02:00
Anton Khirnov
e5b29c1f6b
lavc: replace some deprecated FF_*_TYPE with AV_PICTURE_TYPE_*
2011-09-21 13:51:53 +02:00
Anton Khirnov
feedc0754b
ac3dec: actually use drc_scale private option
2011-09-21 13:51:53 +02:00
Anton Khirnov
63e4c8a653
lavc: undeprecate AVPALETTE_SIZE and AVPALETTE_COUNT macros
...
They are still being used and shouldn't be removed.
2011-09-21 13:51:53 +02:00
Diego Biurrun
a3e0135dbb
msmpeg4: remove leftover unused debug variable declaration
2011-09-21 09:57:33 +02:00
Diego Biurrun
95a06eb4d5
Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
...
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
Diego Biurrun
35a6855868
Fix av_dlog invocations with wrong or missing logging context.
...
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
Laurent Aimar
4cc7732386
rv34: Check for invalid slice offsets
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-20 10:29:55 +03:00
Laurent Aimar
b4ed3d78cb
rv34: Fix potential overreads
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar
d2213b6493
rv34: Fix buffer size used for MC of B frames after a resolution change
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar
d0f6ab0298
rv34: Avoid NULL dereference on corrupted bitstream
...
rv34_decode_slice() can return without allocating any pictures.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar
4a29b47186
rv10: Reject slices that does not have the same type as the first one
...
This prevents crashes with some corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 14:58:33 +03:00
Luca Barbato
3a78fb57de
libx264: introduce slice-max-size option
...
Yet another option useful for low latency streaming.
2011-09-16 07:56:17 -07:00
Laurent Aimar
b59efc9434
Fixed size given to init_get_bits().
...
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-15 13:23:04 -07:00
Michael Niedermayer
5166376f24
smacker: fix a few off by 1 errors
...
stereo & 16bit is untested due to lack of samples
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 11:13:54 +03:00
Laurent Aimar
6489455495
Check for invalid VLC value in smacker decoder.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 10:40:31 +03:00
Laurent Aimar
9676ffba83
Check and propagate errors when VLC trees cannot be built in smacker decoder.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 10:38:49 +03:00
Justin Ruggles
3ed7860943
include stdint.h in adpcm_data.h
...
fixes make checkheaders
2011-09-13 10:59:47 -04:00
Diego Biurrun
a05ea77c9f
mpeg12: reorder functions to avoid ugly forward declarations
2011-09-13 15:53:05 +02:00
Alex Converse
0872bb23b4
xan: Add some buffer checks
2011-09-12 11:18:57 -07:00
Alex Converse
350f57bd7b
xan: Remove extra trailing newline
2011-09-12 11:18:57 -07:00
Laurent Aimar
393d5031c6
Fixed size given to init_get_bits() in xan decoder.
2011-09-12 11:18:57 -07:00
Justin Ruggles
826c56d16e
adpcm: split ADPCM encoders and decoders into separate files.
...
Move shared tables to a separate file as well.
2011-09-12 11:26:11 -04:00
Kostya Shishkov
23a1f0c592
rv34: check that subsequent slices have the same type as first one.
...
This prevents some crashes when corrupted bitstream reports e.g. P-type
slice in I-frame. Official RealVideo decoder demands all slices to be
of the same type too.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 15:51:30 +02:00
Anton Khirnov
af1e247038
libxavs: add private options corresponding to deprecated global options
...
Code mostly copied from libx264 wrapper.
2011-09-12 08:45:55 +02:00
Anton Khirnov
d242d80e36
avconv: remove me_threshold option.
...
It's only shadowing the AVOption with the same name.
2011-09-11 17:30:04 +02:00
Laurent Aimar
8bfea4ab4e
Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-10 18:58:57 +03:00
Alex Converse
0c1f5b93d9
cljr: init_get_bits size in bits instead of bytes
2011-09-09 15:01:00 -07:00
Alex Converse
b7ce4f1d1c
indeo2: fail if input buffer too small
2011-09-09 15:01:00 -07:00
Alex Converse
68ca330cbd
indeo2: init_get_bits size in bits instead of bytes
2011-09-09 15:01:00 -07:00
Laurent Aimar
46b004959b
ffv1: Fixed size given to init_get_bits() in decoder.
...
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-09 15:00:28 -07:00
Alex Converse
dba2b63a98
wavpack: Check error codes rather than working around error conditions.
2011-09-08 11:02:43 -07:00
Laurent Aimar
55354b7de2
Fixed invalid access in wavpack decoder on corrupted bitstream.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:04:06 +03:00
Laurent Aimar
0aedab0340
Fixed invalid writes in wavpack decoder on corrupted bitstreams.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:00:13 +03:00