Commit Graph

18708 Commits

Author SHA1 Message Date
Michael Niedermayer
6bfb3042b3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: use default alignment for audio buffer
  avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
  avutil: use align == 0 for default alignment in audio sample buffer functions
  avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc()
  avconv: remove OutputStream.picref.
  avconv: only set SAR once on the decoded frame.
  avcodec: validate the channel layout vs. channel count for decoders
  audioconvert: make av_get_channel_layout accept composite names.
  avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()

Conflicts:
	doc/APIchanges
	ffmpeg.c
	libavcodec/utils.c
	libavcodec/version.h
	libavutil/audioconvert.c
	libavutil/audioconvert.h
	libavutil/avutil.h
	libavutil/samplefmt.c
	libavutil/samplefmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 23:02:33 +02:00
Michael Niedermayer
3532a87a25 exr: optimize exr_halflt2uint()
30% faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 20:55:09 +02:00
Reimar Döffinger
438f3ef821 RV20: try keeping aspect during resolution changes.
Resolution changes are usually only used to scale with
network bandwidth, the (full) resolution specified in the
RM header really is authoritative.
While I am not sure this is the best solution, it is a
conservative approach that still should fix the most
common cases.
In particular, it fixes aspect with the sample from trac
issue #785 (in MPlayer, ffplay seems to just ignore
sample aspect changes in mid-playback).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-09 17:21:34 +02:00
Reimar Döffinger
1d130328ed aacdec: update debug code to always print the processed data.
When decoding LATM, this function will not process extradata
but a different buffer.
It seems this was forgotten to update when LATM support
was added.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-09 17:21:34 +02:00
Justin Ruggles
c58846f3a8 avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
Use default alignment in audio_get_buffer()
2012-04-09 10:20:35 -04:00
Justin Ruggles
1337de0c4b avcodec: validate the channel layout vs. channel count for decoders
Set avctx->channel_layout to 0 if the channel count does not match
avctx->channels.
2012-04-08 18:45:58 -04:00
Michael Niedermayer
5d6a40bc74 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtsp: Don't use av_malloc(0) if there are no streams
  rtsp: Don't use uninitialized data if there are no streams
  vaapi: mpeg2: fix slice_vertical_position calculation.
  hwaccel: mpeg2: decode first field, if requested.
  cosmetics: Fix indentation
  rtsp: Don't expose the MS-RTSP RTX data stream to the caller

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 20:55:11 +02:00
Reimar Döffinger
03ef5047d1 Fix nellymoser encoder crash with hardcoded tables.
Use the correct init function to avoid crashes due to writing
to a rodata location.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-08 20:26:25 +02:00
Michael Niedermayer
1d80c8db27 ffv1: set slice geometry based on user specified slices.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 17:03:38 +02:00
Michael Niedermayer
8dfbc1c5cf ffv1: allow enabling of version 2 by using some of its features.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 16:48:34 +02:00
Michael Niedermayer
1b295a17d7 ffv1: fix version=2 chroma handling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 16:01:37 +02:00
Michael Niedermayer
5612359501 ffv1: add a minor version field beginning with ffv1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 16:01:36 +02:00
Reimar Döffinger
069cf86d32 Fix side-data memleak also for audio.
This uses the same code as in decode_video also in decode_audio.
Should fix valgrind FATE failures for nellymoser encode test.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-08 13:06:13 +02:00
Gwenole Beauchesne
58e1032d8f vaapi: mpeg2: fix slice_vertical_position calculation.
VASliceParameterBufferMPEG2.slice_vertical_position shall express
the slice vertical position from the original bitstream. The HW
decoder will correctly decode to the right line computed from the
appropriate top_field_first and is_first_field flags.

This patch aligns with DXVA's definition, which is what most HW and
drivers expect. In particular, Intel PowerVR (Cedarview et al.) and
NVIDIA (through VA-to-VDPAU layer). Since it looks more complex to fix
binary drivers, I aligned the Intel Gen driver (Sandy Bridge et al.)
to this behaviour, while maintaining compatibility with codec layers
not providing this patch yet.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 13:10:20 +03:00
Gwenole Beauchesne
9cb150c9ab hwaccel: mpeg2: decode first field, if requested.
If user opted to present fields as they come, then the first field
picture needs to be submitted to the HW for decoding. In particular,
this fixes MPEG-2 decoding of interlaced streams.

Tested on Intel Cedar Trail, Sandy Bridge and Ivy Bridge platforms.
Someone reported on the ffmpeg-devel@ list this also works on DXVA
(Windows) and other Linux platforms (NVIDIA, through the VA wrapper).

This also means a similar patch to non-hwaccel VDPAU may be necessary.

Note: I believe the SLICE_FLAG_ALLOW_FIELD is useless since the first
field shall always be submitted to the HW anyway. Nobody uses HW accels
(dxva, vaapi, vdpau, etc.) without that flag though.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 13:08:52 +03:00
Reimar Döffinger
e9841505d2 Allow setting CODEC_FLAG2_CHUNKS via the name "chunks".
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-08 02:43:56 +02:00
Michael Niedermayer
6101e5322f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
  asfdec: Add an option for not searching for the packet markers
  cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
  cosmetics: Align codec declarations
  cosmetics: Convert mimic.c to utf-8
  avconv: remove an unused function parameter.
  avconv: remove now pointless variables.
  avconv: drop support for building without libavfilter.
  nellymoserenc: fix crash due to memsetting the wrong area.
  libavformat: Only require first packet to be known for audio/video streams
  avplay: Don't try to scale timestamps if the tb isn't set

Conflicts:
	Changelog
	configure
	ffmpeg.c
	libavcodec/aacenc.c
	libavcodec/bmpenc.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/ffv1.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/libopenjpegdec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/pamenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngenc.c
	libavcodec/qtrleenc.c
	libavcodec/rawdec.c
	libavcodec/sgienc.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.c
	libavcodec/wmv2dec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 22:41:37 +02:00
Reimar Döffinger
5012c07336 Support detecting and demuxing EIA-608 subtitles in mov.
The format is slightly proprietary.
DVDs use a format of
code byte (0x00, 0x01, 0xfe or 0xff), two data bytes
MOV uses instead
cdat/cdt2 atom, two data bytes
Auto-detecting and supporting both in one decoder is trivial,
so a single codec ID is used.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-07 22:11:21 +02:00
Michael Niedermayer
50ec8a2acd mpeg4videodec: Force quant_precision to stay within the valid range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
59edf33f7b wmalosslessdec: rawpcm_tile fixes to keep get_bits() values within defined range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
d0212bb032 wmalosslessdec: channel residues can be 32 bit thus need _long bitreader.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
a931d87727 mpeg12dec: Prevent f_code from becoming invalid.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
6c3d6a214c alsdec: Check k used for rice decoder.
Values that fail this check will cause failure of decode_rice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
192efcf768 h264_ps: check log2_max_frame_num for validity.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
2d0b4bc4cf rv34: Fix check_slice_end() handling of 0 bits left case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
6c249392fa mpeg4videodec: make sure f/b_code are not invalid values.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
6560fa390e get_bits: check the number of bits parameter through av_assert2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
20676711fe vc1: fix incorrect show_bits() usage.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
d3b0fb1048 put_bits: add av_assert2() to check out of array writes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:58:59 +02:00
Reimar Döffinger
4395c058d2 dcaenc: Allow encoding without specifying a channel_layout.
It will print a warning, making the behaviour consistent
with the AC3 encoder.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-07 16:35:28 +02:00
Reimar Döffinger
ecd7455e96 aacenc: Fix issues with huge values of bit_rate.
Do not pointlessly call ff_alloc_packet2 multiple times,
and fix an infinite loop by clamping the maximum
number of bits to target in the algorithm that does
not use lambda.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-07 11:48:20 +02:00
Michael Niedermayer
76e8b336cd proresenc_kostya: Mention likely ancestry in the license header.
As the encoder contained the same bug and has similar structure
to anatoliys encoder, it is possibly based on it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 11:21:48 +02:00
Michael Niedermayer
d40132dab3 proresenc_kostya: fix encoded mantissa.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 11:01:52 +02:00
Michael Niedermayer
dd7d08ee89 proresenc_anatoly: fix encoded mantissa.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 11:00:00 +02:00
Michael Niedermayer
e3b7079ddf adpcmenc: fix encoded s_0 value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 10:58:10 +02:00
Michael Niedermayer
ab553612e7 put_bits: switch assert to av_assert2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 07:58:16 +02:00
Martin Storsjö
1428527581 cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-07 00:02:19 +03:00
Michael Niedermayer
2e0c360abd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cosmetics: Align muxer/demuxer declarations
  mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
  avcodec: remove avcodec_guess_channel_layout()
  avutil: Add av_get_default_channel_layout()

Conflicts:
	doc/APIchanges
	libavcodec/mpeg12.c
	libavformat/cdg.c
	libavformat/matroskaenc.c
	libavformat/mpegts.c
	libavformat/nuv.c
	libavformat/wav.c
	libavutil/audioconvert.c
	libavutil/audioconvert.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 22:52:01 +02:00
Martin Storsjö
00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Michael Niedermayer
bd128e9bff exr: fix mixed declaration and statements.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 21:07:53 +02:00
Martin Storsjö
6d27d8b1dd cosmetics: Convert mimic.c to utf-8
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 21:35:26 +03:00
Reimar Döffinger
439c3d5bcc nellymoserenc: fix crash due to memsetting the wrong area.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 21:05:19 +03:00
Reimar Döffinger
e8b1da007e nellymoserenc: fix crash due to memsetting the wrong area.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-06 19:50:37 +02:00
Anne Aaron
fdf3a749d3 mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 18:32:17 +03:00
Thierry Foucu
e0f30a567f s302m: Add Channle Layout for 6 channels
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 11:03:15 +02:00
Michael Niedermayer
f148537c41 exr: various cleanup and security related fixes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 08:32:09 +02:00
Michael Niedermayer
634c01bc18 exr: fix av_logs()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 08:32:09 +02:00
Jimmy Christensen
b7ce3242f8 lavc: add a OpenEXR decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 08:32:09 +02:00
Carl Eugen Hoyos
76c79aa28f Support yuva444p rawvideo in nut.
Fixes ticket #1058.
2012-04-06 00:53:09 +02:00
Justin Ruggles
bb0618e68b avcodec: remove avcodec_guess_channel_layout()
It is not public because the header is not installed, and its functionality
has been replaced by av_get_default_channel_layout().
2012-04-05 16:40:51 -04:00