ffmpeg.git
8 years agoavfilter: check malloc return values.
Ronald S. Bultje [Wed, 4 May 2011 01:25:40 +0000 (21:25 -0400)]
avfilter: check malloc return values.

8 years agompegvideo: reindent.
Ronald S. Bultje [Tue, 3 May 2011 12:23:41 +0000 (08:23 -0400)]
mpegvideo: reindent.

8 years agonutenc: check malloc return values.
Ronald S. Bultje [Tue, 3 May 2011 12:19:42 +0000 (08:19 -0400)]
nutenc: check malloc return values.

8 years agoavfilter: don't av_malloc(0).
Ronald S. Bultje [Wed, 27 Apr 2011 15:29:09 +0000 (08:29 -0700)]
avfilter: don't av_malloc(0).

8 years agonutenc: don't av_malloc(0).
Ronald S. Bultje [Wed, 27 Apr 2011 15:29:02 +0000 (08:29 -0700)]
nutenc: don't av_malloc(0).

8 years agompegvideo: don't av_malloc(0).
Ronald S. Bultje [Wed, 27 Apr 2011 15:28:51 +0000 (08:28 -0700)]
mpegvideo: don't av_malloc(0).

8 years agoasfdec: fix parsing of packets that overrun into padding.
Ronald S. Bultje [Wed, 27 Apr 2011 22:42:16 +0000 (15:42 -0700)]
asfdec: fix parsing of packets that overrun into padding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoImplement fate-rsync target
Reinhard Tartler [Sun, 1 May 2011 14:48:40 +0000 (16:48 +0200)]
Implement fate-rsync target

8 years agoMake ffmpeg support generic data stream
Luca Barbato [Thu, 14 Apr 2011 11:32:36 +0000 (13:32 +0200)]
Make ffmpeg support generic data stream

The patch is the first step to support -dcodec copy

8 years agovp8: frame-multithreading.
Ronald S. Bultje [Mon, 2 May 2011 13:55:52 +0000 (09:55 -0400)]
vp8: frame-multithreading.

Tested on a Mac Pro, 2 CPUs, 2 cores each, OSX 10.6.6:

time ./ffmpeg -v 0 -vsync 0 -threads [1234] -i \
  ~/Downloads/sintel_trailer_1080p_vp8_vorbis.webm \
  -f null -vcodec rawvideo -an -
1: 0m14.630s (89.9 fps)
2: 0m8.056s (163.2 fps)
3: 0m5.882s (223.6 fps)
4: 0m4.952s (265.6 fps)

time ./ffmpeg -v 0 -vsync 0 -threads [1234] -i \
  ~/Downloads/Elephants_Dream-720p-Stereo.webm \
  -f null -vcodec rawvideo -an -
1: 1m12.962s (215.1 fps)
2: 0m44.682s (351.2 fps)
3: 0m31.183s (503.2 fps)
4: 0m25.284s (620.6 fps)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoReplace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Stefano Sabatini [Fri, 29 Apr 2011 16:53:57 +0000 (18:53 +0200)]
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agoReplace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Stefano Sabatini [Fri, 29 Apr 2011 14:37:23 +0000 (16:37 +0200)]
Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agodpx: Do not use DPX encoder for decoding.
Kostya Shishkov [Mon, 2 May 2011 08:37:36 +0000 (10:37 +0200)]
dpx: Do not use DPX encoder for decoding.

10l to the one who hasn't checked this.

8 years agoALPHA: Replace sized int_fast integer types with plain int/unsigned.
Diego Biurrun [Fri, 29 Apr 2011 18:15:00 +0000 (20:15 +0200)]
ALPHA: Replace sized int_fast integer types with plain int/unsigned.

int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.

8 years agoDPX image encoder
Peter Ross [Sat, 26 Mar 2011 04:12:35 +0000 (15:12 +1100)]
DPX image encoder

8 years agoDPX decoder: read sample aspect ratio
Peter Ross [Fri, 1 Apr 2011 12:23:28 +0000 (23:23 +1100)]
DPX decoder: read sample aspect ratio

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoDPX decoder: add buffer size checks.
Reimar Döffinger [Fri, 25 Mar 2011 17:58:07 +0000 (18:58 +0100)]
DPX decoder: add buffer size checks.

8 years agoac3enc: clip large coefficient values and negative exponents rather than using
Justin Ruggles [Sat, 16 Apr 2011 03:18:33 +0000 (23:18 -0400)]
ac3enc: clip large coefficient values and negative exponents rather than using
av_assert2().

8 years agoac3enc: do not store a bandwidth code for each channel.
Justin Ruggles [Sat, 16 Apr 2011 02:49:05 +0000 (22:49 -0400)]
ac3enc: do not store a bandwidth code for each channel.

Although AC-3 allows it, it's not very useful. The encoder uses the same code
for all full-bandwidth channels.

8 years agoac3enc: remove bandwidth reduction as fallback for bit allocation failure.
Justin Ruggles [Sat, 16 Apr 2011 02:45:05 +0000 (22:45 -0400)]
ac3enc: remove bandwidth reduction as fallback for bit allocation failure.

It was only needed at low bitrates, which now already use a low bandwidth, so
the bandwidth reduction is no longer needed.

8 years agoac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy()
Justin Ruggles [Sat, 16 Apr 2011 02:43:25 +0000 (22:43 -0400)]
ac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy()

8 years agoac3enc: return error if frame+exponent bits are too large instead of using
Justin Ruggles [Fri, 15 Apr 2011 23:56:42 +0000 (19:56 -0400)]
ac3enc: return error if frame+exponent bits are too large instead of using
av_assert2().

This can occur in some very rare cases with low bitrates.

8 years agoac3enc: differentiate between current block and reference block in bit_alloc()
Justin Ruggles [Fri, 15 Apr 2011 23:55:09 +0000 (19:55 -0400)]
ac3enc: differentiate between current block and reference block in bit_alloc()

8 years agoac3enc: simplify exponent_init() by calculating exponent_group_tab[] based
Justin Ruggles [Fri, 15 Apr 2011 23:51:06 +0000 (19:51 -0400)]
ac3enc: simplify exponent_init() by calculating exponent_group_tab[] based
on exponent group sizes.

8 years agoac3enc: simplify stereo rematrixing decision options
Justin Ruggles [Fri, 15 Apr 2011 23:22:42 +0000 (19:22 -0400)]
ac3enc: simplify stereo rematrixing decision options

8 years agoUpdate URL to fate samples
Reinhard Tartler [Sun, 1 May 2011 12:34:31 +0000 (14:34 +0200)]
Update URL to fate samples

8 years agoAMV: disable DR1 and don't override EMU_EDGE
Michael Niedermayer [Thu, 28 Apr 2011 19:10:04 +0000 (21:10 +0200)]
AMV: disable DR1 and don't override EMU_EDGE

This works around a possibly exploitable crash.
Appearently, vlc can be exploited with a malicous file. This should get
reverted as soon as a proper fix is found.

Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 89f903b3d5ec38c9c5d90fba7e626fa0eda61a32)
(cherry picked from commit 9b919571e506fbb72b81a35ca1e7c1bd6efc4209)

8 years agolavf: inspect more frames for fps when container time base is coarse
Anssi Hannula [Thu, 28 Apr 2011 18:47:40 +0000 (20:47 +0200)]
lavf: inspect more frames for fps when container time base is coarse

As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.

Fix that by doubling the amount of timestamps inspected for frame rate
for streams that have coarse time base. This also fixes 29.970 detection
in matroska.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 78431098f9e306ebe27e7698d0ae539e3df2afe9)

Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agoFix races in default av_log handler
Reinhard Tartler [Wed, 27 Apr 2011 19:21:54 +0000 (21:21 +0200)]
Fix races in default av_log handler

Prevent competing threads from overwriting (shared) buffers.

Original patch by: Michael Niedermayer <michaelni@gmx.at>

8 years agovorbis: Replace sized int_fast integer types with plain int/unsigned.
Diego Biurrun [Fri, 29 Apr 2011 18:12:48 +0000 (20:12 +0200)]
vorbis: Replace sized int_fast integer types with plain int/unsigned.

int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.

8 years agoRemove disabled non-optimized code variants.
Diego Biurrun [Fri, 29 Apr 2011 17:46:10 +0000 (19:46 +0200)]
Remove disabled non-optimized code variants.

8 years agobswap.h: Remove disabled code.
Diego Biurrun [Fri, 29 Apr 2011 17:36:48 +0000 (19:36 +0200)]
bswap.h: Remove disabled code.

8 years agoRemove some disabled printf debug cruft.
Diego Biurrun [Fri, 29 Apr 2011 17:05:40 +0000 (19:05 +0200)]
Remove some disabled printf debug cruft.

8 years agoReplace more disabled printf() calls by av_dlog().
Diego Biurrun [Fri, 29 Apr 2011 17:18:46 +0000 (19:18 +0200)]
Replace more disabled printf() calls by av_dlog().

8 years agotests: Remove disabled code.
Diego Biurrun [Tue, 26 Apr 2011 12:26:23 +0000 (14:26 +0200)]
tests: Remove disabled code.

8 years agoReplace some commented-out debug printf() / av_log() messages with av_dlog().
Diego Biurrun [Fri, 29 Apr 2011 15:27:01 +0000 (17:27 +0200)]
Replace some commented-out debug printf() / av_log() messages with av_dlog().

8 years agovorbisdec: Replace some sizeof(type) by sizeof(*variable).
Diego Biurrun [Thu, 28 Apr 2011 09:09:35 +0000 (11:09 +0200)]
vorbisdec: Replace some sizeof(type) by sizeof(*variable).

8 years agovf_fieldorder: Replace FFmpeg by Libav in license boilerplate.
Diego Biurrun [Thu, 28 Apr 2011 16:59:14 +0000 (18:59 +0200)]
vf_fieldorder: Replace FFmpeg by Libav in license boilerplate.

8 years agoavio: Fix the deprecated fallback URL-prefixed open flags
Martin Storsjö [Thu, 28 Apr 2011 07:36:44 +0000 (10:36 +0300)]
avio: Fix the deprecated fallback URL-prefixed open flags

While deprecated, they're totally useless as long as their values
are different from the AVIO_FLAG values that are used internally.
Currently, this leads to old libav applications still compiling
correctly (since we haven't removed the fallback wrappers), but
failing since the functions internally compare to the new AVIO_FLAG
values.

These should be removed at some point, but they aren't removed yet.
The intent is to be able to recompile an old application against
the new ABI without modifying the code, and this doesn't work
currently.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoavoid duplicate -lm in .pc files
Reinhard Tartler [Tue, 26 Apr 2011 16:34:31 +0000 (18:34 +0200)]
avoid duplicate -lm in .pc files

8 years agompeg12: terminate mpeg2_video_profiles arrays
Stefano Sabatini [Wed, 27 Apr 2011 23:42:56 +0000 (01:42 +0200)]
mpeg12: terminate mpeg2_video_profiles arrays

Make av_get_profile_name() return NULL if no profile is detected.

Fix trac issue #130, fix crash reading file tek3.m2v.
(cherry picked from commit e5d80c7b2d893422e2e60a97e08bfc48ca1684e6)

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agonetwork: Check POLLERR and POLLHUP in ff_network_wait_fd
Gil Pedersen [Thu, 28 Apr 2011 07:27:40 +0000 (10:27 +0300)]
network: Check POLLERR and POLLHUP in ff_network_wait_fd

Previously, the function would lead to an infinite wait (by
returning AVERROR(EAGAIN)) on sockets indicating an error
via either of these poll flags.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agompegtsenc: make PMT PID really start on pmt_start_pid
Anton Khirnov [Tue, 26 Apr 2011 09:59:07 +0000 (09:59 +0000)]
mpegtsenc: make PMT PID really start on pmt_start_pid

8 years agonut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
Peter Ross [Sat, 19 Mar 2011 13:25:18 +0000 (00:25 +1100)]
nut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agorawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
Peter Ross [Sat, 19 Mar 2011 13:24:24 +0000 (00:24 +1100)]
rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agohflip: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
Peter Ross [Sat, 19 Mar 2011 11:11:03 +0000 (22:11 +1100)]
hflip: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agocrop: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
Peter Ross [Sat, 19 Mar 2011 11:05:53 +0000 (22:05 +1100)]
crop: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolibswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation
Peter Ross [Thu, 17 Mar 2011 10:07:18 +0000 (21:07 +1100)]
libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovorbisdec: Rename silly "class_" variable to plain "class".
Diego Biurrun [Wed, 27 Apr 2011 14:38:35 +0000 (16:38 +0200)]
vorbisdec: Rename silly "class_" variable to plain "class".

8 years agosimple_idct_alpha: Drop some useless casts.
Diego Biurrun [Wed, 27 Apr 2011 13:36:21 +0000 (15:36 +0200)]
simple_idct_alpha: Drop some useless casts.

8 years agoSimplify av_log_missing_feature().
Diego Biurrun [Wed, 27 Apr 2011 13:11:41 +0000 (15:11 +0200)]
Simplify av_log_missing_feature().

Do not print the results of the conditional call to av_log_ask_for_sample()
into the same line as the main output, separate the already long text.

8 years agoac3enc: remove check for mismatching channels and channel_layout
Justin Ruggles [Tue, 19 Apr 2011 23:06:52 +0000 (19:06 -0400)]
ac3enc: remove check for mismatching channels and channel_layout

8 years agoIf AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
Justin Ruggles [Tue, 19 Apr 2011 23:03:47 +0000 (19:03 -0400)]
If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
non-zero, set channels based on channel_layout.

This allows the user to set only channel_layout and not channels.

8 years agoIf AVCodecContext.channel_layout and AVCodecContext.channels are both
Justin Ruggles [Tue, 19 Apr 2011 23:02:32 +0000 (19:02 -0400)]
If AVCodecContext.channel_layout and AVCodecContext.channels are both
non-zero, check to make sure they do not contradict eachother.

8 years agocosmetics: indentation
Justin Ruggles [Wed, 20 Apr 2011 20:59:39 +0000 (16:59 -0400)]
cosmetics: indentation

8 years agoCheck AVCodec.supported_samplerates and AVCodec.channel_layouts in
Justin Ruggles [Tue, 19 Apr 2011 22:50:20 +0000 (18:50 -0400)]
Check AVCodec.supported_samplerates and AVCodec.channel_layouts in
avcodec_open().

If the encoder has a channel_layouts list and AVCodecContext.channel_layout
is 0, then only print a warning and let the encoder decide how to handle it.

8 years agoaacdec: remove sf_scale and sf_offset.
Alex Converse [Tue, 26 Apr 2011 21:05:07 +0000 (17:05 -0400)]
aacdec: remove sf_scale and sf_offset.

Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.

8 years agoaacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
Justin Ruggles [Tue, 26 Apr 2011 19:30:19 +0000 (15:30 -0400)]
aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.

8 years agoDefine POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
Alex Converse [Tue, 26 Apr 2011 18:45:48 +0000 (14:45 -0400)]
Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.

8 years agoLarge intensity stereo and PNS indices are legal. Clip them instead of
Alex Converse [Tue, 26 Apr 2011 18:29:03 +0000 (14:29 -0400)]
Large intensity stereo and PNS indices are legal. Clip them instead of
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.

None of the conformance streams fall in the range that need to be clipped.

8 years agoqpeg: use reget_buffer() in decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:51:50 +0000 (11:51 +0200)]
qpeg: use reget_buffer() in decode_frame()

Decoder relies on previous frame data, so use reget_buffer().

This also set frame->reference to 3, as the frame will be requested
unmodified later so it shouldn't be modified by the application.

Fix playback of file Clock.avi.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoultimotion: use reget_buffer() in ulti_decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:45:40 +0000 (11:45 +0200)]
ultimotion: use reget_buffer() in ulti_decode_frame()

Decoder relies on previous frame data, so use reget_buffer().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agosmacker: remove unnecessary call to avctx->release_buffer in decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:37:36 +0000 (11:37 +0200)]
smacker: remove unnecessary call to avctx->release_buffer in decode_frame()

The release_buffer was cleaning the provided frame, thus causing the
successive call to avctx->reget_buffer() to allocate a new frame.  In
case the returned frame was not the same one previously returned but a
new one with different data, it resulted in artifacts.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoavparser: don't av_malloc(0).
Ronald S. Bultje [Wed, 27 Apr 2011 01:46:08 +0000 (18:46 -0700)]
avparser: don't av_malloc(0).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoac3enc: correct the flipped sign in the ac3_fixed encoder
Justin Ruggles [Tue, 5 Apr 2011 16:55:42 +0000 (12:55 -0400)]
ac3enc: correct the flipped sign in the ac3_fixed encoder

8 years agoEliminate pointless '#if 1' statements without matching '#else'.
Diego Biurrun [Tue, 26 Apr 2011 11:52:12 +0000 (13:52 +0200)]
Eliminate pointless '#if 1' statements without matching '#else'.

8 years agoAdd AVX FFT implementation.
Vitor Sessak [Mon, 25 Apr 2011 09:39:01 +0000 (11:39 +0200)]
Add AVX FFT implementation.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agoIncrease alignment of av_malloc() as needed by AVX ASM.
Vitor Sessak [Sat, 23 Apr 2011 17:24:31 +0000 (19:24 +0200)]
Increase alignment of av_malloc() as needed by AVX ASM.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agoUpdate x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
Vitor Sessak [Sat, 23 Apr 2011 17:24:06 +0000 (19:24 +0200)]
Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agomjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Michael Niedermayer [Thu, 21 Apr 2011 20:03:24 +0000 (22:03 +0200)]
mjpeg: Detect overreads in mjpeg_decode_scan() and error out.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
8 years agodocumentation: extend documentation for ffmpeg -aspect option
Stefano Sabatini [Sat, 9 Apr 2011 11:49:49 +0000 (13:49 +0200)]
documentation: extend documentation for ffmpeg -aspect option

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoAPIChanges: update commit hashes for recent additions.
Anton Khirnov [Tue, 26 Apr 2011 06:51:54 +0000 (08:51 +0200)]
APIChanges: update commit hashes for recent additions.

8 years agolavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
Stefano Sabatini [Sat, 23 Apr 2011 11:38:50 +0000 (13:38 +0200)]
lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums

Also deprecate av_get_pict_type_char() in favor of
av_get_picture_type_char().

The new enum and av_get_picture_type_char() are defined in libavutil.
This allows the use in libavfilter without the need to link against
libavcodec.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoaac: add headers needed for log2f()
Michael Niedermayer [Sat, 23 Apr 2011 08:44:21 +0000 (10:44 +0200)]
aac: add headers needed for log2f()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavc: remove FF_API_MB_Q cruft
Anton Khirnov [Tue, 12 Apr 2011 18:54:16 +0000 (20:54 +0200)]
lavc: remove FF_API_MB_Q cruft

8 years agolavc: remove FF_API_RATE_EMU cruft
Anton Khirnov [Tue, 12 Apr 2011 18:53:21 +0000 (20:53 +0200)]
lavc: remove FF_API_RATE_EMU cruft

8 years agolavc: remove FF_API_HURRY_UP cruft
Anton Khirnov [Tue, 12 Apr 2011 18:51:40 +0000 (20:51 +0200)]
lavc: remove FF_API_HURRY_UP cruft

8 years agopad: make the filter parametric
Stefano Sabatini [Sun, 17 Apr 2011 15:19:05 +0000 (17:19 +0200)]
pad: make the filter parametric

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovsrc_movie: add key_frame and pict_type.
royger [Mon, 18 Apr 2011 15:50:16 +0000 (17:50 +0200)]
vsrc_movie: add key_frame and pict_type.

Signed-off-by: Roger Pau Monné <roger.pau@entel.upc.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovsrc_movie: fix leak in request_frame()
Stefano Sabatini [Mon, 18 Apr 2011 17:21:25 +0000 (19:21 +0200)]
vsrc_movie: fix leak in request_frame()

Also set movie->picref to NULL, in order to avoid a crash in uninit()
when movie->picref is unreffed again and it was already freed.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
Roger Pau Monné [Sat, 16 Apr 2011 08:09:15 +0000 (10:09 +0200)]
lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovsrc_buffer: add sample_aspect_ratio fields to arguments.
Michael Niedermayer [Mon, 31 Jan 2011 19:48:35 +0000 (20:48 +0100)]
vsrc_buffer: add sample_aspect_ratio fields to arguments.

This fixes aspect handling in ffmpeg.

This is based on a patch by Baptiste.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavfi: add fieldorder filter
Mark Himsley [Sun, 10 Apr 2011 17:18:03 +0000 (19:18 +0200)]
lavfi: add fieldorder filter

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoscale: make the filter parametric
Stefano Sabatini [Sun, 27 Mar 2011 20:58:08 +0000 (22:58 +0200)]
scale: make the filter parametric

Make the filter accept parametric expressions for the output video
size.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: support 16-bit
James Darnley [Wed, 24 Nov 2010 20:25:09 +0000 (21:25 +0100)]
yadif: support 16-bit

Fixes by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: support more than yuv420p.
James Darnley [Tue, 5 Apr 2011 00:45:10 +0000 (02:45 +0200)]
yadif: support more than yuv420p.

and correctly support grey8

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: Fix assert() failure
Michael Niedermayer [Sat, 2 Apr 2011 18:26:39 +0000 (20:26 +0200)]
yadif: Fix assert() failure

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agographparser: add a NULL check on the argument passed to strstr
Stefano Sabatini [Wed, 30 Mar 2011 19:30:31 +0000 (21:30 +0200)]
graphparser: add a NULL check on the argument passed to strstr

Fix crash in create_filter() which occurrs if a scale filter with no
args is provided.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agosetdar: prefer "sar" over "par" in log info message
Stefano Sabatini [Sat, 26 Mar 2011 14:49:07 +0000 (15:49 +0100)]
setdar: prefer "sar" over "par" in log info message

This is more consistent with the terminology adopted by the aspect
filter names.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agofade: fix draw_slice() check on fade->factor value
Mark Himsley [Fri, 18 Mar 2011 15:25:26 +0000 (15:25 +0000)]
fade: fix draw_slice() check on fade->factor value

draw_slice() checks that the fade factor is < 65536 and only
calculates the fade if so. But the fade factor is clipped in
end_frame() by av_clip_uint16() to 65535, so the fade is calculated
for every frame.  This patch alters the check so that it compares with
< 65535 (UINT16_MAX).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agofade: make draw_slice() chroma check against planes 1 and 2
Mark Himsley [Fri, 18 Mar 2011 14:42:29 +0000 (14:42 +0000)]
fade: make draw_slice() chroma check against planes 1 and 2

draw_slice() checks that planes 0 and 1 of AVFilterBufferRef's data
are not NULL before manipulating planes 1 and 2. This patch makes the
check against planes 1 and 2. More senseful and possibly more robust.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agowin32: include the correct header in cmdutils.c
Luca Barbato [Mon, 25 Apr 2011 13:30:42 +0000 (15:30 +0200)]
win32: include the correct header in cmdutils.c

CommandLineToArgvW requires windows.h, include it directly

8 years agoac3: fix memleak in fixed-point encoder
Janne Grunau [Mon, 25 Apr 2011 16:56:40 +0000 (18:56 +0200)]
ac3: fix memleak in fixed-point encoder

caused by typo in mdct_end

8 years agoflashsv: Return more meaningful error values.
Diego Biurrun [Mon, 25 Apr 2011 14:01:58 +0000 (16:01 +0200)]
flashsv: Return more meaningful error values.

8 years agoflashsv: Employ explicit AVCodec struct initializers.
Diego Biurrun [Mon, 25 Apr 2011 00:22:46 +0000 (02:22 +0200)]
flashsv: Employ explicit AVCodec struct initializers.

8 years agoread AVI palette from the end of extradata
Kostya Shishkov [Sat, 23 Apr 2011 07:42:19 +0000 (09:42 +0200)]
read AVI palette from the end of extradata

Official AVI specification says that stream header in case of video contains
BITMAPINFO, which is equal to BITMAPINFOHEADER and optional palette. Currently
lavf AVI demuxer thinks otherwise which produces garbage on codecs that have
both palette and extradata (luckily, there are not so many such codecs).

An example of such file is:
http://samples.multimedia.cx/V-codecs/KMVC/baseball1.avi
(IIRC, MSS1 or MSS2 also had such situation but they are still not supported
by lavc).

As a side note, passing palette in extradata as it's been done previously is
not quite correct since proper _extra_ data is surplus bytes in
BITMAPINFOHEADER, not including palette.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agocosmetics: K&R coding style and more whitespace for Flash Screen Video
Diego Biurrun [Sun, 24 Apr 2011 12:47:54 +0000 (14:47 +0200)]
cosmetics: K&R coding style and more whitespace for Flash Screen Video

8 years agovorbisdec: Employ proper printf format specifiers for uint_fast32_t.
Diego Biurrun [Sun, 24 Apr 2011 17:49:39 +0000 (19:49 +0200)]
vorbisdec: Employ proper printf format specifiers for uint_fast32_t.

libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘uint_fast32_t’
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘uint_fast32_t’

8 years agoapplehttp: Don't export variant_bitrate if it isn't known
Martin Storsjö [Sun, 24 Apr 2011 17:19:49 +0000 (20:19 +0300)]
applehttp: Don't export variant_bitrate if it isn't known

If there are no variants, the total bitrate of the single
stream isn't known, and exporting variant_bitrate = 0 does
look weird, since there really aren't any variants.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agocrypto: Use av_freep instead of av_free
Martin Storsjö [Sun, 24 Apr 2011 17:10:37 +0000 (20:10 +0300)]
crypto: Use av_freep instead of av_free

Using av_freep is generally good practice.

Signed-off-by: Martin Storsjö <martin@martin.st>