Commit Graph

1500 Commits

Author SHA1 Message Date
Michael Niedermayer b404ab9e74 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov: Don't av_malloc(0).
  avconv: only allocate 1 AVFrame per input stream
  avconv: fix memleaks due to not freeing the AVFrame for audio
  h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg).
  misc Doxygen markup improvements
  doxygen: eliminate Qt-style doxygen syntax
  g722: Add a regression test for muxing/demuxing in wav
  g722: Change bits per sample to 4
  g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample
  api-example: update to use avcodec_decode_audio4()
  avplay: use avcodec_decode_audio4()
  avplay: use a separate buffer for playing silence
  avformat: use avcodec_decode_audio4() in avformat_find_stream_info()
  avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3()
  mov: Allow empty stts atom.
  doc: document preferred Doxygen syntax and make patcheck detect it

Conflicts:
	avconv.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/version.h
	libavformat/mov.c
	tests/codec-regression.sh
	tests/fate/h264.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 01:37:27 +01:00
Gavin Kinsey 4547d883d3 Fix compilation for C++ applications
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 21:13:45 +01:00
Reimar Döffinger d086c1203c Add coverage exclusions for test code.
For some of the code e.g. doing timing measurements there is no
real point in running regression testing on it, thus it should
not be counted against coverage.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-12-05 20:05:44 +01:00
Diego Biurrun c68fafe0d2 doxygen: eliminate Qt-style doxygen syntax 2011-12-05 13:06:58 +01:00
Michael Niedermayer dff97be808 av_opt: add av_opt_ptr() to return a pointer to a field of a object based on
an AVClass

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 03:22:04 +01:00
Michael Niedermayer 707138593a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcmenc: cosmetics: pretty-printing
  ac3dec: cosmetics: pretty-printing
  yuv4mpeg: cosmetics: pretty-printing
  shorten: remove dead initialization
  roqvideodec: set AVFrame reference before reget_buffer.
  bmp: fix some 1bit samples.
  latmdec: add fate test for audio config change
  oma: PCM support
  oma: better format detection with small probe buffer
  oma: clearify ambiguous if condition
  wavpack: Properly clip samples during lossy decode
  Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
  Cleaned pixdesc.c file in libavutil
  zmbv.c: coding style clean-up.
  xan.c: coding style clean-up.
  mpegvideo.c: code cleanup - first 500 lines.

Conflicts:
	Changelog
	libavcodec/adpcmenc.c
	libavcodec/bmp.c
	libavcodec/zmbv.c
	libavutil/log.c
	libavutil/pixdesc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 00:11:57 +01:00
Yordan Makariev 425b45d4b0 Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 15:13:48 -08:00
Tsvetelina Borisova 4a59eca97a Cleaned pixdesc.c file in libavutil
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 14:36:11 -08:00
Nicolas George 976b095939 lavu/error: define AVERROR_BUG.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 15:18:58 +01:00
Nicolas George 757cb3b46a avutil: av_x_if_null: remove const for the return value.
This is the usual weirdness with const/non-const pointers through a function.
See the prototype of strchr for a standard example.

The function had to be moved down, below the point where stdint.h is
indirectly included.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 15:18:15 +01:00
Giorgio Vazzana 208bcc6b5b libavutil: increase struct SampleFmtInfo member 'name' length to 8
This is necessary since some sample format names are longer than 3 characters.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 00:35:20 +01:00
Michael Niedermayer 313d30c180 avutil: revert project name messing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-29 16:09:56 +01:00
Michael Niedermayer 4dcd1a3145 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adtsenc: Check frame size.
  txd: Fix order of operations.
  APIchanges: fill in some blanks
  timer: fix misspelling of "decicycles"
  Eliminate pointless 0/NULL initializers in AVCodec and similar declarations.
  indeo3: cosmetics
  md5proto: Fix order of operations.
  dca: Replace oversized unused get_bits() with skip_bits_long().

Conflicts:
	doc/APIchanges
	libavformat/mmsh.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-29 00:20:29 +01:00
Mans Rullgard 60084a1723 timer: fix misspelling of "decicycles"
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-28 14:34:42 +00:00
Michael Niedermayer b14a2381f8 pixfmt: Add 32bit rgb without alpha formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-28 02:44:05 +01:00
Vitor Sessak ca55606a51 x86inc: Flag shufps as an floating-point instruction for the AVX emulation code.
Without this, code like "shufps m0, m1, m2, 0xaa" would not work in CPUs
not supporting SSE2.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-28 00:24:21 +01:00
Vitor Sessak 6b6ee58249 x86inc: Flag shufps as an floating-point instruction for the AVX emulation code.
Without this, code like "shufps m0, m1, m2, 0xaa" would not work in CPUs
not supporting SSE2.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-27 13:10:33 -08:00
Michael Niedermayer 022f8d27dd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: Readd #define _SVID_SOURCE
  Fix av_get_channel_layout_string() for positions >31
  configure: Store vda lib flags in extralibs instead of ldflags
  Make channel layout masks unsigned
  dca: ARMv6 optimised decode_blockcode()
  nullenc: drop AVFMT_RAWPICTURE from the flags
  frame-mt: return consumed packet size in ff_thread_decode_frame
  aacdec: add more fate tests covering SBR and PS
  MK(BE)TAG: avoid undefined shifts

Conflicts:
	configure
	libavcodec/arm/dca.h
	libavcodec/dca.c
	libavcodec/mlp_parser.c
	libavcodec/version.h
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/defaults.c
	libavutil/audioconvert.c
	libavutil/avutil.h
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-26 01:12:08 +01:00
Mans Rullgard 019dd23657 Fix av_get_channel_layout_string() for positions >31
A value shifted left by >31 needs to have a 64-bit type.
As there are no defined channels in this range, the fix
is purely theoretical at this point, although it does
avoid some invalid shifts triggering the overflow
checker.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 15:19:55 +00:00
Mans Rullgard cc276c85d1 Make channel layout masks unsigned
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.

Fixes a few invalid shifts.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 13:19:54 +00:00
Michael Niedermayer 92afb43162 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  snow: split snow in snowdec and snowenc
  tiffenc: deprecate using compression_level
  swscale: fix failing fate tests.
  swscale: add support for planar RGB input.
  h264: add support for decoding planar RGB images.
  Clean up swscale pixfmt macros using av_pix_fmt_descriptors[].
  pixfmt: add planar RGB formats.

Conflicts:
	libavcodec/h264.c
	libavcodec/snow.c
	libavcodec/utils.c
	libavutil/avutil.h
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-25 04:34:44 +01:00
Mans Rullgard 6b34fbba9b MK(BE)TAG: avoid undefined shifts
Casting the left-most byte to unsigned avoids an undefined
result of the shift by 24 if bit 7 is set.  This affects
the rm demuxer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 00:20:03 +00:00
Ronald S. Bultje f7f1835258 swscale: fix failing fate tests.
isGray() is left as a FIXME for later.
2011-11-24 12:21:03 -08:00
Ronald S. Bultje 6b0768e202 Clean up swscale pixfmt macros using av_pix_fmt_descriptors[]. 2011-11-24 08:24:55 -08:00
Ronald S. Bultje bd97b2e1ce pixfmt: add planar RGB formats. 2011-11-24 08:13:50 -08:00
Clément Bœsch 573ffbb3b5 lavu: add av_get_alt_sample_fmt(). 2011-11-24 16:55:45 +01:00
Michael Niedermayer 8e576d5830 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavutil: add utility functions to simplify allocation of audio buffers.
  libavutil: add planar sample formats and av_sample_fmt_is_planar()
  avconv: fix segfault at EOF with delayed pictures
  pcmdec: remove unneeded resetting of samples pointer
  avconv: remove a now unused parameter from output_packet().
  avconv: formatting fixes in output_packet()
  avconv: declare some variables in blocks where they are used
  avconv: use the same behavior when decoding audio/video/subs
  bethsoftvideo: return proper consumed size for palette packets.
  cdg: skip packets that don't contain a cdg command.
  crcenc: add flags
  avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.
  tiffenc: add a private option for selecting compression algorithm
  md5enc: add flags
  ARM: remove needless .text/.align directives

Conflicts:
	doc/APIchanges
	libavcodec/tiffenc.c
	libavutil/avutil.h
	libavutil/samplefmt.c
	libavutil/samplefmt.h
	tests/ref/fate/bethsoft-vid
	tests/ref/fate/cdgraphics
	tests/ref/fate/film-cvid-pcm-stereo-8bit
	tests/ref/fate/mpeg2-field-enc
	tests/ref/fate/nuv
	tests/ref/fate/tiertex-seq
	tests/ref/fate/tscc-32bit
	tests/ref/fate/vmnc-32bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-24 03:32:24 +01:00
Justin Ruggles bbb46f3ec7 libavutil: add utility functions to simplify allocation of audio buffers.
Based on code by Stefano Sabatini.
2011-11-23 18:39:28 -05:00
Justin Ruggles 8889cc4f5b libavutil: add planar sample formats and av_sample_fmt_is_planar() 2011-11-23 18:39:28 -05:00
Michael Niedermayer 0b9a69f244 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  aacdec: Fix PS in ADTS.
  avconv: Consistently use PIX_FMT_NONE.
  dsputil: use cpuflags in x86 emu_edge_core
  dsputil: use movups instead of movdqu in ff_emu_edge_core_sse()
  wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
  mov: Remove some redundant and obsolete comments.
  Add libavutil/mathematics.h #includes for INFINITY
  doxy: structure libavformat groups
  doxy: introduce an empty structure in libavcodec
  doxy: provide a start page and document libavutil
  doxy: cleanup pixfmt.h
  regtest: split video encode/decode tests into individual targets
  ARM: add explicit .arch and .fpu directives to asm.S
  pthread: do not touch has_b_frames
  avconv: cleanup the transcoding loop in output_packet().
  avconv: split subtitle transcoding out of output_packet().
  avconv: split video transcoding out of output_packet().
  avconv: split audio transcoding out of output_packet().
  avconv: reindent.
  avconv: move streamcopy-only code out of decoding loop.
  ...

Conflicts:
	avconv.c
	libavcodec/aaccoder.c
	libavcodec/pthread.c
	libavcodec/version.h
	libavutil/audioconvert.h
	libavutil/avutil.h
	libavutil/mem.h
	tests/ref/vsynth1/dv
	tests/ref/vsynth1/mpeg2thread
	tests/ref/vsynth2/dv
	tests/ref/vsynth2/mpeg2thread

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 04:02:17 +01:00
Luca Barbato e361b5089a doxy: structure libavformat groups 2011-11-22 17:16:02 +01:00
Luca Barbato e97e5a2e02 doxy: introduce an empty structure in libavcodec 2011-11-22 17:16:02 +01:00
Luca Barbato 757cd8d876 doxy: provide a start page and document libavutil
Introduce a basic layout, the subpages are currently left empty.

Split libavutil in multiple groups as example of the structure
2011-11-22 17:16:02 +01:00
Luca Barbato 384bdaceeb doxy: cleanup pixfmt.h
Remove the dubious warning about the header being private and
add some formatting
2011-11-22 17:16:02 +01:00
Michael Niedermayer a9011623ea avopts: Fix random values being printed in error messages:
Bug introduced in:
commit 7bb1807c2d
Author: Anton Khirnov <anton@khirnov.net>
Date:   Tue Aug 23 12:58:49 2011 +0200

    AVOptions: refactor set_number/write_number

    write_number() does the actual writing of the supplied
    number to destination. Move finding the option and choosing destination
    address out of it.
2011-11-20 15:02:36 +01:00
Reimar Döffinger e8ab4bac0c Fix compilation with YASM.
YASM does not support %ifempty even though it is in the official
NASM documentation and supported since NASM 2.02.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-20 15:03:32 +01:00
Reimar Döffinger 03f1caec61 HACK: fix compilation with NASM.
This issue is actually already fixed in NASM, however it will be a
bit before it arrives everywhere.
This should work as a temporary work-around.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-20 12:35:10 +01:00
Michael Niedermayer dbb38bc389 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: Fix stack alignment for SSE
  avcodec: move some AVCodecContext fields to an internal struct.
  avcodec: use av_opt_set() instead of deprecated av_set_string3()
  avcodec: fix some const warnings
  avcodec: remove pointless AVOption, internal_buffer_count
  imgutils: Fix illegal read.

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-20 02:46:06 +01:00
Thierry Foucu c693aa6f71 imgutils: Fix illegal read.
Found with address sanitizer.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-11-18 17:42:49 -08:00
Michael Niedermayer 8709ba907a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegaudiodec: Don't use a nonexistent log context for av_dlog
  avformat: Accept the ISO8601 separate format as input, too
  avformat: Interpret times in ff_iso8601_to_unix_time as UTC
  avutil: Add av_timegm as a public function
  cinepak: Add another special case so that it can handle the following file:
  lagarith: add some RGBA decoding support
  lagarith: Add correct line prediction for RGB

Conflicts:
	doc/APIchanges
	libavcodec/cinepak.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-17 02:44:33 +01:00
Martin Storsjö 627067118c avutil: Add av_timegm as a public function
This is useful, since the normal timegm function isn't a standard
function (requiring _BSD_SOURCE or _SVID_SOURCE on glibc to
be visible, and not available on e.g. windows). The widely available
function mktime uses the local time zone, which requires ugly
workarounds to handle UTC time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 11:22:41 +02:00
Michael Niedermayer d5e1244ca7 opt: Fix *av_opt_find2(NULL)
Fixes Ticket650

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-15 22:43:21 +01:00
Michael Niedermayer a72580fc9e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  binkvideo: simplify and remove invalid shifts
  pulse: compute frame_duration once and fix it
  lavf: simplify format_child_class_next()
  hwaccel: OS X Video Decoder Acceleration (VDA) support.
  doc: add support for an optional navigation bar in texi2html pages

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/vda.c
	libavcodec/vda.h
	libavcodec/vda_h264.c
	libavcodec/vda_internal.h
	libavcodec/version.h
	libavformat/options.c
	libavutil/avutil.h
	libavutil/pixfmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-15 03:13:42 +01:00
Sebastien Zwickert ac3dbb4d58 hwaccel: OS X Video Decoder Acceleration (VDA) support.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-11-14 16:07:32 +01:00
Michael Niedermayer 29582df797 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vble: remove vble_error_close
  VBLE Decoder
  tta: use an integer instead of a pointer to iterate output samples
  shorten: do not modify samples pointer when interleaving
  mpc7: only support stereo input.
  dpcm: do not try to decode empty packets
  dpcm: remove unneeded buf_size==0 check.
  twinvq: add SSE/AVX optimized sum/difference stereo interleaving
  vqf/twinvq: pass vqf COMM chunk info in extradata
  vqf: do not set bits_per_coded_sample for TwinVQ.
  twinvq: check for allocation failure in init_mdct_win()
  swscale: add padding to conversion buffer.
  rtpdec: Simplify finalize_packet
  http: Handle proxy authentication
  http: Print an error message for Authorization Required, too
  AVOptions: don't return an invalid option when option list is empty
  AIFF: add 'twos' FourCC for the mux/demuxer (big endian PCM audio)

Conflicts:
	libavcodec/avcodec.h
	libavcodec/tta.c
	libavcodec/vble.c
	libavcodec/version.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-12 02:50:25 +01:00
Anton Khirnov e1e22851c1 AVOptions: don't return an invalid option when option list is empty 2011-11-11 08:27:16 +01:00
Michael Niedermayer 6d4731e1f7 avutil: add av_noreturn
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 04:24:00 +01:00
Michael Niedermayer 6d91045d83 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  doc: update libavfilter documentation
  tls: Use the URLContext as logging context
  aes: Avoid illegal read and don't generate more key than we use.
  mpc7: Fix memset call in mpc7_decode_frame function
  atrac1: use correct context for av_log()
  apedec: consume the whole packet when copying to the decoder buffer.
  apedec: do not needlessly copy s->samples to nblocks.
  apedec: check output buffer size after calculating actual output size
  apedec: remove unneeded entropy decoder normalization.
  truespeech: use memmove() in truespeech_update_filters()
  vorbisdec: remove AVCODEC_MAX_AUDIO_FRAME_SIZE check
  vorbisdec: remove unneeded buf_size==0 check
  vorbisdec: return proper error codes instead of made-up ones
  http: Don't add a Range: bytes=0- header for POST
  sunrast: Check for invalid/corrupted bitstream
  http: Change the chunksize AVOption into chunked_post
  http: Add encoding/decoding flags to the AVOptions
  avconv: remove some codec-specific hacks
  crypto: add decoding flag to options.
  tls: use AVIO_FLAG_NONBLOCK instead of deprecated URL_FLAG_NONBLOCK
  ...

Conflicts:
	doc/libavfilter.texi
	libavcodec/atrac1.c
	libavcodec/sunrast.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 02:50:35 +01:00
Alex Converse c9e5ac3380 aes: Avoid illegal read and don't generate more key than we use. 2011-11-10 10:15:59 -08:00
Nicolas George e7062a1e9f audioconvert: make av_get_channel_layout accept composite names.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 21:03:47 +01:00