]> git.sesse.net Git - ffmpeg/log
ffmpeg
12 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.

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

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

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

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

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

12 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

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

12 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

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

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

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

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

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

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

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

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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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().

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

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

12 years agovsrc_buffer: when no frame is available, return an error instead of segfaulting.
Anton Khirnov [Sun, 1 Apr 2012 13:18:00 +0000 (15:18 +0200)]
vsrc_buffer: when no frame is available, return an error instead of segfaulting.

12 years agoconfigure: add dl to frei0r extralibs.
Anton Khirnov [Sun, 1 Apr 2012 16:56:26 +0000 (18:56 +0200)]
configure: add dl to frei0r extralibs.

12 years agodsputil x86: use SSE float instruction instead of SSE2 integer equivalent
Christophe GISQUET [Wed, 21 Mar 2012 19:46:29 +0000 (20:46 +0100)]
dsputil x86: use SSE float instruction instead of SSE2 integer equivalent

All the more required since the users are pure SSE functions.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agodsputil x86: remove deprecated parameter from scalarproduct_int16 prototype
Christophe GISQUET [Mon, 19 Mar 2012 15:34:39 +0000 (16:34 +0100)]
dsputil x86: remove deprecated parameter from scalarproduct_int16 prototype

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agovp8dsp x86: perform rounding shift with a single instruction
Christophe GISQUET [Mon, 26 Mar 2012 00:29:09 +0000 (02:29 +0200)]
vp8dsp x86: perform rounding shift with a single instruction

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agofate: add BMP tests.
Ronald S. Bultje [Wed, 4 Apr 2012 18:16:23 +0000 (11:16 -0700)]
fate: add BMP tests.

12 years agoswscale: handle complete dimensions for monoblack/white.
Ronald S. Bultje [Wed, 4 Apr 2012 17:50:29 +0000 (10:50 -0700)]
swscale: handle complete dimensions for monoblack/white.

Fixes bug 269.

12 years agoaacenc: Mark deinterleave_input_samples argument as const.
Diego Biurrun [Wed, 4 Apr 2012 08:06:58 +0000 (10:06 +0200)]
aacenc: Mark deinterleave_input_samples argument as const.

This fixes the warning:
libavcodec/aacenc.c:524: warning: passing argument 2 of ‘deinterleave_input_samples’ discards qualifiers from pointer target type

12 years agovf_unsharp: Mark readonly variable as const.
Diego Biurrun [Wed, 4 Apr 2012 08:08:37 +0000 (10:08 +0200)]
vf_unsharp: Mark readonly variable as const.

This fixes the following warning:
libavfilter/vf_unsharp.c:106: warning: initialization discards qualifiers from pointer target type

12 years agoh264: fix 4:2:2 PCM-macroblocks decoding
Anton Mitrofanov [Mon, 2 Apr 2012 16:25:19 +0000 (09:25 -0700)]
h264: fix 4:2:2 PCM-macroblocks decoding

Fixes bug 239.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agow32threads: Make pthread_cond_wait follow POSIX
Derek Buitenhuis [Tue, 3 Apr 2012 21:36:49 +0000 (17:36 -0400)]
w32threads: Make pthread_cond_wait follow POSIX

pthread_cond_wait is supposed to return an integer,
and indeed does sometimes. Fix its function declaration
to match its behavior and POSIX.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agocosmetics: Consistently place static, inline and av_cold attributes/keywords.
Diego Biurrun [Fri, 30 Mar 2012 21:34:22 +0000 (23:34 +0200)]
cosmetics: Consistently place static, inline and av_cold attributes/keywords.

12 years agosbrdsp: Use standard multiple inclusion guards.
Diego Biurrun [Sat, 31 Mar 2012 11:41:16 +0000 (13:41 +0200)]
sbrdsp: Use standard multiple inclusion guards.

12 years agopcm: K&R formatting cosmetics
Aneesh Dogra [Fri, 30 Mar 2012 15:33:02 +0000 (21:03 +0530)]
pcm: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agorawdec: Support fourccs YV16 and YV24
Piotr Bandurski [Wed, 28 Dec 2011 04:50:27 +0000 (04:50 +0000)]
rawdec: Support fourccs YV16 and YV24

12 years agortmp: implement bandwidth notification
Raffaele Sena [Wed, 7 Mar 2012 18:21:16 +0000 (10:21 -0800)]
rtmp: implement bandwidth notification

Improve compatibility with some servers.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agortmp: update supported audio codecs value
Samuel Pitoiset [Mon, 2 Apr 2012 20:50:38 +0000 (22:50 +0200)]
rtmp: update supported audio codecs value

The audio codecs property is composed by all values except
SUPPORT_SND_INTEL (0x0008) and SUPPORT_SND_UNUSED (0x0010) which are
unused.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agoUnscaled Planar RGB -> RGB support in swscale.
Hans-Kristian Arntzen [Sun, 6 Nov 2011 09:43:47 +0000 (10:43 +0100)]
Unscaled Planar RGB -> RGB support in swscale.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agoFATE: Add RALF decoding test
Derek Buitenhuis [Sat, 31 Mar 2012 19:57:26 +0000 (15:57 -0400)]
FATE: Add RALF decoding test

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agovsrc_buffer: allow buffering arbitrary number of frames.
Anton Khirnov [Thu, 29 Mar 2012 09:22:40 +0000 (11:22 +0200)]
vsrc_buffer: allow buffering arbitrary number of frames.

12 years agovf_scale: avoid a pointless memcpy in no-op conversion.
Anton Khirnov [Thu, 29 Mar 2012 05:02:27 +0000 (07:02 +0200)]
vf_scale: avoid a pointless memcpy in no-op conversion.

I.e. just pass the buffer along when src parameters == dst parameters.

12 years agoavfiltergraph: try to reduce format conversions in filters.
Anton Khirnov [Fri, 23 Mar 2012 14:14:40 +0000 (15:14 +0100)]
avfiltergraph: try to reduce format conversions in filters.

Current code, with a filterchain such as
(input - yuv411) -> (scale - any) -> (sink - any)
will result in yuv420 being chosen for the second link, which is clearly
not right.

This commit attempts to improve in the following way:
repeat until convergence:
  loop over all filters
    find input link with exactly one format
    force this format on all output links of the same type (if possible)

12 years agoavfiltergraph: add an AVClass to AVFilterGraph on next major bump.
Anton Khirnov [Sun, 18 Mar 2012 10:27:38 +0000 (11:27 +0100)]
avfiltergraph: add an AVClass to AVFilterGraph on next major bump.

It will be used for logging, possibly also AVOptions.

12 years agoid3v2: fix skipping extended header in id3v2.4
Anton Khirnov [Sat, 31 Mar 2012 05:52:42 +0000 (07:52 +0200)]
id3v2: fix skipping extended header in id3v2.4

In v2.4, the length includes the length field itself.

12 years agoapedec: check bits <= 32.
Michael Niedermayer [Thu, 29 Mar 2012 17:52:21 +0000 (17:52 +0000)]
apedec: check bits <= 32.

Fixes a floating-point exception further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agocavs: Remove unused code.
Aneesh Dogra [Fri, 30 Mar 2012 18:14:06 +0000 (23:44 +0530)]
cavs: Remove unused code.

The square is always passed as 1 whenever the function is called and
thus the if block never gets executed.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agooggenc: fix condition when not to flush due to keyframe granule.
Reimar Döffinger [Sat, 18 Feb 2012 20:21:20 +0000 (21:21 +0100)]
oggenc: fix condition when not to flush due to keyframe granule.

The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agooggenc: add pagesize option to set preferred page size
Andres Gonzalez [Thu, 27 Jan 2011 09:14:21 +0000 (10:14 +0100)]
oggenc: add pagesize option to set preferred page size

When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agolibspeexdec: set frame size in libspeex_decode_init()
Justin Ruggles [Thu, 29 Mar 2012 16:01:42 +0000 (12:01 -0400)]
libspeexdec: set frame size in libspeex_decode_init()

This fixes speex decoding, which was broken in 85469f1c.

12 years agosmacker audio: sign-extend the initial 16-bit predicted value
Franz Brauße [Fri, 30 Mar 2012 18:40:14 +0000 (14:40 -0400)]
smacker audio: sign-extend the initial 16-bit predicted value

Fixes Bug #265

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoh264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing()
Diego Biurrun [Thu, 29 Mar 2012 12:15:16 +0000 (14:15 +0200)]
h264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing()

12 years agoh264: Make ff_h264_decode_end() static, it is not used externally.
Diego Biurrun [Thu, 29 Mar 2012 11:52:21 +0000 (13:52 +0200)]
h264: Make ff_h264_decode_end() static, it is not used externally.

Also drop the now unnecessary ff_ prefix from its name.

12 years agooutput-example: K&R formatting cosmetics, comment spelling fixes
Diego Biurrun [Fri, 30 Mar 2012 00:27:05 +0000 (02:27 +0200)]
output-example: K&R formatting cosmetics, comment spelling fixes

12 years agoavf: make the example output the proper message
Luca Barbato [Thu, 29 Mar 2012 22:28:00 +0000 (15:28 -0700)]
avf: make the example output the proper message

av_dump_format needs the codecs opened in order to print
them.

12 years agoavf: fix audio writing in the output-example
Luca Barbato [Thu, 29 Mar 2012 19:00:37 +0000 (12:00 -0700)]
avf: fix audio writing in the output-example

av_init_packet does not reset data and size fields in AVPacket,
avcodec_encode_audio2 can use preallocated AVPacket.

12 years agomov: don't overwrite existing indexes.
Ronald S. Bultje [Wed, 28 Mar 2012 19:56:07 +0000 (12:56 -0700)]
mov: don't overwrite existing indexes.

Prevents all kind of badness if files contain multiple
indexes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agolzw: fix potential integer overflow.
Ronald S. Bultje [Thu, 29 Mar 2012 03:00:38 +0000 (20:00 -0700)]
lzw: fix potential integer overflow.

12 years agotruemotion: forbid invalid VLC bitsizes and token values.
Ronald S. Bultje [Thu, 29 Mar 2012 17:25:04 +0000 (10:25 -0700)]
truemotion: forbid invalid VLC bitsizes and token values.

SHOW_UBITS() is only defined up to n_bits is 25, therefore forbid
values larger than this in get_vlc2() (max_bits). tokens[][] can be
used as an index in deltas[], which has a size of 64, so ensure the
values are smaller than that.

This prevents crashes on corrupt bitstreams.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agotruemotion2: handle out-of-frame motion vectors through edge extension.
Ronald S. Bultje [Thu, 29 Mar 2012 16:29:03 +0000 (09:29 -0700)]
truemotion2: handle out-of-frame motion vectors through edge extension.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoconfigure: Check for a different SDL function
Martin Storsjö [Wed, 28 Mar 2012 17:37:13 +0000 (20:37 +0300)]
configure: Check for a different SDL function

This one is available both in SDL 1.2 and in 1.3 (which is the current
version available e.g. in macports), while 1.3 doesn't contain
SDL_Linked_Version().

The current check for SDL_Linked_Version() (available since SDL 1.2.13)
was added in 8f1b06c8, because including the headers for SDL_Init()
redirects the main() function, requiring the main function signature
to match the one of SDL_main (including argc/argv).

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agomp3dec: perform I/S and M/S only when frame mode is joint stereo.
Kostya Shishkov [Thu, 29 Mar 2012 10:08:07 +0000 (12:08 +0200)]
mp3dec: perform I/S and M/S only when frame mode is joint stereo.

Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.

12 years agoid3v2: add another mimetype for JPEG image
Kostya Shishkov [Thu, 29 Mar 2012 10:07:35 +0000 (12:07 +0200)]
id3v2: add another mimetype for JPEG image

12 years agolzw: prevent buffer overreads.
Ronald S. Bultje [Thu, 29 Mar 2012 00:06:00 +0000 (17:06 -0700)]
lzw: prevent buffer overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoWMAL: Remove inaccurate and unnecessary doxy
Mashiat Sarker Shakkhar [Wed, 28 Mar 2012 18:12:13 +0000 (11:12 -0700)]
WMAL: Remove inaccurate and unnecessary doxy

A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agoh264: fix cabac-on-stack after safe cabac reader.
Ronald S. Bultje [Wed, 28 Mar 2012 23:32:27 +0000 (16:32 -0700)]
h264: fix cabac-on-stack after safe cabac reader.

12 years agotruemotion2: convert packet header reading to bytestream2.
Ronald S. Bultje [Wed, 28 Mar 2012 18:53:13 +0000 (11:53 -0700)]
truemotion2: convert packet header reading to bytestream2.

Also use correct buffer sizes in calls to tm2_read_stream(). Together,
this prevents overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoasf: only set index_read if the index contained entries.
Ronald S. Bultje [Wed, 28 Mar 2012 17:22:25 +0000 (10:22 -0700)]
asf: only set index_read if the index contained entries.

This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).

12 years agocabac: add overread protection to BRANCHLESS_GET_CABAC().
Ronald S. Bultje [Sat, 17 Mar 2012 16:09:41 +0000 (09:09 -0700)]
cabac: add overread protection to BRANCHLESS_GET_CABAC().

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agocabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
Ronald S. Bultje [Sat, 17 Mar 2012 16:04:32 +0000 (09:04 -0700)]
cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().

12 years agocabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
Ronald S. Bultje [Sat, 17 Mar 2012 16:03:22 +0000 (09:03 -0700)]
cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().

12 years agocabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
Ronald S. Bultje [Sat, 17 Mar 2012 16:02:44 +0000 (09:02 -0700)]
cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().

12 years agoh264: add overread protection to get_cabac_bypass_sign_x86().
Ronald S. Bultje [Sat, 17 Mar 2012 15:58:48 +0000 (08:58 -0700)]
h264: add overread protection to get_cabac_bypass_sign_x86().

12 years agoh264: reindent get_cabac_bypass_sign_x86().
Ronald S. Bultje [Sat, 17 Mar 2012 16:32:03 +0000 (09:32 -0700)]
h264: reindent get_cabac_bypass_sign_x86().

12 years agoh264: use struct offsets in get_cabac_bypass_sign_x86().
Ronald S. Bultje [Sat, 17 Mar 2012 05:41:17 +0000 (22:41 -0700)]
h264: use struct offsets in get_cabac_bypass_sign_x86().

12 years agoh264: fix overreads in cabac reader.
Ronald S. Bultje [Sat, 17 Mar 2012 04:56:40 +0000 (21:56 -0700)]
h264: fix overreads in cabac reader.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agowmall: fix seeking.
Ronald S. Bultje [Wed, 28 Mar 2012 14:14:21 +0000 (07:14 -0700)]
wmall: fix seeking.

12 years agolagarith: fix buffer overreads.
Ronald S. Bultje [Tue, 27 Mar 2012 19:26:46 +0000 (12:26 -0700)]
lagarith: fix buffer overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agodvdec: drop unnecessary dv_tablegen.h #include
Diego Biurrun [Wed, 28 Mar 2012 13:44:18 +0000 (15:44 +0200)]
dvdec: drop unnecessary dv_tablegen.h #include

dvdec.c uses nothing from dv_tablegen.h.  As a welcome side-effect, this
fixes compilation of that file with hardcoded tables enabled.

12 years agobuild: fix doc generation errors in parallel builds
Mans Rullgard [Tue, 27 Mar 2012 21:42:41 +0000 (22:42 +0100)]
build: fix doc generation errors in parallel builds

The $(dir) function used to construct OBJDIRS includes a trailing slash
in the names returned, which GNU make 3.82 does not match to the
slash-less 'doc' in the documentation dependencies, causing parallel
build to fail.  Adding a slash fixes this and still works with make
3.81.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoReplace memset(0) by zero initializations.
Diego Biurrun [Mon, 6 Jun 2011 12:13:02 +0000 (14:13 +0200)]
Replace memset(0) by zero initializations.

Also remove one pointless zero initialization in rangecoder.c.

12 years agofaandct: Remove FAAN_POSTSCALE define and related code.
Diego Biurrun [Tue, 27 Mar 2012 14:42:23 +0000 (16:42 +0200)]
faandct: Remove FAAN_POSTSCALE define and related code.

It is not a user-accessible option and unlikely to ever be changed.

12 years agodvenc: print allowed profiles if the video doesn't conform to any of them.
Anton Khirnov [Mon, 26 Mar 2012 11:02:54 +0000 (13:02 +0200)]
dvenc: print allowed profiles if the video doesn't conform to any of them.

12 years agoavcodec_encode_{audio,video}: only reallocate output packet when it has non-zero...
Anton Khirnov [Tue, 27 Mar 2012 06:21:02 +0000 (08:21 +0200)]
avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.

Otherwise realloc would free it, which would result in double free
later.