1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-03 09:49:58 +02:00
Commit Graph

1982 Commits

Author SHA1 Message Date
Ronald S. Bultje
a4d71eb5c3 random_seed: Only read /dev/*random if we have unistd.h
unistd.h is used for open/read/close, but if this header does not
exist, there's probably no use in trying to open /dev/*random
at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 18:41:20 +02:00
Stefano Sabatini
cf5629c064 lavu/opt: reindent after last commit 2012-09-07 09:59:12 +02:00
Michael Niedermayer
40112e7b35 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Allow setting the ld parameter from the config file
  x86: dsputil: Do not redundantly check for CPU caps before calling init funcs
  configure: Disable some warnings in MSVC
  x86: vp56: cmov version of vp56_rac_get_prob requires inline asm
  avopt: fix examples to match the same style about default values as the actual code.
  configure: Add support for MSVC cl.exe/link.exe
  lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.

Conflicts:
	libavutil/opt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-06 16:23:17 +02:00
Michael Niedermayer
2bb62455c8 Revert "lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime."
This reverts commit ba53720280.
A better implementation has been commited by the same author to qatar

Conflicts:

	configure

Found-by: jamal <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-06 16:14:34 +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
42e63ec8dc avopt: fix examples to match the same style about default values as the actual code.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-05 20:09:47 +03:00
Michael Niedermayer
7666828c44 avopt: fix examples to match the same style about default values as the actual code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 18:40:21 +02:00
Stefano Sabatini
5666a1b270 lavu/opt: support NULL and special "none" values for size and pixel format options
Allow to specify NULL values explicitly, thus overriding the default
values set in the context.
2012-09-05 16:08:06 +02:00
Ronald S. Bultje
4fa661a857 lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-05 17:07:30 +03:00
Michael Niedermayer
b21b5b04cc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: eamad: Add missing dependency on mpegvideo code
  build: utvideoenc: Add missing dependency on Huffman code
  avopt: Reorder the default_val struct, making i64 the first field

Conflicts:
	configure
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 15:02:17 +02:00
Michael Niedermayer
8510150f48 Merge commit '21bc44038491e525335ad763883b0288402ff6a0'
* commit '21bc44038491e525335ad763883b0288402ff6a0':
  avopt: Explicitly store rational option defaults in .dbl

Conflicts:
	libavfilter/buffersrc.c
	libavfilter/vsrc_testsrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:52:52 +02:00
Michael Niedermayer
d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Michael Niedermayer
99de3df3d3 Merge commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078'
* commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078':
  avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Conflicts:
	libavcodec/libvpxenc.c
	libavcodec/options_table.h
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:09:09 +02:00
Michael Niedermayer
d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Martin Storsjö
686a329395 avopt: Reorder the default_val struct, making i64 the first field
Also mention this change in APIchanges.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:16:11 +03:00
Martin Storsjö
21bc440384 avopt: Explicitly store rational option defaults in .dbl
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:55 +03:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer
d83ff76ca0 intreadwrite: Dont evaluate value for AV_W* multiple times.
Evaluating it multiple times, can have side effects and is possibly slow.
So its definitly a bad idea.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-04 21:45:13 +02:00
Michael Niedermayer
9dcc4c30f9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: add support for bdver1 and bdver2 CPU types.
  avio: make avio_close NULL the freed buffer
  pixdesc: cosmetics
  proresenc: Don't free a buffer not owned by the codec
  proresenc: Write the full value in one put_bits call
  adpcmenc: Calculate the IMA_QT predictor without overflow
  x86: Add convenience macros to check for CPU extensions and flags
  x86: h264dsp: drop some unnecessary ifdefs around prototype declarations
  mss12: merge decode_pixel() and decode_top_left_pixel()
  mss12: reduce SliceContext size from 1067 to 164 KB
  mss12: move SliceContexts out of the common context into the codec contexts

Conflicts:
	libavformat/aviobuf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-04 17:04:51 +02:00
Luca Barbato
a684267076 pixdesc: cosmetics 2012-09-04 14:55:31 +02:00
Diego Biurrun
f82c4fb27f x86: Add convenience macros to check for CPU extensions and flags 2012-09-04 01:44:59 +02:00
Carl Eugen Hoyos
a26789cf9f Fix compilation with yasm-0.6.2. 2012-09-01 10:59:16 +02:00
Michael Niedermayer
c617bed34f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MSS1 and MSS2: set final pixel format after common stuff has been initialised
  MSS2 decoder
  configure: handle --disable-asm before check_deps
  x86: Split inline and external assembly #ifdefs
  configure: x86: Separate inline from standalone assembler capabilities
  pktdumper: Use a custom define instead of PATH_MAX for buffers
  pktdumper: Use av_strlcpy instead of strncpy
  pktdumper: Use sizeof(variable) instead of the direct buffer length

Conflicts:
	Changelog
	configure
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/dct-test.c
	libavcodec/imgconvert.c
	libavcodec/mss12.c
	libavcodec/version.h
	libavfilter/x86/gradfun.c
	libswscale/x86/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 13:34:32 +02:00
Michael Niedermayer
98298eb103 Merge commit 'ec36aa69448f20a78d8c4588265022e0b2272ab5'
* commit 'ec36aa69448f20a78d8c4588265022e0b2272ab5':
  x86: Fix linking with some or all of yasm, mmx, optimizations disabled
  configure: Add more fine-grained SSE CPU capabilities flags
  avfilter: x86: Use more precise compile template names
  x86: cosmetics: Comment some #endifs for better readability
  g723_1: add comfort noise generation
  utvideoenc: Switch to dsputils' median prediction
  utvideoenc: Avoid writing into the input picture
  avtools: remove the distinction between func_arg and func2_arg.
  avconv: make the -passlogfile option per-stream.
  avconv: make the -pass option per-stream.
  cmdutils: make -codecs print lossy/lossless flags.
  lavc: add lossy/lossless codec properties.

Conflicts:
	Changelog
	cmdutils.c
	configure
	doc/APIchanges
	ffmpeg.h
	ffmpeg_opt.c
	ffprobe.c
	libavcodec/codec_desc.c
	libavcodec/g723_1.c
	libavcodec/utvideoenc.c
	libavcodec/version.h
	libavcodec/x86/mpegaudiodec.c
	libavcodec/x86/rv40dsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 13:01:30 +02:00
Diego Biurrun
17337f54c0 x86: Split inline and external assembly #ifdefs 2012-08-31 01:53:25 +02:00
Diego Biurrun
a886b279a0 x86: cosmetics: Comment some #endifs for better readability 2012-08-30 18:50:33 +02:00
Ronald S. Bultje
ba53720280 lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-28 17:52:03 +02:00
Michael Niedermayer
17106a7c90 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  audio_frame_queue: Clean up ff_af_queue_log_state debug function
  dwt: Remove unused code.
  cavs: convert cavsdata.h to a .c file
  cavs: Move inline functions only used in one file out of the header
  cavs: Move data tables used in only one place to that file
  fate: Add a single symbol Ut Video decoder test
  vf_hqdn3d: x86 asm
  vf_hqdn3d: support 16bit colordepth
  avconv: prefer user-forced input framerate when choosing output framerate

Conflicts:
	ffmpeg.c
	libavcodec/audio_frame_queue.c
	libavcodec/dwt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-26 22:40:02 +02:00
Loren Merritt
7a1944b907 vf_hqdn3d: x86 asm
13% faster on penryn, 16% on sandybridge, 15% on bulldozer
Not simd; a compiler should have generated this, but gcc didn't.
2012-08-26 10:49:14 +00:00
Michael Niedermayer
15a0fb58a3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  utvideodec: Fix single symbol mode decoding
  truespeech: drop useless casts
  libavcodec: drop bogus dependencies from mpc[78] and qdm2
  mpegaudio: move ff_mpa_enwindow to a separate file
  AVOptions: store defaults for INT64 options in int64 union member.

Conflicts:
	libavcodec/Makefile
	libavfilter/af_asyncts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-24 15:00:39 +02:00
Michael Niedermayer
bec180e112 Merge commit 'a1bcc76e6036e78f25cbb7323c145056cfca9d93'
* commit 'a1bcc76e6036e78f25cbb7323c145056cfca9d93': (21 commits)
  cmdutils: fix a memleak when specifying an option twice.
  x86: mpegvideo: more sensible names for optimization file and init function
  x86: mpegvideoenc: Split optimizations off into a separate file
  dnxhdenc: x86: more sensible names for optimization file and init function
  svq1/svq3: Move common code out of SVQ1 decoder-specific file
  dirac: add Comments and references to the standard
  lavr: x86: optimized 6-channel flt to fltp conversion
  lavr: x86: optimized 2-channel flt to fltp conversion
  lavr: x86: optimized 6-channel flt to s16p conversion
  lavr: x86: optimized 2-channel flt to s16p conversion
  lavr: x86: optimized 6-channel s16 to fltp conversion
  lavr: x86: optimized 2-channel s16 to fltp conversion
  lavr: x86: optimized 6-channel s16 to s16p conversion
  lavr: x86: optimized 2-channel s16 to s16p conversion
  lavr: x86: optimized 2-channel fltp to flt conversion
  lavr: x86: optimized 6-channel fltp to s16 conversion
  lavr: x86: optimized 2-channel fltp to s16 conversion
  lavr: x86: optimized 6-channel s16p to flt conversion
  lavr: x86: optimized 2-channel s16p to flt conversion
  lavr: x86: optimized 6-channel s16p to s16 conversion
  ...

Conflicts:
	libavcodec/dirac.c
	libavcodec/mpegvideo.h
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-24 14:30:40 +02:00
Anton Khirnov
4d7adec8bd AVOptions: store defaults for INT64 options in int64 union member.
Double does not have enough precision to represent all int64 numbers
exactly.
2012-08-24 11:25:06 +02:00
Justin Ruggles
6092dafb5a lavr: x86: optimized 6-channel s16 to fltp conversion 2012-08-23 20:10:57 -04:00
Mans Rullgard
5b170c0bea x86: remove FASTDIV inline asm
GCC 4.3 and later do the right thing with the plain C code.  Earlier
versions in 32-bit mode generate one extra instruction, needlessly
zeroing what would be the high half of the shifted value.  At least
two gcc configurations miscompile the inline asm in some situations.

In 64-bit mode, all gcc versions generate imul r64, r64 followed by
shr.  On Intel i7 and later, this imul is faster 32-bit mul.  On
older Intel and all AMD, it is slightly slower.  On Atom it is much
slower.

Considering where the FASTDIV macro is used, any overall negative
performance impact of this change should be negligible.  If anyone
cares, they should file a bug against gcc and get the instruction
selection fixed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-22 14:29:10 +01:00
Michael Niedermayer
3699960690 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: x86: Only compile mpegvideo optimizations when necessary
  configure: Drop fastdiv option
  build: Make the E-AC-3 encoder select the AC-3 encoder
  fate: flac: Only run tests requiring samples when samples are available

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-22 14:37:03 +02:00
Diego Biurrun
66baa45801 configure: Drop fastdiv option
There is no point in having the user disable any fastdiv macros.
Besides the condition implementation was broken and only disabled
the C implementation, but no platform specific assembly versions.
2012-08-22 01:02:18 +02:00
Michael Niedermayer
4b529edff8 deprecate av_parse_cpu_flags
This function is problematic in several ways, its also quite
unpredictable which flags it ends up turning on

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 22:04:46 +02:00
Michael Niedermayer
540bd5a95f av_parse_cpu_caps: add "mmxext" as alias for mmx2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 22:04:46 +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ö
33e112847d Add more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 10:49:54 +03:00
Martin Storsjö
70766c2182 Add some more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 23:48:48 +03: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
Michael Niedermayer
7427d1ca4a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  g723.1: simplify scale_vector()
  g723.1: simplify normalize_bits()
  vda: cosmetics: fix Doxygen comment formatting
  vda: better frame allocation
  vda: Merge implementation into one file
  vda: support synchronous decoding
  vda: Reuse the bitstream buffer and reallocate it only if needed
  build: Factor out mpegvideo encoding dependencies to CONFIG_MPEGVIDEOENC
  avprobe: Include libm.h for the log2 fallback
  proresenc: use the edge emulation buffer
  rtmp: handle bytes read reports
  configure: Fix typo in mpeg2video/svq1 decoder dependency declaration
  Use log2(x) instead of log(x) / log(2)
  x86: swscale: fix fragile memory accesses
  x86: swscale: remove disabled code
  x86: yadif: fix asm with suncc
  x86: cabac: allow building with suncc
  x86: mlpdsp: avoid taking address of void
  ARM: intmath: use native-size return types for clipping functions

Conflicts:
	configure
	ffprobe.c
	libavcodec/Makefile
	libavcodec/g723_1.c
	libavcodec/v210dec.h
	libavcodec/vda.h
	libavcodec/vda_h264.c
	libavcodec/x86/cabac.h
	libavfilter/x86/yadif_template.c
	libswscale/x86/rgb2rgb_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-14 15:34:39 +02:00
Mans Rullgard
87fa05a0da ARM: intmath: use native-size return types for clipping functions
This avoids having the compiler redundantly mask the values to
the smaller size.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-13 14:51:52 +01:00
Michael Niedermayer
d8c3170c9f Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  g723.1: do not pass large structs by value
  g723.1: do not bounce intermediate values via memory
  g723.1: declare a variable in the block it is used
  g723.1: avoid saving/restoring excitation
  g723.1: avoid unnecessary memcpy() in residual_interp()
  g723.1: make postfilter write directly to output buffer
  g723.1: drop unnecessary variable buf_ptr in formant_postfilter()
  g723.1: make scale_vector() output to a separate buffer
  g723.1: make autocorr_max() work on an arbitrary buffer
  g723.1: do not needlessly use int64_t
  g723.1: use saturating addition functions
  g723.1: optimise scale_vector()
  g723.1: remove useless uses of MUL64()
  g723.1: remove unnecessary argument 'shift' from dot_product()
  g723.1: deobfuscate "(x << 4) - x" to "15 * x"
  celp: optimise ff_celp_lp_synthesis_filter()
  libavutil: add saturating addition functions
  cllc: Implement ARGB support
  cllc: Add support for QRGB
  cllc: Rename some funcs to represent what they actually do
  ...

Conflicts:
	LICENSE
	libavcodec/g723_1.c
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-13 14:38:43 +02:00
Mans Rullgard
6c4975eaaf libavutil: add saturating addition functions
Fixed-point audio codecs often use saturating arithmetic, and
special instructions for these operations are common.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-13 01:03:10 +01:00
Stefano Sabatini
a25346e65c lavu/opt.h: add AV_OPT_FLAG_FILTERING_PARAM macro 2012-08-12 23:52:55 +02:00