Commit Graph

1808 Commits

Author SHA1 Message Date
Michael Niedermayer 244682dd08 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  log: Only include unistd.h if configure found it
  ape: create audio stream before reading tags.
  mov: make a length variable larger.
  image2: Add "start_number" private option to the demuxer
  image2: Add "start_number" private option to the muxer
  avconv: remove a forgotten debugging printf.
  avconv: use more descriptive names for hardcoded filters.
  avconv: remove redundant handling of async.
  doc/filters: fix typo.
  h264: use asm cabac reader under a generic condition

Conflicts:
	ffmpeg.c
	libavformat/img2dec.c
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 21:34:54 +02:00
Michael Niedermayer eeddd3962e cpu.h: include version.h for LIBAVUTIL_VERSION_MAJOR
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 12:34:12 +02:00
Michael Niedermayer c41899a377 lavu: split version info into version.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 12:34:12 +02:00
Martin Storsjö 145a8096d5 log: Only include unistd.h if configure found it
MSVC has isatty (in io.h), but not unistd.h. (isatty isn't called
at all for windows, since there's a special case block for that.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-24 12:36:22 +03:00
Michael Niedermayer 1c60088885 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: Only use optimizations with cmov if the CPU supports the instruction
  x86: Add CPU flag for the i686 cmov instruction
  x86: remove unused inline asm macros from dsputil_mmx.h
  x86: move some inline asm macros to the only places they are used
  lavfi: Add the af_channelmap audio channel mapping filter.
  lavfi: add join audio filter.
  lavfi: allow audio filters to request a given number of samples.
  lavfi: support automatically inserting the fifo filter when needed.
  lavfi/audio: eliminate ff_default_filter_samples().

Conflicts:
	Changelog
	libavcodec/x86/h264dsp_mmx.c
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/version.h
	libavutil/x86/cpu.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 02:09:53 +02:00
Diego Biurrun 65345a5a30 x86: Add CPU flag for the i686 cmov instruction 2012-06-23 16:21:50 +02:00
Michael Niedermayer 0567715a6b qsort: flip compare direction to match libc qsort()
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 22:48:00 +02:00
Michael Niedermayer e847f41285 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libspeexenc: add supported sample rates and channel layouts.
  Replace usleep() calls with av_usleep()
  lavu: add av_usleep() function
  utvideo: mark interlaced frames as such
  utvideo: Fix interlaced prediction for RGB utvideo.
  cosmetics: do not use full path for local headers
  lavu/file: include unistd.h only when available
  configure: check for unistd.h
  log: include unistd.h only when needed
  lavf: include libavutil/time.h instead of redeclaring av_gettime()

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/utvideo.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 22:34:02 +02:00
Wolfram Gloger 258dfff839 extend log line buffer sizes
The string passed to av_vlog() from libx264's X264_log overflows the 512
byte part_size, truncating x264 parameter output.  Double this size
and put it in a #define so it only needs to be changed in one place.

Signed-off-by: Wolfram Gloger <video06@malloc.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 19:16:51 +02:00
Mans Rullgard d3d3a32c9d lavu: add av_usleep() function
This function implements a delay using the first available
of the following functions:

- nanosleep()
- usleep()
- Sleep() (Windows)

The conditional #includes in time.c are simplified by including
unistd.h and windows.h whenever they are available rather than
having these lines triggered by specific functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-22 17:15:18 +01:00
Carl Eugen Hoyos 15bde06084 Revert "mathematics.h: remove a couple of math defines"
This reverts commit a2b186a188.

The defines were present for several years, removing
them without a version bump may break API.
(Fixes MPlayer compilation.)
2012-06-22 16:10:42 +02:00
Diego Biurrun a5a93fa8f5 cosmetics: do not use full path for local headers 2012-06-22 10:49:40 +02:00
Mans Rullgard d11baad055 lavu/file: include unistd.h only when available
The unistd.h header is only needed for the close() declaration.
If this header is not available, the close() declaration may be
provided by another header, e.g. io.h.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 22:54:31 +01:00
Mans Rullgard 539df61193 log: include unistd.h only when needed
The only symbol this file uses from unistd.h is isatty().  By
including the header only when this function is used, the file
can be built on systems without unistd.h (which presumably also
lack isatty).

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 22:53:35 +01:00
Michael Niedermayer 87dced8074 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fix hardcoded tables compililation caused by missing math constants
  lavf: Make codec_tag arrays constant
  twinvq: give massive struct a name.
  lavf, lavu: version bumps and APIchanges for av_gettime() move
  lavfi/audio: don't set cur_buf in ff_filter_samples().
  lavfi/fifo: add audio version of the fifo filter.
  fifo: fix parenthesis placement.
  lavfi: rename vf_fifo.c -> fifo.c
  lavc: remove stats_in from AVCodecContext options table.

Conflicts:
	doc/APIchanges
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/audio.c
	libavfilter/fifo.c
	libavformat/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-21 22:37:43 +02:00
Mans Rullgard dc7e336cae lavf, lavu: version bumps and APIchanges for av_gettime() move
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 11:45:28 +01:00
Michael Niedermayer 104c914640 libavutil: fix author attribution
Libav.org has removed this while moving the code around

For reference, the code was originally added in:
commit 9aeeeb63f7
Author: Fabrice Bellard <fabrice@bellard.org>
Date:   Wed Dec 20 00:02:47 2000 +0000

    Initial revision

    Originally committed as revision 2 to svn://svn.ffmpeg.org/ffmpeg/trunk
--
The function name originates from:
commit 9498853132
Author: Fabrice Bellard <fabrice@bellard.org>
Date:   Thu Jul 25 16:01:46 2002 +0000

    more consistent naming

    Originally committed as revision 802 to svn://svn.ffmpeg.org/ffmpeg/trunk

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 23:51:02 +02:00
Michael Niedermayer 4da42ebe44 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MS Screen 1 decoder
  aacdec: Fix popping channel layouts.
  av_gettime: support Win32 without gettimeofday()
  Use av_gettime() in various places
  Move av_gettime() to libavutil
  dct-test: use emms_c() from libavutil instead of duplicating it
  mov: fix operator precedence bug
  mathematics.h: remove a couple of math defines
  Remove unnecessary inclusions of [sys/]time.h
  lavf: remove unnecessary inclusions of unistd.h
  bfin: libswscale: add const where appropriate to fix warnings
  bfin: libswscale: remove unnecessary #includes
  udp: Properly check for invalid sockets
  tcp: Check the return value from getsockopt
  network: Use av_strerror for getting error messages
  udp: Properly print error from getnameinfo
  mmst: Use AVUNERROR() to convert error codes to the right range for strerror
  network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
  rtmp: Reduce the number of idle posts sent by sleeping 50ms

Conflicts:
	Changelog
	configure
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dct-test.c
	libavcodec/version.h
	libavformat/riff.c
	libavformat/udp.c
	libavutil/Makefile
	libswscale/bfin/yuv2rgb_bfin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 20:47:46 +02:00
Mans Rullgard 61183b5ab4 av_gettime: support Win32 without gettimeofday()
Based on patch by Ronald S. Bultje.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Mans Rullgard 980f81d961 Use av_gettime() in various places
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Mans Rullgard ae0a301668 Move av_gettime() to libavutil
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Michael Niedermayer bc210bfca6 log: flip highlight bit for codec & muxer layer
This way the encoder/muxer side is bold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 17:22:18 +02:00
Janne Grunau a2b186a188 mathematics.h: remove a couple of math defines
While these defines are not defined by the C standard they are
standardized as X/Open System Interfaces Extension. We use the
appropiate _XOPEN_SOURCE define to make them available. They
seem to be available on all FATE configs since the constants
are used in files where mathematics.h is not included.
2012-06-20 15:45:21 +02:00
Mans Rullgard 6501dcfb5e Remove unnecessary inclusions of [sys/]time.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 11:46:46 +01:00
Michael Niedermayer cabbd271a5 Merge remote-tracking branch 'qatar/master'
* qatar/master: (24 commits)
  flvdec: remove incomplete, disabled seeking code
  mem: add support for _aligned_malloc() as found on Windows
  lavc: Extend the documentation for avcodec_init_packet
  flvdec: remove incomplete, disabled seeking code
  http: replace atoll() with strtoll()
  mpegts: remove unused/incomplete/broken seeking code
  af_amix: allow float planar sample format as input
  af_amix: use AVFloatDSPContext.vector_fmac_scalar()
  float_dsp: add x86-optimized functions for vector_fmac_scalar()
  float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil
  lavr: Add x86-optimized function for flt to s32 conversion
  lavr: Add x86-optimized function for flt to s16 conversion
  lavr: Add x86-optimized functions for s32 to flt conversion
  lavr: Add x86-optimized functions for s32 to s16 conversion
  lavr: Add x86-optimized functions for s16 to flt conversion
  lavr: Add x86-optimized function for s16 to s32 conversion
  rtpenc: Support packetizing iLBC
  rtpdec: Add a depacketizer for iLBC
  Implement the iLBC storage file format
  mov: Support muxing/demuxing iLBC
  ...

Conflicts:
	Changelog
	configure
	libavcodec/avcodec.h
	libavcodec/dsputil.c
	libavcodec/version.h
	libavformat/movenc.c
	libavformat/mpegts.c
	libavformat/version.h
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-19 20:53:27 +02:00
Michael Niedermayer e69263cd01 avutil: add get_category() for the case where one AVClass can have more than 1 category
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-19 17:22:02 +02:00
Michael Niedermayer b76f77ee0d log: swap colors for muxer and codec layer
This way the filters which are semantically closer to the codec layer
have a (subjectively to me) more similar color.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-19 17:13:45 +02:00
Michael Niedermayer 97726e86be x86/intmath: fix type of FASTDIV
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-19 16:20:20 +02:00
Ronald S. Bultje be1a839ca6 mem: add support for _aligned_malloc() as found on Windows
The check uses check_func_header, since this function is
conditionally available depending on the targeted MSVCRT
version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 10:08:00 +03:00
Justin Ruggles 82b2df9790 float_dsp: add x86-optimized functions for vector_fmac_scalar() 2012-06-18 18:01:14 -04:00
Justin Ruggles cb5042d02c float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil 2012-06-18 18:01:14 -04:00
Michael Niedermayer 82edf6727f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs
  lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
  Add Dolby/DPLII downmix support to libavresample
  vorbisdec: replace div/mod in loop with a counter
  fate: vorbis: add 5.1 surround test
  rtpenc: Allow requesting H264 RTP packetization mode 0
  configure: Sort the library listings in the help text alphabetically
  dwt: remove variable-length arrays
  RTMPT protocol support
  http: Properly handle chunked transfer-encoding for replies to post data
  http: Fail reading if the connection has gone away
  amr: Mark an array const
  amr: More space cleanup
  rtpenc: Fix memory leaks in the muxer open function

Conflicts:
	Changelog
	configure
	doc/APIchanges
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 20:07:00 +02:00
Michael Niedermayer f87dacb27d libavutil: add a merge sort.
compared to qsort this is slower but its stable and doesnt have a O(n^2) worst
case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 18:40:02 +02:00
Michael Niedermayer 096db654af qsort doxy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 18:39:35 +02:00
Michael Niedermayer 88f87ebaa3 qsort: add some forgotten ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 18:39:17 +02:00
John Stebbins 3971be0eb5 Add Dolby/DPLII downmix support to libavresample
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-06-18 10:55:00 -04:00
Michael Niedermayer 3a0a2f33a6 libavutil: add AV_QSORT()
about 2-5 times faster than gnu libcs qsort()
And should be 100% binary identical across platforms.

I will bump the version once the API is certainly stable and
everyone is happy with the API.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 16:32:31 +02:00
Michael Niedermayer 5015c37b7d attributes: move av_restrict fallback from internal to attributes
This should fix --enable-hardcoded-tables

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-17 18:05:31 +02:00
Michael Niedermayer bc4da77b08 lavu/internal: define av_restrict if it has not been defined by config.h
This can happen if a application doesnt use ffmpegs configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-17 04:48:57 +02:00
J. Bohl fbed9317ff enable C99-external_inline for icl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-17 03:46:19 +02:00
Giorgio Vazzana c78cf00bd8 md5: consistently use uint32_t instead of unsigned int
Basically to make code clearer and adherent to the
standard. RFC 1321, on page 2 states

Let the symbol "+" denote addition of words (i.e., modulo-2^32
addition). Let X <<< s denote the 32-bit value obtained by circularly
shifting (rotating) X left by s bit positions.

on page 3, section 3.3 states:

A four-word buffer (A,B,C,D) is used to compute the message digest.
Here each of A, B, C, D is a 32-bit register.

so the algorithm needs to work with integers that are exactly 32bits
in length. And indeed in struct AVMD5 the MD buffer is declared as
"uint32_t ABCD[4];", while in the function that performs the block
transformation the state variables were "unsigned int"s. On
architectures where sizeof(unsigned int) != sizeof(uint32_t) this
could be a problem, although I can't name such an architecture from
the top of my head.
On a side note, both the reference implementation in RFC 1321 and the
gnulib implementation (used by md5sum program on GNU systems) use
uint32_t in the transform function.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-16 12:47:46 +02:00
Michael Niedermayer cd65cd8c5a revert "extern inline" usage
as it breaks ICC:
libavcodec/libavcodec.a(snowenc.o): In function `encode_q_branch':
/home/fate/x86_64-linux-gnu-icc-2011.4.191/src/libavcodec/snowenc.c:405: undefined reference to `ff_epzs_motion_search'
/home/fate/x86_64-linux-gnu-icc-2011.4.191/src/libavcodec/snowenc.c:414: undefined reference to `ff_get_mb_score'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-15 10:29:13 +02:00
J. Bohl 0719e44b58 new attribute "extern inline" (fixing linker error with ff_get_mb_score and ff_get_mb_score)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-15 03:14:07 +02:00
Nicolas George 69bf775e9f bprint: implement vsnprintf for win32. 2012-06-14 13:54:00 +02:00
Michael Niedermayer 2942431a0f arm/intmath: disable av_clip_uintp2_arm with config_small
The code otherwise breaks compilation (gcc 4.5 tested but probably any compiler)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-12 23:05:47 +02:00
Stefano Sabatini 359abb18cf lavu/error: add av_make_error_string() and av_err2str() convenience utilities
These functions are modeled after the corresponding utilities in
libavutil/timestamp.h.
2012-06-11 23:57:01 +02:00
Stefano Sabatini 5683de00e9 lavu/error: fix sign error in av_sterror() error code
The value returned by strerror_r may be positive depending on the system,
so it is necessary to use AVERROR() in order to get a negative
number. This way the successive negative check will not fail, and the
function will print a meaningful error message on the buffer.
2012-06-11 23:56:31 +02:00
Stefano Sabatini 4299fd23d3 lavu/error: use a table to store error codes and strings, add test
The table is mostly useful to enumerate the available AVERROR* in the
test output.
2012-06-11 23:35:32 +02:00
Stefano Sabatini 3ecaba677e tests/parseutils: change test to make it platform independent
Make the test independent from the actual error string used to describe a
certain error code.
2012-06-11 23:35:31 +02:00
Nedeljko Babic 3827a86eac Optimization of AMR NB and WB decoders for MIPS
AMR NB and WB decoders are optimized for MIPS architecture.
Appropriate Makefiles are changed accordingly.

Cnfigure script is changed in order to support optimizations.
 Optimizations are enabled by default when compiling is done for
  mips architecture.
 Appropriate cflags are automatically set.
 Support for several mips CPUs is added in configure script.

New ffmpeg options are added for disabling optimizations.

The FFMPEG option --disable-mipsfpu disables MIPS floating point
 optimizations.
The FFMPEG option --disable-mips32r2 disables MIPS32R2
 optimizations.
The FFMPEG option --disable-mipsdspr1 disables MIPS DSP ASE R1
 optimizations.
The FFMPEG option --disable-mipsdspr2 disables MIPS DSP ASE R2
 optimizations.

Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Reviewed-by: Vitor Sessak <vitor1001@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-11 21:12:39 +02:00