Commit Graph

13211 Commits

Author SHA1 Message Date
Ramiro Polla cbf5d22d24 Remove occurrences of my old email address
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-16 23:19:40 +00:00
Mans Rullgard 381d37fda9 dsputil: add bswap16_buf()
There are several places where a buffer is byte-swapped in 16-bit units.
This allows them to share code which can be optimised for various
architectures.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-16 23:19:40 +00:00
Janne Grunau a03be6e1ba use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_* 2011-03-16 21:54:39 +01:00
Janne Grunau 29ba091136 replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION
also update the multiple inclusion guards in config.h|mak
2011-03-16 21:54:39 +01:00
Justin Ruggles 79414257e2 mathops: fix MULL() when the compiler does not inline the function.
If the function is not inlined, an immmediate cannot be used for the
shift parameter, so the %cl register must be used instead in that case.

This fixes compilation for x86-32 using gcc with --disable-optimizations.
2011-03-15 20:49:37 -04:00
Justin Ruggles aaff3b312e mathops: change "g" constraint to "rm" in x86-32 version of MUL64().
The 1-arg imul instruction cannot take an immediate argument, only a register
or memory argument.
2011-03-15 13:43:47 -04:00
Justin Ruggles b181b8fb96 mathops: convert MULL/MULH/MUL64 to inline functions rather than macros.
This fixes unexpected name collisions that were occurring with variables
declared within the macros.
It also fixes the fate-acodec-ac3_fixed regression test on x86-32.
2011-03-15 13:43:47 -04:00
Philip Langdale 025225d7ee h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PPS units.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 07:20:44 -04:00
Justin Ruggles f1efbca5e9 ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder. 2011-03-14 08:45:31 -04:00
Justin 323e6fead0 ac3enc: do not right-shift fixed-point coefficients in the final MDCT stage.
This increases the accuracy of coefficients, leading to improved quality.
Rescaling of the coefficients to full 25-bit accuracy is done rather than
offsetting the exponent values. This requires coefficient scaling to be done
before determining the rematrixing strategy. Also, the rematrixing strategy
calculation must use 64-bit math to prevent overflow due to the higher
precision coefficients.
2011-03-14 08:45:26 -04:00
Peter Ross 6e7cf13b6b mm decoder: move buffer allocation from decode_init() to decode_frame()
This permits playback in ffplay when libavfilter is enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:07:29 -04:00
Peter Ross 0697440c1e Bitmap Brothers JV video decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:05:01 -04:00
Johan Andersson 21de920472 Update the url to the site website and change ffmpeg-devel to libav-devel
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-13 18:45:29 -04:00
Jason Garrett-Glaser 81a131312d VP8: fix other function declaration
Was missed in 3efbe137.
2011-03-12 15:36:15 -08:00
Hendrik Leppkes 0215006ab7 VC1: Export profile/level
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 14:08:27 +00:00
Jason Garrett-Glaser 1eeca88691 VP8: optimize VP8Context struct ordering
Shaves at least 3KB off code size on x86, should improve cache utilization.
This would probably be useful to do for other decoders/encoders as well.
2011-03-12 03:43:42 -08:00
Jason Garrett-Glaser 3efbe13739 VP8: fix function declaration 2011-03-12 03:41:39 -08:00
Jason Garrett-Glaser b1d2f812c9 VP8: token probs doesn't need padding
prob[0] is the only prob array ever accessed, so prob[1] can serve as padding
for prob[0].
2011-03-12 03:41:36 -08:00
Jason Garrett-Glaser 628b48db85 VP8: use a goto to break out of two loops
A break statement was supposed to break out of two loops, but only broke out of one.
Didn't affect output, just could have been marginally slower.
2011-03-12 03:41:33 -08:00
Mans Rullgard a5444fee06 Add CONFIG_AC3DSP symbol to simplify makefiles
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 11:35:26 +00:00
Benjamin Larsson aecd0a4496 Export profiles from the mpeg2 video decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-10 18:05:35 -05:00
Nathan Caldwell 31ff9bd7b8 aacenc: Fix a segfault in search_for_quantizers
This reverts the removal of scoefs from AACEncContext.
It resulted in scoefs being a NULL pointer when
search_for_quantizers() is called.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-08 17:45:08 -05:00
Ronald S. Bultje 4e84f994d3 reindent. 2011-03-07 13:18:57 -05:00
Young Han Lee 2790d7a9ff aacenc: remove the data arrays
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Thadeu Lima de Souza Cascardo 36864ac354 aac_latm_dec: use aac context and aac m4ac
When decoding latm config, use the corresponding aac context and its
m4ac instead of using NULL and a local variable. This fixes decoding of
audio in MPEG TS from SBTVD (the Brazillian Digital TV Sytem), when
there is no extradata. This is the case when using the decoder with
gst-ffmpeg and a GStreamer mpegts demuxer.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Justin Ruggles 2d9a101a1f ac3enc: add some assertions 2011-03-07 11:18:59 -05:00
Justin Ruggles 7100d63ca5 ac3enc: use av_assert2() instead of assert() to make debugging easier. 2011-03-07 11:18:51 -05:00
Justin Ruggles d21be5f15b cosmetics: rename ff_fmt_convert_init_ppc() to ff_fmt_convert_init_altivec().
It only has Altivec functions and is not compiled if Altivec is disabled.
2011-03-07 11:15:29 -05:00
Carl Eugen Hoyos 159683ddec Fix compilation on powerpc with --disable-altivec. 2011-03-07 11:15:25 -05:00
Sean McGovern 02dd3666c2 h264_mp3toannexb_bsg: don't crash, but warn, if PPS/SPS not found.
Should an AVC-1 in MP4 stream not contain SPS or PPS NAL units,
this BSF is then unable to allocate an output buffer for the
modified stream. Warn that the resulting stream may be unplayable.

Fix roundup issue #2386.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:19:46 -05:00
Justin Ruggles 53e35fd340 ac3enc: add num_rematrixing_bands to AC3EncodeContext and use it instead of the hardcoded value.
Currently it is always 4, but this change will allow it to be adjusted when
bandwidth-related features are added such as channel coupling, enhanced
channel coupling, and spectral extension.
2011-03-04 17:40:24 -05:00
Justin Ruggles b35743ffb4 ac3: define AC3_MAX_CPL_BANDS and use it in ac3dec.h 2011-03-04 16:48:09 -05:00
Ronald S. Bultje 8cf9a09d40 vp3-mt: fix deadlock when first frame is not a keyframe. 2011-03-02 12:15:07 -05:00
Mans Rullgard ff1efc524c threads: allow thread count of zero
This moves setting the thread count to a minimum of 1 to
frame_thread_init(), allowing a value of zero to propagate
through to the codec if frame threading is not used.  This
makes auto-threads work in libx264.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-02 14:06:48 +00:00
Baptiste Coudurier fb98507126 vc1: fix decoding when end sequence is present
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-02 13:32:58 +00:00
Baptiste Coudurier 99bbc781e9 dnxhd: allow encoding with Avid Nitris compatibility.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-01 23:55:55 +00:00
Alexander Strange 76d8846c4e huffyuv: Add multithreading support
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 11:39:25 -05:00
Alexander Strange ad9791e12b pthreads: Fix bug introduced with thread_safe_callbacks
For intra codecs, ff_thread_finish_setup() is called before decoding starts
automatically. However, get_buffer can only be used before it's called, so
adding this requirement broke frame threading for them. Fixed by moving the
call until after get_buffer is finished.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 11:39:12 -05:00
Mans Rullgard 0b32da90f8 ARM: VP8: fix build on systems with global symbol prefix
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-27 13:53:26 +00:00
Mans Rullgard 8b454c352f ARM: fix vp8 neon with pic enabled
The assembler emits literal pools too far from the load instructions,
so we must do it explicitly at a suitable location.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-27 13:53:21 +00:00
Peter Ross e211e255aa bink: prevent overflows within binkidct by using int-sized intermediate array
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross ccfcddb3f2 Bink version 'b' audio decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross 8a8c283edd binkaudio: simplify frame_len_bits and frame_len calculation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross a304def1dc binkaudio: remove unnecessary loop
decode_init sets bands[0] == 2, so this loop always sets the band table
index (k) to zero.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross 582ac86d19 binkaudio: perform band table scaling in decode_init
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Mans Rullgard 8997bb8807 bink: use LOCAL_ALIGNED for aligned stack data
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-25 19:50:14 +00:00
Kyle 04973f8082 dxva2: define required feature selection macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-25 19:48:20 +00:00
Anssi Hannula 7e06e0ede3 dca: use EXT_AUDIO_ID field to determine core extensions
This avoids the core substream extensions scan when the EXT_AUDIO_ID
field indicates no extensions or only unsupported extensions. The scan
is done only if the value of EXT_AUDIO_ID is unknown or indicates a
present XCh extension which we can decode.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-24 21:22:37 +00:00
Justin Ruggles 1108f8998c vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.
There is no need to expand to 16-bits. Just use memcpy() to copy the raw data.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:52:51 -05:00
Justin Ruggles 2ec7862db8 vmdaudio: remove unnecessary fields from VmdAudioContext and use the corresponding AVCodecContext fields instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:52:12 -05:00
Justin Ruggles 1e86d685e0 vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded sample size.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:51:44 -05:00
Justin Ruggles 1574eff3d2 vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, then making a single call to vmdaudio_loadsound().
This also adds output buffer size checks for AUDIO and SILENCE block types.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:51:12 -05:00
Justin Ruggles ba9516cca8 cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:59 -05:00
Justin Ruggles 762b386e4a vmdaudio: move all silence chunk handling to vmdaudio_loadsound().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:58 -05:00
Justin Ruggles 8e9027d266 cosmetics: remove debugging cruft
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:56 -05:00
Justin Ruggles 868f2f4d90 cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:48:04 -05:00
Justin Ruggles 2d213695fc vmdaudio: simplify buffer pointer and header size handling.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:12:39 -05:00
Justin Ruggles 7a4fb3fd93 vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:11:36 -05:00
Justin Ruggles 22f893e1c9 vmdaudio: validate block type
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:10:12 -05:00
Justin Ruggles dd1af5136f vmdaudio: use macros and a local variable for block type.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:08:31 -05:00
Justin Ruggles 6989cb2dae vmdaudio: correct the silent chunk count in the first block.
This fixes A/V sync with several samples, notably:
http://samples.mplayerhq.hu/game-formats/sierra-vmd/swat_*.vmd

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:06:33 -05:00
Justin Ruggles 9b73f78600 vmdaudio: output audio samples for standalone silent blocks.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:04:51 -05:00
Justin Ruggles 1328d43313 vmdaudio: remove duplicated code by merging mono and stereo decoding.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:02:19 -05:00
Justin Ruggles a58bcb40b1 vmdaudio: fix raw_block_size calculation.
The size should depend on the output sample size, not the internal bit depth.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 20:58:56 -05:00
Young Han Lee e22910b21a aacdec: Reduce the size of buf_mdct.
It was doubled in size for the LTP implementation. This brings it back
down to its original size.
2011-02-21 16:35:22 -08:00
Mans Rullgard e0e46cae37 vp8: ppc: fix invalid reads in altivec epel mc
The 4-tap filters should only access one row/column before the
reference block.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-21 20:28:41 +00:00
Mans Rullgard 381efba0ec ppc: fix vc1 inverse transform, unbreak build
GCC 4.3 and later are more particular about signedness matching
in vector operations.  The operations under if(rangered) were
missing assignments and thus had no effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-21 20:28:37 +00:00
Ronald S. Bultje 78e2380a6d targa: prevent integer overflow in bufsize check. 2011-02-21 13:44:37 -05:00
Ronald S. Bultje f8bed30d8b VC1: merge idct8x8, coeff adjustments and put_pixels.
Merging these functions allows merging some loops, which makes the
results (particularly after SIMD optimizations) much faster.
2011-02-21 10:23:44 -05:00
Ronald S. Bultje 484a337cd7 dsputil: make {add/put/put_signed}_pixels_clamped() non-static. 2011-02-21 10:23:44 -05:00
Ronald S. Bultje bbfd2e7ab4 VC1: inline vc1_put_block() in vc1_decode_i_blocks().
Advantage is that it allows us to combine several loops into a single
one, and these can eventually be merged into the IDCT itself. Also, it
allows us to remove vc1_put_block(), and makes CODEC_FLAG_GRAY faster.
2011-02-21 10:23:44 -05:00
Mans Rullgard 1efa772e20 amrnb: use correct size when copying lsf_r array
lsf_r is an array of int16_t, not float.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-20 17:31:48 +00:00
Ronald S. Bultje 70aa916e46 VC1: don't use vc1_put_block() in vc1_decode_i_blocks_adv().
Advanced profile never uses "range reduction", so vc1_put_block() quite
literally just calls put_pixels_clamped() from vc1_decode_i_blocks_adv().
By inlining the function, we can prevent calling IDCT8x8 if
CODEC_FLAG_GRAY is set, and we don't have to scale the coeffs in the
[0,256] range, but can instead use put_signed_pixels_clamped().
2011-02-20 08:31:14 -05:00
Ronald S. Bultje bf6fa73245 dsputil_mmx.c: remove ff_vector128.
Remove ff_vector128, it is identical to ff_pb_80.
2011-02-19 10:51:15 -05:00
Reimar Döffinger 2bbec1eda4 Fix invalid reads in VC1 decoder
Patch discussed and taken from https://roundup.ffmpeg.org/issue2584
2011-02-19 11:33:01 +01:00
David Conrad a89f4ca005 Fix VP3 edge emulation
With negative stride, the start of the edge_emu buffer should be pointing to
the last line, not the end of the buffer.
With positive stride, pointing to the end of the buffer was completely wrong.
2011-02-19 01:42:12 -08:00
Young Han Lee 9707f84fa7 aacdec: dsputilize the scalar multiplication in intensity stereo 2011-02-19 00:57:09 -08:00
Jason Garrett-Glaser 902685b8ab VP3: fix decoding of videos with stride > 2048
Also remove qscale_table code; this didn't make sense anyways as VP3 doesn't
use an MPEG-like quantizer scale.
2011-02-18 14:40:57 -08:00
Jean-Daniel Dupas 351423ae1f targa: fix potential buffer overreads
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-18 15:04:47 +00:00
Ronald S. Bultje ed040f35f2 Fix PPC build. 2011-02-17 20:22:39 -05:00
Jason Garrett-Glaser 891b1f15a7 VP8: init one less near_mv
This one didn't actually need to be initialized.
2011-02-17 15:25:28 -08:00
Jason Garrett-Glaser bcf4568f18 VP8: split out declarations to new header 2011-02-17 15:25:16 -08:00
Jason Garrett-Glaser 7634771e70 VP8: faster MV clipping 2011-02-17 15:23:53 -08:00
Ronald S. Bultje 12802ec060 dsputil: move VC1-specific stuff into VC1DSPContext. 2011-02-17 17:35:35 -05:00
Ronald S. Bultje 0b16cdc3fa VC1: simplify a calculation in a loop. 2011-02-17 17:35:35 -05:00
Ronald S. Bultje 1da6ea3954 VC1: transpose IDCT 8x8 coeffs while reading. 2011-02-17 17:35:35 -05:00
Young Han Lee 979395bbbb mdct: remove unnecessary multiplication
3*n4 was already calculated in n3.
2011-02-17 11:59:28 +00:00
Justin Ruggles 5b54d4b376 ac3enc: fix bug in stereo rematrixing decision.
The rematrixing strategy reuse flags are not reset between frames, so they
need to be initialized for all blocks, not just block 0.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:57 +00:00
Michael Niedermayer 50a82c2c75 vbv_delay AVOption for ABI compatibility
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 23:05:46 +01:00
Carl Eugen Hoyos 2e3c56a29f Set maximum lowres value for the MJPEG decoder to 3.
While 4 works for some samples, 3 is the correct value since 8x8
DCT is used by (m)jpeg.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 23:05:46 +01:00
Justin Ruggles 1f004fc512 ac3dsp: Change punpckhqdq to movhlps in ac3_max_msb_abs_int16().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-16 14:08:34 -05:00
Stefano Sabatini 938b62538a Document audio_resample_close().
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 10:34:09 +01:00
Stefano Sabatini 5495528365 Apply minor cosmetics fixes to the av_audio_resample_init() doxy.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 10:33:54 +01:00
Justin Ruggles 50d7140441 ac3enc: change default floor code to 7.
This is to match the value in every (E-)AC-3 file from commercial sources.
It has a negligible effect on audio quality.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 21:40:42 +00:00
Reinhard Tartler 737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Christophe Massiot 55bad0c602 Pass VBV delay to the calling application via ctx
VBV delay is useful for T-STD compliance in some TS muxers. It is
certainly possible to retrieve it by parsing the output of FFmpeg, but
getting it from the context makes it simpler and less error-prone.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 14:20:19 +00:00
Peter Ross 71f88b1f38 binkaudio: remove unused copy of AVCodecContext*
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 14:20:19 +00:00
Peter Ross 9806fbd535 binkaudio: fix channel count check
Perform validity check on AVFormatContext.channels instead of
uninitialised field.

This fixes issue 2001.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 14:20:19 +00:00
Young Han Lee ead15f1dc1 aacdec: Implement LTP support.
Ported from gsoc svn.
2011-02-14 21:43:42 -08:00
Alex Converse 916dee9f45 aac: remove dead SBR input scaling
It has been unused since 9d06d7bce3

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 09:46:29 +00:00