Justin [Fri, 11 Mar 2011 18:03:26 +0000 (13:03 -0500)]
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.
Mans Rullgard [Sun, 6 Mar 2011 13:50:21 +0000 (13:50 +0000)]
configure: use pkg-config helpers
This makes existing pkg-config uses as well as the libsdl checks
use the new pkg-config helper functions, which should be more
robust against broken systems.
Mans Rullgard [Sun, 6 Mar 2011 13:48:30 +0000 (13:48 +0000)]
configure: improve pkg-config support
This adds helper functions for checking packages with pkg-config
and managing the associated flags.
Note that pkg-config use is still discouraged due to widespread
poor practices resulting in broken flags in many situations. A
few badly designed packages require flags only obtainable using
pkg-config, and these functions are intended for those cases.
Mans Rullgard [Mon, 7 Mar 2011 02:49:55 +0000 (02:49 +0000)]
configure: allow checking multiple functions in check_func_headers()
This makes it possible to pass a space-separated list of functions
to check_func_headers and check_lib2. If any function is missing,
none are enabled as available, so this should only be used for
all-or-nothing sets, i.e. groups in which none will be used if any
one is missing.
In retry_transfer_wrapper, do not check url_interrupt_cb, causes problems
when writing and pressing q during encoding. Instead, check url_interrupt_cb
at the end.
Note that when a protocol is interrupted by url_interrupt_cb, some data may
be silently discarded: the protocol context is not suitable for anything
anymore.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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>
Peter Ross [Thu, 3 Mar 2011 11:37:05 +0000 (22:37 +1100)]
avio: add avio_skip macro
This is a substitute for the url_fskip function that was deprecated by
commit 0300db8ad778a194b4a8ec98f6da3de5b41c46ee. avio_fskip is provided to
improve demuxer code readability. It distinguishes the act of skipping over
unknown or irrelevant bytes from the standard avio_seek operation.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Sean McGovern [Fri, 4 Mar 2011 03:22:43 +0000 (22:22 -0500)]
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>
Martin Storsjö [Mon, 28 Feb 2011 13:39:36 +0000 (15:39 +0200)]
URLProtocol: Add URL_PROTOCOL_FLAG_NESTED_SCHEME
If this flag is set, the protocol can handle URLs where the
scheme is a nested scheme such as applehttp+file: - the protocol
can handle any URL where the first segment of the nested scheme
belongs to this protocol.
Justin Ruggles [Fri, 4 Mar 2011 21:41:49 +0000 (16:41 -0500)]
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.
Mans Rullgard [Wed, 2 Mar 2011 13:08:15 +0000 (13:08 +0000)]
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.
Martin Storsjö [Sat, 26 Feb 2011 23:02:32 +0000 (01:02 +0200)]
aviobuf: Write new data at s->buf_end in fill_buffer
In most cases, s->buf_ptr will be equal to s->buf_end when
fill_buffer is called, but this may not always be the case, if
we're seeking forward by reading (permitted by the short seek
threshold).
If fill_buffer is writing to s->buf_ptr instead of s->buf_end (when
they aren't equal and s->buf_ptr is ahead of s->buffer), the data
between s->buf_ptr and s->buf_end is overwritten, leading to
inconsistent buffer content. This could return incorrect data if
later seeking back into the area before the current s->buf_ptr.
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>
Mans Rullgard [Sun, 27 Feb 2011 23:34:38 +0000 (23:34 +0000)]
Use --sysroot flag for clang
Although not documented, clang does support the --sysroot flag, and it
does the right thing. Use this flag intead of -isysroot which only
applies to header file searches, not the linker.