Commit Graph

100 Commits

Author SHA1 Message Date
Michael Niedermayer
de31814ab0 Merge commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6'
* commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6':
  avio: introduce avio_closep
  mpegtsenc: set muxing type notification to verbose
  vc1dec: Use correct spelling of "opposite"
  a64multienc: change mc_frame_counter to unsigned
  arm: call arm-specific rv34dsp init functions under if (ARCH_ARM)
  svq1: Drop a bunch of useless parentheses
  parseutils-test: do not print numerical error codes
  svq1: K&R formatting cosmetics

Conflicts:
	doc/APIchanges
	libavcodec/svq1dec.c
	libavcodec/svq1enc.c
	libavformat/version.h
	libavutil/parseutils.c
	tests/ref/fate/parseutils

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 14:03:12 +02:00
Mans Rullgard
41e46a5fba parseutils-test: do not print numerical error codes
The error codes differ between systems so printing the value makes
the fate test fail on some systems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-10 13:33:45 +01:00
Michael Niedermayer
79d30321a2 Merge remote-tracking branch 'qatar/master'
* 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>
2012-10-07 11:28:38 +02:00
Mans Rullgard
6221e2478c parseutils: fix parsing of invalid alpha values
An alpha specifier outside the valid range results in a conversion from
double to long with undefined result.  Range-checking the double and
only converting it after it passes avoids this.

Fixes fate-parseutils errors on some systems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-06 17:08:29 +01:00
Diego Biurrun
c010fce6c9 parseutils-test: Drop random colors from parsing test
This guarantees stable output for comparing test results.
2012-10-06 09:21:54 +02:00
Stefano Sabatini
1ad63ff14a fate: add av_small_strptime() test to fate-parseutils 2012-09-17 12:46:55 +02:00
Stefano Sabatini
85c93d90df lavu/parseutils: fix av_small_strptime() whitespace directive parsing
According to POSIX, strptime() should consume whitespaces in the date
string everytime a whitespace conversion specification is found in the
date format specification. Make av_small_strptime() conform with this
behavior.

In particular, should fix trac ticket #1739.
2012-09-17 12:45:56 +02:00
Stefano Sabatini
29e972f67c lavu/parseutils: add av_small_strptime()
Make internal small_strptime() function public, and use it in place of
strptime().
This allows to avoid a dependency on strptime() on systems which do not
support it.

In particular, fix trac ticket #992.
2012-09-06 00:40:01 +02:00
Stefano Sabatini
79dcd58d83 lavu/parseutils: make small_strptime() return a (non const) char *
This is consistent with the standard definition of strptime().
2012-09-06 00:40:01 +02:00
Michael Niedermayer
c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Martin Storsjö
1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Nicolas George
5a9d6993cb parseutils: ignore digits below the microsecond.
Accept 1.1234567 as simply 1.123456 instead of rejecting it.
The rounding is towards 0, which is acceptable and much simpler.
2012-07-10 22:29:08 +02:00
Paul B Mahol
61123fb8f7 parseutils: fix sorting of colors
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-06-28 17:15:08 +00: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
6501dcfb5e Remove unnecessary inclusions of [sys/]time.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 11:46:46 +01: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
Michael Niedermayer
f8b536a786 parseutils: use strings instead of integers for error codes.
error values can differ between platforms.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-09 02:53:42 +02:00
Michael Niedermayer
9501b93241 parseutils: fix ;/, error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-09 02:52:57 +02:00
Nicolas George
3e1d3ebf5e parseutils: replace setenv() by putenv().
putenv() seems to be more portable.
2012-04-27 18:16:04 +02:00
Reimar Döffinger
2b336df3cb parseutils: reliably detect out-of-range alpha.
This should fix the FATE test on ARM (not tested),
but it should also detect alpha values like 2^128
reliably as invalid which would be another out-of-range
case with implementation-dependant behaviour.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-24 21:28:24 +02:00
Nicolas George
9b84f8a987 parseutils: add av_parse_time() test. 2012-04-23 14:39:01 +02:00
Nicolas George
43b7068070 parseutils: make av_parse_time() check for failure.
Until now, av_parse_time() would accept "1:00" as "1"
and silently ignore ":00".

This patch also includes a few cosmetic changes.
2012-04-23 14:39:01 +02:00
Nicolas George
9246896f77 parseutils: add FATE test. 2012-04-23 14:39:01 +02:00
Nicolas George
b0e7321cf0 parseutils: include errors in test output. 2012-04-17 11:03:29 +02:00
Michael Niedermayer
d40ff29cac Merge remote-tracking branch 'qatar/master'
* qatar/master:
  asf: only set index_read if the index contained entries.
  cabac: add overread protection to BRANCHLESS_GET_CABAC().
  cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
  cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
  cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
  h264: add overread protection to get_cabac_bypass_sign_x86().
  h264: reindent get_cabac_bypass_sign_x86().
  h264: use struct offsets in get_cabac_bypass_sign_x86().
  h264: fix overreads in cabac reader.
  wmall: fix seeking.
  lagarith: fix buffer overreads.
  dvdec: drop unnecessary dv_tablegen.h #include
  build: fix doc generation errors in parallel builds
  Replace memset(0) by zero initializations.
  faandct: Remove FAAN_POSTSCALE define and related code.
  dvenc: print allowed profiles if the video doesn't conform to any of them.
  avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
  FATE: add a test for vp8 with changing frame size.
  fate: add kgv1 fate test.
  oggdec: calculate correct timestamps in Ogg/FLAC

Conflicts:
	libavcodec/4xm.c
	libavcodec/cook.c
	libavcodec/dvdata.c
	libavcodec/dvdsubdec.c
	libavcodec/lagarith.c
	libavcodec/lagarithrac.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 04:11:10 +02:00
Diego Biurrun
a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Stefano Sabatini
70ffda3217 lavu: introduce av_parse_ratio() and use it in ffmpeg and lavfi/aspect
Factorize code and provide ratio parsing consistency.
2012-02-06 11:30:54 +01:00
Michael Niedermayer
8709ba907a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegaudiodec: Don't use a nonexistent log context for av_dlog
  avformat: Accept the ISO8601 separate format as input, too
  avformat: Interpret times in ff_iso8601_to_unix_time as UTC
  avutil: Add av_timegm as a public function
  cinepak: Add another special case so that it can handle the following file:
  lagarith: add some RGBA decoding support
  lagarith: Add correct line prediction for RGB

Conflicts:
	doc/APIchanges
	libavcodec/cinepak.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-17 02:44:33 +01:00
Martin Storsjö
627067118c avutil: Add av_timegm as a public function
This is useful, since the normal timegm function isn't a standard
function (requiring _BSD_SOURCE or _SVID_SOURCE on glibc to
be visible, and not available on e.g. windows). The widely available
function mktime uses the local time zone, which requires ugly
workarounds to handle UTC time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 11:22:41 +02:00
Reimar Döffinger
bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Reimar Döffinger
bd09fecce2 color_table array should be const.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-05 15:37:01 +01:00
Reimar Döffinger
96949dafcc Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-03 19:25:26 +01:00
Michael Niedermayer
988f585fcb Merge remote-tracking branch 'qatar/master'
* qatar/master: (44 commits)
  replacement Indeo 3 decoder
  gsm demuxer: do not allocate packet twice.
  flvenc: use first packet delay as global delay.
  ac3enc: doxygen update.
  imc: return error codes instead of 0 for error conditions.
  imc: return meaningful error codes instead of -1
  imc: do not set channel layout for stereo
  imc: validate channel count
  imc: check for ff_fft_init() failure
  imc: check output buffer size before decoding
  imc: use DSPContext.bswap16_buf() to byte-swap packet data
  rtsp: add allowed_media_types option
  libgsm: add flush function to reset the decoder state when seeking
  libgsm: simplify decoding by using a loop
  gsm: log error message when packet is too small
  libgsmdec: do not needlessly set *data_size to 0
  gsmdec: do not needlessly set *data_size to 0
  gsmdec: add flush function to reset the decoder state when seeking
  libgsmdec: check output buffer size before decoding
  gsmdec: log error message when output buffer is too small.
  ...

Conflicts:
	Changelog
	ffplay.c
	libavcodec/indeo3.c
	libavcodec/mjpeg_parser.c
	libavcodec/vp3.c
	libavformat/cutils.c
	libavformat/id3v2.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:16:26 +01:00
Diego Biurrun
f36b390275 Replace some forgotten FFmpeg references by Libav. 2011-11-02 10:42:55 +01:00
Michael Niedermayer
fe87b2e79c parseutils: fix various cast qualifier warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-17 22:57:48 +02:00
Stefano Sabatini
9c2651ab44 parseutils: add some documentation for small_strptime() 2011-07-23 17:01:28 +02:00
Michael Niedermayer
5dc6bd86f0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in missing hashes and dates.
  Add an APIChanges entry and bump minor versions for recent changes.
  ffmpeg: print the low bitrate warning after the codec is openend.
  doxygen: Move function documentation into the macro generating the function.
  doxygen: Make sure parameter names match between .c and .h files.
  h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
  H.264: Add more x86 assembly for 10-bit H.264 predict functions
  lavf: fix invalid reads in avformat_find_stream_info()
  cmdutils: replace opt_default with opt_default2() and remove set_context_opts
  ffmpeg: use new avcodec_open2 and avformat_find_stream_info API.
  ffplay: use new avcodec_open2 and avformat_find_stream_info API.
  cmdutils: store all codec options in one dict instead of video/audio/sub
  ffmpeg: check experimental flag after codec is opened.
  ffmpeg: do not set GLOBAL_HEADER flag in the options context

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/version.h
	libavformat/version.h
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 20:44:58 +02:00
Diego Biurrun
96c1e6d40d doxygen: Make sure parameter names match between .c and .h files. 2011-07-14 04:09:49 +02:00
Michael Niedermayer
976a8b2179 Merge remote-tracking branch 'qatar/master'
* qatar/master: (40 commits)
  H.264: template left MB handling
  H.264: faster fill_decode_caches
  H.264: faster write_back_*
  H.264: faster fill_filter_caches
  H.264: make filter_mb_fast support the case of unavailable top mb
  Do not include log.h in avutil.h
  Do not include pixfmt.h in avutil.h
  Do not include rational.h in avutil.h
  Do not include mathematics.h in avutil.h
  Do not include intfloat_readwrite.h in avutil.h
  Remove return statements following infinite loops without break
  RTSP: Doxygen comment cleanup
  doxygen: Escape '\' in Doxygen documentation.
  md5: cosmetics
  md5: use AV_WL32 to write result
  md5: add fate test
  md5: include correct headers
  md5: fix test program
  doxygen: Drop array size declarations from Doxygen parameter names.
  doxygen: Fix parameter names to match the function prototypes.
  ...

Conflicts:
	libavcodec/x86/dsputil_mmx.c
	libavformat/flvenc.c
	libavformat/oggenc.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-04 00:45:21 +02:00
Mans Rullgard
abc78a5a7c Do not include log.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Mans Rullgard
add41decd9 Remove return statements following infinite loops without break
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:39:07 +01:00
Michael Niedermayer
d552f616a2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  Remove some non-compiling debug messages.
  ffplay: Fix non-compiling debug printf and replace it by av_dlog.
  H264: x86 predict init cosmetics.
  ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder.
  Move E-AC-3 encoder functions to a separate eac3enc.c file.
  ac3enc: remove convenience macro, #define DEBUG
  ac3enc: remove unused #define
  vc1: re-initialize tables after width/height change.
  APIchanges: fill-in git commit hash for av_get_bytes_per_sample() addition
  samplefmt: add av_get_bytes_per_sample()
  iirfilter: fix biquad filter coefficients.
  swscale: remove duplicate conversion routine in swScale().
  swscale: add yuv2planar/packed function typedefs.
  swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers.
  swscale: reindent x86 init code.
  swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
  swscale: cosmetics.
  swscale: remove alp/chr/lumSrcOffset.
  swscale: un-special-case yuv2yuvX16_c().
  shorten: Remove stray DEBUG #define and corresponding av_dlog statement.
  ...

Conflicts:
	doc/APIchanges
	libavcodec/ac3enc.c
	libavutil/avutil.h
	libavutil/samplefmt.c
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-08 05:25:28 +02:00
Diego Biurrun
dc25d79f49 Drop unnecessary directory prefixes from #include directives. 2011-06-07 10:31:26 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Anton Khirnov
1b98107c8d Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit ab0287fcbd)
2011-02-18 19:52:33 +01:00
Stefano Sabatini
40c3fe2c08 Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f6c7375a17)
2011-02-18 19:52:30 +01:00
Anton Khirnov
ab0287fcbd Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-17 15:35:18 +01:00
Stefano Sabatini
f6c7375a17 Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Reinhard Tartler
7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00