ffmpeg.git
8 years agoswr: generate more dither noise to improve quality.
Michael Niedermayer [Wed, 11 Apr 2012 11:26:32 +0000 (13:26 +0200)]
swr: generate more dither noise to improve quality.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: add swr_get_class()
Michael Niedermayer [Wed, 11 Apr 2012 11:25:56 +0000 (13:25 +0200)]
swr: add swr_get_class()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: simplify code by using av_get_bytes_per_sample()
Michael Niedermayer [Wed, 11 Apr 2012 07:57:38 +0000 (09:57 +0200)]
swr: simplify code by using av_get_bytes_per_sample()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: fix copy & pasted comment to match the code.
Michael Niedermayer [Tue, 10 Apr 2012 21:54:04 +0000 (23:54 +0200)]
swr: fix copy & pasted comment to match the code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovda: try to fix compile
Michael Niedermayer [Tue, 10 Apr 2012 21:34:51 +0000 (23:34 +0200)]
vda: try to fix compile

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 10 Apr 2012 20:06:53 +0000 (22:06 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (22 commits)
  rv40dsp x86: use only one register, for both increment and loop counter
  rv40dsp: implement prescaled versions for biweight.
  avconv: use default channel layouts when they are unknown
  avconv: parse channel layout string
  nutdec: K&R formatting cosmetics
  vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
  mem: Consistently return NULL for av_malloc(0)
  vf_overlay: implement poll_frame()
  vf_scale: support named constants for sws flags.
  lavc doxy: add all installed headers to doxy groups.
  lavc doxy: add avfft to the main lavc group.
  lavc doxy: add remaining avcodec.h functions to a misc doxygen group.
  lavc doxy: add AVPicture functions to a doxy group.
  lavc doxy: add resampling functions to a doxy group.
  lavc doxy: replace \ with /
  lavc doxy: add encoding functions to a doxy group.
  lavc doxy: add decoding functions to a doxy group.
  lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}
  lavc doxy: add AVPacket-related stuff to a separate doxy group.
  lavc doxy: add core functions/definitions to a doxy group.
  ...

Conflicts:
ffmpeg.c
libavcodec/avcodec.h
libavcodec/vda.c
libavcodec/x86/rv40dsp.asm
libavfilter/vf_scale.c
libavformat/nutdec.c
libavutil/mem.c
tests/ref/acodec/pcm_s24daud

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: add triangular dither support
Michael Niedermayer [Tue, 10 Apr 2012 19:10:14 +0000 (21:10 +0200)]
swr: add triangular dither support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: remove unused variable
Michael Niedermayer [Tue, 10 Apr 2012 18:30:06 +0000 (20:30 +0200)]
swr: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: add SWR_DITHER_RECTANGULAR to AVOptions array
Michael Niedermayer [Tue, 10 Apr 2012 18:29:47 +0000 (20:29 +0200)]
swr: add SWR_DITHER_RECTANGULAR to AVOptions array

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoaacsbr: silence message for SBR extension "padding".
Reimar Döffinger [Mon, 9 Apr 2012 19:19:30 +0000 (21:19 +0200)]
aacsbr: silence message for SBR extension "padding".

Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.
Fixes trac issue #836.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoswr-test: include opt.h, this is needed for changing options for testing.
Michael Niedermayer [Tue, 10 Apr 2012 17:53:43 +0000 (19:53 +0200)]
swr-test: include opt.h, this is needed for changing options for testing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: use assert in swri_sum2 to check that only supported formats are used.
Michael Niedermayer [Tue, 10 Apr 2012 17:53:11 +0000 (19:53 +0200)]
swr: use assert in swri_sum2 to check that only supported formats are used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: add dither support.
Michael Niedermayer [Tue, 10 Apr 2012 17:52:42 +0000 (19:52 +0200)]
swr: add dither support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: update copyright year for rematrix
Michael Niedermayer [Tue, 10 Apr 2012 16:56:17 +0000 (18:56 +0200)]
swr: update copyright year for rematrix

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agorv40dsp x86: use only one register, for both increment and loop counter
Christophe GISQUET [Tue, 20 Mar 2012 15:13:55 +0000 (16:13 +0100)]
rv40dsp x86: use only one register, for both increment and loop counter

Around 10 cycles faster for luma.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agorv40dsp: implement prescaled versions for biweight.
Christophe GISQUET [Mon, 19 Mar 2012 21:46:28 +0000 (22:46 +0100)]
rv40dsp: implement prescaled versions for biweight.

Quite often, the original weights are multiple of 512. By prescaling them
by 1/512 when they are computed (once per frame), no intermediate shifting
is needed, and no prescaling on each call either.

The x86 code already used that trick.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoavconv: use default channel layouts when they are unknown
Justin Ruggles [Thu, 5 Apr 2012 22:11:28 +0000 (18:11 -0400)]
avconv: use default channel layouts when they are unknown

If either input or output layout is known and the channel counts match,
use the known layout for both. Otherwise choose the default layout based on
av_get_default_channel_layout().

Changed some FATE references due to some WAVE files now having a non-zero
channel mask.

8 years agoavconv: parse channel layout string
Justin Ruggles [Thu, 5 Apr 2012 21:47:20 +0000 (17:47 -0400)]
avconv: parse channel layout string

This allows the user to use channel layout names instead of having to use the
channel mask values.

8 years agovf_drawtext: fontconfig support.
Nicolas George [Sat, 7 Apr 2012 13:09:16 +0000 (15:09 +0200)]
vf_drawtext: fontconfig support.

8 years agovf_drawtext: fix memory leak of draw expression.
Nicolas George [Tue, 10 Apr 2012 07:55:30 +0000 (09:55 +0200)]
vf_drawtext: fix memory leak of draw expression.

8 years agovf_drawtext: fix memory leak of glyph data.
Nicolas George [Tue, 10 Apr 2012 07:55:11 +0000 (09:55 +0200)]
vf_drawtext: fix memory leak of glyph data.

8 years agonutdec: K&R formatting cosmetics
Asen Lekov [Fri, 2 Dec 2011 16:14:05 +0000 (16:14 +0000)]
nutdec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agovda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
Sebastien Zwickert [Tue, 10 Apr 2012 11:48:08 +0000 (13:48 +0200)]
vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoresample: support double precission resampling
Michael Niedermayer [Tue, 10 Apr 2012 11:38:10 +0000 (13:38 +0200)]
resample: support double precission resampling

This commit is dedicated to the audiophiles who can hear it when a
needle is dropped on the moon.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: support int32 and float as internal sample formats
Michael Niedermayer [Tue, 10 Apr 2012 11:19:29 +0000 (13:19 +0200)]
swr: support int32 and float as internal sample formats

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr: support float & int32 in the resampler
Michael Niedermayer [Tue, 10 Apr 2012 11:18:49 +0000 (13:18 +0200)]
swr: support float & int32 in the resampler

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswr-test: Add newline to test output
Michael Niedermayer [Tue, 10 Apr 2012 11:06:00 +0000 (13:06 +0200)]
swr-test: Add newline to test output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoresample: update copyright years, they where incorrect.
Michael Niedermayer [Tue, 10 Apr 2012 10:35:37 +0000 (12:35 +0200)]
resample: update copyright years, they where incorrect.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomem: Consistently return NULL for av_malloc(0)
Martin Storsjö [Sun, 8 Apr 2012 14:38:45 +0000 (17:38 +0300)]
mem: Consistently return NULL for av_malloc(0)

Plain POSIX malloc(0) is allowed to return either NULL or a
non-NULL pointer. The calling code should be ready to handle
a NULL return as a correct return (instead of a failure) if the size
to allocate was 0 - this makes sure the condition is handled
in a consistent way across platforms.

This also avoids calling posix_memalign(&ptr, 32, 0) on OS X,
which returns an invalid pointer (a non-NULL pointer that causes
crashes when passed to av_free).

Abort in debug mode, to help track down issues related to
incorrect handling of this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 9 Apr 2012 20:48:20 +0000 (22:48 +0200)]
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>
8 years agoFix gif regression test on big-endian.
Reimar Döffinger [Mon, 9 Apr 2012 19:54:38 +0000 (21:54 +0200)]
Fix gif regression test on big-endian.

Decode output must be converted to rgb24 to avoid CRC difference
due to palette being stored in machine endianness.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agovf_overlay: implement poll_frame()
Anton Khirnov [Sun, 1 Apr 2012 16:51:27 +0000 (18:51 +0200)]
vf_overlay: implement poll_frame()

Signal that it can output a frame when there are frames on the main
input and EOF on the overlay input, but a frame is buffered -- e.g.
single picture overlay.

8 years agovf_scale: support named constants for sws flags.
Anton Khirnov [Mon, 9 Apr 2012 04:05:50 +0000 (06:05 +0200)]
vf_scale: support named constants for sws flags.

8 years agolavc doxy: add all installed headers to doxy groups.
Anton Khirnov [Sun, 8 Apr 2012 12:08:05 +0000 (14:08 +0200)]
lavc doxy: add all installed headers to doxy groups.

8 years agolavc doxy: add avfft to the main lavc group.
Anton Khirnov [Sun, 8 Apr 2012 11:49:15 +0000 (13:49 +0200)]
lavc doxy: add avfft to the main lavc group.

8 years agolavc doxy: add remaining avcodec.h functions to a misc doxygen group.
Anton Khirnov [Sun, 8 Apr 2012 11:35:50 +0000 (13:35 +0200)]
lavc doxy: add remaining avcodec.h functions to a misc doxygen group.

8 years agolavc doxy: add AVPicture functions to a doxy group.
Anton Khirnov [Sun, 8 Apr 2012 11:22:19 +0000 (13:22 +0200)]
lavc doxy: add AVPicture functions to a doxy group.

8 years agolavc doxy: add resampling functions to a doxy group.
Anton Khirnov [Sun, 8 Apr 2012 11:22:19 +0000 (13:22 +0200)]
lavc doxy: add resampling functions to a doxy group.

8 years agolavc doxy: replace \ with /
Anton Khirnov [Sun, 8 Apr 2012 11:05:53 +0000 (13:05 +0200)]
lavc doxy: replace \ with /

It's the more proper symbol to use and it prevents doxygen from thinking
it's a command.

8 years agolavc doxy: add encoding functions to a doxy group.
Anton Khirnov [Sun, 8 Apr 2012 10:45:58 +0000 (12:45 +0200)]
lavc doxy: add encoding functions to a doxy group.

8 years agolavc doxy: add decoding functions to a doxy group.
Anton Khirnov [Sun, 8 Apr 2012 10:45:58 +0000 (12:45 +0200)]
lavc doxy: add decoding functions to a doxy group.

8 years agolavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}
Anton Khirnov [Sun, 8 Apr 2012 10:31:56 +0000 (12:31 +0200)]
lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}

8 years agolavc doxy: add AVPacket-related stuff to a separate doxy group.
Anton Khirnov [Sun, 8 Apr 2012 10:28:46 +0000 (12:28 +0200)]
lavc doxy: add AVPacket-related stuff to a separate doxy group.

Also move AV_PKT_DATA_PARAM_CHANGE/AV_PKT_DATA_H263_MB_INFO to the
proper place.

8 years agolavc doxy: add core functions/definitions to a doxy group.
Anton Khirnov [Sun, 8 Apr 2012 10:12:33 +0000 (12:12 +0200)]
lavc doxy: add core functions/definitions to a doxy group.

8 years agoexr: optimize exr_halflt2uint()
Michael Niedermayer [Mon, 9 Apr 2012 18:55:09 +0000 (20:55 +0200)]
exr: optimize exr_halflt2uint()

30% faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoppc: Add/remove a number of const qualifiers to fix related warnings.
Diego Biurrun [Mon, 2 Apr 2012 17:03:30 +0000 (19:03 +0200)]
ppc: Add/remove a number of const qualifiers to fix related warnings.

8 years agoavconv: allow '-async -1' to disable timestamp sync for audio encoding
Justin Ruggles [Sun, 8 Apr 2012 19:00:01 +0000 (15:00 -0400)]
avconv: allow '-async -1' to disable timestamp sync for audio encoding

This will allow a workaround for cases where input timestamps are invalid or
when decoder delay of 1 packet or more confuses avconv into using the wrong
timestamps as a sync reference.

8 years agoAdd gif and xbm regression tests.
Reimar Döffinger [Sun, 8 Apr 2012 14:23:18 +0000 (16:23 +0200)]
Add gif and xbm regression tests.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agovf_scale: ensure the palette is set for output.
Reimar Döffinger [Sun, 8 Apr 2012 13:11:13 +0000 (15:11 +0200)]
vf_scale: ensure the palette is set for output.

Since those are pseudo-palette formats, swscale does not write
into data[1], swscale must initialize the palette properly itself.
This lead to frames that actually decoded as all-gray before.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoMark GRAY8 format as pseudo-paletted.
Reimar Döffinger [Sun, 8 Apr 2012 14:12:46 +0000 (16:12 +0200)]
Mark GRAY8 format as pseudo-paletted.

This fixes that the GIF encoder crashes with it because
it has no palette.
And the arguments for the pseudopalette apply to gray8 as
much as to RGB8 etc.
In addition the changes required in lavfi should be needed anyway
when adding support for RGB8 etc.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoscale: fix slice rendering with conversion between pal/non-pal.
Reimar Döffinger [Sun, 8 Apr 2012 12:59:53 +0000 (14:59 +0200)]
scale: fix slice rendering with conversion between pal/non-pal.

We can't use whether the input format is paletted to decide that
the output format has a palette in data[1], too, that makes no sense.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoRV20: try keeping aspect during resolution changes.
Reimar Döffinger [Mon, 9 Apr 2012 12:21:01 +0000 (14:21 +0200)]
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>
8 years agoaacdec: update debug code to always print the processed data.
Reimar Döffinger [Sun, 8 Apr 2012 22:17:25 +0000 (00:17 +0200)]
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>
8 years agoavconv: use default alignment for audio buffer
Justin Ruggles [Thu, 5 Apr 2012 23:09:51 +0000 (19:09 -0400)]
avconv: use default alignment for audio buffer

8 years agoavcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
Justin Ruggles [Thu, 5 Apr 2012 23:01:21 +0000 (19:01 -0400)]
avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()

Use default alignment in audio_get_buffer()

8 years agoavutil: use align == 0 for default alignment in audio sample buffer functions
Justin Ruggles [Wed, 28 Mar 2012 01:31:14 +0000 (21:31 -0400)]
avutil: use align == 0 for default alignment in audio sample buffer functions

8 years agoavutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc()
Justin Ruggles [Wed, 28 Mar 2012 01:34:47 +0000 (21:34 -0400)]
avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc()

8 years agoavconv: remove OutputStream.picref.
Anton Khirnov [Thu, 29 Mar 2012 07:02:01 +0000 (09:02 +0200)]
avconv: remove OutputStream.picref.

It's only used inside transcode_video() and there's no point in
preserving it between subsequent calls. So use a local variable instead.

8 years agoavconv: only set SAR once on the decoded frame.
Anton Khirnov [Thu, 22 Mar 2012 08:37:33 +0000 (09:37 +0100)]
avconv: only set SAR once on the decoded frame.

No point in repeating the assignment for each output stream.

8 years agoAdd v408 codec regression test.
Reimar Döffinger [Sun, 8 Apr 2012 14:19:06 +0000 (16:19 +0200)]
Add v408 codec regression test.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoavcodec: validate the channel layout vs. channel count for decoders
Justin Ruggles [Wed, 4 Apr 2012 14:47:45 +0000 (10:47 -0400)]
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.

8 years agoaudioconvert: make av_get_channel_layout accept composite names.
Nicolas George [Tue, 8 Nov 2011 15:32:50 +0000 (16:32 +0100)]
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>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
8 years agoAdd roqaudio regression test.
Reimar Döffinger [Sun, 8 Apr 2012 19:10:44 +0000 (21:10 +0200)]
Add roqaudio regression test.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoavutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()
Justin Ruggles [Thu, 5 Apr 2012 21:00:53 +0000 (17:00 -0400)]
avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()

Based on a patch by Clément Bœsch <ubitux@gmail.com>

8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 8 Apr 2012 18:55:02 +0000 (20:55 +0200)]
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>
8 years agoAllow running fate-wmv8-x8intra manually.
Reimar Döffinger [Sun, 8 Apr 2012 17:59:59 +0000 (19:59 +0200)]
Allow running fate-wmv8-x8intra manually.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoAllow manually running disabled FATE tests.
Reimar Döffinger [Sun, 8 Apr 2012 17:55:49 +0000 (19:55 +0200)]
Allow manually running disabled FATE tests.

This makes it easy to allow people to run tests that are disabled
(e.g. because they are broken) without having to hack Makefiles
by adding the test name to FATE_TESTS-no.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoFix nellymoser encoder crash with hardcoded tables.
Reimar Döffinger [Sun, 8 Apr 2012 18:25:08 +0000 (20:25 +0200)]
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>
8 years agoUpdate reference for disabled fate-wmv8-x8intra test to new format.
Reimar Döffinger [Sun, 8 Apr 2012 17:59:20 +0000 (19:59 +0200)]
Update reference for disabled fate-wmv8-x8intra test to new format.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoffv1: set slice geometry based on user specified slices.
Michael Niedermayer [Sun, 8 Apr 2012 15:03:38 +0000 (17:03 +0200)]
ffv1: set slice geometry based on user specified slices.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: allow enabling of version 2 by using some of its features.
Michael Niedermayer [Sun, 8 Apr 2012 14:46:36 +0000 (16:46 +0200)]
ffv1: allow enabling of version 2 by using some of its features.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: fix version=2 chroma handling
Michael Niedermayer [Sun, 8 Apr 2012 13:03:40 +0000 (15:03 +0200)]
ffv1: fix version=2 chroma handling

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: add a minor version field beginning with ffv1.3
Michael Niedermayer [Sun, 8 Apr 2012 12:20:17 +0000 (14:20 +0200)]
ffv1: add a minor version field beginning with ffv1.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agortsp: Don't use av_malloc(0) if there are no streams
Martin Storsjö [Fri, 6 Apr 2012 19:36:16 +0000 (22:36 +0300)]
rtsp: Don't use av_malloc(0) if there are no streams

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agortsp: Don't use uninitialized data if there are no streams
Martin Storsjö [Fri, 6 Apr 2012 19:35:48 +0000 (22:35 +0300)]
rtsp: Don't use uninitialized data if there are no streams

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoFix side-data memleak also for audio.
Reimar Döffinger [Sun, 8 Apr 2012 10:09:55 +0000 (12:09 +0200)]
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>
8 years agovaapi: mpeg2: fix slice_vertical_position calculation.
Gwenole Beauchesne [Sun, 18 Mar 2012 08:30:05 +0000 (09:30 +0100)]
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>
8 years agohwaccel: mpeg2: decode first field, if requested.
Gwenole Beauchesne [Sun, 18 Mar 2012 08:46:58 +0000 (09:46 +0100)]
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>
8 years agocosmetics: Fix indentation
Martin Storsjö [Sat, 7 Apr 2012 20:40:37 +0000 (23:40 +0300)]
cosmetics: Fix indentation

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agortsp: Don't expose the MS-RTSP RTX data stream to the caller
Martin Storsjö [Fri, 6 Apr 2012 20:07:12 +0000 (23:07 +0300)]
rtsp: Don't expose the MS-RTSP RTX data stream to the caller

This avoids exposing a dummy AVStream which won't get any data
and which will make avformat_find_stream_info wait for info about
this stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agompegtsenc: Add support to mux s302 stream
Thierry Foucu [Sun, 8 Apr 2012 07:44:14 +0000 (09:44 +0200)]
mpegtsenc: Add support to mux s302 stream

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoconfigure: fix - vs _ error
Michael Niedermayer [Sat, 7 Apr 2012 22:59:22 +0000 (00:59 +0200)]
configure: fix - vs _ error

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoAdd nellymoser "fuzzy" FATE test.
Reimar Döffinger [Sat, 7 Apr 2012 11:19:35 +0000 (13:19 +0200)]
Add nellymoser "fuzzy" FATE test.

Since we cannot specify decode parameters (and also because
it is better in principle) the 1-channel reference file
needs to be enabled, too.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoAllow setting CODEC_FLAG2_CHUNKS via the name "chunks".
Reimar Döffinger [Sat, 7 Apr 2012 23:14:49 +0000 (01:14 +0200)]
Allow setting CODEC_FLAG2_CHUNKS via the name "chunks".

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoFixes for third argument do_image_formats.
Reimar Döffinger [Sat, 7 Apr 2012 19:31:11 +0000 (21:31 +0200)]
Fixes for third argument do_image_formats.

Remove it from two places where it is useless, do not apply
it to the encode command and make it apply to the output
instead of the input of the decode command.
Should fix the dpx test.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoffprobe: use avbprint API
Stefano Sabatini [Sat, 7 Apr 2012 14:19:13 +0000 (16:19 +0200)]
ffprobe: use avbprint API

Simplify, increase robustness.

8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 7 Apr 2012 20:41:37 +0000 (22:41 +0200)]
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>
8 years agoSupport detecting and demuxing EIA-608 subtitles in mov.
Reimar Döffinger [Sat, 7 Apr 2012 00:18:17 +0000 (02:18 +0200)]
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>
8 years agompeg4videodec: Force quant_precision to stay within the valid range.
Michael Niedermayer [Sat, 7 Apr 2012 17:53:51 +0000 (19:53 +0200)]
mpeg4videodec: Force quant_precision to stay within the valid range.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmalosslessdec: rawpcm_tile fixes to keep get_bits() values within defined range.
Michael Niedermayer [Sat, 7 Apr 2012 17:34:32 +0000 (19:34 +0200)]
wmalosslessdec: rawpcm_tile fixes to keep get_bits() values within defined range.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmalosslessdec: channel residues can be 32 bit thus need _long bitreader.
Michael Niedermayer [Sat, 7 Apr 2012 17:33:49 +0000 (19:33 +0200)]
wmalosslessdec: channel residues can be 32 bit thus need _long bitreader.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agompeg12dec: Prevent f_code from becoming invalid.
Michael Niedermayer [Sat, 7 Apr 2012 17:32:45 +0000 (19:32 +0200)]
mpeg12dec: Prevent f_code from becoming invalid.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoalsdec: Check k used for rice decoder.
Michael Niedermayer [Sat, 7 Apr 2012 15:25:47 +0000 (17:25 +0200)]
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>
8 years agoh264_ps: check log2_max_frame_num for validity.
Michael Niedermayer [Sat, 7 Apr 2012 15:02:36 +0000 (17:02 +0200)]
h264_ps: check log2_max_frame_num for validity.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agorv34: Fix check_slice_end() handling of 0 bits left case
Michael Niedermayer [Sat, 7 Apr 2012 14:49:17 +0000 (16:49 +0200)]
rv34: Fix check_slice_end() handling of 0 bits left case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agompeg4videodec: make sure f/b_code are not invalid values.
Michael Niedermayer [Sat, 7 Apr 2012 14:39:59 +0000 (16:39 +0200)]
mpeg4videodec: make sure f/b_code are not invalid values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoget_bits: check the number of bits parameter through av_assert2()
Michael Niedermayer [Sat, 7 Apr 2012 14:04:09 +0000 (16:04 +0200)]
get_bits: check the number of bits parameter through av_assert2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovc1: fix incorrect show_bits() usage.
Michael Niedermayer [Sat, 7 Apr 2012 14:23:29 +0000 (16:23 +0200)]
vc1: fix incorrect show_bits() usage.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoput_bits: add av_assert2() to check out of array writes.
Michael Niedermayer [Sat, 7 Apr 2012 13:55:19 +0000 (15:55 +0200)]
put_bits: add av_assert2() to check out of array writes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoDo not decode the mp3 data in lavf test since that is not bit-exact.
Reimar Döffinger [Sat, 7 Apr 2012 14:33:43 +0000 (16:33 +0200)]
Do not decode the mp3 data in lavf test since that is not bit-exact.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>