Justin Ruggles
b316af7a7c
alacdec: ask for a sample for unsupported sample depths.
...
Also return AVERROR_PATCHWELCOME.
2011-10-26 11:50:17 -04:00
Justin Ruggles
63cf54df7a
alacdec: cosmetics: use 'ch' instead of 'chan' to iterate channels
2011-10-26 11:50:17 -04:00
Justin Ruggles
01200f1283
alacdec: move some declarations to the top of the function
2011-10-26 11:50:17 -04:00
Justin Ruggles
c3a92412c0
alacdec: always use get_sbits_long() for uncompressed samples
2011-10-26 11:50:17 -04:00
Justin Ruggles
b46e58f741
alacdec: remove unneeded local variable
2011-10-26 11:50:17 -04:00
Justin Ruggles
7080533cda
alacdec: remove the numchannels parameter from several functions.
...
They only operate on stereo content, so the extra param is not necessary and
also allows for simplifying the code.
2011-10-26 11:50:17 -04:00
Justin Ruggles
cb50329fc5
alacdec: rename 2 functions.
...
Now they only do stereo interleaving.
2011-10-26 11:50:16 -04:00
Justin Ruggles
c39bddd392
alacdec: move appending of extra_bits to a separate function.
...
This should also fix decoding of mono 24-bit.
2011-10-26 11:50:16 -04:00
Justin Ruggles
e739d35156
alacdec: split stereo decorrelation into a separate function.
...
It is identical for 16-bit and 24-bit, so there is no need to have duplicate
code.
2011-10-26 11:50:16 -04:00
Justin Ruggles
d251c85dce
alacdec: cosmetics: rename 'wasted_bits' to 'extra_bits'.
...
The bits are not wasted, they are additional low bits that are added to the
16-bit decompressed samples to increase the output sample depth.
2011-10-26 11:50:16 -04:00
Justin Ruggles
dbbb9262ca
alacdec: remove unneeded numsamples checks
2011-10-26 11:50:16 -04:00
Justin Ruggles
53df079a73
alacdec: check for buffer allocation failure.
...
Also rearranges some functions for easier cleanup on failure.
2011-10-26 11:50:16 -04:00
Justin Ruggles
e5e4f92b5c
alacdec: allocate per-channel buffers based on channel count.
...
reduces memory usage when the stream has fewer than MAX_CHANNELS
2011-10-26 11:50:16 -04:00
Justin Ruggles
dcaa83a0fc
alacdec: read/validate number of channels from the extradata.
...
check frame header channel count against header/container channel count.
2011-10-26 11:50:16 -04:00
Justin Ruggles
47e9c75b36
alacdec: remove unneeded validation of setinfo_sample_size.
...
It is already done when using it to set sample_fmt.
2011-10-26 11:50:16 -04:00
Justin Ruggles
0f26f3d5c4
alacdec: set sample_fmt in alac_decode_init()
2011-10-26 11:50:16 -04:00
Justin Ruggles
aec8383348
alacdec: set bytespersample using av_get_bytes_per_sample()
2011-10-26 11:50:15 -04:00
Janne Grunau
d6174bfe5f
threads: restore has_b_frames in frame_thread_free
...
Otherwise the delay expressed in has_b_frames increases with every
avcodec_close/avcodec_open.
Fixes fate-ea-dct with more than 1 thread.
2011-10-26 16:55:54 +02:00
Daniel Kang
ded3e9f054
H.264: Cometics to dsputil_mmx.c
...
Add whitespace.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-26 06:41:32 -07:00
Justin Ruggles
a3a8572165
g722dec: check output buffer size before decoding
2011-10-25 11:30:50 -04:00
Justin Ruggles
4e41973794
g722dec: cosmetics: reindent/linewrap
2011-10-25 11:30:50 -04:00
Justin Ruggles
d0a196962a
g722dec: remove the use of lowres for half-rate decoding.
...
It is broken because an AVCodecContext can be opened/closed multiple
times, and sample_rate is getting divided by 2 each time that happens.
This removes the only use of lowres for audio.
2011-10-25 11:30:50 -04:00
Justin Ruggles
2f1d212fd0
tta: check for allocation failure of decode_buffer
2011-10-25 11:22:02 -04:00
Justin Ruggles
b5050539c9
tta: use correct frame_length calculation.
...
using a floating-point calculation is not necessary.
2011-10-25 11:22:02 -04:00
Justin Ruggles
c6056d4004
tta: add support for decoding 24-bit sample format
...
Note that this will not work in most cases with avconv and avplay due to the
AVCODEC_MAX_AUDIO_FRAME_SIZE limit, but it will decode correctly if given a
large enough output buffer.
2011-10-25 11:22:02 -04:00
Justin Ruggles
8664682d0e
cosmetics: indentation
2011-10-25 11:22:02 -04:00
Justin Ruggles
7b7a74a150
tta: remove pointless braces
2011-10-25 11:22:02 -04:00
Justin Ruggles
e6923f683c
tta: check output buffer size after adjusting frame length for last frame
2011-10-25 11:22:01 -04:00
Justin Ruggles
b16960a8a5
tta: fix reading of format in TTA header.
...
TTA does not support float at all, and format 2 is encrypted TTA.
2011-10-25 11:22:01 -04:00
Justin Ruggles
4d3e7a7516
tta: remove useless commented-out lines
2011-10-25 11:22:01 -04:00
Justin Ruggles
35f9d8c20a
tta: check remaining bitstream size while reading unary value
2011-10-25 11:22:01 -04:00
Janne Grunau
28287045ca
cosmetics: simplify latm_decode_init
2011-10-25 12:08:21 +02:00
Janne Grunau
785f876cee
latm: avoid unnecessary reinit of the aac decoder
2011-10-25 12:08:21 +02:00
Janne Grunau
80e36425fb
aacdec: initialize sbr context only in new channel elements
2011-10-25 12:07:58 +02:00
Janne Grunau
b2e56e08c9
resample: reject unhandled conversions
...
audio_resample can not reduce the number of channels
2011-10-25 12:06:48 +02:00
Janne Grunau
ec1ce86e7f
resample: remove unused #define
2011-10-25 12:06:48 +02:00
Mans Rullgard
c8477df019
adpcm: use sign_extend()
...
This avoids warnings from the overflow checker and simplifies the code.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-24 15:26:24 +01:00
Janne Grunau
d99fe3a478
mpeg12: fix mpeg_decode_slice context parameter type
...
During slice threading only MpegEncContext is passed to
mpeg_decode_slice, remove a wrong cast and change the function
definition to take MpegEncContext pointer.
2011-10-24 01:05:00 +02:00
Janne Grunau
cd8c64e197
Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"
...
This reverts commit da22ba7df4
since it
broke slice threading. Slice threading just duplicates MpegEncContext
so every value used during mpeg_decode_slice has to be in it.
A second patch will fix the illusion that Mpeg1Context is available
in mpeg_decode_slice.
2011-10-24 00:59:41 +02:00
Justin Ruggles
704721bc9c
g722: split decoder and encoder into separate files
2011-10-23 11:42:34 -04:00
Justin Ruggles
b95fbba705
cosmetics: remove extra spaces before end-of-statement semi-colons
2011-10-23 11:36:56 -04:00
Justin Ruggles
60aa1a358d
vorbisdec: check output buffer size before writing output
2011-10-23 11:36:56 -04:00
Justin Ruggles
d2604f9260
wavpack: calculate bpp using av_get_bytes_per_sample()
2011-10-23 11:35:46 -04:00
John Stebbins
ddfb8e1adb
ac3enc: Set max value for mode options correctly
...
for example:
Attempting to set ac3 dsur_mode to "on" results in:
[AC-3 Encoder @ 0x7f508f0a3280] Value 2.000000 for parameter 'dsur_mode' out of range
[AC-3 Encoder @ 0x7f508f0a3280] Error setting option dsur_mode to value on.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-23 11:30:54 -04:00
Anton Khirnov
1deb66c50c
lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c
...
It's not used anywhere else.
2011-10-23 14:16:16 +02:00
Anton Khirnov
3fc0830432
mpeg12: move closed_gop from MpegEncContext to Mpeg1Context
...
It's MPEG-1/2 specific.
2011-10-23 14:15:56 +02:00
Anton Khirnov
da22ba7df4
mpeg12: move full_pel from MpegEncContext to Mpeg1Context
...
It's MPEG-1 specific.
2011-10-23 14:14:39 +02:00
Anton Khirnov
cc05a45d33
mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h
...
It will be used in vdpau code.
2011-10-23 14:14:34 +02:00
Anton Khirnov
acffe45732
mpegvideo: remove some unused variables from MpegEncContext.
2011-10-23 14:13:40 +02:00
Mashiat Sarker Shakkhar
f18746528d
VC1: restore mistakenly removed code
...
The code was mistakenly removed in cad16562c8
.
It stored some motion vector data for future use in B-pictures.
This fixes Bugzilla bug #57 .
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-22 22:51:00 +02:00
Justin Ruggles
e53eecd0e7
twinvq: check output buffer size before decoding
2011-10-22 15:38:05 -04:00
Justin Ruggles
5ed6817822
twinvq: return an error when the packet size is too small
2011-10-22 15:38:05 -04:00
Dustin Brody
9abc98737f
lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-22 14:49:55 +02:00
Dustin Brody
5ea0001f9e
lavc: translate non-flag-based er options into flag-based ef options at codec open
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-22 14:49:22 +02:00
Dustin Brody
c8dad9a694
add -err_filter AVOptions to access flag-based error recognition
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-22 14:49:14 +02:00
Ronald S. Bultje
b0b3231074
h264_weight: initialize "height" function argument properly.
...
Right now it's not actually initialized on 32-bit, leading to crashes
on win32.
2011-10-22 00:23:24 -07:00
Justin Ruggles
b19e0c2b4e
libspeexdec: include system headers before local headers
2011-10-21 17:07:05 -04:00
Justin Ruggles
a470fe80ba
libspeexdec: return meaningful error codes
2011-10-21 17:07:04 -04:00
Justin Ruggles
14bc60dbae
libspeexdec: cosmetics: reindent
2011-10-21 17:07:04 -04:00
Justin Ruggles
7eeaa6796b
libspeexdec: decode one frame at a time.
...
This allows for knowing the output size before decoding even when there is no
header (e.g. FLV). Otherwise we would have to do a preliminary full frame
decode to determine the number of frames-per-packet.
2011-10-21 17:07:04 -04:00
Justin Ruggles
95891804bf
mp3on4: check for allocation failures in decode_init_mp3on4()
2011-10-21 12:34:43 -04:00
Justin Ruggles
180bf988bc
mp3on4: create a separate flush function for MP3onMP4.
...
The correct decoder private context needs to be used.
This fixes mp3on4 playback and seeking in avplay.
2011-10-21 12:33:15 -04:00
Justin Ruggles
53c8443ad2
mp3on4: ensure that the frame channel count does not exceed the codec channel
...
count.
This also allows for checking output data size based on the actual
number of channel instead of the maximum number of channels.
2011-10-21 12:32:35 -04:00
Justin Ruggles
1183d6cd98
mp3on4: set channel layout
2011-10-21 12:29:51 -04:00
Justin Ruggles
fff0f831e0
mp3on4: fix the output channel order
2011-10-21 12:29:51 -04:00
Justin Ruggles
f507dd067a
mp3on4: allocate temp buffer with av_malloc() instead of on the stack.
...
Avoids allocating unnecessary memory and ensures proper alignment.
2011-10-21 12:29:51 -04:00
Justin Ruggles
cb72230dfa
mp3on4: copy MPADSPContext from first context to all contexts.
...
Fixes segfault when decoding multi-channel MP3onMP4 files.
2011-10-21 12:29:51 -04:00
Justin Ruggles
aad3429d4e
fmtconvert: port float_to_int16_interleave() 2-channel x86 inline asm to yasm
2011-10-21 10:13:05 -04:00
Justin Ruggles
4e8e262476
fmtconvert: port int32_to_float_fmul_scalar() x86 inline asm to yasm
2011-10-21 10:13:05 -04:00
Justin Ruggles
185142a5ea
fmtconvert: check compile-time x86 instruction set flags
2011-10-21 10:13:05 -04:00
Justin Ruggles
708ab7dd69
fmtconvert: port float_to_int16() x86 inline asm to yasm
2011-10-21 10:13:05 -04:00
Justin Ruggles
45add995de
fmtconvert: fix and extend documentation for float_interleave()
2011-10-21 10:13:05 -04:00
Mans Rullgard
b034c95cc1
h264: fix ppc/altivec build
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-21 12:49:01 +01:00
Jean First
b8bb9c0267
Enable multithreding when decoding with libopenjpeg
...
Enable multithreding when decoding with libopenjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-21 01:07:22 -07:00
Ronald S. Bultje
27209bb108
h264: mark some MC functions with av_always_inline instead of inline.
...
This actually causes them to be inlined, leading to a significant
speedup (1-1.5% in my measurements).
2011-10-21 01:05:10 -07:00
Ronald S. Bultje
05fb63f5a0
H264: have hl_motion() and its callees take a chroma_idc argument.
2011-10-21 01:05:07 -07:00
Ronald S. Bultje
c2d337429c
H264: change weight/biweight functions to take a height argument.
...
Neon parts by Mans Rullgard <mans@mansr.com>.
2011-10-21 01:00:45 -07:00
Ronald S. Bultje
229d263cc9
Support for lossless and inter H264 4:2:2.
2011-10-21 01:00:45 -07:00
Baptiste Coudurier
76741b0e56
h264: 4:2:2 intra decoding support
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-21 01:00:41 -07:00
Ronald S. Bultje
dc49bf1270
sws/pixfmt/pixdesc: add support for yuv420p9le/be.
2011-10-21 00:58:01 -07:00
Ronald S. Bultje
ce42a04884
vp8: fix up handling of segmentation_maps in reference frames.
...
Associate segmentation_map[] with reference frame, rather than
decoding instance. This fixes cases where the map would be free()'ed
on e.g. a size change in one thread, whereas the other thread was
still accessing it. Also, it fixes cases where threads overwrite data
that is still being referenced by the previous thread, who thinks that
it's part of the frame previously decoded by the next thread.
2011-10-21 00:17:58 -07:00
Anton Khirnov
65d3176aaf
lavc: hide private symbols.
...
Overhead as reported by rbelf-size goes from 90860 to 20204.
2011-10-20 21:06:58 +02:00
Anton Khirnov
586657c20a
lavc: deprecate img_get_alpha_info().
...
It's never been touched or used in any way since it was added in 2003
and only works for PIX_FMT_PAL8, which makes me conclude that nobody's
ever used it.
2011-10-20 21:06:58 +02:00
Anton Khirnov
0842d58998
lavc: use avpriv_ prefix for ff_toupper4.
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
9f51c682ee
lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
...
They are used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
6f89efeaa7
lavc: use avpriv_ prefix for ff_ac3_parse_header.
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
9138a130cd
lavc: use avpriv_ prefix for ff_frame_rate_tab.
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
773375c3d0
lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
357db4c263
lavc: use avpriv_ prefix for ff_split_xiph_headers.
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
2361e59b98
lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header.
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
242c73a0fd
lavc: use avpriv_ prefix for some dv symbols used in lavf.
...
Specifically, ff_dv_frame_profile and ff_dv_codec_profile.
2011-10-20 21:06:58 +02:00
Anton Khirnov
d9cca9fc6a
lavc: use avpriv_ prefix for some flac symbols used in lavf.
...
Specifically, ff_flac_parse_streaminfo, ff_flac_is_extradata_valid and
ff_flac_parse_block_header
2011-10-20 21:06:58 +02:00
Anton Khirnov
59a9a23581
lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
...
Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and
ff_copy_pce_data
2011-10-20 21:06:57 +02:00
Anton Khirnov
82ab61f901
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
...
Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header,
ff_mpegaudio_decode_header.
2011-10-20 21:06:57 +02:00
Anton Khirnov
73ae27e17b
lavc: use avpriv_ prefix for ff_aac_parse_header().
...
It's used in lavf.
2011-10-20 21:06:57 +02:00
Justin Ruggles
68d3aec819
avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation
2011-10-20 13:30:08 -04:00
Justin Ruggles
352fc5f128
avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2()
2011-10-20 13:30:08 -04:00
Justin Ruggles
ffeeae923b
avcodec: clarify documentation of CODEC_CAP_DELAY
2011-10-20 13:30:08 -04:00
Justin Ruggles
1baa25c7da
shorten: fix end-of-stream decoding.
...
enable CODEC_CAP_DELAY to flush any remaining frames in the buffer.
Stop decoding when the FN_QUIT command is found so that a trailing seek table
isn't decoded as a normal frame.
decode all channels in the same call to avcodec_decode_audio3() so that
decoding will not stop after the first channel of the last frame.
Updated FATE reference. More valid audio is now decoded.
2011-10-20 13:09:46 -04:00
Justin Ruggles
d03f9f65c0
shorten: do not use block size to determine whether to read the header.
2011-10-20 13:09:46 -04:00
Justin Ruggles
882dafe9b6
shorten: check output buffer size before decoding
2011-10-20 13:09:26 -04:00
Justin Ruggles
bd7f7d6c78
shorten: use av_clip_int16() for output sample clipping
2011-10-20 13:09:26 -04:00
Justin Ruggles
069ada46c1
shorten: use bytestream functions to decode the embedded WAVE header
2011-10-20 13:09:25 -04:00
Justin Ruggles
c25762fcf1
shorten: add some comments
2011-10-20 13:09:25 -04:00
Justin Ruggles
15d146c958
shorten: merge decoding of FN_DIFF* subblocks into decode_subframe_lpc()
2011-10-20 13:09:25 -04:00
Justin Ruggles
034f42dfce
cosmetics: remove some needless commented-out stuff
2011-10-20 13:09:25 -04:00
Justin Ruggles
cfa317f67d
shorten: validate block size
2011-10-20 13:09:25 -04:00
Justin Ruggles
45d7d31fb9
shorten: move declaration of 'ret' to top of shorten_decode_frame()
2011-10-20 13:09:25 -04:00
Justin Ruggles
a8055992c0
shorten: pass on error value from allocate_buffers() instead of returning -1
2011-10-20 13:09:25 -04:00
Justin Ruggles
9e5e2c2d01
shorten: check for realloc failure
2011-10-20 13:09:25 -04:00
Justin Ruggles
fe31a637f1
shorten: move decoding of prediction order and applying of global offset to
...
decode_subframe_lpc().
2011-10-20 13:09:25 -04:00
Justin Ruggles
0f97c5014b
shorten: only calculate output size when returning decoded samples, otherwise
...
just set data_size to zero.
2011-10-20 13:09:25 -04:00
Justin Ruggles
e9e37f2d10
cosmetics: reindent
2011-10-20 13:09:25 -04:00
Justin Ruggles
9000b6db22
shorten: separate processing of audio commands from non-audio commands
2011-10-20 13:09:25 -04:00
Justin Ruggles
07745485ef
shorten: skip some fields in the WAV header embedded in the shorten header.
...
fixes incorrect bitrate reporting and potential misreporting of the number of
channels.
2011-10-20 13:09:25 -04:00
Justin Ruggles
a1f7885a8b
shorten: split reading of file header into a separate functions
2011-10-20 13:09:25 -04:00
Justin Ruggles
b606a01759
libspeexenc: add libspeex encoder
2011-10-20 13:06:15 -04:00
Diego Biurrun
265980dabc
x86: Move some variable declarations below the appropriat #ifdef.
...
This avoids some unused variable warnings with YASM disabled.
2011-10-20 16:19:27 +02:00
Diego Biurrun
2cb7c81669
x86: Fix linking of ProRes DSP ASM with YASM disabled.
2011-10-20 16:19:13 +02:00
Diego Biurrun
463ea05ab2
avcodec.h: Move G.729/G.723 CODEC_IDs to the correct section.
...
This is done conditional to the libavcodec version to avoid ABI breaks.
2011-10-20 00:19:19 +02:00
Diego Biurrun
26af0953c0
Only test-compile w32pthreads.h if W32THREADS are available.
...
This fixes 'make checkheaders' on non-W32THREADS systems.
2011-10-20 00:18:29 +02:00
Anton Khirnov
f0eeff708a
lavc: make avcodec_get_context_defaults3 "officially" public
...
Deprecate avcodec_get_context_defaults/avcodec_get_context_defaults2
2011-10-19 17:02:11 +02:00
Mashiat Sarker Shakkhar
73447eb4bd
Use correct scaling table for bwd-pred MVs in second B-field
...
When scaling backward predicted MVs in second B-field, the scaling table is
opposite of that for P field pictures; i.e. first field P table will be used as
second field B table and second field P table will be used as first field B
table. This is not documented in the spec, but exists in the ref. decoder.
This fixes SA10139.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-19 16:42:47 +03:00
Kostya Shishkov
0d8506b8c5
Ut Video decoder
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-19 08:24:19 +02:00
Laurent Aimar
d97ca425ef
sunrast: Check for out of bounds reads
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-18 22:49:43 +02:00
Dustin Brody
6b1f93face
lavc: rename AV_ER_* options to AV_EF_* and rename AGGRESSIVE to BUFFER
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-18 12:28:30 +02:00
Dustin Brody
204e6132d2
lavc: replace API-bump-triggered AVCodecContext field change with shorter, non-conflicting name
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-18 12:28:22 +02:00
Steven Walters
27237d524e
w32threads: support for frame multithreading
...
Replace our incomplete w32threads implementation with x264's pthreads
w32threads wrapper.
Relicensed to LGPL with kind permission by Pegasys Inc.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-16 21:45:16 +02:00
Mans Rullgard
b44522981c
avcodec: remove stray @deprecated comment
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-16 16:22:05 +01:00
Mans Rullgard
91038cdbd1
prores: get correct size for coded V plane if alpha is present
...
The size check must be updated to take into account both manners
in which v_data_size might be set.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-15 14:59:44 +01:00
Mans Rullgard
cd14e297e6
prores: do not set pixel format on codec init
...
The pixel format is not known until the frame header is parsed.
Guessing it here only causes trouble for the caller if the guess
turns out to be wrong (and actually causes very wrong output by
avconv/avplay).
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-15 14:59:44 +01:00
Ronald S. Bultje
7b6883898f
pthread: prevent updating AVCodecContext from itself in frame_thread_free
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Ronald S. Bultje
feadcd1bdc
pthread: copy coded frame dimensions in update_context_from_thread
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Ronald S. Bultje
0f0b5d6434
vp8: prevent read from uninitialized memory in decode_mvs
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Ronald S. Bultje
5653579381
vp8: force reallocation in update_thread_context after frame size change
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Ronald S. Bultje
f05c2fb6eb
vp8: fix return value if update_dimensions fails
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Justin Ruggles
a62c0f94ee
adpcmdec: calculate actual number of output samples for each decoder.
...
This also allows for removing some of the buf_size checks and using the
sample count for some of the decoding loops.
2011-10-14 15:53:41 -04:00
Justin Ruggles
439998e18b
adpcmdec: check remaining buffer size before decoding next block in the
...
ADPCM IMA WAV decoder.
2011-10-14 15:53:41 -04:00
Justin Ruggles
ff5790c761
adpcmdec: do not terminate early in ADPCM IMA Duck DK3 decoder.
...
There are still 2 nibbles to decode once the last byte in the packet has been
read. Updated FATE reference.
2011-10-14 15:53:41 -04:00
Justin Ruggles
8140a1288f
adpcmdec: remove unneeded buf_size==0 check.
...
This is already done by avcodec_decode_audio3()
2011-10-14 15:53:41 -04:00
Justin Ruggles
f7f7c1942b
adpcmdec: remove unneeded zeroing of *data_size
2011-10-14 15:53:40 -04:00
Mans Rullgard
d341d5fd2c
dnxhdenc: fixed signed multiplication overflow
...
The low 32 bits of a multiplication are the same for signed
and unsigned operands. Casting to unsigned before multiplying
is thus equivalent while avoiding signed overflow, which is
undefined by the C99 standard.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-14 20:45:22 +01:00
Ronald S. Bultje
05c8f119cc
proresdsp: fix function prototypes.
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-14 21:34:46 +02:00
Ronald S. Bultje
f78cd0c243
prores-idct: fix overflow in c code.
...
Fix the fate ref for prores-422_proxy by reverting the changes to it
in commit f492df0927
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-14 21:34:20 +02:00
Janne Grunau
19ec283f49
prores: add missing feature warning for alpha
2011-10-14 21:07:53 +02:00
Dustin Brody
582f231142
lavc: add a flag-based error_recognition field to AVCodecContext and deprecate non-flag-based ER field
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-14 09:00:21 +02:00
Dustin Brody
ac90a71459
lavc: rename deprecation symbol FF_API_VERY_AGGRESSIVE to FF_API_ER
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-14 09:00:04 +02:00
Justin Ruggles
617a51f9b7
shorten: remove the flush function.
...
The shorten decoder does not support seeking.
2011-10-13 16:31:16 -04:00
Justin Ruggles
c6ac30c84b
truespeech: use sizeof() instead of hardcoded sizes
2011-10-13 16:26:00 -04:00
Justin Ruggles
6d55506c8b
truespeech: remove unneeded variable, 'consumed'
...
increment the 'buf' pointer instead, and consume the whole packet.
2011-10-13 16:26:00 -04:00
Justin Ruggles
b84048935e
truespeech: simplify truespeech_read_frame() by using get_bits()
2011-10-13 16:25:59 -04:00
Justin Ruggles
5e5ce70f19
truespeech: decode directly to output buffer instead of a temp buffer
2011-10-13 16:25:59 -04:00
Justin Ruggles
3e7a176759
truespeech: check to make sure channels == 1
2011-10-13 16:25:59 -04:00
Justin Ruggles
a8f8db2636
truespeech: check for large enough output buffer rather than truncating output
2011-10-13 16:25:59 -04:00
Justin Ruggles
595cf1a1aa
truespeech: remove unneeded zero-size packet check.
...
This is already checked in avcodec_decode_audio3()
2011-10-13 16:25:59 -04:00
Justin Ruggles
82be06bbb3
mlpdec: return meaningful error codes instead of -1
2011-10-13 15:13:02 -04:00
Justin Ruggles
e1b8d88d52
mlpdec: remove unnecessary wrapper function
2011-10-13 15:13:02 -04:00
Justin Ruggles
37b67f1bff
mlpdec: only calculate output size once
2011-10-13 15:13:02 -04:00
Justin Ruggles
caa845851d
mlpdec: validate that the reported channel count matches the actual output
...
channel count
2011-10-13 15:13:02 -04:00
Mans Rullgard
b45eb9d619
pcm: reduce pointer type casting
...
Making 'samples' a pointer to uint8_t simplifies the DECODE
macro and reduces the amount of type casting overall.
This also fixes some signed overflows on left shift.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-13 17:56:13 +01:00
Mans Rullgard
f59bb3d8f3
mathops: remove undefined behaviour from sign_extend()
...
This function intentionally overflows the signed range on
the left shift. Using this type-punning avoids errors from
the overflow checker without disabling this test globally.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-13 15:40:16 +01:00
Kostya Shishkov
42feaf4070
vc1: explicitly zero interlaced mode coding variables for progressive mode
...
Both v->fcm and v->field_mode are used in common code, now they won't be
reset for progressive frame after interlaced one causing writing past the
frame end for example.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-13 07:35:07 -07:00
Jean First
47a1d794db
tiffenc: initialize forgotten avctx.
2011-10-12 18:20:18 -04:00
Kostya Shishkov
50f9721904
vc1: more prettyprinting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya Shishkov
94e725ca2b
vc1: prettyprint some tables
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya Shishkov
b18c68ad25
vc1: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
2011-10-12 16:51:16 +02:00
Anton Khirnov
641c7afe3c
AVOptions: add new API for enumerating children.
...
This will allow the caller to enumerate child contexts in a generic way
and since the API is recursive, it also allows for deeper nesting (e.g.
AVFormatContext->AVIOContext->URLContext)
This will also allow the new setting/reading API to transparently apply
to children contexts.
2011-10-12 16:51:16 +02:00
Janne Grunau
1bca8f4bc5
rv34: move inverse transform functions to DSP context
2011-10-12 15:52:22 +02:00
Mans Rullgard
318efbfc10
h264: change unsupported bit depth message to error level
...
Unsupported bit depth is certainly an error the user will
want to know about.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-12 12:39:52 +01:00
Mans Rullgard
c682514a8f
qdm2: fix signed multiplication overflow
...
This code relies on the result wrapping as for unsigned
values, and the sign is not used. Thus an unsigned type
is proper here.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-12 12:28:08 +01:00
Anton Khirnov
46c3c53bae
libx264: support yuv422/444 output.
2011-10-12 08:27:36 +02:00
John Stebbins
5f3fb59953
fix AC3ENC_OPT_MODE_ON/OFF
...
The values were reversed.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-11 14:57:58 -04:00
Mans Rullgard
fdba370f8a
h264: fix HRD parameters parsing
...
The bit_rate_value_minus1 and cpb_size_value_minus1 elements
allow a wider range than get_ue_golomb() supports. This
adds a get_ue_golomb_long() function supporting up to 31
leading zeros, which is the maximum for these syntax
elements, and uses it in decode_hrd_parameters().
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 18:24:51 +01:00
Ronald S. Bultje
91f4732913
prores: implement multithreading.
...
60% speedup (overall decoding time) at 2 threads, and another 60%
speedup at 4 threads.
2011-10-11 07:50:49 -07:00
Ronald S. Bultje
e3f530feca
prores: idct sse2/sse4 optimizations.
...
~3.0-3.5x as fast as original C version, 1.6x as fast overall.
2011-10-11 07:50:48 -07:00
Ronald S. Bultje
92fb52d906
prores: extract idct into its own dspcontext and merge with put_pixels.
2011-10-11 07:50:48 -07:00
Mans Rullgard
8babfc033e
h264: fix invalid shifts in init_cavlc_level_tab()
...
The level_code expression includes a shift which is invalid in
those cases where the value is not used. Moving the calculation
to the branch where the result is used avoids these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 15:00:56 +01:00
Diego Biurrun
4b7f49082f
flashsv: return more meaningful error value
2011-10-11 14:28:23 +02:00
Diego Biurrun
f9a9c8f9bc
flashsv: fix typo in av_log() message
2011-10-11 14:28:23 +02:00
Justin Ruggles
ff1f89de2d
smacker: validate channels and sample format.
2011-10-11 07:48:16 -04:00
Justin Ruggles
cf044f8bff
smacker: check buffer size before reading output size
2011-10-11 07:48:16 -04:00
Justin Ruggles
e190e453bd
smacker: validate number of channels
2011-10-11 07:48:16 -04:00
Mans Rullgard
be1242a3f2
h264: fix detection of optional trailing PPS elements
...
The PPS may contain a few trailing elements whose presence is
only signalled by data remaining after the the mandatory part
has been parsed. The current code fails to take into account
the rbsp_trailing_bits() when deciding whether to parse these
optional elements. Assuming no unnecessary padding bytes are
passed to this function, the optional elements are present if
either more than 8 extra bits remain or the remaining bits do
not form a valid rbsp_trailing_bits() after the mandatory PPS
elements have been parsed.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 12:05:51 +01:00
Mans Rullgard
c79d2a20ba
sipr: fix get_bits(0) calls
...
Zero-length get_bits() is undefined, must check before calling.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 12:05:51 +01:00
Mans Rullgard
cb668476ab
motion_est: make MotionExtContext.map_generation unsigned
...
The way this value is used, it should be an unsigned type.
While the numerical value has no meaning, unsigned wraparound
is relied upon.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 12:05:50 +01:00
Laurent Aimar
4c7a232fc8
h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:36 +02:00
Laurent Aimar
e8ac80fb2c
error_resilience: fix the check for missing references in ff_er_frame_end() for H264
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:36 +02:00
Laurent Aimar
1b1182ce97
4xm: prevent NULL dereference with invalid huffman table
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:36 +02:00
Laurent Aimar
8d518a9c4f
4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffers
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:35 +02:00
Laurent Aimar
dc64f203a6
ptx: check for out of bound reads
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:15 +02:00
Laurent Aimar
04a845caa7
tiffdec: fix out of bound reads/writes
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:13 +02:00
Laurent Aimar
46cb2f6a29
eacmv: check for out of bound reads
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:13 +02:00
Laurent Aimar
8df8a87e3f
eacmv: fix potential pointer arithmetic overflows
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar
c7f89064e2
adpcm: fix out of bound reads due to integer overflow
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar
2475f1a83c
anm: prevent infinite loop
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar
de049a95f4
avs: check for out of bound reads
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Baptiste Coudurier
11a32d53ca
dnxhddec: handle cid change in bitstream.
2011-10-10 09:40:26 -07:00
Kostya Shishkov
109d8aa1e6
vc1: K&R reformatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-10 18:35:35 +02:00
Justin Ruggles
8f8f5ae991
ra288: log an error message when output buffer is too small.
...
also return AVERROR(EINVAL) instead of -1.
2011-10-10 11:38:58 -04:00