Commit Graph

1794 Commits

Author SHA1 Message Date
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
Michael Niedermayer 66531c75d3 random_seed: rewrite generic code.
The new code is faster and reuses the previous state in case of
multiple calls. For testing the iterations are reduced and several
entropy sources are disabled.
Its based on SHA-1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-11 12:19:11 +02:00
Michael Niedermayer 3630a07513 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libmp3lame: add missing layout terminator
  avconv: multithreaded demuxing.
  Bump lavu minor and add an APIChanges entry for audioconvert functions.
  audioconvert: add a function for extracting the channel with the given index
  audioconvert: add a function for getting the name of a single channel.
  audioconvert: add a function for getting channel's index in layout
  audioconvert: use av_popcount64 in av_get_channel_layout_nb_channels
  vf_libopencv: add missing headers.
  iac: add missing dependency

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-10 21:34:15 +02:00
Anton Khirnov b0f0dfc485 Bump lavu minor and add an APIChanges entry for audioconvert functions. 2012-06-10 08:04:01 +02:00
Anton Khirnov 59d58b3390 audioconvert: add a function for extracting the channel with the given index 2012-06-10 08:03:45 +02:00
Anton Khirnov 5df320e167 audioconvert: add a function for getting the name of a single channel. 2012-06-10 08:03:11 +02:00
Anton Khirnov 406b257de9 audioconvert: add a function for getting channel's index in layout 2012-06-10 08:02:18 +02:00
Anton Khirnov 3596de55fc audioconvert: use av_popcount64 in av_get_channel_layout_nb_channels 2012-06-10 08:02:11 +02:00
Michael Niedermayer 4bfee465e9 bprint-test: avoid z modifier, mingw fails with it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-10 03:49:31 +02:00
Stefano Sabatini 53dfc38452 lavu/timestamp: remove duplicate definition of AV_TS_MAX_STRING_SIZE 2012-06-10 00:37:02 +02:00
Michael Niedermayer 75f8f70221 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: allow cropping to AVCodecContext.width/height
  mov: set AVCodecContext.width/height for h264
  iac: generate codec tables as they are supposed to be
  indeo4: handle frame type 1 properly
  lavu: change versioning script to include all av* prefixed symbols

Conflicts:
	libavcodec/h264.c
	libavutil/libavutil.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 20:30:17 +02:00
Michael Niedermayer b0415287e3 float_dsp.c: Restore author attribution that was removed by libav while moving code to libavutil
Original code comes from:
commit eb4825b5d4
Author: Loren Merritt <lorenm@u.washington.edu>
Date:   Thu Aug 10 19:06:25 2006 +0000

    sse and 3dnow implementations of float->int conversion and mdct windowing.
    15% faster vorbis.

and

commit 0bde73d907
Author: Michael Niedermayer <michaelni@gmx.at>
Date:   Tue May 17 19:02:43 2005 +0000

    Vorbis decoder by (Balatoni Denes | dbalatoni programozo hu)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 16:09:47 +02:00
Michael Niedermayer f0313e9022 x86/float_dsp.asm: restore author attribution
The attribution was removed by libav while moving the code to libavutil

The original code is from
commit eb4825b5d4
Author: Loren Merritt <lorenm@u.washington.edu>
Date:   Thu Aug 10 19:06:25 2006 +0000

    sse and 3dnow implementations of float->int conversion and mdct windowing.
    15% faster vorbis.

and

commit 069720565c
Author: Loren Merritt <lorenm@u.washington.edu>
Date:   Fri Aug 11 18:19:37 2006 +0000

    vorbis simd tweaks

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 16:09:11 +02:00
Michael Niedermayer 04e2ac4749 libavutil.v: add avpriv prefix
This should fix the fate failure
http://fate.ffmpeg.org/log.cgi?time=20120609002213&log=compile&slot=x86_64-archlinux-gcc-enableshared

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 02:51:02 +02:00
Michael Niedermayer 7e22514d98 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float_dsp: ppc: add a separate header for Altivec function prototypes
  ARM: fix float_dsp breakage from d5a7229
  Add a float DSP framework to libavutil
  PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil
  ARM: Move asm.S from libavcodec to libavutil
  vc1dsp: mark put/avg_vc1_mspel_mc() always_inline

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-08 23:59:09 +02:00