Commit Graph

1425 Commits

Author SHA1 Message Date
Stefano Sabatini 424655f749 lavu: update minor number and add APIchanges entry after recent av_strtok() addition 2011-10-18 18:46:52 +02:00
Stefano Sabatini b35e9e19e9 lavu: add av_strtok()
The function strtok_r() is part of the POSIX.1 specification, but is not
available on some platforms. We provide an internal implementation, so we
do not need to rely on a platform implementation.
2011-10-18 18:21:03 +02:00
Michael Niedermayer fae714a9fb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: add presets
  rtsp: Expose the flag options via private AVOptions for sdp and rtp, too
  rtsp: Make the rtsp flags avoptions set via a define
  rtpenc: Set a default video codec
  avoptions: Fix av_opt_flag_is_set
  rtp: Fix ff_rtp_get_payload_type
  doc: Update the documentation on setting options for RTSP
  rtsp: Remove the separate filter_source variable
  rtsp: Accept options via private avoptions instead of URL options
  rtsp: Simplify AVOption definitions
  rtsp: Merge the AVOption lists
  lavfi: port libmpcodecs delogo filter
  lavfi: port boxblur filter from libmpcodecs
  lavfi: add negate filter
  lavfi: add LUT (LookUp Table) generic filters
  AVOptions: don't segfault on NULL parameter in av_set_options_string()
  avio: Check for invalid buffer length.
  mpegenc/mpegtsenc: add muxrate private options.
  lavf: deprecate AVFormatContext.file_size
  mov: add support for TV metadata atoms tves, tvsn and stik

Conflicts:
	Changelog
	doc/filters.texi
	doc/protocols.texi
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/internal.h
	libavfilter/vf_boxblur.c
	libavfilter/vf_delogo.c
	libavfilter/vf_lut.c
	libavformat/mpegtsenc.c
	libavformat/utils.c
	libavformat/version.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-18 01:54:40 +02: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
Michael Niedermayer 8aed90958d dict: fix assignment discards qualifiers from pointer target type warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-17 22:56:13 +02:00
Michael Niedermayer 68eb35b886 avstring: fix return discards qualifiers from pointer target type.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-17 22:55:00 +02:00
Martin Storsjö 299234a0a9 avoptions: Fix av_opt_flag_is_set
With the changes in 3b3ea34655,
"Remove all uses of deprecated AVOptions API", av_opt_flag_is_set
was broken, since it now uses av_opt_find, which doesn't return
named constants unless a unit to look for the constant in is given.

This broke enabling LATM encapsulated AAC output in RTP.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 21:35:41 +03:00
Anton Khirnov 85afbb1d00 AVOptions: don't segfault on NULL parameter in av_set_options_string() 2011-10-17 10:42:21 +02:00
Michael Niedermayer fd6af5375b av_tempfile: dont try the current directory with mkstemp() unless we are on windows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 22:32:41 +02:00
Michael Niedermayer e8e13358ad av_tempfile: change mode for fallback to 0600 to match mkstemp()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 22:13:20 +02:00
Michael Niedermayer 74dbb5388e av_tempfile: Pass int log_offset, void *log_ctx
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 21:51:28 +02:00
Michael Niedermayer 482aabd59a av_tempfile: fix error codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 21:51:28 +02:00
Michael Niedermayer 4105335c98 av_tempfile: use O_EXCL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 21:51:28 +02:00
Michael Niedermayer 797c2ef970 av_tempfile: try tempnam(NULL) first
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 21:51:28 +02:00
Michael Niedermayer 5746f91036 av_tempfile: handle missing O_BINARY
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 17:12:37 +02:00
Michael Niedermayer c9833fc33a av_tempfile: fix alloc type for !HAVE_MKSTEMP
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 17:12:37 +02:00
Michael Niedermayer 885158c887 Move av_tempfile() into libavutil, it is a generically usefull thing and its small.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-16 17:12:37 +02:00
Michael Niedermayer da31e537c4 opt: handle AV_OPT_TYPE_CONST too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-14 02:18:55 +02:00
Nicolas George 40963ea9e9 eval: add mathematical constants (PI, E, PHI).
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 16:50:20 +02:00
Michael Niedermayer f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffplay.c
	ffprobe.c
	libavcodec/ac3dec.c
	libavcodec/h264.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavfilter/vf_drawtext.c
	libavformat/flvdec.c
	libavformat/mpegtsenc.c
	libavformat/options.c
	libavutil/avutil.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Jindrich Makovicka 67bbf07fb5 log.h: make AVClass a named struct
'struct AVClass' is used in the code since
641c7afe3c, but AVClass is typedeffed as
an anonymous struct.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-12 23:39:31 +02:00
Anton Khirnov 492bd1a28f AVOptions: bump minor and add APIchanges entry. 2011-10-12 16:55:56 +02:00
Anton Khirnov 145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Anton Khirnov 3b3ea34655 Remove all uses of deprecated AVOptions API. 2011-10-12 16:51:16 +02:00
Anton Khirnov 8c5dcaad13 AVOptions: add av_opt_next, deprecate av_next_option.
Just for naming consistency, no functional changes.
2011-10-12 16:51:16 +02:00
Anton Khirnov dca055be3a AVOptions: add functions for evaluating option strings. 2011-10-12 16:51:16 +02:00
Anton Khirnov 059a037fbd AVOptions: split get_number().
Split actual writing to read_number() in the same way as write_number().
Allows set_string_number() to write to a caller-provided destination.
2011-10-12 16:51:16 +02:00
Anton Khirnov 41d9d51a72 AVOptions: add av_opt_get*, deprecate av_get*.
New functions can get values from child objects, properly report error
codes and have consistent naming and signatures.
2011-10-12 16:51:16 +02:00
Anton Khirnov dac66da63d AVOptions: add av_opt_set*().
Deprecate av_set_*

New functions support setting values on children, return error codes
instead of options and have consistent naming and signatures.
2011-10-12 16:51:16 +02:00
Anton Khirnov 641c7afe3c AVOptions: add new API for enumerating children.
This will allow the caller to enumerate child contexts in a generic way
and since the API is recursive, it also allows for deeper nesting (e.g.
AVFormatContext->AVIOContext->URLContext)

This will also allow the new setting/reading API to transparently apply
to children contexts.
2011-10-12 16:51:16 +02:00
Michael Niedermayer b81f8880e0 Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  fix AC3ENC_OPT_MODE_ON/OFF
  h264: fix HRD parameters parsing
  prores: implement multithreading.
  prores: idct sse2/sse4 optimizations.
  swscale: use aligned move for storage into temporary buffer.
  prores: extract idct into its own dspcontext and merge with put_pixels.
  h264: fix invalid shifts in init_cavlc_level_tab()
  intfloat_readwrite: fix signed addition overflows
  mov: do not misreport empty stts
  mov: cosmetics, fix for and if spacing
  id3v2: fix NULL pointer dereference
  mov: read album_artist atom
  mov: fix disc/track numbers and totals
  doc: fix references to obsolete presets directories for avconv/ffmpeg
  flashsv: return more meaningful error value
  flashsv: fix typo in av_log() message
  smacker: validate channels and sample format.
  smacker: check buffer size before reading output size
  smacker: validate number of channels
  smacker: Separate audio flags from sample rates in smacker demuxer.
  ...

Conflicts:
	cmdutils.h
	doc/ffmpeg.texi
	libavcodec/Makefile
	libavcodec/motion_est_template.c
	libavformat/id3v2.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-12 05:40:57 +02:00
Michael Niedermayer fc11927890 mem: fix memalign hack av_realloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-11 22:03:19 +02:00
Michael Niedermayer 96bc6485bc arm: fix av_clipl_int32() asm
Note, the other arm asm code is likely affected too and should be changed as well.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-11 20:25:55 +02:00
Mans Rullgard 88d1e2b2b0 intfloat_readwrite: fix signed addition overflows
These additions might overflow the signed range for large
input values.  Converting to unsigned before the addition
rather than after avoids such undefined behaviour.  The
result under normal two's complement wraparound remains
unchanged.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 14:42:28 +01:00
Michael Niedermayer 41f55277fa Merge remote-tracking branch 'qatar/master'
* qatar/master: (34 commits)
  h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
  error_resilience: fix the check for missing references in ff_er_frame_end() for H264
  4xm: prevent NULL dereference with invalid huffman table
  4xmdemux: prevent use of uninitialized memory
  4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffers
  ptx: check for out of bound reads
  tiffdec: fix out of bound reads/writes
  eacmv: check for out of bound reads
  eacmv: fix potential pointer arithmetic overflows
  adpcm: fix out of bound reads due to integer overflow
  anm: prevent infinite loop
  avsdemux: check for out of bound writes
  avs: check for out of bound reads
  avsdemux: check for corrupted data
  AVOptions: refactor set_number/write_number
  AVOptions: cosmetics, rename static av_set_number2() to write_number().
  AVOptions: cosmetics, move and rename static av_set_number().
  AVOptions: split av_set_string3 into opt type-specific functions
  avidec: fix signed overflow in avi_sync()
  mxfdec: Fix some buffer overreads caused by the misuse of AVPacket related functions.
  ...

Conflicts:
	Changelog
	configure
	libavcodec/ptx.c
	libavcodec/ra144.c
	libavcodec/vaapi_vc1.c
	libavcodec/vc1.c
	libavcodec/version.h
	libavformat/4xm.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-11 03:42:43 +02:00
Anton Khirnov 7bb1807c2d AVOptions: refactor set_number/write_number
write_number() does the actual writing of the supplied
number to destination. Move finding the option and choosing destination
address out of it.
2011-10-10 20:27:31 +02:00
Anton Khirnov cf10095f0b AVOptions: cosmetics, rename static av_set_number2() to write_number(). 2011-10-10 20:27:31 +02:00
Anton Khirnov b003d0be5b AVOptions: cosmetics, move and rename static av_set_number(). 2011-10-10 20:27:31 +02:00
Anton Khirnov c8d787d2ef AVOptions: split av_set_string3 into opt type-specific functions
Also stop attempting to honor the alloc parameter, as things break
horribly in that case.
It will be removed in upcoming successor to av_set_string3.
2011-10-10 20:27:30 +02:00
Michael Niedermayer 0a23067ab4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header
  mpeg124: use sign_extend() function
  ac3dec: use get_sbits() instead of manually sign-extending
  4xm: fix signed overflow
  wmavoice: fix a signed overflow
  mpegvideo_enc: fix a signed overflow
  crc: fix signed overflow
  fate: run avconv with -nostats flag
  avtools: add -v as alias for -loglevel
  avconv: always print stats with AV_LOG_INFO
  doc/avconv: add forgotten output/per-stream info to -filter
  avconv: add -stats option to enable/disable printing encoding progress
  avconv: in output_packet() don't set decoded_data_size for video.
  avconv: remove pointless always true condition
  avconv: factorize common code in transcode_init()
  zmbv: remove memcpy() of decoded frame
  mpeg12enc: use sign_extend() function
  h264pred: use unsigned types for pixel values, fix signed overflows
  h264: fix signed overflows in x*0x01010101 expressions
  h264pred: remove unused variables

Conflicts:
	avconv.c
	tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-10 03:50:58 +02:00
Mans Rullgard 8b19ae0761 crc: fix signed overflow
This fixes a signed overflow from i << 24 when i == 255 by
making i unsigned.  The result of the shift is already
assigned to an variable of unsigned type.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 16:53:31 +01:00
Stefano Sabatini 2b43bfa0c8 lavu: bump micro after gcd(), random(), and hypot() additions in eval 2011-10-09 15:58:10 +02:00
Michael Niedermayer cfabd35d5e pixdesc: fix gbr24p
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-09 02:04:54 +02:00
Michael Niedermayer 085ea85c2e eval: fix () bug in not.
Found-by: Oded Shimon
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-09 02:04:54 +02:00
Themaister a3e11fa43c Start adding pixel definitions for planar rgb. 2011-10-08 23:19:14 +02:00
Michael Niedermayer 1339702540 eval: add gcd()
example: -vf 'scale=256:256,mp=geq=gcd(X\,Y)-2:128:128'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 04:38:17 +02:00
Michael Niedermayer 9e5e086b7e eval:add hypot()
useage example: -vf 'scale=256:256,mp=geq=random(1)/hypot(X-cos(N*0.07)*W/2-W/2\,Y-sin(N*0.09)*H/2-H/2)^2*1000000*sin(N*0.02):128:128'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 04:38:01 +02:00
Michael Niedermayer ac7cda9e14 eval: add random()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 03:13:21 +02:00
Michael Niedermayer 8fd56f7b12 eval: make variables persistent so they can be used between evaluations.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 03:13:21 +02:00
Marton Balint cbfca6225a avutil: bump minor version because of av_get_default_channel_layout type fix
Well, probably an ABI breakage at least for 32bit, but hopefully it will go
unnoticed because the fix happened realtively soon.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 02:53:18 +02:00