PPC and x86 code is split off from swscale_template.c. Lots of code is
still duplicated and should be removed later.
Again uniformize the init system to be more similar to the dsputil one.
Unset h*scale_fast in the x86 init in order to make the output
consistent with the previous status. Thanks to Josh for spotting it.
Keep only the plain C code in the main rgb2rgb.c and move the x86
specific optimizations to x86/rgb2rgb.c
Change the initialization pattern a little so some of it can be
factorized to behave more like dsputils.
The functions are already av_ prefixed and sha1 header is already provided.
Install libavutil/{aes,sha}.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
ff_get_wav_header is reading data from a WAVE file and then uses it
(without validation) to malloc a buffer. It then proceeded to read
data into the buffer, without verifying that the allocation succeeded.
To address this, change ff_get_wav_header to return an error if
allocation failed, and adapted all calling code to handle that error.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
The mpegts muxer does not set the stream time base using
av_set_pts_info, but expects it to have the default value of 1/90000.
If the calling code changes stream pts before writing the header,
other muxers override the time base at that point (like mpegenc.c).
DTX, discontinuous transmission, allows emitting frames with
comfort noise when no voice is detected in the input audio.
Signed-off-by: Martin Storsjö <martin@martin.st>
Also rename the incorrectly named enc_bitrate to enc_mode, use the
enc_bitrate variable for storing the last chosen bitrate.
This avoids continuous warning log messages if not using an
exactly matching bitrate, while still allowing changing bitrate
at any point.
Signed-off-by: Martin Storsjö <martin@martin.st>
Dynamically print the supported bitrates from the local table,
instead of using a hardcoded log message.
Signed-off-by: Martin Storsjö <martin@martin.st>
Include VisualOn to clarify the codec name, but remove the
actual library name from the user-friendly description.
Also mention Android, to clarify which VisualOn implementation
this refers to, since they do sell other variants of the same
code, too.
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids warnings of this kind, everywhere priv_class
is initialized:
warning: initialization discards qualifiers from pointer target type
Signed-off-by: Martin Storsjö <martin@martin.st>
This code could be executed if the demuxer reads more than one
segment before returning from av_open_input_stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
The new function is more flexible than url_exist(), as it allows to
specify which access flags to check, and does not require an explicit
open of the checked resource.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Stop the avio input at a point where amf_parse_object can
continue parsing the end of the object seamlessly, when all
data is available.
If unsupported data is encountered within the keyframes object,
try seeking to the start of the keyframes object - if the seek
back was successful, the caller can continue parsing the rest
of the AMF data.
Signed-off-by: Martin Storsjö <martin@martin.st>
Current keyframes data parser unconditionally rewind metadata to
the end at the end of function. As result ALL metadata located
after keyframes index not parsed, and as metadata object can have
ANY placement inside metadata it can lead to unpredictable result
(bitrate can not be found, etc.). As result FLV movie will not
play at all in such situation.
Signed-off-by: Martin Storsjö <martin@martin.st>
According to ISO 9899:1999 S 6.5.7/4:
The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
are filled with zeros. If E1 has an unsigned type, the value of the
result is E1× 2^E2, reduced modulo one more than the maximum value
representable in the result type. If E1 has a signed type and
nonnegative value, and E1× 2^E2 is representable in the result type, then
that is the resulting value; otherwise, the behavior is undefined.
When HAVE_7REGS was not defined these functions had an empty body
causing the following warnings during compilation.
In file included from libswscale/x86/yuv2rgb_mmx.c:58:
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in function returning non-void
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in function returning non-void
Signed-off-by: Diego Biurrun <diego@biurrun.de>
The printf function is forbidden in library code, but not in test programs,
so #undefine the printf macro that disables the system printf function.
Signed-off-by: Diego Biurrun <diego@biurrun.de>