ffmpeg.git
6 years agoswscale: clip before assigning tables in RGB output functions.
Ronald S. Bultje [Fri, 13 Apr 2012 21:42:21 +0000 (14:42 -0700)]
swscale: clip before assigning tables in RGB output functions.

6 years agoswscale: fix off-by-one in second coefficient in bilinear filters.
Ronald S. Bultje [Fri, 13 Apr 2012 21:37:47 +0000 (14:37 -0700)]
swscale: fix off-by-one in second coefficient in bilinear filters.

If coefficient A is 12-bits xixed-point number "X", then the other
coefficient is (1 << 12) - X, not (1 << 12) - X - 1.

6 years agovsrc_buffer: fix check from 7ae7c41.
Anton Khirnov [Sat, 14 Apr 2012 10:49:27 +0000 (12:49 +0200)]
vsrc_buffer: fix check from 7ae7c41.

The user submitted variable in this function is frame, not buf.

6 years agolibxvid: Reorder functions to avoid forward declarations; make functions static.
Diego Biurrun [Thu, 12 Apr 2012 11:43:09 +0000 (13:43 +0200)]
libxvid: Reorder functions to avoid forward declarations; make functions static.

6 years agolibxvid: drop some pointless dead code
Diego Biurrun [Thu, 12 Apr 2012 11:42:09 +0000 (13:42 +0200)]
libxvid: drop some pointless dead code

6 years agowmal: vertical alignment cosmetics
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:22 +0000 (14:00 -0700)]
wmal: vertical alignment cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agowmal: Warn about missing bitstream splicing feature and ask for sample.
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:21 +0000 (14:00 -0700)]
wmal: Warn about missing bitstream splicing feature and ask for sample.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agowmal: Skip seekable_frame_in_packet.
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:20 +0000 (14:00 -0700)]
wmal: Skip seekable_frame_in_packet.

There is no point in storing the value in a variable, since it is not
used anywhere else in the decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agowmal: Drop unused variable num_possible_block_size.
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:19 +0000 (14:00 -0700)]
wmal: Drop unused variable num_possible_block_size.

This is probably a leftover from WMA Pro.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agoavfiltergraph: make the AVFilterInOut alloc/free API public
Stefano Sabatini [Sat, 11 Jun 2011 13:30:46 +0000 (15:30 +0200)]
avfiltergraph: make the AVFilterInOut alloc/free API public

This is required for letting applications to create and destroy
AVFilterInOut structs in a convenient way.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agographparser: allow specifying sws flags in the graph description.
Anton Khirnov [Mon, 9 Apr 2012 04:13:53 +0000 (06:13 +0200)]
graphparser: allow specifying sws flags in the graph description.

6 years agographparser: fix the order of connecting unlabeled links.
Anton Khirnov [Mon, 9 Apr 2012 03:01:05 +0000 (05:01 +0200)]
graphparser: fix the order of connecting unlabeled links.

Right now, e.g. scale,[in]overlay would connect scale to the first
overlay input and [in] to the second, which goes against the
documentation and is unintuitive.

The bug happens because of the ordering mess in curr_inputs variable:
1) the unlabeled links from the previous filter are added to it in
correct order
2) input labels are parsed and inserted to the beginning one by one
(i.e. in reverse order)
3) curr_inputs is matched against filter inputs in reverse order

Fix the problem by always using proper ordering without trying to be
clever.

6 years agographparser: add avfilter_graph_parse2().
Anton Khirnov [Wed, 21 Mar 2012 06:46:56 +0000 (07:46 +0100)]
graphparser: add avfilter_graph_parse2().

Unlike avfilter_graph_parse(), it returns unlinked inputs and outputs
to the caller, which allows parsing of graphs where inputs/outputs are
not known in advance.

6 years agovsrc_buffer: allow using a NULL buffer to signal EOF.
Anton Khirnov [Sun, 1 Apr 2012 16:53:58 +0000 (18:53 +0200)]
vsrc_buffer: allow using a NULL buffer to signal EOF.

6 years agoswscale: handle last pixel if lines have an odd width.
Ronald S. Bultje [Fri, 6 Apr 2012 00:30:19 +0000 (17:30 -0700)]
swscale: handle last pixel if lines have an odd width.

Fixes bug 270.

6 years agoqdm2: fix a dubious pointer cast
Mans Rullgard [Fri, 13 Apr 2012 16:43:54 +0000 (17:43 +0100)]
qdm2: fix a dubious pointer cast

This reworks a loop to get rid of an ugly pointer cast,
fixing errors seen with the PathScale ENZO compiler.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoWMAL: Do not try to read rawpcm coefficients if bits is invalid
Michael Niedermayer [Fri, 13 Apr 2012 14:40:53 +0000 (07:40 -0700)]
WMAL: Do not try to read rawpcm coefficients if bits is invalid

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agomov: Fix detecting there is no sync sample.
Yusuke Nakamura [Fri, 13 Apr 2012 09:59:14 +0000 (18:59 +0900)]
mov: Fix detecting there is no sync sample.

Stss atom without entries doesn't mean every sample is a sync sample.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agotiffdec: K&R cosmetics
Alex Converse [Fri, 13 Apr 2012 01:28:37 +0000 (18:28 -0700)]
tiffdec: K&R cosmetics

6 years agoavf: has_duration does not check the global one
Luca Barbato [Fri, 13 Apr 2012 05:00:57 +0000 (22:00 -0700)]
avf: has_duration does not check the global one

Some container formats report a global duration, but not a per stream
one.

6 years agodsputil: fix optimized emu_edge function on Win64.
Ronald S. Bultje [Fri, 13 Apr 2012 18:06:39 +0000 (11:06 -0700)]
dsputil: fix optimized emu_edge function on Win64.

Recent register allocation changes (x86inc.asm update) changed the
register order and thus opcodes for the inner loops. One of them became
>128bytes, which confuses other parts of this function where it jumps
to fixed-offset positions to extend the edge by fixed amounts. A simple
register change fixes this.

6 years agoswscale: K&R formatting cosmetics (part II)
Diego Biurrun [Sun, 1 Apr 2012 08:34:10 +0000 (10:34 +0200)]
swscale: K&R formatting cosmetics (part II)

Also adjust some comments including wording and typo fixes.

6 years agotiffdec: Add a malloc check and refactor another.
Alex Converse [Fri, 13 Apr 2012 01:22:07 +0000 (18:22 -0700)]
tiffdec: Add a malloc check and refactor another.

6 years agofaxcompr: Check malloc results and unify return path
Alex Converse [Fri, 13 Apr 2012 01:10:57 +0000 (18:10 -0700)]
faxcompr: Check malloc results and unify return path

6 years agoconfigure: escape colons in values written to config.fate
Mans Rullgard [Thu, 12 Apr 2012 20:32:33 +0000 (21:32 +0100)]
configure: escape colons in values written to config.fate

The fields in config.fate are colon-separated so any colons
within the fields should be escaped to prevent confusion.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
Justin Ruggles [Thu, 12 Apr 2012 20:22:00 +0000 (16:22 -0400)]
ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE

Fixes ac3-encode and eac3-encode FATE test failures with SSE2 disabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agomatroska: Fix leaking memory allocated for laces.
Dale Curtis [Fri, 13 Apr 2012 04:24:04 +0000 (21:24 -0700)]
matroska: Fix leaking memory allocated for laces.

During error conditions matroska_parse_block may exit without
freeing the memory allocated for laces.

Found via valgrind: http://pastebin.com/E54k8QFU

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agopthread: Fix crash due to fctx->delaying not being cleared.
Dale Curtis [Fri, 13 Apr 2012 00:12:27 +0000 (17:12 -0700)]
pthread: Fix crash due to fctx->delaying not being cleared.

Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agovp3: Assert on invalid filter_limit values.
Dale Curtis [Thu, 12 Apr 2012 23:07:10 +0000 (16:07 -0700)]
vp3: Assert on invalid filter_limit values.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agoh264: fix 10bit biweight functions after recent x86inc.asm fixes.
Ronald S. Bultje [Thu, 12 Apr 2012 16:45:10 +0000 (09:45 -0700)]
h264: fix 10bit biweight functions after recent x86inc.asm fixes.

This should have been updated in the x86inc.asm update, but was
accidently forgotten.

6 years agoffv1: Fix size mismatch in encode_line.
Alex Converse [Fri, 13 Apr 2012 00:11:03 +0000 (17:11 -0700)]
ffv1: Fix size mismatch in encode_line.

6 years agomovenc: Remove a dead initialization
Alex Converse [Fri, 13 Apr 2012 00:02:24 +0000 (17:02 -0700)]
movenc: Remove a dead initialization

6 years agogit-howto: Explain how to avoid Windows line endings in git checkouts.
Diego Biurrun [Thu, 12 Apr 2012 17:42:26 +0000 (19:42 +0200)]
git-howto: Explain how to avoid Windows line endings in git checkouts.

6 years agobuild: Move all arch OBJS declarations into arch subdirectory Makefiles.
Diego Biurrun [Mon, 6 Feb 2012 18:16:44 +0000 (19:16 +0100)]
build: Move all arch OBJS declarations into arch subdirectory Makefiles.

6 years agolibxvid: remove disabled code
Diego Biurrun [Fri, 29 Jul 2011 10:49:23 +0000 (12:49 +0200)]
libxvid: remove disabled code

6 years agoqdm2: make a table static const
Mans Rullgard [Wed, 11 Apr 2012 12:03:25 +0000 (13:03 +0100)]
qdm2: make a table static const

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoqdm2: simplify bitstream reader setup for some subpacket types
Mans Rullgard [Wed, 11 Apr 2012 12:02:43 +0000 (13:02 +0100)]
qdm2: simplify bitstream reader setup for some subpacket types

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoqdm2: use get_bits_left()
Mans Rullgard [Wed, 11 Apr 2012 10:54:31 +0000 (11:54 +0100)]
qdm2: use get_bits_left()

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agobuild: Consistently handle conditional compilation for all optimization OBJS.
Diego Biurrun [Tue, 27 Mar 2012 21:10:02 +0000 (23:10 +0200)]
build: Consistently handle conditional compilation for all optimization OBJS.

6 years agoavpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics
Diego Biurrun [Sun, 1 Apr 2012 08:47:39 +0000 (10:47 +0200)]
avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics

6 years agomsrle: convert MS RLE decoding function to bytestream2.
Ronald Bultje [Sat, 31 Mar 2012 17:10:54 +0000 (17:10 +0000)]
msrle: convert MS RLE decoding function to bytestream2.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
6 years agox86inc improvements for 64-bit
Henrik Gramner [Wed, 4 Apr 2012 20:03:15 +0000 (20:03 +0000)]
x86inc improvements for 64-bit

Add support for all x86-64 registers
Prefer caller-saved register over callee-saved on WIN64
Support up to 15 function arguments

Also (by Ronald S. Bultje)
Fix up our asm to work with new x86inc.asm.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
6 years agoavplay: Don't free video filters string until the end of decoding.
Alex Converse [Wed, 11 Apr 2012 01:18:53 +0000 (18:18 -0700)]
avplay: Don't free video filters string until the end of decoding.

av_freep()ing inside configure_video_filters() leaves a dangling
reference in the calling code, and the filter string is needed again when
reconfiguring video filters for a size change.

6 years agomovenc: small refactor mov_write_packet
Luca Barbato [Wed, 11 Apr 2012 10:37:14 +0000 (03:37 -0700)]
movenc: small refactor mov_write_packet

Share the formerly internal write_packet with the hinter and move the
fragment flush logic to the user facing one since it is not concerned
about movtrack-only streams.

Fixes bug #263

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agomovenc: remove redundant check
Luca Barbato [Wed, 11 Apr 2012 10:37:13 +0000 (03:37 -0700)]
movenc: remove redundant check

The proper check is already in mov_write_header.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agointerplayvideo: fix av_dlog parameter type mismatch
Diego Biurrun [Tue, 10 Apr 2012 16:18:40 +0000 (18:18 +0200)]
interplayvideo: fix av_dlog parameter type mismatch

libavcodec/interplayvideo.c:909:13: warning: format ‘%p’ expects argument of type ‘void *’, but argument 7 has type ‘GetByteContext’ [-Wformat]

6 years agoDrop some pointless #ifdefs.
Diego Biurrun [Tue, 10 Apr 2012 12:27:59 +0000 (14:27 +0200)]
Drop some pointless #ifdefs.

The files are only compiled if the #ifdef conditions are met.

6 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>
6 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>
6 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.

6 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.

6 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>
6 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>
6 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>
6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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}

6 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.

6 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.

6 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.

6 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.

6 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

6 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()

6 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

6 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()

6 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.

6 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.

6 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.

6 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>
6 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>

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 years agortpdec_asf: Set the no_resync_search option for the chained asf demuxer
Martin Storsjö [Fri, 6 Apr 2012 13:58:48 +0000 (16:58 +0300)]
rtpdec_asf: Set the no_resync_search option for the chained asf demuxer

Searching for packet markers doesn't make sense for this use case,
where packets are fed one at a time to the demuxer.

This fixes playing back streams that have packets not starting
with the 0x82, 0x00, 0x00 marker.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoasfdec: Add an option for not searching for the packet markers
Martin Storsjö [Fri, 6 Apr 2012 13:54:23 +0000 (16:54 +0300)]
asfdec: Add an option for not searching for the packet markers

Some streams don't contain these.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agocosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
Martin Storsjö [Fri, 6 Apr 2012 19:40:41 +0000 (22:40 +0300)]
cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agocosmetics: Align codec declarations
Martin Storsjö [Fri, 6 Apr 2012 16:19:39 +0000 (19:19 +0300)]
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>
6 years agocosmetics: Convert mimic.c to utf-8
Martin Storsjö [Fri, 6 Apr 2012 17:56:45 +0000 (20:56 +0300)]
cosmetics: Convert mimic.c to utf-8

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoavconv: remove an unused function parameter.
Anton Khirnov [Thu, 22 Mar 2012 09:26:43 +0000 (10:26 +0100)]
avconv: remove an unused function parameter.

6 years agoavconv: remove now pointless variables.
Anton Khirnov [Wed, 14 Mar 2012 08:20:17 +0000 (09:20 +0100)]
avconv: remove now pointless variables.

6 years agoavconv: drop support for building without libavfilter.
Anton Khirnov [Wed, 14 Mar 2012 08:10:41 +0000 (09:10 +0100)]
avconv: drop support for building without libavfilter.

Since the mandatory memcpy in vsrc_buffer has been eliminated, there
shouldn't be any significant reason to build without lavfi anymore.

This will make upcoming support for complex filtergraphs easier to do.

6 years agonellymoserenc: fix crash due to memsetting the wrong area.
Reimar Döffinger [Fri, 6 Apr 2012 13:26:35 +0000 (15:26 +0200)]
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>
6 years agolibavformat: Only require first packet to be known for audio/video streams
Joakim Plate [Sat, 10 Sep 2011 22:33:20 +0000 (00:33 +0200)]
libavformat: Only require first packet to be known for audio/video streams

It can take a long time before subtitles or data streams show up,
so we shouldn't wait for those before assuming we have all info
for streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoavplay: Don't try to scale timestamps if the tb isn't set
Martin Storsjö [Fri, 6 Apr 2012 10:51:34 +0000 (13:51 +0300)]
avplay: Don't try to scale timestamps if the tb isn't set

If get_filtered_video_frame failed above, tb might not be
initialized at all, so don't scale using it.

This fixes cases where avplay could crash if aborting
avformat_find_stream_info with ctrl+c.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agocosmetics: Align muxer/demuxer declarations
Martin Storsjö [Fri, 6 Apr 2012 14:50:48 +0000 (17:50 +0300)]
cosmetics: Align muxer/demuxer declarations

Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agompeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
Anne Aaron [Wed, 4 Apr 2012 18:36:00 +0000 (11:36 -0700)]
mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoavcodec: remove avcodec_guess_channel_layout()
Justin Ruggles [Thu, 22 Mar 2012 00:39:02 +0000 (20:39 -0400)]
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().

6 years agoavutil: Add av_get_default_channel_layout()
Justin Ruggles [Thu, 22 Mar 2012 00:36:51 +0000 (20:36 -0400)]
avutil: Add av_get_default_channel_layout()

Also, use the new function in the AC-3 encoder.

6 years agoh264: Factorize declaration of mb_sizes array.
Diego Biurrun [Wed, 4 Apr 2012 12:53:25 +0000 (14:53 +0200)]
h264: Factorize declaration of mb_sizes array.