ffmpeg.git
5 years agoARM: libavresample: NEON optimised stereo fltp to s16 conversion
Mans Rullgard [Mon, 10 Sep 2012 14:47:00 +0000 (15:47 +0100)]
ARM: libavresample: NEON optimised stereo fltp to s16 conversion

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agoARM: libavresample: NEON optimised flat float to s16 conversion
Mans Rullgard [Sun, 9 Sep 2012 18:25:43 +0000 (19:25 +0100)]
ARM: libavresample: NEON optimised flat float to s16 conversion

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agoos_support: Choose between direct.h and io.h using a configure check
Martin Storsjö [Thu, 13 Sep 2012 11:26:10 +0000 (14:26 +0300)]
os_support: Choose between direct.h and io.h using a configure check

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoos_support: Include io.h instead of direct.h on mingw32ce
Martin Storsjö [Thu, 13 Sep 2012 09:34:17 +0000 (12:34 +0300)]
os_support: Include io.h instead of direct.h on mingw32ce

Windows CE doesn't have neither mkdir nor _mkdir officially (only
CreateDirectoryW), but mingw32ce has compat wrappers with these names
(declared in io.h since direct.h is unavailable).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: ac3dsp: Only refer to the ac3_downmix_sse symbol if it has been declared
Martin Storsjö [Thu, 13 Sep 2012 08:18:25 +0000 (11:18 +0300)]
x86: ac3dsp: Only refer to the ac3_downmix_sse symbol if it has been declared

This fixes building without inline assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoswscale: Remove two bogus asserts
Diego Biurrun [Tue, 11 Sep 2012 20:11:25 +0000 (22:11 +0200)]
swscale: Remove two bogus asserts

5 years agoac3: move ac3_downmix() from dsputil to ac3dsp
Mans Rullgard [Tue, 11 Sep 2012 16:55:11 +0000 (17:55 +0100)]
ac3: move ac3_downmix() from dsputil to ac3dsp

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agolavr/audio_mix_matrix: acknowledge the existence of LFE2.
Tim Walker [Wed, 12 Sep 2012 15:09:33 +0000 (17:09 +0200)]
lavr/audio_mix_matrix: acknowledge the existence of LFE2.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
5 years agomlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.
Tim Walker [Wed, 12 Sep 2012 15:09:32 +0000 (17:09 +0200)]
mlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
5 years agolavu/audioconvert: add a second low frequency channel.
Tim Walker [Wed, 12 Sep 2012 15:09:31 +0000 (17:09 +0200)]
lavu/audioconvert: add a second low frequency channel.

Can be used by DTS-HD, TrueHD and E-AC-3, among others.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
5 years agompegts: check substreams before discarding
Christian Schmidt [Thu, 6 Sep 2012 14:43:24 +0000 (16:43 +0200)]
mpegts: check substreams before discarding

Allow to extract the AC3 core from TrueHD with the "copy" codec.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoAdd a smooth streaming segmenter muxer
Martin Storsjö [Mon, 19 Mar 2012 21:12:54 +0000 (23:12 +0200)]
Add a smooth streaming segmenter muxer

This muxer splits the output from the ismv muxer into individual
files, in realtime.

The same can also be done by the standalone tool ismindex, but this
muxer is needed for doing it in realtime (especially for live
streams that need extra handling for updating the lookahead fields
in the fragment headers).

Using this muxer, one can deliver live smooth streaming from a
normal static file web server. (Using ismindex, one can deliver
premade smooth streaming files from a static file web server,
or prepare files for serving with IIS.)

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agofile: Add an avoption for disabling truncating existing files on open
Martin Storsjö [Sun, 9 Sep 2012 19:42:56 +0000 (22:42 +0300)]
file: Add an avoption for disabling truncating existing files on open

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoimg2dec: always close AVIOContexts
Tomas Härdin [Fri, 7 Sep 2012 11:28:48 +0000 (13:28 +0200)]
img2dec: always close AVIOContexts

Zero sized files would cause the contexts to leak away.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agortpdec_jpeg: Error out on other unsupported type values as well
Martin Storsjö [Tue, 11 Sep 2012 11:42:22 +0000 (14:42 +0300)]
rtpdec_jpeg: Error out on other unsupported type values as well

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Disallow using the reserved q values
Martin Storsjö [Tue, 11 Sep 2012 11:41:42 +0000 (14:41 +0300)]
rtpdec_jpeg: Disallow using the reserved q values

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Fold the default qtables case into an existing if statement
Martin Storsjö [Tue, 11 Sep 2012 11:39:58 +0000 (14:39 +0300)]
rtpdec_jpeg: Fold the default qtables case into an existing if statement

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Store and reuse old qtables for q values 128-254
Martin Storsjö [Tue, 11 Sep 2012 11:29:54 +0000 (14:29 +0300)]
rtpdec_jpeg: Store and reuse old qtables for q values 128-254

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Simplify the calculation of the number of qtables
Martin Storsjö [Tue, 11 Sep 2012 11:43:10 +0000 (14:43 +0300)]
rtpdec_jpeg: Simplify the calculation of the number of qtables

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Add more comments about the fields in the SOF0 section
Martin Storsjö [Tue, 11 Sep 2012 09:54:06 +0000 (12:54 +0300)]
rtpdec_jpeg: Add more comments about the fields in the SOF0 section

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Clarify where the subsampling magic numbers come from
Martin Storsjö [Tue, 11 Sep 2012 09:52:55 +0000 (12:52 +0300)]
rtpdec_jpeg: Clarify where the subsampling magic numbers come from

Write out the numbers the way they are constructed, not just the
final values.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Don't use a bitstream writer for the EOI marker
Martin Storsjö [Tue, 11 Sep 2012 09:46:44 +0000 (12:46 +0300)]
rtpdec_jpeg: Don't use a bitstream writer for the EOI marker

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Don't needlessly use a bitstream writer for the header
Martin Storsjö [Tue, 11 Sep 2012 09:44:25 +0000 (12:44 +0300)]
rtpdec_jpeg: Don't needlessly use a bitstream writer for the header

Everything written with this bitstream writer is 8/16 bit units
(except for a pair of 4 bit values), so using a bitstream writer
isn't necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Simplify writing of the jpeg header
Martin Storsjö [Tue, 11 Sep 2012 09:32:37 +0000 (12:32 +0300)]
rtpdec_jpeg: Simplify writing of the jpeg header

Generalize writing of any number of qtables. Don't manually write
16 bit values in two separate calls.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Merge two if statements
Martin Storsjö [Tue, 11 Sep 2012 09:07:56 +0000 (12:07 +0300)]
rtpdec_jpeg: Merge two if statements

This makes the code more readable and robust.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_jpeg: Write the DHT section properly
Martin Storsjö [Tue, 11 Sep 2012 08:03:05 +0000 (11:03 +0300)]
rtpdec_jpeg: Write the DHT section properly

Currently the size header of the generated DHT section is
incorrect, making the mjpeg decoder just skip it. Since the
written huffman tables are the default ones, this failure had
gone undetected.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoutvideoenc: Add missing AV_ prefix to codec ID
Diego Biurrun [Tue, 11 Sep 2012 15:08:05 +0000 (17:08 +0200)]
utvideoenc: Add missing AV_ prefix to codec ID

5 years agoavserver: Add missing #include for av_gettime()
Diego Biurrun [Tue, 11 Sep 2012 15:07:37 +0000 (17:07 +0200)]
avserver: Add missing #include for av_gettime()

5 years agoconfigure: Only disable aligned stack on MSVC on 32 bit
Martin Storsjö [Tue, 11 Sep 2012 08:10:12 +0000 (11:10 +0300)]
configure: Only disable aligned stack on MSVC on 32 bit

On 64 bit, the stack seems to be aligned enough for our needs.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoconfigure: indentation cosmetics
Diego Biurrun [Sun, 19 Aug 2012 19:35:30 +0000 (21:35 +0200)]
configure: indentation cosmetics

5 years agortpdec_jpeg: Add support for default quantizers
Samuel Pitoiset [Mon, 10 Sep 2012 19:15:09 +0000 (21:15 +0200)]
rtpdec_jpeg: Add support for default quantizers

Generate quantization tables when they are not present in the
first chunk.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: dsputil: Move specific optimization settings out of global init function
Diego Biurrun [Wed, 5 Sep 2012 14:42:57 +0000 (16:42 +0200)]
x86: dsputil: Move specific optimization settings out of global init function

They belong in the init functions specific to each CPU capability.

5 years agoavplay: get rid of ugly casts in the options table
Anton Khirnov [Mon, 10 Sep 2012 12:42:24 +0000 (14:42 +0200)]
avplay: get rid of ugly casts in the options table

5 years agoavplay: fix prototypes for option callbacks.
Anton Khirnov [Mon, 10 Sep 2012 12:37:46 +0000 (14:37 +0200)]
avplay: fix prototypes for option callbacks.

They have been wrong since 11d957fbd81288e64408e79ed369446346000b29

5 years agoflvdec: always set AVFMTCTX_NOHEADER.
Anton Khirnov [Sat, 1 Sep 2012 14:20:58 +0000 (16:20 +0200)]
flvdec: always set AVFMTCTX_NOHEADER.

New streams may be created at any time, e.g. on codec change.

5 years agofile: Use a normal private context for storing the file descriptor
Martin Storsjö [Sun, 9 Sep 2012 19:35:50 +0000 (22:35 +0300)]
file: Use a normal private context for storing the file descriptor

Previously the file descriptor was stored in the priv_data pointer.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoconfigure: Adjust the xgetbv instrinsic check
Martin Storsjö [Mon, 10 Sep 2012 14:35:39 +0000 (17:35 +0300)]
configure: Adjust the xgetbv instrinsic check

The 64 bit cl.exe version 16.00.30319.01 crashes with an internal
compiler error on the current check (and thus deduces it isn't
supported, even if the actual usage in libavuil/x86/cpu.c works
fine), but by assigning the value from the intrinsic to a variable,
or returning it, it works fine.

This error is fixed in cl.exe version 16.00.40219.01.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoconfigure: Add --disable-inline-asm command line option
Diego Biurrun [Tue, 4 Sep 2012 16:23:25 +0000 (18:23 +0200)]
configure: Add --disable-inline-asm command line option

This can come in handy for testing and possibly other purposes.

5 years agoconfigure: Don't try to enable the log2 function on msvcrt
Martin Storsjö [Mon, 10 Sep 2012 12:34:51 +0000 (15:34 +0300)]
configure: Don't try to enable the log2 function on msvcrt

Some msvcrt versions (the static 64 bit libc in MSVC 10) have
a log2 function, but there is no declaration for it in the headers.
Therefore, the normal configure check might find it, but it can fail
during build or at runtime, depending on whether implicit function
declarations are an error or not.

Therefore simply ignore this function on this platform.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: dsputil: Only compile motion_est code when encoders are enabled
Diego Biurrun [Sun, 9 Sep 2012 19:19:50 +0000 (21:19 +0200)]
x86: dsputil: Only compile motion_est code when encoders are enabled

5 years agomem: fix typo in check for __ICC
Mans Rullgard [Sun, 9 Sep 2012 21:47:15 +0000 (22:47 +0100)]
mem: fix typo in check for __ICC

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agofate: mp3: drop redundant CMP setting
Mans Rullgard [Sun, 9 Sep 2012 15:49:54 +0000 (16:49 +0100)]
fate: mp3: drop redundant CMP setting

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agortp: Depacketization of JPEG (RFC 2435)
Samuel Pitoiset [Fri, 7 Sep 2012 17:30:23 +0000 (19:30 +0200)]
rtp: Depacketization of JPEG (RFC 2435)

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoRename ff_put_string to avpriv_put_string
Martin Storsjö [Sun, 9 Sep 2012 13:03:52 +0000 (16:03 +0300)]
Rename ff_put_string to avpriv_put_string

This allows using it from libavformat as well. This will be used
by the RTP/JPEG depacketizer.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agomjpeg: Rename some symbols to avpriv_* instead of ff_*
Samuel Pitoiset [Thu, 6 Sep 2012 13:50:20 +0000 (15:50 +0200)]
mjpeg: Rename some symbols to avpriv_* instead of ff_*

These symbols will be used from the RTP/JPEG depacketizer.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoyadif: cosmetics
Luca Barbato [Sat, 1 Sep 2012 14:04:42 +0000 (16:04 +0200)]
yadif: cosmetics

5 years agoswscale: Provide the right alignment for external mmx asm
Martin Storsjö [Sat, 8 Sep 2012 22:43:53 +0000 (01:43 +0300)]
swscale: Provide the right alignment for external mmx asm

This reverts parts of e0c6cce4472. There is external mmx asm that
requires this alignment.

This fixes crashes when using swscale in builds with external mmx,
without inline assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: Replace checks for CPU extensions and flags by convenience macros
Diego Biurrun [Wed, 29 Aug 2012 17:01:05 +0000 (19:01 +0200)]
x86: Replace checks for CPU extensions and flags by convenience macros

This separates code relying on inline from that relying on external
assembly and fixes instances where the coalesced check was incorrect.

5 years agoconfigure: msvc: fix/simplify setting of flags for hostcc
Mans Rullgard [Fri, 7 Sep 2012 10:13:36 +0000 (11:13 +0100)]
configure: msvc: fix/simplify setting of flags for hostcc

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agox86: mlpdsp: mlp_filter_channel_x86 requires inline asm
Hendrik Leppkes [Sat, 8 Sep 2012 06:40:19 +0000 (08:40 +0200)]
x86: mlpdsp: mlp_filter_channel_x86 requires inline asm

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agomov_chan: Only set the channel_layout if setting it to a nonzero value
Martin Storsjö [Fri, 7 Sep 2012 07:45:16 +0000 (10:45 +0300)]
mov_chan: Only set the channel_layout if setting it to a nonzero value

If regularly parsing new chan atoms (as in rtpdec_qt), but the
chan atoms don't actually contain any channel layout, don't reset
the value that the caller has filled in (by guessing).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agomov_chan: Reindent an incorrectly indented line
Martin Storsjö [Fri, 7 Sep 2012 07:41:37 +0000 (10:41 +0300)]
mov_chan: Reindent an incorrectly indented line

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agomp2 muxer: mark as AVFMT_NOTIMESTAMPS.
Carl Eugen Hoyos [Sun, 28 Aug 2011 17:43:04 +0000 (19:43 +0200)]
mp2 muxer: mark as AVFMT_NOTIMESTAMPS.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
5 years agox86: float_dsp: fix ff_vector_fmac_scalar_avx() on Win64
Justin Ruggles [Fri, 3 Aug 2012 21:38:49 +0000 (17:38 -0400)]
x86: float_dsp: fix ff_vector_fmac_scalar_avx() on Win64

The SWAP macro does not work for explicit xmm/ymm usage, so instead just move
the scalar value from xmm2 to xmm0.

5 years agox86: more specific checks for availability of required assembly capabilities
Diego Biurrun [Tue, 4 Sep 2012 06:30:16 +0000 (08:30 +0200)]
x86: more specific checks for availability of required assembly capabilities

5 years agox86: avcodec: Drop silly "_mmx" suffix from dsputil template names
Diego Biurrun [Sat, 11 Aug 2012 20:35:27 +0000 (22:35 +0200)]
x86: avcodec: Drop silly "_mmx" suffix from dsputil template names

5 years agofate: Drop redundant setting of FUZZ to 1
Diego Biurrun [Sun, 26 Aug 2012 11:02:40 +0000 (13:02 +0200)]
fate: Drop redundant setting of FUZZ to 1

5 years agocavsdsp: set idct permutation independently of dsputil
Mans Rullgard [Tue, 4 Sep 2012 12:52:01 +0000 (13:52 +0100)]
cavsdsp: set idct permutation independently of dsputil

CAVS uses its own idct so using dsputil to set the permutation
is fragile.

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agox86: allow using add_hfyu_median_prediction_cmov on any cpu with cmov
Mans Rullgard [Sun, 2 Sep 2012 15:05:56 +0000 (16:05 +0100)]
x86: allow using add_hfyu_median_prediction_cmov on any cpu with cmov

For some reason add_hfyu_median_prediction_cmov is only selected
on 3Dnow-capable CPUs, even though it uses no 3Dnow instructions.
This patch allows it to be selected on any cpu with cmov with the
possibility of being overridden by the mmxext version.

Signed-off-by: Mans Rullgard <mans@mansr.com>
5 years agomov_chan: Pass a separate AVIOContext for reading
Samuel Pitoiset [Thu, 6 Sep 2012 10:46:37 +0000 (12:46 +0200)]
mov_chan: Pass a separate AVIOContext for reading

This fixes crashes when called from rtpdec_qt, where
AVFormatContext->pb is null, a crash present since 3bab7cd128.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoaf_asyncts: check return value from lavr when flushing.
Anton Khirnov [Tue, 4 Sep 2012 20:01:38 +0000 (22:01 +0200)]
af_asyncts: check return value from lavr when flushing.

Fixes an infinite loop on flush when avresample_get_delay() still
reports some samples but avresample_convert() doesn't return any data.

5 years agomss2: simplify loop in decode_rle()
Alberto Delmás [Mon, 3 Sep 2012 15:32:01 +0000 (17:32 +0200)]
mss2: simplify loop in decode_rle()

It calculates the sum of power of two series, which can be done in one step.

Suggested by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
5 years agomss12: avoid unnecessary division in arith*_get_bit()
Alberto Delmás [Mon, 3 Sep 2012 15:32:01 +0000 (17:32 +0200)]
mss12: avoid unnecessary division in arith*_get_bit()

That division can be replaced with a comparison:
((c->value - c->low) << 1) + 1 >= range

By expanding 'range' definition and simplifying this inequation we obtain
the final expression.

Suggested by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
5 years agomss2: do not try to read too many palette entries
Alberto Delmás [Mon, 3 Sep 2012 15:28:01 +0000 (17:28 +0200)]
mss2: do not try to read too many palette entries

Reported by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
5 years agompegvideo: set AVFrame fields to NULL after freeing the base memory
Janne Grunau [Wed, 5 Sep 2012 18:25:48 +0000 (20:25 +0200)]
mpegvideo: set AVFrame fields to NULL after freeing the base memory

Prevents dangling pointers and makes access after free more obvious.
Setting AVFrame.qscale_table to NULL is required for successfully
allocating a previously freed Picture with ff_alloc_picture().

5 years agoconfigure: Set the right cc_e flags for msvc
Martin Storsjö [Thu, 6 Sep 2012 11:44:07 +0000 (14:44 +0300)]
configure: Set the right cc_e flags for msvc

The default ones work, but outputs the preprocessed file on stdout
(into config.log).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agofate: Allow setting the ld parameter from the config file
Martin Storsjö [Wed, 5 Sep 2012 19:57:40 +0000 (22:57 +0300)]
fate: Allow setting the ld parameter from the config file

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: dsputil: Do not redundantly check for CPU caps before calling init funcs
Diego Biurrun [Wed, 5 Sep 2012 14:02:17 +0000 (16:02 +0200)]
x86: dsputil: Do not redundantly check for CPU caps before calling init funcs

The init functions check for CPU capabilities on their own already.

5 years agoconfigure: Disable some warnings in MSVC
Martin Storsjö [Wed, 5 Sep 2012 18:39:20 +0000 (21:39 +0300)]
configure: Disable some warnings in MSVC

This disables the following warnings:
C4100: unreferenced formal parameter
 (1035 occurrances)
C4214: nonstandard extension used : bit field types other than int
 (609 occurances)
C4996: 'avpriv_snprintf': This function or variable may be unsafe.
       Consider using _snprintf_s instead. To disable deprecation,
       use _CRT_SECURE_NO_WARNINGS. See online help for details.
 (351 occurrances)

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: vp56: cmov version of vp56_rac_get_prob requires inline asm
Hendrik Leppkes [Wed, 5 Sep 2012 17:43:18 +0000 (19:43 +0200)]
x86: vp56: cmov version of vp56_rac_get_prob requires inline asm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
5 years agoavopt: fix examples to match the same style about default values as the actual code.
Michael Niedermayer [Wed, 5 Sep 2012 16:40:21 +0000 (18:40 +0200)]
avopt: fix examples to match the same style about default values as the actual code.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoconfigure: Add support for MSVC cl.exe/link.exe
Ronald S. Bultje [Fri, 22 Jun 2012 09:24:59 +0000 (12:24 +0300)]
configure: Add support for MSVC cl.exe/link.exe

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agolavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.
Ronald S. Bultje [Tue, 4 Sep 2012 13:30:37 +0000 (14:30 +0100)]
lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agodsputil: workaround __VA_ARGS__ missing tokenization for MSVC
Luca Barbato [Wed, 25 Jul 2012 14:22:34 +0000 (16:22 +0200)]
dsputil: workaround __VA_ARGS__ missing tokenization for MSVC

A second expansion forces the preprocessor to tokenize properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoconfigure: add section for libc-specific hacks
Mans Rullgard [Tue, 4 Sep 2012 12:57:37 +0000 (13:57 +0100)]
configure: add section for libc-specific hacks

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agobuild: disable ranlib on mingw
Mans Rullgard [Tue, 4 Sep 2012 14:20:45 +0000 (15:20 +0100)]
build: disable ranlib on mingw

Using ranlib is not required but prevents using the libraries with
msvc.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoparser: Don't use pc as context for av_dlog
Martin Storsjö [Tue, 4 Sep 2012 11:45:00 +0000 (14:45 +0300)]
parser: Don't use pc as context for av_dlog

The ParserContext class doesn't have an AVClass, required for
using it as a logging class.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoh264: Remove an assert on current_picture_ptr being null
Michael Niedermayer [Mon, 6 Aug 2012 22:18:59 +0000 (00:18 +0200)]
h264: Remove an assert on current_picture_ptr being null

It is possible in various error paths as well as gap handling
that this has already been allocated. It is not clear why that
would be a problem with the current code, thus disable the
assert to avoid a common assert failure when asserts are enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agobuild: eamad: Add missing dependency on mpegvideo code
Diego Biurrun [Tue, 4 Sep 2012 15:01:06 +0000 (17:01 +0200)]
build: eamad: Add missing dependency on mpegvideo code

5 years agobuild: utvideoenc: Add missing dependency on Huffman code
Diego Biurrun [Tue, 4 Sep 2012 14:57:29 +0000 (16:57 +0200)]
build: utvideoenc: Add missing dependency on Huffman code

5 years agoavopt: Reorder the default_val struct, making i64 the first field
Martin Storsjö [Fri, 31 Aug 2012 10:35:47 +0000 (13:35 +0300)]
avopt: Reorder the default_val struct, making i64 the first field

Also mention this change in APIchanges.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavopt: Explicitly store rational option defaults in .dbl
Martin Storsjö [Thu, 30 Aug 2012 21:42:30 +0000 (00:42 +0300)]
avopt: Explicitly store rational option defaults in .dbl

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavopt: Explicitly store float/double option defaults in .dbl
Martin Storsjö [Fri, 31 Aug 2012 10:34:23 +0000 (13:34 +0300)]
avopt: Explicitly store float/double option defaults in .dbl

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Martin Storsjö [Fri, 31 Aug 2012 10:22:31 +0000 (13:22 +0300)]
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Martin Storsjö [Fri, 31 Aug 2012 09:52:18 +0000 (12:52 +0300)]
avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Martin Storsjö [Fri, 31 Aug 2012 09:45:52 +0000 (12:45 +0300)]
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agosvq1enc: Set picture_structure correctly
Michael Niedermayer [Mon, 6 Aug 2012 14:28:13 +0000 (16:28 +0200)]
svq1enc: Set picture_structure correctly

This fixes assert failures when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agompegvideo: remove last_picture_ptr / h264 assert.
Michael Niedermayer [Mon, 6 Aug 2012 14:49:49 +0000 (16:49 +0200)]
mpegvideo: remove last_picture_ptr / h264 assert.

This assert is no longer true since h264 error concealment needs
last_picture_ptr to be set.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agompegvideo_enc: remove assert that has become obsolete with the new API
Michael Niedermayer [Mon, 6 Aug 2012 08:26:04 +0000 (10:26 +0200)]
mpegvideo_enc: remove assert that has become obsolete with the new API

It now just checks uninitialized and unused data.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoelbg: Fix an assert
Michael Niedermayer [Sat, 18 Aug 2012 19:53:32 +0000 (21:53 +0200)]
elbg: Fix an assert

It seems the condition was flipped from what was intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoconfigure: add support for bdver1 and bdver2 CPU types.
Diego Elio Pettenò [Mon, 3 Sep 2012 12:20:44 +0000 (05:20 -0700)]
configure: add support for bdver1 and bdver2 CPU types.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoavio: make avio_close NULL the freed buffer
Luca Barbato [Tue, 4 Sep 2012 13:04:46 +0000 (15:04 +0200)]
avio: make avio_close NULL the freed buffer

5 years agopixdesc: cosmetics
Luca Barbato [Fri, 31 Aug 2012 09:22:20 +0000 (11:22 +0200)]
pixdesc: cosmetics

5 years agoproresenc: Don't free a buffer not owned by the codec
Martin Storsjö [Tue, 4 Sep 2012 11:57:45 +0000 (14:57 +0300)]
proresenc: Don't free a buffer not owned by the codec

The data in coded_frame isn't allocated using get_buffer, but
is copied from the input frame to the encoder, so we should
not try to free it ourselves.

This fixes an assert failure when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoproresenc: Write the full value in one put_bits call
Martin Storsjö [Tue, 4 Sep 2012 11:31:52 +0000 (14:31 +0300)]
proresenc: Write the full value in one put_bits call

Previously, the put_bits call writing the value wrote a value
larger than the number of bits specified, failing asserts
in debug mode. There was no actual bitstream writer corruption,
since the overwritten bit already always was set to 1.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoadpcmenc: Calculate the IMA_QT predictor without overflow
Michael Niedermayer [Tue, 4 Sep 2012 11:02:30 +0000 (14:02 +0300)]
adpcmenc: Calculate the IMA_QT predictor without overflow

Previously, the value given to put_bits was 10 bits long for positive
predictors, even though 9 bits were to be written. The extra bit could
in some cases overwrite existing bits in the bitstream writer cache.

This fixes a failed assert in put_bits.h, when running a version
built with -DDEBUG.

The fate test result gets slightly improved, thanks to getting rid
of the overwritten bits in the bitstream writer cache.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agox86: Add convenience macros to check for CPU extensions and flags
Diego Biurrun [Wed, 29 Aug 2012 16:53:14 +0000 (18:53 +0200)]
x86: Add convenience macros to check for CPU extensions and flags

5 years agox86: h264dsp: drop some unnecessary ifdefs around prototype declarations
Diego Biurrun [Sun, 2 Sep 2012 15:03:41 +0000 (17:03 +0200)]
x86: h264dsp: drop some unnecessary ifdefs around prototype declarations

5 years agomss12: merge decode_pixel() and decode_top_left_pixel()
Alberto Delmás [Fri, 31 Aug 2012 09:24:26 +0000 (11:24 +0200)]
mss12: merge decode_pixel() and decode_top_left_pixel()

No meaningful generated code differences using gcc -O3.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
5 years agomss12: reduce SliceContext size from 1067 to 164 KB
Alberto Delmás [Sun, 2 Sep 2012 10:44:21 +0000 (12:44 +0200)]
mss12: reduce SliceContext size from 1067 to 164 KB

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>