The idea is to use ffmath.h for internal implementations of math functions.
Currently, it is used for variants of libm functions, but is by no means
limited to such things.
Note that this is not exported; use lavu/mathematics for such purposes.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
Fixes out of array read
Fixes: 1b79b985cdf860ffa228c00ee5497051/signal_sigsegv_1f99d24_315_f0f1fdb451264b1138e9c24eb7d49181.wv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This parameter can be used to inform the allocation code about how much
downsizing might occur, and can be used to optimize how to allocate the
packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '2df0c32ea12ddfa72ba88309812bfb13b674130f':
lavc: use a separate field for exporting audio encoder padding
Conflicts:
libavcodec/audio_frame_queue.c
libavcodec/avcodec.h
libavcodec/libvorbisenc.c
libavcodec/utils.c
libavcodec/version.h
libavcodec/wmaenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Currently, the amount of padding inserted at the beginning by some audio
encoders, is exported through AVCodecContext.delay. However
- the term 'delay' is heavily overloaded and can have multiple different
meanings even in the case of audio encoding.
- this field has entirely different meanings, depending on whether the
codec context is used for encoding or decoding (and has yet another
different meaning for video), preventing generic handling of the codec
context.
Therefore, add a new field -- AVCodecContext.initial_padding. It could
conceivably be used for decoding as well at a later point.
This is necessary since the switch to floating point
input means there is no longer sufficient input data
validation.
There is a good chance that other encoders are affected
by similar issues.
This problem can be triggered by trying to encode
extremely large values and probably also with Inf and
possibly also NaNs.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5':
lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft
Conflicts:
libavcodec/flacenc.c
libavcodec/libgsm.c
libavcodec/utils.c
libavcodec/version.h
The compatibility wrapers are left as they likely sre still
in wide use. They will be removed when they break or otherwise
cause work without an volunteer being available.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '205a95f7b5178362874bc1e65eae9866723491c1':
wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext
wma: decode directly to the user-provided AVFrame
wmapro: decode directly to the user-provided AVFrame
wavpack: decode directly to the user-provided AVFrame
Conflicts:
libavcodec/wavpack.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
* commit '284ea790d89441fa1e6b2d72d3c1ed6d61972f0b':
dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil
aacenc: use the correct output buffer
aacdec: fix signed overflows in lcg_random()
base64: fix signed overflow in shift
Conflicts:
libavcodec/dsputil.c
libavutil/base64.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
dv1394: Swap the min and max values of the 'standard' option
rtpdec_vp8: Don't parse fields that aren't used
lavc: add some AVPacket doxy.
audiointerleave: deobfuscate a function call.
rtpdec: factorize identical code used in several handlers
a64: remove interleaved mode.
doc: Point to the new location of the c99-to-c89 tool
decode_audio3: initialize AVFrame
ws-snd1: set channel layout
wmavoice: set channel layout
wmapro: use AVCodecContext.channels instead of keeping a private copy
wma: do not keep private copies of some AVCodecContext fields
Conflicts:
libavcodec/wmadec.c
libavcodec/wmaenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
wmaenc: use float planar sample format
(e)ac3enc: use planar sample format
aacenc: use planar sample format
adpcmenc: use planar sample format for adpcm_ima_wav and adpcm_ima_qt
adpcmenc: move 'ch' variable to higher scope
adpcmenc: fix 3 instances of variable shadowing
adpcm_ima_wav: simplify encoding
libvorbis: use planar sample format
libmp3lame: use planar sample formats
vorbisenc: use float planar sample format
ffm: do not write or read the audio sample format
parseutils: fix parsing of invalid alpha values
doc/RELEASE_NOTES: update for the 9 release.
smoothstreamingenc: Add a more verbose error message
smoothstreamingenc: Ignore the return value from mkdir
smoothstreamingenc: Try writing a manifest when opening the muxer
smoothstreamingenc: Move the output_chunk_list and write_manifest functions up
smoothstreamingenc: Properly return errors from ism_flush to the caller
smoothstreamingenc: Check the output UrlContext before accessing it
Conflicts:
doc/RELEASE_NOTES
libavcodec/aacenc.c
libavcodec/ac3enc_template.c
libavcodec/wmaenc.c
tests/ref/lavf/ffm
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
asfdec: Add an option for not searching for the packet markers
cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
cosmetics: Align codec declarations
cosmetics: Convert mimic.c to utf-8
avconv: remove an unused function parameter.
avconv: remove now pointless variables.
avconv: drop support for building without libavfilter.
nellymoserenc: fix crash due to memsetting the wrong area.
libavformat: Only require first packet to be known for audio/video streams
avplay: Don't try to scale timestamps if the tb isn't set
Conflicts:
Changelog
configure
ffmpeg.c
libavcodec/aacenc.c
libavcodec/bmpenc.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/ffv1.c
libavcodec/flacenc.c
libavcodec/fraps.c
libavcodec/huffyuv.c
libavcodec/libopenjpegdec.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/pamenc.c
libavcodec/pgssubdec.c
libavcodec/pngenc.c
libavcodec/qtrleenc.c
libavcodec/rawdec.c
libavcodec/sgienc.c
libavcodec/tiffenc.c
libavcodec/v210dec.c
libavcodec/wmv2dec.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>