1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-11 18:07:56 +02:00
Commit Graph

1429 Commits

Author SHA1 Message Date
Anton Khirnov
f5302e5dcf ffmpeg: deprecate loop_input and loop_output options
They were replaced by (de)muxer private options.
2011-07-08 19:58:19 +02:00
Michael Niedermayer
c3b6cc61e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffserver: remove unused variable.
  Remove unused and outdated TODO file.
  gitignore: Drop individual .d ignore; it is already covered by a wildcard.
  lavf: deprecate AVStream.quality.
  bink: pass Bink version to audio decoder through extradata instead of codec_tag.
  libpostproc: Remove disabled code.
  flashsv: improve some comments and fix some wrong ones
  flashsv: Eliminate redundant variable indirection.
  flashsv: set reference frame type to full frame
  flashsv: replace bitstream description by a link to the specification
  flashsv: convert a debug av_log into av_dlog
  flashsv: simplify condition
  flashsv: return more meaningful error values
  flashsv: cosmetics: break some overly long lines
  flashsv: cosmetics: drop some unnecessary parentheses
  swscale: amend documentation to mention use of native depth for scaling.
  eval: add missing comma to tests.
  eval: fix memleak.
  H.264: make loopfilter bS const where applicable

Conflicts:
	libavcodec/binkaudio.c
	libavformat/bink.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-06 23:57:11 +02:00
Anton Khirnov
5e8d2e337e lavf: deprecate AVStream.quality.
AVStream is no place for it and it's unused outside of ffmpeg anyway.
2011-07-06 20:10:41 +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
0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Michael Niedermayer
cbfdfbe846 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: ac3: update ff_ac3_extract_exponents_neon per 8b7b2d6
  ARM: NEON optimised vector_clip_int32()
  swscale: disable full_chroma_int when converting to non-24/32bpp RGB.
  suggest to use av_get_bytes_per_sample() in av_get_bits_per_sample_format() doxy
  ffmpeg: use av_get_bytes_per_sample() in place of av_get_bits_per_sample_fmt()
  put_bits: remove ALT_BITSTREAM_WRITER
  put_bits: always use intreadwrite.h macros
  libavformat: Add an example how to use the metadata API
  doxygen: Prefer member groups over grouping into modules
  doxygen: be more permissive when searching for API examples
  avformat: doxify the Metadata API
  lavf: restore old behavior for custom AVIOContex with an AVFMT_NOFILE format.
  lavf: use the correct pointer in av_open_input_stream().
  avidec: infer absolute vs relative index from first packet

Conflicts:
	libavformat/Makefile
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-03 03:14:10 +02:00
Stefano Sabatini
f6d6783a4d ffmpeg: use av_get_bytes_per_sample() in place of av_get_bits_per_sample_fmt()
av_get_bits_per_sample_fmt() was deprecated.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-02 08:33:51 -07:00
Jeff Downs
a09918335f Make all option parsing functions match the function pointer type through which they are called.
All option parsing functions now match the function pointer signature through
which they are called (int f(const char *, const char *), thereby working
reliably on all platforms.
Prefix all option processing functions with opt_
2011-06-30 11:49:48 -04:00
Carl Eugen Hoyos
08b4a667ef Set channel_layout if channels is set when transcoding. 2011-06-29 23:49:44 +02:00
Baptiste Coudurier
90a40b226a ffmpeg: fix prototypes of functions after the removal of OPT_FUNC2. 2011-06-26 14:09:48 -07:00
Clément Bœsch
4a34e54b0e Fix zero-length gnu_printf format string warning.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-21 21:41:28 +02:00
Michael Niedermayer
6cbe81999b Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
  x86: cabac: fix register constraints for 32-bit mode
  cabac: move x86 asm to libavcodec/x86/cabac.h
  x86: h264: cast pointers to intptr_t rather than int
  x86: h264: remove hardcoded edi in decode_significance_8x8_x86()
  x86: h264: remove hardcoded esi in decode_significance[_8x8]_x86()
  x86: h264: remove hardcoded edx in decode_significance[_8x8]_x86()
  x86: h264: remove hardcoded eax in decode_significance[_8x8]_x86()
  x86: cabac: change 'a' constraint to 'r' in get_cabac_inline()
  x86: cabac: remove hardcoded esi in get_cabac_inline()
  x86: cabac: remove hardcoded edx in get_cabac_inline()
  x86: cabac: remove unused macro parameter
  x86: cabac: remove hardcoded ebx in inline asm
  x86: cabac: remove hardcoded struct offsets from inline asm
  cabac: remove inline asm under #if 0
  cabac: remove BRANCHLESS_CABAC_DECODER switch
  cabac: remove #if 0 cascade under never-set #ifdef ARCH_X86_DISABLED
  document libswscale bump
  error_resilience: skip last-MV predictor step if MVs are not available.
  error_resilience: actually add counter when adding a MV predictor.
  ...

Conflicts:
	Changelog
	libavcodec/error_resilience.c
	libavfilter/defaults.c
	libavfilter/vf_drawtext.c
	libswscale/swscale.h
	tests/ref/vsynth1/error
	tests/ref/vsynth2/error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-21 03:38:25 +02:00
Justin Ruggles
e6c52cee54 Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
av_get_bits_per_sample_fmt() is deprecated.
2011-06-20 18:56:06 -04:00
Michael Niedermayer
cfbaeb311d ffmpeg: print warning if encoding would duplicate massive amounts of frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-20 20:13:26 +02:00
Stefano Sabatini
44f669e7bc lavfi: add vsink_buffer, and use it in ff* tools
Also add the public interface libavfilter/vsink_buffer.h.
2011-06-19 19:18:33 +02:00
Michael Niedermayer
035c13e307 ffmpeg: warn if samples need to be converted in a lossy way for lossless encoders.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-19 03:54:15 +02:00
Michael Niedermayer
2905e3ff64 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: add opt_find to AVCodecContext class.
  h264: Complexify frame num gap shortening code
  intreadwrite.h: fix AV_RL32/AV_RB32 signedness.
  Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
  Add minor bumps and APIChanges entries for lavf private options.
  ffmpeg: deprecate -vc and -tvstd
  ffmpeg: use new avformat_open_* API.
  ffserver: use new avformat_open_* API.
  ffprobe: use new avformat_open_* API.
  ffplay: use new avformat_open_* API.
  cmdutils: add opt_default2().
  dict: add AV_DICT_APPEND flag.
  lavf: add avformat_write_header() as a replacement for av_write_header().
  Deprecate av_open_input_* and remove their uses.
  lavf: add avformat_open_input() as a replacement for av_open_input_*
  AVOptions: add av_opt_find() as a replacement for av_find_opt.
  AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context.
  ffmpeg: don't abuse a global for passing frame size from input to output
  ffmpeg: don't abuse a global for passing pixel format from input to output
  ffmpeg: initialise encoders earlier.

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/h264.c
	libavformat/avformat.h
	libavformat/utils.c
	libavformat/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-18 05:10:38 +02:00
Michael Niedermayer
4f643430f2 Merge commit '9446d75941d639f19cfa9ae007eb4c5ca041f200'
* commit '9446d75941d639f19cfa9ae007eb4c5ca041f200':
  ffmpeg: merge output_codecs array into AVOutputStream members.
  rtpenc_latm: Consistently use "Libav" in license boilerplate.
  rtsp: Don't pass string pointer as format string to ff_url_join
  mmsh: fixed printf injection bug in mmsh request
  codec-regression: remove pointless -r options for dnxhd

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-17 05:49:58 +02:00
Michael Niedermayer
f6e2af4f5a ffmpeg: Force 420 with target dvd and svcd.
Fixes ticket283

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-16 23:06:27 +02:00
Anton Khirnov
55ba12e300 ffmpeg: deprecate -vc and -tvstd
They've been replaced by demuxer private options.
2011-06-16 20:24:57 +02:00
Anton Khirnov
8035f42968 ffmpeg: use new avformat_open_* API. 2011-06-16 20:24:57 +02:00
Anton Khirnov
0b7ccad6bf ffmpeg: don't abuse a global for passing frame size from input to output
It's broken with multiple files or video streams.
2011-06-16 20:24:55 +02:00
Anton Khirnov
10de86b882 ffmpeg: don't abuse a global for passing pixel format from input to output
It's broken with multiple files or video streams.
2011-06-16 20:24:50 +02:00
Anton Khirnov
9446d75941 ffmpeg: merge output_codecs array into AVOutputStream members.
There's no point in keeping them separate.
2011-06-16 20:11:08 +02:00
Anton Khirnov
62940bb42f ffmpeg: initialise encoders earlier.
Fixes choosing supported samplerate and framerate.
2011-06-16 20:11:08 +02:00
Michael Niedermayer
7a02527b05 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ac3enc: use correct alignment and length in channel coupling dsp functions.
  ffmpeg: don't abuse a global for passing framerate from input to output
  ffmpeg: don't abuse a global for passing channels from input to output
  ffmpeg: don't abuse a global for passing samplerate from input to output
  ARM: update ff_h264_idct8_add4_neon for 4:4:4 changes
  swscale: use SwsContext for av_log when available
  swscale: Remove HAVE_MMX from files that are only compiled with MMX enabled.
  swscale: Fix compilation with --disable-mmx2.

Conflicts:
	ffmpeg.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-16 03:53:58 +02:00
Anton Khirnov
a6286bda09 ffmpeg: don't abuse a global for passing framerate from input to output
It's broken with multiple files or video streams.
2011-06-15 21:57:53 +02:00
Anton Khirnov
8f3e999736 ffmpeg: don't abuse a global for passing channels from input to output
It's broken with multiple files or audio streams.
2011-06-15 21:57:52 +02:00
Anton Khirnov
d7ee44024c ffmpeg: don't abuse a global for passing samplerate from input to output
It's broken with multiple files or audio streams.

This removes the default samplerate of 44100 for raw input, hence all
the FATE changes.
2011-06-15 21:57:52 +02:00
Ronald S. Bultje
0be3736796 ffmpeg: fix streaming to ffserver. 2011-06-14 15:59:15 -04:00
Stefano Sabatini
c535494268 avfiltergraph: make the AVFilterInOut alloc/free API public
This is required for letting applications to create and destroy
AVFilterInOut structs in a convenient way.
2011-06-12 22:46:02 +02:00
Stefano Sabatini
6119b23a36 avfiltergraph: change the syntax of avfilter_graph_parse()
Make it returns the list of open inputs and outputs, so it can be
reused by applications.

Breaks API/ABI.
2011-06-12 22:46:02 +02:00
Etienne Buira
39dbe9b6b8 Fix -t option for formats which holds dts and no pts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-11 02:26:26 +02:00
Alex Converse
9a1b79128c ffmpeg.c: Add a necessary const qualifier 2011-06-09 10:12:50 -07:00
Michael Niedermayer
f9ecb849ef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  crypto: Use av_freep instead of av_free
  lavf: don't try to free private options if priv_data is NULL.
  swscale: fix types of assembly arguments.
  swscale: move two macros that are only used once into caller.
  swscale: remove unused function.
  options: Add missing braces around struct initializer.
  mov: Remove leftover crufty debug statement with references to a local file.
  dvbsubdec: Fix compilation of debug code.
  Remove all uses of now deprecated metadata functions.
  Move metadata API from lavf to lavu.

Conflicts:
	doc/APIchanges
	libavformat/aiffdec.c
	libavformat/asfdec.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/cafdec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/wtv.c
	libavutil/avutil.h
	libavutil/internal.h
	libswscale/swscale.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-09 04:47:19 +02:00
Anton Khirnov
d2d67e424f Remove all uses of now deprecated metadata functions. 2011-06-08 07:43:45 +02:00
Michael Niedermayer
580817df04 Move code for "ffmpeg: fix massive leak occurring when seeking" / e4841a404b elsewhere
The picture struct is written to in the loop, so this cannot work.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-06 04:20:43 +02:00
Stefano Sabatini
27bcf55f45 vsrc_buffer: add flags param to av_vsrc_buffer_add_video_buffer_ref
The new flags parameter allows to specify if the video ref to add
should overwrite the cache, if the flag is not set vsrc_buffer will
complain and abort; otherwise it will clean the already cached video
ref before to overwrite it, thus avoiding a leak.
2011-06-06 01:35:27 +02:00
Stefano Sabatini
e4841a404b ffmpeg: fix massive leak occurring when seeking
Avoid to add frames to the vsrc_buffer in the case ist->pts <
start_time, as these frames are unused (and never released). In
particular this condition is verified with commands of the kind:
ffmpeg -i INPUT -ss TIME OUTPUT

Also allow a minor simplification.
2011-06-05 13:32:33 +02:00
Stefano Sabatini
96f931adf7 cmdutils: change the signature of the function argument in parse_options()
This is required for a pending simplification.
2011-06-05 13:21:02 +02:00
Michael Niedermayer
87f40364d1 Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  build: simplify commands for clean target
  swscale: split swscale.c in unscaled and generic conversion routines.
  swscale: cosmetics.
  swscale: integrate (literally) swscale_template.c in swscale.c.
  swscale: split out x86/swscale_template.c from swscale.c.
  swscale: enable hScale_altivec_real.
  swscale: split out ppc _template.c files from main swscale.c.
  swscale: remove indirections in ppc/swscale_template.c.
  swscale: split out unscaled altivec YUV converters in their own file.
  mpegvideoenc: fix multislice fate tests with threading disabled.
  mpegts: Wrap #ifdef DEBUG and av_hex_dump_log() combination in a macro.
  build: Simplify texi2html invocation through the --output option.
  Mark some variables with av_unused
  Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().
  svq3: Check negative mb_type to fix potential crash.
  svq3: Move svq3-specific fields to their own context.
  rawdec: initialize return value to 0.
  Remove unused get_psnr() prototype
  rawdec: don't leak option strings.
  bktr: get default framerate from video standard.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-04 06:35:17 +02:00
Baptiste Coudurier
e4e2db9c74 ffmpeg: use opt_acodec when setting audio codec in opt_target. 2011-06-03 19:52:59 -07:00
Michael Niedermayer
bfd3b70ac3 ffmpeg: fix segfault with too many output files
Fixes Ticket219

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-04 01:24:00 +02:00
Stefano Sabatini
94bed8e582 Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().
This fixes warnings about avcodec_get_pix_fmt_name() being deprecated.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-03 13:55:55 +02:00
Michael Niedermayer
99eb31e263 Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits)
  Replace custom DEBUG preprocessor trickery by the standard one.
  vorbis: Remove non-compiling debug statement.
  vorbis: Remove pointless DEBUG #ifdef around debug output macros.
  cook: Remove non-compiling debug output.
  Remove pointless #ifdefs around function declarations in a header.
  Replace #ifdef + av_log() combinations by av_dlog().
  Replace custom debug output functions by av_dlog().
  cook: Remove unused debug functions.
  Remove stray extra arguments from av_dlog() invocations.
  targa: fix big-endian build
  v4l2: remove one forgotten use of AVFormatParameters.pix_fmt.
  vfwcap: add a framerate private option.
  v4l2: add a framerate private option.
  libdc1394: add a framerate private option.
  fbdev: add a framerate private option.
  bktr: add a framerate private option.
  oma: check avio_read() return value
  nutdec: remove unused variable
  Remove unused variables
  swscale: allocate larger buffer to handle altivec overreads.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/dca.c
	libavcodec/dirac.c
	libavcodec/error_resilience.c
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pthread.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/shorten.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavdevice/dv1394.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/4xm.c
	libavformat/apetag.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/mmf.c
	libavformat/mpeg.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/oggdec.c
	libavformat/oggparseogm.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rpl.c
	libavformat/rtpdec_latm.c
	libavformat/sauce.c
	libavformat/sol.c
	libswscale/utils.c
	tests/ref/vsynth1/error
	tests/ref/vsynth2/error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 05:19:30 +02:00
Baptiste Coudurier
dd47107021 In print_report, print progression time in hours:mins:secs:us
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 03:46:13 +02:00
Baptiste Coudurier
1212d5b5e4 ffmpeg: In print_report, use int64_t for pts to check for 0 and avoid inf value for bitrate.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 03:46:13 +02:00
Mans Rullgard
e65ab9d94f Remove unused variables 2011-06-02 20:06:00 +01:00
Stefano Sabatini
ac41f3b036 ffmpeg: handle copy of packets for AVFMT_RAWPICTURE output formats
Store AVPicture in AVPacket as required by AVFMT_RAWPICTURE formats.

Fix trac issue #251.
2011-06-01 13:04:53 +02:00
Stefano Sabatini
f712f6c8a4 ffmpeg: simplify opt_*_codec() options
Replace opt_{audio,video,subtitle,data}_codec() with a single
opt_codec() function.
2011-05-30 09:09:56 +02:00
Clément Bœsch
adba9c6352 Fix various unused variable warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-30 00:24:01 +02:00
Reimar Döffinger
bb9b7bc62e Remove now unused nb_istreams variable. 2011-05-29 15:33:48 +02:00
Michael Niedermayer
b8a43bc1b5 Merge remote-tracking branch 'qatar/master' into master
* qatar/master: (27 commits)
  ac3enc: fix LOCAL_ALIGNED usage in count_mantissa_bits()
  ac3dsp: do not use the ff_* prefix when referencing ff_ac3_bap_bits.
  ac3dsp: fix loop condition in ac3_update_bap_counts_c()
  ARM: unbreak build
  ac3enc: modify mantissa bit counting to keep bap counts for all values of bap instead of just 0 to 4.
  ac3enc: split mantissa bit counting into a separate function.
  ac3enc: store per-block/channel bap pointers by reference block in a 2D array rather than in the AC3Block struct.
  get_bits: add av_unused tag to cache variable
  sws: replace all long with int.
  ARM: aacdec: fix constraints on inline asm
  ARM: remove unnecessary volatile from inline asm
  ARM: add "cc" clobbers to inline asm where needed
  ARM: improve FASTDIV asm
  ac3enc: use LOCAL_ALIGNED macro
  APIchanges: fill in git hash for av_get_pix_fmt_name (0420bd7).
  lavu: add av_get_pix_fmt_name() convenience function
  cmdutils: remove OPT_FUNC2
  swscale: fix crash in bilinear scaling.
  vpxenc: add VP8E_SET_STATIC_THRESHOLD mapping
  webm: support stereo videos in matroska/webm muxer
  ...

Conflicts:
	Changelog
	cmdutils.c
	cmdutils.h
	doc/APIchanges
	doc/muxers.texi
	ffmpeg.c
	ffplay.c
	libavcodec/ac3enc.c
	libavcodec/ac3enc_float.c
	libavcodec/avcodec.h
	libavcodec/get_bits.h
	libavcodec/libvpxenc.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavformat/matroskaenc.c
	libavutil/avutil.h
	libswscale/rgb2rgb.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-29 03:34:35 +02:00
Stefano Sabatini
eb8bc57240 cmdutils: remove OPT_FUNC2
Make ff* tools only accept opt_* functions taking two arguments.

The distinction between functions with one and two arguments is quite
pointless. Simplify parse_options() code.
2011-05-28 18:23:05 +02:00
Stefano Sabatini
26513856d6 cmdutils: remove OPT_FUNC2
Make ff* tools only accept opt_* functions taking two arguments.

The distinction between functions with one and two arguments is quite
pointless. Simplify parse_options() code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-28 09:40:19 -04:00
Michael Niedermayer
027264cb82 Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  ARM: add ARMv6 optimised av_clip_uintp2
  ARM: remove volatile from asm statements in libavutil/intmath
  ARM: fix av_clipl_int32_arm()
  v4l: include avdevice.h
  ffserver: move close_connection() call to avoid a temporary string and copy.
  lavf: initialize demuxer private options.
  AVOptions: set string default values.
  lavdevice: mark v4l for removal on next major bump.
  swscale: fix compile on ppc.
  swscale: fix compile on x86-32.
  build: Remove generated .version file on distclean.
  configure: Add -D_GNU_SOURCE to CPPFLAGS on OS/2.
  doc: Drop hint at --enable-memalign-hack for MinGW, it is now autodetected.
  ffplay: Remove disabled code.
  Mark parameterless function declarations as 'void'.
  swscale: use av_clip_uint8() in yuv2yuv1_c().
  swscale: remove VOF/VOFW.
  swscale: split chroma buffers into separate U/V planes.
  swscale: replace formatConvBuffer[VOF] by allocated array.
  rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-27 02:53:21 +02:00
Mike Williams
db3262b700 ffserver: Fix a null pointer dereference as a result of the FF_API_MAX_STREAMS cleanup.
Fixed another dereference in the RTSP code.

Removed a useless variable.

Changed an unnecessary looping assignment to a simple assignment suggested by
Maksym.

Added fixes and tweaks suggested by Maksym Veremeyenko [verem@m1stereo.tv] and
Clément B.
2011-05-26 12:57:59 +02:00
Michael Niedermayer
39e4206dc6 Merge remote-tracking branch 'qatar/master'
* qatar/master: (32 commits)
  doc: create separate section for audio encoders
  swscale: Remove orphaned, commented-out function declaration.
  swscale: Eliminate rgb24toyv12_c() duplication.
  Remove h263_msmpeg4 from MpegEncContext.
  APIchanges: Fill in git hash for fps_probe_size (30315a8)
  avformat: Add fpsprobesize as an AVOption.
  avoptions: Return explicitly NAN or {0,0} if the option isn't found
  rtmp: Reindent
  rtmp: Don't try to do av_malloc(0)
  tty: replace AVFormatParameters.sample_rate abuse with a private option.
  Fix end time of last chapter in compute_chapters_end
  ffmpeg: get rid of useless AVInputStream.nb_streams.
  ffmpeg: simplify managing input files and streams
  ffmpeg: purge redundant AVInputStream.index.
  lavf: deprecate AVFormatParameters.channel.
  libdc1394: add a private option for channel.
  dv1394: add a private option for channel.
  v4l2: reindent.
  v4l2: add a private option for channel.
  lavf: deprecate AVFormatParameters.standard.
  ...

Conflicts:
	doc/APIchanges
	doc/encoders.texi
	ffmpeg.c
	libavdevice/alsa-audio.h
	libavformat/version.h
	libavutil/opt.c
	libswscale/rgb2rgb.h
	libswscale/rgb2rgb_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-26 03:28:22 +02:00
Anton Khirnov
2cf8355f98 ffmpeg: get rid of useless AVInputStream.nb_streams.
It's a duplicate of AVFormatContext.nb_streams.
2011-05-25 15:55:47 +02:00
Anton Khirnov
07633154ad ffmpeg: simplify managing input files and streams
Grow the file and stream list in opt_input_file() instead of creating it
all at once in transcode().  This is simpler and will be useful for
following commits.
2011-05-25 15:55:47 +02:00
Anton Khirnov
d2bc4da15b ffmpeg: purge redundant AVInputStream.index.
AVStream.index stores the same thing.
2011-05-25 15:55:47 +02:00
Stefano Sabatini
6b5e182540 ffmpeg: handle the case when get_filtered_frame() fails 2011-05-25 12:42:18 +02:00
Martin Storsjö
a121754852 ffmpeg: Don't trigger url_interrupt_cb on the first signal
Currently, the url_interrupt_cb callback will abort all IO
after the first received signal. This makes the output files
from e.g. the mov muxer to be unreadable if the transcode is
aborted with ctrl+c.

After this patch, the first signal cleanly breaks out of
the transcoding loop, but won't forcibly abort all IO.
After the second signal is received, the url_interrupt_cb
callback will abort all IO.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-22 22:06:20 +03:00
Stefano Sabatini
5ecdfd008b lavf: deprecate avformat_alloc_output_context() in favor of avformat_alloc_output_context2()
The new function accepts a slightly more intuitive order of paramters,
and returns an error code, thus allowing applications to report a
meaningful error message.
2011-05-22 20:01:31 +02:00
Michael Niedermayer
bf8bb94322 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffmpeg: get rid of the -vglobal option.
  dct32: Add AVX implementation of 32-point DCT
  dct32: Change pass 6 permutation to allow for AVX implementation
  dct32: port SSE 32-point DCT to YASM
  multiple inclusion guard cleanup
  avio: document buffer must created with av_malloc() and friends
  avio: check AVIOContext malloc failure
  swscale: point out an alternative to sws_getContext
  svq3: Do initialization after parsing the extradata
  add changelog entries for 0.7_beta2
  mp3lame: add #include required for AV_RB32 macro.

Conflicts:
	Changelog
	libavcodec/svq3.c
	libavcodec/x86/dct32_sse.c
	libavfilter/vsrc_buffer.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-22 04:53:19 +02:00
Anton Khirnov
71cc331cab ffmpeg: get rid of the -vglobal option.
It's badly documented and does the same thing as -flags global_header,
so it's redundant.
2011-05-21 21:25:58 +02:00
Mike William
840238b870 ffserver: dont just crash
With changes from ubitux.
2011-05-21 04:50:59 +02:00
Maksym Veremeyenko
ab1c19efc5 fix ffserver's SIGSEGV 2011-05-21 04:39:20 +02:00
Stefano Sabatini
328810390d ffmpeg: remove useless NULL-check on avfilter_unref_buffer
The check is no more required since recent changes in the
avfilter_unref_buffer(), the check is done in the function.
Simplify.
2011-05-20 09:34:56 +02:00
Stefano Sabatini
c000a9f783 vsrc_buffer: add av_vsrc_buffer_add_frame()
The new function is a wrapper around
av_vsrc_buffer_add_video_buffer_ref(), and allows to simplify the act
of pushing AVFrame data to the source buffer.
2011-05-19 23:15:34 +02:00
Stefano Sabatini
50764e19a8 vsrc_buffer: make the source accept sws_param in init
Avoid the need of two distinct av_vsrc_add_video_buffer_ref*
functions. Simplify the interface.
2011-05-19 23:15:33 +02:00
Stefano Sabatini
9fdf77217b lavfi: add avfilter_get_video_buffer_ref_from_frame to avcodec.h
Simplify passing AVFrame data to av_vsrc_buffer_add_video_buffer_ref().
2011-05-19 23:15:33 +02:00
Stefano Sabatini
6070b7e1c5 vsrc_buffer: remove dependency on AVFrame
Rename av_vsrc_buffer_add_frame to
av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make
it accept in input an AVFilterBufferRef rather than an AVFrame.

This way the interface can be used without requiring the
inclusion/installation of libavcodec headers.
2011-05-19 23:15:33 +02:00
Justin Ruggles
bc778a0cea Add support for request_sample_format in ffmpeg and ffplay. 2011-05-18 17:27:06 -04:00
Michael Niedermayer
e89403216c ffmpeg: dont show_banner() on verbose<0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-18 17:14:34 +02:00
Michael Niedermayer
a4b6000b00 ffmpeg: reset top_field_first in opt_input_file().
This allows seting tff for inputs without also setting it for the output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-17 16:57:16 +02:00
Michael Niedermayer
f8ae3a2108 Merge remote branch 'qatar/master'
12 files changed, 36 insertions(+), 81 deletions(-)
yes thats 36 new lines in 14 commits

* qatar/master:
  ffmpeg: fix -aspect cli option
  Restructure video filter implementation in ffmpeg.c.
  ffplay: remove audio_write_get_buf_size() forward declaration
  lavfi: print key-frame and picture type information in ff_dlog_ref()
  mathops: remove ancient confusing comment
  cws2fws: Improve error message wording.
  tools: Check the return value of write().
  mpegaudio: move OUT_FMT macro to mpegaudiodec.c
  mpegaudio: remove OUT_MIN/MAX macros
  Add missing #includes to mp3_header_(de)compress bsf
  dct: fix indentation
  dct: bypass table allocation for DCT_II of size 32
  h264dsp_mmx: Add #ifdefs around some mmxext functions on x86_64.
  Remove unused header mpegaudio3.h.

Conflicts:
	ffmpeg.c
	libavcodec/mpegaudio.h
	libavcodec/mpegaudio3.h
	libavfilter/avfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-17 04:51:33 +02:00
Baptiste Coudurier
901ff51116 ffmpeg: fix -aspect cli option
Redesign the way -aspect option is handled. This is done by making
ffmpeg read the sample aspect ratio set in the corresponding input
stream by default, and overriding it using the value specified by
-aspect.

If the output display aspect ratio is specified with -aspect, it is
set at the end of the filterchain, thus overriding the value set by
filters in the filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors).

(Cherry-pick abf8342aa9)

Another aspect ratio fix try. This leaves the setdar addition at the end
(preferred by people).

(Cherry-pick e7c7b0d000)
2011-05-16 14:13:03 -07:00
Michael Niedermayer
9d5fa6182d Restructure video filter implementation in ffmpeg.c.
This fixes several bugs like multiple outputs and -aspect mixed with -vf

(cherry picked from commit 1762d9ced7)
(cherry picked from commit 5c20c81bfa)
(cherry picked from commit a7844c580d)
2011-05-16 14:13:03 -07:00
Michael Niedermayer
9763420bcc rawdec: Allow overriding top field first.
Iam not sure this is the best way to implement it, but its the simplest
and keeps the code seperate from the application. Keeping ffmpeg.c
simple and not requireing user apps to duplicate this code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-16 21:52:35 +02:00
Michael Niedermayer
198783744e ffmpeg: initialize input_codec array earlier.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-16 21:26:18 +02:00
Michael Niedermayer
90bb2c78d6 ffmpeg: Allow seting and cycling through debug modes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-15 01:39:04 +02:00
Michael Niedermayer
34e838083e ffmpeg: Help for interactive keys.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-14 15:52:40 +02:00
Michael Niedermayer
0f6a8579af ffmpeg: Interactivity support. Try pressing +-hs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-14 02:54:28 +02:00
Stefano Sabatini
dbe9453946 ffmpeg: use parse_number_and_die() when it makes sense
Prefer parse_number_or_die() over atoi()/atol() parsing for the options:
-pass, -top, -vc, and -qscale.

Improve input validation.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-13 07:38:54 +02:00
Anton Khirnov
8fb566fdf8 ffmpeg: get rid of the 'q' key schizofrenia
SIGINT for quitting should be enough for everybody.
2011-05-13 07:38:54 +02:00
Michael Niedermayer
72153419b5 Merge remote branch 'qatar/master'
* qatar/master: (33 commits)
  rtpdec_qdm2: Don't try to parse data packet if no configuration is received
  ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand.
  ac3enc: clean up count_frame_bits() and count_frame_bits_fixed()
  mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
  srtdec: make sure we don't write past the end of buffer
  wmaenc: improve channel count and bitrate error handling in encode_init()
  matroskaenc: make sure we don't produce invalid file with no codec ID
  matroskadec: check that pointers were initialized before accessing them
  lavf: fix function name in compute_pkt_fields2 av_dlog message
  lavf: fix av_find_best_stream when providing a wanted stream.
  lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.
  ffmpeg: factorize quality calculation
  tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
  tiff: Prefer enum TiffCompr over int for TiffContext.compr.
  mov: Support edit list atom version 1.
  configure: Enable libpostproc automatically if GPL code is enabled.
  Cosmetics: fix prototypes in oggdec
  oggdec: fix memleak with continuous streams.
  matroskaenc: add missing new line in av_log() call
  dnxhdenc: add AVClass in private context.
  ...

swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code.
Above code is also just in case its not obvios to a large extended duplicates that where cherry picked
from ffmpeg.

Conflicts:
	configure
	ffmpeg.c
	libavformat/matroskaenc.c
	libavutil/pixfmt.h
	libswscale/ppc/swscale_template.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	tests/fate/h264.mak
	tests/ref/lavfi/pixdesc_le
	tests/ref/lavfi/pixfmts_copy_le
	tests/ref/lavfi/pixfmts_null_le
	tests/ref/lavfi/pixfmts_scale_le
	tests/ref/lavfi/pixfmts_vflip_le

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-13 04:40:40 +02:00
Michael Niedermayer
5da116a3fd ffmpeg: factorize quality calculation
Calculate quality value once per stream in print_report().
Also fix segfault, as coded_frame can be NULL.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:27 +02:00
Diego Biurrun
046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.

This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually.  It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.

Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems.  We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02:00
Michael Niedermayer
612122b187 Merge remote branch 'qatar/master'
* qatar/master: (32 commits)
  10-bit H.264 x86 chroma v loopfilter asm
  Port SMPTE S302M audio decoder from FFmbc 0.3. [Copyright headers corrected]
  Fix crash of interlaced MPEG2 decoding
  h264pred: fix one more aliasing violation.
  doc/APIchanges: fill in missing hashes and dates.
  flacenc: use proper initializers for AVOption default values.
  lavc: deprecate named constants for deprecated antialias_algo.
  aac: workaround for compilation on cygwin
  swscale: extend YUV422p support to 10bits depth
  tiff: add support for inverted FillOrder for uncompressed data
  Remove unused softfloat implementation.
  h264pred: fix aliasing violations.
  rotozoom: Eliminate French variable name.
  rotozoom: Check return value of fread().
  rotozoom: Return an error value instead of calling exit().
  rotozoom: Make init_demo() return int and check for errors on invocation.
  rotozoom: Drop silly UINT8 typedef.
  rotozoom: Drop some unnecessary parentheses.
  rotozoom: K&R coding style cosmetics
  rtsp: Only do keepalive using GET_PARAMETER if the server supports it
  ...

Conflicts:
	Changelog
	cmdutils.c
	doc/APIchanges
	doc/general.texi
	ffmpeg.c
	ffplay.c
	libavcodec/h264pred_template.c
	libavcodec/resample.c
	libavutil/pixfmt.h
	libavutil/softfloat.c
	libavutil/softfloat.h
	tests/rotozoom.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-12 04:51:24 +02:00
Stefano Sabatini
3fd62c6e24 ffmpeg: call pre_process_video_frame() only if decoding is needed
In output_packet(), move the pre_process_video_frame() call inside the
if (ist->decoding_needed) { } block. This way
pre_process_video_frame() is not called when stream-copy has been
selected.

Also simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:37 +02:00
Stefano Sabatini
2b95602e93 ffmpeg: reformat resample condition code in transcode()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:37 +02:00
Stefano Sabatini
9aa797cd28 ffmpeg: factorize resampling condition check in do_video_out()
Simplify and improve readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:37 +02:00
Stefano Sabatini
c29c2eea8f ffmpeg: prefer "dec" over "ist->st->codec" in do_video_out() snippet
Simplify, ease readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:37 +02:00
Stefano Sabatini
2ecc5b70fb ffmpeg: improve reporting if size/pixel format changes
Use av_log() rather than fprintf(stderr, ...), and show information
related to the previous size/pixel format configuration.

Consistent with the corresponding message issued in case of audio
configuration change.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:36 +02:00
Stefano Sabatini
b568d6d94b ffmpeg: warns the user when the selected pixel format is ignored
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:36 +02:00
Michael Niedermayer
59eb12faff Merge remote branch 'qatar/master'
* qatar/master: (30 commits)
  AVOptions: make default_val a union, as proposed in AVOption2.
  arm/h264pred: add missing argument type.
  h264dsp_mmx: place bracket outside #if/#endif block.
  lavf/utils: fix ff_interleave_compare_dts corner case.
  fate: add 10-bit H264 tests.
  h264: do not print "too many references" warning for intra-only.
  Enable decoding of high bit depth h264.
  Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
  Add support for higher QP values in h264.
  Add the notion of pixel size in h264 related functions.
  Make the h264 loop filter bit depth aware.
  Template dsputil_template.c with respect to pixel size, etc.
  Template h264idct_template.c with respect to pixel size, etc.
  Preparatory patch for high bit depth h264 decoding support.
  Move some functions in dsputil.c into a new file dsputil_template.c.
  Move the functions in h264idct into a new file h264idct_template.c.
  Move the functions in h264pred.c into a new file h264pred_template.c.
  Preparatory patch for high bit depth h264 decoding support.
  Add pixel formats for 9- and 10-bit yuv420p.
  Choose h264 chroma dc dequant function dynamically.
  ...

Conflicts:
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/alpha/dsputil_alpha.c
	libavcodec/arm/dsputil_init_arm.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/arm/dsputil_init_neon.c
	libavcodec/arm/dsputil_iwmmxt.c
	libavcodec/arm/h264pred_init_arm.c
	libavcodec/bfin/dsputil_bfin.c
	libavcodec/dsputil.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_ps.c
	libavcodec/h264_refs.c
	libavcodec/h264dsp.c
	libavcodec/h264idct.c
	libavcodec/h264pred.c
	libavcodec/mlib/dsputil_mlib.c
	libavcodec/options.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/ppc/h264_altivec.c
	libavcodec/ps2/dsputil_mmi.c
	libavcodec/sh4/dsputil_align.c
	libavcodec/sh4/dsputil_sh4.c
	libavcodec/sparc/dsputil_vis.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/options.c
	libavformat/utils.c
	libavutil/pixfmt.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/swscale_template.c
	tests/ref/seek/lavf_avi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 05:47:02 +02:00
Robert Leatherwood
b5e089924f "Initialize" copy_tb like the other global variables. 2011-05-11 00:57:42 +02:00
Michael Niedermayer
eeaba924b7 ffmpeg: Fix -t with files that do not have any timestamps.
This for example fixes -t with some frext h264 reference streams.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 17:31:32 +02:00
Alexander Strange
cb48fdf67e ffmpeg: Simplify decode loop condition to not use next_pts
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:23:51 -04:00
Stefano Sabatini
bc97695af8 ffmpeg: remove unused fields AVOutputStream.original_width/height
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:17:52 +02:00
Stefano Sabatini
f38d900fb8 ffmpeg: remove unused variable padding_src in do_video_out()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:17:39 +02:00
Michael Niedermayer
d1991f51f3 ffmpeg: fix negative verbosity.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:17:21 +02:00
Stefano Sabatini
0420bf09f7 ffmpeg: rename configure_filters() to configure_video_filters()
Mostly useful for the audio-filters branch, to make more apparent the
distinction between configure_audio_filters() and
configure_video_filters().

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:15:06 +02:00
Stefano Sabatini
5d2c6f42d7 cmdutils: remove list_fmts(), simplify
The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().

Also fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int,  int)’ but argument is of type ‘char * (*)(char *, int,  enum AVSampleFormat)’

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:14:13 +02:00
Takashi Mochizuki
c3e40410d4 Add missing CONFIG_AVFILTER check.
Fix configure --disable-avfilter issue.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:12:27 +02:00
Michael Niedermayer
b97b4b58a6 Merge remote branch 'qatar/master'
* qatar/master:
  mpegaudiodec: group #includes more sanely
  mpegaudio: remove #if 0 blocks
  ffmpeg.c: reset avoptions after each input/output file.
  ffmpeg.c: store per-output stream sws flags.
  mpegaudio: remove CONFIG_MPEGAUDIO_HP option
  mpegtsenc: Clear st->priv_data when freeing it
  udp: Fix receiving RTP data over multicast
  rtpproto: Remove an unused variable
  regtest: fix wma tests
NOT pulled:  mpegaudio: remove CONFIG_AUDIO_NONSHORT
  regtest: separate flags for encoding and decoding

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 04:03:17 +02:00
Anton Khirnov
19615089a0 ffmpeg.c: reset avoptions after each input/output file.
This is consistent with how all the other options work.
2011-05-09 19:35:20 +02:00
Anton Khirnov
1435f2fa72 ffmpeg.c: store per-output stream sws flags. 2011-05-09 19:35:20 +02:00
Michael Niedermayer
6841c8c579 Merge remote branch 'qatar/master'
* qatar/master:
  log: Fix an oob array read.
  cosmetics: trim trailing whitespace in postproc
  Ban strncpy() it's too easy to misuse.
  psymodel: Remove wrapper functions.
  aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'.
  regtest: remove redundant flags in jpg test
  regtest: use run_ffmpeg in do_image_formats
  regtest: simplify encoding functions
  ffmpeg.c: check for interlaced flag in the correct place.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 04:50:56 +02:00
Anton Khirnov
648e55ff1b ffmpeg.c: check for interlaced flag in the correct place.
In the corresponding codec context, not global options storage.
2011-05-08 10:43:24 +02:00
Stefano Sabatini
64c06615d2 vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interface
Now that pix_fmt, width, and height are directly embedded in the AVFrame,
there is no need to pass these values as separate arguments.
2011-05-07 12:03:59 +02:00
Stefano Sabatini
2beac7c325 ffmpeg: rename ost->pict_tmp to ost->resample_frame
The new name is more consistent with the employed naming scheme, and
more meaningful.
2011-05-07 12:03:59 +02:00
Stefano Sabatini
04c373c1e9 ffmpeg: prefer dec/enc over ost/ist->st->codec in do_video_out()
Compact code, improve readability.
2011-05-07 12:03:58 +02:00
Stefano Sabatini
a851fa7fec ffmpeg: move resample_changed check within the #if !CONFIG_AVFILTER
The check and the corresponding message in do_video_out() are
unnecessary in the libavfilter path, as a similar check and message
are performed within the buffer source.
2011-05-07 12:03:58 +02:00
Stefano Sabatini
70c24b2171 ffmpeg: remove useless intermediary variable resample_dst in do_video_out() 2011-05-07 12:03:58 +02:00
Stefano Sabatini
f5a669c229 ffmpeg: simplify mid-stream reconfiguration when libavfilter is disabled
Implement lazy initialization of the image resample context, so that
the initialization code does not need to be duplicated.

Also manage the case in which resample/size change mid-stream. For
each packet the code computes if resampling is needed.

Previously the resample check was done only at the initialization, in
case size/format changed and no resample was detected at the init
stage ffmpeg was silently exiting.
2011-05-07 12:03:58 +02:00
Stefano Sabatini
566666caf3 lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()
avfilter_copy_frame_props() avoids code duplication and increases
robustness.

The added files libavfilter/avcodec.[ch] are used for containing
utilities useful for gluing togheter libavfilter and libavcodec.
2011-05-07 12:03:49 +02:00
Michael Niedermayer
b000b86e1d Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  doc: Check standalone compilation before submitting new components.
  Fix standalone compilation of pipe protocol.
  Fix standalone compilation of ac3_fixed encoder.
  Fix standalone compilation of binkaudio_dct / binkaudio_rdft decoders.
  Fix standalone compilation of IMC decoder.
  Fix standalone compilation of WTV demuxer.
  Fix standalone compilation of MXPEG decoder.
  flashsv: K&R cosmetics
  matroskaenc: fix memory leak
  vc1: make overlap filter for I-frames bit-exact.
  vc1dec: use s->start/end_mb_y instead of passing them as function args.
  Revert "VC1: merge idct8x8, coeff adjustments and put_pixels."
  Replace strncpy() with av_strlcpy().
  indeo3: Eliminate use of long.
  get_bits: make cache unsigned to eliminate undefined signed overflow.
  asfdec: fix assert failure on invalid files
  avfilter: check malloc return values.
Not pulled as reason for reindent is not pulled:  mpegvideo: reindent.
  nutenc: check malloc return values.
Not pulled due to much simpler solution in ffmpeg  *: don't av_malloc(0).
  ...

Conflicts:
	doc/developer.texi
	libavcodec/Makefile
	libavcodec/get_bits.h
	libavcodec/mpegvideo.c
	libavformat/Makefile
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 03:30:24 +02:00
Alex Converse
1a5e4fd8c5 Replace strncpy() with av_strlcpy(). 2011-05-03 21:20:13 -07:00
Michael Niedermayer
707e8612e8 Merge remote branch 'qatar/master'
* qatar/master:
  Implement fate-rsync target
  Make ffmpeg support generic data stream

Conflicts:
	cmdutils.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 04:06:26 +02:00
Luca Barbato
e3b540b424 Make ffmpeg support generic data stream
The patch is the first step to support -dcodec copy
2011-05-03 11:51:55 +02:00
Michael Niedermayer
2525821f1a Merge remote branch 'qatar/master'
* qatar/master:
  vp8: frame-multithreading.
Duplicate  Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Duplicate  Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Bug spoted&removed in last merge:  dpx: Do not use DPX encoder for decoding.

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-03 04:08:23 +02:00
Stefano Sabatini
ce5e49b0c2 replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_* 2011-05-02 16:41:41 +02:00
Stefano Sabatini
301183d9be replace deprecated av_get_pict_type_char() with av_get_picture_type_char() 2011-05-02 16:41:35 +02:00
Stefano Sabatini
975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Stefano Sabatini
6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Stefano Sabatini
35fe66abbc lavfi: rename AVFilterBufferRefVideoProps.pixel_aspect to sample_aspect_ratio
Improve consistency with libavcodec.

This breaks libavfilter API/ABI.

The non-sequential 2.1.0 -> 2.4.0 bump is due to the mess previously
done with the lavfi minor number.
2011-05-01 13:10:18 +02:00
Stefano Sabatini
77e9dee8ae lavc: add a sample_aspect_ratio field to AVFrame
The sample aspect ratio is a per-frame property, so it makes sense to
define it in AVFrame rather than in the codec/stream context.
Simplify application-level sample aspect ratio information extraction,
and allow further simplifications.
2011-05-01 13:10:06 +02:00
Michael Niedermayer
fa1195227f FFMPEG: support demuxer specific options.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer
7d727f1338 LAVFAPI: avformat_alloc_output_context() / simplify usage of muxers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer
be315a3232 Merge remote branch 'qatar/master'
* qatar/master:
Duplicate  AMV: disable DR1 and don't override EMU_EDGE
Duplicate  lavf: inspect more frames for fps when container time base is coarse
Wrong and we have correct fix: Fix races in default av_log handler
  vorbis: Replace sized int_fast integer types with plain int/unsigned.
  Remove disabled non-optimized code variants.
NO  bswap.h: Remove disabled code.
  Remove some disabled printf debug cruft.
  Replace more disabled printf() calls by av_dlog().
NO  tests: Remove disabled code.
NO  Replace some commented-out debug printf() / av_log() messages with av_dlog().
  vorbisdec: Replace some sizeof(type) by sizeof(*variable).
NO  vf_fieldorder: Replace FFmpeg by Libav in license boilerplate.

Conflicts:
	libavcodec/h264.c
	libavcodec/vorbisdec.c
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 01:58:26 +02:00
Diego Biurrun
2e15305b70 Remove some disabled printf debug cruft. 2011-04-29 20:00:53 +02:00
Michael Niedermayer
0886267e3c Revert buggy hunk that leaked in from a libav merge.
This unbreaks compilation with --disable-avfilter.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 14:09:26 +02:00
Michael Niedermayer
d7e5aebae7 Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  ac3enc: correct the flipped sign in the ac3_fixed encoder
  Eliminate pointless '#if 1' statements without matching '#else'.
  Add AVX FFT implementation.
  Increase alignment of av_malloc() as needed by AVX ASM.
  Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
  mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
  documentation: extend documentation for ffmpeg -aspect option
  APIChanges: update commit hashes for recent additions.
  lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
  aac: add headers needed for log2f()
  lavc: remove FF_API_MB_Q cruft
  lavc: remove FF_API_RATE_EMU cruft
  lavc: remove FF_API_HURRY_UP cruft
  pad: make the filter parametric
  vsrc_movie: add key_frame and pict_type.
  vsrc_movie: fix leak in request_frame()
  lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
  vsrc_buffer: add sample_aspect_ratio fields to arguments.
  lavfi: add fieldorder filter
  scale: make the filter parametric
  ...

Conflicts:
	Changelog
	doc/filters.texi
	ffmpeg.c
	libavcodec/ac3dec.h
	libavcodec/dsputil.c
	libavfilter/avfilter.h
	libavfilter/vf_scale.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 03:51:04 +02:00
Michael Niedermayer
a38cdfde52 vsrc_buffer: Set output size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 18:16:48 +02:00
Michael Niedermayer
7a11c82fb7 vsrc_buffer: add sample_aspect_ratio fields to arguments.
This fixes aspect handling in ffmpeg.

This is based on a patch by Baptiste.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:38:24 +02:00
Michael Niedermayer
7b376b398a Merge remote branch 'qatar/master'
* qatar/master:
  Handle unicode file names on windows
  rtp: Rename the open/close functions to alloc/free
  Lowercase all ff* program names.
  Refer to ff* tools by their lowercase names.
NOT Pulled  Replace more FFmpeg instances by Libav or ffmpeg.
  Replace `` by $() syntax in shell scripts.
  patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled  Remove stray libavcore and _g binary references.
  vorbis: Rename decoder/encoder files to follow general file naming scheme.
  aacenc: Fix whitespace after last commit.
  cook: Fix small typo in av_log_ask_for_sample message.
  aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
  Remove RDFT dependency from AAC decoder.
  Add some debug log messages to AAC extradata
  Fix mov debug (u)int64_t format strings.
  bswap: use native types for av_bwap16().
  doc: FLV muxing is supported.
  applehttp: Handle AES-128 encrypted streams
  Add a protocol handler for AES CBC decryption with PKCS7 padding
  doc: Mention that DragonFly BSD requires __BSD_VISIBLE set

Conflicts:
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:41:22 +02:00
Diego Biurrun
89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Carl Eugen Hoyos
3c483620c9 Cosmetics: Rename variable daemon as run_as_daemon.
daemon() is defined in unistd.h for BSD and Cygwin.
2011-04-22 18:49:44 +02:00
Michael Niedermayer
8772156be0 Merge remote branch 'qatar/master'
* qatar/master:
  APIChanges: document git revision for CODEC_CAP_SLICE_THREADS addition.
  Introduce slice threads flag.
  FATE: allow forcing thread-type when doing threaded fate runs.
  Use av_log_ask_for_sample() where appropriate.
  error: sort, pack, and align error code and string definitions
  The stabilization period after version bumps should be one month, not one week.
  applehttp: Expose the stream bitrate via metadata
  doc: Add some initial docs on the applehttp demuxer
  Provide a fallback version of the libm function trunc
  libavdevice: Define _XOPEN_SOURCE for usleep
  lavc: provide deprecated avcodec_thread_init until next major version
  lavc: provide the opt.h header until the next bump
  error: change AVERROR_EOF value
  error: remove AVERROR_NUMEXPECTED
  error: add error code AVERROR_OPTION_NOT_FOUND, and use it in opt.c

Conflicts:
	libavcodec/h264.c
	libavutil/error.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-22 03:54:30 +02:00
Stefano Sabatini
7046b63e69 ffmpeg: call pre_process_video_frame() only if decoding is needed
In output_packet(), move the pre_process_video_frame() call inside the
if (ist->decoding_needed) { } block. This way
pre_process_video_frame() is not called when stream-copy has been
selected.

Also simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-21 12:08:42 +02:00
Stefano Sabatini
79157f400b error: remove AVERROR_NUMEXPECTED
AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and
has a too much specific meaning, which is better explained through a
log message. Thus it can be replaced by AVERROR(EINVAL).

This breaks API.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-21 07:10:16 +02:00
Baptiste Coudurier
2c18893a91 In libx264 wrapper, correctly support 2pass log filename option. 2011-04-20 15:46:40 -07:00
Michael Niedermayer
efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Stefano Sabatini
55815edca0 prefer avio_check() over url_exist()
The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-19 19:48:07 +02:00
Stefano Sabatini
59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov
41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov
761ad42968 lavf: remove FF_API_MAX_STREAMS cruft 2011-04-19 18:28:38 +02:00
Stefano Sabatini
c438c90756 ffmpeg: reformat resample condition code in transcode()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini
0f230c53df ffmpeg: factorize resampling condition check in do_video_out()
Simplify and improve readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini
6a46aab49b ffmpeg: prefer "dec" over "ist->st->codec" in do_video_out() snippet
Simplify, ease readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini
dfc6f5ae90 ffmpeg: improve reporting if size/pixel format changes
Use av_log() rather than fprintf(stderr, ...), and show information
related to the previous size/pixel format configuration.

Consistent with the corresponding message issued in case of audio
configuration change.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:58 +02:00
Stefano Sabatini
58bc9ac5cb ffmpeg: remove unused fields AVOutputStream.original_width/height
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:58 +02:00
Stefano Sabatini
b0b83973d1 ffmpeg: remove unused variable padding_src in do_video_out()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:47 +02:00
Michael Niedermayer
39aafa5ee9 ffmpeg:Daemon mode, add -d as first option to try it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-19 01:54:58 +02:00
Michael Niedermayer
17ee7b5515 ffmpeg:Fix negative verbositiy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-19 01:54:58 +02:00
Baptiste Coudurier
abf8342aa9 ffmpeg: fix -aspect cli option
Redesign the way -aspect option is handled. This is done by making
ffmpeg read the sample aspect ratio set in the corresponding input
stream by default, and overriding it using the value specified by
-aspect.

If the output display aspect ratio is specified with -aspect, it is
set at the end of the filterchain, thus overriding the value set by
filters in the filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors).
2011-04-16 16:47:26 -07:00
Stefano Sabatini
bdf3d3bf9d ffmpeg: use parse_number_and_die() when it makes sense
Prefer parse_number_or_die() over atoi()/atol() parsing for the options:
-pass, -top, -vc, and -qscale.

Improve input validation.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-16 21:47:06 +02:00
Stefano Sabatini
5381823eb6 ffmpeg: rename configure_filters() to configure_video_filters()
Mostly useful for the audio-filters branch, to make more apparent the
distinction between configure_audio_filters() and
configure_video_filters().

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-11 00:14:55 +02:00
Lou Logan
f8de11cf7d Redefine sameq
I think the documentation of sameq is causing confusion and misuse of
this option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-10 09:27:50 +02:00
Michael Niedermayer
d4d09329ee Merge remote branch 'qatar/master'
* qatar/master:
  lavf: bump minor and add an APIChanges entry for avformat cleanup
  lavf: get rid of ffm-specific stuff in avformat.h
Not pulled:  avio: deprecate av_protocol_next().
  avio: add a function for iterating though protocol names.
  lavf: rename a parameter of av_sdp_create from buff->buf
  lavf: rename avf_sdp_create to av_sdp_create.
  lavf: make av_guess_image2_codec internal
  avio: make URLProtocol internal.
  avio: make URLContext internal.
  lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
  lavf: use designated initializers for all protocols
  applehttp: don't use deprecated url_ functions.
  avio: move two ff_udp_* functions from avio_internal to url.h
  asfdec: remove a forgotten declaration of nonexistent function
  avio: deprecate the typedef for URLInterruptCB

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-09 03:17:07 +02:00
Anton Khirnov
3ee53dabcf lavf: get rid of ffm-specific stuff in avformat.h 2011-04-08 20:58:19 +02:00
Anton Khirnov
c3675dfe1e lavf: rename avf_sdp_create to av_sdp_create.
The new name is more consistent with the rest of the API.
2011-04-08 16:45:40 +02:00
Michael Niedermayer
c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Anton Khirnov
80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Anton Khirnov
f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Michael Niedermayer
6b1c886b65 Fix ticket20
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:21:44 +02:00
Michael Niedermayer
d6c858658f Revert "ffmpeg: fix aspect ratio setting"
This reverts commit d1eb50bb29.
Reason, it breaks fate
2011-04-06 03:01:25 +02:00
Michael Niedermayer
11d78415ca Merge remote branch 'qatar/master'
* qatar/master:
  psymodel: extend API to include PE and bit allocation.
  avio: always compile dyn_buf functions
  Remove unnecessary parameter from ff_thread_init() and fix behavior
  Revert "aac_latm_dec: use aac context and aac m4ac"
  configure: tell user if libva is enabled like the rest of external libs.
  Add silence support for AV_SAMPLE_FMT_U8.
  avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
  avio: deprecate av_url_read_seek
  avio: deprecate av_url_read_pause
  ac3enc: NEON optimised extract_exponents

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 02:59:49 +02:00
Michael Niedermayer
b5ef6f8eb4 Fix crash in ffmpeg.c with PIX_FMT_NONE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 01:09:04 +02:00
Stefano Sabatini
d1eb50bb29 ffmpeg: fix aspect ratio setting
This is done by adding a setsar filter at the beginning of the
configured filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors),
but directly modifies the filterchain structure.

This also changes the ffmpeg -aspect behavior, as following filters in
the filterchain can change the DAR/SAR set by the inserted setsar
filter.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-05 15:33:38 +02:00
Alex Converse
14cf0fd2f5 Add silence support for AV_SAMPLE_FMT_U8.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-05 09:08:04 +02:00
Lou Logan
8af3167bb6 Redefine sameq
I think the documentation of sameq is causing confusion and misuse of
this option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-05 03:21:36 +02:00
Peter Ross
100a6b7c77 ffmpeg: make 'bits_per_raw_sample' option more useful
Currently bits_per_raw_sample is exposed as an AVCodecContext option.
The option is not very useful, because ffmpeg 1) overwrites it with
a value from the upstream codec, or 2) it resets the value whenever
the video is resampled.

This patch adds the -bits_per_raw sample option to FFmpeg, and
caches the value like is done for the -pix_fmt option.

Example usage:
ffmpeg v210.avi -pix_fmt rgb48 -bits_per_raw_sample 10 out%d.dpx

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 00:35:58 +02:00
Michael Niedermayer
7d948dc424 Support changing pixel formats on avfilter input.
Fix issue2217
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:12 +02:00
Michael Niedermayer
b25d931a82 Fix stream mapping regression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 16:15:16 +02:00
Michael Niedermayer
e7c7b0d000 Another aspect ratio fix try. This leaves the setdar addition at the end (preferred by people).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 17:38:29 +02:00
Peter Ross
6408529b5d Increase ffmpeg video encoding buffer size to permit encoding of DPX images
The header generated by the DPX encoder is 1664 bytes.
2011-04-01 23:11:54 +11:00
Michael Niedermayer
859676dd42 Insert setdar at the begin of a filter chain instead the end.
This fixes -vf setsar

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 02:14:46 +02:00
Michael Niedermayer
8b8bf89e52 Revert "Do no modify terminal parameters using termios.h"
This reverts commit cb48e245e6.

Reason being we like pressing "q" to quit ffmpeg.

Conflicts:

	ffmpeg.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 00:22:29 +02:00
Stefano Sabatini
2ee85c0671 ffmpeg: warns the user when the selected pixel format is ignored 2011-03-27 15:53:45 +02:00
Stefano Sabatini
0c55c6d30e cmdutils: remove list_fmts(), simplify
The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().

Als fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int,  int)’ but argument is of type ‘char * (*)(char *, int,  enum AVSampleFormat)’
2011-03-26 14:40:30 +01:00
Michael Niedermayer
27ef7b1bcd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
  Use audio_service_type to set stream disposition.
  Add APIchanges entry for audio_service_type.
  Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
  configure: in check_ld, place new -l flags before existing ones
  support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
  doc: update build system documentation
  aacenc: indentation
  aacenc: fix the side calculation in search_for_ms
  vp8.c: rename EDGE_* to VP8_EDGE_*.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-26 03:06:30 +01:00
Justin Ruggles
34b47d7cbc Add audio_service_type field to AVCodecContext for encoding and reporting
of the service type in the audio bitstream.
2011-03-25 16:51:53 -04:00
Stefano Sabatini
4ffc79e7a0 ffmpeg: include conditionally the sws_flags variable
The variable is not used when libavfilter is enabled.
Fix the warning:
ffmpeg.c: At top level:
ffmpeg.c:242: warning: ‘sws_flags’ defined but not used
2011-03-25 18:42:51 +01:00
Michael Niedermayer
6dfb4ab8c8 Make multiple Ctrl-C capable to kill stuck protocols.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:26:49 +01:00
Michael Niedermayer
4fa0e24736 Merge remote-tracking branch 'newdev/master'
* newdev/master: (33 commits)
  Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
  Add kbdwin.o to AC3 decoder
  Detect byte-swapped AC-3 and support decoding it directly.
  cosmetics: indentation
  Always copy input data for AC3 decoder.
  ac3enc: make sym_quant() branch-free
  cosmetics: indentation
  Add a CPU flag for the Atom processor.
  id3v2: skip broken tags with invalid size
  id3v2: don't explicitly skip padding
  Make sure kbhit() is in conio.h
  fate: update wmv8-drm reference
  vc1: make P-frame deblock filter bit-exact.
  configure: Add the -D parameter to the dlltool command
  amr: Set the AVFMT_GENERIC_INDEX flag
  amr: Set the pkt->pos field properly to the start of the packet
  amr: Set the codec->bit_rate field based on the last packet
  rtsp: Specify unicast for TCP interleaved streams, too
  Set the correct target for mingw64 dlltool
  applehttp: Change the variable for stream position in seconds into int64_t
  ...

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/ac3dec.c
	libavformat/avio.h
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-23 02:42:56 +01:00
Dave Yeo
b58b9fa3b5 Make sure kbhit() is in conio.h
Conio.h is a non-standard header and may not have kbhit()
prototyped. This fixes compile on OS/2 where the EMX version (we're
using a fork) of conio.h only has getch() and getche().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-22 11:07:46 +00:00
Michael Niedermayer
d4a50a2100 Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-21 03:33:28 +01:00
Panagiotis H.M. Issaris
cb48e245e6 Do no modify terminal parameters using termios.h
Remove usage of tcgetattr and tcsetattr to modify terminal
parameters, and rely on ctrl-c to stop instead of pressing 'q'.
On systems with conio.h, keep the old behavior.

Changing the terminal settings causes problems if multiple instances
are running asynchronously on the same terminal, such as during a
parallel FATE run, or if the process crashes before restoring the
terminal.  In both cases, the terminal state is messed up requiring
a manual reset.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 21:13:26 +00:00
Stefano Sabatini
17a4ec8e7e ffmpeg: modify help text for the map option
Change "file:stream[:syncfile:syncstream]" to
"file.stream[:syncfile.syncstream]", the latter syntax is more
consistent with the stream identifier form printed by
av_dump_format(), and more readable. Both syntaxes are currently
accepted by the opt_map() code.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-20 21:07:03 +01: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
Thierry Foucu
a7844c580d Fix compilation error when CONFIG_AVFILTER is not defined.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 01:35:08 +01:00
Michael Niedermayer
27efa296c2 Merge branch 'master' of git://git.ffmpeg.org/ffmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-12 17:55:59 +01:00
Stefano Sabatini
5dbe78bf91 ffmpeg: remove unused variable in ffmpeg_exit()
Fix the warning:
ffmpeg.c: In function ‘ffmpeg_exit’:
ffmpeg.c:509: warning: unused variable ‘j’

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 14:08:27 +00:00
Carl Eugen Hoyos
0de8ebf491 Do not use AVFMT_FLAG_NONBLOCK for the output file.
Allows to use output device alsa.
2011-03-08 20:45:26 +01:00
Anton Khirnov
db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Michael Niedermayer
8993b5969a Make sure the first q press doesnt f*ck up the protocols and thus written files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-07 17:25:38 +01:00
Michael Niedermayer
9055240761 Fix seting of decode_interrupt_cb()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-07 17:23:32 +01:00