Commit Graph

1416 Commits

Author SHA1 Message Date
Carl Eugen Hoyos 08d2cee49c Fix -loop_input. 2011-08-03 11:45:33 +02:00
Carl Eugen Hoyos 8460b757c2 Do not ignore opt_default() return values. 2011-08-01 00:58:49 +02:00
Michael Niedermayer 2dd2abe391 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h263dec: Propagate AV_LOG_ERRORs from slice decoding through frame decoding with sufficient error recognition
  x86: cabac: don't load/store context values in asm
  H.264: optimize CABAC x86 asm for Atom
  vp3/theora: flush after seek.
  doc/fftools-common-opts: wording fixes missing from the previous commit.
  doc: document using AVOptions in fftools.
  cmdutils: add codec_opts parameter to setup_find_stream_info_opts()
  cmdutils: clarify documentation for filter_codec_opts()
  cmdutils: clarify documentation for setup_find_stream_info_opts()
  lavf: add forgotten attribute_deprecated to av_find_stream_info()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-29 01:50:53 +02:00
Stefano Sabatini 8ec19f84e1 cmdutils: add codec_opts parameter to setup_find_stream_info_opts()
Avoid brittle and obfuscating reference to a global.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-07-28 17:13:14 +02:00
Michael Niedermayer 981f6fc988 ffmpeg: better timebase guessing for stream copy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-25 20:48:55 +02:00
Nicolas George 257f274dfa Do not use AVFMT_FLAG_NONBLOCK for the output file.
Restore the commit 0de8ebf by Carl Eugen Hoyos that was lost during the
merge 58257ea.
2011-07-19 10:12:33 +02:00
Michael Niedermayer 78accb876c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffmpeg: fix some indentation
  ffmpeg: fix operation with --disable-avfilter
  simple_idct: remove disabled code
  motion_est: remove disabled code
  vc1: remove disabled code
  fate: separate lavf-mxf_d10 test from lavf-mxf
  cabac: Move code only used in the cabac test program to cabac.c.
  ffplay: warn that -pix_fmt is no longer working, suggest alternative
  ffplay: warn that -s is no longer working, suggest alternative
  lavf: rename enc variable in utils.c:has_codec_parameters()
  lavf: use designated initialisers for all (de)muxers.
  wav: remove a use of deprecated AV_METADATA_ macro
  rmdec: remove useless ap parameter from rm_read_header_old()
  dct-test: remove write-only variable
  des: fix #if conditional around P_shuffle
  Use LOCAL_ALIGNED in ff_check_alignment()

Conflicts:
	ffmpeg.c
	libavformat/avidec.c
	libavformat/matroskaenc.c
	libavformat/mp3enc.c
	libavformat/oggenc.c
	libavformat/utils.c
	tests/ref/lavf/mxf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-17 20:12:02 +02:00
Mans Rullgard 08e09ed7db ffmpeg: fix some indentation
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-17 17:10:47 +01:00
Mans Rullgard e9f98c9022 ffmpeg: fix operation with --disable-avfilter
The width and height must be copied from the input before
being used.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-17 17:10:37 +01:00
Michael Niedermayer c31a5b23b4 Revert "ffmpeg: get rid of a pointless limit on number of streams."
This reverts commit c7dd3e7e43

Conflicts:

	ffmpeg.c
2011-07-16 19:33:27 +02:00
Michael Niedermayer 32aef7d019 ffmpeg: fix muxer private options (bug introduced by anton khirnov)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-15 18:27:30 +02:00
Michael Niedermayer 042f9d62ca Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Automatically add more flags required on symbian
  mem.h: switch doxygen parameter order to match function prototype
  doxygen: replace @sa tag by the more readable but equivalent @see
  doxygen: use Doxygen markup for authors and web links where appropriate
  doxygen: do not include license boilerplate in Doxygen documentation
  ac3enc: Mark AVClasses const
  ffserver: Replace two loops with one loop.
  ffmpeg: Fix the check for experimental codecs
  swscale: extend mmx padding.
  swscale: clip unscaled colorspace conversion path.
  doxygen: misc consistency cosmetics
  doc: remove file name from @file directive in Doxygen usage example
  doxygen: consistently place brief description
  doxygen: place empty line between brief description and detailed description
  avformat_open_input(): Add braces to shut up gcc warning.

Conflicts:
	libavcodec/8svx.c
	libavcodec/tiff.c
	libavcodec/tiff.h
	libavcodec/vaapi_h264.c
	libavcodec/vorbis.c
	libavcodec/vorbisdec.c
	libavcodec/vp6.c
	libswscale/swscale_unscaled.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-15 17:51:09 +02:00
Martin Storsjö daca33659d ffmpeg: Fix the check for experimental codecs
The variable 'codec' was used uninitialized here.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-07-14 23:37:18 +03:00
Michael Niedermayer 321b2a9ded ffmpeg: loose lowres hackery
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 21:22:12 +02:00
Michael Niedermayer 5dc6bd86f0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in missing hashes and dates.
  Add an APIChanges entry and bump minor versions for recent changes.
  ffmpeg: print the low bitrate warning after the codec is openend.
  doxygen: Move function documentation into the macro generating the function.
  doxygen: Make sure parameter names match between .c and .h files.
  h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
  H.264: Add more x86 assembly for 10-bit H.264 predict functions
  lavf: fix invalid reads in avformat_find_stream_info()
  cmdutils: replace opt_default with opt_default2() and remove set_context_opts
  ffmpeg: use new avcodec_open2 and avformat_find_stream_info API.
  ffplay: use new avcodec_open2 and avformat_find_stream_info API.
  cmdutils: store all codec options in one dict instead of video/audio/sub
  ffmpeg: check experimental flag after codec is opened.
  ffmpeg: do not set GLOBAL_HEADER flag in the options context

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 20:44:58 +02:00
Anton Khirnov 1885824b20 ffmpeg: deprecate -vc and -tvstd
They've been replaced by demuxer private options.

55ba12e300
2011-07-14 18:22:37 +02:00
Anton Khirnov f790d0092e ffmpeg: use new avformat_open_* API.
8035f42968
2011-07-14 18:22:36 +02:00
Anton Khirnov 8d03ca085f ffmpeg: print the low bitrate warning after the codec is openend.
This doesn't access avcodec_opts, so it works with the new options
passing system.

Makes opt_bitrate() unneeded, so it's removed.
2011-07-14 14:15:41 +02:00
Michael Niedermayer 80e4fe4063 Merge commit 'b5849f77095439e994b11c25e6063d443b36c228'
* commit 'b5849f77095439e994b11c25e6063d443b36c228': (21 commits)
  ac3enc: merge AC3MDCTContext with AC3EncodeContext.
  ac3enc: prefer passing AC3EncodeContext rather than AVCodecContext
  ac3enc: fix memleak
  mpeg1video: add CODEC_CAP_SLICE_THREADS.
  lavf: fix segfault in av_open_input_stream()
  mpegtsenc: set Random Access indicator on keyframe start packets
  lavf: Cleanup try_decode_frame() logic.
  Replace some gotos that lead to single return statements by direct return.
  build: move tests/seek_test.c to libavformat and reuse generic build rules
  mxfenc: include needed header for ff_iso8601_to_unix_time() prototype
  Add a check for strptime().
  lavf: factor out conversion of ISO8601 string to unix time
  wav: parse 'bext' metadata
  wav: keep parsing until EOF if the input is seekable and we know the size of the data tag
  wav: Refactor the tag checking into a switch statement
  wav: make sure neither data_size nor sample_count is negative.
  wav: refactor the 'fmt ' tag search and parsing.
  wav: add an option for writing BEXT chunk
  ffmpeg: get rid of a pointless limit on number of streams.
  ffmpeg: remove an unused define.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 02:24:10 +02:00
Anton Khirnov bf174a70cd ffmpeg: use new avcodec_open2 and avformat_find_stream_info API. 2011-07-13 23:17:42 +02:00
Anton Khirnov a9eb4f0899 ffmpeg: check experimental flag after codec is opened.
This doesn't access avcodec_opts, so it will work with the new options
passing system.
2011-07-13 23:17:42 +02:00
Anton Khirnov 8e2d085516 ffmpeg: do not set GLOBAL_HEADER flag in the options context
The removed lines have no effect, since the flag is set on all encoder
for the given file and avcodec_opts are reset between files.
2011-07-13 23:17:42 +02:00
Diego Biurrun 71a1d1116f Replace some gotos that lead to single return statements by direct return. 2011-07-13 17:53:49 +02:00
Anton Khirnov c7dd3e7e43 ffmpeg: get rid of a pointless limit on number of streams. 2011-07-13 10:37:24 +02:00
Anton Khirnov 646a9a1893 ffmpeg: remove an unused define. 2011-07-13 10:37:20 +02:00
Michael Niedermayer bb258fb995 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doc: Improve references to external URLs.
  h264: move decode_mb_skip() from h264.h to h.264_mvpred.h
  ffplay: skip return value of avcodec_decode_video2 / avcodec_decode_subtitle2
  dnxhdenc: Replace a forward declaration by the proper #include.
  h264: move h264_mvpred.h include.
  pix_fmt: Fix number of bits per component in yuv444p9be
  lavf: deprecate AVFormatContext.timestamp
  ffmpeg: merge input_files_ts_scale into InputStream.
  ffmpeg: don't abuse a global for passing sample format from input to output
  ffmpeg: don't abuse a global for passing channel layout from input to output
  ffmpeg: factor common code from new_a/v/s/d_stream to new_output_stream()
  matroskaenc: make SSA default subtitle codec.
  oggdec: prevent heap corruption.

Conflicts:
	doc/developer.texi
	doc/faq.texi
	doc/general.texi
	ffmpeg.c
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-13 00:42:11 +02:00
Anton Khirnov 5f847bf61d lavf: deprecate AVFormatContext.timestamp
It's replaced by 'creation_time' metadata tag.
2011-07-12 15:30:10 +02:00
Anton Khirnov b12c259252 ffmpeg: merge input_files_ts_scale into InputStream. 2011-07-12 15:29:21 +02:00
Anton Khirnov 6fbf2485ad ffmpeg: don't abuse a global for passing sample format from input to output
It's broken with multiple files or audio streams.
2011-07-12 15:28:53 +02:00
Anton Khirnov 87c739a395 ffmpeg: don't abuse a global for passing channel layout from input to output
It's broken with multiple files or audio streams.
2011-07-12 15:28:22 +02:00
Anton Khirnov 1cede1d011 ffmpeg: factor common code from new_a/v/s/d_stream to new_output_stream() 2011-07-12 15:26:04 +02:00
Michael Niedermayer 58257ea29e Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  mp3enc: write a xing frame containing number of frames in the file
  lavf: update AVStream.nb_frames when muxing.
  ffmpeg: remove unused variables from InputStream.
  doc: update ffmpeg -ar and -ac documentation to reflect reality.
  ffmpeg: remove pointless if (nb_input_files)
  ffmpeg: merge input_files_ts_offset into input_files.
  ffmpeg: merge input_codecs into input_streams.
  ffmpeg: drop AV prefixes from struct names.
  ffmpeg: deprecate loop_input and loop_output options
  gif: add loop private option.
  img2: add loop private option.
  AVOptions: in av_opt_find() don't return named constants unless unit is specified.
  x11grab: replace undocumented nomouse hackery with a private option.
  dict: extend documentation.
  lls: whitespace cosmetics
  docs: Use proper markup for a literal command line option
  docs: Remove a remark that isn't relevant any longer
  docs: Explain how to regenerate import libraries with MSVC tools
  docs: Mention that libraries for MSVC can be built with a cross compiler
  docs: Remove old docs that mention setting up a build environment with lib.exe
  ...

Conflicts:
	doc/ffmpeg.texi
	doc/general.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/dnxhddata.c
	libavformat/mp3enc.c
	libavformat/utils.c
	libavutil/Makefile
	tests/copycooker.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-09 02:06:40 +02:00
Anton Khirnov e98bc78ca1 ffmpeg: remove unused variables from InputStream. 2011-07-08 19:58:23 +02:00
Anton Khirnov 20f9f21fd4 ffmpeg: remove pointless if (nb_input_files)
It's required to be non-zero since
cc58300e30
2011-07-08 19:58:23 +02:00
Anton Khirnov 27e91f37f5 ffmpeg: merge input_files_ts_offset into input_files. 2011-07-08 19:58:23 +02:00
Anton Khirnov 9e253c13d0 ffmpeg: merge input_codecs into input_streams.
There's no point in keeping them separate.
2011-07-08 19:58:23 +02:00
Anton Khirnov 17c8cc550d ffmpeg: drop AV prefixes from struct names.
Those are reserved for the libs.
2011-07-08 19:58:22 +02:00
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