Commit Graph

430 Commits

Author SHA1 Message Date
Michael Niedermayer d1c28e3530 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: fix standalone compilation of OMA muxer
  build: fix standalone compilation of Microsoft XMV demuxer
  build: fix standalone compilation of Core Audio Format demuxer
  kvmc: fix invalid reads
  4xm: Add a check in decode_i_frame to prevent buffer overreads
  adpcm: fix IMA SMJPEG decoding
  options: set minimum for "threads" to zero
  bsd: use number of logical CPUs as automatic thread count
  windows: use number of CPUs as automatic thread count
  linux: use number of CPUs as automatic thread count
  pthreads: reset active_thread_type when slice thread_init returrns early
  v410dec: include correct headers
  Drop ALT_ prefix from BITSTREAM_READER_LE name.
  lavfi: always build vsrc_buffer.
  ra144enc: zero the reflection coeffs if the filter is unstable
  sws: readd PAL8 to isPacked()
  mov: Don't stick the QuickTime field ordering atom in extradata.
  truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/avcodec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavformat/Makefile
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 03:25:51 +01:00
Alex Converse 4bf3c8f226 mov: Don't stick the QuickTime field ordering atom in extradata.
The 'fiel' atoms can be found in H.264 tracks clobbering the extradata.
MJPEG supports non field based extradata, and this data should be
preserved when copying.
2011-12-21 22:04:37 -08:00
Michael Niedermayer 0988a6a035 movenc: disable iods by default
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Approved-by: MP4_maniac
Approved-by: Baptiste Coudurier
2011-12-16 03:50:19 +01:00
Michael Niedermayer 175cc378b3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Rudimentary IODs support.
  v410enc: fix output buffer size check
  v410enc: include correct headers
  fate: add -pix_fmt rgb48le to r210 test
  flvenc: Support muxing 16 kHz nellymoser
  configure: refactor list of programs into a variable
  fate: add r210 decoder test
  fate: split off Indeo FATE tests into their own file
  fate: split off ATRAC FATE tests into their own file
  fate: Add FATE tests for v410 encoder and decoder
  ARM: fix external symbol refs in rv40 asm
  westwood: Make sure audio header info is present when parsing audio packets
  libgsm: Reset the MS mode of GSM in the flush function
  libgsm: Set options on the right object
  ARM: dca: disable optimised decode_blockcodes() for old gcc

Conflicts:
	configure
	libavformat/movenc.c
	libavformat/movenc.h
	tests/fate2.mak
	tests/ref/acodec/alac
	tests/ref/vsynth1/mpeg4
	tests/ref/vsynth2/mpeg4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 01:23:15 +01:00
Alex Converse d3b8bde2f1 movenc: Rudimentary IODs support. 2011-12-15 14:06:13 -08:00
Michael Niedermayer 9aeaf62903 Fix all GNU %Ld
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 20:01:49 +01:00
Michael Niedermayer a6c4c0f274 mp4enc: Avoid storing sizes in trun when they all match.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 03:27:19 +01:00
Michael Niedermayer d9a41695ed mp4enc: Only store flags in trun when they differ from the default and set a sane default.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 03:11:53 +01:00
Michael Niedermayer 1f83f04609 mp4enc: dont store durations in trun if they are unneeded.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 03:02:20 +01:00
Michael Niedermayer 4a6855343f mp4enc: dont store cts in trun if they are unneeded.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 02:55:37 +01:00
Michael Niedermayer 7fad19a63d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: cabac: replace explicit memory references with "m" operands
  avplay: don't request a stereo downmix
  wmapro: use av_float2int()
  lavc: avoid invalid memcpy() in avcodec_default_release_buffer()
  lavu: replace int/float punning functions
  lavfi: install libavfilter/vsrc_buffer.h
  Remove extraneous semicolons
  sdp: Restore the original mp4 format h264 extradata if converted
  rtpenc: Add support for mp4 format h264
  rtpenc: Simplify code by introducing a separate end pointer
  movenc: Use the actual converted sample for RTP hinting
  Fix a bunch of common typos.

Conflicts:
	doc/developer.texi
	doc/eval.texi
	doc/filters.texi
	doc/protocols.texi
	ffmpeg.c
	ffplay.c
	libavcodec/mpegvideo.h
	libavcodec/x86/cabac.h
	libavfilter/Makefile
	libavformat/avformat.h
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/gxfenc.c
	libavformat/img2.c
	libavformat/movenc.c
	libavformat/mpegts.c
	libavformat/rtpenc_h264.c
	libavformat/utils.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-12 01:25:37 +01:00
Mans Rullgard 3383a53e7d lavu: replace int/float punning functions
The existing functions defined in intfloat_readwrite.[ch] are
both slow and incorrect (infinities are not handled).

This introduces a new header with fast, inline conversion
functions using direct union punning assuming an IEEE-754
system, an assumption already made throughout the code.

The one use of Intel/Motorola extended 80-bit format is
replaced by simpler code sufficient under the present
constraints (positive normal values).

The old functions are marked deprecated and retained for
compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 18:47:19 +00:00
Mans Rullgard 373211d828 Remove extraneous semicolons
These semicolons cause invalid empty top-level declarations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 17:23:24 +00:00
Martin Storsjö e2484fb644 movenc: Use the actual converted sample for RTP hinting
If an annex b bitstream is muxed into mov, the actual written
sample is reformatted to mp4 syntax before writing.

Currently, the RTP hints that copy data from the normal video
track, where the payload data might be offset compared to the
original sample that the RTP hinting used (when 3 byte
annex b startcodes have been converted into 4 byte mp4 format
startcodes).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-11 01:37:26 +02:00
Diego Biurrun da9cea77e3 Fix a bunch of common typos. 2011-12-11 00:32:25 +01:00
Michael Niedermayer c59b80c8d3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  isom: sort and pretty-print codec_movaudio_tags[]
  isom: remove pointless comments in codec_movaudio_tags[]
  isom: remove commented-out tag for vorbis
  movenc: write 'chan' tag for AC-3 in MOV
  mov: add support for reading and writing the 'chan' tag
  audioconvert: add some additional channel and channel layout macros
  audioconvert: change 7.1 "wide" layout to use side surround channels
  movenc: simplify handling of pcm vs. adpcm vs. other compressed codecs
  doc: update documentation to use avconv
  doc: update demuxers section
  doc: extend external library coverage
  doc: split platform specific information
  doc: port the git-howto to texinfo
  doc: provide fallback css and customize @float
  doc: document fate in a texinfo
  doxy: change hue value to match our green

Conflicts:
	doc/fate.txt
	doc/ffserver.texi
	doc/general.texi
	doc/muxers.texi
	doc/protocols.texi
	doc/t2h.init
	libavformat/isom.c
	libavformat/mov.c
	libavutil/avutil.h
	tests/ref/acodec/pcm_s16be
	tests/ref/acodec/pcm_s24be
	tests/ref/acodec/pcm_s32be
	tests/ref/acodec/pcm_s8
	tests/ref/lavf/mov

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-10 02:01:03 +01:00
Justin Ruggles 60cd802daf movenc: write 'chan' tag for AC-3 in MOV 2011-12-09 16:12:58 -05:00
Justin Ruggles 1fdf18f4b7 mov: add support for reading and writing the 'chan' tag
This implements reading the tag in the demuxer and adds support for writing it
in the muxer. Some example channel layout tables for muxing are included for
ac3, aac, and alac, but they are not utilized yet.
2011-12-09 16:12:58 -05:00
Justin Ruggles 8e8c51318c movenc: simplify handling of pcm vs. adpcm vs. other compressed codecs
Use Sound Sample Description Version 2 for all MOV files.
Updated FATE references accordingly.
Note that ADPCM is treated as compressed audio in version 2.
2011-12-09 16:12:58 -05:00
Michael Niedermayer 901af94b69 movenc: Always write EDTS when we are able to.
Inspired by a patch from Michael Root
Idea-by: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-07 05:21:37 +01:00
Michael Niedermayer 15130b94fc movenc: support spliting fragments based on bytesize instead of duration.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 16:28:36 +01:00
Michael Niedermayer cf8ec019ab movenc: fragment support
Reviewed-by: Baptiste Coudurier
Tested-with-QT: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 16:15:35 +01:00
Michael Niedermayer 9d76cf0b18 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Templatize the code for different g726 bitrate variants
  rv40: move loop filter to rv34dsp context
  lavf: make av_set_pts_info private.
  rtpdec: Add support for G726 audio
  rtpdec: Add an init function that can do custom codec context initialization
  avconv: make copy_tb on by default.
  matroskadec: don't set codec timebase.
  rmdec: don't set codec timebase.
  avconv: compute next_pts from input packet duration when possible.
  lavf: estimate frame duration from r_frame_rate.
  avconv: update InputStream.pts in the streamcopy case.

Conflicts:
	avconv.c
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/oss_audio.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavdevice/vfwcap.c
	libavdevice/x11grab.c
	libavformat/au.c
	libavformat/eacdata.c
	libavformat/flvdec.c
	libavformat/mpegts.c
	libavformat/mxfenc.c
	libavformat/rtpdec_g726.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 02:54:24 +01:00
Michael Niedermayer c863d3751f movenc: replace cluster memset by zeroing only the needed field.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-30 23:11:49 +01:00
Anton Khirnov c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Michael Niedermayer 4710993800 movenc: memset(0) new cluster elements after realloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-30 15:23:34 +01:00
Geek.Song 9cdf048ad2 movenc: Remove unneeded chunkSize field from MOVIentry
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-29 16:50:25 +01:00
Michael Niedermayer fc09bf57a6 movenc: Write file with minimal number of chunks for the given interleaving.
Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-29 04:51:47 +01:00
Carl Eugen Hoyos ed669c9bec movenc: Set a correct packet size for AMR-NB mode 15, "no data"
These packets are valid packets, and consist of 1 byte (which
contains the mode bits).

This had been analyzed and reported by Igor Levin, igor d levin comverse com.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:35:34 +02:00
Michael Niedermayer 3a56169fec movenc: reserved_moov_size, which allows placing moov at the begin of the file.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 22:18:01 +02:00
Carl Eugen Hoyos 891f76b0a8 Fix AMR block length for no data mode when muxing mov.
Fixes ticket #550.
This had been analyzed and reported by Igor Levin, igor d levin comverse com
2011-10-19 11:20:48 +02:00
Michael Niedermayer f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Anton Khirnov 145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Michael Niedermayer 6638207bce Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix 'heigth' vs. 'height' typos.
  lavc/lavf: use unique private classes.
  lavc: use designated initializers for av_codec_context_class

Conflicts:
	libavdevice/fbdev.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-06 03:42:14 +02:00
Anton Khirnov a4ea00d021 lavc/lavf: use unique private classes.
This is needed by the new AVOptions API.
2011-10-05 07:52:30 +02:00
Nicolas George 194c2432ee movenc: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 18:13:52 +02:00
Michael Niedermayer a6186f3a00 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: fix NULL reference in mov_write_tkhd_tag
  rmdec: Reject invalid deinterleaving parameters
  rv34: Fix potential overreads
  rv34: Fix buffer size used for MC of B frames after a resolution change
  rv34: Avoid NULL dereference on corrupted bitstream
  rv10: Reject slices that does not have the same type as the first one
  vf_yadif: add an option to enable/disable deinterlacing based on src frame "interlaced" flag
  vsrc_color: set output pos values to -1
  vsrc_color: add @file doxy
  vsrc_buffer: remove duplicated file description
  eval: implement not() expression
  eval: add sqrt function for computing the square root
  rmdec: use the deinterleaving mode and not the codec when creating audio packets.
  lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails

Conflicts:
	doc/eval.texi
	doc/filters.texi
	libavcodec/rv10.c
	libavfilter/vsrc_color.c
	libavformat/rmdec.c
	libavutil/avutil.h
	libavutil/eval.c
	tests/ref/fate/eval

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 22:45:34 +02:00
Anton Khirnov c92a2a4eb8 movenc: fix NULL reference in mov_write_tkhd_tag
st may be NULL when there are more mov streams than AVStreams, e.g. when
chapters are present.
2011-09-19 16:44:42 +02:00
Michael Niedermayer 9a9ceb8776 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavfi: add select filter
  oggdec: fix out of bound write in the ogg demuxer
  movenc: create an alternate group for each media type
  lavd: add libcdio-paranoia input device for audio CD grabbing
  rawdec: refactor private option for raw video demuxers
  pcmdec: use unique classes for all pcm demuxers.
  rawdec: g722 is always 1 channel/16kHz

Conflicts:
	Changelog
	configure
	doc/filters.texi
	libavdevice/avdevice.h
	libavfilter/avfilter.h
	libavfilter/vf_select.c
	tests/ref/lavf/mov

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-17 22:36:43 +02:00
Anton Khirnov 7574cacbd5 movenc: create an alternate group for each media type
Partially fixes bug 44.
2011-09-17 08:42:30 +02:00
Laurent Aimar b59efc9434 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-15 13:23:04 -07:00
Laurent Aimar e5e0580b93 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-10 00:26:48 +02:00
Michael Niedermayer 124deea1a0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libx264: only use ABR mode when the user explicitly set bitrate.
  libx264: use medium preset by default.
  mp2 encoder: make 128k the default bitrate.
  movenc: use libx264 by default when possible for mov, mp4 and psp
  avienc: saner default audio codec.
  matroskaenc: saner default codecs.
  avplay: add examples of how to specify size/pixel format through private options
  lavc: add A|E|D flags to "ac" and "ar" options

Conflicts:
	doc/ffplay.texi
	libavcodec/libx264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-22 15:00:53 +02:00
Anton Khirnov fb42d156ed movenc: use libx264 by default when possible for mov, mp4 and psp 2011-08-22 07:17:35 +02:00
Michael Niedermayer 41bf67d8d4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: change AV_LOG_INFO to AV_LOG_WARNING for some warnings
  avconv: remove a write-only variable
  avconv: remove pointless parameter from new_*_stream().
  avconv: cosmetics, move code
  avconv: cosmetics -- move copy_chapters().
  avconv: cosmetics -- move parse_forced_key_frames().
  lavc: add audio flag to the 'b' option, deprecate 'ab'.
  avconv: rename sameq to same_quant
  doc/avconv: add forgotten end of chapter.
  Changelog: document avconv incompatibilities with ffmpeg.
  avconv: replace -vcodec/-acodec/-scodec with a better system.
  avconv: remove presets.
  svq3: propagate codec memory allocation failure in context init

Conflicts:
	Changelog
	avconv.c
	libavcodec/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-16 23:47:35 +02:00
Anton Khirnov eb97dbb05a movenc: change AV_LOG_INFO to AV_LOG_WARNING for some warnings 2011-08-16 10:34:17 +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
Anton Khirnov dfc2c4d900 lavf: use designated initialisers for all (de)muxers.
It's more readable and less prone to breakage.
2011-07-17 06:58:37 +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 001d668d40 lavf: factor out conversion of ISO8601 string to unix time 2011-07-13 12:14:25 +02:00